hero-mmt-kit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/LICENSE +21 -0
  3. package/README.md +158 -0
  4. package/bin/hero-mmt-kit.js +70 -0
  5. package/package.json +35 -0
  6. package/presets/enterprise.json +3 -0
  7. package/presets/small-team.json +3 -0
  8. package/presets/solo.json +3 -0
  9. package/skills.manifest.json +72 -0
  10. package/src/detect.cjs +43 -0
  11. package/src/discover.cjs +159 -0
  12. package/src/doctor.cjs +130 -0
  13. package/src/init.cjs +114 -0
  14. package/src/integrations.cjs +93 -0
  15. package/src/links.cjs +37 -0
  16. package/src/merge.cjs +61 -0
  17. package/src/profile-config.cjs +28 -0
  18. package/src/render.cjs +27 -0
  19. package/src/skills.cjs +107 -0
  20. package/src/update.cjs +75 -0
  21. package/src/util.cjs +56 -0
  22. package/src/workflow-state.cjs +65 -0
  23. package/templates/.hero-mmt-kit/session.schema.json +15 -0
  24. package/templates/AGENTS.md.tmpl +16 -0
  25. package/templates/CLAUDE.md.tmpl +23 -0
  26. package/templates/common/.claude/hooks/git-guard.cjs +57 -0
  27. package/templates/common/.claude/hooks/session-bridge.cjs +43 -0
  28. package/templates/common/.claude/hooks/stop-reminder.cjs +43 -0
  29. package/templates/common/.claude/settings.json +27 -0
  30. package/templates/docs/ACTIVE_STATE.md +41 -0
  31. package/templates/docs/BROWNFIELD_DISCOVERY.md +45 -0
  32. package/templates/docs/DESIGN_STANDARDS.md +86 -0
  33. package/templates/docs/INTERACTION_PATTERNS.md +58 -0
  34. package/templates/docs/PERFORMANCE_STANDARDS.md +31 -0
  35. package/templates/docs/SECURITY_STANDARDS.md +38 -0
  36. package/templates/docs/templates/DESIGN_BRIEF.md +44 -0
  37. package/templates/docs/templates/PRD_AI_FEATURE.md +87 -0
  38. package/templates/skills/NOTICE +69 -0
  39. package/templates/skills/brainstorming/SKILL.md +161 -0
  40. package/templates/skills/brainstorming/scripts/frame-template.html +214 -0
  41. package/templates/skills/brainstorming/scripts/helper.js +88 -0
  42. package/templates/skills/brainstorming/scripts/server.cjs +354 -0
  43. package/templates/skills/brainstorming/scripts/start-server.sh +148 -0
  44. package/templates/skills/brainstorming/scripts/stop-server.sh +56 -0
  45. package/templates/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  46. package/templates/skills/brainstorming/visual-companion.md +287 -0
  47. package/templates/skills/dispatching-parallel-agents/SKILL.md +186 -0
  48. package/templates/skills/executing-plans/SKILL.md +72 -0
  49. package/templates/skills/finishing-a-development-branch/SKILL.md +253 -0
  50. package/templates/skills/hero-coding/SKILL.md +69 -0
  51. package/templates/skills/hero-planning/SKILL.md +64 -0
  52. package/templates/skills/hero-reviewing/SKILL.md +66 -0
  53. package/templates/skills/hero-security/SKILL.md +425 -0
  54. package/templates/skills/hero-strict/SKILL.md +77 -0
  55. package/templates/skills/hero-unit-test/SKILL.md +79 -0
  56. package/templates/skills/receiving-code-review/SKILL.md +213 -0
  57. package/templates/skills/requesting-code-review/SKILL.md +108 -0
  58. package/templates/skills/requesting-code-review/code-reviewer.md +168 -0
  59. package/templates/skills/subagent-driven-development/SKILL.md +269 -0
  60. package/templates/skills/subagent-driven-development/code-quality-reviewer-prompt.md +34 -0
  61. package/templates/skills/subagent-driven-development/implementer-prompt.md +121 -0
  62. package/templates/skills/subagent-driven-development/scripts/review-package.sh +38 -0
  63. package/templates/skills/subagent-driven-development/scripts/sdd-workspace.sh +25 -0
  64. package/templates/skills/subagent-driven-development/scripts/task-brief.sh +58 -0
  65. package/templates/skills/subagent-driven-development/spec-reviewer-prompt.md +76 -0
  66. package/templates/skills/systematic-debugging/SKILL.md +296 -0
  67. package/templates/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  68. package/templates/skills/systematic-debugging/condition-based-waiting.md +115 -0
  69. package/templates/skills/systematic-debugging/defense-in-depth.md +122 -0
  70. package/templates/skills/systematic-debugging/find-polluter.sh +63 -0
  71. package/templates/skills/systematic-debugging/root-cause-tracing.md +169 -0
  72. package/templates/skills/test-driven-development/SKILL.md +371 -0
  73. package/templates/skills/test-driven-development/testing-anti-patterns.md +299 -0
  74. package/templates/skills/using-git-worktrees/SKILL.md +206 -0
  75. package/templates/skills/using-hero/SKILL.md +54 -0
  76. package/templates/skills/using-superpowers/SKILL.md +119 -0
  77. package/templates/skills/verification-before-completion/SKILL.md +139 -0
  78. package/templates/skills/writing-plans/SKILL.md +173 -0
  79. package/templates/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: verification-before-completion
