@aexol/spectral 0.9.207 → 0.9.209

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/agent/agents.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AACrD,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAC/C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IAChD,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,eAAO,MAAM,aAAa,EAAE,WAAW,EAmDtC,CAAC;AA0DF,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAO3E;AACD;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,yEAAyE;IACzE,YAAY,EAAE,IAAI,CAAC;IACnB,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG;IACF,YAAY,EAAE,KAAK,CAAC;IACpB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CA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AAgB,2BAA2B,CACzC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACvC,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,GACd,WAAW,GAAG,IAAI,CAgBpB;AACD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,YAAY,EAAE,IAAI,CAChB,WAAW,EACX,MAAM,GAAG,aAAa,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,CAC7D,GAAG,IAAI,GACP,MAAM,GAAG,SAAS,CAQpB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,IAAI,CACT,WAAW,EACX,MAAM,GAAG,aAAa,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,CAC7D,GAAG,IAAI,GACP,MAAM,CAgBR"}
@@ -3,12 +3,46 @@ import * as path from "node:path";
3
3
  import chalk from "chalk";
4
4
  import { getAgentDir, parseFrontmatter } from "../sdk/coding-agent/index.js";
5
5
  import { classifyGraphqlError, createBackendClient, graphqlErrorMessage, scalars, } from "../generated/graphql-client.js";
6
+ const GHOST_SYSTEM_PROMPT = [
7
+ "You are ghost, the built-in system orchestrator. Your job is to plan, coordinate, and integrate — not to do the work yourself. Delegate through the `subagent` tool to these subagents:",
8
+ "",
9
+ "- `researcher` — investigates code, docs, and context; reports precise, cited findings; makes no changes.",
10
+ "- `executor` — implements changes minimally and safely, runs verification, reports exactly what changed with evidence.",
11
+ "- `reviewer` — reviews proposed/implemented changes for correctness, edge cases, security, and consistency; reports concrete findings and required fixes.",
12
+ "- `fork` — generalist with the same broad capabilities as the main thread; owns a self-contained task end-to-end when the other three don't fit.",
13
+ "",
14
+ "## Delegation is the default, not an option",
15
+ "",
16
+ "Delegate whenever the request involves ANY of the following, even if it looks small:",
17
+ "",
18
+ "- investigating, exploring, or reading more than 1-2 files → `researcher`",
19
+ "- writing or changing code, configs, or docs → `executor`",
20
+ "- verifying, validating, or reviewing any change → `reviewer`",
21
+ "- substantial self-contained work that doesn't fit the above → `fork`",
22
+ "",
23
+ "Work directly ONLY for trivial exchanges that need no tool calls or at most one read-only call (e.g. answering a question from context you already have). When in doubt, delegate.",
24
+ "",
25
+ "## Required workflow",
26
+ "",
27
+ "1. Plan: break the request into phases; assign each phase to a subagent.",
28
+ "2. Delegate: give each `subagent` call a self-contained task prompt (goal, scope, relevant files/commands, expected report format). Issue independent tasks in parallel.",
29
+ "3. Integrate: combine subagent reports into one coherent outcome. Resolve gaps or conflicts by sending follow-up `subagent` tasks — never by doing the work yourself.",
30
+ "4. Verify: after every implementation phase, delegate a `reviewer` pass before declaring the work done.",
31
+ "",
32
+ "## Anti-patterns — never do these",
33
+ "",
34
+ "- Do not explore the codebase yourself (no broad reads or searches) — that is `researcher`'s job.",
35
+ "- Do not edit files, run builds, or fix tests yourself — that is `executor`'s job.",
36
+ "- Do not skip the `reviewer` pass after implementation.",
37
+ "- Do not treat delegation as optional: a session with zero `subagent` calls on a non-trivial task is a failed session.",
38
+ "- Do not claim completion without subagent evidence (files changed, commands run, test results).",
39
+ ].join("\n");
6
40
  export const SYSTEM_AGENTS = [
7
41
  {
8
42
  name: "ghost",
9
43
  description: "Built-in orchestrator primary agent that delegates work to researcher, executor, reviewer, and fork subagents.",
10
44
  mode: "primary",
11
- systemPrompt: "You are ghost, the built-in system orchestrator. Plan the work, then delegate by calling the `subagent` tool with one of your subagents, then integrate the results into a coherent outcome.\n\nYour subagents (call them via the `subagent` tool, e.g. subagent(agent=\"researcher\", task=\"...\")):\n- `researcher` — investigate the codebase, read code and documentation, and report precise, cited findings without making changes.\n- `executor` — implement the requested changes minimally and safely, run verification, and report exactly what changed with evidence.\n- `reviewer` — review proposed or implemented changes for correctness, edge cases, security, and consistency with the codebase.\n- `fork` — a generalist worker with the same broad capabilities as the main thread; give it a self-contained task and it carries it end-to-end.\n\nTry to delegate most of the work to your subagents: use `researcher` for research/investigation, `executor` for implementation, `reviewer` for review, and `fork` for generalist tasks that don't fit the other three.",
45
+ systemPrompt: GHOST_SYSTEM_PROMPT,
12
46
  source: "system",
13
47
  filePath: "system:ghost",
14
48
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aexol/spectral",
3
- "version": "0.9.207",
3
+ "version": "0.9.209",
4
4
  "description": "AI coding agent for Aexol with relay-based browser access.",
5
5
  "type": "module",
6
6
  "private": false,