Skip to content

feat(cli): agent handoff and install command#31

Merged
PunGrumpy merged 4 commits into
mainfrom
feat/agent-handoff-and-install
Jul 25, 2026
Merged

feat(cli): agent handoff and install command#31
PunGrumpy merged 4 commits into
mainfrom
feat/agent-handoff-and-install

Conversation

@PunGrumpy

@PunGrumpy PunGrumpy commented Jul 25, 2026

Copy link
Copy Markdown
Owner

What

Replaces the post-scan View rules list / Skip prompt with a react-doctor-style coding-agent handoff, and adds docker-doctor install so users can install the agent skill that previously had no distribution path.

Post-scan handoff (interactive scans with findings only)

✔ What would you like to do next?
❯ Claude Code
  Cursor
  Copy prompt to clipboard
  Skip
  • Agents are detected by their CLI binaries on PATH (claude, codex, cursor-agent).
  • Picking an agent best-effort installs the bundled skill for it, writes the full report to .docker-doctor/ (diagnostics.json + one .txt per rule, auto-appended to .gitignore), and launches the agent with a prompt listing every issue, fix recipe, and affected files (errors first).
  • Clipboard falls back to printing the prompt when no clipboard tool exists.
  • Clean scans and --score / --json / non-TTY runs are unchanged; rules list / rules explain are untouched.

docker-doctor install

  • Interactive multi-select over detected + curated agents; --agent <id...> for non-interactive runs (any of agent-install's 50+ ids; invalid ids error with the valid list).
  • The skill (skills/docker-doctor/) is now copied into the npm package at build time (skill/, verified via npm pack).

Docs

README step 2 becomes "Install for agents" (rules browsing moved to the docs link), new Coding Agents guide, CLI reference updated.

Notes for review

  • New runtime dep: agent-install@0.0.8 (pinned — it's 0.0.x). Justified as the same library react-doctor uses for skill installs.
  • Agents launch in their auto-approve modes (--dangerously-skip-permissions / --yolo / --force) — the user opts in by picking the agent from the menu, mirroring react-doctor.
  • Windows: launching is disabled (npm .cmd shims would require a shell that mangles the multi-line prompt); Windows users get the clipboard path. Deliberate scope cut, as is remembering the last-picked agent (needs a CLI state store) and once-per-repo CI-pitch persistence.
  • Changeset: patch bump for @docker-doctor/cli.

Testing

  • bun test (15 pass), tsc --noEmit, ultracite check clean; web app builds with the new docs.
  • Drove the real TTY flow with a pseudo-terminal: select renders, Skip writes nothing, clipboard path writes .docker-doctor/ + gitignore (idempotent) and prints the prompt when no clipboard tool exists.
  • install --agent claude-code cursor on a fixture lands SKILL.md + references in .claude/skills/ / .agents/skills/; invalid id and non-TTY-without---agent error correctly.
  • npm pack --dry-run ships skill/docker-doctor/**; ESM output uses import.meta.dirname, CJS gets __dirname.

🤖 Generated with Claude Code

PunGrumpy and others added 2 commits July 25, 2026 21:20
Replace the post-scan "View rules list" prompt with a coding-agent
handoff: when a scan finds issues, offer to launch a detected agent
(claude, codex, cursor-agent) with the issues as its prompt, or copy
that prompt to the clipboard. Handoffs write the full report to
.docker-doctor/ (auto-gitignored) and install the bundled skill for the
chosen agent.

Add `docker-doctor install` to install the skill for any
agent-install-supported agent (interactive multi-select, or --agent for
non-interactive runs), and ship skills/docker-doctor inside the npm
package.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
README step 2 becomes "Install for agents" (rules browsing moves to the
docs link), and the docs gain a Coding Agents guide plus CLI-reference
coverage of `install` and the handoff.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docker-doctor Skipped Skipped Jul 25, 2026 2:44pm

Agent options now read "Claude Code" / "Cursor" instead of
"Fix with … (launches …)", matching react-doctor's picker.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collapse the two display-name helpers into one, and drop the
diagnosticsDir/rootDir plumbing from the handoff payload — the report
directory is always .docker-doctor/, so reference the constant directly
and let writeDiagnosticsDirectory return void.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@PunGrumpy
PunGrumpy merged commit 3546391 into main Jul 25, 2026
9 checks passed
@PunGrumpy
PunGrumpy deleted the feat/agent-handoff-and-install branch July 25, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant