@ai-agent-lead/skills 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +30 -0
  2. package/package.json +1 -1
  3. package/skills/README.md +29 -20
  4. package/skills/SKILL-TEMPLATE.md +9 -3
  5. package/skills/TRIGGERS.md +3 -3
  6. package/skills/WORKFLOWS.md +17 -16
  7. package/skills/bench/SKILL.md +20 -4
  8. package/skills/bootstrap/SKILL.md +24 -15
  9. package/skills/caveman/SKILL.md +1 -3
  10. package/skills/debug/SKILL.md +0 -2
  11. package/skills/design/ILLEGAL-STATES.md +12 -1
  12. package/skills/design/SKILL.md +10 -3
  13. package/skills/design/templates/design-note.md +47 -0
  14. package/skills/feature-doc/SKILL.md +12 -20
  15. package/skills/{code-hygiene/SKILL.md → formats/CODE-HYGIENE.md} +24 -29
  16. package/skills/formats/CONTEXT-FORMAT.md +5 -5
  17. package/skills/formats/CONTEXT-MAP-FORMAT.md +14 -3
  18. package/skills/formats/CONVENTION-FORMAT.md +40 -0
  19. package/skills/formats/DOC-DRIFT-AUDIT.md +56 -0
  20. package/skills/formats/OKF.md +13 -9
  21. package/skills/formats/{STYLE-comments.md → STYLE-COMMENTS.md} +1 -1
  22. package/skills/grill-plan/SKILL.md +5 -3
  23. package/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +1 -1
  24. package/skills/improve-codebase-architecture/SKILL.md +7 -18
  25. package/skills/investigate/SKILL.md +14 -2
  26. package/skills/pr-review/SKILL.md +7 -22
  27. package/skills/prod-ready/SKILL.md +16 -17
  28. package/skills/security-review/SKILL.md +12 -4
  29. package/skills/simplify/SKILL.md +6 -15
  30. package/skills/system-design/SKILL.md +29 -19
  31. package/skills/tdd/SKILL.md +5 -6
  32. package/skills/tdd-rounds/COMMITS.md +4 -4
  33. package/skills/tdd-rounds/SKILL.md +33 -9
  34. package/skills/tdd-rounds/templates/builder-brief.md +4 -4
  35. package/skills/verify-real-deps/SKILL.md +16 -4
  36. package/skills/verify-real-deps/templates/known-issues.md +33 -28
  37. package/skills/zoom-out/SKILL.md +1 -3
  38. package/skills/sync-check/SKILL.md +0 -69
  39. /package/skills/{design → formats}/OBSERVABILITY.md +0 -0
  40. /package/skills/{design → formats}/PERSONAS.md +0 -0
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: feature-doc
3
3
  description: One-page contract for a non-trivial feature or bug fix — Problem, User Story, Acceptance Criteria, Non-Goals. The ACs become the test list for `tdd`. Use before any non-trivial feature or bug fix; when the user mentions "spec this out", "write a feature doc", "before any non-trivial feature", or describes a feature without listing ACs. Skip for typo fixes, dependency bumps, or pure refactors. Pairs with `tdd` / `tdd-rounds` (downstream — ACs feed the test list), `investigate` (upstream — when direction itself is unclear), and `grill-plan` (when the chosen plan needs stress-testing against existing model).
4
- complexity: low
5
- expected_duration: 10 minutes
6
4
  ---
7
5
 
8
6
  # Feature Doc
@@ -68,13 +66,6 @@ STRONG
68
66
 
69
67
  The strong list translates 1:1 into tests. The weak list translates into vibes.
70
68
 
71
- ## Definition of Done for the doc
72
-
73
- - [ ] Problem stated in 2–3 sentences.
74
- - [ ] At least one acceptance criterion in Given / When / Then form.
75
- - [ ] Non-goals listed (or explicitly "none — see scope in Problem").
76
- - [ ] Reviewed by at least one other person.
77
-
78
69
  ## Anti-patterns
79
70
 
80
71
  - **AC list as task list.** "Implement the login form" is a task; "Given a user with valid credentials, when they POST `/login`, then they receive a session cookie" is an AC. Tasks belong in your TODO; ACs belong in the contract.
@@ -93,23 +84,24 @@ The strong list translates 1:1 into tests. The weak list translates into vibes.
93
84
  - **`security-review`** — runs *alongside* `tdd` when the feature is surface-changing (new entry point, identity flow, sensitive data path).
94
85
  - **`prod-ready`** — runs after green, against this doc. Section 7 catches doc-drift if behavior shifted during implementation.
95
86
 
96
- ## Handoff
97
-
98
- Once the doc is reviewed and ACs are stable:
99
-
100
- - **Single-feature delivery** (one package, manageable AC count) → run [`tdd`](../tdd/SKILL.md). Each AC becomes one TDD slice.
101
- - **Larger delivery** (≥10 ACs or multi-package) → run [`tdd-rounds`](../tdd-rounds/SKILL.md). The AC list maps to round splits.
102
- - **Direction still feels uncertain after writing the doc**:
103
- - Project has `CONTEXT.md` and/or ADRs → run [`grill-plan`](../grill-plan/SKILL.md) to stress-test against the existing model.
104
- - No `CONTEXT.md` or ADRs yet → run [`investigate`](../investigate/SKILL.md) to map options first; or, if the plan is chosen but vocabulary is fuzzy, run `grill-plan` in [bootstrap mode](../grill-plan/BOOTSTRAP.md).
105
- - **Hard-to-reverse / surface-changing** (new auth flow, public API, sensitive data flow) → run [`security-review`](../security-review/SKILL.md) alongside `tdd` / `tdd-rounds`.
106
-
107
87
  ## Done when
108
88
 
109
89
  - A feature branch (e.g. `feat/<short-name>` or `fix/<short-name>`) is checked out and the contract doc is committed on it, **not on `main`**.
110
90
  - `docs/features/<short-name>.md` exists with all four required sections.
111
91
  - The doc opens with OKF frontmatter (`type: feature`) per [`skills/formats/OKF.md`](../formats/OKF.md).
92
+ - Problem is stated in 2–3 sentences.
112
93
  - ACs are testable Given / When / Then statements.
113
94
  - Non-Goals is non-empty (or explicitly "none — see scope in Problem").
114
95
  - One reviewer has signed off.
115
96
  - Status is `Approved` and the next skill (`tdd` / `tdd-rounds` / `grill-plan` / `security-review`) is named.
