Skip to content

feat(init): add roar init agents to install agent guidance#60

Merged
christophergeyer merged 2 commits intomainfrom
cg/roar-skill
Apr 16, 2026
Merged

feat(init): add roar init agents to install agent guidance#60
christophergeyer merged 2 commits intomainfrom
cg/roar-skill

Conversation

@christophergeyer
Copy link
Copy Markdown
Member

@christophergeyer christophergeyer commented Apr 16, 2026

Summary

  • Adds roar init agents subcommand that installs agent-facing guidance:
    • ~/.claude/skills/roar/SKILL.md — Claude-specific skill, version-stamped
    • ./AGENTS.md section — cross-agent, fenced inside <!-- roar:begin -->...<!-- roar:end --> markers for idempotent re-runs
  • Flags: --skill / --project (limit scope), --dry-run, --force, --check (CI-friendly drift detection), --path
  • Backward compat: bare roar init still works. init becomes a click group with invoke_without_command=True.
  • Templates ship under roar/cli/templates/agents/ and are bundled in sdist + wheel via maturin include list.

Behavior

  • Default: install both targets.
  • Skill on hand-edited file: refuses to overwrite (no managed marker found); --force overrides.
  • AGENTS.md on existing file: appends a fenced block; user content outside the block is never touched.
  • --check: exits nonzero if installed config is missing or out of date — suitable for pre-commit / CI.

Test plan

  • 24 new unit tests covering pure update functions + CLI integration (idempotency, dry-run, check, force, content preservation, backward compat)
  • Full unit suite passes (561 passed, 1 skipped)
  • Lint clean (ruff check)
  • Manual smoke test: install, re-run (noop), --check (passes after install)
  • Manual: verify wheel contains templates after pip install from built wheel

Notes

  • MCP integration intentionally skipped per discussion — revisit when there's evidence agents would benefit from structured lineage queries vs. parsing roar show text.

🤖 Generated with Claude Code

Adds a subcommand that installs agent-facing guidance for roar:

- ~/.claude/skills/roar/SKILL.md (Claude-specific skill, version-stamped)
- ./AGENTS.md section (cross-agent, marker-fenced for idempotent updates)

Existing `roar init` behavior is preserved (init becomes a click group
with invoke_without_command=True; bare `roar init` still works).

Flags: --skill, --project, --dry-run, --force, --check, --path.
The AGENTS.md block uses HTML-comment markers so re-running the command
refreshes only the managed region without disturbing user content.

Templates ship under roar/cli/templates/agents/ and are included in
both sdist and wheel via the maturin include list.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@christophergeyer christophergeyer merged commit e4ae5a9 into main Apr 16, 2026
12 checks 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.

3 participants