@dunnewold-labs/mr-manager 0.4.52 → 0.4.53
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.mjs +31 -8
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -185,7 +185,7 @@ import { fileURLToPath } from "url";
|
|
|
185
185
|
// cli/package.json
|
|
186
186
|
var package_default = {
|
|
187
187
|
name: "@dunnewold-labs/mr-manager",
|
|
188
|
-
version: "0.4.
|
|
188
|
+
version: "0.4.53",
|
|
189
189
|
description: "Mr. Manager - Task and project management CLI",
|
|
190
190
|
bin: {
|
|
191
191
|
mr: "./dist/index.mjs"
|
|
@@ -1874,14 +1874,23 @@ function mergePrViaCli(prUrl, repoDir, vcs = "github") {
|
|
|
1874
1874
|
});
|
|
1875
1875
|
});
|
|
1876
1876
|
}
|
|
1877
|
-
function buildPrototypeSection(protoRefs, workingDir) {
|
|
1877
|
+
function buildPrototypeSection(protoRefs, workingDir, mode = "build") {
|
|
1878
1878
|
if (protoRefs.length === 0) return "";
|
|
1879
|
-
const sections = [
|
|
1879
|
+
const sections = mode === "prd" ? [
|
|
1880
1880
|
``,
|
|
1881
1881
|
`## Referenced Prototypes`,
|
|
1882
1882
|
``,
|
|
1883
|
-
`The following prototype designs have been linked to this task
|
|
1884
|
-
|
|
1883
|
+
`The following prototype designs have been linked to this task. They represent the intended product UI. **Read every referenced HTML file in full** (paths below) and base the PRD's UI/functional requirements on what they show: page/screen structure, layout, every component and element, all the states depicted (empty/loading/error/populated, hover/active/disabled, etc.), navigation, and the interactions the design implies. Enumerate these as concrete requirements so the implementation phase builds the complete prototype, not just a restyle.`,
|
|
1884
|
+
``
|
|
1885
|
+
] : [
|
|
1886
|
+
``,
|
|
1887
|
+
`## Referenced Prototypes`,
|
|
1888
|
+
``,
|
|
1889
|
+
`The following prototype designs have been linked to this task. They are not loose visual inspiration \u2014 they are the intended product. Your job is to BUILD what each prototype shows: its full page/screen structure, layout, all the UI components and elements, every state shown (empty/loading/error/populated, hover/active/disabled, etc.), navigation, and the interactions and behaviors the design implies. Do not stop at restyling or "rethemeing" existing UI \u2014 implement the complete structure and functionality, wired to real data and logic where the rest of the task requires it.`,
|
|
1890
|
+
``,
|
|
1891
|
+
`**Before you start implementing, read every referenced HTML file in full** (paths are given below). Do not skip this \u2014 the HTML is the source of truth for what to build. Inspect the markup to enumerate the components, sections, and states you need to create.`,
|
|
1892
|
+
``,
|
|
1893
|
+
`Where the prototype and the task PRD/notes conflict, the PRD/notes win; otherwise treat the prototype as the spec for the UI.`,
|
|
1885
1894
|
``
|
|
1886
1895
|
];
|
|
1887
1896
|
for (const ref of protoRefs) {
|
|
@@ -1889,8 +1898,13 @@ function buildPrototypeSection(protoRefs, workingDir) {
|
|
|
1889
1898
|
const files = proto.files ?? [];
|
|
1890
1899
|
const selected = ref.selectedVariants ?? Array.from({ length: proto.variantCount }, (_, i) => i);
|
|
1891
1900
|
const selectedFiles = files.filter((_, i) => selected.includes(i));
|
|
1901
|
+
const fidelity = (proto.fidelity ?? "high").toLowerCase();
|
|
1902
|
+
const isLowFi = fidelity === "low" || fidelity === "low_fidelity";
|
|
1903
|
+
const fidelityNote = isLowFi ? `This is a LOW-FIDELITY wireframe. Build the full structure, layout, components, and behavior it shows, but do NOT copy its placeholder visual style (greys, boxes, sketchy borders) \u2014 apply the project's real design system / existing styling conventions.` : `This is a HIGH-FIDELITY design. Treat it as the definitive brief for both structure/behavior AND look-and-feel \u2014 match its layout, spacing, colors, typography, and component styling faithfully.`;
|
|
1892
1904
|
sections.push(`### ${proto.title}`);
|
|
1893
1905
|
sections.push(``);
|
|
1906
|
+
sections.push(fidelityNote);
|
|
1907
|
+
sections.push(``);
|
|
1894
1908
|
if (selectedFiles.length === 0) {
|
|
1895
1909
|
sections.push(`(No variant files available)`);
|
|
1896
1910
|
sections.push(``);
|
|
@@ -1905,7 +1919,7 @@ function buildPrototypeSection(protoRefs, workingDir) {
|
|
|
1905
1919
|
try {
|
|
1906
1920
|
writeFileSync3(tmpPath, file.content, "utf-8");
|
|
1907
1921
|
sections.push(`#### ${variantLabel}: ${file.name}`);
|
|
1908
|
-
sections.push(`File: \`${tmpPath}\` \u2014 read this file
|
|
1922
|
+
sections.push(`File: \`${tmpPath}\` \u2014 read this file in full before implementing; it is the source of truth for what to build.`);
|
|
1909
1923
|
} catch {
|
|
1910
1924
|
sections.push(`#### ${variantLabel}: ${file.name}`);
|
|
1911
1925
|
sections.push(`\`\`\`html`);
|
|
@@ -2171,7 +2185,7 @@ ${task.notes}` : "";
|
|
|
2171
2185
|
`Complete all steps autonomously without asking for confirmation. Exit with code 0 when done.`
|
|
2172
2186
|
].join("\n");
|
|
2173
2187
|
}
|
|
2174
|
-
function buildPrdPrompt(task, repoDir, existingPrd, feedbackUpdates = []) {
|
|
2188
|
+
function buildPrdPrompt(task, repoDir, existingPrd, feedbackUpdates = [], protoRefs = []) {
|
|
2175
2189
|
const notes = task.notes ? `
|
|
2176
2190
|
|
|
2177
2191
|
Task notes:
|
|
@@ -2223,6 +2237,7 @@ ${task.notes}` : "";
|
|
|
2223
2237
|
`Title: ${task.title}`,
|
|
2224
2238
|
`ID: ${task.id}${notes}`,
|
|
2225
2239
|
feedbackSection,
|
|
2240
|
+
buildPrototypeSection(protoRefs, repoDir, "prd"),
|
|
2226
2241
|
`## Instructions`,
|
|
2227
2242
|
``,
|
|
2228
2243
|
...revisionInstructions,
|
|
@@ -3489,13 +3504,21 @@ var watchCommand = new Command9("watch").description(
|
|
|
3489
3504
|
}
|
|
3490
3505
|
} catch {
|
|
3491
3506
|
}
|
|
3507
|
+
let protoRefs = [];
|
|
3508
|
+
try {
|
|
3509
|
+
protoRefs = await api.get(`/api/tasks/${task.id}/prototypes`);
|
|
3510
|
+
if (protoRefs.length > 0) {
|
|
3511
|
+
logInfo(prefix, `${paint("cyan", String(protoRefs.length))} linked prototype(s)`);
|
|
3512
|
+
}
|
|
3513
|
+
} catch {
|
|
3514
|
+
}
|
|
3492
3515
|
const isRevision = !!(existingPlanResource && feedbackUpdates.length > 0);
|
|
3493
3516
|
await postTaskUpdate(
|
|
3494
3517
|
task.id,
|
|
3495
3518
|
isRevision ? "Agent dispatched in plan mode \u2014 revising PRD based on feedback" : "Agent dispatched in plan mode \u2014 generating PRD",
|
|
3496
3519
|
"system"
|
|
3497
3520
|
);
|
|
3498
|
-
const prompt2 = buildPrdPrompt(task, repoDir, existingPlanResource?.content, feedbackUpdates);
|
|
3521
|
+
const prompt2 = buildPrdPrompt(task, repoDir, existingPlanResource?.content, feedbackUpdates, protoRefs);
|
|
3499
3522
|
const attemptOrder = await resolveAgentChain(agent);
|
|
3500
3523
|
if (attemptOrder.length === 0) {
|
|
3501
3524
|
logError(prefix, `No available agents found for fallback chain starting at ${agent}`);
|