@exaudeus/workrail 3.67.0 → 3.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/application/services/compiler/template-registry.js +10 -1
  2. package/dist/cli/commands/worktrain-init.js +1 -1
  3. package/dist/console-ui/assets/{index-tOl8Vowf.js → index-CyzltI6D.js} +1 -1
  4. package/dist/console-ui/index.html +1 -1
  5. package/dist/coordinators/modes/full-pipeline.js +4 -4
  6. package/dist/coordinators/modes/implement-shared.js +5 -5
  7. package/dist/coordinators/modes/implement.js +4 -4
  8. package/dist/coordinators/pr-review.js +4 -4
  9. package/dist/daemon/workflow-runner.d.ts +1 -0
  10. package/dist/daemon/workflow-runner.js +1 -0
  11. package/dist/manifest.json +25 -25
  12. package/dist/mcp/handlers/v2-workflow.js +1 -1
  13. package/dist/mcp/workflow-protocol-contracts.js +2 -2
  14. package/docs/authoring-v2.md +4 -4
  15. package/docs/changelog-recent.md +3 -3
  16. package/docs/configuration.md +1 -1
  17. package/docs/design/adaptive-coordinator-context-candidates.md +1 -1
  18. package/docs/design/adaptive-coordinator-context.md +1 -1
  19. package/docs/design/adaptive-coordinator-routing-candidates.md +18 -18
  20. package/docs/design/adaptive-coordinator-routing-review.md +1 -1
  21. package/docs/design/adaptive-coordinator-routing.md +34 -34
  22. package/docs/design/agent-cascade-protocol.md +2 -2
  23. package/docs/design/console-daemon-separation-discovery.md +323 -0
  24. package/docs/design/context-assembly-design-candidates.md +1 -1
  25. package/docs/design/context-assembly-implementation-plan.md +1 -1
  26. package/docs/design/context-assembly-layer.md +2 -2
  27. package/docs/design/context-assembly-review-findings.md +1 -1
  28. package/docs/design/coordinator-access-audit.md +293 -0
  29. package/docs/design/coordinator-architecture-audit.md +62 -0
  30. package/docs/design/coordinator-error-handling-audit.md +240 -0
  31. package/docs/design/coordinator-testability-audit.md +426 -0
  32. package/docs/design/daemon-architecture-discovery.md +1 -1
  33. package/docs/design/daemon-console-separation-discovery.md +242 -0
  34. package/docs/design/daemon-memory-audit.md +203 -0
  35. package/docs/design/design-candidates-console-daemon-separation.md +256 -0
  36. package/docs/design/design-candidates-discovery-loop-fix.md +141 -0
  37. package/docs/design/design-review-findings-console-daemon-separation.md +106 -0
  38. package/docs/design/design-review-findings-discovery-loop-fix.md +81 -0
  39. package/docs/design/discovery-loop-fix-candidates.md +161 -0
  40. package/docs/design/discovery-loop-fix-design-review.md +106 -0
  41. package/docs/design/discovery-loop-fix-validation.md +258 -0
  42. package/docs/design/discovery-loop-investigation-A.md +188 -0
  43. package/docs/design/discovery-loop-investigation-B.md +287 -0
  44. package/docs/design/exploration-workflow-candidates.md +205 -0
  45. package/docs/design/exploration-workflow-design-review.md +166 -0
  46. package/docs/design/exploration-workflow-discovery.md +443 -0
  47. package/docs/design/ide-context-files-candidates.md +231 -0
  48. package/docs/design/ide-context-files-design-review.md +85 -0
  49. package/docs/design/ide-context-files.md +615 -0
  50. package/docs/design/implementation-plan-discovery-loop-fix.md +199 -0
  51. package/docs/design/implementation-plan-queue-poll-rotation.md +102 -0
  52. package/docs/design/in-process-http-audit.md +190 -0
  53. package/docs/design/layer3b-ghost-nodes-design-candidates.md +2 -2
  54. package/docs/design/loadSessionNotes-candidates.md +108 -0
  55. package/docs/design/loadSessionNotes-test-coverage-discovery.md +297 -0
  56. package/docs/design/loadSessionNotes-test-coverage-session4.md +209 -0
  57. package/docs/design/loadSessionNotes-test-coverage-v3.md +321 -0
  58. package/docs/design/probe-session-design-candidates.md +261 -0
  59. package/docs/design/probe-session-phase0.md +490 -0
  60. package/docs/design/routines-guide.md +7 -7
  61. package/docs/design/session-metrics-attribution-candidates.md +250 -0
  62. package/docs/design/session-metrics-attribution-design-review.md +115 -0
  63. package/docs/design/session-metrics-attribution-discovery.md +319 -0
  64. package/docs/design/session-metrics-candidates.md +227 -0
  65. package/docs/design/session-metrics-design-review.md +104 -0
  66. package/docs/design/session-metrics-discovery.md +454 -0
  67. package/docs/design/spawn-session-debug.md +202 -0
  68. package/docs/design/trigger-validator-candidates.md +214 -0
  69. package/docs/design/trigger-validator-review.md +109 -0
  70. package/docs/design/trigger-validator-shaping-phase0.md +239 -0
  71. package/docs/design/trigger-validator.md +454 -0
  72. package/docs/design/v2-core-design-locks.md +2 -2
  73. package/docs/design/workflow-extension-points.md +15 -15
  74. package/docs/design/workflow-id-validation-at-startup.md +1 -1
  75. package/docs/design/workflow-id-validation-implementation-plan.md +2 -2
  76. package/docs/design/workflow-trigger-lifecycle-audit.md +175 -0
  77. package/docs/design/worktrain-task-queue-candidates.md +5 -5
  78. package/docs/design/worktrain-task-queue.md +4 -4
  79. package/docs/discovery/coordinator-script-design.md +1 -1
  80. package/docs/discovery/coordinator-ux-discovery.md +3 -3
  81. package/docs/discovery/simulation-report.md +1 -1
  82. package/docs/discovery/workflow-modernization-discovery.md +326 -0
  83. package/docs/discovery/workflow-selection-for-discovery-tasks.md +33 -33
  84. package/docs/discovery/worktrain-status-briefing.md +1 -1
  85. package/docs/discovery/wr-discovery-goal-reframing.md +1 -1
  86. package/docs/docker.md +1 -1
  87. package/docs/ideas/backlog.md +227 -0
  88. package/docs/ideas/third-party-workflow-setup-design-thinking.md +1 -1
  89. package/docs/integrations/claude-code.md +5 -5
  90. package/docs/integrations/firebender.md +1 -1
  91. package/docs/plans/agentic-orchestration-roadmap.md +2 -2
  92. package/docs/plans/mr-review-workflow-redesign.md +9 -9
  93. package/docs/plans/ui-ux-workflow-design-candidates.md +4 -4
  94. package/docs/plans/ui-ux-workflow-discovery.md +2 -2
  95. package/docs/plans/workflow-categories-candidates.md +8 -8
  96. package/docs/plans/workflow-categories-discovery.md +4 -4
  97. package/docs/plans/workflow-modernization-design.md +430 -0
  98. package/docs/plans/workflow-staleness-detection-candidates.md +11 -11
  99. package/docs/plans/workflow-staleness-detection-review.md +4 -4
  100. package/docs/plans/workflow-staleness-detection.md +9 -9
  101. package/docs/plans/workrail-platform-vision.md +3 -3
  102. package/docs/reference/agent-context-cleaner-snippet.md +1 -1
  103. package/docs/reference/agent-context-guidance.md +4 -4
  104. package/docs/reference/context-optimization.md +2 -2
  105. package/docs/roadmap/now-next-later.md +2 -2
  106. package/docs/roadmap/open-work-inventory.md +16 -16
  107. package/docs/workflows.md +31 -31
  108. package/package.json +1 -1
  109. package/spec/workflow-tags.json +47 -47
  110. package/workflows/adaptive-ticket-creation.json +16 -16
  111. package/workflows/architecture-scalability-audit.json +22 -22
  112. package/workflows/bug-investigation.agentic.v2.json +3 -3
  113. package/workflows/classify-task-workflow.json +1 -1
  114. package/workflows/coding-task-workflow-agentic.json +6 -6
  115. package/workflows/cross-platform-code-conversion.v2.json +8 -8
  116. package/workflows/document-creation-workflow.json +8 -8
  117. package/workflows/documentation-update-workflow.json +8 -8
  118. package/workflows/intelligent-test-case-generation.json +2 -2
  119. package/workflows/learner-centered-course-workflow.json +2 -2
  120. package/workflows/mr-review-workflow.agentic.v2.json +4 -4
  121. package/workflows/personal-learning-materials-creation-branched.json +8 -8
  122. package/workflows/presentation-creation.json +5 -5
  123. package/workflows/production-readiness-audit.json +1 -1
  124. package/workflows/relocation-workflow-us.json +31 -31
  125. package/workflows/routines/context-gathering.json +1 -1
  126. package/workflows/routines/design-review.json +1 -1
  127. package/workflows/routines/execution-simulation.json +1 -1
  128. package/workflows/routines/feature-implementation.json +3 -3
  129. package/workflows/routines/final-verification.json +1 -1
  130. package/workflows/routines/hypothesis-challenge.json +1 -1
  131. package/workflows/routines/ideation.json +1 -1
  132. package/workflows/routines/parallel-work-partitioning.json +3 -3
  133. package/workflows/routines/philosophy-alignment.json +2 -2
  134. package/workflows/routines/plan-analysis.json +1 -1
  135. package/workflows/routines/plan-generation.json +1 -1
  136. package/workflows/routines/tension-driven-design.json +6 -6
  137. package/workflows/scoped-documentation-workflow.json +26 -26
  138. package/workflows/ui-ux-design-workflow.json +14 -14
  139. package/workflows/workflow-diagnose-environment.json +1 -1
  140. package/workflows/workflow-for-workflows.json +1 -1
