@hopla/claude-setup 1.10.2 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/.claude-plugin/marketplace.json +20 -0
  2. package/.claude-plugin/plugin.json +23 -0
  3. package/README.md +137 -30
  4. package/agents/code-reviewer.md +62 -0
  5. package/agents/codebase-researcher.md +41 -0
  6. package/agents/system-reviewer.md +64 -0
  7. package/cli.js +45 -14
  8. package/commands/guides/ai-optimized-codebase.md +70 -0
  9. package/commands/guides/hooks-reference.md +82 -0
  10. package/commands/guides/mcp-integration.md +32 -0
  11. package/commands/guides/remote-coding.md +70 -0
  12. package/commands/guides/scaling-beyond-engineering.md +54 -0
  13. package/commands/guides/write-skill.md +78 -0
  14. package/{files/commands → commands}/hopla-code-review-fix.md +8 -0
  15. package/commands/hopla-end-to-end.md +67 -0
  16. package/{files/commands → commands}/hopla-execute.md +2 -0
  17. package/commands/hopla-guide.md +61 -0
  18. package/{files/commands → commands}/hopla-plan-feature.md +2 -0
  19. package/commands/hopla-rca.md +64 -0
  20. package/{files/commands → commands}/hopla-validate.md +5 -0
  21. package/{files/CLAUDE.md → global-rules.md} +45 -0
  22. package/hooks/hooks.json +40 -0
  23. package/{files/hooks → hooks}/session-prime.js +13 -0
  24. package/package.json +7 -2
  25. package/skills/hopla-brainstorm/SKILL.md +89 -0
  26. package/{files/skills → skills}/hopla-code-review/SKILL.md +2 -1
  27. package/skills/hopla-debug/SKILL.md +73 -0
  28. package/{files/skills → skills}/hopla-execution-report/SKILL.md +3 -1
  29. package/{files/skills → skills}/hopla-git/SKILL.md +1 -1
  30. package/skills/hopla-parallel-dispatch/SKILL.md +69 -0
  31. package/{files/skills → skills}/hopla-prime/SKILL.md +3 -1
  32. package/skills/hopla-subagent-execution/SKILL.md +70 -0
  33. package/skills/hopla-tdd/SKILL.md +73 -0
  34. package/skills/hopla-verify/SKILL.md +64 -0
  35. package/skills/hopla-worktree/SKILL.md +73 -0
  36. /package/{files/commands → commands}/guides/data-audit.md +0 -0
  37. /package/{files/commands → commands}/guides/review-checklist.md +0 -0
  38. /package/{files/commands → commands}/hopla-create-prd.md +0 -0
  39. /package/{files/commands → commands}/hopla-git-commit.md +0 -0
  40. /package/{files/commands → commands}/hopla-git-pr.md +0 -0
  41. /package/{files/commands → commands}/hopla-init-project.md +0 -0
  42. /package/{files/commands → commands}/hopla-review-plan.md +0 -0
  43. /package/{files/commands → commands}/hopla-system-review.md +0 -0
  44. /package/{files/hooks → hooks}/env-protect.js +0 -0
  45. /package/{files/hooks → hooks}/tsc-check.js +0 -0
  46. /package/{files/skills → skills}/hopla-git/commit.md +0 -0
  47. /package/{files/skills → skills}/hopla-git/pr.md +0 -0
package/cli.js CHANGED
@@ -19,7 +19,8 @@ const CLAUDE_DIR = path.join(os.homedir(), ".claude");
19
19
  const COMMANDS_DIR = path.join(CLAUDE_DIR, "commands");
20
20
  const SKILLS_DIR = path.join(CLAUDE_DIR, "skills");
21
21
  const HOOKS_DIR = path.join(CLAUDE_DIR, "hooks");
22
- const FILES_DIR = path.join(import.meta.dirname, "files");
22
+ const AGENTS_DIR = path.join(CLAUDE_DIR, "agents");
23
+ const REPO_ROOT = import.meta.dirname;
23
24
 
24
25
  const GREEN = "\x1b[32m";
25
26
  const RED = "\x1b[31m";
