Skip to content

feat(ce-compound): add mode:headless for non-interactive use#813

Merged
tmchow merged 3 commits intomainfrom
tmchow/ce-compound-headless-mode
May 10, 2026
Merged

feat(ce-compound): add mode:headless for non-interactive use#813
tmchow merged 3 commits intomainfrom
tmchow/ce-compound-headless-mode

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented May 10, 2026

Summary

/ce-compound now runs end-to-end without blocking on user questions when invoked with mode:headless, enabling automations (CI jobs, scheduled tasks, LFG pipelines) to capture learnings as part of broader workflows.

A second change renames ce-compound-refresh's mode:autofix flag to mode:headless so the compound family speaks the same word. ce-doc-review, ce-code-review, and ce-plan already use mode:headless for their non-interactive paths.

A third change refines an authoring rule in plugins/compound-engineering/AGENTS.md that incorrectly demanded an ## Assumptions section for any non-interactive doc, regardless of what the corresponding interactive mode actually validates. See "AGENTS.md rule refinement" below.

What changes for headless callers

In headless mode, /ce-compound:

  • skips the Full / Lightweight question and the session-history follow-up; runs Full without session history
  • applies the Discoverability Check edit silently when an instruction file lacks a docs/solutions/ mention
  • skips Phase 3 specialized agent reviews to bound token usage
  • ends with a structured terminal report (Documentation complete or Documentation skipped), not the interactive "What's next?" menu

The resulting doc is identical to what an interactive Full run produces. Classification work (track, category, overlap) follows the same rules and writes nothing extra into the artifact.

Headless forces Full and does not enter Lightweight. Automations get cross-reference and overlap detection at the cost of three parallel subagent dispatches. Lightweight remains interactive-only.

Breaking change for ce-compound-refresh callers

Hard rename. mode:autofix is no longer accepted by ce-compound-refresh. Callers passing that token must update to mode:headless. No alias. Semantics are unchanged.

AGENTS.md rule refinement

The old "process exhaust vs audit content" guidance framed non-interactive mode as the clearest example of when un-validated bets need a visible Assumptions section. That framing assumes synchronous = validated, which is not true for skills like ce-compound whose interactive flow asks only meta-questions (Full vs Lightweight, session-history opt-in) and never validates the substantive inferences (track, category, filename, overlap). Applied literally, the old rule would have required ce-compound headless to label as un-validated the same inferences that interactive runs also do not validate, implying interactive runs confirm content they don't.

The reframed test: an ## Assumptions section is audit content when the corresponding interactive mode would have validated content that the headless run skips. Compare per skill, not per mode. ce-plan headless skips a HITL walkthrough that interactive performs, so its headless artifact warrants Assumptions. ce-compound headless does not, because its interactive counterpart also does not walk the user through the substantive inferences.

Design decisions

  • Sticky mode token. Modeled on ce-doc-review: strip mode:headless from $ARGUMENTS, treat presence as a flag for the entire run, use the remainder as the optional context hint.
  • Apply Discoverability edit silently in headless rather than skip or recommend. The edit is small, in-scope, and benefits any automation building a docs/solutions/ store. Reported in the terminal output for traceability.
  • No ## Assumptions section in headless docs. See the AGENTS.md rule refinement above for the reasoning.
  • Default to Full, not Lightweight. Lightweight's main saving comes from skipping the Related Docs Finder. The overlap check that subagent provides prevents duplicate docs that /ce-compound-refresh would later have to consolidate.

Test plan

bun test and bun run release:validate both pass. End-to-end headless trace verified in both skills: every interactive prompt site is scoped to interactive mode with an explicit headless callout in the same paragraph, so no blocking question can fire when mode:headless is present.


Compound Engineering
Claude Code

tmchow added 2 commits May 10, 2026 12:41
Enables automations and skill-to-skill callers to run /ce-compound without
blocking on user questions.

In headless mode:
- skip the Full/Lightweight question and the session-history follow-up;
  run Full without session history
- apply the Discoverability Check edit silently when an instruction file
  lacks a docs/solutions/ mention
- skip Phase 3 specialized agent reviews to bound token usage
- end with a structured terminal report (Documentation complete /
  Documentation skipped) instead of the interactive "What's next?" menu

The doc itself is identical to what an interactive Full run produces.
Classification work (track, category, overlap) follows the same rules
and writes nothing extra into the artifact.

Modeled on ce-doc-review's mode:headless pattern.
Hard rename mode:autofix to mode:headless for naming parity with the rest
of the CE skill family (ce-compound, ce-doc-review, ce-code-review,
ce-plan), all of which use mode:headless for their non-interactive paths.

Semantics are unchanged. Also adds an argument-hint so the flag is
discoverable to humans, not just model auto-invocation.

No alias for the old token — callers passing mode:autofix will need to
update to mode:headless.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc5c835f75

ℹ️ 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".

Comment thread plugins/compound-engineering/skills/ce-compound/SKILL.md
The previous wording framed "non-interactive mode" as the clearest example
of when un-validated bets need a visible Assumptions section. That framing
assumes synchronous = validated, which doesn't hold for skills like
ce-compound where the interactive flow asks only meta-questions (Full vs
Lightweight, session-history opt-in) and never validates the substantive
inferences (track, category, filename, overlap).

Reframe the test: compare per skill, not per mode. An Assumptions section
is audit content when the corresponding interactive mode would have
validated content that the headless run skips. When neither mode validates
the inferences, labeling them only in headless is misleading — it implies
interactive runs validated content they didn't.

Prompted by Codex review feedback on the ce-compound mode:headless PR,
where the literal reading of the old rule generated incorrect guidance for
a skill whose interactive mode doesn't validate the relevant content.
@tmchow tmchow merged commit 9b45a83 into main May 10, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request May 10, 2026
LLMpsycho pushed a commit to LLMpsycho/compound-engineering-plugin that referenced this pull request May 10, 2026
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