llm-orchestrator 1.3.1 → 1.5.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/.claude-plugin/plugin.json +1 -1
- package/README.md +27 -13
- package/SKILL.md +11 -1
- package/adapters/agents.mjs +111 -12
- package/adapters/commands.mjs +10 -2
- package/agents/adversarial-skeptic.md +43 -3
- package/agents/backend-fixer.md +41 -3
- package/agents/code-reviewer.md +44 -3
- package/agents/code-simplifier.md +41 -3
- package/agents/db-concurrency-specialist.md +45 -3
- package/agents/db-migration-author.md +44 -3
- package/agents/explore.md +43 -3
- package/agents/frontend-fixer.md +42 -3
- package/agents/frontend-specialist.md +43 -3
- package/agents/general.md +40 -3
- package/agents/orchestrator.md +46 -3
- package/agents/production-telemetry-collector.md +45 -3
- package/agents/provider-webhook-specialist.md +44 -3
- package/agents/route-data-flow-tracer.md +43 -3
- package/agents/test-engineer.md +42 -3
- package/bin/attribution-check.mjs +1 -1
- package/bin/doctor.mjs +8 -6
- package/commands/incident-close.md +10 -0
- package/commands/incident-evidence.md +10 -0
- package/commands/incident-fix.md +10 -0
- package/commands/incident-start.md +10 -0
- package/commands/incident-verify.md +10 -0
- package/commands/orchestrate.md +10 -0
- package/commands/task-cancel.md +10 -0
- package/commands/task-plan.md +10 -0
- package/commands/task-status.md +10 -0
- package/commands/task-verify.md +10 -0
- package/commands/task.md +70 -0
- package/lib/adapter-renderer.mjs +5 -1
- package/lib/capability-resolver.mjs +59 -5
- package/lib/first-run.mjs +42 -1
- package/lib/project-discovery.mjs +4 -0
- package/package.json +2 -1
- package/policies/capabilities.md +27 -10
- package/protocol.md +3 -1
- package/registries/agent-roles.json +329 -10
- package/registries/capabilities.json +1 -1
- package/registries/core-profile.json +29 -0
- package/registries/preferred-tools.json +21 -2
- package/registries/task-mappings.json +10 -6
- package/schemas/agent-roles.schema.json +88 -1
- package/schemas/capability-contract.schema.json +1 -0
- package/workflows/bug-fix.md +4 -0
- package/workflows/feature.md +9 -1
- package/workflows/investigation.md +4 -0
- package/workflows/refactor.md +4 -0
- package/workflows/review.md +4 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-orchestrator",
|
|
3
3
|
"description": "Write /task once — it plans the work, shards it across parallel subagents, gates every phase and verifies before claiming done. Claude Code, Codex, OpenCode, Kilo.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bogdan-Gabriel Torcescu",
|
|
7
7
|
"url": "https://www.linkedin.com/in/bogdantorcescu/"
|
package/README.md
CHANGED
|
@@ -86,9 +86,16 @@ No clone, no Node invocation. Type these two in any Claude Code session:
|
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
That registers the `orchestrate-core` skill straight from this repository, and `/plugin update
|
|
89
|
-
llm-orchestrator@tbogdan` keeps it current. The plugin ships the
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
llm-orchestrator@tbogdan` keeps it current. The plugin also ships the native commands (`/task`,
|
|
90
|
+
`/task-plan`, `/task-status`, `/task-cancel`, `/task-verify`, `/incident-*`, `/orchestrate`),
|
|
91
|
+
namespaced by the plugin as `/llm-orchestrator:task` and so on; the bare `/task` works too while no
|
|
92
|
+
other command claims the name — but a CLI install (below) also writes a project
|
|
93
|
+
`.claude/commands/task.md`, and once both are present the bare `/task` resolves ambiguously between
|
|
94
|
+
them, so pick one install path, or always use the namespaced `/llm-orchestrator:task`. It does not
|
|
95
|
+
write project files. If you also want `.claude/commands/*.md`, the per-role agent files under
|
|
96
|
+
`.claude/agents/` (one per role in `registries/agent-roles.json`, written only with
|
|
97
|
+
`--with-agents`) and the `@AGENTS.md` line in `CLAUDE.md`, run the CLI install below with
|
|
98
|
+
`--harness claude`.
|
|
92
99
|
|
|
93
100
|
### Codex, OpenCode, Kilo — install from npm
|
|
94
101
|
|
|
@@ -119,8 +126,8 @@ node bin/llm-orchestrator.mjs install --project /path/to/app --harness <harness>
|
|
|
119
126
|
|
|
120
127
|
| Harness | Fastest install | What it gives you | Reload |
|
|
121
128
|
| --- | --- | --- | --- |
|
|
122
|
-
| Claude Code | `/plugin install llm-orchestrator@tbogdan` | the `orchestrate-core` skill | new session |
|
|
123
|
-
| Claude Code (full) | `npx llm-orchestrator install --harness claude --apply` | skill + commands +
|
|
129
|
+
| Claude Code | `/plugin install llm-orchestrator@tbogdan` | the `orchestrate-core` skill, `/llm-orchestrator:task` and the other commands, the role agents | new session |
|
|
130
|
+
| Claude Code (full) | `npx llm-orchestrator install --harness claude --apply` | skill + commands (+ role agents with `--with-agents`) + `CLAUDE.md` binding | `/reload` or new session |
|
|
124
131
|
| Codex | `npx llm-orchestrator install --harness codex --apply` | `AGENTS.md` span, skill, `~/.codex/prompts/*.md` | new Codex session |
|
|
125
132
|
| OpenCode | `npx llm-orchestrator install --harness opencode --apply` | `.opencode/command(s)/*.md`, skill | restart `opencode` |
|
|
126
133
|
| Kilo | `npx llm-orchestrator install --harness kilo --apply` | `.kilo/command(s)/*.md`, skill | restart Kilo |
|
|
@@ -219,6 +226,8 @@ These apply to every task, everywhere, regardless of harness (see `registries/co
|
|
|
219
226
|
|
|
220
227
|
Four more gates are equally mandatory, at their own trigger rather than on every turn: `verification.checks` (verification-before-completion, before any completion claim), `skill.check` (before any action, check whether a skill already covers it), `tool.discovery` (search before declaring a tool absent), and `user.native_question` (every question to the user goes through the harness's native mechanism, batched into one question — `AskUserQuestion` on Claude Code, `request_user_input` / `update_plan` on Codex, `question` on OpenCode, `ask_followup_question` on Kilo; see `policies/questions.md`).
|
|
221
228
|
|
|
229
|
+
One more is mandatory by domain — `D1`, `ui.design_system` → [Impeccable](https://impeccable.style) (`impeccable`, Apache-2.0; `registries/core-profile.json` order 13, `domain_conditional: true`). It applies to every task whose pre-evaluation domain is `FRONTEND`, or that creates, changes, reviews or audits UI or visual design: `/impeccable shape` (or `critique`) before building — `/impeccable init` first when the project has no `PRODUCT.md` — and `/impeccable audit` + `/impeccable polish` before G5; each `workflows/<type>.md` names the command for each phase. `ui-ux-pro-max`, `frontend-design`, `design-system`, `ui-styling` and `web-design-guidelines` stay available as complements — they never substitute for it silently, and the resolver will not bind them in its place. A missing Impeccable follows the same portability rule as the core tools: gap declared first, install recommended once, degraded only after an explicit refusal.
|
|
230
|
+
|
|
222
231
|
#### Installing the core tools
|
|
223
232
|
|
|
224
233
|
`llm-orchestrator init` reports which of these are missing and prints the matching command. The
|
|
@@ -237,6 +246,7 @@ can `npx`.
|
|
|
237
246
|
| `docs.current` | context7 | `claude mcp add context7 -- npx -y @upstash/context7-mcp` |
|
|
238
247
|
| `research.retrieve` | exa | `claude mcp add exa -- npx -y exa-mcp-server` |
|
|
239
248
|
| `tool.discovery` | harness-native tool search | built in, nothing to install |
|
|
249
|
+
| `ui.design_system` (frontend/UI tasks) | impeccable | `npx impeccable install` from the project root (detects Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Copilot, … and installs into each; refresh with `npx impeccable update`), or on Claude Code `/plugin marketplace add pbakaus/impeccable` then `/plugin install impeccable@impeccable` (skill id `impeccable:impeccable`). A harness the installer does not detect (Kilo is not in its published list) is a declared gap. Start a new project with `/impeccable init` |
|
|
240
250
|
|
|
241
251
|
The `/plugin ...` lines are Claude Code commands, typed in a session. The `claude mcp add ...` lines
|
|
242
252
|
are shell commands; on Codex, OpenCode or Kilo, register the same MCP server through that harness's
|
|
@@ -246,7 +256,9 @@ Every one of these is optional in the sense that the core still runs without it
|
|
|
246
256
|
in **declared degraded mode**, and every plan and report says so. That is the design, not a
|
|
247
257
|
workaround.
|
|
248
258
|
|
|
249
|
-
|
|
259
|
+
`init` reports a missing `impeccable` on a project whose discovery finds a UI framework (the `frontend` domain: Vue, Nuxt, React, Next, Svelte, Angular, Solid, Preact, Astro, Lit). `doctor` reports it, with the install hint, when the task it is asked about triggers it — `doctor --task feature --domain FRONTEND`, or a UI signal such as `--signals web-ui`.
|
|
260
|
+
|
|
261
|
+
The first eight rows of the core table above are `registries/core-profile.json` orders 1–8, in that order. The same eight, in the same order, appear in `SKILL.md`, `policies/capabilities.md` and the `task` command checklist, and `lib/first-run.mjs` checks exactly these for presence — `tests/coherence.test.mjs` fails if any of those six lists drifts.
|
|
250
262
|
|
|
251
263
|
### Registries
|
|
252
264
|
|
|
@@ -278,7 +290,9 @@ example below spells the clone form, and the npm form is identical minus the `no
|
|
|
278
290
|
|
|
279
291
|
`--package-root <dir>` (where the package's own files are read from) and `--state-root <dir>` (where the installation manifest is kept; defaults to `$XDG_STATE_HOME/portable-orchestrator` or `~/.local/state/portable-orchestrator`) exist on `install`, `uninstall` and `init` for testing and for non-standard layouts — you normally leave both alone.
|
|
280
292
|
|
|
281
|
-
Multiple harnesses may share one explicitly enabled skill root using a comma-separated `--harness` value; when you don't pass `--skills-root` in that case it defaults to the shared `~/.agents/skills`, and *you* must ensure every selected harness is actually pointed at that root (see "Several harnesses at once" below). Add `--with-agents` to also render the per-harness
|
|
293
|
+
Multiple harnesses may share one explicitly enabled skill root using a comma-separated `--harness` value; when you don't pass `--skills-root` in that case it defaults to the shared `~/.agents/skills`, and *you* must ensure every selected harness is actually pointed at that root (see "Several harnesses at once" below). Add `--with-agents` to also render one agent file per role in `registries/agent-roles.json` under the per-harness agent directory (`.claude/agents/`, `.opencode/agent/`, `.kilo/agent/`; no-op for Codex). Add `--link-claude` to have the installer create the `~/.claude/skills/orchestrate-core -> <skills-root>/orchestrate-core` symlink itself when Claude is one of several harnesses sharing a non-default root (idempotent; it never replaces a real directory). Restart/reload a session whose skill catalog is cached.
|
|
294
|
+
|
|
295
|
+
Each rendered agent carries native frontmatter for its harness: Claude Code gets `disallowedTools: Write, Edit, NotebookEdit` on an edit-denied role (read-only roles and the orchestrator); OpenCode and Kilo get `mode: subagent` (`primary` for the orchestrator) and `permission: edit: deny` on the same roles. Edit denial does not sandbox shell writes: it removes the edit tools only, and read-only roles keep Bash for inspection; the rendered Permissions section tells them never to write through the shell, and a hard boundary needs the harness's own shell permissions. On OpenCode and Kilo, the rendered `general.md` and `explore.md` share their names with the built-in `general` and `explore` subagents and replace their prompts project-wide. That is intended: the role ids are what the flow gate classifies dispatches by, and the replacements stay bounded (`general`, RW within its owned files) or read-only (`explore`).
|
|
282
296
|
|
|
283
297
|
### Step by step
|
|
284
298
|
|
|
@@ -306,9 +320,9 @@ Same five steps for every harness; only the skills root and the reload differ.
|
|
|
306
320
|
| Harness | `--harness` | `--skills-root` | Where things land | Reload |
|
|
307
321
|
| --- | --- | --- | --- | --- |
|
|
308
322
|
| Codex | `codex` | `~/.agents/skills` (default) | `AGENTS.md` span, `.agents/skills/orchestrate/SKILL.md`, `~/.codex/prompts/*.md` | new Codex session |
|
|
309
|
-
| Claude / Claude Code | `claude` | `~/.claude/skills` (or symlink it to `~/.agents/skills/orchestrate-core`) | `.claude/commands/*.md`, `CLAUDE.md` gets `@AGENTS.md`, `--with-agents` → `.claude/agents
|
|
310
|
-
| OpenCode | `opencode` | `~/.config/opencode/skills` | `.opencode/commands/*.md`, `--with-agents` → `.opencode/agent
|
|
311
|
-
| Kilo | `kilo` | `~/.kilo/skills` | `.kilo/commands/*.md`, `--with-agents` → `.kilo/agent
|
|
323
|
+
| Claude / Claude Code | `claude` | `~/.claude/skills` (or symlink it to `~/.agents/skills/orchestrate-core`) | `.claude/commands/*.md`, `CLAUDE.md` gets `@AGENTS.md`, `--with-agents` → one agent file per role under `.claude/agents/` | `/reload` or new session |
|
|
324
|
+
| OpenCode | `opencode` | `~/.config/opencode/skills` | `.opencode/commands/*.md`, `--with-agents` → one agent file per role under `.opencode/agent/` | restart `opencode` |
|
|
325
|
+
| Kilo | `kilo` | `~/.kilo/skills` | `.kilo/commands/*.md`, `--with-agents` → one agent file per role under `.kilo/agent/` | restart Kilo / `kilo debug skill --pure` to confirm discovery |
|
|
312
326
|
|
|
313
327
|
Several harnesses at once: `--harness codex,claude,opencode,kilo --skills-root ~/.agents/skills`, then make sure each IDE is pointed at that root (Claude Code accepts a personal skill-folder symlink; OpenCode and Kilo need the root enabled in their config).
|
|
314
328
|
|
|
@@ -342,9 +356,9 @@ Generic rules live in `orchestrate-core`; this section only adds or tightens.
|
|
|
342
356
|
### Per-harness notes
|
|
343
357
|
|
|
344
358
|
- **Codex** reads `AGENTS.md` plus `.agents/skills/*/SKILL.md`; custom prompts install to `~/.codex/prompts/*.md` (or `--codex-prompts-root <dir>`); subagents dispatch via `spawn_agent`, plans via `update_plan`.
|
|
345
|
-
- **Claude Code** installs `.claude/commands/*.md`, `.claude/agents/*.md
|
|
346
|
-
- **OpenCode** installs `.opencode/command(s)/*.md`, `.opencode/agent/*.md
|
|
347
|
-
- **Kilo** installs `.kilo/command(s)/*.md`, `.kilo/agent/*.md
|
|
359
|
+
- **Claude Code** installs `.claude/commands/*.md`, `.claude/agents/*.md` (with `--with-agents`), `.claude/skills/*/SKILL.md`, and adds `@AGENTS.md` to `CLAUDE.md`; subagents dispatch via the Agent tool.
|
|
360
|
+
- **OpenCode** installs `.opencode/command(s)/*.md`, `.opencode/agent/*.md` (with `--with-agents`), skills under `~/.config/opencode/skills`; subagents dispatch via the task tool. Sequential Thinking's permission key is `sequentialthinking_sequentialthinking`.
|
|
361
|
+
- **Kilo** installs `.kilo/command(s)/*.md`, `.kilo/agent/*.md` (with `--with-agents`), skills under `~/.kilo/skills`/`.kilo/skills`; Agent Manager worktrees live under `.kilo/worktrees/`. Same Sequential Thinking permission key as OpenCode.
|
|
348
362
|
|
|
349
363
|
### Flow adherence
|
|
350
364
|
|
package/SKILL.md
CHANGED
|
@@ -26,7 +26,9 @@ merely worse — it makes it invalid.
|
|
|
26
26
|
Disk presence never proves callability. Never invent a server, tool or skill name.
|
|
27
27
|
4. **Emit the pre-evaluation JSON** — the full object in [protocol.md](protocol.md). No dispatch,
|
|
28
28
|
no edit, no shell before it exists. Then open the run:
|
|
29
|
-
`node <
|
|
29
|
+
`node <package root>/bin/llm-orchestrator.mjs run start --type <TASK_TYPE> --shards <n>`, where
|
|
30
|
+
the package root is the absolute directory you read this SKILL.md from (the path the
|
|
31
|
+
`orchestrate-core` pointer resolved to — not the `skills/orchestrate-core/` pointer directory)
|
|
30
32
|
(`llm-orchestrator run start ...` when installed from npm; the PlanShard count from step 5 may be
|
|
31
33
|
added once known). A task too small for the flow is declared, not skipped:
|
|
32
34
|
`... run start --trivial "<reason>"`.
|
|
@@ -75,6 +77,14 @@ Four more gates are equally mandatory, at their own trigger rather than on every
|
|
|
75
77
|
| `tool.discovery` | harness-native tool search | Before saying a tool or MCP is unavailable | [capabilities](policies/capabilities.md) |
|
|
76
78
|
| `user.native_question` | the harness's native question mechanism | Whenever the user must be asked — one batched question, never free text at the end of a message | [questions](policies/questions.md) |
|
|
77
79
|
|
|
80
|
+
One more is mandatory by domain — on every task whose domain is `FRONTEND`, or that creates,
|
|
81
|
+
changes, reviews or audits UI or visual design (`registries/core-profile.json` order 13,
|
|
82
|
+
`domain_conditional: true`):
|
|
83
|
+
|
|
84
|
+
| # | Capability | Item | When | Contract |
|
|
85
|
+
|---|---|---|---|---|
|
|
86
|
+
| D1 | `ui.design_system` | `impeccable` (`/impeccable <command> <target>`) | Any `FRONTEND`-domain task, or any task that creates, changes, reviews or audits UI or visual design | `/impeccable shape` (or `critique`) before building — `init` first when `PRODUCT.md` is missing; `audit` + `polish` before G5; per-phase commands in `workflows/<type>.md`. `ui-ux-pro-max`, `frontend-design`, `design-system`, `ui-styling` and `web-design-guidelines` are complements — they never substitute for it silently |
|
|
87
|
+
|
|
78
88
|
Plus every row of the project's `## Orchestration bindings (project)` section marked mandatory.
|
|
79
89
|
|
|
80
90
|
### When a mandatory item is not installed (portability rule)
|
package/adapters/agents.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import {readFileSync} from 'node:fs';
|
|
|
4
4
|
|
|
5
5
|
const MD_MARKER = '<!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->';
|
|
6
6
|
const REGISTRY_URL = new URL('../registries/agent-roles.json', import.meta.url);
|
|
7
|
+
const PREFERRED_TOOLS_URL = new URL('../registries/preferred-tools.json', import.meta.url);
|
|
7
8
|
|
|
8
9
|
let registryCache = null;
|
|
9
10
|
function loadRegistry() {
|
|
@@ -16,31 +17,129 @@ function loadRegistry() {
|
|
|
16
17
|
return registryCache;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
// MCP aliases from registries/preferred-tools.json, keyed by canonical server id. A role
|
|
21
|
+
// names the server id; the alias (the tool name the policies call, e.g. `sequentialthinking`)
|
|
22
|
+
// is rendered beside it so neither name is lost.
|
|
23
|
+
let mcpAliasCache = null;
|
|
24
|
+
function mcpAliases() {
|
|
25
|
+
if (mcpAliasCache) return mcpAliasCache;
|
|
26
|
+
try {
|
|
27
|
+
const {tools = []} = JSON.parse(readFileSync(PREFERRED_TOOLS_URL, 'utf8'));
|
|
28
|
+
mcpAliasCache = new Map(tools.filter((tool) => tool.kind === 'mcp').map((tool) => [tool.id, tool.aliases ?? []]));
|
|
29
|
+
} catch {
|
|
30
|
+
mcpAliasCache = new Map();
|
|
31
|
+
}
|
|
32
|
+
return mcpAliasCache;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Same wording as adapters/commands.mjs: the global skill and the project bridge are two files.
|
|
36
|
+
const ORCHESTRATE_LINE = 'Mandatory — before acting, load and follow the `orchestrate-core` skill (or, in a project install, the bridge `.agents/skills/orchestrate/SKILL.md`).';
|
|
37
|
+
// Edit denial removes the edit tools only; Bash can still write, so RO roles say so.
|
|
38
|
+
const RO_SHELL_LINE = 'Bash is for inspection only; edit denial does not sandbox shell writes — never write through the shell.';
|
|
39
|
+
|
|
40
|
+
const bullets = (items) => items.map((item) => `- ${item}`).join('\n');
|
|
41
|
+
const codeList = (items) => items.map((item) => `\`${item}\``).join(', ');
|
|
42
|
+
const mcpList = (items) => items.map((id) => {
|
|
43
|
+
const aliases = mcpAliases().get(id) ?? [];
|
|
44
|
+
return aliases.length ? `\`${id}\` (alias ${codeList(aliases)})` : `\`${id}\``;
|
|
45
|
+
}).join(', ');
|
|
46
|
+
|
|
47
|
+
// Canonical handoff fields, in order: the "Handoff schema" list in policies/dispatch.md.
|
|
48
|
+
// tests/adapters.test.mjs parses that policy and fails if this list drifts from it.
|
|
49
|
+
const HANDOFF_FIELDS = ['task_id', 'phase', 'status', 'owned_files', 'commands', 'evidence', 'blockers', 'next_action'];
|
|
50
|
+
const USED_MCPS_RULE = 'every MCP server you called, and every required MCP from the dispatch contract with its unavailable or error result; silent omission fails the gate';
|
|
51
|
+
|
|
52
|
+
// Rules every dispatched child follows, whatever its role. The orchestrator is the
|
|
53
|
+
// parent that receives these fields, so it gets the receiving side of each rule.
|
|
54
|
+
const CHILD_RULES = [
|
|
55
|
+
'Stay inside the owned files named in your dispatch contract (a read-only role owns none); a needed edit outside them goes back to the parent, not into the diff.',
|
|
56
|
+
'Evidence before assertions: every claim of done, fixed or passing carries the command you ran and its exit status.',
|
|
57
|
+
'Never ask the user; put an open question in the handoff as `question_for_user` and keep independent work moving.',
|
|
58
|
+
`Report \`used_mcps\`: ${USED_MCPS_RULE}.`,
|
|
59
|
+
];
|
|
60
|
+
const ORCHESTRATOR_RULES = [
|
|
61
|
+
'Give every shard its owned files, disjoint within a parallel group.',
|
|
62
|
+
'Evidence before assertions: every claim of done, fixed or passing carries the command you ran and its exit status.',
|
|
63
|
+
'Collect each child\'s `question_for_user` and ask the user once, through the native question mechanism.',
|
|
64
|
+
`Merge each child's \`used_mcps\` with your own into the final report: ${USED_MCPS_RULE}.`,
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
// Native frontmatter per harness. Claude Code (and the plugin's agents/) deny edit
|
|
68
|
+
// tools with `disallowedTools`; OpenCode and Kilo default a file agent to mode `all`,
|
|
69
|
+
// so every role declares its mode and an edit-denied role carries `permission.edit`.
|
|
70
|
+
const HARNESS_FORMATS = new Set(['claude', 'opencode', 'kilo']);
|
|
71
|
+
const EDIT_TOOLS = 'Write, Edit, NotebookEdit';
|
|
72
|
+
|
|
73
|
+
function frontmatter(role, profile, harness) {
|
|
74
|
+
const editDenied = !(profile?.required_access ?? []).includes('edit');
|
|
75
|
+
const lines = [`name: ${role.id}`, `description: ${JSON.stringify(role.description)}`];
|
|
76
|
+
if (harness === 'claude') {
|
|
77
|
+
if (editDenied) lines.push(`disallowedTools: ${EDIT_TOOLS}`);
|
|
78
|
+
} else {
|
|
79
|
+
lines.push(`mode: ${role.permission_profile === 'ORCHESTRATOR' ? 'primary' : 'subagent'}`);
|
|
80
|
+
if (editDenied) lines.push('permission:', ' edit: deny');
|
|
81
|
+
}
|
|
82
|
+
return lines.join('\n');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function toolLines(role) {
|
|
86
|
+
const lines = [
|
|
87
|
+
`- Skills: ${role.skills.length ? codeList(role.skills) : 'none role-specific; use those the dispatch contract names'}.`,
|
|
88
|
+
`- MCP servers: ${role.mcps.length ? mcpList(role.mcps) : 'none role-specific'}. Confirm an MCP is callable before relying on it; if one is missing, declare the gap instead of substituting silently.`,
|
|
89
|
+
];
|
|
90
|
+
const needs = role.tool_capabilities ?? [];
|
|
91
|
+
if (needs.length) {
|
|
92
|
+
const classes = needs.map(({capability, label}) => `${label} (\`${capability}\` capability)`).join(', ');
|
|
93
|
+
lines.push(`- Capability classes: ${classes}. These are not server names: use whatever tool the project binds for each, and declare the gap if none is bound.`);
|
|
94
|
+
}
|
|
95
|
+
return lines;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function renderRole(role, profile, harness) {
|
|
99
|
+
const orchestrator = role.permission_profile === 'ORCHESTRATOR';
|
|
100
|
+
const {charter} = role;
|
|
101
|
+
if (!charter) throw new Error(`registries/agent-roles.json: role ${role.id} has no charter; every role needs mission, principles, done_when, never and handoff`);
|
|
102
|
+
const permissionRules = [...(profile?.rules ?? []), ...(role.permission_profile === 'RO' ? [RO_SHELL_LINE] : [])];
|
|
20
103
|
const profileLine = profile
|
|
21
104
|
? `Permission profile: ${role.permission_profile} — ${profile.description}`
|
|
22
105
|
: `Permission profile: ${role.permission_profile}`;
|
|
106
|
+
const runLine = orchestrator
|
|
107
|
+
? 'You own the run: open it after the pre-evaluation JSON and close it last. Dispatched inside a parent\'s run, never open a second one and never close the parent\'s.'
|
|
108
|
+
: 'You work inside the parent\'s run: never open or close one.';
|
|
109
|
+
const fields = codeList(HANDOFF_FIELDS);
|
|
110
|
+
const handoffFields = orchestrator
|
|
111
|
+
? `Nested inside a parent's run, return the handoff fields ${fields}, plus \`used_mcps\` and \`question_for_user\`. At top level, open questions go to the user through the native question mechanism, batched once, never as free text in the report.`
|
|
112
|
+
: `Always include the handoff fields ${fields}, plus \`used_mcps\` and \`question_for_user\` (or null).`;
|
|
113
|
+
const sections = [
|
|
114
|
+
`# ${role.id}`,
|
|
115
|
+
`${charter.mission}\nBest for: ${role.best_for}`,
|
|
116
|
+
`${ORCHESTRATE_LINE} ${runLine}\nNever bypass a mandatory capability without declaring the gap first.`,
|
|
117
|
+
`## Permissions\n${profileLine}\n${bullets(permissionRules)}`,
|
|
118
|
+
`## Tools\n${toolLines(role).join('\n')}`,
|
|
119
|
+
`## Operating principles\n${bullets(charter.principles)}`,
|
|
120
|
+
`## Done when\n${bullets(charter.done_when)}`,
|
|
121
|
+
`## Never\n${bullets(charter.never)}`,
|
|
122
|
+
`## Every ${orchestrator ? 'run' : 'shard'}\n${bullets(orchestrator ? ORCHESTRATOR_RULES : CHILD_RULES)}`,
|
|
123
|
+
`## Handoff\n${charter.handoff}\n${handoffFields}`,
|
|
124
|
+
];
|
|
23
125
|
return `---
|
|
24
|
-
|
|
25
|
-
description: ${role.description}
|
|
126
|
+
${frontmatter(role, profile, harness)}
|
|
26
127
|
---
|
|
27
128
|
${MD_MARKER}
|
|
28
129
|
|
|
29
|
-
|
|
30
|
-
${profileLine}
|
|
31
|
-
Best for: ${role.best_for}
|
|
32
|
-
Never bypass a mandatory capability without declaring the gap first.
|
|
130
|
+
${sections.join('\n\n')}
|
|
33
131
|
`;
|
|
34
132
|
}
|
|
35
133
|
|
|
36
134
|
/**
|
|
37
|
-
* Render one native agent file per registry role, at `<directory>/<id>.md
|
|
38
|
-
*
|
|
135
|
+
* Render one native agent file per registry role, at `<directory>/<id>.md`, in the
|
|
136
|
+
* frontmatter format of `harness` (`claude` — also the plugin's agents/ — `opencode`
|
|
137
|
+
* or `kilo`). Pure and deterministic; callers own filesystem writes and ownership checks.
|
|
39
138
|
*/
|
|
40
|
-
export function agentFiles(directory) {
|
|
41
|
-
|
|
139
|
+
export function agentFiles(directory, harness = 'claude', registry = loadRegistry()) {
|
|
140
|
+
if (!HARNESS_FORMATS.has(harness)) throw new Error(`agentFiles: unsupported agent harness ${harness}`);
|
|
42
141
|
return registry.roles.map((role) => ({
|
|
43
142
|
path: `${directory}/${role.id}.md`,
|
|
44
|
-
content: renderRole(role, registry.permission_profiles?.[role.permission_profile]),
|
|
143
|
+
content: renderRole(role, registry.permission_profiles?.[role.permission_profile], harness),
|
|
45
144
|
}));
|
|
46
145
|
}
|
package/adapters/commands.mjs
CHANGED
|
@@ -60,6 +60,14 @@ core tool in this order (present / gap declared / explicit user refusal):
|
|
|
60
60
|
8. \`exa\` for any external or current fact (research.retrieve)
|
|
61
61
|
9. \`verification-before-completion\` (verification.checks)
|
|
62
62
|
|
|
63
|
+
Domain-conditional — when the task's domain is FRONTEND, or it creates, changes, reviews or audits
|
|
64
|
+
UI or visual design, also declare:
|
|
65
|
+
|
|
66
|
+
D1. \`impeccable\` (ui.design_system) — \`/impeccable shape\` (or \`critique\`) before building,
|
|
67
|
+
\`audit\` + \`polish\` before G5; \`/impeccable init\` first when PRODUCT.md is missing.
|
|
68
|
+
ui-ux-pro-max, frontend-design, design-system, ui-styling and web-design-guidelines complement
|
|
69
|
+
it — never substitute for it silently.
|
|
70
|
+
|
|
63
71
|
Questions: native, batched, once — every question to the user (mandatory-tool gap, batched
|
|
64
72
|
"skip or fix?" minor findings, destructive confirmation, surviving scope ambiguity) goes through the
|
|
65
73
|
harness's native question mechanism (user.native_question), batched into ONE question at the decision
|
|
@@ -103,11 +111,11 @@ export function nativeCommands(directory) {
|
|
|
103
111
|
return Object.keys(descriptions).map((name) => ({
|
|
104
112
|
path: `${directory}/${name}.md`,
|
|
105
113
|
content: `---
|
|
106
|
-
description: ${descriptions[name]}
|
|
114
|
+
description: ${JSON.stringify(descriptions[name])}
|
|
107
115
|
---
|
|
108
116
|
${MD_MARKER}
|
|
109
117
|
|
|
110
|
-
Load and follow
|
|
118
|
+
Load and follow the \`orchestrate-core\` skill (or, in a project install, the bridge \`.agents/skills/orchestrate/SKILL.md\`) before handling this request.
|
|
111
119
|
Mode: ${modes[name]}
|
|
112
120
|
Arguments: $ARGUMENTS
|
|
113
121
|
|
|
@@ -1,10 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: adversarial-skeptic
|
|
3
|
-
description: Independently challenges a conclusion, diagnosis, or diff before it ships.
|
|
3
|
+
description: "Independently challenges a conclusion, diagnosis, or diff before it ships."
|
|
4
|
+
disallowedTools: Write, Edit, NotebookEdit
|
|
4
5
|
---
|
|
5
6
|
<!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
# adversarial-skeptic
|
|
9
|
+
|
|
10
|
+
You try to falsify a conclusion, diagnosis or diff before it ships; your job is to find the case where it is wrong.
|
|
9
11
|
Best for: Money, auth, migration, and frozen-build-shaped review seats.
|
|
12
|
+
|
|
13
|
+
Mandatory — before acting, load and follow the `orchestrate-core` skill (or, in a project install, the bridge `.agents/skills/orchestrate/SKILL.md`). You work inside the parent's run: never open or close one.
|
|
10
14
|
Never bypass a mandatory capability without declaring the gap first.
|
|
15
|
+
|
|
16
|
+
## Permissions
|
|
17
|
+
Permission profile: RO — Read-only. Investigation, evidence collection, review, telemetry.
|
|
18
|
+
- Never edits files.
|
|
19
|
+
- Bash limited to read-only/inspection commands (no writes, no migrations, no deploys).
|
|
20
|
+
- Reports findings back to the dispatcher; does not apply fixes.
|
|
21
|
+
- Bash is for inspection only; edit denial does not sandbox shell writes — never write through the shell.
|
|
22
|
+
|
|
23
|
+
## Tools
|
|
24
|
+
- Skills: none role-specific; use those the dispatch contract names.
|
|
25
|
+
- MCP servers: none role-specific. Confirm an MCP is callable before relying on it; if one is missing, declare the gap instead of substituting silently.
|
|
26
|
+
|
|
27
|
+
## Operating principles
|
|
28
|
+
- Restate the claim precisely, then list what would have to be true for it to be false.
|
|
29
|
+
- For each objection, name the cheapest check that would disprove the claim, and run it when your access allows.
|
|
30
|
+
- Verify claims against the actual code, diff and evidence, not against the author's summary.
|
|
31
|
+
- Look for missed callers, edge inputs, concurrency, error paths, rollback and shipped-client impact.
|
|
32
|
+
|
|
33
|
+
## Done when
|
|
34
|
+
- Every objection is marked confirmed, refuted or unverified, with the check that decided it.
|
|
35
|
+
- A verdict is given: holds, holds with conditions, or does not hold.
|
|
36
|
+
|
|
37
|
+
## Never
|
|
38
|
+
- Never rubber-stamp; a verdict without at least one attempted falsification is invalid.
|
|
39
|
+
- Never edit files or fix what you find.
|
|
40
|
+
- Never raise an objection without the check that would settle it.
|
|
41
|
+
|
|
42
|
+
## Every shard
|
|
43
|
+
- Stay inside the owned files named in your dispatch contract (a read-only role owns none); a needed edit outside them goes back to the parent, not into the diff.
|
|
44
|
+
- Evidence before assertions: every claim of done, fixed or passing carries the command you ran and its exit status.
|
|
45
|
+
- Never ask the user; put an open question in the handoff as `question_for_user` and keep independent work moving.
|
|
46
|
+
- Report `used_mcps`: every MCP server you called, and every required MCP from the dispatch contract with its unavailable or error result; silent omission fails the gate.
|
|
47
|
+
|
|
48
|
+
## Handoff
|
|
49
|
+
Return: the claim as restated, objections with the disproving check and its result, and the verdict with its conditions.
|
|
50
|
+
Always include the handoff fields `task_id`, `phase`, `status`, `owned_files`, `commands`, `evidence`, `blockers`, `next_action`, plus `used_mcps` and `question_for_user` (or null).
|
package/agents/backend-fixer.md
CHANGED
|
@@ -1,10 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: backend-fixer
|
|
3
|
-
description: Implements bounded backend changes: a bug fix behind a validated hypothesis,
|
|
3
|
+
description: "Implements bounded backend changes: a bug fix behind a validated hypothesis, a feature change behind a failing test, or a config change validated by its dispatch checks."
|
|
4
4
|
---
|
|
5
5
|
<!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
# backend-fixer
|
|
8
|
+
|
|
9
|
+
You implement one bounded backend change: a bug fix behind a validated hypothesis, a feature change behind a failing test, or a config change validated by the checks your dispatch names.
|
|
9
10
|
Best for: Backend implementation shards — bug fixes with a validated hypothesis, and the build phase of a feature or config flow.
|
|
11
|
+
|
|
12
|
+
Mandatory — before acting, load and follow the `orchestrate-core` skill (or, in a project install, the bridge `.agents/skills/orchestrate/SKILL.md`). You work inside the parent's run: never open or close one.
|
|
10
13
|
Never bypass a mandatory capability without declaring the gap first.
|
|
14
|
+
|
|
15
|
+
## Permissions
|
|
16
|
+
Permission profile: RW — Read-write within an assigned bounded shard.
|
|
17
|
+
- Edits are scoped to the files/directories named in its dispatch contract.
|
|
18
|
+
- Runs project verification for its own shard before reporting done.
|
|
19
|
+
- Does not merge, push, or deploy unless explicitly the dispatch contract's target.
|
|
20
|
+
|
|
21
|
+
## Tools
|
|
22
|
+
- Skills: `systematic-debugging`, `test-driven-development`.
|
|
23
|
+
- MCP servers: none role-specific. Confirm an MCP is callable before relying on it; if one is missing, declare the gap instead of substituting silently.
|
|
24
|
+
|
|
25
|
+
## Operating principles
|
|
26
|
+
- Start from the validated hypothesis or failing test in the dispatch; for a config change whose dispatch records G3 as not_applicable, start from the recorded current configuration, rollback path and named checks; with none of these, stop and report that.
|
|
27
|
+
- Reproduce the failure first, then make the smallest change that fixes the cause, not the symptom.
|
|
28
|
+
- Check library and framework behavior against current documentation before relying on it.
|
|
29
|
+
- Search for other callers and paths with the same defect and report them, fixing only those inside owned files.
|
|
30
|
+
|
|
31
|
+
## Done when
|
|
32
|
+
- The failing test now passes, or for a config change (G3 not_applicable) the consistency, schema or scenario checks named in the dispatch pass; the project suite for the shard passes, with commands and exit status recorded.
|
|
33
|
+
- The diff touches only owned files.
|
|
34
|
+
|
|
35
|
+
## Never
|
|
36
|
+
- Never broaden scope beyond the dispatched change.
|
|
37
|
+
- Never disable, skip or weaken a test to make it pass.
|
|
38
|
+
- Never write a schema migration; that belongs to db-migration-author.
|
|
39
|
+
|
|
40
|
+
## Every shard
|
|
41
|
+
- Stay inside the owned files named in your dispatch contract (a read-only role owns none); a needed edit outside them goes back to the parent, not into the diff.
|
|
42
|
+
- Evidence before assertions: every claim of done, fixed or passing carries the command you ran and its exit status.
|
|
43
|
+
- Never ask the user; put an open question in the handoff as `question_for_user` and keep independent work moving.
|
|
44
|
+
- Report `used_mcps`: every MCP server you called, and every required MCP from the dispatch contract with its unavailable or error result; silent omission fails the gate.
|
|
45
|
+
|
|
46
|
+
## Handoff
|
|
47
|
+
Return: root cause or config change made, files changed, test or check before and after, verification commands with exit status, and related defects found outside scope.
|
|
48
|
+
Always include the handoff fields `task_id`, `phase`, `status`, `owned_files`, `commands`, `evidence`, `blockers`, `next_action`, plus `used_mcps` and `question_for_user` (or null).
|
package/agents/code-reviewer.md
CHANGED
|
@@ -1,10 +1,51 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-reviewer
|
|
3
|
-
description: Performs the review pass at the task's review risk floor.
|
|
3
|
+
description: "Performs the review pass at the task's review risk floor."
|
|
4
|
+
disallowedTools: Write, Edit, NotebookEdit
|
|
4
5
|
---
|
|
5
6
|
<!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
# code-reviewer
|
|
9
|
+
|
|
10
|
+
You review a diff independently at the task's risk floor and report defects ranked by severity.
|
|
9
11
|
Best for: The review seat on every review-gated task.
|
|
12
|
+
|
|
13
|
+
Mandatory — before acting, load and follow the `orchestrate-core` skill (or, in a project install, the bridge `.agents/skills/orchestrate/SKILL.md`). You work inside the parent's run: never open or close one.
|
|
10
14
|
Never bypass a mandatory capability without declaring the gap first.
|
|
15
|
+
|
|
16
|
+
## Permissions
|
|
17
|
+
Permission profile: RO — Read-only. Investigation, evidence collection, review, telemetry.
|
|
18
|
+
- Never edits files.
|
|
19
|
+
- Bash limited to read-only/inspection commands (no writes, no migrations, no deploys).
|
|
20
|
+
- Reports findings back to the dispatcher; does not apply fixes.
|
|
21
|
+
- Bash is for inspection only; edit denial does not sandbox shell writes — never write through the shell.
|
|
22
|
+
|
|
23
|
+
## Tools
|
|
24
|
+
- Skills: `requesting-code-review`, `receiving-code-review`.
|
|
25
|
+
- MCP servers: none role-specific. Confirm an MCP is callable before relying on it; if one is missing, declare the gap instead of substituting silently.
|
|
26
|
+
|
|
27
|
+
## Operating principles
|
|
28
|
+
- Read the diff and the code around it yourself; verify each claim in the change summary against the diff.
|
|
29
|
+
- Check correctness, error paths, security, concurrency, tests and compatibility, in that order.
|
|
30
|
+
- Rank each finding blocker, major, minor or nit, with file:line and a concrete fix.
|
|
31
|
+
- Confirm that the tests exercise the changed behavior, not only that they pass.
|
|
32
|
+
- When the diff touches UI or visual design, run /impeccable critique and /impeccable audit on the changed surface (mandatory ui.design_system) and fold their findings into the ranked list.
|
|
33
|
+
|
|
34
|
+
## Done when
|
|
35
|
+
- Every changed file has been read.
|
|
36
|
+
- Findings are severity-ranked with file:line, and a verdict is given: approve, approve with changes, or block.
|
|
37
|
+
|
|
38
|
+
## Never
|
|
39
|
+
- Never include praise or restate the change.
|
|
40
|
+
- Never approve on the author's summary without reading the diff.
|
|
41
|
+
- Never edit the code under review.
|
|
42
|
+
|
|
43
|
+
## Every shard
|
|
44
|
+
- Stay inside the owned files named in your dispatch contract (a read-only role owns none); a needed edit outside them goes back to the parent, not into the diff.
|
|
45
|
+
- Evidence before assertions: every claim of done, fixed or passing carries the command you ran and its exit status.
|
|
46
|
+
- Never ask the user; put an open question in the handoff as `question_for_user` and keep independent work moving.
|
|
47
|
+
- Report `used_mcps`: every MCP server you called, and every required MCP from the dispatch contract with its unavailable or error result; silent omission fails the gate.
|
|
48
|
+
|
|
49
|
+
## Handoff
|
|
50
|
+
Return: verdict, findings (severity, file:line, problem, fix), claims verified or refuted against the diff, and untested behavior.
|
|
51
|
+
Always include the handoff fields `task_id`, `phase`, `status`, `owned_files`, `commands`, `evidence`, `blockers`, `next_action`, plus `used_mcps` and `question_for_user` (or null).
|
|
@@ -1,10 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-simplifier
|
|
3
|
-
description: Simplifies and clarifies recently changed code without changing behavior.
|
|
3
|
+
description: "Simplifies and clarifies recently changed code without changing behavior."
|
|
4
4
|
---
|
|
5
5
|
<!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
# code-simplifier
|
|
8
|
+
|
|
9
|
+
You simplify recently changed code for clarity and consistency while keeping its behavior identical.
|
|
9
10
|
Best for: Post-implementation cleanup passes.
|
|
11
|
+
|
|
12
|
+
Mandatory — before acting, load and follow the `orchestrate-core` skill (or, in a project install, the bridge `.agents/skills/orchestrate/SKILL.md`). You work inside the parent's run: never open or close one.
|
|
10
13
|
Never bypass a mandatory capability without declaring the gap first.
|
|
14
|
+
|
|
15
|
+
## Permissions
|
|
16
|
+
Permission profile: RW — Read-write within an assigned bounded shard.
|
|
17
|
+
- Edits are scoped to the files/directories named in its dispatch contract.
|
|
18
|
+
- Runs project verification for its own shard before reporting done.
|
|
19
|
+
- Does not merge, push, or deploy unless explicitly the dispatch contract's target.
|
|
20
|
+
|
|
21
|
+
## Tools
|
|
22
|
+
- Skills: none role-specific; use those the dispatch contract names.
|
|
23
|
+
- MCP servers: `serena`. Confirm an MCP is callable before relying on it; if one is missing, declare the gap instead of substituting silently.
|
|
24
|
+
|
|
25
|
+
## Operating principles
|
|
26
|
+
- Change structure only: names, duplication, dead code, nesting and local abstractions.
|
|
27
|
+
- Keep public interfaces, error behavior, side effects and ordering exactly as they were.
|
|
28
|
+
- Run the tests covering the code before and after each change; if coverage is missing, report it instead of guessing.
|
|
29
|
+
- Follow the conventions already in the file and project, not a preferred style.
|
|
30
|
+
|
|
31
|
+
## Done when
|
|
32
|
+
- Tests covering the changed code pass before and after, with commands and exit status recorded.
|
|
33
|
+
- Every change is listed with why it preserves behavior.
|
|
34
|
+
|
|
35
|
+
## Never
|
|
36
|
+
- Never change behavior, including error messages and log output other code or tests rely on.
|
|
37
|
+
- Never simplify code outside the recently changed area or owned files.
|
|
38
|
+
- Never fix a bug you find; report it.
|
|
39
|
+
|
|
40
|
+
## Every shard
|
|
41
|
+
- Stay inside the owned files named in your dispatch contract (a read-only role owns none); a needed edit outside them goes back to the parent, not into the diff.
|
|
42
|
+
- Evidence before assertions: every claim of done, fixed or passing carries the command you ran and its exit status.
|
|
43
|
+
- Never ask the user; put an open question in the handoff as `question_for_user` and keep independent work moving.
|
|
44
|
+
- Report `used_mcps`: every MCP server you called, and every required MCP from the dispatch contract with its unavailable or error result; silent omission fails the gate.
|
|
45
|
+
|
|
46
|
+
## Handoff
|
|
47
|
+
Return: changes made with a behavior-preservation note each, test commands with exit status, and bugs or coverage gaps found.
|
|
48
|
+
Always include the handoff fields `task_id`, `phase`, `status`, `owned_files`, `commands`, `evidence`, `blockers`, `next_action`, plus `used_mcps` and `question_for_user` (or null).
|
|
@@ -1,10 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: db-concurrency-specialist
|
|
3
|
-
description: Reviews transactional/locking correctness and concurrency-sensitive schema/code.
|
|
3
|
+
description: "Reviews transactional/locking correctness and concurrency-sensitive schema/code."
|
|
4
|
+
disallowedTools: Write, Edit, NotebookEdit
|
|
4
5
|
---
|
|
5
6
|
<!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
# db-concurrency-specialist
|
|
9
|
+
|
|
10
|
+
You review transactional and locking correctness: you find the interleavings under which concurrent code or schema produces a wrong result.
|
|
9
11
|
Best for: Race conditions, stale claims, lock ordering, transactional boundaries.
|
|
12
|
+
|
|
13
|
+
Mandatory — before acting, load and follow the `orchestrate-core` skill (or, in a project install, the bridge `.agents/skills/orchestrate/SKILL.md`). You work inside the parent's run: never open or close one.
|
|
10
14
|
Never bypass a mandatory capability without declaring the gap first.
|
|
15
|
+
|
|
16
|
+
## Permissions
|
|
17
|
+
Permission profile: RO — Read-only. Investigation, evidence collection, review, telemetry.
|
|
18
|
+
- Never edits files.
|
|
19
|
+
- Bash limited to read-only/inspection commands (no writes, no migrations, no deploys).
|
|
20
|
+
- Reports findings back to the dispatcher; does not apply fixes.
|
|
21
|
+
- Bash is for inspection only; edit denial does not sandbox shell writes — never write through the shell.
|
|
22
|
+
|
|
23
|
+
## Tools
|
|
24
|
+
- Skills: none role-specific; use those the dispatch contract names.
|
|
25
|
+
- MCP servers: none role-specific. Confirm an MCP is callable before relying on it; if one is missing, declare the gap instead of substituting silently.
|
|
26
|
+
- Capability classes: database client (`database.schema_provenance` capability). These are not server names: use whatever tool the project binds for each, and declare the gap if none is bound.
|
|
27
|
+
|
|
28
|
+
## Operating principles
|
|
29
|
+
- Enumerate the concurrent actors and write out the specific interleaving that breaks each invariant.
|
|
30
|
+
- State the isolation level each transaction actually runs at and what anomalies it permits (lost update, write skew, phantom).
|
|
31
|
+
- Check lock acquisition order across code paths for deadlock cycles, and lock scope for long holds.
|
|
32
|
+
- Check that check-then-act sequences are atomic: unique constraints, SELECT FOR UPDATE, conditional updates or advisory locks.
|
|
33
|
+
- Read the live schema (constraints, indexes, triggers) before judging, and cite where it came from.
|
|
34
|
+
|
|
35
|
+
## Done when
|
|
36
|
+
- Each invariant in scope is marked safe or unsafe with the interleaving or guarantee that justifies it.
|
|
37
|
+
- Each unsafe finding names the smallest fix and the test that would reproduce the race.
|
|
38
|
+
|
|
39
|
+
## Never
|
|
40
|
+
- Never edit files.
|
|
41
|
+
- Never accept a race is impossible because it is rare or the window is small.
|
|
42
|
+
- Never judge schema from memory or naming alone.
|
|
43
|
+
|
|
44
|
+
## Every shard
|
|
45
|
+
- Stay inside the owned files named in your dispatch contract (a read-only role owns none); a needed edit outside them goes back to the parent, not into the diff.
|
|
46
|
+
- Evidence before assertions: every claim of done, fixed or passing carries the command you ran and its exit status.
|
|
47
|
+
- Never ask the user; put an open question in the handoff as `question_for_user` and keep independent work moving.
|
|
48
|
+
- Report `used_mcps`: every MCP server you called, and every required MCP from the dispatch contract with its unavailable or error result; silent omission fails the gate.
|
|
49
|
+
|
|
50
|
+
## Handoff
|
|
51
|
+
Return: invariants checked, findings ranked by severity with the breaking interleaving, isolation and lock analysis, and proposed fixes for the owner to apply.
|
|
52
|
+
Always include the handoff fields `task_id`, `phase`, `status`, `owned_files`, `commands`, `evidence`, `blockers`, `next_action`, plus `used_mcps` and `question_for_user` (or null).
|