Skip to content

Commit cc85e25

Browse files
committed
Fix prettier formatting for Skywalker prompt overhaul
1 parent 8eb7cce commit cc85e25

8 files changed

Lines changed: 79 additions & 51 deletions

File tree

docs/ARCHITECTURE.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -265,21 +265,21 @@ Every shipped specialist is a **director package** — a prompt-first `DirectorP
265265

266266
**Intent → director** (`task(intent=…)` when `agent` is omitted)
267267

268-
| Intent | Default director |
269-
| --------- | --------------------------------- |
270-
| implement | builder |
271-
| explore | explorer |
272-
| plan | counsel |
273-
| review | critic (override with `agent=…`) |
274-
| general | **none** — reclassify only |
268+
| Intent | Default director |
269+
| --------- | -------------------------------- |
270+
| implement | builder |
271+
| explore | explorer |
272+
| plan | counsel |
273+
| review | critic (override with `agent=…`) |
274+
| general | **none** — reclassify only |
275275

276276
**Spawn matrix**
277277

278-
| Who | Spawn rights |
279-
| --------------------------- | -------------------------------- |
280-
| skywalker (primary session) | Full closed fleet |
281-
| greybeard | intern, explorer, critic only |
282-
| All other directors | no `task` |
278+
| Who | Spawn rights |
279+
| --------------------------- | ----------------------------- |
280+
| skywalker (primary session) | Full closed fleet |
281+
| greybeard | intern, explorer, critic only |
282+
| All other directors | no `task` |
283283

284284
**Tool envelopes** prefer small `tools.allow` mounts over deny-everything. Shipped docs/design directors (shakespeare, rand, bruckheimer) mount write tools with no path-level lock. Lane routing is spawn policy (shakespeare = P/A/I docs, rand = DESIGN.md, bruckheimer = product discovery), not a file lock. There is no static per-package write-path declaration (CL-6952 removed it — no shipped director ever set one); instead the task tool records, without blocking, when two concurrently running dispatches land on the same cwd (see `intervention-log.ts`'s `conflict` class).
285285

@@ -422,12 +422,12 @@ Each `<base>/<skill-name>/SKILL.md` is one skill. Discovery dedupes by directory
422422

423423
A skill file begins with a YAML frontmatter block, followed by the body that holds the instructions. Discovery parses `description` and `disable-model-invocation`; `loadSkillCommands` also reads `user-invocable`. The skill's identifier (what `use_skill` and `/<skill-name>` take) is its directory name. A skill with no `SKILL.md` or an empty body is skipped.
424424

425-
| Field | Required | Description |
426-
| --------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
427-
| `description` | yes | One-line summary shown in the prompt's lazy skills listing and the slash picker |
428-
| `name` | conventional | Conventionally matches the directory name; the directory name is what is actually used as the identifier |
429-
| `user-invocable` | no | When `false`, `loadSkillCommands` skips slash synthesis; the skill remains `use_skill` only. Untagged skills still become slashes (marketplace BC) |
430-
| `disable-model-invocation` | no | When `true`, `discoverSkills` omits the skill from the lazy listing (but still claims the name for first-wins). Explicit `resolveSkillBody` / `use_skill("name")` still loads the body. Does not affect slash emission. |
425+
| Field | Required | Description |
426+
| -------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
427+
| `description` | yes | One-line summary shown in the prompt's lazy skills listing and the slash picker |
428+
| `name` | conventional | Conventionally matches the directory name; the directory name is what is actually used as the identifier |
429+
| `user-invocable` | no | When `false`, `loadSkillCommands` skips slash synthesis; the skill remains `use_skill` only. Untagged skills still become slashes (marketplace BC) |
430+
| `disable-model-invocation` | no | When `true`, `discoverSkills` omits the skill from the lazy listing (but still claims the name for first-wins). Explicit `resolveSkillBody` / `use_skill("name")` still loads the body. Does not affect slash emission. |
431431

432432
There is no skill `type` field required for model invocation — a skill body is plain instruction text. Background libraries (e.g. `git-worktrees`) set both `user-invocable: false` and `disable-model-invocation: true` so they are absent from slash and listing, yet recipes can still `use_skill("git-worktrees")`. `argument-hint` on frontmatter is preserved for the slash picker (greyed arg guidance). Multi-step orchestration is a separate mechanism (see Workflows above), not a skill `type`.
433433

docs/PRODUCT.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ Capabilities beyond the core toolset are opt-in plugins, enabled per workspace t
144144

145145
The primary session is always **orchestrator** (single-agent mode is gone). Its identity is **Skywalker** (product name remains Corbits Code; when asked its name, answer Skywalker): classify work, DIY tiny/single-file/one-route product edits, dispatch a **closed fleet of 16 directors** for substantial work, track the fleet, and synthesize. Product mutation tools (`write_file` / `edit_file` / `delete_file`) are mounted on the primary (CORE / `SKYWALKER_TOOLS`) — path tools are the DIY surface; spawn remains the default for substantial, multi-file, parallel, or specialist work. Shell file-writes stay denied. MCP tools are not re-filtered by a product-write deny list (that list is gone). There is no static per-package write-path declaration (CL-6952 removed it — no shipped director ever set one). A concurrent dispatch landing on the same working directory as another still-running lane is recorded as a `conflict` intervention, not blocked. Operator slash recipes (`/implement`, `/plan`, `/refactor`, `/review`, `/pull-request-review`, `/create-issue`, `/scribe`, `/interview`, `/ast-grep`) tell Skywalker which directors to spawn for substantial work; tiny/bounded edits may run on the primary.
146146

147-
| Lane | Directors |
148-
| --------- | ------------------------------------------------------------------------------------ |
149-
| Primary | skywalker |
147+
| Lane | Directors |
148+
| --------- | -------------------------------------------------------------------------------------- |
149+
| Primary | skywalker |
150150
| Eng | builder, explorer, counsel, intern, critic, greybeard, neckbeard, bruckheimer, gaasbot |
151-
| Design | draper, emil, rand |
152-
| Docs / QA | shakespeare, testsmith, tester |
151+
| Design | draper, emil, rand |
152+
| Docs / QA | shakespeare, testsmith, tester |
153153

154154
There is **no catch-all worker**. `task` requires `agent=…` or a non-general `intent` (implement/explore/plan/review→critic); bare dispatch and `intent=general` are refused. Named `task(agent=…)` selects a director package without requiring a plugin profile, except `skywalker` which is the primary session identity and is refused as a spawned worker. Nested spawn is runtime-enforced: only skywalker (full fleet allowlist) and greybeard (intern/explorer/critic) may spawn; other workers have no `task`. Primary omits an allowlist so plugin profiles remain reachable from the main session.
155155

plugins/corbits-skills/skills/dispatch/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ If the spec is vague, incomplete, or contradictory: stop and report Blockers. Do
3131

3232
| Work | Director |
3333
| ------------------------------------------------------------------------------------------------ | ------------------------- |
34-
| Map the codebase, gather facts | `task(agent="explorer")` |
35-
| Eng plan from a spec (no ship) | `task(agent="counsel")` |
36-
| Write `dispatch.yaml` / `plan.md` / status artifacts (mechanical brief; no product feature work) | `task(agent="builder")` |
37-
| Ship product code + tests | `task(agent="builder")` |
38-
| Review a landed task (defects, evidence, no fix) | `task(agent="critic")` |
34+
| Map the codebase, gather facts | `task(agent="explorer")` |
35+
| Eng plan from a spec (no ship) | `task(agent="counsel")` |
36+
| Write `dispatch.yaml` / `plan.md` / status artifacts (mechanical brief; no product feature work) | `task(agent="builder")` |
37+
| Ship product code + tests | `task(agent="builder")` |
38+
| Review a landed task (defects, evidence, no fix) | `task(agent="critic")` |
3939
| Architecture judgment before a large DAG | `task(agent="greybeard")` |
4040
| Independent suite / repro evidence | `task(agent="tester")` |
4141

src/agent/directors/critic/package.test.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ describe("criticPackage", () => {
4444
/returning Promise when callers expect a plain value/i,
4545
);
4646
expect(criticPackage.systemPrompt).toMatch(/blocking correctness defect/i);
47-
expect(criticPackage.systemPrompt).toMatch(
48-
/parameter order\/optionality\/return-type drift/i,
49-
);
47+
expect(criticPackage.systemPrompt).toMatch(/parameter order\/optionality\/return-type drift/i);
5048
expect(criticPackage.systemPrompt).toMatch(/Rank these as blocking, not style nits/i);
5149
});
5250

@@ -73,9 +71,7 @@ describe("criticPackage", () => {
7371
});
7472

7573
test("primaryIntent and outOfLane match critique lane", () => {
76-
expect(criticPackage.primaryIntent).toBe(
77-
"Evidence-based code review; never fix product code",
78-
);
74+
expect(criticPackage.primaryIntent).toBe("Evidence-based code review; never fix product code");
7975
expect(criticPackage.outOfLane).toContain("implementing fixes");
8076
expect(criticPackage.outOfLane).toContain("architecture portfolio without code evidence");
8177
expect(criticPackage.outOfLane).toContain("visual brand");

src/agent/directors/tool-sets.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,7 @@ export const DOCS_TOOLS = [
5959
export const REVIEW_TOOLS = [...READ_TOOLS, ...PRODUCT_WRITE_TOOLS] as const;
6060

6161
/** Mechanical intern: shell-first + path writes when the brief requires them. */
62-
export const INTERN_TOOLS = [
63-
"run_shell",
64-
"read_file",
65-
"list_dir",
66-
...PRODUCT_WRITE_TOOLS,
67-
] as const;
62+
export const INTERN_TOOLS = ["run_shell", "read_file", "list_dir", ...PRODUCT_WRITE_TOOLS] as const;
6863

6964
/** Nested orchestrator surface (greybeard / package filter): dispatch + path writes. */
7065
export const ORCHESTRATOR_TOOLS = [

src/agent/tools.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ import {
3939
type SubAgentProvider,
4040
type SubAgentSessionStore,
4141
} from "../subagent/index.js";
42-
import { createFleetRecords, createSpawnAgentTool, createWaitAgentsTool } from "../subagent/agent-fleet.js";
42+
import {
43+
createFleetRecords,
44+
createSpawnAgentTool,
45+
createWaitAgentsTool,
46+
} from "../subagent/agent-fleet.js";
4347
import {
4448
createCloseAgentTool,
4549
createResumeAgentTool,

src/subagent/retain-salvage.test.ts

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import { createSubAgentSessionStore } from "./session-store.js";
44
describe("retained session lifecycle", () => {
55
test("a salvaged (deadline/cancel) run lands resumable even though run.ts disposed its agent", () => {
66
const store = createSubAgentSessionStore({ maxCompleted: 5 });
7-
const s = store.start({ description: "worker", agentId: "builder", brief: "b", retained: true });
7+
const s = store.start({
8+
description: "worker",
9+
agentId: "builder",
10+
brief: "b",
11+
retained: true,
12+
});
813
store.markRunning(s.id);
914
// run.ts salvage path RETURNS a report (does not throw) with stopReason
1015
// "deadline", but leaves turnSucceeded=false so finally disposes the
@@ -21,7 +26,12 @@ describe("retained session lifecycle", () => {
2126

2227
test("cancelAll does not close retained completed sessions", () => {
2328
const store = createSubAgentSessionStore({ maxCompleted: 5 });
24-
const s = store.start({ description: "worker", agentId: "builder", brief: "b", retained: true });
29+
const s = store.start({
30+
description: "worker",
31+
agentId: "builder",
32+
brief: "b",
33+
retained: true,
34+
});
2535
let closed = false;
2636
store.registerClose(s.id, async () => {
2737
closed = true;
@@ -44,7 +54,12 @@ describe("retained session lifecycle", () => {
4454
test("retained completed sessions are bounded by maxRetained, not the display cap", () => {
4555
const store = createSubAgentSessionStore({ maxCompleted: 3, maxRetained: 3 });
4656
for (let i = 0; i < 50; i++) {
47-
const s = store.start({ description: `w${i}`, agentId: "builder", brief: "b", retained: true });
57+
const s = store.start({
58+
description: `w${i}`,
59+
agentId: "builder",
60+
brief: "b",
61+
retained: true,
62+
});
4863
store.registerClose(s.id, async () => {});
4964
store.complete(s.id, "done");
5065
}
@@ -54,7 +69,12 @@ describe("retained session lifecycle", () => {
5469

5570
test("a genuinely retained clean completion IS resumable, and cancelAll releases it", () => {
5671
const store = createSubAgentSessionStore({ maxCompleted: 5 });
57-
const s = store.start({ description: "worker", agentId: "builder", brief: "b", retained: true });
72+
const s = store.start({
73+
description: "worker",
74+
agentId: "builder",
75+
brief: "b",
76+
retained: true,
77+
});
5878
store.markRunning(s.id);
5979
let closed = false;
6080
store.registerClose(s.id, async () => {
@@ -71,7 +91,12 @@ describe("retained session lifecycle", () => {
7191

7292
test("clear() releases every retained session's close handle instead of dropping it silently", () => {
7393
const store = createSubAgentSessionStore({ maxCompleted: 5 });
74-
const s = store.start({ description: "worker", agentId: "builder", brief: "b", retained: true });
94+
const s = store.start({
95+
description: "worker",
96+
agentId: "builder",
97+
brief: "b",
98+
retained: true,
99+
});
75100
store.markRunning(s.id);
76101
let closed = false;
77102
store.registerClose(s.id, async () => {
@@ -84,7 +109,12 @@ describe("retained session lifecycle", () => {
84109

85110
test("close_agent during the setup window waits for the handle instead of falsely reporting shutdown", async () => {
86111
const store = createSubAgentSessionStore({ maxCompleted: 5 });
87-
const s = store.start({ description: "worker", agentId: "builder", brief: "b", retained: true });
112+
const s = store.start({
113+
description: "worker",
114+
agentId: "builder",
115+
brief: "b",
116+
retained: true,
117+
});
88118
// No registerClose yet — closeOne races the agent-setup window.
89119
const closePromise = store.closeOne(s.id, 200);
90120
let registeredClose = false;
@@ -100,7 +130,12 @@ describe("retained session lifecycle", () => {
100130

101131
test("close_agent gives up honestly (not a false shutdown) if the handle never arrives in time", async () => {
102132
const store = createSubAgentSessionStore({ maxCompleted: 5 });
103-
const s = store.start({ description: "worker", agentId: "builder", brief: "b", retained: true });
133+
const s = store.start({
134+
description: "worker",
135+
agentId: "builder",
136+
brief: "b",
137+
retained: true,
138+
});
104139
store.markRunning(s.id);
105140
const status = await store.closeOne(s.id, 30);
106141
expect(status).not.toBe("shutdown");

tests/unit/corbits-skills-catalog.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@ test("only background libs carry disable-model-invocation", async () => {
148148
});
149149

150150
test("linear-issue-workflow references use_skill(git-worktrees)", async () => {
151-
const skill = await Bun.file(
152-
join(pluginRoot, "skills/linear-issue-workflow/SKILL.md"),
153-
).text();
151+
const skill = await Bun.file(join(pluginRoot, "skills/linear-issue-workflow/SKILL.md")).text();
154152
expect(skill).toContain('use_skill("git-worktrees")');
155153
expect(skill).not.toContain("git worktree add");
156154
});

0 commit comments

Comments
 (0)