autoworkflow 1.2.0 → 2.0.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.
@@ -0,0 +1,170 @@
1
+ # Project Blueprint
2
+
3
+ > This is your project's source of truth.
4
+ > Claude reads this to understand WHAT to build.
5
+
6
+ ---
7
+
8
+ ## Project Overview
9
+
10
+ **Name:** [Project Name]
11
+ **Tagline:** [One-line description]
12
+ **Domain:** [e.g., yourproject.com]
13
+
14
+ ### Problem Statement
15
+ [What problem does this solve? Who has this problem?]
16
+
17
+ ### Solution
18
+ [How does your project solve it?]
19
+
20
+ ### Target Users
21
+ - **Primary:** [Main user type]
22
+ - **Secondary:** [Other users]
23
+
24
+ ---
25
+
26
+ ## Features
27
+
28
+ ### Phase 1: MVP (Current)
29
+ - [ ] **Feature 1** - [Description]
30
+ - Sub-requirement 1
31
+ - Sub-requirement 2
32
+ - [ ] **Feature 2** - [Description]
33
+ - [ ] **Feature 3** - [Description]
34
+
35
+ ### Phase 2: Growth
36
+ - [ ] **Feature 4** - [Description]
37
+ - [ ] **Feature 5** - [Description]
38
+
39
+ ### Phase 3: Scale
40
+ - [ ] **Feature 6** - [Description]
41
+
42
+ ---
43
+
44
+ ## Data Model
45
+
46
+ ### Core Entities
47
+
48
+ ```
49
+ User
50
+ ├── id: string (UUID)
51
+ ├── email: string (unique)
52
+ ├── name: string
53
+ ├── role: enum (user, admin)
54
+ ├── createdAt: timestamp
55
+ └── updatedAt: timestamp
56
+
57
+ [Entity 2]
58
+ ├── id: string (UUID)
59
+ ├── [field]: [type]
60
+ └── userId: string (FK → User)
61
+ ```
62
+
63
+ ### Relationships
64
+ - User → [Entity] (one-to-many)
65
+ - [Entity] → [Entity] (many-to-many)
66
+
67
+ ---
68
+
69
+ ## API Endpoints
70
+
71
+ ### Public Routes
72
+ | Method | Endpoint | Description |
73
+ |--------|----------|-------------|
74
+ | GET | /api/[resource] | List all |
75
+ | GET | /api/[resource]/:id | Get one |
76
+ | POST | /api/[resource] | Create |
77
+
78
+ ### Protected Routes (Auth Required)
79
+ | Method | Endpoint | Description |
80
+ |--------|----------|-------------|
81
+ | PUT | /api/[resource]/:id | Update |
82
+ | DELETE | /api/[resource]/:id | Delete |
83
+
84
+ ### Admin Routes
85
+ | Method | Endpoint | Description |
86
+ |--------|----------|-------------|
87
+ | GET | /api/admin/[resource] | Admin list |
88
+
89
+ ---
90
+
91
+ ## Pages & Routes
92
+
93
+ | Route | Page | Auth | Description |
94
+ |-------|------|------|-------------|
95
+ | `/` | HomePage | No | Landing page |
96
+ | `/[resource]` | ListPage | No | Browse items |
97
+ | `/[resource]/:id` | DetailPage | No | View item |
98
+ | `/dashboard` | Dashboard | Yes | User dashboard |
99
+ | `/admin` | AdminPanel | Admin | Admin controls |
100
+
101
+ ---
102
+
103
+ ## Authentication & Authorization
104
+
105
+ ### Auth Method
106
+ [e.g., JWT, Session, OAuth]
107
+
108
+ ### Roles
109
+ | Role | Permissions |
110
+ |------|-------------|
111
+ | guest | View public content |
112
+ | user | + Create, edit own content |
113
+ | admin | + Manage all content, users |
114
+
115
+ ---
116
+
117
+ ## UI/UX Requirements
118
+
119
+ ### Design System
120
+ - **Colors:** [Primary, Secondary, Accent]
121
+ - **Typography:** [Font family]
122
+ - **Components:** [shadcn/ui, custom]
123
+
124
+ ### Key UI Patterns
125
+ - [ ] Mobile-first responsive
126
+ - [ ] Dark mode support
127
+ - [ ] Loading skeletons
128
+ - [ ] Toast notifications
129
+ - [ ] Form validation feedback
130
+
131
+ ---
132
+
133
+ ## Third-Party Integrations
134
+
135
+ | Service | Purpose | Priority |
136
+ |---------|---------|----------|
137
+ | [Service 1] | [Purpose] | Required |
138
+ | [Service 2] | [Purpose] | Optional |
139
+
140
+ ---
141
+
142
+ ## Success Metrics
143
+
144
+ - [ ] [Metric 1]: [Target]
145
+ - [ ] [Metric 2]: [Target]
146
+
147
+ ---
148
+
149
+ ## Out of Scope (v1)
150
+
151
+ Things we're NOT building initially:
152
+ - [Feature X] - Deferred to v2
153
+ - [Feature Y] - Requires more research
154
+
155
+ ---
156
+
157
+ ## Notes for Claude
158
+
159
+ ### When building features:
160
+ 1. Check this blueprint for requirements
161
+ 2. Reference the Data Model for types
162
+ 3. Follow the API patterns established
163
+ 4. Match the UI/UX requirements
164
+
165
+ ### Feature completeness:
166
+ - Blueprint requirements (this file)
167
+ - Quality standards (`AI_RULES.md`)
168
+ - Workflow process (`CLAUDE.md`)
169
+
170
+ **Build what's specified. Build it completely.**
@@ -0,0 +1,472 @@
1
+ # Workflow Instructions
2
+
3
+ > The complete workflow that Claude MUST follow for all coding tasks.
4
+ > This is the source of truth for HOW to work on this project.
5
+
6
+ ---
7
+
8
+ ## Workflow Phases
9
+
10
+ ```
11
+ 1. ANALYZE → Read files, understand context
12
+ 2. PLAN → Design approach, show suggestions
13
+ 3. CONFIRM → Wait for user approval
14
+ 4. IMPLEMENT → Make changes (after approval only)
15
+ 5. VERIFY → npm run verify (typecheck + lint)
16
+ 6. FIX → If errors: fix → verify → repeat
17
+ 7. AUDIT → npm run audit:ui + audit:cycles
18
+ 8. COMMIT → Conventional commit (after approval)
19
+ 9. UPDATE → Update BLUEPRINT.md (if new feature/route/api)
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Phase 1: ANALYZE
25
+
26
+ **Purpose:** Understand what exists before making changes
27
+
28
+ **Actions:**
29
+ 1. Read `instructions/AI_RULES.md` for project standards
30
+ 2. Read `instructions/BLUEPRINT.md` for requirements
31
+ 3. Read relevant source files
32
+ 4. Identify affected files and patterns
33
+ 5. Note existing conventions to follow
34
+
35
+ **Output:**
36
+ ```
37
+ ## Analysis
38
+
39
+ **Request:** [what user asked for]
40
+ **Affected files:** [list]
41
+ **Existing patterns:** [observations]
42
+ **Requirements from BLUEPRINT:** [relevant items]
43
+ ```
44
+
45
+ **Gate:** `analyze_gate` - Must have read relevant files
46
+
47
+ ---
48
+
49
+ ## Phase 2: PLAN
50
+
51
+ **Purpose:** Design the implementation approach
52
+
53
+ **Actions:**
54
+ 1. Break task into specific changes
55
+ 2. List files to create/modify
56
+ 3. Identify potential issues
57
+ 4. Prepare suggestions (for features)
58
+
59
+ **Output:**
60
+ ```
61
+ ## Plan
62
+
63
+ **Task:** [description]
64
+
65
+ ### Proposed Changes
66
+ 1. [Change 1] - [file]
67
+ 2. [Change 2] - [file]
68
+ 3. [Change 3] - [file]
69
+
70
+ ### Suggestions (for features)
71
+
72
+ 🔴 **Required:**
73
+ - [ ] [Must-have item 1]
74
+ - [ ] [Must-have item 2]
75
+
76
+ 🟡 **Recommended:**
77
+ - [ ] [Should-have item 1]
78
+ - [ ] [Should-have item 2]
79
+
80
+ 🟢 **Optional:**
81
+ - [ ] [Nice-to-have item 1]
82
+
83
+ **Should I proceed?**
84
+ **Which suggestions to include?** (all/required/none/1,2,4)
85
+ ```
86
+
87
+ **When to show suggestions:**
88
+ | Task Type | Show Suggestions? |
89
+ |-----------|-------------------|
90
+ | New feature | Always |
91
+ | New component | Always |
92
+ | New page/route | Always |
93
+ | Bug fix | Only if reveals missing handling |
94
+ | Refactor | Only if scope expands |
95
+ | Style changes | Skip |
96
+ | Config changes | Skip |
97
+
98
+ ---
99
+
100
+ ## Phase 3: CONFIRM
101
+
102
+ **Purpose:** Get explicit user approval before implementing
103
+
104
+ **Actions:**
105
+ 1. Wait for user response
106
+ 2. Parse approval or rejection
107
+ 3. Note which suggestions to include
108
+ 4. Proceed only with explicit approval
109
+
110
+ **Approval signals:**
111
+ - "yes", "y", "proceed", "go ahead"
112
+ - "approved", "lgtm", "looks good"
113
+ - "all" (include all suggestions)
114
+ - "required" (required suggestions only)
115
+ - "1, 3, 5" (specific suggestion numbers)
116
+
117
+ **Rejection signals:**
118
+ - "no", "wait", "hold on"
119
+ - "change [x]", questions asking for revision
120
+
121
+ **Gate:** `plan_approval_gate` - MUST have user approval
122
+
123
+ ---
124
+
125
+ ## Phase 4: IMPLEMENT
126
+
127
+ **Purpose:** Make the actual code changes
128
+
129
+ **Rules:**
130
+ 1. Only change files mentioned in plan
131
+ 2. Include approved suggestions
132
+ 3. Follow patterns from AI_RULES.md
133
+ 4. No TODO/FIXME comments
134
+ 5. No console.log statements
135
+ 6. No partial implementations
136
+ 7. Complete feature fully
137
+
138
+ **Actions:**
139
+ 1. Create/modify files as planned
140
+ 2. Implement all approved items
141
+ 3. Follow existing code patterns
142
+ 4. Ensure feature is complete (UI + Backend)
143
+
144
+ **Output:**
145
+ ```
146
+ ## Implementation
147
+
148
+ ### Changes Made
149
+ - [x] [Change 1] - [file]
150
+ - [x] [Change 2] - [file]
151
+ - [x] [Change 3] - [file]
152
+
153
+ ### Suggestions Included
154
+ - [x] [Suggestion 1]
155
+ - [x] [Suggestion 3]
156
+
157
+ Proceeding to verification...
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Phase 5: VERIFY
163
+
164
+ **Purpose:** Ensure code quality before commit
165
+
166
+ **Commands:**
167
+ ```bash
168
+ npm run verify
169
+ # Runs: npm run typecheck && npm run lint
170
+ ```
171
+
172
+ **Actions:**
173
+ 1. Run verification command
174
+ 2. Parse output for errors
175
+ 3. If errors → enter FIX phase
176
+ 4. If clean → proceed to AUDIT (or COMMIT)
177
+
178
+ **Output (Success):**
179
+ ```
180
+ ## Verification
181
+
182
+ ✅ **PASSED**
183
+
184
+ | Check | Status |
185
+ |-------|--------|
186
+ | TypeScript | ✅ 0 errors |
187
+ | ESLint | ✅ 0 warnings |
188
+
189
+ Proceeding to audit...
190
+ ```
191
+
192
+ **Output (Failure):**
193
+ ```
194
+ ## Verification
195
+
196
+ ❌ **FAILED**
197
+
198
+ Found 3 error(s):
199
+
200
+ 1. `src/Button.tsx:15` - Property 'onClick' missing
201
+ 2. `src/useAuth.ts:42` - Type mismatch
202
+ 3. `src/Home.tsx:8` - Unused variable
203
+
204
+ Entering fix loop...
205
+ ```
206
+
207
+ **Loop:** `verify_loop` - Repeat until pass (max 10 iterations)
208
+
209
+ ---
210
+
211
+ ## Phase 6: FIX
212
+
213
+ **Purpose:** Resolve verification errors
214
+
215
+ **Actions:**
216
+ 1. Parse each error
217
+ 2. Read error context
218
+ 3. Apply fix
219
+ 4. Return to VERIFY
220
+
221
+ **Output:**
222
+ ```
223
+ ## Fix Loop (Iteration 2/10)
224
+
225
+ **Fixing:**
226
+ - [x] `src/Button.tsx:15` - Added onClick prop
227
+ - [x] `src/useAuth.ts:42` - Fixed return type
228
+ - [x] `src/Home.tsx:8` - Removed unused import
229
+
230
+ Re-running verification...
231
+ ```
232
+
233
+ **Loop:** `fix_loop` - Fix errors one by one
234
+
235
+ ---
236
+
237
+ ## Phase 7: AUDIT
238
+
239
+ **Purpose:** Enforce UI completeness and architecture rules
240
+
241
+ **When required:**
242
+ - New features
243
+ - New components
244
+ - Refactoring
245
+ - Performance changes
246
+
247
+ **Commands:**
248
+ ```bash
249
+ npm run audit:ui # Check orphan features
250
+ npm run audit:cycles # Check circular deps
251
+ ```
252
+
253
+ **Checks:**
254
+ 1. **UI Enforcement:**
255
+ - Every API has a UI that calls it
256
+ - Every hook is used by a component
257
+ - User can access every feature
258
+
259
+ 2. **Circular Dependencies:**
260
+ - No import cycles (A → B → A)
261
+
262
+ **Output (Success):**
263
+ ```
264
+ ## Audit
265
+
266
+ | Check | Status |
267
+ |-------|--------|
268
+ | UI Enforcement | ✅ No orphans |
269
+ | Circular Deps | ✅ No cycles |
270
+
271
+ Ready to commit.
272
+ ```
273
+
274
+ **Output (Failure):**
275
+ ```
276
+ ## Audit
277
+
278
+ | Check | Status |
279
+ |-------|--------|
280
+ | UI Enforcement | ⛔ BLOCKED |
281
+ | Circular Deps | ✅ No cycles |
282
+
283
+ **Orphan features detected:**
284
+ - `/api/users` has no UI component
285
+ - `useAuth` hook is not used
286
+
287
+ BLOCKED: Must add UI before commit.
288
+
289
+ Building missing components...
290
+ ```
291
+
292
+ **Gate:** `audit_gate` - No orphans, no cycles
293
+
294
+ ---
295
+
296
+ ## Phase 8: COMMIT
297
+
298
+ **Purpose:** Create a conventional commit
299
+
300
+ **Pre-commit checks:**
301
+ 1. Verification passed
302
+ 2. Audits passed (if applicable)
303
+ 3. No TODO/FIXME in diff
304
+ 4. No console.log in diff
305
+ 5. Valid commit message format
306
+
307
+ **Commit message format:**
308
+ ```
309
+ type(scope): description
310
+
311
+ Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
312
+ ```
313
+
314
+ **Actions:**
315
+ 1. Run pre-commit gate
316
+ 2. Show commit preview
317
+ 3. Wait for user confirmation
318
+ 4. Execute commit
319
+
320
+ **Output:**
321
+ ```
322
+ ## Pre-Commit Check
323
+
324
+ | Check | Status |
325
+ |-------|--------|
326
+ | TypeScript | ✅ |
327
+ | ESLint | ✅ |
328
+ | UI Enforcement | ✅ |
329
+ | Circular Deps | ✅ |
330
+ | TODO/FIXME | ✅ |
331
+ | console.log | ✅ |
332
+
333
+ **Ready to commit:**
334
+ - 3 files changed
335
+ - Message: `feat(auth): add login page`
336
+
337
+ **Should I commit?**
338
+ ```
339
+
340
+ **Gate:** `pre_commit_gate` - All checks must pass
341
+
342
+ ---
343
+
344
+ ## Blocking Rules
345
+
346
+ ### Cannot Proceed Without:
347
+
348
+ | Rule | Enforcement |
349
+ |------|-------------|
350
+ | No orphan features | `npm run audit:ui` |
351
+ | No TODO/FIXME | grep in pre-commit |
352
+ | No console.log | grep in pre-commit |
353
+ | No circular deps | `npm run audit:cycles` |
354
+ | TypeScript clean | `npm run typecheck` |
355
+ | ESLint clean | `npm run lint` |
356
+ | Conventional commits | commitlint |
357
+
358
+ ### Feature Completeness:
359
+ ```
360
+ FEATURE IS NOT COMPLETE UNLESS:
361
+ ├── Backend (API/logic) ✓
362
+ ├── Frontend (UI component) ✓ ← REQUIRED
363
+ ├── Connection (UI calls API) ✓
364
+ └── Access (user can reach it) ✓
365
+ ```
366
+
367
+ ---
368
+
369
+ ## Response Format
370
+
371
+ For every task, Claude MUST follow this format:
372
+
373
+ ```
374
+ ## Task: [description]
375
+
376
+ ### 1. Analysis
377
+ [findings from codebase]
378
+
379
+ ### 2. Plan + Suggestions
380
+ 📋 **Proposed changes:**
381
+ 1. [Change 1]
382
+ 2. [Change 2]
383
+
384
+ 💡 **Suggestions:**
385
+ 🔴 Required: [list]
386
+ 🟡 Recommended: [list]
387
+ 🟢 Optional: [list]
388
+
389
+ **Should I proceed? Which suggestions?**
390
+
391
+ --- (wait for approval) ---
392
+
393
+ ### 3. Implementation
394
+ [changes made]
395
+
396
+ ### 4. Verification
397
+ [npm run verify output]
398
+ Status: ✅ PASSED / ❌ FAILED
399
+
400
+ ### 5. Audit (if required)
401
+ [npm run audit:ui && audit:cycles output]
402
+ Status: ✅ PASSED / ❌ FAILED
403
+
404
+ ### 6. Fix (if errors)
405
+ [fixes applied, re-verify]
406
+
407
+ ### 7. Commit
408
+ **Should I commit: "type(scope): description"?**
409
+
410
+ ### Summary
411
+ ✅ [what was completed]
412
+ Suggestions included: [list]
413
+ ```
414
+
415
+ ---
416
+
417
+ ## Phase 9: UPDATE BLUEPRINT
418
+
419
+ **Purpose:** Keep BLUEPRINT.md in sync with codebase
420
+
421
+ **When required:**
422
+ - New feature added
423
+ - New route created
424
+ - New API endpoint added
425
+ - Feature removed or deprecated
426
+
427
+ **Actions:**
428
+ 1. Check if new feature/route/API was added
429
+ 2. Prepare BLUEPRINT.md update
430
+ 3. Present update to user
431
+ 4. Apply after approval
432
+
433
+ **Output:**
434
+ ```
435
+ ## 📘 Blueprint Update
436
+
437
+ Adding to BLUEPRINT.md:
438
+
439
+ **Features:**
440
+ - [Feature name] - [description]
441
+
442
+ **Routes:**
443
+ - [path] → [Component]
444
+
445
+ **APIs:**
446
+ - [method] [endpoint] - [description]
447
+
448
+ **Should I update BLUEPRINT.md?**
449
+ ```
450
+
451
+ See `system/triggers.md#on:feature_complete` for trigger details.
452
+
453
+ ---
454
+
455
+ ## Quick Reference
456
+
457
+ **For new features:**
458
+ ```
459
+ Analyze → Plan+Suggest → Confirm → Implement → Verify → Audit → Commit → Update Blueprint
460
+ ```
461
+
462
+ **For bug fixes:**
463
+ ```
464
+ Analyze → Plan → Confirm → Implement → Verify → Commit
465
+ ```
466
+
467
+ **For queries:**
468
+ ```
469
+ Analyze → Respond
470
+ ```
471
+
472
+ **VERIFY ALWAYS. AUDIT FEATURES. UPDATE BLUEPRINT. ASK BEFORE ACTIONS.**