Methodology & Philosophy
spechatch is not just a CLI or a database — it is an opinionated engineering workflow built on the Spec-Driven Development (SDD) methodology defined at specdriven.ai, combined with Test-Driven Development (TDD) and Behavior-Driven Development (BDD) for modern human + AI agent teams.
1. Why SDD — Solving Team & Agent Synchronization
Section titled “1. Why SDD — Solving Team & Agent Synchronization”AI coding assistants have made generating code 10x faster — and made drift, misalignment, and unspoken assumptions 10x easier to introduce.
When a team relies on ephemeral chat prompts:
- Developer A and Developer B (or two parallel AI agents) unknowingly make conflicting architectural choices.
- Requirements live in Slack threads or vanished chat sessions instead of version control.
- Nobody can tell which tests actually prove which feature, or when a refactor silently broke an earlier contract.
spechatch solves the team synchronization problem by making versioned Markdown specifications (and optionally the shared multi-project Incubator ledger) the single living source of truth:
- Every feature, bugfix, hotfix, and epic gets a monotonic ID, explicit scope, testable acceptance criteria, and tracked file/test ownership.
specs/ROADMAP.mdandCHANGELOG.mdare generated deterministically from specs — never hand-edited.- Across multi-developer and multi-agent teams, the Incubator coordinates atomic IDs, soft advisory TTL leases (
claim), epic DAG queues (epic next), and real-time Slack/Discord/Teams notifications.
2. Software Engineering Thinking at the Core of Every Spec
Section titled “2. Software Engineering Thinking at the Core of Every Spec”In spechatch, a specification is not bureaucratic paperwork — it is where real software engineering happens before a single line of code is written:
- Problem framing & non-goals: Force clarity on why something is being built and what is explicitly out of scope.
- Architecture & trade-offs (
plan.md): Reason about module boundaries, data contracts, concurrency, migrations, security boundaries, and failure modes up front. - Zero-ambiguity gate (
[NEEDS CLARIFICATION]):spechatch testandspechatch verifyblock promotion when unresolved ambiguity markers remain. - Atomic execution (
tasks.md): Break implementation into small, verifiable steps instead of sprawling, unreviewable diffs.
Code becomes a clean, verifiable derivation of sound engineering ideas — not a prompt-lottery output.
3. Always Human-in-the-Loop for Specs and Code
Section titled “3. Always Human-in-the-Loop for Specs and Code”AI agents are extraordinary force multipliers for drafting specs, exploring codebases, writing tests, and implementing atomic tasks — but humans always remain accountable for architectural intent, security, and release decisions.
spechatch enforces Human-in-the-Loop technically, not just by convention:
- Explicit Human Checkpoints: Agent skills (
spechatch-driven-development) pause for human review after drafting/clarifying a spec and before finalizing commits or merges. - Cryptographic Actor Distinction (
humanvs.agent/ci): In authenticated Incubator deployments (SPECHATCH_AUTH_ENABLED=true), recording an immutable checkpoint approval (spechatch approve/POST /approvals) requires ahumanAPI key. Attempting to approve with anagentorcikey is rejected with403 Forbidden. - Human-Gated Statuses & Confirmation Targets: Status transitions into
approvedanddoneare human-gated, and heavy/sensitive command targets (such asmake checkor package installations) can require explicit human confirmation (require_confirmation: true).

