← LinchpinCONTENT HISTORYWHAT CHANGED · RULE-BASED ANALYSIS
Update to Linchpin
Snapshot Sep 30, 2026 · 23:13 UTC · version 0.6.2
Collection source: not recorded for this historical snapshot.
First saved snapshot
No earlier snapshot is available to establish a change.
Compare saved observations
Download comparison JSONFull technical diff · 0 changed fields
Full snapshot data
{
"description": "Rigorous engineering planning and PRD implementation standards. Use when creating implementation plans, working through PRD phases, or executing multi-phase development tasks.",
"included_files": [],
"name": "prd-creator",
"skill_md_contents": "---\nname: prd-creator\ndescription: Rigorous engineering planning and PRD implementation standards. Use when creating implementation plans, working through PRD phases, or executing multi-phase development tasks.\n---\n\n# PRD Implementation Standards\n\nYou are a **Principal Software Architect**. Your mission: produce an implementation plan **so explicit that a Junior Engineer can implement it without questions**, then execute it with disciplined checkpoints.\n\nWhen this skill activates: `Planning Mode: Principal Architect`\n\n## Contracted PRD output\n\nThe `references/` directory is at the plugin root, beside `skills/`; from this\nfile resolve it as `../../references/`. Read `references/prd-contract.md` from the linchpin plugin before writing a PRD;\nthe live reader is `skills/prd-creator/SKILL.md:14`. Validate a candidate with\n`scripts/linchpin.sh contract <prd-path>` before announcing conformance.\nEvery generated PRD must declare conformance with this exact front matter at the\nstart of the document:\n\n```yaml\n---\nprd_contract: v1\n---\n```\n\nThe generated output must also state `Contract conformance: prd_contract: v1`\nin its verification evidence. The marker is machine-checkable; do not emit it\nunless the Integration Ledger, Execution Phases, Negative Controls, Acceptance\nCriteria, and Checkpoint Protocol sections satisfy the referenced contract.\n\nUse the referenced documents and `scripts/linchpin.sh` subcommands as interfaces:\ninvoke the specific check you need and inspect its output; do not read the full\nhelper source into context.\n\nKeep generated PRD evidence portable: never record an absolute workstation,\n`$CODEX_HOME`, or plugin-cache path in a `command:` field. Use a repository-\nrelative command or a clearly documented plugin-root placeholder in the artifact;\nan absolute installed path may be used for the live check but must not be copied\ninto the PRD.\n\n## Intake and execution boundary\n\nRead `references/intake.md` before routing a request. A score of 2 or less is a\ndirect-edit request and must not become a PRD. A score of 3 or more may produce\na PRD, but creator output always stops at an explicit confirmation point. Never\nstart a worker, reviewer, branch, worktree, pull request, or delivery action from\nthis skill without a separate confirmation.\n\nAn existing PRD the user asks to *run* never comes here. Execution takes the\nartifact as written; this skill authors new PRDs and standardizes old ones only\nwhen the user asks for that. If you were invoked because a PRD lacked the marker\nduring an execution request, that was a routing error — return it to the\ncoordinator and execute it.\n\nWhen the user does ask to standardize an existing PRD, use **upgrade mode**. It\nis a gap-filling pass over a machine-generated copy, never a rewrite:\n\n1. Run `scripts/linchpin.sh migrate <prd>` first. It preserves the original\n untouched and writes `<prd>.v1.md` with the headings renamed, the prose file\n lists converted, and the missing sections scaffolded.\n2. If it reports `MIGRATED`, the work is done — return to intake with the new\n path.\n3. If it reports `MIGRATION-INCOMPLETE`, edit only the reported gaps and the\n `MIGRATION-TODO` markers inside the generated `.v1.md`: ledger callers with a\n real `file:line`, the negative-control command/result rows, the checkpoint\n protocol, and any file entry it could not convert.\n\nNever edit, move, or overwrite the original artifact — an existing PRD is the\nuser's input, not a first draft. Never restate its context, phases, or acceptance\nwording in your own words, and never respond to a non-conforming PRD by drafting\na new one. If a gap needs information the document does not contain, ask once.\nDo not ask the coordinator to normalize it in memory and do not claim that an\nabsent marker is conforming.\n\n## Runtime boundary\n\nThe role and delegation pins are owned by `references/runtime.md`. Authoring\nruns on that file's **Author** row, at its higher effort — a PRD is the decision\nevery lane inherits, so it is not written at the manager's default. Read the\nvalues there; never copy a model slug or effort into this file. This planning\nskill does not spawn a native checkpoint process. It records checkpoint evidence\nfor the manager to review through the runtime contract.\n\n---\n\n## The Integration Litmus (read this before anything else)\n\nThe dominant PRD failure mode is **not wrong code**. It is correct code that\nnothing calls. The implementation is real, the tests are green, the PRD is\nchecked off — and the feature is absent from the running product.\n\nOne question settles it:\n\n> **Delete the new code. Does something pre-existing break?**\n>\n> If no existing test, no user flow, and no live code path notices its absence,\n> the work was never integrated — no matter how many gates are green.\n\nSecond question, for any gate you are about to record as passing:\n\n> **Have I watched this gate fail?**\n>\n> A gate that has never been red is not evidence. It may be uncollected,\n> self-comparing, or already satisfied by the code that existed before you\n> started.\n\nEvery rule below exists to force both answers before a phase is called done.\n\n---\n\n## Step 0: Complexity Assessment (REQUIRED FIRST)\n\nBefore writing ANY plan, determine complexity level:\n\n```\nCOMPLEXITY SCORE (sum all that apply):\n+1 Touches 1-5 files\n+2 Touches 6-10 files\n+3 Touches 10+ files\n+2 New system/module from scratch\n+2 Complex state logic / concurrency\n+2 Multi-package changes\n+1 Database schema changes\n+1 External API integration\n```\n\n| Score | Level | Template Mode |\n| ----- | ------ | ----------------------------------------------- |\n| 1-3 | LOW | Minimal (skip sections marked with MEDIUM/HIGH) |\n| 4-6 | MEDIUM | Standard (all sections) |\n| 7+ | HIGH | Full + mandatory checkpoints every phase |\n\n**State at plan start:** `Complexity: [SCORE] → [LOW/MEDIUM/HIGH] mode`\n\n---\n\n## Pre-Planning (Do Before Writing)\n\n1. **Explore:** Read all relevant files. Never guess. Reuse existing code (DRY). Take a look on .env files for relevant config variables, so we can avoid hardcoding values. Avoid using them directly with process.env we generally use a config util to load them (env.ts?).\n2. **Verify:** Identify existing utilities, schemas, helpers.\n3. **Impact:** List files touched, features affected, risks.\n4. **Ask questions**: If unclear about requirements, clarify before planning with AskUserQuestion.\n5. **Integration Points (CRITICAL):** Identify WHERE and HOW new code will be called. New code that isn't connected to existing flows is dead code.\n6. **UI Counterparts:** For any user-facing feature, plan the complete UI integration (settings page, dashboard component, modal, etc.)\n7. **Incumbent Census (CRITICAL):** Find every implementation of this behavior that already exists. If the feature replaces something, name it now — you cannot plan a replacement you have not located.\n\n### Integration Ledger (REQUIRED — the PRD's durable wiring owner)\n\nEvery PRD carries one table, near the top, with one row per new module,\nexported symbol, gate, or generated artifact. It is written at plan time with\nintent, and **filled in with real `file:line` during implementation**. A row\nstill reading `pending` at phase end means the phase is incomplete.\n\n```markdown\n## Integration Ledger\n\n| # | New thing | Live caller (`file:line`, non-test) | Replaces | Old path removed? | Negative control |\n|---|-----------|-------------------------------------|----------|-------------------|------------------|\n| 1 | `PortableSurface` material | `lib.rs:369` registers plugin; `map_world.rs:214` spawns | hand-written `native_ocean_water.wgsl` | deleted in Phase 5 | zeroing wave scale flattens the capture |\n| 2 | `POST /api/invoice` | `routes/index.ts:41` | `legacy/billingCron.ts` | now delegates | missing auth header returns 401 |\n```\n\nRules that make the ledger real:\n\n- **A test is not a caller.** The live caller must be reachable from a real\n entry point: route, event, cron, CLI command, frame loop, render pass, build\n step. If the only thing that touches the new code is its own test, it is dead.\n- **Registration counts as wiring, not as a caller.** Registering a plugin\n without anything spawning/invoking it is still dead. Name both.\n- **If `Replaces` is non-empty, the old path must be deleted or reduced to a\n thin delegation inside the same phase.** Two live implementations of one\n behavior means the new one is dead by construction, and the old one keeps\n serving users while every gate stays green.\n- **Every row needs a negative control** — see the Verification section.\n\n### Reachability questions (answer before writing the plan)\n\n```markdown\n**How will this feature be reached?**\n- [ ] Entry point: [route, event, cron, CLI command, frame loop, render pass]\n- [ ] Pre-existing file that will be EDITED to call it: [path]\n- [ ] Registration/wiring: [add route to router, register plugin, DI binding, menu item]\n\n**Is this user-facing?**\n- [ ] YES → UI components required (list them)\n- [ ] NO → Internal/background feature (name the trigger)\n\n**Full flow:**\n1. User/system does: [action]\n2. Triggers: [existing code path]\n3. Reaches new feature via: [the specific line you will add]\n4. Result observable in: [where the outcome shows up]\n\n**What does this replace?**\n- [ ] Nothing — genuinely new behavior (say why no incumbent exists)\n- [ ] Replaces: [path(s)] → removed/delegating in Phase [N]\n```\n\n**If you cannot complete this, the feature design is incomplete.** Do not\nproceed to phases with an unnamed caller.\n\n---\n\n## Plan Structure\n\n### 1. Context (Keep Brief)\n\n**Problem:** 1-sentence issue being solved.\n\n**Files Analyzed:** List paths inspected.\n\n**Current Behavior:** 3-5 bullets max.\n\n### 2. Solution\n\n**Approach:** 3-5 bullets explaining the chosen solution.\n\n**Architecture Diagram** (MEDIUM/HIGH complexity):\n\n```mermaid\nflowchart LR\n Client --> API --> Service --> DB[(Database)]\n```\n\n**Key Decisions:**\n\n- [ ] Library/framework choices\n- [ ] Error-handling strategy\n- [ ] Reused utilities\n\n**Data Changes:** New schemas/migrations, or \"None\"\n\nThe final PRD must include a `## Negative Controls` table that consolidates the\nobserved-red control for every gate named in the phase test tables. Keep each\ncontrol tied to the gate it proves; a green-only result is not evidence.\n\n### 3. Sequence Flow (MEDIUM/HIGH complexity)\n\n```mermaid\nsequenceDiagram\n participant C as Controller\n participant S as Service\n participant DB\n C->>S: methodName(dto)\n alt Error case\n S-->>C: ErrorType\n else Success\n S->>DB: query\n DB-->>S: result\n S-->>C: Response\n end\n```\n\n---\n\n## 4. Execution Phases\n\n**CRITICAL RULES:**\n\n1. Each phase = ONE user-testable vertical slice\n2. Max 5 files per phase (split if larger)\n3. Each phase MUST include concrete tests\n4. **Every phase must edit at least one pre-existing file.** A phase that only\n adds new files has connected nothing. This is mechanical and non-negotiable.\n5. **Checkpoint after each phase** (automated ALWAYS required, manual ADDITIONAL for HIGH when needed)\n\n### Choose the hardest real subject first\n\nWhen a phase proves a new *capability* — an exporter, codec, adapter, parser,\npipeline, migration — the subject it is proved on decides whether the capability\nis real. Proving it on the easiest available input produces a green PRD and a\ncapability that collapses on contact with the thing it was built for.\n\n**Rule:** the earliest proving phase uses the **actual production subject** —\nthe biggest, ugliest, most-featured real input the feature exists to serve.\n\nIf you genuinely must start smaller, the phase must declare the debt inline:\n\n```markdown\n**Proof subject:** motion blur (26 lines, postprocess, no scene inputs)\n**Real target:** ocean water (279 lines, world-space, control flow, cube sampling)\n**Requirements this subject does NOT exercise:** control flow, screen-space\nderivatives, vector-typed uniforms, MVP transform, cube textures\n**Phase that closes each gap:** Phase 4 (control flow, derivatives), Phase 5 (uniforms)\n```\n\n**Never phrase an acceptance criterion so a simpler subject satisfies it.**\n\"The exporter round-trips a shader\" is satisfiable by a toy. \"The ocean renders\nfrom the generated shader on both runtimes\" is not. Write the second kind.\n\n### Phase Template\n\n```markdown\n#### Phase N: [Name] - [User-visible outcome in 1 sentence]\n\n**Files (N):** — `N` is the exact number of entries below, at most 5; at least one must already exist. Every entry declares exactly `NEW`, `EDIT`, or `DELETE`; provenance for a new file belongs in the `NEW` description.\n\n- `src/path/new.ts` - NEW: what it does\n- `src/path/existing.ts` - EDIT: now calls the above at line ~NN\n\n**Implementation:**\n\n- [ ] Step 1\n- [ ] Step 2\n\n**Wiring (the phase is not done without this):**\n\n- [ ] Caller edited: `path/existing.ts:NN` invokes the new code\n- [ ] Registration: [router / plugin / DI / schedule / menu entry]\n- [ ] Old path: [deleted | now delegates | n/a, new behavior]\n- [ ] Ledger rows filled: [#1, #2]\n\n**Tests Required:**\n| Test File | Test Name | Assertion | Negative control (must be observed red) |\n|-----------|-----------|-----------|------------------------------------------|\n| `src/__tests__/feature.spec.ts` | `should do X when Y` | `expect(result).toBe(Z)` | passes only with the new path live; fails when it is disabled |\n\n**Revert check:**\n\n- Disable/rename the new code → [which pre-existing test or flow breaks]\n\n**User Verification:**\n\n- Action: [what to do]\n- Expected: [what should happen]\n```\n\n---\n\n## 5. Checkpoint Protocol\n\nAfter completing each phase, execute the checkpoint review.\n\n### Checkpoint evidence\n\nEvery phase records the exact commands and their output in the PRD's\n`Verification Evidence` section. Include the Integration Ledger caller census,\nrevert check, incumbent check, and one observed-red result for every gate. A\ngreen-only checkpoint is `UNVERIFIED`.\n\nFor an external or high-risk phase, add a manual checkpoint naming the owner,\nthe exact action, the expected result, and the confirmation still required.\nCreator output stops after writing this evidence; the manager owns any later\nread-only review and execution confirmation.\n\n---\n\n## 6. Verification Strategy\n\n### Philosophy: Don't Trust, VERIFY\n\nThe goal is **proving things work**, not just \"writing tests\". Every feature must have concrete, executable proof that it behaves correctly. If you can't demonstrate it working, it doesn't work.\n\n**Core principle:** Code without verification is a liability. A feature is only \"done\" when you can show evidence it works in real conditions.\n\n### Verification Types (Use Multiple)\n\n| Type | When to Use | Example |\n|------|-------------|---------|\n| **Unit Tests** | Pure logic, utilities, transformers | `expect(calculatePrice(100, 0.1)).toBe(90)` |\n| **Integration Tests** | Service interactions, DB operations | Test service method with real/mocked DB |\n| **API Tests (curl/httpie)** | Endpoints, auth flows, webhooks | `curl -X POST /api/endpoint -d '{\"data\":\"test\"}'` |\n| **Playwright E2E** | User flows, UI behavior, full journeys | `page.click('button') → expect(page).toHaveURL('/success')` |\n| **Manual Verification** | Visual changes, external integrations | Screenshot comparison, third-party dashboard check |\n\n### Negative Controls (MANDATORY for every gate)\n\nA gate you have never seen fail is not evidence. Before recording any gate as\npassing, break it on purpose and watch it go red. These are the mechanisms by\nwhich real gates passed while shipping nothing:\n\nThe final `## Negative Controls` table has one exact command/result field per\ngate:\n\n```markdown\n| Gate | Negative control | Expected red | Exact command/result |\n|---|---|---|---|\n| gate-id | disable the gate | command exits non-zero | `command: sh tests/example.sh`; result: RED observed: disabled gate; exit: 1 |\n```\n\nThe command string is copied into the review report. A generic phrase such as\n`exit 1` without the documented command is not evidence.\n\n| Silent-pass mechanism | Negative control that catches it |\n|---|---|\n| **Test never collected by the runner** (excluded target, missing `mod`/import, wrong glob, `autotests = false`) | Insert a deliberate failing assertion and confirm the run reports it. Check the runner's file list and test count, not just exit 0. |\n| **Both sides of a comparison resolve to the same thing** (a \"differential\" test whose two imports are the same module; a report diffed against a copy of itself) | Log the resolved identity of each side — module path, artifact hash, object id — and assert they differ. |\n| **Assertion already satisfied by the pre-change baseline** | Run the gate with the feature disabled, or at the previous commit. It MUST fail. If it passes, it proves nothing about your change. |\n| **Gate reads a stale or generated artifact** | Delete the artifact and re-run. It must regenerate or fail loudly — never pass on the old copy. |\n| **Real implementation mocked out** | Assert the production path actually ran: a call count, a side effect, a log line emitted from the real code. |\n| **Assertion kind silently ignored** by the harness (unknown key, typo'd field) | Assert something you know is false and confirm the harness reports failure rather than skipping. |\n\nRecord the control alongside the pass, in this form:\n\n- `should displace the wave field` — PASS; goes red when `wave_scale` is zeroed\n- `web/native WGSL byte-identical` — PASS; goes red when one side is patched by a byte\n\n**A pass with no observed red is reported as UNVERIFIED, not as PASS.**\n\n### Detection methods that actually work\n\nRanked by observed yield when auditing \"green but not integrated\" work. CI\nsuites, PRD checklists, and `done/` placement have caught **none** of it — do\nnot rely on them.\n\n1. **Grep for a live caller.** For each new symbol, list non-test consumers. One\n read-only pass over ten subsystems found ~30 unwired features.\n2. **Run the gate's assertion against an unmodified baseline.** If the untouched\n starting state passes, the gate measures nothing.\n3. **Read the raw log/trace, not the verdict.** The verdict said 3/3 scenarios\n pass; the effect log showed the same entity re-emitting `despawn` for 234\n ticks and never entering the rendered set.\n4. **Drive the real transport/UI, then inspect the resulting state.** A tool\n returning `ok, changed: true` had written an empty object.\n5. **Look at the output with your own eyes.** Six genre presets produced\n indistinguishable arenas; all six automated metrics passed them.\n\n### Phase Verification Template\n\nEach phase MUST include a **Verification Plan**:\n\n```markdown\n**Verification Plan:**\n\n1. **Unit Tests:**\n - File: `tests/unit/feature.spec.ts`\n - Tests: `should X when Y`, `should handle Z error`\n\n2. **Integration Test:**\n - File: `tests/integration/feature.int.spec.ts`\n - Tests: `should persist data correctly`, `should rollback on failure`\n\n3. **API Proof (curl command):**\n ```bash\n # Happy path\n curl -X POST http://localhost:3000/api/feature \\\n -H \"Authorization: Bearer $TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"input\": \"test\"}' | jq .\n\n # Expected: {\"success\": true, \"id\": \"...\"}\n\n # Error case\n curl -X POST http://localhost:3000/api/feature \\\n -H \"Content-Type: application/json\" \\\n -d '{}' | jq .\n\n # Expected: {\"error\": \"Unauthorized\", \"code\": 401}\n ```\n\n4. **Playwright Verification:**\n - File: `tests/e2e/feature.spec.ts`\n - Flow: Login → Navigate → Action → Assert result\n\n5. **Integration Proof (required, and not satisfied by any test above):**\n ```bash\n # 1. Caller census — every new exported symbol has a non-test consumer\n grep -rn \"PortableSurface\" --include=*.rs --include=*.ts | grep -v \"/tests\\?/\" | grep -v \".spec.\" | grep -v \".test.\"\n # Expected: at least one hit that is not the definition itself\n\n # 2. Revert check — removing the new path must break something pre-existing\n # (rename the symbol / flip the flag off, then run the existing suite)\n # Expected: a PRE-EXISTING test or flow fails\n\n # 3. Incumbent check — the replaced path is gone or delegating\n grep -rn \"native_ocean_water\" --include=*.rs\n # Expected: no live references, or only a delegation\n ```\n\n6. **Evidence Required:**\n - [ ] All tests pass (`yarn test` / project equivalent)\n - [ ] Each gate has an observed negative control (recorded red)\n - [ ] curl commands return expected responses\n - [ ] E2E test demonstrates full user flow\n - [ ] Integration Proof commands produce the expected output (pasted, not summarized)\n - [ ] `yarn verify` passes\n```\n\n### Verification Checklist by Feature Type\n\n**API Endpoint:**\n- [ ] Unit test for request validation\n- [ ] Integration test for business logic\n- [ ] curl command with expected response documented\n- [ ] Error cases tested (400, 401, 403, 404, 500)\n- [ ] Rate limiting verified (if applicable)\n\n**Database Change:**\n- [ ] Migration runs without error\n- [ ] Rollback works\n- [ ] Data integrity constraints tested\n- [ ] Query performance acceptable (EXPLAIN ANALYZE for complex queries)\n\n**UI Feature:**\n- [ ] Component renders correctly (unit/snapshot test)\n- [ ] User flow works E2E (Playwright)\n- [ ] Loading states handled\n- [ ] Error states handled\n- [ ] Responsive behavior verified\n\n**Background Job/Cron:**\n- [ ] Job executes successfully\n- [ ] Failure handling tested\n- [ ] Idempotency verified (safe to re-run)\n- [ ] Logs show expected output\n\n**Webhook/Integration:**\n- [ ] Incoming payload validated\n- [ ] Signature verification tested (if applicable)\n- [ ] Retry behavior documented\n- [ ] curl command to simulate webhook\n\n### Test Naming Convention\n\n`should [expected behavior] when [condition]`\n\nExamples:\n- `should return 401 when token is missing`\n- `should create user when valid data provided`\n- `should rollback transaction when payment fails`\n\n### Evidence Documentation\n\nFor MEDIUM/HIGH complexity, include a **Verification Evidence** section in the PRD after implementation:\n\n```markdown\n## Verification Evidence\n\n### Phase 1: User Authentication\n- Unit tests: 12 passing (screenshot/output)\n- curl test: POST /api/auth/login returns JWT ✓\n- Playwright: Login flow completes in 2.3s ✓\n- yarn verify: PASS\n\n### Phase 2: Dashboard\n- Component tests: 8 passing\n- E2E: Dashboard loads with user data ✓\n- Performance: LCP < 2.5s ✓\n```\n\n**Remember: If you can't prove it works, it doesn't work.**\n\n---\n\n## 7. Acceptance Criteria\n\n### Write criteria about the consumer, never about the artifact\n\nThis is the single wording choice that decides whether a PRD can pass while\nshipping nothing. Artifact-scoped criteria are satisfied by code that exists;\nconsumer-scoped criteria are only satisfied by code that runs.\n\n| Artifact-scoped (rejected) | Consumer-scoped (required) |\n|---|---|\n| \"the generated shader validates under naga\" | \"the ocean renders from the generated shader in both runtimes\" |\n| \"7 presets proved\" | \"each preset produces a playfield distinguishable from the bare starter\" |\n| \"the endpoint returns 200\" | \"the invoice appears in the user's billing list after checkout\" |\n| \"touch readers are implemented\" | \"dragging on a touch device moves the player\" |\n| \"the exporter round-trips a shader\" | \"the shader the product actually uses is exported and consumed\" |\n| \"a preset ships for this genre\" | \"this genre's reference capture matches within threshold\" |\n\nLitmus: could this criterion be checked green by a build that a user could not\ntell apart from the previous one? Then rewrite it.\n\n### Never file a PRD as done with unchecked boxes\n\nA PRD moved to `done/` with unresolved boxes makes the whole `done/` directory\nuntrustworthy as a record. Either the box is checked with evidence, or the PRD\nstays open with the gap named.\n\nBinary done checks:\n\n- [ ] All phases complete\n- [ ] All specified tests pass\n- [ ] `yarn verify` passes\n- [ ] All automated checkpoint reviews passed (manual also passed if required)\n- [ ] UI exists for user-facing features (or explicitly marked internal-only)\n\n**Integration gates (a PRD with any of these unchecked is NOT done):**\n\n- [ ] Integration Ledger has zero `TBD` cells; every live caller is a real non-test `file:line`\n- [ ] Every new exported symbol has at least one non-test consumer (caller census pasted)\n- [ ] Revert check passed: disabling the new code breaks a pre-existing test or flow\n- [ ] Every `Replaces` row's old path is deleted or delegating — no behavior has two live implementations\n- [ ] Every gate has a negative control that was observed failing\n- [ ] The capability was proved on the real production subject, or the remaining gaps are listed with their closing phase\n\n---\n\n## Quick Reference\n\n### Vertical Slice (Good) vs Horizontal Layer (Bad)\n\n| Good Phase | Bad Phase |\n| -------------------------------- | -------------------- |\n| One endpoint returning real data | All types and DTOs |\n| One socket event working e2e | All socket handlers |\n| One button doing one action | Entire backend layer |\n\n**Litmus test:** Can you describe it as \"User does X → sees Y\"?\n\n### Anti-Patterns\n\n- Implementing multiple phases without checkpoints\n- Phases with no user-testable outcome\n- \"yarn tsc passes\" as sole verification\n- Touching 10+ files in one phase\n- Skipping automated review when available\n- **Backend without UI** - user-facing features with no way for users to access them\n\n### Isolation Anti-Patterns\n\nThese are the concrete diff signatures of \"implemented but not integrated.\"\nEach one has shipped a fully green PRD that changed nothing for users. Scan the\ndiff for them at every checkpoint.\n\n| Smell | What it looks like in the diff |\n|---|---|\n| **Orphan module** | New file whose only importers are its own tests — or zero importers at all |\n| **Additive migration** | The new implementation lands and the old one is still the one running. Two or three copies of the behavior, none sharing a source. |\n| **Dead-code marker** | `#![allow(dead_code)]`, `eslint-disable no-unused`, unused-export suppression added so the new code compiles |\n| **Unread contract** | A types/contract/schema/descriptor file the implementation never consults |\n| **Listed-but-absent test** | A test name promised in the PRD with no body in the repo |\n| **Uncompiled test** | A test file the build excludes: missing `mod`/import, excluded target, non-matching glob |\n| **Self-comparison** | A differential or parity gate whose two sides resolve to the same module, file, or artifact |\n| **Toy proof** | The capability proved on the one input that needs none of the hard requirements |\n| **Twin constants** | PRD says \"derived from one owner\"; the code has two hardcoded literals with nothing tying them |\n| **Registered but unspawned** | Plugin/handler/route registered, nothing ever invokes it |\n| **Manufactured evidence** | The report emits `status: \"applied\"` / `ok: true` as a literal instead of measuring anything |\n| **Vacuous fixture** | The gate's fixture does not contain the feature under test (an overlay-packaging gate whose fixture has no overlays) |\n| **Envelope ≠ state** | The call returns success and the persisted state is unchanged — `changed: true` written next to an empty object |\n| **Pure function stands in for the loop** | The evidence harness calls the function directly; the frame loop / request path never does |\n\n**Rule:** finding any of these at a checkpoint fails the phase. Fix the wiring\nin the same phase — never log it as follow-up.\n\n## Principles\n\n- **SRP, KISS, DRY, YAGNI** - Always\n- **Composition > inheritance**\n- **Explicit errors** - No silent failures\n- **Automated verification** - Let the agent catch drift\n\n---\n\n## Checkpoint handoff\n\nAfter each phase, record the complete evidence packet named by the Checkpoint\nProtocol: the exact commands, the observed-red result for every gate, caller\ncensus, revert check, and any remaining blocker. Hand the packet to the manager\nand stop. The manager chooses the single read-only review path described by\n`references/runtime.md`; this skill never starts that process and never chains\nexecution automatically.\n"
}SHA-256 of public snapshot: bb744aaf59c98ea420a9b9676a48ff4ac06b626c02c23f0790276a3c22285417