Skip to content

Commit 28cde57

Browse files
committed
refactor(agents): one toolset source, one nudge runtime, one lifecycle projection
The ten workspace toolset files were literal copies of the canonical tool-sets constants; they import them now. The agents' agent.ts wrappers defined zero-importer factories that the runtime never consumed (definitions are built in assemble-runtime / run.ts through @intx/agent); they are gone along with their re-exports and 22 stale allowlist rows. ChatDirector and SubAgentDirector share a single director-core nudge module instead of carrying two withEphemeralNudge implementations, stop-policy loses its deprecated input shadow, and lifecycle state checks fold into one isRunEligible projection. The qa-lead outlier gets the same package-shape drift test as the other directors. The live-tool-dispatch shim stays: the vendored agent still snapshots its tool map at construction, so the shim is load-bearing. Step-grant/workspace-policy separation and per-director prompt data are untouched.
1 parent 69c4ed4 commit 28cde57

51 files changed

Lines changed: 264 additions & 669 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎agents/artist/README.md‎

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,18 @@
33
## What this is
44

55
Ready `@corbits/code-agent-artist` agent + independently importable components:
6-
`agent`, `defineAgent`, `director`, `tools`, `systemPrompt`, `config`.
7-
8-
## Consume (runLocal)
9-
10-
```ts
11-
import { agent } from "@corbits/code-agent-artist";
12-
const run = runLocal(defining(agent), env);
13-
```
14-
15-
## Consume (deploy runWorkflow / hub / sidecar)
16-
17-
Hand the same `AgentDefinition` to a workflow — the package never exports a
18-
workflow itself.
6+
`director`, `tools`, `systemPrompt`, `config`.
197

208
## Remix components
219

2210
```ts
23-
import { director, tools, systemPrompt, config } from "@corbits/code-agent-artist";
24-
defineAgent({ director, ... }); // or swap tools / systemPrompt / config
11+
import {
12+
director,
13+
tools,
14+
systemPrompt,
15+
config,
16+
} from "@corbits/code-agent-artist";
17+
// or swap tools / systemPrompt / config
2518
```
2619

2720
Each of `director`, `tools`, `systemPrompt`, and `config` is a named,
@@ -30,6 +23,6 @@ independently importable part.
3023
## Single authority
3124

3225
`prompt.ts` `systemPrompt.build()` is byte-stable (the raw card, no formatting).
33-
`toolset.ts` `tools` literal equals the `REVIEW_TOOLS` surface constant in
26+
`toolset.ts` `tools` re-exports the `REVIEW_TOOLS` surface constant in
3427
`src/agent/directors/tool-sets.ts`; drift is enforced by the in-tree drift-guard
3528
`src/agent/directors/artist/package.test.ts`.

‎agents/artist/src/agent.ts‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎agents/artist/src/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export { agent, defineAgent } from "./agent.js";
21
export { director } from "./director.js";
32
export { tools } from "./toolset.js";
43
export { systemPrompt } from "./prompt.js";

‎agents/artist/src/toolset.ts‎

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
export const tools: readonly string[] = [
2-
"read_file",
3-
"grep",
4-
"search_files",
5-
"list_dir",
6-
"lsp",
7-
"run_shell",
8-
"web_fetch",
9-
"web_search",
10-
"skill_search",
11-
"use_skill",
12-
"write_file",
13-
"edit_file",
14-
"delete_file",
15-
] as const;
1+
import { REVIEW_TOOLS } from "../../../src/agent/directors/tool-sets.js";
2+
3+
export const tools = REVIEW_TOOLS;

‎agents/coder/README.md‎

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,28 @@
33
## What this is
44

55
Ready `@corbits/code-agent-coder` agent + independently importable components:
6-
`agent`, `defineAgent`, `director`, `tools`, `systemPrompt`, `config`. Coder is
6+
`director`, `tools`, `systemPrompt`, `config`. Coder is
77
the implementation specialist: minimal safe diffs, root-cause fixes at the proper
88
layer, zero unnecessary abstractions, tests landed with changes, repo check gate.
99

