autoworkflow 3.8.4 → 3.9.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.
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 + BLUEPRINT.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` | "BLUEPRINT missing - run audit NOW" |
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 BLUEPRINT.md |
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 | Update BLUEPRINT.md if new feature/route/API |
68
+ | UPDATE | Note changes in session context |
69
69
 
70
70
  ---
71
71
 
@@ -124,6 +124,79 @@ 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. **Claude edits files directly** + hooks prompt at key moments.
130
+
131
+ **Memory Files:** `.claude/.autoworkflow/memories/`
132
+ | File | Purpose | When to Update |
133
+ |------|---------|----------------|
134
+ | `decisions.md` | Architectural/implementation choices | After PLAN phase |
135
+ | `patterns.md` | Discovered codebase patterns | After IMPLEMENT |
136
+ | `blockers.md` | Known issues and workarounds | When hitting errors |
137
+ | `context.md` | Session continuity | Before COMMIT |
138
+
139
+ **How it works:**
140
+ 1. **Session Start** → Memories summary displayed automatically
141
+ 2. **Phase Transitions** → Hooks prompt to update relevant memory
142
+ 3. **Claude Edits Directly** → Use Edit tool on memory files
143
+ 4. **No Shell Commands** → Just read and edit the markdown files
144
+
145
+ **Memory Format:**
146
+ ```markdown
147
+ ## [Entry Title]
148
+ *[Date]*
149
+
150
+ [Content - decisions made, patterns found, blockers hit]
151
+
152
+ ---
153
+ ```
154
+
155
+ **Automated Prompts:**
156
+ | Trigger | Memory Prompt |
157
+ |---------|---------------|
158
+ | After PLAN | "Record any decisions made" |
159
+ | After IMPLEMENT | "Record any patterns discovered" |
160
+ | Before COMMIT | "Update context for next session" |
161
+ | Error encountered | "Consider recording this blocker" |
162
+
163
+ ---
164
+
165
+ ## Reflection Prompts (Serena-inspired)
166
+
167
+ Before each phase transition, Claude receives reflection prompts to self-assess:
168
+
169
+ | Phase | Reflection |
170
+ |-------|------------|
171
+ | PLAN | Have you read all relevant files? Understood existing patterns? |
172
+ | IMPLEMENT | Does this match the request? Considered all affected files? |
173
+ | VERIFY | Is implementation complete? Edge cases handled? |
174
+ | COMMIT | Would you be confident shipping this? |
175
+
176
+ **Manual reflection:**
177
+ ```bash
178
+ .claude/hooks/phase-transition.sh reflect PLAN
179
+ ```
180
+
181
+ ---
182
+
183
+ ## Mode Restrictions (Serena-inspired)
184
+
185
+ Task types have different allowed operations:
186
+
187
+ | Mode | Restrictions |
188
+ |------|--------------|
189
+ | `docs` | Warn on non-.md file creation |
190
+ | `fix` | Warn on new file creation, dependency changes |
191
+ | `refactor` | Warn on behavior-changing operations (migrations) |
192
+ | `query` | Warn on any modifications (read-only) |
193
+
194
+ Phase restrictions:
195
+ - `ANALYZE`/`PLAN` phases warn on file creation/dependency changes
196
+ - Must reach `IMPLEMENT` phase before making modifications
197
+
198
+ ---
199
+
127
200
  ## Blocking Rules
128
201
 
129
202
  - **No orphan features** - Backend must have UI
@@ -142,7 +215,7 @@ All state stored in `.claude/.autoworkflow/`:
142
215
  | `/plan [task]` | Create implementation plan |
143
216
  | `/verify` | Run TypeScript + ESLint |
144
217
  | `/audit` | Run UI + cycle audits |
145
- | `/audit project` | Full project scan → generate BLUEPRINT.md |
218
+ | `/audit project` | Full project scan → technical context |
146
219
  | `/commit [msg]` | Pre-commit gate + commit |
147
220
  | `/init` | Set up AutoWorkflow files |
148
221
  | `/fix` | Fix verification errors |
@@ -172,7 +245,51 @@ npm run format # Prettier
172
245
  | `pre-commit-check.sh` | Before git commit | All 7 gate checks, BLOCKS |
173
246
  | `phase-transition.sh` | Manual call | State management |
174
247
  | `audit-runner.sh` | Manual call | Run UI + cycle audits |
175
- | `blueprint-generator.sh` | Manual call | Scan project |
248
+ | `blueprint-generator.sh` | Manual call | Enhanced project discovery (8 scans) |
249
+
250
+ ---
251
+
252
+ ## Documentation Workflow
253
+
254
+ Your project documentation is the single source of truth:
255
+
256
+ ```
257
+ ┌─────────────────────────────────────────────────────────────┐
258
+ │ Session Start │
259
+ │ ↓ │
260
+ │ USER PROVIDES: PRD / Spec / Userflow / Implementation │
261
+ │ ↓ │
262
+ │ THAT DOCUMENT = SOURCE OF TRUTH │
263
+ │ ↓ │
264
+ │ Referenced for ALL tasks │
265
+ └─────────────────────────────────────────────────────────────┘
266
+ ```
267
+
268
+ **How it works:**
269
+ 1. Provide your documentation (PRD, spec, userflow, implementation guide)
270
+ 2. That document is used directly - no transformation or format conversion
271
+ 3. All tasks reference your document as the single source of truth
272
+
273
+ **No BLUEPRINT.md generation.** Your document IS the blueprint.
274
+
275
+ ---
276
+
277
+ ## Project Discovery (Serena-inspired)
278
+
279
+ `/audit project` runs 8 scans for technical context:
280
+
281
+ | Scan | What It Detects |
282
+ |------|-----------------|
283
+ | Architecture | Monorepo, microservices, modular, feature-based, layered |
284
+ | Essential Commands | npm scripts, Makefile targets, tool configs |
285
+ | Tech Stack | Framework, styling, database, state, testing |
286
+ | Structure | Source directories, organization |
287
+ | Routes | App Router, Pages Router, SPA routes |
288
+ | Components | React/Vue/Svelte components |
289
+ | API | REST endpoints, GraphQL |
290
+ | Environment | .env files, required variables, configs |
291
+
292
+ **Note:** Scans provide technical context. BLUEPRINT.md content comes from your documentation.
176
293
 
177
294
  ---
178
295
 
@@ -181,9 +298,9 @@ npm run format # Prettier
181
298
  | File | Purpose |
182
299
  |------|---------|
183
300
  | `instructions/AI_RULES.md` | Your coding standards |
184
- | `instructions/BLUEPRINT.md` | Project specification |
301
+ | User's documentation | Single source of truth (PRD/spec/userflow) |
185
302
 
186
- If BLUEPRINT.md is missing → Hook triggers AUTO-AUDIT (no permission needed)
303
+ If no documentation provided → Hook prompts user to provide it
187
304
 
188
305
  ---
189
306
 
package/README.md CHANGED
@@ -31,13 +31,13 @@ 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 BLUEPRINT.md
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** (BLUEPRINT.md, AI_RULES.md) | Created if missing | **Preserved** |
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
 
@@ -95,7 +95,7 @@ Auto-loaded knowledge for each command via `skills_required` in command frontmat
95
95
  │ PostToolUse → post-edit.sh (Write/Edit) │
96
96
  │ (multi-lang verification loop) │
97
97
  │ → post-bash-router.sh (Bash) │
98
- │ → post-commit.sh (BLUEPRINT reminder)
98
+ │ → post-commit.sh (commit summary)
99
99
  │ │
100
100
  │ Hooks ENFORCE workflow - they physically block actions │
101
101
  └─────────────────────────────────────────────────────────────┘
@@ -128,14 +128,14 @@ ANALYZE → PLAN → CONFIRM → IMPLEMENT → VERIFY → AUDIT → COMMIT → U
128
128
 
129
129
  | Phase | What Happens | Enforcement |
130
130
  |-------|--------------|-------------|
131
- | ANALYZE | Read relevant files, check BLUEPRINT.md | - |
131
+ | ANALYZE | Read relevant files, check user's documentation | - |
132
132
  | PLAN | Design approach, show 3-tier suggestions | - |
133
133
  | CONFIRM | Wait for user approval | **pre-edit.sh BLOCKS edits** |
134
134
  | IMPLEMENT | Make changes (after approval only) | Allowed after approval |
135
135
  | VERIFY | Run `npm run verify` (max 10 iterations) | Auto-triggered by hook |
136
136
  | AUDIT | Check orphan features + circular deps | Required for features |
137
137
  | COMMIT | Conventional commit format | **pre-commit.sh BLOCKS bad commits** |
138
- | UPDATE | Update BLUEPRINT.md if needed | **post-commit.sh reminder** |
138
+ | UPDATE | Note changes in session context | **post-commit.sh reminder** |
139
139
 
140
140
  ---
141
141
 
@@ -143,16 +143,16 @@ ANALYZE → PLAN → CONFIRM → IMPLEMENT → VERIFY → AUDIT → COMMIT → U
143
143
 
144
144
  | Hook | Trigger | Action |
145
145
  |------|---------|--------|
146
- | `session-check.sh` | UserPromptSubmit | Resume session, reset turn counter, check blueprint |
146
+ | `session-check.sh` | UserPromptSubmit | Resume session, reset turn counter, check docs |
147
147
  | `pre-edit.sh` | PreToolUse (Write/Edit) | **BLOCK** if: no approval, no suggestions, or multiple fixes |
148
148
  | `post-edit.sh` | PostToolUse (Write/Edit) | Detect project type, run verification |
149
149
  | `pre-tool-router.sh` | PreToolUse (Bash) | Routes to pre-commit-check for git commits |
150
150
  | `post-bash-router.sh` | PostToolUse (Bash) | Routes to post-commit for git commits |
151
151
  | `pre-commit-check.sh` | Before git commit | **BLOCK** with 7 gate checks (TS, ESLint, TODO, etc.) |
152
- | `post-commit.sh` | After git commit | Remind to update BLUEPRINT.md |
152
+ | `post-commit.sh` | After git commit | Commit summary |
153
153
  | `phase-transition.sh` | Manual/internal | State management between workflow phases |
154
154
  | `audit-runner.sh` | Manual/internal | Run UI enforcement + circular dep checks |
155
- | `blueprint-generator.sh` | Manual/internal | Auto-scan project structure |
155
+ | `blueprint-generator.sh` | Manual/internal | Scan project structure |
156
156
 
157
157
  ---
158
158
 
@@ -186,22 +186,22 @@ project/
186
186
  ├── .claude/
187
187
  │ ├── settings.json # Hooks + system prompt
188
188
  │ ├── hooks/ # 10 enforcement scripts
189
- │ │ ├── session-check.sh # Session init + blueprint check
189
+ │ │ ├── session-check.sh # Session init + docs check
190
190
  │ │ ├── pre-edit.sh # Plan approval gate (3 checks)
191
191
  │ │ ├── post-edit.sh # Auto-verification loop
192
192
  │ │ ├── pre-tool-router.sh # Routes Bash commands
193
193
  │ │ ├── post-bash-router.sh # Routes post-Bash actions
194
194
  │ │ ├── pre-commit-check.sh # 7 gate checks before commit
195
- │ │ ├── post-commit.sh # BLUEPRINT update reminder
195
+ │ │ ├── post-commit.sh # Commit summary
196
196
  │ │ ├── phase-transition.sh # State management
197
197
  │ │ ├── audit-runner.sh # UI + cycle audits
198
- │ │ └── blueprint-generator.sh # Auto-scan project
198
+ │ │ └── blueprint-generator.sh # Scan project for technical context
199
199
  │ ├── commands/ # 9 slash commands
200
200
  │ └── skills/ # 106 knowledge files
201
201
 
202
202
  ├── instructions/
203
203
  │ ├── AI_RULES.md # Your coding standards
204
- │ └── BLUEPRINT.md # Project spec (auto-generated)
204
+ │ └── (user's documentation) # Single source of truth
205
205
 
206
206
  ├── system/ # Detailed reference
207
207
  │ ├── gates.md # Blocking checkpoint definitions
@@ -240,7 +240,7 @@ npm run audit:all # Run all audits
240
240
  | `/verify` | QA Engineer | Run verification loop |
241
241
  | `/fix` | Debug Engineer | Fix verification errors |
242
242
  | `/audit` | Code Reviewer | Security + quality audit |
243
- | `/audit project` | Code Reviewer | Full scan → generate BLUEPRINT.md |
243
+ | `/audit project` | Code Reviewer | Full scan → technical context |
244
244
  | `/commit` | Git Specialist | Pre-commit check + commit |
245
245
 
246
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 so hook can regenerate project-specific one
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 (will be auto-generated)`);
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 auto-generated on first run`);
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. Send any message - Claude will ${colors.cyan('auto-scan')} your project`);
450
- console.log(` 3. Claude generates ${colors.cyan('BLUEPRINT.md')} with your features/routes/APIs`);
451
- console.log(` 4. Review and approve the generated blueprint\n`);
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autoworkflow",
3
- "version": "3.8.4",
3
+ "version": "3.9.1",
4
4
  "description": "Automated workflow enforcement for Claude Code via hooks and system prompts",
5
5
  "type": "module",
6
6
  "bin": {