@hopla/claude-setup 1.4.5 → 1.6.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 +33 -17
- package/files/commands/hopla-code-review-fix.md +7 -0
- package/files/commands/hopla-code-review.md +7 -0
- package/files/commands/hopla-create-prd.md +2 -0
- package/files/commands/hopla-execute.md +54 -10
- package/files/commands/hopla-execution-report.md +7 -0
- package/files/commands/hopla-git-commit.md +5 -0
- package/files/commands/hopla-git-pr.md +57 -3
- package/files/commands/hopla-init-project.md +2 -0
- package/files/commands/hopla-plan-feature.md +54 -2
- package/files/commands/hopla-prime.md +3 -1
- package/files/commands/hopla-review-plan.md +3 -1
- package/files/commands/hopla-system-review.md +2 -0
- package/files/commands/hopla-validate.md +65 -0
- package/files/skills/hopla-code-review/SKILL.md +2 -0
- package/files/skills/hopla-execution-report/SKILL.md +2 -0
- package/files/skills/hopla-git/SKILL.md +2 -0
- package/files/skills/hopla-git/commit.md +2 -0
- package/files/skills/hopla-git/pr.md +54 -3
- package/files/skills/hopla-prime/SKILL.md +3 -1
- package/package.json +1 -1
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
|
|
167
|
-
/hopla-plan-feature
|
|
168
|
-
/hopla-review-plan
|
|
169
|
-
/hopla-execute
|
|
170
|
-
/hopla-code-review
|
|
171
|
-
/hopla-code-review-fix
|
|
172
|
-
/hopla-
|
|
173
|
-
/hopla-git-
|
|
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-
|
|
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,30 +202,46 @@ 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.
|
|
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
|
-
#
|
|
212
|
+
# 4. Code review
|
|
210
213
|
/hopla-code-review
|
|
211
214
|
→ saves: .agents/code-reviews/add-user-authentication.md
|
|
212
215
|
|
|
213
|
-
#
|
|
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.
|
|
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
|
|
|
227
233
|
---
|
|
228
234
|
|
|
235
|
+
## Roadmap
|
|
236
|
+
|
|
237
|
+
Features under consideration for future versions:
|
|
238
|
+
|
|
239
|
+
- **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)
|
|
240
|
+
- **Hook templates** — Installable hook patterns beyond tsc-check and env-protect (e.g. query deduplication, notification hooks)
|
|
241
|
+
- **GitHub Actions integration** — Automated PR reviews and `@claude` mentions via GitHub App
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
229
245
|
## Project Structure (after /hopla-init-project)
|
|
230
246
|
|
|
231
247
|
```
|
|
@@ -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
|
|
@@ -44,3 +46,8 @@ Provide a summary of:
|
|
|
44
46
|
- Issues skipped and why (if $2 scope was used)
|
|
45
47
|
- Validation result ✅/❌
|
|
46
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."
|
|
@@ -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
|
|
@@ -77,3 +79,8 @@ If no issues found: "Code review passed. No technical issues detected."
|
|
|
77
79
|
- Focus on real bugs, not style preferences (linting handles that)
|
|
78
80
|
- Flag security issues as `critical`
|
|
79
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`."
|
|
@@ -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,17 +42,28 @@ 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
|
|
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]`)"
|
|
53
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?"
|
|
54
67
|
|
|
55
68
|
If a new branch is needed, propose the name and wait for confirmation before creating it:
|
|
56
69
|
```bash
|
|
@@ -88,6 +101,19 @@ Work through each task in the plan sequentially. For each task:
|
|
|
88
101
|
|
|
89
102
|
Do not improvise silently. When in doubt, stop and ask.
|
|
90
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
|
+
|
|
91
117
|
## Step 5: Run Full Validation Pyramid
|
|
92
118
|
|
|
93
119
|
After all tasks are complete, run the full validation sequence in order.
|
|
@@ -114,7 +140,22 @@ If tests fail:
|
|
|
114
140
|
Run integration tests or manual verification as specified in the plan (e.g. `npm run test:e2e`, manual curl).
|
|
115
141
|
Verify the feature works end-to-end.
|
|
116
142
|
|
|
117
|
-
### Level 5 —
|
|
143
|
+
### Level 5 — Code Review
|
|
144
|
+
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).
|
|
145
|
+
|
|
146
|
+
If the review finds critical or high severity issues, **fix them before proceeding**.
|
|
147
|
+
|
|
148
|
+
### Level 6 — File Drift Check
|
|
149
|
+
Compare the files actually changed against the plan's task list:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
git diff --name-only
|
|
153
|
+
git ls-files --others --exclude-standard
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
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.
|
|
157
|
+
|
|
158
|
+
### Level 7 — Human Review (flag for user)
|
|
118
159
|
List what the user should manually verify:
|
|
119
160
|
- Specific behaviors to test in the browser or CLI
|
|
120
161
|
- Edge cases to check
|
|
@@ -136,11 +177,13 @@ Provide a summary of what was done:
|
|
|
136
177
|
- [ ] Task 3: [description — if skipped, explain why]
|
|
137
178
|
|
|
138
179
|
### Validation Results
|
|
139
|
-
- Level 1 Lint:
|
|
140
|
-
- Level 2 Type Check:
|
|
141
|
-
- Level 3 Unit Tests:
|
|
142
|
-
- Level 4 Integration
|
|
143
|
-
- Level 5
|
|
180
|
+
- Level 1 Lint: ✅ / ❌
|
|
181
|
+
- Level 2 Type Check: ✅ / ❌
|
|
182
|
+
- Level 3 Unit Tests: ✅ [X passed] / ❌ [X failed]
|
|
183
|
+
- Level 4 Integration: ✅ / ❌
|
|
184
|
+
- Level 5 Code Review: ✅ [X issues found, all fixed] / ❌
|
|
185
|
+
- Level 6 File Drift: ✅ [all files in plan] / ⚠️ [X unplanned files]
|
|
186
|
+
- Level 7 Human: 🔍 See items below
|
|
144
187
|
|
|
145
188
|
### For Human Review
|
|
146
189
|
- [specific thing to verify manually]
|
|
@@ -152,6 +195,7 @@ Provide a summary of what was done:
|
|
|
152
195
|
## Step 7: Suggest Next Steps
|
|
153
196
|
|
|
154
197
|
After the summary, suggest:
|
|
155
|
-
1. Run `/hopla-
|
|
156
|
-
2.
|
|
157
|
-
3. Run `/hopla-
|
|
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
|
|
@@ -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
|
|
@@ -65,3 +67,8 @@ Based on this implementation, what should change for next time?
|
|
|
65
67
|
- Plan command improvements: [suggestions]
|
|
66
68
|
- Execute command improvements: [suggestions]
|
|
67
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."
|
|
@@ -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
|
|
@@ -58,3 +60,6 @@ After committing, remind the user:
|
|
|
58
60
|
> "Commit created locally. Do you want to push to `origin/<branch>`?"
|
|
59
61
|
|
|
60
62
|
**Never push automatically** — wait for explicit confirmation.
|
|
63
|
+
|
|
64
|
+
If the user confirms the push (or if the branch was already pushed), suggest:
|
|
65
|
+
> "Ready to create a Pull Request? Run `/hopla-git-pr` to create one."
|
|
@@ -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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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,41 @@ 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
|
+
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
|
+
|
|
103
|
+
## Step 7: Post-Merge Cleanup
|
|
104
|
+
|
|
105
|
+
After the user confirms the PR was approved and merged on GitHub, run the cleanup workflow based on the branch type:
|
|
106
|
+
|
|
107
|
+
### For all branch types:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
git checkout [base-branch]
|
|
111
|
+
git pull origin [base-branch]
|
|
112
|
+
git branch -d [merged-branch]
|
|
113
|
+
git push origin --delete [merged-branch] 2>/dev/null # skip if GitHub already deleted it
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Additional steps for `hotfix/*` and `release/*`:
|
|
117
|
+
|
|
118
|
+
These branches were merged to `main` but `develop` also needs the changes:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
git checkout develop
|
|
122
|
+
git pull origin develop
|
|
123
|
+
git merge main
|
|
124
|
+
git push origin develop
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Then create a version tag:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
git tag -a v[version] -m "Release [version]"
|
|
131
|
+
git push origin v[version]
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Ask the user for the version number before tagging.
|
|
135
|
+
|
|
136
|
+
**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
|
|
|
@@ -61,6 +64,9 @@ Based on research, define:
|
|
|
61
64
|
- Any risks, edge cases, or gotchas to flag
|
|
62
65
|
- What tests are needed
|
|
63
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.
|
|
64
70
|
|
|
65
71
|
## Phase 5: Generate the Plan
|
|
66
72
|
|
|
@@ -82,6 +88,10 @@ Use this structure:
|
|
|
82
88
|
## Out of Scope
|
|
83
89
|
- [Anything explicitly excluded]
|
|
84
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
|
+
|
|
85
95
|
## Context References
|
|
86
96
|
Key files the executing agent must read before starting:
|
|
87
97
|
- `[path/to/file]` — [why it's relevant]
|
|
@@ -98,18 +108,41 @@ Key files the executing agent must read before starting:
|
|
|
98
108
|
- **Details:** [Step-by-step description of what to implement]
|
|
99
109
|
- **Gotcha:** [Known pitfall or constraint] — or `N/A`
|
|
100
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.]
|
|
112
|
+
|
|
113
|
+
#### For tasks that create or modify API endpoints, also include:
|
|
114
|
+
- **Validation:** [Required fields, input limits, format constraints (e.g. "IMEI must be exactly 15 digits")]
|
|
115
|
+
- **Error UX:** [What the user sees when this operation fails (e.g. "toast.error with message", "inline error under field")]
|
|
101
116
|
|
|
102
117
|
### Task 2: [Action verb + what]
|
|
103
|
-
[Same structure — all 6 fields
|
|
118
|
+
[Same structure — all 6 required fields, plus optional Time-box]
|
|
104
119
|
|
|
105
120
|
[Continue for all tasks...]
|
|
106
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
|
+
|
|
133
|
+
## Test Tasks
|
|
134
|
+
|
|
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.
|
|
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
|
+
|
|
107
139
|
## Validation Checklist
|
|
108
140
|
|
|
109
141
|
Run in this order — do not proceed if a level fails:
|
|
110
142
|
|
|
111
143
|
- [ ] **Level 1 — Lint & Format:** `[project lint command]`
|
|
112
144
|
- [ ] **Level 2 — Type Check:** `[project type check command]`
|
|
145
|
+
- [ ] **Level 2.5 — Code Review:** Run `/hopla-code-review` on changed files
|
|
113
146
|
- [ ] **Level 3 — Unit Tests:** `[project unit test command]`
|
|
114
147
|
- [ ] **Level 4 — Integration Tests:** `[project integration test or manual curl/check]`
|
|
115
148
|
- [ ] **Level 5 — Human Review:** Verify behavior matches requirements above
|
|
@@ -119,6 +152,18 @@ Run in this order — do not proceed if a level fails:
|
|
|
119
152
|
- [ ] [Specific, testable criterion]
|
|
120
153
|
- [ ] [Specific, testable criterion]
|
|
121
154
|
|
|
155
|
+
## Confidence Score: __/10
|
|
156
|
+
|
|
157
|
+
- **Strengths:** [What is clear and well-understood]
|
|
158
|
+
- **Uncertainties:** [What might change or is not fully known]
|
|
159
|
+
- **Mitigations:** [How uncertainties will be handled]
|
|
160
|
+
|
|
161
|
+
Scoring guide:
|
|
162
|
+
- 10: Everything is clear, patterns exist, no unknowns
|
|
163
|
+
- 7-9: Minor unknowns but mitigations identified
|
|
164
|
+
- 4-6: Significant unknowns or missing patterns
|
|
165
|
+
- 1-3: High risk, major assumptions unverified
|
|
166
|
+
|
|
122
167
|
## Notes for Executing Agent
|
|
123
168
|
[Any important context, warnings, or decisions made during planning that the executing agent needs to know]
|
|
124
169
|
```
|
|
@@ -136,6 +181,13 @@ Before saving the draft, review the plan against these criteria:
|
|
|
136
181
|
- [ ] No ambiguous requirements left unresolved
|
|
137
182
|
- [ ] **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
183
|
- [ ] **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"
|
|
184
|
+
- [ ] **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)
|
|
185
|
+
- [ ] **Test coverage:** At least one task creates or updates tests — or a justification is provided for why tests are not applicable
|
|
186
|
+
- [ ] **User preferences checked:** MEMORY.md was consulted for UI preferences (modal vs inline, keyboard shortcuts, component conventions) that affect the plan
|
|
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
|
|
139
191
|
|
|
140
192
|
## Phase 7: Save Draft and Enter Review Loop
|
|
141
193
|
|
|
@@ -164,4 +216,4 @@ Before saving the draft, review the plan against these criteria:
|
|
|
164
216
|
|
|
165
217
|
**Finalize:**
|
|
166
218
|
1. Rename `.agents/plans/[feature-name].draft.md` → `.agents/plans/[feature-name].md` (overwrite if it already exists)
|
|
167
|
-
2. Confirm: "✅ Plan saved to `.agents/plans/[feature-name].md`. Run `/hopla-
|
|
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."
|
|
@@ -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: "All caught up — what are we working on today?"
|
|
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
|
|
16
|
+
Do NOT reproduce the full plan. Instead, present a structured summary:
|
|
15
17
|
|
|
16
18
|
**Plan: [Feature Name]**
|
|
17
19
|
|
|
@@ -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
|
|
@@ -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.
|
|
@@ -3,6 +3,8 @@ name: hopla-code-review
|
|
|
3
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,6 +3,8 @@ 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
|
|
@@ -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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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.
|
|
@@ -3,6 +3,8 @@ name: hopla-prime
|
|
|
3
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: "All caught up — what are we working on today?"
|
|
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.
|