autoworkflow 3.8.3 → 3.8.4
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/README.md +52 -118
- package/package.json +1 -1
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,9 +25,9 @@ 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
|
|
@@ -43,38 +43,9 @@ npx autoworkflow update # Update core files, preserve BLUEPRINT.md
|
|
|
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 (BLUEPRINT reminder) │
|
|
148
99
|
│ │
|
|
149
100
|
│ Hooks ENFORCE workflow - they physically block actions │
|
|
150
101
|
└─────────────────────────────────────────────────────────────┘
|
|
@@ -188,42 +139,20 @@ ANALYZE → PLAN → CONFIRM → IMPLEMENT → VERIFY → AUDIT → COMMIT → U
|
|
|
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-
|
|
146
|
+
| `session-check.sh` | UserPromptSubmit | Resume session, reset turn counter, check blueprint |
|
|
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.) |
|
|
199
152
|
| `post-commit.sh` | After git commit | Remind to update BLUEPRINT.md |
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
## Blocking Gates (Fail-Closed)
|
|
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 |
|
|
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 | Auto-scan project structure |
|
|
227
156
|
|
|
228
157
|
---
|
|
229
158
|
|
|
@@ -256,13 +185,18 @@ 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 + blueprint 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 # BLUEPRINT update reminder
|
|
196
|
+
│ │ ├── phase-transition.sh # State management
|
|
197
|
+
│ │ ├── audit-runner.sh # UI + cycle audits
|
|
198
|
+
│ │ └── blueprint-generator.sh # Auto-scan project
|
|
199
|
+
│ ├── commands/ # 9 slash commands
|
|
266
200
|
│ └── skills/ # 106 knowledge files
|
|
267
201
|
│
|
|
268
202
|
├── instructions/
|