hero-mmt-kit 1.4.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +17 -13
- package/package.json +2 -2
- package/skills.manifest.json +7 -6
- package/src/doctor.cjs +1 -1
- package/src/init.cjs +18 -17
- package/src/integrations.cjs +27 -11
- package/src/merge.cjs +75 -6
- package/src/seed-docs.cjs +25 -0
- package/src/skills.cjs +1 -0
- package/src/update.cjs +16 -16
- package/templates/CLAUDE.md.tmpl +10 -10
- package/templates/skills/NOTICE +1 -1
- package/templates/skills/hero-coding/SKILL.md +46 -13
- package/templates/skills/hero-coding-verify/SKILL.md +76 -0
- package/templates/skills/hero-gitflow/SKILL.md +53 -5
- package/templates/skills/hero-golang/SKILL.md +5 -5
- package/templates/skills/hero-mr-review/SKILL.md +125 -53
- package/templates/skills/hero-node/SKILL.md +4 -4
- package/templates/skills/hero-planning/SKILL.md +1 -1
- package/templates/skills/hero-report/SKILL.md +2 -2
- package/templates/skills/hero-reviewing/SKILL.md +36 -13
- package/templates/skills/hero-strict/SKILL.md +1 -1
- package/templates/skills/hero-unit-test/SKILL.md +2 -0
- package/templates/skills/subagent-driven-development/SKILL.md +2 -2
- package/templates/skills/using-hero/SKILL.md +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,33 @@ 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
|
+
## [1.5.1] - 2026-12-05
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- `hero-gitflow` now supports explicitly requested GitLab MR creation. It asks for missing source/target branches, derives the English description from the actual published diff, checks project squash policy, explicitly sets `squash=false`, and verifies the created MR. Opening an MR may target a protected branch but never authorizes push, merge, auto-merge, or branch deletion. Workflow guidance and regression tests cover the new contract.
|
|
12
|
+
- `hero-mr-review` now routes GitLab MR URLs through authenticated `glab`: reads descriptions, complete diffs, and discussions with supplied requirements, reviews related MRs across repositories, and posts English findings and test evidence directly without a local report. Missing CLI/authentication stops URL review; local commit/tag/branch reviews retain the standalone MR report.
|
|
13
|
+
- MR review now requires safe, no-write execution of related existing tests or explicit skipped/blocked evidence. It prohibits code/test changes, other file writes, Git mutations, MR state changes, and `ACTIVE_STATE.md` updates; only mode-specific comments or the local report are permitted. Workflow routing, generated guidance, and regression tests reflect these boundaries.
|
|
14
|
+
|
|
15
|
+
## [1.5.0] - 2026-11-20
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- `hero-coding-verify`, a supporting skill for a fresh no-edit verifier subagent. It runs bounded build/typecheck and directly related existing tests, validates the target snapshot, classifies failures, and returns compact evidence without repairing files or writing reports. Bundled in fresh installs and upgrades; hidden from the user command menu.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- `hero-coding` now includes mandatory delegated verification after implementation: pause target-repo writers, dispatch a fresh `hero-coding-verify` subagent, consume its evidence, fix attributable implementation errors in scope, and request re-verification after repairs. The coding conversation never runs checks itself; failed delegation is blocked rather than silently executed inline. Adapt existing failing tests only when approved requirements make their old expectations obsolete. It does not create new tests, expand coverage, or replace independent review. `hero-node` and `hero-golang` inherit the same contract; Go verification is delegated for affected-package builds and directly related existing `go test` targets.
|
|
24
|
+
- `hero-reviewing` may safely run existing relevant checks against the exact reviewed workspace as review evidence. It remains no-edit, records skipped checks and snapshot drift, and treats failures as evidence to classify rather than automatic findings.
|
|
25
|
+
- Coding, review, unit-test, report, strict-verification, generated guidance, and Serena memo contracts now describe these verification boundaries consistently.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- `init` and `update` seed docs only when missing, preserving customized standards, document templates, and prior backups across repeated runs. `update` continues to leave `ACTIVE_STATE.md` untouched.
|
|
30
|
+
- Settings JSON and merge-relevant structure are validated before any project writes in `init`/`update`; invalid settings no longer cause the previously observed partially applied update. Later I/O failures are not transactional.
|
|
31
|
+
- Optional design integration status reflects all source command results and reports failures rather than unconditionally claiming success.
|
|
32
|
+
- Consumer `CLAUDE.md` guidance no longer points to the retired `session.json` resume path or `session-bridge` hook.
|
|
33
|
+
|
|
7
34
|
## [1.4.0] - 2026-10-13
|
|
8
35
|
|
|
9
36
|
### Added
|
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** — 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.
|
|
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 a delegated coding verifier, 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
|
|
|
@@ -59,35 +59,39 @@ your-project/
|
|
|
59
59
|
|
|
60
60
|
- **New project:** scaffolds the workflow from scratch.
|
|
61
61
|
- **Brownfield project:** preserves existing `CLAUDE.md`, `AGENTS.md`, and `.claude/settings.json`; inserts managed blocks (`<!-- hero-mmt-kit:start/end -->`) and deep-merges hooks. `docs/ACTIVE_STATE.md` is never overwritten.
|
|
62
|
-
- **
|
|
62
|
+
- **Docs are user-owned:** files under `docs/` are seeded only when missing. Re-running `init` or `update` never overwrites existing standards, templates, discovery, state, or their `.bak` files. `update` does not recreate a missing `ACTIVE_STATE.md`; use `init` for that.
|
|
63
|
+
- **Framework updates:** re-running `init` or `update` refreshes managed regions, hooks, and bundled skills; existing settings are merged. Managed text and settings retain the existing single-generation `*.bak` convention. Do not customize framework-owned hooks or skill folders in place.
|
|
64
|
+
- **Settings preflight:** existing and bundled settings are parsed and structurally checked before project files are changed. Invalid settings stop the command with an actionable error. This is not a fully atomic filesystem transaction: a later I/O failure can still leave a partial update.
|
|
63
65
|
- **One interactive question:** `init` asks whether to install the optional taste/design skill (default No). `--yes` accepts the default; `--taste` opts in without prompting.
|
|
64
66
|
|
|
65
67
|
## Workflow skills
|
|
66
68
|
|
|
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
|
|
69
|
+
Invoke `using-hero` first for an overview — it explains which skill applies next and how workflow state carries across sessions. The ten operative skills are listed below. `hero-coding-verify` is an additional supporting skill, hidden from the user command menu and loaded inside a fresh verifier subagent; it is not an eleventh workflow stage.
|
|
68
70
|
|
|
69
71
|
| Skill | Use when | Artifact / report |
|
|
70
72
|
|---|---|---|
|
|
71
73
|
| `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
|
-
| `hero-coding` | Implementing every task and requirement in an approved plan, or a small bounded request. No
|
|
74
|
+
| `hero-coding` | Implementing every task and requirement in an approved plan, or a small bounded request, then delegates mandatory build/typecheck and directly related existing tests to a fresh `hero-coding-verify` subagent. No new tests or independent review. | `docs/coding-reports/YYYY-MM-DD-slug.md` — on request |
|
|
73
75
|
| `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
76
|
| `hero-golang` | Go implementation with ownership, cancellation, resource safety, and edited-file formatting; inherits the same `hero-coding` stage. | Same coding report — on request |
|
|
75
|
-
| `hero-reviewing` | Single
|
|
77
|
+
| `hero-reviewing` | Single no-edit entry point for a fresh implementation review, technical assessment of supplied feedback, or an explicit combination of both; safely runs existing related checks as evidence when applicable. | `docs/reviews/YYYY-MM-DD-slug.md` — on request |
|
|
76
78
|
| `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 |
|
|
77
79
|
| `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. |
|
|
78
|
-
| `hero-mr-review` | Reviewing
|
|
79
|
-
| `hero-gitflow` | Performing
|
|
80
|
+
| `hero-mr-review` | Reviewing one or more committed MRs/refs with supplied requirements and safe related existing tests; no code or Git changes. | GitLab URLs: English comments via authenticated `glab`, no report. Local refs: `docs/mr-reviews/YYYY-MM-DD-slug.md`. |
|
|
81
|
+
| `hero-gitflow` | Performing an explicitly requested Git action or GitLab MR creation, with protected-branch and `.gitignore` safeguards. MR creation requires explicit A → B, an English description based on the diff, and squash disabled. | Chat result / MR URL; no automatic next action. |
|
|
80
82
|
| `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. |
|
|
81
83
|
|
|
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
|
|
84
|
+
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, then delegates bounded build/typecheck and directly related existing tests to a fresh no-edit verifier; unit testing owns new tests and coverage; reviewing conducts a fresh review and/or assesses supplied feedback and may safely run existing checks as evidence without fixing code or 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.
|
|
83
85
|
|
|
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
|
|
86
|
+
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, including delegated build/typecheck and existing-test verification; 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.
|
|
85
87
|
|
|
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
|
|
88
|
+
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. Its delegated verifier builds the affected package/module and runs directly related existing `go test` targets, but does not run `go vet`, linters, race detection, or broad `./...` checks by default. It reads the parent contract; you do not need to invoke both skills.
|
|
87
89
|
|
|
88
90
|
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
91
|
|
|
90
|
-
`hero-coding
|
|
92
|
+
`hero-coding` is not complete until it reports delegated verification results or explicit gaps. It pauses writes to the target repository and dispatches `hero-coding-verify` in a fresh subagent. The verifier runs the bounded checks and returns compact evidence without editing files; the coding session repairs in-scope failures and asks for re-verification. These checks catch immediate build and regression failures; they do not replace `hero-unit-test` for new coverage or `hero-reviewing` for independent assessment.
|
|
93
|
+
|
|
94
|
+
`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` always writes its standalone `docs/security-reports/...` report. `hero-mr-review` writes `docs/mr-reviews/...` only for local commit/tag/branch targets. For GitLab MR URLs it requires installed, authenticated `glab`, reads descriptions/diffs/discussions plus supplied requirements, and posts English findings and test evidence directly on the MRs without a report fallback. It supports related MRs across repositories and stops URL review if CLI/authentication is missing. Both MR modes run related existing tests only when they can preserve the no-write boundary; otherwise they report skipped checks. MR review never edits code/tests, changes Git/MR state, or updates `ACTIVE_STATE.md`.
|
|
91
95
|
|
|
92
96
|
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`.
|
|
93
97
|
|
|
@@ -100,7 +104,7 @@ The kit also ships general-purpose vendored technique skills: `brainstorming`, `
|
|
|
100
104
|
| Command | Purpose |
|
|
101
105
|
|---|---|
|
|
102
106
|
| `init` | Install the workflow into the current project. |
|
|
103
|
-
| `update` |
|
|
107
|
+
| `update` | Refresh managed regions/hooks/skills and merge settings; preserve existing docs and seed missing ones (except ACTIVE_STATE). |
|
|
104
108
|
| `discover` | Scan a brownfield codebase and create `docs/BROWNFIELD_DISCOVERY.md`. |
|
|
105
109
|
| `brownfield` | Alias for `discover`. |
|
|
106
110
|
| `doctor` | Validate hooks, settings, workflow state, doc links, and tool presence. `--strict` for CI. |
|
|
@@ -133,7 +137,7 @@ Required: Node.js 18+ and Claude Code. Everything else is optional.
|
|
|
133
137
|
|
|
134
138
|
- Edit anything outside `<!-- hero-mmt-kit:start/end -->` markers freely; `update` will not touch it.
|
|
135
139
|
- Fill `<TBD>` placeholders in Security, Performance, and Design docs once the stack is known.
|
|
136
|
-
- Run `npx hero-mmt-kit update` to refresh framework-managed
|
|
140
|
+
- Run `npx hero-mmt-kit update` to refresh framework-managed regions/hooks/skills. Existing docs are preserved, so new baseline guidance must be reviewed and incorporated deliberately rather than replacing your project-specific standards.
|
|
137
141
|
- Never hand-edit inside managed regions; change the source template or run `update` from a newer package version.
|
|
138
142
|
|
|
139
143
|
## Uninstall
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hero-mmt-kit",
|
|
3
|
-
"version": "1.
|
|
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.",
|
|
3
|
+
"version": "1.5.1",
|
|
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 a delegated coding verifier and 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",
|
package/skills.manifest.json
CHANGED
|
@@ -27,14 +27,15 @@
|
|
|
27
27
|
{ "name": "subagent-driven-development", "source": "obra/superpowers" },
|
|
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
|
-
{ "name": "hero-coding", "source": "hero-mmt-kit", "description": "Implement and track every requirement/task in an approved plan or small bounded request; no
|
|
31
|
-
{ "name": "hero-
|
|
32
|
-
{ "name": "hero-
|
|
33
|
-
{ "name": "hero-
|
|
30
|
+
{ "name": "hero-coding", "source": "hero-mmt-kit", "description": "Implement and track every requirement/task in an approved plan or small bounded request, then delegate mandatory bounded verification to a fresh hero-coding-verify subagent; no new tests or independent review." },
|
|
31
|
+
{ "name": "hero-coding-verify", "source": "hero-mmt-kit", "description": "Supporting verifier for hero-coding: runs bounded build/typecheck and directly related existing tests in a fresh subagent, classifies failures, and never edits files." },
|
|
32
|
+
{ "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 coding stage and bounded verification." },
|
|
33
|
+
{ "name": "hero-golang", "source": "hero-mmt-kit", "description": "Specialize hero-coding for Go with ownership, cancellation, resource safety, and edited-file formatting; same coding stage and bounded verification." },
|
|
34
|
+
{ "name": "hero-reviewing", "source": "hero-mmt-kit", "description": "Conduct a plan-backed, no-edit review with safe existing-check evidence, assess supplied review feedback, or explicitly do both without applying fixes." },
|
|
34
35
|
{ "name": "hero-unit-test", "source": "hero-mmt-kit", "description": "Write and run post-implementation unit tests from approved requirements without changing production code." },
|
|
35
36
|
{ "name": "hero-security", "source": "hero-mmt-kit", "description": "Run an independent OWASP + AI/LLM security review and write a standalone security report." },
|
|
36
|
-
{ "name": "hero-mr-review", "source": "hero-mmt-kit", "description": "Review a
|
|
37
|
-
{ "name": "hero-gitflow", "source": "hero-mmt-kit", "description": "Handle explicitly requested Git actions with protected-branch
|
|
37
|
+
{ "name": "hero-mr-review", "source": "hero-mmt-kit", "description": "Review one or more GitLab MR URLs via authenticated glab and post English comments without a report, or review local commit/tag/branch refs and write an MR report; run safe related existing tests without code or Git changes." },
|
|
38
|
+
{ "name": "hero-gitflow", "source": "hero-mmt-kit", "description": "Handle explicitly requested Git actions and GitLab MR creation with protected-branch and .gitignore safeguards; require explicit source/target branches, an English description based on the diff, and squash disabled." },
|
|
38
39
|
{ "name": "hero-strict", "source": "hero-mmt-kit", "description": "Opt-in full verification pass before a \"done\" claim." },
|
|
39
40
|
{ "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." }
|
|
40
41
|
]
|
package/src/doctor.cjs
CHANGED
|
@@ -88,7 +88,7 @@ async function doctor(opts) {
|
|
|
88
88
|
ok(`ACTIVE_STATE.md: ${lines} lines (under ${ACTIVE_STATE_BLOAT_LINES} threshold)`);
|
|
89
89
|
}
|
|
90
90
|
} else {
|
|
91
|
-
sw('docs/ACTIVE_STATE.md missing — run `hero-mmt-kit update
|
|
91
|
+
sw('docs/ACTIVE_STATE.md missing — run `hero-mmt-kit init` to seed it (update preserves working state)');
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// Dirty git + ACTIVE_STATE not touched
|
package/src/init.cjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const path = require('path');
|
|
4
|
-
const { log, ensureDir,
|
|
4
|
+
const { log, ensureDir, writeJSON, makeAsker } = require('./util.cjs');
|
|
5
5
|
const { detect } = require('./detect.cjs');
|
|
6
|
-
const {
|
|
7
|
-
const { mergeManagedBlock,
|
|
6
|
+
const { renderString } = require('./render.cjs');
|
|
7
|
+
const { mergeManagedBlock, planSettings, applySettingsPlan } = require('./merge.cjs');
|
|
8
|
+
const { seedDocs } = require('./seed-docs.cjs');
|
|
8
9
|
const { collectProfileConfig } = require('./profile-config.cjs');
|
|
9
10
|
|
|
10
11
|
async function init(opts) {
|
|
@@ -18,6 +19,16 @@ async function init(opts) {
|
|
|
18
19
|
log.step(`Target : ${target}`);
|
|
19
20
|
log.step(`Mode : ${d.brownfield ? 'brownfield (existing project)' : 'new project'}`);
|
|
20
21
|
|
|
22
|
+
// ---- preflight: validate settings before ANY target write ----
|
|
23
|
+
let settingsPlan;
|
|
24
|
+
try {
|
|
25
|
+
settingsPlan = planSettings(path.join(target, '.claude', 'settings.json'), path.join(templates, 'common', '.claude', 'settings.json'));
|
|
26
|
+
} catch (e) {
|
|
27
|
+
log.err(e.message);
|
|
28
|
+
ask.close();
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
|
|
21
32
|
// ---- config ----
|
|
22
33
|
let cfg = {};
|
|
23
34
|
try {
|
|
@@ -35,19 +46,9 @@ async function init(opts) {
|
|
|
35
46
|
|
|
36
47
|
const skillDirs = ['.claude/skills'];
|
|
37
48
|
|
|
38
|
-
// ---- 1. docs ----
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
for (const f of renderTree(srcDocs, vars)) {
|
|
42
|
-
const dest = path.join(target, 'docs', f.rel);
|
|
43
|
-
if (path.basename(f.rel) === 'ACTIVE_STATE.md' && exists(dest)) { keptActiveState = true; continue; }
|
|
44
|
-
if (path.basename(f.rel) === 'BROWNFIELD_DISCOVERY.md' && exists(dest)) continue;
|
|
45
|
-
ensureDir(path.dirname(dest));
|
|
46
|
-
if (exists(dest)) backup(dest);
|
|
47
|
-
fs.writeFileSync(dest, f.content);
|
|
48
|
-
docCount++;
|
|
49
|
-
}
|
|
50
|
-
log.ok(`Docs : ${docCount} file(s)` + (keptActiveState ? ' · kept existing ACTIVE_STATE.md' : ''));
|
|
49
|
+
// ---- 1. docs (user-owned: seeded only when missing, never overwritten) ----
|
|
50
|
+
const docs = seedDocs(path.join(templates, 'docs'), path.join(target, 'docs'), vars);
|
|
51
|
+
log.ok(`Docs : ${docs.created.length} seeded` + (docs.kept.length ? ` · ${docs.kept.length} existing kept unchanged` : ''));
|
|
51
52
|
|
|
52
53
|
// ---- 2. CLAUDE.md / AGENTS.md managed block ----
|
|
53
54
|
const claudeInner = renderString(fs.readFileSync(path.join(templates, 'CLAUDE.md.tmpl'), 'utf8'), vars);
|
|
@@ -58,7 +59,7 @@ async function init(opts) {
|
|
|
58
59
|
for (const h of ['git-guard.cjs', 'stop-reminder.cjs', 'active-state-bridge.cjs']) {
|
|
59
60
|
fs.copyFileSync(path.join(templates, 'common', '.claude', 'hooks', h), path.join(target, '.claude', 'hooks', h));
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
+
applySettingsPlan(settingsPlan);
|
|
62
63
|
log.ok('Claude : git-guard + stop-reminder + active-state-bridge → .claude/hooks; settings.json merged');
|
|
63
64
|
|
|
64
65
|
// ---- 3a. selected vendored core skills ----
|
package/src/integrations.cjs
CHANGED
|
@@ -26,27 +26,38 @@ function runCmd(cmd, args, cwd) {
|
|
|
26
26
|
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
|
-
'Core skills: hero-planning (implementation-only plan),
|
|
29
|
+
'Core skills: hero-planning (implementation-only plan), ' +
|
|
30
|
+
'hero-coding (implements the approved plan and tracks requirements; must delegate bounded build/typecheck and the existing directly related tests to a fresh hero-coding-verify subagent;' +
|
|
31
|
+
'may adapt only directly affected existing failing tests to the approved requirements; no new tests and no independent review), ' +
|
|
32
|
+
'hero-coding-verify (supporting no-edit verifier; returns evidence and gaps, never repairs code or tests), ' +
|
|
30
33
|
'hero-node (Node.js JavaScript/TypeScript specialization of the same hero-coding stage), ' +
|
|
31
34
|
'hero-golang (Go specialization of the same hero-coding stage; ownership, cancellation, and bounded formatting), ' +
|
|
32
|
-
'hero-reviewing (read-only review and supplied-feedback assessment
|
|
33
|
-
'hero-
|
|
34
|
-
'hero-
|
|
35
|
+
'hero-reviewing (read-only review and supplied-feedback assessment; may safely run existing targeted tests but never edits code or tests), ' +
|
|
36
|
+
'hero-unit-test (owns NEW tests and coverage after implementation), ' +
|
|
37
|
+
'hero-mr-review (read-only review with safe related tests; GitLab MR URLs use authenticated glab and English comments without a report; ' +
|
|
38
|
+
'local commit/tag/branch refs write an MR report; supports cross-repo MRs; no code, Git, or ACTIVE_STATE changes), ' +
|
|
39
|
+
'hero-gitflow (user-requested Git actions and GitLab MR creation; requires explicit source/target branches, ' +
|
|
40
|
+
'an English description based on the diff, and squash disabled; protects branches and .gitignore; never auto-merges), ' +
|
|
35
41
|
'hero-strict (opt-in full verification pass before a "done" claim).\n\n' +
|
|
36
42
|
'Session state: docs/ACTIVE_STATE.md\'s Active Features table (the single source of durable workflow state).\n\n' +
|
|
37
43
|
'Details (always read the source files, do not duplicate here): docs/ACTIVE_STATE.md, docs/SECURITY_STANDARDS.md, ' +
|
|
38
44
|
'docs/PERFORMANCE_STANDARDS.md.\n',
|
|
39
45
|
'delegation_rules.md':
|
|
40
|
-
'Sub-agent delegation is optional
|
|
46
|
+
'Sub-agent delegation is optional for exploration/review/implementation; hero-coding verification MUST run in a fresh hero-coding-verify subagent.\n\n' +
|
|
41
47
|
'Summary: sub-agents are best as context-collectors for research/exploration and as independent read-only reviewers. ' +
|
|
42
48
|
'Delegating implementation is OPTIONAL and must keep one writing agent active per shared worktree. ' +
|
|
43
|
-
'Every delegated prompt must be SELF-CONTAINED and inherit the active Hero stage boundary: coding
|
|
44
|
-
'
|
|
49
|
+
'Every delegated prompt must be SELF-CONTAINED and inherit the active Hero stage boundary: coding delegates bounded build/typecheck and existing ' +
|
|
50
|
+
'directly related tests to a fresh no-edit hero-coding-verify subagent and never runs checks itself; coding cannot add new tests or do independent review. ' +
|
|
51
|
+
'Pause writers to the target repo while it is verified; report BLOCKED if fresh verification cannot be dispatched. ' +
|
|
52
|
+
'Reviewing may run existing targeted tests but never edits code or tests, ' +
|
|
53
|
+
'and unit testing owns new tests/coverage and cannot modify production code. Include the plan/target, ' +
|
|
45
54
|
'allowed files/actions, exclusions, and Definition of Done; use isolation: "worktree" for overlapping edits.\n',
|
|
46
55
|
};
|
|
47
56
|
|
|
48
57
|
async function run(ctx) {
|
|
49
58
|
const { target, cfg, detect, pkgRoot } = ctx;
|
|
59
|
+
// ctx.runCmd lets tests stub external processes (no network); defaults to the real spawner.
|
|
60
|
+
const exec = typeof ctx.runCmd === 'function' ? ctx.runCmd : runCmd;
|
|
50
61
|
const manifest = readJSON(path.join(pkgRoot, 'skills.manifest.json'), { groups: {} });
|
|
51
62
|
cfg.integrations = cfg.integrations || {};
|
|
52
63
|
|
|
@@ -62,9 +73,14 @@ async function run(ctx) {
|
|
|
62
73
|
const designGroups = ['brand', 'design-direction', 'design-tools'];
|
|
63
74
|
const designSources = Array.from(new Set(designGroups.flatMap((name) => installableSources(manifest.groups && manifest.groups[name]))));
|
|
64
75
|
if (wantsDesign && designSources.length) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
const failed = designSources.filter((src) => !exec('npx', ['--yes', 'skills', 'add', src, '--yes'], target));
|
|
77
|
+
if (failed.length === 0) {
|
|
78
|
+
cfg.integrations.design = 'installed';
|
|
79
|
+
log.ok('Design packs installed — set ONE direction + profile in docs/DESIGN_STANDARDS.md §2.');
|
|
80
|
+
} else {
|
|
81
|
+
cfg.integrations.design = 'failed';
|
|
82
|
+
log.warn(`Design packs failed for: ${failed.join(', ')}. Retry later: npx skills add <source>`);
|
|
83
|
+
}
|
|
68
84
|
} else {
|
|
69
85
|
cfg.integrations.design = 'skipped';
|
|
70
86
|
}
|
|
@@ -72,7 +88,7 @@ async function run(ctx) {
|
|
|
72
88
|
// ---- GitNexus (auto-run only if this repo already has a .gitnexus index) ----
|
|
73
89
|
if (detect.hasGitnexus) {
|
|
74
90
|
log.step('npx gitnexus analyze');
|
|
75
|
-
cfg.integrations.gitnexus =
|
|
91
|
+
cfg.integrations.gitnexus = exec('npx', ['--yes', 'gitnexus', 'analyze'], target) ? 'indexed' : 'failed';
|
|
76
92
|
if (cfg.integrations.gitnexus === 'failed') log.warn('GitNexus not run. Install/retry later: npx gitnexus analyze');
|
|
77
93
|
} else {
|
|
78
94
|
cfg.integrations.gitnexus = 'skipped';
|
package/src/merge.cjs
CHANGED
|
@@ -32,13 +32,80 @@ function mergeManagedBlock(file, inner, titleIfNew) {
|
|
|
32
32
|
return 'merged';
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
function isPlainObject(v) { return v !== null && typeof v === 'object' && !Array.isArray(v); }
|
|
36
|
+
|
|
37
|
+
// Structural checks for the parts of settings.json that hero-mmt-kit merges.
|
|
38
|
+
// Returns a list of human-readable problems (empty when valid).
|
|
39
|
+
function settingsShapeErrors(obj) {
|
|
40
|
+
const errors = [];
|
|
41
|
+
if (!isPlainObject(obj)) return ['top level must be a JSON object'];
|
|
42
|
+
if (obj.hooks !== undefined) {
|
|
43
|
+
if (!isPlainObject(obj.hooks)) errors.push('"hooks" must be an object keyed by event name');
|
|
44
|
+
else {
|
|
45
|
+
for (const ev of Object.keys(obj.hooks)) {
|
|
46
|
+
const matchers = obj.hooks[ev];
|
|
47
|
+
if (!Array.isArray(matchers)) { errors.push(`"hooks.${ev}" must be an array`); continue; }
|
|
48
|
+
matchers.forEach((m, i) => {
|
|
49
|
+
if (!isPlainObject(m)) { errors.push(`"hooks.${ev}[${i}]" must be an object`); return; }
|
|
50
|
+
if (m.matcher !== undefined && typeof m.matcher !== 'string') errors.push(`"hooks.${ev}[${i}].matcher" must be a string`);
|
|
51
|
+
if (!Array.isArray(m.hooks)) { errors.push(`"hooks.${ev}[${i}].hooks" must be an array`); return; }
|
|
52
|
+
m.hooks.forEach((h, j) => {
|
|
53
|
+
if (!isPlainObject(h)) errors.push(`"hooks.${ev}[${i}].hooks[${j}]" must be an object`);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (obj.permissions !== undefined) {
|
|
60
|
+
if (!isPlainObject(obj.permissions)) errors.push('"permissions" must be an object');
|
|
61
|
+
else if (obj.permissions.allow !== undefined
|
|
62
|
+
&& (!Array.isArray(obj.permissions.allow) || obj.permissions.allow.some((a) => typeof a !== 'string'))) {
|
|
63
|
+
errors.push('"permissions.allow" must be an array of strings');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return errors;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function readSettingsFile(file, label) {
|
|
70
|
+
let txt;
|
|
71
|
+
try { txt = fs.readFileSync(file, 'utf8'); } catch (e) {
|
|
72
|
+
throw new Error(`Cannot read ${label} (${file}): ${e.message}`);
|
|
73
|
+
}
|
|
74
|
+
let obj;
|
|
75
|
+
try { obj = JSON.parse(txt); } catch (e) {
|
|
76
|
+
throw new Error(`${label} is not valid JSON (${file}): ${e.message}. Fix or remove it, then re-run. No files were changed.`);
|
|
77
|
+
}
|
|
78
|
+
const errors = settingsShapeErrors(obj);
|
|
79
|
+
if (errors.length) {
|
|
80
|
+
throw new Error(`${label} has an unexpected structure (${file}):\n - ${errors.join('\n - ')}\nFix it, then re-run. No files were changed.`);
|
|
81
|
+
}
|
|
82
|
+
return obj;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Compute the merged settings in memory without writing anything.
|
|
86
|
+
// Throws a descriptive Error if the existing or template settings are unparseable or wrongly shaped.
|
|
87
|
+
function planSettings(file, templateFile) {
|
|
88
|
+
const tpl = readSettingsFile(templateFile, 'hero-mmt-kit settings template');
|
|
89
|
+
const existed = exists(file);
|
|
90
|
+
const cur = existed ? readSettingsFile(file, '.claude/settings.json') : {};
|
|
91
|
+
return { file, existed, merged: mergeSettingsObjects(cur, tpl) };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Write a plan produced by planSettings (backs up an existing file first).
|
|
95
|
+
function applySettingsPlan(plan) {
|
|
96
|
+
if (plan.existed) backup(plan.file);
|
|
97
|
+
else ensureDir(path.dirname(plan.file));
|
|
98
|
+
fs.writeFileSync(plan.file, JSON.stringify(plan.merged, null, 2) + '\n');
|
|
99
|
+
}
|
|
100
|
+
|
|
35
101
|
// Deep-merge our hooks + permissions into an existing settings.json without clobbering the user's.
|
|
36
102
|
function mergeSettings(file, templateFile) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (exists(file)) { cur = JSON.parse(fs.readFileSync(file, 'utf8')); backup(file); }
|
|
40
|
-
else ensureDir(path.dirname(file));
|
|
103
|
+
applySettingsPlan(planSettings(file, templateFile));
|
|
104
|
+
}
|
|
41
105
|
|
|
106
|
+
// Pure merge: user's hooks/permissions are kept; template hooks are appended only when their command is new.
|
|
107
|
+
function mergeSettingsObjects(cur, tpl) {
|
|
108
|
+
cur = JSON.parse(JSON.stringify(cur));
|
|
42
109
|
cur.hooks = cur.hooks || {};
|
|
43
110
|
for (const ev of Object.keys(tpl.hooks || {})) {
|
|
44
111
|
cur.hooks[ev] = cur.hooks[ev] || [];
|
|
@@ -55,7 +122,9 @@ function mergeSettings(file, templateFile) {
|
|
|
55
122
|
cur.permissions.allow = Array.from(new Set([...(cur.permissions.allow || []), ...tpl.permissions.allow]));
|
|
56
123
|
}
|
|
57
124
|
|
|
58
|
-
|
|
125
|
+
return cur;
|
|
59
126
|
}
|
|
60
127
|
|
|
61
|
-
module.exports = {
|
|
128
|
+
module.exports = {
|
|
129
|
+
mergeManagedBlock, mergeSettings, planSettings, applySettingsPlan, settingsShapeErrors, START, END,
|
|
130
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { ensureDir, exists } = require('./util.cjs');
|
|
5
|
+
const { renderTree } = require('./render.cjs');
|
|
6
|
+
|
|
7
|
+
// Docs under templates/docs are user-owned once installed: render and write a
|
|
8
|
+
// file only when it is missing at the destination. Existing files (and any
|
|
9
|
+
// prior *.bak next to them) are never modified. `opts.skip` lists basenames
|
|
10
|
+
// that must not be created at all (e.g. ACTIVE_STATE.md during update).
|
|
11
|
+
function seedDocs(srcDir, destDir, vars, opts) {
|
|
12
|
+
const skip = new Set((opts && opts.skip) || []);
|
|
13
|
+
const created = [], kept = [];
|
|
14
|
+
for (const f of renderTree(srcDir, vars)) {
|
|
15
|
+
if (skip.has(path.basename(f.rel))) continue;
|
|
16
|
+
const dest = path.join(destDir, f.rel);
|
|
17
|
+
if (exists(dest)) { kept.push(f.rel); continue; }
|
|
18
|
+
ensureDir(path.dirname(dest));
|
|
19
|
+
fs.writeFileSync(dest, f.content, { flag: 'wx' });
|
|
20
|
+
created.push(f.rel);
|
|
21
|
+
}
|
|
22
|
+
return { created, kept };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
module.exports = { seedDocs };
|
package/src/skills.cjs
CHANGED
package/src/update.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const path = require('path');
|
|
4
|
-
const { log,
|
|
5
|
-
const {
|
|
6
|
-
const { mergeManagedBlock,
|
|
4
|
+
const { log, readJSON, writeJSON, ensureDir } = require('./util.cjs');
|
|
5
|
+
const { renderString } = require('./render.cjs');
|
|
6
|
+
const { mergeManagedBlock, planSettings, applySettingsPlan } = require('./merge.cjs');
|
|
7
|
+
const { seedDocs } = require('./seed-docs.cjs');
|
|
7
8
|
const { normalizeProfileConfig } = require('./profile-config.cjs');
|
|
8
9
|
|
|
9
10
|
async function update(opts) {
|
|
@@ -24,19 +25,18 @@ async function update(opts) {
|
|
|
24
25
|
|
|
25
26
|
const skillDirs = ['.claude/skills'];
|
|
26
27
|
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
ensureDir(path.dirname(dest));
|
|
35
|
-
if (exists(dest)) backup(dest);
|
|
36
|
-
fs.writeFileSync(dest, f.content);
|
|
37
|
-
n++;
|
|
28
|
+
// Preflight: parse + validate settings before ANY target write.
|
|
29
|
+
let settingsPlan;
|
|
30
|
+
try {
|
|
31
|
+
settingsPlan = planSettings(path.join(target, '.claude', 'settings.json'), path.join(templates, 'common', '.claude', 'settings.json'));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
log.err(e.message);
|
|
34
|
+
process.exit(1);
|
|
38
35
|
}
|
|
39
|
-
|
|
36
|
+
|
|
37
|
+
// Docs are user-owned: seed missing files only. NEVER touch or recreate ACTIVE_STATE on update.
|
|
38
|
+
const docs = seedDocs(path.join(templates, 'docs'), path.join(target, 'docs'), vars, { skip: ['ACTIVE_STATE.md'] });
|
|
39
|
+
log.ok(`Docs: ${docs.created.length} seeded · ${docs.kept.length} existing kept unchanged (ACTIVE_STATE.md preserved)`);
|
|
40
40
|
|
|
41
41
|
// Managed blocks (content outside markers preserved)
|
|
42
42
|
const claudeInner = renderString(fs.readFileSync(path.join(templates, 'CLAUDE.md.tmpl'), 'utf8'), vars);
|
|
@@ -46,7 +46,7 @@ async function update(opts) {
|
|
|
46
46
|
for (const h of ['git-guard.cjs', 'stop-reminder.cjs', 'active-state-bridge.cjs']) {
|
|
47
47
|
fs.copyFileSync(path.join(templates, 'common', '.claude', 'hooks', h), path.join(target, '.claude', 'hooks', h));
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
applySettingsPlan(settingsPlan);
|
|
50
50
|
log.ok('Claude Code hooks + settings.json refreshed');
|
|
51
51
|
|
|
52
52
|
// Refresh bundled core skills (framework-managed; user-added skills untouched)
|
package/templates/CLAUDE.md.tmpl
CHANGED
|
@@ -4,29 +4,29 @@
|
|
|
4
4
|
|
|
5
5
|
Core Hero skills:
|
|
6
6
|
- `hero-planning` — turn a request into an agreed, implementation-only plan before code changes.
|
|
7
|
-
- `hero-coding` — implement and track every approved requirement/task; no
|
|
7
|
+
- `hero-coding` — implement and track every approved requirement/task, then delegate mandatory bounded build/typecheck and directly related existing tests to a fresh `hero-coding-verify` subagent; no new tests or independent review.
|
|
8
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
|
|
10
|
-
- `hero-reviewing` — single
|
|
9
|
+
- `hero-golang` — choose for Go implementation with ownership, cancellation, and resource safety rules; inherits the same `hero-coding` stage, bounded verification, and boundaries. Formatting is limited to edited files.
|
|
10
|
+
- `hero-reviewing` — single no-edit entry point for a fresh plan-backed review and/or technical assessment of supplied review feedback; may safely run existing related checks as evidence.
|
|
11
11
|
- `hero-unit-test` — write and run post-implementation unit tests without changing production code.
|
|
12
12
|
- `hero-security` — standalone OWASP + AI/LLM security review when you want a dedicated security pass.
|
|
13
|
-
- `hero-mr-review` — standalone review
|
|
14
|
-
- `hero-gitflow` — standalone, user-requested Git actions under protected-branch and `.gitignore` rules.
|
|
13
|
+
- `hero-mr-review` — standalone, no-code-change review with safe related tests: GitLab MR URLs receive English comments via authenticated `glab` (no report); local commit/tag/branch refs receive an MR report. Supports related MRs across repositories; no Git mutations or `ACTIVE_STATE.md` updates.
|
|
14
|
+
- `hero-gitflow` — standalone, user-requested Git actions and GitLab MR creation under protected-branch and `.gitignore` rules. MR creation requires explicit source A and target B (ask if missing), an English description based on the diff, and squash disabled; never auto-merge.
|
|
15
15
|
- `hero-strict` — opt-in, separate full verification pass before a "done" claim.
|
|
16
16
|
|
|
17
17
|
### Context loading
|
|
18
|
-
- **Resume
|
|
18
|
+
- **Resume:** use the injected Active Features context, or read [ACTIVE_STATE](docs/ACTIVE_STATE.md) if it is unavailable. Open a linked plan or report only when needed, and check the current working tree before continuing.
|
|
19
19
|
- **Read on demand:** [SECURITY_STANDARDS](docs/SECURITY_STANDARDS.md), [PERFORMANCE_STANDARDS](docs/PERFORMANCE_STANDARDS.md), [DESIGN_STANDARDS](docs/DESIGN_STANDARDS.md), [BROWNFIELD_DISCOVERY](docs/BROWNFIELD_DISCOVERY.md), and templates under `docs/templates/` only when the current skill requires them.
|
|
20
20
|
|
|
21
21
|
### Non-negotiables
|
|
22
22
|
- **Gates:** for risky or hard-to-reverse changes, use Plan Mode (`EnterPlanMode` → `ExitPlanMode`) for real sign-off — not a prose promise.
|
|
23
23
|
- **Plan Mode:** do not enter Plan Mode unless the user explicitly requests planning. When they do, invoke `hero-planning`.
|
|
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.
|
|
25
|
-
- **
|
|
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. Explicitly requested MR creation may target a protected branch because it does not merge or write to it; require both source/target branches and verify squash is disabled. Generic skills cannot override these rules; see `hero-gitflow` for branch, ticket, commit-message, MR-creation, and conflict handling.
|
|
25
|
+
- **Hooks:** `.claude/` installs `git-guard` (PreToolUse on Bash), `active-state-bridge` (SessionStart), and `stop-reminder` (Stop). They provide limited command checks and context reminders; they do not enforce the whole workflow. Don't bypass them.
|
|
26
26
|
- **GitNexus (if installed):** skip on empty repos; use impact/context analysis for non-trivial code changes and stale-index checks.
|
|
27
27
|
- **Skills (if installed):** invoke relevant process skills via the `Skill` tool; do not load unrelated skill/docs context.
|
|
28
|
-
- **Language:** framework instructions, skills, rules, and templates remain English-only. User-facing replies and artifacts must use the user's language unless they request another language.
|
|
29
|
-
- **Sub-agent delegation is optional, not automatic
|
|
28
|
+
- **Language:** framework instructions, skills, rules, and templates remain English-only. User-facing replies and artifacts must use the user's language unless they request another language. Exception: `hero-mr-review` posts MR comments and summaries in English; its chat and local-ref reports still use the user's language. `hero-gitflow` writes MR titles and descriptions in English from the actual diff; its chat still uses the user's language.
|
|
29
|
+
- **Sub-agent delegation is optional, not automatic** for research, review, and implementation. **Exception:** `hero-coding` verification must be delegated to a fresh `hero-coding-verify` subagent; the coding conversation never runs checks itself. Don't hardcode model IDs — let the harness resolve the active model.
|
|
30
30
|
|
|
31
31
|
## Response Style
|
|
32
32
|
|
package/templates/skills/NOTICE
CHANGED
|
@@ -58,7 +58,7 @@ 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-node, hero-golang, hero-reviewing,
|
|
61
|
+
using-hero, hero-planning, hero-coding, hero-coding-verify, hero-node, hero-golang, hero-reviewing,
|
|
62
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
|