@hopla/claude-setup 1.5.0 → 1.7.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
@@ -163,20 +163,20 @@ After each PIV loop, run `/hopla-execution-report` + `/hopla-system-review` to f
163
163
 
164
164
  ### Feature development (PIV loop)
165
165
  ```
166
- /hopla-prime → load context at session start
167
- /hopla-plan-feature → research codebase and create plan
168
- /hopla-review-plan → review plan summary and approve
169
- /hopla-execute → implement the plan with validation
170
- /hopla-code-review technical review of changes
171
- /hopla-code-review-fix → fix issues found
172
- /hopla-git-commit save to git
173
- /hopla-git-pr open pull request on GitHub
166
+ /hopla-prime → load context at session start
167
+ /hopla-plan-feature → research codebase and create plan
168
+ /hopla-review-plan → review plan summary and approve
169
+ /hopla-execute → implement the plan with validation
170
+ /hopla-code-review standalone review of changes
171
+ /hopla-code-review-fix → fix issues found
172
+ /hopla-execution-report document what was built
173
+ /hopla-git-commit save to git
174
+ /hopla-git-pr → open pull request on GitHub
174
175
  ```
175
176
 
176
177
  ### After implementation
177
178
  ```
178
- /hopla-execution-report document what was built
179
- /hopla-system-review → analyze plan vs. actual for process improvements
179
+ /hopla-system-review analyze plan vs. actual for process improvements
180
180
  ```
181
181
 
182
182
  > **Tip:** `hopla-prime`, `hopla-git-commit`, `hopla-git-pr`, `hopla-code-review`, and `hopla-execution-report` also exist as skills — they auto-activate when you describe what you want in natural language, without typing the slash command.
@@ -202,25 +202,31 @@ Commands are modular — the output of one becomes the input of the next. Some c
202
202
  /hopla-plan-feature add user authentication
203
203
  → saves: .agents/plans/add-user-authentication.md
204
204
 
205
- # 2. Execute
205
+ # 2. Review plan
206
+ /hopla-review-plan .agents/plans/add-user-authentication.md
207
+
208
+ # 3. Execute
206
209
  /hopla-execute .agents/plans/add-user-authentication.md
207
210
  → implements the plan, runs validation
208
211
 
209
- # 3. Review
212
+ # 4. Code review
210
213
  /hopla-code-review
211
214
  → saves: .agents/code-reviews/add-user-authentication.md
212
215
 
213
- # 4. Fix issues
216
+ # 5. Fix issues
214
217
  /hopla-code-review-fix .agents/code-reviews/add-user-authentication.md
215
218
 
216
- # 5. Commit
217
- /hopla-git-commit
218
-
219
219
  # 6. Document
220
220
  /hopla-execution-report
221
221
  → saves: .agents/execution-reports/add-user-authentication.md
222
222
 
223
- # 7. Improve process
223
+ # 7. Commit
224
+ /hopla-git-commit
225
+
226
+ # 8. Pull request
227
+ /hopla-git-pr
228
+
229
+ # 9. Process improvement (after PR merge)
224
230
  /hopla-system-review .agents/plans/add-user-authentication.md .agents/execution-reports/add-user-authentication.md
