@ai-agent-lead/skills 1.4.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 (36) hide show
  1. package/README.md +30 -0
  2. package/package.json +1 -1
  3. package/skills/README.md +11 -4
  4. package/skills/SKILL-TEMPLATE.md +4 -2
  5. package/skills/WORKFLOWS.md +11 -8
  6. package/skills/bench/SKILL.md +20 -2
  7. package/skills/bootstrap/SKILL.md +24 -13
  8. package/skills/caveman/SKILL.md +1 -1
  9. package/skills/design/SKILL.md +10 -1
  10. package/skills/design/templates/design-note.md +47 -0
  11. package/skills/feature-doc/SKILL.md +11 -17
  12. package/skills/formats/CODE-HYGIENE.md +1 -1
  13. package/skills/formats/CONTEXT-FORMAT.md +5 -5
  14. package/skills/formats/CONTEXT-MAP-FORMAT.md +14 -3
  15. package/skills/formats/CONVENTION-FORMAT.md +40 -0
  16. package/skills/formats/DOC-DRIFT-AUDIT.md +2 -1
  17. package/skills/formats/OKF.md +13 -9
  18. package/skills/formats/{STYLE-comments.md → STYLE-COMMENTS.md} +1 -1
  19. package/skills/grill-plan/SKILL.md +4 -0
  20. package/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +1 -1
  21. package/skills/improve-codebase-architecture/SKILL.md +6 -15
  22. package/skills/investigate/SKILL.md +14 -0
  23. package/skills/pr-review/SKILL.md +3 -3
  24. package/skills/prod-ready/SKILL.md +9 -8
  25. package/skills/security-review/SKILL.md +12 -2
  26. package/skills/simplify/SKILL.md +4 -4
  27. package/skills/system-design/SKILL.md +28 -16
  28. package/skills/tdd/SKILL.md +5 -4
  29. package/skills/tdd-rounds/COMMITS.md +4 -4
  30. package/skills/tdd-rounds/SKILL.md +33 -7
  31. package/skills/tdd-rounds/templates/builder-brief.md +4 -4
  32. package/skills/verify-real-deps/SKILL.md +16 -2
  33. package/skills/verify-real-deps/templates/known-issues.md +33 -28
  34. package/skills/zoom-out/SKILL.md +1 -1
  35. /package/skills/{design → formats}/OBSERVABILITY.md +0 -0
  36. /package/skills/{design → formats}/PERSONAS.md +0 -0
package/README.md CHANGED
@@ -16,6 +16,36 @@ The goal: turn engineering discipline from something I have to enforce into some
16
16
 
17
17
  - [`skills/`](./skills/) — the skill set. See [`skills/README.md`](./skills/README.md) for the index, the role/trigger taxonomy, and how skills compose into workflows.
18
18
 
19
+ ## What the skills produce
20
+
21
+ Run the skill set on a project and a self-documenting `docs/` tree accumulates. Every file is created **lazily** — on first use, never up front — and carries [OKF](https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf) frontmatter, so the whole tree is a consumable knowledge bundle. The canonical registry of doc kinds is [`skills/formats/OKF.md`](./skills/formats/OKF.md) §2; the artifacts table in [`skills/WORKFLOWS.md`](./skills/WORKFLOWS.md) maps each kind to the workflow step that emits it. The shape the tree converges to:
22
+
23
+ ```
24
+ repo-root/
25
+ ├── CHANGELOG.md ← prod-ready (the bundle's OKF log)
26
+ └── docs/ ← the OKF bundle root
27
+ ├── index.md ← bundle listing / feature manifest (no frontmatter)
28
+ ├── CONTEXT.md ← bootstrap, grill-plan [type: context]
29
+ ├── CONTEXT-MAP.md ← bootstrap (multi-context repos) [type: context-map]
30
+ ├── CONVENTIONS.md ← bootstrap [type: convention]
31
+ ├── architecture.md ← system-design [type: architecture]
32
+ ├── known-issues.md ← verify-real-deps, tdd-rounds [type: known-issues]
33
+ ├── adr/
34
+ │ └── NNNN-<slug>.md ← grill-plan, improve-codebase-architecture [type: adr]
35
+ ├── features/
36
+ │ ├── <name>.md ← feature-doc [type: feature]
37
+ │ ├── <name>.design.md ← design (optional) [type: design]
38
+ │ └── <name>.state.md ← tdd-rounds (one per feature) [type: state]
39
+ ├── research/
40
+ │ └── <topic>.md ← investigate, debug [type: research]
41
+ ├── security/
42
+ │ └── <feature>.md ← security-review (high-stakes) [type: security]
43
+ └── benchmarks/
44
+ └── <feature>.md ← bench [type: benchmark]
45
+ ```
46
+
47
+ The three feature siblings — `<name>.md` (the contract), `<name>.design.md` (the module shape), `<name>.state.md` (the round-by-round state) — share a stem so a feature's contract, design, and progress sit together. There is no global state file; `docs/index.md` is the manifest.
48
+
19
49
  ## Installation
