hero-mmt-kit 1.2.0 → 1.4.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 CHANGED
@@ -4,7 +4,22 @@ Notable changes to `hero-mmt-kit` are documented here from `1.0.0` onward.
4
4
 
5
5
  Format follows [Keep a Changelog](https://keepachangelog.com/); versioning follows [SemVer](https://semver.org/).
6
6
 
7
- ## [Unreleased]
7
+ ## [1.4.0] - 2026-10-13
8
+
9
+ ### Added
10
+
11
+ - `hero-golang`, a compact Go specialization that reads and inherits the `hero-coding` implementation-only contract. It preserves project/module/toolchain constraints and adds error, cancellation, concurrency, ownership, resource-lifetime, and boundary-data safeguards. Formatting with `gofmt` or existing project-configured `goimports` is limited to edited Go files; testing, verification, design, review, and delivery remain separate. Registered it in the bundled installer, workflow guidance, and attribution, with contract, fresh-install, upgrade, and Serena memo regression coverage. Reports remain on request with source stage `hero-coding`.
12
+
13
+ ## [1.3.0] - 2026-10-01
14
+
15
+ ### Added
16
+
17
+ - `hero-node`, a Node.js JavaScript/TypeScript specialization that reads and inherits the `hero-coding` implementation-only contract. It requires explicit boolean comparisons (including `=== false` instead of unary negation), business-accurate checks, strict comparisons, explicit field mapping, and class-based domain entities/DTOs, while preserving scope, formatter conventions, and independent testing/review. Registered it in the bundled installer, skill guidance, and attribution, with contract, fresh-install, and upgrade regression coverage. Coding reports retain the existing on-request convention.
18
+ - `hero-gitflow`, an independently invoked skill for explicitly requested Git actions. It preserves `.gitignore` and local changes, prohibits Git delivery into protected branches, applies source-branch and ticket naming rules, formats English commit messages without agent/actor signatures, and pauses on unresolved logical conflicts. Registered it in the bundled process suite and `using-hero` guidance, with installation and policy regression tests.
19
+
20
+ ### Changed
21
+
22
+ - Bundled worktree, brainstorming, and subagent guidance no longer instructs agents to edit `.gitignore` or commit automatically; the subagent scratch workspace uses an external cache when its in-repo path is not already ignored. Git delivery remains a separate, human-requested action.
8
23
 
9
24
  ## [1.2.0] - 2026-09-19
10
25
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # hero-mmt-kit
2
2
 
3
- > A focused, human-led coding workflow for **Claude Code** — seven direct-use skills (planning, coding, reviewing, unit testing, security, MR review, strict verification) plus an on-demand report writer, simple durable state, and soft safety hooks. Zero runtime dependencies.
3
+ > A focused, human-led coding workflow for **Claude Code** — ten direct-use skills (planning, coding, Node.js coding, Go coding, reviewing, unit testing, security, MR review, Gitflow, strict verification) plus an on-demand report writer, simple durable state, and soft safety hooks. Zero runtime dependencies.
4
4
 
5
5
  `hero-mmt-kit` installs a lightweight Claude Code workflow into new or existing repositories. It is designed for developers who stay in control: you choose the task, invoke the relevant skill, and keep the final judgment on plans, code, tests, reviews, and security checks.
6
6
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  `hero-mmt-kit` is **documentation + direct-use skills + soft hooks + a zero-dependency CLI**. It does not route work automatically, enforce phases, or block normal development flow.
10
10
 
11
- - **Seven operative skills** (`hero-planning`, `hero-coding`, `hero-reviewing`, `hero-unit-test`, `hero-security`, `hero-mr-review`, `hero-strict`) covering the lifecycle of a change. They define Hero-native stage contracts and, where useful, incorporate attributed methodology from proven vendored techniques. Each phase is done on its own — finishing one never auto-triggers the next.
11
+ - **Ten operative skills** (`hero-planning`, `hero-coding`, `hero-node`, `hero-golang`, `hero-reviewing`, `hero-unit-test`, `hero-security`, `hero-mr-review`, `hero-gitflow`, `hero-strict`) covering the lifecycle of a change. `hero-node` and `hero-golang` specialize the coding stage for Node.js and Go; they do not add a stage. They define Hero-native stage contracts and, where useful, incorporate attributed methodology from proven vendored techniques. Each phase is done on its own — finishing one never auto-triggers the next.
12
12
  - **Report writing is on-demand** — `hero-coding`/`hero-reviewing`/`hero-unit-test` end with a concise chat summary; a written report is only produced when asked, via the separate `hero-report` skill.
13
13
  - **No router, no gates** — there is no task-classification doc and no hard PreToolUse enforcement. `using-hero` is a map, not a controller.
14
14
  - **Soft hooks only** — `git-guard` blocks a small set of genuinely dangerous git commands and reminds (never blocks) on ordinary commits; `stop-reminder` nudges you to update state when you stop with uncommitted changes; `active-state-bridge` injects `docs/ACTIVE_STATE.md` into context once per session start.
@@ -64,23 +64,30 @@ your-project/
64
64
 
65
65
  ## Workflow skills
66
66
 
67
- Invoke `using-hero` first for an overview — it explains which skill applies next and how workflow state carries across sessions. The seven operative skills:
67
+ Invoke `using-hero` first for an overview — it explains which skill applies next and how workflow state carries across sessions. The ten operative skills:
68
68
 
69
69
  | Skill | Use when | Artifact / report |
70
70
  |---|---|---|
71
71
  | `hero-planning` | Clarifying non-trivial work through analysis and brainstorming, then writing an implementation-only plan. | `docs/plans/YYYY-MM-DD-slug.md` — always written; it's the deliverable, not a report |
72
72
  | `hero-coding` | Implementing every task and requirement in an approved plan, or a small bounded request. No testing or self-review. | `docs/coding-reports/YYYY-MM-DD-slug.md` — on request |
73
+ | `hero-node` | Node.js JavaScript/TypeScript implementation with explicit conditions, field mapping, and typed models; inherits the same `hero-coding` stage. | Same coding report — on request |
74
+ | `hero-golang` | Go implementation with ownership, cancellation, resource safety, and edited-file formatting; inherits the same `hero-coding` stage. | Same coding report — on request |
73
75
  | `hero-reviewing` | Single read-only entry point for a fresh implementation review, technical assessment of supplied feedback, or an explicit combination of both. | `docs/reviews/YYYY-MM-DD-slug.md` — on request |
74
76
  | `hero-unit-test` | Writing and running post-implementation unit tests from the approved requirements; no production-code fixes. | `docs/test-reports/YYYY-MM-DD-slug.md` — on request |
75
77
  | `hero-security` | You want an independent OWASP + AI/LLM security review of a sensitive surface. | `docs/security-reports/YYYY-MM-DD-slug.md` — always written for the security pass. |
76
78
  | `hero-mr-review` | Reviewing a teammate's committed MR/ref against MR intent and repository conventions. | `docs/mr-reviews/YYYY-MM-DD-slug.md` — always written. |
79
+ | `hero-gitflow` | Performing a Git action explicitly requested by the user, with protected-branch and `.gitignore` safeguards. | Chat result; no automatic next action. |
77
80
  | `hero-strict` | Extra rigor wanted in a separate full verification session before a "done" claim. | Appends to the current report, if one exists/was requested. |
78
81
 
79
82
  A typical flow is `hero-planning` → `hero-coding` → `hero-unit-test` and/or `hero-reviewing` → (`hero-security` or `hero-strict` when wanted) → done. Start each stage explicitly, preferably in a fresh session: planning defines implementation work; coding implements and tracks it only; unit testing writes/runs tests only; reviewing conducts a fresh review and/or assesses supplied feedback without fixing code or running tests. Confirmed findings require explicit user approval before a later `hero-coding` correction session. Skip stages that do not fit the change. There is no automatic full-pipeline run.
80
83
 
81
- Choose review by source of truth. `hero-reviewing` is the one entry point for comparing a local or committed implementation with its Hero plan or explicit acceptance criteria and for validating supplied review feedback; optional fresh-review delegation happens internally. `hero-mr-review` sits outside that flow and reviews a teammate's committed MR range against MR intent, repository conventions, impact, and potential bugs.
84
+ For Node.js services, CLIs, workers, or libraries written in JavaScript/TypeScript, invoke `hero-node` instead of generic `hero-coding` to apply explicit boolean comparisons (`=== true` / `=== false`, not `!value` or `!!`), business-accurate checks, explicit field mapping, and class-based domain entities/DTOs. It reads the parent contract and stays implementation-only; you do not need to invoke both skills. It does not automatically apply to frontend code merely because Node-based tooling is present, or authorize refactoring unrelated code.
82
85
 
83
- `hero-coding`, `hero-reviewing`, and `hero-unit-test` don't write a report file by default — they end with a concise chat summary. An eighth, on-demand skill, `hero-report`, writes those report files when the user actually wants one, at the path convention the source skill defines. `hero-security` and `hero-mr-review` are the exceptions: both are independent flows that always write their own standalone report (`docs/security-reports/...` and `docs/mr-reviews/...` respectively).
86
+ For Go services, CLIs, workers, or libraries, invoke `hero-golang` instead of generic `hero-coding`. It respects the module's supported Go version, existing dependencies, and architecture, and adds rules for error handling, context cancellation, goroutine/channel lifetime, buffer ownership, resource cleanup, and boundary validation. It may run `gofmt` (or the project's existing `goimports`) only on the Go files it edited; it never runs build, test, vet, or lint. It reads the parent contract and stays implementation-only; you do not need to invoke both skills.
87
+
88
+ Choose review by source of truth. `hero-reviewing` is the one entry point for comparing a local or committed implementation with its Hero plan or explicit acceptance criteria and for validating supplied review feedback; optional fresh-review delegation happens internally. `hero-mr-review` sits outside that flow and reviews a teammate's committed MR range against MR intent, repository conventions, impact, and potential bugs. `hero-gitflow` is likewise independent: invoke it only for a specific Git action requested by the user. It never changes `.gitignore` or delivers into protected branches, and completing a step never authorizes the next one.
89
+
90
+ `hero-coding`, `hero-reviewing`, and `hero-unit-test` don't write a report file by default — they end with a concise chat summary. A separate on-demand skill, `hero-report`, writes those report files when the user actually wants one, at the path convention the source skill defines. Work done through `hero-node` or `hero-golang` uses the same coding-report convention with source stage `hero-coding`. `hero-security` and `hero-mr-review` are the exceptions: both are independent flows that always write their own standalone report (`docs/security-reports/...` and `docs/mr-reviews/...` respectively).
84
91
 