225
231
  ```
226
232
 
@@ -46,3 +46,8 @@ Provide a summary of:
46
46
  - Issues skipped and why (if $2 scope was used)
47
47
  - Validation result ✅/❌
48
48
  - Any issues that could not be fixed automatically and require human review
49
+
50
+ ## Next Step
51
+
52
+ After all fixes pass validation, suggest:
53
+ > "All review issues fixed and validation passed. Run `/hopla-execution-report` to document the implementation, then `/hopla-git-commit` to commit."
@@ -79,3 +79,8 @@ If no issues found: "Code review passed. No technical issues detected."
79
79
  - Focus on real bugs, not style preferences (linting handles that)
80
80
  - Flag security issues as `critical`
81
81
  - Suggest fixes, don't just identify problems
82
+
83
+ ## Next Step
84
+
85
+ After the review, suggest:
86
+ > "Code review saved to `.agents/code-reviews/[name].md`. If issues were found, run `/hopla-code-review-fix .agents/code-reviews/[name].md` to fix them. If the review passed clean, proceed to `/hopla-execution-report`."
@@ -62,6 +62,8 @@ Check that the current branch follows Git Flow:
62
62
  - **Never execute on `main` or `master`** — stop and warn the user
63
63
  - **If on `develop`/`dev`** — ask: "You're on `develop`. Should I create a feature branch first? (recommended: `feature/[plan-name]`)"
64
64
  - **If on a `feature/`, `fix/`, or `hotfix/` branch** — proceed
65
+ - **If the plan specifies a base branch** (in `## Git Strategy`) — verify the current branch was created from that base. If not, warn the user:
66
+ > "The plan specifies base branch `[X]` but the current branch was created from `[Y]`. This may cause the PR to target the wrong branch. Continue anyway?"
65
67
 
66
68
  If a new branch is needed, propose the name and wait for confirmation before creating it:
67
69
  ```bash
@@ -99,6 +101,19 @@ Work through each task in the plan sequentially. For each task:
99
101
 
100
102
  Do not improvise silently. When in doubt, stop and ask.
101
103
 
104
+ ### Scope Guard
105
+
106
+ If the user requests changes that are NOT in the plan during execution:
107
+
108
+ 1. **Acknowledge** the request
109
+ 2. **Assess** whether it's a small adjustment (< 5 minutes, same files) or a new feature
110
+ 3. **If small adjustment:** implement it and flag it as a deviation in the completion report
111
+ 4. **If new feature or significant addition:**
112
+ - Suggest committing the current planned work first
113
+ - Then create a new branch or add it to the backlog
114
+ - Say: "This looks like a separate feature. I recommend we commit the current work first, then handle this in a new branch. Should I add it to `.agents/plans/backlog/` instead?"
115
+ 5. **Never** silently add significant unplanned work — scope creep caused the lowest alignment score (6/10) in past implementations
116
+
102
117
  ## Step 5: Run Full Validation Pyramid
103
118
 
104
119
  After all tasks are complete, run the full validation sequence in order.
@@ -180,5 +195,7 @@ Provide a summary of what was done:
180
195
  ## Step 7: Suggest Next Steps
181
196
 
182
197
  After the summary, suggest:
183
- 1. Run `/hopla-execution-report` to document this implementation for system review
184
- 2. Run `/hopla-git-commit` once everything is approved
198
+ 1. Run `/hopla-code-review` for a standalone review of the changes (recommended — a fresh review catches issues the executing agent may have missed)
199
+ 2. If issues are found, run `/hopla-code-review-fix` to fix them
200
+ 3. Run `/hopla-execution-report` to document the implementation
201
+ 4. Run `/hopla-git-commit` to commit the changes
@@ -67,3 +67,8 @@ Based on this implementation, what should change for next time?
67
67
  - Plan command improvements: [suggestions]
68
68
  - Execute command improvements: [suggestions]
69
69
  - CLAUDE.md additions: [suggestions]
70
+
71
+ ## Next Step
72
+
73
+ After the report is saved, suggest:
74
+ > "Execution report saved to `.agents/execution-reports/[name].md`. Run `/hopla-git-commit` to commit your changes."
@@ -45,7 +45,18 @@ Present the proposed commit message to the user **before executing**:
45
45
 
46
46
  Wait for explicit approval before running `git commit`.
47
47
 
48
- ## Step 5: Execute Commit
48
+ ## Step 5: Version Bump (if configured)
49
+
50
+ Before committing, check the project's `CLAUDE.md` for a `## Versioning` section. If it exists:
51
+
52
+ 1. Read the versioning configuration (command, trigger, files)
53
+ 2. Check if the **trigger condition** matches (e.g., specific branches, always, etc.)
54
+ 3. If it matches, run the version bump command
55
+ 4. Stage the version files alongside the other changes
56
+
57
+ If no `## Versioning` section exists in the project's `CLAUDE.md`, skip this step entirely.
58
+
59
+ ## Step 6: Execute Commit
49
60
 