20
50
 
21
51
  You can install all the skills in this repository directly using `npx`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-agent-lead/skills",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Install AI agent skills for Claude Code, Codex, Antigravity, and OpenCode",
5
5
  "main": "bin/install.js",
6
6
  "bin": {
package/skills/README.md CHANGED
@@ -35,8 +35,8 @@ The `code-hygiene` line-level lens is no longer a routable skill — it lives at
35
35
  | --- | --- | --- | --- |
36
36
  | `debug` | Non-trivial bug whose root cause isn't obvious — runs **before** `tdd` | Reproduction + named root cause; optional `docs/research/<bug>.md` | [debug/](./debug/) |
37
37
  | `tdd` | Implementing a feature or fixing a bug, test-first | Test-first code | [tdd/](./tdd/) |
38
- | `tdd-rounds` | Multi-round TDD orchestration via Builder sub-agents (≥10 ACs / multi-package) | Builder briefs + reports + `docs/STATE.md` | [tdd-rounds/](./tdd-rounds/) |
39
- | `simplify` | End-of-slice / end-of-round sweep — reuse, quality, efficiency, test relevance | Tightened diff + a separate `simplify` commit | [simplify/](./simplify/) |
38
+ | `tdd-rounds` | Multi-round TDD orchestration via Builder sub-agents (≥10 ACs / multi-package) | Builder briefs + reports + `docs/features/<name>.state.md` | [tdd-rounds/](./tdd-rounds/) |
39
+ | `simplify` | End-of-slice / end-of-round sweep — reuse, quality, efficiency, test relevance, telemetry | Tightened diff + a separate `simplify` commit | [simplify/](./simplify/) |
40
40
 
41
41
  ### Pre-merge gates & review
42
42
 
@@ -134,15 +134,22 @@ The skills compose into canonical workflows (greenfield feature, large feature,
134
134
 
135
135
  - [`formats/ADR-FORMAT.md`](./formats/ADR-FORMAT.md) — ADR template, numbering, when-to-write criteria.
136
136
  - [`formats/CONTEXT-FORMAT.md`](./formats/CONTEXT-FORMAT.md) — `CONTEXT.md` structure, single-vs-multi-context layout, minimal example.
137
+ - [`formats/CONVENTION-FORMAT.md`](./formats/CONVENTION-FORMAT.md) — `CONVENTIONS.md` structure (branches, commits, naming, code style). Seeded by `bootstrap`.
137
138
  - [`formats/CODE-HYGIENE.md`](./formats/CODE-HYGIENE.md) — the line-level lens (boring code, naming, YAGNI, rule of 3, locality, comments, constants placement). Applied during `simplify` and `pr-review` §3f.
138
139
  - [`formats/DOC-DRIFT-AUDIT.md`](./formats/DOC-DRIFT-AUDIT.md) — the terminology / ADR / doc-map audit. Run from `prod-ready` §7 (author), `pr-review` §3e (reviewer), or standalone (the former `sync-check`).
139
- - [`formats/OKF.md`](./formats/OKF.md) — frontmatter contract for produced `docs/` files. [`formats/STYLE-comments.md`](./formats/STYLE-comments.md) — the comment bar.
140
+ - [`formats/OKF.md`](./formats/OKF.md) — frontmatter contract for produced `docs/` files. [`formats/STYLE-COMMENTS.md`](./formats/STYLE-COMMENTS.md) — the comment bar.
141
+ - [`formats/OBSERVABILITY.md`](./formats/OBSERVABILITY.md) — the observability-by-design lens (what to instrument, log levels, telemetry placement). Applied during `simplify`'s telemetry pass.
142
+ - [`formats/PERSONAS.md`](./formats/PERSONAS.md) — design-exploration personas (the Minimalist, the Extensible, …) for assigning distinct lenses to parallel sub-agents. Used by `improve-codebase-architecture`'s interface-design step.
140
143
 
141
144
  Used by `grill-plan`, `improve-codebase-architecture`, `system-design`, `investigate`, `simplify`, `prod-ready`, `pr-review`, and (lazily) `feature-doc`.
142
145
 
143
146
  ## Conventions
144
147
 
145
- - **File naming.** UPPERCASE for skill-level reference docs (`SKILL.md`, `LANGUAGE.md`, `MOTIVATION.md`, `*-FORMAT.md`, etc.) Claude loads these as supporting context. lowercase for templates inside `<skill>/templates/` — skeletons to copy and fill in.
148
+ - **File naming the one rule (canonical; other docs link here).** Case signals *role*:
149
+ - **`UPPERCASE-KEBAB.md`** — *standing references you read by a fixed name.* All skill machinery and supporting docs under `skills/` (`SKILL.md`, `LANGUAGE.md`, `WORKFLOWS.md`, per-skill `BOOTSTRAP.md` / `COMMITS.md` / `TESTS.md` / …, and everything in [`formats/`](./formats/)); **plus** the produced bundle's repo-wide **orientation / governance** layer — the files you read to *speak, navigate, and track the whole repo*: `docs/CONTEXT.md`, `docs/CONTEXT-MAP.md`, `docs/CONVENTIONS.md`, and root `CHANGELOG.md`.
150
+ - **`lowercase-kebab.md`** — *fill-in skeletons and produced work-products.* Templates in `<skill>/templates/`; and every doc a skill emits as a deliverable — `docs/architecture.md`, `docs/known-issues.md`, and all instances under `adr/`, `features/`, `research/`, `security/`, `benchmarks/` (named after their subject).
151
+ - **Reserved:** `index.md` and `log.md` stay lowercase — OKF reserves them.
152
+ - **The test:** *does this file govern how you read / name / track the whole repo (UPPERCASE), or is it something a skill produced — a map, a contract, a decision, a ledger, a manifest (lowercase)?* `docs/architecture.md` is lowercase because it's a produced deliverable, like a feature doc — not part of the orientation layer the way `CONTEXT.md` is.
146
153
  - Output artifacts live under `docs/` in the repo root, never inside `.claude/`.
147
154
  - Status enums, frontmatter shape, and cross-doc linking rules are in [`docs/CONVENTIONS.md`](../docs/CONVENTIONS.md).
148
155
  - Domain vocabulary is in [`docs/CONTEXT.md`](../docs/CONTEXT.md). Terms there beat synonyms invented at the keyboard.
@@ -8,6 +8,8 @@ The order is load-bearing. Claude scans top-to-bottom — `When to use` / `When
8
8
 
9
9
  ## Naming and placement
10
10
 
11
+ The full file-naming rule (skills **and** produced docs) is single-sourced in [`README.md` §Conventions](README.md#conventions). The essentials for a skill directory:
12
+
11
13
  - File path: `skills/<skill-name>/SKILL.md` (lowercase, hyphenated directory).
12
14
  - Supporting reference docs in the same directory go UPPERCASE (`MOTIVATION.md`, `DEEPENING.md`, etc.).
13
15
  - Templates that callers fill in go in `<skill-name>/templates/` and stay lowercase (`feature-template.md`).
@@ -54,7 +56,7 @@ A `description` that names only the happy path will route falsely. Always name w
54
56
  - <case where a different skill is the right answer; name that skill>
55
57
  - <case where no skill is needed at all — "just fix it">
56
58
 
57
- ## Phases (or **Process**, or **Workflow** — pick one and stick to it)
59
+ ## Phases (or **Process**, **Workflow**, **Steps**, **Principles**, **The N lenses** — pick the one descriptive heading that fits the skill, and use only one)
58
60
 
59
61
  ### 1. <Phase name — verb-leading>
60
62
 
@@ -94,7 +96,7 @@ A `description` that names only the happy path will route falsely. Always name w
94
96
  | Why this skill exists | optional | Include for *teaching* skills (discipline being taught). Skip for *orchestration* and *utility* skills. |
95
97
  | When to use | yes | Body section, not just frontmatter. Frontmatter alone is too easy to skim past. |
96
98
  | When to skip | yes | Body section. Mirror the description — explicit, not implied. |
97
- | Phases / Process / Workflow | yes | Pick one heading. Don't mix. |
99
+ | The "how it works" body | yes | Its **position** (after `When to skip`, before `Anti-patterns`) is canonical; its **name** is not. Use the heading that fits — `Phases`, `Process`, `Workflow`, `Steps`, `Principles`, `The N lenses`. One such section (a set of same-kind sub-sections — e.g. `Principle 1…N` — counts as one); don't mix different kinds. |
98
100
  | Anti-patterns | recommended | Skip only if the skill is so simple there are none. |
99
101
  | Pairing with other skills | yes | At minimum name 1 upstream and 1 downstream. |
100
102
  | Done when | yes | Verifiable conditions, not vibes. |
@@ -94,7 +94,7 @@ For a single-package feature with a manageable acceptance-criteria count.
94
94
 
95
95
 
96
96
  ┌──────── Round N ────────┐
97
- │ Parent writes brief │ ◄─── self-contained, references docs/STATE.md
97
+ │ Parent writes brief │ ◄─── self-contained, references docs/features/<name>.state.md
98
98
  │ │ │
99
99
  │ ▼ │
100
100
  │ Builder is dispatched │
@@ -113,7 +113,7 @@ For a single-package feature with a manageable acceptance-criteria count.
113
113
  │ ▼ │
114
114
  │ Parent reviews diff, │
115
115
  │ runs tests independently,
116
- │ appends to STATE.md
116
+ │ appends to state file
117
117
  └──────────┬───────────────┘
118
118
 
119
119
 
@@ -361,15 +361,18 @@ A few things that happen across all workflows:
361
361
  | `docs/features/<name>.md` | `feature-doc` | One per feature |
362
362
  | `docs/features/<name>.design.md` | `design` (optional) | One per feature with non-trivial module shape |
363
363
  | `docs/research/<topic>.md` | `investigate`, `debug` (optional) | One per investigation or non-trivial bug |
364
- | `docs/adr/<n>-<topic>.md` | `grill-plan`, `improve-codebase-architecture` | One per architectural decision |
365
- | `docs/CONTEXT.md` | `grill-plan`, `improve-codebase-architecture` (inline updates) | One per repo / context |
364
+ | `docs/adr/<n>-<topic>.md` | `grill-plan`, `bootstrap`, `investigate` (handoff), `improve-codebase-architecture` | One per architectural decision |
365
+ | `docs/CONTEXT.md` | `bootstrap` (seed), `grill-plan`, `improve-codebase-architecture` (inline updates) | One per repo / context |
366
+ | `docs/CONTEXT-MAP.md` | `bootstrap` | One per repo with >1 bounded context |
367
+ | `docs/CONVENTIONS.md` | `bootstrap` | One per repo; structure & process rules |
366
368
  | `docs/architecture.md` | `system-design` | One per system (the system map) |
367
- | `docs/features/<name>/state/snapshot.md` | `tdd-rounds` parent | Living snapshot per feature (target end-state per ADR-0001; not yet wired through `tdd-rounds` skill text) |
368
- | `docs/features/<name>/state/rounds/*.md` | `tdd-rounds` Builder | Immutable round logs (target end-state per ADR-0001) |
369
- | `docs/STATE.md` | `tdd-rounds` parent | Currently the single running summary; ADR-0001 demotes it to a global manifest after migration. |
369
+ | `docs/features/<name>.state.md` | `tdd-rounds` parent | One living, append-only state file per feature `## Round N` sections, sibling to the contract and design note (per ADR-0001). |
370
370
  | `docs/security/<feature>.md` | `security-review` (high-stakes only) | One per surface-changing feature where a feature-doc section isn't enough |
371
371
  | `docs/benchmarks/<feature>.md` | `bench` | One per performance-critical feature |
372
- | `docs/known-issues.md` | `verify-real-deps` | One per repo (post-mortem record); also holds follow-up tracking for accepted-but-unimplemented ADRs. |
372
+ | `docs/known-issues.md` | `verify-real-deps`, `tdd-rounds` | One per repo (post-mortem record); also holds follow-up tracking for accepted-but-unimplemented ADRs. |
373
+ | `docs/index.md` | doc-drift audit (maintained; reserved OKF name, no frontmatter) | Bundle manifest — lists every produced doc |
373
374
  | `CHANGELOG.md` | `prod-ready` Section 7 | One per repo; `[Unreleased]` accumulates between releases. |
374
375
  All `docs/` files are created **lazily** — they don't have to pre-exist for a workflow to run. The skill creates them on first use.
375
376
 
377
+ The canonical registry of produced-doc kinds and their `type` values is [`formats/OKF.md` §2](./formats/OKF.md); this table maps each kind to the workflow step that emits it.
378
+
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bench
3
- description: Performance benchmarking discipline. Measures latency, throughput, and records baseline environments. Triggered by phrases like "benchmark", "performance test", "measure latency".
3
+ description: Performance benchmarking discipline measures latency and throughput against a recorded baseline environment. Triggered by phrases like "benchmark", "performance test", "measure latency", "profile". Skip when there's no performance AC or suspected regression. Pairs with `feature-doc` (the perf AC it verifies) and `prod-ready` (the pre-merge gate the result feeds).
4
4
  ---
5
5
 
6
6
  # Benchmark
@@ -17,6 +17,12 @@ Performance claims are often "vibes-based" or measured on a developer's machine
17
17
  - Identifying regressions or improvements after a major refactor.
18
18
  - Profiling hot paths to guide optimization.
19
19
 
20
+ ## When to skip
21
+
22
+ - No performance AC and no suspected regression — don't benchmark for its own sake.
23
+ - Cold paths users rarely hit — measure where the load actually is.
24
+ - Functional-only changes with no latency / throughput / memory claim to verify.
25
+
20
26
  ## Process
21
27
 
22
28
  ### 1. Establish Baseline
@@ -29,7 +35,19 @@ Run the same test against the changed code. Ensure identical environment conditi
29
35
 
30
36
  ### 3. Record Findings
31
37
 
32
- Create a report in `docs/benchmarks/<feature>.md` using the template.
38
+ Create a report in `docs/benchmarks/<feature>.md` using [`templates/benchmark-report.md`](templates/benchmark-report.md).
39
+
40
+ ## Anti-patterns
41
+
42
+ - **Baseline-free numbers.** "40ms faster" with nothing to compare against — record the before-measurement and the environment, or the figure is meaningless.
43
+ - **Noisy-machine benchmarking.** Measuring on a laptop mid-build — pin hardware, load, and concurrency and keep them identical across runs.
44
+ - **Reporting the warmup.** Quoting the first cold-cache iteration — discard warmup and report steady-state percentiles (p50 / p95 / p99).
45
+
46
+ ## Pairing with other skills
47
+
48
+ - **[`feature-doc`](../feature-doc/SKILL.md)** — runs *before*. The performance AC it pins is what this skill verifies.
49
+ - **[`tdd`](../tdd/SKILL.md)** — runs *alongside* for functional correctness; `bench` covers the perf AC tests can't assert.
50
+ - **[`prod-ready`](../prod-ready/SKILL.md)** — runs *after*. The benchmark result feeds the pre-merge gate for performance-sensitive work.
33
51
 
34
52
  ## Done when
35
53
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: bootstrap
3
- description: Initializes a greenfield repository. Creates the docs/ directory, the initial CONTEXT.md, and the first ADR. Triggered by phrases like "new project", "initialize", "bootstrap".
3
+ description: Initializes a greenfield repository creates the docs/ directory, the initial CONTEXT.md, an optional CONVENTIONS.md, and the first ADR. Triggered by phrases like "new project", "initialize", "bootstrap". Skip when docs/CONTEXT.md and a docs/ structure already exist. Pairs with `feature-doc`, `system-design`, and `improve-codebase-architecture` (which defer here for greenfield setup, per BOOTSTRAP.md) and `grill-plan` (bootstrap mode seeds CONTEXT.md / ADRs lazily during grilling).
4
4
  ---
5
5
 
6
6
  # Bootstrap
@@ -22,24 +22,35 @@ Starting from a blank slate often leads to inconsistent documentation structure.
22
22
 
23
23
  ## Process
24
24
 
25
- ### 1. Initialize docs/
25
+ Everything below is created **lazily** — only when first needed (see [`BOOTSTRAP.md`](BOOTSTRAP.md)). No file or directory is required to pre-exist.
26
26
 
27
- Create the standard directory structure:
28
- - `docs/`
29
- - `docs/adr/`
30
- - `docs/features/`
31
- - `docs/research/`
27
+ ### 1. Seed CONTEXT.md
32
28
 
33
- ### 2. Seed CONTEXT.md
29
+ Ask the user for 3-7 core domain terms. Create `docs/CONTEXT.md` using the canonical format ([`../formats/CONTEXT-FORMAT.md`](../formats/CONTEXT-FORMAT.md)). The `docs/` directory comes into being with it.
34
30
 
35
- Ask the user for 3-7 core domain terms. Create `docs/CONTEXT.md` using the canonical format.
31
+ ### 2. Seed CONVENTIONS.md (optional)
36
32
 
37
- ### 3. Record ADR-0000
33
+ If the repo has decided structure / process rules worth recording (branch model, commit style, file naming), create `docs/CONVENTIONS.md` using [`../formats/CONVENTION-FORMAT.md`](../formats/CONVENTION-FORMAT.md). Skip if nothing is decided yet — like everything else, it's created lazily.
38
34
 
39
- If any major architectural decisions are made during initialization, record them in `docs/adr/0000-architectural-overview.md`.
35
+ ### 3. Record the first ADR (only if warranted)
36
+
37
+ If a major architectural decision is made during initialization — and it meets all three [`ADR-FORMAT`](../formats/ADR-FORMAT.md) criteria (hard-to-reverse / surprising / real trade-off) — record it as `docs/adr/0001-<slug>.md`. ADR numbering starts at `0001` and is monotonic; create `docs/adr/` lazily with it.
38
+
39
+ Other directories (`docs/features/`, `docs/research/`, …) are created by the skills that first write into them, not here.
40
+
41
+ ## Anti-patterns
42
+
43
+ - **Eager scaffolding.** Creating empty `docs/features/`, `docs/research/`, etc. up front — directories are born when a skill first writes into them, not here.
44
+ - **Implementation terms in `CONTEXT.md`.** Seeding the glossary with framework / storage nouns instead of the domain terms a domain expert would recognise.
45
+ - **Forcing ADR 0001.** Writing an ADR when no decision meets all three criteria (hard-to-reverse / surprising / real trade-off) — skip it; ADRs are earned.
46
+
47
+ ## Pairing with other skills
48
+
49
+ - **[`feature-doc`](../feature-doc/SKILL.md)** / **[`system-design`](../system-design/SKILL.md)** / **[`improve-codebase-architecture`](../improve-codebase-architecture/SKILL.md)** — defer *here* for greenfield setup rather than re-explaining the rules (see [`BOOTSTRAP.md`](BOOTSTRAP.md)).
50
+ - **[`grill-plan`](../grill-plan/SKILL.md)** — runs *after* in bootstrap mode, seeding `CONTEXT.md` / ADRs lazily as terms and decisions crystallise.
40
51
 
41
52
  ## Done when
42
53
 
43
- - `docs/` directory exists with the required subdirectories.
44
54
  - `docs/CONTEXT.md` is seeded with core domain terms.
45
- - (Optional) `docs/adr/0000-architectural-overview.md` exists.
55
+ - (Optional) `docs/CONVENTIONS.md` exists if the repo has decided structure / process rules.
56
+ - (Optional) `docs/adr/0001-<slug>.md` exists if a qualifying decision was made.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: caveman
3
- description: Ultra-concise communication utility for token optimization. Use when the user mentions "caveman mode", "be concise", "save tokens", or "ooga booga". Strips articles, pleasantries, and filler words to maximize efficiency. Skip when the user explicitly requests professional or detailed explanations.
3
+ description: Ultra-concise communication utility for token optimization. Use when the user mentions "caveman mode", "be concise", "save tokens", or "ooga booga". Strips articles, pleasantries, and filler words to maximize efficiency. Skip when the user explicitly requests professional or detailed explanations. Pairs with `simplify` (the quality / efficiency kin) and applies inside `tdd-rounds` Builder reports.
4
4
  ---
5
5
 
6
6
  # Caveman Mode (Token Optimizer)
@@ -12,6 +12,8 @@ Principles that make code easier to understand, change, and test.
12
12
  3. **Illegal states unrepresentable** — encode runtime invariants in the type system.
13
13
  4. **Functional core, imperative shell** — pure logic at the center, side effects at the edges.
14
14
 
15
+ The architecture vocabulary here — **module**, **interface**, **depth** (deep / shallow), **seam** — is canonical in [`LANGUAGE.md`](../LANGUAGE.md); this skill teaches how to *apply* it and links there rather than redefining it.
16
+
15
17
  ## When to use
16
18
 
17
19
  - Before writing a new module, class, or public function.
@@ -116,6 +118,13 @@ If TDD feels painful — tests need elaborate setup, mocks of internals, or peek
116
118
  - `design` decides *what the interface should be*.
117
119
  - `tdd` decides *how to build it test-first*.
118
120
 
121
+ ## Pairing with other skills
122
+
123
+ - **[`system-design`](../system-design/SKILL.md)** — runs *before*. It says which modules should exist; `design` shapes each one's interface.
124
+ - **[`tdd`](../tdd/SKILL.md)** — runs *after* (see *How this connects to TDD* above). `design` decides the interface; `tdd` builds it test-first.
125
+ - **[`tdd-rounds`](../tdd-rounds/SKILL.md)** — *invokes* `design` on rounds that introduce a new package or non-trivial interface.
126
+ - **[`improve-codebase-architecture`](../improve-codebase-architecture/SKILL.md)** — the *brownfield* sibling: same vocabulary, but for deepening existing modules rather than shaping new ones.
127
+
119
128
  ## Done when
120
129
 
121
130
  The interface is small enough that you can describe it in one sentence, and the testability rules hold:
@@ -134,4 +143,4 @@ Most of the time `design` is guidance only — the shape lives in the code that
134
143
  - The interface decisions are load-bearing for downstream rounds of `tdd-rounds`.
135
144
  - A `prod-ready` reviewer will need to verify "module map / public-interface signatures / test boundaries" against something explicit (per [prod-ready Section 7](../prod-ready/SKILL.md)).
136
145
 
137
- When captured, save as a sibling to the feature doc: `docs/features/<feature>.design.md`, opening with OKF frontmatter (`type: design`) per [`skills/formats/OKF.md`](../formats/OKF.md). Skip when the interface is small enough that the code is the design.
146
+ When captured, save as a sibling to the feature doc: `docs/features/<feature>.design.md` copy [`templates/design-note.md`](templates/design-note.md), which opens with OKF frontmatter (`type: design`) per [`skills/formats/OKF.md`](../formats/OKF.md). Skip when the interface is small enough that the code is the design.
@@ -0,0 +1,47 @@
1
+ ---
2
+ type: design
3
+ title: "<Feature Name> — design note"
4
+ description: <one sentence — the module shape this note pins down>
5
+ tags: [<area>, design]
6
+ timestamp: YYYY-MM-DD
7
+ ---
8
+
9
+ <!-- Frontmatter is OKF per skills/formats/OKF.md (`type: design`).
10
+ Save as a sibling to the contract: docs/features/<name>.design.md. -->
11
+
12
+ # <Feature Name> — design note
13
+
14
+ The module shape decided before code. Sibling to the contract (`<name>.md`); the round-by-round log lives in `<name>.state.md`.
15
+
16
+ ## Modules
17
+
18
+ | Module | Responsibility (one sentence) | Depth |
19
+ | --- | --- | --- |
20
+ | `<name>` | <what it does> | deep / shallow-but-justified |
21
+
22
+ ## Public interface
23
+
24
+ What every caller and test must know — types, invariants, error modes, ordering, required config. Not just the signatures.
25
+
26
+ ```
27
+ <the signature(s) — the seam callers cross>
28
+ ```
29
+
30
+ ## What's hidden behind the seam
31
+
32
+ The complexity the interface keeps out of callers' heads. If nothing is hidden, the module is shallow — reconsider the shape.
33
+
34
+ ## Interface options considered
35
+
36
+ - **Option A — <name>:** <one line>. Chosen / rejected because <reason>.
37
+ - **Option B — <name>:** <one line>. Chosen / rejected because <reason>.
38
+
39
+ ## Test boundaries
40
+
41
+ - What is exercised through the public interface (the seam).
42
+ - Which collaborators are real vs faked, and where the fake sits.
43
+
44
+ ## Related
45
+
46
+ - Contract: [`<name>.md`](./<name>.md)
47
+ - ADRs: [`ADR-NNNN`](../adr/NNNN-slug.md) — load-bearing constraints this shape respects
@@ -66,13 +66,6 @@ STRONG
66
66
 
67
67
  The strong list translates 1:1 into tests. The weak list translates into vibes.
68
68
 
69
- ## Definition of Done for the doc
70
-
71
- - [ ] Problem stated in 2–3 sentences.
72
- - [ ] At least one acceptance criterion in Given / When / Then form.
73
- - [ ] Non-goals listed (or explicitly "none — see scope in Problem").
74
- - [ ] Reviewed by at least one other person.
75
-
76
69
  ## Anti-patterns
77
70
 
78
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.
@@ -91,6 +84,17 @@ The strong list translates 1:1 into tests. The weak list translates into vibes.
91
84
  - **`security-review`** — runs *alongside* `tdd` when the feature is surface-changing (new entry point, identity flow, sensitive data path).
92
85
  - **`prod-ready`** — runs after green, against this doc. Section 7 catches doc-drift if behavior shifted during implementation.
93
86
 
87
+ ## Done when
88
+
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`**.
90
+ - `docs/features/<short-name>.md` exists with all four required sections.
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.
93
+ - ACs are testable Given / When / Then statements.
94
+ - Non-Goals is non-empty (or explicitly "none — see scope in Problem").
95
+ - One reviewer has signed off.
96
+ - Status is `Approved` and the next skill (`tdd` / `tdd-rounds` / `grill-plan` / `security-review`) is named.
97
+
94
98
  ## Handoff
95
99
 
96
100
  Once the doc is reviewed and ACs are stable:
@@ -101,13 +105,3 @@ Once the doc is reviewed and ACs are stable:
101
105
  - Project has `CONTEXT.md` and/or ADRs → run [`grill-plan`](../grill-plan/SKILL.md) to stress-test against the existing model.
102
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).
103
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`.
104
-
105
- ## Done when
106
-
107
- - 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`**.
108
- - `docs/features/<short-name>.md` exists with all four required sections.
109
- - The doc opens with OKF frontmatter (`type: feature`) per [`skills/formats/OKF.md`](../formats/OKF.md).
110
- - ACs are testable Given / When / Then statements.
111
- - Non-Goals is non-empty (or explicitly "none — see scope in Problem").
112
- - One reviewer has signed off.
113
- - Status is `Approved` and the next skill (`tdd` / `tdd-rounds` / `grill-plan` / `security-review`) is named.
@@ -61,7 +61,7 @@ Related code lives close together. Don't split a system by *type of code* (`cont
61
61
 
62
62
  ## Principle 6: Comments earn their keep
63
63
 
64
- **The bar:** [`STYLE-comments.md`](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.
65
65
 
66
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.
67
67
 
@@ -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.
@@ -10,7 +10,7 @@ This is a **shared reference**, run from three places with the same checks but a
10
10
 
11
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
12
 
13
- ## The six checks
13
+ ## The seven checks
14
14
 
15
15
  One question per doc type: *did this work change X? Then update Y.*
16
16
 
@@ -20,6 +20,7 @@ One question per doc type: *did this work change X? Then update Y.*
20
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
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
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.
23
24
 
24
25
  ## ADR consistency (read alongside check 1)
25
26
 
@@ -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`
@@ -3,6 +3,10 @@ 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
4
  ---
5
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
+
6
10
  ## When to use
7
11
 
8
12
  - A direction has been picked (post-`investigate` or post-`feature-doc`) and you want to pressure-test it against the existing model.
@@ -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