wogiflow 1.0.21 → 1.0.22
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-bug.md +43 -0
- package/.claude/commands/wogi-bulk.md +144 -0
- package/.claude/commands/wogi-changelog.md +36 -0
- package/.claude/commands/wogi-compact.md +99 -0
- package/.claude/commands/wogi-config.md +50 -0
- package/.claude/commands/wogi-context.md +68 -0
- package/.claude/commands/wogi-correction.md +73 -0
- package/.claude/commands/wogi-debt.md +128 -0
- package/.claude/commands/wogi-deps.md +32 -0
- package/.claude/commands/wogi-epics.md +145 -0
- package/.claude/commands/wogi-export.md +100 -0
- package/.claude/commands/wogi-feature.md +149 -0
- package/.claude/commands/wogi-guided-edit.md +83 -0
- package/.claude/commands/wogi-health.md +43 -0
- package/.claude/commands/wogi-help.md +96 -0
- package/.claude/commands/wogi-hybrid-edit.md +36 -0
- package/.claude/commands/wogi-hybrid-off.md +24 -0
- package/.claude/commands/wogi-hybrid-setup.md +79 -0
- package/.claude/commands/wogi-hybrid-status.md +45 -0
- package/.claude/commands/wogi-hybrid.md +54 -0
- package/.claude/commands/wogi-import.md +44 -0
- package/.claude/commands/wogi-init.md +618 -0
- package/.claude/commands/wogi-log.md +38 -0
- package/.claude/commands/wogi-map-add.md +29 -0
- package/.claude/commands/wogi-map-check.md +35 -0
- package/.claude/commands/wogi-map-index.md +98 -0
- package/.claude/commands/wogi-map-scan.md +38 -0
- package/.claude/commands/wogi-map-sync.md +91 -0
- package/.claude/commands/wogi-map.md +33 -0
- package/.claude/commands/wogi-morning.md +65 -0
- package/.claude/commands/wogi-onboard.md +99 -0
- package/.claude/commands/wogi-plan.md +173 -0
- package/.claude/commands/wogi-ready.md +84 -0
- package/.claude/commands/wogi-resume.md +95 -0
- package/.claude/commands/wogi-review.md +636 -0
- package/.claude/commands/wogi-roadmap.md +241 -0
- package/.claude/commands/wogi-rules.md +104 -0
- package/.claude/commands/wogi-search.md +33 -0
- package/.claude/commands/wogi-session-end.md +49 -0
- package/.claude/commands/wogi-setup-stack.md +151 -0
- package/.claude/commands/wogi-skill-learn.md +66 -0
- package/.claude/commands/wogi-skills.md +87 -0
- package/.claude/commands/wogi-standup.md +28 -0
- package/.claude/commands/wogi-start.md +465 -0
- package/.claude/commands/wogi-status.md +41 -0
- package/.claude/commands/wogi-statusline-setup/skill.md +109 -0
- package/.claude/commands/wogi-story.md +98 -0
- package/.claude/commands/wogi-suspend.md +87 -0
- package/.claude/commands/wogi-test-browser.md +43 -0
- package/.claude/commands/wogi-trace.md +198 -0
- package/.claude/docs/architecture.md +37 -0
- package/.claude/docs/commands.md +343 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/README.md +177 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/component-indexing.md +341 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/framework-detection.md +269 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/installation.md +146 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/onboarding-existing.md +317 -0
- package/.claude/docs/knowledge-base/01-setup-onboarding/team-setup.md +346 -0
- package/.claude/docs/knowledge-base/02-task-execution/01-task-planning.md +259 -0
- package/.claude/docs/knowledge-base/02-task-execution/02-execution-loop.md +443 -0
- package/.claude/docs/knowledge-base/02-task-execution/03-verification.md +417 -0
- package/.claude/docs/knowledge-base/02-task-execution/04-completion.md +374 -0
- package/.claude/docs/knowledge-base/02-task-execution/05-session-review.md +170 -0
- package/.claude/docs/knowledge-base/02-task-execution/README.md +173 -0
- package/.claude/docs/knowledge-base/02-task-execution/external-integrations.md +133 -0
- package/.claude/docs/knowledge-base/02-task-execution/model-management.md +202 -0
- package/.claude/docs/knowledge-base/02-task-execution/specification-mode.md +292 -0
- package/.claude/docs/knowledge-base/02-task-execution/sync-daemon.md +96 -0
- package/.claude/docs/knowledge-base/02-task-execution/trade-offs.md +345 -0
- package/.claude/docs/knowledge-base/02-task-execution/workflow-steps.md +357 -0
- package/.claude/docs/knowledge-base/03-self-improvement/README.md +199 -0
- package/.claude/docs/knowledge-base/03-self-improvement/long-input-processing.md +160 -0
- package/.claude/docs/knowledge-base/03-self-improvement/model-learning.md +334 -0
- package/.claude/docs/knowledge-base/03-self-improvement/project-learning.md +301 -0
- package/.claude/docs/knowledge-base/03-self-improvement/skill-learning.md +372 -0
- package/.claude/docs/knowledge-base/03-self-improvement/skill-matching.md +304 -0
- package/.claude/docs/knowledge-base/03-self-improvement/team-learning.md +342 -0
- package/.claude/docs/knowledge-base/04-memory-context/README.md +189 -0
- package/.claude/docs/knowledge-base/04-memory-context/context-management.md +308 -0
- package/.claude/docs/knowledge-base/04-memory-context/memory-commands.md +176 -0
- package/.claude/docs/knowledge-base/04-memory-context/memory-systems.md +359 -0
- package/.claude/docs/knowledge-base/04-memory-context/prd-management.md +115 -0
- package/.claude/docs/knowledge-base/04-memory-context/session-persistence.md +359 -0
- package/.claude/docs/knowledge-base/04-memory-context/team-history.md +317 -0
- package/.claude/docs/knowledge-base/05-development-tools/README.md +84 -0
- package/.claude/docs/knowledge-base/05-development-tools/code-traces.md +278 -0
- package/.claude/docs/knowledge-base/05-development-tools/figma-analyzer.md +253 -0
- package/.claude/docs/knowledge-base/05-development-tools/guided-edit.md +173 -0
- package/.claude/docs/knowledge-base/05-development-tools/mcp-integrations.md +286 -0
- package/.claude/docs/knowledge-base/06-safety-guardrails/README.md +153 -0
- package/.claude/docs/knowledge-base/06-safety-guardrails/checkpoint-rollback.md +302 -0
- package/.claude/docs/knowledge-base/06-safety-guardrails/commit-gates.md +309 -0
- package/.claude/docs/knowledge-base/06-safety-guardrails/damage-control.md +292 -0
- package/.claude/docs/knowledge-base/06-safety-guardrails/security-scanning.md +291 -0
- package/.claude/docs/knowledge-base/README.md +92 -0
- package/.claude/docs/knowledge-base/configuration/README.md +228 -0
- package/.claude/docs/knowledge-base/configuration/all-options.md +1632 -0
- package/.claude/docs/knowledge-base/future-features.md +277 -0
- package/.claude/docs/stack.md +25 -0
- package/.claude/docs/testing.md +71 -0
- package/.claude/rules/README.md +60 -0
- package/.claude/rules/architecture/component-reuse.md +38 -0
- package/.claude/rules/architecture/document-structure.md +76 -0
- package/.claude/rules/architecture/feature-refactoring-cleanup.md +87 -0
- package/.claude/rules/architecture/model-management.md +35 -0
- package/.claude/rules/code-style/naming-conventions.md +55 -0
- package/.claude/rules/security/security-patterns.md +116 -0
- package/.claude/skills/.gitkeep +0 -0
- package/.claude/skills/README.md +131 -0
- package/.claude/skills/_template/commands/.gitkeep +0 -0
- package/.claude/skills/_template/knowledge/anti-patterns.md +49 -0
- package/.claude/skills/_template/knowledge/learnings.md +60 -0
- package/.claude/skills/_template/knowledge/patterns.md +45 -0
- package/.claude/skills/_template/rules/.gitkeep +0 -0
- package/.claude/skills/_template/skill.md +99 -0
- package/.claude/skills/_template/templates/.gitkeep +0 -0
- package/.claude/skills/figma-analyzer/knowledge/anti-patterns.md +216 -0
- package/.claude/skills/figma-analyzer/knowledge/patterns.md +144 -0
- package/.claude/skills/figma-analyzer/skill.md +236 -0
- package/lib/installer.js +59 -19
- package/package.json +5 -1
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
# Execution Loop
|
|
2
|
+
|
|
3
|
+
The execution loop is the core mechanism that ensures task completion. When enabled, it prevents exiting until all acceptance criteria are verified.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Self-Completing Loops
|
|
8
|
+
|
|
9
|
+
**The Problem**: Without enforcement, AI often stops when code "looks done" but hasn't been verified against all acceptance criteria.
|
|
10
|
+
|
|
11
|
+
**The Solution**: Loop enforcement that:
|
|
12
|
+
1. Tracks each acceptance criterion
|
|
13
|
+
2. Requires verification before marking complete
|
|
14
|
+
3. Blocks exit until all criteria pass (or max retries exceeded)
|
|
15
|
+
|
|
16
|
+
### How It Works
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌────────────────────────────────────────────────────────────────┐
|
|
20
|
+
│ EXECUTION LOOP │
|
|
21
|
+
├────────────────────────────────────────────────────────────────┤
|
|
22
|
+
│ │
|
|
23
|
+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
|
|
24
|
+
│ │ Load AC │────▶│ Implement │────▶│ Verify │ │
|
|
25
|
+
│ │ Criteria │ │ Criterion │ │ Criterion │ │
|
|
26
|
+
│ └─────────────┘ └─────────────┘ └──────┬──────┘ │
|
|
27
|
+
│ │ │
|
|
28
|
+
│ ┌──────────────────────────┴────────┐ │
|
|
29
|
+
│ │ │ │
|
|
30
|
+
│ ▼ ▼ │
|
|
31
|
+
│ ┌─────────────┐ ┌─────────────┐
|
|
32
|
+
│ │ PASSED │ │ FAILED │
|
|
33
|
+
│ │ Mark done │ │ Retry or │
|
|
34
|
+
│ │ Next AC │ │ increment │
|
|
35
|
+
│ └─────────────┘ └─────────────┘
|
|
36
|
+
│ │ │ │
|
|
37
|
+
│ ▼ │ │
|
|
38
|
+
│ ┌─────────────┐ │ │
|
|
39
|
+
│ │ All done? │◀────────────────────────────┘ │
|
|
40
|
+
│ │ Can exit? │ │
|
|
41
|
+
│ └──────┬──────┘ │
|
|
42
|
+
│ │ │
|
|
43
|
+
│ ┌─────────────┴─────────────┐ │
|
|
44
|
+
│ ▼ ▼ │
|
|
45
|
+
│ ┌───────────┐ ┌────────────┐ │
|
|
46
|
+
│ │ YES │ │ NO │ │
|
|
47
|
+
│ │ Complete │ │ Continue │────────────────────┘
|
|
48
|
+
│ │ Task │ │ Loop │
|
|
49
|
+
│ └───────────┘ └────────────┘
|
|
50
|
+
│ │
|
|
51
|
+
└────────────────────────────────────────────────────────────────┘
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Configuration
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"loops": {
|
|
59
|
+
"enabled": true, // Enable execution loops
|
|
60
|
+
"enforced": true, // Cannot exit until complete
|
|
61
|
+
"blockExitUntilComplete": true,
|
|
62
|
+
"requireVerification": true, // Must verify each criterion
|
|
63
|
+
"blockOnSkip": true, // Cannot skip without approval
|
|
64
|
+
"maxRetries": 5, // Failed verification retries
|
|
65
|
+
"maxIterations": 20, // Total loop cycles
|
|
66
|
+
"commitEvery": 3, // Checkpoint commits
|
|
67
|
+
"pauseBetweenScenarios": false,
|
|
68
|
+
"autoInferVerification": true,
|
|
69
|
+
"fallbackToManual": true,
|
|
70
|
+
"suggestBrowserTests": true
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Key Settings Explained
|
|
76
|
+
|
|
77
|
+
| Setting | Default | Purpose |
|
|
78
|
+
|---------|---------|---------|
|
|
79
|
+
| `enforced` | true | Master switch for loop enforcement |
|
|
80
|
+
| `maxRetries` | 5 | How many times to retry a failed criterion |
|
|
81
|
+
| `maxIterations` | 20 | Total passes through all criteria |
|
|
82
|
+
| `requireVerification` | true | Must auto-verify or manually confirm |
|
|
83
|
+
| `blockOnSkip` | true | Cannot skip criteria without approval |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Durable Sessions
|
|
88
|
+
|
|
89
|
+
Durable sessions provide crash recovery and progress tracking for long-running tasks.
|
|
90
|
+
|
|
91
|
+
### The Problem
|
|
92
|
+
|
|
93
|
+
- Claude Code might crash mid-task
|
|
94
|
+
- Session might be interrupted
|
|
95
|
+
- Progress is lost, work must restart
|
|
96
|
+
|
|
97
|
+
### The Solution
|
|
98
|
+
|
|
99
|
+
Durable sessions persist:
|
|
100
|
+
- Current step being executed
|
|
101
|
+
- Completion status of each criterion
|
|
102
|
+
- Retry counts and error history
|
|
103
|
+
- Full context for resumption
|
|
104
|
+
|
|
105
|
+
### How It Works
|
|
106
|
+
|
|
107
|
+
1. **Task Start**: Creates `durable-session.json` with all steps
|
|
108
|
+
2. **Step Execution**: Updates step status after each action
|
|
109
|
+
3. **Interruption**: Session persists on disk
|
|
110
|
+
4. **Resume**: `/wogi-start TASK-XXX` detects existing session
|
|
111
|
+
5. **Completion**: Session archived for learning
|
|
112
|
+
|
|
113
|
+
### Configuration
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"durableSteps": {
|
|
118
|
+
"enabled": true, // Enable durable sessions
|
|
119
|
+
"autoResume": true, // Auto-resume on restart
|
|
120
|
+
"checkSuspensionsOnStart": true,
|
|
121
|
+
"defaultMaxAttempts": 5
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Session File Structure
|
|
127
|
+
|
|
128
|
+
```json
|
|
129
|
+
{
|
|
130
|
+
"taskId": "TASK-015",
|
|
131
|
+
"taskType": "task",
|
|
132
|
+
"startedAt": "2024-01-15T10:30:00Z",
|
|
133
|
+
"steps": [
|
|
134
|
+
{
|
|
135
|
+
"id": "step-001",
|
|
136
|
+
"description": "Create AuthService",
|
|
137
|
+
"status": "completed",
|
|
138
|
+
"completedAt": "2024-01-15T10:35:00Z"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "step-002",
|
|
142
|
+
"description": "Create LoginForm",
|
|
143
|
+
"status": "in_progress",
|
|
144
|
+
"attempts": 1
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"execution": {
|
|
148
|
+
"currentStep": 1,
|
|
149
|
+
"totalIterations": 2,
|
|
150
|
+
"totalRetries": 1
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Resuming a Session
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Normal start detects existing session
|
|
159
|
+
/wogi-start TASK-015
|
|
160
|
+
# Output: "🔄 Resuming from durable session (3/7 steps completed)"
|
|
161
|
+
|
|
162
|
+
# Force resume after suspension
|
|
163
|
+
flow resume --force
|
|
164
|
+
|
|
165
|
+
# Check session status
|
|
166
|
+
flow session status
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Suspend/Resume
|
|
172
|
+
|
|
173
|
+
For tasks that require waiting (external reviews, CI runs, etc.), suspend/resume allows pausing without losing context.
|
|
174
|
+
|
|
175
|
+
### Suspension Types
|
|
176
|
+
|
|
177
|
+
| Type | Trigger | Resume Condition |
|
|
178
|
+
|------|---------|-----------------|
|
|
179
|
+
| `time` | Wait for duration | Time elapsed |
|
|
180
|
+
| `poll` | Check external status | Condition met |
|
|
181
|
+
| `manual` | Human review needed | Explicit approval |
|
|
182
|
+
| `file` | Wait for file | File exists |
|
|
183
|
+
|
|
184
|
+
### Configuration
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"suspension": {
|
|
189
|
+
"enabled": true,
|
|
190
|
+
"pollIntervalSeconds": 60, // How often to check poll conditions
|
|
191
|
+
"maxPollAttempts": 120, // Max checks before timeout
|
|
192
|
+
"reminderAfterHours": 24 // Remind about suspended tasks
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Commands
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Suspend current task for 1 hour
|
|
201
|
+
flow suspend --time 1h "Waiting for CI"
|
|
202
|
+
|
|
203
|
+
# Suspend for human review
|
|
204
|
+
flow suspend --manual "Need design approval"
|
|
205
|
+
|
|
206
|
+
# Check suspension status
|
|
207
|
+
flow resume --status
|
|
208
|
+
|
|
209
|
+
# Resume when condition met
|
|
210
|
+
flow resume
|
|
211
|
+
|
|
212
|
+
# Force resume regardless of condition
|
|
213
|
+
flow resume --force
|
|
214
|
+
|
|
215
|
+
# Approve manual review
|
|
216
|
+
flow resume --approve
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Example: CI Wait
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
# After pushing PR
|
|
223
|
+
flow suspend --poll \
|
|
224
|
+
--command "gh pr checks 123 | grep -q 'All checks passed'" \
|
|
225
|
+
"Waiting for CI checks"
|
|
226
|
+
|
|
227
|
+
# WogiFlow will:
|
|
228
|
+
# 1. Save current context
|
|
229
|
+
# 2. Poll the command every 60 seconds
|
|
230
|
+
# 3. Auto-resume when command succeeds
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## Hybrid Mode
|
|
236
|
+
|
|
237
|
+
Hybrid mode uses a local LLM for execution while Claude plans, saving 85-95% of tokens.
|
|
238
|
+
|
|
239
|
+
### The Trade-off
|
|
240
|
+
|
|
241
|
+
| Aspect | Claude Only | Hybrid Mode |
|
|
242
|
+
|--------|-------------|-------------|
|
|
243
|
+
| Token Cost | 100% | 5-15% |
|
|
244
|
+
| Code Quality | Highest | Good (varies by model) |
|
|
245
|
+
| Speed | Fast | Depends on hardware |
|
|
246
|
+
| Context | Full | Limited to prompt |
|
|
247
|
+
|
|
248
|
+
### How It Works
|
|
249
|
+
|
|
250
|
+
1. **Claude Plans**: Creates detailed execution plan with context
|
|
251
|
+
2. **Plan Export**: Saved as structured JSON with all needed info
|
|
252
|
+
3. **Local Execution**: Local LLM executes each step
|
|
253
|
+
4. **Validation**: Results verified against acceptance criteria
|
|
254
|
+
5. **Retry/Escalate**: Failed steps can retry or escalate to Claude
|
|
255
|
+
|
|
256
|
+
### Configuration
|
|
257
|
+
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"hybrid": {
|
|
261
|
+
"enabled": true,
|
|
262
|
+
"executor": {
|
|
263
|
+
"type": "local", // "local" | "cloud"
|
|
264
|
+
"provider": "ollama", // "ollama" | "lmstudio" | "openai" | etc.
|
|
265
|
+
"providerEndpoint": "http://localhost:11434",
|
|
266
|
+
"model": "qwen3-coder"
|
|
267
|
+
},
|
|
268
|
+
"planner": {
|
|
269
|
+
"adaptToExecutor": true, // Adjust plan for model capabilities
|
|
270
|
+
"useAdapterKnowledge": true // Use learned model behaviors
|
|
271
|
+
},
|
|
272
|
+
"settings": {
|
|
273
|
+
"temperature": 0.7,
|
|
274
|
+
"maxTokens": 4096,
|
|
275
|
+
"maxRetries": 20,
|
|
276
|
+
"timeout": 120000,
|
|
277
|
+
"autoExecute": false // Require approval before execution
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Enabling Hybrid Mode
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
# Interactive setup
|
|
287
|
+
/wogi-hybrid-setup
|
|
288
|
+
|
|
289
|
+
# Or manually enable
|
|
290
|
+
/wogi-hybrid
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Execution Flow
|
|
294
|
+
|
|
295
|
+
```
|
|
296
|
+
Claude (Planning) Local LLM (Execution)
|
|
297
|
+
───────────────── ────────────────────
|
|
298
|
+
1. Analyze task
|
|
299
|
+
2. Create plan with:
|
|
300
|
+
- Step descriptions
|
|
301
|
+
- File paths
|
|
302
|
+
- Component imports
|
|
303
|
+
- Type definitions
|
|
304
|
+
- Pattern requirements
|
|
305
|
+
3. Export plan.json
|
|
306
|
+
────────▶ 4. Load plan
|
|
307
|
+
5. Execute each step
|
|
308
|
+
6. Write files
|
|
309
|
+
7. Run validation
|
|
310
|
+
◀──────── 8. Report results
|
|
311
|
+
9. Verify and commit
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Token Savings Calculation
|
|
315
|
+
|
|
316
|
+
Hybrid mode tracks savings:
|
|
317
|
+
```bash
|
|
318
|
+
flow session stats
|
|
319
|
+
# Output:
|
|
320
|
+
# Total sessions: 15
|
|
321
|
+
# Completed: 14
|
|
322
|
+
# Avg tokens saved: 85.3%
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Parallel Execution
|
|
328
|
+
|
|
329
|
+
Execute independent tasks simultaneously using git worktrees.
|
|
330
|
+
|
|
331
|
+
### Configuration
|
|
332
|
+
|
|
333
|
+
```json
|
|
334
|
+
{
|
|
335
|
+
"parallel": {
|
|
336
|
+
"enabled": true,
|
|
337
|
+
"maxConcurrent": 3, // Max parallel tasks
|
|
338
|
+
"autoApprove": false, // Require approval
|
|
339
|
+
"requireWorktree": true, // Isolate in worktrees
|
|
340
|
+
"showProgress": true,
|
|
341
|
+
"autoDetect": true, // Detect parallelizable tasks
|
|
342
|
+
"autoSuggest": true, // Suggest when beneficial
|
|
343
|
+
"autoExecute": false, // Require approval
|
|
344
|
+
"minTasksForParallel": 2
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### How It Works
|
|
350
|
+
|
|
351
|
+
1. **Detection**: Identify tasks with no dependencies
|
|
352
|
+
2. **Worktree Creation**: Each task gets isolated branch
|
|
353
|
+
3. **Parallel Execution**: Run tasks simultaneously
|
|
354
|
+
4. **Merge**: Combine completed branches
|
|
355
|
+
5. **Cleanup**: Remove worktrees
|
|
356
|
+
|
|
357
|
+
### Commands
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
# Suggest parallel execution
|
|
361
|
+
/wogi-bulk TASK-001 TASK-002 TASK-003
|
|
362
|
+
|
|
363
|
+
# Check parallel status
|
|
364
|
+
flow parallel status
|
|
365
|
+
|
|
366
|
+
# Merge completed parallel work
|
|
367
|
+
flow parallel merge
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Loop Status & Monitoring
|
|
373
|
+
|
|
374
|
+
### Check Loop Status
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
# Current loop status
|
|
378
|
+
node scripts/flow-task-enforcer.js status
|
|
379
|
+
|
|
380
|
+
# Output:
|
|
381
|
+
# 📊 Active Loop Session
|
|
382
|
+
# Task: TASK-015
|
|
383
|
+
# Iteration: 3
|
|
384
|
+
# Retries: 1
|
|
385
|
+
#
|
|
386
|
+
# Acceptance Criteria:
|
|
387
|
+
# ✅ AC-1: Create AuthService
|
|
388
|
+
# ✅ AC-2: Create LoginForm
|
|
389
|
+
# ⏳ AC-3: Add validation
|
|
390
|
+
# ⏳ AC-4: Handle errors
|
|
391
|
+
#
|
|
392
|
+
# Can exit: No (incomplete)
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
### Loop Statistics
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
node scripts/flow-task-enforcer.js stats
|
|
399
|
+
|
|
400
|
+
# Output:
|
|
401
|
+
# 📈 Loop Statistics
|
|
402
|
+
# Total loops: 47
|
|
403
|
+
# Completed: 45
|
|
404
|
+
# Failed: 2
|
|
405
|
+
# Avg iterations: 2.3
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## Best Practices
|
|
411
|
+
|
|
412
|
+
1. **Keep criteria atomic** - Each should be independently verifiable
|
|
413
|
+
2. **Use auto-inference** - Let the system verify when possible
|
|
414
|
+
3. **Don't fight the loop** - If stuck, the criteria might need refinement
|
|
415
|
+
4. **Use hybrid for boilerplate** - Save tokens on repetitive work
|
|
416
|
+
5. **Suspend, don't abandon** - Preserve context for later
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## Troubleshooting
|
|
421
|
+
|
|
422
|
+
### Loop won't exit
|
|
423
|
+
- Check if all criteria are marked complete
|
|
424
|
+
- Verify auto-inference is finding files/functions
|
|
425
|
+
- Review verification results in session
|
|
426
|
+
|
|
427
|
+
### Hybrid mode failures
|
|
428
|
+
- Check local LLM is running: `curl http://localhost:11434/api/version`
|
|
429
|
+
- Verify model is loaded: `ollama list`
|
|
430
|
+
- Check timeout settings for slow models
|
|
431
|
+
|
|
432
|
+
### Session not resuming
|
|
433
|
+
- Verify `durable-session.json` exists
|
|
434
|
+
- Check task ID matches
|
|
435
|
+
- Try `flow session status`
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## Related
|
|
440
|
+
|
|
441
|
+
- [Task Planning](./01-task-planning.md) - Before the loop
|
|
442
|
+
- [Verification](./03-verification.md) - How criteria are verified
|
|
443
|
+
- [Trade-offs](./trade-offs.md) - Balancing thoroughness vs tokens
|