hero-mmt-kit 1.1.6 → 1.2.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/CHANGELOG.md +24 -0
- package/README.md +12 -10
- package/package.json +1 -1
- package/skills.manifest.json +6 -9
- package/src/integrations.cjs +7 -7
- package/src/skills.cjs +15 -6
- package/templates/CLAUDE.md.tmpl +26 -41
- package/templates/skills/NOTICE +25 -7
- package/templates/skills/brainstorming/SKILL.md +7 -7
- package/templates/skills/executing-plans/SKILL.md +1 -1
- package/templates/skills/hero-coding/SKILL.md +147 -69
- package/templates/skills/hero-mr-review/SKILL.md +3 -3
- package/templates/skills/hero-planning/SKILL.md +281 -59
- package/templates/skills/hero-report/SKILL.md +5 -2
- package/templates/skills/hero-reviewing/SKILL.md +322 -69
- package/templates/skills/hero-strict/SKILL.md +4 -4
- package/templates/skills/hero-unit-test/SKILL.md +128 -78
- package/templates/skills/subagent-driven-development/SKILL.md +14 -3
- package/templates/skills/subagent-driven-development/code-quality-reviewer-prompt.md +34 -34
- package/templates/skills/subagent-driven-development/scripts/task-brief.sh +1 -1
- package/templates/skills/using-hero/SKILL.md +22 -19
- package/templates/skills/receiving-code-review/SKILL.md +0 -213
- package/templates/skills/requesting-code-review/SKILL.md +0 -108
- package/templates/skills/requesting-code-review/code-reviewer.md +0 -168
- package/templates/skills/writing-plans/SKILL.md +0 -173
- package/templates/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
|
@@ -1,69 +1,147 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: hero-coding
|
|
3
|
-
description: Use
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Hero Coding
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
hero-coding is the implementation stage
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
1.
|
|
30
|
-
2.
|
|
31
|
-
3. For
|
|
32
|
-
4.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
---
|
|
2
|
+
name: hero-coding
|
|
3
|
+
description: Use to implement an approved hero-planning plan, a small bounded change, or exact user-approved corrections from a prior hero-reviewing pass
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hero Coding
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
hero-coding is the implementation-only stage. It turns an approved plan, a small bounded request, or exact user-approved corrections from a prior independent review into production changes while accounting for every requirement, business rule, edge case, interface, and implementation step. It answers: "What was implemented, what remains blocked, and where did the implementation deviate from the approved scope?"
|
|
11
|
+
|
|
12
|
+
<HARD-BOUNDARY>
|
|
13
|
+
This stage implements only. It does not author or run tests, run verification commands, review its own output, evaluate or select review feedback, deploy, release, or perform git delivery actions. It may implement exact correction IDs only after `hero-reviewing` confirmed them and the user explicitly approved them. All assurance and delivery activities remain independent later sessions.
|
|
14
|
+
</HARD-BOUNDARY>
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
Use this skill when:
|
|
19
|
+
- `hero-planning` produced an approved plan and the user explicitly started implementation.
|
|
20
|
+
- A Tiny/Fast change is sufficiently bounded that a plan artifact would add no useful clarity.
|
|
21
|
+
- `hero-reviewing` produced confirmed correction IDs and the user explicitly approved the exact IDs to implement.
|
|
22
|
+
|
|
23
|
+
Do not silently choose a plan or correction set. Prefer `PLAN_PATH=<approved-plan-path>` for non-trivial planned work. For review remediation, require a review handoff/report plus `APPROVED_CORRECTIONS=<exact IDs>`. If multiple plausible sources exist, or approval is not explicit, ask which contract is approved.
|
|
24
|
+
|
|
25
|
+
## Inputs
|
|
26
|
+
|
|
27
|
+
Read implementation context before editing:
|
|
28
|
+
|
|
29
|
+
1. `PLAN_PATH`, when supplied. Read the complete plan, not selected excerpts.
|
|
30
|
+
2. Otherwise, the user's explicit bounded request and acceptance criteria.
|
|
31
|
+
3. For review remediation, the captured `hero-reviewing` result or report and `APPROVED_CORRECTIONS=<exact IDs>`.
|
|
32
|
+
4. The current codebase state relevant to the requested implementation.
|
|
33
|
+
|
|
34
|
+
A review correction is eligible only when:
|
|
35
|
+
- A prior independent `hero-reviewing` pass classified the item `confirmed`.
|
|
36
|
+
- The user explicitly approved that exact `RV-*` or `FB-*` ID.
|
|
37
|
+
- The handoff identifies the reviewed target, required outcome, constraints, and excluded items.
|
|
38
|
+
- The current implementation has not drifted so far that the correction is unsafe or ambiguous.
|
|
39
|
+
|
|
40
|
+
Do not reassess findings, choose additional items, infer approval from severity, or implement rejected, unclear, out-of-scope, or unapproved feedback. If target drift changes the meaning of a correction, stop and request clarification or another review.
|
|
41
|
+
|
|
42
|
+
For a current `hero-planning` plan, extract and reconcile:
|
|
43
|
+
- Requirement IDs from the requirement ledger.
|
|
44
|
+
- `## Change Map` entries.
|
|
45
|
+
- `## Task Dependencies`.
|
|
46
|
+
- Every `### Task N:` section.
|
|
47
|
+
- Each task's `Requirements`, `Depends on`, `Outcome`, `Files / areas`, `Implementation steps`, `Business rules and edge cases`, `Interfaces produced or changed`, and `Completion state`.
|
|
48
|
+
- The `## Requirements Coverage` mapping.
|
|
49
|
+
|
|
50
|
+
For a legacy plan without requirement IDs, derive a session-only checklist from its tasks and acceptance criteria. Do not rewrite or upgrade the approved plan automatically.
|
|
51
|
+
|
|
52
|
+
For a review correction handoff, map each approved correction ID to one bounded task and requirement entry. Preserve its required outcome and constraints verbatim; do not merge in unapproved reviewer suggestions or reinterpret the finding as broader refactoring work.
|
|
53
|
+
|
|
54
|
+
## Implementation Ledger
|
|
55
|
+
|
|
56
|
+
Maintain two linked views throughout the session:
|
|
57
|
+
|
|
58
|
+
### Task state
|
|
59
|
+
|
|
60
|
+
Use `pending`, `in progress`, `implemented`, or `blocked` for every planned task.
|
|
61
|
+
|
|
62
|
+
A task becomes `implemented` only when:
|
|
63
|
+
- Every listed implementation step has a corresponding change.
|
|
64
|
+
- Its business rules and edge cases are represented in the implementation.
|
|
65
|
+
- Its interfaces and completion state now exist as specified.
|
|
66
|
+
- Any approved deviation is recorded explicitly.
|
|
67
|
+
|
|
68
|
+
Respect `Depends on`. Do not start a dependent task before its prerequisite implementation state exists.
|
|
69
|
+
|
|
70
|
+
### Requirement state
|
|
71
|
+
|
|
72
|
+
For every requirement, record:
|
|
73
|
+
- Owning task or tasks.
|
|
74
|
+
- `pending`, `in progress`, `implemented`, or `blocked`.
|
|
75
|
+
- Changed files, symbols, interfaces, or configuration areas.
|
|
76
|
+
- Any approved deviation or unresolved blocker.
|
|
77
|
+
|
|
78
|
+
A touched file is not proof that a requirement is implemented. A requirement is implemented only when all of its owning tasks and business rules are accounted for.
|
|
79
|
+
|
|
80
|
+
Use the session task list for execution progress. Keep the approved plan immutable; its checkboxes describe scope and are not a mutable execution log.
|
|
81
|
+
|
|
82
|
+
## Process
|
|
83
|
+
|
|
84
|
+
1. Read and inventory the complete plan, bounded request, or approved correction handoff.
|
|
85
|
+
2. For correction work, validate the prior assessment, exact approved IDs, reviewed target identity, required outcomes, and constraints without re-reviewing their technical merit.
|
|
86
|
+
3. Build the task and requirement ledgers before editing.
|
|
87
|
+
4. Confirm dependencies and start the first unblocked implementation task or correction ID.
|
|
88
|
+
5. Implement one coherent task at a time. Keep only one writing agent active in a shared worktree; parallel agents may perform read-only exploration when useful.
|
|
89
|
+
6. After each task, reconcile every implementation step, business rule, edge case, interface, requirement, or approved correction it owns. Mark incomplete items `blocked` or `pending`, never optimistically complete.
|
|
90
|
+
7. Stop and ask the user when:
|
|
91
|
+
- A requirement, correction outcome, or business rule is ambiguous.
|
|
92
|
+
- Safe implementation requires behavior outside the approved scope.
|
|
93
|
+
- The plan or correction handoff conflicts with the current codebase.
|
|
94
|
+
- Target drift changes the meaning of an approved correction.
|
|
95
|
+
- An external dependency or prerequisite is missing.
|
|
96
|
+
8. Finish with a concise implementation summary and an explicit handoff to independent testing/review sessions.
|
|
97
|
+
|
|
98
|
+
This reconciliation checks whether the requested implementation work was performed. It is not a correctness review and must not be presented as one.
|
|
99
|
+
|
|
100
|
+
## Implementation-Only Boundary
|
|
101
|
+
|
|
102
|
+
During this stage, do not:
|
|
103
|
+
- Create, edit, or run unit, integration, snapshot, end-to-end, or reproduction tests.
|
|
104
|
+
- Run build, lint, typecheck, test, coverage, smoke-test, or other verification commands.
|
|
105
|
+
- Perform self-review, dispatch a code reviewer, evaluate feedback, or implement any review item that lacks both a prior `confirmed` classification and explicit user approval of its exact ID.
|
|
106
|
+
- Deploy, release, merge, commit, push, or open a pull/merge request.
|
|
107
|
+
- Invoke a generic skill whose mandatory lifecycle performs any excluded activity above.
|
|
108
|
+
|
|
109
|
+
If an unexpected defect cannot be resolved safely from the approved requirements and code context, record it as a blocker and stop. Do not create a temporary test or broaden the session into debugging/verification work.
|
|
110
|
+
|
|
111
|
+
## Report Convention (on request)
|
|
112
|
+
|
|
113
|
+
hero-coding does not write a report file automatically. If the user asks for a written report, invoke `hero-report`; it writes `docs/coding-reports/YYYY-MM-DD-<slug>.md` using this contract.
|
|
114
|
+
|
|
115
|
+
Report should cover:
|
|
116
|
+
- Plan path, bounded request, or review correction source used.
|
|
117
|
+
- Exact approved correction IDs, when applicable.
|
|
118
|
+
- Requirement states and their owning tasks.
|
|
119
|
+
- Task states, including blockers and explicit deferrals.
|
|
120
|
+
- Changed files, symbols, interfaces, schemas, configuration keys, and behavior.
|
|
121
|
+
- Approved deviations and why they were necessary.
|
|
122
|
+
- Confirmation that testing, verification, and independent review were not performed in this stage; for correction work, this means no independent re-review occurred after the fix.
|
|
123
|
+
|
|
124
|
+
Report style:
|
|
125
|
+
- Keep it tight: no narrative scaffolding or self-congratulatory claims.
|
|
126
|
+
- Preserve exact file paths, symbol names, API names, configuration keys, errors, and requirement/task IDs.
|
|
127
|
+
- Use concise bullets for task state, requirement coverage, changes, deviations, and blockers.
|
|
128
|
+
- Do not add commands or test evidence that this stage did not collect.
|
|
129
|
+
|
|
130
|
+
## Definition of Done
|
|
131
|
+
|
|
132
|
+
- Every planned task, requirement, or approved correction ID is `implemented`, `blocked`, or explicitly deferred with the user's approval.
|
|
133
|
+
- Dependencies, business rules, edge cases, interfaces, correction constraints, and completion states are accounted for.
|
|
134
|
+
- No unapproved scope expansion or review item is hidden inside the implementation.
|
|
135
|
+
- The chat summary states what changed and what later testing or independent re-review still needs to establish.
|
|
136
|
+
- If a report was requested, it was written separately via `hero-report`.
|
|
137
|
+
|
|
138
|
+
## ACTIVE_STATE.md Update
|
|
139
|
+
|
|
140
|
+
Use `docs/ACTIVE_STATE.md` only as a durable index when a tracked work item needs a current implementation task, status, or blocker recorded for handoff. Do not copy the implementation ledger into it, and do not treat an ACTIVE_STATE update as correctness evidence.
|
|
141
|
+
|
|
142
|
+
## Related Skills
|
|
143
|
+
|
|
144
|
+
- Reads the approved implementation contract from `hero-planning`, or exact user-approved correction IDs from a prior `hero-reviewing` handoff.
|
|
145
|
+
- Never decides whether review feedback is valid; `hero-reviewing` owns that assessment.
|
|
146
|
+
- Hands the resulting implementation to separately invoked `hero-unit-test`, `hero-reviewing`, and, when appropriate, `hero-security` or `hero-strict` sessions.
|
|
147
|
+
- Uses `hero-report` only when the user asks for a durable coding report.
|
|
@@ -7,7 +7,7 @@ description: Use when reviewing a teammate's merge request or commit before it m
|
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
hero-mr-review is a standalone review skill for
|
|
10
|
+
hero-mr-review is a standalone review skill for a teammate's committed merge request/ref. It is not part of the `hero-planning → hero-coding → hero-reviewing/hero-unit-test` flow and does not wrap `hero-reviewing`. Choose between them by source of truth: `hero-reviewing` assesses an implementation against a Hero plan or explicit acceptance criteria and may target local or committed code; hero-mr-review assesses a committed MR range against its stated MR intent, repository conventions, impact, and potential bugs. Invoke it directly when a teammate's MR needs review before merge.
|
|
11
11
|
|
|
12
12
|
**Core principle:** review the diff, not the description. Every finding needs file:line evidence from the actual change — not a restatement of the commit message or an assumption about what the code "probably" does.
|
|
13
13
|
|
|
@@ -17,7 +17,7 @@ Use this skill when:
|
|
|
17
17
|
- A teammate has pushed commits and opened (or is about to open) a merge/pull request, and you need to review it before it merges.
|
|
18
18
|
- The user gives a commit SHA, tag, or branch name and asks for a review of "that MR" or "that commit."
|
|
19
19
|
|
|
20
|
-
Not for
|
|
20
|
+
Not for a plan-backed implementation assessment, even when that implementation is already committed — use `hero-reviewing` when the Hero plan or explicit acceptance criteria are the source of truth. This skill is committed-range-only and does not review local working-tree state.
|
|
21
21
|
|
|
22
22
|
## Inputs
|
|
23
23
|
|
|
@@ -92,6 +92,6 @@ Only if the MR corresponds to a row already tracked in `docs/ACTIVE_STATE.md`'s
|
|
|
92
92
|
|
|
93
93
|
## Related Skills
|
|
94
94
|
|
|
95
|
-
- Independent of the `hero-planning`/`hero-coding`/`hero-reviewing`/`hero-unit-test`
|
|
95
|
+
- Independent of the `hero-planning`/`hero-coding`/`hero-reviewing`/`hero-unit-test` flow. Use `hero-reviewing` instead whenever a Hero plan or explicit acceptance criteria define correctness, regardless of whether the target is local code or a commit/ref.
|
|
96
96
|
- Recommend a separate `hero-security` pass if the MR touches a sensitive surface (auth, secrets, external input, payments, AI/LLM behavior) instead of trying to cover security depth here.
|
|
97
97
|
- Recommend `hero-strict` if the MR is high-risk (architecture, shared/core modules, data model) and needs a fuller verification pass beyond this review.
|
|
@@ -1,59 +1,281 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: hero-planning
|
|
3
|
-
description: Use when
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Hero Planning
|
|
7
|
-
|
|
8
|
-
## Overview
|
|
9
|
-
|
|
10
|
-
hero-planning
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
|
|
1
|
+
---
|
|
2
|
+
name: hero-planning
|
|
3
|
+
description: Use when non-trivial work needs collaborative requirements discovery and an implementation-only plan before code changes
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hero Planning
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
hero-planning has two responsibilities:
|
|
11
|
+
|
|
12
|
+
1. Reach a shared, precise understanding of what the user needs.
|
|
13
|
+
2. Translate that understanding into an implementation plan whose tasks cover the required business behavior without omission or accidental scope expansion.
|
|
14
|
+
|
|
15
|
+
This skill owns both brainstorming and plan writing. It does not invoke `brainstorming` or `writing-plans` as nested workflow steps, and it does not implement the plan.
|
|
16
|
+
|
|
17
|
+
<HARD-BOUNDARY>
|
|
18
|
+
The plan contains implementation work only. Do not add testing, verification, code review, security review, deployment, release, merge, or commit tasks. Do not run those activities during planning. They belong to independent skills or later sessions so they can examine the implementation with fresh context.
|
|
19
|
+
</HARD-BOUNDARY>
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
Use this skill when:
|
|
24
|
+
- Starting a feature, non-trivial bugfix, or refactor.
|
|
25
|
+
- Changing existing behavior, data, interfaces, or architecture.
|
|
26
|
+
- The request has business rules, edge cases, dependencies, or ambiguity worth resolving before code changes.
|
|
27
|
+
- An approved brief or spec must be converted into executable implementation tasks.
|
|
28
|
+
|
|
29
|
+
Skip it for a typo, a trivial configuration edit, or an obvious bounded change. Those can go directly to `hero-coding` without a plan artifact.
|
|
30
|
+
|
|
31
|
+
## Inputs
|
|
32
|
+
|
|
33
|
+
- The user's request and follow-up decisions.
|
|
34
|
+
- Any issue, PRD, design, approved spec, or external contract that is a source of truth.
|
|
35
|
+
- Relevant codebase context. Use GitNexus (`gitnexus_query`, `gitnexus_context`, `gitnexus_impact`) or Serena when available; fall back to ordinary exploration when they are not.
|
|
36
|
+
- Existing workflow state from `docs/ACTIVE_STATE.md`, when present.
|
|
37
|
+
|
|
38
|
+
If an approved design already exists, reuse it. Do not repeat questions it has already answered; investigate only gaps or contradictions that would change implementation.
|
|
39
|
+
|
|
40
|
+
## Process
|
|
41
|
+
|
|
42
|
+
### 1. Establish the source of truth
|
|
43
|
+
|
|
44
|
+
Identify what defines the requested behavior: the current conversation, an issue, a PRD, an approved design, an existing API contract, or a combination of them. If sources conflict, surface the conflict and resolve it with the user before planning further.
|
|
45
|
+
|
|
46
|
+
Separate:
|
|
47
|
+
- Explicit requirements.
|
|
48
|
+
- Constraints that must remain true.
|
|
49
|
+
- Suggestions that are optional.
|
|
50
|
+
- Assumptions that still need a decision.
|
|
51
|
+
|
|
52
|
+
### 2. Explore the current system
|
|
53
|
+
|
|
54
|
+
Understand the existing behavior before proposing the target behavior:
|
|
55
|
+
- Trace the relevant entry points, control flow, data flow, state, interfaces, and persistence.
|
|
56
|
+
- Locate established patterns and nearby implementations that should be reused.
|
|
57
|
+
- Identify consumers, compatibility obligations, migrations, configuration, and generated artifacts affected by the change.
|
|
58
|
+
- For refactors or existing-behavior changes, run upstream `gitnexus_impact` when GitNexus is available. Report direct callers, affected processes, and risk before finalizing the approach.
|
|
59
|
+
|
|
60
|
+
Do not invent file paths, symbols, APIs, or line numbers. Inspect the codebase and use exact names where they are known.
|
|
61
|
+
|
|
62
|
+
### 3. Brainstorm with the user
|
|
63
|
+
|
|
64
|
+
Resolve decisions that affect behavior or implementation. Ask one focused question at a time when an answer is genuinely needed.
|
|
65
|
+
|
|
66
|
+
Cover the dimensions relevant to the work:
|
|
67
|
+
- Purpose, users or actors, and triggering events.
|
|
68
|
+
- Primary flow and alternate flows.
|
|
69
|
+
- Inputs, outputs, state transitions, and side effects.
|
|
70
|
+
- Business rules and invariants.
|
|
71
|
+
- Permissions, ownership, and visibility rules.
|
|
72
|
+
- Failure behavior, recovery behavior, and edge cases.
|
|
73
|
+
- Backward compatibility, migration, rollout constraints, and platform limits.
|
|
74
|
+
- Explicit scope and non-goals.
|
|
75
|
+
|
|
76
|
+
For a meaningful design choice, present the viable approaches, their trade-offs, and a recommendation. Do not manufacture alternatives when only one approach fits the codebase and requirements.
|
|
77
|
+
|
|
78
|
+
Do not silently choose business behavior. If an unresolved answer could change the plan, keep discussing instead of recording a guess.
|
|
79
|
+
|
|
80
|
+
### 4. Build the requirement ledger
|
|
81
|
+
|
|
82
|
+
Assign stable IDs (`R1`, `R2`, ...) to the confirmed requirements. Each entry must state observable business behavior or a concrete constraint, not an implementation activity.
|
|
83
|
+
|
|
84
|
+
The ledger must capture:
|
|
85
|
+
- Required behavior.
|
|
86
|
+
- Business rules and invariants.
|
|
87
|
+
- Error and edge-case behavior.
|
|
88
|
+
- Compatibility or migration obligations.
|
|
89
|
+
- Explicitly excluded scope.
|
|
90
|
+
|
|
91
|
+
Every later implementation task references these IDs. This makes coverage visible while the plan is being constructed rather than relying on a post-hoc plan review.
|
|
92
|
+
|
|
93
|
+
### 5. Choose the implementation design
|
|
94
|
+
|
|
95
|
+
Describe the selected approach at implementation level:
|
|
96
|
+
- Components or modules and their responsibilities.
|
|
97
|
+
- Control flow and data flow.
|
|
98
|
+
- Interfaces, signatures, schemas, events, and configuration keys.
|
|
99
|
+
- State transitions, persistence changes, and migrations.
|
|
100
|
+
- Error propagation and fallback behavior.
|
|
101
|
+
- Compatibility boundaries and sequencing constraints.
|
|
102
|
+
|
|
103
|
+
Keep the design proportional to the change. Follow existing architecture unless changing it is necessary for the requirement.
|
|
104
|
+
|
|
105
|
+
### 6. Map the change surface
|
|
106
|
+
|
|
107
|
+
Create a change map before decomposing tasks:
|
|
108
|
+
- Exact files or directories to create, modify, move, or remove.
|
|
109
|
+
- The responsibility of each changed area.
|
|
110
|
+
- Relevant symbols or sections when known.
|
|
111
|
+
- Requirement IDs served by each change.
|
|
112
|
+
|
|
113
|
+
Prefer focused files and clear interfaces, but do not introduce unrelated restructuring. Files that must change together should usually belong to the same task.
|
|
114
|
+
|
|
115
|
+
### 7. Decompose implementation tasks
|
|
116
|
+
|
|
117
|
+
Order tasks by dependency. A task is the smallest coherent implementation unit that produces a meaningful business or architectural outcome.
|
|
118
|
+
|
|
119
|
+
Task boundaries must:
|
|
120
|
+
- Map to one or more requirement IDs, or be explicit enabling work for a mapped task.
|
|
121
|
+
- Include setup, schema, configuration, generated files, and required documentation in the task whose outcome needs them.
|
|
122
|
+
- Keep dependent changes sequential and expose interfaces before their consumers.
|
|
123
|
+
- Preserve the `### Task N: [Name]` heading format so execution tooling can extract task briefs.
|
|
124
|
+
- Describe implementation only; assurance and delivery work is not a task category here.
|
|
125
|
+
|
|
126
|
+
Each task must tell an implementer what to change without prescribing an entire finished patch. Include exact contracts or pseudocode only where prose would leave behavior ambiguous.
|
|
127
|
+
|
|
128
|
+
### 8. Account for complete coverage
|
|
129
|
+
|
|
130
|
+
Build the requirement-to-task matrix as part of the plan:
|
|
131
|
+
- Every requirement ID maps to at least one implementation task.
|
|
132
|
+
- Every task maps to a requirement or a named implementation dependency.
|
|
133
|
+
- Business rules and edge cases appear in the task that owns them.
|
|
134
|
+
- Cross-task interfaces use consistent names and shapes.
|
|
135
|
+
- No task introduces behavior outside the agreed scope without labeling it as required enabling work.
|
|
136
|
+
|
|
137
|
+
If a requirement has no implementing task, add or correct the task before saving. If a task has no requirement or dependency, remove it or resolve the scope with the user.
|
|
138
|
+
|
|
139
|
+
### 9. Write the plan and stop
|
|
140
|
+
|
|
141
|
+
Save the plan to:
|
|
142
|
+
|
|
143
|
+
`docs/plans/YYYY-MM-DD-<slug>.md`
|
|
144
|
+
|
|
145
|
+
Use a lowercase kebab-case slug matching the work item. Keep the plan concise but complete: compress prose, preserve every business rule and technical fact. Preserve exact file paths, implementation commands, API names, config keys, schemas, error behavior, and risk labels.
|
|
146
|
+
|
|
147
|
+
If Plan Mode is active, exit it after the plan file is saved so the user can read the artifact normally. Then report the path and stop. Do not ask to implement, offer execution choices, invoke `hero-coding`, or start another workflow stage. The user decides when and in which session implementation begins.
|
|
148
|
+
|
|
149
|
+
## Plan Document Contract
|
|
150
|
+
|
|
151
|
+
Every plan must use this structure, adapting subsections only when they truly do not apply:
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
# [Work Item] Implementation Plan
|
|
155
|
+
|
|
156
|
+
**Goal:** [The business or product outcome]
|
|
157
|
+
|
|
158
|
+
**Source of truth:** [Request, issue, PRD, approved design, or contract]
|
|
159
|
+
|
|
160
|
+
**Chosen approach:** [Short description and the decisive reason]
|
|
161
|
+
|
|
162
|
+
**Implementation boundary:** This document contains implementation tasks only. Assurance and delivery activities are intentionally handled in separate sessions.
|
|
163
|
+
|
|
164
|
+
## Requirements
|
|
165
|
+
|
|
166
|
+
| ID | Required behavior or constraint | Source |
|
|
167
|
+
|---|---|---|
|
|
168
|
+
| R1 | ... | ... |
|
|
169
|
+
|
|
170
|
+
## Scope
|
|
171
|
+
|
|
172
|
+
### In scope
|
|
173
|
+
- ...
|
|
174
|
+
|
|
175
|
+
### Out of scope
|
|
176
|
+
- ...
|
|
177
|
+
|
|
178
|
+
## Current and Target Behavior
|
|
179
|
+
|
|
180
|
+
### Current behavior
|
|
181
|
+
- ...
|
|
182
|
+
|
|
183
|
+
### Target behavior
|
|
184
|
+
- ...
|
|
185
|
+
|
|
186
|
+
### Business rules and edge cases
|
|
187
|
+
- `R1`: ...
|
|
188
|
+
|
|
189
|
+
## Implementation Design
|
|
190
|
+
|
|
191
|
+
### Components and responsibilities
|
|
192
|
+
- ...
|
|
193
|
+
|
|
194
|
+
### Interfaces and data flow
|
|
195
|
+
- ...
|
|
196
|
+
|
|
197
|
+
### State, migration, and compatibility
|
|
198
|
+
- ...
|
|
199
|
+
|
|
200
|
+
## Change Map
|
|
201
|
+
|
|
202
|
+
| Path / area | Action | Responsibility | Requirements |
|
|
203
|
+
|---|---|---|---|
|
|
204
|
+
| `exact/path` | Create / Modify / Remove | ... | R1 |
|
|
205
|
+
|
|
206
|
+
## Task Dependencies
|
|
207
|
+
|
|
208
|
+
`Task 1 → Task 2 → Task 3`
|
|
209
|
+
|
|
210
|
+
## Implementation Tasks
|
|
211
|
+
|
|
212
|
+
### Task 1: [Coherent implementation outcome]
|
|
213
|
+
|
|
214
|
+
**Requirements:** R1, R2
|
|
215
|
+
|
|
216
|
+
**Depends on:** None
|
|
217
|
+
|
|
218
|
+
**Outcome:** [The implemented state this task leaves behind]
|
|
219
|
+
|
|
220
|
+
**Files / areas:**
|
|
221
|
+
- Create: `exact/path`
|
|
222
|
+
- Modify: `exact/path` — [symbol or responsibility]
|
|
223
|
+
- Remove: `exact/path`
|
|
224
|
+
|
|
225
|
+
**Implementation steps:**
|
|
226
|
+
- [ ] [Concrete code, schema, configuration, migration, or documentation change]
|
|
227
|
+
- [ ] [Concrete business-rule, state-flow, interface, or error-handling change]
|
|
228
|
+
|
|
229
|
+
**Business rules and edge cases:**
|
|
230
|
+
- [Exact behavior this task owns]
|
|
231
|
+
|
|
232
|
+
**Interfaces produced or changed:**
|
|
233
|
+
- [Exact name, inputs, outputs, schema, event, or configuration key]
|
|
234
|
+
|
|
235
|
+
**Completion state:** [What now exists after implementation, without assurance or delivery instructions]
|
|
236
|
+
|
|
237
|
+
## Requirements Coverage
|
|
238
|
+
|
|
239
|
+
| Requirement | Implemented by | Notes |
|
|
240
|
+
|---|---|---|
|
|
241
|
+
| R1 | Task 1 | ... |
|
|
242
|
+
|
|
243
|
+
## Resolved Decisions
|
|
244
|
+
|
|
245
|
+
- [Decision]: [Resolution and reason]
|
|
246
|
+
|
|
247
|
+
## Preconditions
|
|
248
|
+
|
|
249
|
+
- [External dependency that must exist before the applicable task can start]
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Plan Quality Rules
|
|
253
|
+
|
|
254
|
+
- Use confirmed requirements, not inferred intent.
|
|
255
|
+
- Use exact file paths and symbol names when the codebase makes them knowable.
|
|
256
|
+
- Keep interfaces consistent across tasks.
|
|
257
|
+
- Keep steps actionable; avoid vague future-work language or generic instructions such as "handle edge cases appropriately."
|
|
258
|
+
- Do not duplicate complete production code in the plan. Include signatures, schemas, algorithms, or pseudocode only when they prevent ambiguity.
|
|
259
|
+
- Include implementation commands only when they create or transform implementation artifacts. Omit commands whose purpose belongs to a later assurance or delivery session.
|
|
260
|
+
- Do not include execution-mode choices or handoff prompts in the artifact.
|
|
261
|
+
- Do not dispatch a plan-review subagent from this skill. Completeness comes from the requirement ledger and coverage matrix; independent review, when wanted, happens in another session.
|
|
262
|
+
|
|
263
|
+
## Definition of Done
|
|
264
|
+
|
|
265
|
+
- Requirements and business decisions are explicit; no implementation-changing question remains unresolved.
|
|
266
|
+
- Current behavior, target behavior, business rules, edge cases, and constraints are captured.
|
|
267
|
+
- The chosen design, change map, interfaces, dependencies, and migration or compatibility needs are explicit.
|
|
268
|
+
- Every requirement maps to implementation work, and every task has a requirement or named dependency.
|
|
269
|
+
- The plan contains implementation tasks only and preserves the `### Task N:` extraction contract.
|
|
270
|
+
- The plan is saved at `docs/plans/YYYY-MM-DD-<slug>.md`.
|
|
271
|
+
- Plan Mode, when active, has been exited; no implementation or later workflow stage has started.
|
|
272
|
+
|
|
273
|
+
## ACTIVE_STATE.md Update
|
|
274
|
+
|
|
275
|
+
Add or update the work item's row in `docs/ACTIVE_STATE.md` with the plan path, planning phase, and current status. Keep this as workflow metadata; the implementation detail belongs only in the plan.
|
|
276
|
+
|
|
277
|
+
## Related Skills and Stage Boundaries
|
|
278
|
+
|
|
279
|
+
- `hero-coding` may consume the approved plan only after the user explicitly starts implementation, preferably in a separate session.
|
|
280
|
+
- `hero-unit-test`, `hero-reviewing`, `hero-security`, and deployment or release work are independent later stages. They are not embedded in this plan.
|
|
281
|
+
- When a standalone `brainstorming` session already produced an approved design, use that design as an input and plan only the remaining implementation detail.
|
|
@@ -22,13 +22,16 @@ Skip it for Tiny/Fast work where a chat summary is enough and nobody asked for a
|
|
|
22
22
|
|
|
23
23
|
- Which stage just completed: `hero-coding`, `hero-reviewing`, or `hero-unit-test` (default to the most recently completed one unless the user names another).
|
|
24
24
|
- That stage's own "Report Convention" section in its SKILL.md — path pattern, required content, and style rules. This skill does not redefine them; it reads them from the source skill.
|
|
25
|
-
-
|
|
25
|
+
- The stage's captured output, without reconstruction:
|
|
26
|
+
- Coding: implementation task/requirement ledger, changed areas, deviations, and blockers. No testing or verification evidence is expected from this stage.
|
|
27
|
+
- Reviewing: reviewed-target identity, findings, coverage gaps, and verdict.
|
|
28
|
+
- Unit testing: test-only changes, exact commands and observed results, requirement coverage, failure classifications, and gaps.
|
|
26
29
|
|
|
27
30
|
## Process
|
|
28
31
|
|
|
29
32
|
1. Identify the stage (or stages) to report on.
|
|
30
33
|
2. Read that stage's SKILL.md "Report Convention" section for the path pattern, required content, and style.
|
|
31
|
-
3. Compose the report strictly from
|
|
34
|
+
3. Compose the report strictly from the stage output already captured. Do not rerun tests, reconstruct a review target, perform a new review, or fabricate evidence merely to fill a field.
|
|
32
35
|
4. Write the file at the conventional path (create parent directories as needed).
|
|
33
36
|
5. If `docs/ACTIVE_STATE.md` has a row for this work item, add a one-line link to the new report.
|
|
34
37
|
6. If asked to report on multiple stages, write one file per stage — never merge coding/review/test reports into a single file.
|