Problem
Developers must manually check whether .agents/PROJECT.md is out of date before starting an AI agent session. This requires scanning commit history and comparing dates — tedious and easy to forget. A stale PROJECT.md means the agent works with outdated context.
Context
The update-project-guidance skill refreshes PROJECT.md, but nothing tells the developer when to run it. The assess-ticket skill has a similar staleness model for tickets, but PROJECT.md has no equivalent.
The agents package already has shell scripts in packages/agents/scripts/ for development tooling. These new scripts serve a different purpose (end-user utilities) but live alongside them.
Solution
Shell scripts (in packages/agents/scripts/)
-
check-project-staleness.sh — standalone staleness heuristic. Checks whether .agents/PROJECT.md exists in the current git repo and, if so, counts meaningful commits since its last modification. Commits that only touch package manifests and lock files (**/package.json, **/pnpm-lock.yaml, **/package-lock.json, **/yarn.lock) are excluded. If the count reaches 20, prints a warning to stderr and suggests running /update-project-guidance. Always exits 0.
-
claude.sh — launcher that runs the staleness check, then execs claude with all arguments forwarded.
-
rovo.sh — launcher that runs the staleness check, then execs acli rovodev run with all arguments forwarded.
-
install-launchers.sh — symlinks the other three scripts into a target directory (default /usr/local/bin). Accepts --prefix to override the target.
All scripts follow the project's shell conventions: set -euo pipefail, main() wrapper, show_usage with proper exit codes, $PROG prefix on error messages. Symlink-safe resolution to locate check-project-staleness.sh relative to the launcher.
Warning output format (stderr):
⚠️ PROJECT.md may be stale:
Last updated: 2025-10-19 10:31 UTC (5 months ago)
Since then: 47 commits
Run /update-project-guidance to refresh it
Root pnpm scripts
Add convenience scripts to the monorepo root package.json:
agents:install — runs the agents CLI install command (tsx packages/agents/src/cli.ts install)
agents:install-launchers — runs install-launchers.sh
Acceptance criteria
Problem
Developers must manually check whether
.agents/PROJECT.mdis out of date before starting an AI agent session. This requires scanning commit history and comparing dates — tedious and easy to forget. A stale PROJECT.md means the agent works with outdated context.Context
The
update-project-guidanceskill refreshes PROJECT.md, but nothing tells the developer when to run it. Theassess-ticketskill has a similar staleness model for tickets, but PROJECT.md has no equivalent.The agents package already has shell scripts in
packages/agents/scripts/for development tooling. These new scripts serve a different purpose (end-user utilities) but live alongside them.Solution
Shell scripts (in
packages/agents/scripts/)check-project-staleness.sh— standalone staleness heuristic. Checks whether.agents/PROJECT.mdexists in the current git repo and, if so, counts meaningful commits since its last modification. Commits that only touch package manifests and lock files (**/package.json,**/pnpm-lock.yaml,**/package-lock.json,**/yarn.lock) are excluded. If the count reaches 20, prints a warning to stderr and suggests running/update-project-guidance. Always exits 0.claude.sh— launcher that runs the staleness check, then execsclaudewith all arguments forwarded.rovo.sh— launcher that runs the staleness check, then execsacli rovodev runwith all arguments forwarded.install-launchers.sh— symlinks the other three scripts into a target directory (default/usr/local/bin). Accepts--prefixto override the target.All scripts follow the project's shell conventions:
set -euo pipefail,main()wrapper,show_usagewith proper exit codes,$PROGprefix on error messages. Symlink-safe resolution to locatecheck-project-staleness.shrelative to the launcher.Warning output format (stderr):
Root pnpm scripts
Add convenience scripts to the monorepo root
package.json:agents:install— runs the agents CLI install command (tsx packages/agents/src/cli.ts install)agents:install-launchers— runsinstall-launchers.shAcceptance criteria
check-project-staleness.shexits silently when not in a git repo, when.agents/PROJECT.mdis absent, or when the file has no git historycheck-project-staleness.shexcludes commits that only touch package/lock files from the countcheck-project-staleness.shprints the warning (with⚠️) to stderr when the threshold (20) is met, and always exits 0claude.shruns the staleness check and forwards all arguments toclauderovo.shruns the staleness check and forwards all arguments toacli rovodev runinstall-launchers.shsymlinks all three scripts into the target directory (default/usr/local/bin, overridable with--prefix)--helpwith usage, arguments, options, and examples per shell conventionsshellcheckpackage.jsonhasagents:installandagents:install-launchersscripts