Add the governance doc and regression coverage for the conditional post-v1 goals refinement gate. - add docs/goals-refinement-gate.md defining accepted trigger evidence, activation requirements, and the no-automatic-refinement rule for Slice 4 - link the new goals refinement gate doc from docs/README.md - add a vitest doc guard that asserts the required trigger categories and activation constraints remain documented Files changed: docs/README.md | 1 + docs/goals-refinement-gate.md | 104 +++++++++++++++++++++ packages/dashboard/app/__tests__/goals-refinement-gate-docs.test.ts | 51 ++++++++++ 3 files changed, 156 insertions(+) Fusion-Task-Id: FN-5961 Fusion-Task-Lineage: 8e641782-93bb-470e-8bc3-14379dbd6cf6
52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { readFileSync } from "node:fs";
|
|
import { resolve } from "node:path";
|
|
|
|
const REQUIRED_TRIGGER_EVIDENCE = [
|
|
"Operator friction",
|
|
"Prompt-budget or context-window pressure from goal injection",
|
|
"Unclear prioritization or unclear mission ↔ goal ownership",
|
|
"Free-text success-metric limitations that fail agent reasoning",
|
|
"The hard 5-active-goal cap proving too tight",
|
|
"Reporting or visibility gaps",
|
|
] as const;
|
|
|
|
const REQUIRED_ACTIVATION_RULE_SNIPPETS = [
|
|
"written rationale",
|
|
"real usage evidence",
|
|
"FN-5963 conditional refinement trigger evidence pack/template",
|
|
"`fn_slice_activate` for `SL-MP32LAJW-0009-RHJQ`",
|
|
] as const;
|
|
|
|
const REQUIRED_NO_AUTOMATIC_REFINEMENT_SNIPPETS = [
|
|
"does **not** authorize automatic follow-on work",
|
|
"No structured `successMetric` schema work starts automatically.",
|
|
"No focus-set concept starts automatically.",
|
|
"No reporting or visibility expansion starts automatically.",
|
|
"Without the written rationale and evidence trigger above, Slice 4 remains pending and unspecified.",
|
|
] as const;
|
|
|
|
describe("Goals refinement gate doc", () => {
|
|
it("documents the evidence categories, written-rationale activation rule, and no-auto-refinement constraint", () => {
|
|
const doc = readFileSync(
|
|
resolve(__dirname, "../../../../docs/goals-refinement-gate.md"),
|
|
"utf-8",
|
|
);
|
|
|
|
expect(doc).toContain("# Goals Refinement Gate");
|
|
expect(doc).toContain("[← Docs index](./README.md)");
|
|
|
|
for (const snippet of REQUIRED_TRIGGER_EVIDENCE) {
|
|
expect(doc).toContain(snippet);
|
|
}
|
|
|
|
for (const snippet of REQUIRED_ACTIVATION_RULE_SNIPPETS) {
|
|
expect(doc).toContain(snippet);
|
|
}
|
|
|
|
for (const snippet of REQUIRED_NO_AUTOMATIC_REFINEMENT_SNIPPETS) {
|
|
expect(doc).toContain(snippet);
|
|
}
|
|
});
|
|
});
|