wogiflow 1.5.0 → 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.
- package/.claude/commands/wogi-decide.md +3 -3
- package/.claude/commands/wogi-onboard.md +56 -7
- package/.claude/commands/wogi-rescan.md +447 -0
- package/.claude/commands/wogi-review-fix.md +3 -1
- package/.claude/commands/wogi-review.md +3 -1
- package/.claude/commands/wogi-start.md +5 -10
- package/.claude/docs/commands.md +38 -30
- package/.claude/docs/knowledge-base/02-task-execution/05-session-review.md +2 -2
- package/.claude/docs/knowledge-base/future-features.md +21 -45
- package/.workflow/templates/claude-md.hbs +23 -3
- package/.workflow/templates/partials/auto-features.hbs +17 -18
- package/.workflow/templates/partials/user-commands.hbs +1 -0
- package/README.md +111 -219
- package/lib/installer.js +28 -3
- package/package.json +1 -1
- package/scripts/flow +4 -4
- package/scripts/flow-api-index.js +7 -2
- package/scripts/flow-checkpoint.js +24 -5
- package/scripts/flow-config-set.js +2 -2
- package/scripts/flow-consistency-check.js +45 -2
- package/scripts/flow-context-estimator.js +8 -6
- package/scripts/flow-context-monitor.js +11 -1
- package/scripts/flow-failure-learning.js +1 -1
- package/scripts/flow-function-index.js +7 -2
- package/scripts/flow-health.js +29 -7
- package/scripts/flow-knowledge-router.js +1 -1
- package/scripts/flow-long-input-stories.js +4 -3
- package/scripts/flow-memory-db.js +2 -8
- package/scripts/flow-model-router.js +5 -3
- package/scripts/flow-pattern-extractor.js +19 -3
- package/scripts/flow-peer-review.js +4 -4
- package/scripts/flow-prompt-composer.js +14 -9
- package/scripts/flow-registry-manager.js +12 -33
- package/scripts/flow-review.js +1 -1
- package/scripts/flow-scanner-base.js +1 -1
- package/scripts/flow-section-index.js +65 -20
- package/scripts/flow-skill-create.js +7 -29
- package/scripts/flow-skill-generator.js +150 -41
- package/scripts/flow-skill-learn.js +14 -73
- package/scripts/flow-skill-matcher.js +73 -28
- package/scripts/flow-standards-checker.js +78 -110
- package/scripts/flow-standards-gate.js +8 -8
- package/scripts/flow-task-enforcer.js +4 -7
- package/scripts/flow-tech-debt.js +3 -2
- package/scripts/flow-utils.js +234 -42
- package/scripts/flow-zero-loss-extraction.js +9 -5
- package/scripts/hooks/core/routing-gate.js +205 -0
- package/scripts/hooks/core/session-context.js +75 -18
- package/scripts/hooks/core/task-completed.js +20 -21
- package/scripts/hooks/core/worktree-lifecycle.js +13 -9
- package/scripts/hooks/entry/claude-code/pre-tool-use.js +46 -2
- package/scripts/hooks/entry/claude-code/user-prompt-submit.js +13 -0
- package/scripts/postinstall.js +20 -8
- package/scripts/registries/schema-registry.js +450 -0
- package/scripts/registries/service-registry.js +677 -0
- package/.claude/docs/knowledge-base/02-task-execution/workflow-steps.md +0 -357
- package/scripts/flow-skill-creator.js +0 -572
|
@@ -241,9 +241,9 @@ In `config.json`:
|
|
|
241
241
|
"scanForViolations": true,
|
|
242
242
|
"maxClarifyingQuestions": 4,
|
|
243
243
|
"violationRouting": {
|
|
244
|
-
"
|
|
245
|
-
"
|
|
246
|
-
"
|
|
244
|
+
"quickFixThreshold": 3,
|
|
245
|
+
"storyThreshold": 10,
|
|
246
|
+
"epicThreshold": 25
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -286,9 +286,8 @@ Display:
|
|
|
286
286
|
question: "What are your primary goals with this project?",
|
|
287
287
|
header: "Goals",
|
|
288
288
|
options: [
|
|
289
|
-
{ label: "
|
|
290
|
-
{ label: "Fix bugs", description: "Address existing issues" },
|
|
291
|
-
{ label: "Refactor", description: "Improve code quality and architecture" },
|
|
289
|
+
{ label: "Accelerate & improve development", description: "Use AI agents to build faster and write better code — pages in minutes, consistent patterns, fewer mistakes" },
|
|
290
|
+
{ label: "Fix bugs & refactor", description: "Address existing issues and improve code quality and architecture" },
|
|
292
291
|
{ label: "Onboard team", description: "Help new developers understand the codebase" }
|
|
293
292
|
],
|
|
294
293
|
multiSelect: true
|
|
@@ -296,13 +295,63 @@ Display:
|
|
|
296
295
|
});
|
|
297
296
|
```
|
|
298
297
|
|
|
299
|
-
9. **
|
|
298
|
+
9. **Offer project health scan:**
|
|
299
|
+
```javascript
|
|
300
|
+
AskUserQuestion({
|
|
301
|
+
questions: [{
|
|
302
|
+
question: "Now that I understand your project's rules and patterns, would you like me to run a comprehensive health scan?\n\n" +
|
|
303
|
+
"This scans your entire codebase using the rules we just established and looks for:\n" +
|
|
304
|
+
"- Redundant or duplicate components that could be merged\n" +
|
|
305
|
+
"- Orphan files not imported or wired anywhere\n" +
|
|
306
|
+
"- Functions or API calls that could be consolidated\n" +
|
|
307
|
+
"- Broken references and dead imports\n" +
|
|
308
|
+
"- Patterns that violate the conventions we just detected\n\n" +
|
|
309
|
+
"Results become actionable tasks in your backlog.",
|
|
310
|
+
header: "Health",
|
|
311
|
+
options: [
|
|
312
|
+
{ label: "Run full scan (Recommended)", description: "Deep scan the entire project for improvement opportunities based on your rules" },
|
|
313
|
+
{ label: "Paste known issues", description: "I already know what needs fixing — let me paste a list instead" },
|
|
314
|
+
{ label: "Skip for now", description: "Continue to skill generation and finish setup — I can run /wogi-health later" }
|
|
315
|
+
],
|
|
316
|
+
multiSelect: false
|
|
317
|
+
}]
|
|
318
|
+
});
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
**If "Run full scan":**
|
|
322
|
+
Launch a multi-agent health scan (similar to Explore Phase but project-wide):
|
|
323
|
+
|
|
324
|
+
- **Agent A: Redundancy Scanner** — Compares all components, functions, and API endpoints from the maps generated in Phase 4. Uses AI-driven semantic matching (configurable via `config.semanticMatching.thresholds`) to flag entries that could be merged into one with variants.
|
|
325
|
+
- **Agent B: Orphan Detector** — For every file in the project, checks if it's imported/referenced somewhere. Flags files that exist but are never used (dead code).
|
|
326
|
+
- **Agent C: Wiring Verifier** — Checks that all components in app-map are actually rendered somewhere, all hooks are called, all utilities are imported. Flags anything created but never wired.
|
|
327
|
+
- **Agent D: Convention Auditor** — Using the patterns and decisions detected in Phase 2, scans the codebase for violations. Groups findings by severity (must-fix vs nice-to-have).
|
|
328
|
+
|
|
329
|
+
All 4 agents run in parallel. Results are consolidated and presented as a summary:
|
|
330
|
+
```
|
|
331
|
+
━━━ Project Health Scan Results ━━━
|
|
332
|
+
|
|
333
|
+
Redundancies: X components/functions could be consolidated
|
|
334
|
+
Orphans: Y files are not imported anywhere
|
|
335
|
+
Unwired: Z components exist but aren't rendered
|
|
336
|
+
Violations: W patterns don't match your rules
|
|
337
|
+
|
|
338
|
+
Total improvement opportunities: N
|
|
339
|
+
|
|
340
|
+
Would you like me to create tasks for these findings?
|
|
300
341
|
```
|
|
301
|
-
|
|
302
|
-
|
|
342
|
+
|
|
343
|
+
If user approves, create task entries in ready.json backlog, grouped by category.
|
|
344
|
+
|
|
345
|
+
**If "Paste known issues":**
|
|
346
|
+
```
|
|
347
|
+
Paste your known issues or tech debt below.
|
|
348
|
+
(One per line, or a comma-separated list)
|
|
303
349
|
```
|
|
304
350
|
If issues provided, create task entries in ready.json backlog.
|
|
305
351
|
|
|
352
|
+
**If "Skip for now":**
|
|
353
|
+
Continue to Phase 4. User can run `/wogi-review` or `/wogi-health` later.
|
|
354
|
+
|
|
306
355
|
---
|
|
307
356
|
|
|
308
357
|
### Phase 4: Persistence Pipeline (CRITICAL)
|
|
@@ -841,7 +890,7 @@ AskUserQuestion({
|
|
|
841
890
|
header: "Existing",
|
|
842
891
|
options: [
|
|
843
892
|
{ label: "Re-analyze", description: "Overwrite existing setup with fresh analysis" },
|
|
844
|
-
{ label: "
|
|
893
|
+
{ label: "Rescan", description: "Smart diff — keep existing decisions, auto-add new items, resolve conflicts one by one (runs /wogi-rescan)" },
|
|
845
894
|
{ label: "Cancel", description: "Keep current setup unchanged" }
|
|
846
895
|
],
|
|
847
896
|
multiSelect: false
|
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
Re-scan the project after external changes and sync WogiFlow state.
|
|
2
|
+
|
|
3
|
+
Usage: `/wogi-rescan`
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Other developers worked on the project while you weren't using WogiFlow
|
|
8
|
+
- New libraries or dependencies were added
|
|
9
|
+
- Code was refactored, files moved or renamed
|
|
10
|
+
- The project feels "out of sync" with what WogiFlow knows
|
|
11
|
+
- After a long break from the project
|
|
12
|
+
- After merging a large PR or branch
|
|
13
|
+
|
|
14
|
+
## Key Difference from `/wogi-onboard`
|
|
15
|
+
|
|
16
|
+
`/wogi-onboard` creates everything from scratch (fresh setup).
|
|
17
|
+
`/wogi-rescan` **diffs** the current codebase against existing WogiFlow state and **merges** changes intelligently — auto-adding what's new, flagging what's gone, and asking about conflicts one by one.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What It Does
|
|
22
|
+
|
|
23
|
+
### Phase 1: Snapshot Current State
|
|
24
|
+
|
|
25
|
+
Display:
|
|
26
|
+
```
|
|
27
|
+
━━━ Phase 1/5: Reading Current WogiFlow State ━━━
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
1. **Load all existing state files as the "before" snapshot:**
|
|
31
|
+
```javascript
|
|
32
|
+
const before = {
|
|
33
|
+
stack: readFile('.workflow/context/stack.md'),
|
|
34
|
+
decisions: readFile('.workflow/state/decisions.md'),
|
|
35
|
+
appMap: readFile('.workflow/state/app-map.md'),
|
|
36
|
+
functionMap: readFile('.workflow/state/function-map.md'),
|
|
37
|
+
apiMap: readFile('.workflow/state/api-map.md'),
|
|
38
|
+
skills: readDir('.claude/skills/'),
|
|
39
|
+
config: readJSON('.workflow/config.json')
|
|
40
|
+
};
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
2. **Record timestamps:**
|
|
44
|
+
```javascript
|
|
45
|
+
const lastOnboard = before.config.project?.onboardedAt;
|
|
46
|
+
const lastRescan = before.config.project?.lastRescanAt;
|
|
47
|
+
const baseline = lastRescan || lastOnboard;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Display:
|
|
51
|
+
```
|
|
52
|
+
Last synced: 2026-01-15 (38 days ago)
|
|
53
|
+
Known components: 24
|
|
54
|
+
Known functions: 32
|
|
55
|
+
Known API endpoints: 15
|
|
56
|
+
Known patterns: 18
|
|
57
|
+
Installed skills: 4 (nestjs, typeorm, jest, eslint)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### Phase 2: Fresh Scan (Non-Interactive — Same Analysis as Onboard Phases 1-2)
|
|
63
|
+
|
|
64
|
+
Display:
|
|
65
|
+
```
|
|
66
|
+
━━━ Phase 2/5: Scanning Current Codebase ━━━
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
3. **Run the same deep analysis as onboard:**
|
|
70
|
+
- Stack detection via `flow-context-init.js`
|
|
71
|
+
- Product scanning via `flow-product-scanner.js`
|
|
72
|
+
- Pattern extraction in deep mode via `flow-pattern-extractor.js`
|
|
73
|
+
- Temporal classification of patterns
|
|
74
|
+
- Function scanning via `flow-function-index.js`
|
|
75
|
+
- API scanning via `flow-api-index.js`
|
|
76
|
+
- Component/app-map scanning
|
|
77
|
+
- Template extraction via `flow-template-extractor.js`
|
|
78
|
+
|
|
79
|
+
Display:
|
|
80
|
+
```
|
|
81
|
+
Stack detection... ✓ TypeScript + NestJS + PostgreSQL
|
|
82
|
+
Pattern extraction... ✓ Found 22 patterns across 10 categories
|
|
83
|
+
Function scan... ✓ Found 38 utility functions
|
|
84
|
+
API scan... ✓ Found 18 API endpoints
|
|
85
|
+
Component scan... ✓ Found 29 components/modules
|
|
86
|
+
Template extraction... ✓ Found 5 templates
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
4. **Store as the "after" snapshot:**
|
|
90
|
+
```javascript
|
|
91
|
+
const after = {
|
|
92
|
+
stack: detectedStack,
|
|
93
|
+
patterns: extractedPatterns,
|
|
94
|
+
functions: scannedFunctions,
|
|
95
|
+
apis: scannedAPIs,
|
|
96
|
+
components: scannedComponents,
|
|
97
|
+
templates: extractedTemplates,
|
|
98
|
+
skills: detectRequiredSkills(detectedStack)
|
|
99
|
+
};
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### Phase 3: Diff & Classify Changes
|
|
105
|
+
|
|
106
|
+
Display:
|
|
107
|
+
```
|
|
108
|
+
━━━ Phase 3/5: Comparing Against Known State ━━━
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
5. **Diff each category and classify every change:**
|
|
112
|
+
|
|
113
|
+
For each category (stack, patterns, components, functions, APIs, skills, templates):
|
|
114
|
+
|
|
115
|
+
```javascript
|
|
116
|
+
function classifyChanges(before, after) {
|
|
117
|
+
const changes = {
|
|
118
|
+
added: [], // In after but not before — NEW items
|
|
119
|
+
removed: [], // In before but not after — GONE items
|
|
120
|
+
modified: [], // In both but different — CHANGED items
|
|
121
|
+
unchanged: [] // Identical in both
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// ... diffing logic per category
|
|
125
|
+
return changes;
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Classification rules:**
|
|
130
|
+
|
|
131
|
+
| Change Type | Category | Action |
|
|
132
|
+
|-------------|----------|--------|
|
|
133
|
+
| NEW component/function/API | `added` | Auto-add (no conflict) |
|
|
134
|
+
| NEW pattern (no existing conflict) | `added` | Auto-add (no conflict) |
|
|
135
|
+
| NEW dependency in package.json | `added` | Auto-add + suggest skill |
|
|
136
|
+
| REMOVED file (was in app-map) | `removed` | Auto-remove from maps |
|
|
137
|
+
| REMOVED dependency | `removed` | Auto-remove skill if orphaned |
|
|
138
|
+
| RENAMED file (similar content) | `modified` | Auto-update path in maps |
|
|
139
|
+
| NEW pattern CONFLICTS with existing | `conflict` | Ask user |
|
|
140
|
+
| Dependency REPLACED (e.g. Redux→Recoil) | `conflict` | Ask user |
|
|
141
|
+
| Pattern changed (e.g. tabs→spaces) | `conflict` | Ask user |
|
|
142
|
+
| Existing decision contradicted by new code | `conflict` | Ask user |
|
|
143
|
+
| NEW component added, semantically similar to existing (configurable) | `conflict` | Ask user (merge or keep both) |
|
|
144
|
+
|
|
145
|
+
6. **Display diff summary:**
|
|
146
|
+
```
|
|
147
|
+
━━━ Changes Detected ━━━
|
|
148
|
+
|
|
149
|
+
📦 Stack Changes:
|
|
150
|
+
+ Added: recoil@0.7.7
|
|
151
|
+
+ Added: @tanstack/react-query@5.0.0
|
|
152
|
+
- Removed: redux@4.2.1
|
|
153
|
+
~ Changed: react 18.2.0 → 18.3.0
|
|
154
|
+
|
|
155
|
+
📁 Components:
|
|
156
|
+
+ 5 new components found
|
|
157
|
+
- 2 components removed (files deleted)
|
|
158
|
+
~ 3 components renamed/moved
|
|
159
|
+
|
|
160
|
+
⚙️ Functions:
|
|
161
|
+
+ 6 new utility functions
|
|
162
|
+
- 1 function removed
|
|
163
|
+
|
|
164
|
+
🌐 API Endpoints:
|
|
165
|
+
+ 3 new endpoints
|
|
166
|
+
~ 1 endpoint path changed
|
|
167
|
+
|
|
168
|
+
📋 Patterns:
|
|
169
|
+
+ 2 new patterns detected
|
|
170
|
+
⚠ 3 conflicts with existing decisions
|
|
171
|
+
|
|
172
|
+
🔧 Skills:
|
|
173
|
+
+ 2 new skills needed (recoil, react-query)
|
|
174
|
+
- 1 skill no longer needed (redux)
|
|
175
|
+
|
|
176
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
177
|
+
Auto-resolvable: 22 changes
|
|
178
|
+
Conflicts requiring input: 3
|
|
179
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
### Phase 4: Resolve Conflicts (One by One)
|
|
185
|
+
|
|
186
|
+
Display:
|
|
187
|
+
```
|
|
188
|
+
━━━ Phase 4/5: Resolving Conflicts ━━━
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
7. **For EACH conflict, present it individually and wait for resolution:**
|
|
192
|
+
|
|
193
|
+
**Conflict type: Dependency replacement**
|
|
194
|
+
```javascript
|
|
195
|
+
AskUserQuestion({
|
|
196
|
+
questions: [{
|
|
197
|
+
question: "Detected a dependency change:\n\n" +
|
|
198
|
+
"REMOVED: redux@4.2.1\n" +
|
|
199
|
+
"ADDED: recoil@0.7.7\n\n" +
|
|
200
|
+
"Current WogiFlow state has Redux skill and patterns.\n" +
|
|
201
|
+
"What happened?",
|
|
202
|
+
header: "Conflict 1/3",
|
|
203
|
+
options: [
|
|
204
|
+
{ label: "Replaced", description: "Redux was replaced by Recoil — remove Redux skill/patterns, add Recoil" },
|
|
205
|
+
{ label: "Both exist", description: "Redux is still used somewhere, Recoil was added alongside it" },
|
|
206
|
+
{ label: "Recoil is temporary", description: "Recoil is experimental/POC — keep Redux as the standard" },
|
|
207
|
+
{ label: "Skip", description: "Decide later — keep current state unchanged for now" }
|
|
208
|
+
],
|
|
209
|
+
multiSelect: false
|
|
210
|
+
}]
|
|
211
|
+
});
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Conflict type: Pattern contradiction**
|
|
215
|
+
```javascript
|
|
216
|
+
AskUserQuestion({
|
|
217
|
+
questions: [{
|
|
218
|
+
question: "Pattern conflict detected:\n\n" +
|
|
219
|
+
"EXISTING RULE: \"Use class-based components for stateful logic\"\n" +
|
|
220
|
+
" (from decisions.md, established during onboard)\n\n" +
|
|
221
|
+
"NEW EVIDENCE: 8 recently-created files use functional components with hooks\n" +
|
|
222
|
+
" Last seen: 2026-02-18 (3 days ago)\n\n" +
|
|
223
|
+
"The codebase appears to have shifted. Which should the AI follow for NEW code?",
|
|
224
|
+
header: "Conflict 2/3",
|
|
225
|
+
options: [
|
|
226
|
+
{ label: "Update to new", description: "Functional + hooks is now the standard — update the rule" },
|
|
227
|
+
{ label: "Keep existing", description: "Class components are still preferred — the new code is an exception" },
|
|
228
|
+
{ label: "Migration in progress", description: "We're migrating from classes to hooks — use hooks for new code, leave old alone" },
|
|
229
|
+
{ label: "Skip", description: "Decide later — keep current rule unchanged for now" }
|
|
230
|
+
],
|
|
231
|
+
multiSelect: false
|
|
232
|
+
}]
|
|
233
|
+
});
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
**Conflict type: Convention changed**
|
|
237
|
+
```javascript
|
|
238
|
+
AskUserQuestion({
|
|
239
|
+
questions: [{
|
|
240
|
+
question: "Convention change detected:\n\n" +
|
|
241
|
+
"EXISTING RULE: \"API responses use { data, error, status } format\"\n\n" +
|
|
242
|
+
"NEW EVIDENCE: 5 recent API endpoints use { result, message, code } format\n\n" +
|
|
243
|
+
"Which response format should the AI use for NEW endpoints?",
|
|
244
|
+
header: "Conflict 3/3",
|
|
245
|
+
options: [
|
|
246
|
+
{ label: "New format", description: "{ result, message, code } is the new standard" },
|
|
247
|
+
{ label: "Old format", description: "{ data, error, status } is still correct — new endpoints need fixing" },
|
|
248
|
+
{ label: "Both valid", description: "Different contexts use different formats — ask case by case" },
|
|
249
|
+
{ label: "Skip", description: "Decide later — keep current convention unchanged for now" }
|
|
250
|
+
],
|
|
251
|
+
multiSelect: false
|
|
252
|
+
}]
|
|
253
|
+
});
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
**After each resolution**, record the decision and move to the next conflict.
|
|
257
|
+
|
|
258
|
+
If user chose "Skip" for any conflict, leave the existing state unchanged and mark the conflict as deferred (can be revisited later via `/wogi-rescan --category`).
|
|
259
|
+
|
|
260
|
+
If user chose "Other" (free-text), accept the explanation and parse intent to determine the appropriate action.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
### Phase 5: Apply Changes & Generate Report
|
|
265
|
+
|
|
266
|
+
Display:
|
|
267
|
+
```
|
|
268
|
+
━━━ Phase 5/5: Applying Changes ━━━
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
8. **Apply all auto-resolved changes:**
|
|
272
|
+
```
|
|
273
|
+
app-map.md... ✓ +5 added, -2 removed, ~3 updated (29 total)
|
|
274
|
+
function-map.md... ✓ +6 added, -1 removed (37 total)
|
|
275
|
+
api-map.md... ✓ +3 added, ~1 updated (18 total)
|
|
276
|
+
decisions.md... ✓ +2 patterns added, ~3 updated from conflict resolution
|
|
277
|
+
stack.md... ✓ Updated dependency versions
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
9. **Apply conflict resolutions:**
|
|
281
|
+
- Update decisions.md with resolved patterns
|
|
282
|
+
- Mark migration-in-progress patterns with special format
|
|
283
|
+
- Remove deprecated skill directories
|
|
284
|
+
- Generate new skills for added dependencies
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
Conflict resolutions... ✓ 3/3 applied
|
|
288
|
+
→ Redux skill removed, Recoil skill generated
|
|
289
|
+
→ "class components" rule updated to "functional + hooks"
|
|
290
|
+
→ API format rule updated with dual-format note
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
10. **Update config.json:**
|
|
294
|
+
```javascript
|
|
295
|
+
config.project.lastRescanAt = new Date().toISOString();
|
|
296
|
+
config.project.rescanCount = (config.project.rescanCount || 0) + 1;
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
11. **Generate new/updated skills:**
|
|
300
|
+
For any newly detected frameworks, run the same skill generation as onboard Phase 5:
|
|
301
|
+
- Fetch Context7 docs
|
|
302
|
+
- Generate skill.md, patterns.md, anti-patterns.md
|
|
303
|
+
- Remove skills for dependencies that are gone
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
Skills updated:
|
|
307
|
+
+ recoil... ✓ Skill generated (Context7 docs)
|
|
308
|
+
+ react-query... ✓ Skill generated (Context7 docs)
|
|
309
|
+
- redux... ✓ Skill removed (dependency no longer present)
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
12. **Display final summary:**
|
|
313
|
+
```
|
|
314
|
+
━━━ Rescan Complete ━━━
|
|
315
|
+
|
|
316
|
+
Changes applied:
|
|
317
|
+
Components: +5 added, -2 removed, ~3 moved (24 → 29)
|
|
318
|
+
Functions: +6 added, -1 removed (32 → 37)
|
|
319
|
+
API Endpoints: +3 added, ~1 updated (15 → 18)
|
|
320
|
+
Patterns: +2 new, ~3 updated via resolution (18 → 20)
|
|
321
|
+
Skills: +2 generated, -1 removed (4 → 5)
|
|
322
|
+
|
|
323
|
+
Conflicts resolved: 3/3
|
|
324
|
+
→ Redux → Recoil (replaced)
|
|
325
|
+
→ Class → Functional components (migration)
|
|
326
|
+
→ API response format (updated)
|
|
327
|
+
|
|
328
|
+
Last synced: 2026-02-21 (just now)
|
|
329
|
+
|
|
330
|
+
╔═══════════════════════════════════════════════════════════════╗
|
|
331
|
+
║ WogiFlow state is now up to date! ║
|
|
332
|
+
╚═══════════════════════════════════════════════════════════════╝
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
13. **Log to request-log.md:**
|
|
336
|
+
```markdown
|
|
337
|
+
### R-[XXX] | [date]
|
|
338
|
+
**Type**: change
|
|
339
|
+
**Tags**: #rescan #sync
|
|
340
|
+
**Request**: "Project rescan after external changes"
|
|
341
|
+
**Result**: Synced WogiFlow state. +X added, -Y removed, ~Z updated. N conflicts resolved.
|
|
342
|
+
**Files**: .workflow/state/ (all state files updated)
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Conflict Resolution Principles
|
|
348
|
+
|
|
349
|
+
### What counts as a conflict
|
|
350
|
+
|
|
351
|
+
A conflict exists when the **new scan** contradicts what WogiFlow **currently believes**. Specifically:
|
|
352
|
+
|
|
353
|
+
| Situation | Conflict? | Why |
|
|
354
|
+
|-----------|-----------|-----|
|
|
355
|
+
| New component added, no similar exists | No | Just add it |
|
|
356
|
+
| New component added, semantically similar to existing (configurable threshold) | Yes | User must decide: merge or keep both |
|
|
357
|
+
| Dependency removed from package.json | No | Auto-remove, clean up skill |
|
|
358
|
+
| Dependency replaced by alternative | Yes | User must confirm replacement |
|
|
359
|
+
| New pattern detected, no rule exists | No | Just add it |
|
|
360
|
+
| New pattern contradicts existing rule | Yes | User must decide which is correct |
|
|
361
|
+
| File renamed, content ~same | No | Auto-update path references |
|
|
362
|
+
| File deleted, was in app-map | No | Auto-remove from maps |
|
|
363
|
+
| Convention changed in recent code | Yes | User must confirm new convention |
|
|
364
|
+
|
|
365
|
+
### Resolution strategy
|
|
366
|
+
|
|
367
|
+
1. **Never silently overwrite existing decisions** — if a rule exists and new code contradicts it, the user decides
|
|
368
|
+
2. **Always auto-add genuinely new things** — no conflict means no question
|
|
369
|
+
3. **Always auto-remove genuinely gone things** — if a file doesn't exist, it shouldn't be in maps
|
|
370
|
+
4. **Present conflicts with full context** — show the existing rule, the new evidence, recency data
|
|
371
|
+
5. **One conflict at a time** — don't overwhelm with a wall of choices
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## Options
|
|
376
|
+
|
|
377
|
+
### `--dry-run`
|
|
378
|
+
Show what would change without applying anything:
|
|
379
|
+
```
|
|
380
|
+
/wogi-rescan --dry-run
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### `--auto-resolve`
|
|
384
|
+
Skip conflict prompts and auto-resolve using temporal analysis (newer wins):
|
|
385
|
+
```
|
|
386
|
+
/wogi-rescan --auto-resolve
|
|
387
|
+
```
|
|
388
|
+
Use with caution — best for teams where "latest code is always right."
|
|
389
|
+
|
|
390
|
+
**Note:** Dependency replacements (e.g., Redux→Recoil) still prompt the user even in `--auto-resolve` mode, because auto-resolving a library swap can break skill generation and pattern matching. Only pattern and convention conflicts are auto-resolved.
|
|
391
|
+
|
|
392
|
+
### `--category [name]`
|
|
393
|
+
Only rescan a specific category:
|
|
394
|
+
```
|
|
395
|
+
/wogi-rescan --category stack
|
|
396
|
+
/wogi-rescan --category patterns
|
|
397
|
+
/wogi-rescan --category components
|
|
398
|
+
/wogi-rescan --category functions
|
|
399
|
+
/wogi-rescan --category apis
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### `--since [date]`
|
|
403
|
+
Only consider changes since a specific date:
|
|
404
|
+
```
|
|
405
|
+
/wogi-rescan --since 2026-02-01
|
|
406
|
+
```
|
|
407
|
+
Uses `git log --since` to scope the analysis to recent changes.
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## Error Handling
|
|
412
|
+
|
|
413
|
+
### If pattern extraction fails
|
|
414
|
+
- Log warning, keep existing decisions.md unchanged
|
|
415
|
+
- Display: `Pattern extraction failed. Existing patterns preserved.`
|
|
416
|
+
|
|
417
|
+
### If scanner fails (function or API)
|
|
418
|
+
- Log warning, keep existing maps unchanged
|
|
419
|
+
- Display: `[Scanner] failed. Existing map preserved.`
|
|
420
|
+
|
|
421
|
+
### If Context7 unavailable (skill generation)
|
|
422
|
+
- Create placeholder skill, mark for later refresh
|
|
423
|
+
- Display: `Context7 unavailable. Placeholder skill created for [tech].`
|
|
424
|
+
|
|
425
|
+
### If no changes detected
|
|
426
|
+
- Display: `No changes detected since last sync. WogiFlow state is current.`
|
|
427
|
+
- Still update `lastRescanAt` timestamp
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
## When to Suggest Rescan
|
|
432
|
+
|
|
433
|
+
The AI should proactively suggest `/wogi-rescan` when:
|
|
434
|
+
- User mentions "other developers made changes"
|
|
435
|
+
- `git log` shows commits by other authors since last sync
|
|
436
|
+
- Package.json has new dependencies not in stack.md
|
|
437
|
+
- Morning briefing detects drift between state files and codebase
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## CLI Equivalent
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
./scripts/flow rescan
|
|
445
|
+
./scripts/flow rescan --dry-run
|
|
446
|
+
./scripts/flow rescan --auto-resolve
|
|
447
|
+
```
|
|
@@ -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"
|
|
@@ -174,7 +176,7 @@ Unlike `/wogi-review` which blocks on violations, `/wogi-review-fix` **automatic
|
|
|
174
176
|
| `naming-conventions.md` | File names not kebab-case | Rename file |
|
|
175
177
|
| `naming-conventions.md` | Catch variable not `err` | Replace with `err` |
|
|
176
178
|
| `decisions.md` | Pattern violation (if fixable) | Apply pattern |
|
|
177
|
-
| `app-map.md` | Component duplication
|
|
179
|
+
| `app-map.md` | Component duplication (semantic similarity, configurable) | Remove new, use existing |
|
|
178
180
|
| `security-patterns.md` | Raw JSON.parse | Replace with safeJsonParse |
|
|
179
181
|
| `security-patterns.md` | Unprotected fs.readFileSync | Add try-catch |
|
|
180
182
|
|
|
@@ -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.
|
|
@@ -622,7 +624,7 @@ node scripts/flow-standards-checker.js [changed-files...]
|
|
|
622
624
|
```
|
|
623
625
|
Or if the runtime script is not available, manually check:
|
|
624
626
|
- `decisions.md` - All documented coding rules and patterns
|
|
625
|
-
- `app-map.md` - Component duplication (
|
|
627
|
+
- `app-map.md` - Component duplication (semantic similarity above `config.semanticMatching.thresholds` = violation)
|
|
626
628
|
- `naming-conventions.md` - File names (kebab-case), catch variables (`err` not `e`)
|
|
627
629
|
- `security-patterns.md` - Raw JSON.parse, unprotected fs.readFileSync
|
|
628
630
|
|
|
@@ -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. **
|
|
62
|
+
3. **Every request gets routed — no exemptions.** Questions, operational requests, quick fixes — ALL 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
|
|
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:
|
|
124
|
+
→ Action: Invoke /wogi-start "push to github" (wogi-start internally decides to execute git push)
|
|
130
125
|
```
|
|
131
126
|
|
|
132
127
|
```
|
|
@@ -592,7 +587,7 @@ Planned files: [FILES_TO_CHANGE]
|
|
|
592
587
|
- Extract security patterns relevant to the planned operations
|
|
593
588
|
4. Read .workflow/state/app-map.md
|
|
594
589
|
- For each planned NEW component, check similarity against existing entries
|
|
595
|
-
- Flag any where name or purpose
|
|
590
|
+
- Flag any where name or purpose has semantic similarity above the configured threshold (see `config.semanticMatching.thresholds`)
|
|
596
591
|
- This is the SAME check that flow-standards-gate.js will run post-implementation
|
|
597
592
|
5. Read .workflow/state/decisions.md
|
|
598
593
|
- Extract coding rules that will be enforced for this task type
|
|
@@ -1375,7 +1370,7 @@ When violations are detected, they are automatically:
|
|
|
1375
1370
|
"mode": "block", // "block" or "warn"
|
|
1376
1371
|
"scopeByTaskType": true, // Use smart scoping
|
|
1377
1372
|
"alwaysCheck": ["naming", "security"],
|
|
1378
|
-
"similarityThreshold":
|
|
1373
|
+
"similarityThreshold": 0.8, // Legacy — prefer semanticMatching.thresholds
|
|
1379
1374
|
"learning": {
|
|
1380
1375
|
"enabled": true,
|
|
1381
1376
|
"promotionThreshold": 3,
|