@@ -0,0 +1,443 @@
1
+ # Discovery: What to Do About the Missing Exploration Workflow
2
+
3
+ *This document is a human-facing artifact only -- for people to read. Durable execution truth lives in workflow step notes (notesMarkdown) and explicit context variables. This doc is NOT required memory; if a chat rewind occurs, notes and context variables survive, this file may not.*
4
+
5
+ ---
6
+
7
+ ## Context / Ask
8
+
9
+ **Original stated goal (statedGoal):** Modernize `exploration-workflow.json` to current v2/lean authoring patterns -- add `metaGuidance`, `recommendedPreferences`, `references`, `templateCall`/routine injection, and tighter loop-control wording.
10
+
11
+ **Reframed problem:** Agents using the exploration workflow may not produce reliably high-quality exploration artifacts, and the workflow is harder to maintain than it should be -- the correct intervention should be diagnosed from actual usage and output quality, not assumed to be a v2 migration.
12
+
13
+ **Critical finding from Phase 0:** `exploration-workflow.json` does NOT exist in `workflows/` on disk. It was referenced in roadmap/tickets but is absent.
14
+
15
+ **Critical finding from Phase 0b (git history):** The file was intentionally DELETED in commit `a0ddaaac` (Mar 29, 2026) as part of a deliberate consolidation: `exploration-workflow.json`, `design-thinking-workflow.json`, and `design-thinking-workflow-autonomous.agentic.json` were all merged into `wr.discovery.json`. The commit message explicitly states: "Unify the overlapping exploration and design-thinking workflows into a single discovery workflow." The roadmap item is stale -- it refers to a workflow that has already been superseded and intentionally removed.
16
+
17
+ **Additional context:** 30+ open CI failure issues (Apr 18-21) suggest the project may have higher-priority concerns than workflow modernization right now.
18
+
19
+ ---
20
+
21
+ ## Path Recommendation
22
+
23
+ **Recommended path: `design_first`**
24
+
25
+ Rationale:
26
+ - `goalWasSolutionStatement = true`: the stated goal prescribed a specific migration approach
27
+ - The underlying problem (high-quality exploration artifacts) is not answered by "migrate the file" when the file doesn't exist
28
+ - The dominant risk is solving the wrong problem: creating a new exploration workflow when `wr.discovery` already exists and may already cover the use case
29
+ - `landscape_first` would be appropriate if we were comparing workflow tools; `full_spectrum` if we needed both landscape and reframing -- but here the dominant risk is framing: should this workflow even be created?
30
+
31
+ **Why not landscape_first:** We don't primarily need to understand the landscape of exploration workflow tools; we need to understand whether a new workflow is warranted at all.
32
+
33
+ **Why not full_spectrum:** The reframing work already done in Phase 0 is sufficient to ground the design work. The open question is not "what does the landscape look like?" but "what problem is a new exploration workflow solving that wr.discovery doesn't?"
34
+
35
+ ---
36
+
37
+ ## Constraints / Anti-goals
38
+
39
+ **Constraints:**
40
+ - Must not create a workflow that duplicates `wr.discovery.json` functionality without clear differentiation
41
+ - Must not introduce a new workflow that would fail the `bundled-workflow-smoke.test.ts` smoke test
42
+ - Must not commit `.md` documentation files without explicit human authorization
43
+ - Changes to protected files (`src/daemon/`, `src/v2/`, `src/trigger/`) are out of scope
44
+
45
+ **Anti-goals:**
46
+ - Do NOT mechanically create a `.v2` file just because the roadmap said so
47
+ - Do NOT modernize structure for its own sake without improving agent outcomes
48
+ - Do NOT create a workflow for a use case that `wr.discovery` already handles well
49
+ - Do NOT displace the CI failure investigation as a higher-priority concern
50
+
51
+ ---
52
+
53
+ ## Landscape Packet
54
+
55
+ **Populated in Phase 0b from git history and codebase inspection:**
56
+
57
+ - `exploration-workflow.json` v2.0.0 existed with these properties: structured exploration (understand ask, gather context, generate materially different approaches, evaluate, challenge front-runner, deliver recommendation with bounded uncertainty). It had `metaGuidance`, `recommendedPreferences`, `preconditions`, and notes-first durability rules.
58
+ - It was deleted in commit `a0ddaaac` (Mar 29, 2026) and replaced by `wr.discovery.json` v3.2.0, which covers the same domain with deeper step structure (22 steps vs the older format), path branching (landscape_first / full_spectrum / design_first), subagent guidance, and modern `wr.features.*` declarations.
59
+ - `wr.discovery.json` IS the exploration workflow -- just modern, well-structured, and feature-complete.
60
+ - No gap was identified in Phase 0b between what the old `exploration-workflow.json` did and what `wr.discovery.json` now does.
61
+
62
+ **Additional landscape finding from Phase 1c (pinned sessions):**
63
+
64
+ A "Comprehensive Adaptive Exploration Workflow" (v0.1.0, `schemaVersion: 1`) exists in the user's pinned workflow store at `~/.workrail/data/workflows/pinned/`. This is a community/third-party workflow, NOT a bundled workflow. It is a fundamentally different design philosophy vs the lean v2.0.0:
65
+ - v1 schema (old schema format), 18+ steps
66
+ - Enterprise-grade: 5-phase research loops with saturation detection, divergent/convergent separation, RAND-scale evidence grading, 5-type forced solution generation (Quick/Thorough/Creative/Optimal/Contrarian)
67
+ - Requires confirmation gates, automation level setting, complexity triage
68
+ - Creates `EXPLORATION_CONTEXT.md` handoff docs (anti-pattern per current authoring guide)
69
+
70
+ This pinned workflow is usage evidence: someone wanted MORE structured exploration than the lean v2.0.0 provided. However, it's also wildly over-engineered and uses deprecated patterns (file-based memory, requireConfirmation everywhere, v1 schema).
71
+
72
+ **Landscape summary:**
73
+ - 3 precedents identified: lean v2.0.0 (deleted), wr.discovery v3.2.0 (current), Comprehensive Adaptive v0.1.0 (user-pinned, community, v1 schema)
74
+ - 2 contradictions: (1) roadmap says modernize a file that was intentionally deleted; (2) pinned community workflow shows appetite for deeper structure but uses anti-patterns
75
+ - 1 evidence gap: no data on whether wr.discovery satisfies actual user needs for codebase-level technical exploration (different from problem-space discovery)
76
+
77
+ **Capability check (Phase 0b):**
78
+ - Web browsing: available (curl probe to example.com succeeded)
79
+ - Delegation (spawn_agent): tool is present in session tool set -- confirmed available. Not needed for this work; the dominant task is codebase analysis and design synthesis, done directly by main agent. rigorMode = STANDARD, so parallel delegation would add overhead with no quality benefit.
80
+ - Decision: no delegation will be used. Fallback (direct main-agent analysis) is fully sufficient and produces better synthesis control.
81
+
82
+ ---
83
+
84
+ ## Problem Frame Packet
85
+
86
+ ### Stakeholders
87
+
88
+ | Stakeholder | Job / Outcome | Pain / Tension |
89
+ |---|---|---|
90
+ | Project owner (etienneb) | Maintain a clean, modern, well-scoped bundle of workflows | Stale roadmap pointing at deleted file creates false work inventory |
91
+ | Daemon session agents | Invoke exploration-type workflows for autonomous work | wr.discovery already serves this; "exploration-workflow" by name returns not-found |
92
+ | Human WorkRail MCP users | "I want to think through problem X" | If they ask for "exploration-workflow" by name, they get a not-found error instead of wr.discovery |
93
+ | Developers doing codebase archaeology | "I want to understand this unfamiliar codebase systematically" | No bundled workflow explicitly covers this -- distinct job from problem-space discovery |
94
+ | External WorkRail adopters | Find the right workflow in the bundle | "discovery" name may not signal "exploration" to new users |
95
+
96
+ ### Tensions (4)
97
+
98
+ 1. **"Exploration" vs. "Discovery" naming**: The old workflow was action-oriented ("exploration-workflow"). The new one is product-branded ("wr.discovery"). Users searching for "exploration" won't find it by name. Real discoverability gap.
99
+
100
+ 2. **Lean vs. comprehensive depth**: 7-step lean v2.0.0 vs. 18+-step community Comprehensive Adaptive. Appetite for different depth levels is real. wr.discovery addresses this via path branching (landscape_first/full_spectrum/design_first), which is the right mechanism -- but the branching may not be obvious to first-time users.
101
+
102
+ 3. **Problem-space exploration vs. codebase exploration**: wr.discovery is explicitly positioned for "ambiguous problems, opportunities, or decisions." Its examples are all strategic/decision-oriented. Developers wanting to methodically map an unfamiliar codebase have a different job with different tools (Grep, Read, Bash, not design docs). No bundled workflow serves this.
103
+
104
+ 4. **Roadmap currency**: Planning docs list exploration-workflow.json as the #1 modernization priority -- but it was deleted months ago. Misleads agents and creates false work inventory.
105
+
106
+ ### Assumptions (explicit)
107
+
108
+ - **CONFIRMED**: "wr.discovery covers what exploration-workflow used to do" -- wr.discovery's own metaGuidance states it is "the canonical successor to the old exploration and design-thinking workflows"
109
+ - **UNCONFIRMED**: "there is no distinct codebase-exploration use case needing a separate bundled workflow" -- wr.discovery examples are all strategic; technical codebase archaeology is arguably a different job
110
+ - **PROBABLY TRUE**: "the roadmap item should be closed as superseded" -- but depends on project owner's view of whether codebase archaeology deserves a new workflow
111
+
112
+ ### Success Criteria (3)
113
+
114
+ 1. The stale roadmap item for exploration-workflow.json is explicitly resolved: closed as superseded, or converted to a correctly-scoped new ticket
115
+ 2. The naming/discoverability gap is addressed: users who ask for "exploration" find wr.discovery
116
+ 3. If codebase-level technical exploration is a legitimate unmet need, it is scoped as a NEW distinct workflow (`wr.explore` or equivalent) -- not confused with the migration task
117
+
118
+ ### HMW Questions (2)
119
+
120
+ 1. **HMW**: How might we ensure that someone looking for "exploration workflow" discovers `wr.discovery` without hitting a not-found error, without renaming wr.discovery?
121
+ 2. **HMW**: How might we serve developers who need to methodically explore an unfamiliar codebase -- a job that is distinct from problem-space decision-making -- without duplicating wr.discovery's function?
122
+
123
+ ### Primary Framing Risk
124
+
125
+ **Specific condition that would make this framing wrong:**
126
+
127
+ > If session data showed that `wr.discovery` is started frequently but abandoned early for technical codebase exploration tasks (distinct from strategic decision tasks) -- specifically if there were evidence that agents invoke wr.discovery for "understand this codebase" work and find it mis-shaped for that job -- then the correct outcome is NOT merely "close the stale roadmap item" but "create a narrow-scope `wr.explore` workflow for codebase archaeology." This would change the primary recommendation from a roadmap housekeeping action to a new workflow creation.
128
+ >
129
+ > Observable signal: examine session completions for wr.discovery -- if the majority of abandonment comes from early steps where the problem is "technical codebase exploration" rather than "decision or design problem," the framing changes. No such session data was available for this analysis.
130
+
131
+ ---
132
+
133
+ ## Synthesis (Phase 2)
134
+
135
+ ### Opportunity
136
+
137
+ Clean up a stale roadmap item and surface two real remaining questions:
138
+ 1. How do we address the naming/discoverability gap (users asking for "exploration-workflow" hit not-found)?
139
+ 2. Is there a distinct codebase-archaeology use case that warrants a new bundled workflow?
140
+
141
+ This is NOT a "build a workflow" decision. It's a "decide what to retire, what to clarify, and what new scope (if any) to add" decision.
142
+
143
+ ### Decision Criteria (4)
144
+
145
+ 1. **Does the direction resolve the stale roadmap item without losing work the project owner may have intended?** Closing blindly risks premature closure of a deliberate future intention.
146
+ 2. **Does the direction address the naming/discoverability gap?** Users asking for "exploration-workflow" by name currently get not-found. This is a real friction point regardless of what else is decided.
147
+ 3. **Does the direction correctly scope any new workflow work to a distinct, non-duplicative use case?** A new workflow must serve a job wr.discovery doesn't serve, not just give the same job a different name.
148
+ 4. **Is the direction executable without unavailable data?** Can't require session completion analytics that don't exist. Recommendation must be actionable with available evidence.
149
+
150
+ ### Remaining Uncertainty
151
+
152
+ **Type: Recommendation uncertainty (bounded)**
153
+ - Primary recommendation (roadmap housekeeping): HIGH confidence. Evidence is clear and convergent.
154
+ - Sub-question (codebase archaeology): MEDIUM confidence. No session data available. Scoped as a follow-on decision item, not blocking the primary recommendation.
155
+
156
+ ### Hypothesis Challenge Results (Phase 2 adversarial pass)
157
+
158
+ *Delegation attempt made -- spawn_agent returned outcome=stuck (repeated_tool_call heuristic). Adversarial challenge run by main agent using wr.routine-hypothesis-challenge structure.*
159
+
160
+ **Target claim challenged:** "The roadmap item should be closed as superseded; wr.discovery is the canonical replacement."
161
+
162
+ **Verdict: REVISE (not Close, not Reject)**
163
+
164
+ The "close as superseded" framing is too confident. Key challenge findings:
165
+ - The metaGuidance self-identification as "canonical successor" was co-authored by an AI session (Firebender), not a direct project owner statement of intent. This weakens its authority.
166
+ - The roadmap item may have represented *two* intents: (a) replace overlapping old workflows (done via wr.discovery), AND (b) create a new explicitly-named exploration workflow with narrower scope. These are different jobs that shouldn't be collapsed.
167
+ - Closing the item risks naming debt: the discoverability gap (exploration-workflow → not-found) is never fixed.
168
+ - The codebase-archaeology gap would become untracked with no backlog item.
169
+
170
+ **Revised framing:** Convert the roadmap item -- don't close it. Split into: (1) acknowledge wr.discovery as canonical for problem-space exploration, (2) create a new, correctly-scoped item for whether a `wr.explore` or equivalent lightweight codebase-archaeology workflow is warranted.
171
+
172
+ ### Candidate Count Target
173
+
174
+ 3 candidates (STANDARD path)
175
+
176
+ ## Candidate Directions
177
+
178
+ ### Generation Expectations (Phase 3b setup — design_first path)
179
+
180
+ **What the candidate set must satisfy:**
181
+
182
+ - **At least one direction must meaningfully reframe the problem** — not just "do the obvious thing" (close the roadmap item, or create a new workflow). The reframe should surface a constraint or tension that the obvious directions ignore.
183
+ - **The directions must be materially different from each other** — not variations of "close vs. close with a note." They should differ in what problem they solve and what they leave unsolved.
184
+ - **Each direction must pass the four decision criteria:** (1) resolves roadmap item without losing intent, (2) addresses naming/discoverability gap, (3) scopes any new workflow distinctly, (4) actionable without session analytics.
185
+ - **The codebase-archaeology question must be handled explicitly** — not deferred silently. Each direction should take a clear stance on it.
186
+ - **No direction should create wr.discovery v2** — the scope is NOT to redesign wr.discovery.
187
+
188
+ **Anti-clustering guard:** If all 3 candidates converge on "close the item + maybe create something later," they are too clustered. At least one candidate must take a meaningfully different position on the naming gap or the codebase-archaeology question.
189
+
190
+ **Reframe requirement (design_first):** At least one candidate must question whether the decision unit is correct — i.e., challenge whether fixing the roadmap item is the right first action, or whether the discoverability gap should be addressed at the engine/registry level rather than by creating a new workflow.
191
+
192
+ ### Candidate A: Minimal housekeeping — update planning docs only
193
+
194
+ **Summary:** Update 3 stale planning docs to record that `exploration-workflow.json` was superseded by `wr.discovery.json`, and open 2 new GitHub issues: one for the discoverability/naming hard-error and one for the codebase-archaeology scope question.
195
+
196
+ **Tensions resolved / accepted:**
197
+ - Resolves: Tension 2 (planning doc currency)
198
+ - Accepts: Tension 1 (naming hard error stays live — `WorkflowNotFoundError` still fires)
199
+ - Accepts: Tension 3 (discoverability pain deferred to new issue)
200
+
201
+ **Boundary:** `docs/roadmap/now-next-later.md`, `docs/roadmap/open-work-inventory.md`, `docs/tickets/next-up.md`. No workflow files, no source code, no schema.
202
+
203
+ **Specific failure mode:** New GitHub issues get opened but never prioritized. The hard error path persists indefinitely. Agents that read the trigger system's startup validation pattern (`trigger-listener.ts:293`) and then hit `WorkflowNotFoundError` for `exploration-workflow` get no helpful guidance.
204
+
205
+ **Repo pattern relationship:** Directly follows AGENTS.md completion-update pattern. No new pattern.
206
+
207
+ **Gain / give up:** Gain: zero blast radius, fast, planning docs become truthful. Give up: the hard `WorkflowNotFoundError` stays live; the discoverability gap is not fixed.
208
+
209
+ **Impact surface:** 3 planning docs + 2 new GitHub issues.
210
+
211
+ **Scope judgment: Too narrow.** The `WorkflowNotFoundError` for `exploration-workflow` is a real recurring failure mode. The trigger system validates workflow IDs at startup explicitly to prevent silent failures — this team treats `workflow_not_found` as serious. Leaving the hard error live while calling the work "done" contradicts that philosophy.
212
+
213
+ **Philosophy:** Honors YAGNI. Conflicts with "structure earns its place" (preventing a real recurring failure mode earns its keep, but this candidate doesn't).
214
+
215
+ ---
216
+
217
+ ### Candidate B: Best-fit — thin redirect stub + planning doc updates + new codebase-archaeology issue
218
+
219
+ **Summary:** Create a minimal `workflows/exploration-workflow.json` stub (3 fields: `id`, `name`, `description`) that immediately redirects users to `wr.discovery` via its `about` field and a single-step prompt saying "this workflow was renamed -- use `wr.discovery` instead." Update 3 planning docs. Open one GitHub issue for codebase-archaeology scope.
220
+
221
+ **Stub specification:** A single-step workflow with `id: "exploration-workflow"`, `name: "Exploration Workflow (→ wr.discovery)"`, `description: "This workflow ID has moved. Use 'wr.discovery' instead."`, one step with a prompt that tells the agent: "This workflow was renamed to `wr.discovery`. Please restart with `start_workflow wr.discovery`." No loops, no branches, no schema additions required. Uses existing v2 workflow schema (`additionalProperties: false` is satisfied by using only declared fields).
222
+
223
+ **Why this boundary works:** The workflow schema already supports single-step workflows. No new schema fields needed. The storage layer resolves by exact ID — adding a file with `id: "exploration-workflow"` immediately resolves the `WorkflowNotFoundError`. The engine handles it as a normal workflow with one step.
224
+
225
+ **Tensions resolved / accepted:**
226
+ - Resolves: Tension 1 (naming hard error is fixed — `exploration-workflow` resolves to the stub, which tells users to use `wr.discovery`)
227
+ - Resolves: Tension 2 (planning docs updated)
228
+ - Accepts: Tension 3 (codebase-archaeology question deferred to new issue, but now explicitly tracked)
229
+
230
+ **Specific failure mode:** The stub stays in the bundle indefinitely and accumulates technical debt. If `list_workflows` surfaces it, users see two confusingly related workflows. The stub is never removed even after the discoverability problem is addressed properly.
231
+
232
+ **Repo pattern relationship:** Adapts existing pattern — the bundle already has `test-session-persistence.json` and `test-artifact-loop-control.json` as minimal workflow files. A redirect stub is a new pattern but not alien to the codebase.
233
+
234
+ **Gain / give up:** Gain: the hard `WorkflowNotFoundError` is fixed immediately with zero engine changes; planning docs become truthful; codebase-archaeology is explicitly scoped. Give up: a stub file in `workflows/` that isn't a "real" workflow; the stub may cause confusion in `list_workflows` output.
235
+
236
+ **Impact surface:** 1 new stub workflow file + 3 planning docs + 1 new GitHub issue. No source code changes.
237
+
238
+ **Scope judgment: Best-fit.** Fixes the real failure mode (hard error) with the smallest possible change to workflow files. No engine changes required. The schema supports it today. The stub is explicit and self-documenting. The remaining open question (codebase archaeology) gets a correctly-scoped new item.
239
+
240
+ **Philosophy:** Honors "structure earns its place" (stub prevents real recurring failure mode). Honors YAGNI (no new full workflow created). Minor conflict with "architectural fixes over patches" — the alias mechanism in the engine would be cleaner, but it's a much larger scope that requires touching protected areas.
241
+
242
+ ---
243
+
244
+ ### Candidate C: Reframe — treat the discoverability gap as an engine feature, not a workflow problem
245
+
246
+ **Summary:** Do NOT create a stub or alias in the workflow files. Instead, update planning docs AND open a correctly-scoped GitHub issue proposing `aliases: string[]` as a new field in `spec/workflow.schema.json` with corresponding lookup logic in `src/infrastructure/storage/file-workflow-storage.ts` — treating the naming gap as evidence for a general engine feature, not a one-off fix.
247
+
248
+ **Feature specification:** Add `aliases?: readonly string[]` to `spec/workflow.schema.json` as an optional field. In `getWorkflowById` (`src/infrastructure/storage/file-workflow-storage.ts:254`), when `indexEntry` is null for the primary ID, try a secondary lookup against an alias-to-canonical-id map built during index construction. `wr.discovery.json` would then declare `aliases: ["exploration-workflow", "design-thinking-workflow"]`. The alias map is maintained by workflow authors in workflow files; queried at lookup time; two-pass index build (primary IDs first, then alias expansion).
249
+
250
+ **Why this boundary:** The engine already indexes workflows by ID at startup. Extending the index to include aliases is a bounded, additive change to `file-workflow-storage.ts` — not a rewrite. The schema change is additive (new optional field). No protected `src/v2/durable-core/` code is touched.
251
+
252
+ **Tensions resolved / accepted:**
253
+ - Resolves: Tension 1 (naming gap fixed architecturally — `exploration-workflow` resolves to `wr.discovery` via the alias map)
254
+ - Resolves: Tension 3 (YAGNI pressure is addressed — the alias mechanism is general and handles future renames/consolidations)
255
+ - Accepts: Tension 2 (planning docs updated, but the core work is the engine feature, not the doc update)
256
+ - Accepts: Tension 3 partially (codebase-archaeology still a separate open question)
257
+
258
+ **Specific failure mode:** Alias cycles or duplicate aliases across workflows cause index build errors. The `getWorkflowById` secondary lookup adds latency on cache miss for every not-found lookup. Implementation scope expands: schema validator must enforce alias uniqueness, tests must cover alias resolution paths.
259
+
260
+ **Repo pattern relationship:** Departs from existing pattern — no alias mechanism exists today. Creates a new pattern. Requires schema change + storage layer change + tests.
261
+
262
+ **Gain / give up:** Gain: architecturally correct fix; solves future renames cleanly; no dead stub files in the bundle; `wr.discovery` self-documents its predecessors. Give up: substantially larger scope; touches schema and storage layer; requires new tests; slower to ship than Candidate B.
263
+
264
+ **Impact surface:** `spec/workflow.schema.json` (new field), `src/infrastructure/storage/file-workflow-storage.ts` (alias index), `workflows/wr.discovery.json` (aliases field populated), 3 planning docs, test coverage.
265
+
266
+ **Scope judgment: Too broad** for the immediate problem. The naming gap affects one workflow. Building a general alias mechanism to solve one rename is YAGNI violation. The correct trigger for this feature would be: two or more workflows need aliases, OR the team explicitly decides alias support is a product feature. Neither condition is confirmed today.
267
+
268
+ **Philosophy:** Honors "architectural fixes over patches." Honors "structure earns its place" (alias mechanism prevents a class of failure modes). Conflicts with YAGNI — no evidence that a general alias mechanism is needed beyond this one case.
269
+
270
+ ---
271
+
272
+ ### Convergence signal
273
+
274
+ Candidates B and C converge on fixing the naming hard error as the right thing to do. Candidate A is too narrow by the project's own stated philosophy. The divergence is WHERE to fix it: stub file (B) vs. engine feature (C). Both are correct in different circumstances — B is right now (one workflow, YAGNI), C is right if two or more workflows need aliases. The tiebreaker is scope evidence: one confirmed rename vs. speculative future renames. B wins on current evidence.
275
+
276
+ ---
277
+
278
+ ## Recommendation
279
+
280
+ **Recommended direction: Candidate B — thin redirect stub + planning doc updates + new codebase-archaeology issue**
281
+
282
+ ### Decision criteria verdict
283
+
284
+ | Criterion | Candidate A | Candidate B | Candidate C |
285
+ |---|---|---|---|
286
+ | Resolve roadmap item without losing intent | ✓ | ✓ | ✓ |
287
+ | Address naming/discoverability gap | ✗ | ✓ | ✓ |
288
+ | Scope new work to distinct non-duplicative use case | ~ (deferred) | ✓ (new issue) | ~ (deferred) |
289
+ | Actionable without unavailable session analytics | ✓ | ✓ | ✓ |
290
+
291
+ Candidate B is the only candidate that satisfies all 4 decision criteria.
292
+
293
+ ### Pivot conditions
294
+
295
+ | Condition | Action |
296
+ |---|---|
297
+ | `bundled-workflow-smoke.test.ts` rejects redirect stubs | Fall back to Candidate A, escalate Candidate C as scoped feature |
298
+ | Project owner confirms codebase archaeology is priority | Add new `wr.explore.json` scoped to codebase mapping (distinct from wr.discovery) |
299
+ | Second workflow consolidation creates another naming hard error | Trigger Candidate C (engine alias feature) |
300
+ | `list_workflows` confusion with stub reported | Add `hidden`/`deprecated` schema field (small new scope) |
301
+
302
+ ---
303
+
304
+ ## Challenge Notes
305
+
306
+ **Three key challenged assumptions (from Phase 0):**
307
+ 1. Content soundness: file doesn't exist, so there's nothing to assess as sound or unsound
308
+ 2. v2 features as bottleneck: structural polish is not quality; prompt content matters more
309
+ 3. Priority staleness: roadmap was set before 30+ CI failures and before `wr.discovery` was mature
310
+
311
+ ---
312
+
313
+ ## Resolution Notes
314
+
315
+ *(To be populated when a recommendation is finalized)*
316
+
317
+ ---
318
+
319
+ ## Decision Log
320
+
321
+ | Date | Decision | Rationale |
322
+ |------|----------|-----------|
323
+ | Phase 0 | Classified goal as solution_statement | Named specific migration steps, not an outcome |
324
+ | Phase 0 | Identified exploration-workflow.json as missing | File search confirmed absence in workflows/ |
325
+ | Phase 0 | Recommended design_first path | Dominant risk is wrong problem, not missing information |
326
+ | Phase 0 | Set rigorMode to STANDARD | This is a workflow design decision, not a security or engine change |
327
+ | Phase 0b | Confirmed exploration-workflow.json was intentionally deleted | git log --diff-filter=D confirmed deletion in a0ddaaac with explicit consolidation commit message |
328
+ | Phase 0b | Confirmed wr.discovery.json is the canonical replacement | Commit message: "Unify the overlapping exploration and design-thinking workflows into a single discovery workflow" |
329
+ | Phase 0b | delegationAvailable = true, not used | spawn_agent tool present in tool set; not needed -- analysis is codebase-local |
330
+ | Phase 0b | webBrowsingAvailable = true, not used | curl probe succeeded; no external research needed for this determination |
331
+ | Phase 0b | retriageNeeded = true | The roadmap item is stale; wr.discovery IS the exploration workflow; may recommend closing the ticket |
332
+ | Phase 1c | Identified 3 precedents in landscape | lean v2.0.0 (deleted), wr.discovery v3.2.0 (current), Comprehensive Adaptive v0.1.0 (user-pinned community, v1 schema) |
333
+ | Phase 1c | Identified 2 contradictions | (1) stale roadmap vs. intentional deletion; (2) pinned community workflow shows appetite for depth but uses deprecated patterns |
334
+ | Phase 1c | Identified 1 evidence gap | No data on whether wr.discovery covers codebase-level technical exploration (distinct from problem-space discovery) |
335
+ | Phase 1c | No delegation used | rigorMode = STANDARD; all evidence is codebase-local; direct analysis is sufficient |
336
+ | Phase 1f | Identified 4 tensions | naming/discoverability, lean vs. depth, problem-space vs. codebase exploration, roadmap currency |
337
+ | Phase 1f | Confirmed primary framing risk | If wr.discovery is systematically abandoned for codebase-archaeology tasks, a new narrow workflow is needed |
338
+ | Phase 1f | wr.discovery explicitly self-identifies as successor | metaGuidance: "canonical successor to the old exploration and design-thinking workflows. If I ask for either of those by name, this is the workflow I mean." |
339
+ | Phase 1f | No delegation used | rigorMode = STANDARD; parallel stakeholder lenses would not add information beyond what codebase analysis surfaces |
340
+ | Phase 3d | Selected Candidate B (redirect stub) | Fixes hard WorkflowNotFoundError at minimum surface; smoke test verified safe (checks compile+steps+render, not output quality); stub content must preserve codebase-archaeology nuance |
341
+ | Phase 3d | Runner-up: Candidate C (engine alias) | Architecturally correct but premature -- one confirmed rename, no second case; YAGNI violation |
342
+ | Phase 3d | Candidate A eliminated | Strictly dominated by B; leaves hard error live with no additional benefit |
343
+ | Phase 3d | Challenge run by main agent | Prior spawn attempt returned stuck (wr.discovery workflow repeated_tool_call heuristic); second attempt avoided to prevent same outcome; challenge quality adequate for STANDARD rigor |
344
+ | Phase 3d | Stub content modification from challenge | Prompt must mention codebase-archaeology is a different job not covered by wr.discovery -- avoids encoding wrong assumption permanently |
345
+ | Direction review | No direction change | ORANGE findings are implementation requirements (spec correction + required prompt wording), not structural flaws. YELLOW findings already incorporated in hybrid. No RED findings. Direction confirmed: hybrid Candidate B. |
346
+ | Direction review | Hybrid additions confirmed | (1) Corrected stub spec with title field + codebase-archaeology prompt; (2) wr.discovery description update naming predecessors; (3) 3 planning doc updates; (4) new GitHub issue with Candidate C pivot condition |
347
+ | Direction review | Residual concern elevated | Consolidation commit was AI-authored -- project owner should independently verify wr.discovery fully covers exploration use case before roadmap item is closed. Human-gate, not technical blocker. |
348
+
349
+ ---
350
+
351
+ ## Final Summary
352
+
353
+ ### Recommendation (HIGH confidence)
354
+
355
+ **Do: Hybrid Candidate B — 4 deliverables, no source code changes, no schema changes**
356
+
357
+ This recommendation is supported by convergent evidence from git history, schema inspection, storage layer inspection, smoke test inspection, and multiple adversarial challenge passes. No structural flaw was found.
358
+
359
+ ---
360
+
361
+ ### Deliverable 1: `workflows/exploration-workflow.json` (new file)
362
+
363
+ ```json
364
+ {
365
+ "id": "exploration-workflow",
366
+ "name": "Exploration Workflow [deprecated — use wr.discovery]",
367
+ "version": "3.0.0",
368
+ "description": "This workflow ID has moved. The exploration and design-thinking workflows were consolidated into wr.discovery (Discovery Workflow) in March 2026. Temporary redirect stub — replace with engine-level alias support if a second workflow rename creates another WorkflowNotFoundError.",
369
+ "steps": [
370
+ {
371
+ "id": "redirect",
372
+ "title": "This workflow has moved",
373
+ "prompt": "This workflow has been renamed and restructured as 'wr.discovery' (Discovery Workflow).\n\nFor problem-space exploration, decision-making, design thinking, or comparing approaches to an ambiguous problem: start a new session with start_workflow using id 'wr.discovery'.\n\nImportant distinction: if your goal is to systematically map or understand an unfamiliar codebase -- tracing architecture, call stacks, data flows, or module structure -- that is a different job from problem-space exploration. No dedicated bundled workflow covers it yet. Use your standard code investigation tools (Grep, Read, Bash) directly for that task."
374
+ }
375
+ ]
376
+ }
377
+ ```
378
+
379
+ *Why this works:* The storage layer (`file-workflow-storage.ts:254`) does exact-ID lookup. Adding a file with `id: "exploration-workflow"` immediately resolves `WorkflowNotFoundError` to this stub. The stub's single step provides explicit guidance. Schema validation: all required fields satisfied (`id` ≥3 chars, `name` ≥1, `description` ≥1, `version` string, `steps` minItems 1; step has `id` and `title`). Smoke test: checks compile+render, not output substance — stub passes.
380
+
381
+ ---
382
+
383
+ ### Deliverable 2: `workflows/wr.discovery.json` description update (one sentence)
384
+
385
+ Change the current description from:
386
+
387
+ > "Use this to explore and think through a problem end-to-end. Moves between landscape exploration, problem framing, candidate generation, adversarial challenge, and uncertainty resolution."
388
+
389
+ To:
390
+
391
+ > "Use this to explore and think through a problem end-to-end. Moves between landscape exploration, problem framing, candidate generation, adversarial challenge, and uncertainty resolution. This is the canonical successor to exploration-workflow and design-thinking-workflow -- if you are looking for either of those by name, this is the right workflow."
392
+
393
+ *Why:* Makes the predecessor relationship discoverable from the canonical workflow file itself. Survives stub deletion. Zero schema changes (description is an existing required string field).
394
+
395
+ ---
396
+
397
+ ### Deliverable 3: Planning doc updates (3 files)
398
+
399
+ **`docs/roadmap/now-next-later.md`** (Next section) -- replace the exploration-workflow.json item:
400
+ - Remove: "`exploration-workflow.json` is the highest-priority candidate."
401
+ - Replace with: "`exploration-workflow.json` was superseded by `wr.discovery` v3.2.0 (commit `a0ddaaac`, Mar 2026). A redirect stub was added at `workflows/exploration-workflow.json`. The open question -- whether codebase-archaeology tasks warrant a dedicated `wr.explore` workflow -- is tracked separately."
402
+
403
+ **`docs/roadmap/open-work-inventory.md`** (Legacy workflow modernization section) -- update `exploration-workflow.json` status to: complete/superseded. `wr.discovery` v3.2.0 is the replacement. Redirect stub added. Remaining modernization candidates: `mr-review-workflow.json`, `bug-investigation.json`, etc.
404
+
405
+ **`docs/tickets/next-up.md`** (Ticket 2) -- retitle or replace: "Legacy workflow modernization -- exploration-workflow.json" → point to the new GitHub issue for codebase-archaeology scope. Note the supersession.
406
+
407
+ ---
408
+
409
+ ### Deliverable 4: New GitHub issue
410
+
411
+ **Title:** `feat(workflows): decide whether codebase-archaeology exploration warrants a new wr.explore workflow`
412
+
413
+ **Labels:** `feature`, `next`
414
+
415
+ **Body (summary):**
416
+ - Problem: `wr.discovery` is shaped for problem-space exploration and strategic decision-making. Systematic codebase mapping (architecture, call stacks, data flows) is a different job with different tools. No bundled workflow explicitly covers it.
417
+ - Evidence gap: no session data confirming this gap causes real pain vs. being hypothetical.
418
+ - Acceptance criteria: investigate whether agents invoke `wr.discovery` for codebase-archaeology tasks and find it mis-shaped; if confirmed, create `wr.explore.json` scoped to codebase mapping only.
419
+ - **Pivot condition for engine alias feature (Candidate C):** if a SECOND workflow rename creates another `WorkflowNotFoundError`, escalate this issue to include adding `aliases?: string[]` to `spec/workflow.schema.json` and secondary alias lookup to `src/infrastructure/storage/file-workflow-storage.ts`.
420
+
421
+ ---
422
+
423
+ ### Strongest alternative (runner-up)
424
+
425
+ **Candidate C — engine alias feature:** Add `aliases?: readonly string[]` to `spec/workflow.schema.json`; extend `getWorkflowById` for secondary alias lookup; populate `wr.discovery.json` aliases. This is the architecturally correct fix. It loses to Candidate B today because YAGNI: one confirmed rename does not justify a general feature. The pivot condition is explicit: second rename confirmed OR project owner explicitly ships alias support as a product feature.
426
+
427
+ ---
428
+
429
+ ### Confidence band: HIGH
430
+
431
+ All technical claims verified analytically (storage layer, schema, smoke test). Adversarial challenge found only bounded implementation requirements, no structural flaws. Direction review confirmed no change needed.
432
+
433
+ **One human-gate residual risk:** The consolidation commit (`a0ddaaac`) was AI-authored (Firebender co-author). The "canonical successor" metaGuidance claim in `wr.discovery.json` was written by that session. The project owner should independently verify that `wr.discovery` fully covers their intended exploration use case before the roadmap item is formally closed. If the project owner has a different intent, the GitHub issue (Deliverable 4) should be converted to a new workflow creation ticket rather than a scope-decision ticket.
434
+
435
+ ---
436
+
437
+ ### What this does NOT do
438
+
439
+ - Does NOT touch `src/v2/durable-core/` (protected)
440
+ - Does NOT change `spec/workflow.schema.json`
441
+ - Does NOT create a new exploration workflow
442
+ - Does NOT pretend the codebase-archaeology gap doesn't exist
443
+ - Does NOT require session analytics data to implement