85
92
  The kit also ships general-purpose vendored technique skills: `brainstorming`, `executing-plans`, `test-driven-development`, `systematic-debugging`, `verification-before-completion`, `dispatching-parallel-agents`, `subagent-driven-development`, `using-git-worktrees`. They remain available for direct use, but their broader lifecycles must not override a Hero stage's hard boundary. All are bundled under `templates/skills/` and installed unconditionally into `.claude/skills/`, with attribution in `templates/skills/NOTICE`.
86
93
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hero-mmt-kit",
3
- "version": "1.2.0",
4
- "description": "A focused Claude Code framework for human-led development — seven direct-use skills (planning, coding, reviewing, unit testing, security, MR review, strict mode) plus an on-demand report writer, with simple state tracking. Works for new and existing (brownfield) projects.",
3
+ "version": "1.4.0",
4
+ "description": "A focused Claude Code framework for human-led development — ten direct-use skills (planning, coding, Node.js coding, Go coding, reviewing, unit testing, security, MR review, Gitflow, strict mode) plus an on-demand report writer, with simple state tracking. Works for new and existing (brownfield) projects.",
5
5
  "keywords": [
6
6
  "claude-code",
7
7
  "ai-workflow",
@@ -28,10 +28,13 @@
28
28
  { "name": "using-git-worktrees", "source": "obra/superpowers" },
29
29
  { "name": "hero-planning", "source": "hero-mmt-kit", "description": "Clarify requirements through analysis and brainstorming, then write an implementation-only plan with requirement-to-task coverage." },
30
30
  { "name": "hero-coding", "source": "hero-mmt-kit", "description": "Implement and track every requirement/task in an approved plan or small bounded request; no testing or self-review." },
31
+ { "name": "hero-node", "source": "hero-mmt-kit", "description": "Specialize hero-coding for Node.js JavaScript/TypeScript with explicit conditions, field mapping, and typed models; same implementation-only stage." },
32
+ { "name": "hero-golang", "source": "hero-mmt-kit", "description": "Specialize hero-coding for Go with ownership, cancellation, resource safety, and edited-file formatting; same implementation-only stage." },
31
33
  { "name": "hero-reviewing", "source": "hero-mmt-kit", "description": "Conduct a plan-backed, read-only review, assess supplied review feedback, or explicitly do both without applying fixes." },
32
34
  { "name": "hero-unit-test", "source": "hero-mmt-kit", "description": "Write and run post-implementation unit tests from approved requirements without changing production code." },
33
35
  { "name": "hero-security", "source": "hero-mmt-kit", "description": "Run an independent OWASP + AI/LLM security review and write a standalone security report." },
34
36
  { "name": "hero-mr-review", "source": "hero-mmt-kit", "description": "Review a teammate's merge request by commit/tag/branch and write a standalone MR review report." },
37
+ { "name": "hero-gitflow", "source": "hero-mmt-kit", "description": "Handle explicitly requested Git actions with protected-branch, .gitignore, ticket, and commit-message safeguards." },
35
38
  { "name": "hero-strict", "source": "hero-mmt-kit", "description": "Opt-in full verification pass before a \"done\" claim." },
36
39
  { "name": "hero-report", "source": "hero-mmt-kit", "description": "On-demand report writer — writes the coding/review/test report at the source skill's conventional path, only when requested." }
37
40
  ]
