@hopla/claude-setup 1.4.4 → 1.5.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/README.md CHANGED
@@ -226,6 +226,16 @@ Commands are modular — the output of one becomes the input of the next. Some c
226
226
 
227
227
  ---
228
228
 
229
+ ## Roadmap
230
+
231
+ Features under consideration for future versions:
232
+
233
+ - **Custom subagents** (`.claude/agents/`) — Define specialized agents with their own instructions and skills for large projects with isolated domains (e.g. frontend agent, backend agent)
234
+ - **Hook templates** — Installable hook patterns beyond tsc-check and env-protect (e.g. query deduplication, notification hooks)
235
+ - **GitHub Actions integration** — Automated PR reviews and `@claude` mentions via GitHub App
236
+
237
+ ---
238
+
229
239
  ## Project Structure (after /hopla-init-project)
230
240
 
231
241
  ```
package/cli.js CHANGED
@@ -72,17 +72,38 @@ function removeFile(dest, label) {
72
72
  async function uninstall() {
73
73
  log(`\n${BOLD}@hopla/claude-setup${RESET} — Uninstall\n`);
74
74
 
75
- const commandFiles = fs.readdirSync(path.join(FILES_DIR, "commands"));
76
- const filesToRemove = [
77
- { dest: path.join(CLAUDE_DIR, "CLAUDE.md"), label: "~/.claude/CLAUDE.md" },
78
- ...commandFiles.map((file) => ({
75
+ const srcEntries = fs.readdirSync(path.join(FILES_DIR, "commands"));
76
+ const srcFiles = srcEntries.filter((f) =>
77
+ fs.statSync(path.join(FILES_DIR, "commands", f)).isFile()
78
+ );
79
+ const srcDirs = srcEntries.filter((f) =>
80
+ fs.statSync(path.join(FILES_DIR, "commands", f)).isDirectory()
81
+ );
82
+
83
+ const itemsToRemove = [
84
+ { dest: path.join(CLAUDE_DIR, "CLAUDE.md"), label: "~/.claude/CLAUDE.md", isDir: false },
85
+ ...srcFiles.map((file) => ({
79
86
  dest: path.join(COMMANDS_DIR, file),
80
87
  label: `~/.claude/commands/${file}`,
88
+ isDir: false,
89
+ })),
90
+ ...srcDirs.map((dir) => ({
91
+ dest: path.join(COMMANDS_DIR, dir),
92
+ label: `~/.claude/commands/${dir}/`,
93
+ isDir: true,
81
94
  })),
82
95
  ];
83
96
 
84
- log(`The following files will be removed:`);
85
- for (const { label } of filesToRemove) {
97
+ // Also remove skills and hooks installed by hopla
98
+ if (fs.existsSync(SKILLS_DIR)) {
99
+ itemsToRemove.push({ dest: SKILLS_DIR, label: "~/.claude/skills/", isDir: true });
100
+ }
101
+ if (fs.existsSync(HOOKS_DIR)) {
102
+ itemsToRemove.push({ dest: HOOKS_DIR, label: "~/.claude/hooks/", isDir: true });
103
+ }
104
+
105
+ log(`The following will be removed:`);
106
+ for (const { label } of itemsToRemove) {
86
107
  log(` ${RED}✕${RESET} ${label}`);
87
108
  }
88
109
 
@@ -93,40 +114,34 @@ async function uninstall() {
93
114
  }
94
115
 
95
116
  log("");
96
- for (const { dest, label } of filesToRemove) {
97
- removeFile(dest, label);
117
+ for (const { dest, label, isDir } of itemsToRemove) {
118
+ if (fs.existsSync(dest)) {
119
+ fs.rmSync(dest, { recursive: isDir });
120
+ log(` ${RED}✕${RESET} Removed: ${label}`);
121
+ } else {
122
+ log(` ${YELLOW}↷${RESET} Not found: ${label}`);
123
+ }
98
124
  }
99
125
 
100
126
  log(`\n${GREEN}${BOLD}Done!${RESET} Files removed.\n`);
101
127
  }
102
128
 
103
- const LEGACY_FILES = [
104
- "code-review-fix.md",
105
- "code-review.md",
106
- "commit.md",
107
- "create-prd.md",
108
- "execute.md",
109
- "execution-report.md",
110
- "plan-feature.md",
111
- "prime.md",
112
- "system-review.md",
113
- "hopla-lang.md",
114
- "hopla-commit.md",
115
- ];
116
-
117
- function removeLegacyFiles() {
129
+ function removeStaleCommands(currentCommandFiles) {
130
+ if (!fs.existsSync(COMMANDS_DIR)) return;
131
+ const currentSet = new Set(currentCommandFiles);
118
132
  const removed = [];
119
- for (const file of LEGACY_FILES) {
120
- const dest = path.join(COMMANDS_DIR, file);
121
- if (fs.existsSync(dest)) {
122
- fs.rmSync(dest);
133
+ for (const file of fs.readdirSync(COMMANDS_DIR)) {
134
+ const filePath = path.join(COMMANDS_DIR, file);
135
+ if (!fs.statSync(filePath).isFile()) continue;
136
+ if (file.startsWith("hopla-") && !currentSet.has(file)) {
137
+ fs.rmSync(filePath);
123
138
  removed.push(file);
124
139
  }
125
140
  }
126
141
  if (removed.length > 0) {
127
- log(`${CYAN}Cleaning up legacy commands...${RESET}`);
142
+ log(`${CYAN}Removing stale commands from previous versions...${RESET}`);
128
143
  for (const file of removed) {
129
- log(` ${YELLOW}↷${RESET} Removed legacy: ~/.claude/commands/${file}`);
144
+ log(` ${YELLOW}↷${RESET} Removed: ~/.claude/commands/${file}`);
130
145
  }
131
146
  log("");
132
147
  }
@@ -142,25 +157,6 @@ const PLANNING_COMMANDS = [
142
157
  "hopla-git-pr.md",
143
158
  ];
144
159
 
145
- function removeExecutionCommands() {
146
- const planningSet = new Set(PLANNING_COMMANDS);
147
- const removed = [];
148
- if (!fs.existsSync(COMMANDS_DIR)) return;
149
- for (const file of fs.readdirSync(COMMANDS_DIR)) {
150
- if (file.startsWith("hopla-") && !planningSet.has(file)) {
151
- fs.rmSync(path.join(COMMANDS_DIR, file));
152
- removed.push(file);
153
- }
154
- }
155
- if (removed.length > 0) {
156
- log(`${CYAN}Removing execution commands (planning mode)...${RESET}`);
157
- for (const file of removed) {
158
- log(` ${RED}✕${RESET} Removed: ~/.claude/commands/${file}`);
159
- }
160
- log("");
161
- }
162
- }
163
-
164
160
  async function install() {
165
161
  const modeLabel = PLANNING ? "Planning Mode (Robert)" : "Full Install";
166
162
  log(`\n${BOLD}@hopla/claude-setup${RESET} — Agentic Coding System ${CYAN}[${modeLabel}]${RESET}\n`);
@@ -169,20 +165,7 @@ async function install() {
169
165
  fs.mkdirSync(CLAUDE_DIR, { recursive: true });
170
166
  fs.mkdirSync(COMMANDS_DIR, { recursive: true });
171
167
 
172
- // Remove old non-prefixed commands from previous versions
173
- removeLegacyFiles();
174
-
175
- // In planning mode, remove any execution commands left from a previous full install
176
- if (PLANNING) removeExecutionCommands();
177
-
178
- log(`${CYAN}Installing global rules...${RESET}`);
179
- await installFile(
180
- path.join(FILES_DIR, "CLAUDE.md"),
181
- path.join(CLAUDE_DIR, "CLAUDE.md"),
182
- "~/.claude/CLAUDE.md"
183
- );
184
-
185
- log(`\n${CYAN}Installing commands...${RESET}`);
168
+ // Determine which command files will be installed
186
169
  const allCommandEntries = fs.readdirSync(path.join(FILES_DIR, "commands"));
187
170
  const allCommandFiles = allCommandEntries.filter((f) => {
188
171
  const stat = fs.statSync(path.join(FILES_DIR, "commands", f));
@@ -195,6 +178,18 @@ async function install() {
195
178
  const commandFiles = PLANNING
196
179
  ? allCommandFiles.filter((f) => PLANNING_COMMANDS.includes(f))
197
180
  : allCommandFiles;
181
+
182
+ // Remove stale hopla-* commands not in the current version
183
+ removeStaleCommands(commandFiles);
184
+
185
+ log(`${CYAN}Installing global rules...${RESET}`);
186
+ await installFile(
187
+ path.join(FILES_DIR, "CLAUDE.md"),
188
+ path.join(CLAUDE_DIR, "CLAUDE.md"),
189
+ "~/.claude/CLAUDE.md"
190
+ );
191
+
192
+ log(`\n${CYAN}Installing commands...${RESET}`);
198
193
  for (const file of commandFiles.sort()) {
199
194
  await installFile(
200
195
  path.join(FILES_DIR, "commands", file),
@@ -3,6 +3,8 @@ description: Fix issues found in a code review report
3
3
  argument-hint: "<review-file-or-description> [scope]"
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Fix the issues identified in a code review.
7
9
 
8
10
  ## Inputs
@@ -3,6 +3,8 @@ description: Technical code review on recently changed files
3
3
  argument-hint: "[optional: branch or commit range, defaults to HEAD]"
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Perform a technical code review focused on finding real bugs and issues.
7
9
 
8
10
  ## Step 1: Load Context
@@ -2,6 +2,8 @@
2
2
  description: Create or update the PRD for this project through guided questions
3
3
  ---
4
4
 
5
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
6
+
5
7
  Create or update a `PRD.md` for this project following the Layer 1 Planning approach: an exploratory conversation that defines scope, reduces assumptions, and generates both a `PRD.md` and supporting on-demand context documents.
6
8
 
7
9
  **If a `PRD.md` already exists**, this command will read it first and only ask about what's missing, outdated, or changing — it will not start from scratch.
@@ -3,6 +3,8 @@ description: Execute a structured plan from start to finish with validation
3
3
  argument-hint: "<plan-file-path>"
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Execute the implementation plan provided. You are the executing agent — you have not seen the planning conversation. The plan is your only source of truth.
7
9
 
8
10
  ## Step 1: Load Context
@@ -40,13 +42,22 @@ Use when a plan assumption does not match reality:
40
42
  - **Recommendation:** [Replan X | Fix Y | Proceed with caution because Z]
41
43
  ```
