Official Codex Plugin Directory publishing is not yet self-serve. SpecX is currently distributed through a GitHub-backed Codex marketplace.
SpecX turns vague agent tasks into governed execution contracts. It enforces required agents, tools, evidence, gates, artifacts, and failure semantics. It prevents fake success, silent fallback, and uncontrolled agent execution.
SpecX is a governance layer for Codex agents.
codex plugin marketplace add https://github.com/EvanAI0331/specx-codex-marketplace.git --ref v0.4.0The official Codex directory will be used after OpenAI opens self-serve publishing.
- Contract-first workflow definition.
- Required LLM-backed agents with role, execution, and output specs.
- Gate-bound and evidence-bound decisions.
- Artifact contracts and explicit failure states.
- Fail-closed verification for fake success and silent fallback.
The current main branch provides skills + CLI + MCP tools.
Included skills:
specx-contract-compilerspecx-runtimespecx-agent-governancespecx-verifier
Included CLI:
python3 scripts/specx_cli.py init --template research --output ./specx.contract.json
python3 scripts/specx_cli.py init --template software_refactor --output ./specx.contract.json
python3 scripts/specx_cli.py init --template content_pipeline --output ./specx.contract.json
python3 scripts/specx_cli.py verify ./specx.contract.json
python3 scripts/specx_cli.py verify-result ./specx.execution_result.json --contract ./specx.contract.json
python3 scripts/specx_cli.py validate examples/demo_software_engineering_contract.json
python3 scripts/specx_cli.py compile examples/demo_software_engineering_contract.json
python3 scripts/specx_cli.py explain examples/demo_software_engineering_contract.jsonIncluded MCP tools:
specx.validatespecx.compilespecx.verifyspecx.verify_resultspecx.explainspecx.init
Install MCP runtime dependencies before running MCP tools:
python3 -m pip install -r requirements.txtEvery valid contract must define:
contract_idschema_version: "0.1"objectivedomaintask_typerequired_agentsrequired_toolsrequired_evidencegatesexpected_artifactsfailure_semanticsexecution_constraintshuman_approvalverification_policy.required_checks
Each gate must include gate_id, condition, on_pass, and on_failure. failure_semantics must include no_fake_success, no_silent_fallback, and explicit_failure_state.
If required evidence, tools, specs, gates, artifacts, or verification policy are missing, the workflow must return ok=false with failure_state and details. It must not claim success.
Contracts are pre-execution constraints. Execution results are post-execution acceptance records.
verify-result checks that a result has matching contract_id, gate results for every contract gate, artifacts for every expected artifact, explicit status, failure semantics checks, and correct failure_state behavior.
Execution statuses:
passed: every required gate and artifact is present;failure_statemust be null or empty.failed: execution failed;failure_statemust be explicit.blocked: execution stopped before completion;failure_statemust be explicit.
Demo 1: Software engineering
- Before: "Refactor this backend."
- After SpecX: required agents, gates, tests, failure semantics, and artifact contract.
- File:
examples/demo_software_engineering_contract.json
Demo 2: Research task
- Before: "Research this market."
- After SpecX: evidence requirements, source gates, decision packet, and risk notes.
- File:
examples/demo_research_task_contract.json
Demo 3: Multi-agent system
- Before: agents freestyle.
- After SpecX: contract-first runtime, verifier, and explicit failure state.
- File:
examples/demo_multi_agent_system_contract.json
docs/quickstart.mddocs/contract-format.mddocs/use-cases.mddocs/comparison.mddocs/mcp-tools.mddocs/contract-schema-v0.1.mddocs/execution-result-v0.1.mddocs/cli.mddocs/promotion.md
P0:
- Contract schema v0.1 adoption feedback.
- Execution result adoption feedback.
- MCP integration tests against real Codex marketplace install.
P1:
specx initspecx verify
The next release target is a tagged MCP release after install testing.
specx-codex-plugin/
├── .codex-plugin/plugin.json
├── docs/
├── skills/
├── scripts/
├── schemas/
├── templates/
├── examples/
├── tests/
├── README.md
├── marketplace.json
├── LICENSE
├── requirements.txt
└── .mcp.json
SpecX must not replace agent decisions with hardcoded fallback logic. Scripts may validate, transform, launch, or verify; they must not impersonate agent reasoning.
No LLM-backed decision authority means no agent label.