Danijel Martinek fc27eef6eb docs(coverage): sync docs to shipped state + wire sandcastle prompts
Closes the staleness gap after the 10-commit coverage epic shipped.

Doc sync (item 1 from the user's choice):
  - CLAUDE.md Quick Start: adds pnpm coverage:aggregate / coverage:diff
    / mutate to the command listing
  - CLAUDE.md: new "Sibling architecture: coverage (ADR-020)" section
    after the conformance gate table — captures the 4-layer table +
    points at docs/guides/coverage.md + ADR-020 + says agents must run
    coverage:diff before reporting complete
  - AGENTS.md preamble: now lists coverage as a parallel multi-latency
    quality system alongside conformance, with the same gate / latency
    framing
  - PRD frontmatter: status draft -> shipped + shipped date +
    shipping-commits list (all 10 SHAs anchoring the trace)
  - PRD findings table: each row gets a Resolution column citing the
    commit that closed it; conclusion text updated to past tense
  - ADR-020 implementation phasing: rewritten as a status table with
    each step linked to the commit that shipped it + Boot-time
    assertFeatureConformance explicitly marked Deferred with rationale
  - docs/guides/coverage.md: removed "Boot wiring lands in the next
    story" line; replaced with the deferral rationale + clarified
    that two readers (vitest, coverage:diff) consume the manifest

Sandcastle prompts (item 2 from the user's choice):
  - .sandcastle/implementer.prompt.md: new "Coverage gates" section
    after the conformance-gates list, requiring `pnpm test --coverage`,
    `pnpm coverage:aggregate`, and `pnpm coverage:diff` to all pass
    before reporting `complete`. Machine-readable JSON shape of
    coverage:diff documented (status / uncovered[] / kind enum), with
    explicit instructions on how to interpret each kind. Allowlist
    expansion requires justification + test.
  - .sandcastle/reviewer.prompt.md: AC coverage relabeled to "AC
    coverage (acceptance criteria, not test coverage)" to disambiguate;
    new check #7 "Coverage gates (ADR-020)" requiring CI's
    Coverage — diff (L1) step green + per-layer thresholds met +
    no silent allowlist expansion + manifest band drift detection.

Effect: future agent runs through sandcastle now treat coverage as a
first-class blocking gate, parallel to conformance. PRs no longer
discover coverage failures only via CI; the implementer is required
to check before reporting done, and the reviewer is required to
verify.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 16:47:16 +02:00
2026-05-13 07:54:22 +02:00

Clean Architecture Monorepo Template

Turborepo + pnpm monorepo organised by vertical features, with an agent-first workflow and five conformance gates.

This template is built for agent-driven development. Sandcastle is the orchestration substrate; pnpm work dispatch is the entry point. See ADR-019 for the decision rationale and docs/guides/runbook.md for end-to-end usage.

Start here

Read docs/guides/runbook.md — day-1 onboarding (prerequisites, env vars, daily commands, troubleshooting, Using Sandcastle for agent dispatch).

Quick reference

pnpm install           # Install + auto-wire husky pre-commit hooks
pnpm dev               # All dev servers (web-next:3000, cms:3001, web-tanstack:3002, storybook:6006)
pnpm test              # All tests
pnpm typecheck         # TypeScript across all packages
pnpm lint              # ESLint (incl. 8 conformance/* rules)
pnpm conformance       # Cross-feature event closure
pnpm fallow            # Whole-codebase: dead exports, dupes, complexity
pnpm turbo boundaries  # Workspace dependency graph
pnpm work status       # docs/work/ epic + story state
docker compose up -d   # Start PostgreSQL

Documentation map

Scaffolding

pnpm turbo gen feature <name>             # Scaffold a feature (manifest + contracts + tests)
pnpm turbo gen event                      # Event contract or handler (requires gen core-package events)
pnpm turbo gen job                        # Background job
pnpm turbo gen realtime                   # Realtime channel (requires gen core-package realtime)
pnpm turbo gen core-package <name>        # Optional core: events / realtime / trpc / ui / audit
pnpm turbo gen core-ui-component <name>   # Atomic-design component

Generator-first is non-negotiable — hand-rolled feature/event/job/realtime/component code is rejected by reviewer agents and may fail the CI scaffold-drift check.

Optional packages

Five core packages scaffold on demand:

pnpm turbo gen core-package realtime  # Socket.IO realtime layer (ADR-016)
pnpm turbo gen core-package events    # Cross-feature events + Payload jobs (ADR-015)
pnpm turbo gen core-package trpc      # tRPC server setup
pnpm turbo gen core-package ui        # Design system
pnpm turbo gen core-package audit     # DPA-compliant audit logging (ADR-018)

See docs/architecture/template-tiers.md for the full tier list.

Description
No description provided
Readme 24 MiB
Languages
TypeScript 65.6%
JavaScript 21.1%
Handlebars 12.2%
Shell 0.9%
Dockerfile 0.1%