97
+
98
+ ## Handoff
99
+
100
+ Once the doc is reviewed and ACs are stable:
101
+
102
+ - **Single-feature delivery** (one package, manageable AC count) → run [`tdd`](../tdd/SKILL.md). Each AC becomes one TDD slice.
103
+ - **Larger delivery** (≥10 ACs or multi-package) → run [`tdd-rounds`](../tdd-rounds/SKILL.md). The AC list maps to round splits.
104
+ - **Direction still feels uncertain after writing the doc**:
105
+ - Project has `CONTEXT.md` and/or ADRs → run [`grill-plan`](../grill-plan/SKILL.md) to stress-test against the existing model.
106
+ - No `CONTEXT.md` or ADRs yet → run [`investigate`](../investigate/SKILL.md) to map options first; or, if the plan is chosen but vocabulary is fuzzy, run `grill-plan` in [bootstrap mode](../bootstrap/BOOTSTRAP.md).
107
+ - **Hard-to-reverse / surface-changing** (new auth flow, public API, sensitive data flow) → run [`security-review`](../security-review/SKILL.md) alongside `tdd` / `tdd-rounds`.
@@ -1,15 +1,10 @@
1
- ---
2
- name: code-hygiene
3
- description: Day-to-day coding discipline at the line and function level — boring code, naming as primary refactor, YAGNI, rule of 3, locality of behavior. Use when reviewing or writing code, when names feel wrong, when tempted to abstract too early, when a solution looks clever, when the simplify pass after `tdd` runs, or when the user mentions "simpler", "boring", "naming", "YAGNI", "premature abstraction", "over-engineered". Skip for module-level interface design — use `design` instead. Skip for whole-codebase architectural sweeps — use `improve-codebase-architecture`.
4
- complexity: low
5
- expected_duration: 5 minutes
6
- ---
7
-
8
1
  # Code Hygiene
9
2
 
10
- Day-to-day discipline that keeps a codebase readable, navigable, and easy to change. Smaller in scope than `design` (which shapes module interfaces) — these are line-level and function-level habits.
3
+ The line-level and function-level lens this skill set carries into any turn that writes or reads code. Smaller in scope than [`design`](../design/SKILL.md) (which shapes module interfaces) — these are the day-to-day habits that keep a codebase readable, navigable, and easy to change.
4
+
5
+ This is a **shared reference**, not a standalone skill. It is the lens applied *while writing*, during the [`simplify`](../simplify/SKILL.md) sweep after `tdd` reaches green, and during [`pr-review`](../pr-review/SKILL.md) (§3f). Read it once; apply it many times.
11
6
 
12
- Six principles.
7
+ Seven principles.
13
8
 
14
9
  1. **Boring code beats clever code** — prefer the obvious solution over the elegant trick.
15
10
  2. **Naming is the primary refactor** — a bad name misleads longer than a bad implementation.
@@ -17,19 +12,7 @@ Six principles.
17
12
  4. **Rule of 3 before extracting** — duplicate twice; extract on the third occurrence, not the second.
18
13
  5. **Locality of behavior** — related code lives together; don't split by category.
19
14
  6. **Comments earn their keep** — default NONE; keep only why-comments tied to an invariant, trade-off, or provenance the next reader would otherwise miss.
20
-
21
- ## When to use
22
-
23
- - Writing new code, line by line — keep these in mind as you type.
24
- - Reviewing a PR — these are six common smell categories.
25
- - After `tdd` reaches green, during the [`simplify`](../simplify/SKILL.md) sweep — `code-hygiene` is the lens you apply.
26
- - When you read code and pause to figure out what it's doing — that pause is a smell.
27
-
28
- ## When to skip
29
-
30
- - Module-level shape (interface, depth, dependencies) — use `design`.
31
- - Whole-codebase sweeps for shallow modules — use `improve-codebase-architecture`.
32
- - The horizontal-vs-vertical TDD failure mode — that's `tdd`'s territory.
15
+ 7. **Constants live where they're used** — narrowest honest scope; no `constants.ts` dumping ground.
33
16
 
34
17
  ## Principle 1: Boring code beats clever code
35
18
 
@@ -74,17 +57,28 @@ Related code lives close together. Don't split a system by *type of code* (`cont
74
57
 
75
58
  **Why**: a new contributor should be able to read one folder and understand one feature, not bounce across five folders to follow one request.
76
59
 
77
- **Smell**: changing one feature requires editing 5 files in 5 directories. That's a sign the structure separates *type* of code, not *responsibility*. (This is a `improve-codebase-architecture` issue at scale, but at smaller scale you can fix it inline by colocating files.)
60
+ **Smell**: changing one feature requires editing 5 files in 5 directories. That's a sign the structure separates *type* of code, not *responsibility*. (This is an [`improve-codebase-architecture`](../improve-codebase-architecture/SKILL.md) issue at scale, but at smaller scale you can fix it inline by colocating files.)
78
61
 
79
62
  ## Principle 6: Comments earn their keep
80
63
 
81
- **The bar:** [`skills/formats/STYLE-comments.md`](../formats/STYLE-comments.md). Apply it *while writing*, not only during the `simplify` sweep.
64
+ **The bar:** [`STYLE-COMMENTS.md`](STYLE-COMMENTS.md). Apply it *while writing*, not only during the `simplify` sweep.
82
65
 
83
66
  **Default: NONE.** If you're unsure whether a comment earns its line, delete it. Keep only WHY-comments: a constraint, an invariant, a trade-off, or a provenance link to an ADR / round / snapshot — and only if the next reader would otherwise reattempt the rejected alternative.
84
67
 
85
68
  **Delete on sight**: WHAT-comments, "used by X" / "added for Y" caller references, banner dividers, commented-out code, in-function section headers (`// validate`, `// build response`), and docstrings on exports whose contract is obvious from the signature.
86
69
 
87
- ## Done when
70
+ ## Principle 7: Constants live where they're used
71
+
72
+ A constant belongs at the **narrowest honest scope** — next to the code that uses it, not in a far-off catch-all file.
73
+
74
+ - **Default to local.** Define it in the function or module that uses it. Widen the scope only when a *second* caller genuinely shares the same value (rule of 3) or it's a single-source-of-truth domain value (a timeout, a retry limit, a page size, an external URL) that must not diverge between call sites.
75
+ - **Reject the dumping ground.** A `constants.ts` / `config.ts` / `utils.ts` god-file of unrelated constants breaks locality — you bounce across files to understand one feature. Group constants by the *responsibility* they serve, not by the fact that they're all constants.
76
+ - **Name a literal only when its meaning is non-obvious.** `MAX_RETRIES = 3` earns its name; `index + 1` and `slice(0, 1)` don't. A magic number whose *meaning* a reader can't infer is a naming problem (Principle 2); a self-evident one isn't.
77
+ - **Environment-varying values are config from env, not constants in source.** A timeout you tune per environment, an API base URL, a feature flag — those come from the env / secret store ([`prod-ready`](../prod-ready/SKILL.md) §3), not a hardcoded literal. Centralizing constants and hardcoding env values are opposite mistakes; don't make both.
78
+
79
+ **Smell**: a top-level `constants.ts` that grows every feature, imported by half the codebase. Each import is a caller reaching across the codebase for one value that probably belonged next to its single use.
80
+
81
+ ## The bar — clean when
88
82
 
