You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coordinators keep lifecycle status separate from Loop Health: `status` says where the run is, artifacts/checkpoints prove completion, and `loop_health` decides whether another retry is useful. Procedural skills use SOP/TWI-style point-of-use checklists so risky steps carry action, key point, why, evidence, exception, and guard close to the moment of use.
116
+
115
117
---
116
118
117
119
## MCP Servers (Optional)
118
120
119
-
Bundled MCP servers extend agent capabilities — hash-verified editing, code intelligence, and remote access. All skills work without MCP (fallback to built-in tools), but MCP servers improve accuracy and save tokens.
121
+
Bundled MCP servers extend agent capabilities — hash-verified editing, code intelligence, and remote access. All skills work without MCP (fallback to built-in tools), but MCP servers improve accuracy and save tokens. MCP errors stay as `status: "ERROR"` and include `failure_class`, `next_action`, and recovery fields so skills can feed transport/tool/auth/rate-limit signals into Loop Health without inventing a second retry loop.
Deterministic scope rule: `hex-line` and `hex-graph` keep `path` as the project anchor. In normal use the agent fills it automatically from the active file or project root, so users usually do not need to type it manually. `hex-ssh` runs on Windows/macOS/Linux hosts; remote shell tools stay POSIX-oriented, while SFTP transfers support platform-aware remote paths.
`summary` explains what failed. `next_action` names the immediate category of recovery. `recovery` gives the human-readable instruction.
214
+
`summary` explains what failed. `next_action` names the immediate category of recovery. `recovery` gives the human-readable instruction.`failure_class` is the machine-readable transport/tool/auth/rate-limit/timeout signal consumed by Loop Health.
208
215
209
216
On the MCP envelope level, ALSO set `isError: true` (see section 8).
210
217
211
218
Do not return raw stack traces in public tool outputs.
212
219
213
-
Text-grammar servers express errors inside their grammar. For `hex-graph`, the first line is `error <next_action> ...` and body lines carry details such as `!code=<CODE>` and `!message=<text>`.
220
+
Text-grammar servers express errors inside their grammar. For `hex-graph`, the first line is `error <next_action> ...` and body lines carry details such as `!code=<CODE>`, `!failure_class=<CLASS>`, and `!message=<text>`.
214
221
215
222
## 8. MCP Envelope
216
223
@@ -281,6 +288,7 @@ Before merging MCP output changes, check:
281
288
-`next_action` / `next_actions` use labels, not prose
282
289
-`summary` is compact and non-redundant
283
290
- structured error outputs set BOTH `isError: true` and `structuredContent.status: "ERROR"`
291
+
- structured and text-grammar errors include `failure_class` when a failure can affect retry usefulness
284
292
- structured tools declare `outputSchema` that matches actual `structuredContent` shape (schema-contract tests)
285
293
- text-grammar tools do not declare `outputSchema` and have grammar contract tests
286
294
- large results set `_meta["anthropic/maxResultSizeChars"]`
Copy file name to clipboardExpand all lines: docs/best-practice/MCP_TOOL_DESIGN_GUIDE.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,9 @@ Rule: if a tool can return >100 lines, it MUST support truncation or a compact m
39
39
|`NOOP_EDIT`| Edit produced identical content | Inform file already has desired content |
40
40
|`OUT_OF_RANGE`| Line number exceeds file length | Show boundary snippet with hashes |
41
41
42
-
Anti-pattern: raw stack traces. Agents cannot act on `Error: ENOENT` -- they need recovery actions.
42
+
Every public error also carries `failure_class`: `permission_denial`, `tool_missing`, `auth_missing`, `rate_limited`, `timeout_idle`, `timeout_productive`, or `unknown`. This lets skills feed MCP failures into Loop Health without making the MCP server own retry policy.
43
+
44
+
Anti-pattern: raw stack traces. Agents cannot act on `Error: ENOENT` or `Cannot read properties of undefined` -- they need `code`, `summary`, `next_action`, `recovery`, `failure_class`, and `error`.
43
45
44
46
## 4. Tool Descriptions — WHEN to use, not WHAT it does
45
47
@@ -91,14 +93,15 @@ When truncating, prefer structured metadata that tells the agent how to narrow n
91
93
92
94
Build a tool when: it saves tokens, adds verification, or prevents errors shell cannot catch.
Copy file name to clipboardExpand all lines: docs/plugins/agile-workflow.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
15
15
## What it does
16
16
17
-
Automates the full Agile delivery cycle. Coordinators advance only from machine-readable artifacts, while task-plan, execution, quality, and test-planning workers keep their own runtime state and stay standalone-capable. Integrates with Linear or works standalone with markdown files.
17
+
Automates the full Agile delivery cycle. Coordinators advance only from machine-readable artifacts, while task-plan, execution, quality, and test-planning workers keep their own runtime state and stay standalone-capable. Loop Health prevents same-error and no-progress retry storms without changing lifecycle statuses. Integrates with Linear or works standalone with markdown files.
`ln-220`, `ln-300`, `ln-400`, `ln-510`, and `ln-520` keep coordinator runtime state and checkpoint child worker runs for resume. `ln-221/222`, `ln-301/302`, `ln-401..404`, `ln-511..514`, and `ln-521..523` remain standalone-capable workers with their own run-scoped state and summaries. `ln-1000` advances only from coordinator stage artifacts, while `ln-310` runs registry-configured external-agent review before execution begins.
59
+
`ln-220`, `ln-300`, `ln-400`, `ln-510`, and `ln-520` keep coordinator runtime state and checkpoint child worker runs for resume. `ln-400` and `ln-1000` also record `loop_health` when an attempt repeats a task, worker, stage, error, or validation segment. `ln-221/222`, `ln-301/302`, `ln-401..404`, `ln-511..514`, and `ln-521..523` remain standalone-capable workers with their own run-scoped state and summaries. `ln-1000` advances only from coordinator stage artifacts, while `ln-310` runs registry-configured external-agent review before execution begins.
0 commit comments