@@ -72,12 +73,12 @@ function removeFile(dest, label) {
72
73
  async function uninstall() {
73
74
  log(`\n${BOLD}@hopla/claude-setup${RESET} — Uninstall\n`);
74
75
 
75
- const srcEntries = fs.readdirSync(path.join(FILES_DIR, "commands"));
76
+ const srcEntries = fs.readdirSync(path.join(REPO_ROOT, "commands"));
76
77
  const srcFiles = srcEntries.filter((f) =>
77
- fs.statSync(path.join(FILES_DIR, "commands", f)).isFile()
78
+ fs.statSync(path.join(REPO_ROOT, "commands", f)).isFile()
78
79
  );
79
80
  const srcDirs = srcEntries.filter((f) =>
80
- fs.statSync(path.join(FILES_DIR, "commands", f)).isDirectory()
81
+ fs.statSync(path.join(REPO_ROOT, "commands", f)).isDirectory()
81
82
  );
82
83
 
83
84
  // Also include any hopla-* files in ~/.claude/commands/ not in current source
@@ -107,10 +108,13 @@ async function uninstall() {
107
108
  })),
108
109
  ];
109
110
 
110
- // Also remove skills and hooks installed by hopla
111
+ // Also remove skills, agents, and hooks installed by hopla
111
112
  if (fs.existsSync(SKILLS_DIR)) {
112
113
  itemsToRemove.push({ dest: SKILLS_DIR, label: "~/.claude/skills/", isDir: true });
113
114
  }
115
+ if (fs.existsSync(AGENTS_DIR)) {
116
+ itemsToRemove.push({ dest: AGENTS_DIR, label: "~/.claude/agents/", isDir: true });
117
+ }
114
118
  if (fs.existsSync(HOOKS_DIR)) {
115
119
  itemsToRemove.push({ dest: HOOKS_DIR, label: "~/.claude/hooks/", isDir: true });
116
120
  }
@@ -167,6 +171,7 @@ const PLANNING_COMMANDS = [
167
171
  "hopla-review-plan.md",
168
172
  "hopla-git-commit.md",
169
173
  "hopla-git-pr.md",
174
+ "hopla-guide.md",
170
175
  ];
171
176
 
