|
| 1 | +# SpecX Codex Plugin |
| 2 | + |
| 3 | +SpecX turns vague agent tasks into governed execution contracts. |
| 4 | +It enforces required agents, tools, evidence, gates, artifacts, and failure semantics. |
| 5 | +It prevents fake success, silent fallback, and uncontrolled agent execution. |
| 6 | + |
| 7 | +SpecX is a governance layer for Codex agents. |
| 8 | + |
| 9 | +## Install |
| 10 | + |
| 11 | +Install from the marketplace repository: |
| 12 | + |
| 13 | +```bash |
| 14 | +codex plugin marketplace add BTCNAI/specx-codex-marketplace |
| 15 | +``` |
| 16 | + |
| 17 | +Or pin the stable release: |
| 18 | + |
| 19 | +```bash |
| 20 | +codex plugin marketplace add https://github.com/BTCNAI/specx-codex-marketplace.git --ref v0.1.0 |
| 21 | +``` |
| 22 | + |
| 23 | +## What It Provides |
| 24 | + |
| 25 | +- Contract-first workflow definition. |
| 26 | +- Required LLM-backed agents with role, execution, and output specs. |
| 27 | +- Gate-bound and evidence-bound decisions. |
| 28 | +- Artifact contracts and explicit failure states. |
| 29 | +- Fail-closed verification for fake success and silent fallback. |
| 30 | + |
| 31 | +## Current Release |
| 32 | + |
| 33 | +Version `v0.1.0` is a skills + CLI release. |
| 34 | + |
| 35 | +Included skills: |
| 36 | + |
| 37 | +- `specx-contract-compiler` |
| 38 | +- `specx-runtime` |
| 39 | +- `specx-agent-governance` |
| 40 | +- `specx-verifier` |
| 41 | + |
| 42 | +Included CLI: |
| 43 | + |
| 44 | +```bash |
| 45 | +python3 scripts/specx_cli.py validate examples/demo_software_engineering_contract.json |
| 46 | +python3 scripts/specx_cli.py compile examples/demo_software_engineering_contract.json |
| 47 | +python3 scripts/specx_cli.py verify examples/demo_software_engineering_contract.json |
| 48 | +python3 scripts/specx_cli.py explain examples/demo_software_engineering_contract.json |
| 49 | +``` |
| 50 | + |
| 51 | +## Contract Shape |
| 52 | + |
| 53 | +Every valid contract must define: |
| 54 | + |
| 55 | +- `required_agents` |
| 56 | +- `required_tools` |
| 57 | +- `required_evidence` |
| 58 | +- `gates` |
| 59 | +- `expected_artifacts` |
| 60 | +- `failure_semantics` |
| 61 | +- `execution_constraints.no_fake_success` |
| 62 | +- `execution_constraints.no_silent_fallback` |
| 63 | + |
| 64 | +If required evidence, tools, specs, gates, or artifacts are missing, the workflow must return `blocked`, `failed`, or `unsupported`. It must not claim success. |
| 65 | + |
| 66 | +## Demos |
| 67 | + |
| 68 | +Demo 1: Software engineering |
| 69 | + |
| 70 | +- Before: "Refactor this backend." |
| 71 | +- After SpecX: required agents, gates, tests, failure semantics, and artifact contract. |
| 72 | +- File: `examples/demo_software_engineering_contract.json` |
| 73 | + |
| 74 | +Demo 2: Research task |
| 75 | + |
| 76 | +- Before: "Research this market." |
| 77 | +- After SpecX: evidence requirements, source gates, decision packet, and risk notes. |
| 78 | +- File: `examples/demo_research_task_contract.json` |
| 79 | + |
| 80 | +Demo 3: Multi-agent system |
| 81 | + |
| 82 | +- Before: agents freestyle. |
| 83 | +- After SpecX: contract-first runtime, verifier, and explicit failure state. |
| 84 | +- File: `examples/demo_multi_agent_system_contract.json` |
| 85 | + |
| 86 | +## Docs |
| 87 | + |
| 88 | +- `docs/quickstart.md` |
| 89 | +- `docs/contract-format.md` |
| 90 | +- `docs/use-cases.md` |
| 91 | +- `docs/comparison.md` |
| 92 | + |
| 93 | +## Roadmap |
| 94 | + |
| 95 | +P0: |
| 96 | + |
| 97 | +- Real MCP server. |
| 98 | +- Contract schema v0.1. |
| 99 | +- `specx.validate` |
| 100 | +- `specx.compile` |
| 101 | +- `specx.verify` |
| 102 | +- `specx.explain` |
| 103 | + |
| 104 | +P1: |
| 105 | + |
| 106 | +- `specx init` |
| 107 | +- `specx verify` |
| 108 | + |
| 109 | +The next release target is skills + CLI + MCP tools. |
| 110 | + |
| 111 | +## Repository Structure |
| 112 | + |
| 113 | +```text |
| 114 | +specx-codex-plugin/ |
| 115 | +├── .codex-plugin/plugin.json |
| 116 | +├── docs/ |
| 117 | +├── skills/ |
| 118 | +├── scripts/ |
| 119 | +├── schemas/ |
| 120 | +├── examples/ |
| 121 | +├── tests/ |
| 122 | +├── README.md |
| 123 | +├── marketplace.json |
| 124 | +└── LICENSE |
| 125 | +``` |
| 126 | + |
| 127 | +## Failure Policy |
| 128 | + |
| 129 | +SpecX must not replace agent decisions with hardcoded fallback logic. Scripts may validate, transform, launch, or verify; they must not impersonate agent reasoning. |
| 130 | + |
| 131 | +No LLM-backed decision authority means no agent label. |
0 commit comments