Skip to content

feat(cli): apply an Outfit before launching from outfit harness - #17

Merged
outofcoffee merged 1 commit into
mainfrom
claude/outfit-harness-file-support-l81ojk
Jul 27, 2026
Merged

outofcoffee merged 1 commit into
mainfrom
claude/outfit-harness-file-support-l81ojk

Conversation

@outofcoffee

@outofcoffee outofcoffee commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

outfit harness can now take an Outfit and apply it on the way in, so one command dresses the agent and launches it.

Summary

  • Add --outfit/-O to outfit harness: the Outfit to apply before the harness launches, doing the same work outfit apply does (it routes through the same applySelection).
  • Given bare, the flag takes ./Outfit — the same default as apply, unapply and serve. A named path is attached to the flag (--outfit=PATH), and a directory holding an Outfit works as it does elsewhere.
  • Add --providers to harness so the pre-launch apply can resolve against a custom catalogue, as apply can.
  • --get/--set stay inspection/config only and apply nothing.
  • readOutfit's not-found hint now takes the caller's own usage string, so harness suggests outfit harness --outfit=FILE rather than a positional form that would not work for it.
  • Document the flag in the CLI usage, README.md, docs/outfit-file.md and AGENTS.md.

Implementation details

The flag's value is optional (outfitPathFlag implements IsBoolFlag) so that a bare --outfit can mean the default Outfit, matching every other Outfit-reading command. The consequence is that a path must be attached with =, because everything positional after the flags is forwarded to the harness — outfit harness -O run --model x still passes run --model x on to the agent.

That leaves one trap worth guarding: --outfit ./some/Outfit would apply the default ./Outfit and quietly hand the path to the agent. When the flag is given bare and the next positional names an Outfit file (or a directory holding one), the command errors with the attached form instead of guessing.

`outfit harness` gains --outfit/-O: the Outfit to apply before the harness
launches, doing the same work `outfit apply` does. Given bare it takes
./Outfit, as every other Outfit-reading command does; a path is attached to
the flag (--outfit=<path>) because positional args belong to the harness, and
a detached path is caught rather than silently forwarded.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012kCUwjoT8Pi8dyYMyPnSsZ
@outofcoffee
outofcoffee merged commit db8ad1c into main Jul 27, 2026
1 check passed
@outofcoffee
outofcoffee deleted the claude/outfit-harness-file-support-l81ojk branch July 27, 2026 12:18
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.

2 participants