@exaudeus/workrail 3.27.0 → 3.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/console/assets/{index-FtTaDku8.js → index-BZ6HkxGf.js} +1 -1
  2. package/dist/console/index.html +1 -1
  3. package/dist/manifest.json +3 -3
  4. package/docs/README.md +57 -0
  5. package/docs/adrs/001-hybrid-storage-backend.md +38 -0
  6. package/docs/adrs/002-four-layer-context-classification.md +38 -0
  7. package/docs/adrs/003-checkpoint-trigger-strategy.md +35 -0
  8. package/docs/adrs/004-opt-in-encryption-strategy.md +36 -0
  9. package/docs/adrs/005-agent-first-workflow-execution-tokens.md +105 -0
  10. package/docs/adrs/006-append-only-session-run-event-log.md +76 -0
  11. package/docs/adrs/007-resume-and-checkpoint-only-sessions.md +51 -0
  12. package/docs/adrs/008-blocked-nodes-architectural-upgrade.md +178 -0
  13. package/docs/adrs/009-bridge-mode-single-instance-mcp.md +195 -0
  14. package/docs/adrs/010-release-pipeline.md +89 -0
  15. package/docs/architecture/README.md +7 -0
  16. package/docs/architecture/refactor-audit.md +364 -0
  17. package/docs/authoring-v2.md +527 -0
  18. package/docs/authoring.md +873 -0
  19. package/docs/changelog-recent.md +201 -0
  20. package/docs/configuration.md +505 -0
  21. package/docs/ctc-mcp-proposal.md +518 -0
  22. package/docs/design/README.md +22 -0
  23. package/docs/design/agent-cascade-protocol.md +96 -0
  24. package/docs/design/autonomous-console-design-candidates.md +253 -0
  25. package/docs/design/autonomous-console-design-review.md +111 -0
  26. package/docs/design/autonomous-platform-mvp-discovery.md +525 -0
  27. package/docs/design/claude-code-source-deep-dive.md +713 -0
  28. package/docs/design/console-cyberpunk-ui-discovery.md +504 -0
  29. package/docs/design/console-execution-trace-candidates-final.md +160 -0
  30. package/docs/design/console-execution-trace-candidates.md +211 -0
  31. package/docs/design/console-execution-trace-design-candidates-v2.md +113 -0
  32. package/docs/design/console-execution-trace-design-review.md +74 -0
  33. package/docs/design/console-execution-trace-discovery.md +394 -0
  34. package/docs/design/console-execution-trace-final-review.md +77 -0
  35. package/docs/design/console-execution-trace-review.md +92 -0
  36. package/docs/design/console-performance-discovery.md +415 -0
  37. package/docs/design/console-ui-backlog.md +280 -0
  38. package/docs/design/daemon-architecture-discovery.md +853 -0
  39. package/docs/design/daemon-design-candidates.md +318 -0
  40. package/docs/design/daemon-design-review-findings.md +119 -0
  41. package/docs/design/daemon-engine-design-candidates.md +210 -0
  42. package/docs/design/daemon-engine-design-review.md +131 -0
  43. package/docs/design/daemon-execution-engine-discovery.md +280 -0
  44. package/docs/design/daemon-gap-analysis.md +554 -0
  45. package/docs/design/daemon-owns-console-plan.md +168 -0
  46. package/docs/design/daemon-owns-console-review.md +91 -0
  47. package/docs/design/daemon-owns-console.md +195 -0
  48. package/docs/design/data-model-erd.md +11 -0
  49. package/docs/design/design-candidates-consolidate-dev-staleness.md +98 -0
  50. package/docs/design/design-candidates-walk-cache-depth-limit.md +80 -0
  51. package/docs/design/design-review-consolidate-dev-staleness.md +54 -0
  52. package/docs/design/design-review-walk-cache-depth-limit.md +48 -0
  53. package/docs/design/implementation-plan-consolidate-dev-staleness.md +142 -0
  54. package/docs/design/implementation-plan-walk-cache-depth-limit.md +141 -0
  55. package/docs/design/layer3b-ghost-nodes-design-candidates.md +229 -0
  56. package/docs/design/layer3b-ghost-nodes-design-review.md +93 -0
  57. package/docs/design/layer3b-ghost-nodes-implementation-plan.md +219 -0
  58. package/docs/design/list-workflows-latency-fix-plan.md +128 -0
  59. package/docs/design/list-workflows-latency-fix-review.md +55 -0
  60. package/docs/design/list-workflows-latency-fix.md +109 -0
  61. package/docs/design/native-context-management-api.md +11 -0
  62. package/docs/design/performance-sweep-2026-04.md +96 -0
  63. package/docs/design/routines-guide.md +219 -0
  64. package/docs/design/sequence-diagrams.md +11 -0
  65. package/docs/design/subagent-design-principles.md +220 -0
  66. package/docs/design/temporal-patterns-design-candidates.md +312 -0
  67. package/docs/design/temporal-patterns-design-review-findings.md +163 -0
  68. package/docs/design/test-isolation-from-config-file.md +335 -0
  69. package/docs/design/v2-core-design-locks.md +2746 -0
  70. package/docs/design/v2-lock-registry.json +734 -0
  71. package/docs/design/workflow-authoring-v2.md +1044 -0
  72. package/docs/design/workflow-docs-spec.md +218 -0
  73. package/docs/design/workflow-extension-points.md +687 -0
  74. package/docs/design/workrail-auto-trigger-system.md +359 -0
  75. package/docs/design/workrail-config-file-discovery.md +513 -0
  76. package/docs/docker.md +110 -0
  77. package/docs/generated/v2-lock-closure-plan.md +26 -0
  78. package/docs/generated/v2-lock-coverage.json +797 -0
  79. package/docs/generated/v2-lock-coverage.md +177 -0
  80. package/docs/ideas/backlog.md +3927 -0
  81. package/docs/ideas/design-candidates-mcp-resilience.md +208 -0
  82. package/docs/ideas/design-review-findings-mcp-resilience.md +119 -0
  83. package/docs/ideas/implementation_plan.md +249 -0
  84. package/docs/ideas/third-party-workflow-setup-design-thinking.md +1948 -0
  85. package/docs/implementation/02-architecture.md +316 -0
  86. package/docs/implementation/04-testing-strategy.md +124 -0
  87. package/docs/implementation/09-simple-workflow-guide.md +835 -0
  88. package/docs/implementation/13-advanced-validation-guide.md +874 -0
  89. package/docs/implementation/README.md +21 -0
  90. package/docs/integrations/claude-code.md +300 -0
  91. package/docs/integrations/firebender.md +315 -0
  92. package/docs/migration/v0.1.0.md +147 -0
  93. package/docs/naming-conventions.md +45 -0
  94. package/docs/planning/README.md +104 -0
  95. package/docs/planning/github-ticketing-playbook.md +195 -0
  96. package/docs/plans/README.md +24 -0
  97. package/docs/plans/agent-managed-ticketing-design.md +605 -0
  98. package/docs/plans/agentic-orchestration-roadmap.md +112 -0
  99. package/docs/plans/assessment-gates-engine-handoff.md +536 -0
  100. package/docs/plans/content-coherence-and-references.md +151 -0
  101. package/docs/plans/library-extraction-plan.md +340 -0
  102. package/docs/plans/mr-review-workflow-redesign.md +1451 -0
  103. package/docs/plans/native-context-management-epic.md +11 -0
  104. package/docs/plans/perf-fixes-design-candidates.md +225 -0
  105. package/docs/plans/perf-fixes-design-review-findings.md +61 -0
  106. package/docs/plans/perf-fixes-new-issues-candidates.md +264 -0
  107. package/docs/plans/perf-fixes-new-issues-review.md +110 -0
  108. package/docs/plans/prompt-fragments.md +53 -0
  109. package/docs/plans/ui-ux-workflow-design-candidates.md +120 -0
  110. package/docs/plans/ui-ux-workflow-discovery.md +100 -0
  111. package/docs/plans/ui-ux-workflow-review.md +48 -0
  112. package/docs/plans/v2-followup-enhancements.md +587 -0
  113. package/docs/plans/workflow-categories-candidates.md +105 -0
  114. package/docs/plans/workflow-categories-discovery.md +110 -0
  115. package/docs/plans/workflow-categories-review.md +51 -0
  116. package/docs/plans/workflow-discovery-model-candidates.md +94 -0
  117. package/docs/plans/workflow-discovery-model-discovery.md +74 -0
  118. package/docs/plans/workflow-discovery-model-review.md +48 -0
  119. package/docs/plans/workflow-source-setup-phase-1.md +245 -0
  120. package/docs/plans/workflow-source-setup-phase-2.md +361 -0
  121. package/docs/plans/workflow-staleness-detection-candidates.md +104 -0
  122. package/docs/plans/workflow-staleness-detection-review.md +58 -0
  123. package/docs/plans/workflow-staleness-detection.md +80 -0
  124. package/docs/plans/workflow-v2-design.md +69 -0
  125. package/docs/plans/workflow-v2-roadmap.md +74 -0
  126. package/docs/plans/workflow-validation-design.md +98 -0
  127. package/docs/plans/workflow-validation-roadmap.md +108 -0
  128. package/docs/plans/workrail-platform-vision.md +420 -0
  129. package/docs/reference/agent-context-cleaner-snippet.md +94 -0
  130. package/docs/reference/agent-context-guidance.md +140 -0
  131. package/docs/reference/context-optimization.md +284 -0
  132. package/docs/reference/example-workflow-repository-template/.github/workflows/validate.yml +125 -0
  133. package/docs/reference/example-workflow-repository-template/README.md +268 -0
  134. package/docs/reference/example-workflow-repository-template/workflows/example-workflow.json +80 -0
  135. package/docs/reference/external-workflow-repositories.md +916 -0
  136. package/docs/reference/feature-flags-architecture.md +472 -0
  137. package/docs/reference/feature-flags.md +349 -0
  138. package/docs/reference/god-tier-workflow-validation.md +272 -0
  139. package/docs/reference/loop-optimization.md +209 -0
  140. package/docs/reference/loop-validation.md +176 -0
  141. package/docs/reference/loops.md +465 -0
  142. package/docs/reference/mcp-platform-constraints.md +59 -0
  143. package/docs/reference/recovery.md +88 -0
  144. package/docs/reference/releases.md +177 -0
  145. package/docs/reference/troubleshooting.md +105 -0
  146. package/docs/reference/workflow-execution-contract.md +998 -0
  147. package/docs/roadmap/README.md +22 -0
  148. package/docs/roadmap/legacy-planning-status.md +103 -0
  149. package/docs/roadmap/now-next-later.md +70 -0
  150. package/docs/roadmap/open-work-inventory.md +389 -0
  151. package/docs/tickets/README.md +39 -0
  152. package/docs/tickets/next-up.md +76 -0
  153. package/docs/workflow-management.md +317 -0
  154. package/docs/workflow-templates.md +423 -0
  155. package/docs/workflow-validation.md +184 -0
  156. package/docs/workflows.md +254 -0
  157. package/package.json +3 -1
  158. package/spec/authoring-spec.json +61 -16
  159. package/workflows/workflow-for-workflows.json +252 -93
  160. package/workflows/workflow-for-workflows.v2.json +188 -77
