@martinffx/atelier 1.3.0 → 2.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/.codex-plugin/plugin.json +27 -0
- package/CHANGELOG.md +38 -0
- package/README.md +164 -136
- package/agents/architect.md +6 -6
- package/agents/oracle.md +1 -1
- package/agents/{recon.md → sentinel.md} +3 -3
- package/dist/atelier.js +14303 -12938
- package/package.json +7 -1
- package/skills/code-commit/SKILL.md +74 -66
- package/skills/code-handoff/SKILL.md +1 -1
- package/skills/code-review/SKILL.md +2 -2
- package/skills/code-review/references/rq.md +3 -3
- package/skills/code-subagents/SKILL.md +44 -75
- package/skills/code-subagents/references/batch-reviewer-prompt.md +44 -0
- package/skills/code-subagents/references/implementor-prompt.md +10 -11
- package/skills/spec-brainstorm/SKILL.md +19 -14
- package/skills/spec-finish/SKILL.md +14 -14
- package/skills/spec-implement/SKILL.md +40 -39
- package/skills/spec-orchestrator/SKILL.md +71 -36
- package/skills/spec-plan/SKILL.md +79 -25
- package/skills/code-subagents/references/code-quality-reviewer-prompt.md +0 -48
- package/skills/code-subagents/references/spec-reviewer-prompt.md +0 -62
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@martinffx/atelier",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Personal development toolkit - spec-driven development, code quality, deep thinking, and ecosystem patterns",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
"cli",
|
|
12
12
|
"claude-code",
|
|
13
13
|
"opencode",
|
|
14
|
+
"codex",
|
|
15
|
+
"cursor",
|
|
14
16
|
"ai-agents",
|
|
15
17
|
"spec-driven-development"
|
|
16
18
|
],
|
|
@@ -19,6 +21,7 @@
|
|
|
19
21
|
"dist/",
|
|
20
22
|
"skills/",
|
|
21
23
|
"agents/",
|
|
24
|
+
".codex-plugin/",
|
|
22
25
|
"README.md",
|
|
23
26
|
"LICENSE",
|
|
24
27
|
"CHANGELOG.md"
|
|
@@ -28,6 +31,8 @@
|
|
|
28
31
|
},
|
|
29
32
|
"scripts": {
|
|
30
33
|
"build": "bun build ./src/atelier.ts --outdir ./dist --target bun",
|
|
34
|
+
"clean": "rm -rf dist .agents .claude .codex .opencode hooks && rm -f *.log .DS_Store",
|
|
35
|
+
"cli": "bun src/atelier.ts",
|
|
31
36
|
"typecheck": "tsgo --noEmit",
|
|
32
37
|
"test": "bun test",
|
|
33
38
|
"prepare": "simple-git-hooks"
|
|
@@ -39,6 +44,7 @@
|
|
|
39
44
|
"commander": "^13.1.0",
|
|
40
45
|
"gray-matter": "^4.0.3",
|
|
41
46
|
"inquirer": "^12.5.2",
|
|
47
|
+
"smol-toml": "^1.7.0",
|
|
42
48
|
"zod": "^3.25.0"
|
|
43
49
|
},
|
|
44
50
|
"devDependencies": {
|
|
@@ -6,75 +6,95 @@ user-invocable: true
|
|
|
6
6
|
|
|
7
7
|
# Conventional Commit Skill
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Create coherent, reviewable commits that follow the
|
|
10
|
+
[Conventional Commits](https://www.conventionalcommits.org/) specification.
|
|
11
|
+
Message syntax matters, but the selected changes must tell one clear story too.
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Message Format
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
<type>(<scope>): <subject>
|
|
15
|
+
Every generated commit has a title and body:
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
```
|
|
18
|
+
<type>(<scope>): <imperative title>
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
<1-5 lines describing the change and, when useful, its reason or effect>
|
|
19
21
|
```
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
Use a lowercase scope that identifies the affected component. The title is concise,
|
|
24
|
+
imperative, lowercase, and has no trailing period. The body is concrete: explain the
|
|
25
|
+
behavior, motivation, or important implementation decision rather than restating the title.
|
|
22
26
|
|
|
23
|
-
| Type |
|
|
24
|
-
|
|
25
|
-
| `feat` | New
|
|
26
|
-
| `fix` |
|
|
27
|
+
| Type | Use for |
|
|
28
|
+
|------|---------|
|
|
29
|
+
| `feat` | New user-facing capability |
|
|
30
|
+
| `fix` | Corrected behavior |
|
|
27
31
|
| `docs` | Documentation only |
|
|
28
|
-
| `style` |
|
|
29
|
-
| `refactor` |
|
|
30
|
-
| `test` |
|
|
31
|
-
| `chore` |
|
|
32
|
+
| `style` | Formatting only |
|
|
33
|
+
| `refactor` | Restructuring without behavior change |
|
|
34
|
+
| `test` | Tests only |
|
|
35
|
+
| `chore` | Maintenance or tooling |
|
|
32
36
|
| `perf` | Performance improvement |
|
|
33
|
-
| `ci` |
|
|
37
|
+
| `ci` | Continuous integration configuration |
|
|
34
38
|
| `build` | Build system or dependencies |
|
|
35
|
-
| `revert` | Reverting a
|
|
39
|
+
| `revert` | Reverting a prior commit |
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
For breaking changes, add `!` after the scope and include a `BREAKING CHANGE:` footer.
|
|
42
|
+
Include issue footers such as `Closes #123` only when the issue is known.
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
- **Scope**: Optional, lowercase, describes what was changed (e.g., `auth`, `api`, `ui`)
|
|
41
|
-
- **Breaking changes**: Add `!` after type/scope: `feat(auth)!: change API`
|
|
42
|
-
- **Footer**: For breaking changes (`BREAKING CHANGE:`) or issue references (`Closes #123`)
|
|
44
|
+
## Create a Commit
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
When the user asks to commit, first inspect the complete worktree:
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
1. Run `git status --short`.
|
|
49
|
+
2. Read both `git diff --cached` and `git diff` so pre-staged work is not mistaken for the entire change.
|
|
50
|
+
3. List untracked files with `git ls-files --others --exclude-standard` and inspect relevant ones.
|
|
51
|
+
4. Read recent subjects with `git log --oneline -10` to match established scopes and wording.
|
|
52
|
+
5. Flag likely secrets, credentials, local configuration, or generated output. Do not stage them without explicit direction.
|
|
47
53
|
|
|
48
|
-
|
|
54
|
+
### Decide Whether to Split
|
|
49
55
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
3. Analyze what changed to determine:
|
|
53
|
-
- **Type**: Which type best describes the changes?
|
|
54
|
-
- **Scope**: What area was affected? (optional)
|
|
55
|
-
- **Subject**: What was done? (imperative: "add" not "added")
|
|
56
|
-
4. Create a conventional commit message
|
|
57
|
-
5. Run `git commit -m "<message>"`
|
|
56
|
+
Default to one commit containing all intended, related changes. Look for an obvious
|
|
57
|
+
file-level split only when changes are independent and each group can stand alone.
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
feat(auth): add JWT token refresh
|
|
59
|
+
Keep these together:
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
- Implementation and its tests.
|
|
62
|
+
- Documentation that describes the same change.
|
|
63
|
+
- Dependency manifests and their lockfiles.
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
Do not invent a split for adjacent work, use hunk-level staging, or force the user
|
|
66
|
+
to reorganize a coherent change. If an obvious split exists, propose each commit with
|
|
67
|
+
its files and full message, then ask once for approval. If not, propose one commit.
|
|
68
|
+
|
|
69
|
+
### Approve, Stage, Commit
|
|
70
|
+
|
|
71
|
+
Before making any write, show:
|
|
72
|
+
|
|
73
|
+
- The files in each proposed commit.
|
|
74
|
+
- The full title and 1-5 line body for each commit.
|
|
75
|
+
- Any excluded files and why they are excluded.
|
|
68
76
|
|
|
69
|
-
|
|
77
|
+
Ask for approval unless the user explicitly authorizes committing immediately. After
|
|
78
|
+
approval, stage only the files for the approved commit with `git add -- <paths>` and
|
|
79
|
+
commit with the proposed title and body. Do not amend, rebase, push, or include
|
|
80
|
+
unapproved files.
|
|
70
81
|
|
|
71
|
-
|
|
82
|
+
Repository commit hooks are the final message validation when configured. Never bypass
|
|
83
|
+
a failing hook. Report the commit hash on success; report the error and leave changes
|
|
84
|
+
intact on failure.
|
|
72
85
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
## Validate a Commit Message
|
|
87
|
+
|
|
88
|
+
When the user asks to validate a message, check:
|
|
89
|
+
|
|
90
|
+
1. It follows `type(scope): imperative title`.
|
|
91
|
+
2. The type is listed above and the scope is lowercase.
|
|
92
|
+
3. The title is lowercase, imperative, concise, and has no trailing period.
|
|
93
|
+
4. A body follows after a blank line and contains 1-5 meaningful lines.
|
|
94
|
+
5. Breaking changes use both `!` and a `BREAKING CHANGE:` footer.
|
|
95
|
+
|
|
96
|
+
Return specific corrections and a revised message. When the repository configures
|
|
97
|
+
commitlint, use it as the authoritative validation rule.
|
|
78
98
|
|
|
79
99
|
### Delegated: Pull Request Creation
|
|
80
100
|
|
|
@@ -87,24 +107,15 @@ or `glab`.
|
|
|
87
107
|
|
|
88
108
|
| Input | Action |
|
|
89
109
|
|-------|--------|
|
|
90
|
-
| User says "commit" or "git commit" |
|
|
110
|
+
| User says "commit" or "git commit" | Inspect the worktree, propose coherent commit(s), then commit after approval |
|
|
91
111
|
| User says "validate commit" | Check the commit message format |
|
|
92
112
|
| User pastes commit message | Validate the provided message |
|
|
93
113
|
|
|
94
|
-
## Auto-Commit Workflow
|
|
95
|
-
|
|
96
|
-
When generating a commit:
|
|
97
|
-
|
|
98
|
-
1. Show the user the commit message first
|
|
99
|
-
2. Ask for confirmation before committing (unless user explicitly says "just do it")
|
|
100
|
-
3. Execute `git commit -m "<message>"` after confirmation
|
|
101
|
-
4. Show the result of the commit
|
|
102
|
-
|
|
103
114
|
## Error Handling
|
|
104
115
|
|
|
105
|
-
- If no
|
|
106
|
-
- If
|
|
107
|
-
- If commit fails:
|
|
116
|
+
- If there are no changes: report that there is nothing to commit.
|
|
117
|
+
- If Git is not initialized: report it; do not initialize a repository unless asked.
|
|
118
|
+
- If a commit fails: show the error, preserve the worktree, and do not bypass hooks.
|
|
108
119
|
|
|
109
120
|
## Examples
|
|
110
121
|
|
|
@@ -113,8 +124,7 @@ When generating a commit:
|
|
|
113
124
|
```
|
|
114
125
|
fix(auth): resolve login timeout issue
|
|
115
126
|
|
|
116
|
-
|
|
117
|
-
incorrect token expiry calculation.
|
|
127
|
+
Correct token expiry calculation so active users are not logged out after five minutes.
|
|
118
128
|
```
|
|
119
129
|
|
|
120
130
|
**Input:** "I added a new API endpoint for users"
|
|
@@ -122,8 +132,7 @@ incorrect token expiry calculation.
|
|
|
122
132
|
```
|
|
123
133
|
feat(api): add user profile endpoint
|
|
124
134
|
|
|
125
|
-
GET /users/:id
|
|
126
|
-
name, email, and avatar URL.
|
|
135
|
+
Expose name, email, and avatar URL from `GET /users/:id`.
|
|
127
136
|
|
|
128
137
|
Closes #89
|
|
129
138
|
```
|
|
@@ -133,8 +142,7 @@ Closes #89
|
|
|
133
142
|
```
|
|
134
143
|
feat(auth)!: change token validation endpoint
|
|
135
144
|
|
|
136
|
-
|
|
137
|
-
instead of query parameter.
|
|
145
|
+
Require a Bearer token on `/auth/verify` instead of a query parameter.
|
|
138
146
|
|
|
139
147
|
BREAKING CHANGE: Clients must update to send
|
|
140
148
|
Authorization header with Bearer token.
|
|
@@ -5,7 +5,7 @@ argument-hint: "What will the next session be used for?"
|
|
|
5
5
|
user-invocable: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Write a handoff document summarising the current conversation so a fresh agent can continue the work.
|
|
8
|
+
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Create `<project-root>/.handoff/` if needed and save the document there with a descriptive `.md` filename.
|
|
9
9
|
|
|
10
10
|
Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.
|
|
11
11
|
|
|
@@ -34,7 +34,7 @@ Use these concrete harness subagent types. If an exact match is unavailable, use
|
|
|
34
34
|
|
|
35
35
|
| `subagent_type` | Purpose |
|
|
36
36
|
|-----------------|---------|
|
|
37
|
-
| `
|
|
37
|
+
| `sentinel` | Triage only: changed-file analysis, context retrieval, reviewer selection |
|
|
38
38
|
| `oracle` | Parallel reviewer personas, evidence-based critique, failure-mode analysis, challenge validation |
|
|
39
39
|
| `architect` | Architecture, design-boundary, data-model, and API-contract review |
|
|
40
40
|
|
|
@@ -67,7 +67,7 @@ Follows [code-subagents](../code-subagents/SKILL.md) patterns:
|
|
|
67
67
|
|
|
68
68
|
| Agent | Used In Step |
|
|
69
69
|
|-------|--------------|
|
|
70
|
-
| `
|
|
70
|
+
| `sentinel` | Triage only (context retrieval, file analysis) |
|
|
71
71
|
| `oracle` | Reviewers and challenge validation |
|
|
72
72
|
| `architect` | Architect (architecture review) |
|
|
73
73
|
|
|
@@ -34,12 +34,12 @@ Capture the list of changed files and the full diff.
|
|
|
34
34
|
|
|
35
35
|
**Purpose:** Analyze diff to determine context, select reviewers, identify relevant skills to look for.
|
|
36
36
|
|
|
37
|
-
**Uses:** `
|
|
37
|
+
**Uses:** `sentinel` agent.
|
|
38
38
|
|
|
39
39
|
### Subagent Invocation
|
|
40
40
|
|
|
41
41
|
```yaml
|
|
42
|
-
subagent_type:
|
|
42
|
+
subagent_type: sentinel
|
|
43
43
|
description: "Triage diff for code review"
|
|
44
44
|
prompt: |
|
|
45
45
|
Analyze this code diff to determine review needs.
|
|
@@ -364,7 +364,7 @@ Display findings in terminal per [output.md](./output.md).
|
|
|
364
364
|
| Step | Subagent | Uses | Parallel? | Purpose |
|
|
365
365
|
|------|----------|------|----------|---------|
|
|
366
366
|
| 1 | Get Diff | inline | — | `git diff <branch>` |
|
|
367
|
-
| 2 | Triage | `
|
|
367
|
+
| 2 | Triage | `sentinel` agent | No | Detect context, select reviewers, identify relevant skills to look for |
|
|
368
368
|
| 3 | Reviewers | `oracle` agent | Yes (per reviewer) | Specialty analysis |
|
|
369
369
|
| 4 | Synthesis | inline | No | Deduplicate and group |
|
|
370
370
|
| 5 | Architect | `architect` agent | No | Architecture review |
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-subagents
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
and integration of results. Trigger when executing plan tasks with subagent support, when
|
|
8
|
-
facing 2+ independent problems, or when the user asks to use subagents for implementation.
|
|
4
|
+
Implementation subagent dispatch patterns. Use when independent implementation work is
|
|
5
|
+
available and subagents can execute it. Covers parallel dispatch, shared-tree patch
|
|
6
|
+
snapshots, one combined review per completed batch, and serial integration.
|
|
9
7
|
user-invocable: false
|
|
10
8
|
---
|
|
11
9
|
|
|
12
|
-
#
|
|
10
|
+
# Implementation Subagents
|
|
13
11
|
|
|
14
|
-
Fresh subagent per task.
|
|
15
|
-
when dependent.
|
|
12
|
+
Fresh subagent per task. One combined review per completed batch. Parallel when independent,
|
|
13
|
+
sequential when dependent.
|
|
16
14
|
|
|
17
15
|
## When to Use Subagents
|
|
18
16
|
|
|
19
17
|
**Use when:**
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
- Each problem can be understood without context from
|
|
18
|
+
- 2+ independent work items do not share state or files
|
|
19
|
+
- Each work item has explicit requirements, constraints, files, and validation
|
|
20
|
+
- Each problem can be understood without context from the other work items
|
|
23
21
|
|
|
24
22
|
**Don't use when:**
|
|
25
23
|
- Tasks are tightly coupled (editing the same files)
|
|
@@ -53,6 +51,13 @@ Task C (notification tests) ──→ review → complete
|
|
|
53
51
|
**Independence check:** Would fixing Task A affect Task B? Would they edit the same files?
|
|
54
52
|
If no to both, dispatch in parallel.
|
|
55
53
|
|
|
54
|
+
For shared-tree parallel work:
|
|
55
|
+
|
|
56
|
+
1. Assign each task an exclusive file list before dispatch
|
|
57
|
+
2. Do not let implementers stage or commit changes
|
|
58
|
+
3. Capture a path-scoped `git diff` for each task when it reports completion
|
|
59
|
+
4. Run tasks sequentially if their file ownership overlaps or cannot be isolated
|
|
60
|
+
|
|
56
61
|
---
|
|
57
62
|
|
|
58
63
|
## Prompt Templates
|
|
@@ -60,15 +65,14 @@ If no to both, dispatch in parallel.
|
|
|
60
65
|
Use these templates when dispatching subagents. Each template is battle-tested — don't
|
|
61
66
|
improvise, use them as-is and fill in the variables.
|
|
62
67
|
|
|
63
|
-
- **[references/
|
|
64
|
-
- **[references/
|
|
65
|
-
- **[references/code-quality-reviewer-prompt.md](references/code-quality-reviewer-prompt.md)** — Code quality review. Critical/Important/Minor severity.
|
|
68
|
+
- **[references/implementor-prompt.md](references/implementor-prompt.md)** — Dispatch an implementer. Includes self-review checklist.
|
|
69
|
+
- **[references/batch-reviewer-prompt.md](references/batch-reviewer-prompt.md)** — Combined plan and code-quality review for one completed batch.
|
|
66
70
|
|
|
67
71
|
### Prompt quality rules
|
|
68
72
|
|
|
69
73
|
- **Focused** — one task, one problem domain
|
|
70
|
-
- **Self-contained** — all context needed is in the prompt.
|
|
71
|
-
|
|
74
|
+
- **Self-contained** — all context needed is in the prompt. Provide the complete work-item
|
|
75
|
+
requirements; do not make the subagent recover context
|
|
72
76
|
- **Specific about files** — exact paths, not "the relevant files"
|
|
73
77
|
- **Specific about output** — what should the subagent return?
|
|
74
78
|
- **Constrained** — what should they NOT touch?
|
|
@@ -84,63 +88,30 @@ improvise, use them as-is and fill in the variables.
|
|
|
84
88
|
|
|
85
89
|
---
|
|
86
90
|
|
|
87
|
-
##
|
|
88
|
-
|
|
89
|
-
Every completed task gets two reviews in order. Do not skip either. Do not reverse the order.
|
|
90
|
-
|
|
91
|
-
### Stage 1: Spec Compliance
|
|
92
|
-
|
|
93
|
-
Does the implementation match what was specified?
|
|
91
|
+
## Batch Review
|
|
94
92
|
|
|
95
|
-
|
|
96
|
-
## Spec Review
|
|
93
|
+
Run one combined review after every completed batch, not separate reviews for each task.
|
|
97
94
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
**Task spec:** [paste task from plan.json]
|
|
101
|
-
|
|
102
|
-
**Files changed:** [list from subagent output]
|
|
103
|
-
|
|
104
|
-
Check:
|
|
105
|
-
1. Are all requirements from the task spec implemented?
|
|
106
|
-
2. Is anything implemented that wasn't specified? (over-building)
|
|
107
|
-
3. Do tests cover the specified acceptance criteria?
|
|
108
|
-
4. Does the implementation match the design in design.md?
|
|
109
|
-
|
|
110
|
-
Report: List any gaps or extras. Mark ✅ if compliant, ❌ if not.
|
|
111
|
-
```
|
|
95
|
+
Give one fresh reviewer:
|
|
112
96
|
|
|
113
|
-
|
|
114
|
-
|
|
97
|
+
- The complete requirements for work items in the batch
|
|
98
|
+
- The relevant constraints
|
|
99
|
+
- The path-scoped patch captured for each task
|
|
100
|
+
- The implementers' reports and validation results
|
|
115
101
|
|
|
116
|
-
|
|
102
|
+
The reviewer checks both requirements compliance and code quality:
|
|
117
103
|
|
|
118
|
-
|
|
104
|
+
1. Every requirement and acceptance criterion is implemented
|
|
105
|
+
2. The batch follows the supplied constraints
|
|
106
|
+
3. No unrequested work or out-of-scope files are included
|
|
107
|
+
4. Tests are meaningful and cover the right boundaries
|
|
108
|
+
5. The code follows existing patterns without unnecessary complexity
|
|
119
109
|
|
|
120
|
-
|
|
121
|
-
## Code Quality Review
|
|
110
|
+
Use [references/batch-reviewer-prompt.md](references/batch-reviewer-prompt.md) as written.
|
|
122
111
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
Check:
|
|
128
|
-
1. Does the code follow existing patterns and conventions?
|
|
129
|
-
2. Are tests meaningful (not just asserting true)?
|
|
130
|
-
3. Is there unnecessary complexity?
|
|
131
|
-
4. Are edge cases handled?
|
|
132
|
-
5. Is the code clean (no dead code, no unnecessary comments)?
|
|
133
|
-
|
|
134
|
-
Rate issues as Critical (blocks merge), Important (should fix), or Minor (nice to have).
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
If the quality reviewer finds Critical or Important issues → implementer fixes → reviewer
|
|
138
|
-
reviews again. Minor issues can be noted and moved past.
|
|
139
|
-
|
|
140
|
-
### Why this order matters
|
|
141
|
-
|
|
142
|
-
Spec compliance first because there's no point polishing code that doesn't meet the spec.
|
|
143
|
-
Quality second because compliant code still needs to be well-built.
|
|
112
|
+
If the reviewer finds Critical or Important issues, send each issue back to the relevant
|
|
113
|
+
implementer, refresh its path-scoped patch, and review the batch again. Minor issues may be
|
|
114
|
+
noted and moved past.
|
|
144
115
|
|
|
145
116
|
---
|
|
146
117
|
|
|
@@ -161,9 +132,11 @@ they're thinking rather than guessing.
|
|
|
161
132
|
After subagents complete (especially parallel dispatch):
|
|
162
133
|
|
|
163
134
|
1. **Read each summary** — understand what changed
|
|
164
|
-
2. **
|
|
165
|
-
3. **
|
|
166
|
-
4. **
|
|
135
|
+
2. **Capture task patches** — use each task's exclusive file list
|
|
136
|
+
3. **Review the batch** — one combined requirements and quality review
|
|
137
|
+
4. **Run full test suite** — verify all changes work together
|
|
138
|
+
5. **Commit** — the coordinator commits the reviewed batch serially
|
|
139
|
+
6. **Update progress tracking** — when the caller uses it
|
|
167
140
|
|
|
168
141
|
If there are conflicts between parallel results, resolve them manually. Don't dispatch
|
|
169
142
|
another subagent to merge — that requires too much context.
|
|
@@ -176,9 +149,5 @@ If a subagent fails a task:
|
|
|
176
149
|
|
|
177
150
|
- **Don't fix it manually** — that pollutes your context
|
|
178
151
|
- **Dispatch a fix subagent** with specific instructions about what went wrong
|
|
179
|
-
- **If it fails twice**, stop and escalate to the human. The
|
|
180
|
-
|
|
181
|
-
If failure reveals a design problem:
|
|
182
|
-
|
|
183
|
-
> "This task is failing because [reason]. The design in design.md may need to change.
|
|
184
|
-
> Want me to go back to spec-brainstorm?"
|
|
152
|
+
- **If it fails twice**, stop and escalate to the human. The requirements or constraints may
|
|
153
|
+
need revision.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Batch Reviewer Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template after all tasks in an implementation batch report completion. Review the
|
|
4
|
+
captured task patches, not a commit range.
|
|
5
|
+
|
|
6
|
+
## Template
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
You are reviewing one completed implementation batch for requirements compliance and code quality.
|
|
10
|
+
|
|
11
|
+
## Batch Requirements
|
|
12
|
+
|
|
13
|
+
{BATCH_REQUIREMENTS}
|
|
14
|
+
|
|
15
|
+
## Constraints
|
|
16
|
+
|
|
17
|
+
{CONSTRAINTS}
|
|
18
|
+
|
|
19
|
+
## Task Patches
|
|
20
|
+
|
|
21
|
+
{BATCH_PATCHES}
|
|
22
|
+
|
|
23
|
+
## Implementer Reports and Validation
|
|
24
|
+
|
|
25
|
+
{IMPLEMENTER_REPORTS}
|
|
26
|
+
|
|
27
|
+
## CRITICAL: Verify the Patches
|
|
28
|
+
|
|
29
|
+
Do not trust the implementer reports. Review the captured patches and relevant code directly.
|
|
30
|
+
|
|
31
|
+
Check:
|
|
32
|
+
1. Every requirement and acceptance criterion is implemented
|
|
33
|
+
2. The implementation follows the supplied constraints
|
|
34
|
+
3. No unrequested work or out-of-scope files are included
|
|
35
|
+
4. Tests are meaningful and cover the right boundaries
|
|
36
|
+
5. The code follows existing patterns without unnecessary complexity
|
|
37
|
+
6. Error cases and edge conditions are handled
|
|
38
|
+
|
|
39
|
+
## Report
|
|
40
|
+
|
|
41
|
+
- **Strengths:** What was done well
|
|
42
|
+
- **Issues:** Critical, Important, or Minor findings with file:line references and fixes
|
|
43
|
+
- **Assessment:** Approved, Approved with minor issues, or Changes requested
|
|
44
|
+
```
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# Implementer Prompt Template
|
|
2
2
|
|
|
3
|
-
Use this template when dispatching an implementer subagent. Paste the
|
|
4
|
-
|
|
3
|
+
Use this template when dispatching an implementer subagent. Paste the complete work-item
|
|
4
|
+
requirements. Do not make the subagent recover context.
|
|
5
5
|
|
|
6
6
|
## Template
|
|
7
7
|
|
|
8
8
|
```
|
|
9
|
-
You are implementing
|
|
9
|
+
You are implementing {WORK_ITEM_NAME}
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Work Item Requirements
|
|
12
12
|
|
|
13
|
-
{
|
|
13
|
+
{WORK_ITEM_REQUIREMENTS}
|
|
14
14
|
|
|
15
15
|
## Context
|
|
16
16
|
|
|
17
|
-
{Scene-setting: where this fits in the
|
|
18
|
-
|
|
17
|
+
{Scene-setting: where this fits in the work, what was built before it, constraints, and
|
|
18
|
+
existing patterns to follow}
|
|
19
19
|
|
|
20
20
|
## Before You Begin
|
|
21
21
|
|
|
@@ -33,9 +33,8 @@ Once you're clear on requirements:
|
|
|
33
33
|
1. Implement exactly what the task specifies
|
|
34
34
|
2. Write tests following TDD (failing test → verify fail → implement → verify pass)
|
|
35
35
|
3. Verify implementation works
|
|
36
|
-
4.
|
|
37
|
-
5.
|
|
38
|
-
6. Report back
|
|
36
|
+
4. Self-review (see below)
|
|
37
|
+
5. Report back. Do not commit; the coordinator integrates and commits reviewed work serially.
|
|
39
38
|
|
|
40
39
|
Work from: {WORKING_DIRECTORY}
|
|
41
40
|
|
|
@@ -47,7 +46,7 @@ It's always OK to pause and clarify. Don't guess or make assumptions.
|
|
|
47
46
|
Review your work with fresh eyes:
|
|
48
47
|
|
|
49
48
|
**Completeness:**
|
|
50
|
-
- Did I fully implement
|
|
49
|
+
- Did I fully implement every requirement?
|
|
51
50
|
- Did I miss any requirements?
|
|
52
51
|
- Are there edge cases I didn't handle?
|
|
53
52
|
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-brainstorm
|
|
3
3
|
description: >
|
|
4
|
-
Conversational design workshop for
|
|
4
|
+
Conversational design workshop for substantial work. Interviews the human one question
|
|
5
5
|
at a time, explores 2-3 approaches with trade-offs, and presents the design
|
|
6
6
|
section by section for approval before writing the spec. Combines requirements
|
|
7
7
|
discovery with codebase research and architecture design.
|
|
8
|
-
Use when the user
|
|
9
|
-
|
|
8
|
+
Use when the user explicitly requests a spec or when spec-orchestrator selects a
|
|
9
|
+
Spec-backed Plan. Ambiguous design or discovery requests route through spec-orchestrator.
|
|
10
10
|
user-invocable: true
|
|
11
11
|
argument-hint: <topic or feature description>
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
# Spec Brainstorm
|
|
15
15
|
|
|
16
|
-
Conversational design workshop that produces a focused, reviewed spec.
|
|
16
|
+
Conversational design workshop for substantial work that produces a focused, reviewed spec.
|
|
17
17
|
|
|
18
18
|
One question at a time. Multiple approaches explored. Design approved in
|
|
19
19
|
sections. Ruthless scope control. No implementation until design is approved.
|
|
20
20
|
|
|
21
|
+
Run this skill only after `spec-orchestrator` selects a Spec-backed Plan or the human
|
|
22
|
+
explicitly requests a spec. Bounded work should go directly to `spec-plan` for an Inline
|
|
23
|
+
Plan. Do not reclassify the planning mode here.
|
|
24
|
+
|
|
21
25
|
## Artifact
|
|
22
26
|
|
|
23
27
|
```
|
|
@@ -33,11 +37,11 @@ Requirements are inline — no separate requirements.json needed.
|
|
|
33
37
|
|
|
34
38
|
These principles apply to every spec, every time.
|
|
35
39
|
|
|
36
|
-
###
|
|
40
|
+
### Specs must earn their cost
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
Persisted specs are for work whose discovery, architecture, dependencies, or coordination
|
|
43
|
+
needs justify a durable artifact. Do not pull bounded work into this workflow merely because
|
|
44
|
+
it touches multiple files or takes time. That work belongs in an Inline Plan.
|
|
41
45
|
|
|
42
46
|
### Design for isolation and clarity
|
|
43
47
|
|
|
@@ -54,8 +58,9 @@ changes.
|
|
|
54
58
|
### Decomposition
|
|
55
59
|
|
|
56
60
|
If the request describes multiple independent subsystems, flag it immediately. Decompose
|
|
57
|
-
into sub-projects before diving into details. Each sub-project gets its own spec
|
|
58
|
-
|
|
61
|
+
into sub-projects before diving into details. Each substantial sub-project gets its own spec
|
|
62
|
+
and plan; bounded sub-projects can use Inline Plans. A spec that tries to cover three
|
|
63
|
+
subsystems helps no one.
|
|
59
64
|
|
|
60
65
|
### YAGNI ruthlessly
|
|
61
66
|
|
|
@@ -330,16 +335,16 @@ note them at handoff.
|
|
|
330
335
|
**Tell the human:**
|
|
331
336
|
|
|
332
337
|
> "Spec written to `docs/specs/<path>`. Every section was approved during our
|
|
333
|
-
> conversation
|
|
334
|
-
>
|
|
338
|
+
> conversation - review it if you'd like, or we can go straight to the
|
|
339
|
+
> Spec-backed Plan. Ready for spec-plan?"
|
|
335
340
|
|
|
336
341
|
If the human requests changes — in conversation or by annotating the file —
|
|
337
342
|
address every note, update the spec, and re-run the self-review. If a change
|
|
338
343
|
alters the substance of an approved section, re-present that section for
|
|
339
344
|
approval before continuing.
|
|
340
345
|
|
|
341
|
-
The next step is **spec-plan
|
|
342
|
-
go-ahead. Do not write code.
|
|
346
|
+
The next step is **spec-plan** in Spec-backed mode. Do not start planning without the
|
|
347
|
+
human's go-ahead. Do not write code.
|
|
343
348
|
|
|
344
349
|
If planning reveals design flaws, loop back to research. See **spec-orchestrator**
|
|
345
350
|
for iteration patterns.
|