42
44
 
43
- ## Step 2: Verify Git Branch
45
+ ## Step 2: Verify Git State
44
46
 
45
47
  ```bash
46
48
  git branch --show-current
47
49
  git status
48
50
  ```
49
51
 
52
+ ### Clean working tree check
53
+
54
+ If there are uncommitted changes, **stop and warn the user**:
55
+ > "There are uncommitted changes in the working tree. These will be mixed into the implementation and make it harder to review and revert. Please commit or stash them before continuing."
56
+
57
+ Do not proceed until the working tree is clean.
58
+
59
+ ### Branch check
60
+
50
61
  Check that the current branch follows Git Flow:
51
62
  - **Never execute on `main` or `master`** — stop and warn the user
52
63
  - **If on `develop`/`dev`** — ask: "You're on `develop`. Should I create a feature branch first? (recommended: `feature/[plan-name]`)"
@@ -114,7 +125,22 @@ If tests fail:
114
125
  Run integration tests or manual verification as specified in the plan (e.g. `npm run test:e2e`, manual curl).
115
126
  Verify the feature works end-to-end.
116
127
 
117
- ### Level 5 — Human Review (flag for user)
128
+ ### Level 5 — Code Review
129
+ Run a code review on all changed files following the `/hopla-code-review` process. This catches bugs that linting, types, and tests miss (security issues, logic errors, pattern violations).
130
+
131
+ If the review finds critical or high severity issues, **fix them before proceeding**.
132
+
133
+ ### Level 6 — File Drift Check
134
+ Compare the files actually changed against the plan's task list:
135
+
136
+ ```bash
137
+ git diff --name-only
138
+ git ls-files --others --exclude-standard
139
+ ```
140
+
141
+ Flag any files that were changed but are **not listed in any task**. These are potential scope leaks — unplanned additions that didn't get the same scrutiny as planned tasks. Report them in the completion summary so the user can review.
142
+
143
+ ### Level 7 — Human Review (flag for user)
118
144
  List what the user should manually verify:
119
145
  - Specific behaviors to test in the browser or CLI
120
146
  - Edge cases to check
@@ -136,11 +162,13 @@ Provide a summary of what was done:
136
162
  - [ ] Task 3: [description — if skipped, explain why]
137
163
 
138
164
  ### Validation Results
139
- - Level 1 Lint: ✅ / ❌
140
- - Level 2 Type Check: ✅ / ❌
141
- - Level 3 Unit Tests: ✅ [X passed] / ❌ [X failed]
142
- - Level 4 Integration:✅ / ❌
143
- - Level 5 Human: 🔍 See items below
165
+ - Level 1 Lint: ✅ / ❌
166
+ - Level 2 Type Check: ✅ / ❌
167
+ - Level 3 Unit Tests: ✅ [X passed] / ❌ [X failed]
168
+ - Level 4 Integration: / ❌
169
+ - Level 5 Code Review: [X issues found, all fixed] / ❌
170
+ - Level 6 File Drift: ✅ [all files in plan] / ⚠️ [X unplanned files]
171
+ - Level 7 Human: 🔍 See items below
144
172
 
145
173
  ### For Human Review
146
174
  - [specific thing to verify manually]
@@ -153,5 +181,4 @@ Provide a summary of what was done:
153
181
 
154
182
  After the summary, suggest:
155
183
  1. Run `/hopla-execution-report` to document this implementation for system review
156
- 2. Run `/hopla-code-review` for a technical quality check
157
- 3. Run `/hopla-git-commit` once everything is approved
184
+ 2. Run `/hopla-git-commit` once everything is approved
@@ -2,6 +2,8 @@
2
2
  description: Generate an implementation report for system review
3
3
  ---
4
4
 
5
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
6
+
5
7
  Review and document the implementation you just completed. Run this immediately after finishing a feature — before committing or starting the next task.
6
8
 
7
9
  ## Step 1: Gather Implementation Data
@@ -3,6 +3,8 @@ description: Create a conventional commit with Git Flow awareness
3
3
  argument-hint: "[optional: commit message or scope]"
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Review the current git state and create an appropriate commit.
7
9
 
8
10
  ## Step 1: Gather Context
@@ -3,6 +3,8 @@ description: Create a GitHub Pull Request with a structured description
3
3
  argument-hint: "[optional: base branch, defaults to develop]"
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Create a Pull Request on GitHub for the current branch.
7
9
 
8
10
  ## Step 1: Gather Context
@@ -20,9 +22,23 @@ Read the following if they exist:
20
22
 
21
23
  ## Step 2: Determine Base Branch
22
24
 
23
- - If `$1` is provided, use it as the base branch
24
- - Otherwise default to `develop` (or `dev` if that's what the project uses)
25
- - If on `main` or `develop` directly, warn the user: "You're on `[branch]` — PRs should come from feature branches."
25
+ **If `$1` is provided**, use it as the base branch.
26
+
27
+ **Otherwise, infer from Git Flow branch naming:**
28
+
29
+ | Current branch prefix | Base branch |
30
+ |---|---|
31
+ | `feature/*` | `develop` or `dev` |
32
+ | `fix/*` | `develop` or `dev` |
33
+ | `hotfix/*` | `main` |
34
+ | `release/*` | `main` |
35
+
36
+ To resolve `develop` vs `dev`: run `git branch -r` and look for `origin/develop` or `origin/dev`. Use whichever exists.
37
+
38
+ **Guard rails:**
39
+ - If the current branch is `main`, `master`, `develop`, or `dev` → stop and warn: "You're on `[branch]` — PRs should come from feature branches."
40
+ - If the branch name doesn't match any Git Flow prefix → ask the user: "I can't determine the base branch from `[branch]`. Should this PR target `develop` or `main`?"
41
+ - **Always show the resolved base branch in Step 5** so the user can catch mistakes before the PR is created.
26
42
 
27
43
  ## Step 3: Check Push Status
28
44
 
@@ -80,3 +96,38 @@ gh pr create --title "[title]" --body "[body]" --base [base-branch]
80
96
  After creating, show the PR URL to the user.
81
97
 
82
98
  **Never merge automatically** — the PR is for human review.
99
+
100
+ ## Step 7: Post-Merge Cleanup
101
+
102
+ After the user confirms the PR was approved and merged on GitHub, run the cleanup workflow based on the branch type:
103
+
104
+ ### For all branch types:
105
+
106
+ ```bash
107
+ git checkout [base-branch]
108
+ git pull origin [base-branch]
109
+ git branch -d [merged-branch]
110
+ git push origin --delete [merged-branch] 2>/dev/null # skip if GitHub already deleted it
111
+ ```
112
+
113
+ ### Additional steps for `hotfix/*` and `release/*`:
114
+
115
+ These branches were merged to `main` but `develop` also needs the changes:
116
+
117
+ ```bash
118
+ git checkout develop
119
+ git pull origin develop
120
+ git merge main
121
+ git push origin develop
122
+ ```
123
+
124
+ Then create a version tag:
125
+
126
+ ```bash
127
+ git tag -a v[version] -m "Release [version]"
128
+ git push origin v[version]
129
+ ```
130
+
131
+ Ask the user for the version number before tagging.
132
+
133
+ **Always confirm each destructive action** (branch deletion, tag creation) before executing.
@@ -2,6 +2,8 @@
2
2
  description: Initialize a new project with a CLAUDE.md and .agents/ structure
3
3
  ---
4
4
 
5
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
6
+
5
7
  Set up the Layer 1 planning foundation for this project: a project-specific `CLAUDE.md` with rules and architecture decisions, plus the `.agents/` directory structure.
6
8
 
7
9
  > Layer 1 = Global Rules (~/.claude/CLAUDE.md) + Project Rules (CLAUDE.md) + PRD
@@ -3,6 +3,8 @@ description: Research the codebase and create a structured implementation plan f
3
3
  argument-hint: "<feature-name-or-description>"
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Transform the requirements discussed in this conversation into a structured plan that another agent can execute without access to this conversation.
7
9
 
8
10
  ## Phase 1: Understand the Requirements
@@ -23,6 +25,7 @@ Read the following to understand the project:
23
25
  2. `README.md` — project overview and setup
24
26
  3. `package.json` or `pyproject.toml` — stack, dependencies, scripts
25
27
  4. `.agents/guides/` — if this directory exists, read any guides relevant to the feature being planned (e.g. `@.agents/guides/api-guide.md` when planning an API endpoint)
28
+ 5. `MEMORY.md` (if it exists at project root or `~/.claude/`) — check for user preferences that affect this feature (UI patterns like modal vs inline, keyboard shortcuts, component conventions)
26
29
 
27
30
  Then run:
28
31
 
@@ -99,17 +102,26 @@ Key files the executing agent must read before starting:
99
102
  - **Gotcha:** [Known pitfall or constraint] — or `N/A`
100
103
  - **Validate:** [Exact command or check to confirm this task is done correctly]
101
104
 
105
+ #### For tasks that create or modify API endpoints, also include:
106
+ - **Validation:** [Required fields, input limits, format constraints (e.g. "IMEI must be exactly 15 digits")]
107
+ - **Error UX:** [What the user sees when this operation fails (e.g. "toast.error with message", "inline error under field")]
108
+
102
109
  ### Task 2: [Action verb + what]
103
110
  [Same structure — all 6 fields required]
104
111
 
105
112
  [Continue for all tasks...]
106
113
 
114
+ ## Test Tasks
115
+
116
+ > Every plan must include at least one task that creates or updates tests. If the feature is purely UI with no testable logic, specify which interactions to verify manually and why automated tests are not applicable.
117
+
107
118
  ## Validation Checklist
108
119
 
109
120
  Run in this order — do not proceed if a level fails:
110
121
 
111
122
  - [ ] **Level 1 — Lint & Format:** `[project lint command]`
112
123
  - [ ] **Level 2 — Type Check:** `[project type check command]`
124
+ - [ ] **Level 2.5 — Code Review:** Run `/hopla-code-review` on changed files
113
125
  - [ ] **Level 3 — Unit Tests:** `[project unit test command]`
114
126
  - [ ] **Level 4 — Integration Tests:** `[project integration test or manual curl/check]`
115
127
  - [ ] **Level 5 — Human Review:** Verify behavior matches requirements above
@@ -119,6 +131,18 @@ Run in this order — do not proceed if a level fails:
119
131
  - [ ] [Specific, testable criterion]
120
132
  - [ ] [Specific, testable criterion]
121
133
 
134
+ ## Confidence Score: __/10
135
+
136
+ - **Strengths:** [What is clear and well-understood]
137
+ - **Uncertainties:** [What might change or is not fully known]
138
+ - **Mitigations:** [How uncertainties will be handled]
139
+
140
+ Scoring guide:
141
+ - 10: Everything is clear, patterns exist, no unknowns
142
+ - 7-9: Minor unknowns but mitigations identified
143
+ - 4-6: Significant unknowns or missing patterns
144
+ - 1-3: High risk, major assumptions unverified
145
+
122
146
  ## Notes for Executing Agent
123
147
  [Any important context, warnings, or decisions made during planning that the executing agent needs to know]
124
148
  ```
@@ -136,6 +160,10 @@ Before saving the draft, review the plan against these criteria:
136
160
  - [ ] No ambiguous requirements left unresolved
137
161
  - [ ] **Data audit complete:** All data sources audited per `.agents/guides/data-audit.md`, with all findings (null cases, value semantics, derived value propagation) documented in Context References and Gotchas
138
162
  - [ ] **Working references specified:** Every framework-specific pattern references a proven working implementation with extracted API calls, prop types, and data flow — not just "see file X"
163
+ - [ ] **API validation specified:** Every task that creates/modifies an API endpoint includes Validation (required fields, limits, format) and Error UX (what the user sees on failure)
164
+ - [ ] **Test coverage:** At least one task creates or updates tests — or a justification is provided for why tests are not applicable
165
+ - [ ] **User preferences checked:** MEMORY.md was consulted for UI preferences (modal vs inline, keyboard shortcuts, component conventions) that affect the plan
166
+ - [ ] **Confidence score justified:** Score is provided with specific strengths, uncertainties, and mitigations
139
167
 
140
168
  ## Phase 7: Save Draft and Enter Review Loop
141
169
 
@@ -2,6 +2,8 @@
2
2
  description: Load project context at the start of a session
3
3
  ---
4
4
 
5
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
6
+
5
7
  Get oriented in this project before doing any work.
6
8
 
7
9
  ## Step 1: Project Structure
@@ -53,6 +55,6 @@ Pending plans:
53
55
  - add-user-authentication.md ← ready to execute with /hopla-execute
54
56
  ```
55
57
 
56
- End with a sentence like: "Listo para continuar — ¿por dónde empezamos?" or "All caught up — what are we working on today?" depending on the language the user writes in.
58
+ End with a sentence like: "All caught up — what are we working on today?"
57
59
 
58
60
  Do NOT use headers in the prose summary. Write it as natural, friendly prose, then the pending plans list if applicable.
@@ -3,6 +3,8 @@ description: Review a plan before execution — get a concise summary and approv
3
3
  argument-hint: "<plan-file-path>"
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Review the implementation plan and give the executing developer a clear, concise summary before they commit to running it.
7
9
 
8
10
  ## Step 1: Read the Plan
@@ -11,7 +13,7 @@ Read `$1` entirely before doing anything else.
11
13
 
12
14
  ## Step 2: Present Executive Summary
13
15
 
14
- Do NOT reproduce the full plan. Instead, present a structured summary in the user's language:
16
+ Do NOT reproduce the full plan. Instead, present a structured summary:
15
17
 
16
18
  **Plan: [Feature Name]**
17
19
 
@@ -41,9 +43,8 @@ Do NOT reproduce the full plan. Instead, present a structured summary in the use
41
43
 
42
44
  ## Step 3: Ask for Approval
43
45
 
44
- After the summary, ask:
45
- > "¿Todo claro? Puedes aprobar para ejecutar, pedir cambios, o hacer preguntas sobre alguna tarea."
46
- > (or in English if the conversation is in English)
46
+ After the summary, ask (in the user's language):
47
+ > "All clear? You can approve to execute, request changes, or ask questions about any task."
47
48
 
48
49
  **Review loop:**
49
50
  - If the user has questions → answer them based on the plan content
@@ -3,6 +3,8 @@ description: Analyze implementation against plan to find process improvements
3
3
  argument-hint: "<plan-file> <execution-report-file>"
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Perform a meta-level analysis of how well the implementation followed the plan. This is NOT code review — you're looking for bugs in the process, not the code.
7
9
 
8
10
  ## Inputs
@@ -10,6 +12,22 @@ Perform a meta-level analysis of how well the implementation followed the plan.
10
12
  - **$1** — Path to the structured plan file
11
13
  - **$2** — Path to the execution report file
12
14
 
15
+ ## Step 0: Check for Existing Review
16
+
17
+ Before doing anything else, check if a system review already exists for this plan:
18
+
19
+ ```bash
20
+ ls .agents/system-reviews/
21
+ ```
22
+
23
+ Look for a file that matches the feature name derived from **$1** (the plan filename). If a matching review exists:
24
+ - Skip Steps 1–6
25
+ - Go directly to **Step 7** to archive the plan
26
+
27
+ If no matching review exists, continue with Step 1.
28
+
29
+ ---
30
+
13
31
  ## Step 1: Load All Context
14
32
 
15
33
  Read these four artifacts in order:
@@ -137,3 +155,15 @@ After the analysis, use this to prioritize actions:
137
155
  | Same manual step done 3+ times | Create a new command |
138
156
  | Plan was ambiguous in the same spot twice | Update plan-feature command |
139
157
  | First time seeing this issue | Note it, don't over-engineer yet |
158
+
159
+ ## Step 7: Archive the Plan
160
+
161
+ Move the completed plan to the archive folder:
162
+
163
+ ```bash
164
+ mkdir -p .agents/plans/done
165
+ mv "$1" .agents/plans/done/
166
+ ```
167
+
168
+ Then notify the user:
169
+ > "✅ System review saved to `.agents/system-reviews/[feature]-review.md`. Plan archived to `.agents/plans/done/[plan-name].md` — the active plans folder is now clean."
@@ -0,0 +1,65 @@
1
+ ---
2
+ description: Run the full validation pyramid on the current project
3
+ ---
4
+
5
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
6
+
7
+ Run the full validation pyramid to verify project health. Use this command when iterating on a small fix, after a refactor, or anytime you need to re-run all validation steps without starting a full PIV loop.
8
+
9
+ ## Step 1: Load Project Context
10
+
11
+ Read `CLAUDE.md` or `AGENTS.md` to find the project's validation commands (look for a "Development Commands" or "Testing" section).
12
+
13
+ If a `.claude/commands/validate.md` exists at the project root, use the commands defined there instead.
14
+
15
+ ## Step 2: Run the Validation Pyramid
16
+
17
+ Execute each level in order. **Do not skip levels. Do not proceed if a level fails — fix it first.**
18
+
19
+ ### Level 1 — Lint & Format
20
+
21
+ Run the project's lint and format commands (e.g. `npm run lint`, `uv run ruff check .`).
22
+
23
+ If issues are found:
24
+ - Fix them automatically if the tool supports it (e.g. `--fix`)
25
+ - Re-run to confirm clean
26
+
27
+ ### Level 2 — Type Check
28
+
29
+ Run the project's type checker (e.g. `npm run typecheck`, `uv run mypy .`).
30
+
31
+ Fix all type errors before continuing.
32
+
33
+ ### Level 3 — Unit Tests
34
+
35
+ Run the project's test suite (e.g. `npm run test`, `uv run pytest`).
36
+
37
+ If tests fail:
38
+ - Investigate the root cause
39
+ - Fix the code (not the tests, unless the test is wrong)
40
+ - Re-run until all pass
41
+
42
+ ### Level 4 — Integration Tests
43
+
44
+ Run integration tests if the project has them (e.g. `npm run test:e2e`).
45
+
46
+ If not available, skip and note it in the report.
47
+
48
+ ## Step 3: Summary Report
49
+
50
+ Provide a clear summary:
51
+
52
+ ```
53
+ ## Validation Report
54
+
55
+ - Level 1 Lint & Format: ✅ / ❌ [details]
56
+ - Level 2 Type Check: ✅ / ❌ [details]
57
+ - Level 3 Unit Tests: ✅ [X passed] / ❌ [X failed]
58
+ - Level 4 Integration: ✅ / ❌ / ⏭️ skipped
59
+
60
+ **Overall: ✅ PASS / ❌ FAIL**
61
+ ```
62
+
63
+ If everything passes, confirm the project is healthy.
64
+
65
+ If anything failed and could not be fixed, list the remaining issues and suggest next steps.
@@ -1,8 +1,10 @@
1
1
  ---
2
2
  name: hopla-code-review
3
- description: Performs a technical code review on recently changed files. Use when the user says "review the code", "revisar el código", "code review", "analiza los cambios", "check my code", "revisa mi código", "look for issues", or asks for feedback on their implementation.
3
+ description: Performs a technical code review on recently changed files. Use when the user says "review the code", "code review", "check my code", "look for issues", or asks for feedback on their implementation.
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Perform a technical code review focused on finding real bugs and issues.
7
9
 
8
10
  ## Step 1: Load Context
@@ -3,6 +3,8 @@ name: hopla-execution-report
3
3
  description: Generates an implementation report documenting what was built. Use when the user says "generate the report", "genera el reporte", "documenta lo implementado", "execution report", "document what was done", "write the implementation report", or after finishing a feature before committing.
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Review and document the implementation you just completed. Run this immediately after finishing a feature — before committing or starting the next task.
7
9
 
8
10
  ## Step 1: Gather Implementation Data
@@ -3,17 +3,19 @@ name: hopla-git
3
3
  description: Handles git operations: creating commits, making pull requests, pushing branches. Use when the user asks to commit, create a commit, save changes to git, make a PR, create a pull request, push the branch, or any git workflow action.
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Detect the user's intent and execute the appropriate git workflow.
7
9
 
8
10
  ## Intent Detection
9
11
 
10
- **If the user wants to commit** (keywords: "commit", "comitea", "guarda los cambios", "save changes", "crear commit", "hacer commit"):
12
+ **If the user wants to commit** (keywords: "commit", "save changes", "create commit"):
11
13
  - Read and follow the instructions in `commit.md` (located in the same directory as this skill)
12
14
 
13
- **If the user wants to create a PR or push** (keywords: "PR", "pull request", "crea un PR", "abre un PR", "push", "merge request"):
15
+ **If the user wants to create a PR or push** (keywords: "PR", "pull request", "push", "merge request"):
14
16
  - Read and follow the instructions in `pr.md` (located in the same directory as this skill)
15
17
 
16
- **If unclear**, ask the user one short question: "¿Commit o Pull Request?" / "Commit or Pull Request?"
18
+ **If unclear**, ask the user one short question: "Commit or Pull Request?"
17
19
 
18
20
  ## File References
19
21
 
@@ -1,5 +1,7 @@
1
1
  # Hopla Git Commit — Full Workflow
2
2
 
3
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
4
+
3
5
  Review the current git state and create an appropriate conventional commit.
4
6
 
5
7
  ## Step 1: Gather Context
@@ -1,5 +1,7 @@
1
1
  # Hopla Git PR — Full Workflow
2
2
 
3
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
4
+
3
5
  Create a Pull Request on GitHub for the current branch.
4
6
 
5
7
  ## Step 1: Gather Context
@@ -17,9 +19,23 @@ Read the following if they exist:
17
19
 
18
20
  ## Step 2: Determine Base Branch
19
21
 
20
- - If the user specified a base branch, use it
21
- - Otherwise default to `develop` (or `dev` if that's what the project uses)
22
- - If on `main` or `develop` directly, warn the user: "You're on `[branch]` — PRs should come from feature branches."
22
+ **If the user specified a base branch**, use it.
23
+
24
+ **Otherwise, infer from Git Flow branch naming:**
25
+
26
+ | Current branch prefix | Base branch |
27
+ |---|---|
28
+ | `feature/*` | `develop` or `dev` |
29
+ | `fix/*` | `develop` or `dev` |
30
+ | `hotfix/*` | `main` |
31
+ | `release/*` | `main` |
32
+
33
+ To resolve `develop` vs `dev`: run `git branch -r` and look for `origin/develop` or `origin/dev`. Use whichever exists.
34
+
35
+ **Guard rails:**
36
+ - If the current branch is `main`, `master`, `develop`, or `dev` → stop and warn: "You're on `[branch]` — PRs should come from feature branches."
37
+ - If the branch name doesn't match any Git Flow prefix → ask the user: "I can't determine the base branch from `[branch]`. Should this PR target `develop` or `main`?"
38
+ - **Always show the resolved base branch in Step 5** so the user can catch mistakes before the PR is created.
23
39
 
24
40
  ## Step 3: Check Push Status
25
41
 
@@ -77,3 +93,38 @@ gh pr create --title "[title]" --body "[body]" --base [base-branch]
77
93
  After creating, show the PR URL to the user.
78
94
 
79
95
  **Never merge automatically** — the PR is for human review.
96
+
97
+ ## Step 7: Post-Merge Cleanup
98
+
99
+ After the user confirms the PR was approved and merged on GitHub, run the cleanup workflow based on the branch type:
100
+
101
+ ### For all branch types:
102
+
103
+ ```bash
104
+ git checkout [base-branch]
105
+ git pull origin [base-branch]
106
+ git branch -d [merged-branch]
107
+ git push origin --delete [merged-branch] 2>/dev/null # skip if GitHub already deleted it
108
+ ```
109
+
110
+ ### Additional steps for `hotfix/*` and `release/*`:
111
+
112
+ These branches were merged to `main` but `develop` also needs the changes:
113
+
114
+ ```bash
115
+ git checkout develop
116
+ git pull origin develop
117
+ git merge main
118
+ git push origin develop
119
+ ```
120
+
121
+ Then create a version tag:
122
+
123
+ ```bash
124
+ git tag -a v[version] -m "Release [version]"
125
+ git push origin v[version]
126
+ ```
127
+
128
+ Ask the user for the version number before tagging.
129
+
130
+ **Always confirm each destructive action** (branch deletion, tag creation) before executing.
@@ -1,8 +1,10 @@
1
1
  ---
2
2
  name: hopla-prime
3
- description: Orients Claude in a project at the start of a session. Use when the user says "orient yourself", "get oriented", "prime yourself", "ponte al día", "qué es este proyecto", "what is this project", "load context", or asks Claude to familiarize itself with the codebase before starting work.
3
+ description: Orients Claude in a project at the start of a session. Use when the user says "orient yourself", "get oriented", "prime yourself", "what is this project", "load context", or asks Claude to familiarize itself with the codebase before starting work.
4
4
  ---
5
5
 
6
+ > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
+
6
8
  Get oriented in this project before doing any work.
7
9
 
8
10
  ## Step 1: Project Structure
@@ -54,6 +56,6 @@ Pending plans:
54
56
  - add-user-authentication.md ← ready to execute with /hopla-execute
55
57
  ```
56
58
 
57
- End with a sentence like: "Listo para continuar — ¿por dónde empezamos?" or "All caught up — what are we working on today?" depending on the language the user writes in.
59
+ End with a sentence like: "All caught up — what are we working on today?"
58
60
 
59
61
  Do NOT use headers in the prose summary. Write it as natural, friendly prose, then the pending plans list if applicable.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hopla/claude-setup",
3
- "version": "1.4.4",
3
+ "version": "1.5.0",
4
4
  "description": "Hopla team agentic coding system for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {