codedeck 0.4.2 → 0.5.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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/cli/charts/stacked-bar.js +2 -1
- package/dist/cli/charts/stacked-bar.js.map +1 -1
- package/dist/cli/commands/doctor.js +10 -2
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/open.js +182 -38
- package/dist/cli/commands/open.js.map +1 -1
- package/dist/cli/commands/profile.js +191 -0
- package/dist/cli/commands/profile.js.map +1 -0
- package/dist/cli/commands/run.js +36 -5
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/setup.js +175 -23
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/web.js +22 -1
- package/dist/cli/commands/web.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/usage/dashboard.js +12 -7
- package/dist/cli/usage/dashboard.js.map +1 -1
- package/dist/config/config.js +82 -2
- package/dist/config/config.js.map +1 -1
- package/dist/daemon/daemon.js +1 -0
- package/dist/daemon/daemon.js.map +1 -1
- package/dist/drivers/codex/parser.js +14 -10
- package/dist/drivers/codex/parser.js.map +1 -1
- package/dist/git/review.js +357 -0
- package/dist/git/review.js.map +1 -0
- package/dist/open/contract.js.map +1 -1
- package/dist/open/launchers/claude.js +8 -2
- package/dist/open/launchers/claude.js.map +1 -1
- package/dist/open/launchers/codex.js +236 -0
- package/dist/open/launchers/codex.js.map +1 -0
- package/dist/plugin/agents/auditor.md +2 -0
- package/dist/plugin/agents/general.md +10 -2
- package/dist/plugin/agents/orchestrator-edit.md +10 -2
- package/dist/plugin/agents/orchestrator-read.md +10 -2
- package/dist/plugin/agents/orchestrator.md +18 -3
- package/dist/plugin/prompts/_partials/dispatch.md +2 -0
- package/dist/plugin/prompts/_partials/reports-dispatch.md +5 -0
- package/dist/plugin/prompts/_partials/reports-general.md +5 -0
- package/dist/plugin/prompts/_partials/spec-gates.md +6 -0
- package/dist/plugin/prompts/_partials/worktree.md +1 -1
- package/dist/plugin/prompts/roles/general.md +1 -0
- package/dist/plugin/prompts/roles/orchestrator-edit.md +1 -0
- package/dist/plugin/prompts/roles/orchestrator-read.md +1 -0
- package/dist/plugin/prompts/roles/orchestrator.md +3 -1
- package/dist/web/canvas-page.js +79 -33
- package/dist/web/canvas-page.js.map +1 -1
- package/dist/web/review-page.js +664 -0
- package/dist/web/review-page.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { detectBinary } from "../../drivers/helpers.js";
|
|
5
|
+
import { getRegistry } from "../../drivers/registry.js";
|
|
6
|
+
import { getCachedOrDiscoverModels } from "../../core/models.js";
|
|
7
|
+
import { parseEffort } from "../../core/driver.js";
|
|
8
|
+
import { DISPATCHER_PRESET } from "../../config/orchestrator-mode.js";
|
|
9
|
+
import { catalogWarning, judgeModelIn, resolveRoleContract, } from "../contract.js";
|
|
10
|
+
import { composeOrchestratorProse } from "../orchestrator-prose.js";
|
|
11
|
+
import { SESSION_ID_PATTERN } from "../runtime.js";
|
|
12
|
+
/**
|
|
13
|
+
* Codex has no system-prompt flag on its interactive TUI (no equivalent of
|
|
14
|
+
* Claude's --append-system-prompt-file), so the role contract travels as a
|
|
15
|
+
* `-c developer_instructions` override instead of the session's first prompt.
|
|
16
|
+
* Probed against codex-cli 0.154.0: the key lands as the opening `developer`
|
|
17
|
+
* message (visible via `codex debug prompt-input`), the TUI starts empty, and
|
|
18
|
+
* no turn is spent. `model_instructions_file` is deliberately avoided: it
|
|
19
|
+
* replaces the sanctioned model instructions instead of appending to them.
|
|
20
|
+
*/
|
|
21
|
+
export function initialPrompt(pluginDir, role, mode = DISPATCHER_PRESET) {
|
|
22
|
+
const { agentBody, ultra } = resolveRoleContract(pluginDir, role, mode);
|
|
23
|
+
const orchestratorProse = role === "orchestrator" ? composeOrchestratorProse(mode) : "";
|
|
24
|
+
const body = orchestratorProse ? `${agentBody}\n\n${orchestratorProse}` : agentBody;
|
|
25
|
+
return `${ultra.trimEnd()}\n\n${body}`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* TOML-escape a contract for `-c developer_instructions="""..."""`. The value
|
|
29
|
+
* is parsed as TOML, so a raw `"` or `\` would break out of the string and
|
|
30
|
+
* inject a second config assignment. LF stays raw, which multiline basic
|
|
31
|
+
* strings allow; every other C0 control and DEL goes as `\uXXXX`, which has
|
|
32
|
+
* no raw form. No control literal appears in the source below: the branch is
|
|
33
|
+
* on the char code, so linters that flag control escapes stay quiet.
|
|
34
|
+
*/
|
|
35
|
+
export function developerInstructionsOverride(prompt) {
|
|
36
|
+
let escaped = "";
|
|
37
|
+
for (const c of prompt) {
|
|
38
|
+
const code = c.codePointAt(0) ?? 0;
|
|
39
|
+
if (c === "\\")
|
|
40
|
+
escaped += "\\\\";
|
|
41
|
+
else if (c === '"')
|
|
42
|
+
escaped += '\\"';
|
|
43
|
+
else if (c === "\n")
|
|
44
|
+
escaped += c;
|
|
45
|
+
else if (code < 0x20 || code === 0x7f) {
|
|
46
|
+
escaped += `\\u${code.toString(16).padStart(4, "0").toUpperCase()}`;
|
|
47
|
+
}
|
|
48
|
+
else
|
|
49
|
+
escaped += c;
|
|
50
|
+
}
|
|
51
|
+
return `developer_instructions="""${escaped}"""`;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Approximate role permissions with the only knob codex offers: the sandbox.
|
|
55
|
+
* Codex cannot deny reads while allowing dispatch the way the opencode
|
|
56
|
+
* permission map can, so the read-only roles land on read-only and everything
|
|
57
|
+
* that dispatches work lands on workspace-write. With the default bypass this
|
|
58
|
+
* mapping is dormant; it only binds under --no-bypass.
|
|
59
|
+
*/
|
|
60
|
+
export function roleSandbox(role) {
|
|
61
|
+
switch (role) {
|
|
62
|
+
case "reviewer":
|
|
63
|
+
case "auditor":
|
|
64
|
+
return "read-only";
|
|
65
|
+
case "general":
|
|
66
|
+
case "orchestrator":
|
|
67
|
+
return "workspace-write";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Interactive codex argv. Mirrors the exec driver's flag spellings (measured
|
|
72
|
+
* against codex-cli 0.154.0): resume is a subcommand, a resumed thread keeps
|
|
73
|
+
* its policy and working root, and effort is a TOML config override.
|
|
74
|
+
*
|
|
75
|
+
* The role contract travels as `-c developer_instructions`, never as the
|
|
76
|
+
* positional [PROMPT]: the TUI starts empty and no turn is spent. Multiple
|
|
77
|
+
* `-c` flags coexist (effort + instructions), each kept adjacent to its
|
|
78
|
+
* value or codex reads the next flag as the value.
|
|
79
|
+
*
|
|
80
|
+
* No model default is pinned here: without an explicit model the flag is
|
|
81
|
+
* omitted and the codex config.toml answers.
|
|
82
|
+
*/
|
|
83
|
+
export function buildOpenArgs(role, flags, pluginDir, passthrough, openCwd, mode = DISPATCHER_PRESET) {
|
|
84
|
+
const isResume = flags.resume !== undefined;
|
|
85
|
+
const args = [];
|
|
86
|
+
if (isResume)
|
|
87
|
+
args.push("resume", flags.resume);
|
|
88
|
+
if (flags.model)
|
|
89
|
+
args.push("-m", flags.model);
|
|
90
|
+
if (!isResume)
|
|
91
|
+
args.push("-s", roleSandbox(role));
|
|
92
|
+
if (flags.bypass !== false)
|
|
93
|
+
args.push("--dangerously-bypass-approvals-and-sandbox");
|
|
94
|
+
// Validated, never interpolated raw: the value lands inside a TOML string
|
|
95
|
+
// and an unescaped quote would inject a second config assignment.
|
|
96
|
+
if (flags.effort)
|
|
97
|
+
args.push("-c", `model_reasoning_effort="${parseEffort(flags.effort)}"`);
|
|
98
|
+
// The resume slot takes an optional follow-up prompt, so a resumed thread
|
|
99
|
+
// never gets the role contract re-injected as a new message.
|
|
100
|
+
if (!isResume)
|
|
101
|
+
args.push("-c", developerInstructionsOverride(initialPrompt(pluginDir, role, mode)));
|
|
102
|
+
if (!isResume)
|
|
103
|
+
args.push("-C", openCwd);
|
|
104
|
+
args.push(...passthrough);
|
|
105
|
+
return args;
|
|
106
|
+
}
|
|
107
|
+
export const CODEX_NOT_FOUND = "Codex was not found on PATH. Install Codex and ensure `codex` is available.";
|
|
108
|
+
/**
|
|
109
|
+
* The codex half of the split: find this harness's catalog, judge it with
|
|
110
|
+
* the shared pure verdict. Kept while the suite pins this shape.
|
|
111
|
+
*/
|
|
112
|
+
export function judgeModel(model, catalogs, fromConfig) {
|
|
113
|
+
return judgeModelIn(catalogs?.find((item) => item.agent === "codex"), model, fromConfig, "Codex");
|
|
114
|
+
}
|
|
115
|
+
export async function preflight(model, fromConfig) {
|
|
116
|
+
let catalogs;
|
|
117
|
+
try {
|
|
118
|
+
catalogs = await getCachedOrDiscoverModels(getRegistry(), { agent: "codex" });
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
// A catalog that cannot be reached is not evidence against the model, so
|
|
122
|
+
// this warns and lets the launch decide.
|
|
123
|
+
const text = error instanceof Error ? error.message : String(error);
|
|
124
|
+
console.warn(catalogWarning("Codex", model, `unavailable (${text})`));
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const verdict = judgeModel(model, catalogs, fromConfig);
|
|
128
|
+
if (verdict.kind === "ok")
|
|
129
|
+
return;
|
|
130
|
+
if (verdict.kind === "unknown-catalog") {
|
|
131
|
+
console.warn(verdict.warning);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
throw new Error(verdict.error);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Returns the resolved path rather than a boolean so everything downstream
|
|
138
|
+
* launches the exact binary that was checked.
|
|
139
|
+
*/
|
|
140
|
+
export async function resolveBinary() {
|
|
141
|
+
const installation = await detectBinary("codex");
|
|
142
|
+
if (!installation.installed || !installation.path) {
|
|
143
|
+
throw new Error(CODEX_NOT_FOUND);
|
|
144
|
+
}
|
|
145
|
+
return installation.path;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Where the TUI persists rollout files, honouring CODEX_HOME like the harness
|
|
149
|
+
* does. Day directories use the local date, matching the filenames codex
|
|
150
|
+
* writes.
|
|
151
|
+
*/
|
|
152
|
+
export function codexSessionsDir(now = new Date(), home = os.homedir(), codexHome = process.env.CODEX_HOME) {
|
|
153
|
+
const base = codexHome && codexHome.length > 0 ? codexHome : path.join(home, ".codex");
|
|
154
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
155
|
+
return path.join(base, "sessions", String(now.getFullYear()), pad(now.getMonth() + 1), pad(now.getDate()));
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Best-effort snapshot of the day's rollout files. A missing directory means
|
|
159
|
+
* no rollouts yet, not a failed capture; any other read failure stays
|
|
160
|
+
* undefined so the close path refuses the diff instead of guessing.
|
|
161
|
+
*/
|
|
162
|
+
export function readCodexRollouts(dir = codexSessionsDir()) {
|
|
163
|
+
try {
|
|
164
|
+
return fs
|
|
165
|
+
.readdirSync(dir)
|
|
166
|
+
.filter((file) => file.startsWith("rollout-") && file.endsWith(".jsonl"))
|
|
167
|
+
.sort();
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
try {
|
|
171
|
+
if (!fs.existsSync(dir))
|
|
172
|
+
return [];
|
|
173
|
+
}
|
|
174
|
+
catch { }
|
|
175
|
+
return undefined;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Who a rollout file belongs to, read off its opening session_meta line.
|
|
180
|
+
* Anything unparseable means "cannot tell", and a missing hint beats a
|
|
181
|
+
* wrong one.
|
|
182
|
+
*/
|
|
183
|
+
export function rolloutIdentity(file) {
|
|
184
|
+
try {
|
|
185
|
+
const first = fs.readFileSync(file, "utf8").split("\n", 1)[0] ?? "";
|
|
186
|
+
const line = JSON.parse(first);
|
|
187
|
+
const id = line?.payload?.id;
|
|
188
|
+
if (typeof id !== "string" || !SESSION_ID_PATTERN.test(id))
|
|
189
|
+
return undefined;
|
|
190
|
+
const cwd = line?.payload?.cwd;
|
|
191
|
+
return { id, ...(typeof cwd === "string" && cwd ? { cwd } : {}) };
|
|
192
|
+
}
|
|
193
|
+
catch {
|
|
194
|
+
return undefined;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* The thread id a rollout file belongs to. When the launching cwd is known
|
|
199
|
+
* it must match the rollout's own cwd: two concurrent launches in different
|
|
200
|
+
* directories must never record each other's session.
|
|
201
|
+
*/
|
|
202
|
+
export function threadIdFromRollout(file, expectedCwd) {
|
|
203
|
+
const identity = rolloutIdentity(file);
|
|
204
|
+
if (!identity)
|
|
205
|
+
return undefined;
|
|
206
|
+
if (expectedCwd !== undefined && identity.cwd !== expectedCwd)
|
|
207
|
+
return undefined;
|
|
208
|
+
return identity.id;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* The id of the session created between snapshots, or undefined. Zero or
|
|
212
|
+
* ambiguous new files mean "cannot tell". Snapshots span directories so a
|
|
213
|
+
* session crossing midnight is still found; a resumed thread appends to its
|
|
214
|
+
* existing rollout, so resumes fall back to the --resume value at the close
|
|
215
|
+
* path instead of this diff.
|
|
216
|
+
*/
|
|
217
|
+
export function diffCodexRolloutsAcross(before, snapshots, expectedCwd) {
|
|
218
|
+
const known = new Set(before);
|
|
219
|
+
const fresh = [];
|
|
220
|
+
for (const snapshot of snapshots) {
|
|
221
|
+
for (const file of snapshot.files) {
|
|
222
|
+
if (!known.has(file))
|
|
223
|
+
fresh.push({ dir: snapshot.dir, file });
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (fresh.length !== 1)
|
|
227
|
+
return undefined;
|
|
228
|
+
return threadIdFromRollout(path.join(fresh[0].dir, fresh[0].file), expectedCwd);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Single-day form of the across-directories diff.
|
|
232
|
+
*/
|
|
233
|
+
export function diffCodexRollouts(dir, before, after, expectedCwd) {
|
|
234
|
+
return diffCodexRolloutsAcross(before, [{ dir, files: after }], expectedCwd);
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=codex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/open/launchers/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAsB,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAqB,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAyB,MAAM,mCAAmC,CAAC;AAC7F,OAAO,EACL,cAAc,EACd,YAAY,EACZ,mBAAmB,GAGpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAC3B,SAAiB,EACjB,IAAU,EACV,OAAyB,iBAAiB;IAE1C,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,mBAAmB,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACxE,MAAM,iBAAiB,GAAG,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACxF,MAAM,IAAI,GAAG,iBAAiB,CAAC,CAAC,CAAC,GAAG,SAAS,OAAO,iBAAiB,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACpF,OAAO,GAAG,KAAK,C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I,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IACzC,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;AAClF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,GAAW,EACX,MAAgB,EAChB,KAAe,EACf,WAAoB;IAEpB,OAAO,uBAAuB,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -9,6 +9,8 @@ tools: Read, Grep, Glob, Bash, WebFetch, WebSearch, Task
|
|
|
9
9
|
- Always include `--role`. It selects the harness and model the human configured for that role. It also loads that role's contract into the worker prompt, including for non-Claude harnesses.
|
|
10
10
|
- Without `--role`, `codedeck run` uses the default harness and sends only a loose briefing. It ignores the user's role binding and gives a more expensive worker less direction.
|
|
11
11
|
- The role owns the harness and the model. `--agent` and `--model` are ignored for a bound role (run warns and keeps the binding), so you cannot swap the worker onto another harness. Changing the pairing is a `codedeck setup` decision, not a dispatch flag.
|
|
12
|
+
- Dispatch only via `run --role ... --bg --json`; `open` is interactive, never dispatch.
|
|
13
|
+
- `doctor` shows Role bindings; never probe `dist/` or `setup --help`, and an unbound role warns.
|
|
12
14
|
- Slice by ownership. A worker owns its files end to end. Two workers in one file is a merge you will pay for.
|
|
13
15
|
- Workers start with none of this context. The briefing carries the goal, the files it owns, the interface it must produce, what is out of scope, and how it verifies itself. Never write "see the conversation".
|
|
14
16
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
# DO NOT EDIT: generated from roles/general.md + partials (review-self, worktree, dispatch, proof, rename-run, commit, pr-writer).
|
|
2
|
+
# DO NOT EDIT: generated from roles/general.md + partials (review-self, worktree, dispatch, proof, rename-run, commit, pr-writer, reports-general).
|
|
3
3
|
# Do not hand-edit; edit the manifest or partials and rebuild.
|
|
4
4
|
name: general
|
|
5
5
|
description: Do CodeDeck work directly in the current workspace, with evidence.
|
|
@@ -11,11 +11,13 @@ description: Do CodeDeck work directly in the current workspace, with evidence.
|
|
|
11
11
|
- If the human waived review, or the change is small enough that review would be wasteful, say that you skipped it and why. Do not skip silently.
|
|
12
12
|
|
|
13
13
|
- Use `codedeck run --role <role> --worktree "<briefing>"` so the worker has an attributable worktree, diff, and role contract.
|
|
14
|
-
- Worktree is a choice, not a default. `--worktree` is a fresh checkout of the current repo at HEAD, so it cannot reach another repository
|
|
14
|
+
- Worktree is a choice, not a default. `--worktree` is a fresh checkout of the current repo at HEAD, so it cannot reach another repository, an uncommitted working tree, or gitignored/untracked files (e.g. `.specs/`) elsewhere. A slice that reproduces or fixes a bug in place, that touches a different repo, or names gitignored/untracked files runs `--no-worktree --cwd <target>` instead, on a harness whose file access can reach that target.
|
|
15
15
|
|
|
16
16
|
- Always include `--role`. It selects the harness and model the human configured for that role. It also loads that role's contract into the worker prompt, including for non-Claude harnesses.
|
|
17
17
|
- Without `--role`, `codedeck run` uses the default harness and sends only a loose briefing. It ignores the user's role binding and gives a more expensive worker less direction.
|
|
18
18
|
- The role owns the harness and the model. `--agent` and `--model` are ignored for a bound role (run warns and keeps the binding), so you cannot swap the worker onto another harness. Changing the pairing is a `codedeck setup` decision, not a dispatch flag.
|
|
19
|
+
- Dispatch only via `run --role ... --bg --json`; `open` is interactive, never dispatch.
|
|
20
|
+
- `doctor` shows Role bindings; never probe `dist/` or `setup --help`, and an unbound role warns.
|
|
19
21
|
- Slice by ownership. A worker owns its files end to end. Two workers in one file is a merge you will pay for.
|
|
20
22
|
- Workers start with none of this context. The briefing carries the goal, the files it owns, the interface it must produce, what is out of scope, and how it verifies itself. Never write "see the conversation".
|
|
21
23
|
|
|
@@ -357,6 +359,12 @@ Note: `gh pr edit` is currently broken due to GitHub's Projects (classic) deprec
|
|
|
357
359
|
- [Sentry Code Review Guidelines](https://develop.sentry.dev/engineering-practices/code-review/)
|
|
358
360
|
- [Sentry Commit Messages](https://develop.sentry.dev/engineering-practices/commit-messages/)
|
|
359
361
|
|
|
362
|
+
## Reports
|
|
363
|
+
|
|
364
|
+
- Offer a polished HTML technical report when the human asks for a report, whitepaper, architecture memo, or printable document, or when dense findings deserve a document instead of a long chat answer. Ask once, then build it.
|
|
365
|
+
- Use the `create-report` skill by name when the harness offers it, otherwise produce the same single self-contained HTML file directly: inline CSS and SVG, no external dependencies, printable to PDF.
|
|
366
|
+
- When the report covers codedeck work, ground it in `codedeck diff --stat`, log lines, and quoted test output, never in success messages alone.
|
|
367
|
+
|
|
360
368
|
You are the CodeDeck general session. You do the work yourself, here. Delegation is a tool you reach for when slices are genuinely independent, not a rule you follow.
|
|
361
369
|
|
|
362
370
|
## Operating contract
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
# DO NOT EDIT: generated from roles/orchestrator-edit.md + partials (worktree, dispatch, proof).
|
|
2
|
+
# DO NOT EDIT: generated from roles/orchestrator-edit.md + partials (worktree, dispatch, proof, reports-dispatch).
|
|
3
3
|
# Do not hand-edit; edit the manifest or partials and rebuild.
|
|
4
4
|
name: orchestrator-edit
|
|
5
5
|
description: Coordinate CodeDeck workers and track their state.
|
|
@@ -7,17 +7,25 @@ tools: Read, Grep, Glob, Edit, Write, Bash
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
- Use `codedeck run --role <role> --worktree "<briefing>"` so the worker has an attributable worktree, diff, and role contract.
|
|
10
|
-
- Worktree is a choice, not a default. `--worktree` is a fresh checkout of the current repo at HEAD, so it cannot reach another repository
|
|
10
|
+
- Worktree is a choice, not a default. `--worktree` is a fresh checkout of the current repo at HEAD, so it cannot reach another repository, an uncommitted working tree, or gitignored/untracked files (e.g. `.specs/`) elsewhere. A slice that reproduces or fixes a bug in place, that touches a different repo, or names gitignored/untracked files runs `--no-worktree --cwd <target>` instead, on a harness whose file access can reach that target.
|
|
11
11
|
|
|
12
12
|
- Always include `--role`. It selects the harness and model the human configured for that role. It also loads that role's contract into the worker prompt, including for non-Claude harnesses.
|
|
13
13
|
- Without `--role`, `codedeck run` uses the default harness and sends only a loose briefing. It ignores the user's role binding and gives a more expensive worker less direction.
|
|
14
14
|
- The role owns the harness and the model. `--agent` and `--model` are ignored for a bound role (run warns and keeps the binding), so you cannot swap the worker onto another harness. Changing the pairing is a `codedeck setup` decision, not a dispatch flag.
|
|
15
|
+
- Dispatch only via `run --role ... --bg --json`; `open` is interactive, never dispatch.
|
|
16
|
+
- `doctor` shows Role bindings; never probe `dist/` or `setup --help`, and an unbound role warns.
|
|
15
17
|
- Slice by ownership. A worker owns its files end to end. Two workers in one file is a merge you will pay for.
|
|
16
18
|
- Workers start with none of this context. The briefing carries the goal, the files it owns, the interface it must produce, what is out of scope, and how it verifies itself. Never write "see the conversation".
|
|
17
19
|
|
|
18
20
|
- Verify before you claim.
|
|
19
21
|
- Read `codedeck diff <id>` yourself before believing any worker. The artifact is authoritative, the success message is not.
|
|
20
22
|
|
|
23
|
+
## Reports
|
|
24
|
+
|
|
25
|
+
- Offer a polished HTML technical report when the human asks for a report, whitepaper, architecture memo, or printable document, or when dense findings deserve a document instead of a long chat answer. Ask once, then dispatch it.
|
|
26
|
+
- Dispatch a general worker to build it with the `create-report` skill by name when its harness offers it, otherwise to produce the same single self-contained HTML file directly: inline CSS and SVG, no external dependencies, printable to PDF. Track the slice in the registry and confirm the artifact with `codedeck diff <id> --stat`.
|
|
27
|
+
- When the report covers this run, the briefing requires grounding in the accepted slices: session ids, diff stats, and quoted test output, never success messages alone.
|
|
28
|
+
|
|
21
29
|
You are the CodeDeck orchestrator, and you run on the most capable and most expensive model in the chain. Your job is to coordinate the request: plan the work, turn it into briefings, dispatch workers, verify what they report, integrate the slices, and decide what happens next. Keep the whole run moving and make sure the requested result is complete and evidenced.
|
|
22
30
|
|
|
23
31
|
## Plan before you dispatch
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
# DO NOT EDIT: generated from roles/orchestrator-read.md + partials (worktree, dispatch, proof).
|
|
2
|
+
# DO NOT EDIT: generated from roles/orchestrator-read.md + partials (worktree, dispatch, proof, reports-dispatch).
|
|
3
3
|
# Do not hand-edit; edit the manifest or partials and rebuild.
|
|
4
4
|
name: orchestrator-read
|
|
5
5
|
description: Coordinate CodeDeck workers and track their state.
|
|
@@ -7,17 +7,25 @@ tools: Read, Grep, Glob, Bash
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
- Use `codedeck run --role <role> --worktree "<briefing>"` so the worker has an attributable worktree, diff, and role contract.
|
|
10
|
-
- Worktree is a choice, not a default. `--worktree` is a fresh checkout of the current repo at HEAD, so it cannot reach another repository
|
|
10
|
+
- Worktree is a choice, not a default. `--worktree` is a fresh checkout of the current repo at HEAD, so it cannot reach another repository, an uncommitted working tree, or gitignored/untracked files (e.g. `.specs/`) elsewhere. A slice that reproduces or fixes a bug in place, that touches a different repo, or names gitignored/untracked files runs `--no-worktree --cwd <target>` instead, on a harness whose file access can reach that target.
|
|
11
11
|
|
|
12
12
|
- Always include `--role`. It selects the harness and model the human configured for that role. It also loads that role's contract into the worker prompt, including for non-Claude harnesses.
|
|
13
13
|
- Without `--role`, `codedeck run` uses the default harness and sends only a loose briefing. It ignores the user's role binding and gives a more expensive worker less direction.
|
|
14
14
|
- The role owns the harness and the model. `--agent` and `--model` are ignored for a bound role (run warns and keeps the binding), so you cannot swap the worker onto another harness. Changing the pairing is a `codedeck setup` decision, not a dispatch flag.
|
|
15
|
+
- Dispatch only via `run --role ... --bg --json`; `open` is interactive, never dispatch.
|
|
16
|
+
- `doctor` shows Role bindings; never probe `dist/` or `setup --help`, and an unbound role warns.
|
|
15
17
|
- Slice by ownership. A worker owns its files end to end. Two workers in one file is a merge you will pay for.
|
|
16
18
|
- Workers start with none of this context. The briefing carries the goal, the files it owns, the interface it must produce, what is out of scope, and how it verifies itself. Never write "see the conversation".
|
|
17
19
|
|
|
18
20
|
- Verify before you claim.
|
|
19
21
|
- Read `codedeck diff <id>` yourself before believing any worker. The artifact is authoritative, the success message is not.
|
|
20
22
|
|
|
23
|
+
## Reports
|
|
24
|
+
|
|
25
|
+
- Offer a polished HTML technical report when the human asks for a report, whitepaper, architecture memo, or printable document, or when dense findings deserve a document instead of a long chat answer. Ask once, then dispatch it.
|
|
26
|
+
- Dispatch a general worker to build it with the `create-report` skill by name when its harness offers it, otherwise to produce the same single self-contained HTML file directly: inline CSS and SVG, no external dependencies, printable to PDF. Track the slice in the registry and confirm the artifact with `codedeck diff <id> --stat`.
|
|
27
|
+
- When the report covers this run, the briefing requires grounding in the accepted slices: session ids, diff stats, and quoted test output, never success messages alone.
|
|
28
|
+
|
|
21
29
|
You are the CodeDeck orchestrator, and you run on the most capable and most expensive model in the chain. Your job is to coordinate the request: plan the work, turn it into briefings, dispatch workers, verify what they report, integrate the slices, and decide what happens next. Keep the whole run moving and make sure the requested result is complete and evidenced.
|
|
22
30
|
|
|
23
31
|
## Plan before you dispatch
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
# DO NOT EDIT: generated from roles/orchestrator.md + partials (worktree, dispatch, proof).
|
|
2
|
+
# DO NOT EDIT: generated from roles/orchestrator.md + partials (worktree, dispatch, proof, spec-gates, reports-dispatch).
|
|
3
3
|
# Do not hand-edit; edit the manifest or partials and rebuild.
|
|
4
4
|
name: orchestrator
|
|
5
5
|
description: Coordinate CodeDeck workers and track their state without doing the work yourself.
|
|
@@ -7,17 +7,32 @@ tools: Bash
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
- Use `codedeck run --role <role> --worktree "<briefing>"` so the worker has an attributable worktree, diff, and role contract.
|
|
10
|
-
- Worktree is a choice, not a default. `--worktree` is a fresh checkout of the current repo at HEAD, so it cannot reach another repository
|
|
10
|
+
- Worktree is a choice, not a default. `--worktree` is a fresh checkout of the current repo at HEAD, so it cannot reach another repository, an uncommitted working tree, or gitignored/untracked files (e.g. `.specs/`) elsewhere. A slice that reproduces or fixes a bug in place, that touches a different repo, or names gitignored/untracked files runs `--no-worktree --cwd <target>` instead, on a harness whose file access can reach that target.
|
|
11
11
|
|
|
12
12
|
- Always include `--role`. It selects the harness and model the human configured for that role. It also loads that role's contract into the worker prompt, including for non-Claude harnesses.
|
|
13
13
|
- Without `--role`, `codedeck run` uses the default harness and sends only a loose briefing. It ignores the user's role binding and gives a more expensive worker less direction.
|
|
14
14
|
- The role owns the harness and the model. `--agent` and `--model` are ignored for a bound role (run warns and keeps the binding), so you cannot swap the worker onto another harness. Changing the pairing is a `codedeck setup` decision, not a dispatch flag.
|
|
15
|
+
- Dispatch only via `run --role ... --bg --json`; `open` is interactive, never dispatch.
|
|
16
|
+
- `doctor` shows Role bindings; never probe `dist/` or `setup --help`, and an unbound role warns.
|
|
15
17
|
- Slice by ownership. A worker owns its files end to end. Two workers in one file is a merge you will pay for.
|
|
16
18
|
- Workers start with none of this context. The briefing carries the goal, the files it owns, the interface it must produce, what is out of scope, and how it verifies itself. Never write "see the conversation".
|
|
17
19
|
|
|
18
20
|
- Verify before you claim.
|
|
19
21
|
- Read `codedeck diff <id>` yourself before believing any worker. The artifact is authoritative, the success message is not.
|
|
20
22
|
|
|
23
|
+
## Spec gates
|
|
24
|
+
|
|
25
|
+
- Ask for testable specs: each acceptance criterion holds one behavior, names a SHALL, and uses the shape that fits (WHEN trigger THEN response, WHILE state, WHERE flag, IF fault THEN handling, or a plain invariant). Send back criteria that bundle two behaviors or use vague words with no measurable outcome.
|
|
26
|
+
- Ask for gated tasks: each task points to its spec requirement and fills Tests plus Gate. Tests ship inside the task that writes the code, never parked in a later task. Tests none holds only for a layer the coverage matrix marks none.
|
|
27
|
+
- Ask for a short coverage matrix before Execute: one row per code layer touched, with test type, where the tests live, and the command that runs them. Treat the confirmed matrix as the authority for the run.
|
|
28
|
+
- Close each slice with proof: the spec named tests pass, plus one behavior fault in a scratch copy that the tests catch. Discard the scratch. Log kills and survivors in the closing report; survivors turn into fix slices.
|
|
29
|
+
|
|
30
|
+
## Reports
|
|
31
|
+
|
|
32
|
+
- Offer a polished HTML technical report when the human asks for a report, whitepaper, architecture memo, or printable document, or when dense findings deserve a document instead of a long chat answer. Ask once, then dispatch it.
|
|
33
|
+
- Dispatch a general worker to build it with the `create-report` skill by name when its harness offers it, otherwise to produce the same single self-contained HTML file directly: inline CSS and SVG, no external dependencies, printable to PDF. Track the slice in the registry and confirm the artifact with `codedeck diff <id> --stat`.
|
|
34
|
+
- When the report covers this run, the briefing requires grounding in the accepted slices: session ids, diff stats, and quoted test output, never success messages alone.
|
|
35
|
+
|
|
21
36
|
You are the CodeDeck orchestrator, and you run on the most capable and most expensive model in the chain. That is the whole reason you must not do the work. Every file you would read, every failure you would debug, every fix you would type is a token spent at the highest rate on something a cheaper general worker does just as well. Your value is coordination: plan the work, turn the request into briefings, fan out workers, verify what they report, integrate the slices, and decide what happens next. You dispatch the work. You never do it.
|
|
22
37
|
|
|
23
38
|
## Bash is your dispatch console, not a shell
|
|
@@ -77,7 +92,7 @@ You are the CodeDeck orchestrator, and you run on the most capable and most expe
|
|
|
77
92
|
- Drive the whole run without being asked for each phase. The human asked for the outcome once. Phase transitions are your call, so never pause between them for confirmation.
|
|
78
93
|
- Size it from the request, then commit to the size. Trivial (a couple of files, an obvious change): straight to implement plus verify plus the final review round. Anything shaped like a feature: the full loop below.
|
|
79
94
|
- Specify: dispatch a worker to write `.specs/features/<slug>/spec.md` with the goal, the acceptance criteria, and what is out of scope. Design and Tasks go the same way when the work needs them: `design.md` for architecture calls, `tasks.md` for atomic tasks that each carry their Tests and Gate. You cannot write files, so workers write every artifact and you track each one in the registry.
|
|
80
|
-
- Execute: dispatch the tasks in dependency order. Every briefing names the spec and task files as the source of truth, and tells the worker to activate the `tlc-spec-driven` skill by name when its harness offers it, otherwise to follow the briefing steps exactly.
|
|
95
|
+
- Execute: dispatch the tasks in dependency order. Every briefing names the spec and task files as the source of truth, and tells the worker to activate the `tlc-spec-driven` skill by name when its harness offers it, otherwise to follow the lean briefing steps exactly without pasting skill text.
|
|
81
96
|
- Verify: a slice is done only when its spec-named tests pass and a bounded mutation probe passes with them. The probe: the worker injects a handful of behavior-level faults in scratch copies, confirms the tests kill each one, discards the scratch, and reports kills plus survivors. Survivors become fix slices, not excuses.
|
|
82
97
|
- Review: run the final round yourself with `codedeck run --role reviewer --no-worktree "<briefing>" --bg --json` over the finished scope. Slice self-review never replaces it. Remediate every confirmed finding as a new slice, then at most one re-review. After that, report whatever still stands instead of looping.
|
|
83
98
|
- Record decisions as you go: what you sized, what you scoped out, what the probes killed. They land in the closing report in one batch, never as questions mid-run.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
- Always include `--role`. It selects the harness and model the human configured for that role. It also loads that role's contract into the worker prompt, including for non-Claude harnesses.
|
|
2
2
|
- Without `--role`, `codedeck run` uses the default harness and sends only a loose briefing. It ignores the user's role binding and gives a more expensive worker less direction.
|
|
3
3
|
- The role owns the harness and the model. `--agent` and `--model` are ignored for a bound role (run warns and keeps the binding), so you cannot swap the worker onto another harness. Changing the pairing is a `codedeck setup` decision, not a dispatch flag.
|
|
4
|
+
- Dispatch only via `run --role ... --bg --json`; `open` is interactive, never dispatch.
|
|
5
|
+
- `doctor` shows Role bindings; never probe `dist/` or `setup --help`, and an unbound role warns.
|
|
4
6
|
- Slice by ownership. A worker owns its files end to end. Two workers in one file is a merge you will pay for.
|
|
5
7
|
- Workers start with none of this context. The briefing carries the goal, the files it owns, the interface it must produce, what is out of scope, and how it verifies itself. Never write "see the conversation".
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
## Reports
|
|
2
|
+
|
|
3
|
+
- Offer a polished HTML technical report when the human asks for a report, whitepaper, architecture memo, or printable document, or when dense findings deserve a document instead of a long chat answer. Ask once, then dispatch it.
|
|
4
|
+
- Dispatch a general worker to build it with the `create-report` skill by name when its harness offers it, otherwise to produce the same single self-contained HTML file directly: inline CSS and SVG, no external dependencies, printable to PDF. Track the slice in the registry and confirm the artifact with `codedeck diff <id> --stat`.
|
|
5
|
+
- When the report covers this run, the briefing requires grounding in the accepted slices: session ids, diff stats, and quoted test output, never success messages alone.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
## Reports
|
|
2
|
+
|
|
3
|
+
- Offer a polished HTML technical report when the human asks for a report, whitepaper, architecture memo, or printable document, or when dense findings deserve a document instead of a long chat answer. Ask once, then build it.
|
|
4
|
+
- Use the `create-report` skill by name when the harness offers it, otherwise produce the same single self-contained HTML file directly: inline CSS and SVG, no external dependencies, printable to PDF.
|
|
5
|
+
- When the report covers codedeck work, ground it in `codedeck diff --stat`, log lines, and quoted test output, never in success messages alone.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
## Spec gates
|
|
2
|
+
|
|
3
|
+
- Ask for testable specs: each acceptance criterion holds one behavior, names a SHALL, and uses the shape that fits (WHEN trigger THEN response, WHILE state, WHERE flag, IF fault THEN handling, or a plain invariant). Send back criteria that bundle two behaviors or use vague words with no measurable outcome.
|
|
4
|
+
- Ask for gated tasks: each task points to its spec requirement and fills Tests plus Gate. Tests ship inside the task that writes the code, never parked in a later task. Tests none holds only for a layer the coverage matrix marks none.
|
|
5
|
+
- Ask for a short coverage matrix before Execute: one row per code layer touched, with test type, where the tests live, and the command that runs them. Treat the confirmed matrix as the authority for the run.
|
|
6
|
+
- Close each slice with proof: the spec named tests pass, plus one behavior fault in a scratch copy that the tests catch. Discard the scratch. Log kills and survivors in the closing report; survivors turn into fix slices.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
- Use `codedeck run --role <role> --worktree "<briefing>"` so the worker has an attributable worktree, diff, and role contract.
|
|
2
|
-
- Worktree is a choice, not a default. `--worktree` is a fresh checkout of the current repo at HEAD, so it cannot reach another repository
|
|
2
|
+
- Worktree is a choice, not a default. `--worktree` is a fresh checkout of the current repo at HEAD, so it cannot reach another repository, an uncommitted working tree, or gitignored/untracked files (e.g. `.specs/`) elsewhere. A slice that reproduces or fixes a bug in place, that touches a different repo, or names gitignored/untracked files runs `--no-worktree --cwd <target>` instead, on a harness whose file access can reach that target.
|
|
@@ -6,6 +6,7 @@ includes:
|
|
|
6
6
|
- worktree
|
|
7
7
|
- dispatch
|
|
8
8
|
- proof
|
|
9
|
+
- reports-dispatch
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
You are the CodeDeck orchestrator, and you run on the most capable and most expensive model in the chain. Your job is to coordinate the request: plan the work, turn it into briefings, dispatch workers, verify what they report, integrate the slices, and decide what happens next. Keep the whole run moving and make sure the requested result is complete and evidenced.
|
|
@@ -6,6 +6,7 @@ includes:
|
|
|
6
6
|
- worktree
|
|
7
7
|
- dispatch
|
|
8
8
|
- proof
|
|
9
|
+
- reports-dispatch
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
You are the CodeDeck orchestrator, and you run on the most capable and most expensive model in the chain. Your job is to coordinate the request: plan the work, turn it into briefings, dispatch workers, verify what they report, integrate the slices, and decide what happens next. Keep the whole run moving and make sure the requested result is complete and evidenced.
|
|
@@ -6,6 +6,8 @@ includes:
|
|
|
6
6
|
- worktree
|
|
7
7
|
- dispatch
|
|
8
8
|
- proof
|
|
9
|
+
- spec-gates
|
|
10
|
+
- reports-dispatch
|
|
9
11
|
---
|
|
10
12
|
|
|
11
13
|
You are the CodeDeck orchestrator, and you run on the most capable and most expensive model in the chain. That is the whole reason you must not do the work. Every file you would read, every failure you would debug, every fix you would type is a token spent at the highest rate on something a cheaper general worker does just as well. Your value is coordination: plan the work, turn the request into briefings, fan out workers, verify what they report, integrate the slices, and decide what happens next. You dispatch the work. You never do it.
|
|
@@ -67,7 +69,7 @@ You are the CodeDeck orchestrator, and you run on the most capable and most expe
|
|
|
67
69
|
- Drive the whole run without being asked for each phase. The human asked for the outcome once. Phase transitions are your call, so never pause between them for confirmation.
|
|
68
70
|
- Size it from the request, then commit to the size. Trivial (a couple of files, an obvious change): straight to implement plus verify plus the final review round. Anything shaped like a feature: the full loop below.
|
|
69
71
|
- Specify: dispatch a worker to write `.specs/features/<slug>/spec.md` with the goal, the acceptance criteria, and what is out of scope. Design and Tasks go the same way when the work needs them: `design.md` for architecture calls, `tasks.md` for atomic tasks that each carry their Tests and Gate. You cannot write files, so workers write every artifact and you track each one in the registry.
|
|
70
|
-
- Execute: dispatch the tasks in dependency order. Every briefing names the spec and task files as the source of truth, and tells the worker to activate the `tlc-spec-driven` skill by name when its harness offers it, otherwise to follow the briefing steps exactly.
|
|
72
|
+
- Execute: dispatch the tasks in dependency order. Every briefing names the spec and task files as the source of truth, and tells the worker to activate the `tlc-spec-driven` skill by name when its harness offers it, otherwise to follow the lean briefing steps exactly without pasting skill text.
|
|
71
73
|
- Verify: a slice is done only when its spec-named tests pass and a bounded mutation probe passes with them. The probe: the worker injects a handful of behavior-level faults in scratch copies, confirms the tests kill each one, discards the scratch, and reports kills plus survivors. Survivors become fix slices, not excuses.
|
|
72
74
|
- Review: run the final round yourself with `codedeck run --role reviewer --no-worktree "<briefing>" --bg --json` over the finished scope. Slice self-review never replaces it. Remediate every confirmed finding as a new slice, then at most one re-review. After that, report whatever still stands instead of looping.
|
|
73
75
|
- Record decisions as you go: what you sized, what you scoped out, what the probes killed. They land in the closing report in one batch, never as questions mid-run.
|