mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Add Diagnose and X-ray, shared building habits, fresh-helper reviews, and a Bug fixed spec state
AI Assisted
This commit is contained in:
1 parent
80ae3decdd
commit
33a0dbd34a
58 files changed
+3270
-236
No files matched your search
@@ -270,6 +270,8 @@ export const WORKFLOW_LABEL = {
|
||||
handoff: "Handoff",
|
||||
git: "Git",
|
||||
changelog: "Changelog",
|
||||
xray: "X-ray",
|
||||
diagnose: "Diagnosing",
|
||||
};
|
||||
|
||||
export function workflowLabel(workflow) {
|
||||
@@ -296,6 +298,8 @@ export const CONSOLE_WORKFLOWS = [
|
||||
"/plan2code-handoff",
|
||||
"/plan2code-git",
|
||||
"/plan2code-changelog",
|
||||
"/plan2code-xray",
|
||||
"/plan2code-diagnose",
|
||||
];
|
||||
|
||||
// Rides on the end of the command as part of the skill's argument. Every
|
||||
@@ -465,6 +469,10 @@ export function resumeCommand({ workflow, specDir } = {}) {
|
||||
return "/plan2code-git";
|
||||
case "changelog":
|
||||
return "/plan2code-changelog";
|
||||
case "xray":
|
||||
return "/plan2code-xray";
|
||||
case "diagnose":
|
||||
return "/plan2code-diagnose";
|
||||
default:
|
||||
return dir ? `/plan2code-0-pathfinder ${dir}/pathfinder` : "/plan2code-0-pathfinder";
|
||||
}
|
||||
@@ -680,15 +688,26 @@ export const SKILL_CATALOG = [
|
||||
"A fresh-eyes pass over what changed: bugs, gaps, and the things the builder was too close to see. Problems come back ranked with a suggestion each, you pick which ones get fixed, and it fixes them.",
|
||||
},
|
||||
{
|
||||
skill: "plan2code-handoff",
|
||||
command: "/plan2code-handoff",
|
||||
workflow: "handoff",
|
||||
skill: "plan2code-xray",
|
||||
command: "/plan2code-xray",
|
||||
workflow: "xray",
|
||||
group: "extra",
|
||||
chip: "Utility",
|
||||
title: "Handoff",
|
||||
blurb: "Pack the current session into a document a fresh session can pick up cold.",
|
||||
title: "Codebase X-ray",
|
||||
blurb: "Explain how and why an area works, or find the rough spots worth fixing.",
|
||||
about:
|
||||
"Writes down everything a new session would need, as a single document: what was decided, what is done, what is left. Use it when a conversation got long, a machine changed, or tomorrow-you deserves the context today-you has.",
|
||||
"Two ways into code you did not write. Explain an area: how it works, step by step, and why it is that way, citing the files and the commits and pull requests behind it. Or find the rough spots: files that always change together, thin layers, tangled boundaries and busy code with no tests, ranked with a concrete example each. You tick the ones worth fixing and they become a brief for Pathfinder or Plan. It never changes code.",
|
||||
},
|
||||
{
|
||||
skill: "plan2code-diagnose",
|
||||
command: "/plan2code-diagnose",
|
||||
workflow: "diagnose",
|
||||
group: "extra",
|
||||
chip: "Utility",
|
||||
title: "Diagnose a bug",
|
||||
blurb: "Find a bug's cause and write it up, without fixing it.",
|
||||
about:
|
||||
"Something is broken and nobody knows why. Diagnose asks what goes wrong and how to see it, then builds a command that fails on the bug before it forms a theory. It narrows the cause down to a file and a function, says how sure it is, and sizes the fix. The write-up lands in a spec folder, and the dashboard then offers Quick Task to fix it, or Plan when the fix is big. It never changes code.",
|
||||
},
|
||||
{
|
||||
skill: "plan2code-changelog",
|
||||
@@ -712,6 +731,17 @@ export const SKILL_CATALOG = [
|
||||
about:
|
||||
"Shows your branch, what is ahead or behind, and every local and remote branch. Switch, create, delete or clean up branches, pull (rebasing when they have split, with help on conflicts), push or publish, and commit with a clear message. It asks before every push, publish and delete, and never force-pushes.",
|
||||
},
|
||||
{
|
||||
skill: "plan2code-handoff",
|
||||
command: "/plan2code-handoff",
|
||||
workflow: "handoff",
|
||||
group: "extra",
|
||||
chip: "Utility",
|
||||
title: "Handoff",
|
||||
blurb: "Pack the current session into a document a fresh session can pick up cold.",
|
||||
about:
|
||||
"Writes down everything a new session would need, as a single document: what was decided, what is done, what is left. Use it when a conversation got long, a machine changed, or tomorrow-you deserves the context today-you has.",
|
||||
},
|
||||
];
|
||||
|
||||
// A workflow by the name its dashboard card gives it ("Implement"), for the
|
||||
@@ -736,6 +766,8 @@ export const START_POSES = [
|
||||
"handoff",
|
||||
"git",
|
||||
"changelog",
|
||||
"xray",
|
||||
"diagnose",
|
||||
];
|
||||
|
||||
const POSE_ALIASES = { "init-update": "init", "revise-plan": "plan", "implement-review": "implement" };
|
||||
@@ -754,6 +786,8 @@ export function catalogEntry(skill) {
|
||||
// What the picker shows next to a spec's name — the pipeline position the
|
||||
// server's scan worked out, in plain words.
|
||||
export const SPEC_STATE_LABELS = {
|
||||
diagnosed: "Bug diagnosed",
|
||||
fixed: "Bug fixed",
|
||||
exploring: "Exploring",
|
||||
mapped: "Ready to plan",
|
||||
planned: "Ready to document",
|
||||
@@ -766,6 +800,7 @@ export const SPEC_STATE_LABELS = {
|
||||
// The card each spec state exists to light up. Used as the fallback for the
|
||||
// "Suggested" pill when the agent's menu payload names nothing.
|
||||
const NEXT_FOR_STATE = {
|
||||
diagnosed: "plan2code-quick-task",
|
||||
exploring: "plan2code-0-pathfinder",
|
||||
mapped: "plan2code-1-plan",
|
||||
planned: "plan2code-2-document",
|
||||
@@ -778,6 +813,16 @@ const ON = { on: true };
|
||||
export const GIT_INIT_NOTE = "Not a git repository yet: it offers to start one";
|
||||
export const pendingNote = (n) => `${n} file${n === 1 ? "" : "s"} to commit`;
|
||||
const off = (reason) => ({ on: false, reason });
|
||||
const FIXED_REASON = "This bug is fixed. Delete it with ✕, or move it to specs--completed/.";
|
||||
|
||||
/**
|
||||
* The spec the picker opens on: the most recently touched one that is still
|
||||
* in play. A fixed bug is finished, so it is never the default; with nothing
|
||||
* else on disk the picker opens on "start from scratch" (null).
|
||||
*/
|
||||
export function defaultSpec(specs) {
|
||||
return (Array.isArray(specs) ? specs : []).find((s) => s && s.state !== "fixed") || null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a catalog card is clickable for the current picker selection.
|
||||
@@ -803,9 +848,13 @@ export function cardAvailability(entry, scan, sel) {
|
||||
case "plan2code-init-update":
|
||||
return hasAgents ? ON : off("Needs an AGENTS.md. Set the project up first.");
|
||||
case "plan2code-quick-task":
|
||||
// Always on; a diagnosed bug is the one spec it is the next step for.
|
||||
return next ? { ...ON, next } : ON;
|
||||
case "plan2code-review":
|
||||
case "plan2code-handoff":
|
||||
case "plan2code-changelog":
|
||||
case "plan2code-xray":
|
||||
case "plan2code-diagnose":
|
||||
return ON;
|
||||
case "plan2code-git":
|
||||
// Never greyed: a clean tree still has branches to switch, pull and push.
|
||||
@@ -814,9 +863,12 @@ export function cardAvailability(entry, scan, sel) {
|
||||
return ON;
|
||||
case "plan2code-0-pathfinder":
|
||||
if (!state || state === "exploring") return { ...ON, next };
|
||||
if (state === "diagnosed") return off("The cause is found. Fix it in a quick task, or plan it.");
|
||||
if (state === "fixed") return off(FIXED_REASON);
|
||||
return off("This spec is already past the questions");
|
||||
case "plan2code-1-plan":
|
||||
if (state === "exploring") return off("Pathfinder is not finished with this spec yet");
|
||||
if (state === "fixed") return off(FIXED_REASON);
|
||||
if (state === "documented" || state === "building" || state === "built")
|
||||
return off("The plan is written. Revise it instead if it moved.");
|
||||
return { ...ON, next };
|
||||
@@ -840,10 +892,21 @@ export function cardAvailability(entry, scan, sel) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The spec a card's launch carries: the picker's selection for the cards that
|
||||
* take a spec, and for Quick Task only a diagnosed bug, whose write-up it reads
|
||||
* first. Every other card launches untargeted.
|
||||
*/
|
||||
export function launchTarget(entry, sel) {
|
||||
if (!entry || !sel) return null;
|
||||
if (entry.spec) return sel;
|
||||
return entry.skill === "plan2code-quick-task" && sel.state === "diagnosed" ? sel : null;
|
||||
}
|
||||
|
||||
export function cardPresentation(entry, scan, sel, menu = {}) {
|
||||
const availability = cardAvailability(entry, scan, sel);
|
||||
const specs = scan && Array.isArray(scan.specs) ? scan.specs : [];
|
||||
const initial = specs.length ? Boolean(sel && sel.dir === specs[0].dir) : !sel;
|
||||
const first = defaultSpec(scan && scan.specs);
|
||||
const initial = first ? Boolean(sel && sel.dir === first.dir) : !sel;
|
||||
const requested = initial && typeof menu.recommend === "string" ? catalogEntry(menu.recommend) : null;
|
||||
const recommendation = requested && cardAvailability(requested, scan, sel).on ? requested.skill : null;
|
||||
const recommended = availability.on && (recommendation ? entry.skill === recommendation : availability.next);
|
||||
@@ -871,6 +934,38 @@ export function launchReply(entry, spec) {
|
||||
return `Start ${entry.title} (${entry.command})${target}, right here in this session.`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deleting a spec from the picker. The page only names the folder; the agent
|
||||
* deletes it (`console.mjs delete-spec`, which runs lib.mjs's removeSpec() on
|
||||
* this same rule), because the console never writes into a project. A
|
||||
* deletable dir is exactly `specs/<one name>`: no deeper path, no `.` or `..`,
|
||||
* no dotfolder, no backslash, never specs--completed/.
|
||||
*/
|
||||
export function isDeletableSpecDir(dir) {
|
||||
return typeof dir === "string" && /^specs\/[^/\\]+$/.test(dir) && !/^specs\/\./.test(dir);
|
||||
}
|
||||
|
||||
export function deleteAction(spec) {
|
||||
return { i: "__delete", type: "delete", spec: spec.dir };
|
||||
}
|
||||
|
||||
export function deleteReply(spec) {
|
||||
return `Delete the spec folder ${spec.dir}/ for good, right here in this session.`;
|
||||
}
|
||||
|
||||
// What the delete dialog says about the spec, from the scan alone. `touched`
|
||||
// stays a number: the page formats it in the person's own locale.
|
||||
export function deleteSummary(spec) {
|
||||
const label = SPEC_STATE_LABELS[spec.state] || spec.state || "";
|
||||
const n = spec.files;
|
||||
return {
|
||||
folder: `${spec.dir}/`,
|
||||
stage: spec.detail ? `${label}: ${spec.detail}` : label,
|
||||
files: Number.isInteger(n) ? `${n} file${n === 1 ? "" : "s"}` : "",
|
||||
touched: Number.isFinite(spec.touched) && spec.touched > 0 ? spec.touched : null,
|
||||
};
|
||||
}
|
||||
|
||||
export function staleLaunchFeedback(title, adrift) {
|
||||
if (!adrift) return null;
|
||||
return {
|
||||
|
||||
@@ -2043,6 +2043,9 @@ h4.md-h, h5.md-h, h6.md-h { font-size: 15px; }
|
||||
.md-table th, .md-table td { border: 1px solid var(--rule); padding: 8px 11px; text-align: left; }
|
||||
.md-table th { background: var(--panel-2); font-weight: 600; }
|
||||
.md-img { max-width: 100%; border-radius: 8px; }
|
||||
.doc-figure { margin: 0 0 13px; }
|
||||
.doc-img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; }
|
||||
.doc-figure figcaption { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
|
||||
.md a { color: var(--accent); }
|
||||
|
||||
/* ------------------------------------------------------------- footer */
|
||||
@@ -3053,6 +3056,50 @@ a.icon-btn { box-sizing: border-box; text-decoration: none; }
|
||||
}
|
||||
.spec-chip:not(.is-sel) .spec-chip-state { color: var(--ink-3); }
|
||||
.spec-chip-detail { font-size: 11.5px; color: var(--ink-3); }
|
||||
/* A spec's Delete button sits beside its chip, not inside it: a button cannot
|
||||
hold a button. Quiet until the chip is hovered or focused. */
|
||||
.spec-chip-wrap { position: relative; display: flex; }
|
||||
.spec-chip-wrap.is-fixed .spec-chip:not(.is-sel) { opacity: 0.6; }
|
||||
.spec-chip-wrap .spec-chip { padding-right: 36px; }
|
||||
.spec-chip-del {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 6px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 0;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: var(--ink-3);
|
||||
font: inherit;
|
||||
font-size: 15px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
opacity: 0.55;
|
||||
}
|
||||
.spec-chip-wrap:hover .spec-chip-del,
|
||||
.spec-chip-del:focus-visible { opacity: 1; }
|
||||
.spec-chip-del:hover { color: var(--warn); border-color: var(--warn); opacity: 1; }
|
||||
.spec-chip-del:focus-visible { outline: 2px solid var(--warn); outline-offset: 1px; }
|
||||
.spec-chip-del:disabled { cursor: default; opacity: 0.3; }
|
||||
.spec-chip-wrap.is-deleting .spec-chip { opacity: 0.5; }
|
||||
.delete-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: 13.5px; }
|
||||
.delete-facts dt { color: var(--ink-3); }
|
||||
.delete-facts dd { margin: 0; overflow-wrap: anywhere; }
|
||||
.delete-confirm { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
|
||||
.delete-confirm[hidden] { display: none; }
|
||||
.delete-confirm input {
|
||||
padding: 8px 10px;
|
||||
border: 1px solid var(--rule-2);
|
||||
border-radius: var(--radius);
|
||||
background: var(--panel);
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
}
|
||||
.delete-confirm input:focus-visible { outline: 2px solid var(--warn); outline-offset: 1px; }
|
||||
|
||||
/* ------------------------------------------------- dashboard confirm */
|
||||
|
||||
@@ -3524,6 +3571,68 @@ a.icon-btn { box-sizing: border-box; text-decoration: none; }
|
||||
/* Changelog -- the arm reaches the page and the newest line is written in step. */
|
||||
.pose .cl-line { animation: gc-dot 2.4s ease-in-out infinite; }
|
||||
|
||||
/* Codebase X-ray -- the scan line sweeps down the file, the rough spot lights
|
||||
up as it passes, and the lens and his star follow it down. */
|
||||
.pose .xr-scan { animation: xr-scan 4s ease-in-out infinite; }
|
||||
@keyframes xr-scan {
|
||||
0%, 10% { opacity: 0; transform: translateY(0); }
|
||||
16% { opacity: 1; }
|
||||
74% { opacity: 1; }
|
||||
80%, 100% { opacity: 0; transform: translateY(88px); }
|
||||
}
|
||||
.pose .xr-spot { animation: xr-spot 4s ease-out infinite; }
|
||||
@keyframes xr-spot {
|
||||
0%, 50% { opacity: 0; transform: scale(0.3); }
|
||||
56% { opacity: 1; transform: scale(1.3); }
|
||||
62%, 90% { opacity: 1; transform: scale(1); }
|
||||
100% { opacity: 0; transform: scale(1); }
|
||||
}
|
||||
.pose .xr-lens { animation: xr-lens 4s ease-in-out infinite; }
|
||||
@keyframes xr-lens {
|
||||
0%, 10%, 100% { transform: translate(0, -3px); }
|
||||
56%, 80% { transform: translate(0, 4px); }
|
||||
}
|
||||
.pose .xr-look { animation: xr-look 4s ease-in-out infinite; }
|
||||
@keyframes xr-look {
|
||||
0%, 10%, 100% { transform: translate(4px, -1px); }
|
||||
56%, 80% { transform: translate(4px, 2px); }
|
||||
}
|
||||
|
||||
/* Diagnose a bug -- the bug scuttles along its line, the magnifier and his
|
||||
star follow it until it is caught, and the red mark under the line shows
|
||||
once it holds still. Held still, the bug sits caught under the lens. */
|
||||
.pose .dg-mark { fill: none; stroke: var(--warn); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.pose .dg-leg { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
|
||||
.pose .dg-body { fill: var(--warn); }
|
||||
.pose .dg-head { fill: var(--ink); }
|
||||
.pose .dg-bug { animation: dg-bug 4s ease-in-out infinite; }
|
||||
@keyframes dg-bug {
|
||||
0%, 100% { transform: translate(-7px, 0) rotate(-12deg); }
|
||||
14% { transform: translate(-2px, 0) rotate(10deg); }
|
||||
26% { transform: translate(4px, 0) rotate(-10deg); }
|
||||
36% { transform: translate(1px, 0) rotate(8deg); }
|
||||
44%, 88% { transform: translate(0, 0) rotate(0deg); }
|
||||
}
|
||||
.pose .dg-lens { animation: dg-lens 4s ease-in-out infinite; }
|
||||
@keyframes dg-lens {
|
||||
0%, 100% { transform: translate(-9px, -2px); }
|
||||
18% { transform: translate(-3px, -1px); }
|
||||
30% { transform: translate(3px, 0); }
|
||||
44%, 88% { transform: translate(0, 0); }
|
||||
}
|
||||
.pose .dg-mark { animation: dg-mark 4s ease-out infinite; }
|
||||
@keyframes dg-mark {
|
||||
0%, 44% { opacity: 0; }
|
||||
52%, 88% { opacity: 1; }
|
||||
96%, 100% { opacity: 0; }
|
||||
}
|
||||
.pose .dg-look { animation: dg-look 4s ease-in-out infinite; }
|
||||
@keyframes dg-look {
|
||||
0%, 100% { transform: translate(2px, 0); }
|
||||
30% { transform: translate(5px, 0); }
|
||||
44%, 88% { transform: translate(4px, 1px); }
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.dash { padding-top: 0; }
|
||||
.launch-stage { height: 140px; }
|
||||
|
||||
+170
-18
@@ -22,6 +22,7 @@ import {
|
||||
briefPhrase,
|
||||
cardAvailability,
|
||||
cardPresentation,
|
||||
defaultSpec,
|
||||
CATALOG_GROUPS,
|
||||
choiceAnswer,
|
||||
DASHBOARD_COMMAND,
|
||||
@@ -42,6 +43,11 @@ import {
|
||||
IMAGE_QUALITY,
|
||||
lastOpenCard,
|
||||
launchReply,
|
||||
launchTarget,
|
||||
deleteAction,
|
||||
deleteReply,
|
||||
deleteSummary,
|
||||
isDeletableSpecDir,
|
||||
MAX_ATTACHMENTS,
|
||||
nextOpenAfter,
|
||||
MAX_DOC_BYTES,
|
||||
@@ -597,6 +603,8 @@ function fresh() {
|
||||
afterBuild: null,
|
||||
homeward: null,
|
||||
launching: null,
|
||||
// A picker Delete sent and not yet answered by a rescan: { dir, scanAt }.
|
||||
deleting: null,
|
||||
retract: {},
|
||||
chat: freshChat(),
|
||||
};
|
||||
@@ -812,13 +820,14 @@ const specList = () => {
|
||||
};
|
||||
|
||||
// The spec the picker currently targets. Absent `specSel` means the picker
|
||||
// has not been touched, so it defaults to the most recently touched spec —
|
||||
// the first entry of the server's already-sorted list. An explicit "start
|
||||
// from scratch" is stored as null, which is different.
|
||||
// has not been touched, so it defaults to the most recently touched spec
|
||||
// still in play (defaultSpec: the server's list is already sorted, and a
|
||||
// fixed bug is skipped). An explicit "start from scratch" is stored as null,
|
||||
// which is different.
|
||||
const selSpec = () => {
|
||||
const specs = specList();
|
||||
if (!specs.length) return null;
|
||||
if (local.specSel === undefined) return specs[0];
|
||||
if (local.specSel === undefined) return defaultSpec(specs);
|
||||
return specs.find((s) => s.dir === local.specSel) || null;
|
||||
};
|
||||
|
||||
@@ -1054,8 +1063,8 @@ function adopt(body) {
|
||||
const viaDashboard = prevWorkflow === "dashboard" || S.workflow === "dashboard";
|
||||
if (prevWorkflow && prevWorkflow !== S.workflow && viaDashboard) {
|
||||
// The pick rides into the skill it launched, never back home: arriving at
|
||||
// the dashboard, the picker starts on the most recently touched spec, the
|
||||
// one the agent's fresh menu recommends for.
|
||||
// the dashboard, the picker starts on the most recently touched spec still
|
||||
// in play, the one the agent's fresh menu recommends for.
|
||||
const keepPick = S.workflow !== "dashboard" && "specSel" in local;
|
||||
local = { ...fresh(), launching: local.launching, ...(keepPick ? { specSel: local.specSel } : {}) };
|
||||
save();
|
||||
@@ -3056,7 +3065,9 @@ function updateDismissed() {
|
||||
}
|
||||
|
||||
const RELEASES_URL = "https://github.com/jparkerweb/plan2code/releases/";
|
||||
const UPDATE_COMMAND = "npx --allow-git=all git+https://github.com/jparkerweb/plan2code.git";
|
||||
const UPDATE_COMMAND = "plan2code update";
|
||||
// For a machine without the plan2code command: the full installer, menu and all.
|
||||
const UPDATE_FALLBACK_COMMAND = "npx --allow-git=all git+https://github.com/jparkerweb/plan2code.git";
|
||||
|
||||
function releasesLink(text) {
|
||||
const a = el("a", null, text);
|
||||
@@ -3079,6 +3090,9 @@ function openUpdateModal() {
|
||||
const row = $("update-command");
|
||||
const code = el("code", null, UPDATE_COMMAND);
|
||||
row.replaceChildren(code, copyButton(UPDATE_COMMAND, "btn small ghost handoff-copy", code));
|
||||
const fallbackRow = $("update-fallback");
|
||||
const fallback = el("code", null, UPDATE_FALLBACK_COMMAND);
|
||||
fallbackRow.replaceChildren(fallback, copyButton(UPDATE_FALLBACK_COMMAND, "btn small ghost handoff-copy", fallback));
|
||||
$("update-modal").showModal();
|
||||
}
|
||||
|
||||
@@ -3117,9 +3131,9 @@ function renderDashboard(main) {
|
||||
// The agent's note reads the spec the picker opened on (the same "initial"
|
||||
// test cardPresentation uses): another pick, or Start from scratch, gets
|
||||
// the neutral line rather than context about a spec no longer shown.
|
||||
const specsNow = (scan() && scan().specs) || [];
|
||||
const first = defaultSpec(scan() && scan().specs);
|
||||
const picked = selSpec();
|
||||
const onInitial = specsNow.length ? Boolean(picked && picked.dir === specsNow[0].dir) : !picked;
|
||||
const onInitial = first ? Boolean(picked && picked.dir === first.dir) : !picked;
|
||||
if (typeof menu.note === "string" && menu.note.trim() && onInitial) {
|
||||
wrap.appendChild(el("p", "dash-note", menu.note));
|
||||
} else if (!S.menu && agentWorking()) {
|
||||
@@ -3681,13 +3695,26 @@ function renderSpecPicker(specs) {
|
||||
});
|
||||
row.appendChild(scratch);
|
||||
|
||||
// A delete in flight ends when the agent's rescan lands (a new scan), gone
|
||||
// or refused: either way the picker below is the truth again.
|
||||
const sc = scan();
|
||||
if (local.deleting && sc && sc.at !== local.deleting.scanAt) {
|
||||
local.deleting = null;
|
||||
save();
|
||||
}
|
||||
for (const spec of specs) {
|
||||
const on = sel && sel.dir === spec.dir;
|
||||
// A fixed bug is finished: hidden while unavailable workflows are, dimmed
|
||||
// otherwise. A pick already on it stays visible, so it is never lost.
|
||||
const fixed = spec.state === "fixed";
|
||||
if (fixed && looks.hideUnavailable && !on) continue;
|
||||
const deleting = Boolean(local.deleting && local.deleting.dir === spec.dir);
|
||||
const wrap = el("div", "spec-chip-wrap" + (deleting ? " is-deleting" : "") + (fixed ? " is-fixed" : ""));
|
||||
const b = el("button", "spec-chip" + (on ? " is-sel" : ""));
|
||||
b.type = "button";
|
||||
b.setAttribute("aria-current", String(Boolean(on)));
|
||||
b.appendChild(el("span", "spec-chip-name", spec.name));
|
||||
b.appendChild(el("span", "spec-chip-state", SPEC_STATE_LABELS[spec.state] || spec.state));
|
||||
b.appendChild(el("span", "spec-chip-state", deleting ? "Deleting…" : SPEC_STATE_LABELS[spec.state] || spec.state));
|
||||
if (spec.detail) b.appendChild(el("span", "spec-chip-detail", spec.detail));
|
||||
b.addEventListener("click", () => {
|
||||
local.specSel = spec.dir;
|
||||
@@ -3695,7 +3722,17 @@ function renderSpecPicker(specs) {
|
||||
render();
|
||||
loadOverview();
|
||||
});
|
||||
row.appendChild(b);
|
||||
wrap.appendChild(b);
|
||||
if (isDeletableSpecDir(spec.dir)) {
|
||||
const del = el("button", "spec-chip-del", "✕");
|
||||
del.type = "button";
|
||||
del.title = `Delete ${spec.dir}/`;
|
||||
del.setAttribute("aria-label", `Delete the spec ${spec.name}`);
|
||||
del.disabled = deleting || Boolean(local.deleting) || gone || pendingResult || Boolean(local.launching);
|
||||
del.addEventListener("click", () => openDeleteConfirm(spec));
|
||||
wrap.appendChild(del);
|
||||
}
|
||||
row.appendChild(wrap);
|
||||
}
|
||||
box.appendChild(row);
|
||||
return box;
|
||||
@@ -3781,7 +3818,7 @@ function renderConfirm(main, entry) {
|
||||
|
||||
// A card that takes a spec names the one the picker is holding, so START
|
||||
// reads as "build THIS spec", not the skill in the abstract.
|
||||
const target = entry.spec ? selSpec() : null;
|
||||
const target = launchTarget(entry, selSpec());
|
||||
if (target) {
|
||||
const specLine = el("p", "confirm-spec");
|
||||
specLine.appendChild(el("span", null, "for "));
|
||||
@@ -3821,7 +3858,7 @@ function renderConfirm(main, entry) {
|
||||
// through the same wait loop. The dashboard reads `skill` off it.
|
||||
async function launchSkill(entry) {
|
||||
if (gone || pendingResult || local.launching || finish()) return;
|
||||
const target = entry.spec ? selSpec() : null;
|
||||
const target = launchTarget(entry, selSpec());
|
||||
// The card was clickable, so this should never fire — but a spec picked in
|
||||
// one tab could have shifted the ground under a stale render in another.
|
||||
if (!cardAvailability(entry, scan(), selSpec()).on) {
|
||||
@@ -3839,7 +3876,7 @@ async function launchSkill(entry) {
|
||||
};
|
||||
// The picker's spec goes to the skill being launched, not to the card:
|
||||
// cards that take no spec (utilities, setup) launch untargeted even while
|
||||
// a spec is selected.
|
||||
// a spec is selected, save Quick Task on a diagnosed bug.
|
||||
if (target) action.spec = target.dir;
|
||||
// The skill opens on the folders remembered for what it was launched for.
|
||||
// Held until the launch is in flight: the swap's own frame re-renders the
|
||||
@@ -5614,11 +5651,27 @@ function renderDoc(main, id) {
|
||||
box.appendChild(el("span", "block-tag", "Assumed for now, still open"));
|
||||
}
|
||||
if (b.state === "draft") box.appendChild(el("span", "block-tag", "Draft"));
|
||||
box.appendChild(md(b.md, "md"));
|
||||
box.appendChild(blockBody(b));
|
||||
main.appendChild(box);
|
||||
});
|
||||
}
|
||||
|
||||
// A block's content: its markdown, or for an image block (a screenshot the
|
||||
// agent saved under the session's shots/ folder) a captioned picture.
|
||||
function blockBody(b) {
|
||||
if (typeof b.image !== "string") return md(b.md, "md");
|
||||
const fig = el("figure", "doc-figure");
|
||||
const img = el("img", "doc-img");
|
||||
img.src = "/shots/" + b.image.split("/").pop();
|
||||
// The caption already says it: an alt repeating it is read twice, and shows
|
||||
// twice in an export whose picture would not load.
|
||||
img.alt = "";
|
||||
img.loading = "lazy";
|
||||
fig.appendChild(img);
|
||||
if (b.alt) fig.appendChild(el("figcaption", null, b.alt));
|
||||
return fig;
|
||||
}
|
||||
|
||||
function printButton() {
|
||||
const print = el("button", "btn small", "Print");
|
||||
print.type = "button";
|
||||
@@ -7495,6 +7548,88 @@ function openHomeConfirm() {
|
||||
$("home-modal").showModal();
|
||||
}
|
||||
|
||||
// The picker's Delete: a dialog in two steps. The first says what goes and
|
||||
// that it is for good; "Delete this spec…" then reveals the second, which
|
||||
// enables the final button only once the spec's name is typed exactly.
|
||||
// Cancel, Escape or a click on Keep it at either step changes nothing.
|
||||
let deleteTarget = null;
|
||||
|
||||
function openDeleteConfirm(spec) {
|
||||
if (!isDeletableSpecDir(spec.dir) || gone || pendingResult || local.launching || local.deleting) return;
|
||||
deleteTarget = spec;
|
||||
const sum = deleteSummary(spec);
|
||||
$("delete-blurb").textContent = `Everything in ${sum.folder} will be deleted from this project.`;
|
||||
const facts = $("delete-facts");
|
||||
facts.replaceChildren();
|
||||
const fact = (term, value) => {
|
||||
if (!value) return;
|
||||
facts.appendChild(el("dt", "", term));
|
||||
facts.appendChild(el("dd", "", value));
|
||||
};
|
||||
fact("Spec", spec.name);
|
||||
fact("Folder", sum.folder);
|
||||
fact("Stage", sum.stage);
|
||||
fact("Files", sum.files);
|
||||
fact("Last changed", sum.touched ? new Date(sum.touched).toLocaleString() : "");
|
||||
$("delete-name-hint").textContent = spec.name;
|
||||
$("delete-name").value = "";
|
||||
$("delete-confirm").hidden = true;
|
||||
const go = $("delete-go");
|
||||
go.textContent = "Delete this spec…";
|
||||
go.classList.remove("is-on");
|
||||
go.disabled = false;
|
||||
$("delete-modal").showModal();
|
||||
}
|
||||
|
||||
function deleteStep() {
|
||||
const go = $("delete-go");
|
||||
if (!deleteTarget) return;
|
||||
if ($("delete-confirm").hidden) {
|
||||
$("delete-confirm").hidden = false;
|
||||
go.textContent = "Delete for good";
|
||||
go.classList.add("is-on");
|
||||
go.disabled = true;
|
||||
$("delete-name").focus();
|
||||
return;
|
||||
}
|
||||
if ($("delete-name").value.trim() !== deleteTarget.name) return;
|
||||
sendDelete(deleteTarget);
|
||||
}
|
||||
|
||||
async function sendDelete(spec) {
|
||||
const go = $("delete-go");
|
||||
go.disabled = true;
|
||||
try {
|
||||
const res = await fetch("/submit", {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json" },
|
||||
body: JSON.stringify({ actions: [deleteAction(spec)], reply: deleteReply(spec) }),
|
||||
});
|
||||
if (res.status === 409) throw Object.assign(new Error("pending"), { pending: true });
|
||||
if (!res.ok) throw new Error(String(res.status));
|
||||
const sc = scan();
|
||||
local.deleting = { dir: spec.dir, scanAt: sc ? sc.at : null };
|
||||
// The selection must not outlive the folder: back to the default pick,
|
||||
// which the agent's fresh menu recommends for.
|
||||
if (local.specSel === spec.dir) delete local.specSel;
|
||||
pendingResult = true;
|
||||
save();
|
||||
$("delete-modal").close();
|
||||
} catch (err) {
|
||||
$("delete-modal").close();
|
||||
if (err && err.pending) pendingResult = true;
|
||||
banner(
|
||||
err && err.pending
|
||||
? "Your last pick is still being picked up, so that could not go yet. Nothing was deleted; try again in a moment."
|
||||
: "That did not go through. Nothing was deleted; try again.",
|
||||
"warn"
|
||||
);
|
||||
} finally {
|
||||
deleteTarget = null;
|
||||
render();
|
||||
}
|
||||
}
|
||||
|
||||
async function goHome() {
|
||||
const go = $("home-go");
|
||||
go.disabled = true;
|
||||
@@ -7847,7 +7982,7 @@ function downloadDoc(doc) {
|
||||
// assumptions or drafts. Without the marks a half-finished document reads,
|
||||
// once it leaves the page, as a set of decisions.
|
||||
const mark = { assumed: "> **Assumed for now, still open.**\n\n", draft: "> **Draft.**\n\n" };
|
||||
const blocks = (doc.blocks || []).map((b) => (mark[b.state] || "") + (b.md || ""));
|
||||
const blocks = (doc.blocks || []).map((b) => (mark[b.state] || "") + (typeof b.image === "string" ? b.alt || "" : b.md || ""));
|
||||
const first = (doc.blocks || [])[0];
|
||||
const titled = first && /^\s*#\s/.test(first.md || "");
|
||||
const body = [titled || !doc.title ? null : `# ${doc.title}`, ...blocks].filter((x) => x != null).join("\n\n");
|
||||
@@ -7910,6 +8045,9 @@ h4.md-h, h5.md-h, h6.md-h { font-size: 15px; }
|
||||
.md-table th, .md-table td { border: 1px solid #e4ddd1; padding: 8px 11px; text-align: left; }
|
||||
.md-table th { background: #fbf9f6; font-weight: 600; }
|
||||
.md-img { max-width: 100%; border-radius: 8px; }
|
||||
.doc-figure { margin: 0 0 13px; }
|
||||
.doc-img { display: block; max-width: 100%; border: 1px solid #e4ddd1; border-radius: 8px; }
|
||||
.doc-figure figcaption { font-size: 13px; color: #5d564d; margin-top: 6px; }
|
||||
.md a { color: #206cc3; }
|
||||
@media print {
|
||||
body { background: #fff; }
|
||||
@@ -7922,7 +8060,7 @@ h4.md-h, h5.md-h, h6.md-h { font-size: 15px; }
|
||||
// address on this origin (/state, say) would copy session data into something
|
||||
// meant to be shared. A remote image keeps its own address; anything else on
|
||||
// this origin becomes its alt text.
|
||||
const INLINE_UPLOAD = /^\/uploads\/[0-9a-f-]{36}\.jpg$/;
|
||||
const INLINE_UPLOAD = /^\/(?:uploads\/[0-9a-f-]{36}\.jpg|shots\/[A-Za-z0-9][A-Za-z0-9._-]{0,99}\.(?:png|jpe?g|webp))$/i;
|
||||
|
||||
function imageToAlt(img) {
|
||||
const alt = img.getAttribute("alt") || "";
|
||||
@@ -7977,7 +8115,7 @@ async function downloadDocHtml(doc) {
|
||||
const box = el("div", "block " + (b.state || "settled"));
|
||||
if (b.state === "assumed") box.appendChild(el("span", "block-tag", "Assumed for now, still open"));
|
||||
if (b.state === "draft") box.appendChild(el("span", "block-tag", "Draft"));
|
||||
box.appendChild(md(b.md, "md"));
|
||||
box.appendChild(blockBody(b));
|
||||
body.appendChild(box);
|
||||
}
|
||||
// Copy buttons only work inside the console.
|
||||
@@ -8160,6 +8298,20 @@ function openHelpOn(id) {
|
||||
|
||||
$("btn-home").addEventListener("click", openHomeConfirm);
|
||||
$("update-done").addEventListener("click", () => $("update-modal").close());
|
||||
$("delete-cancel").addEventListener("click", () => $("delete-modal").close());
|
||||
$("delete-go").addEventListener("click", deleteStep);
|
||||
$("delete-name").addEventListener("input", () => {
|
||||
$("delete-go").disabled = !deleteTarget || $("delete-name").value.trim() !== deleteTarget.name;
|
||||
});
|
||||
$("delete-name").addEventListener("keydown", (e) => {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
deleteStep();
|
||||
}
|
||||
});
|
||||
$("delete-modal").addEventListener("close", () => {
|
||||
deleteTarget = null;
|
||||
});
|
||||
$("home-cancel").addEventListener("click", () => $("home-modal").close());
|
||||
$("home-go").addEventListener("click", goHome);
|
||||
$("btn-stop").addEventListener("click", openStopConfirm);
|
||||
|
||||
@@ -595,6 +595,75 @@
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<!-- Codebase X-ray: seeing how it works. He holds a lens up to a file,
|
||||
a scan line sweeps down it to show the structure inside, and a rough
|
||||
spot lights up as the scan passes over it. -->
|
||||
<svg class="pose pose-xray" data-pose="xray" viewBox="0 4 240 216" aria-hidden="true" focusable="false">
|
||||
<ellipse class="shadow" cx="126" cy="198" rx="44" ry="5" />
|
||||
<g class="prop">
|
||||
<rect class="sh" x="182" y="60" width="44" height="112" rx="6" />
|
||||
<line class="lt" x1="196" y1="76" x2="196" y2="152" />
|
||||
<path class="lt" d="M196 96 L212 96 M196 124 L212 124" />
|
||||
<circle class="ac" cx="196" cy="76" r="4" />
|
||||
<circle class="ac" cx="212" cy="96" r="3.5" />
|
||||
<circle class="ac" cx="212" cy="124" r="3.5" />
|
||||
<circle class="ac" cx="196" cy="152" r="4" />
|
||||
<g class="xr-spot"><circle class="as" cx="212" cy="124" r="8" /></g>
|
||||
<line class="as xr-scan" x1="188" y1="70" x2="220" y2="70" />
|
||||
</g>
|
||||
<g class="bob">
|
||||
<g transform="translate(-14 0)">
|
||||
<rect class="fl foot f1" x="94" y="179" width="20" height="10" rx="5" />
|
||||
<rect class="fl foot f2" x="126" y="179" width="20" height="10" rx="5" />
|
||||
<rect class="sh" x="80" y="72" width="80" height="108" rx="16" />
|
||||
<path class="ln" d="M80 126 L66 150" /><circle class="fl" cx="66" cy="150" r="5.5" />
|
||||
<g class="xr-look"><path class="ey blink" d="M126 86 L129.64 94.98 L139.31 95.67 L131.9 101.92 L134.23 111.33 L126 106.2 L117.77 111.33 L120.1 101.92 L112.69 95.67 L122.36 94.98 Z" /></g>
|
||||
<path class="es" d="M110 120 Q122 129 134 120" />
|
||||
<line class="ln" x1="160" y1="126" x2="192" y2="132" />
|
||||
<g class="xr-lens">
|
||||
<line class="ln" x1="192" y1="132" x2="204" y2="120" />
|
||||
<circle class="lt" cx="214" cy="110" r="14" />
|
||||
</g>
|
||||
<circle class="fl" cx="192" cy="132" r="5.5" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<!-- Diagnose a bug: finding the cause. A small bug scuttles along one
|
||||
line of a file, his magnifier follows it until it is caught, and the
|
||||
line it sits on is marked in red. He looks, he does not fix. -->
|
||||
<svg class="pose pose-diagnose" data-pose="diagnose" viewBox="0 4 240 216" aria-hidden="true" focusable="false">
|
||||
<ellipse class="shadow" cx="126" cy="198" rx="44" ry="5" />
|
||||
<g class="prop">
|
||||
<rect class="sh" x="176" y="60" width="46" height="112" rx="6" />
|
||||
<line class="lt" x1="184" y1="78" x2="208" y2="78" />
|
||||
<line class="lt" x1="188" y1="96" x2="214" y2="96" />
|
||||
<path class="dg-mark" d="M184 124 Q187 120 190 124 T196 124 T202 124 T208 124 T214 124" />
|
||||
<line class="lt" x1="188" y1="142" x2="208" y2="142" />
|
||||
<line class="lt" x1="184" y1="158" x2="202" y2="158" />
|
||||
<g class="dg-bug">
|
||||
<path class="dg-leg" d="M195 111 L189 108 M195 115 L189 115 M195 119 L189 122 M205 111 L211 108 M205 115 L211 115 M205 119 L211 122 M198 104 L195 99 M202 104 L205 99" />
|
||||
<ellipse class="dg-body" cx="200" cy="115" rx="5.5" ry="7" />
|
||||
<circle class="dg-head" cx="200" cy="106" r="3.2" />
|
||||
</g>
|
||||
</g>
|
||||
<g class="bob">
|
||||
<g transform="translate(-14 0)">
|
||||
<rect class="fl foot f1" x="94" y="179" width="20" height="10" rx="5" />
|
||||
<rect class="fl foot f2" x="126" y="179" width="20" height="10" rx="5" />
|
||||
<rect class="sh" x="80" y="72" width="80" height="108" rx="16" />
|
||||
<path class="ln" d="M80 126 L66 150" /><circle class="fl" cx="66" cy="150" r="5.5" />
|
||||
<g class="dg-look"><path class="ey blink" d="M126 86 L129.64 94.98 L139.31 95.67 L131.9 101.92 L134.23 111.33 L126 106.2 L117.77 111.33 L120.1 101.92 L112.69 95.67 L122.36 94.98 Z" /></g>
|
||||
<path class="ln" d="M113 82 Q126 77 139 83" />
|
||||
<line class="es" x1="114" y1="124" x2="128" y2="124" />
|
||||
<line class="ln" x1="160" y1="126" x2="174" y2="140" />
|
||||
<g class="dg-lens">
|
||||
<line class="ln" x1="174" y1="140" x2="180" y2="127" />
|
||||
<circle class="lt" cx="186" cy="114" r="14" />
|
||||
</g>
|
||||
<circle class="fl" cx="174" cy="140" r="5.5" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
<!-- The Help dialog's content, cloned into #help-modal the first time ? is
|
||||
@@ -1546,7 +1615,7 @@
|
||||
<p>
|
||||
When a newer Plan2Code release is out, the dashboard shows
|
||||
<strong>UPDATE AVAILABLE</strong> at the top. Click it for the command
|
||||
to run in your terminal; × hides it until the next
|
||||
to run in your terminal, <code>plan2code update</code>; × hides it until the next
|
||||
<code>/plan2code</code>. The version at the bottom of Help links to
|
||||
the Releases page.
|
||||
</p>
|
||||
@@ -1574,6 +1643,8 @@
|
||||
<li><strong>Handoff.</strong> Pack the current session into a document a fresh session can pick up cold.</li>
|
||||
<li><strong>Changelog.</strong> Checks the CHANGELOG version against the main branch and suggests entries for what is new.</li>
|
||||
<li><strong>Git.</strong> Branches, pull, push and commits on one board, asking before anything leaves your machine. See "The git board".</li>
|
||||
<li><strong>Codebase X-ray.</strong> Explains how and why an area of the code works, or finds the rough spots worth fixing.</li>
|
||||
<li><strong>Diagnose a bug.</strong> Finds a bug's cause and writes it up without fixing it, ready to hand to Quick Task or Plan.</li>
|
||||
</ul>
|
||||
<h4>Picking a spec</h4>
|
||||
<p>
|
||||
@@ -2520,6 +2591,24 @@
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<!-- Deleting a spec from the dashboard's picker. Two deliberate steps: the
|
||||
first says what goes and that it is for good, the second wants the
|
||||
spec's name typed. The page only asks; the agent deletes. -->
|
||||
<dialog class="modal" id="delete-modal" aria-labelledby="delete-title">
|
||||
<h2 id="delete-title">Delete this spec?</h2>
|
||||
<p class="modal-blurb" id="delete-blurb"></p>
|
||||
<dl class="delete-facts" id="delete-facts"></dl>
|
||||
<p class="modal-why" id="delete-warn">This is permanent. <code>specs/</code> is not tracked by git, so nothing can bring these files back.</p>
|
||||
<div class="delete-confirm" id="delete-confirm" hidden>
|
||||
<label for="delete-name">To delete it for good, type <strong id="delete-name-hint"></strong></label>
|
||||
<input type="text" id="delete-name" autocomplete="off" spellcheck="false" />
|
||||
</div>
|
||||
<div class="modal-actions">
|
||||
<button type="button" class="btn ghost" id="delete-cancel">Keep it</button>
|
||||
<button type="button" class="btn danger" id="delete-go">Delete this spec…</button>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<dialog class="modal" id="home-modal" aria-labelledby="home-title">
|
||||
<h2 id="home-title">Leave this workflow?</h2>
|
||||
<p class="modal-blurb" id="home-blurb"></p>
|
||||
@@ -2570,7 +2659,7 @@
|
||||
</dialog>
|
||||
|
||||
<!-- Opened from the dashboard's UPDATE AVAILABLE banner. The versions and
|
||||
the copy row are filled by app.js; the update itself runs in a
|
||||
the two copy rows are filled by app.js; the update itself runs in a
|
||||
terminal, never from this page. -->
|
||||
<dialog class="modal" id="update-modal" aria-labelledby="update-title">
|
||||
<h2 id="update-title">A new Plan2Code is available</h2>
|
||||
@@ -2579,7 +2668,11 @@
|
||||
<li>
|
||||
Run this in your terminal (not in this page or your agent):
|
||||
<div class="update-command" id="update-command"></div>
|
||||
It opens the installer's menu. Back at your prompt with no output at all? npm
|
||||
It updates everything that was installed (the skills, the <code>plan2code</code>
|
||||
command and any extras you added), with no menu. If the <code>plan2code</code>
|
||||
command is not installed, run this instead:
|
||||
<div class="update-command" id="update-fallback"></div>
|
||||
Back at your prompt with no output at all? npm
|
||||
could not reach the repository and hid the reason: run
|
||||
<code>git ls-remote https://github.com/jparkerweb/plan2code.git</code> to see it.
|
||||
</li>
|
||||
|
||||
@@ -30,14 +30,16 @@ export const WEIGHTS = Object.freeze({
|
||||
"git-commits": 0,
|
||||
"git-conflict": 1,
|
||||
changelog: 1,
|
||||
xray: 1,
|
||||
diagnose: 1,
|
||||
});
|
||||
|
||||
// Workflows whose launch itself scores WEIGHTS[workflow]. Pathfinder,
|
||||
// implement and implement-review score only through the agent's `run`
|
||||
// reports; dashboard and handoff never score; git and changelog score 1 on
|
||||
// reports; dashboard and handoff never score; git, changelog, xray and diagnose score 1 on
|
||||
// launch (Git then adds its commit tally and conflict help).
|
||||
export const LAUNCH_COUNTED = Object.freeze(
|
||||
new Set(["plan", "revise-plan", "document", "review", "quick-task", "init", "init-update", "finalize", "git", "changelog"])
|
||||
new Set(["plan", "revise-plan", "document", "review", "quick-task", "init", "init-update", "finalize", "git", "changelog", "xray", "diagnose"])
|
||||
);
|
||||
|
||||
// Git's commits weigh what they add up to: each `git-commits` run carries
|
||||
@@ -140,6 +142,8 @@ const WORKFLOW_NAMES = Object.freeze({
|
||||
handoff: "Handoff",
|
||||
git: "Git",
|
||||
changelog: "Changelog",
|
||||
xray: "X-ray",
|
||||
diagnose: "Diagnose",
|
||||
});
|
||||
|
||||
// The skill run an entry belongs to, from its ledger id ("L3:..." -> "L3").
|
||||
@@ -157,6 +161,8 @@ const LAUNCH_LABELS = Object.freeze({
|
||||
finalize: "Finalize started",
|
||||
git: "Git started",
|
||||
changelog: "Changelog started",
|
||||
xray: "X-ray started",
|
||||
diagnose: "Diagnose started",
|
||||
});
|
||||
const RUN_LABELS = Object.freeze({
|
||||
"pathfinder-chart": "Pathfinder map written",
|
||||
@@ -177,6 +183,8 @@ const RUN_LABELS = Object.freeze({
|
||||
"git-commits": "Commits in Git",
|
||||
"git-conflict": "Git conflict help",
|
||||
changelog: "Changelog run",
|
||||
xray: "X-ray run",
|
||||
diagnose: "Diagnose run",
|
||||
});
|
||||
|
||||
// The unit a run names, from its ledger id ("L3:phase-2" -> "phase-2").
|
||||
|
||||
@@ -24,7 +24,7 @@ export const SUBAGENT_WORKFLOWS = Object.freeze({
|
||||
}),
|
||||
review: Object.freeze({
|
||||
instruction:
|
||||
"Split the review across helpers by area (for example correctness, tests and security), then merge and de-duplicate their findings yourself before you report.",
|
||||
"Run the review's analysis in one fresh helper briefed only with the spec and the change set (references/reviewer-brief.md); verify every finding yourself before you report.",
|
||||
}),
|
||||
pathfinder: Object.freeze({
|
||||
instruction:
|
||||
|
||||
Reference in new issue
Block a user