3
+ description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
4
+ ---
5
+
6
+ # Verification Before Completion
7
+
8
+ ## Overview
9
+
10
+ Claiming work is complete without verification is dishonesty, not efficiency.
11
+
12
+ **Core principle:** Evidence before claims, always.
13
+
14
+ **Violating the letter of this rule is violating the spirit of this rule.**
15
+
16
+ ## The Iron Law
17
+
18
+ ```
19
+ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
20
+ ```
21
+
22
+ If you haven't run the verification command in this message, you cannot claim it passes.
23
+
24
+ ## The Gate Function
25
+
26
+ ```
27
+ BEFORE claiming any status or expressing satisfaction:
28
+
29
+ 1. IDENTIFY: What command proves this claim?
30
+ 2. RUN: Execute the FULL command (fresh, complete)
31
+ 3. READ: Full output, check exit code, count failures
32
+ 4. VERIFY: Does output confirm the claim?
33
+ - If NO: State actual status with evidence
34
+ - If YES: State claim WITH evidence
35
+ 5. ONLY THEN: Make the claim
36
+
37
+ Skip any step = lying, not verifying
38
+ ```
39
+
40
+ ## Common Failures
41
+
42
+ | Claim | Requires | Not Sufficient |
43
+ |-------|----------|----------------|
44
+ | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
45
+ | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
46
+ | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
47
+ | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
48
+ | Regression test works | Red-green cycle verified | Test passes once |
49
+ | Agent completed | VCS diff shows changes | Agent reports "success" |
50
+ | Requirements met | Line-by-line checklist | Tests passing |
51
+
52
+ ## Red Flags - STOP
53
+
54
+ - Using "should", "probably", "seems to"
55
+ - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
56
+ - About to commit/push/PR without verification
57
+ - Trusting agent success reports
58
+ - Relying on partial verification
59
+ - Thinking "just this once"
60
+ - Tired and wanting work over
61
+ - **ANY wording implying success without having run verification**
62
+
63
+ ## Rationalization Prevention
64
+
65
+ | Excuse | Reality |
66
+ |--------|---------|
67
+ | "Should work now" | RUN the verification |
68
+ | "I'm confident" | Confidence ≠ evidence |
69
+ | "Just this once" | No exceptions |
70
+ | "Linter passed" | Linter ≠ compiler |
71
+ | "Agent said success" | Verify independently |
72
+ | "I'm tired" | Exhaustion ≠ excuse |
73
+ | "Partial check is enough" | Partial proves nothing |
74
+ | "Different words so rule doesn't apply" | Spirit over letter |
75
+
76
+ ## Key Patterns
77
+
78
+ **Tests:**
79
+ ```
80
+ ✅ [Run test command] [See: 34/34 pass] "All tests pass"
81
+ ❌ "Should pass now" / "Looks correct"
82
+ ```
83
+
84
+ **Regression tests (TDD Red-Green):**
85
+ ```
86
+ ✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
87
+ ❌ "I've written a regression test" (without red-green verification)
88
+ ```
89
+
90
+ **Build:**
91
+ ```
92
+ ✅ [Run build] [See: exit 0] "Build passes"
93
+ ❌ "Linter passed" (linter doesn't check compilation)
94
+ ```
95
+
96
+ **Requirements:**
97
+ ```
98
+ ✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
99
+ ❌ "Tests pass, phase complete"
100
+ ```
101
+
102
+ **Agent delegation:**
103
+ ```
104
+ ✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
105
+ ❌ Trust agent report
106
+ ```
107
+
108
+ ## Why This Matters
109
+
110
+ From 24 failure memories:
111
+ - your human partner said "I don't believe you" - trust broken
112
+ - Undefined functions shipped - would crash
113
+ - Missing requirements shipped - incomplete features
114
+ - Time wasted on false completion → redirect → rework
115
+ - Violates: "Honesty is a core value. If you lie, you'll be replaced."
116
+
117
+ ## When To Apply
118
+
119
+ **ALWAYS before:**
120
+ - ANY variation of success/completion claims
121
+ - ANY expression of satisfaction
122
+ - ANY positive statement about work state
123
+ - Committing, PR creation, task completion
124
+ - Moving to next task
125
+ - Delegating to agents
126
+
127
+ **Rule applies to:**
128
+ - Exact phrases
129
+ - Paraphrases and synonyms
130
+ - Implications of success
131
+ - ANY communication suggesting completion/correctness
132
+
133
+ ## The Bottom Line
134
+
135
+ **No shortcuts for verification.**
136
+
137
+ Run the command. Read the output. THEN claim the result.
138
+
139
+ This is non-negotiable.
@@ -0,0 +1,173 @@
1
+ ---
2
+ name: writing-plans
3
+ description: Use when you have a spec or requirements for a multi-step task, before touching code
4
+ ---
5
+
6
+ # Writing Plans
7
+
8
+ ## Overview
9
+
10
+ Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
11
+
12
+ Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
13
+
14
+ **Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
15
+
16
+ **Context:** If working in an isolated worktree, it should have been created via the `superpowers:using-git-worktrees` skill at execution time.
17
+
18
+ **Save plans to:** `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`
19
+ - (User preferences for plan location override this default)
20
+
21
+ ## Scope Check
22
+
23
+ If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
24
+
25
+ ## File Structure
26
+
27
+ Before defining tasks, map out which files will be created or modified and what each one is responsible for. This is where decomposition decisions get locked in.
28
+
29
+ - Design units with clear boundaries and well-defined interfaces. Each file should have one clear responsibility.
30
+ - You reason best about code you can hold in context at once, and your edits are more reliable when files are focused. Prefer smaller, focused files over large ones that do too much.
31
+ - Files that change together should live together. Split by responsibility, not by technical layer.
32
+ - In existing codebases, follow established patterns. If the codebase uses large files, don't unilaterally restructure - but if a file you're modifying has grown unwieldy, including a split in the plan is reasonable.
33
+
34
+ This structure informs the task decomposition. Each task should produce self-contained changes that make sense independently.
35
+
36
+ ## Task Right-Sizing
37
+
38
+ A task is the smallest unit that carries its own test cycle and is worth a fresh reviewer's gate. When drawing task boundaries: fold setup, configuration, scaffolding, and documentation steps into the task whose deliverable needs them; split only where a reviewer could meaningfully reject one task while approving its neighbor. Each task ends with an independently testable deliverable.
39
+
40
+ ## Bite-Sized Task Granularity
41
+
42
+ **Each step is one action (2-5 minutes):**
43
+ - "Write the failing test" - step
44
+ - "Run it to make sure it fails" - step
45
+ - "Implement the minimal code to make the test pass" - step
46
+ - "Run the tests and make sure they pass" - step
47
+ - "Commit" - step
48
+
49
+ ## Plan Document Header
50
+
51
+ **Every plan MUST start with this header:**
52
+
53
+ ```markdown
54
+ # [Feature Name] Implementation Plan
55
+
56
+ > **For agentic workers:** Choose the lightest execution mode that fits the risk: direct execution for clear bounded tasks, superpowers:executing-plans for inline checkpoints, or superpowers:subagent-driven-development when delegation/review budget genuinely adds value. Steps use checkbox (`- [ ]`) syntax for tracking.
57
+
58
+ **Goal:** [One sentence describing what this builds]
59
+
60
+ **Architecture:** [2-3 sentences about approach]
61
+
62
+ **Tech Stack:** [Key technologies/libraries]
63
+
64
+ ## Global Constraints
65
+
66
+ [The spec's project-wide requirements — version floors, dependency limits, naming and copy rules, platform requirements — one line each, with exact values copied verbatim from the spec. Every task's requirements implicitly include this section.]
67
+
68
+ ---
69
+ ```
70
+
71
+ ## Task Structure
72
+
73
+ ````markdown
74
+ ### Task N: [Component Name]
75
+
76
+ **Files:**
77
+ - Create: `exact/path/to/file.py`
78
+ - Modify: `exact/path/to/existing.py:123-145`
79
+ - Test: `tests/exact/path/to/test.py`
80
+
81
+ **Interfaces:**
82
+ - Consumes: [what this task uses from earlier tasks — exact signatures]
83
+ - Produces: [what later tasks rely on — exact function names, parameter and return types. A task's implementer sees only their own task; this block is how they learn the names and types neighboring tasks use.]
84
+
85
+ - [ ] **Step 1: Write the failing test**
86
+
87
+ ```python
88
+ def test_specific_behavior():
89
+ result = function(input)
90
+ assert result == expected
91
+ ```
92
+
93
+ - [ ] **Step 2: Run test to verify it fails**
94
+
95
+ Run: `pytest tests/path/test.py::test_name -v`
96
+ Expected: FAIL with "function not defined"
97
+
98
+ - [ ] **Step 3: Write minimal implementation**
99
+
100
+ ```python
101
+ def function(input):
102
+ return expected
103
+ ```
104
+
105
+ - [ ] **Step 4: Run test to verify it passes**
106
+
107
+ Run: `pytest tests/path/test.py::test_name -v`
108
+ Expected: PASS
109
+
110
+ - [ ] **Step 5: Commit**
111
+
112
+ ```bash
113
+ git add tests/path/test.py src/path/file.py
114
+ git commit -m "feat: add specific feature"
115
+ ```
116
+ ````
117
+
118
+ ## No Placeholders
119
+
120
+ Every step must contain the actual content an engineer needs. These are **plan failures** — never write them:
121
+ - "TBD", "TODO", "implement later", "fill in details"
122
+ - "Add appropriate error handling" / "add validation" / "handle edge cases"
123
+ - "Write tests for the above" (without actual test code)
124
+ - "Similar to Task N" (repeat the code — the engineer may be reading tasks out of order)
125
+ - Steps that describe what to do without showing how (code blocks required for code steps)
126
+ - References to types, functions, or methods not defined in any task
127
+
128
+ ## Remember
129
+ - Exact file paths always
130
+ - Complete code in every step — if a step changes code, show the code
131
+ - Exact commands with expected output
132
+ - DRY, YAGNI, TDD, frequent commits
133
+
134
+ ## Self-Review
135
+
136
+ After writing the complete plan, look at the spec with fresh eyes and check the plan against it. This is a checklist you run yourself — not a subagent dispatch.
137
+
138
+ **1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
139
+
140
+ **2. Placeholder scan:** Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
141
+
142
+ **3. Type consistency:** Do the types, method signatures, and property names you used in later tasks match what you defined in earlier tasks? A function called `clearLayers()` in Task 3 but `clearFullLayers()` in Task 7 is a bug.
143
+
144
+ If you find issues, fix them inline. No need to re-review — just fix and move on. If you find a spec requirement with no task, add the task.
145
+
146
+ **Higher-assurance alternative:** For high-risk or `full-multi-stage-review` work, dispatch a separate reviewer subagent instead of self-review — see `plan-document-reviewer-prompt.md` in this skill's directory.
147
+
148
+ ## Execution Handoff
149
+
150
+ After saving the plan, offer execution choice:
151
+
152
+ **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Three execution options:**
153
+
154
+ **1. Direct / Pragmatic (default for clear bounded work)** - I implement in this session, run targeted checks, and report verified/unverified scope
155
+
156
+ **2. Inline Execution** - Execute tasks in this session using executing-plans, with checkpoints where useful
157
+
158
+ **3. Subagent-Driven** - Dispatch bounded subagents only where delegation or review budget genuinely adds value
159
+
160
+ **Which approach?"**
161
+
162
+ **If Direct / Pragmatic chosen:**
163
+ - Execute directly in the main session.
164
+ - Use targeted tests/checks and explicit verified/unverified handoff.
165
+ - Do not spawn reviewers unless risk changes.
166
+
167
+ **If Inline Execution chosen:**
168
+ - **REQUIRED SUB-SKILL:** Use superpowers:executing-plans.
169
+ - Batch execution with checkpoints for review.
170
+
171
+ **If Subagent-Driven chosen:**
172
+ - **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development.
173
+ - Select an adaptive review budget; do not default to spec review + quality review + final review for every task.
@@ -0,0 +1,49 @@
1
+ # Plan Document Reviewer Prompt Template
2
+
3
+ Use this template when dispatching a plan document reviewer subagent.
4
+
5
+ **Purpose:** Verify the plan is complete, matches the spec, and has proper task decomposition.
6
+
7
+ **Dispatch after:** The complete plan is written.
8
+
9
+ ```
10
+ Task tool (general-purpose):
11
+ description: "Review plan document"
12
+ prompt: |
13
+ You are a plan document reviewer. Verify this plan is complete and ready for implementation.
14
+
15
+ **Plan to review:** [PLAN_FILE_PATH]
16
+ **Spec for reference:** [SPEC_FILE_PATH]
17
+
18
+ ## What to Check
19
+
20
+ | Category | What to Look For |
21
+ |----------|------------------|
22
+ | Completeness | TODOs, placeholders, incomplete tasks, missing steps |
23
+ | Spec Alignment | Plan covers spec requirements, no major scope creep |
24
+ | Task Decomposition | Tasks have clear boundaries, steps are actionable |
25
+ | Buildability | Could an engineer follow this plan without getting stuck? |
26
+
27
+ ## Calibration
28
+
29
+ **Only flag issues that would cause real problems during implementation.**
30
+ An implementer building the wrong thing or getting stuck is an issue.
31
+ Minor wording, stylistic preferences, and "nice to have" suggestions are not.
32
+
33
+ Approve unless there are serious gaps — missing requirements from the spec,
34
+ contradictory steps, placeholder content, or tasks so vague they can't be acted on.
35
+
36
+ ## Output Format
37
+
38
+ ## Plan Review
39
+
40
+ **Status:** Approved | Issues Found
41
+
42
+ **Issues (if any):**
43
+ - [Task X, Step Y]: [specific issue] - [why it matters for implementation]
44
+
45
+ **Recommendations (advisory, do not block approval):**
46
+ - [suggestions for improvement]
47
+ ```
48
+
49
+ **Reviewer returns:** Status, Issues (if any), Recommendations