mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 04: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
@@ -52,6 +52,10 @@ All notable changes to Plan2Code will be documented in this file.
|
||||
- **custom agents**: add your own agent CLIs in the web console under **User Preferences → Agents & models** (name, command, arguments with `{prompt}` and `{model}` tokens, start prompt, bypass arguments, models) with a **Test** button that shows where the command is found. They are saved in `~/.plan2code/agents.json`, listed after Claude Code, Devin and Codex by both the `plan2code` command (`--cli <id>` picks one) and the desktop app, and New Session reuses the same agent. A broken file or entry is skipped with a warning and never stops anything. `/plan2code` only works in an agent that loads the installed Plan2Code skills; a blank start prompt starts the agent with nothing typed.
|
||||
- **desktop app**: when no agent CLI is installed, the first-run checklist and the launch card explain what to install, with each agent's install command, an **Install page** link, and a **Check again** button that finds a newly installed agent (or a custom one) without restarting the app.
|
||||
- **desktop app**: the taskbar entry now shows when Plan2Code needs you, mirroring the console's tab icon. Windows: a green dot on your move (a finished screen too, while it still offers a button to press, such as back to the dashboard or a review), a red dot on needs attention (or a finished screen whose press was never collected), none while busy or once nothing is left to press, and one short burst of flashes when the window is not focused (the button stays lit until focused). macOS: a red `!` dock badge on needs attention and one bounce (the system badge cannot be green). Linux: a count badge where the desktop supports it, plus the urgency hint. The dot clears when the agent ends, the page reloads or the page stops answering. **User Preferences → System → Desktop app** (inside the app only) has the switch **Show on the taskbar when Plan2Code needs me**, on by default and saved in the app's own `app.json`.
|
||||
- **pr-prep**: a new dashboard utility, **Get a PR ready** (`/plan2code-pr-prep`), for the moment before you open a pull request. It reads what changed on the branch, asks first whether to include uncommitted work, and picks the checks that cover the changes from the project's test map (or, with no map, from commands it finds in the project's config files and confirms with you), each with a reason, plus the full suite when shared ground was touched. You untick what to skip; it runs the rest with a timeout per check and says **Ready**, **Ready with notes** (something trimmed, timed out, could not start, or a changed file no test covers) or **Not ready**. It writes a PR description to copy, following the repo's pull-request template when there is one, with the create-a-PR link (no `gh` needed), and offers to save the report as `PR-READINESS-<date>.md` in the branch's spec folder. It never commits, pushes or opens the PR.
|
||||
- **test**: a new dashboard utility, **Write missing tests** (`/plan2code-test`). It asks where to look (the branch's changes, a folder or the whole project), finds the source files no test covers by matching them to tests by name, folder and imports, and offers a real coverage run on top when the project already has a coverage tool (Node's test runner, Jest, Go, or Vitest, pytest-cov and Coverlet when installed), never running it silently. The plan opens with **How this project writes tests** for each runner (folder, file naming, command, helpers, assertion style), so the new tests match the old ones; on your approval it writes and runs unit and integration tests. It never changes source code: a test that exposes a real bug is kept, on a yes, as the reproduction for `/plan2code-diagnose`. A project with no runner is offered its language's built-in one (`node --test`, `unittest`, `go test`, `cargo test`), and a job past 8 source files, 8 new test files or 2 runners can **Continue** with the top 8 gaps or **Escalate** to a PLAN-DRAFT that `/plan2code-1-plan` resumes at Phase 2.
|
||||
- **test map**: projects can describe their tests in one Markdown table under `## Test map` in `AGENTS.md` (or behind one link to `.agents-docs/AGENTS-test-map.md`), with the columns `Area`, `Paths` (globs), `Run` (the command for that area) and `Shared` (`yes` when a change there reaches everything). PR Prep and Test read it to pick checks and runners, and offer to write or update it at the end of a run. **Init** proposes one when it finds test commands, and **Init Update** checks an existing map's paths and commands still match the project and offers one when tests exist but no map does; nothing is written without a yes.
|
||||
- **git**: after a push or publish, or when the branch is pushed with nothing left to commit, the git skill now names `/plan2code-pr-prep` as the likely next step: run the checks and write the PR description.
|
||||
- **web console**: a one-answer question (a pick-one list, or a menu) now has a **Clear** button under its options that takes the card back to how it arrived: no pick, and nothing in **Something else**. A radio pick cannot be unticked by clicking it again, so before this a stray pick could only be swapped for another. The button shows only while the answer has not been sent.
|
||||
|
||||
- **contributors**: `npm run play` opens the web console straight from `src/` with the server reading each page file fresh, so a change to an Activities game shows on the next page reload, without `npm run build:skills` or a reinstall.
|
||||
|
||||
Reference in new issue
Block a user