Standalone home for the OpenCode /plan skill and its JSON-first CLI.
opencode-plancommand tree with strict machine I/O- Pydantic models for plans, responses, and JSON Schema export
- deterministic validation, DAG analysis, Monte Carlo, and governance
- idempotent execution state in
.plan/ - packaging, tests, and CI workflows
pip install -e .[dev]
# or
opencode-plan --helpopencode-plan init --template enterprise --out plan.json
opencode-plan validate plan.json --strict --auto-fix
opencode-plan simulate plan.json --iterations 10000
opencode-plan execute plan.json --mode plan-and-execute
opencode-plan audit plan.json --format sarif
opencode-plan rollback plan.json --dry-run
opencode-plan schema --target plan| Code | Meaning |
|---|---|
0 |
OK |
1 |
Validation failed |
2 |
Execution error |
3 |
Approval required |
4 |
Drift detected |
5 |
Unknown crash |
SKILL.md— skill contractBEST_PRACTICES.md— operator guidancesrc/plan_cli/— packaged CLI runtimesrc/plan_cli/templates/— machine templates used byinittemplates/— legacy human templates kept for compatibilityscripts/— compatibility and helper scripts
- Keep
SKILL.mdand the CLI in sync. - Treat
plan_clias the runtime contract. - Prefer
opencode-planover ad-hoc script execution.