4. The Importance of Blueprinting (spechatch create blueprint)
Section titled “4. The Importance of Blueprinting (spechatch create blueprint)”Before writing your first ten specs, teams need a shared high-level map of the system. Starting with an Architecture Blueprint prevents local optimizations that clash three sprints later.
spechatch includes a dedicated scaffolder that works even before spechatch init:
# Scaffold <slug>-blueprint.md using the built-in architecture templatespechatch create blueprint --name "Payments Platform"
# Or write to a custom pathspechatch create blueprint --name "Payments Platform" --output docs/architecture-blueprint.mdThe built-in blueprint guides your team through:
- Executive summary, goals, and non-goals
- Architecture & tech-stack trade-offs
- Data models, API contracts, and security/ops guardrails
- Proposed repository layout, phased roadmap, and open questions
Customizing the Blueprint Template
Section titled “Customizing the Blueprint Template”Every organization has its own RFC / Architecture Decision Record (ADR) style. spechatch create blueprint resolves templates in strict priority order:
- Explicit flag:
--template path/to/custom-blueprint.md - Repo-local override:
.spechatch/templates/blueprint.md(committed to git so the whole team shares the exact same blueprint structure) - Built-in default template
All custom templates automatically support safe placeholder substitution for {{name}}, {{slug}}, {{project}}, and {{date}}.
5. Living Documentation with BDD GIVEN / WHEN / THEN Acceptance Criteria
Section titled “5. Living Documentation with BDD GIVEN / WHEN / THEN Acceptance Criteria”Just like BDD Gherkin .feature files, spechatch writes Acceptance Criteria in structured GIVEN / WHEN / THEN checkboxes:
- [ ] **AC-1:** **GIVEN** an authenticated developer calling `POST /projects/{slug}/ids` with an `Idempotency-Key`, **WHEN** the same request is retried after a network timeout, **THEN** the server returns the exact same allocated spec ID without advancing the counter.Why this format works so well for both humans and AI agents:
- Living documentation: Anyone (product managers, QA, new engineers) can read a spec six months later and immediately understand exact system behavior without decoding implementation code.
- Unambiguous test contract: Each
AC-*maps 1:1 to automated unit, integration, or BDD/Gherkin tests — andspechatchforbids marking a specdoneuntil everyAC-*checkbox is verified. - Built-in BDD support: Enable the bundled
acceptance-criteriarule pack andspechatch-bdd-testingskill (spechatch agents add acceptance-criteria spechatch-bdd-testing --sync) to enforceGIVEN / WHEN / THENacross every spec and translate ACs cleanly into reusable.featurefiles and step definitions.
6. Standing on Proven Foundations: specdriven.ai, TDD & BDD
Section titled “6. Standing on Proven Foundations: specdriven.ai, TDD & BDD”spechatch synthesizes three proven engineering disciplines into one cohesive workflow:
- specdriven.ai Lifecycle: Constitute (
spechatch constitute) → Specify (spechatch new) → Clarify (resolve[NEEDS CLARIFICATION]) → Plan (plan.md) → Tasks (tasks.md) → Implement → Verify (spechatch verify&spechatch test run). - Test-Driven Development (TDD): Reinforced by the bundled
tdd-firstrule pack and enforced mechanically byspechatch’s non-empty JUnit execution gate (executed_count > 0) — a spec is never markedhealthyuntil real linked tests execute and pass. - Behavior-Driven Development (BDD): Expressed through human-readable
GIVEN / WHEN / THENAcceptance Criteria (acceptance-criteriarule pack +spechatch-bdd-testingskill) so specifications double as executable, living documentation.
7. Canonical Command Entrypoints (Makefile / justfile) — No Rogue Agent Commands
Section titled “7. Canonical Command Entrypoints (Makefile / justfile) — No Rogue Agent Commands”One of the highest-leverage guardrails in spechatch is declaring canonical command entrypoints in spechatch.project.yml:
commands: strict: true entrypoints: - name: make file: Makefile invoke: "make {target}" forbid_raw: [pytest, ruff, mypy] targets: test: { description: "Run test suite", require_confirmation: false } lint: { description: "Run linters and format checks", require_confirmation: false } check: { description: "Run full quality gate", require_confirmation: true }Why This Matters
Section titled “Why This Matters”Without explicit command governance, AI agents routinely improvise shell commands — invoking bare pytest outside your virtualenv, skipping typechecks or linters, running inconsistent flags across sessions, or executing heavy/destructive commands without asking.
When you run spechatch init --scan and spechatch agents sync:
spechatchdetects yourMakefileor cross-platformjustfiletargets automatically.- It generates the managed
spechatch-command-entrypointsrule across Antigravity, Cursor, Claude Code, Codex, and Copilot instructing agents to exclusively use your canonical entrypoints and never invoke forbidden raw commands directly. - Targets flagged
require_confirmation: trueforce agents to ask a human before executing them.
Need low-typing sh-* wrappers in your project? Scaffold them in one command:
spechatch create makefile --append # macOS / Linuxspechatch create justfile --append # Cross-platform (macOS / Linux / Windows)Ready to Start?
Section titled “Ready to Start?”- Getting Started (Local SDD) — Initialize your first repository in 5 minutes.
- AI Agents & Native MCP — Sync the 29-pack catalog and connect the 15-tool MCP server.