geneseed 5.6.0 → 6.0.1
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 +30 -0
- package/README.md +2 -2
- package/SHIPPED.md +2 -2
- package/adapters/opencode/README.md +7 -4
- package/docs/concepts/agents.md +10 -0
- package/docs/concepts/exclusions.md +1 -1
- package/docs/concepts/foreman-mode.md +4 -2
- package/docs/concepts/kits.md +20 -2
- package/docs/concepts/loops.md +5 -0
- package/docs/concepts/skills.md +1 -1
- package/docs/concepts/superpowers-kit.md +79 -0
- package/docs/extending.md +11 -4
- package/docs/guides/install-scripted.md +1 -1
- package/docs/reference/cli.md +2 -0
- package/docs/reference/profiles.md +10 -5
- package/harness.config.json +1 -1
- package/js/README.md +3 -0
- package/js/build/args.mjs +4 -2
- package/js/build/driver.mjs +8 -8
- package/js/build/emit-claude.mjs +5 -3
- package/js/build/emit-opencode.mjs +2 -2
- package/js/build/generate.mjs +1 -1
- package/js/build/profile.mjs +15 -7
- package/js/build/render.mjs +81 -10
- package/js/build/source.mjs +75 -1
- package/js/cli-table.json +17 -2
- package/js/hosts/installs.mjs +50 -4
- package/js/hosts/native.mjs +125 -9
- package/js/hosts/opencode.mjs +13 -15
- package/js/inspect/checks-authoring.mjs +24 -1
- package/js/inspect/checks-build.mjs +43 -2
- package/js/inspect/checks-counts.mjs +72 -1
- package/js/inspect/diff.mjs +17 -3
- package/js/inspect/doctor.mjs +23 -2
- package/js/inspect/status.mjs +5 -1
- package/js/inspect/validate.mjs +1 -1
- package/js/loop/catalog.mjs +10 -0
- package/js/maintain/kit-migration.mjs +109 -0
- package/js/maintain/plugin-detect.mjs +150 -0
- package/js/maintain/profiles.mjs +46 -5
- package/js/maintain/setup.mjs +45 -11
- package/js/maintain/update.mjs +1 -1
- package/js/web/actions.mjs +28 -7
- package/js/web/agent-models-api.mjs +172 -0
- package/js/web/api.mjs +3 -1
- package/js/web/profiles-api.mjs +11 -7
- package/js/web/routes.mjs +5 -1
- package/package.json +1 -1
- package/profiles/autonomous.json +1 -0
- package/profiles/corporate.json +1 -1
- package/profiles/mentor.json +1 -0
- package/profiles/minimal.json +2 -1
- package/profiles/starter.json +1 -1
- package/src/AGENT.md.tmpl +1 -6
- package/src/agents/_template.md +4 -0
- package/src/agents/advocate.md +1 -0
- package/src/agents/architect.md +1 -0
- package/src/agents/developer.md +12 -4
- package/src/agents/empiricist.md +1 -0
- package/src/agents/explorer.md +1 -0
- package/src/agents/framer.md +1 -0
- package/src/agents/historian.md +1 -0
- package/src/agents/operator.md +1 -0
- package/src/agents/performance.md +2 -1
- package/src/agents/pragmatist.md +1 -0
- package/src/agents/react-reviewer.md +1 -0
- package/src/agents/researcher.md +1 -0
- package/src/agents/reviewer.md +1 -0
- package/src/agents/security.md +1 -0
- package/src/agents/skeptic.md +1 -0
- package/src/agents/spring-reviewer.md +1 -0
- package/src/agents/spring-security.md +1 -0
- package/src/agents/steward.md +1 -0
- package/src/agents/user-advocate.md +1 -0
- package/src/agents/visionary.md +1 -0
- package/src/bricks/ci-fix.md +12 -2
- package/src/kits/superpowers/missing.md +3 -0
- package/src/kits/superpowers/provider.md +7 -0
- package/src/kits/superpowers/rules.md +6 -0
- package/src/kits/superpowers.json +45 -0
- package/src/modes/foreman.md +18 -12
- package/src/skills/parallel-agents.md +2 -2
- package/src/skills/spring-boot/cloud.md +8 -2
- package/src/skills/spring-boot.md +3 -1
- package/src/skills/spring-testing.md +3 -3
- package/src/upstreams.json +1 -1
- package/web/dist/assets/{ActiveLoops-DOJCPPPc.js → ActiveLoops-6p44eD86.js} +1 -1
- package/web/dist/assets/{Activity-bUSPM3Dl.js → Activity-CIgrq5R1.js} +1 -1
- package/web/dist/assets/{ActivityDetail-AHRoXeFN.js → ActivityDetail-Brqv1u4f.js} +1 -1
- package/web/dist/assets/{Bonsai-B5XY9pid.js → Bonsai-8NtlFrPO.js} +1 -1
- package/web/dist/assets/{CopyButton-C0wwRR9H.js → CopyButton-BHqKgdjJ.js} +1 -1
- package/web/dist/assets/{Dashboard-DPAA96EI.js → Dashboard-CoveJ_-U.js} +2 -2
- package/web/dist/assets/{Docs-CpGDq165.js → Docs-C1jzrFnD.js} +1 -1
- package/web/dist/assets/{Factories-cNhETa5Q.js → Factories-D5pLnt5S.js} +1 -1
- package/web/dist/assets/{GreenhouseView-DO3ADmT9.js → GreenhouseView-ofAQ-V5h.js} +1 -1
- package/web/dist/assets/Installs-DpWgyT5j.js +3 -0
- package/web/dist/assets/{JournalView--W-Lw_V9.js → JournalView-CsuN3_B-.js} +1 -1
- package/web/dist/assets/{Kits-ChfehxY6.js → Kits-P4xspDuN.js} +1 -1
- package/web/dist/assets/{Laws-CNxYmV36.js → Laws-DK3OwGDl.js} +1 -1
- package/web/dist/assets/{LibRows-CiPvsRYB.js → LibRows-CGO25X3D.js} +1 -1
- package/web/dist/assets/Library-e-94YED6.js +3 -0
- package/web/dist/assets/{Loops-DAblKkyq.js → Loops-C9DSBj-A.js} +1 -1
- package/web/dist/assets/{OperatorHudView-QtSaSyYm.js → OperatorHudView-Cc8mlViW.js} +1 -1
- package/web/dist/assets/{Personal-DxSGv638.js → Personal-DVh2jYPO.js} +1 -1
- package/web/dist/assets/{Settings-CgTbhvRv.js → Settings-CknBI-Fx.js} +1 -1
- package/web/dist/assets/{Tabs-Cf4X1hdz.js → Tabs-C30JrkJH.js} +1 -1
- package/web/dist/assets/api-DxwG8y94.js +1 -0
- package/web/dist/assets/index-CUJ8AaAF.css +1 -0
- package/web/dist/assets/{index-B_pTwZra.js → index-MB7E-va_.js} +3 -3
- package/web/dist/index.html +3 -3
- package/web/dist/assets/Installs-D3dDyq10.js +0 -3
- package/web/dist/assets/Library-BxQvbwVU.js +0 -3
- package/web/dist/assets/api-CZ-x0iWG.js +0 -1
- package/web/dist/assets/index-CzfImiYb.css +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The console's view of the sub-agent models — `GET`/`POST /api/agent-models`.
|
|
3
|
+
*
|
|
4
|
+
* What it reads and writes is `agent-overrides.json` of ONE Claude Code install: the `tiers` map
|
|
5
|
+
* (`standard`, `light`) and each agent's `agents.<name>.model` pin. The precedence (pin > map >
|
|
6
|
+
* the tier's default > inherit) is `claudeAgentModel` in `js/hosts/native.mjs`, the same function
|
|
7
|
+
* the emit writes agent frontmatter with, so this page can never promise a model the build will
|
|
8
|
+
* not write. The value validation is `overrideProblem` and the map reader `loadTierMap`, there too.
|
|
9
|
+
*
|
|
10
|
+
* THE FILE IS THE USER'S. A write changes only the keys it names, key by key, in the order the
|
|
11
|
+
* file already has; it refuses a file that does not parse, or a `tiers`/`agents` that is not an
|
|
12
|
+
* object, rather than replace what it cannot read. Nothing here rebuilds: the model is written
|
|
13
|
+
* into the agent files at emit, so a save answers `rebuild: true` and the page offers the rebuild
|
|
14
|
+
* through the install action.
|
|
15
|
+
*
|
|
16
|
+
* A tier's value: a string sets it (`''` is the user choosing inherit, as `loadTierMap` reads it),
|
|
17
|
+
* `null` removes the key (back to the tier's default). A pin: a string sets it, `''` or `null`
|
|
18
|
+
* removes `model` and leaves the rest of the agent's entry alone.
|
|
19
|
+
*
|
|
20
|
+
* Pins and the map are Claude Code's: OpenCode records pins but this page does not edit them, and
|
|
21
|
+
* a host that is not Claude Code answers each agent's tier and no model.
|
|
22
|
+
*/
|
|
23
|
+
import path from 'node:path';
|
|
24
|
+
|
|
25
|
+
import { renderAll } from '../build/render.mjs';
|
|
26
|
+
import { loadKits, makeCfg } from '../build/source.mjs';
|
|
27
|
+
import { EMIT_HOST_SCOPE, tiersOfDir } from '../hosts/installs.mjs';
|
|
28
|
+
import {
|
|
29
|
+
CLAUDE_TIER_DEFAULTS, claudeAgentModel, loadAgentOverrides, loadTierMap, overrideProblem,
|
|
30
|
+
} from '../hosts/native.mjs';
|
|
31
|
+
import { isFile, readText, writeTextAtomic } from '../lib/fs.mjs';
|
|
32
|
+
import { formatValue, isDict, isTruthy, jsonDumpsIndent, parseJson } from '../lib/json.mjs';
|
|
33
|
+
import { bget } from './actions.mjs';
|
|
34
|
+
|
|
35
|
+
const FILE = 'agent-overrides.json';
|
|
36
|
+
/** The tiers that take a model; `strong` is the session's own and has no key. */
|
|
37
|
+
const MAP_TIERS = ['standard', 'light'];
|
|
38
|
+
const MAX_MODEL = 200;
|
|
39
|
+
|
|
40
|
+
let tierTable = null;
|
|
41
|
+
/**
|
|
42
|
+
* `Map<agent name, 'strong'|'standard'|'light'>` off the SOURCE: the render strips an agent's
|
|
43
|
+
* `<!-- tier: -->` line from every output, so an installed file cannot say it. Every kit's agents
|
|
44
|
+
* are included, so a kit's seat is not read as `standard` by default. Built once per process.
|
|
45
|
+
*/
|
|
46
|
+
export function agentTiers() {
|
|
47
|
+
if (tierTable) return tierTable;
|
|
48
|
+
const out = new Map();
|
|
49
|
+
const { items } = renderAll(makeCfg({ kits: [...loadKits().keys()] }), 'neutral');
|
|
50
|
+
for (const { rel, tier = 'standard' } of items) {
|
|
51
|
+
const m = /^agents\/([^_/][^/]*)\.md$/.exec(rel);
|
|
52
|
+
if (m) out.set(m[1], tier);
|
|
53
|
+
}
|
|
54
|
+
tierTable = out;
|
|
55
|
+
return out;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** `{ exists, data, problem }`: the file parsed as an object, else why it cannot be edited. */
|
|
59
|
+
function readOverrides(dir) {
|
|
60
|
+
const file = path.join(dir, FILE);
|
|
61
|
+
if (!isFile(file)) return { file, exists: false, data: {}, problem: null };
|
|
62
|
+
let data;
|
|
63
|
+
try { data = parseJson(readText(file)); } catch {
|
|
64
|
+
return { file, exists: true, data: null, problem: `${FILE} is not valid JSON (comments are not allowed) — fix it by hand` };
|
|
65
|
+
}
|
|
66
|
+
if (!isDict(data)) return { file, exists: true, data: null, problem: `${FILE} is not a JSON object — fix it by hand` };
|
|
67
|
+
return { file, exists: true, data, problem: null };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** The view's host and the install's directory; `claude` false for every host but Claude Code. */
|
|
71
|
+
function viewOf(state) {
|
|
72
|
+
const [host] = EMIT_HOST_SCOPE.get(state.emit || '') ?? ['opencode'];
|
|
73
|
+
return { host, claude: host === 'claude', dir: state.target };
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function apiAgentModels(state, env = process.env) {
|
|
77
|
+
const { host, claude, dir } = viewOf(state);
|
|
78
|
+
const tiers = tiersOfDir(state.root ?? dir, host);
|
|
79
|
+
const known = agentTiers();
|
|
80
|
+
const names = state.inventory.agents.map((a) => a.name);
|
|
81
|
+
if (!claude) {
|
|
82
|
+
return { host, claude, tiers, agents: names.map((name) => ({ name, tier: known.get(name) ?? null })) };
|
|
83
|
+
}
|
|
84
|
+
const { file, problem } = readOverrides(dir);
|
|
85
|
+
// The loaders take a no-op reporter: a console read prints nothing on stderr.
|
|
86
|
+
const quiet = () => {};
|
|
87
|
+
const map = problem ? {} : loadTierMap(dir, quiet);
|
|
88
|
+
const pins = problem ? {} : loadAgentOverrides(dir, quiet);
|
|
89
|
+
const on = tiers === 'auto' ? { map, env } : null;
|
|
90
|
+
const warnings = new Set();
|
|
91
|
+
const agents = names.map((name) => {
|
|
92
|
+
const tier = known.get(name) ?? null;
|
|
93
|
+
const pin = Object.hasOwn(pins, name) && isTruthy(pins[name]?.model) ? formatValue(pins[name].model) : null;
|
|
94
|
+
// A personal agent (no shipped source) is not Geneseed's to tier: only its pin counts.
|
|
95
|
+
const r = claudeAgentModel(tier ?? 'none', pin, tier ? on : null);
|
|
96
|
+
// The alias warning is the tier map's, whether or not the routing is installed yet: the
|
|
97
|
+
// console's editor shows with a picked `auto`, before the rebuild that turns it on.
|
|
98
|
+
const w = tier ? claudeAgentModel(tier, pin, { map, env }).warning : null;
|
|
99
|
+
if (w) warnings.add(w);
|
|
100
|
+
return { name, tier, pin, model: r.model, from: r.from };
|
|
101
|
+
});
|
|
102
|
+
return {
|
|
103
|
+
host, claude, tiers, file: { path: file, problem },
|
|
104
|
+
map: Object.fromEntries(Object.entries(map).map(([k, v]) => [k, formatValue(v)])),
|
|
105
|
+
defaults: { ...CLAUDE_TIER_DEFAULTS },
|
|
106
|
+
warnings: [...warnings], agents,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Apply one edit to the parsed file in place; the problems found, none applied when there are some.
|
|
112
|
+
* `edit` is `{ tiers?: {standard?, light?}, agents?: {<name>: model} }`, `names` the installed agents.
|
|
113
|
+
*/
|
|
114
|
+
export function editOverrides(data, edit, names) {
|
|
115
|
+
const problems = [];
|
|
116
|
+
const asModel = (where, v) => {
|
|
117
|
+
if (v === null) return null;
|
|
118
|
+
if (typeof v !== 'string') { problems.push(`${where}: a model name, or null`); return undefined; }
|
|
119
|
+
const s = v.trim();
|
|
120
|
+
const why = overrideProblem(s);
|
|
121
|
+
if (why) { problems.push(`${where} ${why}`); return undefined; }
|
|
122
|
+
if (s.length > MAX_MODEL) { problems.push(`${where} is longer than ${MAX_MODEL} characters`); return undefined; }
|
|
123
|
+
return s;
|
|
124
|
+
};
|
|
125
|
+
const tiers = isDict(edit.tiers) ? edit.tiers : {};
|
|
126
|
+
const agents = isDict(edit.agents) ? edit.agents : {};
|
|
127
|
+
const tierOps = [];
|
|
128
|
+
for (const [k, v] of Object.entries(tiers)) {
|
|
129
|
+
if (!MAP_TIERS.includes(k)) { problems.push(`tiers.${k} is not a tier that takes a model (${MAP_TIERS.join(', ')})`); continue; }
|
|
130
|
+
const m = asModel(`tiers.${k}`, v);
|
|
131
|
+
if (m !== undefined) tierOps.push([k, m]);
|
|
132
|
+
}
|
|
133
|
+
const pinOps = [];
|
|
134
|
+
for (const [name, v] of Object.entries(agents)) {
|
|
135
|
+
if (name === '__proto__' || !names.includes(name)) { problems.push(`agents.${name} is not an installed agent`); continue; }
|
|
136
|
+
const m = asModel(`agents.${name}.model`, v);
|
|
137
|
+
if (m !== undefined) pinOps.push([name, m === '' ? null : m]);
|
|
138
|
+
}
|
|
139
|
+
if (!tierOps.length && !pinOps.length && !problems.length) problems.push('nothing to save');
|
|
140
|
+
if (tierOps.length && Object.hasOwn(data, 'tiers') && !isDict(data.tiers)) problems.push(`${FILE}: "tiers" is not an object — fix it by hand`);
|
|
141
|
+
if (pinOps.length && Object.hasOwn(data, 'agents') && !isDict(data.agents)) problems.push(`${FILE}: "agents" is not an object — fix it by hand`);
|
|
142
|
+
if (problems.length) return problems;
|
|
143
|
+
|
|
144
|
+
for (const [k, m] of tierOps) {
|
|
145
|
+
if (m === null) { if (isDict(data.tiers)) delete data.tiers[k]; continue; }
|
|
146
|
+
if (!isDict(data.tiers)) data.tiers = {};
|
|
147
|
+
data.tiers[k] = m;
|
|
148
|
+
}
|
|
149
|
+
for (const [name, m] of pinOps) {
|
|
150
|
+
if (m === null) {
|
|
151
|
+
if (isDict(data.agents) && Object.hasOwn(data.agents, name) && isDict(data.agents[name])) delete data.agents[name].model;
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
if (!isDict(data.agents)) data.agents = {};
|
|
155
|
+
if (!Object.hasOwn(data.agents, name) || !isDict(data.agents[name])) data.agents[name] = {};
|
|
156
|
+
data.agents[name].model = m;
|
|
157
|
+
}
|
|
158
|
+
return [];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** `POST /api/agent-models`: `ok: false` (a 409) when nothing was written, with the reason. */
|
|
162
|
+
export function apiAgentModelsSave(state, body) {
|
|
163
|
+
const { claude, dir } = viewOf(state);
|
|
164
|
+
if (!claude) return { ok: false, error: 'Models are set on Claude Code installs only' };
|
|
165
|
+
const { file, data, problem } = readOverrides(dir);
|
|
166
|
+
if (problem) return { ok: false, error: problem };
|
|
167
|
+
const names = state.inventory.agents.map((a) => a.name);
|
|
168
|
+
const problems = editOverrides(data, { tiers: bget(body, 'tiers'), agents: bget(body, 'agents') }, names);
|
|
169
|
+
if (problems.length) return { ok: false, error: problems.join('; ') };
|
|
170
|
+
writeTextAtomic(file, `${jsonDumpsIndent(data, { ensureAscii: false })}\n`);
|
|
171
|
+
return { ok: true, rebuild: true, ...apiAgentModels(state) };
|
|
172
|
+
}
|
package/js/web/api.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import { factCount } from '../hosts/memory-files.mjs';
|
|
|
24
24
|
import { autostartState } from '../hosts/shim.mjs';
|
|
25
25
|
import {
|
|
26
26
|
footprintOfDir, gatesOfDir, installedDefaults, installState, installTargets, leftoversOf, modeOfDir,
|
|
27
|
-
trustOfDir, sharedTierOfDir, contextWindowOfDir, strandedGatesOf,
|
|
27
|
+
trustOfDir, sharedTierOfDir, contextWindowOfDir, tiersOfDir, strandedGatesOf,
|
|
28
28
|
postureOfDir, readJsonMaybe, readMaybe, themeOfDir,
|
|
29
29
|
} from '../hosts/installs.mjs';
|
|
30
30
|
import { PRESETS } from '../loop/score.mjs';
|
|
@@ -247,6 +247,8 @@ export function apiInstalls(state) {
|
|
|
247
247
|
// The context window the install is built for (`--context-window`); it writes settings on
|
|
248
248
|
// Claude Code only. A row not installed yet offers the machine's, as a new install takes it.
|
|
249
249
|
contextWindow: installState(root, host, scope) === 'absent' ? machineWindow() : contextWindowOfDir(root, host),
|
|
250
|
+
// The tier routing the install was built with (`--tiers`); off for a row not installed yet.
|
|
251
|
+
tiers: installState(root, host, scope) === 'absent' ? 'off' : tiersOfDir(root, host),
|
|
250
252
|
// Files here that are the user's where Geneseed ships one, and retired leftovers: what a
|
|
251
253
|
// forced rebuild would replace or remove (`leftoversOf`). Read off the emit's own record.
|
|
252
254
|
leftovers: leftoversOf(root, host, scope),
|
package/js/web/profiles-api.mjs
CHANGED
|
@@ -15,10 +15,10 @@ import path from 'node:path';
|
|
|
15
15
|
import { ROOT } from '../build/source.mjs';
|
|
16
16
|
import { installProfile } from '../build/profile.mjs';
|
|
17
17
|
import { HOSTS, expanduser } from '../hosts/hosts.mjs';
|
|
18
|
-
import { installState, installTargets } from '../hosts/installs.mjs';
|
|
18
|
+
import { installState, installTargets, tiersOfDir } from '../hosts/installs.mjs';
|
|
19
19
|
import {
|
|
20
20
|
BASE_PROFILE, isGitClone, listProfiles, loadProfile, profileBuildArgs, profileDiff, profileDirs,
|
|
21
|
-
profileFromInstall, profileHosts,
|
|
21
|
+
profileFromInstall, profileHosts, profileKits,
|
|
22
22
|
} from '../maintain/profiles.mjs';
|
|
23
23
|
import { checkProjectFolder, globalLayering, markerCollision } from '../maintain/profile-scope.mjs';
|
|
24
24
|
import { hostTools, profileChanges } from '../maintain/setup.mjs';
|
|
@@ -50,9 +50,13 @@ function activeTargets() {
|
|
|
50
50
|
* `starter`, which lists four hosts, could match no install). `sharedTier` counts only on a
|
|
51
51
|
* project install: a global apply ignores it (D37), so a global install cannot differ on it.
|
|
52
52
|
*/
|
|
53
|
-
export function followsProfile(installP, scope, p) {
|
|
53
|
+
export function followsProfile(installP, scope, p, root = null) {
|
|
54
54
|
const skip = new Set(['hosts', 'login', ...(scope === 'global' ? ['sharedTier'] : [])]);
|
|
55
|
-
|
|
55
|
+
// A kit chosen by detection is the kit an apply would have built for the install's own host: an
|
|
56
|
+
// install has the kits it has, never a kit "by detection", so compare the resolved list.
|
|
57
|
+
const resolved = p.kitsByDetection?.length
|
|
58
|
+
? { ...p, kits: profileKits(p, installP.hosts?.[0] ?? '', scope === 'project' ? root : null), kitsByDetection: [] } : p;
|
|
59
|
+
return profileDiff(installP, resolved).every((d) => skip.has(d.key));
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
/** The hosts row of the tab: `{ host, label, present }` in HOSTS order. */
|
|
@@ -79,7 +83,7 @@ function previewRows(p, project, hosts) {
|
|
|
79
83
|
// (`markerCollision`): the row says so and the panel does not offer it.
|
|
80
84
|
const refused = project ? markerCollision(project, h.host) : null;
|
|
81
85
|
const changes = h.present && !refused && state === 'active'
|
|
82
|
-
? profileChanges(profileBuildArgs(p, h.host, project)) : [];
|
|
86
|
+
? profileChanges(profileBuildArgs(p, h.host, project, root ? tiersOfDir(root, h.host) : null)) : [];
|
|
83
87
|
return {
|
|
84
88
|
host: h.host, label: h.label, present: h.present, state, root: root ? String(root) : null,
|
|
85
89
|
changes, layering: project && !refused ? globalLayering(h.host) : null, refused,
|
|
@@ -114,14 +118,14 @@ export function apiProfiles(state, url, { src = {}, tools = hostTools } = {}) {
|
|
|
114
118
|
...head, description: p.description ?? '', profile: p,
|
|
115
119
|
gatesOff: Object.keys(p.gates ?? {}),
|
|
116
120
|
diff: base.ok ? profileDiff(p, base.profile) : [],
|
|
117
|
-
matches: readBacks.filter((rb) => followsProfile(rb.profile, rb.scope, p))
|
|
121
|
+
matches: readBacks.filter((rb) => followsProfile(rb.profile, rb.scope, p, rb.path))
|
|
118
122
|
.map(({ host, scope, path: at }) => ({ host, scope, path: at })),
|
|
119
123
|
};
|
|
120
124
|
});
|
|
121
125
|
const loaded = profiles.filter((x) => x.profile);
|
|
122
126
|
const installs = readBacks.map((rb) => ({
|
|
123
127
|
host: rb.host, scope: rb.scope, path: rb.path,
|
|
124
|
-
matches: loaded.filter((x) => followsProfile(rb.profile, rb.scope, x.profile)).map((x) => x.name),
|
|
128
|
+
matches: loaded.filter((x) => followsProfile(rb.profile, rb.scope, x.profile, rb.path)).map((x) => x.name),
|
|
125
129
|
diff: base.ok ? profileDiff(rb.profile, base.profile) : [],
|
|
126
130
|
}));
|
|
127
131
|
const hosts = hostRows(tools);
|
package/js/web/routes.mjs
CHANGED
|
@@ -28,6 +28,7 @@ import { apiUsage } from './usage-api.mjs';
|
|
|
28
28
|
import { apiProfiles } from './profiles-api.mjs';
|
|
29
29
|
import { fleetSort } from './state.mjs';
|
|
30
30
|
import { apiGates } from './gates-api.mjs';
|
|
31
|
+
import { apiAgentModels, apiAgentModelsSave } from './agent-models-api.mjs';
|
|
31
32
|
import { migratePreview } from '../maintain/migrate.mjs';
|
|
32
33
|
import { apiProfile, apiProfileSave, apiRules, apiRulesDecide, apiRulesMutate, apiRulesPromote } from './user-files.mjs';
|
|
33
34
|
|
|
@@ -64,6 +65,8 @@ export const POST_ROUTES = new Map([
|
|
|
64
65
|
// ever consulted — the same shape as `/api/memory/delete` and `/api/activity` above.
|
|
65
66
|
['/api/loops/preset', [apiLoopsPresetMutate, false]],
|
|
66
67
|
['/api/autostart', [apiAutostart, true]],
|
|
68
|
+
// The `tiers` map and the per-agent model pins of one Claude Code install's agent-overrides.json.
|
|
69
|
+
['/api/agent-models', [apiAgentModelsSave, true]],
|
|
67
70
|
]);
|
|
68
71
|
|
|
69
72
|
/**
|
|
@@ -74,7 +77,7 @@ export const POST_ROUTES = new Map([
|
|
|
74
77
|
* are the only actions that read the request's install.
|
|
75
78
|
*/
|
|
76
79
|
export const VIEW_POSTS = new Set(['/api/activity', '/api/memory/delete', '/api/rules',
|
|
77
|
-
'/api/rules/promote', '/api/rules/decide', '/api/profile', '/api/actions/restore', '/api/actions/build']);
|
|
80
|
+
'/api/rules/promote', '/api/rules/decide', '/api/profile', '/api/actions/restore', '/api/actions/build', '/api/agent-models']);
|
|
78
81
|
|
|
79
82
|
/**
|
|
80
83
|
* The GETs that answer for the whole machine, not one install: they IGNORE a `?host=&path=`
|
|
@@ -229,6 +232,7 @@ export const STATE_ROUTES = {
|
|
|
229
232
|
// answers — a daemon whose POST worked and whose GET 501'd would have no way to obtain one.
|
|
230
233
|
'/api/rules': apiRules,
|
|
231
234
|
'/api/loadout': (state) => apiLoadout(state),
|
|
235
|
+
'/api/agent-models': (state) => apiAgentModels(state),
|
|
232
236
|
'/api/mcp': apiMcp,
|
|
233
237
|
'/api/loops': apiLoops,
|
|
234
238
|
'/api/loops/active': apiLoopsActive,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"//": "Every field here is argued and gated in tests/unit/package_manifest.test.mjs. `files`, `bin`, `exports` and `engines` each have a test that fails when reality drifts from this file; `version` mirrors harness.config.json and is gated too. Read that docblock before editing this one.",
|
|
3
3
|
"name": "geneseed",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.0.1",
|
|
5
5
|
"description": "A portable, theme-able harness you implant once and use everywhere to grow a disciplined AI coding agent.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ai",
|
package/profiles/autonomous.json
CHANGED
package/profiles/corporate.json
CHANGED
package/profiles/mentor.json
CHANGED
package/profiles/minimal.json
CHANGED
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
"mode": "direct",
|
|
8
8
|
"trust": "balanced",
|
|
9
9
|
"doctrines": ["craft", "rigor"],
|
|
10
|
-
"excludeSkills": ["brick-forge", "bruno", "daydream", "factory", "factory-forge", "forge-mcp", "
|
|
10
|
+
"excludeSkills": ["brick-forge", "bruno", "daydream", "factory", "factory-forge", "forge-mcp", "react-view-transitions"],
|
|
11
11
|
"kits": [],
|
|
12
|
+
"kitsByDetection": ["superpowers"],
|
|
12
13
|
"contextWindow": "200k",
|
|
13
14
|
"gates": { "ownershipGate": false },
|
|
14
15
|
"login": true
|
package/profiles/starter.json
CHANGED
package/src/AGENT.md.tmpl
CHANGED
|
@@ -232,14 +232,11 @@ the ten council seats are convened by the [council {{SKILL}}]({{DIR_SKILLS}}/cou
|
|
|
232
232
|
<!-- CATALOG:begin skills -->
|
|
233
233
|
| {{SKILL}} | Trigger |
|
|
234
234
|
| --- | --- |
|
|
235
|
-
| [brainstorm]({{DIR_SKILLS}}/brainstorm.md) | a new feature or project with no design yet, or whose goal, scope, or success criteria need pinning down first |
|
|
236
|
-
| [plan]({{DIR_SKILLS}}/plan.md) | a task has more than a couple of steps |
|
|
237
235
|
| [codebase-design]({{DIR_SKILLS}}/codebase-design.md) | designing a module's interface, placing a seam, or needing the deep-module vocabulary; pinning domain terms in GLOSSARY.md or recording a hard-to-reverse decision as an ADR |
|
|
238
236
|
| [wayfinder]({{DIR_SKILLS}}/wayfinder.md) | a chunk of work too big for one session, still in the fog — chart decision tickets before building |
|
|
239
237
|
| [parallel-agents]({{DIR_SKILLS}}/parallel-agents.md) | several independent subtasks and a tool that runs subagents |
|
|
240
238
|
| [develop]({{DIR_SKILLS}}/develop.md) | implementing a feature, fixing a bug, or changing behaviour — failing test first, affected suite green, one committed slice at a time |
|
|
241
239
|
| [worktree]({{DIR_SKILLS}}/worktree.md) | work must not share a tree with what is in flight — a crew, a second task, another session in this checkout |
|
|
242
|
-
| [debug]({{DIR_SKILLS}}/debug.md) | a bug or failure to diagnose before fixing — a red CI run or pre-merge check included, reproduced under CI's conditions |
|
|
243
240
|
| [prototype]({{DIR_SKILLS}}/prototype.md) | a design question needs a runnable answer before real implementation |
|
|
244
241
|
| [document-project]({{DIR_SKILLS}}/document-project.md) | missing/drifted docs, or a PRD, design system, architecture doc or AGENTS.md; orienting to the repo, or refreshing its map after the structure changed |
|
|
245
242
|
| [ingest]({{DIR_SKILLS}}/ingest.md) | a task needs content from a PDF, Office doc, or URL |
|
|
@@ -248,8 +245,6 @@ the ten council seats are convened by the [council {{SKILL}}]({{DIR_SKILLS}}/cou
|
|
|
248
245
|
| [learn-mode]({{DIR_SKILLS}}/learn-mode.md) | the user wants to learn while building — they design, you code what they approve |
|
|
249
246
|
| [ownership]({{DIR_SKILLS}}/ownership.md) | the developer must own production code — they decide each part at a granularity the team sets, from the root AGENTS.md |
|
|
250
247
|
| [commit]({{DIR_SKILLS}}/commit.md) | staging and writing a commit |
|
|
251
|
-
| [geneseed-code-review]({{DIR_SKILLS}}/geneseed-code-review.md) | reviewing a diff or PR |
|
|
252
|
-
| [review-response]({{DIR_SKILLS}}/review-response.md) | acting on review feedback you have received |
|
|
253
248
|
| [fresh-eyes]({{DIR_SKILLS}}/fresh-eyes.md) | a finished artifact needs an independent verdict on whether it meets the original spec, from an agent with none of the solving session's context |
|
|
254
249
|
| [security-audit]({{DIR_SKILLS}}/security-audit.md) | a change touches the security surface — auth, untrusted input, secrets, shell or file access, a new dependency — or "is this safe" |
|
|
255
250
|
| [dependencies]({{DIR_SKILLS}}/dependencies.md) | auditing dependencies — outdated, vulnerable, abandoned, unused — or upgrading a dependency, framework, or language version one change at a time |
|
|
@@ -298,7 +293,7 @@ inventory — that list is the catalogue and it is authoritative, as is its
|
|
|
298
293
|
procedure is in [`{{DIR_SKILLS}}/`]({{DIR_SKILLS}}/) and the host loads it on
|
|
299
294
|
demand.
|
|
300
295
|
<!-- CATALOG:end -->
|
|
301
|
-
{{EXCLUDED_SKILLS_LINE}}{{KITS_LINE}}{{SHARED_TIER_LINE}}{{CONTEXT_WINDOW_LINE}}
|
|
296
|
+
{{EXCLUDED_SKILLS_LINE}}{{KITS_LINE}}{{SHARED_TIER_LINE}}{{CONTEXT_WINDOW_LINE}}{{TIERS_LINE}}
|
|
302
297
|
When a task repeats and no {{SKILL}} covers it, forge one through the
|
|
303
298
|
[skill-forge]({{DIR_SKILLS}}/skill-forge.md) {{SKILL}}: copy
|
|
304
299
|
[`{{DIR_SKILLS}}/_template.md`]({{DIR_SKILLS}}/_template.md), keep it to one coherent
|
package/src/agents/_template.md
CHANGED
|
@@ -38,6 +38,10 @@
|
|
|
38
38
|
edit, webfetch, and bash. If it must run read-only commands (tests, linters,
|
|
39
39
|
scanners), add the marker `<!-- bash: allow -->` in this section to gate bash to
|
|
40
40
|
"ask" instead of denying it outright.
|
|
41
|
+
- Model tier: an unmarked agent is `standard`. For `light` (read-only, read-and-summarise
|
|
42
|
+
seats) or `strong` (judgement seats that must run on the session model), put the marker
|
|
43
|
+
`<!-- tier: light -->` on a line of its own directly above `## When to dispatch`; the build
|
|
44
|
+
strips it from every output. A seat that writes code is never `light`.
|
|
41
45
|
- Caution: the build detects the phrase "Read-only" anywhere in the file — a
|
|
42
46
|
write-capable {{AGENT}}'s spec must not contain it, or its emit is locked down.
|
|
43
47
|
|
package/src/agents/advocate.md
CHANGED
package/src/agents/architect.md
CHANGED
package/src/agents/developer.md
CHANGED
|
@@ -48,9 +48,10 @@
|
|
|
48
48
|
actually close — report the blocker instead ({{ONTOLOGY}}: {{ONT_EVIDENCE}}).
|
|
49
49
|
|
|
50
50
|
## Output contract
|
|
51
|
-
- The report starts with one line, `STATUS: OK|BLOCKED|OUT_OF_SCOPE|ERROR`: `OK` the contract is met;
|
|
51
|
+
- The report starts with one line, `STATUS: OK|BLOCKED|OUT_OF_SCOPE|ERROR|RELAY`: `OK` the contract is met;
|
|
52
52
|
`BLOCKED` an input or a decision is missing; `OUT_OF_SCOPE` not this task; `ERROR` a step failed,
|
|
53
|
-
red tests included
|
|
53
|
+
red tests included; `RELAY` a task worker hands off at its ceiling: work in progress committed,
|
|
54
|
+
handoff note follows.
|
|
54
55
|
- The files changed in the worktree and a one-line summary of what changed and
|
|
55
56
|
why, ready for the tester's pass.
|
|
56
57
|
- If the scoped task cannot be implemented as given (missing input, contradictory
|
|
@@ -61,8 +62,15 @@
|
|
|
61
62
|
### Task worker (Foreman)
|
|
62
63
|
|
|
63
64
|
Dispatched as Foreman's task worker, there is no tester seat: explore, implement and test
|
|
64
|
-
in your own context
|
|
65
|
-
|
|
65
|
+
in your own context. While you iterate, run the targeted test file, not the full suite.
|
|
66
|
+
Send its output to a file, and read only the count line and the failing test names. Wait
|
|
67
|
+
for a background run's completion notice; never poll it with a monitor or a sleep loop.
|
|
68
|
+
Count your proof runs (one run of a check command); these bounds are starting values
|
|
69
|
+
({{DOCTRINE:bound-the-loop}}). After the 3rd run in a row that leaves the same test red,
|
|
70
|
+
return `STATUS: ERROR` with the findings. At about 150k tokens of context, or after about
|
|
71
|
+
20 proof runs, hand off: commit your work in progress, and return `STATUS: RELAY` with a
|
|
72
|
+
handoff note (the failing tests, what you tried, the next step). A hand-off is no failure.
|
|
73
|
+
As a lead, hold every member's result before you end. Report `T<n> · <task> · files: <write set> · <state>`
|
|
66
74
|
at start and on each change, as the mode says. Return the branch, its commit list, any
|
|
67
75
|
uncommitted work, and the raw test + lint output — the parent re-runs it before any merge.
|
|
68
76
|
That output is a full run to completion, with the runner's own count line, never a
|
package/src/agents/empiricist.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> {{DESC_EMPIRICIST}}
|
|
4
4
|
|
|
5
|
+
<!-- tier: light -->
|
|
5
6
|
## When to dispatch
|
|
6
7
|
- A council debate (the council {{SKILL}}) needs every claim, for and against, held to evidence.
|
|
7
8
|
- The debate is running on assertion and intuition; the user wants it anchored to data, tests, or precedent.
|
package/src/agents/explorer.md
CHANGED
package/src/agents/framer.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> {{DESC_FRAMER}}
|
|
4
4
|
|
|
5
|
+
<!-- tier: light -->
|
|
5
6
|
## When to dispatch
|
|
6
7
|
- A council debate (the council {{SKILL}}) needs a test of the framing — is this the right problem.
|
|
7
8
|
- The motion may be a solution in search of a problem, or the real need sits upstream of what's proposed.
|
package/src/agents/historian.md
CHANGED
package/src/agents/operator.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> {{DESC_OPERATOR}}
|
|
4
4
|
|
|
5
|
+
<!-- tier: light -->
|
|
5
6
|
## When to dispatch
|
|
6
7
|
- A council debate (the council {{SKILL}}) needs a voice for running it in production.
|
|
7
8
|
- The motion ships to a live system: its behaviour under load, its observability, and the on-call burden all matter.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> {{DESC_PERFORMANCE}}
|
|
4
4
|
|
|
5
|
+
<!-- tier: strong -->
|
|
5
6
|
## When to dispatch
|
|
6
7
|
- The user reports something slow, heavy or timing out — a latency, throughput,
|
|
7
8
|
memory or startup complaint, or a regression against an earlier version.
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
## When NOT to dispatch
|
|
14
15
|
- No one has measured anything and nothing is slow — speculative tuning is the
|
|
15
16
|
waste this {{AGENT}} exists to refuse.
|
|
16
|
-
- The code is wrong, not slow — that is the debug {{SKILL}}.
|
|
17
|
+
- The code is wrong, not slow — that is the [debug {{SKILL}}](../{{DIR_SKILLS}}/debug.md).
|
|
17
18
|
|
|
18
19
|
## Inputs
|
|
19
20
|
- The symptom or the diff, the workload it runs under (data size, call rate,
|
package/src/agents/pragmatist.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> {{DESC_PRAGMATIST}}
|
|
4
4
|
|
|
5
|
+
<!-- tier: light -->
|
|
5
6
|
## When to dispatch
|
|
6
7
|
- A council debate (the council {{SKILL}}) needs a judgement of whether the motion is worth its cost.
|
|
7
8
|
- The user wants the real cost, effort, and complexity of a change surfaced against its payoff.
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
React-specific review only. Generic correctness, naming and structure belong to [reviewer](reviewer.md); defer to it and do not repeat its checks.
|
|
8
8
|
|
|
9
|
+
<!-- tier: strong -->
|
|
9
10
|
## When to dispatch
|
|
10
11
|
- A change touches `.tsx` / `.jsx` files, hooks or React tests and needs a framework-aware pass.
|
|
11
12
|
|
package/src/agents/researcher.md
CHANGED
package/src/agents/reviewer.md
CHANGED
package/src/agents/security.md
CHANGED
package/src/agents/skeptic.md
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Spring-specific review only. Generic correctness, naming and structure belong to [reviewer](reviewer.md); defer to it and do not repeat its checks.
|
|
8
8
|
|
|
9
|
+
<!-- tier: strong -->
|
|
9
10
|
## When to dispatch
|
|
10
11
|
- A change touches Spring Boot code (controllers, services, repositories, configuration, tests) and needs a framework-aware pass.
|
|
11
12
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Spring Security 7 audit only. The generic audit (injection, secrets, dependencies beyond Spring) belongs to [security](security.md); defer to it.
|
|
8
8
|
|
|
9
|
+
<!-- tier: strong -->
|
|
9
10
|
## When to dispatch
|
|
10
11
|
- A Spring change touches authentication, authorization, CORS, CSRF, headers, TLS or secrets handling.
|
|
11
12
|
|
package/src/agents/steward.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> {{DESC_STEWARD}}
|
|
4
4
|
|
|
5
|
+
<!-- tier: light -->
|
|
5
6
|
## When to dispatch
|
|
6
7
|
- A council debate (the council {{SKILL}}) needs a defence of the long term against short-term wins.
|
|
7
8
|
- The user wants the architectural and maintenance consequences of a change weighed before committing.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> {{DESC_USER_ADVOCATE}}
|
|
4
4
|
|
|
5
|
+
<!-- tier: light -->
|
|
5
6
|
## When to dispatch
|
|
6
7
|
- A council debate (the council {{SKILL}}) needs a voice for whoever consumes the outcome.
|
|
7
8
|
- The motion touches a user-facing surface: UX, an API's ergonomics, docs, error messages, or a downstream developer's workflow.
|
package/src/agents/visionary.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> {{DESC_VISIONARY}}
|
|
4
4
|
|
|
5
|
+
<!-- tier: light -->
|
|
5
6
|
## When to dispatch
|
|
6
7
|
- A council debate (the council {{SKILL}}) needs the bold, transformative version argued against incrementalism.
|
|
7
8
|
- The debate risks under-reaching: the user wants the ambitious upside of a change pushed, not just the safe slice.
|
package/src/bricks/ci-fix.md
CHANGED
|
@@ -5,8 +5,18 @@ effect: mutate
|
|
|
5
5
|
skill: debug
|
|
6
6
|
outcomes: pass, fail
|
|
7
7
|
---
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
The steps below stand alone. If a debug skill is installed, or the superpowers plugin's
|
|
9
|
+
systematic-debugging skill, load it for the general procedure; if neither is, carry on without.
|
|
10
|
+
Work against the failing check the card names:
|
|
11
|
+
|
|
12
|
+
1. Read its actual log, not a guess from the check's title, before changing anything. Find the
|
|
13
|
+
first failing job and step, and the command that produced the error.
|
|
14
|
+
2. Classify before touching anything: a real failure, an environment difference (version, path,
|
|
15
|
+
line endings, a binary missing in CI), an infra flake, or a gate on the report itself.
|
|
16
|
+
3. Reproduce under CI's own conditions (its script, flags and toolchain). Green locally and red in
|
|
17
|
+
CI has not reproduced yet. Never retry a run blindly.
|
|
18
|
+
4. Fix at the cause. Make the repo deterministic rather than CI more permissive; fix a flake at
|
|
19
|
+
its source or quarantine it with an issue and an owner, never skip it silently.
|
|
10
20
|
|
|
11
21
|
Touch only what that failure requires; this is a repair, not a chance to improve the pipeline
|
|
12
22
|
along the way.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{{PROVIDER_HEADING}}
|
|
2
|
+
|
|
3
|
+
The `superpowers` kit is off, and this host has no superpowers plugin to stand in for it, so the brainstorm, debug, plan, code-review and review-response {{SKILLS}} are not installed. Work such a task from the general method. If no superpowers skill is in your inventory, tell the user once: turn on the `superpowers` kit.
|