@heihei0299/matt-skills 2.1.13 → 3.0.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 (99) hide show
  1. package/README.md +3 -2
  2. package/bin/cli.js +40 -92
  3. package/package.json +1 -1
  4. package/template/.opencode/CONTEXT.md +7 -7
  5. package/template/.pi/CONTEXT.md +7 -7
  6. package/template/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  7. package/template/.agents/skills/ask-matt/SKILL.md +0 -90
  8. package/template/.agents/skills/ask-matt/agents/openai.yaml +0 -5
  9. package/template/.agents/skills/code-review/SKILL.md +0 -87
  10. package/template/.agents/skills/code-review/agents/openai.yaml +0 -3
  11. package/template/.agents/skills/codebase-design/DEEPENING.md +0 -37
  12. package/template/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
  13. package/template/.agents/skills/codebase-design/SKILL.md +0 -114
  14. package/template/.agents/skills/codebase-design/agents/openai.yaml +0 -3
  15. package/template/.agents/skills/diagnose-fix/SKILL.md +0 -43
  16. package/template/.agents/skills/diagnose-fix/agents/openai.yaml +0 -5
  17. package/template/.agents/skills/diagnose-fix/references/anti-patterns.md +0 -21
  18. package/template/.agents/skills/diagnosing-bugs/SKILL.md +0 -138
  19. package/template/.agents/skills/diagnosing-bugs/agents/openai.yaml +0 -3
  20. package/template/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -44
  21. package/template/.agents/skills/domain-modeling/ADR-FORMAT.md +0 -47
  22. package/template/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
  23. package/template/.agents/skills/domain-modeling/SKILL.md +0 -74
  24. package/template/.agents/skills/domain-modeling/agents/openai.yaml +0 -3
  25. package/template/.agents/skills/grill-me/SKILL.md +0 -7
  26. package/template/.agents/skills/grill-me/agents/openai.yaml +0 -5
  27. package/template/.agents/skills/grill-to-spec/SKILL.md +0 -55
  28. package/template/.agents/skills/grill-to-spec/agents/openai.yaml +0 -5
  29. package/template/.agents/skills/grill-to-spec/references/rules.md +0 -47
  30. package/template/.agents/skills/grill-with-docs/SKILL.md +0 -7
  31. package/template/.agents/skills/grill-with-docs/agents/openai.yaml +0 -5
  32. package/template/.agents/skills/grilling/SKILL.md +0 -28
  33. package/template/.agents/skills/grilling/agents/openai.yaml +0 -3
  34. package/template/.agents/skills/handoff/SKILL.md +0 -16
  35. package/template/.agents/skills/handoff/agents/openai.yaml +0 -5
  36. package/template/.agents/skills/implement/SKILL.md +0 -15
  37. package/template/.agents/skills/implement/agents/openai.yaml +0 -5
  38. package/template/.agents/skills/implement-review-loop/SKILL.md +0 -34
  39. package/template/.agents/skills/implement-review-loop/agents/openai.yaml +0 -5
  40. package/template/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
  41. package/template/.agents/skills/improve-codebase-architecture/SKILL.md +0 -71
  42. package/template/.agents/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
  43. package/template/.agents/skills/instance-test/SKILL.md +0 -70
  44. package/template/.agents/skills/instance-test/agents/openai.yaml +0 -5
  45. package/template/.agents/skills/instance-test/references/instances.md +0 -75
  46. package/template/.agents/skills/prototype/LOGIC.md +0 -67
  47. package/template/.agents/skills/prototype/SKILL.md +0 -26
  48. package/template/.agents/skills/prototype/UI.md +0 -112
  49. package/template/.agents/skills/prototype/agents/openai.yaml +0 -3
  50. package/template/.agents/skills/research/SKILL.md +0 -12
  51. package/template/.agents/skills/research/agents/openai.yaml +0 -3
  52. package/template/.agents/skills/resolving-merge-conflicts/SKILL.md +0 -14
  53. package/template/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +0 -3
  54. package/template/.agents/skills/scaffold-functional-test/SKILL.md +0 -64
  55. package/template/.agents/skills/scaffold-functional-test/agents/openai.yaml +0 -5
  56. package/template/.agents/skills/scaffold-functional-test/references/schema.md +0 -80
  57. package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +0 -116
  58. package/template/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +0 -5
  59. package/template/.agents/skills/setup-matt-pocock-skills/domain.md +0 -51
  60. package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +0 -45
  61. package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -46
  62. package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +0 -30
  63. package/template/.agents/skills/setup-matt-pocock-skills/triage-labels.md +0 -15
  64. package/template/.agents/skills/show-me/SKILL.md +0 -28
  65. package/template/.agents/skills/tdd/SKILL.md +0 -38
  66. package/template/.agents/skills/tdd/agents/openai.yaml +0 -3
  67. package/template/.agents/skills/tdd/mocking.md +0 -59
  68. package/template/.agents/skills/tdd/tests.md +0 -77
  69. package/template/.agents/skills/tdd-implement/SKILL.md +0 -81
  70. package/template/.agents/skills/tdd-implement/agents/openai.yaml +0 -5
  71. package/template/.agents/skills/tdd-implement/references/finalize.md +0 -16
  72. package/template/.agents/skills/tdd-implement/references/orchestration.md +0 -54
  73. package/template/.agents/skills/tdd-implement/references/verify.md +0 -15
  74. package/template/.agents/skills/teach/GLOSSARY-FORMAT.md +0 -35
  75. package/template/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  76. package/template/.agents/skills/teach/MISSION-FORMAT.md +0 -31
  77. package/template/.agents/skills/teach/RESOURCES-FORMAT.md +0 -32
  78. package/template/.agents/skills/teach/SKILL.md +0 -140
  79. package/template/.agents/skills/teach/agents/openai.yaml +0 -5
  80. package/template/.agents/skills/to-questionnaire/SKILL.md +0 -54
  81. package/template/.agents/skills/to-questionnaire/agents/openai.yaml +0 -5
  82. package/template/.agents/skills/to-spec/SKILL.md +0 -75
  83. package/template/.agents/skills/to-spec/agents/openai.yaml +0 -5
  84. package/template/.agents/skills/to-tickets/SKILL.md +0 -105
  85. package/template/.agents/skills/to-tickets/agents/openai.yaml +0 -5
  86. package/template/.agents/skills/triage/AGENT-BRIEF.md +0 -207
  87. package/template/.agents/skills/triage/OUT-OF-SCOPE.md +0 -105
  88. package/template/.agents/skills/triage/SKILL.md +0 -112
  89. package/template/.agents/skills/triage/agents/openai.yaml +0 -5
  90. package/template/.agents/skills/wait-what/SKILL.md +0 -7
  91. package/template/.agents/skills/wait-what/agents/openai.yaml +0 -5
  92. package/template/.agents/skills/wayfinder/SKILL.md +0 -128
  93. package/template/.agents/skills/wayfinder/agents/openai.yaml +0 -5
  94. package/template/.agents/skills/wizard/SKILL.md +0 -44
  95. package/template/.agents/skills/wizard/agents/openai.yaml +0 -3
  96. package/template/.agents/skills/wizard/template.sh +0 -204
  97. package/template/.agents/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
  98. package/template/.agents/skills/writing-for-agents/SKILL.md +0 -81
  99. package/template/.agents/skills/writing-for-agents/agents/openai.yaml +0 -3
