vibe-splain 2.0.0 → 2.0.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/dist/index.js +32 -2
- package/dist/mcp/server.js +6 -0
- package/dist/mcp/tools/set_project_brief.js +16 -1
- package/dist/mcp/tools/write_decision_card.js +13 -1
- package/dist/ui/index.html +249 -250
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1438,7 +1438,17 @@ async function handleSetProjectBrief(args) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
dossier.map.brief = brief;
|
|
1440
1440
|
await writeDossier(projectRoot, dossier);
|
|
1441
|
-
|
|
1441
|
+
const documented = new Set([...dossier.pillars.flatMap((p) => p.decisions), ...dossier.wildDiscoveries].map((c) => c.primaryFile).filter(Boolean));
|
|
1442
|
+
const startHere = dossier.map.topGravity.filter((f) => !documented.has(f));
|
|
1443
|
+
const wild = dossier.map.topHeat.filter((f) => !documented.has(f));
|
|
1444
|
+
const worklist = [.../* @__PURE__ */ new Set([...startHere, ...wild])];
|
|
1445
|
+
return {
|
|
1446
|
+
success: true,
|
|
1447
|
+
brief,
|
|
1448
|
+
remainingFiles: worklist,
|
|
1449
|
+
legalPillarNames: dossier.map.pillars.map((p) => p.name),
|
|
1450
|
+
nextStep: worklist.length === 0 ? "All files documented. Share the file:// UI link from scan_project." : `Brief saved. DO NOT STOP and DO NOT ask the user what to do next. Now loop: for EACH of the ${worklist.length} files in remainingFiles, call get_file_context then write_decision_card. Start with "${worklist[0]}". Continue until every file has a card, then share the file:// UI link.`
|
|
1451
|
+
};
|
|
1442
1452
|
}
|
|
1443
1453
|
|
|
1444
1454
|
// dist/mcp/tools/get_file_context.js
|
|
@@ -1619,7 +1629,21 @@ async function handleWriteDecisionCard(args) {
|
|
|
1619
1629
|
bucket.cardCount = bucket.decisions.length;
|
|
1620
1630
|
await writeDossier(projectRoot, dossier);
|
|
1621
1631
|
console.error(`[vibe-splain] Card written: "${title}" [${category} sev${severity}] in "${pillar}"${isWild ? " (Wild Discovery)" : ""}`);
|
|
1622
|
-
|
|
1632
|
+
const documented = new Set([...dossier.pillars.flatMap((p) => p.decisions), ...dossier.wildDiscoveries].map((c) => c.primaryFile).filter(Boolean));
|
|
1633
|
+
const remaining = [.../* @__PURE__ */ new Set([...dossier.map.topGravity, ...dossier.map.topHeat])].filter((f) => !documented.has(f));
|
|
1634
|
+
return {
|
|
1635
|
+
success: true,
|
|
1636
|
+
cardId: card.id,
|
|
1637
|
+
pillar,
|
|
1638
|
+
primaryFile,
|
|
1639
|
+
category,
|
|
1640
|
+
severity,
|
|
1641
|
+
wildDiscovery: isWild,
|
|
1642
|
+
gravity,
|
|
1643
|
+
heat,
|
|
1644
|
+
remainingFiles: remaining,
|
|
1645
|
+
nextStep: remaining.length === 0 ? "Every Start-Here and Wild-Discovery file now has a card. Share the file:// UI link from scan_project. Done." : `Card saved. DO NOT STOP. ${remaining.length} files left. Next: call get_file_context then write_decision_card for "${remaining[0]}".`
|
|
1646
|
+
};
|
|
1623
1647
|
}
|
|
1624
1648
|
|
|
1625
1649
|
// dist/mcp/tools/get_strategic_overview.js
|
|
@@ -1851,6 +1875,12 @@ PROCESS \u2014 follow in order:
|
|
|
1851
1875
|
smellSpans (located tech debt) \u2014 base your evidence on THOSE, never on header comments.
|
|
1852
1876
|
4. Write one decision card per file via write_decision_card.
|
|
1853
1877
|
|
|
1878
|
+
This is an AUTONOMOUS loop. Every tool response includes a \`nextStep\` and often a
|
|
1879
|
+
\`remainingFiles\` list \u2014 OBEY them. Do NOT stop, summarize, or ask the user "how would
|
|
1880
|
+
you like to proceed" until every Start-Here and Wild-Discovery file has a card. Writing
|
|
1881
|
+
the brief is the START of the work, not the end. Keep calling get_file_context +
|
|
1882
|
+
write_decision_card until remainingFiles is empty.
|
|
1883
|
+
|
|
1854
1884
|
RULES FOR EVERY CARD \u2014 non-negotiable:
|
|
1855
1885
|
- The \`thesis\` is a VERDICT in one sentence. Take a position. If you can't, you don't
|
|
1856
1886
|
understand the file yet \u2014 read more.
|
package/dist/mcp/server.js
CHANGED
|
@@ -77,6 +77,12 @@ PROCESS — follow in order:
|
|
|
77
77
|
smellSpans (located tech debt) — base your evidence on THOSE, never on header comments.
|
|
78
78
|
4. Write one decision card per file via write_decision_card.
|
|
79
79
|
|
|
80
|
+
This is an AUTONOMOUS loop. Every tool response includes a \`nextStep\` and often a
|
|
81
|
+
\`remainingFiles\` list — OBEY them. Do NOT stop, summarize, or ask the user "how would
|
|
82
|
+
you like to proceed" until every Start-Here and Wild-Discovery file has a card. Writing
|
|
83
|
+
the brief is the START of the work, not the end. Keep calling get_file_context +
|
|
84
|
+
write_decision_card until remainingFiles is empty.
|
|
85
|
+
|
|
80
86
|
RULES FOR EVERY CARD — non-negotiable:
|
|
81
87
|
- The \`thesis\` is a VERDICT in one sentence. Take a position. If you can't, you don't
|
|
82
88
|
understand the file yet — read more.
|
|
@@ -22,6 +22,21 @@ export async function handleSetProjectBrief(args) {
|
|
|
22
22
|
}
|
|
23
23
|
dossier.map.brief = brief;
|
|
24
24
|
await writeDossier(projectRoot, dossier);
|
|
25
|
-
|
|
25
|
+
// Drive the loop: hand back the exact remaining worklist so the agent does
|
|
26
|
+
// not stop and ask the user. Weak models treat "brief saved" as done otherwise.
|
|
27
|
+
const documented = new Set([...dossier.pillars.flatMap(p => p.decisions), ...dossier.wildDiscoveries]
|
|
28
|
+
.map(c => c.primaryFile).filter(Boolean));
|
|
29
|
+
const startHere = dossier.map.topGravity.filter(f => !documented.has(f));
|
|
30
|
+
const wild = dossier.map.topHeat.filter(f => !documented.has(f));
|
|
31
|
+
const worklist = [...new Set([...startHere, ...wild])];
|
|
32
|
+
return {
|
|
33
|
+
success: true,
|
|
34
|
+
brief,
|
|
35
|
+
remainingFiles: worklist,
|
|
36
|
+
legalPillarNames: dossier.map.pillars.map(p => p.name),
|
|
37
|
+
nextStep: worklist.length === 0
|
|
38
|
+
? 'All files documented. Share the file:// UI link from scan_project.'
|
|
39
|
+
: `Brief saved. DO NOT STOP and DO NOT ask the user what to do next. Now loop: for EACH of the ${worklist.length} files in remainingFiles, call get_file_context then write_decision_card. Start with "${worklist[0]}". Continue until every file has a card, then share the file:// UI link.`,
|
|
40
|
+
};
|
|
26
41
|
}
|
|
27
42
|
//# sourceMappingURL=set_project_brief.js.map
|
|
@@ -122,6 +122,18 @@ export async function handleWriteDecisionCard(args) {
|
|
|
122
122
|
bucket.cardCount = bucket.decisions.length;
|
|
123
123
|
await writeDossier(projectRoot, dossier);
|
|
124
124
|
console.error(`[vibe-splain] Card written: "${title}" [${category} sev${severity}] in "${pillar}"${isWild ? ' (Wild Discovery)' : ''}`);
|
|
125
|
-
|
|
125
|
+
// Keep the loop going: compute what is still undocumented.
|
|
126
|
+
const documented = new Set([...dossier.pillars.flatMap(p => p.decisions), ...dossier.wildDiscoveries]
|
|
127
|
+
.map(c => c.primaryFile).filter(Boolean));
|
|
128
|
+
const remaining = [...new Set([...dossier.map.topGravity, ...dossier.map.topHeat])]
|
|
129
|
+
.filter(f => !documented.has(f));
|
|
130
|
+
return {
|
|
131
|
+
success: true, cardId: card.id, pillar, primaryFile, category, severity,
|
|
132
|
+
wildDiscovery: isWild, gravity, heat,
|
|
133
|
+
remainingFiles: remaining,
|
|
134
|
+
nextStep: remaining.length === 0
|
|
135
|
+
? 'Every Start-Here and Wild-Discovery file now has a card. Share the file:// UI link from scan_project. Done.'
|
|
136
|
+
: `Card saved. DO NOT STOP. ${remaining.length} files left. Next: call get_file_context then write_decision_card for "${remaining[0]}".`,
|
|
137
|
+
};
|
|
126
138
|
}
|
|
127
139
|
//# sourceMappingURL=write_decision_card.js.map
|