@exaudeus/workrail 3.13.0 → 3.15.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/console/assets/index-BZYIjrzJ.js +28 -0
- package/dist/console/assets/index-OLCKbDdm.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/manifest.json +63 -63
- 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/index.js +1 -1
- package/dist/mcp/handlers/v2-advance-core/outcome-blocked.js +1 -1
- package/dist/mcp/handlers/v2-execution/start.d.ts +1 -0
- package/dist/mcp/handlers/v2-execution/start.js +20 -1
- package/dist/mcp/handlers/v2-workflow.d.ts +23 -0
- package/dist/mcp/handlers/v2-workflow.js +177 -10
- package/dist/mcp/output-schemas.d.ts +202 -8
- package/dist/mcp/output-schemas.js +38 -11
- package/dist/mcp/server.js +48 -1
- package/dist/mcp/tool-descriptions.js +17 -9
- package/dist/mcp/v2/tools.d.ts +6 -0
- package/dist/mcp/v2/tools.js +2 -0
- package/dist/mcp/workflow-protocol-contracts.js +5 -1
- package/dist/types/workflow-definition.d.ts +2 -2
- package/dist/v2/infra/local/workspace-anchor/index.js +4 -1
- package/dist/v2/usecases/console-routes.js +49 -1
- package/dist/v2/usecases/console-service.d.ts +1 -0
- package/dist/v2/usecases/console-service.js +4 -1
- package/dist/v2/usecases/console-types.d.ts +12 -0
- package/dist/v2/usecases/worktree-service.js +55 -7
- package/package.json +3 -2
- package/spec/authoring-spec.json +91 -3
- package/spec/workflow-tags.json +132 -0
- package/spec/workflow.schema.json +411 -97
- package/workflows/adaptive-ticket-creation.json +40 -22
- package/workflows/architecture-scalability-audit.json +65 -31
- package/workflows/bug-investigation.agentic.v2.json +36 -14
- package/workflows/coding-task-workflow-agentic.json +50 -38
- package/workflows/coding-task-workflow-agentic.lean.v2.json +124 -37
- package/workflows/coding-task-workflow-agentic.v2.json +90 -30
- package/workflows/cross-platform-code-conversion.v2.json +168 -48
- package/workflows/document-creation-workflow.json +47 -17
- package/workflows/documentation-update-workflow.json +8 -8
- package/workflows/intelligent-test-case-generation.json +2 -2
- package/workflows/learner-centered-course-workflow.json +267 -267
- package/workflows/mr-review-workflow.agentic.v2.json +81 -14
- package/workflows/personal-learning-materials-creation-branched.json +175 -175
- package/workflows/presentation-creation.json +159 -159
- package/workflows/production-readiness-audit.json +54 -15
- package/workflows/relocation-workflow-us.json +44 -35
- package/workflows/routines/tension-driven-design.json +1 -1
- package/workflows/scoped-documentation-workflow.json +25 -25
- package/workflows/test-artifact-loop-control.json +1 -2
- package/workflows/ui-ux-design-workflow.json +327 -0
- package/workflows/workflow-diagnose-environment.json +1 -1
- package/workflows/workflow-for-workflows.json +507 -484
- package/workflows/workflow-for-workflows.v2.json +90 -18
- package/workflows/wr.discovery.json +112 -30
- package/dist/console/assets/index-DW78t31j.css +0 -1
- package/dist/console/assets/index-EsSXrC_a.js +0 -28
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "coding-task-workflow-agentic",
|
|
3
|
-
"name": "Agentic Task Dev Workflow (Lean
|
|
3
|
+
"name": "Agentic Task Dev Workflow (Lean \u2022 Notes-First \u2022 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
6
|
"recommendedPreferences": {
|
|
7
7
|
"recommendedAutonomy": "guided",
|
|
8
8
|
"recommendedRiskPolicy": "conservative"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"SUBAGENT SYNTHESIS: treat subagent output as evidence, not conclusions. State your hypothesis before delegating, then interrogate what came back: what was missed, wrong, or new? Say what changed your mind or what you still reject, and why.",
|
|
22
22
|
"PARALLELISM: when reads, audits, or delegations are independent, run them in parallel inside the phase. Parallelize cognition; serialize synthesis and canonical writes.",
|
|
23
23
|
"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
|
-
"VALIDATION: prefer static/compile-time safety over runtime checks. Use build, type-checking, and tests as the primary proof of correctness
|
|
24
|
+
"VALIDATION: prefer static/compile-time safety over runtime checks. Use build, type-checking, and tests as the primary proof of correctness \u2014 in that order of reliability.",
|
|
25
25
|
"DRIFT HANDLING: when reality diverges from the plan, update the plan artifact and re-audit deliberately rather than accumulating undocumented drift.",
|
|
26
26
|
"NEVER COMMIT MARKDOWN FILES UNLESS USER EXPLICITLY ASKS."
|
|
27
27
|
],
|
|
@@ -58,8 +58,14 @@
|
|
|
58
58
|
"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
59
|
"requireConfirmation": {
|
|
60
60
|
"or": [
|
|
61
|
-
{
|
|
62
|
-
|
|
61
|
+
{
|
|
62
|
+
"var": "taskComplexity",
|
|
63
|
+
"equals": "Large"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"var": "riskLevel",
|
|
67
|
+
"equals": "High"
|
|
68
|
+
}
|
|
63
69
|
]
|
|
64
70
|
}
|
|
65
71
|
},
|
|
@@ -68,8 +74,14 @@
|
|
|
68
74
|
"title": "Phase 1a: State Hypothesis",
|
|
69
75
|
"runCondition": {
|
|
70
76
|
"and": [
|
|
71
|
-
{
|
|
72
|
-
|
|
77
|
+
{
|
|
78
|
+
"var": "taskComplexity",
|
|
79
|
+
"not_equals": "Small"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"var": "rigorMode",
|
|
83
|
+
"not_equals": "QUICK"
|
|
84
|
+
}
|
|
73
85
|
]
|
|
74
86
|
},
|
|
75
87
|
"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 +92,14 @@
|
|
|
80
92
|
"title": "Phase 1b: Lightweight Design (QUICK)",
|
|
81
93
|
"runCondition": {
|
|
82
94
|
"and": [
|
|
83
|
-
{
|
|
84
|
-
|
|
95
|
+
{
|
|
96
|
+
"var": "taskComplexity",
|
|
97
|
+
"not_equals": "Small"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"var": "rigorMode",
|
|
101
|
+
"equals": "QUICK"
|
|
102
|
+
}
|
|
85
103
|
]
|
|
86
104
|
},
|
|
87
105
|
"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)",
|
|
@@ -89,11 +107,17 @@
|
|
|
89
107
|
},
|
|
90
108
|
{
|
|
91
109
|
"id": "phase-1b-design-deep",
|
|
92
|
-
"title": "Phase 1b: Design Generation (Injected Routine
|
|
110
|
+
"title": "Phase 1b: Design Generation (Injected Routine \u2014 Tension-Driven Design)",
|
|
93
111
|
"runCondition": {
|
|
94
112
|
"and": [
|
|
95
|
-
{
|
|
96
|
-
|
|
113
|
+
{
|
|
114
|
+
"var": "taskComplexity",
|
|
115
|
+
"not_equals": "Small"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"var": "rigorMode",
|
|
119
|
+
"not_equals": "QUICK"
|
|
120
|
+
}
|
|
97
121
|
]
|
|
98
122
|
},
|
|
99
123
|
"templateCall": {
|
|
@@ -110,24 +134,42 @@
|
|
|
110
134
|
"var": "taskComplexity",
|
|
111
135
|
"not_equals": "Small"
|
|
112
136
|
},
|
|
113
|
-
"prompt": "Read `design-candidates.md`, compare it to your original guess, and make the call.\n\nBe explicit about three things:\n- what the design work confirmed\n- what changed your mind\n- what you missed the first time\n\nThen pressure-test the leading option:\n- what's the strongest case against it?\n- what assumption breaks it?\n\nAfter the challenge batch, say:\n- what changed your mind\n- what didn't\n- which findings you reject and why\n\nPick the approach yourself. Don't hide behind the artifact. If the simplest thing works, prefer it. If the front-runner stops looking right after challenge, switch.\n\nCapture:\n- `selectedApproach`
|
|
137
|
+
"prompt": "Read `design-candidates.md`, compare it to your original guess, and make the call.\n\nBe explicit about three things:\n- what the design work confirmed\n- what changed your mind\n- what you missed the first time\n\nThen pressure-test the leading option:\n- what's the strongest case against it?\n- what assumption breaks it?\n\nAfter the challenge batch, say:\n- what changed your mind\n- what didn't\n- which findings you reject and why\n\nPick the approach yourself. Don't hide behind the artifact. If the simplest thing works, prefer it. If the front-runner stops looking right after challenge, switch.\n\nCapture:\n- `selectedApproach` \u2014 chosen design with rationale tied to tensions\n- `runnerUpApproach` \u2014 next-best option and why it lost\n- `architectureRationale` \u2014 tensions resolved vs accepted\n- `pivotTriggers` \u2014 conditions under which you'd switch to the runner-up\n- `keyRiskToMonitor` \u2014 failure mode of the selected approach\n- `acceptedTradeoffs`\n- `identifiedFailureModes`",
|
|
114
138
|
"promptFragments": [
|
|
115
139
|
{
|
|
116
140
|
"id": "phase-1c-challenge-standard",
|
|
117
|
-
"when": {
|
|
118
|
-
|
|
141
|
+
"when": {
|
|
142
|
+
"var": "rigorMode",
|
|
143
|
+
"in": [
|
|
144
|
+
"STANDARD",
|
|
145
|
+
"THOROUGH"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"text": "Run `routine-hypothesis-challenge` on the leading option's failure modes before you decide."
|
|
119
149
|
},
|
|
120
150
|
{
|
|
121
151
|
"id": "phase-1c-challenge-thorough",
|
|
122
|
-
"when": {
|
|
123
|
-
|
|
152
|
+
"when": {
|
|
153
|
+
"var": "rigorMode",
|
|
154
|
+
"equals": "THOROUGH"
|
|
155
|
+
},
|
|
156
|
+
"text": "Also run `routine-execution-simulation` on the three most likely failure paths before you decide."
|
|
124
157
|
}
|
|
125
158
|
],
|
|
126
159
|
"requireConfirmation": {
|
|
127
160
|
"or": [
|
|
128
|
-
{
|
|
129
|
-
|
|
130
|
-
|
|
161
|
+
{
|
|
162
|
+
"var": "automationLevel",
|
|
163
|
+
"equals": "Low"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"var": "taskComplexity",
|
|
167
|
+
"equals": "Large"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"var": "riskLevel",
|
|
171
|
+
"equals": "High"
|
|
172
|
+
}
|
|
131
173
|
]
|
|
132
174
|
}
|
|
133
175
|
},
|
|
@@ -173,7 +215,10 @@
|
|
|
173
215
|
"promptFragments": [
|
|
174
216
|
{
|
|
175
217
|
"id": "phase-2c-challenge-thorough",
|
|
176
|
-
"when": {
|
|
218
|
+
"when": {
|
|
219
|
+
"var": "rigorMode",
|
|
220
|
+
"equals": "THOROUGH"
|
|
221
|
+
},
|
|
177
222
|
"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
223
|
}
|
|
179
224
|
],
|
|
@@ -197,7 +242,7 @@
|
|
|
197
242
|
"var": "taskComplexity",
|
|
198
243
|
"not_equals": "Small"
|
|
199
244
|
},
|
|
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`
|
|
245
|
+
"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` \u2014 count of open issues that would materially affect implementation quality\n- `planConfidenceBand` \u2014 Low / Medium / High",
|
|
201
246
|
"requireConfirmation": false
|
|
202
247
|
},
|
|
203
248
|
{
|
|
@@ -205,11 +250,20 @@
|
|
|
205
250
|
"title": "Phase 3b: Spec (Observable Behavior)",
|
|
206
251
|
"runCondition": {
|
|
207
252
|
"and": [
|
|
208
|
-
{
|
|
253
|
+
{
|
|
254
|
+
"var": "taskComplexity",
|
|
255
|
+
"not_equals": "Small"
|
|
256
|
+
},
|
|
209
257
|
{
|
|
210
258
|
"or": [
|
|
211
|
-
{
|
|
212
|
-
|
|
259
|
+
{
|
|
260
|
+
"var": "taskComplexity",
|
|
261
|
+
"equals": "Large"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"var": "riskLevel",
|
|
265
|
+
"equals": "High"
|
|
266
|
+
}
|
|
213
267
|
]
|
|
214
268
|
}
|
|
215
269
|
]
|
|
@@ -223,8 +277,14 @@
|
|
|
223
277
|
"title": "Phase 4: Plan Audit (Review, Fix, Decide)",
|
|
224
278
|
"runCondition": {
|
|
225
279
|
"and": [
|
|
226
|
-
{
|
|
227
|
-
|
|
280
|
+
{
|
|
281
|
+
"var": "taskComplexity",
|
|
282
|
+
"not_equals": "Small"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"var": "rigorMode",
|
|
286
|
+
"not_equals": "QUICK"
|
|
287
|
+
}
|
|
228
288
|
]
|
|
229
289
|
},
|
|
230
290
|
"loop": {
|
|
@@ -244,17 +304,26 @@
|
|
|
244
304
|
"promptFragments": [
|
|
245
305
|
{
|
|
246
306
|
"id": "phase-4a-delegation-quick",
|
|
247
|
-
"when": {
|
|
307
|
+
"when": {
|
|
308
|
+
"var": "rigorMode",
|
|
309
|
+
"equals": "QUICK"
|
|
310
|
+
},
|
|
248
311
|
"text": "Do this yourself."
|
|
249
312
|
},
|
|
250
313
|
{
|
|
251
314
|
"id": "phase-4a-delegation-standard",
|
|
252
|
-
"when": {
|
|
315
|
+
"when": {
|
|
316
|
+
"var": "rigorMode",
|
|
317
|
+
"equals": "STANDARD"
|
|
318
|
+
},
|
|
253
319
|
"text": "Run `routine-plan-analysis`, `routine-hypothesis-challenge`, and `routine-philosophy-alignment` in parallel before you decide whether the plan is good enough."
|
|
254
320
|
},
|
|
255
321
|
{
|
|
256
322
|
"id": "phase-4a-delegation-thorough",
|
|
257
|
-
"when": {
|
|
323
|
+
"when": {
|
|
324
|
+
"var": "rigorMode",
|
|
325
|
+
"equals": "THOROUGH"
|
|
326
|
+
},
|
|
258
327
|
"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
328
|
}
|
|
260
329
|
],
|
|
@@ -263,7 +332,7 @@
|
|
|
263
332
|
{
|
|
264
333
|
"id": "phase-4b-loop-decision",
|
|
265
334
|
"title": "Loop Exit Decision",
|
|
266
|
-
"prompt": "Decide whether the plan needs another pass.\n\nIf `planFindings` is non-empty, keep going.\nIf it's empty, stop
|
|
335
|
+
"prompt": "Decide whether the plan needs another pass.\n\nIf `planFindings` is non-empty, keep going.\nIf it's empty, stop \u2014 but say what you checked so the clean pass means something.\nIf you've hit the limit, stop and record what still bothers you.\n\nThen emit the required loop-control artifact in this shape (`decision` must be `continue` or `stop`):\n```json\n{\n \"artifacts\": [{\n \"kind\": \"wr.loop_control\",\n \"decision\": \"continue\"\n }]\n}\n```",
|
|
267
336
|
"requireConfirmation": true,
|
|
268
337
|
"outputContract": {
|
|
269
338
|
"contractRef": "wr.contracts.loop_control"
|
|
@@ -314,29 +383,47 @@
|
|
|
314
383
|
"promptFragments": [
|
|
315
384
|
{
|
|
316
385
|
"id": "phase-6b-delegation-quick",
|
|
317
|
-
"when": {
|
|
386
|
+
"when": {
|
|
387
|
+
"var": "rigorMode",
|
|
388
|
+
"equals": "QUICK"
|
|
389
|
+
},
|
|
318
390
|
"text": "Do the verification yourself."
|
|
319
391
|
},
|
|
320
392
|
{
|
|
321
393
|
"id": "phase-6b-delegation-standard",
|
|
322
|
-
"when": {
|
|
394
|
+
"when": {
|
|
395
|
+
"var": "rigorMode",
|
|
396
|
+
"equals": "STANDARD"
|
|
397
|
+
},
|
|
323
398
|
"text": "If any slice-risk trigger fired, run `routine-hypothesis-challenge` and `routine-philosophy-alignment` before you decide this slice is done."
|
|
324
399
|
},
|
|
325
400
|
{
|
|
326
401
|
"id": "phase-6b-delegation-thorough",
|
|
327
|
-
"when": {
|
|
402
|
+
"when": {
|
|
403
|
+
"var": "rigorMode",
|
|
404
|
+
"equals": "THOROUGH"
|
|
405
|
+
},
|
|
328
406
|
"text": "If any slice-risk trigger fired, also run `routine-execution-simulation` before you decide this slice is done."
|
|
329
407
|
},
|
|
330
408
|
{
|
|
331
409
|
"id": "phase-6b-multi-pr",
|
|
332
|
-
"when": {
|
|
410
|
+
"when": {
|
|
411
|
+
"var": "prStrategy",
|
|
412
|
+
"equals": "MultiPR"
|
|
413
|
+
},
|
|
333
414
|
"text": "If this slice is verified and ready, stop here and package it for review before you move to the next slice."
|
|
334
415
|
}
|
|
335
416
|
],
|
|
336
417
|
"requireConfirmation": {
|
|
337
418
|
"or": [
|
|
338
|
-
{
|
|
339
|
-
|
|
419
|
+
{
|
|
420
|
+
"var": "verificationFailed",
|
|
421
|
+
"equals": true
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"var": "prStrategy",
|
|
425
|
+
"equals": "MultiPR"
|
|
426
|
+
}
|
|
340
427
|
]
|
|
341
428
|
}
|
|
342
429
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
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
6
|
"recommendedPreferences": {
|
|
7
7
|
"recommendedAutonomy": "guided",
|
|
8
8
|
"recommendedRiskPolicy": "conservative"
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"steps": [
|
|
41
41
|
{
|
|
42
42
|
"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.",
|
|
43
|
+
"title": "Phase 0: Triage (Complexity \u2022 Risk \u2022 PR Strategy)",
|
|
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.\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
45
|
"requireConfirmation": true
|
|
46
46
|
},
|
|
47
47
|
{
|
|
@@ -50,8 +50,14 @@
|
|
|
50
50
|
"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
51
|
"requireConfirmation": {
|
|
52
52
|
"or": [
|
|
53
|
-
{
|
|
54
|
-
|
|
53
|
+
{
|
|
54
|
+
"var": "automationLevel",
|
|
55
|
+
"equals": "Low"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"var": "automationLevel",
|
|
59
|
+
"equals": "Medium"
|
|
60
|
+
}
|
|
55
61
|
]
|
|
56
62
|
}
|
|
57
63
|
},
|
|
@@ -75,24 +81,39 @@
|
|
|
75
81
|
"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
82
|
"requireConfirmation": {
|
|
77
83
|
"or": [
|
|
78
|
-
{
|
|
79
|
-
|
|
84
|
+
{
|
|
85
|
+
"var": "retriageChanged",
|
|
86
|
+
"equals": true
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"var": "automationLevel",
|
|
90
|
+
"equals": "Low"
|
|
91
|
+
}
|
|
80
92
|
]
|
|
81
93
|
}
|
|
82
94
|
},
|
|
83
95
|
{
|
|
84
96
|
"id": "phase-2-architecture-decision",
|
|
85
|
-
"title": "Phase 2: Architecture Decision (Generate
|
|
97
|
+
"title": "Phase 2: Architecture Decision (Generate \u2022 Compare \u2022 Challenge \u2022 Select)",
|
|
86
98
|
"runCondition": {
|
|
87
99
|
"var": "taskComplexity",
|
|
88
100
|
"not_equals": "Small"
|
|
89
101
|
},
|
|
90
|
-
"prompt": "Make the architecture decision in one coherent phase instead of serializing every thinking mode into a separate step.\n\nPart A
|
|
102
|
+
"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
103
|
"requireConfirmation": {
|
|
92
104
|
"or": [
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
105
|
+
{
|
|
106
|
+
"var": "automationLevel",
|
|
107
|
+
"equals": "Low"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"var": "taskComplexity",
|
|
111
|
+
"equals": "Large"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"var": "riskLevel",
|
|
115
|
+
"equals": "High"
|
|
116
|
+
}
|
|
96
117
|
]
|
|
97
118
|
}
|
|
98
119
|
},
|
|
@@ -103,13 +124,13 @@
|
|
|
103
124
|
"var": "taskComplexity",
|
|
104
125
|
"not_equals": "Small"
|
|
105
126
|
},
|
|
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]
|
|
127
|
+
"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
128
|
"requireConfirmation": false
|
|
108
129
|
},
|
|
109
130
|
{
|
|
110
131
|
"id": "phase-4-plan-iterations",
|
|
111
132
|
"type": "loop",
|
|
112
|
-
"title": "Phase 4: Plan Audit Loop (Audit
|
|
133
|
+
"title": "Phase 4: Plan Audit Loop (Audit \u2192 Refocus \u2192 Decide)",
|
|
113
134
|
"runCondition": {
|
|
114
135
|
"var": "taskComplexity",
|
|
115
136
|
"not_equals": "Small"
|
|
@@ -139,7 +160,7 @@
|
|
|
139
160
|
{
|
|
140
161
|
"id": "phase-4c-loop-decision",
|
|
141
162
|
"title": "Loop Exit Decision",
|
|
142
|
-
"prompt": "Provide a loop control artifact.\n\nDecision rules:\n- if `planFindings` is non-empty
|
|
163
|
+
"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
164
|
"requireConfirmation": true,
|
|
144
165
|
"outputContract": {
|
|
145
166
|
"contractRef": "wr.contracts.loop_control"
|
|
@@ -157,9 +178,18 @@
|
|
|
157
178
|
"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
179
|
"requireConfirmation": {
|
|
159
180
|
"or": [
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
|
|
181
|
+
{
|
|
182
|
+
"var": "automationLevel",
|
|
183
|
+
"equals": "Low"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"var": "taskComplexity",
|
|
187
|
+
"equals": "Large"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"var": "riskLevel",
|
|
191
|
+
"equals": "High"
|
|
192
|
+
}
|
|
163
193
|
]
|
|
164
194
|
}
|
|
165
195
|
},
|
|
@@ -195,9 +225,18 @@
|
|
|
195
225
|
"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
226
|
"requireConfirmation": {
|
|
197
227
|
"or": [
|
|
198
|
-
{
|
|
199
|
-
|
|
200
|
-
|
|
228
|
+
{
|
|
229
|
+
"var": "pivotTriggered",
|
|
230
|
+
"equals": true
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"var": "slicePlanStale",
|
|
234
|
+
"equals": true
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"var": "validationFailed",
|
|
238
|
+
"equals": true
|
|
239
|
+
}
|
|
201
240
|
]
|
|
202
241
|
}
|
|
203
242
|
},
|
|
@@ -213,8 +252,14 @@
|
|
|
213
252
|
"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
253
|
"requireConfirmation": {
|
|
215
254
|
"or": [
|
|
216
|
-
{
|
|
217
|
-
|
|
255
|
+
{
|
|
256
|
+
"var": "verificationApprovalRequired",
|
|
257
|
+
"equals": true
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"var": "verificationFailed",
|
|
261
|
+
"equals": true
|
|
262
|
+
}
|
|
218
263
|
]
|
|
219
264
|
}
|
|
220
265
|
},
|
|
@@ -224,9 +269,18 @@
|
|
|
224
269
|
"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
270
|
"requireConfirmation": {
|
|
226
271
|
"or": [
|
|
227
|
-
{
|
|
228
|
-
|
|
229
|
-
|
|
272
|
+
{
|
|
273
|
+
"var": "prStrategy",
|
|
274
|
+
"equals": "MultiPR"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"var": "planDrift",
|
|
278
|
+
"equals": true
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"var": "rulesDrift",
|
|
282
|
+
"equals": true
|
|
283
|
+
}
|
|
230
284
|
]
|
|
231
285
|
}
|
|
232
286
|
}
|
|
@@ -242,8 +296,14 @@
|
|
|
242
296
|
"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
297
|
"requireConfirmation": {
|
|
244
298
|
"or": [
|
|
245
|
-
{
|
|
246
|
-
|
|
299
|
+
{
|
|
300
|
+
"var": "integrationVerificationFailed",
|
|
301
|
+
"equals": true
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"var": "regressionDetected",
|
|
305
|
+
"equals": true
|
|
306
|
+
}
|
|
247
307
|
]
|
|
248
308
|
}
|
|
249
309
|
},
|
|
@@ -254,4 +314,4 @@
|
|
|
254
314
|
"requireConfirmation": true
|
|
255
315
|
}
|
|
256
316
|
]
|
|
257
|
-
}
|
|
317
|
+
}
|