autoworkflow 1.1.0 → 2.0.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/.claude/commands/analyze.md +77 -0
- package/.claude/commands/audit.md +220 -0
- package/.claude/commands/build.md +159 -0
- package/.claude/commands/commit.md +165 -0
- package/.claude/commands/fix.md +119 -0
- package/.claude/commands/plan.md +101 -0
- package/.claude/commands/suggest.md +195 -0
- package/.claude/commands/verify.md +113 -0
- package/.claude/settings.json +129 -0
- package/.claude/settings.local.json +9 -0
- package/.prettierrc +11 -0
- package/.vscode/extensions.json +27 -0
- package/.vscode/settings.json +69 -0
- package/.vscode/tasks.json +161 -0
- package/CLAUDE.md +344 -0
- package/README.md +180 -195
- package/eslint.config.example.js +83 -0
- package/hooks/commit-msg +137 -0
- package/hooks/pre-commit +152 -0
- package/instructions/AI_RULES.md +284 -0
- package/instructions/BLUEPRINT.md +170 -0
- package/instructions/CLAUDE.md +472 -0
- package/package.json +45 -45
- package/scripts/autoworkflow.sh +324 -0
- package/scripts/check-ui-enforcement.sh +177 -0
- package/scripts/ensure-no-errors.sh +116 -0
- package/scripts/run-verification.sh +112 -0
- package/scripts/setup.sh +201 -0
- package/system/gates.md +390 -0
- package/system/loops.md +348 -0
- package/system/router.md +415 -0
- package/system/triggers.md +369 -0
- package/tsconfig.example.json +52 -0
- package/bin/cli.js +0 -299
- package/lib/index.js +0 -9
- package/lib/install.js +0 -600
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# /fix - Fix Command
|
|
2
|
+
|
|
3
|
+
Fix verification errors and re-verify.
|
|
4
|
+
|
|
5
|
+
## Trigger
|
|
6
|
+
- User invokes `/fix`
|
|
7
|
+
- Or: Automatically when `verify_loop` detects errors
|
|
8
|
+
- Or: When `audit_loop` detects issues
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
### Step 1: Identify Errors
|
|
13
|
+
Parse the error output from verification:
|
|
14
|
+
```
|
|
15
|
+
1. Collect all TypeScript errors
|
|
16
|
+
2. Collect all ESLint warnings
|
|
17
|
+
3. Sort by severity (errors first)
|
|
18
|
+
4. Sort by file (group related errors)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Step 2: Fix Each Error
|
|
22
|
+
For each error:
|
|
23
|
+
```
|
|
24
|
+
1. Read the file and error context
|
|
25
|
+
2. Understand the issue
|
|
26
|
+
3. Determine the fix
|
|
27
|
+
4. Apply the fix
|
|
28
|
+
5. Mark as addressed
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Step 3: Report Progress
|
|
32
|
+
|
|
33
|
+
**Output Format:**
|
|
34
|
+
```
|
|
35
|
+
## Fix Loop (Iteration X/10)
|
|
36
|
+
|
|
37
|
+
Fixing X errors...
|
|
38
|
+
|
|
39
|
+
### TypeScript Errors
|
|
40
|
+
|
|
41
|
+
[1/3] `src/Component.tsx:15`
|
|
42
|
+
**Error:** Property 'onClick' is missing in type
|
|
43
|
+
**Fix:** Added onClick to props interface
|
|
44
|
+
**Status:** ✅ Fixed
|
|
45
|
+
|
|
46
|
+
[2/3] `src/hooks/useAuth.ts:42`
|
|
47
|
+
**Error:** Type 'string' is not assignable to type 'number'
|
|
48
|
+
**Fix:** Changed return type to string
|
|
49
|
+
**Status:** ✅ Fixed
|
|
50
|
+
|
|
51
|
+
### ESLint Warnings
|
|
52
|
+
|
|
53
|
+
[3/3] `src/pages/Home.tsx:8`
|
|
54
|
+
**Warning:** 'unused' is defined but never used
|
|
55
|
+
**Fix:** Removed unused import
|
|
56
|
+
**Status:** ✅ Fixed
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
All errors addressed. Re-running verification...
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Step 4: Re-verify
|
|
64
|
+
After fixing, automatically run `/verify` again.
|
|
65
|
+
|
|
66
|
+
### Step 5: Handle Stuck Errors
|
|
67
|
+
If an error cannot be fixed:
|
|
68
|
+
```
|
|
69
|
+
## Fix Loop
|
|
70
|
+
|
|
71
|
+
⚠️ **Unable to Fix**
|
|
72
|
+
|
|
73
|
+
**Error:** [description]
|
|
74
|
+
**File:** `path/to/file.tsx:line`
|
|
75
|
+
**Reason:** [why auto-fix failed]
|
|
76
|
+
|
|
77
|
+
**Options:**
|
|
78
|
+
1. I can attempt a different approach
|
|
79
|
+
2. You can provide guidance
|
|
80
|
+
3. Skip this error and continue
|
|
81
|
+
|
|
82
|
+
**What would you like me to do?**
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Fix Strategies
|
|
86
|
+
|
|
87
|
+
### TypeScript Errors
|
|
88
|
+
| Error Type | Strategy |
|
|
89
|
+
|------------|----------|
|
|
90
|
+
| Missing property | Add to interface |
|
|
91
|
+
| Type mismatch | Adjust type or value |
|
|
92
|
+
| Undefined variable | Add declaration or import |
|
|
93
|
+
| Missing return | Add return statement |
|
|
94
|
+
| Null reference | Add null check |
|
|
95
|
+
|
|
96
|
+
### ESLint Errors
|
|
97
|
+
| Error Type | Strategy |
|
|
98
|
+
|------------|----------|
|
|
99
|
+
| Unused variable | Remove or use |
|
|
100
|
+
| Missing semicolon | Run lint:fix |
|
|
101
|
+
| console.log | Remove statement |
|
|
102
|
+
| any type | Add proper type |
|
|
103
|
+
| Complexity | Extract function |
|
|
104
|
+
|
|
105
|
+
## Loop Reference
|
|
106
|
+
See `system/loops.md#fix_loop` for loop definition.
|
|
107
|
+
|
|
108
|
+
## Max Iterations
|
|
109
|
+
Combined with verify_loop: 10 total iterations.
|
|
110
|
+
|
|
111
|
+
## Rules
|
|
112
|
+
- Fix ALL errors, not just some
|
|
113
|
+
- Do not stop until verification passes
|
|
114
|
+
- Show what was changed
|
|
115
|
+
- Return to verify_loop after fixes
|
|
116
|
+
|
|
117
|
+
## Examples
|
|
118
|
+
- `/fix` - Fix current verification errors
|
|
119
|
+
- Automatic when verify fails
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# /plan - Plan Command
|
|
2
|
+
|
|
3
|
+
Create an implementation plan with suggestions.
|
|
4
|
+
|
|
5
|
+
## Trigger
|
|
6
|
+
- User invokes `/plan [task]`
|
|
7
|
+
- Or: After ANALYZE phase completes
|
|
8
|
+
|
|
9
|
+
## Workflow
|
|
10
|
+
|
|
11
|
+
### Step 1: Verify Analysis Complete
|
|
12
|
+
Check that `analyze_gate` has passed:
|
|
13
|
+
- Relevant files have been read
|
|
14
|
+
- Task has been classified
|
|
15
|
+
- Requirements understood
|
|
16
|
+
|
|
17
|
+
### Step 2: Design Implementation
|
|
18
|
+
```
|
|
19
|
+
1. Break task into specific changes
|
|
20
|
+
2. List files to create/modify
|
|
21
|
+
3. Identify the order of changes
|
|
22
|
+
4. Note potential issues
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Step 3: Prepare Suggestions
|
|
26
|
+
Based on task type (from `system/router.md`):
|
|
27
|
+
|
|
28
|
+
| Task Type | Suggestions |
|
|
29
|
+
|-----------|-------------|
|
|
30
|
+
| feature | Required |
|
|
31
|
+
| fix | Conditional |
|
|
32
|
+
| refactor | Conditional |
|
|
33
|
+
| style | Skip |
|
|
34
|
+
| docs | Skip |
|
|
35
|
+
|
|
36
|
+
### Step 4: Present Plan
|
|
37
|
+
|
|
38
|
+
**Output Format:**
|
|
39
|
+
```
|
|
40
|
+
## Plan: [task description]
|
|
41
|
+
|
|
42
|
+
### Task Classification
|
|
43
|
+
**Type:** [from router]
|
|
44
|
+
**Workflow:** [phases]
|
|
45
|
+
|
|
46
|
+
### Proposed Changes
|
|
47
|
+
1. **[Change 1]**
|
|
48
|
+
- File: `path/to/file.tsx`
|
|
49
|
+
- Action: [create/modify/delete]
|
|
50
|
+
- Details: [what changes]
|
|
51
|
+
|
|
52
|
+
2. **[Change 2]**
|
|
53
|
+
- File: `path/to/file.ts`
|
|
54
|
+
- Action: [create/modify]
|
|
55
|
+
- Details: [what changes]
|
|
56
|
+
|
|
57
|
+
### Suggestions for Feature Completeness
|
|
58
|
+
|
|
59
|
+
🔴 **Required** (must implement):
|
|
60
|
+
- [ ] [Item 1] - [reason]
|
|
61
|
+
- [ ] [Item 2] - [reason]
|
|
62
|
+
|
|
63
|
+
🟡 **Recommended** (improves quality):
|
|
64
|
+
- [ ] [Item 3] - [reason]
|
|
65
|
+
- [ ] [Item 4] - [reason]
|
|
66
|
+
|
|
67
|
+
🟢 **Optional** (nice to have):
|
|
68
|
+
- [ ] [Item 5] - [reason]
|
|
69
|
+
|
|
70
|
+
### Potential Issues
|
|
71
|
+
- [Issue 1 and mitigation]
|
|
72
|
+
- [Issue 2 and mitigation]
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
**Should I proceed with this plan?**
|
|
77
|
+
**Which suggestions to include?** (all/required/none/1,2,4)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Gate
|
|
81
|
+
`plan_approval_gate` - MUST wait for user approval before implementing.
|
|
82
|
+
|
|
83
|
+
### Approval Detection
|
|
84
|
+
**Approved:**
|
|
85
|
+
- "yes", "y", "proceed", "go ahead"
|
|
86
|
+
- "approved", "lgtm", "looks good"
|
|
87
|
+
- "all" (all suggestions)
|
|
88
|
+
- "required" (required only)
|
|
89
|
+
- Numbers: "1, 3, 5"
|
|
90
|
+
|
|
91
|
+
**Not Approved:**
|
|
92
|
+
- "no", "wait", "hold on"
|
|
93
|
+
- Questions or revision requests
|
|
94
|
+
|
|
95
|
+
## Arguments
|
|
96
|
+
`$ARGUMENTS` - The task to plan (optional if following analysis)
|
|
97
|
+
|
|
98
|
+
## Examples
|
|
99
|
+
- `/plan add user profile page` - Plan a new feature
|
|
100
|
+
- `/plan fix login error` - Plan a bug fix
|
|
101
|
+
- `/plan` - Continue from analysis to planning
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# /suggest - Suggest Command
|
|
2
|
+
|
|
3
|
+
Generate feature completeness suggestions for a task.
|
|
4
|
+
|
|
5
|
+
## Trigger
|
|
6
|
+
- User invokes `/suggest [task]`
|
|
7
|
+
- Or: Automatically during PLAN phase for features
|
|
8
|
+
|
|
9
|
+
## When to Show Suggestions
|
|
10
|
+
|
|
11
|
+
Per `system/router.md`:
|
|
12
|
+
|
|
13
|
+
| Task Type | Show Suggestions |
|
|
14
|
+
|-----------|------------------|
|
|
15
|
+
| feature | Always |
|
|
16
|
+
| component | Always |
|
|
17
|
+
| page/route | Always |
|
|
18
|
+
| fix | Only if reveals missing handling |
|
|
19
|
+
| refactor | Only if scope expands |
|
|
20
|
+
| style | Skip |
|
|
21
|
+
| config | Skip |
|
|
22
|
+
| docs | Skip |
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
### Step 1: Analyze Task
|
|
27
|
+
```
|
|
28
|
+
1. Understand what is being built
|
|
29
|
+
2. Check instructions/AI_RULES.md for standards
|
|
30
|
+
3. Check instructions/BLUEPRINT.md for requirements
|
|
31
|
+
4. Identify completeness gaps
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Step 2: Categorize Suggestions
|
|
35
|
+
|
|
36
|
+
**🔴 Required (must implement):**
|
|
37
|
+
- Error handling for failure cases
|
|
38
|
+
- Loading states for async operations
|
|
39
|
+
- Input validation for user data
|
|
40
|
+
- Accessibility basics (aria labels)
|
|
41
|
+
|
|
42
|
+
**🟡 Recommended (improves quality):**
|
|
43
|
+
- Empty states when no data
|
|
44
|
+
- Edge case handling
|
|
45
|
+
- Keyboard navigation
|
|
46
|
+
- Better UX feedback
|
|
47
|
+
|
|
48
|
+
**🟢 Optional (nice to have):**
|
|
49
|
+
- Unit tests
|
|
50
|
+
- Analytics tracking
|
|
51
|
+
- Performance optimizations
|
|
52
|
+
- Additional features
|
|
53
|
+
|
|
54
|
+
### Step 3: Present Suggestions
|
|
55
|
+
|
|
56
|
+
**Output Format:**
|
|
57
|
+
```
|
|
58
|
+
## Suggestions: [task]
|
|
59
|
+
|
|
60
|
+
Based on project standards and the task requirements:
|
|
61
|
+
|
|
62
|
+
### 🔴 Required (must implement)
|
|
63
|
+
|
|
64
|
+
1. **Error Handling**
|
|
65
|
+
- Add error state UI for API failures
|
|
66
|
+
- Show user-friendly error messages
|
|
67
|
+
|
|
68
|
+
2. **Loading State**
|
|
69
|
+
- Add loading skeleton while fetching
|
|
70
|
+
- Disable submit during processing
|
|
71
|
+
|
|
72
|
+
3. **Input Validation**
|
|
73
|
+
- Validate required fields
|
|
74
|
+
- Show validation errors inline
|
|
75
|
+
|
|
76
|
+
### 🟡 Recommended (improves quality)
|
|
77
|
+
|
|
78
|
+
4. **Empty State**
|
|
79
|
+
- Show message when no results
|
|
80
|
+
- Suggest actions user can take
|
|
81
|
+
|
|
82
|
+
5. **Keyboard Support**
|
|
83
|
+
- Handle Enter to submit
|
|
84
|
+
- Support Tab navigation
|
|
85
|
+
|
|
86
|
+
6. **Mobile Layout**
|
|
87
|
+
- Responsive design
|
|
88
|
+
- Touch-friendly targets
|
|
89
|
+
|
|
90
|
+
### 🟢 Optional (nice to have)
|
|
91
|
+
|
|
92
|
+
7. **Unit Tests**
|
|
93
|
+
- Test component rendering
|
|
94
|
+
- Test hook behavior
|
|
95
|
+
|
|
96
|
+
8. **Performance**
|
|
97
|
+
- Memoize expensive calculations
|
|
98
|
+
- Lazy load if large
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
**Which suggestions should I include?**
|
|
103
|
+
- `all` - Include all suggestions
|
|
104
|
+
- `required` - Only required items
|
|
105
|
+
- `none` - Skip suggestions
|
|
106
|
+
- `1, 2, 4, 7` - Specific numbers
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Suggestion Templates
|
|
110
|
+
|
|
111
|
+
### For New Pages
|
|
112
|
+
```
|
|
113
|
+
🔴 Required:
|
|
114
|
+
- [ ] Loading skeleton
|
|
115
|
+
- [ ] Error boundary
|
|
116
|
+
- [ ] Empty state
|
|
117
|
+
- [ ] Mobile layout
|
|
118
|
+
|
|
119
|
+
🟡 Recommended:
|
|
120
|
+
- [ ] SEO meta tags
|
|
121
|
+
- [ ] Breadcrumb navigation
|
|
122
|
+
- [ ] Page title
|
|
123
|
+
|
|
124
|
+
🟢 Optional:
|
|
125
|
+
- [ ] Analytics tracking
|
|
126
|
+
- [ ] Keyboard shortcuts
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### For New Forms
|
|
130
|
+
```
|
|
131
|
+
🔴 Required:
|
|
132
|
+
- [ ] Client-side validation
|
|
133
|
+
- [ ] Server error display
|
|
134
|
+
- [ ] Submit loading state
|
|
135
|
+
- [ ] Success feedback
|
|
136
|
+
|
|
137
|
+
🟡 Recommended:
|
|
138
|
+
- [ ] Autofocus first field
|
|
139
|
+
- [ ] Clear form on success
|
|
140
|
+
- [ ] Confirm unsaved changes
|
|
141
|
+
|
|
142
|
+
🟢 Optional:
|
|
143
|
+
- [ ] Auto-save draft
|
|
144
|
+
- [ ] Undo/redo support
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### For New Components
|
|
148
|
+
```
|
|
149
|
+
🔴 Required:
|
|
150
|
+
- [ ] TypeScript props interface
|
|
151
|
+
- [ ] Handle loading prop
|
|
152
|
+
- [ ] Handle error prop
|
|
153
|
+
|
|
154
|
+
🟡 Recommended:
|
|
155
|
+
- [ ] Default props
|
|
156
|
+
- [ ] Ref forwarding
|
|
157
|
+
- [ ] Accessibility
|
|
158
|
+
|
|
159
|
+
🟢 Optional:
|
|
160
|
+
- [ ] Storybook story
|
|
161
|
+
- [ ] Unit tests
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### For API Integration
|
|
165
|
+
```
|
|
166
|
+
🔴 Required:
|
|
167
|
+
- [ ] Error handling
|
|
168
|
+
- [ ] Loading state
|
|
169
|
+
- [ ] Type definitions
|
|
170
|
+
|
|
171
|
+
🟡 Recommended:
|
|
172
|
+
- [ ] Retry logic
|
|
173
|
+
- [ ] Cache response
|
|
174
|
+
- [ ] Cancel on unmount
|
|
175
|
+
|
|
176
|
+
🟢 Optional:
|
|
177
|
+
- [ ] Optimistic updates
|
|
178
|
+
- [ ] Background refresh
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Key Principle
|
|
182
|
+
|
|
183
|
+
**Always reference instructions/AI_RULES.md** when making suggestions:
|
|
184
|
+
1. Align with project vision
|
|
185
|
+
2. Meet quality standards
|
|
186
|
+
3. Follow ALWAYS/NEVER rules
|
|
187
|
+
4. Complete feature requirements
|
|
188
|
+
|
|
189
|
+
## Arguments
|
|
190
|
+
`$ARGUMENTS` - The task to generate suggestions for
|
|
191
|
+
|
|
192
|
+
## Examples
|
|
193
|
+
- `/suggest add user profile page` - Suggestions for new page
|
|
194
|
+
- `/suggest add contact form` - Suggestions for new form
|
|
195
|
+
- `/suggest` - Suggestions for current task
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# /verify - Verify Command
|
|
2
|
+
|
|
3
|
+
Run TypeScript and ESLint verification with fix loop.
|
|
4
|
+
|
|
5
|
+
## Trigger
|
|
6
|
+
- User invokes `/verify`
|
|
7
|
+
- Or: Automatically after IMPLEMENT phase
|
|
8
|
+
- Or: Part of verify_loop
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
### Step 1: Run Verification
|
|
13
|
+
```bash
|
|
14
|
+
npm run verify
|
|
15
|
+
# Equivalent to: npm run typecheck && npm run lint
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Step 2: Parse Results
|
|
19
|
+
Check exit code and output:
|
|
20
|
+
- Exit 0 = All checks passed
|
|
21
|
+
- Exit non-0 = Errors exist
|
|
22
|
+
|
|
23
|
+
### Step 3: Report Results
|
|
24
|
+
|
|
25
|
+
**On Success:**
|
|
26
|
+
```
|
|
27
|
+
## Verification
|
|
28
|
+
|
|
29
|
+
✅ **PASSED**
|
|
30
|
+
|
|
31
|
+
| Check | Status | Details |
|
|
32
|
+
|-------|--------|---------|
|
|
33
|
+
| TypeScript | ✅ | 0 errors |
|
|
34
|
+
| ESLint | ✅ | 0 warnings |
|
|
35
|
+
|
|
36
|
+
**Gate Status:** `verify_gate` ✅ PASSED
|
|
37
|
+
|
|
38
|
+
Ready to proceed to [AUDIT/COMMIT].
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**On Failure:**
|
|
42
|
+
```
|
|
43
|
+
## Verification
|
|
44
|
+
|
|
45
|
+
❌ **FAILED** (Iteration X/10)
|
|
46
|
+
|
|
47
|
+
| Check | Status | Details |
|
|
48
|
+
|-------|--------|---------|
|
|
49
|
+
| TypeScript | ⛔ | X errors |
|
|
50
|
+
| ESLint | ⛔ | X warnings |
|
|
51
|
+
|
|
52
|
+
### Errors Found
|
|
53
|
+
|
|
54
|
+
**TypeScript Errors:**
|
|
55
|
+
1. `src/Component.tsx:15`
|
|
56
|
+
Error: Property 'onClick' is missing in type...
|
|
57
|
+
|
|
58
|
+
2. `src/hooks/useAuth.ts:42`
|
|
59
|
+
Error: Type 'string' is not assignable to type 'number'
|
|
60
|
+
|
|
61
|
+
**ESLint Warnings:**
|
|
62
|
+
1. `src/pages/Home.tsx:8`
|
|
63
|
+
Warning: 'unused' is defined but never used
|
|
64
|
+
|
|
65
|
+
**Gate Status:** `verify_gate` ⛔ BLOCKED
|
|
66
|
+
|
|
67
|
+
Entering fix loop...
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Step 4: Fix Loop (if errors)
|
|
71
|
+
Per `system/loops.md#fix_loop`:
|
|
72
|
+
1. Parse each error
|
|
73
|
+
2. Fix one by one
|
|
74
|
+
3. Re-run verification
|
|
75
|
+
4. Repeat until pass or max iterations
|
|
76
|
+
|
|
77
|
+
### Step 5: Max Iterations
|
|
78
|
+
If max iterations (10) reached:
|
|
79
|
+
```
|
|
80
|
+
## Verification
|
|
81
|
+
|
|
82
|
+
⛔ **MAX ITERATIONS REACHED** (10/10)
|
|
83
|
+
|
|
84
|
+
Unable to automatically fix all errors.
|
|
85
|
+
|
|
86
|
+
### Remaining Errors
|
|
87
|
+
1. [Error 1]
|
|
88
|
+
2. [Error 2]
|
|
89
|
+
|
|
90
|
+
### What Was Tried
|
|
91
|
+
- [Fix attempt 1]
|
|
92
|
+
- [Fix attempt 2]
|
|
93
|
+
|
|
94
|
+
**Need your guidance to proceed.**
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Gate
|
|
98
|
+
`verify_gate` - Must pass before AUDIT or COMMIT phase.
|
|
99
|
+
|
|
100
|
+
## Commands Used
|
|
101
|
+
```bash
|
|
102
|
+
npm run verify # Full verification
|
|
103
|
+
npm run typecheck # TypeScript only
|
|
104
|
+
npm run lint # ESLint only
|
|
105
|
+
npm run lint:fix # Auto-fix ESLint issues
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Loop Reference
|
|
109
|
+
See `system/loops.md#verify_loop` for loop definition.
|
|
110
|
+
|
|
111
|
+
## Examples
|
|
112
|
+
- `/verify` - Run verification after making changes
|
|
113
|
+
- Automatic after any implementation
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/anthropics/claude-code/main/schemas/settings.json",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"name": "AutoWorkflow - Full Architecture",
|
|
5
|
+
"description": "System prompt layer that controls Claude's workflow with triggers, loops, and gates",
|
|
6
|
+
|
|
7
|
+
"instructions": [
|
|
8
|
+
"ALWAYS read CLAUDE.md (entry point) at the start of EVERY task",
|
|
9
|
+
"ALWAYS check if instructions/BLUEPRINT.md exists at session start",
|
|
10
|
+
"IF BLUEPRINT.md missing: run /audit project to generate it",
|
|
11
|
+
"ALWAYS check system/router.md to classify the task type",
|
|
12
|
+
"ALWAYS check system/gates.md before phase transitions",
|
|
13
|
+
"ALWAYS follow system/loops.md for verification and fix cycles",
|
|
14
|
+
"ALWAYS check system/triggers.md for event handling",
|
|
15
|
+
"ALWAYS update BLUEPRINT.md after adding new features/routes/APIs",
|
|
16
|
+
"NEVER skip the plan approval gate - wait for user confirmation",
|
|
17
|
+
"NEVER commit without passing all gates in system/gates.md",
|
|
18
|
+
"NEVER implement without reading instructions/AI_RULES.md",
|
|
19
|
+
"NEVER build backend without corresponding UI (UI enforcement)",
|
|
20
|
+
"Git hooks (hooks/pre-commit, hooks/commit-msg) provide backup enforcement",
|
|
21
|
+
"Scripts in scripts/ folder automate verification and audits"
|
|
22
|
+
],
|
|
23
|
+
|
|
24
|
+
"requiredFiles": [
|
|
25
|
+
"CLAUDE.md",
|
|
26
|
+
"system/triggers.md",
|
|
27
|
+
"system/loops.md",
|
|
28
|
+
"system/gates.md",
|
|
29
|
+
"system/router.md",
|
|
30
|
+
"instructions/CLAUDE.md",
|
|
31
|
+
"instructions/AI_RULES.md",
|
|
32
|
+
"instructions/BLUEPRINT.md"
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
"automationFiles": [
|
|
36
|
+
"scripts/setup.sh",
|
|
37
|
+
"scripts/autoworkflow.sh",
|
|
38
|
+
"scripts/check-ui-enforcement.sh",
|
|
39
|
+
"hooks/pre-commit",
|
|
40
|
+
"hooks/commit-msg"
|
|
41
|
+
],
|
|
42
|
+
|
|
43
|
+
"workflow": {
|
|
44
|
+
"mode": "agentic",
|
|
45
|
+
"phases": ["ANALYZE", "PLAN", "CONFIRM", "IMPLEMENT", "VERIFY", "FIX", "AUDIT", "COMMIT", "UPDATE"],
|
|
46
|
+
"requirePlanApproval": true,
|
|
47
|
+
"requireVerifyBeforeCommit": true,
|
|
48
|
+
"requireAuditForFeatures": true,
|
|
49
|
+
"requireBlueprintCheck": true,
|
|
50
|
+
"maxFixIterations": 10,
|
|
51
|
+
"maxAuditIterations": 5
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
"gates": {
|
|
55
|
+
"analyze": {
|
|
56
|
+
"requires": ["Read relevant source files", "Check BLUEPRINT.md"]
|
|
57
|
+
},
|
|
58
|
+
"plan_approval": {
|
|
59
|
+
"requires": ["User explicit approval"],
|
|
60
|
+
"blocking": true
|
|
61
|
+
},
|
|
62
|
+
"verify": {
|
|
63
|
+
"requires": ["npm run verify passes"],
|
|
64
|
+
"blocking": true
|
|
65
|
+
},
|
|
66
|
+
"audit": {
|
|
67
|
+
"requires": ["npm run audit:ui passes", "npm run audit:cycles passes"],
|
|
68
|
+
"blocking": true,
|
|
69
|
+
"appliesTo": ["feature", "refactor", "perf"]
|
|
70
|
+
},
|
|
71
|
+
"pre_commit": {
|
|
72
|
+
"requires": [
|
|
73
|
+
"verify_gate passed",
|
|
74
|
+
"audit_gate passed (if applicable)",
|
|
75
|
+
"No TODO/FIXME in diff",
|
|
76
|
+
"No console.log in diff",
|
|
77
|
+
"Valid commit message format"
|
|
78
|
+
],
|
|
79
|
+
"blocking": true
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
"triggers": {
|
|
84
|
+
"on_conversation_start": ["Read CLAUDE.md", "Check BLUEPRINT.md exists", "Route via system/router.md"],
|
|
85
|
+
"on_blueprint_missing": ["Run project audit", "Generate AI_RULES.md + BLUEPRINT.md", "Present for approval"],
|
|
86
|
+
"on_task_start": ["Read CLAUDE.md", "Route via system/router.md"],
|
|
87
|
+
"on_implementation_complete": ["Enter VERIFY phase", "Run verify_loop"],
|
|
88
|
+
"on_verification_failed": ["Enter FIX phase", "Run fix_loop"],
|
|
89
|
+
"on_verification_passed": ["Check if audit required", "Proceed accordingly"],
|
|
90
|
+
"on_commit_requested": ["Run pre_commit_gate", "Wait for approval"],
|
|
91
|
+
"on_feature_complete": ["Check if BLUEPRINT.md needs update", "Present update for approval"]
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
"loops": {
|
|
95
|
+
"verify_loop": {
|
|
96
|
+
"command": "npm run verify",
|
|
97
|
+
"maxIterations": 10,
|
|
98
|
+
"onFail": "fix_loop"
|
|
99
|
+
},
|
|
100
|
+
"fix_loop": {
|
|
101
|
+
"maxIterations": 10,
|
|
102
|
+
"onComplete": "verify_loop"
|
|
103
|
+
},
|
|
104
|
+
"audit_loop": {
|
|
105
|
+
"commands": ["npm run audit:ui", "npm run audit:cycles"],
|
|
106
|
+
"maxIterations": 5
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
"commands": {
|
|
111
|
+
"verify": "npm run verify",
|
|
112
|
+
"typecheck": "npm run typecheck",
|
|
113
|
+
"lint": "npm run lint",
|
|
114
|
+
"audit:ui": "npm run audit:ui",
|
|
115
|
+
"audit:cycles": "npm run audit:cycles",
|
|
116
|
+
"format": "npm run format"
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
"rules": {
|
|
120
|
+
"noPartialImplementations": true,
|
|
121
|
+
"noTodoComments": true,
|
|
122
|
+
"noConsoleLogs": true,
|
|
123
|
+
"noOrphanFeatures": true,
|
|
124
|
+
"noCircularDependencies": true,
|
|
125
|
+
"conventionalCommits": true,
|
|
126
|
+
"oneFeatureAtATime": true,
|
|
127
|
+
"readBeforeWrite": true
|
|
128
|
+
}
|
|
129
|
+
}
|
package/.prettierrc
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"recommendations": [
|
|
3
|
+
// Essential for AutoWorkflow
|
|
4
|
+
"dbaeumer.vscode-eslint",
|
|
5
|
+
"esbenp.prettier-vscode",
|
|
6
|
+
|
|
7
|
+
// TypeScript
|
|
8
|
+
"ms-vscode.vscode-typescript-next",
|
|
9
|
+
|
|
10
|
+
// Tailwind CSS
|
|
11
|
+
"bradlc.vscode-tailwindcss",
|
|
12
|
+
|
|
13
|
+
// React
|
|
14
|
+
"dsznajder.es7-react-js-snippets",
|
|
15
|
+
|
|
16
|
+
// Git
|
|
17
|
+
"eamodio.gitlens",
|
|
18
|
+
|
|
19
|
+
// Code Quality
|
|
20
|
+
"streetsidesoftware.code-spell-checker",
|
|
21
|
+
"usernamehw.errorlens",
|
|
22
|
+
|
|
23
|
+
// Claude Code (if available)
|
|
24
|
+
"anthropic.claude-code"
|
|
25
|
+
],
|
|
26
|
+
"unwantedRecommendations": []
|
|
27
|
+
}
|