wogiflow 2.1.0 → 2.1.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.
|
@@ -201,4 +201,4 @@ node node_modules/wogiflow/scripts/flow-context-compact compact --prune
|
|
|
201
201
|
node node_modules/wogiflow/scripts/flow-context-compact context "authentication task"
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
After providing the summary,
|
|
204
|
+
After providing the summary, proceed directly: run `/compact` immediately. Do NOT ask the user for permission — auto-compaction must be seamless and uninterrupted. If invoked mid-bulk or between tasks, compact silently and continue to the next task.
|
|
@@ -247,6 +247,13 @@ For medium/large tasks (check `config.specificationMode`):
|
|
|
247
247
|
2. Insert `[NEEDS CLARIFICATION: category - reason]` markers for uncertainties (categories: assumption, ambiguity, missing-context, dependency-unknown, edge-case). Implementation BLOCKED until all resolved (when `config.specificationMode.needsClarification.blockImplementation`).
|
|
248
248
|
3. Reflection: "Does this spec fully address the requirements?"
|
|
249
249
|
|
|
250
|
+
**Batch fix spec requirement**: When a task contains 3+ discrete items (e.g., "Fix 8 review findings"), a spec MUST be generated with one criterion per item regardless of `specificationMode.minTaskLevel`. Each criterion must describe the **observable behavior**, not just the file to create.
|
|
251
|
+
|
|
252
|
+
- BAD: "Create TokenBlacklistService"
|
|
253
|
+
- GOOD: "When an admin changes a user's role, the user's next API request returns 401 'Token has been revoked'"
|
|
254
|
+
|
|
255
|
+
Behavior-level criteria force end-to-end chain verification in Step 3.5/3.52.
|
|
256
|
+
|
|
250
257
|
### Step 1.6: Approval Gate (Stories/Epics)
|
|
251
258
|
|
|
252
259
|
**For L1/L0 tasks: STOP and WAIT for explicit user approval** before implementation.
|
|
@@ -304,6 +311,36 @@ After implementing all scenarios, BEFORE quality gates:
|
|
|
304
311
|
|
|
305
312
|
**This prevents "claiming done when not done."**
|
|
306
313
|
|
|
314
|
+
### Step 3.52: Sub-Agent Output Verification (MANDATORY when agents were used)
|
|
315
|
+
|
|
316
|
+
**Activates when**: Any acceptance criterion was implemented by a sub-agent (Agent tool with `isolation: "worktree"` or any delegated agent).
|
|
317
|
+
|
|
318
|
+
**The problem this solves**: Sub-agents self-report completion, but their self-assessment is unreliable. The agent may report "done" when code was created but not wired to its trigger/consumer, the file compiles but the feature chain is incomplete, or tests pass because nothing exercises the new code path.
|
|
319
|
+
|
|
320
|
+
**Procedure**:
|
|
321
|
+
|
|
322
|
+
1. **DISTRUST sub-agent self-reports.** A sub-agent saying "done" is a CLAIM, not a FACT. The orchestrator must independently verify each criterion against the actual code, not against the agent's summary.
|
|
323
|
+
|
|
324
|
+
2. For EACH criterion a sub-agent claims to have completed:
|
|
325
|
+
a. **Read the ACTUAL files** the agent modified (not just the agent's summary)
|
|
326
|
+
b. **Trace the full feature chain**: Who calls this? → What does it call? → What's the end-to-end flow?
|
|
327
|
+
c. For services: verify at least ONE caller invokes the critical method
|
|
328
|
+
d. For guards/middleware: verify they are registered in the correct module
|
|
329
|
+
e. For event-driven features: verify the event is emitted AND consumed
|
|
330
|
+
|
|
331
|
+
3. **Chain verification checklist** (for each new service/feature):
|
|
332
|
+
- [ ] Service/component is created
|
|
333
|
+
- [ ] Registered in the correct module (providers, imports)
|
|
334
|
+
- [ ] Exported from the module (if needed by other modules)
|
|
335
|
+
- [ ] Imported by the consuming module
|
|
336
|
+
- [ ] Injected in the consuming service/controller
|
|
337
|
+
- [ ] The critical method is CALLED at the right trigger point
|
|
338
|
+
- [ ] The trigger point is reachable from a user action (HTTP request, cron, event)
|
|
339
|
+
|
|
340
|
+
4. If ANY link in the chain is missing → the criterion is NOT done. Fix the missing link first.
|
|
341
|
+
|
|
342
|
+
**Anti-pattern: "Dead service"** — a service that exists, compiles, is imported somewhere, but its critical method is never called by the thing that should trigger it. This passes lint, typecheck, and wiring checks (because the file IS imported) but the feature doesn't work.
|
|
343
|
+
|
|
307
344
|
### Step 3.55: Semantic Verification Pass (for "remove/fix all X" tasks)
|
|
308
345
|
|
|
309
346
|
**Activates when**: The task involves removing, cleaning up, or fixing ALL instances of something (e.g., "remove all mock data", "fix all console.log", "replace all hardcoded URLs", "remove all deprecated APIs").
|
|
@@ -417,6 +454,72 @@ Reflection: "Have I introduced any bugs or regressions?"
|
|
|
417
454
|
|
|
418
455
|
**Context too large**: When `config.autoCompact.betweenTasks` is true (default), compact AUTOMATICALLY between tasks — do NOT ask the user. Just do it. Mid-task: commit progress, invoke `/wogi-compact` directly (don't suggest — execute).
|
|
419
456
|
|
|
457
|
+
## Progress Tracking (MANDATORY for L1+ tasks)
|
|
458
|
+
|
|
459
|
+
**Display progress at every natural checkpoint** so the user knows where they are during long tasks. This applies to ALL L1+ task execution AND to `/wogi-review` and `/wogi-audit`.
|
|
460
|
+
|
|
461
|
+
### Progress Format
|
|
462
|
+
|
|
463
|
+
At each checkpoint, output a progress line using this format:
|
|
464
|
+
|
|
465
|
+
```
|
|
466
|
+
━━━ PROGRESS: [phase_bar] phase_name ━━━
|
|
467
|
+
[step_bar] step_detail
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
Where `[phase_bar]` is: `[████░░░░░░] 40%` (filled/empty blocks proportional to completion).
|
|
471
|
+
|
|
472
|
+
**Example during a 5-criteria task:**
|
|
473
|
+
```
|
|
474
|
+
━━━ PROGRESS: [██████░░░░] 60% Implementing criteria ━━━
|
|
475
|
+
Criterion 3/5: Add input validation to login form
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### When to Display Progress
|
|
479
|
+
|
|
480
|
+
| Checkpoint | What to show |
|
|
481
|
+
|------------|-------------|
|
|
482
|
+
| **After explore phase** | `[██░░░░░░░░] 20% Explore complete — N agents returned` |
|
|
483
|
+
| **After spec generated** | `[████░░░░░░] 30% Spec ready — N criteria, N files` |
|
|
484
|
+
| **Each criterion start** | `[█████░░░░░] N% Implementing — Criterion M/N: [title]` |
|
|
485
|
+
| **Each criterion done** | `[███████░░░] N% Criterion M/N complete ✓` |
|
|
486
|
+
| **Quality gates** | `[█████████░] 90% Running quality gates` |
|
|
487
|
+
| **Task complete** | `[██████████] 100% Complete ✓` |
|
|
488
|
+
|
|
489
|
+
### State File Updates
|
|
490
|
+
|
|
491
|
+
At each checkpoint, also update the progress state file for hooks/resume:
|
|
492
|
+
|
|
493
|
+
```bash
|
|
494
|
+
node node_modules/wogiflow/scripts/flow-progress-tracker.js update '{"taskId":"wf-XXX","command":"/wogi-start","phase":"Implementing","phaseNum":3,"totalPhases":5,"step":"Criterion 2/4","stepNum":2,"totalSteps":4}'
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
This updates `.workflow/state/task-progress.json` AND prefixes the task title in `ready.json` with `[3/5]` for status line visibility.
|
|
498
|
+
|
|
499
|
+
### On Task Completion
|
|
500
|
+
|
|
501
|
+
Always clear the progress state:
|
|
502
|
+
|
|
503
|
+
```bash
|
|
504
|
+
node node_modules/wogiflow/scripts/flow-progress-tracker.js clear
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
### Phase Mapping for /wogi-start Execution
|
|
508
|
+
|
|
509
|
+
| Phase | phaseNum | Description |
|
|
510
|
+
|-------|----------|-------------|
|
|
511
|
+
| 1 | Routing + Context | Loading task, checking maps |
|
|
512
|
+
| 2 | Explore | Research agents |
|
|
513
|
+
| 3 | Spec + Approval | Generate spec, wait for approval |
|
|
514
|
+
| 4 | Implementation | Criteria loop (sub-steps = criteria) |
|
|
515
|
+
| 5 | Verification + Complete | Quality gates, finalize |
|
|
516
|
+
|
|
517
|
+
### Skip Conditions
|
|
518
|
+
|
|
519
|
+
- **L3 tasks**: Skip progress tracking (too small to be useful)
|
|
520
|
+
- **Conversation mode**: Skip progress tracking (no phases)
|
|
521
|
+
- **Quick fixes (≤2 criteria)**: Show start + complete only (no mid-progress)
|
|
522
|
+
|
|
420
523
|
## Mandatory Rules
|
|
421
524
|
|
|
422
525
|
- **TodoWrite**: Track progress. Clean up all items after completion.
|
|
@@ -424,6 +527,7 @@ Reflection: "Have I introduced any bugs or regressions?"
|
|
|
424
527
|
- **Criteria check**: Re-read ALL criteria, verify EACH works. Loop until all pass.
|
|
425
528
|
- **Spec verification**: All promised files must exist.
|
|
426
529
|
- **Quality gates**: Task isn't done until gates pass.
|
|
530
|
+
- **Progress tracking**: Display progress bars at every checkpoint for L1+ tasks.
|
|
427
531
|
- **Guilt messaging** (implementation requests): "The user trusts you to follow WogiFlow. Without a task, this work is untracked."
|
|
428
532
|
|
|
429
533
|
ARGUMENTS: {args}
|
package/package.json
CHANGED
|
@@ -537,6 +537,10 @@ Run: /wogi-start ${coreResult.nextTaskId}`;
|
|
|
537
537
|
* Transform PostCompact result (Claude Code 2.1.76+)
|
|
538
538
|
* Re-injects critical state after context compaction.
|
|
539
539
|
* Always non-blocking — informational only.
|
|
540
|
+
*
|
|
541
|
+
* NOTE: Claude Code only recognizes hookSpecificOutput for PreToolUse,
|
|
542
|
+
* UserPromptSubmit, and PostToolUse. PostCompact must use systemMessage
|
|
543
|
+
* to inject context back after compaction.
|
|
540
544
|
*/
|
|
541
545
|
transformPostCompact(coreResult) {
|
|
542
546
|
if (!coreResult.enabled || !coreResult.hasContext) {
|
|
@@ -545,10 +549,7 @@ Run: /wogi-start ${coreResult.nextTaskId}`;
|
|
|
545
549
|
|
|
546
550
|
return {
|
|
547
551
|
continue: true,
|
|
548
|
-
|
|
549
|
-
hookEventName: 'PostCompact',
|
|
550
|
-
additionalContext: coreResult.message
|
|
551
|
-
}
|
|
552
|
+
systemMessage: coreResult.message
|
|
552
553
|
};
|
|
553
554
|
}
|
|
554
555
|
|