@exaudeus/workrail 3.14.0 → 3.16.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.
- package/dist/application/services/validation-engine.js +4 -9
- package/dist/application/services/workflow-compiler.js +4 -6
- package/dist/application/services/workflow-service.d.ts +2 -0
- package/dist/application/services/workflow-service.js +3 -0
- package/dist/console/assets/index-BE5PAgPO.js +28 -0
- package/dist/console/assets/index-BZNM03t1.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/engine/engine-factory.js +2 -2
- package/dist/engine/types.d.ts +1 -1
- package/dist/env-flags.d.ts +1 -0
- package/dist/env-flags.js +4 -0
- package/dist/infrastructure/session/HttpServer.d.ts +3 -3
- package/dist/infrastructure/session/HttpServer.js +68 -74
- package/dist/infrastructure/storage/caching-workflow-storage.d.ts +2 -0
- package/dist/infrastructure/storage/caching-workflow-storage.js +15 -6
- package/dist/infrastructure/storage/file-workflow-storage.js +3 -4
- package/dist/infrastructure/storage/schema-validating-workflow-storage.js +9 -8
- package/dist/manifest.json +283 -219
- package/dist/mcp/assert-output.d.ts +37 -0
- package/dist/mcp/assert-output.js +52 -0
- package/dist/mcp/boundary-coercion.d.ts +1 -0
- package/dist/mcp/boundary-coercion.js +44 -0
- package/dist/mcp/dev-mode.d.ts +1 -0
- package/dist/mcp/dev-mode.js +4 -0
- package/dist/mcp/handler-factory.js +12 -9
- package/dist/mcp/handlers/session.js +8 -9
- package/dist/mcp/handlers/shared/request-workflow-reader.d.ts +5 -0
- package/dist/mcp/handlers/shared/request-workflow-reader.js +47 -2
- package/dist/mcp/handlers/v2-advance-core/assessment-consequences.d.ts +1 -1
- package/dist/mcp/handlers/v2-advance-core/assessment-consequences.js +4 -5
- package/dist/mcp/handlers/v2-advance-core/event-builders.d.ts +2 -0
- package/dist/mcp/handlers/v2-advance-core/event-builders.js +6 -6
- package/dist/mcp/handlers/v2-advance-core/index.d.ts +2 -0
- package/dist/mcp/handlers/v2-advance-core/index.js +5 -4
- package/dist/mcp/handlers/v2-advance-core/input-validation.d.ts +2 -0
- package/dist/mcp/handlers/v2-advance-core/input-validation.js +32 -9
- package/dist/mcp/handlers/v2-advance-core/outcome-blocked.d.ts +2 -0
- package/dist/mcp/handlers/v2-advance-core/outcome-blocked.js +2 -2
- package/dist/mcp/handlers/v2-advance-core/outcome-success.d.ts +2 -0
- package/dist/mcp/handlers/v2-advance-core/outcome-success.js +1 -1
- package/dist/mcp/handlers/v2-checkpoint.d.ts +1 -1
- package/dist/mcp/handlers/v2-checkpoint.js +5 -6
- package/dist/mcp/handlers/v2-execution/advance.d.ts +4 -2
- package/dist/mcp/handlers/v2-execution/advance.js +5 -7
- package/dist/mcp/handlers/v2-execution/continue-advance.js +56 -26
- package/dist/mcp/handlers/v2-execution/continue-rehydrate.d.ts +1 -1
- package/dist/mcp/handlers/v2-execution/continue-rehydrate.js +9 -9
- package/dist/mcp/handlers/v2-execution/replay.d.ts +6 -4
- package/dist/mcp/handlers/v2-execution/replay.js +47 -30
- package/dist/mcp/handlers/v2-execution/start.d.ts +3 -3
- package/dist/mcp/handlers/v2-execution/start.js +31 -12
- package/dist/mcp/handlers/v2-execution/workflow-object-cache.d.ts +5 -0
- package/dist/mcp/handlers/v2-execution/workflow-object-cache.js +19 -0
- package/dist/mcp/handlers/v2-execution-helpers.d.ts +1 -0
- package/dist/mcp/handlers/v2-execution-helpers.js +23 -7
- package/dist/mcp/handlers/v2-resume.d.ts +1 -1
- package/dist/mcp/handlers/v2-resume.js +3 -4
- package/dist/mcp/handlers/v2-state-conversion.js +5 -1
- package/dist/mcp/handlers/v2-workflow.d.ts +100 -0
- package/dist/mcp/handlers/v2-workflow.js +155 -31
- package/dist/mcp/handlers/workflow.d.ts +2 -5
- package/dist/mcp/handlers/workflow.js +15 -12
- package/dist/mcp/output-schemas.d.ts +123 -29
- package/dist/mcp/output-schemas.js +36 -18
- package/dist/mcp/server.js +70 -5
- package/dist/mcp/tool-call-timing.d.ts +24 -0
- package/dist/mcp/tool-call-timing.js +85 -0
- package/dist/mcp/tool-descriptions.js +17 -9
- package/dist/mcp/transports/http-entry.js +3 -2
- package/dist/mcp/transports/http-listener.d.ts +1 -0
- package/dist/mcp/transports/http-listener.js +25 -0
- package/dist/mcp/transports/shutdown-hooks.d.ts +4 -1
- package/dist/mcp/transports/shutdown-hooks.js +3 -2
- package/dist/mcp/transports/stdio-entry.js +6 -28
- package/dist/mcp/v2/tools.d.ts +6 -0
- package/dist/mcp/v2/tools.js +2 -0
- package/dist/mcp/v2-response-formatter.js +2 -4
- package/dist/mcp/validation/schema-introspection.d.ts +1 -0
- package/dist/mcp/validation/schema-introspection.js +15 -5
- package/dist/mcp/validation/suggestion-generator.js +2 -2
- package/dist/mcp/workflow-protocol-contracts.js +5 -1
- package/dist/runtime/adapters/node-process-signals.d.ts +1 -0
- package/dist/runtime/adapters/node-process-signals.js +5 -0
- package/dist/runtime/adapters/noop-process-signals.d.ts +1 -0
- package/dist/runtime/adapters/noop-process-signals.js +2 -0
- package/dist/runtime/ports/process-signals.d.ts +1 -0
- package/dist/types/workflow-definition.d.ts +3 -2
- package/dist/types/workflow.d.ts +3 -0
- package/dist/types/workflow.js +35 -26
- package/dist/v2/durable-core/domain/context-template-resolver.js +2 -2
- package/dist/v2/durable-core/domain/function-definition-expander.js +2 -17
- package/dist/v2/durable-core/domain/prompt-renderer.d.ts +1 -0
- package/dist/v2/durable-core/domain/prompt-renderer.js +23 -18
- package/dist/v2/durable-core/domain/recap-recovery.js +23 -16
- package/dist/v2/durable-core/domain/retrieval-contract.js +13 -7
- package/dist/v2/durable-core/session-index.d.ts +22 -0
- package/dist/v2/durable-core/session-index.js +58 -0
- package/dist/v2/durable-core/sorted-event-log.d.ts +6 -0
- package/dist/v2/durable-core/sorted-event-log.js +15 -0
- package/dist/v2/infra/local/fs/index.js +8 -8
- package/dist/v2/infra/local/session-store/index.d.ts +1 -1
- package/dist/v2/infra/local/session-store/index.js +71 -61
- package/dist/v2/infra/local/session-summary-provider/index.js +9 -4
- package/dist/v2/infra/local/snapshot-store/index.js +2 -1
- package/dist/v2/infra/local/workspace-anchor/index.js +4 -1
- package/dist/v2/ports/session-event-log-store.port.d.ts +1 -1
- package/dist/v2/projections/assessment-consequences.d.ts +2 -1
- package/dist/v2/projections/assessment-consequences.js +0 -5
- package/dist/v2/projections/assessments.d.ts +2 -1
- package/dist/v2/projections/assessments.js +2 -4
- package/dist/v2/projections/gaps.d.ts +2 -1
- package/dist/v2/projections/gaps.js +0 -5
- package/dist/v2/projections/preferences.d.ts +2 -1
- package/dist/v2/projections/preferences.js +0 -5
- package/dist/v2/projections/run-context.d.ts +2 -2
- package/dist/v2/projections/run-context.js +0 -5
- package/dist/v2/projections/run-dag.js +7 -1
- package/dist/v2/projections/run-execution-trace.d.ts +8 -0
- package/dist/v2/projections/run-execution-trace.js +124 -0
- package/dist/v2/projections/run-status-signals.d.ts +2 -2
- package/dist/v2/usecases/console-routes.d.ts +3 -1
- package/dist/v2/usecases/console-routes.js +149 -3
- package/dist/v2/usecases/console-service.d.ts +2 -0
- package/dist/v2/usecases/console-service.js +87 -26
- package/dist/v2/usecases/console-types.d.ts +65 -0
- package/dist/v2/usecases/worktree-service.js +87 -8
- package/package.json +7 -6
- package/spec/authoring-spec.json +82 -1
- package/spec/workflow-tags.json +132 -0
- package/spec/workflow.schema.json +21 -11
- package/workflows/adaptive-ticket-creation.json +33 -8
- package/workflows/architecture-scalability-audit.json +50 -9
- package/workflows/bug-investigation.agentic.v2.json +43 -14
- package/workflows/coding-task-workflow-agentic.json +57 -38
- package/workflows/coding-task-workflow-agentic.lean.v2.json +129 -34
- package/workflows/coding-task-workflow-agentic.v2.json +97 -30
- package/workflows/cross-platform-code-conversion.v2.json +175 -48
- package/workflows/document-creation-workflow.json +49 -12
- package/workflows/documentation-update-workflow.json +9 -2
- package/workflows/intelligent-test-case-generation.json +9 -2
- package/workflows/learner-centered-course-workflow.json +273 -266
- package/workflows/mr-review-workflow.agentic.v2.json +88 -14
- package/workflows/personal-learning-materials-creation-branched.json +181 -174
- package/workflows/presentation-creation.json +167 -160
- package/workflows/production-readiness-audit.json +61 -15
- package/workflows/relocation-workflow-us.json +21 -5
- package/workflows/routines/tension-driven-design.json +1 -1
- package/workflows/scoped-documentation-workflow.json +9 -2
- package/workflows/test-artifact-loop-control.json +1 -2
- package/workflows/ui-ux-design-workflow.json +334 -0
- package/workflows/workflow-diagnose-environment.json +7 -1
- package/workflows/workflow-for-workflows.json +514 -484
- package/workflows/workflow-for-workflows.v2.json +55 -11
- package/workflows/wr.discovery.json +118 -29
- package/dist/console/assets/index-DW78t31j.css +0 -1
- package/dist/console/assets/index-EsSXrC_a.js +0 -28
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
"id": "coding-task-workflow-agentic",
|
|
3
3
|
"name": "Agentic Task Dev Workflow (Lean • Notes-First • WorkRail Executor)",
|
|
4
4
|
"version": "1.0.0",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Use this to implement a software feature or task. Follows a plan-then-execute approach with architecture decisions, invariant tracking, and final verification.",
|
|
6
|
+
"about": "## Agentic Coding Task Workflow\n\nThis workflow structures the full lifecycle of a software implementation task: from understanding and classifying the work, through architecture decisions and incremental implementation, to final verification and handoff.\n\n### What it does\n\nThe workflow guides an AI agent through a disciplined plan-then-execute process. It begins by analyzing the task to determine complexity, risk, and the right level of rigor (QUICK, STANDARD, or THOROUGH). For non-trivial tasks, it then gathers codebase context, surfaces invariants and non-goals, generates competing design candidates, and selects an approach before writing a single line of code. Implementation proceeds slice by slice, with built-in verification gates after each slice. A final integration verification pass confirms acceptance criteria are met before handoff.\n\n### When to use it\n\nUse this workflow whenever you are implementing a feature, fixing a non-trivial bug, or making an architectural change in a real codebase. It is especially valuable when:\n- The task touches multiple files or systems\n- There is meaningful risk of regressions or invariant violations\n- You want the agent to surface trade-offs and commit to a reasoned design decision rather than guessing\n- You need a resumable, auditable record of what was decided and why\n\nFor quick one-liner fixes or very small changes, the workflow includes a fast path that skips heavyweight planning.\n\n### What it produces\n\n- An `implementation_plan.md` artifact covering the selected approach, vertical slices, test design, and philosophy alignment\n- A `spec.md` for large or high-risk tasks, capturing observable behavior and acceptance criteria\n- Step-level notes in WorkRail that serve as a durable execution log\n- A PR-ready handoff summary with acceptance criteria status, invariant proofs, and follow-up tickets\n\n### How to get good results\n\n- Provide a clear task description and at least partial acceptance criteria before starting\n- If you have coding philosophy or project conventions configured in session rules or Memory MCP, the workflow will apply them automatically as a design lens\n- Let the workflow classify complexity and rigor itself; override only if the classification is clearly wrong\n- For large or high-risk tasks, review the architecture decision step before implementation begins",
|
|
7
|
+
"examples": [
|
|
8
|
+
"Implement JWT refresh token rotation in the auth service",
|
|
9
|
+
"Fix the race condition in the cache invalidation path when concurrent writes occur",
|
|
10
|
+
"Refactor the payment flow to use a Result type instead of throwing exceptions",
|
|
11
|
+
"Add pagination support to the messaging inbox API endpoint"
|
|
12
|
+
],
|
|
6
13
|
"recommendedPreferences": {
|
|
7
14
|
"recommendedAutonomy": "guided",
|
|
8
15
|
"recommendedRiskPolicy": "conservative"
|
|
@@ -23,7 +30,8 @@
|
|
|
23
30
|
"PHILOSOPHY LENS: apply the user's coding philosophy (from active session rules) as the evaluation lens. Flag violations by principle name, not as generic feedback. If principles conflict, surface the tension explicitly instead of silently choosing.",
|
|
24
31
|
"VALIDATION: prefer static/compile-time safety over runtime checks. Use build, type-checking, and tests as the primary proof of correctness — in that order of reliability.",
|
|
25
32
|
"DRIFT HANDLING: when reality diverges from the plan, update the plan artifact and re-audit deliberately rather than accumulating undocumented drift.",
|
|
26
|
-
"NEVER COMMIT MARKDOWN FILES UNLESS USER EXPLICITLY ASKS."
|
|
33
|
+
"NEVER COMMIT MARKDOWN FILES UNLESS USER EXPLICITLY ASKS.",
|
|
34
|
+
"SLICE DISCIPLINE: Phase 6 is a loop -- implement ONE slice per iteration. Do not implement multiple slices at once. The verification loop exists to catch drift per slice, not retroactively."
|
|
27
35
|
],
|
|
28
36
|
"references": [
|
|
29
37
|
{
|
|
@@ -58,8 +66,14 @@
|
|
|
58
66
|
"prompt": "Understand this before you touch anything.\n\nMake sure the expected behavior is clear enough to proceed. If it really isn't, ask me only what you can't answer yourself. Don't ask me things you can find with tools.\n\nThen dig through the code. Figure out:\n- where this starts and what the call chain looks like\n- which files, modules, and functions matter\n- what patterns this should follow\n- how this repo verifies similar work\n- what the real risks, invariants, and non-goals are\n\nFigure out what philosophy to use while doing the work. Prefer, in order: Memory MCP (`mcp_memory_conventions`, `mcp_memory_prefer`, `mcp_memory_recall`), active session/Firebender rules, repo patterns, then me only if those still conflict or aren't enough.\n\nRecord where that philosophy lives, not a summary. If the stated rules and repo patterns disagree, capture the conflict.\n\nOnce you actually understand the task, classify it:\n- `taskComplexity`: Small / Medium / Large\n- `riskLevel`: Low / Medium / High\n- `rigorMode`: QUICK / STANDARD / THOROUGH\n- `automationLevel`: High / Medium / Low\n- `prStrategy`: SinglePR / MultiPR\n\nUse this guidance:\n- QUICK: small, low-risk, clear path, little ambiguity\n- STANDARD: medium scope or moderate risk\n- THOROUGH: large scope, architectural uncertainty, or high-risk change\n\nThen force a context-clarity check. Score each from 0-2 and give one sentence of evidence for each score:\n- `entryPointClarity`: 0 = clear entry point and call chain, 1 = partial chain with gaps, 2 = still unclear where behavior starts or flows\n- `boundaryClarity`: 0 = clear boundary, 1 = likely boundary but some uncertainty, 2 = patch-vs-boundary decision still unclear\n- `invariantClarity`: 0 = important invariants are explicit, 1 = some are inferred or uncertain, 2 = important invariants are still unclear\n- `verificationClarity`: 0 = clear deterministic verification path, 1 = partial verification path, 2 = verification is still weak or unclear\n\nUse the rubric, not vibes:\n- QUICK: do not run the deeper context batch; if the rubric says you're missing too much context, your classification is probably wrong and you should reclassify upward before moving on\n- STANDARD: run the deeper context batch if the total score is 3 or more, or if `boundaryClarity`, `invariantClarity`, or `verificationClarity` is 2\n- THOROUGH: always run the deeper context batch\n\nThe deeper context batch is:\n- `routine-context-gathering` with `focus=COMPLETENESS`\n- `routine-context-gathering` with `focus=DEPTH`\n\nAfter the batch, synthesize what changed, what stayed the same, and what is still unknown. If the extra context changes the classification, update it before you leave this step.\n\nCapture:\n- `taskComplexity`\n- `riskLevel`\n- `rigorMode`\n- `automationLevel`\n- `prStrategy`\n- `contextSummary`\n- `candidateFiles`\n- `invariants`\n- `nonGoals`\n- `openQuestions` (only real human-decision questions)\n- `philosophySources`\n- `philosophyConflicts`",
|
|
59
67
|
"requireConfirmation": {
|
|
60
68
|
"or": [
|
|
61
|
-
{
|
|
62
|
-
|
|
69
|
+
{
|
|
70
|
+
"var": "taskComplexity",
|
|
71
|
+
"equals": "Large"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"var": "riskLevel",
|
|
75
|
+
"equals": "High"
|
|
76
|
+
}
|
|
63
77
|
]
|
|
64
78
|
}
|
|
65
79
|
},
|
|
@@ -68,8 +82,14 @@
|
|
|
68
82
|
"title": "Phase 1a: State Hypothesis",
|
|
69
83
|
"runCondition": {
|
|
70
84
|
"and": [
|
|
71
|
-
{
|
|
72
|
-
|
|
85
|
+
{
|
|
86
|
+
"var": "taskComplexity",
|
|
87
|
+
"not_equals": "Small"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"var": "rigorMode",
|
|
91
|
+
"not_equals": "QUICK"
|
|
92
|
+
}
|
|
73
93
|
]
|
|
74
94
|
},
|
|
75
95
|
"prompt": "Before you do design work, tell me your current best guess.\n\nKeep it short:\n1. what you think the right approach is\n2. what worries you about it\n3. what would most likely make it wrong\n\nCapture:\n- `initialHypothesis`",
|
|
@@ -80,8 +100,14 @@
|
|
|
80
100
|
"title": "Phase 1b: Lightweight Design (QUICK)",
|
|
81
101
|
"runCondition": {
|
|
82
102
|
"and": [
|
|
83
|
-
{
|
|
84
|
-
|
|
103
|
+
{
|
|
104
|
+
"var": "taskComplexity",
|
|
105
|
+
"not_equals": "Small"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"var": "rigorMode",
|
|
109
|
+
"equals": "QUICK"
|
|
110
|
+
}
|
|
85
111
|
]
|
|
86
112
|
},
|
|
87
113
|
"prompt": "Generate a lightweight design inline. QUICK rigor means the path is clear and risk is low.\n\nProduce two mandatory candidates:\n1. The simplest possible change that satisfies acceptance criteria\n2. Follow the existing repo pattern for this kind of change\n\nFor each candidate:\n- One-sentence summary\n- Which tensions it resolves and which it accepts\n- How it relates to existing repo patterns (follows / adapts / departs)\n- Failure mode to watch\n- Philosophy fit (name specific principles)\n\nCompare and recommend. If both converge on the same approach, say so honestly.\n\nWrite the output to `design-candidates.md` with this structure:\n- Problem Understanding (core tensions, what makes it hard)\n- Philosophy Constraints (which principles matter for this problem)\n- Candidates (each with: summary, tensions resolved/accepted, failure mode, philosophy fit)\n- Comparison and Recommendation\n- Open Questions (if any remain)",
|
|
@@ -92,8 +118,14 @@
|
|
|
92
118
|
"title": "Phase 1b: Design Generation (Injected Routine — Tension-Driven Design)",
|
|
93
119
|
"runCondition": {
|
|
94
120
|
"and": [
|
|
95
|
-
{
|
|
96
|
-
|
|
121
|
+
{
|
|
122
|
+
"var": "taskComplexity",
|
|
123
|
+
"not_equals": "Small"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"var": "rigorMode",
|
|
127
|
+
"not_equals": "QUICK"
|
|
128
|
+
}
|
|
97
129
|
]
|
|
98
130
|
},
|
|
99
131
|
"templateCall": {
|
|
@@ -114,20 +146,38 @@
|
|
|
114
146
|
"promptFragments": [
|
|
115
147
|
{
|
|
116
148
|
"id": "phase-1c-challenge-standard",
|
|
117
|
-
"when": {
|
|
118
|
-
|
|
149
|
+
"when": {
|
|
150
|
+
"var": "rigorMode",
|
|
151
|
+
"in": [
|
|
152
|
+
"STANDARD",
|
|
153
|
+
"THOROUGH"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"text": "Run `routine-hypothesis-challenge` on the leading option's failure modes before you decide."
|
|
119
157
|
},
|
|
120
158
|
{
|
|
121
159
|
"id": "phase-1c-challenge-thorough",
|
|
122
|
-
"when": {
|
|
123
|
-
|
|
160
|
+
"when": {
|
|
161
|
+
"var": "rigorMode",
|
|
162
|
+
"equals": "THOROUGH"
|
|
163
|
+
},
|
|
164
|
+
"text": "Also run `routine-execution-simulation` on the three most likely failure paths before you decide."
|
|
124
165
|
}
|
|
125
166
|
],
|
|
126
167
|
"requireConfirmation": {
|
|
127
168
|
"or": [
|
|
128
|
-
{
|
|
129
|
-
|
|
130
|
-
|
|
169
|
+
{
|
|
170
|
+
"var": "automationLevel",
|
|
171
|
+
"equals": "Low"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"var": "taskComplexity",
|
|
175
|
+
"equals": "Large"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"var": "riskLevel",
|
|
179
|
+
"equals": "High"
|
|
180
|
+
}
|
|
131
181
|
]
|
|
132
182
|
}
|
|
133
183
|
},
|
|
@@ -173,7 +223,10 @@
|
|
|
173
223
|
"promptFragments": [
|
|
174
224
|
{
|
|
175
225
|
"id": "phase-2c-challenge-thorough",
|
|
176
|
-
"when": {
|
|
226
|
+
"when": {
|
|
227
|
+
"var": "rigorMode",
|
|
228
|
+
"equals": "THOROUGH"
|
|
229
|
+
},
|
|
177
230
|
"text": "If the review surfaced materially non-empty or surprising findings, run `routine-hypothesis-challenge` on the most serious finding and `routine-execution-simulation` on the most dangerous failure mode before you finalize the revised design."
|
|
178
231
|
}
|
|
179
232
|
],
|
|
@@ -197,7 +250,7 @@
|
|
|
197
250
|
"var": "taskComplexity",
|
|
198
251
|
"not_equals": "Small"
|
|
199
252
|
},
|
|
200
|
-
"prompt": "Turn the decision into a plan someone else could execute without guessing.\n\nUpdate `implementation_plan.md`.\n\nIt should cover:\n1. Problem statement\n2. Acceptance criteria (mirror `spec.md` if it exists; `spec.md` owns observable behavior)\n3. Non-goals\n4. Philosophy-driven constraints\n5. Invariants\n6. Selected approach + rationale + runner-up\n7. Vertical slices\n8. Work packages only if they actually help\n9. Test design\n10. Risk register\n11. PR packaging strategy\n12. Philosophy alignment per slice:\n - [principle] -> [satisfied / tension / violated + 1-line why]\n\nCapture:\n- `implementationPlan`\n- `slices`\n- `testDesign`\n- `estimatedPRCount`\n- `followUpTickets` (initialize if needed)\n- `unresolvedUnknownCount` — count of open issues that would materially affect implementation quality\n- `planConfidenceBand` — Low / Medium / High",
|
|
253
|
+
"prompt": "Turn the decision into a plan someone else could execute without guessing.\n\nUpdate `implementation_plan.md`.\n\nIt should cover:\n1. Problem statement\n2. Acceptance criteria (mirror `spec.md` if it exists; `spec.md` owns observable behavior)\n3. Non-goals\n4. Philosophy-driven constraints\n5. Invariants\n6. Selected approach + rationale + runner-up\n7. Vertical slices\n8. Work packages only if they actually help\n9. Test design\n10. Risk register\n11. PR packaging strategy\n12. Philosophy alignment per slice:\n - [principle] -> [satisfied / tension / violated + 1-line why]\n\nCapture:\n- `implementationPlan`\n- `slices`\n- `testDesign`\n- `estimatedPRCount`\n- `followUpTickets` (initialize if needed)\n- `unresolvedUnknownCount` — count of open issues that would materially affect implementation quality\n- `planConfidenceBand` — Low / Medium / High\n\nThe plan is the deliverable for this step. Do not implement anything -- not a \"quick win\", not a file read that bleeds into edits, nothing. Execution begins in Phase 6, one slice at a time. If you find yourself writing code or editing source files right now, stop immediately.",
|
|
201
254
|
"requireConfirmation": false
|
|
202
255
|
},
|
|
203
256
|
{
|
|
@@ -205,11 +258,20 @@
|
|
|
205
258
|
"title": "Phase 3b: Spec (Observable Behavior)",
|
|
206
259
|
"runCondition": {
|
|
207
260
|
"and": [
|
|
208
|
-
{
|
|
261
|
+
{
|
|
262
|
+
"var": "taskComplexity",
|
|
263
|
+
"not_equals": "Small"
|
|
264
|
+
},
|
|
209
265
|
{
|
|
210
266
|
"or": [
|
|
211
|
-
{
|
|
212
|
-
|
|
267
|
+
{
|
|
268
|
+
"var": "taskComplexity",
|
|
269
|
+
"equals": "Large"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"var": "riskLevel",
|
|
273
|
+
"equals": "High"
|
|
274
|
+
}
|
|
213
275
|
]
|
|
214
276
|
}
|
|
215
277
|
]
|
|
@@ -223,8 +285,14 @@
|
|
|
223
285
|
"title": "Phase 4: Plan Audit (Review, Fix, Decide)",
|
|
224
286
|
"runCondition": {
|
|
225
287
|
"and": [
|
|
226
|
-
{
|
|
227
|
-
|
|
288
|
+
{
|
|
289
|
+
"var": "taskComplexity",
|
|
290
|
+
"not_equals": "Small"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"var": "rigorMode",
|
|
294
|
+
"not_equals": "QUICK"
|
|
295
|
+
}
|
|
228
296
|
]
|
|
229
297
|
},
|
|
230
298
|
"loop": {
|
|
@@ -244,17 +312,26 @@
|
|
|
244
312
|
"promptFragments": [
|
|
245
313
|
{
|
|
246
314
|
"id": "phase-4a-delegation-quick",
|
|
247
|
-
"when": {
|
|
315
|
+
"when": {
|
|
316
|
+
"var": "rigorMode",
|
|
317
|
+
"equals": "QUICK"
|
|
318
|
+
},
|
|
248
319
|
"text": "Do this yourself."
|
|
249
320
|
},
|
|
250
321
|
{
|
|
251
322
|
"id": "phase-4a-delegation-standard",
|
|
252
|
-
"when": {
|
|
323
|
+
"when": {
|
|
324
|
+
"var": "rigorMode",
|
|
325
|
+
"equals": "STANDARD"
|
|
326
|
+
},
|
|
253
327
|
"text": "Run `routine-plan-analysis`, `routine-hypothesis-challenge`, and `routine-philosophy-alignment` in parallel before you decide whether the plan is good enough."
|
|
254
328
|
},
|
|
255
329
|
{
|
|
256
330
|
"id": "phase-4a-delegation-thorough",
|
|
257
|
-
"when": {
|
|
331
|
+
"when": {
|
|
332
|
+
"var": "rigorMode",
|
|
333
|
+
"equals": "THOROUGH"
|
|
334
|
+
},
|
|
258
335
|
"text": "Run `routine-plan-analysis`, `routine-hypothesis-challenge`, `routine-execution-simulation`, and `routine-philosophy-alignment` in parallel before you decide whether the plan is good enough."
|
|
259
336
|
}
|
|
260
337
|
],
|
|
@@ -300,7 +377,7 @@
|
|
|
300
377
|
{
|
|
301
378
|
"id": "phase-6a-implement-slice",
|
|
302
379
|
"title": "Implement Slice",
|
|
303
|
-
"prompt": "Implement
|
|
380
|
+
"prompt": "Implement the current slice: `{{currentSlice.name}}`.\n\nBefore writing a single line of code, declare your scope:\n- List the exact files and symbols this slice touches\n- Confirm none of them belong to a later slice\n- If you have already edited files from this or any other slice in a previous step, stop and report it\n\nHard scope rule: you may only modify what is described in `{{currentSlice.name}}`. Anything outside that boundary is out of scope for this iteration -- not \"do it early\", not \"while I'm here\". If you discover you need to touch something outside this slice to make it compile or integrate, set `unexpectedScopeChange = true` and do the minimum necessary to stay green, then stop.\n\nImplement incrementally. Run tests and build to prove the slice works before advancing.\n\nTrack:\n- `specialCaseIntroduced` -- did this slice require a new special-case?\n- `unplannedAbstractionIntroduced` -- did this slice introduce an abstraction not in the plan?\n- `unexpectedScopeChange` -- did this slice touch files outside its planned scope?\n\nSet `verifyNeeded` to true if ANY of:\n- `sliceIndex` is odd (verify every 2 slices)\n- `prStrategy = MultiPR`\n- `specialCaseIntroduced = true`\n- `unplannedAbstractionIntroduced = true`\n- `unexpectedScopeChange = true`\n- tests or build failed\n\nCapture: `specialCaseIntroduced`, `unplannedAbstractionIntroduced`, `unexpectedScopeChange`, `verifyNeeded`",
|
|
304
381
|
"requireConfirmation": false
|
|
305
382
|
},
|
|
306
383
|
{
|
|
@@ -314,29 +391,47 @@
|
|
|
314
391
|
"promptFragments": [
|
|
315
392
|
{
|
|
316
393
|
"id": "phase-6b-delegation-quick",
|
|
317
|
-
"when": {
|
|
394
|
+
"when": {
|
|
395
|
+
"var": "rigorMode",
|
|
396
|
+
"equals": "QUICK"
|
|
397
|
+
},
|
|
318
398
|
"text": "Do the verification yourself."
|
|
319
399
|
},
|
|
320
400
|
{
|
|
321
401
|
"id": "phase-6b-delegation-standard",
|
|
322
|
-
"when": {
|
|
402
|
+
"when": {
|
|
403
|
+
"var": "rigorMode",
|
|
404
|
+
"equals": "STANDARD"
|
|
405
|
+
},
|
|
323
406
|
"text": "If any slice-risk trigger fired, run `routine-hypothesis-challenge` and `routine-philosophy-alignment` before you decide this slice is done."
|
|
324
407
|
},
|
|
325
408
|
{
|
|
326
409
|
"id": "phase-6b-delegation-thorough",
|
|
327
|
-
"when": {
|
|
410
|
+
"when": {
|
|
411
|
+
"var": "rigorMode",
|
|
412
|
+
"equals": "THOROUGH"
|
|
413
|
+
},
|
|
328
414
|
"text": "If any slice-risk trigger fired, also run `routine-execution-simulation` before you decide this slice is done."
|
|
329
415
|
},
|
|
330
416
|
{
|
|
331
417
|
"id": "phase-6b-multi-pr",
|
|
332
|
-
"when": {
|
|
418
|
+
"when": {
|
|
419
|
+
"var": "prStrategy",
|
|
420
|
+
"equals": "MultiPR"
|
|
421
|
+
},
|
|
333
422
|
"text": "If this slice is verified and ready, stop here and package it for review before you move to the next slice."
|
|
334
423
|
}
|
|
335
424
|
],
|
|
336
425
|
"requireConfirmation": {
|
|
337
426
|
"or": [
|
|
338
|
-
{
|
|
339
|
-
|
|
427
|
+
{
|
|
428
|
+
"var": "verificationFailed",
|
|
429
|
+
"equals": true
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"var": "prStrategy",
|
|
433
|
+
"equals": "MultiPR"
|
|
434
|
+
}
|
|
340
435
|
]
|
|
341
436
|
}
|
|
342
437
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "coding-task-workflow-agentic",
|
|
3
|
-
"name": "Agentic Task Dev Workflow (v2
|
|
3
|
+
"name": "Agentic Task Dev Workflow (v2 \u2022 Notes-First \u2022 WorkRail Executor)",
|
|
4
4
|
"version": "2.0.0",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Use this to implement a software feature or task. Follows a plan-then-execute approach with architecture decisions, invariant tracking, and final verification.",
|
|
6
|
+
"about": "## Agentic Coding Task Workflow\n\nThis workflow structures the full lifecycle of a software implementation task: from understanding and classifying the work, through architecture decisions and incremental implementation, to final verification and handoff.\n\n### What it does\n\nThe workflow guides an AI agent through a disciplined plan-then-execute process. It begins by analyzing the task to determine complexity, risk, and the right level of rigor (QUICK, STANDARD, or THOROUGH). For non-trivial tasks, it then gathers codebase context, surfaces invariants and non-goals, generates competing design candidates, and selects an approach before writing a single line of code. Implementation proceeds slice by slice, with built-in verification gates after each slice. A final integration verification pass confirms acceptance criteria are met before handoff.\n\n### When to use it\n\nUse this workflow whenever you are implementing a feature, fixing a non-trivial bug, or making an architectural change in a real codebase. It is especially valuable when:\n- The task touches multiple files or systems\n- There is meaningful risk of regressions or invariant violations\n- You want the agent to surface trade-offs and commit to a reasoned design decision rather than guessing\n- You need a resumable, auditable record of what was decided and why\n\nFor quick one-liner fixes or very small changes, the workflow includes a fast path that skips heavyweight planning.\n\n### What it produces\n\n- An `implementation_plan.md` artifact covering the selected approach, vertical slices, test design, and philosophy alignment\n- A `spec.md` for large or high-risk tasks, capturing observable behavior and acceptance criteria\n- Step-level notes in WorkRail that serve as a durable execution log\n- A PR-ready handoff summary with acceptance criteria status, invariant proofs, and follow-up tickets\n\n### How to get good results\n\n- Provide a clear task description and at least partial acceptance criteria before starting\n- If you have coding philosophy or project conventions configured in session rules or Memory MCP, the workflow will apply them automatically as a design lens\n- Let the workflow classify complexity and rigor itself; override only if the classification is clearly wrong\n- For large or high-risk tasks, review the architecture decision step before implementation begins",
|
|
7
|
+
"examples": [
|
|
8
|
+
"Implement JWT refresh token rotation in the auth service",
|
|
9
|
+
"Fix the race condition in the cache invalidation path when concurrent writes occur",
|
|
10
|
+
"Refactor the payment flow to use a Result type instead of throwing exceptions",
|
|
11
|
+
"Add pagination support to the messaging inbox API endpoint"
|
|
12
|
+
],
|
|
6
13
|
"recommendedPreferences": {
|
|
7
14
|
"recommendedAutonomy": "guided",
|
|
8
15
|
"recommendedRiskPolicy": "conservative"
|
|
@@ -40,8 +47,8 @@
|
|
|
40
47
|
"steps": [
|
|
41
48
|
{
|
|
42
49
|
"id": "phase-0-triage-and-mode",
|
|
43
|
-
"title": "Phase 0: Triage (Complexity
|
|
44
|
-
"prompt": "Analyze the task and choose the right rigor.\n\nClassify:\n- `taskComplexity`: Small / Medium / Large\n- `riskLevel`: Low / Medium / High\n- `rigorMode`: QUICK / STANDARD / THOROUGH\n- `automationLevel`: High / Medium / Low\n- `prStrategy`: SinglePR / MultiPR\n- `maxParallelism`: 0 / 3 / 4\n\nDecision guidance:\n- QUICK: small, low-risk, clear path, little ambiguity\n- STANDARD: medium scope or moderate risk\n- THOROUGH: large scope, architectural uncertainty, or high-risk change\n\nParallelism guidance:\n- QUICK: no delegation by default\n- STANDARD: few delegation moments, but allow multiple parallel executors at each moment\n- THOROUGH: same pattern, but with one extra delegation moment and broader parallel validation\n\nAlso capture `userRules` from the active session instructions and explicit philosophy. Keep them as a focused list of concrete, actionable rules.\n\nSet these keys in the next `continue_workflow` call's `context` object: `taskComplexity`, `riskLevel`, `rigorMode`, `automationLevel`, `prStrategy`, `maxParallelism`, `userRules`.\n\nAsk the user to confirm only if the rigor or PR strategy materially affects delivery expectations.",
|
|
50
|
+
"title": "Phase 0: Triage (Complexity \u2022 Risk \u2022 PR Strategy)",
|
|
51
|
+
"prompt": "Analyze the task and choose the right rigor.\n\nClassify:\n- `taskComplexity`: Small / Medium / Large\n- `riskLevel`: Low / Medium / High\n- `rigorMode`: QUICK / STANDARD / THOROUGH\n- `automationLevel`: High / Medium / Low\n- `prStrategy`: SinglePR / MultiPR\n- `maxParallelism`: 0 / 3 / 4\n\nDecision guidance:\n- QUICK: small, low-risk, clear path, little ambiguity\n- STANDARD: medium scope or moderate risk\n- THOROUGH: large scope, architectural uncertainty, or high-risk change\n\nParallelism guidance:\n- QUICK: no delegation by default\n- STANDARD: few delegation moments, but allow multiple parallel executors at each moment\n- THOROUGH: same pattern, but with one extra delegation moment and broader parallel validation\n\nAlso capture `userRules` from the active session instructions and explicit philosophy. Keep them as a focused list of concrete, actionable rules.\n\nSet these keys in the next `continue_workflow` call's `context` object: `taskComplexity`, `riskLevel`, `rigorMode`, `automationLevel`, `prStrategy`, `maxParallelism`, `userRules`.\n\nAsk the user to confirm only if the rigor or PR strategy materially affects delivery expectations.\n\nAlso set in the context object: one sentence describing what you are trying to accomplish (e.g. \"implement OAuth refresh token rotation\", \"review PR #47 before merge\"). This populates the session title in the Workspace console immediately.",
|
|
45
52
|
"requireConfirmation": true
|
|
46
53
|
},
|
|
47
54
|
{
|
|
@@ -50,8 +57,14 @@
|
|
|
50
57
|
"prompt": "If critical information is missing, ask only for the minimum required to proceed.\n\nAsk for:\n- acceptance criteria or expected behavior (if absent)\n- non-goals (if unclear)\n- environment or permission constraints (if they materially block progress)\n- pointers to relevant code areas only if codebase search cannot answer it\n\nDo NOT ask questions you can resolve with tools.",
|
|
51
58
|
"requireConfirmation": {
|
|
52
59
|
"or": [
|
|
53
|
-
{
|
|
54
|
-
|
|
60
|
+
{
|
|
61
|
+
"var": "automationLevel",
|
|
62
|
+
"equals": "Low"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"var": "automationLevel",
|
|
66
|
+
"equals": "Medium"
|
|
67
|
+
}
|
|
55
68
|
]
|
|
56
69
|
}
|
|
57
70
|
},
|
|
@@ -75,24 +88,39 @@
|
|
|
75
88
|
"prompt": "Reassess the initial triage now that context is real instead of hypothetical.\n\nReview:\n- `contextUnknownCount`\n- number of systems/components actually involved\n- number of critical invariants discovered\n- whether the task now looks broader or riskier than Phase 0 suggested\n\nDo:\n- confirm or adjust `taskComplexity`\n- confirm or adjust `riskLevel`\n- confirm or adjust `rigorMode`\n- confirm or adjust `maxParallelism`\n\nRules:\n- upgrade rigor if the real architecture surface or uncertainty is larger than expected\n- downgrade only if the task is genuinely simpler than it first appeared\n- if you change the mode, explain why using concrete evidence from the context gathering step\n\nSet these keys in the next `continue_workflow` call's `context` object:\n- `taskComplexity`\n- `riskLevel`\n- `rigorMode`\n- `maxParallelism`\n- `retriageChanged` (true/false)",
|
|
76
89
|
"requireConfirmation": {
|
|
77
90
|
"or": [
|
|
78
|
-
{
|
|
79
|
-
|
|
91
|
+
{
|
|
92
|
+
"var": "retriageChanged",
|
|
93
|
+
"equals": true
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"var": "automationLevel",
|
|
97
|
+
"equals": "Low"
|
|
98
|
+
}
|
|
80
99
|
]
|
|
81
100
|
}
|
|
82
101
|
},
|
|
83
102
|
{
|
|
84
103
|
"id": "phase-2-architecture-decision",
|
|
85
|
-
"title": "Phase 2: Architecture Decision (Generate
|
|
104
|
+
"title": "Phase 2: Architecture Decision (Generate \u2022 Compare \u2022 Challenge \u2022 Select)",
|
|
86
105
|
"runCondition": {
|
|
87
106
|
"var": "taskComplexity",
|
|
88
107
|
"not_equals": "Small"
|
|
89
108
|
},
|
|
90
|
-
"prompt": "Make the architecture decision in one coherent phase instead of serializing every thinking mode into a separate step.\n\nPart A
|
|
109
|
+
"prompt": "Make the architecture decision in one coherent phase instead of serializing every thinking mode into a separate step.\n\nPart A \u2014 Prepare a neutral fact packet:\n- problem statement\n- acceptance criteria\n- non-goals\n- invariants\n- constraints\n- `userRules`\n- relevant files / pattern examples\n- current risks and unknowns\n\nPart B \u2014 Generate candidate plans:\n- QUICK: self-generate at least 3 genuinely different approaches\n- STANDARD: if delegation is available, spawn TWO or THREE WorkRail Executors SIMULTANEOUSLY running `routine-plan-generation` with different perspectives (for example simplicity, maintainability, pragmatic)\n- THOROUGH: if delegation is available, spawn THREE or FOUR WorkRail Executors SIMULTANEOUSLY running `routine-plan-generation` with different perspectives (for example simplicity, maintainability, architecture-first, rollback-safe)\n\nPart C \u2014 Diversity gate before commitment:\n- assign each candidate plan a short `candidatePlanFamily` label\n- check whether the candidates are materially different in shape, not just wording\n- if all candidates cluster on the same pattern family, generate at least one more plan from a deliberately different perspective before selecting\n- set `candidateDiversityAdequate = true|false`\n\nPart D \u2014 Compare candidate plans:\n- invariant fit\n- philosophy alignment (`userRules` as active lens)\n- risk profile\n- implementation shape\n- likely reviewability / PR shape\n\nPart E \u2014 Challenge the best one or two:\n- STANDARD: optionally challenge the leading candidate with ONE WorkRail Executor running `routine-hypothesis-challenge`\n- THOROUGH: challenge the top 1-2 candidate plans using ONE or TWO WorkRail Executors running `routine-hypothesis-challenge`\n\nPart F \u2014 Decide:\nSet these keys in the next `continue_workflow` call's `context` object:\n- `approaches`\n- `alternativesConsideredCount`\n- `candidatePlanFamilies`\n- `candidateDiversityAdequate`\n- `hasRunnerUp`\n- `selectedApproach`\n- `runnerUpApproach`\n- `architectureRationale`\n- `keyRiskToMonitor`\n- `pivotTriggers`\n- `architectureConfidenceBand`\n\nRules:\n- the main agent owns the final decision\n- subagents generate candidate plans; they do not decide the winner\n- if the challenged leading candidate no longer looks best, switch deliberately rather than defending sunk cost",
|
|
91
110
|
"requireConfirmation": {
|
|
92
111
|
"or": [
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
112
|
+
{
|
|
113
|
+
"var": "automationLevel",
|
|
114
|
+
"equals": "Low"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"var": "taskComplexity",
|
|
118
|
+
"equals": "Large"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"var": "riskLevel",
|
|
122
|
+
"equals": "High"
|
|
123
|
+
}
|
|
96
124
|
]
|
|
97
125
|
}
|
|
98
126
|
},
|
|
@@ -103,13 +131,13 @@
|
|
|
103
131
|
"var": "taskComplexity",
|
|
104
132
|
"not_equals": "Small"
|
|
105
133
|
},
|
|
106
|
-
"prompt": "Create or update the human-facing implementation artifact: `implementation_plan.md`.\n\nThis phase combines slicing, plan drafting, philosophy alignment, and test design.\n\nThe plan must include:\n1. Problem statement\n2. Acceptance criteria\n3. Non-goals\n4. Applied `userRules` and philosophy-driven constraints\n5. Invariants\n6. Selected approach + rationale + runner-up\n7. Vertical slices\n8. Work packages only when they improve execution or enable safe parallelism\n9. Test design\n10. Risk register\n11. PR packaging strategy\n12. Philosophy alignment per slice:\n - [principle]
|
|
134
|
+
"prompt": "Create or update the human-facing implementation artifact: `implementation_plan.md`.\n\nThis phase combines slicing, plan drafting, philosophy alignment, and test design.\n\nThe plan must include:\n1. Problem statement\n2. Acceptance criteria\n3. Non-goals\n4. Applied `userRules` and philosophy-driven constraints\n5. Invariants\n6. Selected approach + rationale + runner-up\n7. Vertical slices\n8. Work packages only when they improve execution or enable safe parallelism\n9. Test design\n10. Risk register\n11. PR packaging strategy\n12. Philosophy alignment per slice:\n - [principle] \u2192 [satisfied / tension / violated + 1-line why]\n\nSet these keys in the next `continue_workflow` call's `context` object:\n- `implementationPlan`\n- `slices`\n- `testDesign`\n- `estimatedPRCount`\n- `followUpTickets` (initialize if needed)\n- `unresolvedUnknownCount`\n- `planConfidenceBand`\n\nRules:\n- keep `implementation_plan.md` concrete enough for another engineer to implement without guessing\n- use work packages only when they create real clarity; do not over-fragment work\n- use the user's coding philosophy as the primary planning lens, and name tensions explicitly\n- set `unresolvedUnknownCount` to the number of still-open issues that would materially affect implementation quality\n- set `planConfidenceBand` to Low / Medium / High based on how ready the plan actually is",
|
|
107
135
|
"requireConfirmation": false
|
|
108
136
|
},
|
|
109
137
|
{
|
|
110
138
|
"id": "phase-4-plan-iterations",
|
|
111
139
|
"type": "loop",
|
|
112
|
-
"title": "Phase 4: Plan Audit Loop (Audit
|
|
140
|
+
"title": "Phase 4: Plan Audit Loop (Audit \u2192 Refocus \u2192 Decide)",
|
|
113
141
|
"runCondition": {
|
|
114
142
|
"var": "taskComplexity",
|
|
115
143
|
"not_equals": "Small"
|
|
@@ -139,7 +167,7 @@
|
|
|
139
167
|
{
|
|
140
168
|
"id": "phase-4c-loop-decision",
|
|
141
169
|
"title": "Loop Exit Decision",
|
|
142
|
-
"prompt": "Provide a loop control artifact.\n\nDecision rules:\n- if `planFindings` is non-empty
|
|
170
|
+
"prompt": "Provide a loop control artifact.\n\nDecision rules:\n- if `planFindings` is non-empty \u2192 continue\n- if `planFindings` is empty \u2192 stop, but enumerate what was checked to justify the clean pass\n- if max iterations reached \u2192 stop and document remaining concerns\n\nOutput exactly:\n```json\n{\n \"artifacts\": [{\n \"kind\": \"wr.loop_control\",\n \"decision\": \"continue\"\n }]\n}\n```",
|
|
143
171
|
"requireConfirmation": true,
|
|
144
172
|
"outputContract": {
|
|
145
173
|
"contractRef": "wr.contracts.loop_control"
|
|
@@ -157,9 +185,18 @@
|
|
|
157
185
|
"prompt": "Verify that planning is complete enough to start implementation.\n\nRequired checks:\n- selected approach and rationale exist\n- runner-up exists\n- pivot triggers are concrete enough to act on\n- slices are defined with scope, verification, and boundaries\n- `implementation_plan.md` reflects the current intended work\n- no unresolved planning gaps remain that would block implementation\n- `alternativesConsideredCount` shows real exploration happened\n\nSet these keys in the next `continue_workflow` call's `context` object:\n- `planningGaps`\n- `planningComplete`\n\nRule:\n- if any gap can be fixed immediately, fix it now and do not carry it forward as a gap\n- only stop for user input when a true decision is missing",
|
|
158
186
|
"requireConfirmation": {
|
|
159
187
|
"or": [
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
|
|
188
|
+
{
|
|
189
|
+
"var": "automationLevel",
|
|
190
|
+
"equals": "Low"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"var": "taskComplexity",
|
|
194
|
+
"equals": "Large"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"var": "riskLevel",
|
|
198
|
+
"equals": "High"
|
|
199
|
+
}
|
|
163
200
|
]
|
|
164
201
|
}
|
|
165
202
|
},
|
|
@@ -195,9 +232,18 @@
|
|
|
195
232
|
"prompt": "Before implementing slice `{{currentSlice.name}}`, verify:\n- pivot triggers have not fired\n- the plan assumptions are still fresh enough\n- target files and symbols still match the plan\n- the slice remains reviewable and bounded\n\nSet these keys in the next `continue_workflow` call's `context` object:\n- `pivotTriggered`\n- `pivotSeverity`\n- `pivotReturnPhase`\n- `slicePlanStale`\n- `validationFailed`\n\nIf drift or invalid assumptions are discovered, stop and return to planning deliberately rather than coding through it.",
|
|
196
233
|
"requireConfirmation": {
|
|
197
234
|
"or": [
|
|
198
|
-
{
|
|
199
|
-
|
|
200
|
-
|
|
235
|
+
{
|
|
236
|
+
"var": "pivotTriggered",
|
|
237
|
+
"equals": true
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"var": "slicePlanStale",
|
|
241
|
+
"equals": true
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"var": "validationFailed",
|
|
245
|
+
"equals": true
|
|
246
|
+
}
|
|
201
247
|
]
|
|
202
248
|
}
|
|
203
249
|
},
|
|
@@ -213,8 +259,14 @@
|
|
|
213
259
|
"prompt": "Verify slice `{{currentSlice.name}}`.\n\nAlways:\n- run planned verification commands\n- update or add tests when needed\n- ensure invariants still hold\n- check philosophy-alignment regressions introduced by the implementation\n\nFresh-eye validation triggers:\n- if `specialCaseIntroduced = true`\n- if `unplannedAbstractionIntroduced = true`\n- if this slice touched unexpected files\n- if runtime behavior still feels uncertain\n\nMode-adaptive validation:\n- QUICK: self-verify unless a fresh-eye trigger fires\n- STANDARD: if delegation is available and any fresh-eye trigger fires, spawn TWO or THREE WorkRail Executors SIMULTANEOUSLY running `routine-hypothesis-challenge`, `routine-execution-simulation`, and optionally `routine-philosophy-alignment`\n- THOROUGH + high-risk or any fresh-eye trigger: if delegation is available, spawn FOUR WorkRail Executors SIMULTANEOUSLY running `routine-hypothesis-challenge`, `routine-execution-simulation`, `routine-plan-analysis`, and `routine-philosophy-alignment`\n\nParallel-output synthesis rules:\n- if 2+ validators independently raise the same serious concern, treat it as blocking by default\n- if exactly one validator raises a concern, attempt to understand and resolve it before escalating\n- if validators disagree, record the disagreement explicitly and prefer the safer path when uncertainty remains high\n\nSet these keys in the next `continue_workflow` call's `context` object:\n- `sliceVerified`\n- `verificationFindings`\n- `verificationFailed`\n- `verificationApprovalRequired`\n- `verificationRetried`\n- `verificationConcernCount`\n- `verificationConsensusLevel`\n\nRule:\n- if 2+ independent validators raise serious concerns, stop and return to planning or ask the user which path to take",
|
|
214
260
|
"requireConfirmation": {
|
|
215
261
|
"or": [
|
|
216
|
-
{
|
|
217
|
-
|
|
262
|
+
{
|
|
263
|
+
"var": "verificationApprovalRequired",
|
|
264
|
+
"equals": true
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"var": "verificationFailed",
|
|
268
|
+
"equals": true
|
|
269
|
+
}
|
|
218
270
|
]
|
|
219
271
|
}
|
|
220
272
|
},
|
|
@@ -224,9 +276,18 @@
|
|
|
224
276
|
"prompt": "After a verified slice:\n- compare actual changed scope against the slice plan\n- if the slice drifted, update `implementation_plan.md` immediately and record the reason in notes\n- if `prStrategy = MultiPR`, stop here with a concise PR package for user review before continuing\n\nSet these keys in the next `continue_workflow` call's `context` object:\n- `planDrift`\n- `rulesDrift`\n- `changedFilesOutsidePlannedScope`\n- `scopeDriftDetected`\n\nRule:\n- do not rely on markdown sidecar state; notesMarkdown is the durable recap and `implementation_plan.md` is the human artifact",
|
|
225
277
|
"requireConfirmation": {
|
|
226
278
|
"or": [
|
|
227
|
-
{
|
|
228
|
-
|
|
229
|
-
|
|
279
|
+
{
|
|
280
|
+
"var": "prStrategy",
|
|
281
|
+
"equals": "MultiPR"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"var": "planDrift",
|
|
285
|
+
"equals": true
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"var": "rulesDrift",
|
|
289
|
+
"equals": true
|
|
290
|
+
}
|
|
230
291
|
]
|
|
231
292
|
}
|
|
232
293
|
}
|
|
@@ -242,8 +303,14 @@
|
|
|
242
303
|
"prompt": "Perform final integration verification.\n\nRequired:\n- verify acceptance criteria\n- map invariants to concrete proof (tests, build results, explicit reasoning)\n- run whole-task validation commands\n- identify any invariant violations or regressions\n- confirm the implemented result still aligns with the user's coding philosophy, naming any tensions explicitly\n- review cumulative drift across all slices, not just the current one\n- check whether repeated small compromises added up to a larger pattern problem\n\nSet these keys in the next `continue_workflow` call's `context` object:\n- `integrationVerificationPassed`\n- `integrationVerificationFailed`\n- `integrationVerificationFindings`\n- `regressionDetected`\n- `invariantViolations`\n- `crossSliceDriftDetected`",
|
|
243
304
|
"requireConfirmation": {
|
|
244
305
|
"or": [
|
|
245
|
-
{
|
|
246
|
-
|
|
306
|
+
{
|
|
307
|
+
"var": "integrationVerificationFailed",
|
|
308
|
+
"equals": true
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"var": "regressionDetected",
|
|
312
|
+
"equals": true
|
|
313
|
+
}
|
|
247
314
|
]
|
|
248
315
|
}
|
|
249
316
|
},
|
|
@@ -254,4 +321,4 @@
|
|
|
254
321
|
"requireConfirmation": true
|
|
255
322
|
}
|
|
256
323
|
]
|
|
257
|
-
}
|
|
324
|
+
}
|