How Midcore works
Midcore combines an Outcome Compiler (intent → capability graph → contracts → evidence → release) with an agentic coding loop. The agent reads your codebase, plans changes, edits files, runs commands, and verifies every step against deterministic gates.
The agentic loop
When you run midcore agent "...", the system:
- Understands intent — Parses your request and maps it to capabilities and scope.
- Locks contracts — Freezes API schemas, event contracts, and invariants before any code change.
- Plans and executes — Generates a plan, edits files, runs tests and linters.
- Runs hardening and gates — Applies the 8 hardening rounds and 33+ gates; records evidence.
- Produces proof — Appends to the evidence ledger and generates capability passports.
No vibes
Completion is defined by "PASS gates" and machine-verifiable evidence, not narrative or self-assessment.
Built-in tools
The agent can read files, search the codebase (grep, semantic search), edit files (with verify-after-edit), run shell commands (sandboxed when configured), and invoke gates. See CLI reference and Tools reference for details.
Four interaction modes
| Mode | Purpose | Edits? |
|---|---|---|
| Agent | Multi-file implementation with impact analysis and gate verification | Yes |
| Plan | Design and discuss approach before writing code | No |
| Debug | Multi-hypothesis debugging with instrumentation and targeted fixes | Yes |
| Ask | Exploration and documentation only | No |
bash
midcore agent "add auth"
midcore plan "migrate DB"
midcore debug "500 on /api/users"Key takeaways
- Midcore combines the Outcome Compiler (intent → contracts → evidence) with an agentic loop that edits, verifies, and runs gates.
- Completion is "PASS gates" and machine-verifiable evidence — not narrative.
- Use Agent for implementation, Plan for design-only, Debug for failure tracing, Ask for read-only exploration.
- Every edit is verified (verify-after-edit); gates and evidence are recorded in the ledger.
Related documentation
Outcome Compiler · Gates & evidence · Common workflows · Extend Midcore