feat(ce-review): add headless mode for programmatic callers#430
Conversation
Add mode:headless as a fourth explicit mode for skill-to-skill invocation. Headless applies safe_auto fixes in a single pass, returns structured text output with the full findings envelope, writes run artifacts, and emits "Review complete" as a terminal signal. No interactive prompts, no todos, no checkout switching. Follows the pattern established by document-review's headless mode (#425), adapted for ce:review's richer findings schema (autofix_class, owner, requires_verification, evidence[], pre_existing). 🤖 Generated with Claude Opus 4.6 via [Claude Code](https://claude.com/claude-code) + Compound Engineering v2.58.1 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Add "Review complete" terminal signal to headless output template - Add cross-platform question tool names to headless rules - Add CE agent sections to headless envelope (Learnings, Agent-Native, Schema Drift, Deployment Notes) - Generalize conflicting mode flags error for all mode combinations - Add contract test assertions for no-commit/push/PR and single-pass Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d66799a99e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Add severity and why_it_matters to pre-existing findings in the headless output so programmatic callers can parse them consistently. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Advertise headless mode in the argument-hint frontmatter for both skills so humans reading the skill definition know the mode exists and can think about utility-skill usage patterns. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…onsistency Both ce-review and document-review now use modes-first ordering in argument-hint, matching the standard [flags] [target] convention. Updated the two example invocations in Phase 0 to match. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd847abbbb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Use headless error envelope when mode:headless is a conflicting flag - Add Coverage section to headless output envelope (suppressed counts, untracked file exclusions, failed reviewers) - Add routing metadata to pre-existing findings in headless envelope Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
mode:headlessas a fourth explicit mode to ce:review for skill-to-skill invocationsafe_autofixes in a single pass, returns structured text output with findings envelope, writes run artifacts, and emits "Review complete" signalChanges
Also: added
mode:headlesstoargument-hintin both ce-review and document-review for human discoverability, and reordered document-review's argument-hint to modes-first ([mode:headless] [path]) for consistency with ce-review's[flags] [target]convention.Test plan
bun test tests/review-skill-contract.test.ts— 9 tests, 112 assertions passbun test— 498 pass, 0 failmode:headlessfrom another skill and verify structured output🤖 Generated with Claude Opus 4.6 via Claude Code + Compound Engineering v2.58.1