172
177
  async function install() {
@@ -178,14 +183,14 @@ async function install() {
178
183
  fs.mkdirSync(COMMANDS_DIR, { recursive: true });
179
184
 
180
185
  // Determine which command files will be installed
181
- const allCommandEntries = fs.readdirSync(path.join(FILES_DIR, "commands"));
186
+ const allCommandEntries = fs.readdirSync(path.join(REPO_ROOT, "commands"));
182
187
  const allCommandFiles = allCommandEntries.filter((f) => {
183
188
  if (f.startsWith(".")) return false;
184
- const stat = fs.statSync(path.join(FILES_DIR, "commands", f));
189
+ const stat = fs.statSync(path.join(REPO_ROOT, "commands", f));
185
190
  return stat.isFile();
186
191
  });
187
192
  const allCommandDirs = allCommandEntries.filter((f) => {
188
- const stat = fs.statSync(path.join(FILES_DIR, "commands", f));
193
+ const stat = fs.statSync(path.join(REPO_ROOT, "commands", f));
189
194
  return stat.isDirectory();
190
195
  });
191
196
  const commandFiles = PLANNING
@@ -197,7 +202,7 @@ async function install() {
197
202
 
198
203
  log(`${CYAN}Installing global rules...${RESET}`);
199
204
  await installFile(
200
- path.join(FILES_DIR, "CLAUDE.md"),
205
+ path.join(REPO_ROOT, "global-rules.md"),
201
206
  path.join(CLAUDE_DIR, "CLAUDE.md"),
202
207
  "~/.claude/CLAUDE.md"
203
208
  );
@@ -205,14 +210,14 @@ async function install() {
205
210
  log(`\n${CYAN}Installing commands...${RESET}`);
206
211
  for (const file of commandFiles.sort()) {
207
212
  await installFile(
208
- path.join(FILES_DIR, "commands", file),
213
+ path.join(REPO_ROOT, "commands", file),
209
214
  path.join(COMMANDS_DIR, file),
210
215
  `~/.claude/commands/${file}`
211
216
  );
212
217
  }
213
218
  // Install subdirectories (e.g. guides/)
214
219
  for (const dir of allCommandDirs.sort()) {
215
- const srcDir = path.join(FILES_DIR, "commands", dir);
220
+ const srcDir = path.join(REPO_ROOT, "commands", dir);
216
221
  const destDir = path.join(COMMANDS_DIR, dir);
217
222
  fs.mkdirSync(destDir, { recursive: true });
218
223
  for (const file of fs.readdirSync(srcDir).sort()) {
@@ -237,14 +242,15 @@ async function install() {
237
242
 
238
243
  await setupPermissions();
239
244
  await installSkills();
245
+ await installAgents();
240
246
  await installHooks();
241
247
  }
242
248
 
243
249
  // Skills to install in planning mode (subset)
244
- const PLANNING_SKILLS = ["hopla-prime"];
250
+ const PLANNING_SKILLS = ["hopla-prime", "hopla-brainstorm"];
245
251
 
246
252
  async function installSkills() {
247
- const skillsSrcDir = path.join(FILES_DIR, "skills");
253
+ const skillsSrcDir = path.join(REPO_ROOT, "skills");
248
254
  if (!fs.existsSync(skillsSrcDir)) return;
249
255
 
250
256
  fs.mkdirSync(SKILLS_DIR, { recursive: true });
@@ -279,8 +285,33 @@ async function installSkills() {
279
285
  }
280
286
  }
281
287
 
288
+ async function installAgents() {
289
+ const agentsSrcDir = path.join(REPO_ROOT, "agents");
290
+ if (!fs.existsSync(agentsSrcDir)) return;
291
+
292
+ fs.mkdirSync(AGENTS_DIR, { recursive: true });
293
+
294
+ const agentFiles = fs.readdirSync(agentsSrcDir).filter((f) => f.endsWith(".md"));
295
+ if (agentFiles.length === 0) return;
296
+
297
+ log(`\n${CYAN}Installing agents...${RESET}`);
298
+ for (const file of agentFiles.sort()) {
299
+ await installFile(
300
+ path.join(agentsSrcDir, file),
301
+ path.join(AGENTS_DIR, file),
302
+ `~/.claude/agents/${file}`
303
+ );
304
+ }
305
+
306
+ log(`\n${GREEN}${BOLD}Agents installed!${RESET} Available for use:\n`);
307
+ for (const file of agentFiles.sort()) {
308
+ const name = file.replace(".md", "");
309
+ log(` ${CYAN}${name}${RESET}`);
310
+ }
311
+ }
312
+
282
313
  async function installHooks() {
283
- const hooksSrcDir = path.join(FILES_DIR, "hooks");
314
+ const hooksSrcDir = path.join(REPO_ROOT, "hooks");
284
315
  if (!fs.existsSync(hooksSrcDir)) return;
285
316
 
286
317
  const hookFiles = fs.readdirSync(hooksSrcDir).filter((f) => f.endsWith(".js"));
@@ -0,0 +1,70 @@
1
+ # AI-Optimized Codebase Guide
2
+
3
+ ## When to Use This Guide
4
+ Reference this guide when initializing a project with `/hopla-init-project` or when optimizing an existing codebase for better AI-assisted development.
5
+
6
+ ## Principles
7
+
8
+ ### 1. Vertical Slice Architecture
9
+ Organize code by feature, not by layer:
10
+ ```
11
+ src/
12
+ ├── core/ # Universal infrastructure (config, database, logging)
13
+ ├── shared/ # Code used by 3+ features (the "three-feature rule")
14
+ └── features/ # Independent vertical slices
15
+ ├── auth/ # routes + service + models + tests
16
+ ├── products/ # routes + service + models + tests
17
+ └── orders/ # routes + service + models + tests
18
+ ```
19
+
20
+ **Why**: AI can load an entire feature in one context window. Layer-based organization scatters context across many files.
21
+
22
+ ### 2. LLM-Friendly Docstrings
23
+ Write docstrings that help AI understand code:
24
+ ```typescript
25
+ /**
26
+ * PURPOSE: Calculate total order cost including tax and discounts
27
+ * INPUTS: items (OrderItem[]), taxRate (number), discount? (Discount)
28
+ * OUTPUTS: { subtotal, tax, discount, total } (all in cents)
29
+ * GOTCHA: All monetary values are in cents to avoid floating point issues
30
+ * EXAMPLE: calculateTotal([{price: 1000, qty: 2}], 0.08) → {subtotal: 2000, tax: 160, total: 2160}
31
+ */
32
+ ```
33
+
34
+ ### 3. Structured Logging
35
+ Use JSON-structured logs with context for AI parsing:
36
+ ```typescript
37
+ logger.info("order_created", {
38
+ correlation_id: req.id,
39
+ order_id: order.id,
40
+ items_count: items.length,
41
+ total_cents: total,
42
+ duration_ms: Date.now() - start
43
+ });
44
+ ```
45
+
46
+ **Never**: Log sensitive data, use string formatting, spam in loops
47
+
48
+ ### 4. Strict Type Safety
49
+ - Enable strict TypeScript (`strict: true` in tsconfig)
50
+ - For Python: use mypy (strict) + pyright
51
+ - Types serve as contracts that AI can read and follow
52
+
53
+ ### 5. Comprehensive Validation Commands
54
+ Include in CLAUDE.md:
55
+ ```markdown
56
+ ## Development Commands
57
+ - `npm run lint` — ESLint check
58
+ - `npm run typecheck` — TypeScript strict check
59
+ - `npm run test` — Unit tests
60
+ - `npm run test:integration` — Integration tests
61
+ - `npm run dev` — Development server
62
+ ```
63
+
64
+ ### 6. Test Structure Mirrors Source
65
+ ```
66
+ src/features/auth/auth.service.ts
67
+ src/features/auth/__tests__/auth.service.test.ts
68
+ ```
69
+
70
+ AI can find tests by convention, no configuration needed.
@@ -0,0 +1,82 @@
1
+ # Hooks Reference Guide
2
+
3
+ ## When to Use This Guide
4
+ Reference this guide when creating custom hooks or troubleshooting existing ones.
5
+
6
+ ## Hook Types
7
+
8
+ | Hook | When It Fires | Can Block? | Use For |
9
+ |------|---------------|------------|---------|
10
+ | PreToolUse | Before any tool call | Yes (exit 2) | Blocking dangerous operations |
11
+ | PostToolUse | After any tool call | No | Feedback, auto-formatting, validation |
12
+ | Notification | When Claude needs permission or after 60s inactivity | No | Custom notifications |
13
+ | Stop | When Claude finishes responding | No | Post-response automation |
14
+ | SubagentStop | When a subagent finishes | No | Subagent result processing |
15
+ | PreCompact | Before /compact operation | No | Saving context before compaction |
16
+ | UserPromptSubmit | When user submits a prompt | Yes (exit 2) | Input validation, routing |
17
+ | SessionStart | When session begins | No | Context loading, setup |
18
+ | SessionEnd | When session ends | No | Cleanup, logging |
19
+
20
+ ## Hook Configuration
21
+
22
+ Hooks are configured in settings.json (global, project, or local):
23
+
24
+ ```json
25
+ {
26
+ "hooks": {
27
+ "PreToolUse": [
28
+ {
29
+ "matcher": "Read|Grep",
30
+ "hooks": [
31
+ {
32
+ "type": "command",
33
+ "command": "/absolute/path/to/hook.js"
34
+ }
35
+ ]
36
+ }
37
+ ]
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## Hook Input (stdin JSON)
43
+
44
+ ```json
45
+ {
46
+ "session_id": "...",
47
+ "transcript_path": "...",
48
+ "hook_event_name": "PreToolUse",
49
+ "tool_name": "Read",
50
+ "tool_input": {
51
+ "file_path": "/code/.env"
52
+ }
53
+ }
54
+ ```
55
+
56
+ ## Exit Codes
57
+ - `0` — Allow operation to proceed
58
+ - `2` — Block operation (PreToolUse only)
59
+ - Stderr output → shown to Claude as feedback when blocking
60
+
61
+ ## Security Best Practices
62
+ - **ALWAYS use absolute paths** for hook scripts (prevents path hijacking)
63
+ - Use `$PWD` placeholders in version control, replace with absolute paths on setup
64
+ - Never run hooks from user-writable directories without verification
65
+
66
+ ## Debugging Hooks
67
+
68
+ Log all hook data to inspect the structure:
69
+ ```json
70
+ "PostToolUse": [{
71
+ "matcher": "*",
72
+ "hooks": [{
73
+ "type": "command",
74
+ "command": "jq . > /tmp/hook-debug.json"
75
+ }]
76
+ }]
77
+ ```
78
+
79
+ ## HOPLA Installed Hooks
80
+ - **tsc-check.js** (PostToolUse): Runs TypeScript type checking after file edits
81
+ - **env-protect.js** (PreToolUse): Blocks reads of .env files
82
+ - **session-prime.js** (SessionStart): Provides project context at session start
@@ -0,0 +1,32 @@
1
+ # MCP Integration Guide
2
+
3
+ ## When to Use This Guide
4
+ Reference this guide when planning features that involve external tools or services available via MCP.
5
+
6
+ ## MCP in the PIV Loop
7
+
8
+ ### During Planning (`/hopla-plan-feature`)
9
+ - Check what MCP servers are configured (listed in CLAUDE.md under "MCP Servers")
10
+ - For each external integration point, specify which MCP tool to use
11
+ - Example: "Step 3: Use Playwright MCP to verify the component renders correctly"
12
+
13
+ ### During Execution (`/hopla-execute`)
14
+ - Before starting, verify MCP servers are available and responsive
15
+ - When a task involves an MCP tool, use it explicitly (don't fall back to manual alternatives)
16
+ - If an MCP server is unavailable, document it and skip that validation step
17
+
18
+ ### During Validation (`/hopla-validate`)
19
+ - Use Playwright MCP for E2E browser validation if configured
20
+ - Use database MCPs to verify data state after migrations
21
+ - Document which validations were done via MCP vs. manual
22
+
23
+ ## Common MCP Patterns
24
+ - **Playwright**: Browser automation for E2E testing and visual verification
25
+ - **Database (Supabase, D1, etc.)**: Schema management, data verification
26
+ - **API testing**: Endpoint verification, response validation
27
+ - **File systems**: Cross-system file operations
28
+
29
+ ## Adding MCP to Your Project
30
+ 1. Configure MCP servers in `.claude/settings.json` or `.claude/settings.local.json`
31
+ 2. List them in your project's CLAUDE.md under the "MCP Servers" section
32
+ 3. Pre-approve permissions in settings to avoid repeated prompts
@@ -0,0 +1,70 @@
1
+ # Remote Agentic Coding Guide (Future)
2
+
3
+ ## When to Use This Guide
4
+ Reference this guide when setting up GitHub-based automation for remote code generation.
5
+
6
+ ## Overview
7
+
8
+ Remote agentic coding moves AI-assisted development from your local terminal to GitHub, enabling:
9
+ - Issue-driven development (create issue → agent implements → PR created)
10
+ - Automated code review on PRs
11
+ - Release note generation from commit history
12
+ - Parallel feature development across multiple agents
13
+
14
+ ## Three Autonomy Levels
15
+
16
+ ### Level 1: Hybrid (Recommended Starting Point)
17
+ - **Agent**: Creates branch, implements, comments on issue
18
+ - **Human**: Reviews PR, makes final decision to merge
19
+ - **Setup**: GitHub Actions + Claude Code CLI
20
+
21
+ ### Level 2: Autonomous
22
+ - **Agent**: Everything including PR creation and merge
23
+ - **Human**: Only monitors
24
+ - **Setup**: GitHub Actions + full permissions
25
+
26
+ ### Level 3: Deterministic
27
+ - **Workflow**: Controls process (branch creation, PR management)
28
+ - **Agent**: Only responsible for code changes
29
+ - **Setup**: Strict GitHub Actions workflow
30
+
31
+ ## GitHub Actions Workflow (Level 1)
32
+
33
+ ```yaml
34
+ name: Claude Code Agent
35
+ on:
36
+ issues:
37
+ types: [assigned]
38
+ issue_comment:
39
+ types: [created]
40
+
41
+ jobs:
42
+ agent:
43
+ if: contains(github.event.comment.body, '@claude')
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v4
47
+ - name: Run Claude Code
48
+ env:
49
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
50
+ run: |
51
+ npx claude-code --print "
52
+ Read issue #${{ github.event.issue.number }}.
53
+ /hopla-plan-feature based on the issue requirements.
54
+ /hopla-execute the plan.
55
+ /hopla-validate
56
+ Create a PR with the results.
57
+ "
58
+ ```
59
+
60
+ ## Prerequisites
61
+ - HOPLA commands installed in the repo (.claude/commands/)
62
+ - CLAUDE.md configured for the project
63
+ - GitHub Actions enabled
64
+ - Claude Code API key in GitHub Secrets
65
+
66
+ ## Best Practices
67
+ - Start with Level 1 (hybrid) until you trust the system
68
+ - Always require human PR review
69
+ - Use conventional commits for automated changelog generation
70
+ - Set up branch protection rules to prevent direct merges
@@ -0,0 +1,54 @@
1
+ # Scaling Agentic Coding Beyond Engineering
2
+
3
+ ## When to Use This Guide
4
+ Reference this guide when expanding HOPLA usage to non-technical team members.
5
+
6
+ ## The Opportunity
7
+
8
+ According to Anthropic's 2026 Agentic Coding Trends Report:
9
+ - Non-technical teams (legal, sales, marketing, ops) are building their own solutions
10
+ - The barrier between "people who code" and "people who don't" is becoming permeable
11
+ - Domain experts implementing solutions directly removes bottlenecks
12
+
13
+ ## HOPLA's Planning Mode
14
+
15
+ HOPLA already supports non-technical users via `--planning` mode:
16
+ - Restricted command set (planning and review only)
17
+ - Limited git permissions (read-only)
18
+ - Focus on product decisions, not implementation
19
+
20
+ ## Expanding the Model
21
+
22
+ ### Phase 1: Product Planning (Current)
23
+ Non-technical users can:
24
+ - Create PRDs with `/hopla-create-prd`
25
+ - Plan features with `/hopla-plan-feature`
26
+ - Review plans with `/hopla-review-plan`
27
+ - Guide workflow with `/hopla-guide` (4D Framework)
28
+
29
+ ### Phase 2: Assisted Creation (Future)
30
+ Non-technical users could:
31
+ - Create simple automations with guided workflows
32
+ - Generate reports from existing data
33
+ - Build simple dashboards with AI assistance
34
+ - Create documentation from templates
35
+
36
+ ### Phase 3: Domain Expert Development (Future)
37
+ Domain experts could:
38
+ - Implement domain-specific logic with AI guidance
39
+ - Create and modify business rules
40
+ - Build prototype interfaces
41
+ - Automate repetitive workflows
42
+
43
+ ## The 4D Framework for Non-Technical Users
44
+
45
+ 1. **Description**: Communicate clearly what you need (context-rich prompts)
46
+ 2. **Discernment**: Evaluate critically what the AI produces
47
+ 3. **Delegation**: Choose what AI handles vs. what you handle
48
+ 4. **Diligence**: Take responsibility for outputs, test before deploying
49
+
50
+ ## Success Metrics
51
+ - Time to first productive output for new non-technical users
52
+ - Quality of plans produced (review scores)
53
+ - Reduction in engineer bottleneck for planning tasks
54
+ - User satisfaction and confidence scores
@@ -0,0 +1,78 @@
1
+ # Writing Skills Guide (Internal)
2
+
3
+ ## When to Use This Guide
4
+ Reference this guide when creating new skills for the HOPLA system.
5
+
6
+ ## Skill Structure
7
+
8
+ ```
9
+ skill-name/
10
+ ├── SKILL.md (< 500 lines, main instructions)
11
+ ├── scripts/ (executable code — only output consumes tokens)
12
+ ├── references/ (detailed docs, loaded on-demand)
13
+ └── assets/ (templates, data files)
14
+ ```
15
+
16
+ ## SKILL.md Format
17
+
18
+ ```yaml
19
+ ---
20
+ name: skill-name
21
+ description: "100-150 words. Start with what it does, then 'Use when...' + specific triggers. End with 'Do NOT use for...' anti-triggers."
22
+ allowed-tools: Read, Grep, Glob, Bash # Optional: restrict tools
23
+ model: sonnet # Optional: force specific model
24
+ ---
25
+ ```
26
+
27
+ ## Writing Effective Descriptions
28
+
29
+ The description is the MOST CRITICAL field — it determines when the skill activates.
30
+
31
+ ### Pattern
32
+ ```
33
+ [What the skill does]. Use when [trigger phrases, synonyms, variations in English and Spanish]. Do NOT use for [anti-triggers].
34
+ ```
35
+
36
+ ### Good Example
37
+ ```
38
+ "Technical code review on changed files. Use when the user says 'review code', 'code review', 'check my code', 'review changes', 'look for bugs', or 'audit code'. Do NOT use for reviewing plans or documents — only code."
39
+ ```
40
+
41
+ ### Bad Example
42
+ ```
43
+ "A skill for reviewing things."
44
+ ```
45
+
46
+ ## Claude Search Optimization (CSO)
47
+
48
+ Claude uses SEMANTIC matching, not keyword matching. Cover:
49
+ - Different phrasings of the same intent
50
+ - English AND Spanish triggers (for HOPLA's bilingual users)
51
+ - Common misspellings or abbreviations
52
+ - Related verbs and nouns
53
+
54
+ ## Testing Skills
55
+
56
+ Before shipping a new skill:
57
+ 1. **Pressure test**: Does it activate when it should?
58
+ 2. **Negative test**: Does it NOT activate when it shouldn't?
59
+ 3. **Conflict test**: Does it conflict with existing skills?
60
+ 4. **Content test**: Are the instructions clear enough for the agent to follow?
61
+
62
+ ## Rationalization Tables
63
+
64
+ For skills that enforce discipline (like TDD or verification), include a table of common excuses:
65
+
66
+ | Rationalization | Counter |
67
+ |----------------|---------|
68
+ | "I'll do it later" | No. Do it now. Later means never. |
69
+ | "This is too simple" | Simple things grow complex. Document intent. |
70
+
71
+ ## Progressive Disclosure
72
+
73
+ Keep SKILL.md under 500 lines. If you need more:
74
+ - Put detailed reference material in `references/` subdirectory
75
+ - Put executable logic in `scripts/` subdirectory
76
+ - In SKILL.md, reference them: "When doing X, read references/x-guide.md"
77
+
78
+ Scripts are better than docs when possible — only the OUTPUT consumes tokens, not the script source.
@@ -19,6 +19,14 @@ If $1 is a description, treat it as the list of issues to fix.
19
19
 
20
20
  If $2 is provided, filter to only the issues within that scope.
21
21
 
22
+ ## Pre-Fix Verification
23
+
24
+ Before fixing each issue:
25
+ 1. **Verify the issue is real** — Read the actual code. Is this a genuine bug or a false positive?
26
+ 2. **Push back if needed** — If an issue is not real, document WHY it's a false positive instead of "fixing" it
27
+ 3. **YAGNI check** — Does the suggested fix add unnecessary complexity? If the fix introduces code that isn't needed for current requirements, skip it and document the reason
28
+ 4. **Never use performative agreement** — Don't say "You're absolutely right!" before verifying. Check the codebase first, then respond.
29
+
22
30
  ## Step 2: Fix Issues One by One
23
31
 
24
32
  For each issue, in order of severity (critical → high → medium → low):
@@ -0,0 +1,67 @@
1
+ # End-to-End Feature Implementation
2
+
3
+ > Execute the complete PIV loop for a feature in one go: prime → brainstorm → plan → review → execute → validate → commit.
4
+
5
+ > ⚠️ **Advanced**: Only use this command after you've proven each individual command works reliably. Build trust gradually.
6
+
7
+ ## Input
8
+ - `$ARGUMENTS`: Feature description or requirement
9
+
10
+ ## Autonomy Levels
11
+
12
+ This command represents **Level 3 autonomy**. Make sure you've mastered:
13
+ - Level 1: Manual prompts (writing everything each time)
14
+ - Level 2: Individual commands (/hopla-plan-feature, /hopla-execute, etc.)
15
+ - Level 3: Command chaining (this command)
16
+
17
+ ## Process
18
+
19
+ ### Phase 1: Context Loading
20
+ Load project context:
21
+ - Read CLAUDE.md, README, package.json
22
+ - Check git state (branch, status, pending plans)
23
+ - Identify current development phase
24
+
25
+ ### Phase 2: Brainstorm (if needed)
26
+ If the feature is non-trivial (estimated > 1 hour):
27
+ - Explore 2-3 approaches with trade-offs
28
+ - Get user approval on approach
29
+ - Save design doc to `.agents/specs/`
30
+
31
+ If trivial: skip to Phase 3.
32
+
33
+ ### Phase 3: Plan
34
+ - Research codebase for related patterns
35
+ - Generate structured implementation plan
36
+ - Save to `.agents/plans/[feature-name].md`
37
+
38
+ ### 🔒 GATE: Plan Review
39
+ **STOP and present the plan to the user.**
40
+ - Show executive summary
41
+ - Wait for explicit approval before proceeding
42
+ - If changes requested: iterate on the plan
43
+
44
+ ### Phase 4: Execute
45
+ - Create feature branch (`feature/[name]` from develop)
46
+ - Execute all plan tasks sequentially
47
+ - Validate after each phase boundary
48
+
49
+ ### Phase 5: Validate
50
+ - Run full validation pyramid (lint → types → tests → integration)
51
+ - Run code review
52
+ - Fix any critical/important issues found
53
+
54
+ ### 🔒 GATE: Human Review
55
+ **STOP and present results to the user.**
56
+ - Show what was built, what was validated
57
+ - Wait for approval before committing
58
+
59
+ ### Phase 6: Commit & PR
60
+ - Create conventional commit(s)
61
+ - Suggest creating a PR if on a feature branch
62
+
63
+ ## Rules
64
+ - Never skip the human gates (plan review, final review)
65
+ - If any phase fails, stop and report — don't push through
66
+ - Each phase should feel like a natural conversation, not a script
67
+ - Adapt: skip brainstorming for small features, skip PR for hotfixes
@@ -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
+ > 💡 **Tip**: For complex tasks with intricate logic, consider using Extended Thinking mode for better reasoning quality.
7
+
6
8
  > 🌐 **Language:** All user-facing output must match the user's language. Code, paths, and commands stay in English.
7
9
 
8
10
  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.
@@ -0,0 +1,61 @@
1
+ # HOPLA Guide for Non-Technical Users
2
+
3
+ > A guided framework for working effectively with your AI coding assistant.
4
+
5
+ ## The 4D Framework
6
+
7
+ ### 📝 Description — Communicate Clearly
8
+ Tell the AI what you need with rich context:
9
+ - What problem are you solving?
10
+ - Who is the user/audience?
11
+ - What does success look like?
12
+ - What constraints exist (budget, timeline, tech)?
13
+
14
+ **Tip**: The more specific you are, the better the output. "Add a login page" → "Add a login page with email/password, Google OAuth, and a forgot password flow that matches our brand colors."
15
+
16
+ ### 🔍 Discernment — Evaluate Critically
17
+ Don't accept AI output at face value:
18
+ - Does this match what you asked for?
19
+ - Does it make sense for your users?
20
+ - Is the quality acceptable?
21
+ - Would you be comfortable showing this to stakeholders?
22
+
23
+ **Tip**: Ask the AI to explain its reasoning. If you don't understand the explanation, ask for a simpler one.
24
+
25
+ ### 🤝 Delegation — Choose What AI Does vs. You
26
+ Three categories for every task:
27
+
28
+ | Category | Examples |
29
+ |----------|---------|
30
+ | **AI handles** | Writing boilerplate, research, first drafts, data analysis |
31
+ | **AI assists, you review** | Feature plans, PRDs, code reviews, documentation |
32
+ | **You handle** | Final decisions, stakeholder communication, business strategy |
33
+
34
+ ### ✅ Diligence — Take Responsibility
35
+ - **Creation diligence**: Verify outputs before sharing
36
+ - **Deployment diligence**: Test before using in production
37
+ - **Transparency diligence**: Document when AI was used
38
+
39
+ ## Your Available Commands
40
+
41
+ ### For Planning & Product
42
+ - `/hopla-create-prd` — Create a Product Requirements Document through guided conversation
43
+ - `/hopla-plan-feature` — Create an implementation plan (AI researches, you approve)
44
+ - `/hopla-review-plan` — Review a plan before execution
45
+
46
+ ### For Oversight
47
+ - `/hopla-system-review` — Analyze how well the AI followed the plan
48
+ - `/hopla-guide` — Show this guide again
49
+
50
+ ## Getting Started
51
+
52
+ 1. Start with `/hopla-create-prd` to define your project scope
53
+ 2. Use `/hopla-plan-feature "your feature idea"` to plan each feature
54
+ 3. Review the plan with `/hopla-review-plan`
55
+ 4. Hand off to a developer for execution, or ask the AI to execute
56
+
57
+ ## Tips for Better Results
58
+ - One request at a time — don't overload with multiple asks
59
+ - Be specific about what you want, not how to build it
60
+ - If the output isn't right, say what's wrong rather than starting over
61
+ - Use the review loop: the AI expects your feedback before proceeding