@@ -0,0 +1,505 @@
1
+ # Configuration
2
+
3
+ WorkRail can be configured through environment variables, a config file, and file paths.
4
+
5
+ ## Config File
6
+
7
+ `~/.workrail/config.json` is a persistent, per-user configuration file. All IDEs pick it up automatically -- no MCP `env` block changes needed.
8
+
9
+ ### Location
10
+
11
+ ```
12
+ ~/.workrail/config.json
13
+ ```
14
+
15
+ ### Format
16
+
17
+ A flat JSON object whose keys are env var names and whose values are strings:
18
+
19
+ ```json
20
+ {
21
+ "WORKRAIL_LOG_LEVEL": "INFO",
22
+ "WORKRAIL_CLEAN_RESPONSE_FORMAT": "true",
23
+ "CACHE_TTL": "600000"
24
+ }
25
+ ```
26
+
27
+ ### Precedence
28
+
29
+ ```
30
+ process.env (highest -- always wins)
31
+ +
32
+ ~/.workrail/config.json (defaults)
33
+ +
34
+ compiled defaults (lowest)
35
+ ```
36
+
37
+ Environment variables set in the MCP `env` block, shell, or system always override the config file.
38
+
39
+ ### Excluded keys
40
+
41
+ The following keys are intentionally ignored in the config file and must be set via `process.env` only:
42
+
43
+ - `*_TOKEN` -- authentication tokens (security)
44
+ - `NODE_ENV`, `VITEST` -- injected by the Node.js / test runtime
45
+
46
+ ### Generate a template
47
+
48
+ ```bash
49
+ workrail init --config
50
+ ```
51
+
52
+ Creates `~/.workrail/config.json` with all supported keys commented out and their default values shown. If the file already exists, prints its current contents without overwriting.
53
+
54
+ ---
55
+
56
+ ## Quick Start
57
+
58
+ For most users, no configuration is needed. Just add WorkRail to your MCP client:
59
+
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "workrail": {
64
+ "command": "npx",
65
+ "args": ["-y", "@exaudeus/workrail"]
66
+ }
67
+ }
68
+ }
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Workflow Sources
74
+
75
+ WorkRail loads workflows from multiple sources with priority-based merging (later sources override
76
+ earlier ones with the same ID).
77
+
78
+ ### Priority Order (lowest to highest)
79
+
80
+ 1. **Bundled** – Built-in workflows shipped with WorkRail
81
+ 2. **User** – Personal workflows in `~/.workrail/workflows/`
82
+ 3. **Custom Paths** – Directories in `WORKFLOW_STORAGE_PATH`
83
+ 4. **Git Repositories** – External repos via `WORKFLOW_GIT_REPOS`
84
+ 5. **Project** – Project-specific workflows in `./workflows/` (relative to cwd)
85
+
86
+ ### Source Control
87
+
88
+ | Variable | Default | Description |
89
+ |----------|---------|-------------|
90
+ | `WORKFLOW_INCLUDE_BUNDLED` | `true` | Include built-in workflows |
91
+ | `WORKFLOW_INCLUDE_USER` | `true` | Include `~/.workrail/workflows/` |
92
+ | `WORKFLOW_INCLUDE_PROJECT` | `true` | Include `./workflows/` from cwd |
93
+ | `WORKFLOW_STORAGE_PATH` | – | Additional directories (colon-separated) |
94
+
95
+ **Example: Disable bundled workflows**
96
+
97
+ ```bash
98
+ WORKFLOW_INCLUDE_BUNDLED=false
99
+ ```
100
+
101
+ **Example: Add custom directories**
102
+
103
+ ```bash
104
+ WORKFLOW_STORAGE_PATH=/path/to/team-workflows:/path/to/shared-workflows
105
+ ```
106
+
107
+ ---
108
+
109
+ ## Git Repositories
110
+
111
+ Load workflows from GitHub, GitLab, Bitbucket, or any Git repository.
112
+
113
+ ### Basic Setup
114
+
115
+ ```json
116
+ {
117
+ "mcpServers": {
118
+ "workrail": {
119
+ "command": "npx",
120
+ "args": ["-y", "@exaudeus/workrail"],
121
+ "env": {
122
+ "WORKFLOW_GIT_REPOS": "https://github.com/your-org/workflows.git",
123
+ "GITHUB_TOKEN": "ghp_xxxx"
124
+ }
125
+ }
126
+ }
127
+ }
128
+ ```
129
+
130
+ ### Multiple Repositories
131
+
132
+ Comma-separated list (later repos override earlier ones):
133
+
134
+ ```bash
135
+ WORKFLOW_GIT_REPOS=https://github.com/community/workflows.git,https://github.com/myteam/workflows.git
136
+ ```
137
+
138
+ ### Authentication
139
+
140
+ **Service-specific tokens (recommended):**
141
+
142
+ | Service | Variable | Example |
143
+ |---------|----------|---------|
144
+ | GitHub | `GITHUB_TOKEN` | `ghp_xxxxxxxxxxxx` |
145
+ | GitLab | `GITLAB_TOKEN` | `glpat_xxxxxxxxxx` |
146
+ | Bitbucket | `BITBUCKET_TOKEN` | `xxxxxxxxxxxxxxxx` |
147
+
148
+ **Self-hosted Git (hostname-based):**
149
+
150
+ Convert hostname to env var: replace `.` and `-` with `_`, uppercase, add `GIT_` prefix and `_TOKEN`
151
+ suffix.
152
+
153
+ | Hostname | Variable |
154
+ |----------|----------|
155
+ | `git.company.com` | `GIT_COMPANY_COM_TOKEN` |
156
+ | `gitlab.internal.org` | `GIT_GITLAB_INTERNAL_ORG_TOKEN` |
157
+
158
+ **SSH keys (no token needed):**
159
+
160
+ ```bash
161
+ WORKFLOW_GIT_REPOS=git@github.com:company/workflows.git
162
+ ```
163
+
164
+ Uses your `~/.ssh/` keys automatically.
165
+
166
+ **Generic fallback:**
167
+
168
+ ```bash
169
+ GIT_TOKEN=xxxx # Used if no specific token found
170
+ WORKFLOW_GIT_AUTH_TOKEN=xxxx # Alternative fallback
171
+ ```
172
+
173
+ ### Git Configuration
174
+
175
+ | Variable | Default | Description |
176
+ |----------|---------|-------------|
177
+ | `WORKFLOW_GIT_REPOS` | – | Comma-separated repo URLs or JSON array |
178
+ | `WORKFLOW_GIT_REPO_URL` | – | Single repo URL (alternative) |
179
+ | `WORKFLOW_GIT_REPO_BRANCH` | `main` | Branch to use |
180
+ | `WORKFLOW_GIT_SYNC_INTERVAL` | `60` | Minutes between sync |
181
+
182
+ ### Repository Structure
183
+
184
+ Your repository should have a `workflows/` directory:
185
+
186
+ ```
187
+ your-repo/
188
+ ├── workflows/
189
+ │ ├── team-review.json
190
+ │ ├── deploy-process.json
191
+ │ └── onboarding.json
192
+ └── README.md
193
+ ```
194
+
195
+ ### Advanced: JSON Configuration
196
+
197
+ For complex setups, use JSON array:
198
+
199
+ ```bash
200
+ WORKFLOW_GIT_REPOS='[
201
+ {
202
+ "repositoryUrl": "https://github.com/community/workflows.git",
203
+ "branch": "main",
204
+ "syncInterval": 1440
205
+ },
206
+ {
207
+ "repositoryUrl": "https://github.com/myteam/workflows.git",
208
+ "branch": "production",
209
+ "syncInterval": 60
210
+ }
211
+ ]'
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Project Binding Overrides
217
+
218
+ Workflows that declare `extensionPoints` can be customized at the project level by creating `.workrail/bindings.json` in your project root.
219
+
220
+ ```json
221
+ {
222
+ "my-workflow": {
223
+ "design_review": "my-team-design-review"
224
+ }
225
+ }
226
+ ```
227
+
228
+ The file is looked up relative to the `workspacePath` passed to `start_workflow` and `continue_workflow` (falls back to the MCP root URI, then `process.cwd()`).
229
+
230
+ **Gitignore for personal overrides:**
231
+
232
+ ```
233
+ .workrail/bindings.json
234
+ ```
235
+
236
+ **Commit for team-wide defaults** — the file is plain JSON and safe to version.
237
+
238
+ For full documentation, see [Extension Points](authoring.md#extension-points).
239
+
240
+ ---
241
+
242
+ ## Cache & Performance
243
+
244
+ | Variable | Default | Description |
245
+ |----------|---------|-------------|
246
+ | `WORKRAIL_CACHE_DIR` | `~/.workrail/cache` | Cache directory for Git repos |
247
+ | `CACHE_TTL` | `300000` | Workflow cache TTL in milliseconds (5 min) |
248
+
249
+ ---
250
+
251
+ ## Logging
252
+
253
+ | Variable | Default | Description |
254
+ |----------|---------|-------------|
255
+ | `WORKRAIL_LOG_LEVEL` | `SILENT` | Log level: `DEBUG`, `INFO`, `WARN`, `ERROR`, `SILENT` |
256
+ | `WORKRAIL_LOG_FORMAT` | `human` | Log format: `human` or `json` |
257
+
258
+ **Log levels:**
259
+
260
+ - `DEBUG` – Verbose (cloning, pulling, file operations)
261
+ - `INFO` – Key operations (initialization, workflows loaded)
262
+ - `WARN` – Warnings (branch fallbacks, pull failures)
263
+ - `ERROR` – Errors only
264
+ - `SILENT` – No logging (default for MCP)
265
+
266
+ Logs go to **stderr** (stdout is reserved for MCP protocol).
267
+
268
+ **Example with logging:**
269
+
270
+ ```json
271
+ {
272
+ "mcpServers": {
273
+ "workrail": {
274
+ "command": "npx",
275
+ "args": ["-y", "@exaudeus/workrail"],
276
+ "env": {
277
+ "WORKRAIL_LOG_LEVEL": "INFO"
278
+ }
279
+ }
280
+ }
281
+ }
282
+ ```
283
+
284
+ ---
285
+
286
+ ## Local Development
287
+
288
+ ### Initialize User Directory
289
+
290
+ ```bash
291
+ workrail init
292
+ ```
293
+
294
+ Creates `~/.workrail/workflows/` with a sample workflow.
295
+
296
+ ### CLI Commands
297
+
298
+ ```bash
299
+ workrail list # List all available workflows
300
+ workrail list --verbose # Detailed listing
301
+ workrail validate file.json # Validate a workflow file
302
+ workrail schema # Print workflow JSON schema
303
+ ```
304
+
305
+ ### Project Workflows
306
+
307
+ Create a `workflows/` directory in your project root:
308
+
309
+ ```bash
310
+ mkdir workflows
311
+ # Add your .json workflow files here
312
+ ```
313
+
314
+ These will be auto-discovered when WorkRail runs from that directory.
315
+
316
+ ---
317
+
318
+ ## MCP Client Configuration Examples
319
+
320
+ ### Claude Code / Claude Desktop
321
+
322
+ #### Claude Desktop App
323
+
324
+ File: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or equivalent
325
+
326
+ ```json
327
+ {
328
+ "mcpServers": {
329
+ "workrail": {
330
+ "command": "npx",
331
+ "args": ["-y", "@exaudeus/workrail"]
332
+ }
333
+ }
334
+ }
335
+ ```
336
+
337
+ #### Claude Code CLI
338
+
339
+ The CLI has per-project configuration. Use `claude mcp add`:
340
+
341
+ ```bash
342
+ claude mcp add workrail npx -y @exaudeus/workrail
343
+ ```
344
+
345
+ This creates/updates `.claude.json` in your project root. To configure environment variables:
346
+
347
+ ```json
348
+ {
349
+ "projects": {
350
+ "/path/to/your/project": {
351
+ "mcpServers": {
352
+ "workrail": {
353
+ "type": "stdio",
354
+ "command": "npx",
355
+ "args": ["-y", "@exaudeus/workrail"],
356
+ "env": {
357
+ "WORKFLOW_STORAGE_PATH": "/path/to/custom/workflows"
358
+ }
359
+ }
360
+ }
361
+ }
362
+ }
363
+ }
364
+ ```
365
+
366
+ #### workrail-executor Agent (Recommended)
367
+
368
+ For delegating workflow execution to subagents in Claude Code, create `~/.claude/agents/workrail-executor.md`:
369
+
370
+ ```markdown
371
+ ---
372
+ name: workrail-executor
373
+ 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.
374
+ 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
375
+ ---
376
+
377
+ You are the WorkRail executor. Your job is to faithfully follow WorkRail workflow steps one at a time.
378
+
379
+ ## Core responsibilities
380
+
381
+ - Use `mcp__workrail__start_workflow` to begin a workflow by name or ID.
382
+ - Use `mcp__workrail__continue_workflow` with a `continueToken` to advance after completing a step.
383
+ - Use `mcp__workrail__checkpoint_workflow` to save progress and return a resume token when asked or when ending a session.
384
+ - Use `mcp__workrail__list_workflows` to show available workflows.
385
+ - Use `mcp__workrail__inspect_workflow` to preview a workflow's steps before starting.
386
+
387
+ ## Execution rules
388
+
389
+ 1. **Read each step carefully.** The step prompt is your instruction. Execute it fully before advancing.
390
+ 2. **Do not skip steps.** Every step must be completed in order.
391
+ 3. **Provide required notes.** Steps that require notes (`notesOptional: false`) must receive substantive notes before you call `continue_workflow`. Pass them via the `output.notesMarkdown` parameter.
392
+ 4. **Advance only when done.** Call `continue_workflow` only after the step's work is complete.
393
+ 5. **Checkpoint on request.** If the user asks to pause or save progress, call `mcp__workrail__checkpoint_workflow` and share the resume token.
394
+ 6. **Report clearly.** After each step, briefly summarize what was done before moving on.
395
+
396
+ ## Token handling
397
+
398
+ - `continueToken` (`ct_` prefix) — use with `continue_workflow` to advance.
399
+ - `checkpointToken` / `resumeToken` (`cp_` or `st_` prefix) — use with `checkpoint_workflow` or `continue_workflow` to save/rehydrate.
400
+ - Never mix token types.
401
+
402
+ ## Workflow complete
403
+
404
+ When `isComplete: true` is returned, summarize all work done across the workflow and confirm completion to the user.
405
+ ```
406
+
407
+ After creating this file, the agent becomes available via the Agent tool:
408
+
409
+ ```
410
+ Agent(subagent_type="workrail-executor", prompt="Start the bug-investigation-agentic workflow...")
411
+ ```
412
+
413
+ ### Cursor
414
+
415
+ File: `.cursor/mcp.json` in your project
416
+
417
+ ```json
418
+ {
419
+ "mcpServers": {
420
+ "workrail": {
421
+ "command": "npx",
422
+ "args": ["-y", "@exaudeus/workrail"],
423
+ "cwd": "/path/to/your/project"
424
+ }
425
+ }
426
+ }
427
+ ```
428
+
429
+ ### With Custom Workflows
430
+
431
+ ```json
432
+ {
433
+ "mcpServers": {
434
+ "workrail": {
435
+ "command": "npx",
436
+ "args": ["-y", "@exaudeus/workrail"],
437
+ "env": {
438
+ "WORKFLOW_STORAGE_PATH": "/path/to/custom/workflows",
439
+ "WORKFLOW_GIT_REPOS": "https://github.com/team/workflows.git",
440
+ "GITHUB_TOKEN": "ghp_xxxx"
441
+ },
442
+ "cwd": "/path/to/project"
443
+ }
444
+ }
445
+ }
446
+ ```
447
+
448
+ ### Docker
449
+
450
+ ```json
451
+ {
452
+ "mcpServers": {
453
+ "workrail": {
454
+ "command": "docker",
455
+ "args": ["run", "--rm", "-i", "workrail-mcp"]
456
+ }
457
+ }
458
+ }
459
+ ```
460
+
461
+ ---
462
+
463
+ ## Troubleshooting
464
+
465
+ ### Workflows Not Found
466
+
467
+ ```bash
468
+ # Check what sources are active
469
+ WORKRAIL_LOG_LEVEL=DEBUG npx @exaudeus/workrail
470
+
471
+ # Verify your custom path exists
472
+ ls -la ~/.workrail/workflows/
473
+
474
+ # Validate workflow files
475
+ workrail validate your-workflow.json
476
+ ```
477
+
478
+ ### Git Repository Issues
479
+
480
+ ```bash
481
+ # Test authentication
482
+ git ls-remote https://github.com/your-org/workflows.git
483
+
484
+ # Check if token works
485
+ curl -H "Authorization: token $GITHUB_TOKEN" \
486
+ https://api.github.com/repos/your-org/workflows
487
+
488
+ # Clear cache and retry
489
+ rm -rf ~/.workrail/cache
490
+ ```
491
+
492
+ ### Permission Issues
493
+
494
+ ```bash
495
+ chmod 755 ~/.workrail/workflows
496
+ chmod 644 ~/.workrail/workflows/*.json
497
+ ```
498
+
499
+ ---
500
+
501
+ ## See Also
502
+
503
+ - [Workflow Authoring Guide](authoring.md) – Create custom workflows
504
+ - [All Workflows](workflows.md) – Full list of included workflows
505
+ - [Advanced Features](advanced.md) – Loops, conditionals, validation