mirror of
https://github.com/redwoodjs/local-ci.git
synced 2026-09-19 07:54:29 +08:00
f069ecad5a
* Add pi-native validate skill mirroring .claude/commands/validate.md
Pi (the coding agent harness) doesn't read Claude Code's commands/
directory, so contributors using pi didn't have access to /validate.
This adds .pi/skills/validate/SKILL.md with the same background-run +
monitor + retry workflow, invokable as /skill:validate.
Tooling-only change: no code in packages/, no changeset needed.
* Symlink AGENTS.md -> CLAUDE.md
Pi and other non-Claude agent harnesses (Codex, etc.) look for
AGENTS.md. Symlinking keeps a single source of truth in CLAUDE.md
while making the same instructions discoverable to every harness.
* Rename pi validate skill to agent-ci-dev
Matches the underlying command (pnpm agent-ci-dev) and disambiguates
from the published agent-ci skill, which wraps npx @redwoodjs/agent-ci
for downstream users. Description now explicitly calls out the
distinction.
* Generalize CLAUDE.md for AGENTS.md symlink; reference agent-ci-dev pi skill
- Retitle and add a preamble noting the file is shared via AGENTS.md
symlink, so it's now the single source of truth for all harnesses.
- CI section now references both the Claude Code /validate command
and the pi /skill:agent-ci-dev skill, so pi contributors follow the
same background-monitor-retry workflow Claude Code contributors do.
* Rename Claude Code /validate to /agent-ci-dev
Aligns the Claude Code slash command name with the pi skill
(/skill:agent-ci-dev) and the underlying package command
(pnpm agent-ci-dev). Backward compat preserved via the existing
aliases: [validate] frontmatter, so /validate still resolves.
* Add pi extension: bash_background + monitor_wait tools
Pi's native bash is synchronous-only, and pi doesn't ship a Monitor
tool. Previously the agent-ci-dev skill assumed Claude Code's
run_in_background Bash + streaming Monitor, which don't exist in pi.
This adds .pi/extensions/background-shell.ts, a pi extension that
registers two tools:
- bash_background spawn a shell command; return taskId + outputFile
+ pid immediately. stdout+stderr tee'd to a log.
- monitor_wait block until a regex matches new log output, OR
the task exits, OR timeoutMs elapses. Tracks
per-task byte offsets across calls.
The skill is rewritten to drive these tools. Zero npm dependencies at
runtime (Node built-ins only, ExtensionAPI imported type-only, JSON
Schema written inline), so no npm install step is needed after clone.
Tooling-only change, no changeset required.
1.1 KiB
1.1 KiB
Agent CI — Agent Instructions
This file is the single source of truth for agent instructions in this repo. It is surfaced to Claude Code as CLAUDE.md and to every other harness (pi, Codex, etc.) as AGENTS.md via a symlink.
Rules
- Changeset Required — Every PR must include a changeset and update the root CHANGELOG.md
CI
Before completing any work, validate all workflows against the in-tree dev build. If it fails, fix the issue and re-run. Do not tell the user work is done until it passes.
- Claude Code: run
/agent-ci-dev(from.claude/commands/agent-ci-dev.md;/validatestill works as an alias). - pi: run
/skill:agent-ci-dev(from.pi/skills/agent-ci-dev/SKILL.md).
Both wrap the same background-monitor-retry workflow around pnpm agent-ci-dev run --all.
Code
- This is a Node.js ESM project (
.mjsfiles). Useimport, notrequire. - Package manager is pnpm (pinned via
packageManagerin package.json). - Docker operations go through
src/docker.mjs. Cloud operations throughsrc/cloud.mjs. - The user authenticates via OAuth (
gh auth login), never API keys.