ridgeline 0.6.0 → 0.7.2
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/README.md +8 -5
- package/dist/agents/core/designer.md +131 -0
- package/dist/agents/core/refiner.md +28 -1
- package/dist/agents/core/researcher.md +30 -11
- package/dist/agents/core/specifier.md +16 -0
- package/dist/agents/researchers/gaps.md +67 -0
- package/dist/agents/specifiers/visual-coherence.md +55 -0
- package/dist/cli.js +39 -8
- package/dist/cli.js.map +1 -1
- package/dist/commands/create.js +16 -1
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/design.d.ts +8 -0
- package/dist/commands/design.js +130 -0
- package/dist/commands/design.js.map +1 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.js +3 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/plan.js +3 -3
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/qa-workflow.d.ts +33 -0
- package/dist/commands/qa-workflow.js +139 -0
- package/dist/commands/qa-workflow.js.map +1 -0
- package/dist/commands/refine.d.ts +1 -0
- package/dist/commands/refine.js +17 -4
- package/dist/commands/refine.js.map +1 -1
- package/dist/commands/research.js +22 -8
- package/dist/commands/research.js.map +1 -1
- package/dist/commands/rewind.js +2 -2
- package/dist/commands/rewind.js.map +1 -1
- package/dist/commands/shape.js +36 -121
- package/dist/commands/shape.js.map +1 -1
- package/dist/commands/spec.js +1 -0
- package/dist/commands/spec.js.map +1 -1
- package/dist/engine/claude/stream.display.js +0 -1
- package/dist/engine/claude/stream.display.js.map +1 -1
- package/dist/engine/claude/stream.parse.d.ts +1 -15
- package/dist/engine/claude/stream.parse.js +3 -21
- package/dist/engine/claude/stream.parse.js.map +1 -1
- package/dist/engine/claude/stream.result.js +2 -2
- package/dist/engine/claude/stream.types.d.ts +15 -0
- package/dist/engine/claude/stream.types.js +23 -0
- package/dist/engine/claude/stream.types.js.map +1 -0
- package/dist/engine/discovery/agent.registry.d.ts +4 -0
- package/dist/engine/discovery/agent.registry.js +46 -18
- package/dist/engine/discovery/agent.registry.js.map +1 -1
- package/dist/engine/discovery/flavour.config.d.ts +9 -0
- package/dist/engine/discovery/flavour.config.js +61 -0
- package/dist/engine/discovery/flavour.config.js.map +1 -0
- package/dist/engine/discovery/plugin.scan.d.ts +1 -0
- package/dist/engine/discovery/plugin.scan.js +29 -1
- package/dist/engine/discovery/plugin.scan.js.map +1 -1
- package/dist/engine/discovery/skill.check.d.ts +19 -0
- package/dist/engine/discovery/skill.check.js +145 -0
- package/dist/engine/discovery/skill.check.js.map +1 -0
- package/dist/engine/pipeline/build.exec.js +1 -0
- package/dist/engine/pipeline/build.exec.js.map +1 -1
- package/dist/engine/pipeline/phase.sequence.js +10 -10
- package/dist/engine/pipeline/phase.sequence.js.map +1 -1
- package/dist/engine/pipeline/pipeline.shared.d.ts +6 -0
- package/dist/engine/pipeline/pipeline.shared.js +24 -1
- package/dist/engine/pipeline/pipeline.shared.js.map +1 -1
- package/dist/engine/pipeline/plan.exec.js +1 -0
- package/dist/engine/pipeline/plan.exec.js.map +1 -1
- package/dist/engine/pipeline/refine.exec.d.ts +2 -0
- package/dist/engine/pipeline/refine.exec.js +13 -2
- package/dist/engine/pipeline/refine.exec.js.map +1 -1
- package/dist/engine/pipeline/research.exec.d.ts +3 -0
- package/dist/engine/pipeline/research.exec.js +74 -5
- package/dist/engine/pipeline/research.exec.js.map +1 -1
- package/dist/engine/pipeline/review.exec.js +23 -0
- package/dist/engine/pipeline/review.exec.js.map +1 -1
- package/dist/engine/pipeline/specify.exec.d.ts +1 -0
- package/dist/engine/pipeline/specify.exec.js +114 -44
- package/dist/engine/pipeline/specify.exec.js.map +1 -1
- package/dist/flavours/data-analysis/core/refiner.md +28 -1
- package/dist/flavours/data-analysis/core/researcher.md +30 -11
- package/dist/flavours/data-analysis/researchers/gaps.md +59 -0
- package/dist/flavours/game-dev/core/refiner.md +28 -1
- package/dist/flavours/game-dev/core/researcher.md +30 -11
- package/dist/flavours/game-dev/researchers/gaps.md +59 -0
- package/dist/flavours/legal-drafting/core/refiner.md +28 -1
- package/dist/flavours/legal-drafting/core/researcher.md +30 -11
- package/dist/flavours/legal-drafting/researchers/gaps.md +59 -0
- package/dist/flavours/machine-learning/core/refiner.md +28 -1
- package/dist/flavours/machine-learning/core/researcher.md +30 -11
- package/dist/flavours/machine-learning/researchers/gaps.md +59 -0
- package/dist/flavours/mobile-app/core/refiner.md +28 -1
- package/dist/flavours/mobile-app/core/researcher.md +30 -11
- package/dist/flavours/mobile-app/researchers/gaps.md +59 -0
- package/dist/flavours/music-composition/core/refiner.md +28 -1
- package/dist/flavours/music-composition/core/researcher.md +30 -11
- package/dist/flavours/music-composition/researchers/gaps.md +59 -0
- package/dist/flavours/novel-writing/core/refiner.md +28 -1
- package/dist/flavours/novel-writing/core/researcher.md +30 -11
- package/dist/flavours/novel-writing/researchers/gaps.md +59 -0
- package/dist/flavours/screenwriting/core/refiner.md +28 -1
- package/dist/flavours/screenwriting/core/researcher.md +30 -11
- package/dist/flavours/screenwriting/researchers/gaps.md +59 -0
- package/dist/flavours/security-audit/core/refiner.md +28 -1
- package/dist/flavours/security-audit/core/researcher.md +30 -11
- package/dist/flavours/security-audit/researchers/gaps.md +59 -0
- package/dist/flavours/software-engineering/core/builder.md +2 -0
- package/dist/flavours/software-engineering/core/refiner.md +28 -1
- package/dist/flavours/software-engineering/core/researcher.md +30 -11
- package/dist/flavours/software-engineering/core/reviewer.md +2 -0
- package/dist/flavours/software-engineering/flavour.json +7 -0
- package/dist/flavours/software-engineering/researchers/gaps.md +59 -0
- package/dist/flavours/technical-writing/core/refiner.md +28 -1
- package/dist/flavours/technical-writing/core/researcher.md +30 -11
- package/dist/flavours/technical-writing/researchers/gaps.md +59 -0
- package/dist/flavours/test-suite/core/refiner.md +28 -1
- package/dist/flavours/test-suite/core/researcher.md +30 -11
- package/dist/flavours/test-suite/researchers/gaps.md +59 -0
- package/dist/flavours/translation/core/refiner.md +28 -1
- package/dist/flavours/translation/core/researcher.md +30 -11
- package/dist/flavours/translation/researchers/gaps.md +59 -0
- package/dist/flavours/web-game/core/builder.md +123 -0
- package/dist/flavours/web-game/core/reviewer.md +159 -0
- package/dist/flavours/web-game/flavour.json +9 -0
- package/dist/flavours/web-ui/core/builder.md +117 -0
- package/dist/flavours/web-ui/core/reviewer.md +155 -0
- package/dist/flavours/web-ui/flavour.json +10 -0
- package/dist/plugin/visual-tools/plugin.json +4 -0
- package/dist/plugin/visual-tools/skills/a11y-audit/SKILL.md +57 -0
- package/dist/plugin/visual-tools/skills/agent-browser/SKILL.md +56 -0
- package/dist/plugin/visual-tools/skills/agent-browser/references/viewports.md +17 -0
- package/dist/plugin/visual-tools/skills/canvas-screenshot/SKILL.md +84 -0
- package/dist/plugin/visual-tools/skills/css-audit/SKILL.md +50 -0
- package/dist/plugin/visual-tools/skills/lighthouse/SKILL.md +58 -0
- package/dist/plugin/visual-tools/skills/shader-validate/SKILL.md +77 -0
- package/dist/plugin/visual-tools/skills/visual-diff/SKILL.md +68 -0
- package/dist/shapes/detect.d.ts +8 -0
- package/dist/shapes/detect.js +87 -0
- package/dist/shapes/detect.js.map +1 -0
- package/dist/shapes/game-visual.json +8 -0
- package/dist/shapes/print-layout.json +8 -0
- package/dist/shapes/web-visual.json +9 -0
- package/dist/stores/budget.js +2 -1
- package/dist/stores/budget.js.map +1 -1
- package/dist/stores/feedback.format.d.ts +3 -0
- package/dist/stores/feedback.format.js +62 -0
- package/dist/stores/feedback.format.js.map +1 -0
- package/dist/stores/feedback.parse.d.ts +2 -0
- package/dist/stores/feedback.parse.js +121 -0
- package/dist/stores/feedback.parse.js.map +1 -0
- package/dist/stores/feedback.verdict.d.ts +2 -4
- package/dist/stores/feedback.verdict.js +7 -175
- package/dist/stores/feedback.verdict.js.map +1 -1
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +1 -2
- package/dist/stores/index.js.map +1 -1
- package/dist/stores/state.d.ts +4 -0
- package/dist/stores/state.js +37 -5
- package/dist/stores/state.js.map +1 -1
- package/dist/stores/trajectory.d.ts +2 -3
- package/dist/stores/trajectory.js +6 -7
- package/dist/stores/trajectory.js.map +1 -1
- package/dist/types.d.ts +11 -1
- package/dist/utils/atomic-write.d.ts +6 -0
- package/dist/utils/atomic-write.js +62 -0
- package/dist/utils/atomic-write.js.map +1 -0
- package/package.json +2 -2
|
@@ -37,8 +37,10 @@ exports.invokeResearcher = exports.assembleInputSections = void 0;
|
|
|
37
37
|
const fs = __importStar(require("node:fs"));
|
|
38
38
|
const path = __importStar(require("node:path"));
|
|
39
39
|
const ensemble_exec_1 = require("./ensemble.exec");
|
|
40
|
+
const claude_exec_1 = require("../claude/claude.exec");
|
|
40
41
|
const agent_registry_1 = require("../discovery/agent.registry");
|
|
41
42
|
const flavour_resolve_1 = require("../discovery/flavour.resolve");
|
|
43
|
+
const pipeline_shared_1 = require("./pipeline.shared");
|
|
42
44
|
// ---------------------------------------------------------------------------
|
|
43
45
|
// Shared prompt helpers
|
|
44
46
|
// ---------------------------------------------------------------------------
|
|
@@ -60,6 +62,51 @@ const assembleInputSections = (specMd, constraintsMd, tasteMd) => {
|
|
|
60
62
|
};
|
|
61
63
|
exports.assembleInputSections = assembleInputSections;
|
|
62
64
|
// ---------------------------------------------------------------------------
|
|
65
|
+
// Research agenda
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
67
|
+
const AGENDA_SYSTEM_PROMPT = `You are a research agenda planner. Given a specification and a domain gap checklist, identify what the spec is missing or vague about, and produce a focused research agenda.
|
|
68
|
+
|
|
69
|
+
Your output is a markdown research agenda that will be given to research specialists to focus their web searches. Be specific — name the gaps, suggest search terms, and prioritize by impact.
|
|
70
|
+
|
|
71
|
+
If prior research findings are provided, note which areas are already well-covered and should not be re-researched unless contradictory information is found. Focus the agenda on unexplored territory.
|
|
72
|
+
|
|
73
|
+
Keep your response concise — under 500 words. No preamble.`;
|
|
74
|
+
const buildAgendaUserPrompt = (specMd, gapsMd, existingResearchMd, changelogMd) => {
|
|
75
|
+
const sections = [];
|
|
76
|
+
sections.push("## spec.md\n");
|
|
77
|
+
sections.push(specMd);
|
|
78
|
+
sections.push("");
|
|
79
|
+
if (gapsMd) {
|
|
80
|
+
sections.push("## Domain Gap Checklist\n");
|
|
81
|
+
sections.push(gapsMd);
|
|
82
|
+
sections.push("");
|
|
83
|
+
}
|
|
84
|
+
if (existingResearchMd) {
|
|
85
|
+
sections.push("## Prior Research (already conducted)\n");
|
|
86
|
+
sections.push(existingResearchMd);
|
|
87
|
+
sections.push("");
|
|
88
|
+
}
|
|
89
|
+
if (changelogMd) {
|
|
90
|
+
sections.push("## Spec Changelog (recommendations already incorporated)\n");
|
|
91
|
+
sections.push(changelogMd);
|
|
92
|
+
sections.push("");
|
|
93
|
+
}
|
|
94
|
+
sections.push("Produce a focused research agenda identifying gaps and specific questions for specialists to investigate.");
|
|
95
|
+
return sections.join("\n");
|
|
96
|
+
};
|
|
97
|
+
const buildResearchAgenda = async (specMd, gapsMd, existingResearchMd, changelogMd, model, timeoutMinutes) => {
|
|
98
|
+
const result = await (0, claude_exec_1.invokeClaude)({
|
|
99
|
+
systemPrompt: AGENDA_SYSTEM_PROMPT,
|
|
100
|
+
userPrompt: buildAgendaUserPrompt(specMd, gapsMd, existingResearchMd, changelogMd),
|
|
101
|
+
model: "sonnet",
|
|
102
|
+
allowedTools: [],
|
|
103
|
+
cwd: process.cwd(),
|
|
104
|
+
timeoutMs: Math.min(timeoutMinutes * 60 * 1000, 3 * 60 * 1000), // cap at 3 min
|
|
105
|
+
onStderr: (0, pipeline_shared_1.createStderrHandler)("agenda"),
|
|
106
|
+
});
|
|
107
|
+
return result.result ?? "";
|
|
108
|
+
};
|
|
109
|
+
// ---------------------------------------------------------------------------
|
|
63
110
|
// Prompt construction
|
|
64
111
|
// ---------------------------------------------------------------------------
|
|
65
112
|
/** Build a research specialist system prompt from shared context + overlay. */
|
|
@@ -67,13 +114,19 @@ const buildResearchSpecialistPrompt = (context, overlay) => {
|
|
|
67
114
|
return `${context}\n\n${overlay}`;
|
|
68
115
|
};
|
|
69
116
|
/** Assemble the user prompt for a research specialist. */
|
|
70
|
-
const assembleSpecialistUserPrompt = (specMd, constraintsMd, tasteMd) => {
|
|
117
|
+
const assembleSpecialistUserPrompt = (specMd, constraintsMd, tasteMd, agenda) => {
|
|
71
118
|
const sections = (0, exports.assembleInputSections)(specMd, constraintsMd, tasteMd);
|
|
119
|
+
if (agenda) {
|
|
120
|
+
sections.push("## Research Agenda\n");
|
|
121
|
+
sections.push("The following gaps and questions were identified. Focus your research on these areas:\n");
|
|
122
|
+
sections.push(agenda);
|
|
123
|
+
sections.push("");
|
|
124
|
+
}
|
|
72
125
|
sections.push("Research this spec thoroughly using your web tools. Produce a markdown research report as your response.");
|
|
73
126
|
return sections.join("\n");
|
|
74
127
|
};
|
|
75
128
|
/** Assemble the user prompt for the research synthesizer. */
|
|
76
|
-
const assembleSynthesizerUserPrompt = (specMd, buildDir, drafts) => {
|
|
129
|
+
const assembleSynthesizerUserPrompt = (specMd, buildDir, drafts, existingResearchMd, changelogMd, iterationNumber) => {
|
|
77
130
|
const sections = [];
|
|
78
131
|
sections.push("## spec.md\n");
|
|
79
132
|
sections.push(specMd);
|
|
@@ -84,14 +137,28 @@ const assembleSynthesizerUserPrompt = (specMd, buildDir, drafts) => {
|
|
|
84
137
|
sections.push(draft);
|
|
85
138
|
sections.push("\n---\n");
|
|
86
139
|
}
|
|
140
|
+
if (existingResearchMd) {
|
|
141
|
+
sections.push("## Existing research.md (to be updated, not replaced)\n");
|
|
142
|
+
sections.push(existingResearchMd);
|
|
143
|
+
sections.push("");
|
|
144
|
+
}
|
|
145
|
+
if (changelogMd) {
|
|
146
|
+
sections.push("## spec.changelog.md (recommendations already acted on)\n");
|
|
147
|
+
sections.push(changelogMd);
|
|
148
|
+
sections.push("");
|
|
149
|
+
}
|
|
150
|
+
sections.push("## Current Iteration\n");
|
|
151
|
+
sections.push(`Iteration: ${iterationNumber}`);
|
|
152
|
+
sections.push("");
|
|
87
153
|
sections.push("## Output\n");
|
|
88
|
-
sections.push(`Write the
|
|
154
|
+
sections.push(`Write the ${existingResearchMd ? "updated" : "new"} research report to: ${buildDir}/research.md`);
|
|
89
155
|
sections.push("Use the Write tool to create the file.");
|
|
90
156
|
return sections.join("\n");
|
|
91
157
|
};
|
|
92
158
|
const invokeResearcher = async (specMd, constraintsMd, tasteMd, config) => {
|
|
93
159
|
const registry = (0, agent_registry_1.buildAgentRegistry)((0, flavour_resolve_1.resolveFlavour)(config.flavour));
|
|
94
160
|
const context = registry.getContext("researchers") ?? "";
|
|
161
|
+
const gapsMd = registry.getGaps("researchers");
|
|
95
162
|
const allSpecialists = registry.getSpecialists("researchers");
|
|
96
163
|
// Quick mode: use only the first specialist (ecosystem by default — most broadly useful)
|
|
97
164
|
// Deep mode: use all specialists
|
|
@@ -100,16 +167,18 @@ const invokeResearcher = async (specMd, constraintsMd, tasteMd, config) => {
|
|
|
100
167
|
: allSpecialists.length > 0
|
|
101
168
|
? [allSpecialists[0]]
|
|
102
169
|
: [];
|
|
170
|
+
// Build a research agenda before dispatching specialists
|
|
171
|
+
const agenda = await buildResearchAgenda(specMd, gapsMd, config.existingResearchMd, config.changelogMd, config.model, config.timeoutMinutes);
|
|
103
172
|
return (0, ensemble_exec_1.invokeEnsemble)({
|
|
104
173
|
label: "Researching",
|
|
105
174
|
specialists,
|
|
106
175
|
isStructured: false,
|
|
107
176
|
buildSpecialistPrompt: (overlay) => buildResearchSpecialistPrompt(context, overlay),
|
|
108
|
-
specialistUserPrompt: assembleSpecialistUserPrompt(specMd, constraintsMd, tasteMd),
|
|
177
|
+
specialistUserPrompt: assembleSpecialistUserPrompt(specMd, constraintsMd, tasteMd, agenda || null),
|
|
109
178
|
specialistSchema: "", // unused when isStructured is false
|
|
110
179
|
specialistTools: ["WebFetch", "WebSearch", "Bash"],
|
|
111
180
|
synthesizerPrompt: registry.getCorePrompt("researcher.md"),
|
|
112
|
-
buildSynthesizerUserPrompt: (drafts) => assembleSynthesizerUserPrompt(specMd, config.buildDir, drafts),
|
|
181
|
+
buildSynthesizerUserPrompt: (drafts) => assembleSynthesizerUserPrompt(specMd, config.buildDir, drafts, config.existingResearchMd, config.changelogMd, config.iterationNumber),
|
|
113
182
|
synthesizerTools: ["Write"],
|
|
114
183
|
model: config.model,
|
|
115
184
|
timeoutMinutes: config.timeoutMinutes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"research.exec.js","sourceRoot":"","sources":["../../../src/engine/pipeline/research.exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA6B;AAC7B,gDAAiC;AAEjC,mDAAgD;AAChD,gEAAgE;AAChE,kEAA6D;
|
|
1
|
+
{"version":3,"file":"research.exec.js","sourceRoot":"","sources":["../../../src/engine/pipeline/research.exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA6B;AAC7B,gDAAiC;AAEjC,mDAAgD;AAChD,uDAAoD;AACpD,gEAAgE;AAChE,kEAA6D;AAC7D,uDAAuD;AAEvD,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E,wFAAwF;AACjF,MAAM,qBAAqB,GAAG,CAAC,MAAc,EAAE,aAAqB,EAAE,OAAsB,EAAY,EAAE;IAC/G,MAAM,QAAQ,GAAa,EAAE,CAAA;IAC7B,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;IAC7B,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACjB,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;IACpC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACjB,IAAI,OAAO,EAAE,CAAC;QACZ,QAAQ,CA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C,CAAA;AACJ,CAAC,CAAA;AA/DY,QAAA,gBAAgB,oBA+D5B"}
|
|
@@ -43,6 +43,8 @@ const plugin_scan_1 = require("../discovery/plugin.scan");
|
|
|
43
43
|
const agent_registry_1 = require("../discovery/agent.registry");
|
|
44
44
|
const flavour_resolve_1 = require("../discovery/flavour.resolve");
|
|
45
45
|
const pipeline_shared_1 = require("./pipeline.shared");
|
|
46
|
+
const state_1 = require("../../stores/state");
|
|
47
|
+
const detect_1 = require("../../shapes/detect");
|
|
46
48
|
const assembleUserPrompt = (config, phase, checkpointTag) => {
|
|
47
49
|
const sections = [];
|
|
48
50
|
sections.push("## Phase Spec\n");
|
|
@@ -62,6 +64,27 @@ const assembleUserPrompt = (config, phase, checkpointTag) => {
|
|
|
62
64
|
sections.push("## constraints.md\n");
|
|
63
65
|
sections.push(fs.readFileSync(config.constraintsPath, "utf-8"));
|
|
64
66
|
sections.push("");
|
|
67
|
+
// Inject design.md
|
|
68
|
+
(0, pipeline_shared_1.appendDesign)(sections, config);
|
|
69
|
+
// Inject reviewer context from matched shapes
|
|
70
|
+
const matchedShapeNames = (0, state_1.getMatchedShapes)(config.buildDir);
|
|
71
|
+
if (matchedShapeNames.length > 0) {
|
|
72
|
+
const allDefs = (0, detect_1.loadShapeDefinitions)();
|
|
73
|
+
const matchedDefs = allDefs.filter((d) => matchedShapeNames.includes(d.name));
|
|
74
|
+
if (matchedDefs.length > 0) {
|
|
75
|
+
sections.push("## Visual Design Review Context\n");
|
|
76
|
+
sections.push("The following visual design heuristics apply to this phase:\n");
|
|
77
|
+
for (const def of matchedDefs) {
|
|
78
|
+
sections.push(`### ${def.name}\n`);
|
|
79
|
+
sections.push(def.reviewerContext);
|
|
80
|
+
sections.push("");
|
|
81
|
+
}
|
|
82
|
+
sections.push("**Review rules for design.md:**");
|
|
83
|
+
sections.push("- Hard token violations (specific values with imperative language) → severity: blocking");
|
|
84
|
+
sections.push("- Soft guidance deviations (directional language) → severity: suggestion");
|
|
85
|
+
sections.push("");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
65
88
|
return sections.join("\n");
|
|
66
89
|
};
|
|
67
90
|
const invokeReviewer = async (config, phase, checkpointTag) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.exec.js","sourceRoot":"","sources":["../../../src/engine/pipeline/review.exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA6B;AAE7B,uDAAoD;AACpD,6DAAiE;AACjE,mCAAmC;AACnC,oEAA4D;AAC5D,0DAA4D;AAC5D,gEAAgE;AAChE,kEAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"review.exec.js","sourceRoot":"","sources":["../../../src/engine/pipeline/review.exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA6B;AAE7B,uDAAoD;AACpD,6DAAiE;AACjE,mCAAmC;AACnC,oEAA4D;AAC5D,0DAA4D;AAC5D,gEAAgE;AAChE,kEAA6D;AAC7D,uDAA8F;AAC9F,8CAAqD;AACrD,gDAA0D;AAE1D,MAAM,kBAAkB,GAAG,CACzB,MAAuB,EACvB,KAAgB,EAChB,aAAqB,EACb,EAAE;IACV,MAAM,QAAQ,GAAa,EAAE,CAAA;IAE7B,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAChC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;IACvD,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAEjB,MAAM,IAAI,GAAG,IAAA,aAAO,EAAC,aAAa,CAAC,CAAA;IACnC,QAAQ,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAA;IACnD,IAAI,IAAI,EAAE,CAAC;QACT,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACxB,QAAQ,CAAC,IAAI,CAA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A;QAC3C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAA;IAC5B,CAAC;YAAS,CAAC;QACT,KAAK,EAAE,CAAA;QACP,IAAA,+BAAiB,EAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;IACxC,CAAC;AACH,CAAC,CAAA;AA1BY,QAAA,cAAc,kBA0B1B"}
|
|
@@ -105,6 +105,24 @@ const SPEC_SPECIALIST_SCHEMA = JSON.stringify({
|
|
|
105
105
|
items: { type: "string" },
|
|
106
106
|
description: "Things the other specialists might miss",
|
|
107
107
|
},
|
|
108
|
+
design: {
|
|
109
|
+
type: ["object", "null"],
|
|
110
|
+
properties: {
|
|
111
|
+
hardTokens: { type: "array", items: { type: "string" } },
|
|
112
|
+
softGuidance: { type: "array", items: { type: "string" } },
|
|
113
|
+
featureVisuals: {
|
|
114
|
+
type: "array",
|
|
115
|
+
items: {
|
|
116
|
+
type: "object",
|
|
117
|
+
properties: {
|
|
118
|
+
feature: { type: "string" },
|
|
119
|
+
criteria: { type: "array", items: { type: "string" } },
|
|
120
|
+
},
|
|
121
|
+
required: ["feature", "criteria"],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
108
126
|
},
|
|
109
127
|
required: ["perspective", "spec", "constraints", "tradeoffs", "concerns"],
|
|
110
128
|
});
|
|
@@ -132,9 +150,90 @@ const buildSpecSpecialistPrompt = (overlay) => {
|
|
|
132
150
|
].join("\n");
|
|
133
151
|
return `${overlay}${jsonDirective}`;
|
|
134
152
|
};
|
|
135
|
-
/** Assemble the user prompt for a spec specialist —
|
|
136
|
-
const assembleSpecialistUserPrompt = (shapeMd) => {
|
|
137
|
-
|
|
153
|
+
/** Assemble the user prompt for a spec specialist — shape content plus design context. */
|
|
154
|
+
const assembleSpecialistUserPrompt = (shapeMd, config) => {
|
|
155
|
+
const sections = [];
|
|
156
|
+
sections.push(`## shape.md\n\n${shapeMd}`);
|
|
157
|
+
sections.push("");
|
|
158
|
+
// Inject design.md for visual specialist context
|
|
159
|
+
const ridgelineDir = path.join(config.buildDir, "..", "..");
|
|
160
|
+
const projectDesignPath = path.join(ridgelineDir, "design.md");
|
|
161
|
+
const featureDesignPath = path.join(config.buildDir, "design.md");
|
|
162
|
+
if (fs.existsSync(projectDesignPath)) {
|
|
163
|
+
sections.push("## Project Design\n");
|
|
164
|
+
sections.push(fs.readFileSync(projectDesignPath, "utf-8"));
|
|
165
|
+
sections.push("");
|
|
166
|
+
}
|
|
167
|
+
if (fs.existsSync(featureDesignPath)) {
|
|
168
|
+
sections.push("## Feature Design\n");
|
|
169
|
+
sections.push(fs.readFileSync(featureDesignPath, "utf-8"));
|
|
170
|
+
sections.push("");
|
|
171
|
+
}
|
|
172
|
+
if (config.matchedShapes.length > 0) {
|
|
173
|
+
sections.push("## Matched Visual Shape Categories\n");
|
|
174
|
+
sections.push(config.matchedShapes.join(", "));
|
|
175
|
+
sections.push("");
|
|
176
|
+
}
|
|
177
|
+
sections.push("IMPORTANT: Respond with ONLY a JSON object. No prose, no markdown, no commentary. Just the JSON.");
|
|
178
|
+
return sections.join("\n");
|
|
179
|
+
};
|
|
180
|
+
/** Format a single specialist draft into prompt sections. */
|
|
181
|
+
const formatDraftProposal = (sections, perspective, draft) => {
|
|
182
|
+
(0, pipeline_shared_1.formatProposalHeading)(sections, perspective, draft.tradeoffs);
|
|
183
|
+
sections.push(`**Concerns:** ${draft.concerns.join("; ")}\n`);
|
|
184
|
+
sections.push("**Spec Proposal:**");
|
|
185
|
+
sections.push(`- Title: ${draft.spec.title}`);
|
|
186
|
+
sections.push(`- Overview: ${draft.spec.overview}`);
|
|
187
|
+
sections.push(`- Features (${draft.spec.features.length}):`);
|
|
188
|
+
for (const feature of draft.spec.features) {
|
|
189
|
+
sections.push(` - **${feature.name}**: ${feature.description}`);
|
|
190
|
+
sections.push(` Criteria: ${feature.acceptanceCriteria.join("; ")}`);
|
|
191
|
+
}
|
|
192
|
+
sections.push(`- In scope: ${draft.spec.scopeBoundaries.inScope.join("; ")}`);
|
|
193
|
+
sections.push(`- Out of scope: ${draft.spec.scopeBoundaries.outOfScope.join("; ")}`);
|
|
194
|
+
sections.push("");
|
|
195
|
+
sections.push("**Constraints Proposal:**");
|
|
196
|
+
sections.push(`- Language: ${draft.constraints.language}, Runtime: ${draft.constraints.runtime}`);
|
|
197
|
+
if (draft.constraints.framework)
|
|
198
|
+
sections.push(`- Framework: ${draft.constraints.framework}`);
|
|
199
|
+
sections.push(`- Directory: ${draft.constraints.directoryConventions}`);
|
|
200
|
+
sections.push(`- Naming: ${draft.constraints.namingConventions}`);
|
|
201
|
+
if (draft.constraints.apiStyle)
|
|
202
|
+
sections.push(`- API style: ${draft.constraints.apiStyle}`);
|
|
203
|
+
if (draft.constraints.database)
|
|
204
|
+
sections.push(`- Database: ${draft.constraints.database}`);
|
|
205
|
+
sections.push(`- Dependencies: ${draft.constraints.dependencies.join(", ")}`);
|
|
206
|
+
sections.push(`- Check command: \`${draft.constraints.checkCommand}\``);
|
|
207
|
+
sections.push("");
|
|
208
|
+
if (draft.taste) {
|
|
209
|
+
sections.push("**Taste Proposal:**");
|
|
210
|
+
if (draft.taste.codeStyle.length > 0)
|
|
211
|
+
sections.push(`- Code style: ${draft.taste.codeStyle.join("; ")}`);
|
|
212
|
+
if (draft.taste.testPatterns.length > 0)
|
|
213
|
+
sections.push(`- Test patterns: ${draft.taste.testPatterns.join("; ")}`);
|
|
214
|
+
if (draft.taste.commitFormat)
|
|
215
|
+
sections.push(`- Commit format: ${draft.taste.commitFormat}`);
|
|
216
|
+
if (draft.taste.commentStyle)
|
|
217
|
+
sections.push(`- Comment style: ${draft.taste.commentStyle}`);
|
|
218
|
+
sections.push("");
|
|
219
|
+
}
|
|
220
|
+
if (draft.design) {
|
|
221
|
+
sections.push("**Design Proposal:**");
|
|
222
|
+
if (draft.design.hardTokens && draft.design.hardTokens.length > 0) {
|
|
223
|
+
sections.push(`- Hard tokens: ${draft.design.hardTokens.join("; ")}`);
|
|
224
|
+
}
|
|
225
|
+
if (draft.design.softGuidance && draft.design.softGuidance.length > 0) {
|
|
226
|
+
sections.push(`- Soft guidance: ${draft.design.softGuidance.join("; ")}`);
|
|
227
|
+
}
|
|
228
|
+
if (draft.design.featureVisuals && draft.design.featureVisuals.length > 0) {
|
|
229
|
+
sections.push("- Feature visuals:");
|
|
230
|
+
for (const fv of draft.design.featureVisuals) {
|
|
231
|
+
sections.push(` - **${fv.feature}**: ${fv.criteria.join("; ")}`);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
sections.push("");
|
|
235
|
+
}
|
|
236
|
+
sections.push("---\n");
|
|
138
237
|
};
|
|
139
238
|
/** Assemble the user prompt for the specifier synthesizer. */
|
|
140
239
|
const assembleSynthesizerUserPrompt = (shapeMd, buildDir, drafts) => {
|
|
@@ -144,45 +243,7 @@ const assembleSynthesizerUserPrompt = (shapeMd, buildDir, drafts) => {
|
|
|
144
243
|
sections.push("");
|
|
145
244
|
sections.push("## Specialist Proposals\n");
|
|
146
245
|
for (const { perspective, draft } of drafts) {
|
|
147
|
-
(
|
|
148
|
-
sections.push(`**Concerns:** ${draft.concerns.join("; ")}\n`);
|
|
149
|
-
sections.push("**Spec Proposal:**");
|
|
150
|
-
sections.push(`- Title: ${draft.spec.title}`);
|
|
151
|
-
sections.push(`- Overview: ${draft.spec.overview}`);
|
|
152
|
-
sections.push(`- Features (${draft.spec.features.length}):`);
|
|
153
|
-
for (const feature of draft.spec.features) {
|
|
154
|
-
sections.push(` - **${feature.name}**: ${feature.description}`);
|
|
155
|
-
sections.push(` Criteria: ${feature.acceptanceCriteria.join("; ")}`);
|
|
156
|
-
}
|
|
157
|
-
sections.push(`- In scope: ${draft.spec.scopeBoundaries.inScope.join("; ")}`);
|
|
158
|
-
sections.push(`- Out of scope: ${draft.spec.scopeBoundaries.outOfScope.join("; ")}`);
|
|
159
|
-
sections.push("");
|
|
160
|
-
sections.push("**Constraints Proposal:**");
|
|
161
|
-
sections.push(`- Language: ${draft.constraints.language}, Runtime: ${draft.constraints.runtime}`);
|
|
162
|
-
if (draft.constraints.framework)
|
|
163
|
-
sections.push(`- Framework: ${draft.constraints.framework}`);
|
|
164
|
-
sections.push(`- Directory: ${draft.constraints.directoryConventions}`);
|
|
165
|
-
sections.push(`- Naming: ${draft.constraints.namingConventions}`);
|
|
166
|
-
if (draft.constraints.apiStyle)
|
|
167
|
-
sections.push(`- API style: ${draft.constraints.apiStyle}`);
|
|
168
|
-
if (draft.constraints.database)
|
|
169
|
-
sections.push(`- Database: ${draft.constraints.database}`);
|
|
170
|
-
sections.push(`- Dependencies: ${draft.constraints.dependencies.join(", ")}`);
|
|
171
|
-
sections.push(`- Check command: \`${draft.constraints.checkCommand}\``);
|
|
172
|
-
sections.push("");
|
|
173
|
-
if (draft.taste) {
|
|
174
|
-
sections.push("**Taste Proposal:**");
|
|
175
|
-
if (draft.taste.codeStyle.length > 0)
|
|
176
|
-
sections.push(`- Code style: ${draft.taste.codeStyle.join("; ")}`);
|
|
177
|
-
if (draft.taste.testPatterns.length > 0)
|
|
178
|
-
sections.push(`- Test patterns: ${draft.taste.testPatterns.join("; ")}`);
|
|
179
|
-
if (draft.taste.commitFormat)
|
|
180
|
-
sections.push(`- Commit format: ${draft.taste.commitFormat}`);
|
|
181
|
-
if (draft.taste.commentStyle)
|
|
182
|
-
sections.push(`- Comment style: ${draft.taste.commentStyle}`);
|
|
183
|
-
sections.push("");
|
|
184
|
-
}
|
|
185
|
-
sections.push("---\n");
|
|
246
|
+
formatDraftProposal(sections, perspective, draft);
|
|
186
247
|
}
|
|
187
248
|
sections.push("## Output Directory\n");
|
|
188
249
|
sections.push(`Write spec.md, constraints.md, and optionally taste.md to: ${buildDir}/`);
|
|
@@ -191,11 +252,20 @@ const assembleSynthesizerUserPrompt = (shapeMd, buildDir, drafts) => {
|
|
|
191
252
|
};
|
|
192
253
|
const invokeSpecifier = async (shapeMd, config) => {
|
|
193
254
|
const registry = (0, agent_registry_1.buildAgentRegistry)((0, flavour_resolve_1.resolveFlavour)(config.flavour));
|
|
255
|
+
// Get standard specialists
|
|
256
|
+
let specialists = registry.getSpecialists("specifiers");
|
|
257
|
+
// Conditionally add visual coherence specialist when visual shapes matched
|
|
258
|
+
if (config.matchedShapes.length > 0) {
|
|
259
|
+
const visualSpecialist = registry.getSpecialist("specifiers", "visual-coherence.md");
|
|
260
|
+
if (visualSpecialist) {
|
|
261
|
+
specialists = [...specialists, visualSpecialist];
|
|
262
|
+
}
|
|
263
|
+
}
|
|
194
264
|
return (0, ensemble_exec_1.invokeEnsemble)({
|
|
195
265
|
label: "Specifying",
|
|
196
|
-
specialists
|
|
266
|
+
specialists,
|
|
197
267
|
buildSpecialistPrompt: buildSpecSpecialistPrompt,
|
|
198
|
-
specialistUserPrompt: assembleSpecialistUserPrompt(shapeMd),
|
|
268
|
+
specialistUserPrompt: assembleSpecialistUserPrompt(shapeMd, config),
|
|
199
269
|
specialistSchema: SPEC_SPECIALIST_SCHEMA,
|
|
200
270
|
synthesizerPrompt: registry.getCorePrompt("specifier.md"),
|
|
201
271
|
buildSynthesizerUserPrompt: (drafts) => assembleSynthesizerUserPrompt(shapeMd, config.buildDir, drafts),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specify.exec.js","sourceRoot":"","sources":["../../../src/engine/pipeline/specify.exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA6B;AAC7B,gDAAiC;AAEjC,mDAAgD;AAChD,gEAAgE;AAChE,kEAA6D;AAC7D,uDAAyD;AAEzD,8EAA8E;AAC9E,oDAAoD;AACpD,8EAA8E;AAE9E,MAAM,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAAC;IAC5C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oCAAoC,EAAE;QAClF,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;Y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B,CAAC,CAAA;QACpF,IAAI,gBAAgB,EAAE,CAAC;YACrB,WAAW,GAAG,CAAC,GAAG,WAAW,EAAE,gBAAgB,CAAC,CAAA;QAClD,CAAC;IACH,CAAC;IAED,OAAO,IAAA,8BAAc,EAAiB;QACpC,KAAK,EAAE,YAAY;QACnB,WAAW;QAEX,qBAAqB,EAAE,yBAAyB;QAChD,oBAAoB,EAAE,4BAA4B,CAAC,OAAO,EAAE,MAAM,CAAC;QACnE,gBAAgB,EAAE,sBAAsB;QAExC,iBAAiB,EAAE,QAAQ,CAAC,aAAa,CAAC,cAAc,CAAC;QACzD,0BAA0B,EAAE,CAAC,MAAM,EAAE,EAAE,CACrC,6BAA6B,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC;QACjE,gBAAgB,EAAE,CAAC,OAAO,CAAC;QAE3B,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,YAAY,EAAE,MAAM,CAAC,YAAY;QAEjC,MAAM,EAAE,GAAG,EAAE;YACX,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,gBAAgB,CAAC;iBAC1C,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;YAC7D,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,8CAA8C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACrF,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA;AA1CY,QAAA,eAAe,mBA0C3B"}
|
|
@@ -12,10 +12,36 @@ You are the Spec Refiner for data analysis projects. You receive a spec.md and a
|
|
|
12
12
|
- **research.md** — research findings with recommendations
|
|
13
13
|
- **constraints.md** — technical constraints (do not modify these)
|
|
14
14
|
- **taste.md** (optional) — style preferences (do not modify these)
|
|
15
|
+
- **spec.changelog.md** (optional) — log of changes you made in prior iterations
|
|
15
16
|
|
|
16
17
|
## Your Task
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
You have two outputs to write:
|
|
20
|
+
|
|
21
|
+
### 1. Rewrite spec.md
|
|
22
|
+
|
|
23
|
+
Incorporate research findings into the spec. Use the Write tool to overwrite the existing spec.md file.
|
|
24
|
+
|
|
25
|
+
### 2. Write spec.changelog.md
|
|
26
|
+
|
|
27
|
+
Document what you changed and why. If spec.changelog.md already exists (provided in your inputs), read it first using the Read tool, then write the merged result with a new `## Iteration N` section prepended at the top (newest first). If it doesn't exist, create it fresh.
|
|
28
|
+
|
|
29
|
+
Structure:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
# Spec Changelog
|
|
33
|
+
|
|
34
|
+
## Iteration N
|
|
35
|
+
|
|
36
|
+
- [What changed]: [why, citing research source]
|
|
37
|
+
- [What changed]: [why, citing research source]
|
|
38
|
+
- Skipped: [recommendation not incorporated and why]
|
|
39
|
+
|
|
40
|
+
## Iteration N-1
|
|
41
|
+
(prior entries preserved)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Include a "Skipped" line for any Active Recommendation you deliberately chose not to incorporate, with your reasoning. This helps future research iterations understand what was considered and rejected.
|
|
19
45
|
|
|
20
46
|
## Refinement Guidelines
|
|
21
47
|
|
|
@@ -25,6 +51,7 @@ Rewrite spec.md incorporating research findings. Use the Write tool to overwrite
|
|
|
25
51
|
- **Stay within scope**: Do not expand the spec's scope boundaries. Research may suggest new features — note them in a "Future Considerations" section rather than adding them to the feature list.
|
|
26
52
|
- **Constraints are immutable**: Never modify constraints.md or taste.md. If research suggests a different library or approach, note it as a consideration in the spec, but don't change the constraints.
|
|
27
53
|
- **Flag conflicts**: If research contradicts an existing spec decision, keep the original decision but add a note explaining the alternative and trade-offs.
|
|
54
|
+
- **Don't repeat yourself**: Check spec.changelog.md for changes you already made in prior iterations. Don't re-apply the same change. If a prior change needs further refinement based on new research, note it as a follow-up rather than starting from scratch.
|
|
28
55
|
- **Preserve analytical intent**: Do not change what the analysis is measuring or its statistical methodology unless research shows it is invalid. The user chose their metrics deliberately.
|
|
29
56
|
- **Keep data schemas stable**: If the spec defines expected columns, types, or data shapes, do not alter them. Add validation notes instead.
|
|
30
57
|
- **Note scale implications**: If research reveals performance concerns at the spec's data scale, add a performance note rather than changing the approach.
|
|
@@ -12,39 +12,56 @@ You receive:
|
|
|
12
12
|
|
|
13
13
|
- The current **spec.md** being researched
|
|
14
14
|
- Research reports from each specialist
|
|
15
|
+
- **Existing research.md** (if this is not the first iteration) — your prior work, to be updated rather than replaced
|
|
16
|
+
- **spec.changelog.md** (if it exists) — a log of changes the refiner already made to spec.md based on prior recommendations
|
|
17
|
+
- **Current iteration number**
|
|
15
18
|
|
|
16
19
|
## Your Task
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
### First Iteration (no existing research.md)
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
Write a new `research.md` file to the build directory using the Write tool. Structure it according to the Output Structure below.
|
|
24
|
+
|
|
25
|
+
### Subsequent Iterations (existing research.md provided)
|
|
21
26
|
|
|
22
|
-
|
|
27
|
+
You are updating your prior research. The existing research.md contains findings from previous iterations that must be preserved.
|
|
28
|
+
|
|
29
|
+
1. **Review what's already known**: Read the existing research.md findings and the spec.changelog.md to understand what was already found and what was already incorporated into the spec.
|
|
30
|
+
2. **Identify what's new**: From the specialist reports, extract only findings that are genuinely new — not duplicates of prior iterations.
|
|
31
|
+
3. **Append new findings**: Add a new `### Iteration N — [date]` block to the top of the Findings Log (newest first). Only include new findings in this block.
|
|
32
|
+
4. **Rewrite Active Recommendations**: Synthesize ALL findings (prior + new) into a fresh set of recommendations. Remove recommendations that spec.changelog.md shows were already incorporated. Focus on what still needs attention.
|
|
33
|
+
5. **Merge sources**: Add any new URLs/citations to the Sources section.
|
|
34
|
+
6. **Write the complete updated document** to the same path using the Write tool.
|
|
35
|
+
|
|
36
|
+
## Output Structure
|
|
23
37
|
|
|
24
38
|
```markdown
|
|
25
39
|
# Research Findings
|
|
26
40
|
|
|
27
|
-
> Research
|
|
41
|
+
> Research for spec: [spec title]
|
|
42
|
+
|
|
43
|
+
## Active Recommendations
|
|
28
44
|
|
|
29
|
-
|
|
45
|
+
Bullet list of the most impactful recommendations that have NOT yet been incorporated into the spec. Rewritten each iteration to reflect the full picture. Each recommendation should be one sentence, specific enough to act on.
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
## Findings Log
|
|
32
48
|
|
|
33
|
-
|
|
49
|
+
### Iteration N — [date]
|
|
34
50
|
|
|
35
|
-
|
|
51
|
+
#### [Topic/Theme]
|
|
36
52
|
|
|
37
53
|
**Source:** [URL or citation]
|
|
38
54
|
**Perspective:** [which specialist found this]
|
|
39
55
|
**Relevance:** [why this matters to the spec]
|
|
40
56
|
**Recommendation:** [what should change in the spec]
|
|
41
57
|
|
|
42
|
-
### [
|
|
43
|
-
|
|
58
|
+
### Iteration N-1 — [date]
|
|
59
|
+
|
|
60
|
+
(prior findings preserved exactly as written)
|
|
44
61
|
|
|
45
62
|
## Sources
|
|
46
63
|
|
|
47
|
-
Numbered list of all URLs and citations
|
|
64
|
+
Numbered list of all URLs and citations across all iterations.
|
|
48
65
|
```
|
|
49
66
|
|
|
50
67
|
## Synthesis Guidelines
|
|
@@ -55,6 +72,8 @@ Numbered list of all URLs and citations referenced above.
|
|
|
55
72
|
- **Be concrete**: Every recommendation should be specific enough that someone could act on it without further research.
|
|
56
73
|
- **Preserve sources**: Always include the URL or citation. The user needs to verify your work.
|
|
57
74
|
- **Stay scoped**: Only include findings relevant to the spec. Don't pad with tangentially related material.
|
|
75
|
+
- **Don't re-recommend the incorporated**: If spec.changelog.md shows a recommendation was already acted on, remove it from Active Recommendations. Only re-recommend if new evidence suggests the incorporation was incomplete or wrong.
|
|
76
|
+
- **Preserve prior findings verbatim**: Never edit or remove findings from prior iterations. The Findings Log is append-only.
|
|
58
77
|
- **Prioritize correctness**: For data analysis, statistical validity outranks performance. Flag any spec assumptions that lack statistical grounding.
|
|
59
78
|
- **Surface data shape concerns**: If research reveals that the planned analytical approach may not suit the data's distribution or scale, elevate this to a key recommendation.
|
|
60
79
|
- **Note reproducibility**: Highlight findings that affect whether the analysis can be reliably re-run with updated data.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Domain Gap Checklist — Data Analysis
|
|
2
|
+
|
|
3
|
+
Before searching, evaluate the spec against these common gaps. Focus your research on areas where the spec is silent or vague.
|
|
4
|
+
|
|
5
|
+
## Data Sources
|
|
6
|
+
|
|
7
|
+
- Ingestion format and schema documented (CSV, JSON, API, DB)?
|
|
8
|
+
- Update frequency and freshness requirements specified?
|
|
9
|
+
- Data volume and growth projections estimated?
|
|
10
|
+
- Source reliability and quality track record assessed?
|
|
11
|
+
|
|
12
|
+
## Data Quality
|
|
13
|
+
|
|
14
|
+
- Missing value handling strategy defined?
|
|
15
|
+
- Outlier detection and treatment rules specified?
|
|
16
|
+
- Validation rules and data type constraints documented?
|
|
17
|
+
- Cleaning and transformation steps reproducible?
|
|
18
|
+
|
|
19
|
+
## Pipeline Architecture
|
|
20
|
+
|
|
21
|
+
- Batch vs streaming processing decision made?
|
|
22
|
+
- Scheduling and orchestration tool specified?
|
|
23
|
+
- Idempotency guarantees for re-runs?
|
|
24
|
+
- Failure handling and retry logic documented?
|
|
25
|
+
|
|
26
|
+
## Storage & Format
|
|
27
|
+
|
|
28
|
+
- File formats chosen for each pipeline stage?
|
|
29
|
+
- Database or warehouse selection justified?
|
|
30
|
+
- Partitioning and indexing strategy for query performance?
|
|
31
|
+
- Retention policy and archival rules defined?
|
|
32
|
+
|
|
33
|
+
## Visualization
|
|
34
|
+
|
|
35
|
+
- Chart types and visual encodings appropriate for the data?
|
|
36
|
+
- Interactivity requirements specified (filters, drill-down, tooltips)?
|
|
37
|
+
- Accessibility of visualizations (alt text, colorblind-safe palettes)?
|
|
38
|
+
- Export and sharing formats documented?
|
|
39
|
+
|
|
40
|
+
## Statistical Methods
|
|
41
|
+
|
|
42
|
+
- Assumptions stated and validated for chosen methods?
|
|
43
|
+
- Significance levels and confidence intervals specified?
|
|
44
|
+
- Bias sources identified and mitigation planned?
|
|
45
|
+
- Sample size and power analysis performed?
|
|
46
|
+
|
|
47
|
+
## Reproducibility
|
|
48
|
+
|
|
49
|
+
- Data and code versioning strategy in place?
|
|
50
|
+
- Environment and dependency management documented?
|
|
51
|
+
- Random seeds set for stochastic processes?
|
|
52
|
+
- Notebook or script execution order clear and linear?
|
|
53
|
+
|
|
54
|
+
## Privacy & Compliance
|
|
55
|
+
|
|
56
|
+
- PII identified and handling rules specified?
|
|
57
|
+
- Anonymization or pseudonymization methods chosen?
|
|
58
|
+
- Consent and data usage agreements in place?
|
|
59
|
+
- Regulatory requirements identified (GDPR, HIPAA, CCPA)?
|