Add the git-commit skill and dashboard card, and the No changes button, as v2.6.0

AI Assisted
This commit is contained in:
jparkerweb committed 2026-10-07 23:18:40 -07:00
1 parent 1877ca1fa7
commit 50a78a6917
37 files changed
+1001 -141

No files matched your search

+31 -4
View File
@@ -247,6 +247,7 @@ export const WORKFLOW_LABEL = {
"quick-task": "Quick task",
finalize: "Wrapping up",
handoff: "Handoff",
"git-commit": "Git commit",
};
export function workflowLabel(workflow) {
@@ -271,6 +272,7 @@ export const CONSOLE_WORKFLOWS = [
"/plan2code-review",
"/plan2code-4-finalize",
"/plan2code-handoff",
"/plan2code-git-commit",
];
// Rides on the end of the command as part of the skill's argument. Every
@@ -434,6 +436,8 @@ export function resumeCommand({ workflow, specDir } = {}) {
return withOverview("/plan2code-4-finalize");
case "handoff":
return "/plan2code-handoff";
case "git-commit":
return "/plan2code-git-commit";
default:
return dir ? `/plan2code-0-pathfinder ${dir}/pathfinder` : "/plan2code-0-pathfinder";
}
@@ -638,6 +642,17 @@ export const SKILL_CATALOG = [
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.",
},
{
skill: "plan2code-git-commit",
command: "/plan2code-git-commit",
workflow: "git-commit",
group: "extra",
chip: "Utility",
title: "Git commit",
blurb: "Commits your changes with a clear message, suggests a split when it is really two jobs, and offers to push.",
about:
"Reads what changed and drafts the commit message for you to approve. On the main branch it offers a new one first, and when the work is really two jobs it suggests splitting it into separate commits. It asks before every commit and every push, and never force-pushes.",
},
];
// A workflow by the name its dashboard card gives it ("Implement"), for the
@@ -660,6 +675,7 @@ export const START_POSES = [
"quick-task",
"review",
"handoff",
"git-commit",
];
const POSE_ALIASES = { "init-update": "init", "revise-plan": "plan", "implement-review": "implement" };
@@ -699,19 +715,21 @@ const NEXT_FOR_STATE = {
};
const ON = { on: true };
export const GIT_INIT_NOTE = "Not a git repository yet: it offers to start one";
const off = (reason) => ({ on: false, reason });
/**
* Whether a catalog card is clickable for the current picker selection.
*
* `scan` is the server's project scan ({ hasAgents, specs }); `sel` is the
* `scan` is the server's project scan ({ hasAgents, isGit, specs }); `sel` is the
* picked spec object or null for "start from scratch". A spec whose files
* match no pipeline shape ("unrecognized") behaves like no spec at all for
* availability — but its folder still goes along on a Pathfinder or Plan
* launch, since the files may be reference docs.
*
* Returns { on, reason?, next? } — `reason` is the one line a greyed card
* shows, `next` marks the state's natural step.
* Returns { on, reason?, note?, next? } — `reason` is the one line a greyed card
* shows, `note` the one line a clickable card shows when there is something to
* know before launching it, `next` marks the state's natural step.
*/
export function cardAvailability(entry, scan, sel) {
const hasAgents = Boolean(scan && scan.hasAgents);
@@ -727,6 +745,8 @@ export function cardAvailability(entry, scan, sel) {
case "plan2code-review":
case "plan2code-handoff":
return ON;
case "plan2code-git-commit":
return scan && scan.isGit === false ? { on: true, note: GIT_INIT_NOTE } : ON;
case "plan2code-0-pathfinder":
if (!state || state === "exploring") return { ...ON, next };
return off("This spec is already past the questions");
@@ -763,7 +783,14 @@ export function cardPresentation(entry, scan, sel, menu = {}) {
const recommendation = requested && cardAvailability(requested, scan, sel).on ? requested.skill : null;
const recommended = availability.on && (recommendation ? entry.skill === recommendation : availability.next);
const supplied = initial && menu.details && typeof menu.details[entry.skill] === "string" ? menu.details[entry.skill] : "";
const detail = availability.on && supplied ? supplied : !initial && availability.next && sel && sel.detail ? sel.detail : "";
const detail =
availability.on && supplied
? supplied
: availability.on && availability.note
? availability.note
: !initial && availability.next && sel && sel.detail
? sel.detail
: "";
return { ...availability, recommended, detail };
}
+14
View File
@@ -3419,6 +3419,20 @@ a.icon-btn { box-sizing: border-box; text-decoration: none; }
100% { transform: translateX(8px); opacity: 0; }
}
/* Git commit -- the arm reaches out and a new commit settles onto the branch
line in step with it. */
.pose .gc-reach { transform-origin: 0% 50%; animation: gc-reach 2.4s ease-in-out infinite; }
@keyframes gc-reach {
0%, 100% { transform: scaleX(0.9); }
50% { transform: scaleX(1); }
}
.pose .gc-dot { animation: gc-dot 2.4s ease-in-out infinite; }
@keyframes gc-dot {
0%, 15% { opacity: 0; transform: translateY(-8px); }
50%, 85% { opacity: 1; transform: translateY(0); }
100% { opacity: 0; transform: translateY(0); }
}
@media (max-width: 720px) {
.dash { padding-top: 0; }
.launch-stage { height: 140px; }
+15 -2
View File
@@ -4712,15 +4712,22 @@ function buildList(card, item, staged) {
}
card.appendChild(row);
card.appendChild(el("p", "help", "Drag to reorder, click a name to rename it."));
commentField(card, item, "Anything else about this breakdown? (type 'no changes' if none)");
commentField(card, item, "Anything else about this breakdown?", false, "no changes");
}
function commentField(card, item, labelText, required) {
function commentField(card, item, labelText, required, quickText) {
const wrap = el("div", "field");
const id = "note-" + item.id;
const label = el("label", null, labelText);
label.htmlFor = id;
wrap.appendChild(label);
let quick = null;
if (quickText) {
quick = el("button", "btn tiny", quickText.charAt(0).toUpperCase() + quickText.slice(1));
quick.type = "button";
quick.title = "Fill in \"" + quickText + "\"";
wrap.appendChild(quick);
}
const ta = el("textarea");
ta.id = id;
ta.placeholder = required ? "Tell Plan2Code what to change." : "Optional.";
@@ -4741,6 +4748,12 @@ function commentField(card, item, labelText, required) {
stagedChanged();
});
wrap.appendChild(ta);
if (quick)
quick.addEventListener("click", () => {
ta.value = quickText;
ta.dispatchEvent(new Event("input", { bubbles: true }));
ta.focus();
});
card.appendChild(wrap);
}
+27
View File
@@ -538,6 +538,32 @@
</g>
<g class="ho-arrow"><path class="as" d="M178 64 L214 64 M204 54 L216 64 L204 74" /></g>
</svg>
<!-- Git commit: saving a step. Beside a branch line with two commits on
it, one arm reaches to set a third commit onto the line. -->
<svg class="pose pose-git-commit" data-pose="git-commit" viewBox="0 4 240 216" aria-hidden="true" focusable="false">
<ellipse class="shadow" cx="126" cy="198" rx="44" ry="5" />
<g class="prop">
<line class="lt gc-line" x1="204" y1="62" x2="204" y2="172" />
<circle class="ac" cx="204" cy="82" r="7" />
<circle class="ac" cx="204" cy="112" r="7" />
<circle class="ac gc-dot" cx="204" cy="142" r="7" />
</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" />
<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" />
<path class="es" d="M110 120 Q122 129 134 120" />
<g class="gc-reach">
<line class="ln" x1="160" y1="126" x2="212" y2="142" />
<circle class="fl" cx="212" cy="142" r="5.5" />
</g>
</g>
</g>
</svg>
</template>
<!-- The Help dialog's content, cloned into #help-modal the first time ? is
@@ -1341,6 +1367,7 @@
<li><strong>Quick task.</strong> Too small for the full process? A quick plan, then it just builds it.</li>
<li><strong>Review.</strong> A second opinion on the changes. Problems ranked, and you pick what gets fixed.</li>
<li><strong>Handoff.</strong> Pack this conversation into a document a fresh session can pick up cold.</li>
<li><strong>Git commit.</strong> Commits your changes with a clear message, suggests a split when it is really two jobs, and offers to push.</li>
</ul>
<h4>Picking a spec</h4>
<p>
+6 -2
View File
@@ -25,13 +25,14 @@ export const WEIGHTS = Object.freeze({
"init-update": 2,
finalize: 1,
handoff: 0,
"git-commit": 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.
// reports; dashboard and handoff never score; git-commit scores 1 on launch.
export const LAUNCH_COUNTED = Object.freeze(
new Set(["plan", "revise-plan", "document", "review", "quick-task", "init", "init-update", "finalize"])
new Set(["plan", "revise-plan", "document", "review", "quick-task", "init", "init-update", "finalize", "git-commit"])
);
const weightOf = (key) => (Object.prototype.hasOwnProperty.call(WEIGHTS, key) ? WEIGHTS[key] : 0);
@@ -126,6 +127,7 @@ const WORKFLOW_NAMES = Object.freeze({
"init-update": "Init update",
finalize: "Finalize",
handoff: "Handoff",
"git-commit": "Git commit",
});
// The skill run an entry belongs to, from its ledger id ("L3:..." -> "L3").
@@ -141,6 +143,7 @@ const LAUNCH_LABELS = Object.freeze({
init: "Init started",
"init-update": "Init update started",
finalize: "Finalize started",
"git-commit": "Git commit started",
});
const RUN_LABELS = Object.freeze({
"pathfinder-chart": "Pathfinder map written",
@@ -157,6 +160,7 @@ const RUN_LABELS = Object.freeze({
"init-update": "Init update run",
finalize: "Finalize run",
handoff: "Handoff written",
"git-commit": "Git commit run",
});
// The unit a run names, from its ledger id ("L3:phase-2" -> "phase-2").
+1 -1
View File
@@ -185,7 +185,7 @@ export function checkHelpers(list) {
// are tested without a browser. `frame` is the state frame's `subagents`
// block; app.js only renders what these say.
export const CHECKIN_LINE = "Helpers report through Plan2Code, so their progress shows here at its check-ins, not live.";
export const CHECKIN_LINE = "Helpers report through Plan2Code, so their progress is shown as it checks-in, not live.";
const STATE_LABELS = Object.freeze({ running: "Running", done: "Done", failed: "Failed" });