ceulen 0.5.1 → 0.7.0
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.
- package/CHANGELOG.md +317 -12
- package/README.md +87 -91
- package/extensions/lib/advisor-marker.ts +33 -0
- package/extensions/lib/panel.ts +25 -2
- package/extensions/lib/rate.ts +24 -0
- package/extensions/lib/registry.ts +93 -7
- package/extensions/lib/tools.ts +47 -0
- package/extensions/lib/usage-store.ts +33 -0
- package/extensions/modules/advisor/commands/advisor.ts +244 -0
- package/extensions/modules/advisor/configPanel.ts +194 -0
- package/extensions/modules/advisor/index.ts +217 -0
- package/extensions/modules/advisor/lib/config.ts +248 -0
- package/extensions/modules/advisor/lib/emission-guard.ts +153 -0
- package/extensions/modules/advisor/lib/isolated-model.ts +160 -0
- package/extensions/modules/advisor/lib/model-picker.ts +47 -0
- package/extensions/modules/advisor/lib/watcher.ts +286 -0
- package/extensions/modules/advisor/test/compliance.test.ts +125 -0
- package/extensions/modules/advisor/test/config.test.ts +202 -0
- package/extensions/modules/advisor/test/configPanel.test.ts +223 -0
- package/extensions/modules/advisor/test/emission-guard.test.ts +201 -0
- package/extensions/modules/advisor/test/isolated-model.test.ts +311 -0
- package/extensions/modules/advisor/test/model-picker.test.ts +32 -0
- package/extensions/modules/advisor/test/module.test.ts +586 -0
- package/extensions/modules/advisor/test/watcher.test.ts +478 -0
- package/extensions/modules/classifier/configPanel.ts +104 -0
- package/extensions/modules/classifier/index.ts +297 -0
- package/extensions/modules/classifier/lib/settings.ts +95 -0
- package/extensions/modules/classifier/test/classifier.test.ts +475 -0
- package/extensions/modules/composer/index.ts +152 -3
- package/extensions/modules/composer/lib/footer.ts +119 -0
- package/extensions/modules/composer/lib/shapes.ts +265 -26
- package/extensions/modules/composer/test/editor.test.ts +1 -1
- package/extensions/modules/composer/test/footer.test.ts +96 -0
- package/extensions/modules/composer/test/module.test.ts +113 -11
- package/extensions/modules/composer/test/screen.test.ts +29 -1
- package/extensions/modules/composer/test/shapes.test.ts +224 -8
- package/extensions/modules/config/defaultTools.ts +96 -0
- package/extensions/modules/config/index.ts +147 -7
- package/extensions/modules/config/piSettings.ts +254 -69
- package/extensions/modules/config/test/defaultTools.test.ts +122 -0
- package/extensions/modules/config/test/menu.test.ts +64 -0
- package/extensions/modules/config/test/panel.test.ts +38 -23
- package/extensions/modules/config/test/piSettings.test.ts +130 -3
- package/extensions/modules/config/test/renderTools.test.ts +71 -0
- package/extensions/modules/config/test/tools.test.ts +146 -0
- package/extensions/modules/fff/index.ts +2094 -0
- package/extensions/modules/fff/lib/query.ts +129 -0
- package/extensions/modules/fff/test/index.test.ts +607 -0
- package/extensions/modules/fff/test/query.test.ts +71 -0
- package/extensions/modules/munin/configPanel.ts +105 -0
- package/extensions/modules/munin/index.ts +641 -0
- package/extensions/modules/munin/lib/helpers.ts +471 -0
- package/extensions/modules/munin/lib/retry.ts +20 -0
- package/extensions/modules/munin/lib/sdk.ts +218 -0
- package/extensions/modules/munin/test/config.test.ts +168 -0
- package/extensions/modules/munin/test/configPanel.test.ts +161 -0
- package/extensions/modules/munin/test/extension.test.ts +224 -0
- package/extensions/modules/munin/test/helpers.test.ts +523 -0
- package/extensions/modules/munin/test/retry.test.ts +145 -0
- package/extensions/modules/munin/test/stale-protocol.test.ts +554 -0
- package/extensions/modules/plan/configPanel.ts +152 -0
- package/extensions/modules/plan/index.ts +917 -0
- package/extensions/modules/plan/lib/plan-tools.ts +72 -0
- package/extensions/modules/plan/lib/prompt.ts +65 -0
- package/extensions/modules/plan/lib/settings.ts +166 -0
- package/extensions/modules/plan/lib/shell-gate.ts +200 -0
- package/extensions/modules/plan/test/configPanel.test.ts +96 -0
- package/extensions/modules/plan/test/harness.ts +133 -0
- package/extensions/modules/plan/test/module.test.ts +305 -0
- package/extensions/modules/plan/test/settings.test.ts +114 -0
- package/extensions/modules/plan/test/shell-gate.test.ts +103 -0
- package/extensions/modules/ponytail/index.ts +23 -73
- package/extensions/modules/ponytail/lib/config.ts +1 -6
- package/extensions/modules/ponytail/test/extension.test.ts +1 -85
- package/extensions/modules/repair/configPanel.ts +96 -0
- package/extensions/modules/repair/index.ts +414 -0
- package/extensions/modules/repair/lib/auto-bg.ts +333 -0
- package/extensions/modules/repair/lib/edit-repair.ts +155 -0
- package/extensions/modules/repair/lib/editor.ts +251 -0
- package/extensions/modules/repair/lib/guards.ts +34 -0
- package/extensions/modules/repair/lib/input-repair.ts +324 -0
- package/extensions/modules/repair/lib/patch.ts +481 -0
- package/extensions/modules/repair/lib/settings.ts +114 -0
- package/extensions/modules/repair/test/auto-bg.test.ts +405 -0
- package/extensions/modules/repair/test/edit-repair.test.ts +224 -0
- package/extensions/modules/repair/test/editor.test.ts +141 -0
- package/extensions/modules/repair/test/guards.test.ts +64 -0
- package/extensions/modules/repair/test/input-repair.test.ts +231 -0
- package/extensions/modules/repair/test/patch.test.ts +563 -0
- package/extensions/modules/repair/test/settings.test.ts +167 -0
- package/extensions/modules/repair/test/wrapper.test.ts +210 -0
- package/extensions/modules/router/commands/commands.ts +4 -0
- package/extensions/modules/router/lib/client.ts +61 -0
- package/extensions/modules/router/lib/provider.ts +34 -13
- package/extensions/modules/router/lib/systemone.ts +152 -0
- package/extensions/modules/router/test/unit.test.ts +179 -0
- package/extensions/modules/rtk/findFallback.js +68 -0
- package/extensions/modules/rtk/index.ts +248 -0
- package/extensions/modules/rtk/safe-rewrite.js +74 -0
- package/extensions/modules/rtk/test/findFallback.test.js +66 -0
- package/extensions/modules/rtk/test/index.test.js +131 -0
- package/extensions/modules/rtk/test/safe-rewrite.test.js +96 -0
- package/extensions/modules/rtk/version-gate.js +34 -0
- package/extensions/modules/serena/index.ts +629 -0
- package/extensions/modules/serena/lib/detect.ts +73 -0
- package/extensions/modules/serena/lib/env.ts +76 -0
- package/extensions/modules/serena/lib/guidance.ts +26 -0
- package/extensions/modules/serena/lib/normalize.ts +27 -0
- package/extensions/modules/serena/lib/symbol-key.ts +20 -0
- package/extensions/modules/serena/lib/truncate.ts +20 -0
- package/extensions/modules/serena/test/env.test.ts +122 -0
- package/extensions/modules/serena/test/index.test.ts +347 -0
- package/extensions/modules/serena/test/worker.test.ts +562 -0
- package/extensions/modules/serena/worker.ts +858 -0
- package/extensions/modules/steering/configPanel.ts +122 -0
- package/extensions/modules/steering/index.ts +616 -0
- package/extensions/modules/steering/lib/anchor.ts +175 -0
- package/extensions/modules/steering/lib/errors.ts +253 -0
- package/extensions/modules/steering/lib/family.ts +33 -0
- package/extensions/modules/steering/lib/guidance.ts +172 -0
- package/extensions/modules/steering/lib/history.ts +170 -0
- package/extensions/modules/steering/lib/settings.ts +127 -0
- package/extensions/modules/steering/test/anchor-regressions.test.ts +93 -0
- package/extensions/modules/steering/test/anchor-wiring.test.ts +99 -0
- package/extensions/modules/steering/test/anchor.test.ts +160 -0
- package/extensions/modules/steering/test/cache-stats.test.ts +43 -0
- package/extensions/modules/steering/test/errors.test.ts +309 -0
- package/extensions/modules/steering/test/family.test.ts +43 -0
- package/extensions/modules/steering/test/guidance.test.ts +357 -0
- package/extensions/modules/steering/test/harness.ts +93 -0
- package/extensions/modules/steering/test/history.test.ts +118 -0
- package/extensions/modules/steering/test/settings.test.ts +182 -0
- package/extensions/modules/steering/test/status.test.ts +71 -0
- package/extensions/modules/steering/test/toolCall.test.ts +99 -0
- package/extensions/modules/subagent/agents/planner.md +14 -0
- package/extensions/modules/subagent/agents/reviewer.md +42 -0
- package/extensions/modules/subagent/agents/scout.md +47 -0
- package/extensions/modules/subagent/agents/tester.md +12 -0
- package/extensions/modules/subagent/agents/worker.md +18 -0
- package/extensions/modules/subagent/configPanel.ts +219 -0
- package/extensions/modules/subagent/index.ts +2451 -0
- package/extensions/modules/subagent/lib/agents.ts +408 -0
- package/extensions/modules/subagent/lib/background.ts +383 -0
- package/extensions/modules/subagent/lib/herdr.ts +1019 -0
- package/extensions/modules/subagent/lib/history.ts +126 -0
- package/extensions/modules/subagent/lib/model.ts +156 -0
- package/extensions/modules/subagent/lib/render.ts +335 -0
- package/extensions/modules/subagent/lib/result.ts +110 -0
- package/extensions/modules/subagent/lib/roles.ts +296 -0
- package/extensions/modules/subagent/lib/routing.ts +223 -0
- package/extensions/modules/subagent/lib/runner.ts +559 -0
- package/extensions/modules/subagent/lib/schema.ts +21 -0
- package/extensions/modules/subagent/lib/security.ts +752 -0
- package/extensions/modules/subagent/lib/settings.ts +159 -0
- package/extensions/modules/subagent/lib/thread-viewer.ts +319 -0
- package/extensions/modules/subagent/lib/threads.ts +135 -0
- package/extensions/modules/subagent/lib/types.ts +18 -0
- package/extensions/modules/subagent/lib/widget.ts +475 -0
- package/extensions/modules/subagent/test/configPanel.test.ts +132 -0
- package/extensions/modules/subagent/test/herdr-advisor.test.ts +40 -0
- package/extensions/modules/subagent/test/routing.test.ts +350 -0
- package/extensions/modules/subagent/test/widget.test.ts +208 -0
- package/extensions/modules/usage/index.ts +59 -16
- package/extensions/modules/usage/test/genrate.test.ts +70 -0
- package/extensions/modules/usage/test/parsers.test.ts +13 -0
- package/extensions/modules/ux/UPSTREAM +24 -0
- package/extensions/modules/ux/index.ts +393 -0
- package/extensions/modules/ux/lib/audit.ts +562 -0
- package/extensions/modules/ux/lib/config.ts +136 -0
- package/extensions/modules/ux/lib/instructions.ts +77 -0
- package/extensions/modules/ux/test/audit.test.ts +756 -0
- package/extensions/modules/ux/test/extension.test.ts +394 -0
- package/extensions/modules/ux/test/instructions.test.ts +19 -0
- package/extensions/modules/web/configPanel.ts +193 -0
- package/extensions/modules/web/index.ts +978 -0
- package/extensions/modules/web/lib/agy.ts +209 -0
- package/extensions/modules/web/lib/brave.ts +42 -0
- package/extensions/modules/web/lib/cdp.ts +686 -0
- package/extensions/modules/web/lib/chatapi.ts +101 -0
- package/extensions/modules/web/lib/chatgpt.ts +796 -0
- package/extensions/modules/web/lib/chrome.ts +328 -0
- package/extensions/modules/web/lib/config.ts +136 -0
- package/extensions/modules/web/lib/content.ts +99 -0
- package/extensions/modules/web/lib/crawl4ai.ts +172 -0
- package/extensions/modules/web/lib/extract.ts +235 -0
- package/extensions/modules/web/lib/firecrawl.ts +56 -0
- package/extensions/modules/web/lib/format.ts +197 -0
- package/extensions/modules/web/lib/gemini-auth.ts +286 -0
- package/extensions/modules/web/lib/gemini-dr.ts +338 -0
- package/extensions/modules/web/lib/gemini.ts +551 -0
- package/extensions/modules/web/lib/imageapi.ts +559 -0
- package/extensions/modules/web/lib/retry.ts +71 -0
- package/extensions/modules/web/lib/search.ts +237 -0
- package/extensions/modules/web/lib/searxng.ts +69 -0
- package/extensions/modules/web/lib/settings.ts +148 -0
- package/extensions/modules/web/scripts/cdp-smoke.ts +77 -0
- package/extensions/modules/web/scripts/gemini-smoke.ts +107 -0
- package/extensions/modules/web/test/agy.test.ts +383 -0
- package/extensions/modules/web/test/cdp.test.ts +717 -0
- package/extensions/modules/web/test/chat.test.ts +171 -0
- package/extensions/modules/web/test/chatgpt.test.ts +633 -0
- package/extensions/modules/web/test/chrome.test.ts +282 -0
- package/extensions/modules/web/test/config.test.ts +218 -0
- package/extensions/modules/web/test/configPanel.test.ts +132 -0
- package/extensions/modules/web/test/crawl.test.ts +134 -0
- package/extensions/modules/web/test/crawl4ai.test.ts +105 -0
- package/extensions/modules/web/test/extension.test.ts +118 -0
- package/extensions/modules/web/test/extract.test.ts +436 -0
- package/extensions/modules/web/test/fixtures/dr-confirm.bin +12 -0
- package/extensions/modules/web/test/fixtures/dr-plan.bin +20 -0
- package/extensions/modules/web/test/fixtures/interaction.html +31 -0
- package/extensions/modules/web/test/format.test.ts +230 -0
- package/extensions/modules/web/test/gemini-auth.test.ts +465 -0
- package/extensions/modules/web/test/gemini-dr.test.ts +249 -0
- package/extensions/modules/web/test/gemini.test.ts +472 -0
- package/extensions/modules/web/test/hook.test.ts +101 -0
- package/extensions/modules/web/test/image.test.ts +1089 -0
- package/extensions/modules/web/test/retry.test.ts +119 -0
- package/extensions/modules/web/test/screenshot.test.ts +109 -0
- package/extensions/modules/web/test/search.test.ts +210 -0
- package/extensions/modules/web/test/settings.test.ts +165 -0
- package/extensions/modules/web/test/skill.test.ts +72 -0
- package/extensions/modules/web/types.d.ts +3 -0
- package/extensions/modules/web/vendor/package.json +1 -0
- package/extensions/modules/web/vendor/readability/LICENSE.md +13 -0
- package/extensions/modules/web/vendor/readability/Readability-readerable.js +123 -0
- package/extensions/modules/web/vendor/readability/Readability.js +2787 -0
- package/extensions/modules/web/vendor/readability/index.d.ts +64 -0
- package/extensions/modules/web/vendor/readability/index.js +9 -0
- package/extensions/modules/web/vendor/turndown/LICENSE +21 -0
- package/extensions/modules/web/vendor/turndown/turndown.cjs.js +784 -0
- package/extensions/modules/web/vendor/turndown-plugin-gfm/LICENSE +21 -0
- package/extensions/modules/web/vendor/turndown-plugin-gfm/turndown-plugin-gfm.cjs.js +163 -0
- package/extensions/modules/zai/configPanel.ts +151 -0
- package/extensions/modules/zai/index.ts +186 -0
- package/extensions/modules/zai/lib/anthropic.ts +159 -0
- package/extensions/modules/zai/lib/settings.ts +198 -0
- package/extensions/modules/zai/lib/signing.ts +718 -0
- package/extensions/modules/zai/lib/throttle.ts +198 -0
- package/extensions/modules/zai/test/anthropic.test.ts +132 -0
- package/extensions/modules/zai/test/configPanel.test.ts +207 -0
- package/extensions/modules/zai/test/extension.test.ts +249 -0
- package/extensions/modules/zai/test/settings.test.ts +183 -0
- package/extensions/modules/zai/test/signing-wiring.test.ts +108 -0
- package/extensions/modules/zai/test/signing.test.ts +345 -0
- package/extensions/modules/zai/test/throttle.test.ts +329 -0
- package/package.json +19 -4
- package/scripts/validate-themes.mjs +75 -0
- package/skills/munin/SKILL.md +117 -0
- package/skills/ux-capture/SKILL.md +202 -0
- package/skills/ux-design/SKILL.md +279 -0
- package/skills/ux-presets/SKILL.md +484 -0
- package/skills/ux-routing/SKILL.md +46 -0
- package/skills/web/SKILL.md +153 -0
- package/themes/alabaster.json +93 -0
- package/themes/amethyst.json +96 -0
- package/themes/anthracite.json +93 -0
- package/themes/basalt.json +91 -0
- package/themes/birch.json +95 -0
- package/themes/catppuccin-mocha.json +91 -0
- package/themes/dark-abyss.json +91 -0
- package/themes/dark-arctic.json +104 -0
- package/themes/dark-aurora.json +95 -0
- package/themes/dark-catppuccin.json +107 -0
- package/themes/dark-cavern.json +91 -0
- package/themes/dark-celestial.json +106 -0
- package/themes/dark-copper.json +95 -0
- package/themes/dark-cosmos.json +90 -0
- package/themes/dark-cyberpunk.json +102 -0
- package/themes/dark-dracula.json +98 -0
- package/themes/dark-eclipse.json +91 -0
- package/themes/dark-ember.json +95 -0
- package/themes/dark-equinox.json +90 -0
- package/themes/dark-forest.json +96 -0
- package/themes/dark-github.json +105 -0
- package/themes/dark-gruvbox.json +112 -0
- package/themes/dark-lavender.json +95 -0
- package/themes/dark-lunar.json +89 -0
- package/themes/dark-midnight.json +95 -0
- package/themes/dark-monochrome.json +94 -0
- package/themes/dark-monokai.json +98 -0
- package/themes/dark-nebula.json +90 -0
- package/themes/dark-neon-noir.json +100 -0
- package/themes/dark-nord.json +98 -0
- package/themes/dark-ocean.json +101 -0
- package/themes/dark-one.json +100 -0
- package/themes/dark-poimandres.json +115 -0
- package/themes/dark-rainforest.json +91 -0
- package/themes/dark-reef.json +91 -0
- package/themes/dark-retro.json +92 -0
- package/themes/dark-rose-pine.json +96 -0
- package/themes/dark-sakura.json +95 -0
- package/themes/dark-slate.json +95 -0
- package/themes/dark-solarized.json +97 -0
- package/themes/dark-solstice.json +90 -0
- package/themes/dark-starfall.json +91 -0
- package/themes/dark-sunset.json +99 -0
- package/themes/dark-swamp.json +90 -0
- package/themes/dark-synthwave.json +103 -0
- package/themes/dark-taiga.json +91 -0
- package/themes/dark-terminal.json +95 -0
- package/themes/dark-tokyo-night.json +101 -0
- package/themes/dark-tundra.json +91 -0
- package/themes/dark-twilight.json +91 -0
- package/themes/dark-volcanic.json +91 -0
- package/themes/dark.json +80 -0
- package/themes/graphite.json +92 -0
- package/themes/light-arctic.json +107 -0
- package/themes/light-aurora-day.json +91 -0
- package/themes/light-canyon.json +91 -0
- package/themes/light-catppuccin.json +106 -0
- package/themes/light-cirrus.json +90 -0
- package/themes/light-coral.json +95 -0
- package/themes/light-cyberpunk.json +96 -0
- package/themes/light-dawn.json +90 -0
- package/themes/light-dunes.json +91 -0
- package/themes/light-eucalyptus.json +95 -0
- package/themes/light-forest.json +100 -0
- package/themes/light-frost.json +95 -0
- package/themes/light-github.json +115 -0
- package/themes/light-glacier.json +91 -0
- package/themes/light-gruvbox.json +108 -0
- package/themes/light-haze.json +90 -0
- package/themes/light-honeycomb.json +95 -0
- package/themes/light-lagoon.json +91 -0
- package/themes/light-lavender.json +95 -0
- package/themes/light-meadow.json +91 -0
- package/themes/light-mint.json +95 -0
- package/themes/light-monochrome.json +101 -0
- package/themes/light-ocean.json +99 -0
- package/themes/light-one.json +99 -0
- package/themes/light-opal.json +91 -0
- package/themes/light-orchard.json +91 -0
- package/themes/light-paper.json +95 -0
- package/themes/light-poimandres.json +115 -0
- package/themes/light-prism.json +90 -0
- package/themes/light-retro.json +98 -0
- package/themes/light-sand.json +95 -0
- package/themes/light-savanna.json +91 -0
- package/themes/light-solarized.json +102 -0
- package/themes/light-soleil.json +90 -0
- package/themes/light-sunset.json +99 -0
- package/themes/light-synthwave.json +98 -0
- package/themes/light-tokyo-night.json +111 -0
- package/themes/light-wetland.json +91 -0
- package/themes/light-zenith.json +89 -0
- package/themes/light.json +80 -0
- package/themes/limestone.json +94 -0
- package/themes/mahogany.json +97 -0
- package/themes/marble.json +93 -0
- package/themes/mirage.json +79 -0
- package/themes/obsidian.json +91 -0
- package/themes/onyx.json +91 -0
- package/themes/pearl.json +93 -0
- package/themes/porcelain.json +91 -0
- package/themes/quartz.json +96 -0
- package/themes/sandstone.json +95 -0
- package/themes/titanium.json +90 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// `steering` settings — layering (global ← trusted project), the writer's
|
|
2
|
+
// merge/atomicity guarantees, and the /config contribution's rows + save path.
|
|
3
|
+
import assert from "node:assert/strict";
|
|
4
|
+
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
|
+
import { tmpdir } from "node:os";
|
|
6
|
+
import { join } from "node:path";
|
|
7
|
+
import { after, before, beforeEach, describe, it } from "node:test";
|
|
8
|
+
import {
|
|
9
|
+
DEFAULT_STEERING_SETTINGS,
|
|
10
|
+
projectOverridesSteering,
|
|
11
|
+
projectSettingsPath,
|
|
12
|
+
readSteeringSettings,
|
|
13
|
+
writeSteeringSection,
|
|
14
|
+
} from "../lib/settings.js";
|
|
15
|
+
import { buildSteeringGroups, steeringConfig } from "../configPanel.js";
|
|
16
|
+
|
|
17
|
+
let AGENT: string;
|
|
18
|
+
let REPO: string;
|
|
19
|
+
const realAgentDir = process.env.PI_CODING_AGENT_DIR;
|
|
20
|
+
|
|
21
|
+
before(() => {
|
|
22
|
+
AGENT = mkdtempSync(join(tmpdir(), "ceulen-steering-settings-"));
|
|
23
|
+
process.env.PI_CODING_AGENT_DIR = AGENT;
|
|
24
|
+
REPO = mkdtempSync(join(tmpdir(), "ceulen-steering-repo-"));
|
|
25
|
+
});
|
|
26
|
+
after(() => {
|
|
27
|
+
if (realAgentDir === undefined) delete process.env.PI_CODING_AGENT_DIR;
|
|
28
|
+
else process.env.PI_CODING_AGENT_DIR = realAgentDir;
|
|
29
|
+
rmSync(AGENT, { recursive: true, force: true });
|
|
30
|
+
rmSync(REPO, { recursive: true, force: true });
|
|
31
|
+
});
|
|
32
|
+
beforeEach(() => {
|
|
33
|
+
writeFileSync(join(AGENT, "settings.json"), "{}");
|
|
34
|
+
rmSync(projectSettingsPath(REPO), { force: true });
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const globalFile = () => join(AGENT, "settings.json");
|
|
38
|
+
const writeGlobal = (body: unknown) => writeFileSync(globalFile(), JSON.stringify(body, null, 2));
|
|
39
|
+
const writeProject = (body: unknown) => {
|
|
40
|
+
mkdirSync(join(REPO, ".pi"), { recursive: true });
|
|
41
|
+
writeFileSync(projectSettingsPath(REPO), JSON.stringify(body, null, 2));
|
|
42
|
+
};
|
|
43
|
+
const readBack = () => JSON.parse(readFileSync(globalFile(), "utf8"));
|
|
44
|
+
|
|
45
|
+
describe("readSteeringSettings layering", () => {
|
|
46
|
+
it("defaults when nothing is configured", () => {
|
|
47
|
+
assert.deepEqual(readSteeringSettings(), DEFAULT_STEERING_SETTINGS);
|
|
48
|
+
assert.deepEqual(DEFAULT_STEERING_SETTINGS, {
|
|
49
|
+
firstToolHints: true,
|
|
50
|
+
selectionGuidance: true,
|
|
51
|
+
superpower: false,
|
|
52
|
+
superpowerPrompt: "",
|
|
53
|
+
strictSerena: false,
|
|
54
|
+
stripReasoning: true,
|
|
55
|
+
dsAnchor: true,
|
|
56
|
+
weNeed: false,
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it("reads the global section, ignoring unknown keys and bad types", () => {
|
|
61
|
+
writeGlobal({ steering: { superpower: true, superpowerPrompt: " custom ", dsAnchor: "yes", strictSerena: 1, firstToolHints: false } });
|
|
62
|
+
const s = readSteeringSettings();
|
|
63
|
+
assert.equal(s.superpower, true);
|
|
64
|
+
assert.equal(s.superpowerPrompt, "custom", "trimmed");
|
|
65
|
+
assert.equal(s.dsAnchor, true, "non-boolean ignored → default");
|
|
66
|
+
assert.equal(s.strictSerena, false, "non-boolean ignored → default");
|
|
67
|
+
assert.equal(s.firstToolHints, false);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it("a TRUSTED project file overrides the global section per field", () => {
|
|
71
|
+
writeGlobal({ steering: { superpower: true, weNeed: true, stripReasoning: false } });
|
|
72
|
+
writeProject({ steering: { superpower: false, stripReasoning: true } });
|
|
73
|
+
const s = readSteeringSettings({ cwd: REPO, isProjectTrusted: () => true });
|
|
74
|
+
assert.equal(s.superpower, false, "project wins");
|
|
75
|
+
assert.equal(s.stripReasoning, true, "project wins");
|
|
76
|
+
assert.equal(s.weNeed, true, "untouched field falls through to global");
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it("an UNTRUSTED project file is ignored entirely", () => {
|
|
80
|
+
writeProject({ steering: { dsAnchor: false, superpower: true } });
|
|
81
|
+
const s = readSteeringSettings({ cwd: REPO, isProjectTrusted: () => false });
|
|
82
|
+
assert.deepEqual(s, DEFAULT_STEERING_SETTINGS);
|
|
83
|
+
assert.equal(projectOverridesSteering(REPO, false), false, "untrusted project never disclosed as shadowing");
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it("a corrupt file falls back to defaults", () => {
|
|
87
|
+
writeFileSync(globalFile(), "{ not json");
|
|
88
|
+
assert.deepEqual(readSteeringSettings(), DEFAULT_STEERING_SETTINGS);
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
describe("writeSteeringSection", () => {
|
|
93
|
+
it("merges into the file without clobbering siblings", () => {
|
|
94
|
+
writeGlobal({ theme: "dark", router: { baseUrl: "http://x/v1" }, steering: { weNeed: true } });
|
|
95
|
+
writeSteeringSection({ superpower: true, superpowerPrompt: "go loud" });
|
|
96
|
+
const s = readBack();
|
|
97
|
+
assert.equal(s.theme, "dark");
|
|
98
|
+
assert.equal(s.router.baseUrl, "http://x/v1");
|
|
99
|
+
assert.equal(s.steering.weNeed, true, "existing steering keys survive");
|
|
100
|
+
assert.equal(s.steering.superpower, true);
|
|
101
|
+
assert.equal(s.steering.superpowerPrompt, "go loud");
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it("writes only the patched keys and refuses to clobber a corrupt file", () => {
|
|
105
|
+
writeSteeringSection({ dsAnchor: false });
|
|
106
|
+
assert.deepEqual(readBack().steering, { dsAnchor: false }, "one key patched, nothing else written");
|
|
107
|
+
writeFileSync(globalFile(), "{ not json");
|
|
108
|
+
assert.throws(() => writeSteeringSection({ superpower: true }), /not valid JSON/);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
describe("projectOverridesSteering", () => {
|
|
113
|
+
it("is true only for a trusted project that actually sets steering.*", () => {
|
|
114
|
+
writeProject({ steering: { dsAnchor: false } });
|
|
115
|
+
assert.equal(projectOverridesSteering(REPO, true), true);
|
|
116
|
+
writeProject({ munin: { project: "x" } });
|
|
117
|
+
assert.equal(projectOverridesSteering(REPO, true), false, "another module's section is not a steering override");
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
describe("/config contribution", () => {
|
|
122
|
+
it("exposes every owned row under the Model tab, all keys steering.-prefixed", () => {
|
|
123
|
+
const groups = buildSteeringGroups(structuredClone(DEFAULT_STEERING_SETTINGS));
|
|
124
|
+
assert.equal(groups.length, 1);
|
|
125
|
+
assert.equal(groups[0].label, "Steering");
|
|
126
|
+
assert.equal(groups[0].tab, "Model");
|
|
127
|
+
const keys = groups[0].rows.map((r) => r.key);
|
|
128
|
+
assert.deepEqual(keys, [
|
|
129
|
+
"steering.firstToolHints",
|
|
130
|
+
"steering.selectionGuidance",
|
|
131
|
+
"steering.superpower",
|
|
132
|
+
"steering.superpowerPrompt",
|
|
133
|
+
"steering.strictSerena",
|
|
134
|
+
"steering.stripReasoning",
|
|
135
|
+
"steering.dsAnchor",
|
|
136
|
+
"steering.weNeed",
|
|
137
|
+
]);
|
|
138
|
+
const anchor = groups[0].rows.find((r) => r.key === "steering.dsAnchor")!;
|
|
139
|
+
assert.equal(anchor.kind, "toggle");
|
|
140
|
+
assert.equal(anchor.defaultValue, true);
|
|
141
|
+
assert.match(anchor.warning!, /Repair module must be enabled/);
|
|
142
|
+
// No Enable row here — the config module prepends it.
|
|
143
|
+
assert.equal(keys.some((k) => k.startsWith("ceulen.disabled")), false);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
it("row setters mutate the working copy", () => {
|
|
147
|
+
const cfg = structuredClone(DEFAULT_STEERING_SETTINGS);
|
|
148
|
+
const rows = buildSteeringGroups(cfg)[0].rows;
|
|
149
|
+
rows.find((r) => r.key === "steering.superpower")!.set(true);
|
|
150
|
+
rows.find((r) => r.key === "steering.superpowerPrompt")!.set(" loud ");
|
|
151
|
+
assert.equal(cfg.superpower, true);
|
|
152
|
+
assert.equal(cfg.superpowerPrompt, "loud");
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it("save writes the changed keys to the global file and discloses a project override", async () => {
|
|
156
|
+
writeProject({ steering: { dsAnchor: false } });
|
|
157
|
+
const contrib = steeringConfig();
|
|
158
|
+
const rows = contrib.groups()[0].rows;
|
|
159
|
+
rows.find((r) => r.key === "steering.stripReasoning")!.set(false);
|
|
160
|
+
const notes: string[] = [];
|
|
161
|
+
const ctx: any = {
|
|
162
|
+
cwd: REPO,
|
|
163
|
+
isProjectTrusted: () => true,
|
|
164
|
+
ui: { notify: (m: string) => notes.push(m) },
|
|
165
|
+
};
|
|
166
|
+
await contrib.save(new Set(["steering.stripReasoning"]), ctx);
|
|
167
|
+
assert.deepEqual(readBack().steering, { stripReasoning: false }, "only the edited key is written");
|
|
168
|
+
assert.match(notes[0], /Steering saved to/);
|
|
169
|
+
assert.match(notes[0], /overrides these values/);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it("save no-ops when no owned key was edited, and reports no changes", async () => {
|
|
173
|
+
const contrib = steeringConfig();
|
|
174
|
+
const notes: string[] = [];
|
|
175
|
+
const ctx: any = { cwd: REPO, isProjectTrusted: () => false, ui: { notify: (m: string) => notes.push(m) } };
|
|
176
|
+
await contrib.save(new Set(["subagent.routing.mode"]), ctx);
|
|
177
|
+
assert.equal(notes.length, 0, "foreign key → silent no-op");
|
|
178
|
+
await contrib.save(new Set(["steering.superpower"]), ctx);
|
|
179
|
+
assert.deepEqual(notes, ["No changes."]);
|
|
180
|
+
assert.equal(readBack().steering, undefined, "nothing written");
|
|
181
|
+
});
|
|
182
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// /steering status surface: the command is the only in-session view of the
|
|
2
|
+
// module's state, so every field the port promises is asserted here.
|
|
3
|
+
import assert from "node:assert/strict";
|
|
4
|
+
import { after, before, beforeEach, describe, it } from "node:test";
|
|
5
|
+
import { createFakePi, isolateAgentDir, setSteeringSettings } from "./harness.js";
|
|
6
|
+
|
|
7
|
+
let AGENT: string;
|
|
8
|
+
let restoreAgentDir: () => void;
|
|
9
|
+
before(() => {
|
|
10
|
+
const isolated = isolateAgentDir("ceulen-steering-status-");
|
|
11
|
+
AGENT = isolated.dir;
|
|
12
|
+
restoreAgentDir = isolated.restore;
|
|
13
|
+
});
|
|
14
|
+
after(() => { restoreAgentDir(); });
|
|
15
|
+
beforeEach(() => { setSteeringSettings(AGENT, {}); });
|
|
16
|
+
|
|
17
|
+
describe("/steering status", () => {
|
|
18
|
+
it("reports family, requested/served model and every steering flag", () => {
|
|
19
|
+
const h = createFakePi(["bash", "read"]);
|
|
20
|
+
h.fire("session_start", {}, h.ctx("deepseek-v4-flash"));
|
|
21
|
+
const text = h.status(h.ctx("deepseek-v4-flash"));
|
|
22
|
+
assert.match(text, /## steering status/);
|
|
23
|
+
assert.match(text, /\*\*Active family:\*\* deepseek-v4/);
|
|
24
|
+
assert.match(text, /Requested: test\/deepseek-v4-flash/);
|
|
25
|
+
assert.match(text, /Served: test\/deepseek-v4-flash/);
|
|
26
|
+
assert.match(text, /First-tool hints \(all families\): on/);
|
|
27
|
+
assert.match(text, /Selection guidance \(DeepSeek V4\): on/);
|
|
28
|
+
assert.match(text, /Super Power Mode \(DeepSeek V4\): off/);
|
|
29
|
+
assert.match(text, /Strict Serena \(DeepSeek V4\): off/);
|
|
30
|
+
assert.match(text, /Reasoning strip: on/);
|
|
31
|
+
assert.match(text, /ds-anchor \(deepseek-v4-pro\): off/);
|
|
32
|
+
assert.match(text, /We-need directive \(bootstrap\): off/);
|
|
33
|
+
assert.match(text, /Super Power turns: 0/);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it("reflects settings rows and the custom Super Power prompt", () => {
|
|
37
|
+
setSteeringSettings(AGENT, { superpower: true, superpowerPrompt: "loud", strictSerena: true, stripReasoning: false });
|
|
38
|
+
const h = createFakePi(["bash", "read"]);
|
|
39
|
+
h.fire("session_start", {}, h.ctx("deepseek-v4-flash"));
|
|
40
|
+
const text = h.status(h.ctx("deepseek-v4-flash"));
|
|
41
|
+
assert.match(text, /Super Power Mode \(DeepSeek V4\): on \(custom prompt\)/);
|
|
42
|
+
assert.match(text, /Strict Serena \(DeepSeek V4\): on \(block after 3 reminders\)/);
|
|
43
|
+
assert.match(text, /Reasoning strip: off/);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("flags a thinking level below the recipe's max while the anchor is active", () => {
|
|
47
|
+
const h = createFakePi(["bash", "read"]);
|
|
48
|
+
const ctx = h.ctx("deepseek-v4-pro", { thinkingLevel: "high" });
|
|
49
|
+
h.fire("session_start", {}, ctx);
|
|
50
|
+
h.fire("before_agent_start", { prompt: "x", systemPrompt: "FULL", systemPromptOptions: {} }, ctx);
|
|
51
|
+
const below = h.status(ctx);
|
|
52
|
+
assert.match(below, /Thinking level: high \(recipe wants max\)/);
|
|
53
|
+
assert.match(below, /ds-anchor \(deepseek-v4-pro\): bootstrapping/);
|
|
54
|
+
// A level change past max clears the marker.
|
|
55
|
+
h.fire("thinking_level_select", { level: "max", previousLevel: "high" }, ctx);
|
|
56
|
+
assert.match(h.status(ctx), /Thinking level: max$/m);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it("shows the error tally and the ds-anchor trace ring", () => {
|
|
60
|
+
const h = createFakePi(["bash", "read"]);
|
|
61
|
+
const ctx = h.ctx("deepseek-v4-pro");
|
|
62
|
+
h.setEntries([]);
|
|
63
|
+
h.fire("session_start", {}, ctx);
|
|
64
|
+
h.fire("tool_execution_end", { toolName: "read", isError: true, result: "ENOENT: no such file or directory" }, ctx);
|
|
65
|
+
h.fire("before_agent_start", { prompt: "x", systemPrompt: "FULL", systemPromptOptions: {} }, ctx);
|
|
66
|
+
const text = h.status(ctx);
|
|
67
|
+
assert.match(text, /\*\*Errors:\*\* 1 total, last: path_not_found on read/);
|
|
68
|
+
assert.match(text, /\*\*ds-anchor trace:\*\*/);
|
|
69
|
+
assert.match(text, /bootstrap: minimal prompt engaged/);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// tool_call steering: DeepSeek-only semantic-miss / dedicated-tool behavior,
|
|
2
|
+
// the grep/ffgrep never-block rule, the per-turn reminder dedupe, and the
|
|
3
|
+
// strictSerena escalation (fixed reminder count — the upstream env knob is
|
|
4
|
+
// gone).
|
|
5
|
+
import assert from "node:assert/strict";
|
|
6
|
+
import { after, before, beforeEach, describe, it } from "node:test";
|
|
7
|
+
import { createFakePi, isolateAgentDir, setSteeringSettings } from "./harness.js";
|
|
8
|
+
|
|
9
|
+
const ACTIVE = ["bash", "read", "edit", "ls", "find", "grep", "serena_find_symbol", "serena_get_symbols_overview"];
|
|
10
|
+
const SYMBOL_GREP = { command: "grep -rn 'class UserService' src/index.ts" };
|
|
11
|
+
const LS_MISS = { command: "ls extensions" };
|
|
12
|
+
|
|
13
|
+
let AGENT: string;
|
|
14
|
+
let restoreAgentDir: () => void;
|
|
15
|
+
before(() => {
|
|
16
|
+
const isolated = isolateAgentDir("ceulen-steering-toolcall-");
|
|
17
|
+
AGENT = isolated.dir;
|
|
18
|
+
restoreAgentDir = isolated.restore;
|
|
19
|
+
});
|
|
20
|
+
after(() => { restoreAgentDir(); });
|
|
21
|
+
beforeEach(() => { setSteeringSettings(AGENT, {}); });
|
|
22
|
+
|
|
23
|
+
/** Fire one turn's prelude so the per-turn latch is re-armed like production. */
|
|
24
|
+
function newTurn(h: ReturnType<typeof createFakePi>, id: string) {
|
|
25
|
+
h.fire("before_agent_start", { systemPrompt: "base", systemPromptOptions: { selectedTools: ACTIVE }, prompt: "go" }, h.ctx(id));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
describe("semantic-miss steering (DeepSeek V4)", () => {
|
|
29
|
+
it("hard-blocks a simple bash symbol search and suggests Serena", () => {
|
|
30
|
+
const h = createFakePi(ACTIVE);
|
|
31
|
+
const result = h.fire("tool_call", { toolName: "bash", input: SYMBOL_GREP }, h.ctx("deepseek-v4-flash"));
|
|
32
|
+
assert.equal(result?.block, true);
|
|
33
|
+
assert.match(result.reason, /Serena/);
|
|
34
|
+
assert.match(result.reason, /Try: serena_/, "names a Serena entry point");
|
|
35
|
+
assert.equal(h.messages.length, 0, "a block is not a steered message");
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("never hard-blocks grep/ffgrep — steers once per turn instead", () => {
|
|
39
|
+
const h = createFakePi(ACTIVE);
|
|
40
|
+
const first = h.fire("tool_call", { toolName: "grep", input: { pattern: "UserService", path: "src/index.ts" } }, h.ctx("deepseek-v4-flash"));
|
|
41
|
+
assert.equal(first, undefined, "grep is a first-class tool — never blocked");
|
|
42
|
+
assert.equal(h.messages.length, 1);
|
|
43
|
+
assert.equal(h.messages[0].message.customType, "ceulen-steering");
|
|
44
|
+
assert.equal(h.messages[0].options.deliverAs, "steer");
|
|
45
|
+
assert.match(h.messages[0].message.content, /serena_find_symbol/);
|
|
46
|
+
// Same turn, second miss: deduped.
|
|
47
|
+
h.fire("tool_call", { toolName: "grep", input: { pattern: "UserService", path: "src/index.ts" } }, h.ctx("deepseek-v4-flash"));
|
|
48
|
+
assert.equal(h.messages.length, 1, "one reminder per turn");
|
|
49
|
+
// A Serena call re-arms the latch for the rest of the turn.
|
|
50
|
+
h.fire("tool_call", { toolName: "serena_find_symbol", input: { name_path_pattern: "UserService" } }, h.ctx("deepseek-v4-flash"));
|
|
51
|
+
h.fire("tool_call", { toolName: "grep", input: { pattern: "UserService", path: "src/index.ts" } }, h.ctx("deepseek-v4-flash"));
|
|
52
|
+
assert.equal(h.messages.length, 2, "serena resets the per-turn reminder latch");
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it("steers (never blocks) a dedicated-tool miss by default", () => {
|
|
56
|
+
const h = createFakePi(ACTIVE);
|
|
57
|
+
const result = h.fire("tool_call", { toolName: "bash", input: LS_MISS }, h.ctx("deepseek-v4-flash"));
|
|
58
|
+
assert.equal(result, undefined, "non-strict: reminder only");
|
|
59
|
+
assert.equal(h.messages.length, 1);
|
|
60
|
+
assert.match(h.messages[0].message.content, /dedicated ls tool/);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("does not steer for non-DeepSeek families", () => {
|
|
64
|
+
const h = createFakePi(ACTIVE);
|
|
65
|
+
assert.equal(h.fire("tool_call", { toolName: "bash", input: SYMBOL_GREP }, h.ctx("glm-5.2")), undefined);
|
|
66
|
+
assert.equal(h.messages.length, 0);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it("does not steer when no Serena tool is active (nothing to switch to)", () => {
|
|
70
|
+
const h = createFakePi(["bash", "read", "edit"]);
|
|
71
|
+
assert.equal(h.fire("tool_call", { toolName: "bash", input: SYMBOL_GREP }, h.ctx("deepseek-v4-flash")), undefined);
|
|
72
|
+
assert.equal(h.messages.length, 0);
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
describe("strictSerena escalation", () => {
|
|
77
|
+
it("blocks the same dedicated-tool miss on the 3rd reminder of a session", () => {
|
|
78
|
+
setSteeringSettings(AGENT, { strictSerena: true });
|
|
79
|
+
const h = createFakePi(ACTIVE);
|
|
80
|
+
const id = "deepseek-v4-flash";
|
|
81
|
+
assert.equal(h.fire("tool_call", { toolName: "bash", input: LS_MISS }, h.ctx(id)), undefined, "1st: reminder");
|
|
82
|
+
newTurn(h, id);
|
|
83
|
+
assert.equal(h.fire("tool_call", { toolName: "bash", input: LS_MISS }, h.ctx(id)), undefined, "2nd: reminder");
|
|
84
|
+
newTurn(h, id);
|
|
85
|
+
const third = h.fire("tool_call", { toolName: "bash", input: LS_MISS }, h.ctx(id));
|
|
86
|
+
assert.equal(third?.block, true, "3rd: blocked");
|
|
87
|
+
assert.match(third.reason, /blocked after 3 reminders/);
|
|
88
|
+
assert.equal(h.messages.length, 2, "the two earlier turns steered, the block did not");
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("never blocks a dedicated-tool miss when strictSerena is off", () => {
|
|
92
|
+
const h = createFakePi(ACTIVE);
|
|
93
|
+
for (let i = 0; i < 5; i++) {
|
|
94
|
+
newTurn(h, "deepseek-v4-flash");
|
|
95
|
+
assert.equal(h.fire("tool_call", { toolName: "bash", input: LS_MISS }, h.ctx("deepseek-v4-flash")), undefined);
|
|
96
|
+
}
|
|
97
|
+
assert.equal(h.messages.length, 5, "one reminder per turn, never a block");
|
|
98
|
+
});
|
|
99
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planner
|
|
3
|
+
description: Read-only planning and architecture specialist. Use for consequential design, tradeoff analysis, and implementation plans.
|
|
4
|
+
tools: read, grep, find, ls
|
|
5
|
+
model: "@smart"
|
|
6
|
+
thinking: high
|
|
7
|
+
color: blue
|
|
8
|
+
sandbox: read-only
|
|
9
|
+
timeout: 10
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
You are a senior software planner. Investigate the repository, identify the smallest complete implementation path, and return a concrete plan with file and symbol anchors.
|
|
13
|
+
|
|
14
|
+
Do not modify files. Resolve discoverable facts from the codebase before raising questions. Call out material risks, compatibility constraints, and the narrowest verification that proves the change.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reviewer
|
|
3
|
+
description: Code review specialist. Use for correctness, security, regression, and meaningful test-gap review.
|
|
4
|
+
tools: read, grep, find, ls
|
|
5
|
+
model: "@smart"
|
|
6
|
+
thinking: high
|
|
7
|
+
color: purple
|
|
8
|
+
sandbox: read-only
|
|
9
|
+
timeout: 10
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
You are an independent senior code reviewer. Inspect the requested Git scope with read-only tools.
|
|
13
|
+
|
|
14
|
+
Focus only on actionable issues introduced by the reviewed change. Return each confirmed finding as one self-contained issue another agent can fix without redoing the review:
|
|
15
|
+
1. Correctness and edge cases
|
|
16
|
+
2. Security and data loss
|
|
17
|
+
3. Regressions and API compatibility
|
|
18
|
+
4. Missing tests that allow a likely bug to escape
|
|
19
|
+
|
|
20
|
+
Avoid style noise, praise, and speculative redesign. Every finding needs code evidence.
|
|
21
|
+
|
|
22
|
+
Return JSON only:
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"summary": "compact scope/result summary",
|
|
26
|
+
"findings": [
|
|
27
|
+
{
|
|
28
|
+
"severity": "critical|high|medium|low",
|
|
29
|
+
"file": "relative/path",
|
|
30
|
+
"line": 1,
|
|
31
|
+
"issue": "what is wrong and why it matters",
|
|
32
|
+
"evidence": "reproduction steps or specific inspected code evidence",
|
|
33
|
+
"expectedBehavior": "what should happen instead",
|
|
34
|
+
"suggestedFix": "smallest safe fix",
|
|
35
|
+
"acceptanceCriteria": "observable pass conditions and exact verification checks",
|
|
36
|
+
"blocking": true
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Use an empty `findings` array when clean. Do not modify files or Git state.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scout
|
|
3
|
+
description: Fast codebase recon that returns compressed context for handoff. Use for finding files, understanding structure, locating symbols.
|
|
4
|
+
tools: read, grep, find, ls
|
|
5
|
+
model: "@fast"
|
|
6
|
+
thinking: off
|
|
7
|
+
color: cyan
|
|
8
|
+
sandbox: read-only
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
You are a scout. Quickly investigate a codebase and return structured findings that another agent can use without re-reading everything.
|
|
12
|
+
|
|
13
|
+
Your output will be passed to an agent who has NOT seen the files you explored.
|
|
14
|
+
|
|
15
|
+
Thoroughness (infer from task, default medium):
|
|
16
|
+
- Quick: Targeted lookups, key files only
|
|
17
|
+
- Medium: Follow imports, read critical sections
|
|
18
|
+
- Thorough: Trace all dependencies, check tests/types
|
|
19
|
+
|
|
20
|
+
Strategy:
|
|
21
|
+
1. grep/find to locate relevant code
|
|
22
|
+
2. Read key sections (not entire files)
|
|
23
|
+
3. Identify types, interfaces, key functions
|
|
24
|
+
4. Note dependencies between files
|
|
25
|
+
|
|
26
|
+
Output format:
|
|
27
|
+
|
|
28
|
+
## Evidence
|
|
29
|
+
List exact file/symbol anchors and relevant line ranges:
|
|
30
|
+
1. `path/to/file.ts` (lines 10-50) - Description of what's here
|
|
31
|
+
2. `path/to/other.ts` (lines 100-150) - Description
|
|
32
|
+
3. ...
|
|
33
|
+
|
|
34
|
+
## Key Code
|
|
35
|
+
Critical types, interfaces, or functions:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
interface Example {
|
|
39
|
+
// actual code from the files
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Architecture
|
|
44
|
+
Brief explanation of how the pieces connect.
|
|
45
|
+
|
|
46
|
+
## Start Here
|
|
47
|
+
Which file to look at first and why.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tester
|
|
3
|
+
description: Focused verification agent. Use for cheap routine test, typecheck, lint, build, and regression checks. Not a source editor — may create scratch files (e.g. /tmp probes/fixtures) via write.
|
|
4
|
+
tools: read, write, bash, grep, find, ls
|
|
5
|
+
model: "@fast"
|
|
6
|
+
thinking: off
|
|
7
|
+
color: orange
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
You are a focused verification agent. Inspect the requested scope, run the narrowest relevant checks, and report exact commands, outcomes, and actionable failures.
|
|
11
|
+
|
|
12
|
+
Do not edit repo files. Use write only for scratch files outside the repo (e.g. /tmp) when a check needs a fixture or probe script. Avoid unrelated broad test suites unless the task requires them.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worker
|
|
3
|
+
description: General-purpose coding agent with full tool access. Use only when explicitly requested for isolated implementation.
|
|
4
|
+
model: "@coder"
|
|
5
|
+
thinking: medium
|
|
6
|
+
timeout: 10
|
|
7
|
+
color: green
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
You are a skilled software engineer. Implement the requested task with care and precision.
|
|
11
|
+
|
|
12
|
+
Guidelines:
|
|
13
|
+
- Read before you edit. Understand existing code first.
|
|
14
|
+
- Make minimal, focused changes. Do not refactor unrelated code.
|
|
15
|
+
- Follow existing patterns, naming, and formatting.
|
|
16
|
+
- Write clear, idiomatic code with appropriate error handling.
|
|
17
|
+
- Test your changes when practical (run tests, lint, type-check).
|
|
18
|
+
- Explain your approach briefly before making changes.
|