nitm-ai-dev-toolkit 5.2.0 → 5.2.1
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/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/src/monorepo/.claude/agents-snippets/implementer.md +5 -1
- package/src/monorepo/.claude/commands/bootstrap-patch.md +2 -2
- package/src/monorepo/.claude/commands/constitution.md +1 -1
- package/src/monorepo/.claude/commands/create-skill.md +1 -1
- package/src/monorepo/.claude/commands/implement-feature.md +2 -2
- package/src/monorepo/.claude/commands/implement-fixes.md +1 -1
- package/src/monorepo/.claude/commands/implement.md +1 -1
- package/src/monorepo/.claude/commands/plan.md +1 -1
- package/src/monorepo/.claude/prompt-snippets/assign-tasks.md +3 -2
- package/src/monorepo/.claude/prompt-snippets/bootstrap-patch.md +15 -10
- package/src/monorepo/.claude/prompt-snippets/constitution.md +7 -1
- package/src/monorepo/.claude/prompt-snippets/create-skill.md +10 -0
- package/src/monorepo/.claude/prompt-snippets/implement-feature.md +38 -57
- package/src/monorepo/.claude/prompt-snippets/implement-fixes.md +31 -40
- package/src/monorepo/.claude/prompt-snippets/implement.md +93 -35
- package/src/monorepo/.claude/prompt-snippets/plan.md +19 -1
- package/src/monorepo/.claude/prompt-snippets/tasks.md +5 -5
- package/src/monorepo/.claude/rules-snippets/documentation.md +9 -1
- package/src/monorepo/.claude/rules-snippets/subagent-workflow.md +13 -0
- package/src/monorepo/.cursor/commands/bootstrap-patch.md +1 -1
- package/src/monorepo/.cursor/commands/implement-feature.md +1 -1
- package/src/monorepo/.github/prompts/bootstrap-patch.prompt.md +1 -1
- package/src/monorepo/.github/prompts/constitution.prompt.md +1 -0
- package/src/monorepo/.github/prompts/create-skill.prompt.md +1 -0
- package/src/monorepo/.github/prompts/implement-feature.prompt.md +1 -1
- package/src/monorepo/.github/prompts/plan.prompt.md +1 -0
- package/src/monorepo/.opencode/commands/bootstrap-patch.md +1 -1
- package/src/monorepo/.opencode/commands/implement-feature.md +1 -1
- package/src/monorepo/AGENTS.md +4 -0
- package/src/repo/.claude/agents-snippets/implementer.md +5 -1
- package/src/repo/.claude/commands/bootstrap-patch.md +2 -2
- package/src/repo/.claude/commands/constitution.md +1 -1
- package/src/repo/.claude/commands/create-skill.md +1 -1
- package/src/repo/.claude/commands/implement-feature.md +2 -2
- package/src/repo/.claude/commands/implement-fixes.md +1 -1
- package/src/repo/.claude/commands/implement.md +1 -1
- package/src/repo/.claude/commands/plan.md +1 -1
- package/src/repo/.claude/prompt-snippets/assign-tasks.md +3 -2
- package/src/repo/.claude/prompt-snippets/bootstrap-patch.md +15 -10
- package/src/repo/.claude/prompt-snippets/constitution.md +7 -1
- package/src/repo/.claude/prompt-snippets/create-skill.md +10 -0
- package/src/repo/.claude/prompt-snippets/implement-feature.md +37 -58
- package/src/repo/.claude/prompt-snippets/implement-fixes.md +33 -34
- package/src/repo/.claude/prompt-snippets/implement.md +93 -35
- package/src/repo/.claude/prompt-snippets/plan.md +19 -3
- package/src/repo/.claude/prompt-snippets/tasks.md +6 -6
- package/src/repo/.claude/rules-snippets/documentation.md +11 -1
- package/src/repo/.claude/rules-snippets/subagent-workflow.md +13 -0
- package/src/repo/.cursor/commands/bootstrap-patch.md +1 -1
- package/src/repo/.cursor/commands/implement-feature.md +1 -1
- package/src/repo/.github/prompts/bootstrap-patch.prompt.md +2 -2
- package/src/repo/.github/prompts/constitution.prompt.md +1 -1
- package/src/repo/.github/prompts/create-skill.prompt.md +1 -1
- package/src/repo/.github/prompts/implement-feature.prompt.md +2 -2
- package/src/repo/.github/prompts/implement-fixes.prompt.md +1 -1
- package/src/repo/.github/prompts/implement.prompt.md +1 -1
- package/src/repo/.github/prompts/plan.prompt.md +1 -1
- package/src/repo/.opencode/commands/bootstrap-patch.md +1 -1
- package/src/repo/.opencode/commands/implement-feature.md +1 -1
- package/src/repo/AGENTS.md +5 -1
|
@@ -1,51 +1,109 @@
|
|
|
1
|
-
|
|
1
|
+
# Implement
|
|
2
|
+
|
|
3
|
+
You are the orchestrator for this implementation. You derive the acceptance criteria from the supplied task, delegate the build, get an independent review, verify the evidence yourself, and decide whether the work is accepted. Only the orchestrator accepts work, and only when the loop below says so. Accepting does not commit: the calling flow decides that.
|
|
2
4
|
|
|
3
5
|
## Orchestrator Checkpoint
|
|
4
6
|
|
|
5
|
-
> **🛑 Before starting**:
|
|
6
|
-
>
|
|
7
|
-
>
|
|
8
|
-
> `dispatching-parallel-agents` skill
|
|
9
|
-
> See `.claude/rules-snippets/subagent-workflow.md` for full patterns.
|
|
7
|
+
> **🛑 Before starting**: Every task or fix runs the delivery loop below. Dispatch the builder directly
|
|
8
|
+
> with this loop. Do not route through a planning skill, and do not write a spec or plan first.
|
|
9
|
+
> For 3+ independent `[P]` tasks that touch disjoint files, the loops may run concurrently with the
|
|
10
|
+
> `dispatching-parallel-agents` skill. Each task still runs its own loop.
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
+
## Roles
|
|
13
|
+
|
|
14
|
+
| Role | Agent | Rules |
|
|
15
|
+
| ------------ | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| Orchestrator | this session | Derives the acceptance criteria, dispatches, verifies, decides. Only the orchestrator accepts work or ticks tasks as accepted. |
|
|
17
|
+
| Builder | `fixer` (bounded) or `implementer` where the harness has it; `feature-builder` for complex builds | Reproduces, builds, repairs and reports evidence. Never approves its own work. Its internal self-review, and any reviewer it dispatches, do not count as the independent review. |
|
|
18
|
+
| Reviewer | `reviewer`, or any read-only agent given the reviewer brief | Reads the original task, the diff, the untracked files and the checks. Never edits. |
|
|
19
|
+
| Oracle | `oracle` | Advises on approach or root cause before a build. Does not build or review. |
|
|
20
|
+
|
|
21
|
+
## Delivery Loop
|
|
22
|
+
|
|
23
|
+
The loop repeats until it reaches an exit. It is not a single pass, and it has no fixed round limit.
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
build → verify → review → decide ─┬─ accept (review PASS, every requirement verified, every required check passing)
|
|
27
|
+
▲ ├─ blocked (stop and report; never accepted)
|
|
28
|
+
└──── repair (any gap) ─────────┤─ needs user decision (stop and report; never accepted)
|
|
29
|
+
└─ (anything else loops back to build)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 1. Task, checks and baseline (orchestrator)
|
|
33
|
+
|
|
34
|
+
- The original supplied task (request, task list entry, or fix description) is the requirement. Keep its text and give it to the builder and the reviewer unchanged. Do not require a new spec or plan first, and do not write one.
|
|
35
|
+
- Turn every requirement in the supplied task into an acceptance criterion, `AC-1`, `AC-2`, ... There is no fixed count: one criterion per requirement, however many there are. Do not add requirements the task does not state.
|
|
36
|
+
- Each AC names its check. Discover the real checks; do not assume them. Read the project's manifests (for example `package.json` scripts, `Makefile`, `pyproject.toml`, `Cargo.toml`, `go.mod`), its CI configuration (for example `.github/workflows`), its README, and `AGENTS.md`. Use the commands the project actually runs.
|
|
37
|
+
- A documentation criterion may be checked by direct inspection: open the file and confirm the content, and quote what you found as evidence.
|
|
38
|
+
- A required check that cannot be discovered, or cannot be run, is a gap. It is not a pass, and it is not a bypass. Stop and ask the user for the command (see the Blocked exit in step 5).
|
|
39
|
+
- Ask only when the task is unclear in a way that changes what gets built: two readings lead to different code, or a needed fact is missing. Ask one targeted question, offering the options, and wait.
|
|
40
|
+
- Take a baseline snapshot once, before any build. It is a plain copy of the state the task starts from, kept in a temporary directory outside the repository:
|
|
41
|
+
- `git rev-parse HEAD`: the base commit.
|
|
42
|
+
- `git status --porcelain > <tmp>/baseline/status.txt`: which files were already changed, staged or untracked.
|
|
43
|
+
- `git diff --binary HEAD > <tmp>/baseline/tracked.patch`: a record of the preexisting tracked changes, staged and unstaged. It is for reference only. The review never subtracts it.
|
|
44
|
+
- A copy of the content of every preexisting dirty tracked file and every preexisting untracked file, under `<tmp>/baseline/files/<path>`.
|
|
45
|
+
- Preexisting untracked files the task would change are out of scope until the user agrees to that scope. If the task must touch one, stop before the overlap, ask, and continue only with the agreed scope. Hashes alone do not show which lines changed, so the saved copy is the comparison point.
|
|
46
|
+
|
|
47
|
+
### 2. Build or repair (builder)
|
|
48
|
+
|
|
49
|
+
**Round 1 (build):** dispatch one builder, directly, with the original task text, the AC list, the discovered checks, the base commit, and the baseline snapshot. The builder must:
|
|
50
|
+
|
|
51
|
+
- For a bug, first write a failing test that reproduces it, and watch it fail for the right reason. Then make the minimal change that passes it. For a feature, follow TDD: failing test, minimal code, then refactor. Keep the diff as small as the task allows.
|
|
52
|
+
- Leave all its changes uncommitted and unstaged, including new files, so the review sees them. Do not commit.
|
|
53
|
+
- Report each AC as `pass` with the command and result, or `not verified` with the reason. List every changed and new file.
|
|
54
|
+
- Report `BLOCKED` with the decision the human must make if the task cannot be built as written.
|
|
12
55
|
|
|
13
|
-
|
|
56
|
+
**Later rounds (repair):** dispatch the same builder again with only the open items: every blocking review item, every AC that is not `pass`, and every check that failed or did not run. It must fix each item, or say in its report why it should stand. It must not expand scope.
|
|
14
57
|
|
|
15
|
-
|
|
16
|
-
- Review `AGENTS.md` for coding patterns
|
|
17
|
-
- Check relevant documentation in `docs/`
|
|
58
|
+
### 3. Verify (orchestrator)
|
|
18
59
|
|
|
19
|
-
|
|
60
|
+
Every round, run every check that covers an AC, using the commands from step 1. Treat the builder's report as a lead, not as evidence. For each AC, record `pass` with the command and result from this round, or `not verified` or `fail` with the reason. Docs criteria are recorded with the quoted content.
|
|
20
61
|
|
|
21
|
-
|
|
22
|
-
- Understand dependencies between tasks
|
|
23
|
-
- Note testing requirements
|
|
24
|
-
- **Parallelization check**: Identify `[P]` tasks and group independent work by domain
|
|
25
|
-
- Tasks touching different files with no shared state → dispatch in parallel
|
|
62
|
+
### 4. Review (reviewer, read-only)
|
|
26
63
|
|
|
27
|
-
|
|
64
|
+
Every round, after verify, dispatch the reviewer on the current working tree. Give it the original supplied task text, the AC list, this round's check results, the base commit, and the baseline snapshot. Its review scope covers the whole task, and it compares content, not patches:
|
|
28
65
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- Add appropriate comments and documentation
|
|
66
|
+
- Tracked file that was clean at baseline: `git diff --binary HEAD -- <file>`, which covers staged and unstaged changes.
|
|
67
|
+
- Tracked file that was dirty at baseline: compare the current file with its saved copy under `<tmp>/baseline/files/<path>`.
|
|
68
|
+
- New untracked file: read each one in full.
|
|
69
|
+
- Preexisting untracked file: compare it with its saved copy, and only if the user agreed to the scope (step 1).
|
|
34
70
|
|
|
35
|
-
|
|
36
|
-
- Dispatch **Reviewer** agent after implementation, before marking work complete
|
|
37
|
-
- Use `verification-before-completion` skill for final quality check
|
|
71
|
+
The reviewer's rules:
|
|
38
72
|
|
|
39
|
-
|
|
73
|
+
- Read-only. Do not edit files, format code, stage, or commit.
|
|
74
|
+
- The first line of the reply is exactly `VERDICT: PASS` or `VERDICT: CHANGES`.
|
|
75
|
+
- `VERDICT: CHANGES` needs at least one blocking item, each with `file:line`, the problem, and the specific fix. Blocking means a correctness issue, a failing check, a requirement with no test or evidence, or a clear convention break. Taste goes in non-blocking notes.
|
|
76
|
+
- Check each requirement of the original task, not only the diff. A requirement with no coverage is a blocking item.
|
|
40
77
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
78
|
+
### 5. Decide (orchestrator)
|
|
79
|
+
|
|
80
|
+
Pick one outcome per round:
|
|
81
|
+
|
|
82
|
+
- **Repair (back to step 2):** the review is `VERDICT: CHANGES`, **or** any AC is `not verified` or `fail`, **or** a required check failed or did not run. Send the open items to the builder, then run steps 3, 4 and 5 again on the current tree.
|
|
83
|
+
- **Accept (exit):** all of these hold on this round's verify and review: the review is `VERDICT: PASS`; every requirement has an AC marked `pass` with evidence from this round; every required check ran and passed; an independent reviewer produced the verdict; and the builder did not report `BLOCKED`. Then report `ACCEPTED` with the AC evidence. A review PASS alone never accepts.
|
|
84
|
+
- **Blocked (exit):** the builder reports `BLOCKED`, or a required check cannot be discovered or run, or no independent reviewer is available. Stop, report `BLOCKED` with the blocker and what would unblock it. Never mark blocked work accepted.
|
|
85
|
+
- **Needs user decision (exit):** the task is unclear in a way only the user can settle. Stop, report `NOT ACCEPTED: needs decision` with the question. This is not acceptance.
|
|
86
|
+
|
|
87
|
+
No other exit exists. An unmet requirement, a failing check, or a `not verified` result always loops back to repair. There is no round limit to escape the loop.
|
|
88
|
+
|
|
89
|
+
### Commit (only when the calling flow asks)
|
|
90
|
+
|
|
91
|
+
The loop never commits by itself. Accepting reports the result; it does not create a commit. The calling command decides whether accepted work is committed, and only when its own flow says so and the user has not asked otherwise. When it does commit:
|
|
92
|
+
|
|
93
|
+
- Stage only the paths this task changed, taken from the builder's list and checked against the baseline. Never `git add -A`, and never stage a preexisting or foreign change.
|
|
94
|
+
- Skip the commit when nothing is staged. Do not create empty commits, and do not create a separate commit for each repair round.
|
|
95
|
+
|
|
96
|
+
### Limits
|
|
97
|
+
|
|
98
|
+
- **No independent reviewer means BLOCKED.** The orchestrator may run its own verify and report the evidence, but it cannot accept the work on its own review. Report `BLOCKED`, and stop.
|
|
99
|
+
- A self-review is never presented as an independent review.
|
|
100
|
+
|
|
101
|
+
## Your Task
|
|
44
102
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
103
|
+
1. **Analyze**: identify the files to create or modify, the dependencies between tasks, and the `[P]` tasks.
|
|
104
|
+
Dispatch `[P]` tasks in parallel only when they touch different files with no shared state. Otherwise keep them sequential.
|
|
105
|
+
2. **Run the delivery loop** for each task, in dependency order, until it exits as accepted, blocked, or needs a user decision.
|
|
106
|
+
3. **Track progress**: tick a task only after the orchestrator accepts it. Report blockers and summarize the accepted changes.
|
|
49
107
|
|
|
50
108
|
## Guidelines
|
|
51
109
|
|
|
@@ -53,4 +111,4 @@ You are helping to implement features based on a task list or specification.
|
|
|
53
111
|
- Keep changes focused and atomic
|
|
54
112
|
- Write tests for new functionality
|
|
55
113
|
- Update documentation as needed
|
|
56
|
-
- Use conventional commit messages
|
|
114
|
+
- Use conventional commit messages when a commit is requested
|
|
@@ -5,15 +5,19 @@ You are helping to create an implementation plan for a feature or requirement.
|
|
|
5
5
|
> **🛑 Before starting**: For complex features spanning multiple domains (backend + frontend + API + docs),
|
|
6
6
|
> dispatch **Researcher** subagents in parallel to analyze each domain simultaneously.
|
|
7
7
|
> Use the `writing-plans` skill for structured plan creation.
|
|
8
|
+
> For this command, the artifact-only scope, source preservation, template and review gates below override that skill's execution handoff, worktree and commit procedures. Stop after reporting the accepted artifacts.
|
|
8
9
|
> See `.claude/rules-snippets/subagent-workflow.md` for full patterns.
|
|
9
10
|
|
|
10
11
|
## Your Task
|
|
11
12
|
|
|
12
13
|
1. **Load context**:
|
|
13
14
|
|
|
15
|
+
- Use the supplied requirement as sufficient input. Ask targeted questions only when the request is unclear; do not require creating a specification first.
|
|
14
16
|
- Read `AGENTS.md` for project architecture and patterns
|
|
15
17
|
- Review `docs/constitution.md` for project principles (if exists)
|
|
16
|
-
-
|
|
18
|
+
- If an existing specification is available at `apps/{{APP_NAME}}/docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/spec.md`, read it as optional context.
|
|
19
|
+
- Without an existing specification, persist the original supplied requirements and acceptance criteria verbatim in `plan.md` under **Requirements Source** and **Acceptance Criteria**, including the source path or issue key when available. Preserve constraints; label any derived criteria or assumptions separately and ask the user about unclear or missing criteria rather than inventing approval. This plan is the durable requirements source for `/tasks` and `/assign-tasks`.
|
|
20
|
+
- With an existing specification, link to its requirements and acceptance criteria instead of duplicating them. Surface conflicts with the supplied request to the user before proceeding.
|
|
17
21
|
- Check relevant existing code for patterns to follow
|
|
18
22
|
|
|
19
23
|
2. **Analyze the requirement**:
|
|
@@ -39,6 +43,14 @@ You are helping to create an implementation plan for a feature or requirement.
|
|
|
39
43
|
- Include estimated complexity and effort
|
|
40
44
|
- List any open questions or decisions needed
|
|
41
45
|
|
|
46
|
+
5. **Review and Accept Planning Artifacts**:
|
|
47
|
+
- The orchestrator dispatches an independent, read-only reviewer with the original request, requirements/context, plan and any additional artifact paths. Review the actual artifacts for completeness, dependencies/order, actionability, and coverage of the request; return `VERDICT: PASS` or `VERDICT: CHANGES` with blocking findings and section references.
|
|
48
|
+
- Repair blocking findings within the agreed scope, repeat affected artifact checks, and re-review the changed artifacts independently. Repeat until PASS or blocked; unresolved decisions go to the user.
|
|
49
|
+
- Only the orchestrator accepts, after an independent PASS and evidence for every requirement and applicable artifact check. If an independent reviewer is unavailable, report BLOCKED; self-review cannot substitute for independent acceptance.
|
|
50
|
+
- This is a lightweight artifact review, not a code build loop: do not implement the plan, run runtime build/TDD/git procedures, or add commit, push, or apply steps. Keep any required human approval separate from artifact acceptance.
|
|
51
|
+
|
|
52
|
+
6. **Report completion** only after artifact acceptance, with the plan path, artifact check evidence, and any remaining questions for human approval.
|
|
53
|
+
|
|
42
54
|
## Plan Template
|
|
43
55
|
|
|
44
56
|
```markdown
|
|
@@ -48,6 +60,12 @@ You are helping to create an implementation plan for a feature or requirement.
|
|
|
48
60
|
|
|
49
61
|
[Brief description of the feature]
|
|
50
62
|
|
|
63
|
+
## Requirements Source
|
|
64
|
+
[Without a specification: original supplied requirements verbatim and source path/issue key. Otherwise: link to the specification's requirements.]
|
|
65
|
+
|
|
66
|
+
## Acceptance Criteria
|
|
67
|
+
[Without a specification: original supplied acceptance criteria verbatim; label derived criteria/assumptions separately. Otherwise: link to the specification's criteria.]
|
|
68
|
+
|
|
51
69
|
## Technical Approach
|
|
52
70
|
|
|
53
71
|
[How this will be implemented]
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
You are helping to break down a feature into actionable tasks.
|
|
2
2
|
|
|
3
|
-
`tasks.md` is a checklist only. Acceptance criteria live in `spec.md
|
|
3
|
+
`tasks.md` is a checklist only. Acceptance criteria live in `spec.md` when present, otherwise in `plan.md` under **Requirements Source** and **Acceptance Criteria**; approach, files, and effort live in `plan.md`. Do not repeat them here.
|
|
4
4
|
|
|
5
5
|
## Your Task
|
|
6
6
|
|
|
7
7
|
1. **Load context**:
|
|
8
|
-
- Read the
|
|
9
|
-
- Read
|
|
8
|
+
- Read the plan in `apps/{{APP_NAME}}/docs/features/{{ISSUE_ID}}-{{FEATURE_NAME}}/plan.md` when present
|
|
9
|
+
- Read sibling `spec.md` when present; otherwise use `plan.md` under **Requirements Source** and **Acceptance Criteria** as the requirements source. Cover every requirement and acceptance criterion in the deliverables without copying them into the checklist. If that source is missing or unclear, ask the user; do not require creating a specification.
|
|
10
10
|
- Review `AGENTS.md` for project patterns
|
|
11
11
|
|
|
12
12
|
2. **Break down into tasks** (aim for 3-7 total; never exceed 10):
|
|
@@ -65,6 +65,6 @@ You are helping to break down a feature into actionable tasks.
|
|
|
65
65
|
When this list is used by `/implement-feature` or `/implement`:
|
|
66
66
|
|
|
67
67
|
- **`[P]` tasks**: dispatch one subagent per task concurrently, using `dispatching-parallel-agents`
|
|
68
|
-
- **Other tasks**: execute in dependency order, one subagent per task
|
|
68
|
+
- **Other tasks**: execute in dependency order, one subagent per task
|
|
69
69
|
- **Domain routing**: match each task to a specialist (Backend Architect, Frontend Developer, API Specialist, etc.)
|
|
70
|
-
- **Review gate**:
|
|
70
|
+
- **Review gate**: follow the shared delivery loop in `implement.md`; only the orchestrator accepts and ticks `[x]` after independent review and required evidence. This command only generates the checklist; do not dispatch implementation or bypass required human approval.
|
|
@@ -85,7 +85,7 @@ Each app maintains its own feature documentation:
|
|
|
85
85
|
|
|
86
86
|
**Location:** `apps/{{APP_NAME}}/docs/features/<feature>/`
|
|
87
87
|
|
|
88
|
-
**Required Files
|
|
88
|
+
**Required Files** (subject to the [requirement-only planning exception](#requirement-only-planning-exception) and the separate [supplied-task exception](#supplied-task-exception)):
|
|
89
89
|
|
|
90
90
|
```
|
|
91
91
|
apps/{{APP_1}}/docs/features/<feature>/
|
|
@@ -156,6 +156,14 @@ Tracks monorepo-wide changes.
|
|
|
156
156
|
|
|
157
157
|
**⚠️ MANDATORY: Documentation MUST be written or updated BEFORE committing code. This is a hard requirement — no commit should land without the corresponding docs entry.**
|
|
158
158
|
|
|
159
|
+
### Requirement-Only Planning Exception
|
|
160
|
+
|
|
161
|
+
For `/plan` without an existing specification, preserve the original supplied requirements and acceptance criteria in `plan.md` under **Requirements Source** and **Acceptance Criteria**; do not require or create `spec.md`. `/tasks` and `/assign-tasks` consume that plan source when no specification exists; keep acceptance criteria out of the slim task checklist. This exception overrides the spec prerequisite and mandatory spec-first sequence above and in the documentation checklist only for these planning artifacts. It does not authorize implementation, replace artifact review, waive required human approvals, or change any other documentation duties. The separate implementation-command supplied-task exception remains unchanged.
|
|
162
|
+
|
|
163
|
+
### Supplied-Task Exception
|
|
164
|
+
|
|
165
|
+
For changes made by the `implement`, `implement-feature` and `implement-fixes` commands only, the task supplied to the command replaces the spec and plan prerequisites. Do not create or require `spec.md` or `plan.md` (feature folders or complex fix folders) unless the user asks for them. This exception covers only the spec and plan items below and in the decision tree above. Every other applicable item still applies.
|
|
166
|
+
|
|
159
167
|
### Pre-Commit Checklist
|
|
160
168
|
|
|
161
169
|
Before running `git commit`, verify ALL items that apply to your change:
|
|
@@ -114,6 +114,19 @@ Example: 5 tasks → T1 (setup) → T2 [P] (backend API) + T3 [P] (frontend UI)
|
|
|
114
114
|
- Coordinators should not skip review even for "simple" changes
|
|
115
115
|
- If a reviewer requests changes, the original specialist fixes them and re-review occurs
|
|
116
116
|
|
|
117
|
+
## Model Capacity Fallback
|
|
118
|
+
|
|
119
|
+
When a subagent stops on a model capacity, quota, session limit, or reset-wait failure (most often Claude), switch its **model** and keep its **agent**. This is automatic for those failures; do not ask first.
|
|
120
|
+
|
|
121
|
+
- **Same agent, same role.** Re-dispatch the same agent with the same task, permissions, and context (and session, where the harness supports it). Do not substitute an equivalent agent.
|
|
122
|
+
- **Model order, one attempt each.** Try the next model in the configured fallback order for that agent. When the order is exhausted, try the harness's known available default, unless it was already tried. Then stop; do not cycle back.
|
|
123
|
+
- **Never** retry the same unavailable model, and never wait blindly for a quota reset.
|
|
124
|
+
- **Only supported switching.** Change the model through per-call selection the runtime supports, using only fallback models and defaults that are already configured or exposed. Do not invent model IDs, and do not edit persistent or global config, accounts, or billing.
|
|
125
|
+
- **Blocker when nothing is left.** If no configured fallback or default is available, or per-call selection is unsupported, stop, report the blocker, and ask the user which model to use.
|
|
126
|
+
- **Inspect before resuming.** Check what the failed attempt left in the working tree, then resume from that partial work. Never run two writers on the same files at once.
|
|
127
|
+
- **Keep review independent.** The reviewer stays a separate agent from the builder, even when the builder moves to a fallback model.
|
|
128
|
+
- **Disclose.** The final report names the original model, each fallback attempted, and the model that finished the work.
|
|
129
|
+
|
|
117
130
|
## Skills Integration
|
|
118
131
|
|
|
119
132
|
These skills complement subagent workflows:
|
|
@@ -10,7 +10,7 @@ argument-hint: "optional patch options"
|
|
|
10
10
|
| Agent | When to use |
|
|
11
11
|
|-------|-------------|
|
|
12
12
|
| `fixer` | Standard patch — incremental changes to existing config |
|
|
13
|
-
| `
|
|
13
|
+
| `reviewer` | Independent read-only review before approval and after apply |
|
|
14
14
|
|
|
15
15
|
Patch AI instructions by comparing against the latest toolkit templates and applying updates.
|
|
16
16
|
|
|
@@ -10,7 +10,7 @@ argument-hint: "feature specification or task list"
|
|
|
10
10
|
| Agent | When to use |
|
|
11
11
|
|-------|-------------|
|
|
12
12
|
| `fixer` | Bounded feature work — spec is clear, files are known |
|
|
13
|
-
| `feature-builder` | Complex feature —
|
|
13
|
+
| `feature-builder` | Complex feature build — builder only; the orchestrator still runs the review |
|
|
14
14
|
|
|
15
15
|
Implement a feature by completing tasks sequentially with proper tracking and review gates.
|
|
16
16
|
|
|
@@ -10,6 +10,6 @@ argument-hint: "optional patch options"
|
|
|
10
10
|
| Agent | When to use |
|
|
11
11
|
|-------|-------------|
|
|
12
12
|
| `fixer` | Standard patch — incremental changes to existing config |
|
|
13
|
-
| `
|
|
13
|
+
| `reviewer` | Independent read-only review before approval and after apply |
|
|
14
14
|
|
|
15
15
|
**CRITICAL: READ:** [.claude/prompt-snippets/bootstrap-patch.md](../../.claude/prompt-snippets/bootstrap-patch.md).
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Create a new agent skill following VS Code and agentskills.io specifications
|
|
3
|
+
tools: ["read", "search", "edit", "agent"]
|
|
3
4
|
tags: [skill-creation, agent-skills, documentation, automation]
|
|
4
5
|
version: 1.0.0
|
|
5
6
|
argument-hint: "skill name and requirements"
|
|
@@ -10,6 +10,6 @@ argument-hint: "feature specification or task list"
|
|
|
10
10
|
| Agent | When to use |
|
|
11
11
|
|-------|-------------|
|
|
12
12
|
| `fixer` | Bounded feature work — spec is clear, files are known |
|
|
13
|
-
| `feature-builder` | Complex feature —
|
|
13
|
+
| `feature-builder` | Complex feature build — builder only; the orchestrator still runs the review |
|
|
14
14
|
|
|
15
15
|
**CRITICAL: READ:** [.claude/prompt-snippets/implement-feature.md](../../.claude/prompt-snippets/implement-feature.md).
|
|
@@ -9,7 +9,7 @@ description: "Patch AI instructions by fetching updates from the toolkit repo an
|
|
|
9
9
|
| Agent | When to use |
|
|
10
10
|
|-------|-------------|
|
|
11
11
|
| `fixer` | Standard patch — incremental changes to existing config |
|
|
12
|
-
| `
|
|
12
|
+
| `reviewer` | Independent read-only review before approval and after apply |
|
|
13
13
|
|
|
14
14
|
## Arguments
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ description: "Implement a feature by completing tasks sequentially"
|
|
|
9
9
|
| Agent | When to use |
|
|
10
10
|
|-------|-------------|
|
|
11
11
|
| `fixer` | Bounded feature work — spec is clear, files are known |
|
|
12
|
-
| `feature-builder` | Complex feature —
|
|
12
|
+
| `feature-builder` | Complex feature build — builder only; the orchestrator still runs the review |
|
|
13
13
|
|
|
14
14
|
## Arguments
|
|
15
15
|
|
package/src/monorepo/AGENTS.md
CHANGED
|
@@ -382,6 +382,10 @@ Documentation updates are **mandatory before committing** any feature or fix. Se
|
|
|
382
382
|
- Reference `docs/constitution.md` for project principles and governance
|
|
383
383
|
- Include all doc changes in the same commit/PR as the code
|
|
384
384
|
|
|
385
|
+
**Supplied-task exception (`implement`, `implement-feature`, `implement-fixes` only):** the task supplied to these commands replaces the spec and plan prerequisites. Do not create or require `spec.md` or `plan.md` for the feature or fix unless the user asks for them. Every other applicable item in the [documentation checklist](.claude/rules-snippets/documentation.md) still applies, including the fix log, `CHANGELOG.md`, `docs/api/`, and `README.md`.
|
|
386
|
+
|
|
387
|
+
**Requirement-only planning exception:** For `/plan` without an existing specification, preserve the original supplied requirements and acceptance criteria in `plan.md` under **Requirements Source** and **Acceptance Criteria**; do not require or create `spec.md`. `/tasks` and `/assign-tasks` consume that plan source when no specification exists; keep acceptance criteria out of the slim task checklist. This exception overrides the spec prerequisite and mandatory spec-first sequence above and in the documentation checklist only for these planning artifacts. It does not authorize implementation, replace artifact review, waive required human approvals, or change any other documentation duties. The separate implementation-command supplied-task exception remains unchanged.
|
|
388
|
+
|
|
385
389
|
## Related Documentation
|
|
386
390
|
|
|
387
391
|
- [README.md](README.md) - Project overview
|
|
@@ -19,7 +19,11 @@ You are an implementation specialist. Your job is to write production-quality co
|
|
|
19
19
|
- Write tests alongside implementation
|
|
20
20
|
- Use existing patterns and utilities — don't reinvent
|
|
21
21
|
- Keep changes focused on the assigned task
|
|
22
|
-
- If
|
|
22
|
+
- If the task is unclear in a way that changes what you build, **ask** before proceeding. Otherwise build the task as written.
|
|
23
|
+
- **You build; you do not accept.** Your self-review and report are evidence for the orchestrator, not approval. An independent reviewer and the orchestrator decide.
|
|
24
|
+
- Leave your changes uncommitted and do not tick tasks. Commit or tick only when your calling flow asks, and only after acceptance.
|
|
25
|
+
- Report each acceptance criterion as `pass` with the command and its result, or `not verified` with the reason.
|
|
26
|
+
- In repair mode, answer every blocking review item: fix it, or say in your report why it should stand.
|
|
23
27
|
|
|
24
28
|
## Output
|
|
25
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Patch AI instructions by fetching updates from the toolkit repo and applying new/updated/missing guidance
|
|
3
|
-
allowed-tools: "Read, Write, Edit, Bash(*)"
|
|
3
|
+
allowed-tools: "Read, Write, Edit, Bash(*), Task"
|
|
4
4
|
argument-hint: "optional patch options"
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,6 +10,6 @@ argument-hint: "optional patch options"
|
|
|
10
10
|
| Agent | When to use |
|
|
11
11
|
|-------|-------------|
|
|
12
12
|
| `fixer` | Standard patch — incremental changes to existing config |
|
|
13
|
-
| `
|
|
13
|
+
| `reviewer` | Independent read-only review before approval and after apply |
|
|
14
14
|
|
|
15
15
|
Follow the prompt defined in [.claude/prompt-snippets/bootstrap-patch.md](../prompt-snippets/bootstrap-patch.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Implement a feature by completing tasks sequentially
|
|
3
|
-
allowed-tools: "Read, Write, Edit, Bash(*)"
|
|
3
|
+
allowed-tools: "Read, Write, Edit, Bash(*), Task"
|
|
4
4
|
argument-hint: "feature specification or task list"
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,6 +10,6 @@ argument-hint: "feature specification or task list"
|
|
|
10
10
|
| Agent | When to use |
|
|
11
11
|
|-------|-------------|
|
|
12
12
|
| `fixer` | Bounded feature work — spec is clear, files are known |
|
|
13
|
-
| `feature-builder` | Complex feature —
|
|
13
|
+
| `feature-builder` | Complex feature build — builder only; the orchestrator still runs the review |
|
|
14
14
|
|
|
15
15
|
Follow the prompt defined in [.claude/prompt-snippets/implement-feature.md](../prompt-snippets/implement-feature.md).
|
|
@@ -49,6 +49,7 @@ When interacting with {{ISSUE_TRACKER}}, use MCP tools first (see the `issue-tra
|
|
|
49
49
|
|
|
50
50
|
1. **Parse Document**:
|
|
51
51
|
- Load the specified document (.md, .txt, .json)
|
|
52
|
+
- For `tasks.md`, load sibling `spec.md` when present; otherwise load sibling `plan.md` under **Requirements Source** and **Acceptance Criteria** as the requirements source. For a requirement document supplied directly, use its requirements and acceptance criteria. If the source or criteria are missing or unclear, ask the user before creating tickets; do not require creating a specification.
|
|
52
53
|
- Detect document structure (headers, lists, task categories)
|
|
53
54
|
- For `tasks.md`, detect the format first:
|
|
54
55
|
- **Slim** (has `- [ ] T<n>` or `- [x] T<n>` lines): each such line is one task. The text after the ID is the summary. Sub-bullets, if any, are subtasks. A line already has a ticket only when it ends with ` — {{PROJECT_KEY}}-<digits>`; skip it then. Any other ` — ` suffix (e.g. ` — depends on T3`) is a note, not a key: keep the line
|
|
@@ -72,7 +73,7 @@ When interacting with {{ISSUE_TRACKER}}, use MCP tools first (see the `issue-tra
|
|
|
72
73
|
- **Task**: Implementation work, 2-8 story points (avoid < 2 SP)
|
|
73
74
|
- **Subtask**: Only for complex tasks, 1-3 story points (use sparingly)
|
|
74
75
|
|
|
75
|
-
4. **Estimate Effort** (`tasks.md` has no effort field: take hours from `plan.md` for the matching work, or estimate from the
|
|
76
|
+
4. **Estimate Effort** (`tasks.md` has no effort field: take hours from `plan.md` for the matching work, or estimate from the selected requirements source):
|
|
76
77
|
- 0.5-1 hours → **Merge with related task** (too small alone)
|
|
77
78
|
- 2-3 hours → 2 story points
|
|
78
79
|
- 4-6 hours → 3-5 story points
|
|
@@ -84,7 +85,7 @@ When interacting with {{ISSUE_TRACKER}}, use MCP tools first (see the `issue-tra
|
|
|
84
85
|
- Link child issues to parents
|
|
85
86
|
- Set assignees, labels, and story points
|
|
86
87
|
- Create dependency links where noted
|
|
87
|
-
- Ticket description: the task summary plus the acceptance criteria from `spec.md` for
|
|
88
|
+
- Ticket description: the task summary plus the acceptance criteria from the selected requirements source for that deliverable (`spec.md` when present, otherwise `plan.md` for a task checklist, or the directly supplied requirement document). Preserve the original criteria and constraints; include a source path/issue key and section reference. Do not copy acceptance criteria into `tasks.md`.
|
|
88
89
|
- **Slim `tasks.md`**: append ` — <KEY>` at the end of the task's line, after any notes (`- [ ] T1 Schema + migration — PROJ-124`)
|
|
89
90
|
- **Legacy `tasks.md`**: never write back. Record heading → ticket key in the report instead
|
|
90
91
|
|
|
@@ -185,26 +185,28 @@ The CLI runs the same patch flow without an AI session: `npx nitm-ai-dev-toolkit
|
|
|
185
185
|
|
|
186
186
|
### Summary
|
|
187
187
|
|
|
188
|
-
- **
|
|
188
|
+
- **Apply after review and user approval**: X add + Y update entries, as printed by `patch`
|
|
189
189
|
- **Review needed**: Z needs-review files and W wrapper proposals
|
|
190
190
|
- **Not written**: N not-relevant or retired entries
|
|
191
191
|
- **No action**: W files already current
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
**Independent review loop (before approval/apply, including dry-run):**
|
|
195
|
+
- The orchestrator derives acceptance checks from the user's request and the safeguards above; no new spec, plan, persistent state, or configuration is required. The patch author prepares/repairs the proposal and reports evidence, but cannot approve its own work.
|
|
196
|
+
- The orchestrator dispatches an independent read-only `reviewer` (or available read-only agent), not the patch author or its self-review. Give it the original request, target/source version evidence, current project files, proposed diffs/report (including merges and removals), and check results. Review scope, relevance/retirement decisions, preserved customizations, trust/version gates, and backup/approval requirements.
|
|
197
|
+
- The reviewer returns `VERDICT: PASS` or `VERDICT: CHANGES`; each blocking finding names the file, problem, and required repair. Send findings or failed checks back to the patch author, repair the proposal, verify it, and re-review the revised proposal. Repeat until PASS or BLOCKED; never proceed merely because a round limit was reached.
|
|
198
|
+
- Only the orchestrator accepts the proposal, after independently inspecting the evidence for every acceptance check and the current review PASS. A reviewer PASS alone is not acceptance and never replaces user approval. If an independent reviewer or required evidence/check is unavailable, report **BLOCKED** with what would unblock it; do not apply or claim completion.
|
|
199
|
+
|
|
200
|
+
5. **Confirm and Apply** (only the accepted proposal):
|
|
195
201
|
- If `--dry-run` flag: Output the report without making changes
|
|
196
|
-
- Otherwise: Present the report and ask the user to confirm with (Y/n)
|
|
202
|
+
- Otherwise: Present the reviewed report and ask the user to confirm with (Y/n). Before writes, back up affected existing files/config and confirm the source, project state, and patch still match the reviewed proposal; if they changed, regenerate and repeat review and user approval. Apply only approved changes.
|
|
197
203
|
- On confirmation:
|
|
198
204
|
a. **Add and update**: run `npx nitm-ai-dev-toolkit patch`. It writes only the add and update entries it printed; do not copy template files by hand
|
|
199
205
|
b. **Retirements**: after approval, record each path in `.nitm/retired.json` with a reason and date. Do not delete files to retire them
|
|
200
|
-
c. **Needs review**:
|
|
206
|
+
c. **Needs review**: include each proposed merge (structural additions, preserved project values) in Step 4's report and independent review, and apply it only after the operator approves that file. Wrappers that inline policy: propose moving the content into the snippet and reducing the wrapper to a thin link (see Thin Wrapper Policy in `bootstrap.md`)
|
|
201
207
|
d. **OpenCode plugins**: Apply only the approved obsolete Ponytail cleanup above after backing up the known obsolete toolkit copies and local config; preserve all unrelated local/global plugins. Never add Ponytail to project config.
|
|
202
208
|
e. **Toolkit version**: Keep the `.toolkit-version` value the CLI writes for the verified target version (the installed package version, 4.0.0 or later; never hard-coded) only after the approved migration and OpenCode preflight pass (or OpenCode is confirmed out of scope).
|
|
203
|
-
f. **Git commit**:
|
|
204
|
-
```bash
|
|
205
|
-
git add -A
|
|
206
|
-
git commit -m "chore: patch AI instructions from toolkit [$(date +%Y-%m-%d)]"
|
|
207
|
-
```
|
|
209
|
+
f. **Git commit**: Do not auto-commit. Only if the user explicitly requests a commit, and only after Step 7 acceptance, stage just this patch's approved paths; never stage unrelated changes.
|
|
208
210
|
|
|
209
211
|
6. **Cleanup**:
|
|
210
212
|
|
|
@@ -216,6 +218,9 @@ The CLI runs the same patch flow without an AI session: `npx nitm-ai-dev-toolkit
|
|
|
216
218
|
- Verify no `{{PLACEHOLDER}}` syntax was accidentally re-introduced
|
|
217
219
|
- Confirm all files are valid (no broken frontmatter, no syntax errors)
|
|
218
220
|
- List any new placeholders that need manual `bootstrap` to fill
|
|
221
|
+
- Inspect the actual applied diff/files against the approved proposal and backups: verify preserved project values/config, relevance/retirements, approved merges/removals, and the target version marker. Run the applicable syntax/frontmatter checks and report commands/results, not assumed runtime validation.
|
|
222
|
+
- Dispatch the independent read-only reviewer on the actual applied outcome, approval scope, and validation evidence using the same verdict contract above. On findings or failed checks, repair only within the approved scope, rerun validation, and re-review; any new/unapproved change must return through proposal review and user approval before writes.
|
|
223
|
+
- Only the orchestrator reports **ACCEPTED** when the current outcome has review PASS and verified evidence for every acceptance check. Missing reviewer/evidence means **BLOCKED**, never completion. For `--dry-run`, accept only the reviewed preview and explicitly report that nothing was applied or post-apply verified. Acceptance never authorizes extra writes, deletions, or a commit.
|
|
219
224
|
|
|
220
225
|
## Smart Merge Strategy
|
|
221
226
|
|
|
@@ -240,4 +245,4 @@ When a file has been bootstrapped (placeholders replaced with real values), the
|
|
|
240
245
|
- **Non-destructive by default**: Always show changes before applying
|
|
241
246
|
- **Preserve customizations**: Never lose project-specific configuration
|
|
242
247
|
- **Incremental**: Only apply what's changed, don't re-bootstrap everything
|
|
243
|
-
- **Auditable**:
|
|
248
|
+
- **Auditable**: Report approved paths, review verdicts, and verification evidence; commit only on explicit request
|
|
@@ -2,7 +2,7 @@ You are helping to create or update the project constitution at `docs/constituti
|
|
|
2
2
|
|
|
3
3
|
## Your Task
|
|
4
4
|
|
|
5
|
-
1. **Load existing constitution** (if it exists) at `docs/constitution.md`.
|
|
5
|
+
1. **Load existing constitution** (if it exists) at `docs/constitution.md`. Retain its original content for comparison during review.
|
|
6
6
|
|
|
7
7
|
2. **Collect project information**:
|
|
8
8
|
- Project name and description
|
|
@@ -25,6 +25,12 @@ You are helping to create or update the project constitution at `docs/constituti
|
|
|
25
25
|
|
|
26
26
|
5. **Save** the constitution to `docs/constitution.md`.
|
|
27
27
|
|
|
28
|
+
6. **Review and accept the artifact** before reporting completion:
|
|
29
|
+
- The orchestrator dispatches an independent, read-only reviewer with the original request, gathered requirements, original constitution (or confirmation this is new), saved constitution, and validation results. Review the actual artifact for contradictions, unintended policy changes, and requirements coverage; return `VERDICT: PASS` or `VERDICT: CHANGES` with blocking findings and section references.
|
|
30
|
+
- Repair blocking findings within the agreed scope, repeat affected validation checks, and re-review the changed artifact independently. Repeat until PASS or blocked; unresolved policy decisions go to the user, not an invented amendment.
|
|
31
|
+
- Only the orchestrator accepts, after an independent PASS and evidence that every requirement and applicable validation check is satisfied. If an independent reviewer is unavailable, report BLOCKED; self-review cannot substitute for independent acceptance.
|
|
32
|
+
- Keep human/team approval and the constitution's amendment governance separate from artifact acceptance. This review adds no commit, push, or apply step.
|
|
33
|
+
|
|
28
34
|
## Constitution Template
|
|
29
35
|
|
|
30
36
|
```markdown
|
|
@@ -299,6 +299,16 @@ After validation, create the skill:
|
|
|
299
299
|
- `assets/`
|
|
300
300
|
4. **Add resource files**: Based on skill requirements
|
|
301
301
|
|
|
302
|
+
## Artifact Review and Acceptance
|
|
303
|
+
|
|
304
|
+
Before Post-Creation or a success summary, the orchestrator must:
|
|
305
|
+
|
|
306
|
+
1. Dispatch an independent, read-only reviewer with the original request, gathered requirements, created skill and resource paths, and validation results. Review the actual files for naming/frontmatter, structure, reference resolution, and coverage of the requested capability; return `VERDICT: PASS` or `VERDICT: CHANGES` with blocking findings and file references.
|
|
307
|
+
2. Repair blocking findings within the agreed scope, repeat affected validation checks, and re-review the changed artifacts independently. Repeat until PASS or blocked; ask the user rather than inventing requirements or expanding scope.
|
|
308
|
+
3. Accept only after the independent reviewer returns PASS and the orchestrator verifies every requirement and applicable validation check against evidence. If an independent reviewer is unavailable, report BLOCKED; self-review cannot substitute for independent acceptance.
|
|
309
|
+
|
|
310
|
+
Keep any required human approval separate from artifact acceptance. This review adds no commit, push, or apply step.
|
|
311
|
+
|
|
302
312
|
## Post-Creation
|
|
303
313
|
|
|
304
314
|
After creating the skill:
|