@hopla/claude-setup 1.9.0 → 1.10.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.
package/README.md CHANGED
@@ -101,7 +101,7 @@ After each PIV loop, run `/hopla-execution-report` + `/hopla-system-review` to f
101
101
 
102
102
  | Command | Description |
103
103
  |---|---|
104
- | `/hopla-init-project` | Initialize project CLAUDE.md and .agents/ structure |
104
+ | `/hopla-init-project` | Read PRD, recommend stack, create CLAUDE.md and .agents/ structure |
105
105
  | `/hopla-prime` | Load project context at the start of a session |
106
106
  | `/hopla-create-prd` | Create a Product Requirements Document through guided questions |
107
107
  | `/hopla-plan-feature` | Research codebase and create a structured implementation plan |
@@ -156,8 +156,8 @@ After each PIV loop, run `/hopla-execution-report` + `/hopla-system-review` to f
156
156
 
157
157
  ### Starting a new project
158
158
  ```
159
- /hopla-init-project creates CLAUDE.md + .agents/ structure
160
- /hopla-create-prd defines product scope (PRD.md)
159
+ /hopla-create-prd define what you're building (PRD.md)
160
+ /hopla-init-project reads PRD, recommends stack, creates CLAUDE.md + .agents/
161
161
  /hopla-git-commit → saves Layer 1 foundation to git
162
162
  ```
163
163
 
@@ -242,12 +242,12 @@ Features under consideration for future versions:
242
242
 
243
243
  ---
244
244
 
245
- ## Project Structure (after /hopla-init-project)
245
+ ## Project Structure (after /hopla-create-prd + /hopla-init-project)
246
246
 
247
247
  ```
248
248
  project/
249
- ├── CLAUDE.md ← Project-specific rules
250
249
  ├── PRD.md ← Product scope (from /hopla-create-prd)
250
+ ├── CLAUDE.md ← Project rules and stack (from /hopla-init-project)
251
251
  ├── .agents/
252
252
  │ ├── plans/ ← Implementation plans (commit these)
253
253
  │ ├── guides/ ← On-demand reference guides (commit these)
@@ -18,13 +18,53 @@ Before asking anything, check what already exists:
18
18
 
19
19
  If a `CLAUDE.md` already exists at the project root, tell the user and ask if they want to update it or start fresh.
20
20
 
21
- ## Step 2: Default Stack or Custom
21
+ ## Step 2: Understand the Product
22
22
 
23
- Present the **Hopla Default Stack** to the user:
23
+ Check if a `PRD.md` or `PRD.draft.md` exists in the project root.
24
24
 
25
- ```
26
- Hopla Default Stack:
25
+ ### Path A — PRD exists (recommended flow)
26
+
27
+ If a PRD is found, read it and extract:
28
+ - Product name and description
29
+ - Core features and capabilities
30
+ - Target users and usage patterns
31
+ - Technology preferences or constraints mentioned
32
+ - External integrations or services
33
+
34
+ Tell the user:
35
+ > "I found the PRD for [product name]. I'll use it to recommend the right stack for this project."
36
+
37
+ Then skip directly to **Step 3** (Recommend Stack).
38
+
39
+ ### Path B — No PRD found
40
+
41
+ Ask the user:
42
+ > "I don't see a PRD yet. Tell me about the project — what are you building? What does it do, who is it for, and what are the main things a user can do with it?"
43
+
44
+ Wait for the answer. If the description is too short or vague, ask **product-focused** follow-up questions like:
45
+ - "Who uses this — is it internal for your team, or for external customers?"
46
+ - "What's the main thing a user does when they open the app?"
47
+ - "Does it work with lists or tables of data? Like orders, products, users..."
48
+ - "Do users need to log in? Can anyone sign up, or is it invite-only?"
49
+ - "Does it need to talk to any external services or APIs?"
50
+ - "Is there anything that runs in the background — imports, syncs, notifications?"
51
+
52
+ **Do NOT ask technical questions.** The user describes the product; you infer the technical needs. For example:
53
+ - "dashboard with a list of orders" → needs AG Grid, backend API
54
+ - "users log in with Google" → needs Firebase Auth + JOSE
55
+ - "imports a CSV and processes it in the background" → needs Durable Objects
56
+ - "simple landing page with a contact form" → frontend only, no backend needed
57
+ - "shows charts and trends over time" → needs Recharts
27
58
 
59
+ Then proceed to **Step 3**.
60
+
61
+ ## Step 3: Recommend Stack
62
+
63
+ Based on the PRD or the user's description, evaluate against the **Hopla Default Stack** and present a recommendation.
64
+
65
+ ### Hopla Default Stack (baseline)
66
+
67
+ ```
28
68
  Frontend:
29
69
  - Language: TypeScript (strict: false)
30
70
  - UI Framework: React 19 + React Router 7
@@ -69,61 +109,64 @@ worker/
69
109
  │ └── types/ <- backend type definitions
70
110
  ```
