lisa-update-projects
Skill4 starsChanged 3 months agoMITView on GitHub
This skill should be used when updating local Lisa projects in batches. It reads the project list from .lisa.config.local.json, checks out the target branch, pulls the latest, creates an update branch, runs the package manager update for @codyswann/lisa, migrates legacy CI workflows, checks for upstream changes, then commits, pushes, and opens a PR for each project.
- Installs packages
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .claude-pr/CLAUDE.mdCLAUDE.md
- claude-code-actionSkill
- harness-parity-councilSkill
- lisa-enforcement-censusSkill
- lisa-integration-testSkill
- lisa-learnSkill
- lisa-repair-intakeSkill
- lisa-review-projectSkill
- lisa-wiki-ingestSkill
- lisa-wiki-setupSkill
- lisa-wiki-usageSkill
- mutation-testingSkill
- analyze-pluginSkill
- claude-code-actionSkill
- implement-plugin-paritySkill
- lisa-codex-paritySkill
- lisa-coding-agent-paritySkill
- lisa-enforcement-censusSkill
- lisa-integration-testSkill
- lisa-learnSkill
- lisa-review-projectSkill
- lisa-update-projectsSkill
- lisa-wiki-ingestSkill
- lisa-wiki-setupSkill
- lisa-wiki-usageSkill
- mutation-testingSkill
- plugin-parity-driftSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 5 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Read @.lisa.config.local.json to get the list of projects and their target branches.
- Distinctive: line 14
If you can't because of existing changes or a dirty worktree, don't do anything.
- Very specific: line 16
Check if @codyswann/lisa is in the project's trustedDependencies array in package.json.
- Very specific: line 18
Read engines with jq -r '.engines // {}' package.json.
- Very specific: line 19
If engines.bun === "please-use-npm" (or engines.yarn / engines.pnpm use the same sentinel), that package manager is forbidden.
- Very specific: line 20
If a forbidden lockfile exists anyway (e.g., bun.lockb in a project where engines.bun === "please-use-npm"), it is rogue — bun ignores the …
- Very specific: line 26
After updating, check if @codyswann/lisa appears in the project's dependencies (not devDependencies).
- Very specific: line 27
Check for legacy inline Codex workflows that need migration.
- Very specific: line 28
If the workflow has inline steps: blocks instead of calling uses: CodySwannGT/lisa/.github/workflows/reusable-*.yml@main, it is legacy.
- Very specific: line 43
Remove any hook entry objects where the command contains $CLAUDE_PROJECT_DIR/.Codex/hooks/
- Distinctive: line 44
Remove entire hook matcher blocks that become empty after removing those entries
- Distinctive: line 45
Remove entire hook category arrays that have no remaining matcher blocks
- Very specific: line 48
Check git diff to see if the project changed any Lisa-managed files.
- Very specific: line 49
Commit, push, and PR the branch to the project's target branch specified in @.lisa.config.local.json.
- Distinctive: line 50
If you hit any pre-push blockers, fix them and upstream anything that needs to.
- Very specific: line 56
If the Lisa postinstall crashes, rolls back changes, or applies incorrect templates during a project update, do not just work around it in …
- Distinctive: line 60
Wait for the fix to merge and release before continuing project updates, OR apply the workaround in downstream projects only as a temporary …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Lisa Update Projects
Updates local Lisa projects in batches by running the package manager update command for @codyswann/lisa in each configured project, which triggers Lisa's postinstall script to apply template changes automatically.
Instructions
- Read @.lisa.config.local.json to get the list of projects and their target branches.
- For each project directory, checkout the target branch and pull the latest from the remote.
- If you can't because of existing changes or a dirty worktree, don't do anything. Ask the human what should be done about it before moving on.
- Once you have resolution, within each clean project, check out a new branch (e.g.
chore/lisa-update-YYYY-MM-DD). - Check if
@codyswann/lisais in the project'strustedDependenciesarray inpackage.json. If missing, add it usingjq. Bun only runs postinstall scripts for trusted packages, so without this entry Lisa's postinstall (template application and file deletions) is silently skipped. - Determine the project's package manager from
package.jsonenginesBEFORE choosing a command. Theenginesfield is authoritative — lockfile presence is not.- Read
engineswithjq -r '.engines // {}' package.json. - If
engines.bun === "please-use-npm"(orengines.yarn/engines.pnpmuse the same sentinel), that package manager is forbidden. Usenpm. - If a forbidden lockfile exists anyway (e.g.,
bun.lockbin a project whereengines.bun === "please-use-npm"), it is rogue — bun ignores the engines string and writes the lockfile if invoked. Delete it (git rm bun.lockb) and include the deletion in the commit. - Pick the update command from the surviving package manager:
bun.lockbexists and bun is allowed →bun add -D @codyswann/lisa@latest(usebun add -D <pkg>@latest, notbun update <pkg>.bun updateonly walks within the existing semver range, so an exact-pinned1.95.0or a caret-pinned^1.95.0against a new major like2.xis a no-op.bun add -D <pkg>@latestalways resolves to the latest published version and rewrites the manifest.)- otherwise →
npm install -D @codyswann/lisa@latest(useinstall -Dnotupdate;npm updateonly bumps within the existing semver range and won't move pinned versions or update the manifest)
- Bun's postinstall and npm's both run only the reduced
postinstall-safeapply, which skips every agent emit and the Sonar integration — they declare it withLISA_POSTINSTALL=1, the only thing that selects that mode (CodySwannGT/lisa#3066). Commit the install first, then apply in full:LISA_BOOTSTRAP=1 node node_modules/@codyswann/lisa/dist/index.js --yes .. Verify.lisa/apply-receipt.jsonrecords"apply_mode": "full". - Never run both
bun addandnpm installagainst the same project. That perpetuates the dual-lockfile bug. Pick one based on the engines field and stick to it.
- Read
- After updating, check if
@codyswann/lisaappears in the project'sdependencies(notdevDependencies). If so, move it: remove fromdependenciesand ensure it's indevDependencies. Usejqto check and the package manager to reinstall correctly. - Check for legacy inline Codex workflows that need migration. For each file in
.github/workflows/matchingCodex*.yml,Codex*.yaml,ci.yml,ci.yaml,deploy.yml, anddeploy.yaml:- If the workflow has inline
steps:blocks instead of callinguses: CodySwannGT/lisa/.github/workflows/reusable-*.yml@main, it is legacy. - Detect project capabilities independently (Rails: has
bin/railsorconfig/application.rb; TypeScript: hastsconfig.jsonorpackage.jsonwith TypeScript signals). A repo may be both. - Apply per-file mapping rules — not a single repo-wide template selection — so dual-stack repos get the correct template for each workflow file:
ci.yml/ci.yamlin a Rails project →rails/create-only/.github/workflows/ci.yml(callsquality-rails.yml@main)deploy.yml/deploy.yamlin a Rails project →rails/create-only/.github/workflows/deploy.yml(callsrelease-rails.yml@main)ci.yml/ci.yamlin a TypeScript-only project →typescript/create-only/.github/workflows/ci.yml(callsquality.yml@main)Codex*.yml/Codex*.yaml→typescript/create-only/.github/workflows/(e.g.,Codex.yml→reusable-Codex.yml@main,Codex-ci-auto-fix.yml→reusable-Codex-ci-auto-fix.yml@main)auto-update-pr-branches.yml/auto-update-pr-branches-dispatch.yml→ no template; do not migrate. The auto-update-PR-branches subsystem was removed (CodySwannGT/lisa#3590) and both paths are listed intypescript/deletions.json, so the apply deletes them. If one survives an apply, that is a bug — report it rather than re-creating the workflow by hand.
- The create-only templates are the source of truth for the correct caller format.
- A caller that already correctly uses
uses: CodySwannGT/lisa/.github/workflows/reusable-*.yml@mainis NOT automatically clean — itswith:block can still carry an input the reusable workflow's current contract no longer declares (e.g. an early-generationclaude.ymlstill passingpackage_manager, whichreusable-claude.ymlhistorically did not accept — issue #1423). GitHub hard-fails such a run at startup, and because create-only workflow files are not overwritten automatically the repo can never self-heal on its own. Runnode scripts/detect-stale-workflow-inputs.mjs --project <project> --json(from the Lisa repo checkout) against the project to catch this: it diffs each caller'swith:keys against the correspondingreusable-*.yml's declaredworkflow_call.inputsin this repo's.github/workflows/. For every row reported"status": "stale", remove just the listedstaleInputskey(s) from the caller'swith:block (this is a contract-breaking-input migration, not a customization edit, so it's in scope even though the file is otherwise create-only) — do not otherwise touch the file. A"status": "unknown-contract"row means the caller references a reusable workflow this repo doesn't have a file for; leave it and flag for human review rather than guessing.
- If the workflow has inline
- Remove stale
file:references to bundled ESLint plugins from the project'spackage.json. Previous Lisa versions copied plugin directories and addedfile:./dependencies; current Lisa deletes the directories but thepackage.jsonreferences remain. Usejqto remove these keys from bothdependenciesanddevDependenciesif they exist:eslint-plugin-code-organizationeslint-plugin-component-structureeslint-plugin-ui-standards
- Remove stale
$CLAUDE_PROJECT_DIR/.Codex/hooks/references from the project's.Codex/settings.json. Previous Lisa versions installed hook scripts into the project's.Codex/hooks/directory and registered them in.Codex/settings.json. Current Lisa deletes these scripts viaall/deletions.jsonand provides them through the plugin system (${CLAUDE_PLUGIN_ROOT}/hooks/inplugin.json) instead. The settings.json references to the deleted scripts cause "No such file or directory" errors. Usejqto:
- Remove any hook entry objects where the
commandcontains$CLAUDE_PROJECT_DIR/.Codex/hooks/ - Remove entire hook matcher blocks that become empty after removing those entries
- Remove entire hook category arrays that have no remaining matcher blocks
- Preserve all non-file-path hook entries (inline commands like
echo ...,command -v entire ..., etc.)
- Update create-only workflow schedules that have drifted from the current templates. For each create-only workflow in
.github/workflows/(e.g.,Codex-nightly-jira-triage.yml), compare thecronschedule against the corresponding template intypescript/create-only/.github/workflows/(orrails/create-only/for Rails projects) in the Lisa repo. If the project's schedule differs from the template, update it to match. For example, if the template uses0 */2 * * *but the project still has0 6 * * 1-5, update the project file. - Check
git diffto see if the project changed any Lisa-managed files. If so, examine them to see if any changes need to be upstreamed back to Lisa and do so if necessary. - Commit, push, and PR the branch to the project's target branch specified in @.lisa.config.local.json.
- If you hit any pre-push blockers, fix them and upstream anything that needs to. Do not lower any thresholds to get around a pre-push block. Instead, fix the code.
For steps 4-13, use up to 4 parallel subagents to accomplish those steps.
Fixing Upstream Bugs
If the Lisa postinstall crashes, rolls back changes, or applies incorrect templates during a project update, do not just work around it in the downstream project. Instead:
- Diagnose the root cause in the Lisa source code at the current working directory.
- Fix the bug in Lisa (create a branch, commit, push, and open a PR).
- Wait for the fix to merge and release before continuing project updates, OR apply the workaround in downstream projects only as a temporary measure while the upstream fix is in flight.
Common symptoms that indicate an upstream Lisa bug:
- Postinstall crashes with errors (e.g., missing function, module resolution failures)
- Templates from a parent stack (typescript) overwriting child stack templates (expo, nestjs, cdk) — this means the postinstall crashed after applying parent templates but before child templates could override them, triggering a rollback
- Rollback messages in the postinstall output (
[WARN] Rolling back changes...) followed by an error - Files that should be stack-specific (eslint.config.ts, tsconfig.json, knip.json) containing generic TypeScript config instead of the expected child stack config
The goal is to fix bugs at the source so they don't recur on every future update across all projects.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

