Skip to content

feat: allow include block on outfits (parity with cuts and accessories)#63

Merged
danmestas merged 1 commit into
mainfrom
feat/issue-62-outfit-include
May 14, 2026
Merged

feat: allow include block on outfits (parity with cuts and accessories)#63
danmestas merged 1 commit into
mainfrom
feat/issue-62-outfit-include

Conversation

@danmestas

Copy link
Copy Markdown
Owner

Closes #62

Summary

Relaxes 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 (no breaking change), and include.skills on 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 the include block. The PR landed with rtk hooks/agents stuck behind the --accessory rtk-tooling flag, 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 — new OutfitIncludeBlockSchema (mirrors IncludeBlockSchema minus skills) wired into OutfitSchema. Defaults to all-empty so existing outfits round-trip unchanged.
  • src/lib/resolution.ts — outfit-include validation runs before cut/fit/accessory in resolve(). Synthesizes skills: [] to keep validateIncludes single-shape; schema already rejects author-provided include.skills. The speaker union now includes 'outfit'.
  • src/tests/outfit.test.ts — 4 new schema tests (back-compat default, populated include, include.skills rejected, unknown-key rejected).
  • src/tests/resolution.test.ts — new describe('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 typecheck clean
  • npm run build clean
  • npm test599 passing (up from 584; 15 new tests)
  • Back-compat against /Users/dmestas/projects/wardrobe: all 16 outfits resolve via suit prepare --outfit <name> --target claude --dry-run
    • aviation, backend, bones, code, engineer, frontend, implementer, kb, meta, orchestrator, personal, planner, quick, reviewer, spy, stasi — all green
  • suit show outfit engineer still 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-tooling requirement. Separate wardrobe PR linking back here.

Out of scope (per issue body)

  • include.skills on outfits — deferred; skill_include stays canonical for skills in v1.
  • exclude block on outfits beyond skill_exclude — deferred.
  • Schema migration for existing outfits — none needed.

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
@danmestas danmestas merged commit 012e749 into main May 14, 2026
1 check passed
@danmestas danmestas deleted the feat/issue-62-outfit-include branch May 14, 2026 21:09
@danmestas danmestas mentioned this pull request May 14, 2026
danmestas added a commit that referenced this pull request May 14, 2026
Two composition-axis extensions shipped between 0.14.0 and 0.15.0:

- `fit` axis (seniority tier) — #61, closes #60
- `include` block on outfits (parity with cuts/accessories) — #63, closes #62

Both additions are opt-in; no breaking changes. CHANGELOG updated.
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.

Allow include block on outfits (parity with cuts and accessories)

1 participant