wogiflow 2.26.2 → 2.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/wogi-bug.md +30 -0
- package/.claude/commands/wogi-debug-hypothesis.md +33 -0
- package/.claude/commands/wogi-morning.md +1 -2
- package/.claude/commands/wogi-review.md +31 -2
- package/.claude/commands/wogi-start.md +32 -0
- package/.claude/commands/wogi-statusline-setup.md +12 -0
- package/.claude/commands/wogi-story.md +3 -2
- package/.claude/docs/claude-code-compatibility.md +40 -0
- package/.claude/docs/phases/01-explore.md +2 -1
- package/.claude/docs/phases/03-implement.md +4 -0
- package/.claude/docs/phases/04-verify.md +45 -0
- package/.claude/rules/README.md +36 -0
- package/.claude/rules/_internal/worker-tool-first-turn.md +82 -0
- package/.claude/rules/alternative-execpolicy-toml-command-policy.md +11 -0
- package/.claude/rules/alternative-hand-edit-ready-json-to-register-orpha.md +11 -0
- package/.claude/rules/alternative-permission-ruleset-per-phase.md +11 -0
- package/.claude/rules/alternative-short-name.md +12 -0
- package/.claude/rules/alternative-wogi-flow-as-mcp-client-oauth-manager.md +11 -0
- package/.claude/rules/architecture/hook-three-layer.md +68 -0
- package/.claude/rules/dual-repo-architecture-2026-02-28.md +18 -0
- package/.claude/rules/github-release-workflow-2026-01-30.md +16 -0
- package/.claude/settings.json +1 -1
- package/.workflow/agents/logic-adversary.md +2 -1
- package/.workflow/agents/personas/README.md +48 -0
- package/.workflow/agents/personas/platform-rigor.md +38 -0
- package/.workflow/agents/personas/scale-skeptic.md +28 -0
- package/.workflow/agents/personas/security-hawk.md +34 -0
- package/.workflow/agents/personas/simplicity-champion.md +37 -0
- package/.workflow/agents/personas/user-advocate.md +36 -0
- package/.workflow/bridges/base-bridge.js +46 -23
- package/.workflow/templates/claude-md.hbs +44 -122
- package/.workflow/templates/partials/feature-dossiers.hbs +33 -0
- package/.workflow/templates/partials/intent-grounded-reasoning.hbs +2 -12
- package/.workflow/templates/partials/methodology-rules.hbs +85 -79
- package/.workflow/templates/tier3-dom-field-inventory.md +102 -0
- package/lib/fuzzy-patch.js +251 -0
- package/lib/installer.js +8 -0
- package/lib/memory-proposal-store.js +458 -0
- package/lib/mode-schema.js +255 -0
- package/lib/skill-proposal-store.js +432 -0
- package/lib/skill-registry.js +1 -1
- package/lib/wogi-claude +149 -9
- package/lib/wogi-claude-expect.exp +113 -76
- package/lib/workspace-channel-server.js +19 -0
- package/lib/workspace-contracts.js +1 -1
- package/lib/workspace-dispatch-tracking.js +144 -0
- package/lib/workspace-gates.js +1 -1
- package/lib/workspace-ipc-sqlite.js +550 -0
- package/lib/workspace-messages.js +92 -0
- package/lib/workspace-routing.js +1 -1
- package/lib/workspace-task-injector.js +223 -0
- package/lib/workspace.js +23 -0
- package/lib/worktree-review.js +315 -0
- package/package.json +2 -2
- package/scripts/base-workflow-step.js +1 -1
- package/scripts/flow +28 -4
- package/scripts/flow-ac-scope-preservation.js +238 -0
- package/scripts/flow-auto-review-worker.js +75 -0
- package/scripts/flow-auto-review.js +102 -0
- package/scripts/flow-autonomous-detector.js +118 -0
- package/scripts/flow-autonomous-mode.js +153 -0
- package/scripts/flow-best-of-n.js +1 -1
- package/scripts/flow-bulk-loop.js +1 -1
- package/scripts/flow-checkpoint.js +2 -6
- package/scripts/flow-community-sync.js +1 -1
- package/scripts/flow-completion-summary.js +176 -0
- package/scripts/flow-completion-truth-gate.js +343 -4
- package/scripts/flow-config-defaults.js +52 -5
- package/scripts/flow-config-loader.js +3 -2
- package/scripts/flow-context-compact/expander.js +1 -1
- package/scripts/flow-context-compact/section-extractor.js +2 -2
- package/scripts/flow-context-gatherer.js +1 -1
- package/scripts/flow-context-generator.js +1 -1
- package/scripts/flow-context-scoring.js +1 -1
- package/scripts/flow-correct.js +1 -1
- package/scripts/flow-correction-detector.js +3 -2
- package/scripts/flow-decision-authority.js +66 -15
- package/scripts/flow-done.js +33 -1
- package/scripts/flow-epic-cascade.js +171 -0
- package/scripts/flow-epics.js +2 -7
- package/scripts/flow-eval-judge.js +1 -1
- package/scripts/flow-eval.js +1 -1
- package/scripts/flow-export-scanner.js +2 -6
- package/scripts/flow-failure-learning.js +1 -1
- package/scripts/flow-feature-dossier.js +787 -0
- package/scripts/flow-figma-extract.js +2 -2
- package/scripts/flow-figma-generate.js +1 -1
- package/scripts/flow-gate-confidence.js +1 -1
- package/scripts/flow-health.js +52 -1
- package/scripts/flow-hooks.js +1 -1
- package/scripts/flow-id.js +19 -3
- package/scripts/flow-instruction-richness.js +1 -1
- package/scripts/flow-knowledge-router.js +1 -1
- package/scripts/flow-knowledge-sync.js +1 -1
- package/scripts/flow-logic-adversary.js +76 -1
- package/scripts/flow-logic-rules.js +380 -0
- package/scripts/flow-long-input.js +5 -5
- package/scripts/flow-memory-sync.js +1 -1
- package/scripts/flow-memory.js +78 -7
- package/scripts/flow-migrate.js +1 -1
- package/scripts/flow-model-caller.js +1 -1
- package/scripts/flow-models.js +2 -2
- package/scripts/flow-morning.js +0 -17
- package/scripts/flow-multi-approach.js +1 -1
- package/scripts/flow-orchestrate-context.js +4 -4
- package/scripts/flow-orchestrate-templates.js +1 -1
- package/scripts/flow-orchestrate.js +8 -8
- package/scripts/flow-peer-review.js +1 -1
- package/scripts/flow-phase.js +9 -0
- package/scripts/flow-proactive-compact.js +1 -1
- package/scripts/flow-prompt-composer.js +3 -2
- package/scripts/flow-prompt-template.js +3 -2
- package/scripts/flow-providers.js +1 -1
- package/scripts/flow-question-queue.js +255 -0
- package/scripts/flow-repo-map.js +312 -0
- package/scripts/flow-review-passes/index.js +1 -1
- package/scripts/flow-review-passes/integration.js +1 -1
- package/scripts/flow-review-passes/structure.js +1 -1
- package/scripts/flow-revision-tracker.js +1 -1
- package/scripts/flow-section-resolver.js +1 -1
- package/scripts/flow-session-end.js +74 -5
- package/scripts/flow-session-state.js +103 -1
- package/scripts/flow-setup-hooks.js +1 -1
- package/scripts/flow-skeptical-evaluator.js +274 -0
- package/scripts/flow-skill-generator.js +3 -3
- package/scripts/flow-skill-learn.js +3 -6
- package/scripts/flow-skill-manage.js +248 -0
- package/scripts/flow-spec-verifier.js +1 -1
- package/scripts/flow-standards-checker.js +75 -0
- package/scripts/flow-standards-gate.js +1 -1
- package/scripts/flow-statusline-setup.js +8 -2
- package/scripts/flow-step-changelog.js +2 -2
- package/scripts/flow-step-coverage.js +1 -1
- package/scripts/flow-step-knowledge.js +1 -1
- package/scripts/flow-step-regression.js +1 -1
- package/scripts/flow-step-simplifier.js +1 -1
- package/scripts/flow-task-analyzer.js +1 -1
- package/scripts/flow-task-classifier.js +1 -1
- package/scripts/flow-task-enforcer.js +1 -1
- package/scripts/flow-template-extractor.js +1 -1
- package/scripts/flow-trap-zone.js +1 -1
- package/scripts/flow-utils.js +4 -0
- package/scripts/flow-worker-mcp-strip.js +122 -0
- package/scripts/flow-worker-question-classifier.js +51 -5
- package/scripts/flow-workspace-migrate-ipc.js +216 -0
- package/scripts/flow-workspace-summary.js +256 -0
- package/scripts/hooks/adapters/base-adapter.js +2 -2
- package/scripts/hooks/core/feature-dossier-gate.js +194 -0
- package/scripts/hooks/core/observation-capture.js +24 -0
- package/scripts/hooks/core/overdue-dispatches.js +20 -1
- package/scripts/hooks/core/phase-gate.js +15 -1
- package/scripts/hooks/core/phase-transition-auto-review.js +61 -0
- package/scripts/hooks/core/post-compact.js +5 -2
- package/scripts/hooks/core/pre-tool-orchestrator.js +21 -0
- package/scripts/hooks/core/routing-gate.js +58 -0
- package/scripts/hooks/core/session-context.js +108 -0
- package/scripts/hooks/core/session-end-memory-proposals.js +65 -0
- package/scripts/hooks/core/session-end-skill-proposals.js +58 -0
- package/scripts/hooks/core/session-end.js +25 -0
- package/scripts/hooks/core/setup-handler.js +1 -1
- package/scripts/hooks/core/task-boundary-reset.js +110 -4
- package/scripts/hooks/core/worker-boundary-gate.js +71 -0
- package/scripts/hooks/core/worker-tool-first-gate.js +275 -0
- package/scripts/hooks/entry/claude-code/post-tool-use.js +2 -2
- package/scripts/hooks/entry/claude-code/pre-tool-use.js +7 -2
- package/scripts/hooks/entry/claude-code/session-start.js +74 -30
- package/scripts/hooks/entry/claude-code/stop.js +47 -1
- package/scripts/hooks/entry/claude-code/user-prompt-submit.js +17 -0
- package/.workflow/templates/partials/user-commands.hbs +0 -20
|
@@ -17,19 +17,19 @@ You are an AI development assistant using the WogiFlow methodology v1.0. This is
|
|
|
17
17
|
|
|
18
18
|
This applies to ALL message types — implementation, questions, conversations, exploration, research, operational requests. You do NOT handle requests directly.
|
|
19
19
|
|
|
20
|
-
**Anti-Rationalization Checklist** —
|
|
20
|
+
**Anti-Rationalization Checklist** — if any of these thoughts cross your mind, you are about to bypass routing. This is the **master checklist** referenced by all anti-rationalization rules below:
|
|
21
21
|
- "This is just a question, I can handle it directly" → WRONG. Route through `/wogi-start`.
|
|
22
|
-
- "I already know the answer from context" → WRONG. Confidence is not permission.
|
|
22
|
+
- "I already know the answer from context / compaction summary" → WRONG. Confidence is not permission.
|
|
23
23
|
- "This is a conversation, not an implementation" → WRONG. Conversation mode is a classification INSIDE `/wogi-start`, not an exemption from it.
|
|
24
|
-
- "I'm continuing prior work" → WRONG. Every new user message requires routing. Invoke `/wogi-start` with
|
|
25
|
-
- "The user just said yes/continue" → Route through `/wogi-start` which handles follow-ups.
|
|
24
|
+
- "I'm continuing prior work" / "user just said yes/continue" → WRONG. Every new user message requires routing. Invoke `/wogi-start` (with task ID if continuing).
|
|
26
25
|
- "I'll route after I answer" → WRONG. Route BEFORE answering. No text output before the Skill tool call.
|
|
26
|
+
- "I'll just edit `ready.json` or another state file to create the task myself" → WRONG. That is the routing bypass. Use `/wogi-start`.
|
|
27
|
+
|
|
28
|
+
Post-compaction is the #1 bypass trap: you have summary context, you feel confident, you think you can answer directly. That confidence is the trap — hooks (Edit/Write/Read/Glob/Grep/Bash/EnterPlanMode) are ALL blocked until routing completes.
|
|
27
29
|
|
|
28
30
|
### Step 2: Does a task already exist?
|
|
29
31
|
|
|
30
|
-
Check `.workflow/state/ready.json
|
|
31
|
-
- If **YES** → Use `/wogi-start TASK-XXX`
|
|
32
|
-
- If **NO** → Continue to Step 3
|
|
32
|
+
Check `.workflow/state/ready.json`. If YES → `/wogi-start <taskId>`. If NO → continue to Step 3.
|
|
33
33
|
|
|
34
34
|
### Step 3: Assess task size
|
|
35
35
|
|
|
@@ -40,27 +40,6 @@ Check `.workflow/state/ready.json` for existing tasks.
|
|
|
40
40
|
| L1 | Story | 5-15 | **STOP** — Run `/wogi-story` first, wait for approval |
|
|
41
41
|
| L0 | Epic | 15+ | **STOP** — Run `/wogi-epics` first, wait for approval |
|
|
42
42
|
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## Post-Compaction / Session Continuation Routing (CRITICAL)
|
|
46
|
-
|
|
47
|
-
**After context compaction, conversation resumption, or session continuation, the routing requirement is NOT relaxed.**
|
|
48
|
-
|
|
49
|
-
**"Continue with the last task" is NOT permission to skip routing.** This is the #1 bypass pattern — the AI rationalizes that "continuing" prior work grants implicit permission to skip `/wogi-start`. It then goes into autopilot, directly editing ready.json to create fake tasks and coding without routing. This produces untracked, inconsistent work.
|
|
50
|
-
|
|
51
|
-
When you resume from a compacted/summarized conversation:
|
|
52
|
-
1. Compressed context from prior work does NOT change the routing requirement
|
|
53
|
-
2. Every user message requires `/wogi-*` routing — NO exceptions, even after compaction
|
|
54
|
-
3. Do NOT answer from compacted memory without routing first
|
|
55
|
-
4. "I already know the answer" is the #1 rationalization for bypass — it is NEVER a valid reason to skip routing
|
|
56
|
-
5. The compaction summary preserves context but does NOT grant routing bypass
|
|
57
|
-
6. Do NOT edit `ready.json` or any `.workflow/state/` file to create tasks manually — that is a routing bypass
|
|
58
|
-
7. "Continue where we left off" still requires `/wogi-start` — invoke it with the task ID
|
|
59
|
-
|
|
60
|
-
**The bypass pattern you must resist**: After compaction, you have context from the summary. You feel confident. You think "I can just answer this directly." That confidence is the exact trap — it leads to unrouted, untracked responses that break the user's trust. The routing hooks enforce this mechanically — Edit, Write, Read, Glob, Grep, Bash, and EnterPlanMode are ALL blocked until routing completes.
|
|
61
|
-
|
|
62
|
-
**There is exactly ONE correct action**: Invoke the Skill tool with skill="wogi-start" BEFORE any other response. Not after explaining. Not after "just answering the question." BEFORE everything.
|
|
63
|
-
|
|
64
43
|
{{/if}}
|
|
65
44
|
|
|
66
45
|
{{#if config.strictAdherence.enabled}}
|
|
@@ -84,12 +63,6 @@ When unsure, ASK the user rather than deviate from source patterns.
|
|
|
84
63
|
---
|
|
85
64
|
{{/if}}
|
|
86
65
|
|
|
87
|
-
## Quick Start
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
npm install -D wogiflow && npx flow onboard
|
|
91
|
-
```
|
|
92
|
-
|
|
93
66
|
## Core Principles
|
|
94
67
|
|
|
95
68
|
1. **State files are memory** — Read `.workflow/state/` first
|
|
@@ -112,9 +85,7 @@ npm install -D wogiflow && npx flow onboard
|
|
|
112
85
|
|
|
113
86
|
**When auto-memory conflicts with any `.workflow/state/` file, the state file WINS. No exceptions.**
|
|
114
87
|
|
|
115
|
-
**Auto-memory
|
|
116
|
-
|
|
117
|
-
**Auto-memory must NEVER store:** coding patterns, component knowledge, task history, bug patterns, function registries, or anything that belongs in `.workflow/state/`. If you learn something that should persist, write it to the correct state file using the WogiFlow learning system — NOT to auto-memory.
|
|
88
|
+
**Auto-memory scope**: user preferences + high-level architectural context only. Coding patterns, component/function/API knowledge, task history, and bug patterns all belong in `.workflow/state/` — write them there via the WogiFlow learning system (`/wogi-decide`, `/wogi-learn`, `feedback-patterns.md`), never to auto-memory.
|
|
118
89
|
|
|
119
90
|
## Essential Commands
|
|
120
91
|
|
|
@@ -171,23 +142,6 @@ See `.claude/docs/claude-code-compatibility.md` for Claude Code version features
|
|
|
171
142
|
|
|
172
143
|
When in doubt, route through `/wogi-start` which will classify correctly.
|
|
173
144
|
|
|
174
|
-
## CRITICAL: Universal Entry Point — ALL Requests
|
|
175
|
-
|
|
176
|
-
**ALL user messages MUST go through a `/wogi-*` command. No direct handling. No self-classification.**
|
|
177
|
-
|
|
178
|
-
1. Check the Natural Language Detection table above. If a phrase matches → invoke that `/wogi-*` command directly.
|
|
179
|
-
2. If no match → invoke `/wogi-start` with the user's full message as args.
|
|
180
|
-
|
|
181
|
-
**Do NOT** jump straight to editing files, answering questions, or executing operations. Route through a `/wogi-*` command FIRST, then follow its routing decision. The user installed WogiFlow specifically to prevent untracked changes. Bypassing it breaks their trust.
|
|
182
|
-
|
|
183
|
-
## Session Startup
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
cat .workflow/config.json # Read config
|
|
187
|
-
cat .workflow/state/ready.json # Check tasks
|
|
188
|
-
cat .workflow/state/decisions.md # Project rules
|
|
189
|
-
```
|
|
190
|
-
|
|
191
145
|
## Task Execution Rules
|
|
192
146
|
|
|
193
147
|
**These apply to ALL implementation work:**
|
|
@@ -219,47 +173,28 @@ If the user provides N items, ALL N must become tracked work items. No exception
|
|
|
219
173
|
|
|
220
174
|
### Mid-Execution Anti-Deferral (MANDATORY — APPLIES AFTER TASKS ARE CREATED)
|
|
221
175
|
|
|
222
|
-
**Reordering is permitted. Deferring is not.** Once work is tracked
|
|
176
|
+
**Reordering is permitted. Deferring is not.** Once work is tracked in an epic/story/wave, you MUST NOT propose to skip, postpone, drop, or "deprioritize to later" any of it — regardless of risk, cost, or token-weight. You may only change the **sequence** of execution.
|
|
223
177
|
|
|
224
|
-
|
|
178
|
+
Token cost, risk flags, and "user probably won't miss this" are never valid reasons to drop scoped work. "Revisit later" and "deprioritize" are soft-defer euphemisms — don't use them. Apply the master Anti-Rationalization Checklist above.
|
|
225
179
|
|
|
226
|
-
**
|
|
227
|
-
- "This piece is high-risk — let's defer it to a later epic" → WRONG. It ships this epic. Reorder it later in the sequence if needed.
|
|
228
|
-
- "To save tokens, let's skip wf-XXXX for now" → WRONG. Token cost is never a reason to drop scoped work.
|
|
229
|
-
- "The user probably won't miss this one" → WRONG. The user tracked it. It ships.
|
|
230
|
-
- "We can revisit this after the main work lands" → WRONG. "Revisit" is a soft defer. Sequence it, don't postpone it.
|
|
231
|
-
- "This was lower priority anyway" → WRONG. Priority affects ORDER, never INCLUSION.
|
|
180
|
+
**MAY do after tasks are tracked**: propose sequence/parallelization/prerequisites; flag risks without using them to drop scope.
|
|
232
181
|
|
|
233
|
-
**
|
|
234
|
-
- Propose a **sequence** (A → B → C, or A∥B → C) with reasoning
|
|
235
|
-
- Propose **parallelization** when independent
|
|
236
|
-
- Propose **prerequisites** that must land first (that is reordering, not deferral)
|
|
237
|
-
- Flag risks without using them as justification to drop scope
|
|
182
|
+
**MUST NEVER do**: propose to "defer", skip based on AI judgment, present a plan that silently omits tracked work.
|
|
238
183
|
|
|
239
|
-
**
|
|
240
|
-
- Propose to "defer" a tracked story "to save tokens" or "reduce risk"
|
|
241
|
-
- Skip a scoped story because you judged it lower-value
|
|
242
|
-
- Use the word "defer" as a euphemism for "drop"
|
|
243
|
-
- Present a plan that silently omits already-tracked work
|
|
244
|
-
|
|
245
|
-
**When genuinely unsure the work is still needed**: ask the user explicitly — "Do you still want wf-XXXX to ship this epic, or should we drop it?" Let them decide. Do NOT make that call autonomously.
|
|
184
|
+
**When genuinely unsure work is still needed**: ask explicitly — "Do you still want wf-XXXX to ship this epic, or drop it?" User decides, not you.
|
|
246
185
|
|
|
247
186
|
### Review-Findings Anti-Deferral (MANDATORY — INCIDENT-DRIVEN)
|
|
248
187
|
|
|
249
|
-
|
|
188
|
+
Extends Mid-Execution Anti-Deferral to `/wogi-review`, `/wogi-audit`, `/wogi-triage` findings. When the user says "fix all findings" / "option 1" / any variant meaning "address everything":
|
|
250
189
|
|
|
251
|
-
1.
|
|
252
|
-
2.
|
|
253
|
-
3.
|
|
254
|
-
4.
|
|
190
|
+
1. Ship a fix for every finding at evidence tier ≥ 1, regardless of effort estimate.
|
|
191
|
+
2. Never silently convert a finding to "deferred" in commit/release notes without the user explicitly saying "defer X."
|
|
192
|
+
3. If an item is genuinely too large for the current release → STOP and ask: "Finding X requires ~Y min. Ship / split into its own release / defer? Your call."
|
|
193
|
+
4. Never list a finding in release notes without actually fixing it. Promise/delivery mismatches are the rubber-stamp pattern the Completion Truth Gate was designed to prevent.
|
|
255
194
|
|
|
256
|
-
|
|
257
|
-
- "M1 is a restructure, that warrants a separate release" → WRONG. The user said fix all. Ask first if you think it's too big.
|
|
258
|
-
- "This finding is low-risk, it can wait" → WRONG. Low-risk doesn't mean drop-worthy.
|
|
259
|
-
- "The release notes will acknowledge it's deferred" → WRONG. User didn't defer. You are.
|
|
260
|
-
- "I'll mention it in the commit so it's transparent" → WRONG. Transparency ≠ permission. Ship the fix.
|
|
195
|
+
Transparency ≠ permission. "Low-risk can wait" and "restructure warrants separate release" are AI judgment calls — they're the user's to make. Apply the master Anti-Rationalization Checklist above.
|
|
261
196
|
|
|
262
|
-
**Incident
|
|
197
|
+
**Incident origin**: 2026-04-15, v2.17.4 claimed "fix all" but silently deferred M1 and dropped M3. User correction: *"You're not supposed to defer any fixes. It's up to the user to defer, not you."* v2.17.5 fixed both and added this rule.
|
|
263
198
|
|
|
264
199
|
### Task ID Format (MANDATORY)
|
|
265
200
|
|
|
@@ -272,27 +207,20 @@ All task IDs MUST be generated by `generateTaskId()` from `wogiflow/scripts/flow
|
|
|
272
207
|
|
|
273
208
|
When creating tasks programmatically, always call `generateTaskId(title)` — never construct IDs by hand.
|
|
274
209
|
|
|
275
|
-
### Before Starting
|
|
276
|
-
1. Check `app-map.md` for existing components
|
|
277
|
-
2.
|
|
278
|
-
3.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
### After Completing:
|
|
291
|
-
1. Update `request-log.md` with tags
|
|
292
|
-
2. Registry maps (app-map, function-map, api-map, schema-map, service-map) are **auto-updated** by the `registryUpdate` quality gate — it runs `flow registry-manager scan` on all active registries
|
|
293
|
-
3. Run quality gates (lint, typecheck, test)
|
|
294
|
-
4. Provide completion report
|
|
295
|
-
5. **If you have a follow-up question for the user** (e.g., "task done — should I also update X?"), run `flow ask "<your question>"` BEFORE the turn ends. This defers the task-boundary session restart (if enabled via `taskBoundaryReset.enabled`) so your question doesn't get orphaned when claude restarts. The user's response automatically clears the deferral.
|
|
210
|
+
### Before Starting
|
|
211
|
+
1. Check `app-map.md` (and other active registries) for existing components; check `decisions.md` for coding patterns.
|
|
212
|
+
2. Load task acceptance criteria.
|
|
213
|
+
3. **Consumer Impact Analysis** (MANDATORY for refactors/migrations): grep all files that import the module; classify as BREAKING / NEEDS-UPDATE / SAFE. ≥5 breaking → phased migration.
|
|
214
|
+
|
|
215
|
+
### While Working
|
|
216
|
+
Follow criteria exactly. Reuse existing components/patterns. Validate (lint/typecheck) after EVERY file edit.
|
|
217
|
+
|
|
218
|
+
### After Completing
|
|
219
|
+
1. Update `request-log.md` with tags.
|
|
220
|
+
2. Registry maps auto-update via the `registryUpdate` quality gate (`flow registry-manager scan`).
|
|
221
|
+
3. Run quality gates (lint, typecheck, test).
|
|
222
|
+
4. Provide completion report.
|
|
223
|
+
5. **Follow-up question for the user?** Run `flow ask "<question>"` BEFORE the turn ends — this defers the task-boundary session restart (when `taskBoundaryReset.enabled`) so the question isn't orphaned. User's reply clears the deferral automatically.
|
|
296
224
|
|
|
297
225
|
## Auto-Validation (CRITICAL)
|
|
298
226
|
|
|
@@ -353,27 +281,17 @@ Before closing any task, ensure all required gates pass (per `config.json → qu
|
|
|
353
281
|
|
|
354
282
|
## Context Management
|
|
355
283
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
**NEVER invoke `/wogi-pre-compact` proactively.** Only run it when the user explicitly asks to compact or save context. When the user says "continue", "go ahead", or "keep going" — that means **start the next task**, not compact. Compaction is the SYSTEM's job, not yours.
|
|
284
|
+
Compaction is automatic and silent — the SYSTEM handles it, not you. WogiFlow persists state continuously; the PostCompact hook restores it. **NEVER invoke `/wogi-pre-compact` proactively.** Only run it when the user explicitly says "compact" / "save context" / "running low on context."
|
|
359
285
|
|
|
360
|
-
**
|
|
286
|
+
"Continue" / "go ahead" / "keep going" means **start the next task**, not compact. The anti-pattern to avoid: user says "continue" → you decide context is large → you invoke pre-compact → you output a summary → you ask the user to `/compact`. Wrong. Start the next task.
|
|
361
287
|
|
|
362
288
|
**What survives compaction automatically** (via PostCompact hook + state files):
|
|
363
289
|
- Active task ID, title, type, and acceptance criteria
|
|
364
|
-
- Which criteria are completed vs pending (from durable-session.json)
|
|
365
|
-
- Current workflow phase
|
|
366
|
-
-
|
|
367
|
-
- Last request-log entry number
|
|
368
|
-
- Routing enforcement (re-armed automatically)
|
|
369
|
-
|
|
370
|
-
**When auto-compaction triggers mid-session**: The system handles it. The PostCompact hook reloads state. You resume working on the next task from `ready.json`. No user interaction needed.
|
|
371
|
-
|
|
372
|
-
**The ONLY times to invoke `/wogi-pre-compact`**:
|
|
373
|
-
- User explicitly says "compact", "save context", or "running low on context"
|
|
374
|
-
- `config.autoCompact.betweenTasks` is true AND you're between tasks AND context is above threshold — but even then, just compact silently and continue, don't ask
|
|
290
|
+
- Which criteria are completed vs pending (from `durable-session.json`)
|
|
291
|
+
- Current workflow phase, changed files list (from `task-checkpoint.json`)
|
|
292
|
+
- Last request-log entry number; routing enforcement (re-armed automatically)
|
|
375
293
|
|
|
376
|
-
**For L1+ tasks**:
|
|
294
|
+
**For L1+ tasks**: the pre-task context estimator (Step 0.25) decides. If the task won't fit → compact silently and continue. Do NOT ask.
|
|
377
295
|
|
|
378
296
|
## Compact Instructions
|
|
379
297
|
|
|
@@ -436,6 +354,10 @@ Use `/wogi-research "question"` for rigorous verification.
|
|
|
436
354
|
|
|
437
355
|
---
|
|
438
356
|
|
|
357
|
+
{{> feature-dossiers}}
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
439
361
|
## Generated by CLI Bridge
|
|
440
362
|
|
|
441
363
|
This file was generated by the Wogi Flow CLI bridge.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
### Feature Dossiers (MANDATORY — AUTO-LOADED)
|
|
2
|
+
|
|
3
|
+
Per-feature canonical knowledge lives in `.workflow/dossiers/<slug>.md`. Cross-cutting logic rules live in `.workflow/dossiers/_logic-rules.md`. These capture what `app-map.md`, `function-map.md`, and commit messages do not:
|
|
4
|
+
|
|
5
|
+
- Owner-rejected design alternatives ("stack-two-components merge was rejected, user picked merged-card")
|
|
6
|
+
- Removed elements the codebase must not reintroduce ("no contact-person block — every person needs a seat")
|
|
7
|
+
- Cross-repo contracts ("BE returns Decimal as string, FE parses")
|
|
8
|
+
- Known global-state bugs and the task IDs tracking them
|
|
9
|
+
|
|
10
|
+
**Auto-injection** — when a task touches a feature (matched via title, description, or files-touched), the dossier's canonical/contracts/rejected/removed sections are injected directly into the phase prompt. You do not need to fetch them. You cannot skip them under token pressure.
|
|
11
|
+
|
|
12
|
+
**Contradiction gate** — during `/wogi-story` spec review, the spec is scanned against every matching dossier. If the spec reintroduces a removed element or mentions a rejected alternative, spec approval is blocked with a citation. Override only by updating the dossier first (document that the owner changed their mind, with date), then re-running spec.
|
|
13
|
+
|
|
14
|
+
**Drift detector** — `flow feature-dossier drift <slug>` greps the codebase for every `enforcement-grep` regex listed under a dossier's Removed Elements. Surfaces cases where the dossier says "removed" but the code still has the pattern (the contact-person case from the 2026-04-24 workspace incident).
|
|
15
|
+
|
|
16
|
+
**Cross-cutting rules** — `_logic-rules.md` holds rules that span multiple features ("every person in the system needs a seat"). These are auto-loaded for any task touching files in the rule's `Applies to` scope. `flow logic-rules propagate <id>` finds other places the rule should apply.
|
|
17
|
+
|
|
18
|
+
**Workspace-mode** — in workspace manager/worker setups, workspace-level dossiers live at `$WOGI_WORKSPACE_ROOT/.workspace/dossiers/` for cross-repo features (spanning BE+FE). Per-repo dossiers stay at `<repo>/.workflow/dossiers/`. Workspace shadows per-repo on slug collision.
|
|
19
|
+
|
|
20
|
+
**When to scaffold a dossier** — any user-facing feature that has:
|
|
21
|
+
- Multiple moving parts (more than one page/component)
|
|
22
|
+
- Cross-repo contracts (FE/BE coordination)
|
|
23
|
+
- Prior owner corrections that are not already in `decisions.md`
|
|
24
|
+
- Rejected alternatives worth remembering
|
|
25
|
+
- Removed elements that shouldn't come back
|
|
26
|
+
|
|
27
|
+
Command: `flow feature-dossier scaffold <slug> --title "..." --owners "fe,be"`
|
|
28
|
+
|
|
29
|
+
**Primary failure this prevents** — the 2026-04-24 workspace incident catalog documented 22+ repeat failures across 3 months where Claude re-asked product questions the owner had already answered, dropped features during merges, or reintroduced removed elements. Dossier auto-injection fixes the mechanical root cause: prior knowledge exists but isn't consulted under token pressure. Auto-injection is consultation-by-default.
|
|
30
|
+
|
|
31
|
+
Full docs: `.workflow/dossiers/README.md`.
|
|
32
|
+
|
|
33
|
+
Config: `.workflow/config.json → featureDossier.{enabled, autoMatchConfidence, blockOnContradiction}`.
|
|
@@ -21,20 +21,10 @@ This project has IGR enabled (`config.intentGroundedReasoning.enabled: true`). I
|
|
|
21
21
|
### Operator commands
|
|
22
22
|
|
|
23
23
|
- `/wogi-challenge <plan-or-taskId>` — manually invoke the Logic Adversary on any plan
|
|
24
|
-
- `/wogi-gate-stats [--since=7d] [--gate=ID]` —
|
|
24
|
+
- `/wogi-gate-stats [--since=7d] [--gate=ID]` — per-gate self-assessment dashboard
|
|
25
25
|
- `node scripts/flow-intent-bootstrap.js [bootstrap|status|refresh]` — manage intent artifacts
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Set `intentGroundedReasoning.enabled: false` in `.workflow/config.json`. All IGR steps SKIP cleanly; pipeline reverts to pre-IGR behavior.
|
|
30
|
-
|
|
31
|
-
### Reference
|
|
32
|
-
|
|
33
|
-
- Operator docs: `.claude/docs/intent-grounded-reasoning.md`
|
|
34
|
-
- Telemetry docs: `.claude/docs/gate-telemetry.md`
|
|
35
|
-
- Logic Constitution: `.workflow/rubrics/logic-constitution-v1.md`
|
|
36
|
-
- Adversary persona: `.workflow/agents/logic-adversary.md`
|
|
37
|
-
- Architect persona: `.workflow/agents/architect.md`
|
|
27
|
+
Toggle off via `intentGroundedReasoning.enabled: false`. Full docs at `.claude/docs/intent-grounded-reasoning.md` (and gate telemetry at `.claude/docs/gate-telemetry.md`).
|
|
38
28
|
|
|
39
29
|
---
|
|
40
30
|
{{/if}}
|
|
@@ -1,149 +1,155 @@
|
|
|
1
1
|
## WogiFlow Methodology Rules
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Product-level rules enforced by shipped hooks. Text below exists so Claude understands the contract, not as the enforcement mechanism itself.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
### Research Before Propose
|
|
7
|
+
### Research Before Propose
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Before proposing a fix, plan, or spec, read 2+ files from `.workflow/state/`, `.workflow/changes/`, `.workflow/specs/`, or `.workflow/epics/` — evidence before invention. Baseline LLM training biases toward plausible-sounding solutions; in a codebase with existing infrastructure, "plausible" is frequently wrong.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
You MAY ask clarifying questions (valid escape hatch). You may NOT propose without evidence.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Enforced by: `research-evidence-gate.js` (blocks `→ spec_review` / `→ coding` transitions and spec-file writes until threshold met; cleared at task start, session-end, and post-compact). Config: `hooks.rules.researchEvidenceGate.{enabled,minEvidence}` (defaults `true`, `2`).
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
**Enforcement**: `scripts/hooks/core/research-evidence-gate.js` tracks state-file reads (`.workflow/state/`, `.workflow/changes/`, `.workflow/specs/`, `.workflow/epics/`) in the current task turn. Three enforcement points check the evidence fingerprint before proposal actions:
|
|
15
|
+
---
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
2. **Spec write** — PreToolUse blocks `Edit`/`Write` to `.workflow/changes/*.md`, `.workflow/specs/*.md`, or `.workflow/epics/*.md` when evidence is below threshold.
|
|
21
|
-
3. **Channel dispatch** — in workspace manager mode, `dispatchToChannel()` blocks dispatching a task to a worker until the manager has read evidence from the target member repo.
|
|
17
|
+
### Completion-Claim Honesty Scan
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
At session-end and `flow health`, `ready.json` entries are scanned (surfaced, not blocked) for:
|
|
20
|
+
- **Status-mismatch** — free-text says "done/completed/shipped" while `status` is partial/blocked/failed.
|
|
21
|
+
- **Negation-vs-evidence** — free-text says "no outages / 0 regressions" while `hotfixes[]` / `incidents[]` / `regressions[]` is non-empty.
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
Enforced by: `flow-completion-truth-gate.js → scanForClaimContradictions()`.
|
|
26
24
|
|
|
27
25
|
---
|
|
28
26
|
|
|
29
|
-
###
|
|
27
|
+
### Merge-Plan Artifact Gate
|
|
28
|
+
|
|
29
|
+
`/wogi-finalize` requires `.workflow/scratch/merge-plan.md` for merges >5 commits or any cross-repo merge. Every commit in `git log <base>..<branch>` must map to `port | adapt | skip-style | superseded | skip-with-reason`; SHA-line count must equal commit count. ≥20% restructure-pattern files triggers a structural warning that biases affected commits toward `adapt`.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Enforced by: `flow-structure-sensor.js`, `.claude/commands/wogi-finalize.md` Step 2.5.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### Story Creation Quality Gates
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
`/wogi-story` runs 5 P0 spec-quality gates at creation time (not implementation-correctness gates — that's `/wogi-start`'s job):
|
|
37
38
|
|
|
38
|
-
**
|
|
39
|
+
1. **Long Input** — ≥40 lines or ≥5 discrete items → route to `/wogi-extract-review`.
|
|
40
|
+
2. **Item Reconciliation** — ≥3 items → enumerated Item Manifest; unmapped items surface as warnings.
|
|
41
|
+
3. **Consumer Impact Analysis** — refactoring keywords trigger `git grep` for consumers; ≥5 breaking → phased migration recommendation.
|
|
42
|
+
4. **Scope-Confidence Audit** — assumption patterns (`new <X>`, `existing <Y>`) verified against codebase; findings go to Pending Clarifications.
|
|
43
|
+
5. **Intent Bootstrap Coordination** — schedules IGR artifact bootstrap so `/wogi-story` and `/wogi-start` don't both prompt.
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
All gates fail-open (grep/classifier unavailable → warning, story still created). Bypass for testing via `--skip-gates`. Config: `storyFlow.*`.
|
|
41
46
|
|
|
42
47
|
---
|
|
43
48
|
|
|
44
|
-
###
|
|
49
|
+
### Workspace Worker Contract
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
*Applies only in workspace worker mode (`WOGI_WORKSPACE_ROOT` set + `WOGI_REPO_NAME !== 'manager'`). Ignore in solo sessions.*
|
|
47
52
|
|
|
48
|
-
**
|
|
53
|
+
**Tool-First Turn**: Every turn after `UserPromptSubmit` must contain ≥1 tool call. In strict mode (default), the first assistant content block must be `tool_use`, not text. Pure-text responses are invisible to the user (they only see the manager terminal) and disqualify the worker from the three-state contract below.
|
|
49
54
|
|
|
50
|
-
**
|
|
55
|
+
**Three-State End-of-Turn**: Exactly one of:
|
|
56
|
+
1. **ACTION** — start next pre-approved channel dispatch via `/wogi-start <nextId>`.
|
|
57
|
+
2. **ESCALATION** — channel-dispatch `## QUESTION: ...` to the manager.
|
|
58
|
+
3. **IDLE** — zero pending dispatches AND zero in-progress tasks.
|
|
51
59
|
|
|
52
|
-
|
|
60
|
+
Hedging phrases ("awaiting your signal", "let me know", "standing by", "should I continue") are mechanically forbidden — visibility is NOT a substitute for action; the manager already pre-approved the dispatch by queuing it.
|
|
53
61
|
|
|
54
|
-
|
|
62
|
+
**No direct user prompts**: `AskUserQuestion` is blocked; questions go through channel dispatch as `## QUESTION: ...`. Block message carries the exact `curl` command to use.
|
|
55
63
|
|
|
56
|
-
|
|
64
|
+
**Hedging detection**: A Haiku classifier inspects the final message at Stop-hook time; confidence ≥ `minConfidence` → stop is blocked with channel-dispatch instructions. Fail-open on missing API key / transcript / classifier error.
|
|
57
65
|
|
|
58
|
-
|
|
66
|
+
Enforced by: `worker-tool-first-gate.js` (G1/G4/Gap B), `worker-boundary-gate.js`, `flow-worker-question-classifier.js`. Config: `workspace.toolFirstTurnGate.{enabled,strict}`, `workspace.blockAskUserQuestionInWorker`, `workspace.aiWorkerQuestionClassifier.*`, `workspace.autoPickupChannelDispatches`.
|
|
59
67
|
|
|
60
|
-
|
|
61
|
-
2. **Item Reconciliation** — ≥3 discrete items → enumerated "Item Manifest" section; every item must appear in at least one criterion or sub-task. Unmapped items surface as a warning.
|
|
62
|
-
3. **Consumer Impact Analysis** — refactoring keywords (`refactor`, `rename`, `migrate`, `split`, `extract`, ...) trigger `git grep` for consumers. ≥5 breaking consumers → phased migration recommendation.
|
|
63
|
-
4. **Scope-Confidence Audit** — assumption patterns (`new <X>`, `existing <Y>`, `the <Z> service`) are verified against the codebase; findings go into a "Pending Clarifications" block.
|
|
64
|
-
5. **Intent Bootstrap Coordination** — schedules IGR artifact bootstrap via `intentBootstrapScheduledAt` flag so `/wogi-story` and `/wogi-start` don't both prompt.
|
|
68
|
+
---
|
|
65
69
|
|
|
66
|
-
|
|
70
|
+
### Workspace Manager Silent-Halt Detection
|
|
67
71
|
|
|
68
|
-
|
|
72
|
+
*Applies only in workspace manager mode. Ignore in solo sessions.*
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
Every manager→worker dispatch is tracked. A pending dispatch past its `expectedDeadline` with no `task-complete` or `worker-stopped` message = silent death, surfaced on the manager's next turn via `UserPromptSubmit` `additionalContext`. Default `expectedDurationMs = 30min`; callers override per-dispatch for long tasks.
|
|
75
|
+
|
|
76
|
+
Three terminal states: **Completed** (task-complete arrived), **Graceful-stop** (worker-stopped arrived), **Silent-halt** (no message, deadline passed).
|
|
71
77
|
|
|
72
|
-
|
|
78
|
+
Enforced by: `lib/workspace-dispatch-tracking.js`, `.workspace/state/dispatched-tasks.json` (ring buffer, last 100 records). File-based, hook-driven, no background processes.
|
|
73
79
|
|
|
74
|
-
|
|
80
|
+
---
|
|
75
81
|
|
|
76
|
-
|
|
82
|
+
### Main-Mode Question Classifier
|
|
77
83
|
|
|
78
|
-
|
|
79
|
-
2. **ESCALATION** — channel-dispatched a `## QUESTION:` to the manager (after local resolution attempts failed), OR
|
|
80
|
-
3. **IDLE** — zero pending channel dispatches AND zero in-progress tasks.
|
|
84
|
+
*Applies in solo/main-mode sessions with `taskBoundaryReset.enabled: true`.*
|
|
81
85
|
|
|
82
|
-
|
|
86
|
+
Before the Stop hook fires SIGTERM for task-boundary restart, a Haiku classifier inspects the final assistant message. If the AI ended the turn with an open user-facing question AND `pending-question.json` is absent, the classifier writes the marker and defers the restart — the user's reply then lands in the same session context. Fail-open throughout.
|
|
83
87
|
|
|
84
|
-
**
|
|
88
|
+
**Prefer explicit `flow ask "<question>"`** — it writes the marker directly and runs before the classifier (short-circuits with `pending-question-deferred`). The classifier is the safety net for when you forget.
|
|
85
89
|
|
|
86
|
-
|
|
90
|
+
Enforced by: `task-boundary-reset.js → consumeAndTriggerRestart()`. Config: `mainModeQuestionClassifier.{enabled,minConfidence,model}`.
|
|
87
91
|
|
|
88
92
|
---
|
|
89
93
|
|
|
90
|
-
###
|
|
94
|
+
### Main-Mode Auto-Pickup After Clean Restart
|
|
91
95
|
|
|
92
|
-
|
|
96
|
+
*Applies in solo/main-mode sessions with `taskBoundaryReset.enabled: true` AND `taskBoundaryReset.autoPickupNextTask: true` (default).*
|
|
93
97
|
|
|
94
|
-
**
|
|
98
|
+
After a task-boundary restart triggered by a **clean** completion (not error/blocked/killed), the next SessionStart context injects `AUTO-PICKUP MODE ACTIVE` with the next ready task ID. The first user message → invoke `Skill(skill="wogi-start", args="<nextReadyId>")` immediately, regardless of message content. No "what's next?", no summary, no proposing alternatives.
|
|
95
99
|
|
|
96
|
-
**
|
|
100
|
+
**Precedence**: `pending-question.json` (R-336) wins. If the prior session ended with an open question, auto-pickup is skipped even if all other conditions hold.
|
|
97
101
|
|
|
98
|
-
**
|
|
102
|
+
**Skip conditions** (any disables; marker still consumed): pending-question exists, `ready.json` empty, `autoPickupNextTask: false`, marker absent.
|
|
99
103
|
|
|
100
|
-
|
|
104
|
+
Enforced by: `task-boundary-reset.js → writeCleanCompletionMarker()` + `session-context.js → formatContextForInjection()`. Marker: `.workflow/state/task-boundary-clean-completion.json` (single-use).
|
|
101
105
|
|
|
102
|
-
|
|
106
|
+
---
|
|
103
107
|
|
|
104
|
-
|
|
108
|
+
### Code Quality Patterns (generic)
|
|
105
109
|
|
|
106
|
-
**
|
|
110
|
+
1. **Single Source of Truth for Constants** — import from one canonical location; never duplicate model/config objects across files.
|
|
111
|
+
2. **Named Constants for Magic Numbers** — define thresholds as named constants (`const COVERAGE_THRESHOLDS = { default: 0.7, comprehensive: 0.85 }`); don't inline literals.
|
|
107
112
|
|
|
108
|
-
|
|
113
|
+
---
|
|
109
114
|
|
|
110
|
-
|
|
115
|
+
### Regression Discipline
|
|
111
116
|
|
|
112
|
-
|
|
117
|
+
Typecheck/lint/build gates catch code errors, NOT behavior drift. For critical user-facing flows (login, submit, approve, delete, invite, etc.):
|
|
113
118
|
|
|
114
|
-
|
|
119
|
+
1. **Executable scripts, not test-plan documents** — each flow gets an executable regression artifact (Playwright, Jest integration, curl-scripted e2e) at `regression-suite/<flow>.<ext>`. Test plans rot; scripts fail loudly.
|
|
120
|
+
2. **Living feature inventory** — one table with `Feature | Last Verified | Commit | Regression Script | Known Issues`; update the "Known Issues" cell with the bug's task ID rather than writing separate incident docs.
|
|
121
|
+
3. **Change-touch rule** — when a task modifies a file mapped to a regression script, that script must pass before task close. Enforce per-task via acceptance criteria until a native gate ships.
|
|
122
|
+
4. **Audit-seeded, not human-written** — use `/wogi-audit` to produce a draft inventory from current code, then review row-by-row.
|
|
115
123
|
|
|
116
|
-
|
|
124
|
+
Anti-rationalization: *"We don't have regression coverage but I'm confident my fix won't break it"* → WRONG. Confidence is not evidence.
|
|
117
125
|
|
|
118
|
-
|
|
126
|
+
---
|
|
119
127
|
|
|
120
|
-
|
|
128
|
+
### Memory-First Clarification
|
|
121
129
|
|
|
122
|
-
|
|
123
|
-
1. **Completed** — `task-complete` message arrived.
|
|
124
|
-
2. **Graceful-stop** — `worker-stopped` message arrived (worker's Stop hook fired, but didn't complete).
|
|
125
|
-
3. **Silent-halt** — no message, deadline passed. Worker probably dead.
|
|
130
|
+
Before asking the user a product-domain question (role model, business rules, product scope, terminology), check `.workflow/state/product.md`, `domain-model.md`, `user-journeys.md`, `glossary.md` first. Every redundant question costs trust.
|
|
126
131
|
|
|
127
|
-
|
|
132
|
+
When you must ask, cite what you checked: *"I read domain-model.md §Roles; it says X — does this apply to Y too?"* — not *"what's Y?"*
|
|
128
133
|
|
|
129
|
-
|
|
130
|
-
- `lib/workspace-dispatch-tracking.js` — record / reconcile / overdue helpers
|
|
131
|
-
- `.workspace/state/dispatched-tasks.json` — ring buffer of last 100 active records
|
|
132
|
-
- Manager's `dispatchToChannel()` calls `recordDispatch()` after successful POST
|
|
133
|
-
- Manager's `UserPromptSubmit` hook sweeps the message bus and surfaces overdue records as `additionalContext`
|
|
134
|
+
If artifacts don't exist yet, run `node scripts/flow-intent-bootstrap.js bootstrap` (or trigger via `/wogi-start` on any IGR-enabled task). A project without `domain-model.md` is a project where every domain question will be re-asked every session.
|
|
134
135
|
|
|
135
136
|
---
|
|
136
137
|
|
|
137
|
-
###
|
|
138
|
+
### Autonomous Walk-Away Mode
|
|
139
|
+
|
|
140
|
+
The user can dump N items, say "go until you finish" / "autonomous mode" / "run this autonomously" / "don't bother me, just do it" (or similar phrases — see `flow-autonomous-detector.js`), and walk away. While the run is active:
|
|
138
141
|
|
|
139
|
-
|
|
142
|
+
- **productBehavior / ux questions** → append to `.workflow/state/question-queue.json` (do NOT ask the user). Render in the end-of-run summary so the user resolves them in one batch.
|
|
143
|
+
- **engineering / naming / implementation** → decide autonomously, report in the summary.
|
|
144
|
+
- **infrastructure / performance** → decide autonomously, report after.
|
|
145
|
+
- **security** → auto-fix-report-after (existing).
|
|
146
|
+
- **low-confidence technical decisions** → self-adversarial challenge to ≥90% confidence; queue if cap hit. Counter is shared with the IGR Architect-Adversary loop (default cap 30 per run, configurable via `autonomousMode.maxAdversaryInvocations`).
|
|
147
|
+
- **Blocking errors (typecheck/test/conflict)** → fix autonomously; only surface if fundamentally un-fixable.
|
|
140
148
|
|
|
141
|
-
**
|
|
149
|
+
**Persistence**: the autonomous flag is written to `session-state.json` on disk (canonical) and cached in-process (read-hot). It survives task-boundary SIGTERM restarts via SessionStart re-hydration. Staleness threshold (default 1h via `autonomousMode.stalenessThresholdMs`) covers laptop-sleep and unclean termination — stale flags do NOT auto-resume.
|
|
142
150
|
|
|
143
|
-
**
|
|
151
|
+
**Anti-hedging**: while autonomous mode is active, phrases like "let me know if", "should I continue", "awaiting your signal", "standing by", "would you like me to" are forbidden. The user has walked away.
|
|
144
152
|
|
|
145
|
-
|
|
146
|
-
const COVERAGE_THRESHOLDS = { default: 0.7, comprehensive: 0.85, concise: 0.5 };
|
|
147
|
-
```
|
|
153
|
+
**Exit conditions**: ready queue drains, user types "stop"/"pause", or fatal error. On exit, render the completion summary (terminal block + JSON payload at `.workflow/state/autonomous-run-summary-<runId>.json`) and clear the flag.
|
|
148
154
|
|
|
149
|
-
|
|
155
|
+
Enforced by: `flow-autonomous-detector.js`, `flow-question-queue.js`, `flow-decision-authority.js` (autonomous param + `queue-for-review` + `adversary-loop` buckets), `flow-completion-summary.js`, and the SessionStart context injection in `scripts/hooks/core/session-context.js`.
|