71
111
 
72
- Ask the user:
73
- > "This is the Hopla default stack. Do you want to use it as-is, or would you prefer to customize it?"
112
+ ### How to present the recommendation
74
113
 
75
- **Option A — Use default:** Skip directly to Step 2.1 (ask only project name and any reference guides), then proceed to Step 3.
114
+ **If the default stack covers everything:**
115
+ > "Based on [the PRD / what you described], the Hopla default stack covers this project well. Here's what we'll use: [show stack]. Does this look good, or do you want to adjust anything?"
76
116
 
77
- **Option B Customize:** Proceed to Step 2.2 (full conversational discovery).
117
+ **If the default stack needs additions or removals:**
118
+ > "The default stack covers most of it, but based on your needs I'd recommend these changes: [list additions/removals with reasoning]. Here's the adjusted stack: [show modified stack]. Does this look good?"
78
119
 
79
- ### Step 2.1: Quick Setup (Default Stack)
120
+ Examples of adjustments:
121
+ - Project doesn't need data tables → remove AG Grid
122
+ - Project doesn't need auth → remove Firebase + JOSE
123
+ - Project doesn't need a backend → remove worker/, Hono, D1, KV, DO
124
+ - Project needs real-time/WebSockets → add Durable Objects
125
+ - Project needs file uploads → note Cloudflare R2
126
+ - Project needs charts → add Recharts
127
+ - Project needs i18n → add i18next + react-i18next
128
+ - Project needs a specific library the user mentioned → add it
80
129
 
81
- Ask only these minimal questions:
130
+ **If the project is fundamentally different from the default** (e.g. Python backend, mobile app, CLI tool):
131
+ > "This project doesn't fit the default stack. Let me ask a few questions to define the right stack for it."
132
+ Then proceed to the full conversational discovery (Step 3.1).
82
133
 
83
- 1. **Project name** What should I call this project?
84
- 2. **Project description** — One-line summary of what this project does.
85
- 3. **Reference Guides** (optional) — Are there specific task types that need step-by-step guidance? (e.g. "When adding a page", "When creating an API route"). If none, skip this — guides can always be added later.
134
+ ### Step 3.1: Full Conversational Discovery (only if default doesn't fit)
86
135
 
87
- Then proceed to Step 3 using the default stack values for all other fields.
136
+ Ask one topic at a time. Wait for each answer before continuing.
88
137
 
89
- ### Step 2.2: Custom Setup (Conversational Discovery)
138
+ **Topic A Tech Stack**
139
+ - What languages, frameworks, and key libraries?
140
+ - What versions matter?
141
+ - What package manager?
90
142
 
91
- Ask one topic at a time. Wait for each answer before continuing. For each topic, show the default value so the user can just confirm or override.
143
+ **Topic B Architecture**
144
+ - How is the project structured?
145
+ - What are the main layers or modules?
146
+ - Naming conventions for files and folders?
92
147
 
93
- **Topic ATech Stack** (default: TypeScript, React 19, Vite, Tailwind CSS 4, Shadcn UI, npm)
94
- - What languages, frameworks, and key libraries does this project use?
95
- - What versions matter? (e.g. Python 3.12, FastAPI 0.118, React 19)
96
- - What package manager? (npm, bun, uv, pip, etc.)
148
+ **Topic CCode Style**
149
+ - Naming conventions? TypeScript strict mode?
150
+ - Linting/formatting tools?
97
151
 
98
- **Topic BArchitecture** (default: modules-based under src/ + worker/)
99
- - How is the project structured? (e.g. layered, vertical slices, feature-based)
100
- - What are the main layers or modules? (e.g. routes -> services -> models)
101
- - Are there naming conventions for files and folders?
152
+ **Topic DTesting**
153
+ - Framework? Structure? Naming?
102
154
 
103
- **Topic CCode Style** (default: ESLint + Prettier, TypeScript strict: false)
104
- - Any strict naming conventions? (e.g. verbose fields like `product_id`, snake_case, camelCase)
105
- - TypeScript strict mode?
106
- - Linting/formatting tools and configs? (ESLint, Biome, Prettier, Ruff)
155
+ **Topic EDevelopment Commands**
156
+ - Dev server? Tests? Lint/format? Other key commands?
107
157
 
108
- **Topic DTesting** (default: Vitest)
109
- - Testing framework? (vitest, jest, pytest)
110
- - Test structure? (colocated, mirrors source, separate folder)
111
- - Any naming conventions for tests?
158
+ **Topic FReference Guides**
159
+ - Specific task types that need step-by-step guidance?
112
160
 
