feat: add --fit axis for seniority-tier composition#61
Merged
Conversation
Introduces `fit` as a fourth composition primitive alongside outfit, cut, and accessory. Fits express seniority tier (junior-engineer / engineer / senior-engineer / staff-engineer) and compose as an overlay between outfit and cut in the prose-union layer order: outfit → fit → cut → accessory. Skill/agent/hook union remains order-independent set algebra. - Register `fit` as a known component type alongside outfit/cut/accessory - Add FitSchema (same shape as CutSchema with type literal 'fit') - New src/lib/fit.ts mirrors cut.ts (findFit / listAllFits, 3-tier discovery) - Wire `--fit <name>` CLI flag through suit <harness>, suit up, suit prepare; enforce singleton (duplicates error at parse time) - Add `fits/` to content-root scan with fit.md filename convention - Resolver: fit layers between outfit and cut for skill_include/exclude, include block force-includes, enable/disable globals, and category intersection. cutPrompt unions fit body + cut body when both present; preserves cut-only byte-for-byte for back-compat. - Adapters (claude-code / codex / gemini / pi): emit [] for `type: fit` (same as cut/accessory — composed at resolve time, not per-component) - Lockfile: optional `fit` field in resolution block, omitted when null for back-compat with pre-fit lockfiles - Suit introspection: `suit list fits` and `suit show fit <name>` - Validate: TAXONOMY cross-ref + body size limits apply to fits Tests added: - src/tests/fit.test.ts — schema validation, 3-tier discovery, listing, precedence, composition (skill_include rescue, skill_exclude drop, include.skills force-include, fit+cut prose layering, category intersection) - ac-cli.test.ts: --fit parsing, singleton enforcement, value-required errors Closes #60
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.
Summary
Adds
fitas a fourth composition primitive alongside outfit / cut / accessory. Fits express seniority tier (junior-engineer / engineer / senior-engineer / staff-engineer) and compose as a strict overlay between outfit and cut in the prose-union layer order: outfit → fit → cut → accessory. Skill/agent/hook union remains order-independent set algebra.Closes #60.
Companion wardrobe PR: danmestas/wardrobe#122 (introduces the 4 fits content side).
What changed
FitSchemamirrorsCutSchema(overlay shape) withtype: 'fit'.src/lib/fit.ts(findFit / listAllFits, 3-tier project → user → builtin);fits/added to discover.ts;fit.mdfilename convention.--fit <name>wired throughsuit <harness>,suit up,suit prepare. Singleton — duplicate--fitflags error at parse time. Unknown fit names error with "Available: ..." list.cutPromptunions fit body + cut body when both present; preserves cut-only output byte-for-byte for back-compat.[]fortype: fit— same as cut/accessory, composed at resolve time.fitfield on resolution block, omitted when null so pre-fit lockfiles remain bit-identical.suit list fitsandsuit show fit <name>.Test plan
fits/<name>/fit.mdresolves identically to a cut shape (FitSchema parsing, 3-tier discovery, project-scope wins, throws with available names listing)--fit <unknown>errors with available names--fitflags error as singleton violationcutPromptSUIT_CONTENT_PATH=$WD suit list fits→ 4 fits returnedSUIT_CONTENT_PATH=$WD suit show fit engineer→ renders manifest + bodySUIT_CONTENT_PATH=$WD suit prepare --outfit code --fit junior-engineer --target claude --dry-run→ 49 deduped files emittedSUIT_CONTENT_PATH=$WD suit up --outfit code --fit junior-engineer --cut executingwrites lockfile withfit: junior-engineernpm ci && npm run typecheck && npm run build && npm link && npm test— 584/584 pass (557 existing + 27 new)Back-compat
RunUpArgs.fitandRunPrepareArgs.fitare optional — pre-fit callers compile unchanged.fitwhen null — existing test fixtures bit-equal.cutPromptpreservescutBody ?? ''byte-for-byte when only cut is supplied.ManifestSchemadiscriminated union addsFitSchemaas a new branch — non-fit manifests parse unchanged.