10-
## Consume (runLocal)
11-
12-
```ts
13-
import { agent } from "@corbits/code-agent-coder";
14-
const run = runLocal(defining(agent), env);
15-
```
16-
17-
## Consume (deploy runWorkflow / hub / sidecar)
18-
19-
Hand the same `AgentDefinition` to a workflow — the package never exports a
20-
workflow itself.
21-
2210
## Remix components
2311

2412
```ts
25-
import { director, tools, systemPrompt, config } from "@corbits/code-agent-coder";
26-
defineAgent({ director, ... }); // or swap tools / systemPrompt / config
13+
import {
14+
director,
15+
tools,
16+
systemPrompt,
17+
config,
18+
} from "@corbits/code-agent-coder";
19+
// or swap tools / systemPrompt / config
2720
```
2821

29-
Each of `agent`, `defineAgent`, `director`, `tools`, `systemPrompt`, `config` is a
22+
Each of `director`, `tools`, `systemPrompt`, `config` is a
3023
named, independently importable part.
3124

3225
## Single authority
3326

3427
`prompt.ts` `systemPrompt.build()` is byte-stable (the raw card, no formatting).
35-
`toolset.ts` `tools` literal equals the `BUILD_TOOLS` surface constant in
28+
`toolset.ts` `tools` re-exports the `BUILD_TOOLS` surface constant in
3629
`src/agent/directors/tool-sets.ts`; drift is enforced by the in-tree drift-guard
3730
`src/agent/directors/coder/package.test.ts`.

‎agents/coder/src/agent.ts‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎agents/coder/src/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export { agent, defineAgent } from "./agent.js";
21
export { director } from "./director.js";
32
export { tools } from "./toolset.js";
43
export { systemPrompt } from "./prompt.js";

‎agents/coder/src/toolset.ts‎

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
// BUILD_TOOLS literal; drift-guarded against src/agent/directors/tool-sets.ts.
1+
import { BUILD_TOOLS } from "../../../src/agent/directors/tool-sets.js";
22

3-
export const tools = [
4-
"read_file",
5-
"grep",
6-
"search_files",
7-
"list_dir",
8-
"lsp",
9-
"run_shell",
10-
"web_fetch",
11-
"web_search",
12-
"skill_search",
13-
"use_skill",
14-
"write_file",
15-
"edit_file",
16-
"delete_file",
17-
] as const;
3+
export const tools = BUILD_TOOLS;

‎agents/designer/README.md‎

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,18 @@
33
## What this is
44

55
Ready `@corbits/code-agent-designer` agent + independently importable components:
6-
`agent`, `defineAgent`, `director`, `tools`, `systemPrompt`, `config`.
7-
8-
## Consume (runLocal)
9-
10-
```ts
11-
import { agent } from "@corbits/code-agent-designer";
12-
const run = runLocal(defining(agent), env);
13-
```
14-
15-
## Consume (deploy runWorkflow / hub / sidecar)
16-
17-
Hand the same `AgentDefinition` to a workflow — the package never exports a
18-
workflow itself.
6+
`director`, `tools`, `systemPrompt`, `config`.
197

208
## Remix components
219

2210
```ts
23-
import { director, tools, systemPrompt, config } from "@corbits/code-agent-designer";
24-
defineAgent({ director, ... }); // or swap tools / systemPrompt / config
11+
import {
12+
director,
13+
tools,
14+
systemPrompt,
15+
config,
16+
} from "@corbits/code-agent-designer";
17+
// or swap tools / systemPrompt / config
2518
```
2619

2720
Each of `director`, `tools`, `systemPrompt`, and `config` is a named,
@@ -30,6 +23,6 @@ independently importable part.
3023
## Single authority
3124

3225
`prompt.ts` `systemPrompt.build()` is byte-stable (the raw card, no formatting).
33-
`toolset.ts` `tools` literal equals the `REVIEW_TOOLS` surface constant in
26+
`toolset.ts` `tools` re-exports the `REVIEW_TOOLS` surface constant in
3427
`src/agent/directors/tool-sets.ts`; drift is enforced by the in-tree drift-guard
3528
`src/agent/directors/designer/package.test.ts`.

‎agents/designer/src/agent.ts‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)