watch-ci
Watch CI
Poll the GitHub Actions CI pipeline for the current HEAD commit until all jobs finish.
Environment
The gh CLI is not available in the Claude VM. Use the GitHub REST API via curl.
The repo is codervisor/lean-spec.
Steps
-
Get the current commit SHA and branch:
SHA=$(git rev-parse HEAD) BRANCH=$(git branch --show-current) echo "Watching CI for commit $SHA on branch $BRANCH" -
Find the workflow run matching our exact commit. The API returns runs newest-first; filter by
head_sha. If the run hasn't appeared yet (GitHub can take a few seconds), retry up to 5 times with 10s waits:curl -sH "Accept: application/vnd.github+json" \ "https://api.github.com/repos/codervisor/lean-spec/actions/runs?branch=$BRANCH&head_sha=$SHA&per_page=1" \ | python3 -c " import json, sys data = json.load(sys.stdin) runs = data.get('workflow_runs', []) if not runs: print('NO_RUNS'); sys.exit() r = runs[0] print(f'RUN_ID={r[\"id\"]}') print(f'Status: {r[\"status\"]} Conclusion: {r.get(\"conclusion\") or \"pending\"} Commit: {r[\"head_sha\"][:8]}')" -
Poll jobs until all complete (every 60s for Rust builds which take ~8-10 min):
curl -sH "Accept: application/vnd.github+json" \ "https://api.github.com/repos/codervisor/lean-spec/actions/runs/$RUN_ID/jobs" \ | python3 -c " import json, sys data = json.load(sys.stdin) for j in data.get('jobs', []): steps = [s for s in j.get('steps', []) if s['status'] == 'in_progress'] step_info = f' -> {steps[0][\"name\"]}' if steps else '' print(f'{j[\"name\"]:40} {j[\"status\"]:12} {j.get(\"conclusion\") or \"\"}{step_info}')" -
On failure, fetch the failed job logs to diagnose:
curl -sH "Accept: application/vnd.github+json" \ "https://api.github.com/repos/codervisor/lean-spec/actions/runs/$RUN_ID/jobs" \ | python3 -c " import json, sys data = json.load(sys.stdin) for j in data.get('jobs', []): if j.get('conclusion') == 'failure': print(f'FAILED: {j[\"name\"]} (id: {j[\"id\"]})') for s in j.get('steps', []): if s.get('conclusion') == 'failure': print(f' Step: {s[\"name\"]}')"
CI Structure
- node (~2 min): pnpm install, build, typecheck, test
- rust (~8-10 min, depends on node): cargo fmt, clippy, build, test, TS binding export
Reporting
Give the user a brief status update each poll cycle. On completion, summarize:
- Overall result (success/failure)
- Per-job results
- If failed: which step failed and relevant error output
More from codervisor/lean-spec
agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
49leanspec-development
Development workflows, commands, publishing, CI/CD, changelog management, and contribution guidelines for LeanSpec. Use when contributing code, fixing bugs, setting up dev environment, running tests or linting, working with the monorepo structure, looking up build/dev/test/publish/format/lint commands, preparing releases, publishing to npm, bumping versions, syncing package versions, testing dev builds, troubleshooting npm distribution, updating changelogs, triggering CI/CD workflows, monitoring build status, debugging failed runs, managing artifacts, checking CI before releases, or researching AI agent runners. Triggers include any development, scripting, publishing, CI/CD, changelog, or runner research task in this project.
39github-integration
>
35parallel-worktrees
>
35leanspec-sdd
Spec-Driven Development methodology for AI-assisted development. Use when working with specs, planning features, creating/implementing/refining/organizing specs, checking progress, updating specs, task breakdowns, design decisions, or any task involving a specs/ folder or .lean-spec/config.json.
16runner-research
Research AI agent runners/platforms (Claude Code, Copilot, Cursor, Windsurf, Codex, Kiro, Gemini, Amp, Goose, etc.) to track config format changes, new capabilities, deprecations, and emerging runners. Use when asked to "research runners", "check for runner updates", "audit runner compatibility", or when preparing to update the runner registry. Triggers include questions about runner config formats, new runner releases, or keeping LeanSpec runner support current.
4