@@ -27,8 +27,11 @@ const SERENA_MEMOS = {
27
27
  'hero_workflow.md':
28
28
  'Human-led Claude Code workflow (hero-mmt-kit). Use the **using-hero** skill for the overview.\n\n' +
29
29
  'Core skills: hero-planning (implementation-only plan), hero-coding (implementation and requirement tracking only), ' +
30
+ 'hero-node (Node.js JavaScript/TypeScript specialization of the same hero-coding stage), ' +
31
+ 'hero-golang (Go specialization of the same hero-coding stage; ownership, cancellation, and bounded formatting), ' +
30
32
  'hero-reviewing (read-only review and supplied-feedback assessment), hero-unit-test (post-implementation unit tests only), ' +
31
33
  'hero-mr-review (standalone review of a teammate\'s MR by commit/tag/branch), ' +
34
+ 'hero-gitflow (user-requested Git actions only; protects branches and .gitignore), ' +
32
35
  'hero-strict (opt-in full verification pass before a "done" claim).\n\n' +
33
36
  'Session state: docs/ACTIVE_STATE.md\'s Active Features table (the single source of durable workflow state).\n\n' +
34
37
  'Details (always read the source files, do not duplicate here): docs/ACTIVE_STATE.md, docs/SECURITY_STANDARDS.md, ' +
package/src/skills.cjs CHANGED
@@ -16,10 +16,13 @@ const CORE_SKILL_ORDER = [
16
16
  'using-git-worktrees',
17
17
  'hero-planning',
18
18
  'hero-coding',
19
+ 'hero-node',
20
+ 'hero-golang',
19
21
  'hero-reviewing',
20
22
  'hero-unit-test',
21
23
  'hero-security',
22
24
  'hero-mr-review',
25
+ 'hero-gitflow',
23
26
  'hero-strict',
24
27
  'hero-report',
25
28
  ];
@@ -5,9 +5,13 @@
5
5
  Core Hero skills:
6
6
  - `hero-planning` — turn a request into an agreed, implementation-only plan before code changes.
7
7
  - `hero-coding` — implement and track every approved requirement/task; no testing or self-review.
8
+ - `hero-node` — choose for Node.js JavaScript/TypeScript implementation with explicit coding rules; inherits the same `hero-coding` stage and boundaries.
9
+ - `hero-golang` — choose for Go implementation with ownership, cancellation, and resource safety rules; inherits the same `hero-coding` stage and boundaries. Formatting is limited to edited files, not verification.
8
10
  - `hero-reviewing` — single read-only entry point for a fresh plan-backed review and/or technical assessment of supplied review feedback.
9
11
  - `hero-unit-test` — write and run post-implementation unit tests without changing production code.
10
12
  - `hero-security` — standalone OWASP + AI/LLM security review when you want a dedicated security pass.
13
+ - `hero-mr-review` — standalone review of a teammate's committed MR/ref.
14
+ - `hero-gitflow` — standalone, user-requested Git actions under protected-branch and `.gitignore` rules.
11
15
  - `hero-strict` — opt-in, separate full verification pass before a "done" claim.
12
16
 
13
17
  ### Context loading
@@ -17,7 +21,7 @@ Core Hero skills:
17
21
  ### Non-negotiables
18
22
  - **Gates:** for risky or hard-to-reverse changes, use Plan Mode (`EnterPlanMode` → `ExitPlanMode`) for real sign-off — not a prose promise.
19
23
  - **Plan Mode:** do not enter Plan Mode unless the user explicitly requests planning. When they do, invoke `hero-planning`.
20
- - **Git:** do not check out a branch, commit, or merge unless the user explicitly requests it.
24
+ - **Git:** use `hero-gitflow` only for Git actions the user explicitly requests; do not check out a branch, commit, push, merge, revert, or rebase automatically. Never edit or stage `.gitignore` (including existing local changes), and never add agent/actor signatures. `develop`, `release/*`, `main`, and `master` are protected destinations: do not commit, push, merge, rebase, or revert into them. Generic skills cannot override these rules; see `hero-gitflow` for branch, ticket, commit-message, and conflict handling.
21
25
  - **Enforcement:** hooks installed under `.claude/` — `git-guard` (PreToolUse on Bash), `session-bridge` (PostToolUse), `stop-reminder` (Stop). Don't bypass them.
22
26
  - **GitNexus (if installed):** skip on empty repos; use impact/context analysis for non-trivial code changes and stale-index checks.
23
27
  - **Skills (if installed):** invoke relevant process skills via the `Skill` tool; do not load unrelated skill/docs context.
@@ -58,8 +58,8 @@ the other supporting files remain unchanged obra/superpowers-origin content
58
58
  under MIT.
59
59
 
60
60
  Framework-authored skills shipped by hero-mmt-kit:
61
- using-hero, hero-planning, hero-coding, hero-reviewing,
62
- hero-unit-test, hero-security, hero-mr-review, hero-strict, hero-report
61
+ using-hero, hero-planning, hero-coding, hero-node, hero-golang, hero-reviewing,
62
+ hero-unit-test, hero-security, hero-mr-review, hero-gitflow, hero-strict, hero-report
63
63
 
64
64
  Design / visual-direction skills are NOT vendored — they are referenced in
65
65
  skills.manifest.json and installed from their original sources on demand.
@@ -106,7 +106,7 @@ digraph brainstorming {
106
106
  - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
107
107
  - (User preferences for spec location override this default)
108
108
  - Use elements-of-style:writing-clearly-and-concisely skill if available
109
- - Commit the design document to git
109
+ - Do not commit the design document unless the user specifically asks for a commit. If requested, follow `hero-gitflow`'s branch, staging, and commit-message rules.
110
110
 
111
111
  **Spec Self-Review:**
112
112
  After writing the spec document, look at it with fresh eyes:
@@ -123,7 +123,7 @@ Fix any issues inline. No need to re-review — just fix and move on.
123
123
  **User Review Gate:**
124
124
  After the spec review loop passes, ask the user to review the written spec before proceeding:
125
125
 
126
- > "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
126
+ > "Spec written to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
127
127
 
128
128
  Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
129
129
 
@@ -141,6 +141,8 @@ Use `docs/ACTIVE_STATE.md` only as a durable index when a tracked work item need
141
141
 
142
142
  ## Related Skills
143
143
 
144
+ - `hero-node` specializes this same implementation-only contract for Node.js JavaScript/TypeScript; it adds explicit coding conventions, not a new stage.
145
+ - `hero-golang` specializes this same implementation-only contract for Go; it adds ownership, cancellation, resource safety, and bounded formatting rules, not a new stage.
144
146
  - Reads the approved implementation contract from `hero-planning`, or exact user-approved correction IDs from a prior `hero-reviewing` handoff.
145
147
  - Never decides whether review feedback is valid; `hero-reviewing` owns that assessment.
146
148
  - Hands the resulting implementation to separately invoked `hero-unit-test`, `hero-reviewing`, and, when appropriate, `hero-security` or `hero-strict` sessions.
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: hero-gitflow
3
+ description: Use when the user explicitly requests Git branch creation or delivery operations — checks protected branches, preserves .gitignore, and follows ticket-based branch and commit conventions without automating the next step
4
+ ---
5
+
6
+ # Hero Gitflow
7
+
8
+ ## Overview
9
+
10
+ A standalone, human-led Git workflow. Use it only for a Git action the user has specifically requested; installing this skill does not authorize branch creation, commit, push, merge, revert, or rebase. Completing one action never authorizes another. It does not run automatically after `hero-coding`, testing, or review, and it does not replace the repository's Git hooks.
11
+
12
+ ## When to Use
13
+
14
+ Use when the user asks to create a branch, commit changes, push a branch, merge, revert, or rebase. For a read-only review of a teammate's committed MR, use `hero-mr-review` instead. If the request only asks for implementation, testing, or review, do not perform Git delivery.
15
+
16
+ ## Inputs
17
+
18
+ - The exact Git action requested; for push/merge/rebase/revert, the user must name that action specifically. Do not treat "finish", "ship", or approval of a previous step as permission for a different action.
19
+ - For a new branch: its type (`feature`, `fix`, or `hotfix`), a short description, any ticket code supplied by the user, and the intended base if more than one eligible base exists. Never invent a ticket code.
20
+ - For merge/rebase/push: the source and destination refs or remote. Ask when the destination cannot be established safely.
21
+ - For a commit: which changes are in scope. Ask before including unrelated changes.
22
+
23
+ ## Process
24
+
25
+ 1. **Read-only preflight.** Check `git status --short`, `git branch --show-current`, the relevant source/destination refs, and `git diff --cached --name-only` before changing Git state. Check both staged and unstaged changes, including `.gitignore`; inspection is allowed, modification is not. Confirm the requested operation and where its result will land. If the working tree is dirty and a checkout or worktree operation may carry or disturb local changes (especially `.gitignore`), stop and ask rather than moving, stashing, or cleaning them.
26
+ 2. **Enforce protected destinations.** `develop`, `release/*`, `main`, and `master` are protected branches. Never commit while on them, or push, merge, rebase, or revert *into* them, even if requested. This applies to local and remote destinations (including refspecs). Explain the block and ask for a permitted destination; do not silently switch branches. Creating a new branch *from* an eligible protected base is allowed only when branch creation was requested.
27
+ 3. **Create a branch only on request.** `feature/*` and `fix/*` must start from `develop` or `release/*`; `hotfix/*` must start from `main` or `master`. If the required base is absent or multiple bases are plausible, ask instead of guessing or fetching/switching implicitly. Keep a supplied ticket code and a short kebab-case description in the name, e.g. `feature/BU-1740-short-description` or `fix/CI-1545-short-description`. Without a ticket, use `feature/short-description` or `fix/short-description`; do not fabricate one. Check the proposed branch name and base before creating it.
28
+ 4. **Commit only on an eligible branch and on request.** Never touch `.gitignore`: do not edit, stage, unstage, restore, stash, clean, or include it in a commit, even when it has local unstaged changes. If it is already staged, stop and ask the user to handle it; do not alter the index entry yourself. Stage only explicitly approved paths (never `git add .`, `git add -A`, or `git commit -a`). Inspect `git diff --cached --name-only` and `git diff --cached` before committing; stop if `.gitignore` or changes outside the approved scope are staged. Write an English message with a short descriptive title, prefixed by the ticket code when supplied, followed by detailed bullet points. Example:
29
+
30
+ ```text
31
+ BU-1740: Add account search filters
32
+
33
+ - Add filters for account status and owner.
34
+ - Keep existing search results unchanged when no filter is selected.
35
+ ```
36
+
37
+ Do not add an agent/actor signature, `Signed-off-by`, `Co-Authored-By`, or generated-by trailer, and do not set an agent identity as the author. Use the human-configured Git identity; if it is missing or points to an agent, pause for the user to configure it. Do not bypass hooks.
38
+ 5. **Other operations require their own explicit request.** Push only to a permitted destination; inspect the remote and refspec first. Merge, rebase, or revert only onto a permitted branch and only for the exact refs/commits the user requested. Never chain these operations after a commit or branch creation. Do not force-push or use destructive reset/cleanup as a workaround. If a conflict involves incompatible logic between branches and the right behavior cannot be determined from the requirements, stop, describe the alternatives, and ask the user before resolving it. Preserve unresolved work without guessing.
39
+ 6. **Report the result.** State the action actually taken, source/destination or commit identifier when available, any untouched `.gitignore` changes, and any blocked or pending action. Never imply that a commit was pushed or merged when it was not.
40
+
41
+ ## Output Style
42
+
43
+ - Lead with the action and result, then the branch/commit evidence and any next decision.
44
+ - Preserve exact branch names, ticket codes, file paths, commands, and error strings.
45
+ - Explain protected-branch blocks and ambiguous conflicts clearly; do not present a guess as a resolution.
46
+
47
+ ## Definition of Done
48
+
49
+ - The action was specifically requested and passed the preflight and protected-destination checks.
50
+ - `.gitignore` was not modified, staged, unstaged, restored, or committed by this workflow; no unrelated changes were included.
51
+ - Any commit uses the English title-and-bullets format, with the supplied ticket prefix if present and no agent/actor signature.
52
+ - Logical conflicts that cannot be decided from the requirements were left for the user to decide.
53
+ - The actual outcome and remaining manual decisions were reported without implying a later Git action happened.
54
+
55
+ ## ACTIVE_STATE.md Update
56
+
57
+ Do not create or rewrite workflow artifacts just to record a Git action. If an existing Active Features row needs its branch reference or status updated and the user requested that state update, follow the `docs/ACTIVE_STATE.md` convention without changing unrelated rows.
58
+
59
+ ## Related Skills
60
+
61
+ `using-hero` routes to this skill for a user-requested Git action. `hero-coding`, `hero-unit-test`, and review skills keep their separate boundaries and do not invoke Git delivery automatically. Generic vendored skills such as `using-git-worktrees`, `brainstorming`, or `subagent-driven-development` cannot override these Git constraints or authorize a commit. `git-guard` blocks only a narrower set of commands; its silence is not permission to violate this skill.
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: hero-golang
3
+ description: Use for implementation-only Go service, CLI, worker, or library changes under an approved plan, bounded request, or exact user-approved review corrections
4
+ ---
5
+
6
+ # Hero Golang
7
+
8
+ ## Scope and Mandatory Parent
9
+
10
+ hero-golang specializes `hero-coding` within the same coding stage; it is not a new stage. Choose it instead of generic `hero-coding` for Go services, CLIs, workers, and libraries. The user does not need to invoke both. A repository does not qualify merely because it contains Go tooling, generated code, or vendored Go dependencies; in a mixed-language request, apply these rules only to the Go portion.
11
+
12
+ **Before any production edit, read the complete actual sibling [`../hero-coding/SKILL.md`](../hero-coding/SKILL.md), resolved from this skill's installed directory.** Do not substitute a remembered contract, repository template, or metadata declaration for that read. If the sibling is missing or unreadable, stop and report the missing prerequisite; do not reconstruct it.
13
+
14
+ Inherit the entire parent contract by reference, including approvals, inputs, scope, ledgers, dependencies, blockers, implementation-only boundaries, completion criteria, durable state, handoff, and reporting. The rules below add Go-specific implementation conventions; they do not weaken the parent.
15
+
16
+ <HARD-BOUNDARY>
17
+ Implement only an approved plan explicitly started by the user, a sufficiently bounded request, or exact correction IDs confirmed by prior independent `hero-reviewing` and explicitly approved by the user. Do not choose feedback or expand scope. No architecture design, test authoring/running, verification commands, self-review, review delegation, deployment, release, or Git delivery actions. Assurance and delivery belong to separate later sessions.
18
+ </HARD-BOUNDARY>
19
+
20
+ Maintain the parent's linked task/requirement ledger, respect dependencies, and keep the approved plan immutable. Record deviations and blockers; stop for ambiguity, missing prerequisites, target drift, or unsafe scope expansion. Reading the existing architecture to implement correctly is expected; redesigning it is not. Reconcile implementation coverage, not correctness. Finish with the parent handoff to independent testing and review.
21
+
22
+ ## MUST: Bounded Changes and Project Baseline
23
+
24
+ Apply these conventions to new code and portions genuinely necessary for the approved change. Do not mechanically convert untouched code to these conventions.
25
+
26
+ - Before using a language feature or standard-library API, identify the owning module and its supported Go version from `go.mod` (`go` and `toolchain` directives), `go.work` when present, build constraints, and any documented support matrix. The locally installed toolchain does not raise the module's supported version.
27
+ - Preserve the existing module/package layout, public API, framework, logging, error, configuration, and dependency choices. Do not impose a `cmd`/`internal`/`pkg` layout, functional options, generics, embedding, or a new library.
28
+ - Do not add or upgrade dependencies, edit `go.mod`/`go.sum`/`go.work`, change the toolchain or linter configuration, or change generated or vendored artifacts without approval for that exact change. If implementation requires an unapproved change, stop and record a blocker instead of improvising. Do not run `go mod tidy` or generators in this stage; hand any required regeneration to a separately authorized session.
29
+ - Do not add unrelated refactors, migrations, renames, or package moves.
30
+ - If requirements, framework constraints, or required behavior conflict with a rule here, stop and escalate with the concrete conflict. Do not silently exempt the framework or change semantics.
31
+
32
+ ## MUST: Formatting Only on Edited Files
33
+
34
+ - `gofmt -w` may run only on the Go files edited for the current task, named explicitly. Never run it on `.`, `./...`, a broad glob, or files you did not edit.
35
+ - `goimports` may run under the same limit only when the project already uses it and it is already installed. Do not download or install any tool.
36
+ - Do not format generated or vendored files. If formatting would rewrite unrelated user changes in an edited file, do not run it; record a blocker instead.
37
+ - Formatting is an editing step, not verification or correctness evidence. This exception does not permit `go build`, `go vet`, `go test`, linters, race detection, benchmarks, `go generate`, or any other verification command.
38
+ - Name every formatting command actually run in the handoff.
39
+
40
+ ## MUST: Errors and Failure Paths
41
+
42
+ - Preserve the existing sentinel errors, error types, and wrapping contract that callers depend on. Wrapping with `%w` exposes the cause as part of the API; use it when callers should match the cause and `%v` when they should not.
43
+ - Match wrapped errors with `errors.Is` and `errors.As`, never with `==` against a possibly wrapped error or by comparing error strings.
44
+ - Never discard an error with `_` unless it is a documented best-effort cleanup whose failure cannot affect results; state the reason in a comment.
45
+ - Handle an error once: return it with useful context or log it at the boundary that owns the decision, not both at every layer.
46
+ - Avoid typed-nil errors: a nil pointer stored in an interface is not equal to `nil`. Return a literal `nil` on a successful error path; do not return a typed nil pointer as an `error`.
47
+ - Return errors for invalid input and expected operational failures instead of panicking. Do not call `log.Fatal` or `os.Exit` from library or helper code; the application entry point owns process termination and must preserve required cleanup.
48
+
49
+ ## MUST: Context, Goroutines, and Channels
50
+
51
+ - When adding context-aware operations, accept `context.Context` as the first parameter and propagate it to blocking calls that support cancellation. Do not silently break an existing API to add context. Prefer passing context explicitly over storing request contexts in structs; do not replace an available context with `context.Background()` or a placeholder context.
52
+ - Call the `cancel` function of every derived context on all paths, normally with `defer cancel()` right after creation.
53
+ - Every goroutine you start needs an owner and a guaranteed exit through completion, cancellation, or channel closure. Do not start fire-and-forget goroutines.
54
+ - A send or receive that can block must also select on `ctx.Done()` or have another proven exit. A buffered channel is not a cancellation mechanism.
55
+ - Define the channel-closing owner: the sender or a coordinator that knows every sender has finished. Only that owner closes it, exactly once when closure is part of the protocol; merely creating or receiving from a channel does not make closing it safe.
56
+ - Deliver results and errors together, or through a defined error path, so a consumer can never wait forever for a result that failed.
57
+ - Decide how results are consumed before starting producers. A producer that blocks on an unbuffered results channel needs a concurrent reader; do not wait for producers on the same goroutine that must read their output.
58
+ - Bound concurrency when work fans out over unbounded input. With manual WaitGroup accounting, call `WaitGroup.Add` before the `go` statement. Capture loop variables according to the owning module's Go language version; do not assume the installed toolchain changes older loop semantics.
59
+ - Prefer concurrency helpers already available in the module; using `errgroup` does not justify adding `golang.org/x/sync` without explicit dependency approval. Do not convert synchronous code into goroutines for style.
60
+
61
+ ## MUST: Shared State, Ownership, and Resources
62
+
63
+ - Guard shared mutable state with the project's existing synchronization approach. Do not copy values containing `sync.Mutex`, `sync.WaitGroup`, or other `sync` types after first use; pass them by pointer.
64
+ - Initialize maps before writing to them. Remember that slices returned by `append` or slicing may share a backing array; return copies of internal slices or maps when callers must not mutate them.
65
+ - Never return a slice that aliases a pooled or reused buffer after that buffer is reset or returned to the pool. Copy the data first, or transfer ownership explicitly:
66
+
67
+ ```go
68
+ buf := bufferPool.Get().(*bytes.Buffer)
69
+ defer func() {
70
+ buf.Reset()
71
+ bufferPool.Put(buf)
72
+ }()
73
+ buf.Write(data)
74
+ out := make([]byte, buf.Len())
75
+ copy(out, buf.Bytes())
76
+ return out
77
+ ```
78
+
79
+ Do not add `sync.Pool` or similar optimizations unless the approved scope asks for them.
80
+ - Release owned resources on every path: close files and HTTP response bodies, release locks, and complete transactions with commit or rollback. Register `defer` only after the acquiring call's error check.
81
+ - Check the error from `Close`, `Flush`, `Sync`, or `Commit` when it can lose or corrupt written data.
82
+ - Do not `defer` inside a loop when that holds every iteration's resource until the function returns; release per iteration or extract a function. This is not a ban on `defer`.
83
+
84
+ ## MUST: Boundary Data and Zero Values
85
+
86
+ - Decoding or type conversion is not validation. Validate decoded JSON, database rows, environment values, and request parameters against the approved contract before use.
87
+ - Distinguish absent, `null`, zero, and empty values only where the contract distinguishes them, using pointers, `sql.Null*` types, or explicit presence fields. Do not invent rejection rules; zero or empty may be valid.
88
+ - Preserve existing JSON/DB tags and wire representations. Map between transport DTOs and domain types field by field when they differ.
89
+ - A successful HTTP round trip is not a successful business result. Check the status code and response contract the requirements define.
90
+ - Bound reads of untrusted input or responses when the contract or existing code sets limits.
91
+
92
+ ## PREFER: Readable, Cohesive Go
93
+
94
+ - Prefer guard clauses and early returns over unnecessary nesting, but preserve cleanup, transaction outcomes, locks, and resource ownership.
95
+ - Keep a type's receiver kind consistent with its existing methods; if one method needs a pointer receiver, new methods on that type use pointer receivers.
96
+ - Define small interfaces in the consuming package and only when the approved change needs that seam. Do not introduce an interface for a single implementation by default.
97
+ - Do not add new package-level mutable state or `init()` side effects; pass dependencies explicitly.
98
+ - Keep cohesive logic together. Extract functions or packages for meaningful responsibilities, not into generic `util`/`common` buckets.
99
+
100
+ ## Allowed Shapes and Narrow Exceptions
101
+
102
+ These allowances do not waive validation, ownership, or scope limits:
103
+
104
+ - Package-level sentinel errors and immutable values such as precompiled regular expressions are fine.
105
+ - `panic` or `Must*` helpers are acceptable for programmer invariants and constant inputs at initialization, not for runtime input.
106
+ - `_ =` is acceptable only with a comment explaining why the error cannot matter.
107
+
108
+ There is no blanket framework exception to the MUST rules. If a framework or required API forces an incompatible shape, stop and request an explicit resolution rather than silently bypassing it.
109
+
110
+ ## Handoff and Report Convention
111
+
112
+ Inherit the parent's report style and the project's Response Style, preserving exact file paths, commands, API names, and errors.
113
+
114
+ Use the parent's completion and handoff contract, including changed areas, task/requirement states, exact approved correction IDs when relevant, blockers, and approved deviations. List any formatting command actually run. State that testing, verification, and independent review were not performed in this stage; identify what later sessions must establish without claiming correctness evidence.
115
+
116
+ Do not create a report file automatically. When the user requests a written report, invoke `hero-report` with source stage `hero-coding` and the parent's coding-report contract (`docs/coding-reports/YYYY-MM-DD-<slug>.md`). Identify `hero-golang` as the specialization in the content if useful. Do not create a new report category, directory, or workflow stage.
@@ -0,0 +1,177 @@
1
+ ---
2
+ name: hero-node
3
+ description: Use for implementation-only Node.js JavaScript or TypeScript service, CLI, worker, or library changes under an approved plan, bounded request, or exact user-approved review corrections
4
+ ---
5
+
6
+ # Hero Node
7
+
8
+ ## Scope and Mandatory Parent
9
+
10
+ hero-node specializes `hero-coding` within the same coding stage; it is not a new stage. Choose it instead of generic `hero-coding` for Node.js services, CLIs, workers, and libraries. The user does not need to invoke both. A frontend project does not qualify merely because it uses Node-based package tooling.
11
+
12
+ **Before any production edit, read the complete actual sibling [`../hero-coding/SKILL.md`](../hero-coding/SKILL.md), resolved from this skill's installed directory.** Do not substitute a remembered contract, repository template, or metadata declaration for that read. If the sibling is missing or unreadable, stop and report the missing prerequisite; do not reconstruct it.
13
+
14
+ Inherit the entire parent contract by reference, including approvals, inputs, scope, ledgers, dependencies, blockers, implementation-only boundaries, completion criteria, durable state, handoff, and reporting. The rules below add Node-specific implementation conventions; they do not weaken the parent.
15
+
16
+ <HARD-BOUNDARY>
17
+ Implement only an approved plan explicitly started by the user, a sufficiently bounded request, or exact correction IDs confirmed by prior independent `hero-reviewing` and explicitly approved by the user. Do not choose feedback or expand scope. No test authoring/running, verification commands, self-review, review delegation, deployment, release, or Git delivery actions. Assurance and delivery belong to separate later sessions.
18
+ </HARD-BOUNDARY>
19
+
20
+ Maintain the parent's linked task/requirement ledger, respect dependencies, and keep the approved plan immutable. Record deviations and blockers; stop for ambiguity, missing prerequisites, target drift, or unsafe scope expansion. Reconcile implementation coverage, not correctness. Finish with the parent handoff to independent testing and review.
21
+
22
+ ## MUST: Bounded Changes
23
+
24
+ Apply these conventions to new code and portions genuinely necessary for the approved change. Do not mechanically convert untouched code to these conventions.
25
+
26
+ - Preserve the existing framework, module system, supported runtime, and project architecture.
27
+ - Do not add unrelated refactors, configuration changes, formatting churn, dependencies, or migrations. Do not convert JavaScript to TypeScript just to satisfy this skill.
28
+ - If requirements, framework constraints, or required behavior conflict with a rule here, stop and escalate with the concrete conflict. Do not silently exempt the framework or change semantics.
29
+
30
+ ## MUST: Explicit Conditions and Conversions
31
+
32
+ - Compare boolean values explicitly with `=== true` or `=== false`, including predicate results in branches, guards, loops, and ternaries.
33
+ - Do not use unary `!` or `!!`. Strict inequality `!==` remains valid; it is not unary negation.
34
+ - Check the actual business condition rather than truthiness. Distinguish `undefined`, `null`, an empty string, an empty collection, zero, and `false` where the contract distinguishes them.
35
+ - Do not invent rejection rules: an empty string or zero may be valid. Check only what the approved requirements demand.
36
+ - Use strict equality/inequality (`===`, `!==`), not coercive equality (`==`, `!=`).
37
+ - Convert types explicitly, then validate the result against the required domain. Conversion alone is not validation; `Number("")` becoming zero does not establish valid input.
38
+ - Preserve nullable and nonboolean semantics. Never mechanically replace `!value` with `value === false`: the original also matches other falsy values. Establish the required cases first; stop if they are ambiguous.
39
+
40
+ Avoid:
41
+
42
+ ```ts
43
+ if (!isAuthorized) return;
44
+ if (items.some(isExpired)) reject();
45
+ const enabled = !!input;
46
+ if (!quantity) reject();
47
+ ```
48
+
49
+ Use explicit conditions when these rules are required:
50
+
51
+ ```ts
52
+ if (isAuthorized === false) {
53
+ return;
54
+ }
55
+ if (items.some(isExpired) === true) {
56
+ reject();
57
+ }
58
+ if (quantity === undefined) {
59
+ throw new Error("Quantity is required");
60
+ }
61
+ ```
62
+
63
+ For an optional boolean whose contract says only explicit `true` enables work, preserve all disabled cases:
64
+
65
+ ```ts
66
+ if (enabled === undefined || enabled === null || enabled === false) {
67
+ return;
68
+ }
69
+ startWork();
70
+ ```
71
+
72
+ This example assumes `enabled` is already narrowed to `boolean | null | undefined`; unknown external input needs validation first.
73
+
74
+ ## MUST: Readable Data and Control Flow
75
+
76
+ - Write ordinary, explicit statements. Avoid clever shorthand, coercion tricks, compressed chains, and short-circuit side effects such as `ready && publish()`.
77
+ - Map data field by field. Do not use bulk copying/mapping to hide which fields cross a boundary; explicit per-field assignments inside a collection's `.map()` are fine.
78
+ - Do not use object, array, or call spread when a clearer explicit alternative exists. Do not replace spread with `Object.assign`, reflective key loops, or another implicit bulk-copy workaround. See the narrow compatibility exception below.
79
+ - A ternary may have only one simple condition and two simple value branches. No nesting, compound conditions, calls with side effects, or assignment effects. Use `if`/`else` otherwise.
80
+ - Respect the existing formatter and surrounding style. Do not impose arbitrary line wrapping, one-line compression, or file-wide reformatting.
81
+
82
+ Avoid:
83
+
84
+ ```ts
85
+ ready && publish();
86
+ const label = ready && permitted ? "run" : failed ? "retry" : "wait";
87
+ const dto = { ...input };
88
+ ```
89
+
90
+ Prefer:
91
+
92
+ ```ts
93
+ if (ready === true) {
94
+ publish();
95
+ }
96
+ const label = ready === true ? "run" : "wait";
97
+ ```
98
+
99
+ ## MUST: Owned Models and Boundary Validation
100
+
101
+ Do not use `any` or arbitrary dynamic properties anywhere in new or necessarily changed TypeScript code. Use `unknown` with narrowing for untrusted values; the allowed internal and library shapes below are not an escape hatch for untyped data.
102
+
103
+ For project-owned TypeScript domain entities and DTOs:
104
+
105
+ - Use classes with explicitly declared fields and complete constructor assignments. Map each field intentionally; do not use constructor parameter properties.
106
+ - Do not use `any`, arbitrary dynamic properties, non-null assertions, definite-assignment assertions, or casts pretending to initialize or validate data.
107
+ - Treat external JSON as untrusted runtime data. A class constructor or TypeScript annotation does not validate it. Validate/narrow input before constructing a model, or implement the required runtime guards explicitly in the constructor.
108
+ - Preserve the approved validation and serialization contracts. Do not assume a class instance is interchangeable with the framework's required wire representation.
109
+
110
+ Avoid:
111
+
112
+ ```ts
113
+ class JobDto {
114
+ id!: string;
115
+ constructor(input: any) {
116
+ Object.assign(this, input);
117
+ }
118
+ }
119
+ ```
120
+
121
+ Use explicit fields and constructor mapping:
122
+
123
+ ```ts
124
+ class JobDto {
125
+ readonly id: string;
126
+ readonly enabled: boolean;
127
+
128
+ constructor(id: string, enabled: boolean) {
129
+ this.id = id;
130
+ this.enabled = enabled;
131
+ }
132
+ }
133
+
134
+ function parseJob(input: unknown): JobDto {
135
+ if (typeof input !== "object" || input === null) {
136
+ throw new Error("Job must be an object");
137
+ }
138
+ if (("id" in input) === false || typeof input.id !== "string") {
139
+ throw new Error("Job id must be a string");
140
+ }
141
+ if (("enabled" in input) === false || typeof input.enabled !== "boolean") {
142
+ throw new Error("Job enabled must be a boolean");
143
+ }
144
+ return new JobDto(input.id, input.enabled);
145
+ }
146
+ ```
147
+
148
+ This example requires only string/boolean fields; it does not invent nonempty-ID rules. Add other domain validation only when the approved contract requires it. The runtime checks, not the class declaration, establish the external input's shape.
149
+
150
+ In JavaScript, use equivalent explicit class fields, constructor assignments, mapping, and runtime guards. Do not claim TypeScript's static guarantees or force a language migration. Stay within the project's supported JavaScript syntax; escalate an incompatibility rather than silently weakening the rule.
151
+
152
+ ## PREFER: Cohesion and Safe Early Returns
153
+
154
+ - Prefer guard clauses and early returns over unnecessary nesting, but preserve cleanup, transaction outcomes, locks, streams, and resource ownership. Keep required `finally`/disposal paths intact; use structured branching when an early return would bypass required work.
155
+ - Keep a cohesive use case readable together. Extract files/functions for meaningful responsibilities, boundaries, or reuse, not an automatic one-function-per-file policy.
156
+ - Avoid the opposite extreme of a giant service/module holding unrelated use cases. Make only the separation necessary for the approved change.
157
+ - Prefer clear intermediate names and direct control flow over terse expressions. Readability is not a reason to change unrelated behavior.
158
+
159
+ ## Allowed Shapes and Narrow Exceptions
160
+
161
+ These allowances do not waive explicit mapping, runtime validation, or scope limits:
162
+
163
+ - `unknown` is appropriate for untrusted input when it is validated and narrowed before use.
164
+ - Use library-provided option types for library configuration; do not wrap every options object or temporary value in a domain class.
165
+ - Named internal `type`/`interface` declarations are appropriate for internal structures that are not project-owned domain entities or DTOs.
166
+ - Typed dictionaries are appropriate when dynamic keys are a genuine domain requirement. Declare the key/value contract and validate external entries; do not disguise arbitrary model properties as a dictionary.
167
+ - Spread is allowed only when genuinely unavoidable for a required API compatibility contract and no explicit alternative preserves that contract. Explain the exact API constraint and why explicit alternatives fail, and record the exception in the implementation handoff. Convenience, terseness, and existing style are not exceptions. If necessity is unclear, stop and ask.
168
+
169
+ There is no blanket framework exception to the class or other MUST rules. If a framework requires an incompatible representation or a convention would alter required behavior, stop and request an explicit resolution rather than silently bypassing it.
170
+
171
+ ## Handoff and Report Convention
172
+
173
+ Inherit the parent's report style and the project's Response Style, preserving exact file paths, commands, API names, and errors.
174
+
175
+ Use the parent's completion and handoff contract, including changed areas, task/requirement states, exact approved correction IDs when relevant, blockers, and approved deviations. State that testing, verification, and independent review were not performed in this stage; identify what later sessions must establish without claiming correctness evidence.
176
+
177
+ Do not create a report file automatically. When the user requests a written report, invoke `hero-report` with source stage `hero-coding` and the parent's coding-report contract (`docs/coding-reports/YYYY-MM-DD-<slug>.md`). Identify `hero-node` as the specialization in the content if useful. Do not create a new report category, directory, or workflow stage.
@@ -136,18 +136,20 @@ controller that lost its place has been observed re-dispatching entire completed
136
136
  sequences — the single most expensive failure mode in this skill. Guard against it with
137
137
  a durable ledger, not just the ephemeral todo list:
138
138
 
139
- - At skill start, run `bash scripts/sdd-workspace.sh` to resolve `.hero-mmt-kit/sdd/`,
140
- then check `.hero-mmt-kit/sdd/progress.md` if it exists. Tasks it lists as complete
139
+ - At skill start, run `bash scripts/sdd-workspace.sh` to resolve the scratch workspace.
140
+ It uses `.hero-mmt-kit/sdd/` only when already ignored, otherwise a repo-specific
141
+ cache path outside the repository; never create or edit `.gitignore`. Check
142
+ `progress.md` at the returned path if it exists. Tasks it lists as complete
141
143
  are **not** re-dispatched — verify quickly if anything looks stale, but trust the
142
144
  ledger over a fuzzy recollection of prior context.
143
145
  - When a task's review comes back clean, append one line before moving to the next
144
146
  task:
145
147
  ```
146
- Task N: complete (commits <base7>..<head7>, review clean)
148
+ Task N: complete (base <base7>, head <head7> or uncommitted diff, review clean)
147
149
  ```
148
- - The ledger lives in the self-ignoring `.hero-mmt-kit/sdd/` scratch dir (see Prompt
149
- Templates below) — it never needs the user's own `.gitignore` touched and is not
150
- meant to be committed.
150
+ - The ledger lives in the scratch path returned by `sdd-workspace.sh` (see Prompt
151
+ Templates below) — never change `.gitignore` to make room for it and do not
152
+ commit scratch files.
151
153
 
152
154
  ## Model Selection
153
155
 
@@ -38,9 +38,8 @@ Task tool (general-purpose):
38
38
  1. Implement exactly what the task specifies
39
39
  2. Write tests (following TDD if task says to)
40
40
  3. Verify implementation works
41
- 4. Commit your work
42
- 5. Self-review (see below)
43
- 6. Report back
41
+ 4. Self-review (see below)
42
+ 5. Report back (do not commit unless the user specifically requested it; follow `hero-gitflow` if they did)
44
43
 
45
44
  Work from: [directory]
46
45
 
@@ -110,8 +109,8 @@ Task tool (general-purpose):
110
109
  - What you implemented (or what you attempted, if blocked)
111
110
  - What you tested and test results
112
111
  - Files changed
113
- - Base commit before you started and HEAD commit after your final commit (the
114
- controller needs both for the review package and the progress ledger)
112
+ - Base and HEAD refs for the review package and progress ledger; if no commit was
113
+ requested, say so and include the working-tree diff instead
115
114
  - Self-review findings (if any)
116
115
  - Any issues or concerns
117
116
 
@@ -2,11 +2,9 @@
2
2
  # Resolve (and create) this repo's subagent-driven-development scratch workspace.
3
3
  # Usage: sdd-workspace.sh
4
4
  #
5
- # Prints the absolute path to <repo-root>/.hero-mmt-kit/sdd/ on stdout.
6
- # Creates the directory and a self-ignoring .gitignore inside it if missing,
7
- # so task briefs, review packages, and the progress ledger never need the
8
- # user's own .gitignore touched. Only this subtree is ignored — the rest of
9
- # .hero-mmt-kit/ (config.json, session.json) stays tracked as before.
5
+ # Prints the scratch workspace path on stdout. Uses the repo-local directory
6
+ # only when it is already ignored; otherwise uses a repo-specific cache path
7
+ # outside the repository. Never creates or changes any .gitignore.
10
8
 
11
9
  set -euo pipefail
12
10
 
@@ -15,11 +13,12 @@ REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" || {
15
13
  exit 1
16
14
  }
17
15
 
18
- SDD_DIR="${REPO_ROOT}/.hero-mmt-kit/sdd"
19
- mkdir -p "$SDD_DIR"
20
-
21
- if [[ ! -f "${SDD_DIR}/.gitignore" ]]; then
22
- printf '*\n' > "${SDD_DIR}/.gitignore"
16
+ if git -C "$REPO_ROOT" check-ignore -q -- .hero-mmt-kit/sdd/progress.md; then
17
+ SDD_DIR="${REPO_ROOT}/.hero-mmt-kit/sdd"
18
+ else
19
+ REPO_KEY="$(printf '%s' "$REPO_ROOT" | git hash-object --stdin)"
20
+ SDD_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/hero-mmt-kit/sdd/$REPO_KEY"
23
21
  fi
22
+ mkdir -p "$SDD_DIR"
24
23
 
25
24
  echo "$SDD_DIR"
@@ -52,7 +52,7 @@ Honor any existing declared preference without asking. If the user declines cons
52
52
 
53
53
  The user has asked for an isolated workspace (Step 0 consent). Do you already have a way to create a worktree? It might be a tool with a name like `EnterWorktree`, `WorktreeCreate`, a `/worktree` command, or a `--worktree` flag. If you do, use it and skip to Step 3.
54
54
 
55
- Native tools handle directory placement, branch creation, and cleanup automatically. Using `git worktree add` when you have a native tool creates phantom state your harness can't see or manage.
55
+ Native tools handle directory placement, branch creation, and cleanup automatically. Before creating a branch, apply `hero-gitflow`'s explicit-request, branch-name, and base-branch rules, including with native tools. Using `git worktree add` when you have a native tool creates phantom state your harness can't see or manage.
56
56
 
57
57
  Only proceed to Step 1b if you have no native worktree tool available.
58
58
 
@@ -83,9 +83,9 @@ Follow this priority order. Explicit user preference always beats observed files
83
83
  git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
84
84
  ```
85
85
 
86
- **If NOT ignored:** Add to .gitignore, commit the change, then proceed.
86
+ **If NOT ignored:** Do not edit, stage, restore, or commit `.gitignore`. Choose an existing ignored location or ask the user for an external directory outside the repository; if neither is available, stop worktree setup. Preserve any existing local `.gitignore` changes exactly as they are.
87
87
 
88
- **Why critical:** Prevents accidentally committing worktree contents to repository.
88
+ **Why critical:** Prevents accidentally committing worktree contents without altering the user's ignore rules.
89
89
 
90
90
  #### Create the Worktree
91
91
 
@@ -95,7 +95,9 @@ project=$(basename "$(git rev-parse --show-toplevel)")
95
95
  # Determine path based on chosen location
96
96
  # path="$LOCATION/$BRANCH_NAME"
97
97
 
98
- git worktree add "$path" -b "$BRANCH_NAME"
98
+ # BASE_REF must be confirmed under hero-gitflow's branch rules
99
+ # Create a branch only if the user specifically requested branch creation
100
+ git worktree add "$path" -b "$BRANCH_NAME" "$BASE_REF"
99
101
  cd "$path"
100
102
  ```
101
103
 
@@ -153,7 +155,7 @@ Ready to implement <feature-name>
153
155
  | `worktrees/` exists | Use it (verify ignored) |
154
156
  | Both exist | Use `.worktrees/` |
155
157
  | Neither exists | Check instruction file, then default `.worktrees/` |
156
- | Directory not ignored | Add to .gitignore + commit |
158
+ | Directory not ignored | Use an existing ignored location or ask for an external path; never edit `.gitignore` |
157
159
  | Permission error on create | Sandbox fallback, work in place |
158
160
  | Tests fail during baseline | Report failures + ask |
159
161
  | No package.json/Cargo.toml | Skip dependency install |
@@ -15,18 +15,26 @@ hero-mmt-kit is a human-led workflow: the developer decides what to work on and
15
15
  |---|---|---|
16
16
  | `hero-planning` | Clarifying non-trivial work through analysis and brainstorming, then writing an implementation-only plan. | `docs/plans/YYYY-MM-DD-slug.md` — always written (it's the deliverable, not a report) |
17
17
  | `hero-coding` | Implementing every task and requirement in an approved plan, or a small bounded request. No testing or self-review. | `docs/coding-reports/YYYY-MM-DD-slug.md` — on request |
18
+ | `hero-node` | Node.js JavaScript/TypeScript implementation with explicit coding conventions; inherits the same `hero-coding` stage and boundaries. | Same coding report — on request, through `hero-report` with source stage `hero-coding` |
19
+ | `hero-golang` | Go implementation with ownership, cancellation, resource safety, and bounded formatting; inherits the same `hero-coding` stage and boundaries. | Same coding report — on request, through `hero-report` with source stage `hero-coding` |
18
20
  | `hero-reviewing` | Single read-only entry point for a fresh implementation review, assessment of supplied review feedback, or an explicit combination of both. | `docs/reviews/YYYY-MM-DD-slug.md` — on request |
19
21
  | `hero-unit-test` | Writing and running post-implementation unit tests from the approved requirements; no production-code fixes. | `docs/test-reports/YYYY-MM-DD-slug.md` — on request |
20
22
  | `hero-security` | You want an independent OWASP + AI/LLM security review of a sensitive surface. | `docs/security-reports/YYYY-MM-DD-slug.md` — always written for the security pass. |
21
23
  | `hero-mr-review` | Reviewing a teammate's committed merge request/ref against MR intent and repository conventions. | `docs/mr-reviews/YYYY-MM-DD-slug.md` — always written. |
24
+ | `hero-gitflow` | Performing a Git action explicitly requested by the user, with protected-branch and `.gitignore` safeguards. | Chat result; no automatic next Git action. |
22
25
  | `hero-strict` | Extra rigor is wanted in a separate full verification session before a "done" claim. | Appends to the current report, if one exists/was requested. |
23
26
  | `hero-report` | A written report is actually wanted for a finished `hero-coding`/`hero-reviewing`/`hero-unit-test` phase. | Writes the report at the path the source skill defines. |
24
27
 
25
- A typical flow is `hero-planning` → `hero-coding` → `hero-unit-test` and/or `hero-reviewing` → done. Start each stage explicitly, preferably in a fresh session. The plan contains implementation work only; coding implements it only; unit testing writes/runs tests only; reviewing conducts a fresh review and/or assesses supplied feedback without fixing code or running tests. Confirmed review items require explicit user approval before a later `hero-coding` correction session. Invoke `hero-security` or `hero-strict` separately when their assurance depth is wanted. Skip stages that do not fit the size of the change.
28
+ A typical flow is `hero-planning` → `hero-coding` → `hero-unit-test` and/or `hero-reviewing` → done. Start each stage explicitly, preferably in a fresh session. The plan contains implementation work only; coding implements it only; unit testing writes/runs tests only; reviewing conducts a fresh review and/or assesses supplied feedback without fixing code or running tests. Confirmed review items require explicit user approval before a later `hero-coding` correction session. Invoke `hero-security` or `hero-strict` separately when their assurance depth is wanted. Invoke `hero-gitflow` only for a specifically requested Git action; neither completing a stage nor using the skill authorizes the next Git action. Skip stages that do not fit the size of the change.
29
+
30
+ For Node.js services, CLIs, workers, or libraries written in JavaScript/TypeScript, choose `hero-node` instead of generic `hero-coding` when its explicit coding conventions apply. It reads and inherits the parent contract; the user does not need to invoke both. This is the same coding stage, not an automatic extra stage, and its on-request report uses source stage `hero-coding`.
31
+
32
+ For Go services, CLIs, workers, or libraries, choose `hero-golang` instead of generic `hero-coding`. It reads and inherits the parent contract, keeps the same coding stage, and adds Go ownership, cancellation, resource-safety, and bounded-formatting rules; the user does not need to invoke both. In a mixed-language request, apply it only to the Go portion. Its on-request report also uses source stage `hero-coding`.
26
33
 
27
34
  Choose review by source of truth, not merely by whether a git ref exists:
28
35
  - Use `hero-reviewing` when an implementation should be assessed against a Hero plan or explicit acceptance criteria, or when supplied review feedback needs technical validation. It can inspect local, exact-commit, or explicit-base ref targets and may use one internal fresh reviewer without requiring another user-facing skill.
29
36
  - Use `hero-mr-review` for a teammate's committed MR/ref assessed against MR intent, repository conventions, impact, and potential bugs. It always writes its standalone report.
37
+ - Use `hero-gitflow` for an explicitly requested branch creation or Git delivery action. It never acts as an automatic handoff from coding, testing, or review.
30
38
 
31
39
  `hero-planning`, `hero-coding`, `hero-reviewing`, and `hero-unit-test` are independent stages, not an automatic pipeline. Finishing one never triggers the next. Generic vendored skills and delegated agents must inherit the active Hero stage's exclusions; they must not broaden its responsibility.
32
40
 
@@ -44,7 +52,7 @@ Resuming work in a fresh session:
44
52
 
45
53
  ## Related vendored skills
46
54
 
47
- The kit also ships general-purpose technique skills: `brainstorming`, `executing-plans`, `test-driven-development`, `systematic-debugging`, `verification-before-completion`, `dispatching-parallel-agents`, `subagent-driven-development`, and `using-git-worktrees`. They remain available for direct use, but a Hero stage must not invoke a generic lifecycle whose mandatory actions cross that stage's hard boundary. `hero-planning`, `hero-coding`, `hero-reviewing`, `hero-unit-test`, and `hero-security` define their own stage contracts.
55
+ The kit also ships general-purpose technique skills: `brainstorming`, `executing-plans`, `test-driven-development`, `systematic-debugging`, `verification-before-completion`, `dispatching-parallel-agents`, `subagent-driven-development`, and `using-git-worktrees`. They remain available for direct use, but a Hero stage must not invoke a generic lifecycle whose mandatory actions cross that stage's hard boundary. Generic instructions to commit or edit `.gitignore` do not override `hero-gitflow` or the project Git rules. `hero-planning`, `hero-coding`, `hero-reviewing`, `hero-unit-test`, and `hero-security` define their own stage contracts.
48
56
 
49
57
  ## Output Style
50
58