@exaudeus/workrail 3.9.1 → 3.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,170 +0,0 @@
1
- {
2
- "id": "exploration-workflow",
3
- "name": "Exploration Workflow (Lean • Notes-First • WorkRail Executor)",
4
- "version": "2.0.0",
5
- "description": "Guides an agent through broad exploration work: understand the ask, gather enough context, generate materially different approaches, evaluate them, challenge the front-runner, and deliver a recommendation with bounded uncertainty.",
6
- "recommendedPreferences": {
7
- "recommendedAutonomy": "guided",
8
- "recommendedRiskPolicy": "conservative"
9
- },
10
- "preconditions": [
11
- "User has a question, problem, decision, or opportunity that requires exploration.",
12
- "Agent has access to the relevant tools for the domain being explored.",
13
- "A recommendation can be judged against explicit constraints, success criteria, or decision factors."
14
- ],
15
- "clarificationPrompts": [
16
- "What are you trying to decide, understand, or compare?",
17
- "What constraints, preferences, or decision criteria already matter?",
18
- "What would make this exploration useful when we're done?"
19
- ],
20
- "metaGuidance": [
21
- "DEFAULT BEHAVIOR: self-execute with tools. Only ask the user for missing external facts, permissions, or decision preferences you cannot resolve yourself.",
22
- "V2 DURABILITY: use output.notesMarkdown and explicit context variables as the durable exploration state. Do NOT rely on EXPLORATION_CONTEXT.md or any markdown checkpoint file as required memory.",
23
- "ARTIFACT STRATEGY: markdown artifacts are optional human-facing outputs only. If created, they must be derived from notes/context state rather than treated as the source of truth.",
24
- "MAIN AGENT OWNS EXPLORATION: the main agent owns synthesis, comparison, ranking, and the final recommendation.",
25
- "SUBAGENT MODEL: use the WorkRail Executor only. Delegate bounded cognition, not ownership.",
26
- "PARALLELISM: parallelize independent research or challenge passes; serialize synthesis, scoring, and final recommendation.",
27
- "DOMAIN FLEXIBILITY: adapt tools and vocabulary to the actual exploration domain. Technical explorations may inspect code and architecture. Business or creative explorations may lean more on external sources, user constraints, and comparative reasoning.",
28
- "ANTI-PREMATURE-CONVERGENCE: generate materially different approaches before committing. If all candidates cluster in the same pattern family, force at least one more contrasting approach.",
29
- "CHALLENGE BEFORE RECOMMENDATION: the leading approach must survive an explicit challenge pass. If it does not, revise the shortlist or recommendation deliberately.",
30
- "TRIGGERS: WorkRail can only react to explicit outputs. Use fields like `contextUnknownCount`, `retriageNeeded`, `alternativesConsideredCount`, `hasStrongAlternative`, `comparisonGapCount`, and `recommendationConfidenceBand`."
31
- ],
32
- "steps": [
33
- {
34
- "id": "phase-0-understand-and-classify",
35
- "title": "Phase 0: Understand and Classify",
36
- "prompt": "Understand the exploration before you start researching.\n\nCapture:\n- `explorationSummary`: concise statement of the question, decision, or problem\n- `explorationDomain`: `technical`, `business`, `creative`, or `mixed`\n- `taskComplexity`: Small / Medium / Large\n- `riskLevel`: Low / Medium / High\n- `rigorMode`: QUICK / STANDARD / THOROUGH\n- `automationLevel`: High / Medium / Low\n- `successCriteria`: what will make the exploration useful\n- `constraints`: hard constraints and strong preferences already known\n- `openQuestions`: only real questions you cannot answer with tools\n\nDecision guidance:\n- QUICK: narrow question, clear success criteria, low ambiguity, few viable approaches\n- STANDARD: moderate ambiguity, multiple viable approaches, or meaningful trade-offs\n- THOROUGH: broad option space, high ambiguity, high-stakes decision, or materially conflicting evidence likely\n\nIf critical inputs are missing, ask only for the minimum needed to explore well. Do not ask for information you can discover yourself.",
37
- "requireConfirmation": {
38
- "or": [
39
- { "var": "taskComplexity", "equals": "Large" },
40
- { "var": "riskLevel", "equals": "High" },
41
- { "var": "automationLevel", "equals": "Low" }
42
- ]
43
- }
44
- },
45
- {
46
- "id": "phase-1-context-and-research-posture",
47
- "title": "Phase 1: Context and Research Posture",
48
- "prompt": "Build the minimum complete context needed to compare approaches well.\n\nDo the main context gathering yourself using the tools that fit the domain.\n\nDeliverable:\n- key facts, constraints, and unknowns that materially affect the decision\n- relevant sources, files, systems, or examples\n- the evaluation criteria that should drive comparison\n- the initial option-space sketch\n\nSet context variables:\n- `contextSummary`\n- `candidateSources`\n- `candidateFiles`\n- `evaluationCriteria`\n- `contextUnknownCount`\n- `optionSpaceEstimate`\n- `retriageNeeded`\n\nComputation rules:\n- `contextUnknownCount` = number of unresolved unknowns that still materially affect recommendation quality\n- `optionSpaceEstimate` = rough count or range of materially distinct approach families currently in play\n- set `retriageNeeded = true` if the real ambiguity, risk, or breadth is larger than Phase 0 assumed",
49
- "promptFragments": [
50
- {
51
- "id": "phase-1-quick",
52
- "when": { "var": "rigorMode", "equals": "QUICK" },
53
- "text": "Keep this tight. Gather only what you need to compare a small number of plausible approaches."
54
- },
55
- {
56
- "id": "phase-1-standard",
57
- "when": { "var": "rigorMode", "equals": "STANDARD" },
58
- "text": "If `contextUnknownCount > 0` and delegation is available, run `routine-context-gathering` twice in parallel: once with `focus=COMPLETENESS` and once with `focus=DEPTH`. Synthesize both outputs before you leave this step."
59
- },
60
- {
61
- "id": "phase-1-thorough",
62
- "when": { "var": "rigorMode", "equals": "THOROUGH" },
63
- "text": "If delegation is available, run `routine-context-gathering` twice in parallel: once with `focus=COMPLETENESS` and once with `focus=DEPTH`. Synthesize both outputs before you leave this step."
64
- }
65
- ],
66
- "requireConfirmation": false
67
- },
68
- {
69
- "id": "phase-1b-retriage-after-context",
70
- "title": "Phase 1b: Re-Triage After Context",
71
- "runCondition": {
72
- "var": "retriageNeeded",
73
- "equals": true
74
- },
75
- "prompt": "Reassess the exploration now that the real context is known.\n\nReview:\n- `contextUnknownCount`\n- `optionSpaceEstimate`\n- the actual breadth of systems, sources, or decision factors involved\n- whether the decision now looks riskier or more ambiguous than expected\n\nDo:\n- confirm or adjust `taskComplexity`\n- confirm or adjust `riskLevel`\n- confirm or adjust `rigorMode`\n- set `retriageChanged`\n\nRule:\n- upgrade rigor if the real exploration surface is broader or riskier than expected\n- downgrade only if the task is genuinely simpler than it first appeared",
76
- "requireConfirmation": {
77
- "or": [
78
- { "var": "retriageChanged", "equals": true },
79
- { "var": "automationLevel", "equals": "Low" }
80
- ]
81
- }
82
- },
83
- {
84
- "id": "phase-2-generate-and-shortlist-approaches",
85
- "title": "Phase 2: Generate and Shortlist Approaches",
86
- "prompt": "Generate materially different approaches before you decide what deserves deeper comparison.\n\nDo:\n- generate candidate approaches that differ in shape, not just wording\n- include the obvious / mainstream path\n- include a more conservative or lower-risk path when relevant\n- include a more ambitious, higher-upside, or non-obvious path when relevant\n- merge duplicates and label approach families\n- identify whether a strong alternative still exists after ranking the shortlist\n\nSet context variables:\n- `candidateApproaches`\n- `approachFamilies`\n- `alternativesConsideredCount`\n- `hasStrongAlternative`\n- `currentLeadingApproach`\n\nComputation rules:\n- `alternativesConsideredCount` = number of materially distinct viable approaches after merging duplicates\n- `hasStrongAlternative = true` when a non-leading approach still looks competitive on the current evidence\n\nRules:\n- QUICK: self-generate at least 3 materially different approaches\n- STANDARD: self-generate at least 3, and if the option space still clusters too tightly, run `routine-ideation` once to force contrast\n- THOROUGH: if delegation is available, run 2 or 3 bounded ideation passes from different lenses, then synthesize the shortlist yourself\n- if every candidate lands in the same pattern family, this phase is not done yet",
87
- "requireConfirmation": false
88
- },
89
- {
90
- "id": "phase-3-evaluate-and-rank",
91
- "type": "loop",
92
- "title": "Phase 3: Evaluate, Challenge, and Refine",
93
- "runCondition": {
94
- "var": "taskComplexity",
95
- "not_equals": "Small"
96
- },
97
- "loop": {
98
- "type": "while",
99
- "conditionSource": {
100
- "kind": "artifact_contract",
101
- "contractRef": "wr.contracts.loop_control",
102
- "loopId": "exploration_review_loop"
103
- },
104
- "maxIterations": 2
105
- },
106
- "body": [
107
- {
108
- "id": "phase-3a-compare-approaches",
109
- "title": "Compare Approaches",
110
- "prompt": "Compare the shortlisted approaches against the criteria that actually matter.\n\nDo:\n- score or rank the shortlisted approaches against `evaluationCriteria`\n- make the trade-offs explicit instead of hiding them inside a summary\n- identify missing comparison evidence or unresolved assumptions\n- choose a leading approach and runner-up for the challenge step\n\nSet context variables:\n- `selectedApproach`\n- `runnerUpApproach`\n- `evaluationSummary`\n- `keyTradeoffs`\n- `comparisonGapCount`\n\nRule:\n- if the ranking depends on an assumption you have not tested or cannot justify, count it in `comparisonGapCount` and say so plainly.",
111
- "requireConfirmation": false
112
- },
113
- {
114
- "id": "phase-3b-challenge-recommendation",
115
- "title": "Challenge the Front-Runner",
116
- "prompt": "Challenge the current front-runner before you turn it into a recommendation.\n\nDo:\n- identify the strongest case against `selectedApproach`\n- test whether `runnerUpApproach` or another alternative actually deserves to win instead\n- call out hidden assumptions, failure modes, and context changes that would flip the choice\n- decide whether the challenge changed the recommendation or just bounded its uncertainty\n\nSet context variables:\n- `challengeFindings`\n- `challengeChangedRecommendation`\n- `criticalUncertainties`\n- `recommendationConfidenceBand`\n\nConfidence rules:\n- High = the leading approach survives challenge, no material comparison gaps remain, and uncertainty is bounded\n- Medium = the recommendation is likely right but one meaningful uncertainty remains\n- Low = the challenge exposed unresolved gaps, close competitors, or major assumption risk",
117
- "promptFragments": [
118
- {
119
- "id": "phase-3b-quick",
120
- "when": { "var": "rigorMode", "equals": "QUICK" },
121
- "text": "Do the challenge yourself unless the decision still feels unexpectedly fragile."
122
- },
123
- {
124
- "id": "phase-3b-standard",
125
- "when": { "var": "rigorMode", "equals": "STANDARD" },
126
- "text": "If the choice is close or the downside risk matters, run `routine-hypothesis-challenge` before finalizing the confidence band."
127
- },
128
- {
129
- "id": "phase-3b-thorough",
130
- "when": { "var": "rigorMode", "equals": "THOROUGH" },
131
- "text": "If delegation is available, run `routine-hypothesis-challenge` before finalizing the confidence band. For technical explorations where feasibility or runtime behavior could flip the choice, also run `routine-execution-simulation`."
132
- }
133
- ],
134
- "requireConfirmation": false
135
- },
136
- {
137
- "id": "phase-3c-loop-decision",
138
- "title": "Evaluation Loop Decision",
139
- "prompt": "Decide whether the comparison needs another pass.\n\nDecision rules:\n- if `challengeChangedRecommendation = true` -> continue\n- else if `comparisonGapCount > 0` and the gaps materially affect ranking -> continue\n- else if `recommendationConfidenceBand = Low` and a better answer is still realistically reachable -> continue\n- else -> stop\n\nIf you stop because the remaining uncertainty is bounded, say that explicitly.\nIf you've hit the iteration limit, stop and record what still matters.\n\nEmit 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 or stop\"\n }]\n}\n```",
140
- "requireConfirmation": false,
141
- "outputContract": {
142
- "contractRef": "wr.contracts.loop_control"
143
- }
144
- }
145
- ]
146
- },
147
- {
148
- "id": "phase-3-small-task-comparison",
149
- "title": "Phase 3: Compare and Challenge (Small Fast Path)",
150
- "runCondition": {
151
- "var": "taskComplexity",
152
- "equals": "Small"
153
- },
154
- "prompt": "For Small explorations:\n- compare the strongest few approaches directly\n- make the key trade-offs explicit\n- challenge the front-runner yourself\n- set `selectedApproach`, `runnerUpApproach`, `keyTradeoffs`, `criticalUncertainties`, and `recommendationConfidenceBand`\n\nDo not create extra ceremony if the question is small and the uncertainty is already bounded.",
155
- "requireConfirmation": false
156
- },
157
- {
158
- "id": "phase-4-final-recommendation",
159
- "title": "Phase 4: Final Recommendation and Handoff",
160
- "prompt": "Give the recommendation in a way someone can act on.\n\nInclude:\n- the recommended approach and why it won\n- the runner-up and what would make it the better choice instead\n- the key trade-offs and assumptions\n- the bounded uncertainties that still remain, if any\n- practical next steps\n- verification suggestions or decision checks the user should use if they act on this recommendation\n- follow-up research only if it would materially change the decision\n\nOptional artifact:\n- create a final handoff markdown artifact only if it materially helps a human reviewer, and derive it from notes/context state rather than using it as workflow memory\n\nSet context variables:\n- `finalRecommendation`\n- `actionGuidance`\n- `verificationSuggestions`\n- `followUpResearch`",
161
- "requireConfirmation": {
162
- "or": [
163
- { "var": "recommendationConfidenceBand", "equals": "Low" },
164
- { "var": "riskLevel", "equals": "High" },
165
- { "var": "automationLevel", "equals": "Low" }
166
- ]
167
- }
168
- }
169
- ]
170
- }