From 15019dbc88ee78155ef78f964c6286812748a4ac Mon Sep 17 00:00:00 2001 From: Justin Parker Date: Thu, 5 Nov 2026 17:12:49 -0800 Subject: [PATCH] Speed up CI: cancel superseded PR runs, Ubuntu only on pull requests, and a fast prose job for docs-only changes. Put Before you start above the install command again AI Assisted --- .github/workflows/app.yml | 69 +++++++++++++++++++++++++++++++++++++-- docs/index.html | 32 +++++++++--------- 2 files changed, 83 insertions(+), 18 deletions(-) diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index 092f3a2..e03df1e 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -4,18 +4,80 @@ on: push: branches: [main] pull_request: + types: [opened, synchronize, reopened, labeled] + # Run the full three-system matrix by hand on any branch. + workflow_dispatch: permissions: contents: read +# A newer push to a pull request replaces its still-running checks. A push to main always +# finishes, so a merged change is never left half checked. +concurrency: + group: app-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +# Speed: a pull request runs on Ubuntu only (the cheapest runner) unless it carries the +# `full-matrix` label; pushes to main and manual runs use all three systems. A change that +# touches only the website, the README, the changelog or similar skips the heavy jobs and runs +# the fast `prose` job instead, which keeps the checks that read those files. jobs: + changes: + name: changes + runs-on: ubuntu-latest + outputs: + code: ${{ steps.diff.outputs.code }} + steps: + - uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 + - id: diff + shell: bash + run: | + set -euo pipefail + case "${{ github.event_name }}" in + pull_request) base="${{ github.event.pull_request.base.sha }}" ;; + push) base="${{ github.event.before }}" ;; + *) base="" ;; + esac + # A manual run, a new branch or a base git cannot find: run everything. + if [ -z "$base" ] || [ "$base" = "0000000000000000000000000000000000000000" ] || ! git cat-file -e "$base^{commit}" 2>/dev/null; then + echo "code=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + files="$(git diff --name-only "$base" HEAD)" + echo "Changed files:"; echo "$files" + # .readme/, AGENTS.md and .agents-docs/ are read by tests, so they count as code. + if [ -n "$files" ] && ! echo "$files" | grep -qvE '^(docs/|prototypes/|README\.md$|CHANGELOG\.md$|QUICK-REFERENCE\.md$|LICENSE$)'; then + echo "code=false" >> "$GITHUB_OUTPUT" + else + echo "code=true" >> "$GITHUB_OUTPUT" + fi + + prose: + name: prose checks + needs: changes + if: needs.changes.outputs.code == 'false' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.2.2 + - uses: actions/setup-node@v4.4.0 + with: + node-version: 20 + - name: Versions agree + run: node scripts/check-versions.mjs + - name: Spelling, install command in the docs, line endings + run: node --test scripts/test-us-english.mjs scripts/test-getting-started.mjs scripts/test-line-endings.mjs scripts/test-check-versions.mjs + app: name: app (${{ matrix.os }}) + needs: changes + if: needs.changes.outputs.code == 'true' runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [windows-latest, macos-latest, ubuntu-latest] + os: ${{ fromJSON(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'full-matrix') && '["ubuntu-latest"]' || '["windows-latest","macos-latest","ubuntu-latest"]') }} defaults: run: working-directory: plan2code-app @@ -90,16 +152,19 @@ jobs: node-tests: name: npm test (${{ matrix.os }}) + needs: changes + if: needs.changes.outputs.code == 'true' runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [windows-latest, macos-latest, ubuntu-latest] + os: ${{ fromJSON(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'full-matrix') && '["ubuntu-latest"]' || '["windows-latest","macos-latest","ubuntu-latest"]') }} steps: - uses: actions/checkout@v4.2.2 - uses: actions/setup-node@v4.4.0 with: node-version: 20 + cache: npm - run: npm install - run: npm test - name: Metrics tests diff --git a/docs/index.html b/docs/index.html index bbdb9e4..46263df 100644 --- a/docs/index.html +++ b/docs/index.html @@ -133,7 +133,7 @@ h3 { font-size: 1.45rem; margin: 8px 0; } .copy.-done .clip { display: none; } .copy.-done .tick { display: block; } .before { margin: 22px auto 0; max-width: 640px; text-align: left; background: var(--panel); border: 1px solid var(--rule-2); border-radius: var(--radius); padding: 14px 18px; font-size: 15px; } -.before .bh { margin: 0 0 8px; font: 700 1.05rem var(--serif); } +.before h3 { margin: 0 0 8px; font: 700 1.05rem var(--serif); } .before ul { margin: 0; padding-left: 20px; color: var(--ink-2); } .before li { margin: 4px 0; } .before strong { color: var(--ink); } @@ -393,14 +393,8 @@ footer a { color: inherit; }

Your agent and your plan, in one window.

Plan2Code is a short, structured workflow where your AI agent asks, you decide, and the specs land in your repo as plain files. Version 3 adds an optional desktop app that holds the dashboard and your agent side by side.

-
-
npx --allow-git=all git+https://github.com/jparkerweb/plan2code.git
- -
-

then, from your project, run plan2code (Claude Code, Devin or Codex), or type /plan2code in your agent ($plan2code in Codex).

-
-

Before you start

+

Before you start

+
+
npx --allow-git=all git+https://github.com/jparkerweb/plan2code.git
+ +
+

then, from your project, run plan2code (Claude Code, Devin or Codex), or type /plan2code in your agent ($plan2code in Codex).

+ @@ -859,15 +859,8 @@ plan2code --classic

Install

Run it again any time to update.

-
-
npx --allow-git=all git+https://github.com/jparkerweb/plan2code.git
- -
-

then, from your project, run plan2code (Claude Code, Devin or Codex), or type /plan2code in your agent ($plan2code in Codex).

-

It always opens a menu; no output at all means npm could not reach the repository and hid the reason: git ls-remote https://github.com/jparkerweb/plan2code.git shows why.

-

The installer also offers the desktop app. Answer Y to install it: the file is checked against the release's checksum before it is kept. There are builds for Windows x64, macOS (Apple silicon and Intel) and Linux x64, and the app needs Node.js 18 or newer. Plan2Code works without it.

-

Before you start

+

Before you start

  • Node.js 18 or newer. Check with node --version. No Node? Get it from nodejs.org (the LTS download), or run winget install OpenJS.NodeJS.LTS on Windows, brew install node on macOS, or use nvm on Linux. Then open a new terminal.
  • Start from your project. Open your terminal in the project you want to work on (cd into it) before you run anything. Plan2Code works on the folder you start it in.
  • @@ -875,6 +868,13 @@ plan2code --classic
  • No agent yet? Install Claude Code, Codex or Devin first, or let the plan2code command's setup page walk you through it.
+
+
npx --allow-git=all git+https://github.com/jparkerweb/plan2code.git
+ +
+

then, from your project, run plan2code (Claude Code, Devin or Codex), or type /plan2code in your agent ($plan2code in Codex).

+

It always opens a menu; no output at all means npm could not reach the repository and hid the reason: git ls-remote https://github.com/jparkerweb/plan2code.git shows why.

+

The installer also offers the desktop app. Answer Y to install it: the file is checked against the release's checksum before it is kept. There are builds for Windows x64, macOS (Apple silicon and Intel) and Linux x64, and the app needs Node.js 18 or newer. Plan2Code works without it.