@@ -1,46 +0,0 @@
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.
@@ -1,30 +0,0 @@
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`.
@@ -1,15 +0,0 @@
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.
@@ -1,28 +0,0 @@
1
- ---
2
- name: show-me
3
- description: Show the current implementation or state for the user to review, using real observable evidence when an existing run entrypoint is available.
4
- ---
5
-
6
- # Show Me
7
-
8
- 只读展示当前 implementation 或状态供用户 review。不要修改源码、测试或配置;不要为了演示臆造新的入口。
9
-
10
- ## Steps
11
-
12
- 1. **Identify**:查找项目已有的运行脚本、CLI、dev server、browser 入口或现有产物,选择最接近用户可观察行为的入口。
13
- 2. **Run**:优先实际运行并捕获可见结果;UI 使用已有 browser/Playwright 入口,CLI 使用已有命令。没有安全、明确的运行入口时,回退到 `git status`、相关 diff、静态配置或已有产物,并明确未完成真实运行验证。
14
- 3. **Report**:按以下固定格式在对话中汇报,不默认写报告文件:
15
-
16
- ```text
17
- 展示方式:
18
- 实际执行的命令/入口:
19
- 实际可见结果:
20
- 产物或 URL:
21
- 未验证项与限制:
22
- ```
23
-
24
- 需要启动临时进程或目录时使用项目已有的隔离和清理方式;展示结束后清理本次创建的资源。
25
-
26
- ## 出口
27
-
28
- 用户获得可复核的实际结果,或获得明确的静态证据与“未真实运行”的限制说明;不以“构建成功”或推测结果代替展示。
@@ -1,38 +0,0 @@
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.
@@ -1,3 +0,0 @@
1
- interface:
2
- display_name: "TDD"
3
- short_description: "Test-driven red-green-refactor"
@@ -1,59 +0,0 @@
1
- # When to Mock
2
-
3
- Mock at **system boundaries** only:
4
-
5
- - External APIs (payment, email, etc.)
6
- - Databases (sometimes - prefer test DB)
7
- - Time/randomness
8
- - File system (sometimes)
9
-
10
- Don't mock:
11
-
12
- - Your own classes/modules
13
- - Internal collaborators
14
- - Anything you control
15
-
16
- ## Designing for Mockability
17
-
18
- At system boundaries, design interfaces that are easy to mock:
19
-
20
- **1. Use dependency injection**
21
-
22
- Pass external dependencies in rather than creating them internally:
23
-
24
- ```typescript
25
- // Easy to mock
26
- function processPayment(order, paymentClient) {
27
- return paymentClient.charge(order.total);
28
- }
29
-
30
- // Hard to mock
31
- function processPayment(order) {
32
- const client = new StripeClient(process.env.STRIPE_KEY);
33
- return client.charge(order.total);
34
- }
35
- ```
36
-
37
- **2. Prefer SDK-style interfaces over generic fetchers**
38
-
39
- Create specific functions for each external operation instead of one generic function with conditional logic:
40
-
41
- ```typescript
42
- // GOOD: Each function is independently mockable
43
- const api = {
44
- getUser: (id) => fetch(`/users/${id}`),
45
- getOrders: (userId) => fetch(`/users/${userId}/orders`),
46
- createOrder: (data) => fetch('/orders', { method: 'POST', body: data }),
47
- };
48
-
49
- // BAD: Mocking requires conditional logic inside the mock
50
- const api = {
51
- fetch: (endpoint, options) => fetch(endpoint, options),
52
- };
53
- ```
54
-
55
- The SDK approach means:
56
- - Each mock returns one specific shape
57
- - No conditional logic in test setup
58
- - Easier to see which endpoints a test exercises
59
- - Type safety per endpoint
@@ -1,77 +0,0 @@
1
- # Good and Bad Tests
2
-
3
- ## Good Tests
4
-
5
- **Integration-style**: Test through real interfaces, not mocks of internal parts.
6
-
7
- ```typescript
8
- // GOOD: Tests observable behavior
9
- test("user can checkout with valid cart", async () => {
10
- const cart = createCart();
11
- cart.add(product);
12
- const result = await checkout(cart, paymentMethod);
13
- expect(result.status).toBe("confirmed");
14
- });
15
- ```
16
-
17
- Characteristics:
18
-
19
- - Tests behavior users/callers care about
20
- - Uses public API only
21
- - Survives internal refactors
22
- - Describes WHAT, not HOW
23
- - One logical assertion per test
24
-
25
- ## Bad Tests
26
-
27
- **Implementation-detail tests**: Coupled to internal structure.
28
-
29
- ```typescript
30
- // BAD: Tests implementation details
31
- test("checkout calls paymentService.process", async () => {
32
- const mockPayment = jest.mock(paymentService);
33
- await checkout(cart, payment);
34
- expect(mockPayment.process).toHaveBeenCalledWith(cart.total);
35
- });
36
- ```
37
-
38
- Red flags:
39
-
40
- - Mocking internal collaborators
41
- - Testing private methods
42
- - Asserting on call counts/order
43
- - Test breaks when refactoring without behavior change
44
- - Test name describes HOW not WHAT
45
- - Verifying through external means instead of interface
46
-
47
- ```typescript
48
- // BAD: Bypasses interface to verify
49
- test("createUser saves to database", async () => {
50
- await createUser({ name: "Alice" });
51
- const row = await db.query("SELECT * FROM users WHERE name = ?", ["Alice"]);
52
- expect(row).toBeDefined();
53
- });
54
-
55
- // GOOD: Verifies through interface
56
- test("createUser makes user retrievable", async () => {
57
- const user = await createUser({ name: "Alice" });
58
- const retrieved = await getUser(user.id);
59
- expect(retrieved.name).toBe("Alice");
60
- });
61
- ```
62
-
63
- **Tautological tests**: Expected value restates the implementation, so the test passes by construction.
64
-
65
- ```typescript
66
- // BAD: Expected value is recomputed the way the code computes it
67
- test("calculateTotal sums line items", () => {
68
- const items = [{ price: 10 }, { price: 5 }];
69
- const expected = items.reduce((sum, i) => sum + i.price, 0);
70
- expect(calculateTotal(items)).toBe(expected);
71
- });
72
-
73
- // GOOD: Expected value is an independent, known literal
74
- test("calculateTotal sums line items", () => {
75
- expect(calculateTotal([{ price: 10 }, { price: 5 }])).toBe(15);
76
- });
77
- ```
@@ -1,81 +0,0 @@
1
- ---
2
- name: tdd-implement
3
- description: "完成已确认的 spec/ticket 的 test-first/TDD 交付闭环。"
4
- disable-model-invocation: true
5
- ---
6
-
7
- # TDD Implement
8
-
9
- 完成已确认的 spec/task。TDD 的红绿语义、测试质量、seam 和 mock 规则以 [tdd](.agents/skills/tdd/SKILL.md) 为唯一事实源;本技能只负责 issue 级实现、验证、Review 与收尾编排。
10
-
11
- ## 入口
12
-
13
- - **单 issue**:直接按下方 Steps 执行。
14
- - **多 issue**:存在多个 `Type: task` 时,读取 [orchestration.md](references/orchestration.md) 后按依赖顺序逐个完成。
15
- - `research`、`prototype`、`grilling` 类型任务分流到对应技能。
16
-
17
- ## Steps
18
-
19
- ### ① Red-Green
20
-
21
- 按 `tdd` 完成当前 issue 的所有 Acceptance Criteria。
22
-
23
- 将需要实现或修改的内容拆成可独立验证的 Behavior。一次只推进一个 Behavior:每个尚未实现的 Behavior 都必须分别完成 `tdd` 的 Red → Green cycle,完成后才能进入下一个 Behavior。
24
-
25
- 前一个 Behavior 已完成 TDD,不代表后续 Behavior 可以直接修改实现代码。
26
-
27
- 已有行为若无需修改且已由现有测试充分覆盖,不强制制造 Red。
28
-
29
- **出口:**
30
-
31
- - 所有需要实现或修改的 Behavior 均完成各自的 Red → Green cycle;
32
- - Acceptance Criteria 对应行为通过相关验证。
33
-
34
- ### ② Verify
35
-
36
- 读取 [verify.md](references/verify.md),执行当前 issue 所需的最终验证。
37
-
38
- 最终验证通过且 diff 稳定后执行完整 `code-review`。
39
-
40
- #### Review
41
-
42
- 每个 issue 只在 Verify 的最终 diff 稳定后调用一次完整 `code-review`;审查维度、reviewer 数量、提示词和输出格式全部由 `code-review` 自己定义,`tdd-implement` 不复制这些规则。`code-review` 未完成或存在 blocking finding 时 issue 不得收敛;多 issue 层收敛不再次调用完整 Review。
43
-
44
- 若完整 Review 存在 blocking finding:
45
-
46
- 1. 仅修复对应 finding,不扩大当前 issue 范围;
47
- 2. 修复后仅对该 finding 及其直接影响执行增量 Review;
48
- 3. 未受影响的 Review 结论继续有效;
49
- 4. 不重新执行完整双轴 Review;
50
- 5. 若增量 Review 仍存在问题,仅继续修复并复核剩余 finding。
51
-
52
- 所有 blocking finding 关闭后 Review 才算通过。
53
-
54
- **出口:**
55
-
56
- - 当前 issue 所需最终验证通过;
57
- - 要求的真实运行验证完成;
58
- - 完整 Review 已完成;
59
- - 所有 blocking finding 已关闭。
60
-
61
- ## Finalize
62
-
63
- Verify 通过后读取 [finalize.md](references/finalize.md),完成当前 issue 的必要同步、独立 commit 与 tracker/progress 收尾。
64
-
65
- Finalize 不新增产品 Behavior;若发现实现或验证遗漏,回到对应 Step 完成后再收尾。
66
-
67
- ## 运行纪律
68
-
69
- - Red-Green 必须覆盖当前 issue 的全部待实现 Behavior,不能只对第一个改动执行 TDD。
70
- - 一个 Behavior 完成后继续下一个 Behavior,直到 Step ① 出口满足。
71
- - Verify 只做当前 issue 必要的最终验证;已通过的等价验证不机械重复。
72
- - 完整双轴 Review 每个 issue 只执行一次;后续修复只执行受影响 finding 的增量 Review。
73
- - 当前 Step 达到出口后继续进入下一 Step;仅在需要用户决策或存在外部阻塞时暂停。
74
-
75
- ## References
76
-
77
- - TDD:[tdd](.agents/skills/tdd/SKILL.md)
78
- - Verify:[verify.md](references/verify.md)
79
- - Finalize:[finalize.md](references/finalize.md)
80
- - Review:[code-review](.agents/skills/code-review/SKILL.md)
81
- - 多 issue 编排:[orchestration.md](references/orchestration.md)
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "TDD Implement"
3
- short_description: "Implement from spec/ticket via TDD red-green loop"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,16 +0,0 @@
1
- # Finalize
2
-
3
- 仅在 Verify 通过后执行;不新增产品 Behavior。
4
-
5
- 1. 完成实现要求的必要 docs/config 同步。
6
- 2. 为当前 issue 创建一个独立 commit。
7
- 3. 更新 progress/tracker,记录 commit、Review、验证与运行结果,并解除已满足的 blockers。
8
- 4. 将 Acceptance Criteria 标记完成,issue 标记 `resolved`。
9
-
10
- 若发现实现或验证遗漏,返回对应 Step 完成后再收尾。
11
-
12
- ## 出口
13
-
14
- - 当前 issue 的独立 commit 已创建;
15
- - Acceptance Criteria 全部通过;
16
- - tracker/progress 与实际完成状态一致。
@@ -1,54 +0,0 @@
1
- # 多 issue 编排
2
-
3
- 仅在存在多个 `Type: task` issue 时生效。每个 issue 仍按 `Red-Green → Verify → Finalize` 独立完成;本文件只负责依赖顺序与状态推进。
4
-
5
- ## 1. 构建依赖图
6
-
7
- 读取每个 issue 的 `Blocked by`:
8
-
9
- - 无依赖时视为可直接调度;
10
- - 引用了其它 issue 时建立依赖边;
11
- - 字段无法解析、依赖节点不存在或出现环时,对受影响 issue 停止调度并报告实际原因,不降级为无依赖。
12
-
13
- 使用 Kahn 算法按依赖关系分层;层间串行,每层内按 issue 编号串行。
14
-
15
- ## 2. 串行执行
16
-
17
- ```text
18
- for each layer:
19
- for each issue:
20
- Red-Green
21
- Verify
22
- Finalize
23
- 更新 issue 与 progress
24
- ```
25
-
26
- 一个 issue Finalize 完成后立即进入下一个可调度 issue。前置 issue 未完成时,其依赖项保持 `blocked`。
27
-
28
- 每个 issue 的 TDD、验证、Review 与 Finalize 规则分别以 `SKILL.md`、`red-green.md`、`verify.md`、`finalize.md` 为准,本文件不重复定义。
29
-
30
- ## 3. 状态收敛
31
-
32
- 每个 issue 完成后同步:
33
-
34
- - `Status`;
35
- - commit;
36
- - Review 状态;
37
- - 验证结果;
38
- - 已解除的 blockers。
39
-
40
- 当前层所有 issue 完成后进入下一层。全部层完成后,确认 issue 与 progress 状态一致即可结束;不额外扩大验证范围,也不再次执行完整 Review。
41
-
42
- ## 冲突与失败
43
-
44
- - `Blocked by` 无法解析、依赖缺失或存在环:停止受影响调度并报告。
45
- - issue 执行失败:保持未完成,按失败所在 Step 处理;其依赖项继续保持 `blocked`。
46
- - 多个 issue 修改同一位置且无法安全串行归属:暂停相关 issue,请求用户决定。
47
- - 外部权限、工具或环境阻塞:记录实际状态,不把失败静默当作完成。
48
-
49
- ## 出口
50
-
51
- - 所有可执行 issue 均按依赖顺序完成;
52
- - 每个完成的 issue 均有独立 commit;
53
- - issue、依赖状态与 progress 一致;
54
- - 不存在被误当作已完成的 blocked issue。
@@ -1,15 +0,0 @@
1
- # Verify
2
-
3
- 验证必须对应当前最终 diff;实现或测试变化后,只重新验证受影响证据。
4
-
5
- ## 规则
6
-
7
- - 只验证当前 issue 的必要范围,不因进入 Verify 自动扩大验证范围。
8
- - ticket 要求真实运行验证时,执行与验收目标匹配的实际验证。
9
- - 验证通过后不机械重复等价验证。
10
- - 若修改产生新的 Behavior,返回 Red-Green 对该 Behavior 执行 TDD,完成后再验证受影响范围。
11
-
12
- ## 出口
13
-
14
- - 当前 issue 的必要验证通过;
15
- - 要求的真实运行验证完成。
@@ -1,35 +0,0 @@
1
- # GLOSSARY.md Format
2
-
3
- `GLOSSARY.md` is the canonical language for this teaching workspace. All explainers, exercises, and learning records should adhere to its terminology. Building it is itself part of learning: compressing a concept into a tight definition is evidence the user understands it.
4
-
5
- ## Structure
6
-
7
- ```md
8
- # {Topic} Glossary
9
-
10
- {One or two sentence description of the topic this glossary covers.}
11
-
12
- ## Terms
13
-
14
- **Hypertrophy**:
15
- Muscle growth driven by mechanical tension and metabolic stress over repeated training sessions.
16
- _Avoid_: Bulking, getting big
17
-
18
- **Progressive overload**:
19
- Systematically increasing the demand on a muscle over time, via load, volume, or intensity.
20
- _Avoid_: Pushing harder, levelling up
21
-
22
- **RPE (Rate of Perceived Exertion)**:
23
- A 1–10 self-rating of how hard a set felt, where 10 is failure and 8 means two reps left in the tank.
24
- _Avoid_: Effort score, intensity rating
25
- ```
26
-
27
- ## Rules
28
-
29
- - **Add a term only when the user understands it.** The glossary is a record of compressed knowledge, not a dictionary the user reads to learn. If the user has just been introduced to a concept, wait until they can use it correctly before promoting it here.
30
- - **Be opinionated.** When several words exist for the same concept, pick the best one and list the rest as aliases to avoid. This is how language compresses.
31
- - **Keep definitions tight.** One or two sentences. Define what the term IS, not what it does or how to do it.
32
- - **Use the glossary's own terms inside definitions.** Once a term is in the glossary, prefer it everywhere, including inside other definitions. This is what makes complex terms easier to grasp later.
33
- - **Group under subheadings** when natural clusters emerge (e.g. `## Anatomy`, `## Programming`). A flat list is fine when terms cohere.
34
- - **Flag ambiguities explicitly.** If a term is used loosely in the wider field, note the resolution: "In this workspace, 'set' always means a working set; warm-ups are tracked separately."
35
- - **Revise as understanding deepens.** A definition the user wrote in week one may be wrong by week six. Update in place; do not leave stale entries.
@@ -1,46 +0,0 @@
1
- # Learning Record Format
2
-
3
- Learning records live in `./learning-records/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc. Create the directory lazily: only when the first record is written.
4
-
5
- They are the teaching equivalent of ADRs: they capture non-obvious lessons, key insights, and stated prior knowledge that will steer future sessions. They are used to calculate the zone of proximal development.
6
-
7
- ## Template
8
-
9
- ```md
10
- # {Short title of what was learned or established}
11
-
12
- {1-3 sentences: what was learned (or what prior knowledge was established), and why it matters for future sessions.}
13
- ```
14
-
15
- That is the whole format. A learning record can be a single paragraph. The value is recording _that_ this is now known and _why_ it changes what to teach next, not in filling out sections.
16
-
17
- ## Optional sections
18
-
19
- Only include these when they add genuine value. Most records won't need them.
20
-
21
- - **Status** frontmatter (`active | superseded by LR-NNNN`): useful when an earlier understanding turns out to be wrong and is replaced.
22
- - **Evidence**: how the user demonstrated the understanding (a question answered, an exercise completed, prior experience cited). Useful when the claim might be revisited.
23
- - **Implications**: what this unlocks or rules out for future sessions. Worth recording when non-obvious.
24
-
25
- ## Numbering
26
-
27
- Scan `./learning-records/` for the highest existing number and increment by one.
28
-
29
- ## When to write a learning record
30
-
31
- Write one when any of these is true:
32
-
33
- 1. **The user demonstrated genuine understanding of something non-trivial**: not just exposure, but evidence they can use the concept correctly. This sets a new floor for what to teach next.
34
- 2. **The user disclosed prior knowledge**: "I already know X." Record it so future sessions don't re-teach it. Also record the _depth_ claimed.
35
- 3. **A misconception was corrected**: the user previously believed something wrong and now sees why. These are high-value: they predict future stumbling blocks for related topics.
36
- 4. **The mission shifted in response to learning**: the user discovered they cared about something different than they thought. Cross-link to [[MISSION.md]] and update it.
37
-
38
- ### What does _not_ qualify
39
-
40
- - Material that was merely covered. Coverage is not learning. Wait for evidence.
41
- - Anything already captured tersely in [[GLOSSARY.md]] as a term definition. Don't duplicate.
42
- - Session-by-session activity logs. Learning records are not a journal: they are decision-grade insights.
43
-
44
- ## Supersession
45
-
46
- When a later record contradicts an earlier one (the user's understanding deepened or corrected), mark the old record `Status: superseded by LR-NNNN` rather than deleting it. The history of how understanding evolved is itself useful signal.
@@ -1,31 +0,0 @@
1
- # MISSION.md Format
2
-
3
- `MISSION.md` lives at the workspace root. It captures the _reason_ the user is learning this topic. Every teaching decision (what to teach next, which resources to surface, which exercises to design) should trace back to this document.
4
-
5
- ## Template
6
-
7
- ```md
8
- # Mission: {Topic}
9
-
10
- ## Why
11
- {1-3 sentences. The concrete real-world goal the user is chasing. What changes in their life or work when they have this skill? Avoid abstract framings like "to understand X"; push for the underlying outcome.}
12
-
13
- ## Success looks like
14
- - {A specific, observable thing the user will be able to do}
15
- - {Another specific thing}
16
- - {…}
17
-
18
- ## Constraints
19
- - {Time, budget, prior commitments, learning preferences, anything that bounds the approach}
20
-
21
- ## Out of scope
22
- - {Adjacent topics the user explicitly does not want to chase right now, protecting the zone of proximal development}
23
- ```
24
-
25
- ## Rules
26
-
27
- - **One mission per workspace.** If the user wants to learn two unrelated things, that is two workspaces.
28
- - **Concrete over abstract.** "Run a half marathon by October" beats "get fitter." "Ship a Rust CLI to my team" beats "learn Rust."
29
- - **Push back on vagueness.** If the user cannot articulate why, interview them before writing anything. A bad mission is worse than no mission.
30
- - **Revise when reality shifts.** Missions change. When the user's goal moves, update this file: don't leave a stale mission steering future sessions.
31
- - **Keep it short.** If `MISSION.md` runs past a screen, it has stopped being a compass and started being a plan.
@@ -1,32 +0,0 @@
1
- # RESOURCES.md Format
2
-
3
- `RESOURCES.md` is the curated set of trusted sources for this topic. Knowledge for explainers should be drawn from here, not from parametric guesses. Wisdom comes from the communities listed here.
4
-
5
- ## Structure
6
-
7
- ```md
8
- # {Topic} Resources
9
-
10
- ## Knowledge
11
-
12
- - [Book: _The Science and Practice of Strength Training_ by Zatsiorsky & Kraemer](https://example.com)
13
- Foundational text on programming and adaptation. Use for: anything to do with periodisation, recovery, intensity zones.
14
- - [Article: "How Much Should I Train?" by Greg Nuckols (Stronger By Science)](https://example.com)
15
- Evidence-based review of volume landmarks. Use for: weekly set targets per muscle group.
16
-
17
- ## Wisdom (Communities)
18
-
19
- - [r/weightroom](https://reddit.com/r/weightroom)
20
- High-signal subreddit, moderated against bro-science. Use for: programme critique, plateau troubleshooting.
21
- - Local: Tuesday strength class at {gym name}
22
- Use for: real-time coaching feedback on lifts.
23
- ```
24
-
25
- ## Rules
26
-
27
- - **High-trust only.** Prefer primary sources, recognised experts, peer-reviewed work, and communities with strong moderation. If a resource is marketing dressed as education, leave it out.
28
- - **Annotate every entry.** A bare link is useless in three months. Add one line: what it covers and when to reach for it.
29
- - **Group by Knowledge / Wisdom.** Mirrors the philosophy in [SKILL.md](./SKILL.md). It is fine for a resource to appear in only one group.
30
- - **Surface gaps explicitly.** If no good resource exists for an area the mission needs, write a `## Gaps` section listing what is missing. This drives future search.
31
- - **Prune ruthlessly.** A resource that turned out to be wrong, shallow, or off-mission should be removed, not buried. Better five sharp sources than thirty mediocre ones.
32
- - **Record community preferences.** If the user has opted out of joining communities, note it here so future sessions don't keep proposing them.