diff --git a/CHANGELOG.md b/CHANGELOG.md index a06257f..e9e40f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- **Skill relay-depth guidance matches policy enforcement (T696).** The skill now says ask allows 6 hops and collaborate, autonomous and yolo have no limit. A regression test checks the documented limits against `LEVEL_MAX_HOP`. + ## 0.5.47 (2026-10-16) - **Service-hosted OpenCode sessions stay wakeable after MCP eviction (T688).** OpenCode stops an idle session's MCP about hourly, which releases its lease. T659 kept standalone sessions wakeable through their plugin's poll; a session hosted by the shared `opencode serve --service` is now a wake target too while that service process (same pid and birth) lives, and the wake posts to the service with `resume: true` and a verified receipt. A lease held by another session of the agent still blocks it. docs/OPENCODE.md recommends plain `opencode` (one service per machine, every project) for long-lived agents. diff --git a/skill/SKILL.md b/skill/SKILL.md index 635f824..ffdc4ae 100644 --- a/skill/SKILL.md +++ b/skill/SKILL.md @@ -250,7 +250,7 @@ wake only queues a short pointer to the inbox; it never means the recipient read - Check the receipt's `recipients[].state` (`live-wake` or `live-next-prompt`) rather than assuming the send woke anyone. Relay depth counts only what you read from agents other than the recipients: answering the agent you heard from never -adds depth, forwarding to someone else does (ask allows 6, collaborate 20, autonomous/yolo no limit; the policy line shows it). +adds depth, forwarding to someone else does (ask 6, collaborate no limit, autonomous no limit, yolo no limit; the policy line shows it). ## Autonomy probes (`[mbx-probe]`) diff --git a/test/skill-relay-depth.test.ts b/test/skill-relay-depth.test.ts new file mode 100644 index 0000000..e5a3818 --- /dev/null +++ b/test/skill-relay-depth.test.ts @@ -0,0 +1,11 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { LEVEL_MAX_HOP } from "../src/policy.ts"; + +test("the skill relay-depth limits agree with policy enforcement", () => { + const skill = readFileSync(new URL("../skill/SKILL.md", import.meta.url), "utf8"); + const limits = Object.entries(LEVEL_MAX_HOP) + .map(([level, limit]) => `${level} ${Number.isFinite(limit) ? limit : "no limit"}`).join(", "); + assert.ok(skill.includes(`(${limits}; the policy line shows it).`), `skill must document: ${limits}`); +});