@hopla/claude-setup 1.17.1 → 2.1.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.
Files changed (46) hide show
  1. package/.claude-plugin/marketplace.json +2 -1
  2. package/.claude-plugin/plugin.json +4 -3
  3. package/CHANGELOG.md +123 -0
  4. package/LICENSE +21 -0
  5. package/README.md +65 -39
  6. package/agents/system-reviewer.md +4 -4
  7. package/cli.js +288 -8
  8. package/commands/archive.md +137 -0
  9. package/commands/execute.md +1 -1
  10. package/commands/guides/ai-optimized-codebase.md +5 -1
  11. package/commands/guides/data-audit.md +4 -0
  12. package/commands/guides/hooks-reference.md +4 -0
  13. package/commands/guides/mcp-integration.md +6 -2
  14. package/commands/guides/remote-coding.md +5 -1
  15. package/commands/guides/review-checklist.md +4 -0
  16. package/commands/guides/scaling-beyond-engineering.md +4 -0
  17. package/commands/guides/validation-pyramid.md +5 -1
  18. package/commands/guides/write-skill.md +4 -0
  19. package/commands/init-project.md +38 -17
  20. package/commands/plan-feature.md +21 -3
  21. package/commands/system-review.md +11 -15
  22. package/commands/validate.md +1 -1
  23. package/hooks/prompt-route.js +244 -91
  24. package/hooks/session-prime.js +12 -4
  25. package/hooks/statusline.js +3 -5
  26. package/hooks/tsc-check.js +40 -3
  27. package/package.json +16 -6
  28. package/skills/brainstorm/SKILL.md +18 -2
  29. package/skills/code-review/SKILL.md +5 -0
  30. package/skills/code-review/checklist.md +1 -1
  31. package/skills/debug/SKILL.md +1 -1
  32. package/skills/execution-report/SKILL.md +1 -1
  33. package/skills/execution-report/report-structure.md +2 -2
  34. package/skills/git/commit.md +2 -2
  35. package/skills/git/pr.md +1 -1
  36. package/skills/hook-audit/SKILL.md +135 -0
  37. package/skills/hook-audit/checklist.md +210 -0
  38. package/skills/hook-audit/tests/fixtures/use-bad.ts.example +53 -0
  39. package/skills/hook-audit/tests/fixtures/use-good.ts.example +64 -0
  40. package/skills/hook-audit/tests/manual-test.sh +73 -0
  41. package/skills/performance/SKILL.md +1 -1
  42. package/skills/prime/SKILL.md +2 -2
  43. package/skills/refactoring/SKILL.md +1 -1
  44. package/skills/subagent-execution/SKILL.md +2 -2
  45. package/skills/verify/SKILL.md +1 -1
  46. package/skills/worktree/SKILL.md +2 -2
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$schema": "https://json.schemastore.org/claude-code-marketplace.json",
2
3
  "name": "hopla-marketplace",
3
4
  "description": "Hopla Tools plugin marketplace for Claude Code",
