@heihei0299/matt-skills 1.3.2 → 1.5.2

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 (139) hide show
  1. package/.agents/skills/ci-guard/SKILL.md +94 -0
  2. package/.agents/skills/ci-guard/agents/openai.yaml +5 -0
  3. package/.agents/skills/commit-check/SKILL.md +13 -18
  4. package/.agents/skills/diagnose-fix/SKILL.md +0 -1
  5. package/.agents/skills/grill-to-spec/SKILL.md +0 -3
  6. package/.agents/skills/instance-test/SKILL.md +36 -27
  7. package/.agents/skills/instance-test/agents/openai.yaml +1 -1
  8. package/.agents/skills/instance-test/references/instances.md +63 -36
  9. package/.agents/skills/scaffold-functional-test/SKILL.md +75 -0
  10. package/.agents/skills/scaffold-functional-test/agents/openai.yaml +5 -0
  11. package/.agents/skills/tdd-implement/SKILL.md +0 -1
  12. package/.agents/skills/tdd-implement/references/orchestration.md +2 -2
  13. package/.agents/skills/tdd-implement/references/stages.md +2 -7
  14. package/README.md +55 -54
  15. package/bin/cli.js +216 -64
  16. package/config/engineering.json +20 -0
  17. package/config/proprietary.json +8 -1
  18. package/package.json +2 -1
  19. package/scripts/sync-upstream.js +69 -43
  20. package/template/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +55 -0
  21. package/template/.agents/skills/ask-matt/SKILL.md +90 -0
  22. package/template/.agents/skills/ask-matt/agents/openai.yaml +5 -0
  23. package/template/.agents/skills/ci-guard/SKILL.md +94 -0
  24. package/template/.agents/skills/ci-guard/agents/openai.yaml +5 -0
  25. package/template/.agents/skills/code-review/SKILL.md +87 -0
  26. package/template/.agents/skills/code-review/agents/openai.yaml +3 -0
  27. package/template/.agents/skills/codebase-design/DEEPENING.md +37 -0
  28. package/template/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  29. package/template/.agents/skills/codebase-design/SKILL.md +114 -0
  30. package/template/.agents/skills/codebase-design/agents/openai.yaml +3 -0
  31. package/template/{.opencode → .agents}/skills/commit-check/SKILL.md +13 -18
  32. package/template/{.pi → .agents}/skills/diagnose-fix/SKILL.md +0 -1
  33. package/template/.agents/skills/diagnosing-bugs/SKILL.md +138 -0
  34. package/template/.agents/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  35. package/template/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
  36. package/template/.agents/skills/domain-modeling/ADR-FORMAT.md +47 -0
  37. package/template/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  38. package/template/.agents/skills/domain-modeling/SKILL.md +74 -0
  39. package/template/.agents/skills/domain-modeling/agents/openai.yaml +3 -0
  40. package/template/.agents/skills/grill-me/SKILL.md +7 -0
  41. package/template/.agents/skills/grill-me/agents/openai.yaml +5 -0
  42. package/template/{.pi → .agents}/skills/grill-to-spec/SKILL.md +0 -3
  43. package/template/.agents/skills/grill-with-docs/SKILL.md +7 -0
  44. package/template/.agents/skills/grill-with-docs/agents/openai.yaml +5 -0
  45. package/template/.agents/skills/grilling/SKILL.md +28 -0
  46. package/template/.agents/skills/grilling/agents/openai.yaml +3 -0
  47. package/template/.agents/skills/handoff/SKILL.md +16 -0
  48. package/template/.agents/skills/handoff/agents/openai.yaml +5 -0
  49. package/template/.agents/skills/implement/SKILL.md +15 -0
  50. package/template/.agents/skills/implement/agents/openai.yaml +5 -0
  51. package/template/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
  52. package/template/.agents/skills/improve-codebase-architecture/SKILL.md +71 -0
  53. package/template/.agents/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
  54. package/template/.agents/skills/instance-test/SKILL.md +70 -0
  55. package/template/.agents/skills/instance-test/agents/openai.yaml +5 -0
  56. package/template/.agents/skills/instance-test/references/instances.md +75 -0
  57. package/template/.agents/skills/prototype/LOGIC.md +67 -0
  58. package/template/.agents/skills/prototype/SKILL.md +26 -0
  59. package/template/.agents/skills/prototype/UI.md +112 -0
  60. package/template/.agents/skills/prototype/agents/openai.yaml +3 -0
  61. package/template/.agents/skills/research/SKILL.md +12 -0
  62. package/template/.agents/skills/research/agents/openai.yaml +3 -0
  63. package/template/.agents/skills/resolving-merge-conflicts/SKILL.md +14 -0
  64. package/template/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +3 -0
  65. package/template/.agents/skills/scaffold-functional-test/SKILL.md +75 -0
  66. package/template/.agents/skills/scaffold-functional-test/agents/openai.yaml +5 -0
  67. package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +116 -0
  68. package/template/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +5 -0
  69. package/template/.agents/skills/setup-matt-pocock-skills/domain.md +51 -0
  70. package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +45 -0
  71. package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +46 -0
  72. package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +30 -0
  73. package/template/.agents/skills/setup-matt-pocock-skills/triage-labels.md +15 -0
  74. package/template/.agents/skills/tdd/SKILL.md +38 -0
  75. package/template/.agents/skills/tdd/agents/openai.yaml +3 -0
  76. package/template/.agents/skills/tdd/mocking.md +59 -0
  77. package/template/.agents/skills/tdd/tests.md +77 -0
  78. package/template/{.opencode → .agents}/skills/tdd-implement/SKILL.md +0 -1
  79. package/template/{.pi → .agents}/skills/tdd-implement/references/orchestration.md +2 -2
  80. package/template/{.opencode → .agents}/skills/tdd-implement/references/stages.md +2 -7
  81. package/template/.agents/skills/teach/GLOSSARY-FORMAT.md +35 -0
  82. package/template/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  83. package/template/.agents/skills/teach/MISSION-FORMAT.md +31 -0
  84. package/template/.agents/skills/teach/RESOURCES-FORMAT.md +32 -0
  85. package/template/.agents/skills/teach/SKILL.md +140 -0
  86. package/template/.agents/skills/teach/agents/openai.yaml +5 -0
  87. package/template/.agents/skills/to-questionnaire/SKILL.md +54 -0
  88. package/template/.agents/skills/to-questionnaire/agents/openai.yaml +5 -0
  89. package/template/.agents/skills/to-spec/SKILL.md +75 -0
  90. package/template/.agents/skills/to-spec/agents/openai.yaml +5 -0
  91. package/template/.agents/skills/to-tickets/SKILL.md +105 -0
  92. package/template/.agents/skills/to-tickets/agents/openai.yaml +5 -0
  93. package/template/.agents/skills/triage/AGENT-BRIEF.md +207 -0
  94. package/template/.agents/skills/triage/OUT-OF-SCOPE.md +105 -0
  95. package/template/.agents/skills/triage/SKILL.md +112 -0
  96. package/template/.agents/skills/triage/agents/openai.yaml +5 -0
  97. package/template/.agents/skills/wait-what/SKILL.md +7 -0
  98. package/template/.agents/skills/wait-what/agents/openai.yaml +5 -0
  99. package/template/.agents/skills/wayfinder/SKILL.md +128 -0
  100. package/template/.agents/skills/wayfinder/agents/openai.yaml +5 -0
  101. package/template/.agents/skills/wizard/SKILL.md +44 -0
  102. package/template/.agents/skills/wizard/agents/openai.yaml +3 -0
  103. package/template/.agents/skills/wizard/template.sh +204 -0
  104. package/template/.agents/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
  105. package/template/.agents/skills/writing-for-agents/SKILL.md +81 -0
  106. package/template/.agents/skills/writing-for-agents/agents/openai.yaml +3 -0
  107. package/template/.opencode/CONTEXT.md +8 -8
  108. package/template/.opencode/skills/.gitkeep +0 -0
  109. package/template/.opencode/skills/README.md +4 -0
  110. package/template/.pi/CONTEXT.md +8 -8
  111. package/template/.pi/skills/.gitkeep +0 -0
  112. package/template/.pi/skills/README.md +4 -0
  113. package/template/AGENTS.md +5 -8
  114. package/template/.opencode/skills/diagnose-fix/SKILL.md +0 -66
  115. package/template/.opencode/skills/grill-to-spec/SKILL.md +0 -83
  116. package/template/.opencode/skills/instance-test/SKILL.md +0 -61
  117. package/template/.opencode/skills/instance-test/agents/openai.yaml +0 -5
  118. package/template/.opencode/skills/instance-test/references/instances.md +0 -48
  119. package/template/.opencode/skills/tdd-implement/references/orchestration.md +0 -136
  120. package/template/.pi/skills/commit-check/SKILL.md +0 -67
  121. package/template/.pi/skills/commit-check/agents/openai.yaml +0 -5
  122. package/template/.pi/skills/commit-check/scripts/scan-sensitive.sh +0 -36
  123. package/template/.pi/skills/diagnose-fix/agents/openai.yaml +0 -5
  124. package/template/.pi/skills/diagnose-fix/references/anti-patterns.md +0 -20
  125. package/template/.pi/skills/grill-to-spec/agents/openai.yaml +0 -5
  126. package/template/.pi/skills/grill-to-spec/references/rules.md +0 -33
  127. package/template/.pi/skills/instance-test/SKILL.md +0 -61
  128. package/template/.pi/skills/instance-test/agents/openai.yaml +0 -5
  129. package/template/.pi/skills/instance-test/references/instances.md +0 -48
  130. package/template/.pi/skills/tdd-implement/SKILL.md +0 -48
  131. package/template/.pi/skills/tdd-implement/agents/openai.yaml +0 -5
  132. package/template/.pi/skills/tdd-implement/references/stages.md +0 -316
  133. /package/template/{.opencode → .agents}/skills/commit-check/agents/openai.yaml +0 -0
  134. /package/template/{.opencode → .agents}/skills/commit-check/scripts/scan-sensitive.sh +0 -0
  135. /package/template/{.opencode → .agents}/skills/diagnose-fix/agents/openai.yaml +0 -0
  136. /package/template/{.opencode → .agents}/skills/diagnose-fix/references/anti-patterns.md +0 -0
  137. /package/template/{.opencode → .agents}/skills/grill-to-spec/agents/openai.yaml +0 -0
  138. /package/template/{.opencode → .agents}/skills/grill-to-spec/references/rules.md +0 -0
  139. /package/template/{.opencode → .agents}/skills/tdd-implement/agents/openai.yaml +0 -0
