Add the UI Prototype skill, and have Quick Task confirm a saved prototype's brief before planning

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-11 22:01:55 -08:00
1 parent 2f790027a9
commit 54b316cdf3
130 files changed
+8065 -50

No files matched your search

+6 -2
View File
@@ -757,12 +757,16 @@ export function toggleNoteTick(ticked, id) {
/**
* 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.
* first, or a folder holding only saved prototypes (files on disk with a
* `prototypes` count), which it builds from. A mid-pipeline spec with
* prototypes is Implement's to build. 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;
if (entry.skill !== "plan2code-quick-task") return null;
const prototypeOnly = sel.state === "unrecognized" && sel.prototypes > 0;
return sel.state === "diagnosed" || prototypeOnly ? sel : null;
}
export function cardPresentation(entry, scan, sel, menu = {}) {
+34
View File
@@ -446,6 +446,14 @@
<circle cx="14.5" cy="11" r="1.5" />
<path d="M10 19v2M12 19v2M14 19v2" />
</symbol>
<!-- UI Prototype: a framed screen with three sliders. -->
<symbol id="ci-ui-prototype" viewBox="0 0 24 24" fill="none">
<rect x="3" y="4" width="18" height="16" rx="2" />
<path d="M7 9h10M7 12h10M7 15h10" />
<circle cx="10" cy="9" r="1.2" />
<circle cx="14.5" cy="12" r="1.2" />
<circle cx="9" cy="15" r="1.2" />
</symbol>
<!-- Changelog: a version tag. -->
<symbol id="ci-changelog" viewBox="0 0 24 24" fill="none">
<path d="M3 4a1 1 0 0 1 1-1h7.6a2 2 0 0 1 1.4.6l7.4 7.4a2 2 0 0 1 0 2.8l-5.6 5.6a2 2 0 0 1-2.8 0L4.6 12a2 2 0 0 1-.6-1.4z" />
@@ -734,6 +742,32 @@
<g class="ho-arrow"><path class="as" d="M178 64 L214 64 M204 54 L216 64 L204 74" /></g>
</svg>
<!-- UI Prototype: showing a screen off. He holds a framed screen up
beside him, and its three dials slide in turn as he tunes it. -->
<svg class="pose pose-ui-prototype" data-pose="ui-prototype" viewBox="0 4 240 216" aria-hidden="true" focusable="false">
<ellipse class="shadow" cx="126" cy="198" rx="44" ry="5" />
<g class="bob">
<g class="up-screen">
<rect class="sh" x="166" y="50" width="62" height="70" rx="8" />
<line class="lt" x1="178" y1="70" x2="216" y2="70" />
<line class="lt" x1="178" y1="86" x2="216" y2="86" />
<line class="lt" x1="178" y1="102" x2="216" y2="102" />
<g class="up-knob k1"><circle class="ac" cx="188" cy="70" r="4.5" /></g>
<g class="up-knob k2"><circle class="ac" cx="204" cy="86" r="4.5" /></g>
<g class="up-knob k3"><circle class="ac" cx="186" cy="102" r="4.5" /></g>
</g>
<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" />
<line class="ln" x1="160" y1="126" x2="192" y2="122" />
<circle class="fl" cx="194" cy="122" r="5.5" />
</g>
</g>
</svg>
<!-- Changelog: keeping the record. A page of release notes stands beside him,
and one arm reaches over to write the newest line onto it. -->
<svg class="pose pose-changelog" data-pose="changelog" viewBox="0 4 240 216" aria-hidden="true" focusable="false">
+4
View File
@@ -22,6 +22,9 @@ const EVENT_WEIGHTS = {
// Scores 0 itself: Git's commits are tallied per run (COMMITS_PER_POINT).
"git-commits": 0,
"git-conflict": 1,
// UI Prototype scores per round drawn, not per launch: one point a round,
// wherever the round runs (its own skill or a host skill that offers it).
"ui-prototype-round": 1,
};
// A skill's fields as a table by workflow, leaving out the entries without one.
const bySkill = (field) => Object.fromEntries(FLOW_SKILLS.filter((s) => s[field] !== null).map((s) => [s.workflow, s[field]]));
@@ -137,6 +140,7 @@ export const RUN_LABELS = Object.freeze({
"implement-review-phase": "Implement + Review phase built",
"git-commits": "Commits in Git",
"git-conflict": "Git conflict help",
"ui-prototype-round": "Prototype round drawn",
...bySkill("ran"),
});
+2 -1
View File
@@ -1123,7 +1123,8 @@ export 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, save Quick Task on a diagnosed bug.
// a spec is selected, save Quick Task on a diagnosed bug or a folder of
// saved prototypes (launchTarget).
if (target) action.spec = target.dir;
// A Notebook tab picked in the pane rides the hop in this page only, never
// on the action: the launched skill's `fill: "note"` box is filled from it
+25
View File
@@ -448,6 +448,31 @@ export const SKILLS = Object.freeze([
"For code nothing calls anymore. Dead Code uses the project's own dead-code tool when there is one (Knip, vulture, cargo check and others), or searches by itself when there is not, then checks every item for callers across the whole project. Each one gets a label: Safe to remove, Check first or Warning, with the reason. It removes only what you pick, runs the tests and build, and puts back anything that breaks them. It never commits and never installs anything.",
},
}),
skill({
skill: "plan2code-ui-prototype",
workflow: "ui-prototype",
label: "UI prototype",
name: "UI Prototype",
pose: "ui-prototype",
// The launch scores nothing (not metered, no `weight`, as Pathfinder): each
// round drawn scores through the `ui-prototype-round` run event in meter.js.
builds: false, phased: false, metered: false, templates: false,
weight: null, started: null, ran: null, resume: null,
subagents: null,
states: "any",
greyed: null,
card: {
group: "extra",
chip: "Utility",
spec: true,
title: "Prototype a screen",
icon: "ui-prototype",
blurb: "Several versions of a screen on one page, tuned with live dials, and your pick brought back.",
help: "Draws several versions of a screen or flow on one page with live dials; Copy and paste brings your pick back, saved into a spec only when you say.",
about:
"For when you want to see a screen before it gets built. UI Prototype draws several versions of a screen or flow on one page that opens in your browser. Flip between them, tune fonts, colors, spacing and feel with live dials, then press Copy and paste the result back so the next round starts from your pick. Nothing is saved into a spec until you say so, and it never changes your code.",
},
}),
skill({
skill: "plan2code-changelog",
workflow: "changelog",
+11
View File
@@ -488,6 +488,17 @@
14%, 56% { transform: translate(5px, -2px); }
}
/* UI Prototype -- he holds a screen up, and its three dials slide one after
another, as if he were tuning it. */
.pose .up-knob { animation: up-knob 4.2s ease-in-out infinite; }
.pose .up-knob.k2 { animation-delay: -1.4s; }
.pose .up-knob.k3 { animation-delay: -2.8s; }
@keyframes up-knob {
0%, 20%, 100% { transform: translateX(0); }
40%, 60% { transform: translateX(12px); }
80% { transform: translateX(4px); }
}
@media (max-width: 720px) {
.dash { padding-top: 0; }
.launch-stage { height: 140px; }