mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-12-04 00:15:41 -08:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a03b825951 | ||
|
|
44434d5264 |
No files matched your search
@@ -4,10 +4,12 @@
|
||||
## Common Commands
|
||||
|
||||
```bash
|
||||
# Install dev dependencies (sets up husky pre-commit hooks only; each sub-package
|
||||
# below needs its own npm install. Running `npm test` needs Node 20+; users of
|
||||
# Install dev dependencies, then turn on the husky pre-commit hooks, once per clone. Never put
|
||||
# this in a `prepare` script: the install ref publisher refuses it, since npm would install
|
||||
# every dev dependency on each user's machine. (Each sub-package below needs its own npm install. Running `npm test` needs Node 20+; users of
|
||||
# the installed skills still need only Node 18+)
|
||||
npm install
|
||||
npm run setup:hooks
|
||||
|
||||
# Run the interactive installer
|
||||
node install.js
|
||||
|
||||
@@ -193,7 +193,7 @@ jobs:
|
||||
# The README's first install is `npx --allow-git=all git+https://github.com/jparkerweb/plan2code.git#release`, so new users
|
||||
# get the newest release and never a half-finished main, and exact updates fetch the
|
||||
# immutable `install-vX.Y.Z` tag. scripts/publish-install-refs.mjs builds one synthetic
|
||||
# commit holding only the runtime payload (install.js, package.json, version.json, src/)
|
||||
# commit holding only the runtime payload (install.js, package.json, version.json, LICENSE, NOTICE, src/)
|
||||
# and a manifest binding it to this tag, then pushes it to both refs in one atomic push.
|
||||
# Last step, after the release is public: a failure earlier leaves both refs on the
|
||||
# previous release. Fast-forward only (no --force), and an existing install tag is never
|
||||
|
||||
@@ -4,6 +4,17 @@ All notable changes to Plan2Code will be documented in this file.
|
||||
|
||||
<!-- Format from 3.1.0 on: `## vX.Y.Z (YYYY-MM-DD)` with the date from version.json; a minor release opens with a three-bullet `### Highlights`; sections run Added, Changed, Fixed; game changes sit under one Activities line; tooling and test lines go under "For contributors". Older headings have no date and are not backfilled. -->
|
||||
|
||||
## v3.2.5 (2026-12-03)
|
||||
|
||||
### 🔧 Changed
|
||||
|
||||
- **Installer**: the slim install refs also carry `LICENSE` and `NOTICE`.
|
||||
- **For contributors**: run `npm run setup:hooks` once after `npm install` to turn on the pre-commit hooks; the `prepare` script that did it is gone.
|
||||
|
||||
### 🐛 Fixed
|
||||
|
||||
- **Installer**: the slim install refs announced in v3.2.4 were not published with it, because the release step refuses a `package.json` with a `prepare` script, so first installs kept getting v3.2.3. `npm test` now checks the real `package.json` for such scripts.
|
||||
|
||||
## v3.2.4 (2026-12-03)
|
||||
|
||||
### ✨ Added
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
Plan2Code is a spec-driven workflow for AI coding agents. You work through it on a page in your browser: the dashboard lists every step as a card, and each step's questions, progress and sign-offs arrive on that same page while your agent does the work. An approved plan becomes phase documents, and the agent builds to them one phase at a time.
|
||||
|
||||
Version 3.2.4 · Apache 2.0 · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com)
|
||||
Version 3.2.5 · Apache 2.0 · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com)
|
||||
|
||||
---
|
||||
|
||||
@@ -128,7 +128,7 @@ cd plan2code
|
||||
node install.js
|
||||
|
||||
# Only if you plan to modify or contribute to Plan2Code itself
|
||||
npm install && npx husky
|
||||
npm install && npm run setup:hooks
|
||||
```
|
||||
</details>
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "plan2code",
|
||||
"version": "3.2.4",
|
||||
"version": "3.2.5",
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
@@ -10,7 +10,7 @@
|
||||
"plan2code-install": "./install.js"
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "husky",
|
||||
"setup:hooks": "husky",
|
||||
"build:skills": "node install.js --build-skills",
|
||||
"fix:eol": "node scripts/fix-line-endings.mjs",
|
||||
"set-version": "node scripts/set-version.mjs",
|
||||
|
||||
Generated
+2
-2
@@ -957,7 +957,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "fake-agent"
|
||||
version = "3.2.4"
|
||||
version = "3.2.5"
|
||||
dependencies = [
|
||||
"serde_json",
|
||||
"terminal_size",
|
||||
@@ -2647,7 +2647,7 @@ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
|
||||
|
||||
[[package]]
|
||||
name = "plan2code-app"
|
||||
version = "3.2.4"
|
||||
version = "3.2.5"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"libc",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "fake-agent"
|
||||
version = "3.2.4"
|
||||
version = "3.2.5"
|
||||
description = "A stand-in agent program for the Plan2Code app's tests"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "plan2code-app",
|
||||
"version": "3.2.4",
|
||||
"version": "3.2.5",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "plan2code-app",
|
||||
"version": "3.2.4",
|
||||
"version": "3.2.5",
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.12.4",
|
||||
"@xterm/addon-fit": "0.11.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "plan2code-app",
|
||||
"version": "3.2.4",
|
||||
"version": "3.2.5",
|
||||
"private": true,
|
||||
"description": "Plan2Code desktop app (Tauri). Separate from the repo root so the root and the web console stay dependency-free.",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "plan2code-app"
|
||||
version = "3.2.4"
|
||||
version = "3.2.5"
|
||||
description = "Plan2Code desktop app"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "Plan2Code",
|
||||
"version": "3.2.4",
|
||||
"version": "3.2.5",
|
||||
"identifier": "com.plan2code.desktop",
|
||||
"build": {
|
||||
"frontendDist": "../ui",
|
||||
|
||||
@@ -57,6 +57,8 @@ export function compactRuntimeFiles(version) {
|
||||
"install.js": readRepo("install.js"),
|
||||
"package.json": `${JSON.stringify(pkg, null, 2)}\n`,
|
||||
"version.json": `${JSON.stringify(versionJson, null, 2)}\n`,
|
||||
"LICENSE": readRepo("LICENSE"),
|
||||
"NOTICE": readRepo("NOTICE"),
|
||||
};
|
||||
|
||||
for (const rel of walkFiles(path.join(ROOT, "src"), path.join(ROOT, "src"))) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
// Publishes the slim install refs of one release: a synthetic commit whose tree
|
||||
// holds only the runtime payload (install.js, package.json, version.json and
|
||||
// src/) plus a binding manifest, pushed once as the immutable
|
||||
// holds only the runtime payload (install.js, package.json, version.json, LICENSE,
|
||||
// NOTICE and src/) plus a binding manifest, pushed once as the immutable
|
||||
// `refs/tags/install-vX.Y.Z` and as the new fast-forward tip of
|
||||
// `refs/heads/release`. Dev-only: lives in scripts/ so it never ships inside a
|
||||
// skill or the runtime payload it assembles.
|
||||
@@ -26,7 +26,7 @@ import { fileURLToPath } from "node:url";
|
||||
|
||||
export const INSTALL_REF_MANIFEST = ".plan2code-install-ref.json";
|
||||
// The package scripts that make npm prepare a git dependency with a full dev install (pacote).
|
||||
const GIT_DEP_LIFECYCLE = new Set(["prepare", "build", "install", "preinstall", "postinstall", "prepack"]);
|
||||
export const GIT_DEP_LIFECYCLE = new Set(["prepare", "build", "install", "preinstall", "postinstall", "prepack"]);
|
||||
export const RELEASE_BRANCH_REF = "refs/heads/release";
|
||||
export const REMOTE = "origin";
|
||||
const TAG_SHAPE = /^v(\d+\.\d+\.\d+)$/;
|
||||
@@ -40,7 +40,7 @@ const TAG_SHAPE = /^v(\d+\.\d+\.\d+)$/;
|
||||
* required on top of these (`workflowSkillSources()`).
|
||||
*/
|
||||
export const RUNTIME_PAYLOAD = Object.freeze({
|
||||
files: Object.freeze(["install.js", "package.json", "version.json"]),
|
||||
files: Object.freeze(["install.js", "package.json", "version.json", "LICENSE", "NOTICE"]),
|
||||
prefixes: Object.freeze(["src/"]),
|
||||
excludedSegments: Object.freeze(["node_modules", ".git", "fixtures", "__fixtures__"]),
|
||||
forbiddenTopLevel: Object.freeze([
|
||||
@@ -58,6 +58,8 @@ export const RUNTIME_PAYLOAD = Object.freeze({
|
||||
"install.js",
|
||||
"package.json",
|
||||
"version.json",
|
||||
"LICENSE",
|
||||
"NOTICE",
|
||||
"src/launcher/plan2code.js",
|
||||
"src/web-console/update-check.mjs",
|
||||
"src/web-console/console.mjs",
|
||||
|
||||
@@ -20,6 +20,7 @@ import { execFileSync, spawnSync } from "node:child_process";
|
||||
|
||||
import { ROOT, scrubbedEnv } from "./skill-script-helpers.mjs";
|
||||
import {
|
||||
GIT_DEP_LIFECYCLE,
|
||||
INSTALL_REF_MANIFEST,
|
||||
RUNTIME_PAYLOAD,
|
||||
runtimePayloadAllowlist,
|
||||
@@ -67,6 +68,8 @@ function runtimeTree(version) {
|
||||
"install.js": { content: INSTALL_JS },
|
||||
"package.json": { content: json({ name: "plan2code", version }) },
|
||||
"version.json": { content: json({ name: "Plan2Code", version, releaseDate: "2026-12-01" }) },
|
||||
"LICENSE": { content: "license\n" },
|
||||
"NOTICE": { content: "notice\n" },
|
||||
"src/launcher/plan2code.js": { content: `#!/usr/bin/env node\n// launcher ${version}\n`, mode: "100755" },
|
||||
"src/web-console/update-check.mjs": { content: `// update-check ${version}\n` },
|
||||
"src/web-console/console.mjs": { content: `// console ${version}\n` },
|
||||
@@ -196,7 +199,7 @@ const indexHash = (fx) => crypto.createHash("sha256").update(fs.readFileSync(pat
|
||||
test("allowlist: one constant-driven structure of explicit files and prefixes", () => {
|
||||
const allow = runtimePayloadAllowlist();
|
||||
assert.equal(allow, RUNTIME_PAYLOAD);
|
||||
assert.deepEqual([...allow.files], ["install.js", "package.json", "version.json"]);
|
||||
assert.deepEqual([...allow.files], ["install.js", "package.json", "version.json", "LICENSE", "NOTICE"]);
|
||||
assert.deepEqual([...allow.prefixes], ["src/"]);
|
||||
assert.ok(Object.isFrozen(allow) && Object.isFrozen(allow.files) && Object.isFrozen(allow.required));
|
||||
for (const ok of ["install.js", "src/launcher/plan2code.js", "src/web-console/public/activities/snake.js"]) assert.equal(isAllowedPayloadPath(ok), true, ok);
|
||||
@@ -237,6 +240,14 @@ test("arguments: unknown, missing and malformed arguments print the usage and ex
|
||||
}
|
||||
});
|
||||
|
||||
test("the real repository can be published: no lifecycle script npm would prepare a git package for, and every required file is here", () => {
|
||||
const root = ROOT;
|
||||
const pkg = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8"));
|
||||
assert.deepEqual(Object.keys(pkg.scripts || {}).filter((name) => GIT_DEP_LIFECYCLE.has(name)), [], "rename the script: the release run refuses it after the release is public");
|
||||
const required = [...RUNTIME_PAYLOAD.required, ...workflowSkillSources(fs.readFileSync(path.join(root, "install.js"), "utf8"))];
|
||||
assert.deepEqual(required.filter((rel) => !fs.existsSync(path.join(root, rel))), []);
|
||||
});
|
||||
|
||||
test("first publication: parents the legacy release tip, pushes one slim commit to both refs", (t) => {
|
||||
const fx = createSource();
|
||||
t.after(fx.cleanup);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Plan2Code",
|
||||
"version": "3.2.4",
|
||||
"version": "3.2.5",
|
||||
"description": "A structured workflow of six steps (Pathfinder, Plan, Document, Implement, Review, Finalize) for AI-assisted software development",
|
||||
"keywords": [
|
||||
"ai",
|
||||
|
||||
Reference in new issue
Block a user