autoworkflow 3.8.3 → 3.9.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/.autoworkflow/memories/.gitkeep +2 -0
- package/.claude/.autoworkflow/memories/blockers.md +23 -0
- package/.claude/.autoworkflow/memories/decisions.md +23 -0
- package/.claude/.autoworkflow/memories/patterns.md +24 -0
- package/.claude/commands/audit.md +27 -29
- package/.claude/commands/init.md +5 -4
- package/.claude/hooks/blueprint-generator.sh +284 -22
- package/.claude/hooks/phase-transition.sh +200 -0
- package/.claude/hooks/pre-tool-router.sh +139 -1
- package/.claude/hooks/session-check.sh +74 -18
- package/.claude/settings.json +2 -2
- package/.claude/settings.local.json +7 -1
- package/CLAUDE.md +118 -8
- package/README.md +59 -125
- package/bin/cli.js +6 -6
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
.claude/settings.json → HOOK CONFIG + SYSTEM INSTRUCTIONS
|
|
31
31
|
.claude/.autoworkflow/ → STATE FILES (phase, iterations, etc.)
|
|
32
32
|
CLAUDE.md (this file) → WORKFLOW SUMMARY
|
|
33
|
-
instructions/ → AI_RULES.md +
|
|
33
|
+
instructions/ → AI_RULES.md + user's documentation
|
|
34
34
|
system/ → DETAILED REFERENCE (gates, loops, triggers, router)
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -42,7 +42,7 @@ system/ → DETAILED REFERENCE (gates, loops, triggers, router
|
|
|
42
42
|
|
|
43
43
|
| Event | Hook | Output to Claude |
|
|
44
44
|
|-------|------|------------------|
|
|
45
|
-
| User message | `session-check.sh` | "
|
|
45
|
+
| User message | `session-check.sh` | "Provide your project documentation" |
|
|
46
46
|
| After Write/Edit | `post-edit.sh` | Runs `npm run verify`, shows errors |
|
|
47
47
|
| Before git commit | `pre-tool-router.sh` | Runs all 7 gate checks, BLOCKS if fail |
|
|
48
48
|
|
|
@@ -58,14 +58,14 @@ ANALYZE → PLAN → CONFIRM → IMPLEMENT → VERIFY → AUDIT → COMMIT → U
|
|
|
58
58
|
|
|
59
59
|
| Phase | What Claude Does |
|
|
60
60
|
|-------|------------------|
|
|
61
|
-
| ANALYZE | Read relevant files, check
|
|
61
|
+
| ANALYZE | Read relevant files, check user's documentation |
|
|
62
62
|
| PLAN | Design approach, show suggestions |
|
|
63
63
|
| CONFIRM | **Wait for user approval** |
|
|
64
64
|
| IMPLEMENT | Make changes (after approval only) |
|
|
65
65
|
| VERIFY | Run `npm run verify` - **AUTO-TRIGGERED** |
|
|
66
66
|
| AUDIT | Run `npm run audit:ui` + `audit:cycles` |
|
|
67
67
|
| COMMIT | Conventional commit format - **BLOCKED if checks fail** |
|
|
68
|
-
| UPDATE |
|
|
68
|
+
| UPDATE | Note changes in session context |
|
|
69
69
|
|
|
70
70
|
---
|
|
71
71
|
|
|
@@ -124,6 +124,72 @@ All state stored in `.claude/.autoworkflow/`:
|
|
|
124
124
|
|
|
125
125
|
---
|
|
126
126
|
|
|
127
|
+
## Memory System (Serena-inspired)
|
|
128
|
+
|
|
129
|
+
Persistent context that survives across sessions. Stored in `.claude/.autoworkflow/memories/`.
|
|
130
|
+
|
|
131
|
+
| File | Purpose |
|
|
132
|
+
|------|---------|
|
|
133
|
+
| `decisions.md` | Document architectural/implementation choices |
|
|
134
|
+
| `patterns.md` | Record discovered codebase patterns |
|
|
135
|
+
| `blockers.md` | Track known issues and workarounds |
|
|
136
|
+
| `context.md` | Session continuity (auto-generated) |
|
|
137
|
+
|
|
138
|
+
**Memory Commands:**
|
|
139
|
+
```bash
|
|
140
|
+
# Save a decision
|
|
141
|
+
.claude/hooks/phase-transition.sh memory-save decisions "auth-approach" "Chose JWT over sessions for stateless API"
|
|
142
|
+
|
|
143
|
+
# Read memories
|
|
144
|
+
.claude/hooks/phase-transition.sh memory-read decisions
|
|
145
|
+
|
|
146
|
+
# List all categories
|
|
147
|
+
.claude/hooks/phase-transition.sh memory-list
|
|
148
|
+
|
|
149
|
+
# Save context for next session
|
|
150
|
+
.claude/hooks/phase-transition.sh context-save "Implementing user auth"
|
|
151
|
+
|
|
152
|
+
# Load previous context
|
|
153
|
+
.claude/hooks/phase-transition.sh context-load
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Reflection Prompts (Serena-inspired)
|
|
159
|
+
|
|
160
|
+
Before each phase transition, Claude receives reflection prompts to self-assess:
|
|
161
|
+
|
|
162
|
+
| Phase | Reflection |
|
|
163
|
+
|-------|------------|
|
|
164
|
+
| PLAN | Have you read all relevant files? Understood existing patterns? |
|
|
165
|
+
| IMPLEMENT | Does this match the request? Considered all affected files? |
|
|
166
|
+
| VERIFY | Is implementation complete? Edge cases handled? |
|
|
167
|
+
| COMMIT | Would you be confident shipping this? |
|
|
168
|
+
|
|
169
|
+
**Manual reflection:**
|
|
170
|
+
```bash
|
|
171
|
+
.claude/hooks/phase-transition.sh reflect PLAN
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Mode Restrictions (Serena-inspired)
|
|
177
|
+
|
|
178
|
+
Task types have different allowed operations:
|
|
179
|
+
|
|
180
|
+
| Mode | Restrictions |
|
|
181
|
+
|------|--------------|
|
|
182
|
+
| `docs` | Warn on non-.md file creation |
|
|
183
|
+
| `fix` | Warn on new file creation, dependency changes |
|
|
184
|
+
| `refactor` | Warn on behavior-changing operations (migrations) |
|
|
185
|
+
| `query` | Warn on any modifications (read-only) |
|
|
186
|
+
|
|
187
|
+
Phase restrictions:
|
|
188
|
+
- `ANALYZE`/`PLAN` phases warn on file creation/dependency changes
|
|
189
|
+
- Must reach `IMPLEMENT` phase before making modifications
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
127
193
|
## Blocking Rules
|
|
128
194
|
|
|
129
195
|
- **No orphan features** - Backend must have UI
|
|
@@ -142,7 +208,7 @@ All state stored in `.claude/.autoworkflow/`:
|
|
|
142
208
|
| `/plan [task]` | Create implementation plan |
|
|
143
209
|
| `/verify` | Run TypeScript + ESLint |
|
|
144
210
|
| `/audit` | Run UI + cycle audits |
|
|
145
|
-
| `/audit project` | Full project scan →
|
|
211
|
+
| `/audit project` | Full project scan → technical context |
|
|
146
212
|
| `/commit [msg]` | Pre-commit gate + commit |
|
|
147
213
|
| `/init` | Set up AutoWorkflow files |
|
|
148
214
|
| `/fix` | Fix verification errors |
|
|
@@ -172,7 +238,51 @@ npm run format # Prettier
|
|
|
172
238
|
| `pre-commit-check.sh` | Before git commit | All 7 gate checks, BLOCKS |
|
|
173
239
|
| `phase-transition.sh` | Manual call | State management |
|
|
174
240
|
| `audit-runner.sh` | Manual call | Run UI + cycle audits |
|
|
175
|
-
| `blueprint-generator.sh` | Manual call |
|
|
241
|
+
| `blueprint-generator.sh` | Manual call | Enhanced project discovery (8 scans) |
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Documentation Workflow
|
|
246
|
+
|
|
247
|
+
Your project documentation is the single source of truth:
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
251
|
+
│ Session Start │
|
|
252
|
+
│ ↓ │
|
|
253
|
+
│ USER PROVIDES: PRD / Spec / Userflow / Implementation │
|
|
254
|
+
│ ↓ │
|
|
255
|
+
│ THAT DOCUMENT = SOURCE OF TRUTH │
|
|
256
|
+
│ ↓ │
|
|
257
|
+
│ Referenced for ALL tasks │
|
|
258
|
+
└─────────────────────────────────────────────────────────────┘
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**How it works:**
|
|
262
|
+
1. Provide your documentation (PRD, spec, userflow, implementation guide)
|
|
263
|
+
2. That document is used directly - no transformation or format conversion
|
|
264
|
+
3. All tasks reference your document as the single source of truth
|
|
265
|
+
|
|
266
|
+
**No BLUEPRINT.md generation.** Your document IS the blueprint.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Project Discovery (Serena-inspired)
|
|
271
|
+
|
|
272
|
+
`/audit project` runs 8 scans for technical context:
|
|
273
|
+
|
|
274
|
+
| Scan | What It Detects |
|
|
275
|
+
|------|-----------------|
|
|
276
|
+
| Architecture | Monorepo, microservices, modular, feature-based, layered |
|
|
277
|
+
| Essential Commands | npm scripts, Makefile targets, tool configs |
|
|
278
|
+
| Tech Stack | Framework, styling, database, state, testing |
|
|
279
|
+
| Structure | Source directories, organization |
|
|
280
|
+
| Routes | App Router, Pages Router, SPA routes |
|
|
281
|
+
| Components | React/Vue/Svelte components |
|
|
282
|
+
| API | REST endpoints, GraphQL |
|
|
283
|
+
| Environment | .env files, required variables, configs |
|
|
284
|
+
|
|
285
|
+
**Note:** Scans provide technical context. BLUEPRINT.md content comes from your documentation.
|
|
176
286
|
|
|
177
287
|
---
|
|
178
288
|
|
|
@@ -181,9 +291,9 @@ npm run format # Prettier
|
|
|
181
291
|
| File | Purpose |
|
|
182
292
|
|------|---------|
|
|
183
293
|
| `instructions/AI_RULES.md` | Your coding standards |
|
|
184
|
-
|
|
|
294
|
+
| User's documentation | Single source of truth (PRD/spec/userflow) |
|
|
185
295
|
|
|
186
|
-
If
|
|
296
|
+
If no documentation provided → Hook prompts user to provide it
|
|
187
297
|
|
|
188
298
|
---
|
|
189
299
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Automated workflow enforcement for Claude Code via hooks and system prompts.
|
|
4
4
|
|
|
5
|
-
**v3.8.
|
|
5
|
+
**v3.8.4** - Updated documentation + VS Code extension hook fix.
|
|
6
6
|
|
|
7
7
|
When you use Claude Code with AutoWorkflow, hooks automatically enforce workflow phases, block unauthorized edits, and guide Claude through a structured process for all coding tasks.
|
|
8
8
|
|
|
@@ -25,56 +25,27 @@ npx autoworkflow init
|
|
|
25
25
|
| `npx autoworkflow update` | Smart update - core files only, preserve user files |
|
|
26
26
|
| `npx autoworkflow status` | Show installed version and components |
|
|
27
27
|
|
|
28
|
-
### Smart Updates
|
|
28
|
+
### Smart Updates
|
|
29
29
|
|
|
30
|
-
The CLI
|
|
30
|
+
The CLI tracks installed versions and preserves user customizations:
|
|
31
31
|
|
|
32
32
|
```
|
|
33
33
|
npx autoworkflow status # Check version and what would change
|
|
34
|
-
npx autoworkflow update # Update core files, preserve
|
|
34
|
+
npx autoworkflow update # Update core files, preserve user files
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
| File Category | On `init` | On `update` |
|
|
38
38
|
|---------------|-----------|-------------|
|
|
39
39
|
| **Core** (hooks, system, CLAUDE.md) | Installed | Updated |
|
|
40
|
-
| **User** (
|
|
40
|
+
| **User** (AI_RULES.md, your docs) | Created if missing | **Preserved** |
|
|
41
41
|
| **Commands/Skills** | Installed | Updated |
|
|
42
42
|
| **Optional** (.vscode, configs) | Only with `--all` | Skipped |
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
46
|
-
##
|
|
46
|
+
## Key Features
|
|
47
47
|
|
|
48
|
-
###
|
|
49
|
-
Previous versions "failed open" - if state wasn't set, edits were allowed. v3.7.0 "fails closed":
|
|
50
|
-
|
|
51
|
-
| Scenario | Before (v3.6) | After (v3.7) |
|
|
52
|
-
|----------|---------------|--------------|
|
|
53
|
-
| No workflow state | ✅ Allowed | ⛔ BLOCKED |
|
|
54
|
-
| Plan not approved | ⛔ Blocked (in PLAN phase only) | ⛔ BLOCKED (always) |
|
|
55
|
-
| No suggestions shown | ⛔ Blocked (in IMPLEMENT only) | ⛔ BLOCKED (always for features) |
|
|
56
|
-
| Multiple edits/turn | ⛔ Blocked (in FIX only) | ⛔ BLOCKED (always) |
|
|
57
|
-
|
|
58
|
-
### Auto-Initialization with Safe Defaults
|
|
59
|
-
When Claude attempts the first edit without workflow state:
|
|
60
|
-
1. Auto-creates state with `task-type: feature` (strictest)
|
|
61
|
-
2. Sets `plan-approved: false`
|
|
62
|
-
3. Sets `suggestions-shown: false`
|
|
63
|
-
4. **BLOCKS the edit** immediately
|
|
64
|
-
5. Claude must show plan/suggestions first, get approval, then try again
|
|
65
|
-
|
|
66
|
-
### Three Gates (All Must Pass)
|
|
67
|
-
```
|
|
68
|
-
GATE 1: Plan Approval → Must have user approval
|
|
69
|
-
GATE 2: Suggestions → Must show 3-tier suggestions (features)
|
|
70
|
-
GATE 3: One Edit/Turn → Max 1 edit per user message
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## What's New in v3.6.0
|
|
76
|
-
|
|
77
|
-
### Multi-Language Project Support
|
|
48
|
+
### Multi-Language Verification
|
|
78
49
|
Automatic verification for any project type:
|
|
79
50
|
|
|
80
51
|
| Project Type | Detection | Verification |
|
|
@@ -85,51 +56,25 @@ Automatic verification for any project type:
|
|
|
85
56
|
| Rust | `Cargo.toml` | cargo check + clippy |
|
|
86
57
|
| Go | `go.mod` | go vet + golangci-lint |
|
|
87
58
|
|
|
88
|
-
###
|
|
89
|
-
|
|
90
|
-
- ❌ "I found 14 issues, fixing them all now..."
|
|
91
|
-
- ✅ "I found 14 issues. Here are my suggestions. Which first?"
|
|
59
|
+
### Fail-Closed Enforcement
|
|
60
|
+
All gates are checked on every edit. Unknown state = strictest defaults:
|
|
92
61
|
|
|
93
|
-
|
|
62
|
+
| Gate | Blocks If | Applies To |
|
|
63
|
+
|------|-----------|------------|
|
|
64
|
+
| **Plan Approval** | User hasn't approved | feature, fix, refactor |
|
|
65
|
+
| **Suggestions** | 3-tier suggestions not shown | feature tasks |
|
|
66
|
+
| **One Edit/Turn** | Already edited this turn | strict task types |
|
|
67
|
+
|
|
68
|
+
### 3-Tier Suggestions
|
|
94
69
|
For feature tasks, Claude MUST show categorized suggestions:
|
|
95
70
|
- 🔴 **Required** - Must implement
|
|
96
71
|
- 🟡 **Recommended** - Should implement
|
|
97
72
|
- 🟢 **Optional** - Nice to have
|
|
98
73
|
|
|
99
|
-
Hook blocks implementation until suggestions are shown and user selects items.
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## What's New in v3.5.0
|
|
104
|
-
|
|
105
|
-
### Hook-Based Enforcement (Not Just Instructions)
|
|
106
|
-
|
|
107
|
-
| Hook | Event | Enforcement |
|
|
108
|
-
|------|-------|-------------|
|
|
109
|
-
| `pre-edit.sh` | PreToolUse (Write/Edit) | **BLOCKS** edits without plan approval |
|
|
110
|
-
| `post-commit.sh` | PostToolUse (Bash) | Auto-triggers BLUEPRINT update reminder |
|
|
111
|
-
| `session-check.sh` | UserPromptSubmit | Session resume with state display |
|
|
112
|
-
|
|
113
74
|
### 106 Skills Library
|
|
114
|
-
|
|
115
|
-
- Security patterns, debugging
|
|
116
|
-
- Framework-specific
|
|
117
|
-
- Auto-loaded via `skills_required` in command frontmatter
|
|
118
|
-
|
|
119
|
-
### Agent-Structured Commands
|
|
120
|
-
Each command has a role, output schema, and guardrails:
|
|
121
|
-
```yaml
|
|
122
|
-
---
|
|
123
|
-
role: Senior Code Reviewer
|
|
124
|
-
skills_required:
|
|
125
|
-
- security.md
|
|
126
|
-
- code-review.md
|
|
127
|
-
output_schema:
|
|
128
|
-
issues: [{severity, file, line, message}]
|
|
129
|
-
guardrails:
|
|
130
|
-
- Prioritize security issues above all else
|
|
131
|
-
---
|
|
132
|
-
```
|
|
75
|
+
Auto-loaded knowledge for each command via `skills_required` in command frontmatter:
|
|
76
|
+
- Security patterns, debugging, code review
|
|
77
|
+
- Framework-specific (React, Next.js, Laravel, Django, etc.)
|
|
133
78
|
|
|
134
79
|
---
|
|
135
80
|
|
|
@@ -137,14 +82,20 @@ guardrails:
|
|
|
137
82
|
|
|
138
83
|
```
|
|
139
84
|
┌─────────────────────────────────────────────────────────────┐
|
|
140
|
-
│ HOOKS (
|
|
85
|
+
│ HOOKS (10 Scripts) │
|
|
86
|
+
│ │
|
|
87
|
+
│ UserPromptSubmit → session-check.sh │
|
|
88
|
+
│ (resume, turn reset, blueprint check) │
|
|
89
|
+
│ │
|
|
90
|
+
│ PreToolUse → pre-edit.sh (Write/Edit) │
|
|
91
|
+
│ (3 gates: approval, suggestions, 1/turn)│
|
|
92
|
+
│ → pre-tool-router.sh (Bash) │
|
|
93
|
+
│ → pre-commit-check.sh (7 gate checks) │
|
|
141
94
|
│ │
|
|
142
|
-
│
|
|
143
|
-
│
|
|
144
|
-
│
|
|
145
|
-
│
|
|
146
|
-
│ PostToolUse → post-edit.sh (multi-lang verify) │
|
|
147
|
-
│ PostToolUse → post-commit.sh (BLUEPRINT reminder) │
|
|
95
|
+
│ PostToolUse → post-edit.sh (Write/Edit) │
|
|
96
|
+
│ (multi-lang verification loop) │
|
|
97
|
+
│ → post-bash-router.sh (Bash) │
|
|
98
|
+
│ → post-commit.sh (commit summary) │
|
|
148
99
|
│ │
|
|
149
100
|
│ Hooks ENFORCE workflow - they physically block actions │
|
|
150
101
|
└─────────────────────────────────────────────────────────────┘
|
|
@@ -177,53 +128,31 @@ ANALYZE → PLAN → CONFIRM → IMPLEMENT → VERIFY → AUDIT → COMMIT → U
|
|
|
177
128
|
|
|
178
129
|
| Phase | What Happens | Enforcement |
|
|
179
130
|
|-------|--------------|-------------|
|
|
180
|
-
| ANALYZE | Read relevant files, check
|
|
131
|
+
| ANALYZE | Read relevant files, check user's documentation | - |
|
|
181
132
|
| PLAN | Design approach, show 3-tier suggestions | - |
|
|
182
133
|
| CONFIRM | Wait for user approval | **pre-edit.sh BLOCKS edits** |
|
|
183
134
|
| IMPLEMENT | Make changes (after approval only) | Allowed after approval |
|
|
184
135
|
| VERIFY | Run `npm run verify` (max 10 iterations) | Auto-triggered by hook |
|
|
185
136
|
| AUDIT | Check orphan features + circular deps | Required for features |
|
|
186
137
|
| COMMIT | Conventional commit format | **pre-commit.sh BLOCKS bad commits** |
|
|
187
|
-
| UPDATE |
|
|
138
|
+
| UPDATE | Note changes in session context | **post-commit.sh reminder** |
|
|
188
139
|
|
|
189
140
|
---
|
|
190
141
|
|
|
191
|
-
## Auto-Triggers (Hooks)
|
|
142
|
+
## Auto-Triggers (10 Hooks)
|
|
192
143
|
|
|
193
144
|
| Hook | Trigger | Action |
|
|
194
145
|
|------|---------|--------|
|
|
195
|
-
| `session-check.sh` |
|
|
196
|
-
| `pre-edit.sh` |
|
|
197
|
-
| `post-edit.sh` |
|
|
198
|
-
| `pre-
|
|
199
|
-
| `post-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
| Gate | Blocks If | Applies To |
|
|
206
|
-
|------|-----------|------------|
|
|
207
|
-
| **State Init** | No workflow state exists | ALL tasks |
|
|
208
|
-
| **Plan Approval** | User hasn't approved | feature, fix, refactor, perf, security, test |
|
|
209
|
-
| **Suggestions** | 3-tier suggestions not shown | feature tasks |
|
|
210
|
-
| **One Edit/Turn** | Already edited this turn | feature, fix, refactor, perf, security, test |
|
|
211
|
-
| **Verify** | Language-specific errors | ALL (post-edit) |
|
|
212
|
-
| **Pre-Commit** | TODO/FIXME, console.log | ALL commits |
|
|
213
|
-
|
|
214
|
-
**Design:** All gates are checked on EVERY edit. Unknown state = strictest defaults.
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
## 3-Tier Suggestions
|
|
219
|
-
|
|
220
|
-
For feature tasks, Claude provides categorized suggestions:
|
|
221
|
-
|
|
222
|
-
| Tier | Priority | Examples |
|
|
223
|
-
|------|----------|----------|
|
|
224
|
-
| 🔴 Required | Must implement | Error handling, loading states, validation |
|
|
225
|
-
| 🟡 Recommended | Improves quality | Empty states, keyboard navigation |
|
|
226
|
-
| 🟢 Optional | Nice to have | Unit tests, analytics, optimizations |
|
|
146
|
+
| `session-check.sh` | UserPromptSubmit | Resume session, reset turn counter, check docs |
|
|
147
|
+
| `pre-edit.sh` | PreToolUse (Write/Edit) | **BLOCK** if: no approval, no suggestions, or multiple fixes |
|
|
148
|
+
| `post-edit.sh` | PostToolUse (Write/Edit) | Detect project type, run verification |
|
|
149
|
+
| `pre-tool-router.sh` | PreToolUse (Bash) | Routes to pre-commit-check for git commits |
|
|
150
|
+
| `post-bash-router.sh` | PostToolUse (Bash) | Routes to post-commit for git commits |
|
|
151
|
+
| `pre-commit-check.sh` | Before git commit | **BLOCK** with 7 gate checks (TS, ESLint, TODO, etc.) |
|
|
152
|
+
| `post-commit.sh` | After git commit | Commit summary |
|
|
153
|
+
| `phase-transition.sh` | Manual/internal | State management between workflow phases |
|
|
154
|
+
| `audit-runner.sh` | Manual/internal | Run UI enforcement + circular dep checks |
|
|
155
|
+
| `blueprint-generator.sh` | Manual/internal | Scan project structure |
|
|
227
156
|
|
|
228
157
|
---
|
|
229
158
|
|
|
@@ -256,18 +185,23 @@ project/
|
|
|
256
185
|
│
|
|
257
186
|
├── .claude/
|
|
258
187
|
│ ├── settings.json # Hooks + system prompt
|
|
259
|
-
│ ├── hooks/ #
|
|
260
|
-
│ │ ├── session-check.sh
|
|
261
|
-
│ │ ├── pre-edit.sh
|
|
262
|
-
│ │ ├── post-edit.sh
|
|
263
|
-
│ │ ├── pre-
|
|
264
|
-
│ │
|
|
265
|
-
│ ├──
|
|
188
|
+
│ ├── hooks/ # 10 enforcement scripts
|
|
189
|
+
│ │ ├── session-check.sh # Session init + docs check
|
|
190
|
+
│ │ ├── pre-edit.sh # Plan approval gate (3 checks)
|
|
191
|
+
│ │ ├── post-edit.sh # Auto-verification loop
|
|
192
|
+
│ │ ├── pre-tool-router.sh # Routes Bash commands
|
|
193
|
+
│ │ ├── post-bash-router.sh # Routes post-Bash actions
|
|
194
|
+
│ │ ├── pre-commit-check.sh # 7 gate checks before commit
|
|
195
|
+
│ │ ├── post-commit.sh # Commit summary
|
|
196
|
+
│ │ ├── phase-transition.sh # State management
|
|
197
|
+
│ │ ├── audit-runner.sh # UI + cycle audits
|
|
198
|
+
│ │ └── blueprint-generator.sh # Scan project for technical context
|
|
199
|
+
│ ├── commands/ # 9 slash commands
|
|
266
200
|
│ └── skills/ # 106 knowledge files
|
|
267
201
|
│
|
|
268
202
|
├── instructions/
|
|
269
203
|
│ ├── AI_RULES.md # Your coding standards
|
|
270
|
-
│ └──
|
|
204
|
+
│ └── (user's documentation) # Single source of truth
|
|
271
205
|
│
|
|
272
206
|
├── system/ # Detailed reference
|
|
273
207
|
│ ├── gates.md # Blocking checkpoint definitions
|
|
@@ -306,7 +240,7 @@ npm run audit:all # Run all audits
|
|
|
306
240
|
| `/verify` | QA Engineer | Run verification loop |
|
|
307
241
|
| `/fix` | Debug Engineer | Fix verification errors |
|
|
308
242
|
| `/audit` | Code Reviewer | Security + quality audit |
|
|
309
|
-
| `/audit project` | Code Reviewer | Full scan →
|
|
243
|
+
| `/audit project` | Code Reviewer | Full scan → technical context |
|
|
310
244
|
| `/commit` | Git Specialist | Pre-commit check + commit |
|
|
311
245
|
|
|
312
246
|
---
|
package/bin/cli.js
CHANGED
|
@@ -402,10 +402,10 @@ function init(options = {}) {
|
|
|
402
402
|
currentContent.replace(/^#.*$/gm, '').replace(/\s+/g, ' ').trim().length < 200;
|
|
403
403
|
|
|
404
404
|
if (isTemplate) {
|
|
405
|
-
// Remove template
|
|
405
|
+
// Remove template - user will provide their own documentation
|
|
406
406
|
try {
|
|
407
407
|
unlinkSync(blueprintPath);
|
|
408
|
-
console.log(` ${colors.cyan('ℹ')} BLUEPRINT.md template removed (
|
|
408
|
+
console.log(` ${colors.cyan('ℹ')} BLUEPRINT.md template removed (provide your docs on first run)`);
|
|
409
409
|
} catch (e) {
|
|
410
410
|
// Ignore
|
|
411
411
|
}
|
|
@@ -413,7 +413,7 @@ function init(options = {}) {
|
|
|
413
413
|
console.log(` ${colors.cyan('★')} instructions/BLUEPRINT.md ${colors.dim('(content preserved)')}`);
|
|
414
414
|
}
|
|
415
415
|
} else {
|
|
416
|
-
console.log(` ${colors.cyan('ℹ')} BLUEPRINT.md will be
|
|
416
|
+
console.log(` ${colors.cyan('ℹ')} BLUEPRINT.md will be created from your documentation on first run`);
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
// Make Claude hooks executable
|
|
@@ -446,9 +446,9 @@ function init(options = {}) {
|
|
|
446
446
|
|
|
447
447
|
console.log(`${colors.bold('Next steps:')}`);
|
|
448
448
|
console.log(` 1. Open VS Code with Claude Code extension`);
|
|
449
|
-
console.log(` 2.
|
|
450
|
-
console.log(` 3.
|
|
451
|
-
console.log(` 4.
|
|
449
|
+
console.log(` 2. Provide your documentation (PRD, spec, userflow)`);
|
|
450
|
+
console.log(` 3. Your document = ${colors.cyan('single source of truth')}`);
|
|
451
|
+
console.log(` 4. Claude references your docs for all tasks\n`);
|
|
452
452
|
|
|
453
453
|
console.log(`${colors.dim('Optional: Edit instructions/AI_RULES.md to customize coding standards')}\n`);
|
|
454
454
|
}
|