feat(FN-960): strengthen undersplit detection and subtask guidance in triage and reviewer
- Strengthen TRIAGE_SYSTEM_PROMPT with explicit subtask guidance rules and examples - Strengthen buildSpecificationPrompt to reinforce proper subtask decomposition - Add undersplit detection to spec reviewer to flag oversized or overly broad tasks - Add test assertions for improved prompts covering undersplit detection and subtask guidance
This commit is contained in:
@@ -196,8 +196,8 @@ describe("buildSpecificationPrompt", () => {
|
||||
);
|
||||
|
||||
expect(prompt).toContain("## Subtask Consideration");
|
||||
expect(prompt).toContain("Size M or L");
|
||||
expect(prompt).toContain("Subtask creation is OPTIONAL");
|
||||
expect(prompt).toContain("MORE THAN 7 implementation steps");
|
||||
expect(prompt).toContain("GOOD TO SPLIT");
|
||||
expect(prompt).not.toContain("## Subtask Breakdown Requested");
|
||||
});
|
||||
|
||||
@@ -274,6 +274,21 @@ describe("TRIAGE_SYSTEM_PROMPT", () => {
|
||||
"Size S tasks should generally NOT be split",
|
||||
);
|
||||
});
|
||||
|
||||
it("includes explicit subtask breakdown thresholds", () => {
|
||||
expect(TRIAGE_SYSTEM_PROMPT).toContain("MORE THAN 7 implementation steps");
|
||||
expect(TRIAGE_SYSTEM_PROMPT).toContain(
|
||||
"MORE THAN 3 different packages/modules",
|
||||
);
|
||||
});
|
||||
|
||||
it("includes anti-pattern warning for oversized tasks", () => {
|
||||
expect(TRIAGE_SYSTEM_PROMPT).toContain("ANTI-PATTERN");
|
||||
expect(TRIAGE_SYSTEM_PROMPT).toContain("10+ steps");
|
||||
expect(TRIAGE_SYSTEM_PROMPT).toContain(
|
||||
"Only keep a task as one unit if it genuinely has 5 or fewer focused steps",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("readAttachmentContents", () => {
|
||||
|
||||
Reference in New Issue
Block a user