feat: allow include block on outfits (parity with cuts and accessories)#63
Merged
Conversation
Relax the outfit Zod schema to accept an optional `include:` block with `hooks`, `agents`, `commands`, and `rules` keys — the same shape cuts and accessories already use. Skills stay on `skill_include`/`skill_exclude` for v1 to avoid a breaking change; the schema rejects any `include.skills` on an outfit with a clear unrecognized-key error. Composition routes outfit-provided includes through the existing `validateIncludes` pathway, so a missing hook/agent/rule reference fails resolution with `outfit "<name>" includes <kind> "<ref>" not found in wardrobe`. Outfit-include validation runs before cut/fit/accessory so the higher-precedence layer surfaces typos first. Existing outfits without an `include` block parse unchanged. Closes #62
Merged
danmestas
added a commit
that referenced
this pull request
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #62
Summary
Relaxes the outfit Zod schema to accept an optional
include:block withhooks,agents,commands, andruleskeys — the same shape cuts and accessories already use. Skills stay onskill_include/skill_excludefor v1 (no breaking change), andinclude.skillson an outfit produces a clear unrecognized-key error from Zod.strict().Motivation
Surfaced concretely while shipping universal cost-saving tooling in the wardrobe content monorepo: danmestas/wardrobe#123 + danmestas/wardrobe#124. The outfit-update worker hit
Unrecognized key(s) in object: 'include'on the first pass — outfit Zod strictly rejected theincludeblock. The PR landed with rtk hooks/agents stuck behind the--accessory rtk-toolingflag, which means every user has to remember the flag for token savings to fire. Defeats the universal intent.What's in the diff
src/lib/schema.ts— newOutfitIncludeBlockSchema(mirrorsIncludeBlockSchemaminusskills) wired intoOutfitSchema. Defaults to all-empty so existing outfits round-trip unchanged.src/lib/resolution.ts— outfit-include validation runs before cut/fit/accessory inresolve(). Synthesizesskills: []to keepvalidateIncludessingle-shape; schema already rejects author-providedinclude.skills. Thespeakerunion now includes'outfit'.src/tests/outfit.test.ts— 4 new schema tests (back-compat default, populated include,include.skillsrejected, unknown-key rejected).src/tests/resolution.test.ts— newdescribe('resolve — outfit include block (issue #62)')with 11 tests covering hooks/agents/rules/commands individually + combined, back-compat, catalog-miss errors, ordering (outfit before cut), and dedup-by-name when outfit + cut reference the same hook.Test plan
npm run typecheckcleannpm run buildcleannpm test— 599 passing (up from 584; 15 new tests)/Users/dmestas/projects/wardrobe: all 16 outfits resolve viasuit prepare --outfit <name> --target claude --dry-runsuit show outfit engineerstill works (introspect untouched per minimum-diff)Companion wardrobe change
Once this lands, wardrobe will migrate each outfit to include the rtk hooks + agents directly, removing the
--accessory rtk-toolingrequirement. Separate wardrobe PR linking back here.Out of scope (per issue body)
include.skillson outfits — deferred;skill_includestays canonical for skills in v1.excludeblock on outfits beyondskill_exclude— deferred.