@heihei0299/matt-skills 2.1.9 → 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.
- package/.agents/skills/tdd-implement/SKILL.md +56 -31
- package/.agents/skills/tdd-implement/references/finalize.md +8 -19
- package/.agents/skills/tdd-implement/references/orchestration.md +35 -152
- package/.agents/skills/tdd-implement/references/verify.md +7 -16
- package/README.md +3 -2
- package/bin/cli.js +40 -92
- package/package.json +1 -1
- package/template/.opencode/CONTEXT.md +7 -7
- package/template/.pi/CONTEXT.md +7 -7
- package/.agents/skills/tdd-implement/references/contract.md +0 -21
- package/.agents/skills/tdd-implement/references/red-green.md +0 -25
- package/.agents/skills/tdd-implement/references/stages.md +0 -254
- package/template/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/template/.agents/skills/ask-matt/SKILL.md +0 -90
- package/template/.agents/skills/ask-matt/agents/openai.yaml +0 -5
- package/template/.agents/skills/code-review/SKILL.md +0 -87
- package/template/.agents/skills/code-review/agents/openai.yaml +0 -3
- package/template/.agents/skills/codebase-design/DEEPENING.md +0 -37
- package/template/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
- package/template/.agents/skills/codebase-design/SKILL.md +0 -114
- package/template/.agents/skills/codebase-design/agents/openai.yaml +0 -3
- package/template/.agents/skills/diagnose-fix/SKILL.md +0 -43
- package/template/.agents/skills/diagnose-fix/agents/openai.yaml +0 -5
- package/template/.agents/skills/diagnose-fix/references/anti-patterns.md +0 -21
- package/template/.agents/skills/diagnosing-bugs/SKILL.md +0 -138
- package/template/.agents/skills/diagnosing-bugs/agents/openai.yaml +0 -3
- package/template/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -44
- package/template/.agents/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/template/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
- package/template/.agents/skills/domain-modeling/SKILL.md +0 -74
- package/template/.agents/skills/domain-modeling/agents/openai.yaml +0 -3
- package/template/.agents/skills/grill-me/SKILL.md +0 -7
- package/template/.agents/skills/grill-me/agents/openai.yaml +0 -5
- package/template/.agents/skills/grill-to-spec/SKILL.md +0 -55
- package/template/.agents/skills/grill-to-spec/agents/openai.yaml +0 -5
- package/template/.agents/skills/grill-to-spec/references/rules.md +0 -47
- package/template/.agents/skills/grill-with-docs/SKILL.md +0 -7
- package/template/.agents/skills/grill-with-docs/agents/openai.yaml +0 -5
- package/template/.agents/skills/grilling/SKILL.md +0 -28
- package/template/.agents/skills/grilling/agents/openai.yaml +0 -3
- package/template/.agents/skills/handoff/SKILL.md +0 -16
- package/template/.agents/skills/handoff/agents/openai.yaml +0 -5
- package/template/.agents/skills/implement/SKILL.md +0 -15
- package/template/.agents/skills/implement/agents/openai.yaml +0 -5
- package/template/.agents/skills/implement-review-loop/SKILL.md +0 -34
- package/template/.agents/skills/implement-review-loop/agents/openai.yaml +0 -5
- package/template/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
- package/template/.agents/skills/improve-codebase-architecture/SKILL.md +0 -71
- package/template/.agents/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/template/.agents/skills/instance-test/SKILL.md +0 -70
- package/template/.agents/skills/instance-test/agents/openai.yaml +0 -5
- package/template/.agents/skills/instance-test/references/instances.md +0 -75
- package/template/.agents/skills/prototype/LOGIC.md +0 -67
- package/template/.agents/skills/prototype/SKILL.md +0 -26
- package/template/.agents/skills/prototype/UI.md +0 -112
- package/template/.agents/skills/prototype/agents/openai.yaml +0 -3
- package/template/.agents/skills/research/SKILL.md +0 -12
- package/template/.agents/skills/research/agents/openai.yaml +0 -3
- package/template/.agents/skills/resolving-merge-conflicts/SKILL.md +0 -14
- package/template/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +0 -3
- package/template/.agents/skills/scaffold-functional-test/SKILL.md +0 -64
- package/template/.agents/skills/scaffold-functional-test/agents/openai.yaml +0 -5
- package/template/.agents/skills/scaffold-functional-test/references/schema.md +0 -80
- package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +0 -116
- package/template/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +0 -5
- package/template/.agents/skills/setup-matt-pocock-skills/domain.md +0 -51
- package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +0 -45
- package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -46
- package/template/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +0 -30
- package/template/.agents/skills/setup-matt-pocock-skills/triage-labels.md +0 -15
- package/template/.agents/skills/show-me/SKILL.md +0 -28
- package/template/.agents/skills/tdd/SKILL.md +0 -38
- package/template/.agents/skills/tdd/agents/openai.yaml +0 -3
- package/template/.agents/skills/tdd/mocking.md +0 -59
- package/template/.agents/skills/tdd/tests.md +0 -77
- package/template/.agents/skills/tdd-implement/SKILL.md +0 -56
- package/template/.agents/skills/tdd-implement/agents/openai.yaml +0 -5
- package/template/.agents/skills/tdd-implement/references/contract.md +0 -21
- package/template/.agents/skills/tdd-implement/references/finalize.md +0 -27
- package/template/.agents/skills/tdd-implement/references/orchestration.md +0 -171
- package/template/.agents/skills/tdd-implement/references/red-green.md +0 -25
- package/template/.agents/skills/tdd-implement/references/stages.md +0 -254
- package/template/.agents/skills/tdd-implement/references/verify.md +0 -24
- package/template/.agents/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/template/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/template/.agents/skills/teach/MISSION-FORMAT.md +0 -31
- package/template/.agents/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/template/.agents/skills/teach/SKILL.md +0 -140
- package/template/.agents/skills/teach/agents/openai.yaml +0 -5
- package/template/.agents/skills/to-questionnaire/SKILL.md +0 -54
- package/template/.agents/skills/to-questionnaire/agents/openai.yaml +0 -5
- package/template/.agents/skills/to-spec/SKILL.md +0 -75
- package/template/.agents/skills/to-spec/agents/openai.yaml +0 -5
- package/template/.agents/skills/to-tickets/SKILL.md +0 -105
- package/template/.agents/skills/to-tickets/agents/openai.yaml +0 -5
- package/template/.agents/skills/triage/AGENT-BRIEF.md +0 -207
- package/template/.agents/skills/triage/OUT-OF-SCOPE.md +0 -105
- package/template/.agents/skills/triage/SKILL.md +0 -112
- package/template/.agents/skills/triage/agents/openai.yaml +0 -5
- package/template/.agents/skills/wait-what/SKILL.md +0 -7
- package/template/.agents/skills/wait-what/agents/openai.yaml +0 -5
- package/template/.agents/skills/wayfinder/SKILL.md +0 -128
- package/template/.agents/skills/wayfinder/agents/openai.yaml +0 -5
- package/template/.agents/skills/wizard/SKILL.md +0 -44
- package/template/.agents/skills/wizard/agents/openai.yaml +0 -3
- package/template/.agents/skills/wizard/template.sh +0 -204
- package/template/.agents/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
- package/template/.agents/skills/writing-for-agents/SKILL.md +0 -81
- package/template/.agents/skills/writing-for-agents/agents/openai.yaml +0 -3
|
@@ -1,116 +0,0 @@
|
|
|
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.
|
|
@@ -1,51 +0,0 @@
|
|
|
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…_
|
|
@@ -1,45 +0,0 @@
|
|
|
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.
|
|
@@ -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,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,56 +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
|
-
`seam` + `red-green` 是本技能的领衔词。它把一个 spec 或 task issue 编排成三个交付阶段,并在 Verify 后执行一次非阶段的 Finalize 收尾;TDD 的红-绿语义、测试质量和 mock 边界以 [tdd 技能](.agents/skills/tdd/SKILL.md) 为唯一事实源,本技能只定义交付编排。
|
|
10
|
-
|
|
11
|
-
本技能是 **Long-Horizon Skill**:阶段按顺序连续执行,并自带 **Turn Continuity** 与 **Chunking**。术语见 `CONTEXT.md`,技能设计规则见 `docs/agents/skill-design.md`。
|
|
12
|
-
|
|
13
|
-
## 入口与分支
|
|
14
|
-
|
|
15
|
-
- **单 issue**:单个 `.scratch/<feature>/spec.md`、等价 spec 或 `Type: task` issue,按下方三个 Steps 完成验证,再执行 Finalize 收尾。
|
|
16
|
-
- **多 issue**:`.scratch/<feature>/issues/` 下存在多个 `Type: task` 文件时,先读取 [orchestration.md](references/orchestration.md),按 `Blocked by` 构建 DAG、Kahn 分层,再由主代理按层串行完成各 issue。
|
|
17
|
-
- `Type: research`、`prototype`、`grilling` 分流到对应技能,不进入本技能。
|
|
18
|
-
|
|
19
|
-
多 issue 的 A0-A5 是编排控制活动,不是额外的产品交付阶段:依赖图、分层、串行调度、层收敛、最终收敛和回退/冲突处理的详规只在 [orchestration.md](references/orchestration.md) 中维护。
|
|
20
|
-
|
|
21
|
-
## 三阶段 Steps
|
|
22
|
-
|
|
23
|
-
按序执行;每步达到可验证出口条件后立即进入下一步。每步只读取自己的轻量 reference,避免在每个阶段重复注入完整 `stages.md`。
|
|
24
|
-
|
|
25
|
-
| Step | Reference | 做什么 | 出口条件 |
|
|
26
|
-
|---|---|---|---|
|
|
27
|
-
| ① **Contract** | [contract.md](references/contract.md) | 读取入口,提取 Acceptance Criteria,建立 Scope Ledger、Preflight、验证矩阵和 Behavior/Seam 边界 | 需求无待决歧义,验证命令已确定;知道做什么、从哪里验证、什么不做 |
|
|
28
|
-
| ② **Red-Green** | [red-green.md](references/red-green.md) | 以 Behavior 为粒度执行有效 Red → 最小 Green → formatter/typecheck → 最小相关测试 | 所有 Behaviors 均有有效 Red、实现全绿,formatter/typecheck 和最小相关测试通过 |
|
|
29
|
-
| ③ **Verify** | [verify.md](references/verify.md) | 运行当前 issue 影响范围测试、必要 build、要求的真实运行验证;在最终 diff 稳定后调用一次 [code-review](.agents/skills/code-review/SKILL.md) | 最终 diff 的相关证据通过,真实运行验证完成(如要求),code-review 已完成且无 blocking finding |
|
|
30
|
-
|
|
31
|
-
## Finalize(非阶段)
|
|
32
|
-
|
|
33
|
-
Verify 出口满足后读取 [finalize.md](references/finalize.md) 并立即收尾。Finalize 不计入交付阶段,只负责必要的 docs/README 对齐、直接创建当前 issue 的独立 commit 与 Tracker/progress 更新;不执行额外安全扫描、staged diff 复核或 commit message 门禁。若发现实现、测试或文档证据不完整,回到对应阶段修复后再 Finalize。
|
|
34
|
-
|
|
35
|
-
Finalize 出口:commit 已创建、Acceptance Criteria 全部通过,Tracker 与工作区反映真实完成状态。
|
|
36
|
-
|
|
37
|
-
## 运行时纪律
|
|
38
|
-
|
|
39
|
-
- 三个阶段都从入口连续执行到自身出口;Verify 出口满足后立即进入 Finalize:预告下一步后立即执行;进度输出并入工具调用序列,输出后继续执行。只有合规交互点、明确的外部阻塞或阶段出口条件结束当前回合。
|
|
40
|
-
- 一个 seam 是公共可观察边界;一个 Behavior 是一个红-绿 cycle;一个 seam 可以包含多个 Behaviors。Seam/Behavior 的细节和 Todo 粒度只在进入 Step ② 时读取 [red-green.md](references/red-green.md)。
|
|
41
|
-
- 每个 issue 只在 Verify 的最终 diff 稳定后调用一次 `code-review`;审查维度、reviewer 数量、提示词和输出格式全部由 `code-review` 自己定义,`tdd-implement` 不复制这些规则。`code-review` 未完成或存在 blocking finding 时 issue 不得收敛;A3 层收敛不再次调用 review。
|
|
42
|
-
- 当前 issue 的范围、Acceptance Criteria、Out of Scope、测试/typecheck/build/真实运行证据和最终 commit 必须可追溯。Seam 或专项测试绿色不代表 issue 完成;三个阶段出口与 Finalize 全部满足后才可标记 `resolved`。
|
|
43
|
-
- 多 issue 模式中,每个 issue 只提交一个独立 commit;issue 影响范围测试在 Step ③ 执行,A4 只做最终编排收敛,不额外扩大测试范围。
|
|
44
|
-
|
|
45
|
-
## 引用
|
|
46
|
-
|
|
47
|
-
- TDD 核心规则:[tdd 技能](.agents/skills/tdd/SKILL.md)
|
|
48
|
-
- 测试标准:[tdd/tests.md](.agents/skills/tdd/tests.md)
|
|
49
|
-
- Mock 指南:[tdd/mocking.md](.agents/skills/tdd/mocking.md)
|
|
50
|
-
- Contract:[contract.md](references/contract.md)
|
|
51
|
-
- Red-Green:[red-green.md](references/red-green.md)
|
|
52
|
-
- Verify:[verify.md](references/verify.md)
|
|
53
|
-
- Review 方法:[code-review](.agents/skills/code-review/SKILL.md)
|
|
54
|
-
- Finalize:[finalize.md](references/finalize.md)
|
|
55
|
-
- 完整兼容规范:[stages.md](references/stages.md)
|
|
56
|
-
- 多 issue 编排:[orchestration.md](references/orchestration.md)
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Contract
|
|
2
|
-
|
|
3
|
-
仅在 `tdd-implement` Step ① 读取。完整跨阶段规则仍以 `stages.md` 为兼容事实源;本文件只提供 Contract 阶段运行所需内容,避免加载其它阶段。
|
|
4
|
-
|
|
5
|
-
## 操作
|
|
6
|
-
|
|
7
|
-
1. 读取 spec/task、相关 `CONTEXT.md` 与必要 ADR,并使用仓库规定的代码探索入口理解当前实现。
|
|
8
|
-
2. 提取每条 Acceptance Criterion,建立 Scope Ledger:`必须实现 / 明确不做 / 允许触及`。
|
|
9
|
-
3. 将新发现分类为:当前 Behavior 必须修复、当前 issue 新增 Behavior、后续 ticket、无关项;只有前两类进入本次实现。
|
|
10
|
-
4. 做一次 Preflight:记录 `HEAD`、工作区、`BASE_HEAD=$(git rev-parse HEAD)`、test/typecheck/build、可用 subagent/browser、敏感扫描、真实运行验证路径。
|
|
11
|
-
5. 建立一次验证矩阵,后续复用,不重复探测等价命令。
|
|
12
|
-
6. 定义公共 Seam 与 Behaviors:Behavior 必须映射到 Acceptance Criterion,并明确输入、可观察输出和验证层级。
|
|
13
|
-
7. 已确认且未变化的 seam 直接复用;只有歧义、验收缺口、范围变化、破坏性操作或互斥方案才请求用户确认。
|
|
14
|
-
|
|
15
|
-
## 出口
|
|
16
|
-
|
|
17
|
-
- Acceptance Criteria、Scope Ledger 与 Out of Scope 明确;
|
|
18
|
-
- 无待决需求歧义;
|
|
19
|
-
- 验证矩阵和真实运行路径已确定,或明确标为 `blocked/unavailable`;
|
|
20
|
-
- Behaviors/Seams 可追溯;
|
|
21
|
-
- `BASE_HEAD` 已记录。
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Finalize(非阶段)
|
|
2
|
-
|
|
3
|
-
仅在 `tdd-implement` Step ③ Verify 通过后读取。Finalize 不计入交付阶段;开始后不新增产品 Behavior,发现实现、测试或文档遗漏时回到对应阶段。
|
|
4
|
-
|
|
5
|
-
## Commit
|
|
6
|
-
|
|
7
|
-
1. 如本次实现要求 README/docs/config/package 同步,完成必要更新。
|
|
8
|
-
2. 按当前 issue 范围直接创建一个独立 commit。
|
|
9
|
-
3. 不执行额外敏感信息/安全扫描,不做 `git diff --cached` 复核,也不设置额外 commit message 门禁。
|
|
10
|
-
|
|
11
|
-
仓库级 Git 安全与历史保护规则仍然适用;Finalize 不重复定义或扩展这些规则。
|
|
12
|
-
|
|
13
|
-
## Tracker 收尾
|
|
14
|
-
|
|
15
|
-
Commit 成功后:
|
|
16
|
-
|
|
17
|
-
- 勾选 Acceptance Criteria;
|
|
18
|
-
- issue 标记 `resolved`;
|
|
19
|
-
- 写实施总结并同步 `.scratch/<feature>/progress.md` 的 Status/Commit/Review/Tests;
|
|
20
|
-
- 记录 commit hash/message、最终测试和真实运行结果;
|
|
21
|
-
- 确认后续 blockers 是否解除。
|
|
22
|
-
|
|
23
|
-
## 出口
|
|
24
|
-
|
|
25
|
-
- 当前 issue 的独立 commit 已创建;
|
|
26
|
-
- Acceptance Criteria 全部通过;
|
|
27
|
-
- Tracker/progress 与真实完成度一致。
|