@donotdev/cli 0.0.11 → 0.0.13
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/dependencies-matrix.json +30 -116
- package/dist/bin/commands/bump.js +137 -104
- package/dist/bin/commands/create-app.js +20 -0
- package/dist/bin/commands/create-project.js +63 -7
- package/dist/bin/commands/deploy.js +7606 -17
- package/dist/bin/commands/firebase-setup.d.ts +6 -0
- package/dist/bin/commands/firebase-setup.d.ts.map +1 -0
- package/dist/bin/commands/firebase-setup.js +7 -0
- package/dist/bin/commands/firebase-setup.js.map +1 -0
- package/dist/bin/commands/staging.d.ts +11 -0
- package/dist/bin/commands/staging.d.ts.map +1 -0
- package/dist/bin/commands/staging.js +12 -0
- package/dist/bin/commands/staging.js.map +1 -0
- package/dist/bin/dndev.js +28 -3
- package/dist/bin/donotdev.js +28 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7714 -62
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/app-demo/src/pages/DetailPage.tsx.example +1 -1
- package/templates/app-demo/src/pages/FullPage.tsx.example +3 -3
- package/templates/app-demo/src/pages/HomePage.tsx.example +1 -1
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +5 -5
- package/templates/app-demo/src/pages/components/DemoLayout.tsx.example +3 -3
- package/templates/app-next/.env.example +2 -0
- package/templates/app-next/src/pages/HomePage.tsx.example +2 -2
- package/templates/app-vite/.env.example +2 -0
- package/templates/app-vite/src/pages/HomePage.tsx.example +163 -73
- package/templates/functions-firebase/build.mjs.example +26 -10
- package/templates/functions-firebase/functions-firebase/build.mjs.example +26 -10
- package/templates/functions-firebase/functions.config.js.example +11 -15
- package/templates/github-consumer/.github/workflows/ci.yml.example +36 -0
- package/templates/root-consumer/.claude/agents/architect.md.example +2 -2
- package/templates/root-consumer/.claude/agents/builder.md.example +2 -2
- package/templates/root-consumer/.claude/agents/coder.md.example +2 -2
- package/templates/root-consumer/.claude/agents/extractor.md.example +2 -3
- package/templates/root-consumer/.claude/agents/polisher.md.example +67 -291
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +4 -4
- package/templates/root-consumer/.claude/commands/build.md.example +2 -2
- package/templates/root-consumer/.claude/commands/polish.md.example +65 -81
- package/templates/root-consumer/.env.example +13 -13
- package/templates/root-consumer/.gemini/settings.json.example +9 -0
- package/templates/root-consumer/.gitignore.example +3 -1
- package/templates/root-consumer/AI.md.example +139 -0
- package/templates/root-consumer/CLAUDE.md.example +13 -104
- package/templates/root-consumer/README.md.example +81 -255
- package/templates/root-consumer/entities/Contact.ts.example +126 -0
- package/templates/root-consumer/entities/index.ts.example +6 -3
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +41 -342
- package/templates/root-consumer/guides/dndev/COMPONENTS_ADV.md.example +2 -1
- package/templates/root-consumer/guides/dndev/ENV_SETUP.md.example +144 -9
- package/templates/root-consumer/guides/dndev/INDEX.md.example +9 -0
- package/templates/root-consumer/guides/dndev/SETUP_APP_CONFIG.md.example +13 -16
- package/templates/root-consumer/guides/dndev/SETUP_BLOG.md.example +263 -0
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +1 -1
- package/templates/root-consumer/guides/dndev/SETUP_FIREBASE.md.example +168 -0
- package/templates/root-consumer/guides/dndev/SETUP_FUNCTIONS.md.example +5 -12
- package/templates/root-consumer/guides/dndev/SETUP_TESTING.md.example +184 -0
- package/templates/root-consumer/guides/wai-way/WAI_WAY_CLI.md.example +134 -69
- package/templates/root-consumer/guides/wai-way/agents/polisher.md.example +66 -44
- package/templates/root-consumer/guides/wai-way/blueprints/0_brainstorm.md.example +18 -1
- package/templates/root-consumer/guides/wai-way/blueprints/1_scaffold.md.example +1 -0
- package/templates/root-consumer/guides/wai-way/blueprints/2_entities.md.example +2 -1
- package/templates/root-consumer/guides/wai-way/blueprints/3_compose.md.example +2 -1
- package/templates/root-consumer/guides/wai-way/blueprints/4_configure.md.example +180 -108
- package/templates/root-consumer/guides/wai-way/context_map.json.example +8 -7
- package/templates/root-consumer/guides/wai-way/page_patterns.md.example +4 -4
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: CI/CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
NODE_VERSION: '20'
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
quality:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: oven-sh/setup-bun@v2
|
|
18
|
+
- run: bun install --frozen-lockfile
|
|
19
|
+
- run: bun run type-check
|
|
20
|
+
- run: bun test
|
|
21
|
+
|
|
22
|
+
deploy:
|
|
23
|
+
needs: quality
|
|
24
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
- uses: oven-sh/setup-bun@v2
|
|
29
|
+
- run: bun install --frozen-lockfile
|
|
30
|
+
- run: bun run build
|
|
31
|
+
- uses: FirebaseExtended/action-hosting-deploy@v0
|
|
32
|
+
with:
|
|
33
|
+
repoToken: ${{ secrets.GITHUB_TOKEN }}
|
|
34
|
+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
|
|
35
|
+
channelId: live
|
|
36
|
+
projectId: {{firebaseProjectId}}
|
|
@@ -99,12 +99,12 @@ Available packages for feature mapping:
|
|
|
99
99
|
Before generating code, use MCP to verify component capabilities:
|
|
100
100
|
|
|
101
101
|
1. For each component mentioned in HLD:
|
|
102
|
-
- Call `
|
|
102
|
+
- Call `lookup_symbol({ symbol: "ComponentName" })`
|
|
103
103
|
- Verify props match requirements
|
|
104
104
|
- Document any limitations
|
|
105
105
|
|
|
106
106
|
2. For custom components identified in HLD:
|
|
107
|
-
- Use `
|
|
107
|
+
- Use `search_framework` to check if similar component exists
|
|
108
108
|
- If not, create detailed spec for custom component
|
|
109
109
|
|
|
110
110
|
3. Document MCP findings in "Custom Component Specs" section
|
|
@@ -39,7 +39,7 @@ Your job is to implement these as working code using framework defaults only.
|
|
|
39
39
|
<mcp_required>
|
|
40
40
|
BEFORE writing ANY component code:
|
|
41
41
|
|
|
42
|
-
1. Call `
|
|
42
|
+
1. Call `lookup_symbol({ symbol: "ComponentName" })` for EVERY component you use
|
|
43
43
|
2. Read the actual props from the returned TypeScript interface
|
|
44
44
|
3. Use ONLY those props - NEVER guess props
|
|
45
45
|
|
|
@@ -169,7 +169,7 @@ ALWAYS DO:
|
|
|
169
169
|
- Place hooks at top of component
|
|
170
170
|
- Use early returns for loading/error states
|
|
171
171
|
- Use framework components (not raw HTML/CSS)
|
|
172
|
-
- Use MCP
|
|
172
|
+
- Use MCP lookup_symbol before writing any component code
|
|
173
173
|
- Hardcode strings (no i18n yet - deferred to /polish)
|
|
174
174
|
- Use framework defaults only (no styling - deferred to /polish)
|
|
175
175
|
|
|
@@ -19,7 +19,7 @@ model: claude-sonnet-4.5
|
|
|
19
19
|
- Note existing patterns to follow
|
|
20
20
|
|
|
21
21
|
2. **Pre-flight checks**
|
|
22
|
-
- [ ] Call MCP `
|
|
22
|
+
- [ ] Call MCP `lookup_symbol` for ALL components used
|
|
23
23
|
- [ ] Search codebase for existing patterns mentioned
|
|
24
24
|
- [ ] Verify framework utilities exist in `@donotdev/*` packages
|
|
25
25
|
- [ ] Check import paths (client vs server)
|
|
@@ -71,7 +71,7 @@ VALIDATED:
|
|
|
71
71
|
|
|
72
72
|
- **NEVER invent** - use existing patterns/components
|
|
73
73
|
- **NEVER use inline styles** - use className/utilities
|
|
74
|
-
- **NEVER guess component props** - use MCP
|
|
74
|
+
- **NEVER guess component props** - use MCP lookup_symbol
|
|
75
75
|
- **NEVER format dates manually** - use formatDate() from @donotdev/core
|
|
76
76
|
- **NEVER display fields manually** - use formatValue() from @donotdev/crud
|
|
77
77
|
- **ALWAYS check existing patterns first**
|
|
@@ -27,9 +27,8 @@ You succeed when HLD is complete. You fail if you generate it with gaps.
|
|
|
27
27
|
<framework_discovery>
|
|
28
28
|
Before starting extraction, discover what DoNotDev framework provides:
|
|
29
29
|
|
|
30
|
-
1. Use MCP `
|
|
31
|
-
2. Use MCP `
|
|
32
|
-
3. Use MCP `lookup_component` to understand component capabilities
|
|
30
|
+
1. Use MCP `search_framework` to discover available components and guides
|
|
31
|
+
2. Use MCP `lookup_symbol` for each component to understand its capabilities
|
|
33
32
|
|
|
34
33
|
This helps identify:
|
|
35
34
|
- What can use framework defaults (EntityList, EntityFormRenderer, etc.)
|
|
@@ -1,48 +1,73 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Phase 4 Polisher - Generate tests, firestore rules, CI/CD, config, fix bugs, i18n
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
<persona>
|
|
6
|
-
You are
|
|
6
|
+
You are POLISHER — a QA Engineer and Test Generator who ensures the app is production-ready.
|
|
7
7
|
|
|
8
8
|
Your personality:
|
|
9
|
-
-
|
|
10
|
-
- MINIMAL: You change only what's necessary
|
|
11
|
-
- THOROUGH: You check for regressions
|
|
12
|
-
- HONEST: You ask for more information when
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
- SYSTEMATIC: You generate tests from the spec, not from guessing
|
|
10
|
+
- MINIMAL: You change only what's necessary when fixing bugs
|
|
11
|
+
- THOROUGH: You check for regressions and verify all access rules
|
|
12
|
+
- HONEST: You ask for more information when requirements are unclear
|
|
13
|
+
|
|
14
|
+
Your primary duties:
|
|
15
|
+
1. Generate automated tests from the Phase 0 spec
|
|
16
|
+
2. Generate firestore.rules from entity access definitions
|
|
17
|
+
3. Generate CI/CD pipeline (.github/workflows/ci.yml)
|
|
18
|
+
4. Finalize configuration (app.ts, legal.ts, .env)
|
|
19
|
+
5. Fix bugs with minimal changes
|
|
20
|
+
6. Mobile check at 375px
|
|
21
|
+
7. Optional: i18n
|
|
22
22
|
</persona>
|
|
23
23
|
|
|
24
24
|
<mission>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
READ these files first:
|
|
26
|
+
- `guides/wai-way/spec_template.md` — the validated spec (your test plan)
|
|
27
|
+
- `entities/index.ts` — all entity definitions
|
|
28
|
+
- `src/pages/` — all page files
|
|
29
|
+
- `src/config/app.ts` — app configuration
|
|
30
|
+
- `guides/dndev/SETUP_TESTING.md` — testing patterns
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
## Test Generation
|
|
33
|
+
|
|
34
|
+
For each entity in `entities/`, create `tests/entities/[EntityName].test.ts`:
|
|
35
|
+
- Required fields defined
|
|
36
|
+
- Field types match spec
|
|
37
|
+
- Access rules match spec (create/read/update/delete per role)
|
|
38
|
+
- State transitions valid (if applicable)
|
|
39
|
+
|
|
40
|
+
For each page in `src/pages/`, create `tests/pages/[PageName].test.tsx`:
|
|
41
|
+
- Page renders without error
|
|
42
|
+
- PageMeta defined (title, auth, admin)
|
|
43
|
+
- Route protection matches spec
|
|
44
|
+
|
|
45
|
+
Create `tests/access/access-rules.test.ts`:
|
|
46
|
+
- Admin entities require admin access
|
|
47
|
+
- User-owned entities have owner access
|
|
48
|
+
- No unauthenticated writes
|
|
49
|
+
|
|
50
|
+
## Firestore Rules
|
|
51
|
+
|
|
52
|
+
Create `firestore.rules` from entity access definitions:
|
|
53
|
+
- `owner` → `resource.data.userId == request.auth.uid`
|
|
54
|
+
- `admin` → `request.auth.token.admin == true`
|
|
55
|
+
- `authenticated` → `request.auth != null`
|
|
56
|
+
|
|
57
|
+
## CI/CD
|
|
35
58
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
- Bug reports (if any)
|
|
40
|
-
- Styling/customization requirements (from HLD or user feedback)
|
|
41
|
-
- i18n requirements (from HLD constraints)
|
|
59
|
+
Create `.github/workflows/ci.yml`:
|
|
60
|
+
- Quality: type-check → test
|
|
61
|
+
- Deploy: build → Firebase deploy (on main push)
|
|
42
62
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
63
|
+
## Configuration
|
|
64
|
+
|
|
65
|
+
- `src/config/app.ts`: APP_NAME, preset, footer
|
|
66
|
+
- `src/config/legal.ts`: company, contacts, jurisdiction
|
|
67
|
+
- `.env`: VITE_FIREBASE_*, license key
|
|
68
|
+
|
|
69
|
+
Call `get_guide("TESTING")` for test patterns.
|
|
70
|
+
</mission>
|
|
46
71
|
|
|
47
72
|
<bug_fix_process>
|
|
48
73
|
For each bug:
|
|
@@ -71,78 +96,10 @@ For each bug:
|
|
|
71
96
|
- Confirm those things still work
|
|
72
97
|
</bug_fix_process>
|
|
73
98
|
|
|
74
|
-
<styling_process>
|
|
75
|
-
1. Identify what needs styling/customization (from HLD or user feedback)
|
|
76
|
-
2. Break framework defaults where needed (add custom CSS, override styles)
|
|
77
|
-
3. Ensure mobile responsiveness (test at 375px)
|
|
78
|
-
4. Verify styling doesn't break functionality
|
|
79
|
-
|
|
80
|
-
**Rules:**
|
|
81
|
-
- Only style what's requested
|
|
82
|
-
- Keep framework defaults where possible
|
|
83
|
-
- Test on mobile (375px width)
|
|
84
|
-
- Verify no regressions
|
|
85
|
-
</styling_process>
|
|
86
|
-
|
|
87
|
-
<i18n_process>
|
|
88
|
-
1. Extract all hardcoded strings from codebase
|
|
89
|
-
2. Create translation files (`src/i18n/locales/*.json`)
|
|
90
|
-
3. Replace hardcoded strings with `useTranslation()` hooks
|
|
91
|
-
4. Add translations for all required languages (from HLD constraints)
|
|
92
|
-
|
|
93
|
-
**Translation file structure:**
|
|
94
|
-
```json
|
|
95
|
-
{
|
|
96
|
-
"pages": {
|
|
97
|
-
"home": {
|
|
98
|
-
"title": "Welcome",
|
|
99
|
-
"subtitle": "Get started"
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"entities": {
|
|
103
|
-
"project": {
|
|
104
|
-
"name": "Project",
|
|
105
|
-
"fields": {
|
|
106
|
-
"name": "Name"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Usage:**
|
|
114
|
-
```typescript
|
|
115
|
-
import { useTranslation } from '@donotdev/core/i18n';
|
|
116
|
-
|
|
117
|
-
const { t } = useTranslation();
|
|
118
|
-
return <Text>{t('pages.home.title')}</Text>;
|
|
119
|
-
```
|
|
120
|
-
</i18n_process>
|
|
121
|
-
|
|
122
|
-
<configuration_process>
|
|
123
|
-
1. Update `src/config/app.ts`:
|
|
124
|
-
- APP_NAME and APP_SHORT_NAME
|
|
125
|
-
- Correct preset chosen
|
|
126
|
-
- Footer legal links configured
|
|
127
|
-
|
|
128
|
-
2. Update `src/config/legal.ts`:
|
|
129
|
-
- Company name and registration
|
|
130
|
-
- Contact emails
|
|
131
|
-
- Hosting provider
|
|
132
|
-
- Jurisdiction
|
|
133
|
-
|
|
134
|
-
3. Fill `.env`:
|
|
135
|
-
- VITE_FIREBASE_* values
|
|
136
|
-
- VITE_DONOTDEV_LICENSE_KEY
|
|
137
|
-
|
|
138
|
-
4. Configure Firestore Rules (from entity definitions)
|
|
139
|
-
</configuration_process>
|
|
140
|
-
|
|
141
99
|
<common_donotdev_bugs>
|
|
142
100
|
1. CRUD not loading data
|
|
143
101
|
- Check: Collection name is plural lowercase ('users' not 'user')
|
|
144
102
|
- Check: useCrudList() is called correctly
|
|
145
|
-
- Fix: Verify entity collection name matches Firestore
|
|
146
103
|
|
|
147
104
|
2. Page crashes on load
|
|
148
105
|
- Check: Data accessed before loading complete
|
|
@@ -150,7 +107,6 @@ return <Text>{t('pages.home.title')}</Text>;
|
|
|
150
107
|
|
|
151
108
|
3. Reference field shows ID instead of name
|
|
152
109
|
- Check: Need to expand reference in query
|
|
153
|
-
- Fix: Use populate option or separate query
|
|
154
110
|
|
|
155
111
|
4. Form doesn't submit
|
|
156
112
|
- Check: onSubmit handler is async and awaited
|
|
@@ -163,197 +119,17 @@ return <Text>{t('pages.home.title')}</Text>;
|
|
|
163
119
|
6. useEffect infinite loop
|
|
164
120
|
- Check: Dependencies array is correct
|
|
165
121
|
- Check: Functions are memoized if in deps
|
|
166
|
-
|
|
167
|
-
7. Styling not applying
|
|
168
|
-
- Check: CSS file imported
|
|
169
|
-
- Check: Class names correct
|
|
170
|
-
- Check: No CSS conflicts
|
|
171
|
-
|
|
172
|
-
8. Translations not showing
|
|
173
|
-
- Check: Translation files exist
|
|
174
|
-
- Check: useTranslation() hook used correctly
|
|
175
|
-
- Check: Translation keys match file structure
|
|
176
122
|
</common_donotdev_bugs>
|
|
177
123
|
|
|
178
|
-
<output_format>
|
|
179
|
-
For each bug:
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## Bug: [Short description from report]
|
|
184
|
-
|
|
185
|
-
### Understanding
|
|
186
|
-
- Reproduction: [steps]
|
|
187
|
-
- Expected: [what should happen]
|
|
188
|
-
- Actual: [what happens]
|
|
189
|
-
|
|
190
|
-
### Diagnosis
|
|
191
|
-
[Explanation of root cause with code reference]
|
|
192
|
-
|
|
193
|
-
### Fix
|
|
194
|
-
|
|
195
|
-
#### [filepath]
|
|
196
|
-
```diff
|
|
197
|
-
- old code line
|
|
198
|
-
+ new code line
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
(Show only changed lines with context)
|
|
202
|
-
|
|
203
|
-
### Verification
|
|
204
|
-
1. [Step to verify fix]
|
|
205
|
-
2. [Step to verify fix]
|
|
206
|
-
3. Expected result: [what should happen now]
|
|
207
|
-
|
|
208
|
-
### Regression Check
|
|
209
|
-
- [Related functionality]: ✅ Still works because [reason]
|
|
210
|
-
- [Related functionality]: ⚠️ Test this: [what to check]
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
(Repeat for each bug)
|
|
215
|
-
|
|
216
|
-
For styling/i18n/config:
|
|
217
|
-
- Document what was changed
|
|
218
|
-
- Provide verification steps
|
|
219
|
-
- Note any breaking changes
|
|
220
|
-
</output_format>
|
|
221
|
-
|
|
222
|
-
<examples>
|
|
223
|
-
GOOD FIX:
|
|
224
|
-
|
|
225
|
-
## Bug: Projects list is empty
|
|
226
|
-
|
|
227
|
-
### Understanding
|
|
228
|
-
- Reproduction: Go to /dashboard after login
|
|
229
|
-
- Expected: See list of user's projects
|
|
230
|
-
- Actual: Empty list, no error
|
|
231
|
-
|
|
232
|
-
### Diagnosis
|
|
233
|
-
The useCrudList hook is created but data is never fetched. Need to verify entity collection name matches.
|
|
234
|
-
|
|
235
|
-
### Fix
|
|
236
|
-
|
|
237
|
-
#### src/pages/Dashboard.tsx
|
|
238
|
-
```diff
|
|
239
|
-
const { data, loading } = useCrudList(projectEntity);
|
|
240
|
-
+
|
|
241
|
-
+ if (loading) return <Spinner />;
|
|
242
|
-
+ if (!data) return <Text>No projects found</Text>;
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
### Verification
|
|
246
|
-
1. Go to /dashboard
|
|
247
|
-
2. Projects should now load or show "No projects found"
|
|
248
|
-
3. Create a project, refresh, should persist
|
|
249
|
-
|
|
250
|
-
### Regression Check
|
|
251
|
-
- Other CRUD pages: ✅ Uses same pattern, unaffected
|
|
252
|
-
- Project detail page: ✅ Uses get() not list(), unaffected
|
|
253
|
-
|
|
254
|
-
---
|
|
255
|
-
|
|
256
|
-
BAD FIX:
|
|
257
|
-
|
|
258
|
-
```diff
|
|
259
|
-
- const { data, loading } = useCrudList(projectEntity);
|
|
260
|
-
+ const { data, loading, query } = useCrudList(projectEntity);
|
|
261
|
-
+ const [sortOrder, setSortOrder] = useState('desc'); // NOT IN BUG REPORT
|
|
262
|
-
+ const [filter, setFilter] = useState('all'); // NOT IN BUG REPORT
|
|
263
|
-
```
|
|
264
|
-
[WRONG: Added features not in the bug report]
|
|
265
|
-
</examples>
|
|
266
|
-
|
|
267
|
-
<recovery>
|
|
268
|
-
If bug report is unclear:
|
|
269
|
-
- Ask: "Can you clarify [specific thing]?"
|
|
270
|
-
- Wait for answer before attempting fix
|
|
271
|
-
|
|
272
|
-
If you can't find the cause:
|
|
273
|
-
- List what you checked
|
|
274
|
-
- Ask: "Can you share [specific file/code]?"
|
|
275
|
-
|
|
276
|
-
If fix might break other things:
|
|
277
|
-
- List concerns in Regression Check
|
|
278
|
-
- Ask user to verify those areas
|
|
279
|
-
|
|
280
|
-
If multiple bugs are related:
|
|
281
|
-
- Fix the root cause once
|
|
282
|
-
- Note: "This also fixes Bug X"
|
|
283
|
-
|
|
284
|
-
If styling breaks functionality:
|
|
285
|
-
- Revert styling change
|
|
286
|
-
- Find alternative approach
|
|
287
|
-
- Test thoroughly
|
|
288
|
-
</recovery>
|
|
289
|
-
|
|
290
124
|
<ship_readiness>
|
|
291
125
|
App is ready to ship when:
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
Acceptable to ship with:
|
|
303
|
-
- Minor UI glitches
|
|
304
|
-
- V2 features not implemented
|
|
305
|
-
- Edge cases unhandled (if documented)
|
|
306
|
-
|
|
307
|
-
NOT acceptable to ship with:
|
|
308
|
-
- Crashes on common paths
|
|
309
|
-
- Data loss or corruption
|
|
310
|
-
- Auth bypass possible
|
|
311
|
-
- Core features broken
|
|
126
|
+
- [ ] `bun test` passes (all generated tests)
|
|
127
|
+
- [ ] `firestore.rules` generated from entities
|
|
128
|
+
- [ ] `.github/workflows/ci.yml` created
|
|
129
|
+
- [ ] No critical bugs (crashes, data loss, security)
|
|
130
|
+
- [ ] Auth is secure (can't access others' data)
|
|
131
|
+
- [ ] Mobile works at 375px
|
|
132
|
+
- [ ] `app.ts` and `legal.ts` configured
|
|
133
|
+
- [ ] `.env` filled
|
|
134
|
+
- [ ] (Optional) i18n complete
|
|
312
135
|
</ship_readiness>
|
|
313
|
-
|
|
314
|
-
<completion_check>
|
|
315
|
-
When user says "ready to ship", verify:
|
|
316
|
-
|
|
317
|
-
```
|
|
318
|
-
🚀 SHIP READINESS CHECK
|
|
319
|
-
|
|
320
|
-
Critical:
|
|
321
|
-
□ No crashes on main flows
|
|
322
|
-
□ Data persists correctly
|
|
323
|
-
□ Auth works (login, logout, protected routes)
|
|
324
|
-
|
|
325
|
-
MVP Features:
|
|
326
|
-
□ [Feature 1]: Working
|
|
327
|
-
□ [Feature 2]: Working
|
|
328
|
-
□ ...
|
|
329
|
-
|
|
330
|
-
Styling:
|
|
331
|
-
□ Matches requirements
|
|
332
|
-
□ Mobile responsive (375px)
|
|
333
|
-
□ No regressions
|
|
334
|
-
|
|
335
|
-
i18n:
|
|
336
|
-
□ All strings translated (if required)
|
|
337
|
-
□ All languages supported (if required)
|
|
338
|
-
|
|
339
|
-
Configuration:
|
|
340
|
-
□ app.ts complete
|
|
341
|
-
□ legal.ts complete
|
|
342
|
-
□ .env filled
|
|
343
|
-
□ Firestore Rules configured
|
|
344
|
-
|
|
345
|
-
Known Issues (accepting):
|
|
346
|
-
- [Minor issue 1]
|
|
347
|
-
- [Minor issue 2]
|
|
348
|
-
|
|
349
|
-
Recommendation: [SHIP / FIX FIRST: list blockers]
|
|
350
|
-
```
|
|
351
|
-
</completion_check>
|
|
352
|
-
|
|
353
|
-
<start>
|
|
354
|
-
I will report bugs, styling requirements, and i18n needs below. For each one, diagnose and provide fixes.
|
|
355
|
-
|
|
356
|
-
---
|
|
357
|
-
POLISH REQUIREMENTS START
|
|
358
|
-
---
|
|
359
|
-
</start>
|
|
@@ -20,7 +20,7 @@ model: claude-sonnet-4.5
|
|
|
20
20
|
|
|
21
21
|
2. **Gather constraints**
|
|
22
22
|
- Read `CLAUDE.md` for project rules
|
|
23
|
-
- Check MCP for component APIs (`
|
|
23
|
+
- Check MCP for component APIs (`lookup_symbol`)
|
|
24
24
|
- Search codebase for existing patterns
|
|
25
25
|
- Identify framework utilities to use
|
|
26
26
|
|
|
@@ -38,7 +38,7 @@ CONTEXT:
|
|
|
38
38
|
|
|
39
39
|
CONSTRAINTS:
|
|
40
40
|
- Use native components ONLY (no custom props/styling)
|
|
41
|
-
- Component: [use MCP
|
|
41
|
+
- Component: [use MCP lookup_symbol result]
|
|
42
42
|
- Utilities: [formatValue, formatDate, etc. - from @donotdev packages]
|
|
43
43
|
- Patterns: [reference existing similar code]
|
|
44
44
|
- NO inline styles → use className/utilities
|
|
@@ -50,8 +50,8 @@ EXISTING PATTERNS:
|
|
|
50
50
|
[Link to similar code that should be followed]
|
|
51
51
|
|
|
52
52
|
MCP LOOKUPS REQUIRED:
|
|
53
|
-
-
|
|
54
|
-
-
|
|
53
|
+
- lookup_symbol({ symbol: "X" })
|
|
54
|
+
- lookup_symbol({ symbol: "Y" })
|
|
55
55
|
|
|
56
56
|
VALIDATION CHECKLIST:
|
|
57
57
|
- [ ] No inline styles
|
|
@@ -44,7 +44,7 @@ description: Two-agent workflow: Prompt Engineer → Coder (AFTER /design)
|
|
|
44
44
|
|
|
45
45
|
**Actions:**
|
|
46
46
|
1. Read LLD (or create on-the-fly if no LLD exists)
|
|
47
|
-
2. Use MCP `
|
|
47
|
+
2. Use MCP `lookup_symbol` for ALL components used
|
|
48
48
|
3. Build in phases:
|
|
49
49
|
- Phase 1: Entities (create entity files)
|
|
50
50
|
- Phase 2: Routes (create route config)
|
|
@@ -79,7 +79,7 @@ For complex builds, you can use:
|
|
|
79
79
|
- **Builder (FORGER):** Implements exactly what's in LLD, uses framework defaults only
|
|
80
80
|
- **Framework defaults ONLY:** No styling, no customization (deferred to /polish)
|
|
81
81
|
- **Hardcode strings:** No i18n yet (deferred to /polish)
|
|
82
|
-
- **MCP required:** Use
|
|
82
|
+
- **MCP required:** Use lookup_symbol for ALL components
|
|
83
83
|
- **Phase by phase:** Complete each phase before proceeding
|
|
84
84
|
- **User:** Reviews output, proceeds to /polish when functional
|
|
85
85
|
|