mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 20:45:33 -08:00
Add the Test skill: find untested code and write tests in the project's style
AI Assisted
This commit is contained in:
1 parent
88c72dc2ce
commit
6cd7a7ff80
21 files changed
+753
-16
No files matched your search
@@ -428,6 +428,12 @@
|
||||
<path d="M9 2.5h6a1 1 0 0 1 1 1V5a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1z" />
|
||||
<path d="m9 13.5 2 2 4-4.5" />
|
||||
</symbol>
|
||||
<!-- Write missing tests: a test tube. -->
|
||||
<symbol id="ci-test" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M9 3h6" />
|
||||
<path d="M10 3v14.5a2 2 0 0 0 4 0V3" />
|
||||
<path d="M10 12h4" />
|
||||
</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" />
|
||||
@@ -866,6 +872,33 @@
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<!-- Test: writing the missing tests. He holds up a test tube, bubbles
|
||||
rise through its liquid and a star bubble floats out of the top,
|
||||
his star looking up after it before the next one forms. -->
|
||||
<svg class="pose pose-test" data-pose="test" 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="ts-tube">
|
||||
<path class="ac" d="M189 116 L189 146 A7 7 0 0 0 203 146 L203 116 Z" />
|
||||
<circle class="ts-bub ts-b1" cx="194" cy="146" r="2" />
|
||||
<circle class="ts-bub ts-b2" cx="199" cy="144" r="1.6" />
|
||||
<circle class="ts-bub ts-b3" cx="196" cy="148" r="1.4" />
|
||||
<path class="lt" d="M186 76 L186 146 A10 10 0 0 0 206 146 L206 76" />
|
||||
<line class="lt" x1="181" y1="76" x2="211" y2="76" />
|
||||
<g class="ts-star"><path class="ac" transform="translate(196 60) scale(0.45) translate(-126 -99)" 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>
|
||||
</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" />
|
||||
<g class="ts-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="198" y2="134" />
|
||||
<circle class="fl" cx="200" cy="134" r="5.5" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<!-- Agent setup: waving hello at a terminal window, its prompt waiting
|
||||
for the command line that brings an agent. -->
|
||||
<svg class="pose pose-setup" data-pose="setup" viewBox="0 4 240 216" aria-hidden="true" focusable="false">
|
||||
|
||||
@@ -404,6 +404,28 @@ export const SKILLS = Object.freeze([
|
||||
"Before you open a pull request. PR Prep reads what changed on the branch and picks the checks that cover it from the project's test map (or from its config files when there is no map), each with a reason. You untick what to skip, then it runs the rest and says Ready, Ready with notes or Not ready. It writes a PR description to copy, following the repo's template when there is one, and gives the link to open the PR. It never commits, pushes or opens the PR for you.",
|
||||
},
|
||||
}),
|
||||
skill({
|
||||
skill: "plan2code-test",
|
||||
workflow: "test",
|
||||
label: "Testing",
|
||||
name: "Test",
|
||||
pose: "test",
|
||||
builds: false, phased: false, metered: true, templates: false,
|
||||
weight: 1, started: "Test started", ran: "Test run", resume: null,
|
||||
subagents: "Use helpers to read the nearest tests and runner configs for each runner group. Keep the gaps, the plan, the style block, every question and the writing of tests with you. Light strength, low effort.",
|
||||
states: "any",
|
||||
greyed: null,
|
||||
card: {
|
||||
group: "extra",
|
||||
chip: "Utility",
|
||||
title: "Write missing tests",
|
||||
icon: "test",
|
||||
blurb: "Finds code with no tests and writes them in your project's own style.",
|
||||
help: "Finds untested files, shows a test plan in the project's style, then writes and runs unit and integration tests.",
|
||||
about:
|
||||
"When parts of the code have no tests. Test asks where to look (the branch's changes, one folder or the whole project) and finds the files no test covers, and offers a real coverage run when the project already has a coverage tool. It shows a plan that opens with how this project writes tests, so the new tests match the old ones, then writes and runs unit and integration tests. It never changes source code: a test that finds a real bug is handed to Diagnose.",
|
||||
},
|
||||
}),
|
||||
skill({
|
||||
skill: "plan2code-changelog",
|
||||
workflow: "changelog",
|
||||
|
||||
@@ -449,6 +449,30 @@
|
||||
50%, 88% { transform: translate(4px, 2px); }
|
||||
}
|
||||
|
||||
/* Test -- bubbles rise through the tube's liquid, then a star bubble floats
|
||||
out of the top and fades; his star looks up after it. */
|
||||
.pose .ts-bub { fill: var(--panel-2); }
|
||||
.pose .ts-b1 { animation: ts-rise 2.4s ease-in infinite; }
|
||||
.pose .ts-b2 { animation: ts-rise 2.4s ease-in 0.8s infinite; }
|
||||
.pose .ts-b3 { animation: ts-rise 2.4s ease-in 1.6s infinite; }
|
||||
@keyframes ts-rise {
|
||||
0% { transform: translateY(0); opacity: 0; }
|
||||
15%, 80% { opacity: 1; }
|
||||
100% { transform: translateY(-26px); opacity: 0; }
|
||||
}
|
||||
.pose .ts-star { animation: ts-float 4.8s ease-out infinite; }
|
||||
@keyframes ts-float {
|
||||
0%, 30% { transform: translateY(14px) scale(0.4); opacity: 0; }
|
||||
40% { opacity: 1; }
|
||||
85% { transform: translateY(-26px) scale(1); opacity: 1; }
|
||||
100% { transform: translateY(-34px) scale(1); opacity: 0; }
|
||||
}
|
||||
.pose .ts-look { animation: ts-look 4.8s ease-in-out infinite; }
|
||||
@keyframes ts-look {
|
||||
0%, 30%, 100% { transform: translate(4px, 0); }
|
||||
60%, 85% { transform: translate(4px, -4px); }
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.dash { padding-top: 0; }
|
||||
.launch-stage { height: 140px; }
|
||||
|
||||
Reference in new issue
Block a user