50
61
  Once approved, create the commit:
51
62
 
@@ -53,10 +64,13 @@ Once approved, create the commit:
53
64
  git commit -m "<type>(<scope>): <description>"
54
65
  ```
55
66
 
56
- ## Step 6: Push Reminder
67
+ ## Step 7: Push Reminder
57
68
 
58
69
  After committing, remind the user:
59
70
 
60
71
  > "Commit created locally. Do you want to push to `origin/<branch>`?"
61
72
 
62
73
  **Never push automatically** — wait for explicit confirmation.
74
+
75
+ If the user confirms the push (or if the branch was already pushed), suggest:
76
+ > "Ready to create a Pull Request? Run `/hopla-git-pr` to create one."
@@ -97,6 +97,9 @@ After creating, show the PR URL to the user.
97
97
 
98
98
  **Never merge automatically** — the PR is for human review.
99
99
 
100
+ After showing the PR URL, suggest:
101
+ > "PR created. To complete the cycle, run `/hopla-execution-report` (if not done yet) and `/hopla-system-review` after the PR is merged."
102
+
100
103
  ## Step 7: Post-Merge Cleanup
101
104
 
102
105
  After the user confirms the PR was approved and merged on GitHub, run the cleanup workflow based on the branch type:
@@ -64,6 +64,9 @@ Based on research, define:
64
64
  - Any risks, edge cases, or gotchas to flag
65
65
  - What tests are needed
66
66
  - **Derived/computed values:** If any value is calculated from other fields, specify the exact formula including how stored values are interpreted (sign, units, semantics), AND how derived values propagate when inputs change (event system, reactivity, polling, etc.)
67
+ - **Interaction states & edge cases:** For features involving interactive UI (forms, grids, keyboard navigation, wizards, CLI interactions), define a matrix of user interactions and their expected behavior. Cover: all keyboard shortcuts (both directions — e.g., Tab AND Shift+Tab), state transitions (empty → editing → saved → error), and boundary conditions (first item, last item, empty list, maximum items). This prevents iterative fix rounds that consumed up to 40% of session time in past implementations.
68
+ - **API input validation:** For every API endpoint being created or modified, specify: required fields, field format constraints (e.g., "IMEI must be exactly 15 digits"), payload size limits, and what the user sees on validation failure. This was the #2 most common gap in past plans — validation was only added after code review in 4 of 7 implementations.
69
+ - **User preferences check:** Before specifying UI architecture (modal vs. inline, page vs. panel, dialog vs. drawer), verify against MEMORY.md and conversation history for established preferences. In past implementations, plans that specified modals were rejected because the user preferred inline panels — this caused rework. When no preference exists, note it as a decision point for the user to confirm.
67
70
 
68
71
  ## Phase 5: Generate the Plan
69
72
 
@@ -85,6 +88,10 @@ Use this structure:
85
88
  ## Out of Scope
86
89
  - [Anything explicitly excluded]
87
90
 
91
+ ## Git Strategy
92
+ - **Base branch:** `[develop | dev | main — specify which branch to create the feature branch from]`
93
+ - **Feature branch:** `feature/[kebab-case-name]`
94
+
88
95
  ## Context References
89
96
  Key files the executing agent must read before starting:
90
97
  - `[path/to/file]` — [why it's relevant]
@@ -101,20 +108,34 @@ Key files the executing agent must read before starting:
101
108
  - **Details:** [Step-by-step description of what to implement]
102
109
  - **Gotcha:** [Known pitfall or constraint] — or `N/A`
103
110
  - **Validate:** [Exact command or check to confirm this task is done correctly]
111
+ - **Time-box:** [Optional — for tasks with known technical risk, specify a maximum time and fallback. E.g., "30 min max. If auto-sizing doesn't work, fall back to fixed widths." Omit for straightforward tasks.]
104
112
 
105
113
  #### For tasks that create or modify API endpoints, also include:
106
114
  - **Validation:** [Required fields, input limits, format constraints (e.g. "IMEI must be exactly 15 digits")]
107
115
  - **Error UX:** [What the user sees when this operation fails (e.g. "toast.error with message", "inline error under field")]
108
116
 
109
117
  ### Task 2: [Action verb + what]
110
- [Same structure — all 6 fields required]
118
+ [Same structure — all 6 required fields, plus optional Time-box]
111
119
 
112
120
  [Continue for all tasks...]
113
121
 
122
+ ## Interaction Matrix (if applicable)
123
+
124
+ > Include this section when the feature involves interactive UI (grids, forms, keyboard navigation, drag-and-drop, wizards). Skip for pure backend/API features.
125
+
126
+ | Action | Context | Expected Behavior |
127
+ |--------|---------|-------------------|
128
+ | [e.g., Tab] | [e.g., Last editable cell in row] | [e.g., Move to first cell of next row] |
129
+ | [e.g., Escape] | [e.g., While editing a cell] | [e.g., Cancel edit, restore previous value] |
130
+
131
+ Include: keyboard shortcuts (forward AND reverse), mouse interactions, state transitions, boundary conditions (first/last item, empty state, maximum items).
132
+
114
133
  ## Test Tasks
115
134
 
116
135
  > 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
136
 
137
+ > **Regression check:** If this feature modifies existing interactive functionality (editing flows, keyboard navigation, API endpoints with existing consumers), include a task to smoke-test the existing behavior AFTER implementation. In past implementations, changes to shared utilities broke existing interactions that weren't covered by the plan's task list.
138
+
118
139
  ## Validation Checklist
119
140
 
120
141
  Run in this order — do not proceed if a level fails:
@@ -164,6 +185,9 @@ Before saving the draft, review the plan against these criteria:
164
185
  - [ ] **Test coverage:** At least one task creates or updates tests — or a justification is provided for why tests are not applicable
165
186
  - [ ] **User preferences checked:** MEMORY.md was consulted for UI preferences (modal vs inline, keyboard shortcuts, component conventions) that affect the plan
166
187
  - [ ] **Confidence score justified:** Score is provided with specific strengths, uncertainties, and mitigations
188
+ - [ ] **Git strategy specified:** Base branch and feature branch are defined in `## Git Strategy`
189
+ - [ ] **Interaction matrix included:** If the feature involves interactive UI, the `## Interaction Matrix` section is filled out — or explicitly marked as N/A with justification
190
+ - [ ] **Time-box on risky tasks:** Any task involving unfamiliar libraries, heuristic parsing, or known-complex behavior (auto-sizing, animation, real-time sync) has a Time-box with a fallback strategy
167
191
 
168
192
  ## Phase 7: Save Draft and Enter Review Loop
169
193
 
@@ -192,4 +216,4 @@ Before saving the draft, review the plan against these criteria:
192
216
 
193
217
  **Finalize:**
194
218
  1. Rename `.agents/plans/[feature-name].draft.md` → `.agents/plans/[feature-name].md` (overwrite if it already exists)
195
- 2. Confirm: "✅ Plan saved to `.agents/plans/[feature-name].md`. Run `/hopla-git-commit` to commit it, then share with the team to execute with `/hopla-execute .agents/plans/[feature-name].md`."
219
+ 2. Confirm: "✅ Plan saved to `.agents/plans/[feature-name].md`. Run `/hopla-review-plan .agents/plans/[feature-name].md` to review it, then `/hopla-execute .agents/plans/[feature-name].md` to implement it."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hopla/claude-setup",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "description": "Hopla team agentic coding system for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {