Commit Graph

5 Commits

Author SHA1 Message Date
Peter Pistorius f069ecad5a Add pi harness support: /skill:agent-ci-dev + extension (#268)
* 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.
2026-04-17 21:18:35 +02:00
Peter Pistorius baabf8e0df Rename supervisor to cli. 2026-03-06 22:57:53 +02:00
Peter Pistorius 922b01df41 Rewrite the past. Closes #14. 2026-03-06 21:54:22 +02:00
Peter Pistorius c763c304df Rename runner to supervisor. 2026-02-20 11:17:49 +02:00
Peter Pistorius 1f282ca79f Fix linting errors. 2026-02-19 18:44:03 +02:00