hero-mmt-kit 1.1.6 → 1.3.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 +33 -0
- package/README.md +19 -13
- package/package.json +2 -2
- package/skills.manifest.json +8 -9
- package/src/integrations.cjs +9 -7
- package/src/skills.cjs +17 -6
- package/templates/CLAUDE.md.tmpl +30 -42
- package/templates/skills/NOTICE +26 -8
- package/templates/skills/brainstorming/SKILL.md +9 -9
- package/templates/skills/executing-plans/SKILL.md +1 -1
- package/templates/skills/hero-coding/SKILL.md +148 -69
- package/templates/skills/hero-gitflow/SKILL.md +61 -0
- package/templates/skills/hero-mr-review/SKILL.md +3 -3
- package/templates/skills/hero-node/SKILL.md +177 -0
- 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 +22 -9
- package/templates/skills/subagent-driven-development/code-quality-reviewer-prompt.md +34 -34
- package/templates/skills/subagent-driven-development/implementer-prompt.md +4 -5
- package/templates/skills/subagent-driven-development/scripts/sdd-workspace.sh +9 -10
- package/templates/skills/subagent-driven-development/scripts/task-brief.sh +1 -1
- package/templates/skills/using-git-worktrees/SKILL.md +7 -5
- package/templates/skills/using-hero/SKILL.md +27 -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,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.
|