|
1 | | -/** |
2 | | - * Explorer worker (CL-7020 / CL-7015 rename from explore). |
3 | | - * Map/read against the brief — scannable findings only; never implement, review, or discover the fleet. |
4 | | - * |
5 | | - * Ships as the @corbits/code-agent-explorer workspace package: the tool allowlist |
6 | | - * lives here so the package stays importable without the app. Drift against |
7 | | - * the app read surface fails src/agent/directors/explorer/package.test.ts. |
8 | | - */ |
9 | | -export type AgentPackage = { |
10 | | - readonly id: "explorer"; |
11 | | - readonly primaryIntent: string; |
12 | | - readonly outOfLane: readonly string[]; |
13 | | - readonly description: string; |
14 | | - readonly systemPrompt: string; |
15 | | - /** Unset — explorer never attaches skill bodies at spawn. */ |
16 | | - readonly attachedSkills?: readonly string[]; |
17 | | - /** Unset — explorer declares no skill scope. */ |
18 | | - readonly optionalSkills?: readonly string[]; |
19 | | - readonly tools: { |
20 | | - readonly allow: readonly string[]; |
21 | | - }; |
22 | | - readonly spawn: { |
23 | | - readonly maySpawn: false; |
24 | | - }; |
25 | | - readonly modelRole: "explore"; |
26 | | - readonly tier: "leaf"; |
27 | | -}; |
28 | | - |
29 | | -const EXPLORER_TOOLS = [ |
30 | | - "read_file", |
31 | | - "grep", |
32 | | - "search_files", |
33 | | - "list_dir", |
34 | | - "lsp", |
35 | | - "run_shell", |
36 | | - "web_fetch", |
37 | | - "web_search", |
38 | | - "skill_search", |
39 | | - "use_skill", |
40 | | -] as const; |
41 | | - |
42 | | -export const explorerPackage: AgentPackage = { |
43 | | - id: "explorer", |
44 | | - primaryIntent: "Map and read the codebase; no product edits", |
45 | | - outOfLane: [ |
46 | | - "product write paths", |
47 | | - "drive-by fixes", |
48 | | - "shipping features", |
49 | | - "review severity theater", |
50 | | - ], |
51 | | - description: "Read-only exploration", |
52 | | - systemPrompt: `You are ExplorerDirector (Explorer), a specialist in Corbits Code. |
53 | | -
|
54 | | -PRIMARY INTENT: map and read the codebase to answer the brief. Read, search, report. Do not implement product changes. |
55 | | -You are the explore lane only — not Coder, not Reviewer, not an orchestrator. Do not spawn specialists. Blinders on: do not discover or enumerate the fleet; stay inside the brief's question. |
56 | | -
|
57 | | -Map against the brief: |
58 | | -1. Map every success_criteria item to facts you will gather (or Blockers if you cannot). |
59 | | -2. Read and search only what the brief requires — cite paths, symbols, call flow / ownership. |
60 | | -3. Prefer one thorough pass; expand Findings or change approach rather than re-reading the same paths. |
61 | | -4. Report a scannable map, Paths read, and Blockers. |
62 | | -
|
63 | | -DONE GATE: Stop when every success_criteria item from the brief is answered OR explicitly blocked under Blockers. Do not invent architecture, ship code, or expand the brief after criteria are satisfied. If the ask needs implementation or review, report Blockers — do not become Coder or Reviewer. |
64 | | -
|
65 | | -FINDINGS SHAPE: Findings must be a scannable map — key paths, symbols, call flow / ownership — not optional prose dump. Cite paths. No drive-by refactors, no feature work, no review severity theater. |
66 | | -
|
67 | | -FINISH BIAS: Prefer one thorough pass then report. Expand Findings, change approach, or write the final report — do not keep re-reading the same paths. |
68 | | -
|
69 | | -OUT OF LANE: product writes, drive-by fixes, shipping features, review severity theater, orchestration, spawning specialists, fleet discovery, becoming Coder/Reviewer/orchestrator as primary.`, |
70 | | - tools: { allow: [...EXPLORER_TOOLS] }, |
71 | | - spawn: { maySpawn: false }, |
72 | | - tier: "leaf", |
73 | | - modelRole: "explore", |
74 | | -}; |
| 1 | +// Public surface — re-exports only (no logic). Exports exactly |
| 2 | +// `agent, defineAgent, director, tools, systemPrompt, config`. No `workflow` |
| 3 | +// export. No Corbits shared package is re-exported; the package's `director` |
| 4 | +// structurally satisfies the app's `DirectorPackage` (app-side drift-guard). |
| 5 | +export { agent, defineAgent } from "./agent.js"; |
| 6 | +export { director } from "./director.js"; |
| 7 | +export { tools } from "./toolset.js"; |
| 8 | +export { systemPrompt } from "./prompt.js"; |
| 9 | +export { config } from "./config.js"; |
0 commit comments