DoD.md
Last reviewed: 2026-04-23 · Version: 2.0.0
This document defines the repo-wide completion bar for production-ready changes in GitNexus. It is the stable baseline. Implementation prompts, agent behavior, and review workflows may add task-specific checks, but they must never weaken this bar.
Use it together with:
AGENTS.md — agent-facing rules of engagementGUARDRAILS.md — hard safety constraintsCONTRIBUTING.md — contributor workflowTESTING.md — test strategy and coverage expectationsARCHITECTURE.md — pipeline boundaries, Call-Resolution DAG, LanguageProvider contractA change is Done when it is correct, safely integrated, appropriately tested, operationally sound, and a net improvement to the codebase — not merely "the code compiles and a test passes."
This DoD applies to:
gitnexus/gitnexus-web/gitnexus-shared/Out of scope: full agent personas, step-by-step implementation prompts, verbose review formatting rules, repo walkthroughs already covered elsewhere, temporary task-specific acceptance criteria. Those belong in prompts, PR templates, or other repo docs.
Every change must satisfy every relevant item below. If an item does not apply, say so explicitly in the PR description.
gitnexus/ for CLI, MCP, HTTP bridge, ingestion, graph, and runtime logicgitnexus-web/ for browser UI (thin client — no WASM workers, all queries via HTTP API)gitnexus-shared/ for shared contracts, types, and constantsgitnexus/src/core/ingestion/ must not name languages — use LanguageProvider hooks (see AGENTS.md and ARCHITECTURE.md § Call-Resolution DAG).gitnexus-shared are used. No barrel re-exports introduced to paper over drift between packages.gitnexus-shared/, CLI flags, MCP tools/resources, HTTP routes, graph node/edge shapes, persisted IDs) are preserved unless the task explicitly requires a contract change.AGENTS.md and GUARDRAILS.md.getTreeSitterBufferSize) — do not hard-code new buffer sizes.toBe / toEqual for exact expectations; avoid toBeGreaterThanOrEqual and other bounds-only assertions that mask regressions.PipelineProgress and similar shared contracts) remains accurate after the change.git state manipulation) are opt-in or guarded.When the change is produced with or reviewed by an AI agent, the following additional gates apply:
Run the commands relevant to the touched area. If something cannot be run in the current environment, state it explicitly in the handoff.
gitnexus-shared/ dist is built before consuming packages are typechecked or tested (CI uses the setup-gitnexus action for this — local runs must match).gitnexus/ changedcd gitnexus && npx tsc --noEmitcd gitnexus && npm testcd gitnexus && npx prettier --check . for files in the diff (pre-commit runs the affected-tests subset; do not expand scope)gitnexus-web/ changedcd gitnexus-web && npx tsc -b --noEmitcd gitnexus-web && npm testcd gitnexus-web && npm run test:e2e when browser flows or user-facing UI behavior changedgitnexus-shared/ changednpm run build in gitnexus-shared/)cancel-in-progress) and the setup-gitnexus action remain wired correctly.CHANGELOG.md is not edited here — it is owned by the release process.A reviewer (human or agent) should be able to answer yes to each of the following before approving:
A change is not Done if any of the following is true, even if CI is green:
gitnexus/, gitnexus-web/, and gitnexus-shared/ and only one side was updated.CHANGELOG.md was edited during PR work.Use this in implementation and review prompts. Keep it short and tailor it to the actual change:
# Definition of Done for this implementation
- [ ] Runtime wiring is complete for the affected path.
- [ ] Requested behavior is correct and relevant contracts are preserved or explicitly updated.
- [ ] The design stays scoped, readable, and proportionate to the task.
- [ ] Tests prove the changed behavior and catch broken wiring.
- [ ] Required validation for touched packages has been run, or any gap is explicitly noted.
- [ ] Repo boundaries, security, performance, and operational safety are respected.
- [ ] The diff contains only the intended change — no unrelated churn.
Reference this file as the repo-wide completion bar. Add a task-specific review instruction such as:
Review this change against `DoD.md` and the repo docs (`AGENTS.md`, `GUARDRAILS.md`,
`CONTRIBUTING.md`, `TESTING.md`, `ARCHITECTURE.md`). Treat `DoD.md` as the minimum
bar for production readiness. Flag anything that is partially wired, contract-unsafe,
under-tested, architecturally misplaced, scope-creeping, or harder to maintain than
necessary. Apply the five-axis review gate: correctness, readability, architecture,
security, performance.
This DoD is living. Revisit it when:
Track material updates in the changelog below. Keep the file tight — if it grows past a single read-in-one-sitting, something has drifted into the wrong place.
| Date | Version | Change |
|---|---|---|
| 2026-04-23 | 2.0.0 | Restructured into numbered sections; added Security, Observability, Reversibility, Agent-Assisted Guardrails, Review Gates, Not-Done Signals; expanded validation baseline (shared-first build, prettier, CI workflow checks). |
| 2026-04-13 | 1.0.0 | Initial repo-wide Definition of Done. |