@tablation/crew 0.133.2 → 0.135.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/dist/cli.js +174 -20
- package/package.json +1 -1
- package/prompts/default/skills/grill-me.md +57 -16
- package/prompts/dev-qa/skills/grill-me.md +57 -16
package/dist/cli.js
CHANGED
|
@@ -9369,12 +9369,12 @@ var Tracker = class {
|
|
|
9369
9369
|
const conds = [{ columnName: "ship_id", operator: "EQ", value: shipId }];
|
|
9370
9370
|
if (states?.length) conds.push({ columnName: "state", operator: "IN", value: states });
|
|
9371
9371
|
const rows = await this.client.records.list(modelId, { filters: encodeFilters(conds), limit: 200 });
|
|
9372
|
-
const
|
|
9373
|
-
const ids = [...new Set(rows.map((r) =>
|
|
9372
|
+
const refId3 = (v) => typeof v === "string" ? v : v && typeof v === "object" && typeof v.id === "string" ? v.id : void 0;
|
|
9373
|
+
const ids = [...new Set(rows.map((r) => refId3(r.issue_id)).filter((x) => !!x))];
|
|
9374
9374
|
const tickets = new Map((await this.ticketsByIds(ids)).map((t) => [t.id, t]));
|
|
9375
9375
|
const out = [];
|
|
9376
9376
|
for (const row of rows) {
|
|
9377
|
-
const t = tickets.get(
|
|
9377
|
+
const t = tickets.get(refId3(row.issue_id) ?? "");
|
|
9378
9378
|
if (t) out.push({ row, ticket: t });
|
|
9379
9379
|
}
|
|
9380
9380
|
return out.sort((a, b) => String(b.row.started_at ?? "").localeCompare(String(a.row.started_at ?? "")));
|
|
@@ -10483,6 +10483,69 @@ async function post(target, path, body) {
|
|
|
10483
10483
|
if (!res.ok) throw new AgentLogHttpError(`${path}: ${res.status} ${res.statusText}`, res.status);
|
|
10484
10484
|
return await res.json();
|
|
10485
10485
|
}
|
|
10486
|
+
var RUNNING_OUTCOME = "running";
|
|
10487
|
+
async function startAgentRunRow(target, s) {
|
|
10488
|
+
try {
|
|
10489
|
+
const entry = await post(target, "/agents/log", {
|
|
10490
|
+
agentId: target.agentId,
|
|
10491
|
+
ticketReference: s.ticketReference,
|
|
10492
|
+
outcome: RUNNING_OUTCOME,
|
|
10493
|
+
startedAt: s.startedAt,
|
|
10494
|
+
source: "client",
|
|
10495
|
+
client: "crew",
|
|
10496
|
+
model: s.model,
|
|
10497
|
+
promptVersion: s.promptVersion,
|
|
10498
|
+
promptSha: s.promptSha,
|
|
10499
|
+
runId: s.runId,
|
|
10500
|
+
harness: s.harness,
|
|
10501
|
+
provider: s.provider
|
|
10502
|
+
});
|
|
10503
|
+
return entry.id;
|
|
10504
|
+
} catch {
|
|
10505
|
+
return void 0;
|
|
10506
|
+
}
|
|
10507
|
+
}
|
|
10508
|
+
function finishedRowBody(run4, workItem) {
|
|
10509
|
+
const values = {
|
|
10510
|
+
ticket_reference: run4.ticketReference,
|
|
10511
|
+
outcome: run4.outcome,
|
|
10512
|
+
finished_at: run4.finishedAt,
|
|
10513
|
+
model: run4.model,
|
|
10514
|
+
input_tokens: run4.tokensIn,
|
|
10515
|
+
output_tokens: run4.tokensOut,
|
|
10516
|
+
cache_read_tokens: run4.cacheReadTokens,
|
|
10517
|
+
cache_write_tokens: run4.cacheWriteTokens,
|
|
10518
|
+
cost_usd: run4.costUsd,
|
|
10519
|
+
num_turns: run4.numTurns,
|
|
10520
|
+
prefix_tokens: run4.prefixTokens,
|
|
10521
|
+
prompt_version: run4.promptVersion,
|
|
10522
|
+
prompt_sha: run4.promptSha,
|
|
10523
|
+
harness: run4.harness,
|
|
10524
|
+
provider: run4.provider,
|
|
10525
|
+
work_item_table: workItem.workItemTable,
|
|
10526
|
+
work_item_record_id: workItem.workItemRecordId
|
|
10527
|
+
};
|
|
10528
|
+
return Object.fromEntries(Object.entries(values).filter(([, v]) => v !== void 0));
|
|
10529
|
+
}
|
|
10530
|
+
async function updateStartedRow(target, rowId, body) {
|
|
10531
|
+
try {
|
|
10532
|
+
const model = await request(
|
|
10533
|
+
target,
|
|
10534
|
+
"GET",
|
|
10535
|
+
`/data-models/agent_log?workspaceId=${encodeURIComponent(target.workspaceId)}`
|
|
10536
|
+
);
|
|
10537
|
+
const have = await columnsOf(target, model.id);
|
|
10538
|
+
const values = Object.fromEntries(Object.entries(body).filter(([column]) => have.has(column)));
|
|
10539
|
+
await request(target, "PATCH", `/data-models/${model.id}/records/${rowId}`, values);
|
|
10540
|
+
return true;
|
|
10541
|
+
} catch (e) {
|
|
10542
|
+
if (!(e instanceof AgentLogHttpError)) throw new AgentLogUnreachableError(e.message);
|
|
10543
|
+
if (e.status === 404) return false;
|
|
10544
|
+
if (e.status >= 500) throw new AgentLogUnreachableError(e.message);
|
|
10545
|
+
e.row = true;
|
|
10546
|
+
throw e;
|
|
10547
|
+
}
|
|
10548
|
+
}
|
|
10486
10549
|
async function reportAgentRun(target, run4) {
|
|
10487
10550
|
let ticketRecordId;
|
|
10488
10551
|
if (target.tickets && run4.ticketReference) {
|
|
@@ -10513,20 +10576,23 @@ async function reportAgentRun(target, run4) {
|
|
|
10513
10576
|
const { runId, ...legacyBody } = { ...body, runId: run4.runId };
|
|
10514
10577
|
const workItem = target.tickets && ticketRecordId ? { workItemTable: target.tickets.issuesModelId, workItemRecordId: ticketRecordId } : {};
|
|
10515
10578
|
let entry;
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
} catch (e) {
|
|
10519
|
-
if (!(e instanceof AgentLogHttpError)) throw new AgentLogUnreachableError(e.message);
|
|
10520
|
-
if (e.status >= 500) throw new AgentLogUnreachableError(e.message);
|
|
10521
|
-
if (e.status !== 400 || !run4.harness && !run4.provider && !ticketRecordId && !runId) {
|
|
10522
|
-
e.row = true;
|
|
10523
|
-
throw e;
|
|
10524
|
-
}
|
|
10579
|
+
if (run4.rowId && await updateStartedRow(target, run4.rowId, finishedRowBody(run4, workItem))) entry = { id: run4.rowId };
|
|
10580
|
+
if (!entry) {
|
|
10525
10581
|
try {
|
|
10526
|
-
entry = await post(target, "/agents/log",
|
|
10527
|
-
} catch (
|
|
10528
|
-
if (
|
|
10529
|
-
throw
|
|
10582
|
+
entry = await post(target, "/agents/log", { ...body, ...runId ? { runId } : {}, ...workItem, harness: run4.harness, provider: run4.provider });
|
|
10583
|
+
} catch (e) {
|
|
10584
|
+
if (!(e instanceof AgentLogHttpError)) throw new AgentLogUnreachableError(e.message);
|
|
10585
|
+
if (e.status >= 500) throw new AgentLogUnreachableError(e.message);
|
|
10586
|
+
if (e.status !== 400 || !run4.harness && !run4.provider && !ticketRecordId && !runId) {
|
|
10587
|
+
e.row = true;
|
|
10588
|
+
throw e;
|
|
10589
|
+
}
|
|
10590
|
+
try {
|
|
10591
|
+
entry = await post(target, "/agents/log", legacyBody);
|
|
10592
|
+
} catch (e2) {
|
|
10593
|
+
if (e2 instanceof AgentLogHttpError && e2.status < 500) e2.row = true;
|
|
10594
|
+
throw e2;
|
|
10595
|
+
}
|
|
10530
10596
|
}
|
|
10531
10597
|
}
|
|
10532
10598
|
for (const cycle of run4.cycles) {
|
|
@@ -11807,13 +11873,32 @@ function parseSkillFile(path) {
|
|
|
11807
11873
|
if (typeof meta.description !== "string" || !meta.description) {
|
|
11808
11874
|
throw new SkillSyncError(`${path}: frontmatter is missing "description"`);
|
|
11809
11875
|
}
|
|
11810
|
-
|
|
11876
|
+
for (const key of ["trigger", "persona"]) {
|
|
11877
|
+
if (meta[key] !== void 0 && meta[key] !== null && typeof meta[key] !== "string") {
|
|
11878
|
+
throw new SkillSyncError(`${path}: frontmatter "${key}" must be a string`);
|
|
11879
|
+
}
|
|
11880
|
+
}
|
|
11881
|
+
const trigger = typeof meta.trigger === "string" && meta.trigger ? meta.trigger : void 0;
|
|
11882
|
+
const persona = typeof meta.persona === "string" && meta.persona ? meta.persona : void 0;
|
|
11883
|
+
return {
|
|
11884
|
+
name: meta.name,
|
|
11885
|
+
description: meta.description,
|
|
11886
|
+
prompt: body,
|
|
11887
|
+
file: path,
|
|
11888
|
+
...trigger ? { trigger } : {},
|
|
11889
|
+
...persona ? { persona } : {}
|
|
11890
|
+
};
|
|
11811
11891
|
}
|
|
11812
11892
|
function listLocalSkills(promptsDir) {
|
|
11813
11893
|
const dir = join28(promptsDir, "skills");
|
|
11814
11894
|
if (!existsSync26(dir)) return [];
|
|
11815
11895
|
return readdirSync8(dir).filter((f) => f.endsWith(".md")).map((f) => parseSkillFile(join28(dir, f)));
|
|
11816
11896
|
}
|
|
11897
|
+
function personaColumn(model) {
|
|
11898
|
+
for (const c of ["persona_id", "persona"]) if (model.fields?.some((f) => f.columnName === c)) return c;
|
|
11899
|
+
return void 0;
|
|
11900
|
+
}
|
|
11901
|
+
var refId2 = (v) => typeof v === "string" ? v : v && typeof v === "object" && typeof v.id === "string" ? v.id : "";
|
|
11817
11902
|
async function syncSkills(route2, opts) {
|
|
11818
11903
|
if (!route2.resolved) {
|
|
11819
11904
|
throw new SkillSyncError(`route "${route2.route}" has no resolved ids \u2014 run \`crew connect\` first`);
|
|
@@ -11840,8 +11925,51 @@ async function syncSkills(route2, opts) {
|
|
|
11840
11925
|
const cache = route2.resolved.agentSkills ?? {};
|
|
11841
11926
|
const outcomes = [];
|
|
11842
11927
|
const agentSkills = { ...cache };
|
|
11928
|
+
const warnings = [];
|
|
11929
|
+
const hasTrigger = skillsModel.fields?.some((f) => f.columnName === "trigger") === true;
|
|
11930
|
+
const personaCol = personaColumn(skillsModel);
|
|
11931
|
+
let agentRows;
|
|
11932
|
+
const classified = /* @__PURE__ */ new Set();
|
|
11933
|
+
const declared = (skill) => {
|
|
11934
|
+
const out = {};
|
|
11935
|
+
if (skill.trigger) {
|
|
11936
|
+
if (hasTrigger) out.trigger = skill.trigger;
|
|
11937
|
+
else if (!classified.has("trigger")) {
|
|
11938
|
+
classified.add("trigger");
|
|
11939
|
+
warnings.push("skill trigger not synced \u2014 the Agent Skills table has no trigger column yet (update the Issues template)");
|
|
11940
|
+
}
|
|
11941
|
+
}
|
|
11942
|
+
return out;
|
|
11943
|
+
};
|
|
11944
|
+
const declaredPersona = async (skill) => {
|
|
11945
|
+
if (!skill.persona) return {};
|
|
11946
|
+
if (!personaCol) {
|
|
11947
|
+
if (!classified.has("persona")) {
|
|
11948
|
+
classified.add("persona");
|
|
11949
|
+
warnings.push("skill persona not synced \u2014 the Agent Skills table has no persona column yet (update the Issues template)");
|
|
11950
|
+
}
|
|
11951
|
+
return {};
|
|
11952
|
+
}
|
|
11953
|
+
if (!agentRows) {
|
|
11954
|
+
try {
|
|
11955
|
+
const agentsModel = await client2.dataModels.get("agents", workspaceId);
|
|
11956
|
+
agentRows = await client2.records.list(agentsModel.id, { limit: 200 });
|
|
11957
|
+
} catch (e) {
|
|
11958
|
+
if (!(e instanceof TablationApiError2)) throw e;
|
|
11959
|
+
agentRows = [];
|
|
11960
|
+
}
|
|
11961
|
+
}
|
|
11962
|
+
const match = agentRows.find((a) => a.name === skill.persona);
|
|
11963
|
+
if (!match) {
|
|
11964
|
+
warnings.push(`skill "${skill.name}": persona "${skill.persona}" matches no Agents row \u2014 Persona left empty`);
|
|
11965
|
+
return {};
|
|
11966
|
+
}
|
|
11967
|
+
return { [personaCol]: match.id };
|
|
11968
|
+
};
|
|
11843
11969
|
for (const skill of local) {
|
|
11844
11970
|
const row = rows.find((r) => r.name === skill.name);
|
|
11971
|
+
const extra = { ...declared(skill), ...await declaredPersona(skill) };
|
|
11972
|
+
const rowDiffers = (r) => Object.entries(extra).some(([col, v]) => (col === "trigger" ? r.trigger ?? "" : refId2(r[col])) !== v);
|
|
11845
11973
|
if (!row) {
|
|
11846
11974
|
if (opts.dryRun) {
|
|
11847
11975
|
outcomes.push({ name: skill.name, action: "created", skillId: "(dry run)" });
|
|
@@ -11851,13 +11979,14 @@ async function syncSkills(route2, opts) {
|
|
|
11851
11979
|
name: skill.name,
|
|
11852
11980
|
description: skill.description,
|
|
11853
11981
|
prompt: skill.prompt,
|
|
11982
|
+
...extra,
|
|
11854
11983
|
...promptSourceFields(skillsModel, skill.prompt)
|
|
11855
11984
|
});
|
|
11856
11985
|
agentSkills[skill.name] = { skillId: created.id, lastSyncedUpdatedAt: created.updated_at };
|
|
11857
11986
|
outcomes.push({ name: skill.name, action: "created", skillId: created.id });
|
|
11858
11987
|
continue;
|
|
11859
11988
|
}
|
|
11860
|
-
if (row.description === skill.description && row.prompt === skill.prompt) {
|
|
11989
|
+
if (row.description === skill.description && row.prompt === skill.prompt && !rowDiffers(row)) {
|
|
11861
11990
|
let anchoredAt = row.updated_at;
|
|
11862
11991
|
if (!opts.dryRun && needsBaselineBackfill(skillsModel, row)) {
|
|
11863
11992
|
try {
|
|
@@ -11880,7 +12009,7 @@ async function syncSkills(route2, opts) {
|
|
|
11880
12009
|
outcomes.push({ name: skill.name, action: "overridden", skillId: row.id });
|
|
11881
12010
|
continue;
|
|
11882
12011
|
}
|
|
11883
|
-
const body = { description: skill.description, prompt: skill.prompt, ...promptSourceFields(skillsModel, skill.prompt) };
|
|
12012
|
+
const body = { description: skill.description, prompt: skill.prompt, ...extra, ...promptSourceFields(skillsModel, skill.prompt) };
|
|
11884
12013
|
if (opts.force) {
|
|
11885
12014
|
if (opts.dryRun) {
|
|
11886
12015
|
outcomes.push({ name: skill.name, action: "forced", skillId: row.id });
|
|
@@ -11935,7 +12064,7 @@ async function syncSkills(route2, opts) {
|
|
|
11935
12064
|
throw e;
|
|
11936
12065
|
}
|
|
11937
12066
|
}
|
|
11938
|
-
return { outcomes, agentSkills };
|
|
12067
|
+
return { outcomes, agentSkills, warnings };
|
|
11939
12068
|
}
|
|
11940
12069
|
function describeSkillSyncOutcome(o) {
|
|
11941
12070
|
switch (o.action) {
|
|
@@ -12986,6 +13115,7 @@ async function finishRun(id, obs, emit, startedAt, end, agentLogKey, hintMoved)
|
|
|
12986
13115
|
model: id.model,
|
|
12987
13116
|
// CREW-2980: under `auth: workspace` the endpoint's rows are the accounting; the run row
|
|
12988
13117
|
// keeps turns only, and `reportAgentRun` sums those rows into the ticket counters.
|
|
13118
|
+
...id.agentLogRowId ? { rowId: id.agentLogRowId } : {},
|
|
12989
13119
|
...id.workspaceRunId ? { runId: id.workspaceRunId } : {
|
|
12990
13120
|
tokensIn: result?.inputTokens,
|
|
12991
13121
|
tokensOut: result?.outputTokens,
|
|
@@ -13134,6 +13264,26 @@ function spawnAgent(plan, emit, hintMoved) {
|
|
|
13134
13264
|
} catch {
|
|
13135
13265
|
}
|
|
13136
13266
|
}
|
|
13267
|
+
const startedRow = plan.workspaceRunId && plan.agentLog ? startAgentRunRow(plan.agentLog, {
|
|
13268
|
+
runId: plan.workspaceRunId,
|
|
13269
|
+
ticketReference: plan.ticket ?? void 0,
|
|
13270
|
+
startedAt,
|
|
13271
|
+
model: plan.model,
|
|
13272
|
+
harness: id.harness,
|
|
13273
|
+
provider: id.provider,
|
|
13274
|
+
promptVersion: plan.promptVersion,
|
|
13275
|
+
promptSha: plan.promptSha
|
|
13276
|
+
}).then((rowId) => {
|
|
13277
|
+
if (!rowId) return;
|
|
13278
|
+
id.agentLogRowId = rowId;
|
|
13279
|
+
const sc = readRunSidecar(plan.streamPath);
|
|
13280
|
+
if (sc) {
|
|
13281
|
+
try {
|
|
13282
|
+
writeFileSync20(pidPathFor(plan.streamPath), JSON.stringify({ ...sc, agentLogRowId: rowId }));
|
|
13283
|
+
} catch {
|
|
13284
|
+
}
|
|
13285
|
+
}
|
|
13286
|
+
}) : Promise.resolve();
|
|
13137
13287
|
const obs = new RunObserver(id, adapter, eventsSink, emit.cycle);
|
|
13138
13288
|
const meta = { pid: child.pid ?? null, ...deadline ? { deadline } : {} };
|
|
13139
13289
|
obs.onClaim = () => writeRunMeta(id, startedAt, obs.liveTicket, meta);
|
|
@@ -13165,6 +13315,7 @@ function spawnAgent(plan, emit, hintMoved) {
|
|
|
13165
13315
|
if (limitTimer && !killed && !obs.sawResult && msUntilDeadline(deadline) <= 0) {
|
|
13166
13316
|
killed = { limitMinutes: plan.maxRunMinutes ?? 0, elapsedMs: Date.now() - Date.parse(spawnedAt) };
|
|
13167
13317
|
}
|
|
13318
|
+
await startedRow;
|
|
13168
13319
|
const { ms: ms3, handoffPending } = await finishRun(
|
|
13169
13320
|
id,
|
|
13170
13321
|
obs,
|
|
@@ -21977,6 +22128,7 @@ async function runAgentsSync(target, o) {
|
|
|
21977
22128
|
}
|
|
21978
22129
|
}
|
|
21979
22130
|
for (const s of skillResult?.outcomes ?? []) o.say(describeSkillSyncOutcome(s));
|
|
22131
|
+
for (const w of skillResult?.warnings ?? []) o.warn(`warning: ${w}`);
|
|
21980
22132
|
if (!dryRun) {
|
|
21981
22133
|
const resolvedPath = resolvedPathFor(o.stateDir, target.route);
|
|
21982
22134
|
const raw = existsSync44(resolvedPath) ? JSON.parse(readFileSync39(resolvedPath, "utf8")) : {};
|
|
@@ -29168,6 +29320,8 @@ ${cu.tail.trimEnd()}
|
|
|
29168
29320
|
process.stdout.write(`route: ${target.route}
|
|
29169
29321
|
`);
|
|
29170
29322
|
for (const o of result.outcomes) process.stdout.write(`${describeSkillSyncOutcome(o)}
|
|
29323
|
+
`);
|
|
29324
|
+
for (const w of result.warnings) process.stderr.write(`warning: ${w}
|
|
29171
29325
|
`);
|
|
29172
29326
|
if (!dryRun) {
|
|
29173
29327
|
const resolvedPath = resolvedPathFor(cfg.ship.stateDir, target.route);
|
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Grill-Me
|
|
3
|
+
trigger: grill
|
|
4
|
+
persona: Pair
|
|
3
5
|
description: Interview mode for turning a rough Epic into a settled PRD (a Maps record) plus a proposed ticket breakdown. Use when asked to grill/interview about an Epic, or when invoked via an Epic's grill_link.
|
|
4
6
|
---
|
|
5
7
|
# Grill-Me interview
|
|
@@ -24,7 +26,12 @@ prior conversation history exists.
|
|
|
24
26
|
|
|
25
27
|
1. Identify which Epic you were invoked for (it will be named or
|
|
26
28
|
referenced in the opening message — usually by its `epic_id`, e.g.
|
|
27
|
-
`EPIC-010`).
|
|
29
|
+
`EPIC-010`). The opening message may also contain the trigger phrase
|
|
30
|
+
and a reference together; look the Epic up from the reference as
|
|
31
|
+
usual. Look it up in full via MCP. If the opening message names a
|
|
32
|
+
particular host or machine, honor it with the `use_host` tool when
|
|
33
|
+
this chat offers one, before any code lookup; without that tool, carry
|
|
34
|
+
on as before.
|
|
28
35
|
2. Look up any Issues already linked to this Epic (`epic_id` reference)
|
|
29
36
|
so you know what's already been proposed or decided.
|
|
30
37
|
3. Look up any existing Maps records for this Epic (`epic_id` reference
|
|
@@ -33,7 +40,7 @@ prior conversation history exists.
|
|
|
33
40
|
as a **revision** interview, not a fresh one (see §5). If the most
|
|
34
41
|
recent one is `status: draft` (never promoted) or `status: planning`
|
|
35
42
|
(an interview that was interrupted), you're likely continuing or
|
|
36
|
-
restarting that same attempt — ask the
|
|
43
|
+
restarting that same attempt — ask the starter which they intend.
|
|
37
44
|
Ignore `abandoned` Maps when picking what to continue; they still count
|
|
38
45
|
when you compute the next `version`.
|
|
39
46
|
4. Before your first question, make sure a Map record for this session
|
|
@@ -51,14 +58,36 @@ prior conversation history exists.
|
|
|
51
58
|
|
|
52
59
|
## 2. Run the interview
|
|
53
60
|
|
|
54
|
-
Interview the
|
|
55
|
-
idea: one question at a time, always with your own recommended answer
|
|
61
|
+
Interview the people in the conversation the way a good product/eng lead
|
|
62
|
+
would grill a raw idea: one question at a time, always with your own recommended answer
|
|
56
63
|
attached, walking the design tree branch by branch — scope, edge cases,
|
|
57
64
|
data model implications, who's affected, what's explicitly out of scope.
|
|
58
65
|
Don't ask about things you can determine yourself by reading workspace
|
|
59
66
|
data (existing tables, fields, other tickets) — go look first.
|
|
60
67
|
|
|
61
|
-
|
|
68
|
+
Some conversations are a thread with several people in it. When messages
|
|
69
|
+
arrive prefixed with a speaker name, treat every speaker's answer as
|
|
70
|
+
input and address open questions to the group rather than to one person.
|
|
71
|
+
Record who said what by name in the Map's `conversation` field. The
|
|
72
|
+
person who started the conversation is the **starter**, and the starter
|
|
73
|
+
is the interviewee for every decision that changes a record's status
|
|
74
|
+
(§5, §6). Where speakers disagree, say so, put the disagreement back to
|
|
75
|
+
the group, and let the starter settle it.
|
|
76
|
+
|
|
77
|
+
With no speaker prefixes there is one interviewee, and that person is
|
|
78
|
+
the starter.
|
|
79
|
+
|
|
80
|
+
### Live previews
|
|
81
|
+
|
|
82
|
+
During an interview you may open a live preview only for a draft issue
|
|
83
|
+
this interview has filed, naming that issue to the preview tool, or for
|
|
84
|
+
an issue a participant names. Never open one for the Epic itself and
|
|
85
|
+
never without a ticket. A request made while a preview is live changes
|
|
86
|
+
only that preview's worktree. Whether to keep or discard the preview is
|
|
87
|
+
the starter's call: if anyone else asks, acknowledge it and put the
|
|
88
|
+
question to the starter. Without a preview tool, skip this.
|
|
89
|
+
|
|
90
|
+
Keep pressing until nobody has an open question left. This is a
|
|
62
91
|
**mutual agreement**, not a timer or a turn count — don't wrap up early,
|
|
63
92
|
and don't manufacture more questions once you've genuinely converged.
|
|
64
93
|
|
|
@@ -84,6 +113,11 @@ Once you've reached mutual agreement the session is done:
|
|
|
84
113
|
record of *how* you got to the PRD, not a duplicate of it.
|
|
85
114
|
- `status` → `draft`, now that the PRD is written. Never create a Map
|
|
86
115
|
as `active` directly, and never leave a finished PRD at `planning`.
|
|
116
|
+
3. Once the Map is at `draft` and its draft tickets are filed (§4), call
|
|
117
|
+
`record_link` for the Map and keep the result for the promotion
|
|
118
|
+
question: the public URL when it returns one, else the app URL. If
|
|
119
|
+
the chat has no `record_link` tool, name the Map's title and
|
|
120
|
+
`version` instead.
|
|
87
121
|
|
|
88
122
|
## 4. Proposing child tickets
|
|
89
123
|
|
|
@@ -107,18 +141,24 @@ Alongside the draft Map, propose the child Issues implied by the PRD:
|
|
|
107
141
|
|
|
108
142
|
## 5. Promotion — asked at the end of every session, including revisions
|
|
109
143
|
|
|
110
|
-
Before ending the session, ask the
|
|
111
|
-
|
|
144
|
+
Before ending the session, ask the starter directly: **should this Map
|
|
145
|
+
go active now, or stay a draft?** Put the Map link from §3 step 3 in the
|
|
146
|
+
same message as this question, so the group can read the Map before the
|
|
147
|
+
starter answers.
|
|
148
|
+
|
|
149
|
+
Only the starter's answer counts. If another participant answers, thank
|
|
150
|
+
them, say that the starter decides, and put the question to the starter
|
|
151
|
+
again. Do not act on a non-starter's answer, even if no one objects.
|
|
112
152
|
|
|
113
153
|
Only a `draft` Map can be promoted. A Map still at `planning` is an
|
|
114
154
|
unfinished interview and is never activated.
|
|
115
155
|
|
|
116
|
-
- **If
|
|
156
|
+
- **If the starter says stay draft:** leave everything as-is. Nothing else to
|
|
117
157
|
do. A later session (yours or someone else's) picks this back up.
|
|
118
|
-
- **If
|
|
158
|
+
- **If the starter says go active:**
|
|
119
159
|
1. Check every `draft` Issue tied to this Epic that you intend to
|
|
120
160
|
carry forward has `project_id` AND `repo_id` set. If any are
|
|
121
|
-
missing, ask the
|
|
161
|
+
missing, ask the starter for them now — don't promote a Map
|
|
122
162
|
whose tickets aren't ready for an engineer to accept.
|
|
123
163
|
2. If a prior Map for this `epic_id` is currently `active`, set it to
|
|
124
164
|
`status: superseded`.
|
|
@@ -128,7 +168,7 @@ unfinished interview and is never activated.
|
|
|
128
168
|
whatever) is permanently out of scope for this step, no exceptions,
|
|
129
169
|
regardless of whether it's still relevant to the new PRD:
|
|
130
170
|
- Any `draft` Issue that's part of this session's ticket set →
|
|
131
|
-
flip to `status: accepted`. The
|
|
171
|
+
flip to `status: accepted`. The starter saying "go active"
|
|
132
172
|
to this Map **is** the acceptance decision for these tickets —
|
|
133
173
|
promoting them is you executing that decision, not making one
|
|
134
174
|
of your own.
|
|
@@ -150,12 +190,13 @@ awaiting the promotion decision) → `active` (promoted) → `superseded` (a
|
|
|
150
190
|
later version went active). `abandoned` is the terminal state for a Map
|
|
151
191
|
that never got that far.
|
|
152
192
|
|
|
153
|
-
If the
|
|
154
|
-
`draft
|
|
193
|
+
If the starter says to stop working on a Map that is at `planning` or
|
|
194
|
+
`draft` (another participant asking is acknowledged, and the question goes
|
|
195
|
+
to the starter):
|
|
155
196
|
|
|
156
197
|
1. Set that Map to `status: abandoned`.
|
|
157
|
-
2. Ask whether its `draft` Issues should go to
|
|
158
|
-
recommend yes. Apply their answer; leave Issues that have already left
|
|
198
|
+
2. Ask the starter whether its `draft` Issues should go to
|
|
199
|
+
`closed_obsolete`, and recommend yes. Apply their answer; leave Issues that have already left
|
|
159
200
|
`draft` alone.
|
|
160
201
|
3. Leave the Epic's status alone.
|
|
161
202
|
|
|
@@ -169,7 +210,7 @@ as in §5.
|
|
|
169
210
|
- Setting an Issue to `accepted` outside of §5's promotion step, or to
|
|
170
211
|
any state beyond that — those remain a human decision, made later,
|
|
171
212
|
outside this session. §5's own `accepted` transition is the one
|
|
172
|
-
sanctioned exception: it fires only when the
|
|
213
|
+
sanctioned exception: it fires only when the starter has just
|
|
173
214
|
approved the Map itself, which already **is** the human decision this
|
|
174
215
|
bullet protects.
|
|
175
216
|
- Auto-triggering itself on new Epic creation — it only runs when
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Grill-Me
|
|
3
|
+
trigger: grill
|
|
4
|
+
persona: Pair
|
|
3
5
|
description: Interview mode for turning a rough Epic into a settled PRD (a Maps record) plus a proposed ticket breakdown. Use when asked to grill/interview about an Epic, or when invoked via an Epic's grill_link.
|
|
4
6
|
---
|
|
5
7
|
# Grill-Me interview
|
|
@@ -24,7 +26,12 @@ prior conversation history exists.
|
|
|
24
26
|
|
|
25
27
|
1. Identify which Epic you were invoked for (it will be named or
|
|
26
28
|
referenced in the opening message — usually by its `epic_id`, e.g.
|
|
27
|
-
`EPIC-010`).
|
|
29
|
+
`EPIC-010`). The opening message may also contain the trigger phrase
|
|
30
|
+
and a reference together; look the Epic up from the reference as
|
|
31
|
+
usual. Look it up in full via MCP. If the opening message names a
|
|
32
|
+
particular host or machine, honor it with the `use_host` tool when
|
|
33
|
+
this chat offers one, before any code lookup; without that tool, carry
|
|
34
|
+
on as before.
|
|
28
35
|
2. Look up any Issues already linked to this Epic (`epic_id` reference)
|
|
29
36
|
so you know what's already been proposed or decided.
|
|
30
37
|
3. Look up any existing Maps records for this Epic (`epic_id` reference
|
|
@@ -33,7 +40,7 @@ prior conversation history exists.
|
|
|
33
40
|
as a **revision** interview, not a fresh one (see §5). If the most
|
|
34
41
|
recent one is `status: draft` (never promoted) or `status: planning`
|
|
35
42
|
(an interview that was interrupted), you're likely continuing or
|
|
36
|
-
restarting that same attempt — ask the
|
|
43
|
+
restarting that same attempt — ask the starter which they intend.
|
|
37
44
|
Ignore `abandoned` Maps when picking what to continue; they still count
|
|
38
45
|
when you compute the next `version`.
|
|
39
46
|
4. Before your first question, make sure a Map record for this session
|
|
@@ -51,14 +58,36 @@ prior conversation history exists.
|
|
|
51
58
|
|
|
52
59
|
## 2. Run the interview
|
|
53
60
|
|
|
54
|
-
Interview the
|
|
55
|
-
idea: one question at a time, always with your own recommended answer
|
|
61
|
+
Interview the people in the conversation the way a good product/eng lead
|
|
62
|
+
would grill a raw idea: one question at a time, always with your own recommended answer
|
|
56
63
|
attached, walking the design tree branch by branch — scope, edge cases,
|
|
57
64
|
data model implications, who's affected, what's explicitly out of scope.
|
|
58
65
|
Don't ask about things you can determine yourself by reading workspace
|
|
59
66
|
data (existing tables, fields, other tickets) — go look first.
|
|
60
67
|
|
|
61
|
-
|
|
68
|
+
Some conversations are a thread with several people in it. When messages
|
|
69
|
+
arrive prefixed with a speaker name, treat every speaker's answer as
|
|
70
|
+
input and address open questions to the group rather than to one person.
|
|
71
|
+
Record who said what by name in the Map's `conversation` field. The
|
|
72
|
+
person who started the conversation is the **starter**, and the starter
|
|
73
|
+
is the interviewee for every decision that changes a record's status
|
|
74
|
+
(§5, §6). Where speakers disagree, say so, put the disagreement back to
|
|
75
|
+
the group, and let the starter settle it.
|
|
76
|
+
|
|
77
|
+
With no speaker prefixes there is one interviewee, and that person is
|
|
78
|
+
the starter.
|
|
79
|
+
|
|
80
|
+
### Live previews
|
|
81
|
+
|
|
82
|
+
During an interview you may open a live preview only for a draft issue
|
|
83
|
+
this interview has filed, naming that issue to the preview tool, or for
|
|
84
|
+
an issue a participant names. Never open one for the Epic itself and
|
|
85
|
+
never without a ticket. A request made while a preview is live changes
|
|
86
|
+
only that preview's worktree. Whether to keep or discard the preview is
|
|
87
|
+
the starter's call: if anyone else asks, acknowledge it and put the
|
|
88
|
+
question to the starter. Without a preview tool, skip this.
|
|
89
|
+
|
|
90
|
+
Keep pressing until nobody has an open question left. This is a
|
|
62
91
|
**mutual agreement**, not a timer or a turn count — don't wrap up early,
|
|
63
92
|
and don't manufacture more questions once you've genuinely converged.
|
|
64
93
|
|
|
@@ -84,6 +113,11 @@ Once you've reached mutual agreement the session is done:
|
|
|
84
113
|
record of *how* you got to the PRD, not a duplicate of it.
|
|
85
114
|
- `status` → `draft`, now that the PRD is written. Never create a Map
|
|
86
115
|
as `active` directly, and never leave a finished PRD at `planning`.
|
|
116
|
+
3. Once the Map is at `draft` and its draft tickets are filed (§4), call
|
|
117
|
+
`record_link` for the Map and keep the result for the promotion
|
|
118
|
+
question: the public URL when it returns one, else the app URL. If
|
|
119
|
+
the chat has no `record_link` tool, name the Map's title and
|
|
120
|
+
`version` instead.
|
|
87
121
|
|
|
88
122
|
## 4. Proposing child tickets
|
|
89
123
|
|
|
@@ -107,18 +141,24 @@ Alongside the draft Map, propose the child Issues implied by the PRD:
|
|
|
107
141
|
|
|
108
142
|
## 5. Promotion — asked at the end of every session, including revisions
|
|
109
143
|
|
|
110
|
-
Before ending the session, ask the
|
|
111
|
-
|
|
144
|
+
Before ending the session, ask the starter directly: **should this Map
|
|
145
|
+
go active now, or stay a draft?** Put the Map link from §3 step 3 in the
|
|
146
|
+
same message as this question, so the group can read the Map before the
|
|
147
|
+
starter answers.
|
|
148
|
+
|
|
149
|
+
Only the starter's answer counts. If another participant answers, thank
|
|
150
|
+
them, say that the starter decides, and put the question to the starter
|
|
151
|
+
again. Do not act on a non-starter's answer, even if no one objects.
|
|
112
152
|
|
|
113
153
|
Only a `draft` Map can be promoted. A Map still at `planning` is an
|
|
114
154
|
unfinished interview and is never activated.
|
|
115
155
|
|
|
116
|
-
- **If
|
|
156
|
+
- **If the starter says stay draft:** leave everything as-is. Nothing else to
|
|
117
157
|
do. A later session (yours or someone else's) picks this back up.
|
|
118
|
-
- **If
|
|
158
|
+
- **If the starter says go active:**
|
|
119
159
|
1. Check every `draft` Issue tied to this Epic that you intend to
|
|
120
160
|
carry forward has `project_id` AND `repo_id` set. If any are
|
|
121
|
-
missing, ask the
|
|
161
|
+
missing, ask the starter for them now — don't promote a Map
|
|
122
162
|
whose tickets aren't ready for an engineer to accept.
|
|
123
163
|
2. If a prior Map for this `epic_id` is currently `active`, set it to
|
|
124
164
|
`status: superseded`.
|
|
@@ -128,7 +168,7 @@ unfinished interview and is never activated.
|
|
|
128
168
|
whatever) is permanently out of scope for this step, no exceptions,
|
|
129
169
|
regardless of whether it's still relevant to the new PRD:
|
|
130
170
|
- Any `draft` Issue that's part of this session's ticket set →
|
|
131
|
-
flip to `status: accepted`. The
|
|
171
|
+
flip to `status: accepted`. The starter saying "go active"
|
|
132
172
|
to this Map **is** the acceptance decision for these tickets —
|
|
133
173
|
promoting them is you executing that decision, not making one
|
|
134
174
|
of your own.
|
|
@@ -150,12 +190,13 @@ awaiting the promotion decision) → `active` (promoted) → `superseded` (a
|
|
|
150
190
|
later version went active). `abandoned` is the terminal state for a Map
|
|
151
191
|
that never got that far.
|
|
152
192
|
|
|
153
|
-
If the
|
|
154
|
-
`draft
|
|
193
|
+
If the starter says to stop working on a Map that is at `planning` or
|
|
194
|
+
`draft` (another participant asking is acknowledged, and the question goes
|
|
195
|
+
to the starter):
|
|
155
196
|
|
|
156
197
|
1. Set that Map to `status: abandoned`.
|
|
157
|
-
2. Ask whether its `draft` Issues should go to
|
|
158
|
-
recommend yes. Apply their answer; leave Issues that have already left
|
|
198
|
+
2. Ask the starter whether its `draft` Issues should go to
|
|
199
|
+
`closed_obsolete`, and recommend yes. Apply their answer; leave Issues that have already left
|
|
159
200
|
`draft` alone.
|
|
160
201
|
3. Leave the Epic's status alone.
|
|
161
202
|
|
|
@@ -169,7 +210,7 @@ as in §5.
|
|
|
169
210
|
- Setting an Issue to `accepted` outside of §5's promotion step, or to
|
|
170
211
|
any state beyond that — those remain a human decision, made later,
|
|
171
212
|
outside this session. §5's own `accepted` transition is the one
|
|
172
|
-
sanctioned exception: it fires only when the
|
|
213
|
+
sanctioned exception: it fires only when the starter has just
|
|
173
214
|
approved the Map itself, which already **is** the human decision this
|
|
174
215
|
bullet protects.
|
|
175
216
|
- Auto-triggering itself on new Epic creation — it only runs when
|