autoworkflow 3.0.0 → 3.1.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/hooks/audit-runner.sh +191 -0
- package/.claude/hooks/blueprint-generator.sh +253 -0
- package/.claude/hooks/phase-transition.sh +279 -0
- package/.claude/hooks/post-edit.sh +218 -14
- package/.claude/hooks/pre-commit-check.sh +222 -41
- package/.claude/hooks/pre-tool-router.sh +67 -0
- package/.claude/hooks/session-check.sh +328 -41
- package/.claude/settings.json +78 -21
- package/.claude/settings.local.json +5 -1
- package/CLAUDE.md +145 -49
- package/bin/cli.js +9 -1
- package/instructions/CLAUDE.md +22 -0
- package/package.json +1 -1
- package/system/triggers.md +243 -235
package/system/triggers.md
CHANGED
|
@@ -2,130 +2,108 @@
|
|
|
2
2
|
|
|
3
3
|
> Event-driven actions that control Claude's workflow behavior.
|
|
4
4
|
> These triggers fire automatically based on context and events.
|
|
5
|
+
>
|
|
6
|
+
> **IMPLEMENTATION:** All triggers are now implemented as shell scripts in `.claude/hooks/`
|
|
5
7
|
|
|
6
8
|
---
|
|
7
9
|
|
|
8
|
-
## Trigger
|
|
10
|
+
## Trigger Implementation Map
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
| Trigger | Hook Script | Event |
|
|
13
|
+
|---------|-------------|-------|
|
|
14
|
+
| `on:conversation_start` | `session-check.sh` | UserPromptSubmit |
|
|
15
|
+
| `on:blueprint_missing` | `session-check.sh` + `blueprint-generator.sh` | UserPromptSubmit |
|
|
16
|
+
| `on:init_needed` | `session-check.sh` | UserPromptSubmit |
|
|
17
|
+
| `on:task_received` | `session-check.sh` | UserPromptSubmit |
|
|
18
|
+
| `on:phase_transition` | `phase-transition.sh` | Manual call |
|
|
19
|
+
| `on:implementation_complete` | `post-edit.sh` | PostToolUse (Write\|Edit) |
|
|
20
|
+
| `on:verification_failed` | `post-edit.sh` | PostToolUse (Write\|Edit) |
|
|
21
|
+
| `on:verification_passed` | `post-edit.sh` | PostToolUse (Write\|Edit) |
|
|
22
|
+
| `on:commit_requested` | `pre-tool-router.sh` → `pre-commit-check.sh` | PreToolUse (Bash) |
|
|
11
23
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
4. If NO → Trigger `on:blueprint_missing`
|
|
18
|
-
5. If YES → Load blueprint and proceed
|
|
19
|
-
6. Load `system/router.md` to determine task type
|
|
20
|
-
7. Load `system/gates.md` for blocking rules
|
|
21
|
-
8. Await user request
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## State Management
|
|
27
|
+
|
|
28
|
+
All workflow state is stored in `.claude/.autoworkflow/`:
|
|
22
29
|
|
|
23
30
|
```
|
|
24
|
-
|
|
25
|
-
├──
|
|
26
|
-
|
|
27
|
-
├──
|
|
28
|
-
├──
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
├──
|
|
32
|
-
├──
|
|
33
|
-
|
|
31
|
+
.claude/.autoworkflow/
|
|
32
|
+
├── session-id # Current session identifier
|
|
33
|
+
├── phase # Current workflow phase
|
|
34
|
+
├── task-type # Classified task type
|
|
35
|
+
├── verify-iteration # Current verify loop count
|
|
36
|
+
├── verify-status # PASSED/FAILED/BLOCKED
|
|
37
|
+
├── audit-iteration # Current audit loop count
|
|
38
|
+
├── audit-status # PASSED/FAILED/BLOCKED
|
|
39
|
+
├── gate-status # Last gate check result
|
|
40
|
+
├── gate-errors # Number of gate errors
|
|
41
|
+
├── plan-approved # Plan approval status
|
|
42
|
+
├── changed-files # List of modified files
|
|
43
|
+
└── blueprint-checked # Blueprint check done flag
|
|
34
44
|
```
|
|
35
45
|
|
|
36
46
|
---
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
## Trigger Definitions
|
|
39
49
|
|
|
40
|
-
|
|
41
|
-
**Action:**
|
|
42
|
-
1. Notify user that autoworkflow needs setup
|
|
43
|
-
2. Suggest running /init command
|
|
50
|
+
### `on:conversation_start`
|
|
44
51
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
**When:** Claude begins a new conversation or task
|
|
53
|
+
**Hook:** `.claude/hooks/session-check.sh`
|
|
54
|
+
**Event:** `UserPromptSubmit`
|
|
55
|
+
|
|
56
|
+
**Actions:**
|
|
57
|
+
1. Initialize session state (create session-id)
|
|
58
|
+
2. Reset iteration counters
|
|
59
|
+
3. Check if autoworkflow needs initialization
|
|
60
|
+
4. Check if `instructions/BLUEPRINT.md` exists
|
|
61
|
+
5. If NO → Trigger `on:blueprint_missing`
|
|
62
|
+
6. If YES → Load blueprint and proceed
|
|
63
|
+
7. Show current workflow state
|
|
51
64
|
|
|
52
|
-
|
|
65
|
+
```bash
|
|
66
|
+
# Implementation
|
|
67
|
+
./.claude/hooks/session-check.sh
|
|
53
68
|
```
|
|
54
|
-
📦 **AutoWorkflow detected in node_modules**
|
|
55
69
|
|
|
56
|
-
|
|
70
|
+
---
|
|
57
71
|
|
|
58
|
-
|
|
59
|
-
- CLAUDE.md (entry point)
|
|
60
|
-
- system/ (triggers, loops, gates)
|
|
61
|
-
- instructions/ (workflow, rules, blueprint)
|
|
62
|
-
- .claude/ (commands)
|
|
63
|
-
- scripts/ (automation)
|
|
64
|
-
- hooks/ (git hooks)
|
|
72
|
+
### `on:init_needed`
|
|
65
73
|
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
**When:** autoworkflow is in node_modules but CLAUDE.md is missing
|
|
75
|
+
**Hook:** `.claude/hooks/session-check.sh`
|
|
76
|
+
**Trigger Condition:** `[ -d "node_modules/autoworkflow" ] && [ ! -f "CLAUDE.md" ]`
|
|
77
|
+
|
|
78
|
+
**Actions:**
|
|
79
|
+
1. Notify user that autoworkflow needs setup
|
|
80
|
+
2. Suggest running `npx autoworkflow init`
|
|
68
81
|
|
|
69
82
|
---
|
|
70
83
|
|
|
71
84
|
### `on:blueprint_missing`
|
|
72
85
|
|
|
73
86
|
**When:** BLUEPRINT.md does not exist at session start
|
|
87
|
+
**Hook:** `.claude/hooks/session-check.sh` + `.claude/hooks/blueprint-generator.sh`
|
|
74
88
|
**Behavior:** AUTOMATIC - runs without asking permission
|
|
75
89
|
|
|
76
|
-
**IMPORTANT:** This trigger runs AUTOMATICALLY
|
|
77
|
-
|
|
90
|
+
**IMPORTANT:** This trigger runs AUTOMATICALLY:
|
|
91
|
+
- Do NOT ask "Should I run the audit?"
|
|
92
|
+
- Do NOT wait for permission to start
|
|
93
|
+
- Just notify and run immediately
|
|
94
|
+
- Only ask permission when presenting results to SAVE
|
|
78
95
|
|
|
79
|
-
**
|
|
96
|
+
**Actions:**
|
|
80
97
|
1. Notify user (brief message)
|
|
81
98
|
2. **RUN audit immediately** (no permission needed)
|
|
82
|
-
3.
|
|
83
|
-
4.
|
|
84
|
-
5.
|
|
99
|
+
3. Scan: package.json, src/, pages/, components/, api/
|
|
100
|
+
4. Generate BOTH AI_RULES.md updates AND BLUEPRINT.md
|
|
101
|
+
5. Present proposed updates to user
|
|
102
|
+
6. Ask approval to SAVE (not to start)
|
|
85
103
|
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
├── RUN IMMEDIATELY (no permission needed): ← Auto-run
|
|
90
|
-
│ ├── cat package.json → Tech stack
|
|
91
|
-
│ ├── find src -type d → File structure
|
|
92
|
-
│ ├── ls src/pages/ → Routes
|
|
93
|
-
│ ├── ls src/components/ → Components
|
|
94
|
-
│ ├── find src/api/ → API endpoints
|
|
95
|
-
│ └── grep -r "fetch\|/api/" → Connections
|
|
96
|
-
│
|
|
97
|
-
├── Generate: AI_RULES.md updates (Tech Stack, File Structure)
|
|
98
|
-
├── Generate: BLUEPRINT.md (Features, Routes, APIs)
|
|
99
|
-
├── Present: both updates to user
|
|
100
|
-
├── Await: approval TO SAVE (not to start) ← Only save needs approval
|
|
101
|
-
└── Save: both files after approval
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
**DO NOT:**
|
|
105
|
-
- Ask "Should I run the audit?"
|
|
106
|
-
- Ask "Do you want me to scan the project?"
|
|
107
|
-
- Wait for permission to start scanning
|
|
108
|
-
|
|
109
|
-
**DO:**
|
|
110
|
-
- Notify and immediately start scanning
|
|
111
|
-
- Only ask permission when presenting results to save
|
|
112
|
-
|
|
113
|
-
**Output Format:**
|
|
114
|
-
```
|
|
115
|
-
⚠️ No BLUEPRINT.md found.
|
|
116
|
-
|
|
117
|
-
Running project audit now...
|
|
118
|
-
|
|
119
|
-
[scanning happens automatically]
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## 🔍 Audit Complete
|
|
124
|
-
|
|
125
|
-
[present AI_RULES.md updates]
|
|
126
|
-
[present BLUEPRINT.md content]
|
|
127
|
-
|
|
128
|
-
**Should I save these files?** (yes/no/edit first)
|
|
104
|
+
```bash
|
|
105
|
+
# To run the blueprint generator:
|
|
106
|
+
./.claude/hooks/blueprint-generator.sh
|
|
129
107
|
```
|
|
130
108
|
|
|
131
109
|
---
|
|
@@ -133,52 +111,87 @@ Running project audit now...
|
|
|
133
111
|
### `on:task_received`
|
|
134
112
|
|
|
135
113
|
**When:** User provides a task or request
|
|
136
|
-
**
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
114
|
+
**Hook:** `.claude/hooks/session-check.sh`
|
|
115
|
+
**Function:** `classify_task()`
|
|
116
|
+
|
|
117
|
+
**Classification Keywords:**
|
|
118
|
+
|
|
119
|
+
| Task Type | Keywords |
|
|
120
|
+
|-----------|----------|
|
|
121
|
+
| query | what, how, why, explain, show me, find |
|
|
122
|
+
| feature | add, create, implement, build, new |
|
|
123
|
+
| fix | fix, bug, broken, error, issue, problem |
|
|
124
|
+
| refactor | refactor, clean up, restructure, rename |
|
|
125
|
+
| style | style, css, color, layout, design |
|
|
126
|
+
| docs | document, readme, comment, jsdoc |
|
|
127
|
+
| test | test, spec, coverage, unit test |
|
|
128
|
+
| perf | performance, optimize, speed, slow |
|
|
129
|
+
| security | security, vulnerability, auth |
|
|
130
|
+
| config | config, setting, environment, setup |
|
|
131
|
+
|
|
132
|
+
**Actions:**
|
|
133
|
+
1. Parse user request
|
|
134
|
+
2. Classify task type
|
|
135
|
+
3. Save to `.claude/.autoworkflow/task-type`
|
|
136
|
+
4. Set phase to ANALYZE
|
|
137
|
+
5. Display workflow for task type
|
|
149
138
|
|
|
150
139
|
---
|
|
151
140
|
|
|
152
141
|
### `on:phase_transition`
|
|
153
142
|
|
|
154
143
|
**When:** Moving from one workflow phase to another
|
|
155
|
-
**
|
|
156
|
-
|
|
157
|
-
2. If gate passes → proceed to next phase
|
|
158
|
-
3. If gate fails → BLOCK and report
|
|
144
|
+
**Hook:** `.claude/hooks/phase-transition.sh`
|
|
145
|
+
**Usage:** Manual invocation
|
|
159
146
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
147
|
+
**Commands:**
|
|
148
|
+
```bash
|
|
149
|
+
# Transition between phases (checks gates)
|
|
150
|
+
./.claude/hooks/phase-transition.sh transition PLAN IMPLEMENT
|
|
151
|
+
|
|
152
|
+
# Record plan approval
|
|
153
|
+
./.claude/hooks/phase-transition.sh approve
|
|
154
|
+
|
|
155
|
+
# Record plan rejection
|
|
156
|
+
./.claude/hooks/phase-transition.sh reject
|
|
157
|
+
|
|
158
|
+
# Reset workflow state
|
|
159
|
+
./.claude/hooks/phase-transition.sh reset
|
|
160
|
+
|
|
161
|
+
# Show current state
|
|
162
|
+
./.claude/hooks/phase-transition.sh status
|
|
165
163
|
```
|
|
166
164
|
|
|
165
|
+
**Gate Checks:**
|
|
166
|
+
- `PLAN` → Checks analyze_gate
|
|
167
|
+
- `IMPLEMENT` → Checks plan_approval_gate (BLOCKING)
|
|
168
|
+
- `AUDIT` → Checks verify_gate
|
|
169
|
+
- `COMMIT` → Checks verify_gate + audit_gate
|
|
170
|
+
|
|
167
171
|
---
|
|
168
172
|
|
|
169
173
|
### `on:implementation_complete`
|
|
170
174
|
|
|
171
175
|
**When:** Claude finishes writing/modifying code
|
|
172
|
-
**
|
|
176
|
+
**Hook:** `.claude/hooks/post-edit.sh`
|
|
177
|
+
**Event:** `PostToolUse` for `Write|Edit`
|
|
178
|
+
|
|
179
|
+
**Actions:**
|
|
173
180
|
1. Enter VERIFY phase automatically
|
|
174
|
-
2.
|
|
175
|
-
3.
|
|
181
|
+
2. Run `npm run verify` (or typecheck + lint)
|
|
182
|
+
3. Track iteration count (max 10)
|
|
183
|
+
4. If PASS → Reset counter, proceed to AUDIT or COMMIT
|
|
184
|
+
5. If FAIL → Enter FIX phase, report errors
|
|
176
185
|
|
|
186
|
+
**Output:**
|
|
177
187
|
```
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
188
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
189
|
+
AUTOWORKFLOW: VERIFY LOOP (Iteration 1/10)
|
|
190
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
191
|
+
|
|
192
|
+
Running: npm run verify
|
|
193
|
+
|
|
194
|
+
✅ VERIFICATION PASSED
|
|
182
195
|
```
|
|
183
196
|
|
|
184
197
|
---
|
|
@@ -186,54 +199,60 @@ TRIGGER: implementation_complete
|
|
|
186
199
|
### `on:verification_failed`
|
|
187
200
|
|
|
188
201
|
**When:** `npm run verify` returns errors
|
|
189
|
-
**
|
|
190
|
-
|
|
191
|
-
2. Enter FIX phase
|
|
192
|
-
3. Start `fix_loop` from `system/loops.md`
|
|
202
|
+
**Hook:** `.claude/hooks/post-edit.sh`
|
|
203
|
+
**Automatic:** Triggers when verification fails
|
|
193
204
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
```
|
|
205
|
+
**Actions:**
|
|
206
|
+
1. Parse error output
|
|
207
|
+
2. Increment iteration counter
|
|
208
|
+
3. Set phase to FIX
|
|
209
|
+
4. Report errors with file:line
|
|
210
|
+
5. Wait for fixes, then re-verify on next edit
|
|
201
211
|
|
|
202
212
|
---
|
|
203
213
|
|
|
204
214
|
### `on:verification_passed`
|
|
205
215
|
|
|
206
216
|
**When:** `npm run verify` returns success
|
|
207
|
-
**
|
|
208
|
-
|
|
209
|
-
2. If yes → enter AUDIT phase
|
|
210
|
-
3. If no → proceed to COMMIT gate
|
|
217
|
+
**Hook:** `.claude/hooks/post-edit.sh`
|
|
218
|
+
**Automatic:** Triggers when verification passes
|
|
211
219
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
└── Report: ready status
|
|
218
|
-
```
|
|
220
|
+
**Actions:**
|
|
221
|
+
1. Reset iteration counter
|
|
222
|
+
2. Check if audits required (feature/refactor)
|
|
223
|
+
3. If yes → Set phase to AUDIT
|
|
224
|
+
4. If no → Set phase to PRE_COMMIT
|
|
219
225
|
|
|
220
226
|
---
|
|
221
227
|
|
|
222
228
|
### `on:commit_requested`
|
|
223
229
|
|
|
224
|
-
**When:** User asks to commit or
|
|
225
|
-
**
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
+
**When:** User asks to commit or runs git commit
|
|
231
|
+
**Hook:** `.claude/hooks/pre-tool-router.sh` → `.claude/hooks/pre-commit-check.sh`
|
|
232
|
+
**Event:** `PreToolUse` for `Bash` (only git commit commands)
|
|
233
|
+
|
|
234
|
+
**Gate Checks (all must pass):**
|
|
235
|
+
1. TypeScript errors = 0
|
|
236
|
+
2. ESLint warnings = 0
|
|
237
|
+
3. No TODO/FIXME in staged files
|
|
238
|
+
4. No console.log in staged files
|
|
239
|
+
5. No orphan features (audit:ui)
|
|
240
|
+
6. No circular dependencies (audit:cycles)
|
|
241
|
+
7. Conventional commit format
|
|
242
|
+
|
|
243
|
+
**On FAIL:** Exit with code 1 → BLOCKS the commit
|
|
230
244
|
|
|
231
245
|
```
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
246
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
247
|
+
AUTOWORKFLOW: PRE-COMMIT GATE
|
|
248
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
249
|
+
|
|
250
|
+
[1/7] TypeScript: ✅ PASS
|
|
251
|
+
[2/7] ESLint: ✅ PASS
|
|
252
|
+
[3/7] TODO/FIXME: ⛔ FAIL
|
|
253
|
+
└── Found in 2 file(s)
|
|
254
|
+
|
|
255
|
+
⛔ GATE BLOCKED - 1 issue(s) must be fixed
|
|
237
256
|
```
|
|
238
257
|
|
|
239
258
|
---
|
|
@@ -241,76 +260,67 @@ TRIGGER: commit_requested
|
|
|
241
260
|
### `on:error_detected`
|
|
242
261
|
|
|
243
262
|
**When:** Any error occurs during execution
|
|
244
|
-
**
|
|
263
|
+
**Handling:** Inline in post-edit.sh and pre-commit-check.sh
|
|
264
|
+
|
|
265
|
+
**Actions:**
|
|
245
266
|
1. Identify error type
|
|
246
267
|
2. Route to appropriate fix strategy
|
|
247
268
|
3. Enter FIX phase if code error
|
|
248
269
|
4. Report if environmental error
|
|
249
270
|
|
|
250
|
-
```
|
|
251
|
-
TRIGGER: error_detected(error_type)
|
|
252
|
-
├── Identify: error_type
|
|
253
|
-
├── If code_error → Enter: FIX phase
|
|
254
|
-
├── If env_error → Report: to user
|
|
255
|
-
└── If unknown → Ask: user for guidance
|
|
256
|
-
```
|
|
257
|
-
|
|
258
271
|
---
|
|
259
272
|
|
|
260
273
|
### `on:file_changed`
|
|
261
274
|
|
|
262
275
|
**When:** Claude modifies a file
|
|
263
|
-
**
|
|
276
|
+
**Hook:** `.claude/hooks/post-edit.sh`
|
|
277
|
+
**Tracking:** Files added to `.claude/.autoworkflow/changed-files`
|
|
278
|
+
|
|
279
|
+
**Actions:**
|
|
264
280
|
1. Mark file as changed
|
|
265
281
|
2. Queue for verification
|
|
266
|
-
3.
|
|
267
|
-
4. If outside phase → trigger verification
|
|
268
|
-
|
|
269
|
-
```
|
|
270
|
-
TRIGGER: file_changed(file_path)
|
|
271
|
-
├── Track: changed_files.add(file_path)
|
|
272
|
-
├── If IMPLEMENT phase → Continue
|
|
273
|
-
├── If other phase → Queue: verification
|
|
274
|
-
└── Update: state
|
|
275
|
-
```
|
|
282
|
+
3. Auto-trigger verify loop
|
|
276
283
|
|
|
277
284
|
---
|
|
278
285
|
|
|
279
286
|
### `on:user_approval`
|
|
280
287
|
|
|
281
288
|
**When:** User approves a plan or action
|
|
282
|
-
**
|
|
283
|
-
1. Record approval
|
|
284
|
-
2. Proceed to next phase
|
|
285
|
-
3. If plan approval → enter IMPLEMENT
|
|
286
|
-
4. If commit approval → execute commit
|
|
289
|
+
**Hook:** `.claude/hooks/phase-transition.sh approve`
|
|
287
290
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
291
|
+
**Detection Keywords:**
|
|
292
|
+
- "yes" / "y" / "yeah" / "yep"
|
|
293
|
+
- "proceed" / "go ahead" / "do it"
|
|
294
|
+
- "approved" / "lgtm" / "looks good"
|
|
295
|
+
- "all" / "include all" (for suggestions)
|
|
296
|
+
|
|
297
|
+
**Actions:**
|
|
298
|
+
1. Record approval to `.claude/.autoworkflow/plan-approved`
|
|
299
|
+
2. Proceed to IMPLEMENT phase
|
|
295
300
|
|
|
296
301
|
---
|
|
297
302
|
|
|
298
303
|
### `on:user_rejection`
|
|
299
304
|
|
|
300
305
|
**When:** User rejects a plan or action
|
|
301
|
-
**
|
|
306
|
+
**Hook:** `.claude/hooks/phase-transition.sh reject`
|
|
307
|
+
|
|
308
|
+
**Actions:**
|
|
302
309
|
1. Record rejection
|
|
303
310
|
2. Ask for feedback
|
|
304
311
|
3. Return to PLAN phase
|
|
305
|
-
4. Revise based on feedback
|
|
306
312
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
### `on:feature_complete`
|
|
316
|
+
|
|
317
|
+
**When:** A new feature, route, or API is successfully committed
|
|
318
|
+
**Handling:** Manual check after commit
|
|
319
|
+
|
|
320
|
+
**Actions:**
|
|
321
|
+
1. Check if BLUEPRINT.md needs updating
|
|
322
|
+
2. Present proposed updates
|
|
323
|
+
3. Update after approval
|
|
314
324
|
|
|
315
325
|
---
|
|
316
326
|
|
|
@@ -373,44 +383,42 @@ When multiple triggers could fire, use this priority:
|
|
|
373
383
|
|
|
374
384
|
---
|
|
375
385
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
**Should I update BLUEPRINT.md?**
|
|
386
|
+
## Hook Configuration
|
|
387
|
+
|
|
388
|
+
All hooks are configured in `.claude/settings.json`:
|
|
389
|
+
|
|
390
|
+
```json
|
|
391
|
+
{
|
|
392
|
+
"hooks": {
|
|
393
|
+
"UserPromptSubmit": [
|
|
394
|
+
{
|
|
395
|
+
"matcher": "",
|
|
396
|
+
"hooks": [{
|
|
397
|
+
"type": "command",
|
|
398
|
+
"command": "./.claude/hooks/session-check.sh"
|
|
399
|
+
}]
|
|
400
|
+
}
|
|
401
|
+
],
|
|
402
|
+
"PostToolUse": [
|
|
403
|
+
{
|
|
404
|
+
"matcher": "Write|Edit",
|
|
405
|
+
"hooks": [{
|
|
406
|
+
"type": "command",
|
|
407
|
+
"command": "./.claude/hooks/post-edit.sh"
|
|
408
|
+
}]
|
|
409
|
+
}
|
|
410
|
+
],
|
|
411
|
+
"PreToolUse": [
|
|
412
|
+
{
|
|
413
|
+
"matcher": "Bash",
|
|
414
|
+
"hooks": [{
|
|
415
|
+
"type": "command",
|
|
416
|
+
"command": "./.claude/hooks/pre-tool-router.sh \"$TOOL_INPUT\""
|
|
417
|
+
}]
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
}
|
|
421
|
+
}
|
|
414
422
|
```
|
|
415
423
|
|
|
416
424
|
---
|