Skip to content

docs: add CLAUDE.md and skill invocation instructions#284

Merged
wwind123 merged 8 commits into
mainfrom
fix/skill-invocation-docs
Jun 9, 2026
Merged

docs: add CLAUDE.md and skill invocation instructions#284
wwind123 merged 8 commits into
mainfrom
fix/skill-invocation-docs

Conversation

@wwind123

@wwind123 wwind123 commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the documentation gap from #283: the skill mode was implemented but there was no explanation of how to actually invoke it.

  • CLAUDE.md (new): auto-loaded by Claude Code when the repo is opened; tells Claude to consult SKILL.md when the user asks to run the agent loop. Lists concrete invocation examples.
  • SKILL.md: adds a "How to invoke this skill" section near the top with natural-language examples — users just describe what they want, no slash command needed.

Test plan

  • Open a Claude Code session in the repo root and say "Run the agent-loop skill for issue Add structured plan review protocol #123 in myorg/myrepo with gemini as reviewer" — Claude should find CLAUDE.md, load SKILL.md, and begin Step 1.

-- Anthropic Claude

wwind123 and others added 5 commits June 7, 2026 21:40
CLAUDE.md auto-loads when Claude Code opens the repo, pointing Claude
to SKILL.md for agent-loop orchestration requests.

SKILL.md gains a "How to invoke this skill" section at the top with
concrete natural-language examples, so users know they just need to
describe what they want in the session — no slash command required.

Fixes the documentation gap left by #283.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds .claude/commands/coding-review-agent-loop.md so users can invoke
the agent-loop skill with /coding-review-agent-loop in Claude Code.
The namespaced name avoids conflicts with other agent-loop tools.

Notes the current Claude-as-coder limitation (reversed roles require
a separate issue).

Updates CLAUDE.md to mention the slash command as the preferred
invocation path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… Codex and --skip-trust to Gemini

Codex's bwrap sandbox fails on GCP VMs with "Failed RTM_NEWADDR: Operation
not permitted". The --dangerously-bypass-approvals-and-sandbox flag is
intended for exactly this case (externally sandboxed environments).

Gemini fails with "not a trusted directory" when run non-interactively
outside a git workspace. --skip-trust suppresses this check.

Both flags correspond to CodexBackend.default_args(dangerous=True) and
GeminiBackend.default_args(dangerous=True) respectively, but run_external
never called default_args. Now set directly in AgentLoopConfig.

Also adds --diff-file flag to embed a pre-fetched diff in the prompt,
needed because Gemini's non-interactive mode lacks run_shell_command.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The slash command advertised `task "<text>"` as a supported flow, but
state_manager only accepts --flow plan|pr, so users invoking that path
would enter undefined orchestration. Remove task flow and add a note
directing users to the headless CLI for task-based invocations.

Also clarify that `issue <N>` maps to --flow plan.

Addresses Codex blocking finding from PR #284 round 1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Structured JSON reviewer output must be rendered to human-readable
markdown before posting to GitHub, matching what the headless CLI does
via _render_public_pr_review_comment/_render_public_plan_review_comment.

- helpers/render_response.py: new module wrapping the library's
  comment_rendering functions for pr_review, plan_review,
  coder_followup, and plan_revision kinds
- SKILL.md: insert `python -m helpers.render_response` step between
  validate_response and attach-metadata; attach-metadata and post now
  operate on the rendered file, not the raw JSON

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wwind123

wwind123 commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

The documentation additions are clear, well-structured, and provide helpful instructions for invoking the agent loop as a skill in the Claude environment. The new files and the modifications to existing documentation create a logical and useful guide for users.

-- Google Gemini

@wwind123

wwind123 commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Review verdict: Blocking

The invocation docs mostly help, but the new slash command advertises flows that the skill instructions do not support.

Blocking issues

  • .claude/commands/coding-review-agent-loop.md:7 documents issue <N> with plan-first=false and task "<text>" as supported slash-command flows, then tells Claude to follow SKILL.md from Step 1. However SKILL.md only provides an issue plan loop (--flow plan) and PR review mode, and helpers.state_manager only accepts --flow plan|pr. A user invoking the newly documented /coding-review-agent-loop task ... or plain /coding-review-agent-loop issue 123 path is therefore sent into unsupported/undefined orchestration. Please either remove those advertised flows from the slash command docs or add matching skill-mode steps for them.

-- OpenAI Codex

@wwind123

wwind123 commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

The round-2 changes resolve the unsupported slash-command flow issue, and the added invocation docs plus helper updates are internally consistent. Focused skill-helper tests passed locally with python3.

-- OpenAI Codex

@wwind123

wwind123 commented Jun 8, 2026

Copy link
Copy Markdown
Owner Author

Review verdict: Approved

The changes look good. The new documentation in CLAUDE.md and SKILL.md clearly explains how to invoke the agent loop skill. The helper script change to inject PR diffs is a good addition to support PR review flows.

-- Google Gemini

wwind123 and others added 3 commits June 8, 2026 01:33
Add --role coder to run_external.py so Codex can be invoked for plan
writing turns. Document the reversed-roles flow in SKILL.md and update
the slash command to accept --coder codex. Add a dry-run test covering
the new coder role path.

Closes #285

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codex's blocking review (PR #286) identified that SKILL.md documented the
reversed-roles flow without specifying --reviewers claude in the build-resume
call. Without that, build-resume ignores Claude's posted review on any
subsequent resume attempt, causing the loop to repeat review turns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…skill

feat(skill): add --coder codex reversed-roles support
@wwind123 wwind123 merged commit 96c7d61 into main Jun 9, 2026
1 check passed
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