89
83
  - Names communicate intent — a stranger reads them and forms the right mental model.
90
84
  - The clever shortcut is replaced with the obvious version (or its cleverness is justified by a comment naming the constraint).
@@ -92,9 +86,10 @@ Related code lives close together. Don't split a system by *type of code* (`cont
92
86
  - Duplications either survived the 2-occurrence test (left as-is) or proved themselves at the 3rd occurrence (extracted).
93
87
  - Related code lives near related code.
94
88
  - Every surviving comment names a why, an invariant, a trade-off, or a provenance link. None restates the code.
89
+ - Constants sit at their narrowest honest scope — no unrelated-constants dumping ground; env-varying values come from config, not source literals.
95
90
 
96
- ## Pairing with other skills
91
+ ## Scope boundaries
97
92
 
98
- - **`design`** sets module shape; `code-hygiene` polishes within the module. Different scopes; both apply.
99
- - **`tdd`** reaches green; `code-hygiene` is part of the simplify sweep that follows.
100
- - **`improve-codebase-architecture`** finds shallow modules; if the diagnosis is "shallow" but the fix is line-level (rename, inline, delete dead helper), this skill applies. If the fix is structural (deepen the module), that one does.
93
+ - Module-level shape (interface, depth, dependencies) is [`design`](../design/SKILL.md)'s job, not this lens's.
94
+ - Whole-codebase sweeps for shallow modules are [`improve-codebase-architecture`](../improve-codebase-architecture/SKILL.md). If the diagnosis is "shallow" but the fix is line-level (rename, inline, delete dead helper), this lens applies; if the fix is structural (deepen the module), that skill does.
95
+ - Architecture vocabulary (module, interface, depth, seam) comes from [`LANGUAGE.md`](../LANGUAGE.md) don't redefine.
@@ -98,9 +98,9 @@ An item on a User's personal list — text plus a done flag. Owned by exactly on
98
98
 
99
99
  ## Single vs multi-context repos
100
100
 
101
- **Single context (most repos):** One `CONTEXT.md` at the repo root.
101
+ **Single context (most repos):** One `docs/CONTEXT.md`.
102
102
 
103
- **Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
103
+ **Multiple contexts:** A `docs/CONTEXT-MAP.md` lists the contexts, where they live, and how they relate to each other:
104
104
 