4
5
  "owner": {
@@ -9,7 +10,7 @@
9
10
  {
10
11
  "name": "hopla",
11
12
  "description": "Agentic coding system: PIV loop, TDD, debugging, brainstorming, subagent execution, and team workflows",
12
- "version": "1.17.1",
13
+ "version": "2.1.1",
13
14
  "source": "./",
14
15
  "author": {
15
16
  "name": "Hopla Tools",
@@ -1,13 +1,14 @@
1
1
  {
2
+ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
2
3
  "name": "hopla",
3
4
  "description": "Agentic coding system for Claude Code: PIV loop (Plan → Implement → Validate), TDD, debugging, brainstorming, subagent execution, and team workflows",
4
- "version": "1.17.1",
5
+ "version": "2.1.1",
5
6
  "author": {
6
7
  "name": "Hopla Tools",
7
8
  "email": "julio@hopla.tools"
8
9
  },
9
- "homepage": "https://github.com/hopla-tools/claude-setup",
10
- "repository": "https://github.com/hopla-tools/claude-setup",
10
+ "homepage": "https://github.com/HOPLAtools/claude-setup#readme",
11
+ "repository": "https://github.com/HOPLAtools/claude-setup",
11
12
  "license": "MIT",
12
13
  "keywords": [
13
14
  "claude",
package/CHANGELOG.md ADDED
@@ -0,0 +1,123 @@
1
+ # Changelog
2
+
3
+ All notable changes to **@hopla/claude-setup** are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [2.1.1] - 2026-05-12
10
+
11
+ ### Fixed
12
+ - `hopla-claude-setup --migrate` and `--uninstall` now clean up legacy guide duplicates left in `~/.claude/commands/guides/` by pre-plugin CLI versions (≤ v1.11.x). Removes only files whose name matches a plugin-shipped guide — custom user guides in the same directory are preserved. Empty `guides/` directories are then removed.
13
+
14
+ ### Notes
15
+ - This addresses the duplicate `/guides:*` entries (marked `(user)`) that appeared alongside `/hopla:guides:*` (marked `(hopla)`) in the slash-command autocomplete after upgrading from a pre-plugin install.
16
+
17
+ ## [2.1.0] - 2026-05-12
18
+
19
+ ### Added
20
+ - `hopla-claude-setup --setup-statusline` and `--remove-statusline` flags: the CLI now wires the Hopla statusline into `~/.claude/settings.json` automatically. `uninstall` removes it. Manual JSON snippet is documented as a fallback only.
21
+ - `node:test` test suite (`npm test`) — 34 unit + integration tests covering `cli.js` helpers (`parseSettingsFile`, `safeWrite`, the new `setupStatusline`/`removeStatusline`) and the three core hooks (`env-protect`, `tsc-check`, `prompt-route`). Zero external dependencies — uses Node's built-in test runner.
22
+ - GitHub Actions CI (`.github/workflows/ci.yml`): runs on every PR and push to main — JSON validation, version sync check, `npm test`, CLI dry-runs, and the `hook-audit` manual smoke test.
23
+ - `CONTRIBUTING.md` with local development, testing, and PR guidelines.
24
+ - `SECURITY.md` with the vulnerability disclosure process and the plugin's threat model (which hooks intercept which tool calls).
25
+ - `CODE_OF_CONDUCT.md` (Contributor Covenant v2.1).
26
+ - `.github/PULL_REQUEST_TEMPLATE.md` and `.github/ISSUE_TEMPLATE/{bug_report,feature_request}.md`.
27
+ - Frontmatter `description:` on the 9 guides in `commands/guides/` so they appear with hints in the slash-command autocomplete.
28
+
29
+ ### Changed
30
+ - **i18n cleanup** — the plugin is now language-agnostic. Spanish trigger phrases removed from the descriptions of `brainstorm`, `verify`, `performance`, `debug` skills. Users configure their preferred response language in their own `~/.claude/CLAUDE.md`.
31
+ - **`hooks/prompt-route.js` refactored to a hybrid matcher**: the hardcoded `SKILL_TRIGGERS` array is gone. The hook discovers skills at runtime by reading `SKILL.md` files; matching uses an optional `triggers:` frontmatter override, falling back to auto-derive from the skill name and quoted phrases in the description. New skills are matched without code changes.
32
+ - **`hooks/tsc-check.js` filters by file extension**: editing a `.md` file no longer triggers `tsc --noEmit`. Only `.ts`, `.tsx`, `.js`, `.jsx`, `.mts`, `.cts`, `.mjs`, `.cjs` files invoke the check.
33
+ - `cli.js`: `parseSettingsFile` and `safeWrite` are now exported for testing. The main dispatcher is gated by an `isMainModule` check so the file can be imported as a library by tests.
34
+ - `hooks/statusline.js` header comment points users at the new CLI flag rather than a hardcoded JSON snippet.
35
+ - README "Optional: Hopla statusline" section recommends the CLI flag; manual JSON setup kept as a fallback note.
36
+ - `CLAUDE.md` §5 (Testing) and §6 (Release flow) now describe `npm test` and the CI verification step.
37
+ - `hooks/prompt-route.js` `triggers:` override added to `skills/code-review/SKILL.md` so phrases like "review my code" (with words between "review" and "code") match the skill.
38
+
39
+ ### Removed
40
+ - Temporary `.DS_Store` artifact at repo root (already in `.gitignore`).
41
+
42
+ ### Notes for plugin authors
43
+ - Skill discovery in Claude Code v1.24 does **not** support nested `skills/<subdir>/<name>/SKILL.md` paths. The 9 reference guides remain in `commands/guides/*.md` and ship with `description:` frontmatter. A future migration to `skills/` will revisit this if the platform adds support.
44
+
45
+ ## [2.0.0] - 2026-05-12
46
+
47
+ ### Added
48
+ - `LICENSE` (MIT) in repo root for legal clarity in npm + GitHub.
49
+ - `description`, `repository`, `homepage`, `bugs` fields in `package.json` for proper npm registry display.
50
+ - `$schema` field in `plugin.json` and `marketplace.json` for JSON Schema validation in editors.
51
+ - This `CHANGELOG.md` (full history back to 1.13.0 below).
52
+ - `LICENSE` and `CHANGELOG.md` are now included in the published npm tarball via `files[]`.
53
+
54
+ ### Changed
55
+ - **Breaking:** repository slug in `plugin.json` corrected from `hopla-tools/claude-setup` (404) to `HOPLAtools/claude-setup` (the real GitHub org).
56
+ - `plugin.json` `homepage` differentiated from `repository`: now points to `#readme` anchor.
57
+ - README install snippet simplified: `/plugin marketplace add HOPLAtools/claude-setup` (one argument — the canonical form per Anthropic docs).
58
+ - All CLI references in README updated from `claude-setup` to `hopla-claude-setup`.
59
+
60
+ ### Removed
61
+ - **Breaking:** bin alias `claude-setup` removed from `package.json`. The package now exposes only `hopla-claude-setup`. Migration: replace any script that calls `claude-setup` with `hopla-claude-setup` — same flags, same behavior. Rationale: the generic name risked colliding with other npm packages distributed publicly.
62
+
63
+ ## [1.19.0] - 2026-05-11
64
+
65
+ ### Added
66
+ - New `hopla:hook-audit` skill — mechanical pre-commit checks for new React hooks against 4 documented bug classes (P-5 memoization, S-8 stale-id guard, E-1 error matching, D-1 cache + dedup integrity).
67
+
68
+ ### Changed
69
+ - Documentation aligned with the canonical `/plugin marketplace update <name>` flow introduced in Claude Code v1.24+. The older `cd … && git pull` dance is no longer prescribed.
70
+
71
+ ## [1.18.0] - 2026-05-11
72
+
73
+ ### Added
74
+ - OpenSpec wave 1: `AGENTS.md` (canonical project rules) with a CLAUDE.md alias path.
75
+ - `.agents/specs/canonical/` for living requirements documents.
76
+ - `/hopla:archive` command — folds delta-specs from completed plans into canonical specs and moves artifacts to archive locations.
77
+ - `claude-setup status` subcommand — read-only inspection of the current project's `.agents/` workflow (plans, specs, reviews, suggested next step). JSON output available via `--json`.
78
+
79
+ ## [1.17.1] - 2026-05-01
80
+
81
+ ### Changed
82
+ - `plan-feature` now enforces UX iteration budget declaration when the feature touches a visible UI surface.
83
+ - `plan-feature` now requires a `## Domain Assumptions` section when the feature uses project-specific vocabulary.
84
+
85
+ ## [1.17.0] - 2026-04-17
86
+
87
+ ### Added
88
+ - New skills: `refactoring`, `performance`, `migration`.
89
+ - Spec linking — plans can reference and update canonical specs.
90
+ - `.agents/audits/` directory for audit artifacts.
91
+
92
+ ## [1.16.0] - 2026-04-17
93
+
94
+ ### Changed
95
+ - Refactor: progressive disclosure across skills, shared references between skills (e.g. `worktree` cites `git/flow-detection.md`), cleaner telemetry.
96
+
97
+ ## [1.15.0] - 2026-04-17
98
+
99
+ ### Added
100
+ - MCP server template (`.mcp.json.template`).
101
+ - New hooks: `UserPromptSubmit` (skill routing hints), `PreCompact` (session state snapshot).
102
+ - Optional statusline renderer (`hooks/statusline.js`) showing branch · worktree indicator · uncommitted count · active plan.
103
+
104
+ ## [1.14.1] - 2026-04-17
105
+
106
+ ### Fixed
107
+ - 7 critical audit findings (see commit `69c025b` for the full list).
108
+
109
+ ## [1.14.0] - 2026-04-17
110
+
111
+ ### Added
112
+ - CLI `--dry-run` flag that composes with any other flag.
113
+ - CLI cleans legacy agents (`code-reviewer.md`, `codebase-researcher.md`, `system-reviewer.md`) and legacy `PLANNING_PERMISSIONS` from older installs.
114
+ - CLI prints an advisory when the plugin or marketplace cache is still present (the CLI cannot remove those — the user does).
115
+
116
+ ## [1.13.0] - 2026-04-17
117
+
118
+ ### Added
119
+ - `git` skill integrated with `worktree` skill via centralized Git Flow detection in `flow-detection.md`.
120
+
121
+ ---
122
+
123
+ For releases prior to 1.13.0, see the git history (`git log --oneline`).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 Hopla Tools
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -24,7 +24,7 @@ The full setup is **plugin + CLI** — they deliver different layers:
24
24
  **Step 1 — Register the marketplace and install the plugin** (inside Claude Code):
25
25
 
26
26
  ```
27
- /plugin marketplace add hopla-marketplace HOPLAtools/claude-setup
27
+ /plugin marketplace add HOPLAtools/claude-setup
28
28
  /plugin install hopla@hopla-marketplace
29
29
  ```
30
30
 
@@ -32,11 +32,15 @@ The full setup is **plugin + CLI** — they deliver different layers:
32
32
 
33
33
  ```bash
34
34
  npm install -g @hopla/claude-setup
35
- claude-setup --force
35
+ hopla-claude-setup --force
36
36
  ```
37
37
 
38
38
  That's it. Commands show as `/hopla:<name>`, skills auto-trigger when relevant.
39
39
 
40
+ **Recommended — enable auto-update for the marketplace** (one-time, inside Claude Code):
41
+
42
+ Open `/plugin` → **Marketplaces** tab → select `hopla-marketplace` → enable auto-update. From then on, new releases are fetched automatically at session start; Claude Code will prompt you to run `/reload-plugins` when an update is ready. Skip this step and you'll need to refresh manually (see [Update](#update) below).
43
+
40
44
  ### Plugin only (skip global rules)
41
45
 
42
46
  If you don't want the machine-wide `~/.claude/CLAUDE.md`, just do Step 1. The plugin works on its own.
@@ -51,28 +55,25 @@ If you only want the global rules and not the plugin's commands/skills, just do
51
55
 
52
56
  ### Plugin channel
53
57
 
54
- Claude Code caches the marketplace repo locally. To pick up new versions:
55
-
56
- ```bash
57
- cd ~/.claude/plugins/marketplaces/hopla-marketplace && git pull
58
- ```
58
+ **If auto-update is enabled** (see Quick Start Step 2.5): nothing to do. Claude Code fetches new releases at session start and prompts you to run `/reload-plugins`. That's it.
59
59
 
60
- Then inside Claude Code:
60
+ **Manual refresh** (when auto-update is off, or you want to pull immediately):
61
61
 
62
62
  ```
63
- /plugin uninstall hopla@hopla-marketplace
64
- /plugin install hopla@hopla-marketplace
63
+ /plugin marketplace update hopla-marketplace
64
+ /plugin disable hopla@hopla-marketplace
65
+ /plugin enable hopla@hopla-marketplace
65
66
  /reload-plugins
66
67
  ```
67
68
 
68
- > **Known issue:** Claude Code does not automatically `git pull` the marketplace when reinstalling a plugin. The manual `git pull` above is required.
69
+ `/plugin marketplace update` refreshes the cached marketplace listing. `disable`/`enable` cycles the plugin so the new files are picked up — faster than a full `uninstall`/`install` because no scope re-selection is needed. `/reload-plugins` ensures hooks and commands are re-registered in the current session.
69
70
 
70
- If the `cd` path does not exist, you never installed the marketplace do Step 1 of Quick Start instead.
71
+ > The older `cd ~/.claude/plugins/marketplaces/hopla-marketplace && git pull` workflow still works but is no longer recommended — the built-in `/plugin marketplace update` is the canonical path since Claude Code v1.24.
71
72
 
72
73
  ### CLI channel (global rules)
73
74
 
74
75
  ```bash
75
- npm install -g @hopla/claude-setup@latest --prefer-online && claude-setup --force
76
+ npm install -g @hopla/claude-setup@latest --prefer-online && hopla-claude-setup --force
76
77
  ```
77
78
 
78
79
  ---
@@ -88,7 +89,7 @@ npm install -g @hopla/claude-setup@latest --prefer-online && claude-setup --forc
88
89
  **CLI:**
89
90
 
90
91
  ```bash
91
- claude-setup --uninstall
92
+ hopla-claude-setup --uninstall
92
93
  ```
93
94
 
94
95
  Removes `~/.claude/CLAUDE.md` plus legacy `hopla-*` files from older installs.
@@ -97,12 +98,14 @@ Removes `~/.claude/CLAUDE.md` plus legacy `hopla-*` files from older installs.
97
98
 
98
99
  | Flag | Purpose |
99
100
  |---|---|
100
- | `claude-setup` | Interactive install of global rules + permissions |
101
- | `claude-setup --force` | Install without prompts |
102
- | `claude-setup --migrate` | Remove legacy CLI-installed duplicates only |
103
- | `claude-setup --uninstall` | Remove global rules + legacy files |
104
- | `claude-setup --dry-run` | Preview changes without touching disk (composes with other flags) |
105
- | `claude-setup --version` | Print package version |
101
+ | `hopla-claude-setup` | Interactive install of global rules + permissions |
102
+ | `hopla-claude-setup --force` | Install without prompts |
103
+ | `hopla-claude-setup --migrate` | Remove legacy CLI-installed duplicates only |
104
+ | `hopla-claude-setup --uninstall` | Remove global rules + legacy files |
105
+ | `hopla-claude-setup status` | Read-only inspection of the current project's `.agents/` workflow state (plans, specs, reviews, suggested next step) |
106
+ | `hopla-claude-setup status --json` | Same as above, JSON output for agents to parse |
107
+ | `hopla-claude-setup --dry-run` | Preview changes without touching disk (composes with other flags) |
108
+ | `hopla-claude-setup --version` | Print package version |
106
109
 
107
110
  ---
108
111
 
@@ -110,21 +113,33 @@ Removes `~/.claude/CLAUDE.md` plus legacy `hopla-*` files from older installs.
110
113
 
111
114
  The plugin ships a statusline script that shows your branch, worktree indicator, uncommitted count, and active plan file (`📋 plan-name`) in Claude Code's status bar.
112
115
 
113
- Enable it by adding to `~/.claude/settings.json`:
116
+ **Enable it (one-time):**
114
117
 
115
- ```json
116
- {
117
- "statusLine": {
118
- "type": "command",
119
- "command": "node ~/.claude/plugins/marketplaces/hopla-marketplace/hooks/statusline.js"
120
- }
121
- }
118
+ ```bash
119
+ hopla-claude-setup --setup-statusline
122
120
  ```
123
121
 
124
- Then run `/reload-plugins` or restart Claude Code.
122
+ This writes the right `statusLine` block to `~/.claude/settings.json`, pointing at the installed plugin's `statusline.js`. Run `/reload-plugins` (or restart Claude Code) to see it.
123
+
124
+ **Disable it:**
125
+
126
+ ```bash
127
+ hopla-claude-setup --remove-statusline
128
+ ```
125
129
 
126
130
  Sample output: ` feature/auth · 3M · 📋 add-authentication`
127
131
 
132
+ > **Manual setup (fallback):** if you don't have the CLI installed, add this to `~/.claude/settings.json` yourself:
133
+ > ```json
134
+ > {
135
+ > "statusLine": {
136
+ > "type": "command",
137
+ > "command": "node ~/.claude/plugins/marketplaces/hopla-marketplace/hooks/statusline.js"
138
+ > }
139
+ > }
140
+ > ```
141
+ > Replace `hopla-marketplace` with the actual marketplace name if you registered it differently.
142
+
128
143
  ---
129
144
 
130
145
  ## Naming Convention
@@ -140,14 +155,17 @@ Skills and commands use short names in source (e.g., `prime`, `execute`, `git`).
140
155
 
141
156
  ## How It Works — Layered Context
142
157
 
143
- The system uses three levels of CLAUDE.md, each scoped differently:
158
+ The system uses three levels of agent context, each scoped differently:
144
159
 
145
160
  ```
146
161
  ~/.claude/CLAUDE.md ← Machine-level (installed by CLI)
147
162
  └── applies to ALL projects on this machine
148
163
 
149
- CLAUDE.md (project root) ← Project-level (created with /hopla:init-project)
150
- └── applies to THIS project only
164
+ AGENTS.md (project root) ← Project-level (created with /hopla:init-project)
165
+ └── canonical, tool-agnostic rules — applies to THIS project only
166
+ └── readable by Cursor, Copilot, Continue, Codex, and Claude Code
167
+ CLAUDE.md (project root) ← thin alias that imports AGENTS.md via @AGENTS.md
168
+ └── kept so Claude Code's auto-discovery finds the rules
151
169
 
152
170
  .claude/CLAUDE.local.md ← Local overrides (personal, gitignored)
153
171
  └── your personal tweaks, not shared with team
@@ -155,7 +173,7 @@ CLAUDE.md (project root) ← Project-level (created with /hopla:init-project)
155
173
 
156
174
  **Machine-level rules** cover: language preferences, tech defaults, autonomy behavior, context management tips.
157
175
 
158
- **Project-level rules** cover: specific stack versions, architecture patterns, naming conventions, logging, testing, dev commands, task-specific reference guides.
176
+ **Project-level rules** cover: specific stack versions, architecture patterns, naming conventions, logging, testing, dev commands, task-specific reference guides. Stored in `AGENTS.md` so the project stays portable across AI assistants. The `CLAUDE.md` stub at the project root is auto-generated and only contains `@AGENTS.md` so Claude Code inlines the canonical file — never edit the stub directly.
159
177
 
160
178
  **Local overrides** cover: personal preferences that differ from the team (e.g., verbose logging, different editor settings).
161
179
 
@@ -207,7 +225,7 @@ After each PIV loop, run the `execution-report` skill + `/hopla:system-review` t
207
225
 
208
226
  | Command | Description |
209
227
  |---|---|
210
- | `init-project` | Read PRD, recommend stack, create CLAUDE.md and .agents/ structure |
228
+ | `init-project` | Read PRD, recommend stack, create AGENTS.md (+ CLAUDE.md alias) and .agents/ structure |
211
229
  | `create-prd` | Create a Product Requirements Document through guided questions |
212
230
  | `plan-feature` | Research codebase and create a structured implementation plan |
213
231
  | `review-plan` | Review a plan before execution — get a summary and approve |
@@ -215,6 +233,7 @@ After each PIV loop, run the `execution-report` skill + `/hopla:system-review` t
215
233
  | `validate` | Run the validation pyramid: lint → types → tests → integration |
216
234
  | `code-review-fix` | Fix issues found in a code review report |
217
235
  | `rca` | Root Cause Analysis — investigate a bug and generate an RCA doc |
236
+ | `archive` | Close the lifecycle of a completed plan: fold its delta-specs into canonical specs, move artifacts to archive locations |
218
237
  | `guide` | 4D Framework walkthrough for non-technical users |
219
238
  | `system-review` | Analyze implementation against plan to find process improvements |
220
239
 
@@ -238,6 +257,7 @@ After each PIV loop, run the `execution-report` skill + `/hopla:system-review` t
238
257
  | `migration` | "migrate", "upgrade", "switch from X to Y", "major version bump" |
239
258
  | `subagent-execution` | "use subagents", plans with 5+ tasks |
240
259
  | `parallel-dispatch` | "run in parallel", "parallelize this", independent tasks |
260
+ | `hook-audit` | "audit hook", "check hook", "hook review" — mechanical static audit of `src/hooks/use*.ts` files (memoization, stale-id guards, error-match strictness, cache+dedup integrity) |
241
261
 
242
262
  **Hooks** — Run automatically:
243
263
 
@@ -292,6 +312,7 @@ After each PIV loop, run the `execution-report` skill + `/hopla:system-review` t
292
312
  "review the code" → code-review skill runs automatically
293
313
  /hopla:code-review-fix → fix issues found
294
314
  "generate the report" → execution-report skill documents what was built
315
+ /hopla:archive → fold delta-specs into canonical specs, move plan to done/, drop ephemeral code-review (opt-in — when delta-specs were declared)
295
316
  "commit this" → git skill handles commits and PRs
296
317
  (cleanup including worktree removal happens post-merge)
297
318
  ```
@@ -371,7 +392,7 @@ Commands are modular — the output of one becomes the input of the next. Some a
371
392
  ### `/plugin install` doesn't show the `hopla` plugin
372
393
 
373
394
  - Run `/plugin marketplace list` — confirm `hopla-marketplace` is registered
374
- - If missing, re-run `/plugin marketplace add hopla-marketplace HOPLAtools/claude-setup`
395
+ - If missing, re-run `/plugin marketplace add HOPLAtools/claude-setup`
375
396
  - Restart Claude Code after registering a new marketplace
376
397
 
377
398
  ### Commands appear as both `hopla-*` and `hopla:*`
@@ -379,7 +400,7 @@ Commands are modular — the output of one becomes the input of the next. Some a
379
400
  You have legacy CLI-installed files from before the plugin refactor. Clean up:
380
401
 
381
402
  ```bash
382
- claude-setup --migrate
403
+ hopla-claude-setup --migrate
383
404
  ```
384
405
 
385
406
  This removes `hopla-*` duplicates from `~/.claude/commands/` and `~/.claude/skills/` without touching your global rules.
@@ -393,7 +414,7 @@ cd ~/.claude/plugins/marketplaces/hopla-marketplace && git pull
393
414
 
394
415
  You never registered the marketplace. Run Quick Start Step 1 first.
395
416
 
396
- ### `claude-setup: command not found`
417
+ ### `hopla-claude-setup: command not found`
397
418
 
398
419
  The npm global bin is not on your PATH. Check with:
399
420
 
@@ -404,6 +425,8 @@ npm config get prefix
404
425
 
405
426
  Alternatively, run via npx: `npx @hopla/claude-setup --force`.
406
427
 
428
+ > **Migrating from v1.x?** The `claude-setup` bin alias was removed in v2.0.0. Replace any script that calls `claude-setup` with `hopla-claude-setup` (same flags, same behavior).
429
+
407
430
  ### Changes to skills/commands don't take effect
408
431
 
409
432
  Claude Code caches plugin content. After a plugin update:
@@ -434,12 +457,15 @@ Issues and contributions welcome: https://github.com/HOPLAtools/claude-setup/iss
434
457
  ```
435
458
  project/
436
459
  ├── PRD.md ← Product scope (from /hopla:create-prd)
437
- ├── CLAUDE.md ← Project rules and stack (from /hopla:init-project)
460
+ ├── AGENTS.md ← Canonical project rules (tool-agnostic, from /hopla:init-project)
461
+ ├── CLAUDE.md ← Thin alias: contains @AGENTS.md so Claude Code auto-loads the rules
438
462
  ├── .agents/
439
463
  │ ├── plans/ ← Implementation plans (commit)
440
- │ │ ├── done/ ← Archived plans after system-review (commit)
464
+ │ │ ├── done/ ← Plans archived by /hopla:archive (commit)
441
465
  │ │ └── backlog/ ← Deferred ideas from Scope Guard (commit)
442
466
  │ ├── specs/ ← Design specs from brainstorming (commit)
467
+ │ │ ├── canonical/ ← "Current behavior" specs by domain — populated incrementally by /hopla:archive (commit; opt-in)
468
+ │ │ └── archived/ ← Completed design specs moved here by /hopla:archive (commit)
443
469
  │ ├── guides/ ← On-demand reference guides (commit)
444
470
  │ ├── rca/ ← Root cause analysis docs (commit)
445
471
  │ ├── execution-reports/ ← Post-implementation reports (commit)
@@ -22,7 +22,7 @@ You are a System Reviewer. Your job is to analyze how well the implementation ma
22
22
 
23
23
  | Pattern | Action |
24
24
  |---------|--------|
25
- | Issue appears in ALL features | Update CLAUDE.md |
25
+ | Issue appears in ALL features | Update AGENTS.md (or CLAUDE.md) |
26
26
  | Issue appears in one CLASS of features | Update the specific command |
27
27
  | Same manual step repeated 3+ times | Create a new command |
28
28
  | Plan ambiguous at same point twice | Update planning command |
@@ -47,7 +47,7 @@ Save to `.agents/system-reviews/[feature-name].md`:
47
47
 
48
48
  ## Recommended Improvements
49
49
 
50
- ### CLAUDE.md Updates
50
+ ### AGENTS.md / CLAUDE.md Updates
51
51
  - [Specific changes to project rules]
52
52
 
53
53
  ### Command Updates
@@ -65,12 +65,12 @@ Save to `.agents/system-reviews/[feature-name].md`:
65
65
  ## Recommendation Tracking
66
66
 
67
67
  For each recommendation from the 2 most recent system reviews:
68
- - Was it applied? (Check CLAUDE.md, commands, guides for the suggested change)
68
+ - Was it applied? (Check AGENTS.md / CLAUDE.md, commands, guides for the suggested change)
69
69
  - If not applied, why? (Forgotten, deprioritized, or superseded?)
70
70
  - **Recurring unapplied recommendations indicate a broken feedback loop** — escalate these by listing them first in "Recommended Improvements" with a ⚠️ prefix
71
71
 
72
72
  ## Next Step
73
73
 
74
74
  After the review is saved, suggest:
75
- > "System review saved to `.agents/system-reviews/[feature]-review.md`. Plan archived. If recurring recommendations were found, consider applying them before the next feature — they represent known gaps in the process."
75
+ > "System review saved to `.agents/system-reviews/[feature]-review.md`. To close the lifecycle of this plan, run `/hopla:archive <plan-path>` — it will fold any delta-specs into the canonical specs and move the plan to `done/`. If recurring recommendations were found, consider applying them before the next feature — they represent known gaps in the process."
76
76
  ```