Skip to main content

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:

  1. Understands intent — Parses your request and maps it to capabilities and scope.
  2. Locks contracts — Freezes API schemas, event contracts, and invariants before any code change.
  3. Plans and executes — Generates a plan, edits files, runs tests and linters.
  4. Runs hardening and gates — Applies the 8 hardening rounds and 33+ gates; records evidence.
  5. 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

ModePurposeEdits?
AgentMulti-file implementation with impact analysis and gate verificationYes
PlanDesign and discuss approach before writing codeNo
DebugMulti-hypothesis debugging with instrumentation and targeted fixesYes
AskExploration and documentation onlyNo
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.

Outcome Compiler · Gates & evidence · Common workflows · Extend Midcore