skip to content
coograph docs roadmap pro github

Workflow

Every change in a Coograph-initialized project goes through the same five-step pipeline: Plan → Propose → Apply → Review → Archive. The only exemptions are narrow and literal — typo fixes, comment-only edits, user-dictated config-value bumps, and follow-ups on an already-approved in-progress proposal.

“Trivial,” “obvious,” “small,” and “just one tweak” are not exemptions. If in doubt, propose.

The point of the workflow isn’t ceremony. It’s that AI agents are uniquely good at confidently shipping the wrong thing, and the workflow forces an interrupt point before that happens.

Plan

/project:plan (Claude Code) or @Planner (VS Code Copilot).

The Planner agent investigates the codebase and asks one focused clarifying question at a time. It never writes code. Output is a clear understanding of what the change requires — files, integration points, risks.

Skip planning when:

Propose

The openspec-propose skill creates an OpenSpec change directory at openspec/changes/<YYYY-MM-DD>-<slug>/ with:

.openspec.yaml
proposal.md           ← Why, Goals, Non-Goals, Decisions, Impact, Risks
specs/<capability>/spec.md   ← Requirements + Scenarios
tasks.md              ← 3–8 task groups, last is Verification

The user reviews and either says “proceed” or sends edits. No code is written before approval.

Apply

The agent works through tasks.md in order, marking tasks done as it goes.

After all tasks are done, run quality gates: typecheck, lint, format, tests. Fix until clean.

Review

/project:review or @Reviewer.

The Reviewer is read-only. Every finding cites a verbatim quote from a fresh file read — diffs and conversation memory are not valid sources.

Findings are severity-rated: Critical (must fix before merge), Warning (should fix), Suggestion (could fix). The implementor fixes Critical/Warning findings, re-runs quality gates, and re-reviews only if fixes were substantial.

Archive

Move the completed proposal:

mv openspec/changes/<slug>/ openspec/changes/archive/<slug>/

This keeps openspec/changes/ populated only with active work — agents read in-progress proposals on session start.

Agents

There is no separate @Implementer. The agent that plans also implements.

AgentPurposeKey constraint
PlannerInterview-driven planningOne question at a time. Never implements.
ReviewerStrict read-only code reviewEvery finding cites a verbatim quote.
DebuggerRoot-cause analysis, minimal fixesReproduce → Evidence → Fix → Verify. 3-attempt circuit breaker.
VerifierEvidence-based completion checksRuns commands itself. PASS/FAIL/INCOMPLETE verdict.
ExploreFast read-only codebase Q&AQuick / medium / thorough depth levels.

All agents are required to call code-graph first. Fallback to sqlite3 .code-graph/graph.db, and only then to grep, is permitted only when the graph DB is genuinely absent. Convenience is not a valid reason to skip.

Lifecycle hooks

Claude Code lifecycle hooks live in .claude/hooks/:

HookWhat it does
block-generated.pyBlocks edits to files under generated/, dist/, build/, etc., and to anything with @generated / DO NOT EDIT in its first 5 lines.
log-bash.pyAppends every bash command to .claude/session.log (gitignored). Audit trail.
report-graph.pyReports code-graph state at session start. Prints a rebuild hint if graph.db is missing.
warn-scope.pyIf an active OpenSpec exists, warns when editing a file not referenced in tasks.md. Surfaces scope creep without stopping work.

These run automatically — no agent decision, no prompt engineering required.

Reliability properties

These are not promises about correctness. They’re constraints designed to fail loudly when an agent is about to do something wrong.

Edit this page on GitHub →