105
105
  ```md
106
106
  ---
@@ -128,8 +128,8 @@ timestamp: 2026-05-22
128
128
 
129
129
  The skill infers which structure applies:
130
130
 
131
- - If `CONTEXT-MAP.md` exists, read it to find contexts
132
- - If only a root `CONTEXT.md` exists, single context
133
- - If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
131
+ - If `docs/CONTEXT-MAP.md` exists, read it to find contexts
132
+ - If only `docs/CONTEXT.md` exists, single context
133
+ - If neither exists, create `docs/CONTEXT.md` lazily when the first term is resolved
134
134
 
135
135
  When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
@@ -1,6 +1,17 @@
1
- # Context Map Format
1
+ # CONTEXT-MAP.md Format
2
2
 
3
- Used when a single `CONTEXT.md` becomes a bottleneck (>100 terms).
3
+ `CONTEXT-MAP.md` is the index for a repo with **more than one bounded context** — each context has its own `CONTEXT.md`, and the map lists them and how they relate. One per repo, at `docs/CONTEXT-MAP.md`. It is a produced doc, so it opens with OKF frontmatter per [`OKF.md`](OKF.md) (`type: context-map`).
4
+
5
+ ## When you need one
6
+
7
+ - **More than one bounded context** in the repo (e.g. `ordering/`, `billing/`, `fulfillment/`, each with its own glossary). That is the real trigger.
8
+ - A single `CONTEXT.md` growing past ~100 terms is usually a *symptom* of this — one file is hiding several contexts. Split them rather than scrolling one giant glossary.
9
+
10
+ A single-context repo needs only `docs/CONTEXT.md`; don't create a map for it.
4
11
 
5
12
  ## Structure
6
- - Links to sub-contexts.
13
+
14
+ The full frontmatter shape and a worked example live in [`CONTEXT-FORMAT.md`](CONTEXT-FORMAT.md) (the "Single vs multi-context repos" section) — this kind shares that spec. In short:
15
+
16
+ - A `## Contexts` list, one bullet per context, linking its `CONTEXT.md`.
17
+ - A `## Relationships` section naming how the contexts interact (domain events, shared types, synchronous calls).
@@ -0,0 +1,40 @@
1
+ # CONVENTIONS.md Format
2
+
3
+ `CONVENTIONS.md` records the repo's structure and process rules — the things a contributor (human or agent) must follow but can't infer from the code: branch model, commit style, file naming, code-style anchors. One per repo, at `docs/CONVENTIONS.md`. It is a produced doc, so it opens with OKF frontmatter per [`OKF.md`](OKF.md) (`type: convention`).
4
+
5
+ Created lazily by [`bootstrap`](../bootstrap/SKILL.md) — seed only the rules the repo has actually decided; don't pad with defaults nobody chose.
6
+
7
+ ## Template
8
+
9
+ ```md
10
+ ---
11
+ type: convention
12
+ title: Conventions
13
+ description: How documentation and code are structured in this repository.
14
+ tags: [conventions]
15
+ timestamp: YYYY-MM-DD
16
+ ---
17
+
18
+ # Conventions
19
+
20
+ ## Documentation Artifacts
21
+ - Lazy creation; OKF frontmatter on every produced doc; file-naming rule.
22
+
23
+ ## Branches
24
+ - <e.g. code lands on `feat/<name>`; `main` receives merges, not commits>.
25
+
26
+ ## Commits
27
+ - <e.g. Conventional Commits; any repo-specific prefixes>.
28
+
29
+ ## Code Style
30
+ - <pointers to the repo's formatter / linter and comment discipline>.
31
+
32
+ ## Terminology
33
+ - Adhere to `docs/CONTEXT.md`; stale terminology is a bug.
34
+ ```
35
+
36
+ ## Rules
37
+
38
+ - **Record decisions, not aspirations.** A convention nobody follows is worse than none.
39
+ - **Link, don't restate.** Point at `docs/CONTEXT.md`, the [naming rule](../README.md#conventions), and [`STYLE-COMMENTS.md`](STYLE-COMMENTS.md) rather than copying them.
40
+ - **Keep it short.** If a section needs more than a few bullets, it's probably an ADR or a design note, not a convention.
@@ -0,0 +1,56 @@
1
+ # Doc-Drift Audit
2
+
3
+ The single source for one question: *does this change leave the durable docs consistent with the code?* Implementation lands → docs drift. The natural moment to catch the drift is at the merge boundary, not "next sprint".
4
+
5
+ This is a **shared reference**, run from three places with the same checks but a different lens:
6
+
7
+ - [`prod-ready`](../prod-ready/SKILL.md) Section 7 — **author lens.** Walk the checks before opening the PR; fix drift inline now.
8
+ - [`pr-review`](../pr-review/SKILL.md) §3e — **reviewer lens.** Second line of defense; what the author missed, classified by severity.
9
+ - **Standalone** — the old `sync-check` role. Run mid-stream after a significant refactor, or when a name feels "off", to surface terminology and ADR drift before it calcifies. Produces a numbered findings list (see "Standalone report" below).
10
+
11
+ Files don't need to pre-exist — `docs/adr/`, `CONTEXT.md`, design notes are created lazily when the first relevant change appears. If a doc type isn't relevant to this work, write `n/a` — explicit beats implicit.
12
+
13
+ ## The seven checks
14
+
15
+ One question per doc type: *did this work change X? Then update Y.*
16
+
17
+ 1. **New decision with viable alternatives** → an ADR exists in `docs/adr/`, names what it supersedes (if anything), and is referenced from code where the decision is load-bearing. See [`ADR-FORMAT.md`](ADR-FORMAT.md).
18
+ 2. **New or changed domain term** → [`docs/CONTEXT.md`](../../docs/CONTEXT.md) entry created or updated, including `_Avoid_:` aliases if the term risks being confused with an existing one. A new term that collides with an existing `_Avoid_:` alias (e.g. "Account" where the glossary says "Customer") is the highest-signal finding here.
19
+ 3. **New/removed package, changed public interface, or shifted module boundary** → the feature's design note (`docs/features/<feature>.design.md`) is updated: module map, file layout, public-interface signatures, test boundaries.
20
+ 4. **Changed acceptance criteria** → the feature doc reflects what was actually built. Silently-dropped or silently-added behavior is the most common drift class — fix here, don't kick to a follow-up.
21
+ 5. **User-visible change** → `CHANGELOG.md` has an entry under `[Unreleased]`, grouped by `Added / Changed / Fixed / Removed`. Skip only for formatter-only / lint-only / test-only / internal-refactor-with-no-behavior-change / dep-bump-with-no-runtime-impact diffs. (Overlaps but is **not identical** to `feature-doc`'s skip list, which also waives the *doc* for typo fixes and one-line config tweaks. A typo fix can still merit a one-liner here.)
22
+ 6. **New or changed produced doc under `docs/`** → it opens with OKF frontmatter carrying a non-empty `type` from [`OKF.md`](OKF.md) §2. A produced doc with no `type` breaks bundle conformance.
23
+ 7. **New or removed produced doc under `docs/`** → [`docs/index.md`](../../docs/index.md) (the bundle manifest) gains or loses its entry. A produced doc that exists but isn't listed is invisible to progressive disclosure; a listed file that was deleted is a dangling entry.
24
+
25
+ ## ADR consistency (read alongside check 1)
26
+
27
+ Beyond "does an ADR exist", check the change against the ones already recorded:
28
+
29
+ - **Direct contradiction** — does the change do something an active ADR explicitly forbids (e.g. uses an ORM where an ADR mandates hand-written SQL)? That's a blocker until the ADR is superseded.
30
+ - **Surprise deviation** — does the change introduce a pattern that *warrants* a new ADR (hard to reverse, surprising, a real trade-off) but doesn't have one?
31
+
32
+ ## Severity
33
+
34
+ - **Blocker** — the missing/contradicted doc is load-bearing for the next reader: an ADR for a hard-to-reverse decision, a `CONTEXT.md` entry for a term other changes will use, an AC drift hiding behavior, or a direct ADR contradiction.
35
+ - **Suggestion** — the doc would help but the diff is self-explanatory in isolation.
36
+
37
+ In the author lens (`prod-ready`) every check resolves to `✓`, `✗ + remediation`, or `n/a + reason` and is fixed before the PR. In the reviewer lens (`pr-review`) an unresolved check without `n/a + reason` is a finding at the severity above.
38
+
39
+ ## Standalone report
40
+
41
+ When run on its own (the former `sync-check`), output a numbered list. For each finding:
42
+
43
+ - **Location** — `file:line` or `ADR-NNNN`.
44
+ - **Severity** — `Blocker` or `Suggestion` per above.
45
+ - **Finding** — e.g. "Code uses 'Account', but `CONTEXT.md` specifies 'Customer'."
46
+ - **Recommended action** — e.g. "Rename to 'Customer', or update `CONTEXT.md` if the concept is genuinely new."
47
+
48
+ If a contradiction is found in *existing* code (not just this diff), escalate to [`grill-plan`](../grill-plan/SKILL.md) to resolve the terminology or architectural mismatch.
49
+
50
+ ## Done when
51
+
52
+ - Every relevant check is `✓`, `✗ + remediation`, or `n/a + reason`.
53
+ - Every `_Avoid_:` alias appearing in the diff has been flagged.
54
+ - Every deviation from an active ADR has been surfaced.
55
+
56
+ The doc-map is small enough to walk in 2–3 minutes. Skip it and you're trading 3 minutes now for an hour of orientation in 3 months.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Every document a skill writes under `docs/` carries [Open Knowledge Format](https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf) (OKF v0.1) YAML frontmatter. That makes the whole `docs/` tree a consumable OKF **bundle** — a directory of markdown "concept" files any OKF-aware tool, agent, or static server can ingest, with no change to how we author.
4
4
 
5
- This is the substrate every doc-producing skill consumes (`feature-doc`, `investigate`, `bootstrap`, `grill-plan`, `bench`, `tdd-rounds`, `verify-real-deps`, …) — the way `STYLE-comments.md` is the substrate for comments. The per-skill templates carry a filled-in frontmatter block; this doc is the contract behind them.
5
+ This is the substrate every doc-producing skill consumes (`feature-doc`, `investigate`, `bootstrap`, `grill-plan`, `bench`, `tdd-rounds`, `verify-real-deps`, …) — the way `STYLE-COMMENTS.md` is the substrate for comments. The per-skill templates carry a filled-in frontmatter block; this doc is the contract behind them.
6
6
 
7
7
  > **Why OKF and not our own scheme:** the format is vendor-neutral and additive — the only hard requirement is a non-empty `type`, and consumers preserve unknown keys. We get interop for free without giving up any of our existing structure.
8
8
 
@@ -41,26 +41,30 @@ OKF does not register types centrally — producers pick descriptive, self-expla
41
41
 
42
42
  | Doc kind | `type` | Produced by | Lives in |
43
43
  | --- | --- | --- | --- |
44
- | Architecture decision record | `adr` | `bootstrap`, `grill-plan`, `investigate` handoff | `docs/adr/NNNN-slug.md` |
44
+ | Architecture decision record | `adr` | `grill-plan`, `bootstrap`, `investigate` (handoff), `improve-codebase-architecture` | `docs/adr/NNNN-slug.md` |
45
45
  | Feature contract | `feature` | `feature-doc` | `docs/features/<name>.md` |
46
46
  | Module / interface design note | `design` | `design` | `docs/features/<name>.design.md` |
47
- | Research / options note | `research` | `investigate` | `docs/research/<topic>.md` |
48
- | Ubiquitous-language map | `context` | `bootstrap`, `grill-plan` | `docs/CONTEXT.md` |
49
- | Multi-context map | `context-map` | `bootstrap` | `CONTEXT-MAP.md` |
47
+ | Round / feature state | `state` | `tdd-rounds` | `docs/features/<name>.state.md` |
48
+ | Research / options note | `research` | `investigate`, `debug` | `docs/research/<topic>.md` |
49
+ | System architecture map | `architecture` | `system-design` | `docs/architecture.md` |
50
+ | Surface threat model | `security` | `security-review` | `docs/security/<feature>.md` |
51
+ | Ubiquitous-language map | `context` | `bootstrap`, `grill-plan`, `improve-codebase-architecture` | `docs/CONTEXT.md` |
52
+ | Multi-context map | `context-map` | `bootstrap` | `docs/CONTEXT-MAP.md` |
50
53
  | Repo conventions | `convention` | `bootstrap` | `docs/CONVENTIONS.md` |
51
- | Accepted-but-unimplemented tracker | `known-issues` | `tdd-rounds`, `verify-real-deps` | `docs/known-issues.md` |
52
- | Benchmark report | `benchmark` | `bench` | `docs/bench/<name>.md` |
53
- | Round / feature state | `state` | `tdd-rounds` | `docs/features/<name>/state/*.md` |
54
+ | Bug ledger / accepted-but-unimplemented tracker | `known-issues` | `verify-real-deps`, `tdd-rounds` | `docs/known-issues.md` |
55
+ | Benchmark report | `benchmark` | `bench` | `docs/benchmarks/<feature>.md` |
54
56
 
55
57
  Pick the closest existing value before inventing a new one. A new doc kind adds a row here in the same change that first emits it.
56
58
 
59
+ **This table is the canonical registry of produced-doc kinds.** [`WORKFLOWS.md`](../WORKFLOWS.md) (the artifacts table) and the root `README.md` (the bundle tree) map these kinds to workflow steps and locations — they link here rather than redefining the set. A kind that isn't in this table isn't a produced kind; add it here first.
60
+
57
61
  ---
58
62
 
59
63
  ## 3. Bundle conventions
60
64
 
61
65
  `docs/` is the bundle root. Two filenames are **reserved** by OKF and never used for a concept:
62
66
 
63
- - **`index.md`** — a directory listing for progressive disclosure. No frontmatter. Entries are `* [Title](relative-url) — short description`, optionally grouped under `## Section` headings. Add `docs/index.md` once the bundle has more than a couple of files; keep it current as docs are added.
67
+ - **`index.md`** — a directory listing for progressive disclosure. No frontmatter. Entries are `* [Title](relative-url) — short description`, optionally grouped under `## Section` headings. Add `docs/index.md` once the bundle has more than a couple of files. Its currency is owned by the doc-drift audit (check 7), run from `prod-ready` §7 (author) and `pr-review` §3e (reviewer) — a produced doc missing from the manifest is a finding.
64
68
  - **`log.md`** — a date-grouped changelog. Our repo's root **`CHANGELOG.md`** already plays this role (Keep-a-Changelog, newest first); treat it as the bundle's log rather than adding a second file. An OKF consumer tolerates the absence of `log.md`.
65
69
 
66
70
  **Cross-references** between docs are plain markdown links. OKF accepts two forms: **bundle-relative** (begin with `/`, resolved from the bundle root: `/adr/0001-distributed-state.md`) and **relative** (`../known-issues.md`). Bundle-relative is the more move-stable form, but this repo's docs use ordinary **relative** links by convention (they also reach files outside the bundle, like `../skills/formats/OKF.md`), and both are equally valid. A link asserts a *relationship* — the kind (supersedes, depends-on, refines) is carried by the surrounding prose, not the link. Broken links are tolerated, not malformed.
@@ -61,7 +61,7 @@ When a kept comment cites the project record, use **exactly one** of these forms
61
61
  | TDD round + acceptance criterion | `RN AC-M` | `R6 AC-3`, `R1 AC-12` |
62
62
  | Tagged round + batch within a release | `vX.Y RNbM` | `v0.3 R1b2`, `v0.8 R2b1` |
63
63
  | Dated verification | `<kind> YYYY-MM-DD` | `smoke-test 2026-05-09` |
64
- | Feature state snapshot | `snapshot §SECTION` | `snapshot §"Invariants"` |
64
+ | Feature state | `state §SECTION` | `state §"Invariants"` |
65
65
 
66
66
  **Avoid** (normalize to the table above):
67
67
  - `Round 6`, `round-six`, `R 6` → `R6`
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  name: grill-plan
3
3
  description: Grilling session that stress-tests a chosen plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use AFTER a direction has been picked (post-`investigate` or post-`feature-doc`), when the user wants to pressure-test the plan — triggered by phrases like "grill me on this", "stress-test this plan", "walk me through this", "is this consistent with our model". Skip if the direction is still being explored — use `investigate` instead.
4
- complexity: medium
5
- expected_duration: 20 minutes
6
4
  ---
7
5
 
6
+ # Grill Plan
7
+
8
+ Stress-test a chosen plan against the existing domain model — interview-style — resolving each decision one at a time and capturing the sharpened terms and ADRs in `CONTEXT.md` / `docs/adr/` as they crystallise.
9
+
8
10
  ## When to use
9
11
 
10
12
  - A direction has been picked (post-`investigate` or post-`feature-doc`) and you want to pressure-test it against the existing model.
@@ -98,7 +100,7 @@ If any of the three is missing, skip the ADR. Use the format in [`../formats/ADR
98
100
  ## Pairing with other skills
99
101
 
100
102
  - **[`investigate`](../investigate/SKILL.md)** — runs *before* when direction is unclear. Once a direction is chosen, hand off here.
101
- - **[`sync-check`](../sync-check/SKILL.md)** — escalates here when a terminology collision or ADR contradiction is found in existing code.
103
+ - **[`DOC-DRIFT-AUDIT.md`](../formats/DOC-DRIFT-AUDIT.md)** — the terminology/ADR audit (formerly the `sync-check` skill) escalates here when it finds a terminology collision or ADR contradiction in existing code.
102
104
  - **[`feature-doc`](../feature-doc/SKILL.md)** — runs *before* when a feature doc is the input to grilling, or *after* when grilling refines the plan into a feature doc.
103
105
  - **[`system-design`](../system-design/SKILL.md)** — defers here for hard-to-reverse topology decisions.
104
106
  - **[`improve-codebase-architecture`](../improve-codebase-architecture/SKILL.md)** — borrows this skill's grilling discipline in its own grilling loop.
@@ -22,7 +22,7 @@ Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a **radi
22
22
 
23
23
  Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1.
24
24
 
25
- **Assign each sub-agent a specific persona from [`skills/design/PERSONAS.md`](../design/PERSONAS.md)** (e.g., Agent 1 is "The Minimalist", Agent 2 is "The Extensible").
25
+ **Assign each sub-agent a specific persona from [`skills/formats/PERSONAS.md`](../formats/PERSONAS.md)** (e.g., Agent 1 is "The Minimalist", Agent 2 is "The Extensible").
26
26
 
27
27
  Include both [skills/LANGUAGE.md](../LANGUAGE.md) vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
28
28
 
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: improve-codebase-architecture
3
3
  description: Find deepening opportunities in EXISTING code, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable. Use for EXISTING code; for designing the shape of a new module from scratch, use `design`. Skip for single-module local refactors with no cross-module impact — use `design` or just refactor inline.
4
- complexity: high
5
- expected_duration: 45 minutes
6
4
  ---
7
5
 
8
6
  # Improve Codebase Architecture
@@ -20,28 +18,19 @@ Surface architectural friction and propose **deepening opportunities** — refac
20
18
  - Designing the shape of a new module from scratch — use [`design`](../design/SKILL.md).
21
19
  - Greenfield system topology — use [`system-design`](../system-design/SKILL.md).
22
20
  - Single-module local refactor with no cross-module impact — use `design` or refactor inline.
23
- - Line-level cleanup (renames, dead-code removal) — use [`code-hygiene`](../code-hygiene/SKILL.md) + [`simplify`](../simplify/SKILL.md).
21
+ - Line-level cleanup (renames, dead-code removal) — use the [`code-hygiene`](../formats/CODE-HYGIENE.md) lens + [`simplify`](../simplify/SKILL.md).
24
22
 
25
- ## Glossary
23
+ ## Vocabulary
26
24
 
27
- Use these terms exactly in every suggestion. Consistent language is the point — don't drift into "component," "service," "API," or "boundary." Full definitions in [skills/LANGUAGE.md](../LANGUAGE.md).
25
+ Use the shared architecture terms **exactly** **module**, **interface**, **implementation**, **depth** (deep / shallow), **seam**, **adapter**, **leverage**, **locality** and don't drift into "component," "service," "API," or "boundary." Definitions and principles are canonical in [`LANGUAGE.md`](../LANGUAGE.md); this skill links rather than restating them.
28
26
 
29
- - **Module** anything with an interface and an implementation (function, class, package, slice).
30
- - **Interface** — everything a caller must know to use the module: types, invariants, error modes, ordering, config. Not just the type signature.
31
- - **Implementation** — the code inside.
32
- - **Depth** — leverage at the interface: a lot of behaviour behind a small interface. **Deep** = high leverage. **Shallow** = interface nearly as complex as the implementation.
33
- - **Seam** — where an interface lives; a place behaviour can be altered without editing in place. (Use this, not "boundary.")
34
- - **Adapter** — a concrete thing satisfying an interface at a seam.
35
- - **Leverage** — what callers get from depth.
36
- - **Locality** — what maintainers get from depth: change, bugs, knowledge concentrated in one place.
27
+ Three principles from there do the heavy lifting here:
37
28
 
38
- Key principles (see [skills/LANGUAGE.md](../LANGUAGE.md) for the full list):
39
-
40
- - **Deletion test**: imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
29
+ - **Deletion test** — imagine deleting the module. If complexity vanishes, it was a pass-through; if it reappears across N callers, it was earning its keep. This is the primary filter for the candidates below.
41
30
  - **The interface is the test surface.**
42
- - **One adapter = hypothetical seam. Two adapters = real seam.**
31
+ - **One adapter = hypothetical seam; two adapters = real seam.**
43
32
 
44
- This skill is _informed_ by the project's domain model. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate.
33
+ This skill is _informed_ by the project's domain model: the domain language gives names to good seams; ADRs record decisions the skill should not re-litigate.
45
34
 
46
35
  ## Process
47
36
 
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: investigate
3
3
  description: Use when the user asks for investigation, research, a proposal, or "options" before any code lands; or proactively for non-trivial structural decisions (new dependency, framework choice, API contract change, cross-cutting refactor). Triggered by phrases like "investigate X", "research Y", "give me a proposal", "what are our options", "how would we approach", "let's explore", "should we...". Produces a durable research note in `docs/research/<topic>.md`. Skip for tasks where one obvious approach exists (typo fixes, config tweaks, mechanical refactors). Pairs with `feature-doc` (captures *what* we're building once a direction is chosen) and `grill-plan` (stress-tests a chosen plan).
4
- complexity: medium
5
- expected_duration: 20 minutes
6
4
  ---
7
5
 
8
6
  # Investigation Workflow
@@ -87,6 +85,20 @@ The note must include:
87
85
  - Do **not** skip the artifact for "small" investigations. The discipline of writing it is the value; the durable trail is the bonus.
88
86
  - Do **not** add a Recommendation that just lists the options again. Pick one.
89
87
 
88
+ ## Pairing with other skills
89
+
90
+ - **[`feature-doc`](../feature-doc/SKILL.md)** — runs *after*. The "Decided" recommendation becomes the feature contract.
91
+ - **[`grill-plan`](../grill-plan/SKILL.md)** — runs *after* when the chosen option is load-bearing and needs stress-testing into an ADR.
92
+ - **[`system-design`](../system-design/SKILL.md)** — runs *after* when the investigation settled a greenfield topology direction.
93
+ - **[`debug`](../debug/SKILL.md)** — *lateral*. Also emits a `docs/research/<topic>.md` note, but for an unexplained bug rather than a forward-looking decision.
94
+
95
+ ## Done when
96
+
97
+ - A research note exists at `docs/research/<topic>.md`, opening with `type: research` OKF frontmatter, containing Context (cited), 2–3 Options, a single Recommendation, Checkpoint questions, and Out-of-scope.
98
+ - Every claim in Context cites `path:line` — nothing is worked from impression.
99
+ - Exactly one option is recommended, with the accepted trade-off named (not a re-listing of the options).
100
+ - The user has the checkpoint questions needed to choose, and no implementation has started.
101
+
90
102
  ## Handoff
91
103
 
92
104
  Once the user picks an option:
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: pr-review
3
- description: Discipline for reviewing someone else's pull request — the inverse of `prod-ready` (which is the author's pre-merge gate). Use when the user asks to "review this PR", "look over the diff", "check this change", "give feedback on", or invokes a code-review slash command. Reviews against the linked feature doc / ADRs / domain vocabulary, classifies findings by severity (blocker / suggestion / nit), and returns a structured report. Skip for trivial PRs (typo, dep bump, lint-only) — approve directly. Pairs with `prod-ready` (the author's checklist; the reviewer verifies it landed honestly), `security-review` (escalation when the diff is surface-changing), and `code-hygiene` (the line-level lens applied during the read).
4
- complexity: medium
5
- expected_duration: 20 minutes
3
+ description: Discipline for reviewing someone else's pull request — the inverse of `prod-ready` (which is the author's pre-merge gate). Use when the user asks to "review this PR", "look over the diff", "check this change", "give feedback on", or invokes a code-review slash command. Reviews against the linked feature doc / ADRs / domain vocabulary, classifies findings by severity (blocker / suggestion / nit), and returns a structured report. Skip for trivial PRs (typo, dep bump, lint-only) — approve directly. Pairs with `prod-ready` (the author's checklist; the reviewer verifies it landed honestly), `security-review` (escalation when the diff is surface-changing), and the `code-hygiene` lens (`formats/CODE-HYGIENE.md`, applied line-level during the read).
6
4
  ---
7
5
 
8
6
  # PR Review
@@ -87,26 +85,13 @@ For non-surface-changing diffs: walk `prod-ready` Section 3 (defense-in-depth) b
87
85
 
88
86
  #### 3e. Doc-drift audit
89
87
 
90
- This is the second line of defense for `prod-ready` Section 7. Author may have missed it; reviewer catches what's left. Walk these questions against the diff:
91
-
92
- - **New decision with viable alternatives** → does an ADR exist in `docs/adr/` for it? Does it name what it supersedes? If load-bearing, is it referenced from the code?
93
- - **New or changed domain term** → has [`docs/CONTEXT.md`](../../docs/CONTEXT.md) been updated? Are `_Avoid_:` aliases listed if there's risk of confusion?
94
- - **New / removed package, changed public interface, shifted module boundary** → is the feature's design note (`docs/features/<feature>.design.md`) updated? Module map, file layout, public-interface signatures, test boundaries.
95
- - **Changed acceptance criteria** → does the feature doc reflect what was actually built? Silently-dropped or silently-added behavior is the most common drift class — flag and don't accept "we'll fix in a follow-up".
96
- - **User-visible change** → does `CHANGELOG.md` have an entry under `[Unreleased]`, grouped by `Added / Changed / Fixed / Removed`? Skip only for formatter-only / lint-only / test-only / internal-refactor-with-no-behavior-change / dep-bump-with-no-runtime-impact diffs. Missing entry on a user-visible change = finding.
97
- - **New or changed produced doc under `docs/`** → does it open with OKF frontmatter carrying a non-empty `type` from [`skills/formats/OKF.md`](../formats/OKF.md) §2? A produced doc with no `type` breaks bundle conformance = finding.
98
-
99
- If any answer is "no" without `n/a + reason`, that's a finding. Severity:
100
- - **Blocker** — the missing doc is load-bearing for the next reader (ADR for a hard-to-reverse decision; CONTEXT.md entry for a term other PRs will use; AC drift hiding behavior).
101
- - **Suggestion** — the doc would help but the diff is self-explanatory in isolation.
102
-
103
- The doc-map is small enough to walk in 2–3 minutes. Skip it and you're trading 3 minutes now for an hour of orientation in 3 months.
88
+ Walk the seven checks in [`skills/formats/DOC-DRIFT-AUDIT.md`](../formats/DOC-DRIFT-AUDIT.md) against the diff — **reviewer lens**. This is the second line of defense for `prod-ready` Section 7: the author may have missed it; you catch what's left. Any check that resolves to "no" without `n/a + reason` is a finding, at the severity that reference defines — **Blocker** for load-bearing drift (a missing ADR for a hard-to-reverse decision, a `CONTEXT.md` entry for a term other PRs will use, AC drift hiding behavior, a direct ADR contradiction), **Suggestion** when the diff is self-explanatory in isolation.
104
89
 
105
90
  #### 3f. Hygiene (line level)
106
91
 
107
- Apply `code-hygiene` as a lens here, not as a primary phase:
92
+ Apply the [`code-hygiene`](../formats/CODE-HYGIENE.md) lens here, not as a primary phase:
108
93
 
109
- - **Comment noise**: new WHAT-comments, docstrings on exports whose contract is obvious from the signature, in-function section headers (`// validate`, `// build response`), stale "used by X" references, citation grammar that doesn't match the repo's comment style doc ([`skills/formats/STYLE-comments.md`](../formats/STYLE-comments.md)). Flag as **nits by default**; promote to a suggestion only when cumulative comment noise obscures the diff (signal the author skipped `simplify`).
94
+ - **Comment noise**: new WHAT-comments, docstrings on exports whose contract is obvious from the signature, in-function section headers (`// validate`, `// build response`), stale "used by X" references, citation grammar that doesn't match the repo's comment style doc ([`skills/formats/STYLE-COMMENTS.md`](../formats/STYLE-COMMENTS.md)). Flag as **nits by default**; promote to a suggestion only when cumulative comment noise obscures the diff (signal the author skipped `simplify`).
110
95
  - Names that mislead (boolean returning non-bool, `getX` that mutates, `Manager`/`Helper` suffixes hiding what the thing is).
111
96
  - Cleverness that earns its cost? Or could be boring?
112
97
  - YAGNI — "in case we need it" parameters / interfaces / classes? Strip.
@@ -179,16 +164,16 @@ A `tdd-rounds` parent verifying a Builder's round runs a focused subset:
179
164
  2. Run the test command independently — don't trust pasted output.
180
165
  3. Read the diff, classify findings.
181
166
  4. Tick AC checkboxes in the feature doc with the test names.
182
- 5. Append the round summary to `docs/STATE.md`.
167
+ 5. Append the round summary to the feature's `docs/features/<name>.state.md`.
183
168
 
184
169
  The classification (blocker / suggestion / nit) lives in the parent's notes; only blockers gate the next round.
185
170
 
186
171
  ## Pairing with other skills
187
172
 
188
173
  - **`prod-ready`** is the author's pre-merge checklist. Reviewer verifies it landed.
189
- - **`sync-check`** is the diagnostic context auditor. Reviewer runs it (or verifies it was run) to catch terminology drift and ADR contradictions early.
174
+ - **[`DOC-DRIFT-AUDIT.md`](../formats/DOC-DRIFT-AUDIT.md)** is the shared terminology/ADR/doc-map audit run from §3e the former `sync-check` skill, now single-sourced and shared with `prod-ready` Section 7.
190
175
  - **`security-review`** is the surface-change escalation. Reviewer flags when required.
191
- - **`code-hygiene`** is the line-level lens applied during the read.
176
+ - **[`code-hygiene`](../formats/CODE-HYGIENE.md)** is the line-level lens applied during the read (§3f).
192
177
  - **`grill-plan`** is where load-bearing disagreements go (a new ADR, not a PR comment thread).
193
178
  - **`debug`** if a finding turns out to be "this PR introduces a bug" — switch to debug to characterise it before recommending a change.
194
179
 
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  name: prod-ready
3
- description: Pre-merge production-readiness checklist — operational, infrastructure, and consistency checks that tests alone don't surface. Use after `tdd` reaches green; before opening a PR or merging to main; after significant infra changes (new DB, new deployment target, new auth flow); or when the user mentions "shipping", "ready to merge", "before deploy", "production readiness", or "prod-ready". Pairs with the `tdd` skill tdd proves the feature works; this catches what tests can't see (server timeouts, DB pragmas, error-response consistency, secrets at rest).
4
- complexity: low
5
- expected_duration: 10 minutes
3
+ description: Pre-merge production-readiness checklist — operational, infrastructure, and consistency checks that tests alone don't surface. Use after `tdd` reaches green; before opening a PR or merging to main; after significant infra changes (new DB, new deployment target, new auth flow); or when the user mentions "shipping", "ready to merge", "before deploy", "production readiness", or "prod-ready". Skip for pure docs / comment / test-only diffs, dependency bumps with no runtime change, or one-line bug fixes that don't touch infra, auth, or error paths. Pairs with `tdd` (proves the feature works; this catches what tests can't see server timeouts, DB pragmas, error-response consistency, secrets at rest), `security-review` (the heavier threat-model pass when the surface changes), `pr-review` (the reviewer's mirror of this gate), and `verify-real-deps` (after, for releases that touch third-party APIs).
6
4
  ---
7
5
 
8
6
  # Prod-Readiness Checklist
@@ -17,6 +15,12 @@ A short pre-merge gate. Tests prove the **feature** works. This skill catches wh
17
15
  - Before opening a PR or merging to main.
18
16
  - After significant infrastructure changes (new DB, new deployment target, new auth flow).
19
17
 
18
+ ## When to skip
19
+
20
+ - Pure docs / comment / test-only changes.
21
+ - Dependency bumps that don't change runtime behavior.
22
+ - One-line business-logic bug fixes that don't touch infra, auth, or error paths.
23
+
20
24
  ## Checklist
21
25
 
22
26
  Walk each section. An item is OK to fail **only if** the feature doc's Notes / Non-Goals explicitly accepts the gap.
@@ -54,22 +58,17 @@ Walk each section. An item is OK to fail **only if** the feature doc's Notes / N
54
58
 
55
59
  ### 7. Documentation (the doc-map)
56
60
 
57
- Implementation lands → docs drift. The natural moment to catch drift is now, not "next sprint". One question per doc type: *did this work change X? Then update Y.* Files don't need to pre-exist — create `docs/adr/`, `CONTEXT.md`, design notes lazily when the first relevant change appears.
61
+ Implementation lands → docs drift. The natural moment to catch drift is now, not "next sprint". Walk the seven checks in [`skills/formats/DOC-DRIFT-AUDIT.md`](../formats/DOC-DRIFT-AUDIT.md) **author lens**: tick each `✓`, `✗ + remediation`, or `n/a + reason`, and fix the drift inline before the PR (don't kick it to a follow-up). Files don't need to pre-exist — create `docs/adr/`, `CONTEXT.md`, design notes lazily when the first relevant change appears.
58
62
 
59
- - [ ] **New decision with viable alternatives** → ADR exists in `docs/adr/`, names what it supersedes (if anything), and is referenced from code where the decision is load-bearing.
60
- - [ ] **New or changed domain term** → `CONTEXT.md` entry created or updated. Includes `_Avoid_:` aliases if the term is at risk of being confused with an existing one.
61
- - [ ] **New/removed package, changed public interface, or shifted module boundary** → the feature's design note (e.g., `docs/features/<feature>.design.md`) updated. Specifically: Module map, File layout, public-interface signatures, Test boundaries.
62
- - [ ] **Changed acceptance criteria** → the feature doc reflects what was actually built. Silently-dropped or silently-added behavior is the most common drift class — fix here, don't kick to a follow-up.
63
- - [ ] **User-visible change** → `CHANGELOG.md` has an entry under `[Unreleased]`, grouped by `Added / Changed / Fixed / Removed`. Skip only if the diff is formatter-only, lint-only, test-only, internal refactor with no behavior change, or a dependency bump with no runtime impact. (Overlaps but is **not identical** to `feature-doc`'s skip list — that one also waives the *doc* for typo fixes and one-line config tweaks. A typo fix can still merit a one-liner here.)
64
- - [ ] **New or changed doc under `docs/`** it opens with OKF frontmatter carrying a non-empty `type` from [`skills/formats/OKF.md`](../formats/OKF.md) §2. A produced doc with no `type` breaks the bundle's conformance — fix here.
63
+ - [ ] ADR for any new decision with viable alternatives (and no active ADR is contradicted).
64
+ - [ ] `CONTEXT.md` updated for any new/changed domain term, with `_Avoid_:` aliases where confusion is likely.
65
+ - [ ] Design note updated for any new/removed package, changed public interface, or shifted module boundary.
66
+ - [ ] Feature doc reflects what was actually built (no silently-dropped or silently-added behavior).
67
+ - [ ] `CHANGELOG.md` `[Unreleased]` entry for any user-visible change.
68
+ - [ ] Every new/changed `docs/` file opens with OKF `type` frontmatter.
69
+ - [ ] `docs/index.md` lists every produced doc — new ones added, deleted ones removed.
65
70
 
66
- If a doc type isn't relevant to this work, write "n/a" explicit beats implicit.
67
-
68
- ## When to skip
69
-
70
- - Pure docs / comment / test-only changes.
71
- - Dependency bumps that don't change runtime behavior.
72
- - One-line business-logic bug fixes that don't touch infra, auth, or error paths.
71
+ Per-check definitions, skip lists, and severity live in [`DOC-DRIFT-AUDIT.md`](../formats/DOC-DRIFT-AUDIT.md) — this is the same audit `pr-review` §3e runs from the reviewer side.
73
72
 
74
73
  ## Pairing with other skills
75
74