@@ -0,0 +1,112 @@
1
+ # UI Prototype
2
+
3
+ Generate **several radically different UI variations** on a single route, switchable from a floating bottom bar. The user flips between variants in the browser, picks one (or steals bits from each), then throws the rest away.
4
+
5
+ If the question is about logic/state rather than what something looks like, this is the wrong branch. Use [LOGIC.md](LOGIC.md).
6
+
7
+ ## When this is the right shape
8
+
9
+ - "What should this page look like?"
10
+ - "I want to see a few options for this dashboard before committing."
11
+ - "Try a different layout for the settings screen."
12
+ - Any time the user would otherwise spend a day picking between three vague mockups in their head.
13
+
14
+ ## Two sub-shapes: strongly prefer sub-shape A
15
+
16
+ A UI prototype is much easier to judge when it's **butting up against the rest of the app**: real header, real sidebar, real data, real density. A throwaway route on its own is a vacuum: every variant looks fine in isolation. Default to sub-shape A whenever there's a plausible existing page to host the variants. Only reach for sub-shape B if the prototype genuinely has no nearby home.
17
+
18
+ ### Sub-shape A: adjustment to an existing page (preferred)
19
+
20
+ The route already exists. Variants are rendered **on the same route**, gated by a `?variant=` URL search param. The existing data fetching, params, and auth all stay. Only the rendering swaps. This is the default; pick it unless there's a specific reason not to.
21
+
22
+ If the prototype is for something that doesn't yet have a page but *would naturally live inside one* (a new section of the dashboard, a new card on the settings screen, a new step in an existing flow), it's still sub-shape A. Mount the variants inside the host page.
23
+
24
+ ### Sub-shape B: a new page (last resort)
25
+
26
+ Only use this when the thing being prototyped genuinely has no existing page to live inside (e.g. an entirely new top-level surface, or a flow that can't be embedded anywhere sensible).
27
+
28
+ Create a **throwaway route** following whatever routing convention the project already uses. Don't invent a new top-level structure. Name it so it's obviously a prototype (e.g. include the word `prototype` in the path or filename). Same `?variant=` pattern.
29
+
30
+ Before committing to sub-shape B, sanity-check: is there really no existing page this could be embedded in? An empty route hides design problems that a populated one would expose.
31
+
32
+ In both sub-shapes the floating bottom bar is identical.
33
+
34
+ ## Process
35
+
36
+ ### 1. State the question and pick N
37
+
38
+ Default to **3 variants**. More than 5 stops being radically different and starts being noise, so cap there.
39
+
40
+ Write down the plan in one line, in the prototype's location or a top-of-file comment:
41
+
42
+ > "Three variants of the settings page, switchable via `?variant=`, on the existing `/settings` route."
43
+
44
+ This works whether the user is here to push back or not.
45
+
46
+ ### 2. Generate radically different variants
47
+
48
+ Draft each variant. Hold each one to:
49
+
50
+ - The page's purpose and the data it has access to.
51
+ - The project's component library / styling system (TailwindCSS, shadcn, MUI, plain CSS, whatever).
52
+ - A clear exported component name, e.g. `VariantA`, `VariantB`, `VariantC`.
53
+
54
+ Variants must be **structurally different**: different layout, different information hierarchy, different primary affordance, not just different colours. Three slightly-tweaked card grids isn't a UI prototype, it's wallpaper. If two drafts come out too similar, redo one with explicit "do not use a card grid" guidance.
55
+
56
+ ### 3. Wire them together
57
+
58
+ Create a single switcher component on the route:
59
+
60
+ ```tsx
61
+ // pseudo-code, adapt to the project's framework
62
+ const variant = searchParams.get('variant') ?? 'A';
63
+ return (
64
+ <>
65
+ {variant === 'A' && <VariantA {...data} />}
66
+ {variant === 'B' && <VariantB {...data} />}
67
+ {variant === 'C' && <VariantC {...data} />}
68
+ <PrototypeSwitcher variants={['A','B','C']} current={variant} />
69
+ </>
70
+ );
71
+ ```
72
+
73
+ For sub-shape A (existing page): keep all the existing data fetching above the switcher; only the rendered subtree changes per variant.
74
+
75
+ For sub-shape B (new page): the throwaway route under `/prototype/<name>` mounts the same switcher.
76
+
77
+ ### 4. Build the floating switcher
78
+
79
+ A small fixed-position bar at the bottom-centre of the screen with three pieces:
80
+
81
+ - **Left arrow**: cycles to the previous variant (wraps around).
82
+ - **Variant label**: shows the current variant key and, if the variant exports a name, that name too. e.g. `B (Sidebar layout)`.
83
+ - **Right arrow**: cycles forward (wraps around).
84
+
85
+ Behaviour:
86
+
87
+ - Clicking an arrow updates the URL search param (use the framework's router, e.g. `router.replace` on Next, `navigate` on React Router, etc) so the variant is shareable and reload-stable.
88
+ - Keyboard: `←` and `→` arrow keys also cycle. Don't intercept arrow keys when an `<input>`, `<textarea>`, or `[contenteditable]` is focused.
89
+ - Visually distinct from the page (e.g. high-contrast pill, subtle shadow) so it's obviously not part of the design being evaluated.
90
+ - Hidden in production builds: gate on `process.env.NODE_ENV !== 'production'` or an equivalent check, so a stray prototype merge can't ship the bar to users.
91
+
92
+ Put the switcher in a single shared component so both sub-shapes can reuse it. Locate it wherever shared UI lives in the project.
93
+
94
+ ### 5. Hand it over
95
+
96
+ Surface the URL (and the `?variant=` keys). The user will flip through whenever they get to it. The interesting feedback is usually **"I want the header from B with the sidebar from C"**, which is the actual design they want.
97
+
98
+ ### 6. Capture the answer and clean up
99
+
100
+ Once a variant has won, capture the answer (which variant and why), then capture the prototype the way the [SKILL](SKILL.md) describes. Fold the winner into the real code and move the rest onto the throwaway branch, not into main:
101
+
102
+ - **Sub-shape A**: fold the winner into the existing page; drop the losing variants and the switcher from main.
103
+ - **Sub-shape B**: promote the winning variant to a real route; drop the throwaway route and the switcher from main.
104
+
105
+ The full set of variants is the primary source, so it lands on the throwaway branch, not the bin, since variant components and the switcher left in the main branch rot fast and confuse the next reader.
106
+
107
+ ## Anti-patterns
108
+
109
+ - **Variants that differ only in colour or copy.** That's a tweak, not a prototype. Real variants disagree about structure.
110
+ - **Sharing too much code between variants.** A shared `<Header>` is fine; a shared `<Layout>` defeats the point. Each variant should be free to throw out the layout.
111
+ - **Wiring variants to real mutations.** Read-only prototypes are fine. If a variant needs to mutate, point it at a stub: the question is "what should this look like", not "does the backend work".
112
+ - **Promoting the prototype directly to production.** The variant code was written under prototype constraints (no tests, minimal error handling). Rewrite it properly when you fold it in.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Prototype"
3
+ short_description: "Prototype to answer a design question"
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: research
3
+ description: Investigate a question against high-trust primary sources and capture the findings as a Markdown file in the repo. Use when the user wants a topic researched, docs or API facts gathered, or reading legwork delegated to a background agent.
4
+ ---
5
+
6
+ Spin up a **background agent** to do the research, so you keep working while it reads.
7
+
8
+ Its job:
9
+
10
+ 1. Investigate the question against **primary sources** (official docs, source code, specs, first-party APIs), not a secondary write-up of them. Follow every claim back to the source that owns it.
11
+ 2. Write the findings to a single Markdown file, citing each claim's source.
12
+ 3. Save it where the repo already keeps such notes; match the existing convention, and if there is none, put it somewhere sensible and say where.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Research"
3
+ short_description: "Research from high-trust sources"
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: resolving-merge-conflicts
3
+ description: "Use when you need to resolve an in-progress git merge/rebase conflict."
4
+ ---
5
+
6
+ 1. **See the current state** of the merge/rebase. Check git history, and the conflicting files.
7
+
8
+ 2. **Find the primary sources** for each conflict. Understand deeply why each change was made, and what the original intent was. Read the commit messages, check the PRs, check original issues/tickets.
9
+
10
+ 3. **Resolve each hunk.** Preserve both intents where possible. Where incompatible, pick the one matching the merge's stated goal and note the trade-off. Do **not** invent new behaviour. Always resolve; never `--abort`.
11
+
12
+ 4. Discover the project's **automated checks** and run them, typically typecheck, then tests, then format. Fix anything the merge broke.
13
+
14
+ 5. **Finish the merge/rebase.** Stage everything and commit. If rebasing, continue the rebase process until all commits are rebased.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "Resolving Merge Conflicts"
3
+ short_description: "Resolve merge and rebase conflicts"
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: scaffold-functional-test
3
+ disable-model-invocation: false
4
+ description: "Scaffold a repo-specific functional-test skill from spec — use when the user wants to generate a customized functional-test suite/skill from a spec/README/help; not for running tests (use instance-test) nor for TDD (use tdd-implement)"
5
+ ---
6
+
7
+ # Scaffold Functional Test
8
+
9
+ 从本仓库的 spec 自动脚手架出**仓库专属的功能测试 skill**。本技能为**非 Long-Horizon 轻量 skill**(一次性 scaffold,不做多 seam 红绿循环),一次性完成「读 spec → 推导实例 → 落盘 skill → 自验证」闭环。术语定义见 `CONTEXT.md`。
10
+
11
+ ## 产出物
12
+
13
+ - 定制 skill 目录:`.agents/skills/<repo>-functional-test/`(含 `SKILL.md` + `references/instances.md` + 可选 `scripts/run.sh`)
14
+ - 指纹:`spec hash` + `generatedAt` 写入生成物头部,用于后续执行前校验
15
+ - 保护:`<!-- manual -->` 标记段不被覆盖
16
+
17
+ 生成物纳入 git,可回归复用,不进入 `template/` 再分发(生成器本身才随 Template Snapshot 分发)。
18
+
19
+ ## Steps
20
+
21
+ ### ① 采集 Spec
22
+
23
+ 解析用户传入的 spec 路径,默认 `.scratch/<feature>/spec.md`。
24
+
25
+ - 若 spec 存在:读取 `CONTEXT.md`/`docs/adr/` 相关术语与决策,提取待覆盖行为清单(以验收标准为锚点)。
26
+ - 若 spec 不存在:回退到 `README` + `--help` 输出倒推行为清单,但必须进入 Step ② 的清单确认关卡,不静默臆测。
27
+
28
+ 完成:待覆盖行为清单已固定,无未澄清歧义。
29
+
30
+ ### ② 推导实例
31
+
32
+ 按混合推导策略生成实例草案:
33
+
34
+ - 以验收标准为锚点,需求/接口/边界为补充,可为 spec 未显式写的隐含行为(如 `--help` 文案、错误码、幂等性)补实例,但每条实例必须标注**溯源**(spec 章节/行号或 `README/--help` 来源),无溯源的实例视为幻觉需删除。
35
+ - 每实例声明**受控扩展模型**:必选 `prompt/command/expected files/content/expected stdout phrases/expected exit code`,可选 `setup/env/timeout/type/teardown`,默认 `type: cli`。
36
+ - **强制门禁**:实例清单必须与用户确认后才进入 Step ③;无确认不落盘。
37
+
38
+ 完成:实例清单已获用户确认,每实例含溯源与完整四元组。
39
+
40
+ ### ③ 脚手架落盘
41
+
42
+ 按受控扩展模型写入定制 skill 目录:
43
+
44
+ - `SKILL.md`:执行语义(见下节「执行语义」)
45
+ - `references/instances.md`:实例集(含溯源、必选+可选字段、头部 `spec hash` + `generatedAt`)
46
+ - 不覆盖 `<!-- manual -->` 保护段;覆盖式更新需经用户确认;重生成时先给出 diff 建议,用户确认后才应用。
47
+
48
+ 完成:定制 skill 目录已落盘,指纹正确,人工段受保护。
49
+
50
+ ### ④ 自验证
51
+
52
+ 落盘后立即按实例执行语义串行执行一轮实例集作自验证:
53
+
54
+ - `mktemp -d` 隔离(或项目支持的 `git worktree` / `--dest`),单线程串行,不并行。
55
+ - 每实例捕获 stdout/stderr 与 exit code,按 `test -f`/`grep -q`/`diff` 对比判定 `PASS`/`FAIL`,单 FAIL 不阻断后续。
56
+ - 对话内输出 `PASS m/n` + per-instance evidence(`expected vs actual diff` + `run dir`),失败不回滚生成物但给出 gap 供迭代 `regenerate`。
57
+ - 成功默认清理临时目录、失败默认保留(`--keep` 保留全部);`--report` 显式开启才落盘报告文件。
58
+
59
+ 完成:自验证已执行,对话内汇总完成,证据可复现。
60
+
61
+ ## 执行语义(生成物复用)
62
+
63
+ 生成物本身的执行语义与 `instance-test` 一致:`mktemp -d` 串行、`PASS m/n` 汇总、证据含 `expected vs actual diff` + `run dir`。执行前校验 `spec hash` 指纹:若当前 spec 已变更,提示「spec 已变更,建议重跑 scaffold-functional-test」但不自动覆盖,需用户显式确认才 regenerate。
64
+
65
+ ## 不做什么
66
+
67
+ - 不替代 `tdd`/`tdd-implement` 的红绿循环与 `commit-check` 门禁
68
+ - 不自动织入每次 `tdd-implement` 或 `commit-check`;仅 `tdd-implement --with-functional` 显式 opt-in
69
+
70
+ ## 引用
71
+
72
+ - 领域术语:`CONTEXT.md`
73
+ - 技能设计规则:`docs/agents/skill-design.md`
74
+ - 示范产物:`.agents/skills/instance-test/`(本仓库专属,见其 SKILL.md)
75
+ - Issue tracker:`docs/agents/issue-tracker.md`
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Scaffold Functional Test"
3
+ short_description: "Scaffold a repo-specific functional-test skill from spec — not for running tests nor TDD"
4
+ policy:
5
+ allow_implicit_invocation: true
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: setup-matt-pocock-skills
3
+ description: "Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Setup Matt Pocock's Skills
8
+
9
+ Scaffold the per-repo configuration that the engineering skills assume:
10
+
11
+ - **Issue tracker**: where issues live (GitHub by default; local markdown is also supported out of the box)
12
+ - **Triage labels**: the strings used for the five canonical triage roles
13
+ - **Domain docs**: where `CONTEXT.md` and ADRs live, and the consumer rules for reading them
14
+
15
+ This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
16
+
17
+ ## Process
18
+
19
+ ### 1. Explore
20
+
21
+ Look at the current repo to understand its starting state. Read whatever exists; don't assume:
22
+
23
+ - `git remote -v` and `.git/config`: is this a GitHub repo? Which one?
24
+ - `AGENTS.md` and `CLAUDE.md` at the repo root: does either exist? Is there already an `## Agent skills` section in either?
25
+ - `CONTEXT.md` and `CONTEXT-MAP.md` at the repo root
26
+ - `docs/adr/` and any `src/*/docs/adr/` directories
27
+ - `docs/agents/`: does this skill's prior output already exist?
28
+ - `.scratch/`: a sign that a local-markdown issue tracker convention is already in use
29
+ - Is the `triage` skill installed? (a `triage` skill folder alongside this one, or `triage` in your available skills.) This decides whether Section B runs at all.
30
+ - Monorepo signals: a `pnpm-workspace.yaml`, a `workspaces` field in `package.json`, or a populated `packages/*` with its own `src/`. These are present only in a genuinely large multi-package repo; their absence means single-context, which is almost every repo.
31
+
32
+ ### 2. Present findings and ask
33
+
34
+ Summarise what's present and what's missing. Then take the sections in order. One section, one answer, then the next.
35
+
36
+ Lead each section with the recommended answer so the user can accept it in a word. Give a one-line explainer only when the choice genuinely branches; skip the section entirely when exploration already settled it (Section B when `triage` isn't installed, Section C when there's no monorepo).
37
+
38
+ **Section A: Issue tracker.**
39
+
40
+ > Explainer: The "issue tracker" is where issues live for this repo. Skills like `to-tickets`, `triage`, and `to-spec` read from and write to it. They need to know whether to call `gh issue create`, write a markdown file under `.scratch/`, or follow some other workflow you describe. Pick the place you actually track work for this repo.
41
+
42
+ Default posture: these skills were designed for GitHub. If a `git remote` points at GitHub, propose that. If a `git remote` points at GitLab (`gitlab.com` or a self-hosted host), propose GitLab. Otherwise (or if the user prefers), offer:
43
+
44
+ - **GitHub**: issues live in the repo's GitHub Issues (uses the `gh` CLI)
45
+ - **GitLab**: issues live in the repo's GitLab Issues (uses the [`glab`](https://gitlab.com/gitlab-org/cli) CLI)
46
+ - **Local markdown**: issues live as files under `.scratch/<feature>/` in this repo (good for solo projects or repos without a remote)
47
+ - **Other** (Jira, Linear, etc.): ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose
48
+
49
+ Record the choice in `docs/agents/issue-tracker.md`. The GitHub and GitLab templates carry a "PRs as a request surface" flag, defaulted **off**. Leave it off and don't raise it: a user who wants external PRs in the triage queue can flip the flag in the file later.
50
+
51
+ **Section B: Triage label vocabulary.** Skip this section entirely if the `triage` skill isn't installed (exploration told you), since an uninstalled skill needs no labels.
52
+
53
+ If it is installed, ask exactly one question:
54
+
55
+ > Do you want to keep the default triage labels? (recommended: **yes**)
56
+
57
+ The defaults are the five canonical roles, each label string equal to its name: `needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`. On **yes**, write them as-is. Only if the user says no, usually because their tracker already uses other names (e.g. `bug:triage` for `needs-triage`), collect the overrides so `triage` applies existing labels instead of creating duplicates.
58
+
59
+ **Section C: Domain docs.** Default to **single-context** (one `CONTEXT.md` + `docs/adr/` at the repo root). This fits almost every repo; write it without asking.
60
+
61
+ Offer **multi-context** (a root `CONTEXT-MAP.md` pointing to per-context `CONTEXT.md` files) only when exploration found monorepo signals. Then confirm which layout they want.
62
+
63
+ ### 3. Confirm and edit
64
+
65
+ Show the user a draft of:
66
+
67
+ - The `## Agent skills` block to add to whichever of `CLAUDE.md` / `AGENTS.md` is being edited (see step 4 for selection rules)
68
+ - The contents of `docs/agents/issue-tracker.md`, `docs/agents/domain.md`, and `docs/agents/triage-labels.md` (the last only when `triage` is installed)
69
+
70
+ Let them edit before writing.
71
+
72
+ ### 4. Write
73
+
74
+ **Pick the file to edit:**
75
+
76
+ - If `CLAUDE.md` exists, edit it.
77
+ - Else if `AGENTS.md` exists, edit it.
78
+ - If neither exists, ask the user which one to create; don't pick for them.
79
+
80
+ Never create `AGENTS.md` when `CLAUDE.md` already exists (or vice versa); always edit the one that's already there.
81
+
82
+ If an `## Agent skills` block already exists in the chosen file, update its contents in-place rather than appending a duplicate. Don't overwrite user edits to the surrounding sections.
83
+
84
+ The block:
85
+
86
+ ```markdown
87
+ ## Agent skills
88
+
89
+ ### Issue tracker
90
+
91
+ [one-line summary of where issues are tracked]. See `docs/agents/issue-tracker.md`.
92
+
93
+ ### Triage labels
94
+
95
+ [one-line summary of the label vocabulary]. See `docs/agents/triage-labels.md`.
96
+
97
+ ### Domain docs
98
+
99
+ [one-line summary of layout: "single-context" or "multi-context"]. See `docs/agents/domain.md`.
100
+ ```
101
+
102
+ Include the `### Triage labels` sub-block, and write `docs/agents/triage-labels.md`, only when `triage` is installed and Section B ran. When it isn't, both are omitted.
103
+
104
+ Then write the docs files using the seed templates in this skill folder as a starting point:
105
+
106
+ - [issue-tracker-github.md](./issue-tracker-github.md): GitHub issue tracker
107
+ - [issue-tracker-gitlab.md](./issue-tracker-gitlab.md): GitLab issue tracker
108
+ - [issue-tracker-local.md](./issue-tracker-local.md): local-markdown issue tracker
109
+ - [triage-labels.md](./triage-labels.md): label mapping (only if `triage` is installed)
110
+ - [domain.md](./domain.md): domain doc consumer rules + layout
111
+
112
+ For "other" issue trackers, write `docs/agents/issue-tracker.md` from scratch using the user's description.
113
+
114
+ ### 5. Done
115
+
116
+ Tell the user the setup is complete and which engineering skills will now read from these files. Mention they can edit `docs/agents/*.md` directly later; re-running this skill is only necessary if they want to switch issue trackers or restart from scratch.
@@ -0,0 +1,5 @@
1
+ interface:
2
+ display_name: "Setup Matt Pocock Skills"
3
+ short_description: "Configure a repo for the skills"
4
+ policy:
5
+ allow_implicit_invocation: false
@@ -0,0 +1,51 @@
1
+ # Domain Docs
2
+
3
+ How the engineering skills should consume this repo's domain documentation when exploring the codebase.
4
+
5
+ ## Before exploring, read these
6
+
7
+ - **`CONTEXT.md`** at the repo root, or
8
+ - **`CONTEXT-MAP.md`** at the repo root if it exists: it points at one `CONTEXT.md` per context. Read each one relevant to the topic.
9
+ - **`docs/adr/`**: read ADRs that touch the area you're about to work in. In multi-context repos, also check `src/<context>/docs/adr/` for context-scoped decisions.
10
+
11
+ If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved.
12
+
13
+ ## File structure
14
+
15
+ Single-context repo (most repos):
16
+
17
+ ```
18
+ /
19
+ ├── CONTEXT.md
20
+ ├── docs/adr/
21
+ │ ├── 0001-event-sourced-orders.md
22
+ │ └── 0002-postgres-for-write-model.md
23
+ └── src/
24
+ ```
25
+
26
+ Multi-context repo (presence of `CONTEXT-MAP.md` at the root):
27
+
28
+ ```
29
+ /
30
+ ├── CONTEXT-MAP.md
31
+ ├── docs/adr/ ← system-wide decisions
32
+ └── src/
33
+ ├── ordering/
34
+ │ ├── CONTEXT.md
35
+ │ └── docs/adr/ ← context-specific decisions
36
+ └── billing/
37
+ ├── CONTEXT.md
38
+ └── docs/adr/
39
+ ```
40
+
41
+ ## Use the glossary's vocabulary
42
+
43
+ When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids.
44
+
45
+ If the concept you need isn't in the glossary yet, that's a signal: either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`).
46
+
47
+ ## Flag ADR conflicts
48
+
49
+ If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
50
+
51
+ > _Contradicts ADR-0007 (event-sourced orders), but worth reopening because…_
@@ -0,0 +1,45 @@
1
+ # Issue tracker: GitHub
2
+
3
+ Issues and specs for this repo live as GitHub issues. Use the `gh` CLI for all operations.
4
+
5
+ ## Conventions
6
+
7
+ - **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies.
8
+ - **Read an issue**: `gh issue view <number> --comments`, filtering comments by `jq` and also fetching labels.
9
+ - **List issues**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'` with appropriate `--label` and `--state` filters.
10
+ - **Comment on an issue**: `gh issue comment <number> --body "..."`
11
+ - **Apply / remove labels**: `gh issue edit <number> --add-label "..."` / `--remove-label "..."`
12
+ - **Close**: `gh issue close <number> --comment "..."`
13
+
14
+ Infer the repo from `git remote -v`; `gh` does this automatically when run inside a clone.
15
+
16
+ ## Pull requests as a triage surface
17
+
18
+ **PRs as a request surface: no.** _(Set to `yes` if this repo treats external PRs as feature requests; `/triage` reads this flag.)_
19
+
20
+ When set to `yes`, PRs run through the same labels and states as issues, using the `gh pr` equivalents:
21
+
22
+ - **Read a PR**: `gh pr view <number> --comments` and `gh pr diff <number>` for the diff.
23
+ - **List external PRs for triage**: `gh pr list --state open --json number,title,body,labels,author,authorAssociation,comments` then keep only `authorAssociation` of `CONTRIBUTOR`, `FIRST_TIME_CONTRIBUTOR`, or `NONE` (drop `OWNER`/`MEMBER`/`COLLABORATOR`).
24
+ - **Comment / label / close**: `gh pr comment`, `gh pr edit --add-label`/`--remove-label`, `gh pr close`.
25
+
26
+ GitHub shares one number space across issues and PRs, so a bare `#42` may be either: resolve with `gh pr view 42` and fall back to `gh issue view 42`.
27
+
28
+ ## When a skill says "publish to the issue tracker"
29
+
30
+ Create a GitHub issue.
31
+
32
+ ## When a skill says "fetch the relevant ticket"
33
+
34
+ Run `gh issue view <number> --comments`.
35
+
36
+ ## Wayfinding operations
37
+
38
+ Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
39
+
40
+ - **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `gh issue create --label wayfinder:map`.
41
+ - **Child ticket**: an issue linked to the map as a GitHub sub-issue (`gh api` on the sub-issues endpoint). Where sub-issues aren't enabled, add the child to a task list in the map body and put `Part of #<map>` at the top of the child body. Labels: `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
42
+ - **Blocking**: GitHub's **native issue dependencies**, the canonical, UI-visible representation. Add an edge with `gh api --method POST repos/<owner>/<repo>/issues/<child>/dependencies/blocked_by -F issue_id=<blocker-db-id>`, where `<blocker-db-id>` is the blocker's numeric **database id** (`gh api repos/<owner>/<repo>/issues/<n> --jq .id`, _not_ the `#number` or `node_id`). GitHub reports `issue_dependencies_summary.blocked_by` (open blockers only, the live gate). Where dependencies aren't available, fall back to a `Blocked by: #<n>, #<n>` line at the top of the child body. A ticket is unblocked when every blocker is closed.
43
+ - **Frontier query**: list the map's open children (`gh issue list --state open`, scoped to the map's sub-issues / task list), drop any with an open blocker (`issue_dependencies_summary.blocked_by > 0`, or an open issue in the `Blocked by` line) or an assignee; first in map order wins.
44
+ - **Claim**: `gh issue edit <n> --add-assignee @me`, the session's first write.
45
+ - **Resolve**: `gh issue comment <n> --body "<answer>"`, then `gh issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.
@@ -0,0 +1,46 @@
1
+ # Issue tracker: GitLab
2
+
3
+ Issues and specs for this repo live as GitLab issues. Use the [`glab`](https://gitlab.com/gitlab-org/cli) CLI for all operations.
4
+
5
+ ## Conventions
6
+
7
+ - **Create an issue**: `glab issue create --title "..." --description "..."`. Use a heredoc for multi-line descriptions. Pass `--description -` to open an editor.
8
+ - **Read an issue**: `glab issue view <number> --comments`. Use `-F json` for machine-readable output.
9
+ - **List issues**: `glab issue list -F json` with appropriate `--label` filters.
10
+ - **Comment on an issue**: `glab issue note <number> --message "..."`. GitLab calls comments "notes".
11
+ - **Apply / remove labels**: `glab issue update <number> --label "..."` / `--unlabel "..."`. Multiple labels can be comma-separated or by repeating the flag.
12
+ - **Close**: `glab issue close <number>`. `glab issue close` does not accept a closing comment, so post the explanation first with `glab issue note <number> --message "..."`, then close.
13
+ - **Merge requests**: GitLab calls PRs "merge requests". Use `glab mr create`, `glab mr view`, `glab mr note`, etc., the same shape as `gh pr ...` with `mr` in place of `pr` and `note`/`--message` in place of `comment`/`--body`.
14
+
15
+ Infer the repo from `git remote -v`; `glab` does this automatically when run inside a clone.
16
+
17
+ ## Merge requests as a triage surface
18
+
19
+ **MRs as a request surface: no.** _(Set to `yes` if this repo treats external merge requests as feature requests; `/triage` reads this flag.)_
20
+
21
+ When set to `yes`, MRs run through the same labels and states as issues, using the `glab mr` equivalents:
22
+
23
+ - **Read an MR**: `glab mr view <number> --comments` and `glab mr diff <number>` for the diff.
24
+ - **List external MRs for triage**: `glab mr list -F json`, then keep only MRs whose author is not a project member/owner (a contributor's MR, not a maintainer's in-flight work).
25
+ - **Comment / label / close**: `glab mr note`, `glab mr update --label`/`--unlabel`, `glab mr close`.
26
+
27
+ Unlike GitHub, GitLab numbers issues and MRs separately, so `#42` is unambiguous once you know which surface the maintainer means.
28
+
29
+ ## When a skill says "publish to the issue tracker"
30
+
31
+ Create a GitLab issue.
32
+
33
+ ## When a skill says "fetch the relevant ticket"
34
+
35
+ Run `glab issue view <number> --comments`.
36
+
37
+ ## Wayfinding operations
38
+
39
+ Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
40
+
41
+ - **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `glab issue create --label wayfinder:map`. (On GitLab tiers with native epics, an epic may hold the map instead; a labelled issue works everywhere.)
42
+ - **Child ticket**: an issue carrying `Part of #<map>` at the top of its description and labels `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
43
+ - **Blocking**: GitLab's **native blocking link**, the canonical, UI-visible representation. Add it with the `/blocked_by #<n>` quick action, posted as a note (`glab issue note <child> --message "/blocked_by #<blocker>"`). Native blocking links are a Premium/Ultimate feature; on the free tier (or where unavailable) fall back to a `Blocked by: #<n>, #<n>` line at the top of the description. A ticket is unblocked when every blocker is closed.
44
+ - **Frontier query**: `glab issue list -F json` scoped to the map's children, drop any with an open blocker: a native `blocked_by` link to an open issue (`glab api projects/:id/issues/:iid/links`), or an open issue in the `Blocked by` line, or an assignee; first in map order wins.
45
+ - **Claim**: `glab issue update <n> --assignee @me`, the session's first write.
46
+ - **Resolve**: `glab issue note <n> --message "<answer>"`, then `glab issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.
@@ -0,0 +1,30 @@
1
+ # Issue tracker: Local Markdown
2
+
3
+ Issues and specs for this repo live as markdown files in `.scratch/`.
4
+
5
+ ## Conventions
6
+
7
+ - One feature per directory: `.scratch/<feature-slug>/`
8
+ - The spec is `.scratch/<feature-slug>/spec.md`
9
+ - Implementation issues are one file per ticket at `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01`, never a single combined tickets file
10
+ - Triage state is recorded as a `Status:` line near the top of each issue file (see `triage-labels.md` for the role strings)
11
+ - Comments and conversation history append to the bottom of the file under a `## Comments` heading
12
+
13
+ ## When a skill says "publish to the issue tracker"
14
+
15
+ Create a new file under `.scratch/<feature-slug>/` (creating the directory if needed).
16
+
17
+ ## When a skill says "fetch the relevant ticket"
18
+
19
+ Read the file at the referenced path. The user will normally pass the path or the issue number directly.
20
+
21
+ ## Wayfinding operations
22
+
23
+ Used by `/wayfinder`. The **map** is a file with one **child** file per ticket.
24
+
25
+ - **Map**: `.scratch/<effort>/map.md` (the Notes / Decisions-so-far / Fog body).
26
+ - **Child ticket**: `.scratch/<effort>/issues/NN-<slug>.md`, numbered from `01`, with the question in the body. A `Type:` line records the ticket type (`research`/`prototype`/`grilling`/`task`); a `Status:` line records `claimed`/`resolved`.
27
+ - **Blocking**: a `Blocked by: NN, NN` line near the top. A ticket is unblocked when every file it lists is `resolved`.
28
+ - **Frontier**: scan `.scratch/<effort>/issues/` for files that are open, unblocked, and unclaimed; first by number wins.
29
+ - **Claim**: set `Status: claimed` and save before any work.
30
+ - **Resolve**: append the answer under an `## Answer` heading, set `Status: resolved`, then append a context pointer (gist + link) to the map's Decisions-so-far in `map.md`.
@@ -0,0 +1,15 @@
1
+ # Triage Labels
2
+
3
+ The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
4
+
5
+ | Label in mattpocock/skills | Label in our tracker | Meaning |
6
+ | -------------------------- | -------------------- | ---------------------------------------- |
7
+ | `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
8
+ | `needs-info` | `needs-info` | Waiting on reporter for more information |
9
+ | `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
10
+ | `ready-for-human` | `ready-for-human` | Requires human implementation |
11
+ | `wontfix` | `wontfix` | Will not be actioned |
12
+
13
+ When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
14
+
15
+ Edit the right-hand column to match whatever vocabulary you actually use.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: tdd
3
+ description: Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
4
+ ---
5
+
6
+ # Test-Driven Development
7
+
8
+ TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle: consult them before and during the loop, not after.
9
+
10
+ When exploring the codebase, read `CONTEXT.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.
11
+
12
+ ## What a good test is
13
+
14
+ Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification: "user can checkout with valid cart" tells you exactly what capability exists, and it survives refactors because it doesn't care about internal structure.
15
+
16
+ See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.
17
+
18
+ ## Seams: where tests go
19
+
20
+ A **seam** is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.
21
+
22
+ **Test only at pre-agreed seams.** Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything, so agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.
23
+
24
+ Ask: "What's the public interface, and which seams should we test?"
25
+
26
+ When the shape of that interface is itself in question (how deep the module is, where the seam belongs, what the interface should expose), call the Skill tool with "codebase-design" for the vocabulary. It is the shared source of the module, interface, depth, seam, adapter, leverage and locality terms, and it is a reference to consult, not a session to run.
27
+
28
+ ## Anti-patterns
29
+
30
+ - **Implementation-coupled**: mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed.
31
+ - **Tautological**: the assertion recomputes the expected value the way the code does (`expect(add(a, b)).toBe(a + b)`, a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction and can never disagree with the code. Expected values must come from an independent source of truth: a known-good literal, a worked example, the spec.
32
+ - **Horizontal slicing**: writing all tests first, then all implementation. Bulk tests verify _imagined_ behavior: you test the _shape_ of things rather than user-facing behavior, the tests go insensitive to real changes, and you commit to test structure before understanding the implementation. Work in **vertical slices** instead: one test → one implementation → repeat, each test a **tracer bullet** that responds to what the last cycle taught you.
33
+
34
+ ## Rules of the loop
35
+
36
+ - **Red before green.** Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.
37
+ - **One slice at a time.** One seam, one test, one minimal implementation per cycle.
38
+ - **Refactoring is not part of the loop.** It belongs to the review stage (see the `code-review` skill), not the red → green implementation cycle.
@@ -0,0 +1,3 @@
1
+ interface:
2
+ display_name: "TDD"
3
+ short_description: "Test-driven red-green-refactor"