feat: add defense qna branch metadata

This commit is contained in:
lda
2026-07-08 07:13:12 +07:00 Verified
parent 41025184f7
commit 1bed294ea9
2 changed files with 159 additions and 8 deletions
@@ -5,6 +5,7 @@ import {
findBeat,
findScene,
mainScenes,
type DiscussionBranchDefinition,
} from "./storyboard.js";
describe("defense storyboard catalog", () => {
@@ -50,6 +51,7 @@ describe("defense storyboard catalog", () => {
"hosted-automation",
"durable-agent-graphs",
"mcp-agent-scale",
"not-just-scripts",
]);
for (const branch of discussionBranches) {
expect(branch.title.length).toBeGreaterThan(0);
@@ -58,6 +60,36 @@ describe("defense storyboard catalog", () => {
}
});
it("defines core defense Q&A branches for expected examiner questions", () => {
expect(discussionBranches.map((branch) => branch.id)).toEqual(
expect.arrayContaining([
"where-is-ai-agent",
"title-ai-agent-wording",
"not-just-cli",
"not-just-scripts",
"evaluation-validity",
"security-production-boundary",
"demo-reliability",
"prepared-replay-boundary",
"why-schemas",
"production-readiness",
]),
);
});
it("keeps defense Q&A branches speaker-ready", () => {
const branches: readonly DiscussionBranchDefinition[] = discussionBranches;
const qnaBranches = branches.filter((branch) => branch.question);
expect(qnaBranches.length).toBeGreaterThanOrEqual(10);
for (const branch of qnaBranches) {
expect(branch.question).toMatch(/\?$/);
expect(branch.shortAnswer?.length).toBeGreaterThan(40);
expect(branch.shortAnswer?.length).toBeLessThan(360);
expect(branch.expandedAnswer?.length).toBeGreaterThan(80);
expect(branch.evidencePointer.length).toBeGreaterThan(0);
}
});
it("exposes a valid default location", () => {
expect(defaultMainLocation).toEqual({ kind: "main", sceneId: "thesis", beatId: "title", focusPath: [] });
expect(findScene(defaultMainLocation.sceneId)?.number).toBe(1);