113
- **Topic E — Development Commands** (default: Vite + Wrangler scripts)
114
- - How do you run the dev server?
115
- - How do you run tests?
116
- - How do you lint/format?
117
- - Any other key commands the AI should know?
161
+ ## Step 4: Collect Project Info
118
162
 
119
- **Topic F Reference Guides**
120
- - Are there specific task types that need extra guidance?
121
- (e.g. "When adding an API endpoint", "When creating a React component")
122
- - For each task type identified: what are the exact steps? What files to follow as pattern? What pitfalls to avoid?
163
+ Once the stack is confirmed, ask only what's NOT already known from the PRD or conversation:
123
164
 
124
- Collect enough detail to write a full guide for each task type not just the name, but the actual patterns, file structure, and constraints.
165
+ 1. **Project name**skip if already in PRD
166
+ 2. **Project description** — skip if already in PRD
167
+ 3. **Reference Guides** (optional) — Are there specific task types that need step-by-step guidance? (e.g. "When adding a page", "When creating an API route"). If none, skip — guides can always be added later.
125
168
 
126
- ## Step 3: Generate CLAUDE.md
169
+ ## Step 5: Generate CLAUDE.md
127
170
 
128
171
  Save to `CLAUDE.md` at the project root. Use this structure:
129
172
 
@@ -274,9 +317,9 @@ This guide covers: [bullet list]
274
317
 
275
318
  **For custom stack projects**, fill in the values collected during Step 2.2 following the same structure.
276
319
 
277
- ## Step 3.5: Generate Reference Guides
320
+ ## Step 5.5: Generate Reference Guides
278
321
 
279
- For each task type identified (in Step 2.1 or Topic F), create a guide at `.agents/guides/[kebab-case-task-name].md`.
322
+ For each task type identified (in Step 4 or Step 3.1), create a guide at `.agents/guides/[kebab-case-task-name].md`.
280
323
 
281
324
  Use this template for every guide:
282
325
 
@@ -378,7 +421,7 @@ Read: `.agents/guides/feature-module.md`
378
421
  This guide covers: module structure, components, hooks, routing
379
422
  ```
380
423
 
381
- ## Step 4: Create .agents/ Structure
424
+ ## Step 6: Create .agents/ Structure
382
425
 
383
426
  Create the following directories (with `.gitkeep` where needed):
384
427
 
@@ -398,7 +441,7 @@ Add to `.gitignore` (create if it doesn't exist):
398
441
  .agents/system-reviews/
399
442
  ```
400
443
 
401
- ## Step 5: Create .claude/commands/ (optional but recommended)
444
+ ## Step 7: Create .claude/commands/ (optional but recommended)
402
445
 
403
446
  Create `.claude/commands/` at the project root for project-specific commands that override or extend the global ones.
404
447
 
@@ -422,7 +465,7 @@ Ask the user: "Do you want me to create a project-specific `/validate` command?"
422
465
 
423
466
  If yes, create `.claude/commands/validate.md`.
424
467
 
425
- ## Step 6: Confirm and Save
468
+ ## Step 8: Confirm and Save
426
469
 
427
470
  Show the draft `CLAUDE.md` to the user and ask:
428
471
  > "Does this accurately reflect the project's rules? Any corrections before I save it?"
@@ -431,5 +474,6 @@ Once confirmed:
431
474
  1. Save `CLAUDE.md` to the project root
432
475
  2. Create `.agents/` directory structure
433
476
  3. Update `.gitignore`
434
- 4. Tell the user: "Project initialized. Run `/hopla-create-prd` next to define the product scope, or `/hopla-plan-feature` to start planning a feature."
477
+ 4. If no PRD exists yet, tell the user: "Project initialized. Run `/hopla-create-prd` next to define the product scope, or `/hopla-plan-feature` to start planning a feature."
478
+ If a PRD already exists, tell the user: "Project initialized. Run `/hopla-plan-feature` to start planning the first feature."
435
479
  5. Suggest running `/hopla-git-commit` to save everything
@@ -56,6 +56,8 @@ Follow the full checklist in `.agents/guides/data-audit.md`.
56
56
 
57
57
  **Your responsibility as planner:** Run the complete audit and document ALL findings in the plan's **Context References** and **Gotchas** fields. The executing agent must be able to verify your findings without re-auditing — they should only confirm that what you documented still holds.
58
58
 
59
+ **Column removal audit:** When a plan removes a database column, run `grep -r 'column_name' worker/src/` (or equivalent for the project's backend) and include ALL locations in the plan's task list. Do not rely on memory or a single file — columns are often referenced in helper functions, auto-create logic, and ensure-drafts flows across multiple route files. Document the exact count of locations found.
60
+
59
61
  ## Phase 4: Design the Approach
60
62
 
61
63
  Based on research, define:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hopla/claude-setup",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "description": "Hopla team agentic coding system for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {