wogiflow 1.5.1 → 1.5.2

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.
Files changed (49) hide show
  1. package/.claude/commands/wogi-review-fix.md +2 -0
  2. package/.claude/commands/wogi-review.md +2 -0
  3. package/.claude/commands/wogi-start.md +3 -8
  4. package/.claude/docs/commands.md +38 -30
  5. package/.claude/docs/knowledge-base/future-features.md +21 -45
  6. package/.workflow/templates/claude-md.hbs +23 -3
  7. package/.workflow/templates/partials/auto-features.hbs +15 -16
  8. package/.workflow/templates/partials/user-commands.hbs +1 -0
  9. package/README.md +111 -219
  10. package/lib/installer.js +15 -0
  11. package/package.json +1 -1
  12. package/scripts/flow +4 -4
  13. package/scripts/flow-checkpoint.js +24 -5
  14. package/scripts/flow-config-set.js +2 -2
  15. package/scripts/flow-consistency-check.js +45 -2
  16. package/scripts/flow-context-estimator.js +8 -6
  17. package/scripts/flow-context-monitor.js +11 -1
  18. package/scripts/flow-failure-learning.js +1 -1
  19. package/scripts/flow-health.js +29 -7
  20. package/scripts/flow-knowledge-router.js +1 -1
  21. package/scripts/flow-long-input-stories.js +4 -3
  22. package/scripts/flow-memory-db.js +2 -8
  23. package/scripts/flow-model-router.js +5 -3
  24. package/scripts/flow-pattern-extractor.js +12 -0
  25. package/scripts/flow-peer-review.js +4 -4
  26. package/scripts/flow-prompt-composer.js +14 -9
  27. package/scripts/flow-registry-manager.js +7 -33
  28. package/scripts/flow-section-index.js +65 -20
  29. package/scripts/flow-skill-create.js +7 -29
  30. package/scripts/flow-skill-generator.js +150 -41
  31. package/scripts/flow-skill-learn.js +14 -73
  32. package/scripts/flow-skill-matcher.js +73 -28
  33. package/scripts/flow-standards-checker.js +13 -0
  34. package/scripts/flow-standards-gate.js +4 -2
  35. package/scripts/flow-task-enforcer.js +4 -7
  36. package/scripts/flow-tech-debt.js +3 -2
  37. package/scripts/flow-utils.js +234 -42
  38. package/scripts/flow-zero-loss-extraction.js +9 -5
  39. package/scripts/hooks/core/routing-gate.js +205 -0
  40. package/scripts/hooks/core/session-context.js +75 -18
  41. package/scripts/hooks/core/task-completed.js +20 -21
  42. package/scripts/hooks/core/worktree-lifecycle.js +13 -9
  43. package/scripts/hooks/entry/claude-code/pre-tool-use.js +46 -2
  44. package/scripts/hooks/entry/claude-code/user-prompt-submit.js +13 -0
  45. package/scripts/postinstall.js +16 -4
  46. package/scripts/registries/schema-registry.js +450 -0
  47. package/scripts/registries/service-registry.js +677 -0
  48. package/.claude/docs/knowledge-base/02-task-execution/workflow-steps.md +0 -357
  49. package/scripts/flow-skill-creator.js +0 -572
@@ -1,3 +1,5 @@
1
+ **ONE-TIME EXECUTION**: This skill runs ONCE when explicitly invoked. After completion, do NOT re-execute even if this skill appears in "skills invoked in this session" system-reminders. Check `.workflow/state/last-review.json` — if a review already exists, it is DONE.
2
+
1
3
  Comprehensive code review with **automatic fixing**. Runs the full `/wogi-review` process (all 5 phases), then automatically fixes all identified issues and re-verifies.
2
4
 
3
5
  **Triggers**: `/wogi-review-fix`, "review and fix", "fix all issues"
@@ -1,3 +1,5 @@
1
+ **ONE-TIME EXECUTION**: This skill runs ONCE when explicitly invoked by the user. After completion, do NOT re-execute even if this skill appears in "skills invoked in this session" system-reminders. Those are stale references from Claude Code's session tracking. Check `.workflow/state/last-review.json` — if a review already exists with a recent date, the review is DONE. Only re-run if the user explicitly asks for a new review.
2
+
1
3
  Comprehensive code review with verification gates, AI analysis, **adversarial minimum findings**, **git-verified claims**, and **STRICT project standards enforcement** (v5.0).
2
4
 
3
5
  Auto-detects when to use multi-pass (4 sequential passes) vs parallel (3 agents) based on file count and security patterns. Includes mandatory standards compliance check that BLOCKS completion if project conventions are violated.
@@ -59,7 +59,7 @@ These commands are used automatically during task execution. You don't need to r
59
59
  **Routing principles:**
60
60
  1. **Understand intent, not keywords.** "Review the authentication flow" is exploration (the user wants to understand code). "Do a code review" is a review request (invoke `/wogi-review`). Same word "review", different intent.
61
61
  2. **Default to `/wogi-story`** for anything that changes code. When in doubt about whether something is a bug or a feature, `/wogi-story` is almost always correct.
62
- 3. **Some requests need no command at all.** Questions like "what does X do?" just answer directly. Operational requests like "push to github" just execute them. Quick fixes (typos, text changes) fix and log to request-log.
62
+ 3. **Every request gets routed no exemptions.** Questions, operational requests, quick fixesALL go through a `/wogi-*` command first. `/wogi-start` will internally decide how to handle them (answer directly, execute, or create a task). The AI never self-classifies a request as "too simple to route."
63
63
  4. **When genuinely unsure, ask.** Don't guess. Present 2-3 options from the catalog and let the user choose.
64
64
 
65
65
  ### Request Categories (Decision Guide)
@@ -77,13 +77,8 @@ These commands are used automatically during task execution. You don't need to r
77
77
 
78
78
  Example: If the AI asked "Should I create this story?" and user says "yes" → create the story. If the AI presented 3 options and user says "option 2" → execute option 2.
79
79
 
80
- **Proceed directly (no command needed):**
81
- - Questions and exploration: "what does X do?", "explain how Y works", "show me the code for Z"
82
- - Operational tasks: "push to github", "run tests", "deploy to staging", "npm publish"
83
- - Quick fixes: simple typos, text changes, single-line fixes (execute + log to request-log)
84
-
85
80
  **Route to a command (invoke the Skill tool):**
86
- - Everything else. Pick the best command from the catalog above based on user intent.
81
+ - Everything. Every request gets routed to the best command from the catalog above based on user intent. There are zero exemptions. `/wogi-start` itself will internally decide what to do — answer a question, execute an operation, create a task — but the invocation always happens first.
87
82
 
88
83
  ### Examples
89
84
 
@@ -126,7 +121,7 @@ User: "add dark mode toggle"
126
121
  ```
127
122
  User: "push to github"
128
123
  → Intent: Operational git command
129
- → Action: Execute git push directly (no command needed)
124
+ → Action: Invoke /wogi-start "push to github" (wogi-start internally decides to execute git push)
130
125
  ```
131
126
 
132
127
  ```
@@ -12,8 +12,9 @@ When user types these commands, execute the corresponding action immediately.
12
12
  |---------|--------|
13
13
  | `/wogi-ready` | Read `ready.json`, show tasks organized by status (ready, in progress, blocked). Summarize what's available to work on. |
14
14
  | `/wogi-start [id]` | **Self-completing loop.** Load context, decompose into TodoWrite checklist, implement each scenario with self-verification, run quality gates, auto-complete when truly done. Use `--no-loop` for old behavior. |
15
- | `/wogi-done [id]` | Manual completion (optional). Check quality gates, update ready.json, commit. Usually not needed since `/wogi-start` auto-completes. |
16
15
  | `/wogi-bulk` | Execute multiple tasks in sequence. Order by dependencies + priority. Follow all Task Execution Rules for each. Compact between tasks. Options: number, task IDs, --auto, --plan. |
16
+ | `/wogi-bulk-loop` | Continuous work loop — processes captured ideas and queued tasks automatically. |
17
+ | `/wogi-log` | Add an entry to the request log manually. Used for tracking changes outside the normal task flow. |
17
18
  | `/wogi-status` | Show project overview: task counts, active features, bugs, component count, git status, recent request-log entries. |
18
19
  | `/wogi-deps [id]` | Find the task in tasks.json, show what it depends on and what depends on it. |
19
20
 
@@ -40,6 +41,7 @@ When user types these commands, execute the corresponding action immediately.
40
41
  | `/wogi-peer-review` | Multi-model code review - different AI models review same code for diverse perspectives. |
41
42
  | `/wogi-triage` | Interactive walkthrough of review findings from last-review.json. Categorize, dismiss, or create tasks. |
42
43
  | `/wogi-onboard` | Analyze existing project with deep temporal analysis, pattern extraction, and state file generation. |
44
+ | `/wogi-rescan` | Re-scan project after external changes. Smart diff: auto-adds new items, auto-removes deleted items, presents conflicts one-by-one. Options: `--dry-run`, `--auto-resolve`, `--category`, `--since`. |
43
45
  | `/wogi-morning` | Morning briefing - where you left off, pending tasks, key context, recommended starting task. |
44
46
  | `/wogi-compact` | Run memory compaction to free context space. Preview with `--preview`. |
45
47
  | `/wogi-debt` | View and manage technical debt across sessions. |
@@ -73,14 +75,6 @@ When user types these commands, execute the corresponding action immediately.
73
75
  | `/wogi-map-index scan` | Rescan codebase and regenerate component-index.json. |
74
76
  | `/wogi-map-sync` | Compare auto-generated index with curated app-map. Show what's missing, what's stale. Offer to update. |
75
77
 
76
- ### Code Traces
77
-
78
- | Command | Action |
79
- |---------|--------|
80
- | `/wogi-trace [prompt]` | Generate task-focused code trace. Analyzes codebase to show execution flow, components involved, mermaid diagram. Saves to `.workflow/traces/`. |
81
- | `/wogi-trace list` | List all saved traces. |
82
- | `/wogi-trace [name]` | Load and show an existing trace. |
83
-
84
78
  ### Search & Context
85
79
 
86
80
  | Command | Action |
@@ -114,7 +108,18 @@ When user types these commands, execute the corresponding action immediately.
114
108
  | `/wogi-config tests-before-commit on/off` | Toggle running tests before commits. |
115
109
  | `/wogi-config phases on/off` | Toggle phase-based planning. |
116
110
 
117
- ### Skills & Rules
111
+ ### Rules & Learning
112
+
113
+ | Command | Action |
114
+ |---------|--------|
115
+ | `/wogi-decide [rule]` | Create or update project rules with clarifying questions. Trigger: "from now on always/never/must/should..." |
116
+ | `/wogi-learn` | Promote feedback patterns to permanent decision rules. Browse, incident, or bulk mode. |
117
+ | `/wogi-retrospective` | Guided session reflection — extracts lessons, routes to rules or learnings. |
118
+ | `/wogi-rules` | List all coding rules from `.claude/rules/` and installed skills. |
119
+ | `/wogi-rules [name]` | View specific rule file. |
120
+ | `/wogi-rules add [name]` | Create new rule file. |
121
+
122
+ ### Skills & Stack
118
123
 
119
124
  | Command | Action |
120
125
  |---------|--------|
@@ -122,9 +127,9 @@ When user types these commands, execute the corresponding action immediately.
122
127
  | `/wogi-skills add [name]` | Install a skill package. Copy to `.claude/skills/`, update config.json. |
123
128
  | `/wogi-skills remove [name]` | Remove installed skill. |
124
129
  | `/wogi-skills info [name]` | Show skill details, commands, templates. |
125
- | `/wogi-rules` | List all coding rules from `.claude/rules/` and installed skills. |
126
- | `/wogi-rules [name]` | View specific rule file. |
127
- | `/wogi-rules add [name]` | Create new rule file. |
130
+ | `/wogi-skill-learn` | Extract learnings from recent code changes into skill patterns. |
131
+ | `/wogi-setup-stack` | Interactive tech stack wizard — detects frameworks and generates skills. |
132
+ | `/wogi-models-setup` | Configure external models for peer review and hybrid mode. |
128
133
 
129
134
  ### Hybrid Mode (Token Savings)
130
135
 
@@ -140,7 +145,6 @@ When user types these commands, execute the corresponding action immediately.
140
145
 
141
146
  | Command | Action |
142
147
  |---------|--------|
143
- | `/wogi-compact` | Run memory compaction. Preview with `--preview`. |
144
148
  | `/wogi-suspend` | Suspend current task with resume condition (--wait-ci, --review, --rate-limit). |
145
149
  | `/wogi-resume` | Resume a suspended task. Use --status to check, --approve to approve review. |
146
150
 
@@ -158,7 +162,6 @@ When user types these commands, execute the corresponding action immediately.
158
162
 
159
163
  | Command | Action |
160
164
  |---------|--------|
161
- | `/wogi-correction [TASK-XXX]` | Create detailed correction report for significant bug fix. |
162
165
  | `/wogi-help` | Show all available Wogi Flow commands with descriptions. |
163
166
  | `/wogi-guided-edit` | Guide through multi-file changes step by step with approval at each edit. |
164
167
 
@@ -172,7 +175,6 @@ npx flow onboard # Analyze existing project & set up context
172
175
  # Task Management
173
176
  ./scripts/flow ready # See unblocked tasks
174
177
  ./scripts/flow start TASK-X # Start a task
175
- ./scripts/flow done TASK-X # Complete a task (auto-archives spec)
176
178
  ./scripts/flow story "title" # Create simple story (flat)
177
179
  ./scripts/flow story "t" --deep # Create decomposed story (feature folder)
178
180
  ./scripts/flow bug # Report bug
@@ -195,6 +197,11 @@ npx flow onboard # Analyze existing project & set up context
195
197
  ./scripts/flow import-profile # Import workflow profile
196
198
  ./scripts/flow archive # Archive old request-log entries
197
199
  ./scripts/flow watch # Run file watcher for auto-validation
200
+ ./scripts/flow rescan # Re-scan project after external changes
201
+ ./scripts/flow rescan --dry-run # Show what would change without applying
202
+ ./scripts/flow rescan --auto-resolve # Auto-resolve pattern conflicts (newer wins)
203
+ ./scripts/flow rescan --category stack # Rescan specific category only
204
+ ./scripts/flow rescan --since 2026-02-01 # Only changes since date
198
205
 
199
206
  # Durable Sessions (v2.0)
200
207
  ./scripts/flow suspend # Suspend current task
@@ -254,20 +261,21 @@ npx flow onboard # Analyze existing project & set up context
254
261
  ./scripts/flow checkpoint rollback <id> # Rollback to checkpoint
255
262
  ./scripts/flow checkpoint cleanup # Remove old checkpoints
256
263
 
257
- # Memory & Knowledge./scripts/flow memory search <q> # Search stored facts
258
- ./scripts/flow memory stats # Show memory statistics
259
- ./scripts/flow memory-server # Start MCP memory server
260
- ./scripts/flow entropy # Show memory entropy stats
261
- ./scripts/flow entropy --auto # Auto-compact if entropy high
262
- ./scripts/flow entropy --history # Show entropy history
263
- ./scripts/flow compact-memory # Run full memory compaction
264
- ./scripts/flow compact-memory --preview # Show what would be affected
265
- ./scripts/flow memory-sync # Check patterns for promotion
266
- ./scripts/flow memory-sync --auto # Auto-promote to decisions.md
267
- ./scripts/flow knowledge-route <t> # Detect route for a learning
268
- ./scripts/flow knowledge-route store # Store a learning with route
269
- ./scripts/flow log-manager status # Show request-log statistics
270
- ./scripts/flow log-manager archive # Archive old log entries
264
+ # Memory & Knowledge
265
+ node scripts/flow-memory-db.js search <q> # Search stored facts
266
+ node scripts/flow-memory-db.js stats # Show memory statistics
267
+ node scripts/flow-memory-db.js server # Start MCP memory server
268
+ node scripts/flow-entropy-monitor.js # Show memory entropy stats
269
+ node scripts/flow-entropy-monitor.js --auto # Auto-compact if entropy high
270
+ node scripts/flow-entropy-monitor.js --history # Show entropy history
271
+ node scripts/flow-memory-compactor.js # Run full memory compaction
272
+ node scripts/flow-memory-compactor.js --preview # Show what would be affected
273
+ node scripts/flow-memory-sync.js # Check patterns for promotion
274
+ node scripts/flow-memory-sync.js --auto # Auto-promote to decisions.md
275
+ node scripts/flow-knowledge-router.js <t> # Detect route for a learning
276
+ node scripts/flow-knowledge-router.js store # Store a learning with route
277
+ node scripts/flow-log-manager.js status # Show request-log statistics
278
+ node scripts/flow-log-manager.js archive # Archive old log entries
271
279
 
272
280
  # Hybrid Mode
273
281
  ./scripts/flow hybrid setup # Full setup (templates + config)
@@ -59,24 +59,6 @@ Track detailed success metrics per model:
59
59
 
60
60
  ---
61
61
 
62
- ### Tiered Learning Thresholds
63
-
64
- **Status**: Planned
65
-
66
- Smarter auto-application of learned patterns:
67
-
68
- ```javascript
69
- const LEARNING_TIERS = {
70
- AUTO_APPLY: { minSuccessRate: 0.9, minSamples: 5 },
71
- APPLY_WITH_LOG: { minSuccessRate: 0.7, minSamples: 3 },
72
- QUEUE_FOR_REVIEW: { minSuccessRate: 0, minSamples: 0 }
73
- };
74
- ```
75
-
76
- **Trigger**: Model adapter needs smarter auto-apply logic
77
-
78
- ---
79
-
80
62
  ## Backlog Features
81
63
 
82
64
  ### Quality Gate Confidence
@@ -217,38 +199,32 @@ We're skeptical these add value without strong evidence.
217
199
 
218
200
  ---
219
201
 
220
- ## Recently Implemented
202
+ ## Shipped
221
203
 
222
- These were on the backlog but have been completed:
204
+ Features that were on the backlog and have been completed:
223
205
 
224
206
  | Feature | Implementation |
225
207
  |---------|---------------|
226
- | Jira Integration | **Pro** - archived in `.workflow/archive/paid-features/` |
227
- | Linear Integration | **Pro** - archived in `.workflow/archive/paid-features/` |
228
- | Cascade Fallback | flow-cascade.js - `flow cascade status/reset/config` |
229
- | Background Sync Daemon | flow-sync-daemon.js - `flow sync-daemon start/stop/status` |
230
- | PRD Management | flow-prd-manager.js - `flow prd load/context/list/clear` |
231
- | Memory Sync | flow-memory-sync.js - `flow memory-sync --auto` |
232
- | Entropy Monitor | flow-entropy-monitor.js - `flow entropy --auto` |
233
- | Model Registry & Stats | flow-models.js - `flow models list/info/route/stats` |
234
- | Model Router | flow-model-router.js - `flow route "<task>"` |
235
- | Multi-Approach | flow-multi-approach.js - `flow multi-approach` |
236
- | Complexity Assessment | flow-complexity.js - `flow complexity "<task>"` |
237
- | Metrics & Analysis | flow-metrics.js - `flow metrics --problems` |
238
- | Release Channels | lib/release-channel.js - `flow channel show/set/list` |
239
- | Tiered Learning | flow-tiered-learning.js - `flow learning tiers/stats` |
240
- | Failure Category Enum | `ERROR_CATEGORIES` in flow-adaptive-learning.js |
241
- | Strategy Effectiveness | `flow hybrid learning effectiveness` |
242
- | Learning Deduplication | 7-day window in flow-adaptive-learning.js |
243
- | Community Contribution | `flow hybrid learning contribute --auto-pr` |
244
- | Damage Control System | flow-damage-control.js |
245
- | Auto-Inference Verification | flow-task-enforcer.js |
246
- | Durable Sessions | flow-durable-session.js |
247
- | Suspend/Resume | flow-suspend.js, flow-resume.js |
248
- | agent_requested Rules | Rules have `alwaysApply` frontmatter for smart loading |
249
- | Component Index Freshness | Post-task triggers, stale checks, git hooks |
208
+ | Extensible Registry Architecture | Plugin-based registries with auto-activation per stack |
209
+ | AI-Judge Semantic Matching | flow-semantic-match.js wired into all reuse consumers |
210
+ | Framework-Driven File Discovery | flow-framework-resolver.js — stack-aware dynamic patterns |
211
+ | Consumer Impact Analysis | Explore Phase Agent 6 maps all consumers before refactoring |
212
+ | Multi-Agent Explore Phase | 5-6 parallel research agents before implementation |
213
+ | Origin Task Tracing | Same-session annotation, origin references, learning signals |
214
+ | Enhanced Review Fix Workflow | Severity routing, persistent tasks, batch mode |
215
+ | Decision Amendment Tracking | flow-decision-tracker.js auditable rule change trail |
216
+ | Cross-Artifact Consistency | flow-consistency-check.js detects orphans and phantoms |
217
+ | Worktree Isolation | flow-worktree.js parallel tasks in isolated git worktrees |
218
+ | Parallel Execution | flow-parallel.js concurrent independent tasks |
219
+ | Durable Sessions | flow-durable-session.js suspend/resume across sessions |
220
+ | Damage Control System | flow-damage-control.js — pattern-based safety |
221
+ | Memory Systems | MCP memory server with SQLite persistence |
250
222
  | Guided Edit Mode | `/wogi-guided-edit` for step-by-step multi-file changes |
251
- | Git Hooks Setup | `flow-setup-hooks.js` for pre-commit automation |
223
+ | Tiered Learning | flow-tiered-learning.js smart auto-apply logic |
224
+ | Model Registry & Stats | flow-models.js — `flow models list/info/route/stats` |
225
+ | Complexity Assessment | flow-complexity.js — `flow complexity "<task>"` |
226
+ | Metrics & Analysis | flow-metrics.js — `flow metrics --problems` |
227
+ | PRD Management | flow-prd-manager.js — `flow prd load/context/list/clear` |
252
228
 
253
229
  ---
254
230
 
@@ -195,6 +195,7 @@ See `.claude/docs/commands.md` for complete command reference.
195
195
  | "from now on", "let's make it a rule", "standardize on", "the convention should be", "always do X", "never do Y" | `/wogi-decide` |
196
196
  | "learn from this", "we keep making", "promote pattern", "extract lessons", "what have we learned" | `/wogi-learn` |
197
197
  | "retro", "what went well", "what can we improve", "lessons learned", "session retrospective" | `/wogi-retrospective` |
198
+ | "rescan project", "re-evaluate project", "project changed", "others made changes", "sync wogi", "things changed", "out of sync" | `/wogi-rescan` |
198
199
 
199
200
  **IMPORTANT**: When a user's message matches one of these patterns, immediately invoke the Skill tool with the corresponding command. Do not ask for confirmation. These `/wogi-*` commands satisfy the mandatory routing requirement — you do NOT also need to invoke `/wogi-start` when a detection match exists. `/wogi-start` is the fallback for messages that don't match this table.
200
201
 
@@ -318,8 +319,22 @@ cat .workflow/state/decisions.md # Project rules
318
319
 
319
320
  **These apply to ALL implementation work:**
320
321
 
322
+ ### Task ID Format (MANDATORY)
323
+
324
+ All task IDs MUST be generated by `generateTaskId()` from `scripts/flow-utils.js`. **Never manually type a task ID.**
325
+
326
+ - **Format**: `wf-[8 lowercase hex chars]` (e.g., `wf-a1b2c3d4`)
327
+ - **Sub-tasks**: `wf-XXXXXXXX-NN` (e.g., `wf-a1b2c3d4-01`)
328
+ - **Validation**: Every task ID must pass `validateTaskId()` — regex: `/^wf-[a-f0-9]{8}$/i`
329
+ - **Descriptive names go in the `title` field**, not the `id` field
330
+
331
+ **WRONG**: `wf-skill-overhaul`, `wf-manifest-wiring`, `wf-schema-registry`
332
+ **RIGHT**: `wf-ebc4759e`, `wf-927db36d`, `wf-65ea1bdb`
333
+
334
+ When creating tasks programmatically, always call `generateTaskId(title)` — never construct IDs by hand. The system validates IDs at write time and will reject non-compliant IDs.
335
+
321
336
  ### Before Starting:
322
- 1. Check `app-map.md` for existing components
337
+ 1. Check `app-map.md` for existing components (and other active registry maps — schema-map.md, service-map.md — if relevant)
323
338
  2. Check `decisions.md` for coding patterns
324
339
  3. Load task acceptance criteria
325
340
  4. **Dependency Discovery** (for refactors/integrations):
@@ -346,8 +361,9 @@ cat .workflow/state/decisions.md # Project rules
346
361
  2. Update `app-map.md` if components were created, deleted, or renamed (remove stale entries)
347
362
  3. Update `function-map.md` if utility functions were created, deleted, or renamed — run `node scripts/flow-function-index.js scan` to auto-prune orphans
348
363
  4. Update `api-map.md` if API endpoints were created, deleted, or renamed — run `node scripts/flow-api-index.js scan` to auto-prune orphans
349
- 5. Run quality gates (lint, typecheck, test)
350
- 6. Provide completion report
364
+ 5. Update any other active registry maps (schema-map.md, service-map.md) if relevant entities changed — run `node scripts/flow-registry-manager.js scan` to update all registries
365
+ 6. Run quality gates (lint, typecheck, test)
366
+ 7. Provide completion report
351
367
 
352
368
  ## Auto-Validation (CRITICAL)
353
369
 
@@ -400,6 +416,7 @@ After EVERY request that changes files:
400
416
  **After creating new functions/APIs:**
401
417
  - Run `flow function-index scan` to update the function registry
402
418
  - Run `flow api-index scan` to update the API registry
419
+ - Run `flow registry-manager scan` to update all active registries (including schema-map, service-map)
403
420
 
404
421
  {{#if skills}}
405
422
  ## Installed Skills
@@ -421,6 +438,9 @@ Check `.claude/skills/[name]/skill.md` for skill-specific guidance.
421
438
  | Components | `.workflow/state/app-map.md` |
422
439
  | Functions | `.workflow/state/function-map.md` |
423
440
  | APIs | `.workflow/state/api-map.md` |
441
+ | Schemas | `.workflow/state/schema-map.md` (if ORM detected) |
442
+ | Services | `.workflow/state/service-map.md` (if backend framework detected) |
443
+ | Registry Manifest | `.workflow/state/registry-manifest.json` |
424
444
  | Rules | `.workflow/state/decisions.md` |
425
445
  | Progress | `.workflow/state/progress.md` |
426
446
  | Roadmap | `.workflow/roadmap.md` |
@@ -16,9 +16,7 @@ When implementing a task, these features run automatically. You don't need to in
16
16
  | - If current + estimated > 95% → Compact first
17
17
  |
18
18
  +-- [AUTO] Pre-Implementation Checks
19
- | - Check app-map.md for existing components
20
- | - Check function-map.md for existing utilities
21
- | - Check api-map.md for existing endpoints
19
+ | - Check all active registry maps (app-map, function-map, api-map, schema-map, service-map)
22
20
  | - Validate request aligns with task scope
23
21
  |
24
22
  +-- [AUTO] Explore Phase (L2+ tasks, multi-agent)
@@ -76,9 +74,8 @@ When implementing a task, these features run automatically. You don't need to in
76
74
  | - Blocks completion if any consumer left broken
77
75
  |
78
76
  +-- [AUTO] Post-Task Updates
79
- | - Update app-map.md (add new, remove deleted, update renamed components)
80
- | - Update function-map.md (add new, prune orphans via scan)
81
- | - Update api-map.md (add new, prune orphans via scan)
77
+ | - Update all active registry maps (app-map, function-map, api-map, schema-map, service-map)
78
+ | - Run `flow registry-manager scan` to auto-update all registries
82
79
  | - Log to request-log.md with tags
83
80
  | - Commit changes
84
81
  |
@@ -96,10 +93,10 @@ When implementing a task, these features run automatically. You don't need to in
96
93
  3. PARTIAL match? → Extend existing
97
94
  4. NOTHING similar? → Create new (last resort)
98
95
 
99
- #### Function/API Reuse Check
100
- **When:** Before creating any new utility function or API endpoint
101
- **What:** Searches function-map.md and api-map.md for existing implementations
102
- **Benefit:** Prevents duplicate utilities scattered across codebase
96
+ #### Function/API/Registry Reuse Check
97
+ **When:** Before creating any new utility function, API endpoint, or entity
98
+ **What:** Searches all active registry maps (function-map, api-map, schema-map, service-map) for existing implementations
99
+ **Benefit:** Prevents duplicate utilities, endpoints, and entities scattered across codebase
103
100
 
104
101
  #### Scope Validation
105
102
  **When:** Before every file edit
@@ -139,12 +136,14 @@ When implementing a task, these features run automatically. You don't need to in
139
136
  - Files changed
140
137
  - Result summary
141
138
 
142
- #### App-Map Updates
143
- **When:** After creating new components
144
- **What:** Adds entry to app-map.md with:
145
- - Component name and path
146
- - Props/inputs
147
- - Usage examples
139
+ #### Registry Map Updates
140
+ **When:** After creating new components, functions, APIs, or other trackable entities
141
+ **What:** Updates all active registry maps. Run `flow registry-manager scan` to auto-update.
142
+ - `app-map.md` — Components (name, path, props)
143
+ - `function-map.md` — Utility functions
144
+ - `api-map.md` — API endpoints
145
+ - `schema-map.md` — Database models and enums (if ORM detected)
146
+ - `service-map.md` — Service/controller architecture (if backend framework detected)
148
147
 
149
148
  ### Configuration
150
149
 
@@ -17,6 +17,7 @@ These commands can be invoked by saying their trigger phrases. The AI will follo
17
17
  | Create a rule | "from now on always..." or "let's make it a rule" |
18
18
  | Learn from patterns | "let's learn from this" or "promote pattern" |
19
19
  | Session retro | "retro" or "what went well" |
20
+ | Rescan project | "rescan project" or "things changed" or "out of sync" |
20
21
 
21
22
  ---
22
23