diff --git a/src/resources/extensions/sf/preferences-types.ts b/src/resources/extensions/sf/preferences-types.ts index 2d41b56be..eca6ce189 100644 --- a/src/resources/extensions/sf/preferences-types.ts +++ b/src/resources/extensions/sf/preferences-types.ts @@ -166,6 +166,7 @@ export const KNOWN_UNIT_TYPES = [ "plan-milestone", "research-slice", "plan-slice", + "refine-slice", "execute-task", "reactive-execute", "gate-evaluate", @@ -178,6 +179,10 @@ export const KNOWN_UNIT_TYPES = [ "rewrite-docs", "discuss-milestone", "discuss-slice", + "discuss-project", + "discuss-requirements", + "research-project", + "workflow-preferences", "worktree-merge", ] as const; export type UnitType = (typeof KNOWN_UNIT_TYPES)[number]; diff --git a/src/resources/extensions/sf/tests/complete-slice.test.ts b/src/resources/extensions/sf/tests/complete-slice.test.ts index db7a45d65..a7b7ed7e0 100644 --- a/src/resources/extensions/sf/tests/complete-slice.test.ts +++ b/src/resources/extensions/sf/tests/complete-slice.test.ts @@ -113,7 +113,7 @@ Run the test suite and verify all assertions pass. } describe("complete-slice: schema v6 migration", () => { - it("schema version should be 21", () => { + it("schema version should be 25", () => { const dbPath = tempDbPath(); openDatabase(dbPath); @@ -121,7 +121,7 @@ describe("complete-slice: schema v6 migration", () => { const versionRow = adapter .prepare("SELECT MAX(version) as v FROM schema_version") .get(); - assert.strictEqual(versionRow?.["v"], 21); + assert.strictEqual(versionRow?.["v"], 25); cleanup(dbPath); }); diff --git a/src/resources/extensions/sf/tests/complete-task.test.ts b/src/resources/extensions/sf/tests/complete-task.test.ts index 042c3d815..443662250 100644 --- a/src/resources/extensions/sf/tests/complete-task.test.ts +++ b/src/resources/extensions/sf/tests/complete-task.test.ts @@ -146,7 +146,7 @@ console.log("\n=== complete-task: schema v5 migration ==="); const versionRow = adapter .prepare("SELECT MAX(version) as v FROM schema_version") .get(); - assertEq(versionRow?.["v"], 21, "schema version should be 21"); + assertEq(versionRow?.["v"], 25, "schema version should be 25"); // Verify all 4 new tables exist const tables = adapter diff --git a/src/resources/extensions/sf/tests/md-importer.test.ts b/src/resources/extensions/sf/tests/md-importer.test.ts index d18aef75a..91ae1232d 100644 --- a/src/resources/extensions/sf/tests/md-importer.test.ts +++ b/src/resources/extensions/sf/tests/md-importer.test.ts @@ -522,8 +522,8 @@ test("md-importer: schema v1→v2 migration", () => { .get(); assert.deepStrictEqual( version?.v, - 21, - "new DB should be at schema version 21", + 25, + "new DB should be at schema version 25", ); // Artifacts table should exist diff --git a/src/resources/extensions/sf/tests/workflow-templates.test.ts b/src/resources/extensions/sf/tests/workflow-templates.test.ts index 5cee11097..2ad08f941 100644 --- a/src/resources/extensions/sf/tests/workflow-templates.test.ts +++ b/src/resources/extensions/sf/tests/workflow-templates.test.ts @@ -63,8 +63,9 @@ describe("workflow-templates", () => { `${id}: description should be non-empty`, ); assert.ok( - typeof entry.file === "string" && entry.file.endsWith(".md"), - `${id}: file should be a .md path`, + typeof entry.file === "string" && + (entry.file.endsWith(".md") || entry.file.endsWith(".yaml")), + `${id}: file should be a .md or .yaml path`, ); assert.ok( Array.isArray(entry.phases) && entry.phases.length > 0, diff --git a/src/resources/extensions/sf/unit-context-manifest.ts b/src/resources/extensions/sf/unit-context-manifest.ts index 50753eab4..5de10cacf 100644 --- a/src/resources/extensions/sf/unit-context-manifest.ts +++ b/src/resources/extensions/sf/unit-context-manifest.ts @@ -297,6 +297,11 @@ export const KNOWN_UNIT_TYPES = [ "run-uat", "gate-evaluate", "rewrite-docs", + // ADR-011 deep planning gate (project-scoped, before any milestone work) + "discuss-project", + "discuss-requirements", + "research-project", + "workflow-preferences", ] as const; export type UnitType = (typeof KNOWN_UNIT_TYPES)[number]; @@ -638,6 +643,63 @@ export const UNIT_MANIFESTS: Record = { }, maxSystemPromptChars: COMMON_BUDGET_MEDIUM, }, + // ─── Project-scoped (deep planning gate, ADR-011) ─────────────────── + "discuss-project": { + skills: { mode: "all" }, + knowledge: "full", + memory: "prompt-relevant", + codebaseMap: true, + preferences: "active-only", + tools: TOOLS_PLANNING, + artifacts: { + inline: ["project", "templates"], + excerpt: [], + onDemand: [], + }, + maxSystemPromptChars: COMMON_BUDGET_MEDIUM, + }, + "discuss-requirements": { + skills: { mode: "all" }, + knowledge: "full", + memory: "prompt-relevant", + codebaseMap: true, + preferences: "active-only", + tools: TOOLS_PLANNING, + artifacts: { + inline: ["project", "requirements", "templates"], + excerpt: [], + onDemand: [], + }, + maxSystemPromptChars: COMMON_BUDGET_MEDIUM, + }, + "research-project": { + skills: { mode: "all" }, + knowledge: "full", + memory: "prompt-relevant", + codebaseMap: true, + preferences: "active-only", + tools: TOOLS_PLANNING, + artifacts: { + inline: ["project", "requirements", "decisions", "templates"], + excerpt: [], + onDemand: [], + }, + maxSystemPromptChars: COMMON_BUDGET_LARGE, + }, + "workflow-preferences": { + skills: { mode: "all" }, + knowledge: "scoped", + memory: "prompt-relevant", + codebaseMap: false, + preferences: "active-only", + tools: TOOLS_PLANNING, + artifacts: { + inline: ["templates"], + excerpt: [], + onDemand: [], + }, + maxSystemPromptChars: COMMON_BUDGET_MEDIUM, + }, }; // ─── Lookup helper ────────────────────────────────────────────────────────