@exaudeus/workrail 3.28.0 → 3.30.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/console/assets/{index-C146q2kN.js → index-Bl5-Ghuu.js} +1 -1
- package/dist/console/index.html +1 -1
- package/dist/manifest.json +3 -3
- package/docs/README.md +57 -0
- package/docs/adrs/001-hybrid-storage-backend.md +38 -0
- package/docs/adrs/002-four-layer-context-classification.md +38 -0
- package/docs/adrs/003-checkpoint-trigger-strategy.md +35 -0
- package/docs/adrs/004-opt-in-encryption-strategy.md +36 -0
- package/docs/adrs/005-agent-first-workflow-execution-tokens.md +105 -0
- package/docs/adrs/006-append-only-session-run-event-log.md +76 -0
- package/docs/adrs/007-resume-and-checkpoint-only-sessions.md +51 -0
- package/docs/adrs/008-blocked-nodes-architectural-upgrade.md +178 -0
- package/docs/adrs/009-bridge-mode-single-instance-mcp.md +195 -0
- package/docs/adrs/010-release-pipeline.md +89 -0
- package/docs/architecture/README.md +7 -0
- package/docs/architecture/refactor-audit.md +364 -0
- package/docs/authoring-v2.md +527 -0
- package/docs/authoring.md +873 -0
- package/docs/changelog-recent.md +201 -0
- package/docs/configuration.md +505 -0
- package/docs/ctc-mcp-proposal.md +518 -0
- package/docs/design/README.md +22 -0
- package/docs/design/agent-cascade-protocol.md +96 -0
- package/docs/design/autonomous-console-design-candidates.md +253 -0
- package/docs/design/autonomous-console-design-review.md +111 -0
- package/docs/design/autonomous-platform-mvp-discovery.md +525 -0
- package/docs/design/claude-code-source-deep-dive.md +713 -0
- package/docs/design/console-cyberpunk-ui-discovery.md +504 -0
- package/docs/design/console-execution-trace-candidates-final.md +160 -0
- package/docs/design/console-execution-trace-candidates.md +211 -0
- package/docs/design/console-execution-trace-design-candidates-v2.md +113 -0
- package/docs/design/console-execution-trace-design-review.md +74 -0
- package/docs/design/console-execution-trace-discovery.md +394 -0
- package/docs/design/console-execution-trace-final-review.md +77 -0
- package/docs/design/console-execution-trace-review.md +92 -0
- package/docs/design/console-performance-discovery.md +415 -0
- package/docs/design/console-ui-backlog.md +280 -0
- package/docs/design/daemon-architecture-discovery.md +853 -0
- package/docs/design/daemon-design-candidates.md +318 -0
- package/docs/design/daemon-design-review-findings.md +119 -0
- package/docs/design/daemon-engine-design-candidates.md +210 -0
- package/docs/design/daemon-engine-design-review.md +131 -0
- package/docs/design/daemon-execution-engine-discovery.md +280 -0
- package/docs/design/daemon-gap-analysis.md +554 -0
- package/docs/design/daemon-owns-console-plan.md +168 -0
- package/docs/design/daemon-owns-console-review.md +91 -0
- package/docs/design/daemon-owns-console.md +195 -0
- package/docs/design/data-model-erd.md +11 -0
- package/docs/design/design-candidates-consolidate-dev-staleness.md +98 -0
- package/docs/design/design-candidates-walk-cache-depth-limit.md +80 -0
- package/docs/design/design-review-consolidate-dev-staleness.md +54 -0
- package/docs/design/design-review-walk-cache-depth-limit.md +48 -0
- package/docs/design/implementation-plan-consolidate-dev-staleness.md +142 -0
- package/docs/design/implementation-plan-walk-cache-depth-limit.md +141 -0
- package/docs/design/layer3b-ghost-nodes-design-candidates.md +229 -0
- package/docs/design/layer3b-ghost-nodes-design-review.md +93 -0
- package/docs/design/layer3b-ghost-nodes-implementation-plan.md +219 -0
- package/docs/design/list-workflows-latency-fix-plan.md +128 -0
- package/docs/design/list-workflows-latency-fix-review.md +55 -0
- package/docs/design/list-workflows-latency-fix.md +109 -0
- package/docs/design/native-context-management-api.md +11 -0
- package/docs/design/performance-sweep-2026-04.md +96 -0
- package/docs/design/routines-guide.md +219 -0
- package/docs/design/sequence-diagrams.md +11 -0
- package/docs/design/subagent-design-principles.md +220 -0
- package/docs/design/temporal-patterns-design-candidates.md +312 -0
- package/docs/design/temporal-patterns-design-review-findings.md +163 -0
- package/docs/design/test-isolation-from-config-file.md +335 -0
- package/docs/design/v2-core-design-locks.md +2746 -0
- package/docs/design/v2-lock-registry.json +734 -0
- package/docs/design/workflow-authoring-v2.md +1044 -0
- package/docs/design/workflow-docs-spec.md +218 -0
- package/docs/design/workflow-extension-points.md +687 -0
- package/docs/design/workrail-auto-trigger-system.md +359 -0
- package/docs/design/workrail-config-file-discovery.md +513 -0
- package/docs/docker.md +110 -0
- package/docs/generated/v2-lock-closure-plan.md +26 -0
- package/docs/generated/v2-lock-coverage.json +797 -0
- package/docs/generated/v2-lock-coverage.md +177 -0
- package/docs/ideas/backlog.md +3927 -0
- package/docs/ideas/design-candidates-mcp-resilience.md +208 -0
- package/docs/ideas/design-review-findings-mcp-resilience.md +119 -0
- package/docs/ideas/implementation_plan.md +249 -0
- package/docs/ideas/third-party-workflow-setup-design-thinking.md +1948 -0
- package/docs/implementation/02-architecture.md +316 -0
- package/docs/implementation/04-testing-strategy.md +124 -0
- package/docs/implementation/09-simple-workflow-guide.md +835 -0
- package/docs/implementation/13-advanced-validation-guide.md +874 -0
- package/docs/implementation/README.md +21 -0
- package/docs/integrations/claude-code.md +300 -0
- package/docs/integrations/firebender.md +315 -0
- package/docs/migration/v0.1.0.md +147 -0
- package/docs/naming-conventions.md +45 -0
- package/docs/planning/README.md +104 -0
- package/docs/planning/github-ticketing-playbook.md +195 -0
- package/docs/plans/README.md +24 -0
- package/docs/plans/agent-managed-ticketing-design.md +605 -0
- package/docs/plans/agentic-orchestration-roadmap.md +112 -0
- package/docs/plans/assessment-gates-engine-handoff.md +536 -0
- package/docs/plans/content-coherence-and-references.md +151 -0
- package/docs/plans/library-extraction-plan.md +340 -0
- package/docs/plans/mr-review-workflow-redesign.md +1451 -0
- package/docs/plans/native-context-management-epic.md +11 -0
- package/docs/plans/perf-fixes-design-candidates.md +225 -0
- package/docs/plans/perf-fixes-design-review-findings.md +61 -0
- package/docs/plans/perf-fixes-new-issues-candidates.md +264 -0
- package/docs/plans/perf-fixes-new-issues-review.md +110 -0
- package/docs/plans/prompt-fragments.md +53 -0
- package/docs/plans/ui-ux-workflow-design-candidates.md +120 -0
- package/docs/plans/ui-ux-workflow-discovery.md +100 -0
- package/docs/plans/ui-ux-workflow-review.md +48 -0
- package/docs/plans/v2-followup-enhancements.md +587 -0
- package/docs/plans/workflow-categories-candidates.md +105 -0
- package/docs/plans/workflow-categories-discovery.md +110 -0
- package/docs/plans/workflow-categories-review.md +51 -0
- package/docs/plans/workflow-discovery-model-candidates.md +94 -0
- package/docs/plans/workflow-discovery-model-discovery.md +74 -0
- package/docs/plans/workflow-discovery-model-review.md +48 -0
- package/docs/plans/workflow-source-setup-phase-1.md +245 -0
- package/docs/plans/workflow-source-setup-phase-2.md +361 -0
- package/docs/plans/workflow-staleness-detection-candidates.md +104 -0
- package/docs/plans/workflow-staleness-detection-review.md +58 -0
- package/docs/plans/workflow-staleness-detection.md +80 -0
- package/docs/plans/workflow-v2-design.md +69 -0
- package/docs/plans/workflow-v2-roadmap.md +74 -0
- package/docs/plans/workflow-validation-design.md +98 -0
- package/docs/plans/workflow-validation-roadmap.md +108 -0
- package/docs/plans/workrail-platform-vision.md +420 -0
- package/docs/reference/agent-context-cleaner-snippet.md +94 -0
- package/docs/reference/agent-context-guidance.md +140 -0
- package/docs/reference/context-optimization.md +284 -0
- package/docs/reference/example-workflow-repository-template/.github/workflows/validate.yml +125 -0
- package/docs/reference/example-workflow-repository-template/README.md +268 -0
- package/docs/reference/example-workflow-repository-template/workflows/example-workflow.json +80 -0
- package/docs/reference/external-workflow-repositories.md +916 -0
- package/docs/reference/feature-flags-architecture.md +472 -0
- package/docs/reference/feature-flags.md +349 -0
- package/docs/reference/god-tier-workflow-validation.md +272 -0
- package/docs/reference/loop-optimization.md +209 -0
- package/docs/reference/loop-validation.md +176 -0
- package/docs/reference/loops.md +465 -0
- package/docs/reference/mcp-platform-constraints.md +59 -0
- package/docs/reference/recovery.md +88 -0
- package/docs/reference/releases.md +177 -0
- package/docs/reference/troubleshooting.md +105 -0
- package/docs/reference/workflow-execution-contract.md +998 -0
- package/docs/roadmap/README.md +22 -0
- package/docs/roadmap/legacy-planning-status.md +103 -0
- package/docs/roadmap/now-next-later.md +70 -0
- package/docs/roadmap/open-work-inventory.md +389 -0
- package/docs/tickets/README.md +39 -0
- package/docs/tickets/next-up.md +76 -0
- package/docs/workflow-management.md +317 -0
- package/docs/workflow-templates.md +423 -0
- package/docs/workflow-validation.md +184 -0
- package/docs/workflows.md +254 -0
- package/package.json +4 -1
- package/spec/authoring-spec.json +61 -16
- package/workflows/workflow-for-workflows.json +3 -3
- package/workflows/workflow-for-workflows.v2.json +3 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Implementation Guides
|
|
2
|
+
|
|
3
|
+
Use this directory for **live implementation guides**.
|
|
4
|
+
|
|
5
|
+
Good fits:
|
|
6
|
+
|
|
7
|
+
- testing guidance
|
|
8
|
+
- security/performance/deployment guides
|
|
9
|
+
- workflow development guides
|
|
10
|
+
- practical how-to material for contributors
|
|
11
|
+
|
|
12
|
+
Do **not** use this directory for:
|
|
13
|
+
|
|
14
|
+
- roadmap history
|
|
15
|
+
- superseded phase plans
|
|
16
|
+
- product prioritization
|
|
17
|
+
- durable architecture/design that should live in `docs/design/`
|
|
18
|
+
|
|
19
|
+
## Notes
|
|
20
|
+
|
|
21
|
+
- New planning or status docs should usually go to `docs/roadmap/`, `docs/tickets/`, or `docs/plans/` instead.
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
# Claude Code Integration Guide
|
|
2
|
+
|
|
3
|
+
This guide covers setting up WorkRail with Claude Code (both Desktop and CLI).
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
### Claude Desktop App
|
|
8
|
+
|
|
9
|
+
1. Open `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or the equivalent location on your OS
|
|
10
|
+
2. Add WorkRail to the `mcpServers` section:
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"mcpServers": {
|
|
15
|
+
"workrail": {
|
|
16
|
+
"command": "npx",
|
|
17
|
+
"args": ["-y", "@exaudeus/workrail"]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
3. Restart Claude Desktop
|
|
24
|
+
4. Verify by asking: "List available workflows"
|
|
25
|
+
|
|
26
|
+
### Claude Code CLI
|
|
27
|
+
|
|
28
|
+
#### Method 1: Using `claude mcp add` (Recommended)
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Navigate to your project
|
|
32
|
+
cd /path/to/your/project
|
|
33
|
+
|
|
34
|
+
# Add WorkRail MCP server
|
|
35
|
+
claude mcp add workrail npx -y @exaudeus/workrail
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This creates/updates `.claude.json` in your project root.
|
|
39
|
+
|
|
40
|
+
#### Method 2: Manual Configuration
|
|
41
|
+
|
|
42
|
+
Edit or create `.claude.json` in your project root:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"projects": {
|
|
47
|
+
"/absolute/path/to/your/project": {
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"workrail": {
|
|
50
|
+
"type": "stdio",
|
|
51
|
+
"command": "npx",
|
|
52
|
+
"args": ["-y", "@exaudeus/workrail"],
|
|
53
|
+
"env": {}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Important:** The path must be absolute and match your actual project directory.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Custom Workflow Configuration
|
|
66
|
+
|
|
67
|
+
To use custom workflows, add environment variables:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"projects": {
|
|
72
|
+
"/path/to/your/project": {
|
|
73
|
+
"mcpServers": {
|
|
74
|
+
"workrail": {
|
|
75
|
+
"type": "stdio",
|
|
76
|
+
"command": "npx",
|
|
77
|
+
"args": ["-y", "@exaudeus/workrail"],
|
|
78
|
+
"env": {
|
|
79
|
+
"WORKFLOW_STORAGE_PATH": "/path/to/custom/workflows",
|
|
80
|
+
"WORKFLOW_GIT_REPOS": "https://github.com/your-org/workflows.git",
|
|
81
|
+
"GITHUB_TOKEN": "ghp_your_token_here"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## workrail-executor Agent
|
|
93
|
+
|
|
94
|
+
The `workrail-executor` agent enables delegating workflow execution to subagents, allowing parallel context gathering and multi-agent workflows.
|
|
95
|
+
|
|
96
|
+
### Setup
|
|
97
|
+
|
|
98
|
+
Create `~/.claude/agents/workrail-executor.md`:
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
---
|
|
102
|
+
name: workrail-executor
|
|
103
|
+
description: Executes WorkRail workflows step by step using the WorkRail MCP tools. Use when the user wants to run a workflow, follow a structured process, or resume a previous workflow session. Handles start, continue, and checkpoint operations, interpreting each step's instructions faithfully and advancing only when the step is complete.
|
|
104
|
+
tools: Bash, Read, Write, Edit, mcp__workrail__list_workflows, mcp__workrail__inspect_workflow, mcp__workrail__start_workflow, mcp__workrail__continue_workflow, mcp__workrail__checkpoint_workflow, mcp__workrail__resume_session, mcp__workrail__create_session, mcp__workrail__update_session, mcp__workrail__read_session, mcp__workrail__open_dashboard
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
You are the WorkRail executor. Your job is to faithfully follow WorkRail workflow steps one at a time.
|
|
108
|
+
|
|
109
|
+
## Core responsibilities
|
|
110
|
+
|
|
111
|
+
- Use `mcp__workrail__start_workflow` to begin a workflow by name or ID.
|
|
112
|
+
- Use `mcp__workrail__continue_workflow` with a `continueToken` to advance after completing a step.
|
|
113
|
+
- Use `mcp__workrail__checkpoint_workflow` to save progress and return a resume token when asked or when ending a session.
|
|
114
|
+
- Use `mcp__workrail__list_workflows` to show available workflows.
|
|
115
|
+
- Use `mcp__workrail__inspect_workflow` to preview a workflow's steps before starting.
|
|
116
|
+
|
|
117
|
+
## Execution rules
|
|
118
|
+
|
|
119
|
+
1. **Read each step carefully.** The step prompt is your instruction. Execute it fully before advancing.
|
|
120
|
+
2. **Do not skip steps.** Every step must be completed in order.
|
|
121
|
+
3. **Provide required notes.** Steps that require notes must receive substantive notes before you call `continue_workflow`. Pass them via the `output.notesMarkdown` parameter.
|
|
122
|
+
4. **Advance only when done.** Call `continue_workflow` only after the step's work is complete.
|
|
123
|
+
5. **Checkpoint on request.** If the user asks to pause or save progress, call `mcp__workrail__checkpoint_workflow` and share the resume token.
|
|
124
|
+
6. **Report clearly.** After each step, briefly summarize what was done before moving on.
|
|
125
|
+
|
|
126
|
+
## Token handling
|
|
127
|
+
|
|
128
|
+
- `continueToken` (`ct_` prefix) — use with `continue_workflow` to advance.
|
|
129
|
+
- `checkpointToken` / `resumeToken` (`cp_` or `st_` prefix) — use with `checkpoint_workflow` or `continue_workflow` to save/rehydrate.
|
|
130
|
+
- Never mix token types.
|
|
131
|
+
|
|
132
|
+
## Workflow complete
|
|
133
|
+
|
|
134
|
+
When the workflow returns `isComplete: true`, summarize all work done across the workflow and confirm completion to the user.
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Usage
|
|
138
|
+
|
|
139
|
+
Once configured, spawn workrail-executor agents in workflows:
|
|
140
|
+
|
|
141
|
+
```python
|
|
142
|
+
# In Python (or equivalent in your language)
|
|
143
|
+
agent = Agent(
|
|
144
|
+
subagent_type="workrail-executor",
|
|
145
|
+
description="Execute context gathering",
|
|
146
|
+
prompt="""
|
|
147
|
+
Start the routine-context-gathering workflow.
|
|
148
|
+
|
|
149
|
+
Workspace: /path/to/project
|
|
150
|
+
Focus: COMPLETENESS
|
|
151
|
+
Context: ...
|
|
152
|
+
"""
|
|
153
|
+
)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Or from the main agent in Claude Code:
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
Please use the workrail-executor agent to run the bug-investigation-agentic workflow
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Troubleshooting
|
|
165
|
+
|
|
166
|
+
### WorkRail tools not available
|
|
167
|
+
|
|
168
|
+
**Symptoms:** Claude doesn't recognize workflow commands or says workrail tools aren't available.
|
|
169
|
+
|
|
170
|
+
**Solutions:**
|
|
171
|
+
|
|
172
|
+
1. **Desktop App:** Restart Claude Desktop completely (Quit, not just close window)
|
|
173
|
+
2. **CLI:** Exit and start a new session - MCP servers load at startup, not mid-session
|
|
174
|
+
3. **Verify config:**
|
|
175
|
+
```bash
|
|
176
|
+
# For CLI
|
|
177
|
+
cat .claude.json | jq '.projects[].mcpServers.workrail'
|
|
178
|
+
|
|
179
|
+
# For Desktop
|
|
180
|
+
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | jq '.mcpServers.workrail'
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Agent can't access workrail tools
|
|
184
|
+
|
|
185
|
+
**Symptoms:** workrail-executor agent reports "I don't have access to WorkRail workflow tools"
|
|
186
|
+
|
|
187
|
+
**Common causes:**
|
|
188
|
+
|
|
189
|
+
1. **Wrong tool names in agent config** - Tool names must match exactly:
|
|
190
|
+
- Correct: `mcp__workrail__start_workflow`
|
|
191
|
+
- Wrong: `mcp_workrail_start_workflow` (missing double underscores)
|
|
192
|
+
- Wrong: `mcp__workrail__mcp_workrail_start_workflow` (doubled prefix)
|
|
193
|
+
|
|
194
|
+
2. **Agent config not reloaded** - After editing `~/.claude/agents/workrail-executor.md`, start a fresh session
|
|
195
|
+
|
|
196
|
+
3. **MCP server not running** - Ensure workrail MCP is configured and loaded (see "WorkRail tools not available" above)
|
|
197
|
+
|
|
198
|
+
### Workflows not found
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Check what WorkRail sees
|
|
202
|
+
npx @exaudeus/workrail list
|
|
203
|
+
|
|
204
|
+
# Verify custom paths
|
|
205
|
+
ls -la ~/.workrail/workflows/
|
|
206
|
+
|
|
207
|
+
# Check environment variables
|
|
208
|
+
echo $WORKFLOW_STORAGE_PATH
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Git repository authentication fails
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Test GitHub token
|
|
215
|
+
curl -H "Authorization: token $GITHUB_TOKEN" \
|
|
216
|
+
https://api.github.com/user
|
|
217
|
+
|
|
218
|
+
# Test repo access
|
|
219
|
+
git ls-remote https://github.com/your-org/workflows.git
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Advanced Configuration
|
|
225
|
+
|
|
226
|
+
### Per-Project Workflows
|
|
227
|
+
|
|
228
|
+
Use project-local workflows that override bundled ones:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
cd /path/to/your/project
|
|
232
|
+
mkdir -p workflows
|
|
233
|
+
# Add your .json workflow files
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
WorkRail auto-discovers `./workflows/` in the current directory.
|
|
237
|
+
|
|
238
|
+
### Multiple Git Repositories
|
|
239
|
+
|
|
240
|
+
```json
|
|
241
|
+
{
|
|
242
|
+
"env": {
|
|
243
|
+
"WORKFLOW_GIT_REPOS": "https://github.com/team-a/workflows.git,https://github.com/team-b/workflows.git"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Later repositories override earlier ones with the same workflow ID.
|
|
249
|
+
|
|
250
|
+
### Disable Bundled Workflows
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
{
|
|
254
|
+
"env": {
|
|
255
|
+
"WORKFLOW_INCLUDE_BUNDLED": "false"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Best Practices
|
|
263
|
+
|
|
264
|
+
1. **Version control your agent configs** - Check `~/.claude/agents/` into a dotfiles repo
|
|
265
|
+
2. **Use project-specific `.claude.json`** - Different projects can have different workflow configs
|
|
266
|
+
3. **Enable session tools for debugging** - Set `WORKRAIL_ENABLE_SESSION_TOOLS=true` to use dashboard and session inspection
|
|
267
|
+
4. **Create team-specific workflows** - Host in a shared Git repo and reference via `WORKFLOW_GIT_REPOS`
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Examples
|
|
272
|
+
|
|
273
|
+
### Running a workflow directly
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
> Use the bug-investigation-agentic workflow to investigate the cache expiration issue
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Delegating to workrail-executor
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
> Spawn two workrail-executor agents in parallel:
|
|
283
|
+
> 1. One running routine-context-gathering with focus=COMPLETENESS
|
|
284
|
+
> 2. One running routine-context-gathering with focus=DEPTH
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Resuming a checkpointed workflow
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
> Resume the workflow session using token: st_abc123...
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## See Also
|
|
296
|
+
|
|
297
|
+
- [Configuration Reference](../configuration.md)
|
|
298
|
+
- [Writing Workflows](../authoring.md)
|
|
299
|
+
- [All Available Workflows](../workflows.md)
|
|
300
|
+
- [Firebender Integration](./firebender.md)
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
# Firebender Integration Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Firebender is an Agentic IDE that supports multiple subagents. WorkRail works with Firebender in two modes: **Delegation** (Gold) and **Proxy** (Silver).
|
|
5
|
+
|
|
6
|
+
## Configuration Rules
|
|
7
|
+
|
|
8
|
+
Firebender has a specific behavior regarding Tool Access that you must understand to enable **Delegation Mode**.
|
|
9
|
+
|
|
10
|
+
### The "Inheritance" Rule (Recommended)
|
|
11
|
+
If you define a subagent **without** a `tools` configuration block, it inherits **ALL** tools from the main agent, including WorkRail.
|
|
12
|
+
|
|
13
|
+
** Recommended Config (Tier 3 Enabled):**
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"subagents": {
|
|
17
|
+
"researcher": {
|
|
18
|
+
"systemPrompt": "You are a Researcher...",
|
|
19
|
+
// No "tools" block -> Inherits everything!
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### The "Whitelist" Pitfall
|
|
26
|
+
If you define a `tools` block (even if empty), the subagent loses access to everything except what is listed.
|
|
27
|
+
|
|
28
|
+
** Broken Config (Tier 2 Only):**
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"subagents": {
|
|
32
|
+
"researcher": {
|
|
33
|
+
"systemPrompt": "...",
|
|
34
|
+
"tools": ["read_file", "grep"] // Missing WorkRail tools!
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
** Fixed Whitelist Config:**
|
|
41
|
+
If you MUST whitelist tools, you must explicitly add the WorkRail suite:
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"subagents": {
|
|
45
|
+
"researcher": {
|
|
46
|
+
"systemPrompt": "...",
|
|
47
|
+
"tools": [
|
|
48
|
+
"read_file",
|
|
49
|
+
"grep",
|
|
50
|
+
"list_workflows",
|
|
51
|
+
"start_workflow",
|
|
52
|
+
"continue_workflow",
|
|
53
|
+
"checkpoint_workflow"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Step-by-Step Setup
|
|
61
|
+
|
|
62
|
+
### 1. Install WorkRail Subagent Config
|
|
63
|
+
|
|
64
|
+
Copy the universal WorkRail executor to your Firebender agents directory:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Copy the universal executor
|
|
68
|
+
cp assets/agent-configs/firebender/workrail-executor.md ~/.firebender/agents/
|
|
69
|
+
|
|
70
|
+
# Legacy: Individual subagent configs (deprecated in favor of universal executor)
|
|
71
|
+
# cp assets/agent-configs/firebender/*.md ~/.firebender/agents/
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 2. Register Subagent in Firebender
|
|
75
|
+
|
|
76
|
+
Edit your `~/.firebender/firebender.json` (or project-specific `firebender.json`):
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"subagents": [
|
|
81
|
+
"~/.firebender/agents/workrail-executor.md"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Important:** The subagent config uses **tool inheritance** (no `tools` field), so it will automatically have access to all tools including WorkRail.
|
|
87
|
+
|
|
88
|
+
### 3. Agentic Workflows Are Enabled by Default
|
|
89
|
+
|
|
90
|
+
`.agentic.json` workflow variants and routines now ship enabled by default in WorkRail.
|
|
91
|
+
|
|
92
|
+
If you need to disable them temporarily, set:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
export WORKRAIL_ENABLE_AGENTIC_ROUTINES=false
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 4. Verify Your Setup
|
|
99
|
+
|
|
100
|
+
Run the diagnostic workflow to test your configuration:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# In Firebender, ask the main agent:
|
|
104
|
+
"Run the workflow-diagnose-environment workflow"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
This will:
|
|
108
|
+
- Check if the WorkRail executor is available
|
|
109
|
+
- Probe if the executor has WorkRail tool access
|
|
110
|
+
- Report your tier (Solo, Proxy, or Delegate)
|
|
111
|
+
|
|
112
|
+
### 5. Test with a Simple Delegation
|
|
113
|
+
|
|
114
|
+
Try delegating a simple task to verify everything works:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
"Delegate to the WorkRail Executor:
|
|
118
|
+
|
|
119
|
+
Execute the 'Context Gathering Routine' workflow at depth=1.
|
|
120
|
+
|
|
121
|
+
Work Package:
|
|
122
|
+
MISSION: Map the structure of the src/auth directory
|
|
123
|
+
TARGET: src/auth/
|
|
124
|
+
CONTEXT: I need to understand how authentication works
|
|
125
|
+
DELIVERABLE: context-map.md"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
If the WorkRail Executor can execute the routine and return a structured deliverable, you're in **Tier 3 (Delegation Mode)**
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Usage Patterns
|
|
133
|
+
|
|
134
|
+
### **Pattern 1: Explicit Delegation**
|
|
135
|
+
|
|
136
|
+
Use the `task` tool to explicitly delegate to the WorkRail executor:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
task(subagent_type="workrail-executor", prompt="
|
|
140
|
+
Execute the 'Context Gathering Routine' workflow at depth=2.
|
|
141
|
+
|
|
142
|
+
Work Package:
|
|
143
|
+
MISSION: Understand how user authentication works in this codebase
|
|
144
|
+
TARGET: src/auth/
|
|
145
|
+
CONTEXT:
|
|
146
|
+
- Bug: Valid tokens rejected in production
|
|
147
|
+
- Previous Finding: AuthService identified as likely location
|
|
148
|
+
DELIVERABLE: context-map.md with component structure and execution flow
|
|
149
|
+
")
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
The WorkRail Executor will:
|
|
153
|
+
1. Load the `Context Gathering Routine` workflow
|
|
154
|
+
2. Execute it autonomously at depth=2
|
|
155
|
+
3. Return `context-map.md` with findings
|
|
156
|
+
|
|
157
|
+
### **Pattern 2: Main Agent Instruction**
|
|
158
|
+
|
|
159
|
+
You can also instruct the main agent to delegate for you:
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
"Please delegate context gathering to the WorkRail Executor.
|
|
163
|
+
|
|
164
|
+
Execute the 'Context Gathering Routine' at depth=2 (Explore level).
|
|
165
|
+
|
|
166
|
+
Mission: Understand the authentication system
|
|
167
|
+
Target: src/auth/
|
|
168
|
+
Context: Investigating token validation bug
|
|
169
|
+
Deliverable: context-map.md"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
The main agent will format the delegation and call the WorkRail Executor.
|
|
173
|
+
|
|
174
|
+
### **Pattern 3: Workflow-Driven Delegation**
|
|
175
|
+
|
|
176
|
+
Agentic workflows (`.agentic.json`) include delegation instructions in their prompts:
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
"Start the bug-investigation workflow"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
The workflow will guide the main agent through strategic delegation points, with prompts like:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
"Execute the 'Context Gathering Routine' workflow at depth=2.
|
|
186
|
+
|
|
187
|
+
Work Package:
|
|
188
|
+
MISSION: [extracted from context]
|
|
189
|
+
TARGET: [identified files/areas]
|
|
190
|
+
..."
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
The main agent reads these instructions and delegates to the WorkRail Executor accordingly.
|
|
194
|
+
|
|
195
|
+
### **Pattern 4: Parallel Delegation**
|
|
196
|
+
|
|
197
|
+
For THOROUGH mode workflows, delegate to multiple executors simultaneously:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
# Spawn 3 WorkRail Executors in parallel:
|
|
201
|
+
|
|
202
|
+
Executor 1: Execute 'Ideation Routine' with perspective=logic-errors
|
|
203
|
+
Executor 2: Execute 'Ideation Routine' with perspective=data-state
|
|
204
|
+
Executor 3: Execute 'Ideation Routine' with perspective=integration
|
|
205
|
+
|
|
206
|
+
# Then synthesize all deliverables
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Each executor works independently, exploring different solution spaces.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Troubleshooting
|
|
214
|
+
|
|
215
|
+
### **"WorkRail Executor can't find workflow_list"**
|
|
216
|
+
|
|
217
|
+
**Cause:** Subagent has a `tools` whitelist that excludes WorkRail tools.
|
|
218
|
+
|
|
219
|
+
**Fix:** Either:
|
|
220
|
+
- Remove the `tools` field entirely from the YAML frontmatter (use inheritance)
|
|
221
|
+
- Or add WorkRail tools to the whitelist: `list_workflows`, `start_workflow`, `continue_workflow`, `checkpoint_workflow`
|
|
222
|
+
|
|
223
|
+
The provided `workrail-executor.md` uses inheritance (no `tools` field), so this shouldn't happen unless you modified it.
|
|
224
|
+
|
|
225
|
+
### **"WorkRail Executor returns incomplete results"**
|
|
226
|
+
|
|
227
|
+
**Cause:** Insufficient context in delegation prompt.
|
|
228
|
+
|
|
229
|
+
**Fix:** Provide a complete work package:
|
|
230
|
+
- **Workflow**: Which routine to execute (by name)
|
|
231
|
+
- **Parameters**: Workflow-specific params (depth, rigor, perspective, etc.)
|
|
232
|
+
- **Mission**: What to accomplish
|
|
233
|
+
- **Target**: What to analyze (files, directories, code areas)
|
|
234
|
+
- **Context**: Background, constraints, prior work
|
|
235
|
+
- **Deliverable**: What artifact to create and what format
|
|
236
|
+
|
|
237
|
+
### **"How do I know which workflow to use?"**
|
|
238
|
+
|
|
239
|
+
**Guide:**
|
|
240
|
+
- **Context Gathering Routine**: "I need to understand how X works"
|
|
241
|
+
- **Hypothesis Challenge Routine**: "Challenge my assumptions about Y"
|
|
242
|
+
- **Plan Analysis Routine**: "Review this implementation plan"
|
|
243
|
+
- **Execution Simulation Routine**: "Trace what happens when I call X with Y"
|
|
244
|
+
- **Ideation Routine**: "Generate multiple approaches to solve X"
|
|
245
|
+
- **Feature Implementation Routine**: "Implement this feature according to the plan"
|
|
246
|
+
|
|
247
|
+
The WorkRail Executor can execute any of these - the workflow defines its behavior.
|
|
248
|
+
|
|
249
|
+
### **"Can I use auto-invocation instead of explicit delegation?"**
|
|
250
|
+
|
|
251
|
+
**Answer:** Yes, Firebender can auto-invoke subagents based on task matching (using the `description` field in the YAML frontmatter). However, **explicit delegation is recommended** for predictability and control, especially for workflows with parameters (depth, rigor, etc.).
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Advanced Configuration
|
|
256
|
+
|
|
257
|
+
### **Per-Project Subagents**
|
|
258
|
+
|
|
259
|
+
You can have project-specific subagent configs:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
# Create project-specific agents directory
|
|
263
|
+
mkdir .firebender/agents/
|
|
264
|
+
|
|
265
|
+
# Copy and customize subagents
|
|
266
|
+
cp ~/.firebender/agents/context-researcher.md .firebender/agents/
|
|
267
|
+
|
|
268
|
+
# Register in project firebender.json
|
|
269
|
+
{
|
|
270
|
+
"subagents": [
|
|
271
|
+
".firebender/agents/context-researcher.md"
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### **Custom Subagents**
|
|
277
|
+
|
|
278
|
+
To create a custom subagent:
|
|
279
|
+
|
|
280
|
+
1. Copy an existing subagent as a template
|
|
281
|
+
2. Modify the YAML frontmatter:
|
|
282
|
+
```yaml
|
|
283
|
+
---
|
|
284
|
+
name: my-custom-agent
|
|
285
|
+
description: "My custom agent description"
|
|
286
|
+
tools: # Optional, omit to inherit all tools
|
|
287
|
+
- read_file
|
|
288
|
+
- grep_search
|
|
289
|
+
model: claude-sonnet-4
|
|
290
|
+
---
|
|
291
|
+
```
|
|
292
|
+
3. Update the system prompt to define the cognitive function
|
|
293
|
+
4. Register in `firebender.json`
|
|
294
|
+
|
|
295
|
+
### **Model Selection**
|
|
296
|
+
|
|
297
|
+
Choose models based on task complexity:
|
|
298
|
+
|
|
299
|
+
```yaml
|
|
300
|
+
---
|
|
301
|
+
name: context-researcher
|
|
302
|
+
model: claude-haiku-4 # Fast, cheap (for depth 0-1)
|
|
303
|
+
# OR
|
|
304
|
+
model: claude-sonnet-4 # Powerful (for depth 2+)
|
|
305
|
+
---
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Verifying Your Setup
|
|
311
|
+
|
|
312
|
+
Run the Diagnostic Workflow to test your configuration:
|
|
313
|
+
1. Start a chat with the Main Agent.
|
|
314
|
+
2. Ask: "Run the environment diagnostic workflow."
|
|
315
|
+
3. Follow the steps to probe your subagent's capabilities.
|