SpecsCLIIP-98-shared-scaffold-model
Implementation Notes: IP-98 Shared Scaffold Model Boundary
Implementation Notes: IP-98 Shared Scaffold Model Boundary
Summary
Implemented packages/scaffold as a pure shared schema/type package for scaffold-domain model primitives that both CLI and API need.
Shared Candidates Captured
- Baseline channels and baseline manifest metadata.
- Artifact kind and artifact metadata.
- Baseline/source provenance.
- Pack/catalog entry primitives.
- Required-tool contract.
Explicitly Kept Out
- CLI filesystem writes, terminal UI, repo scanning, prompt rendering, local updates, and archive extraction behavior.
- API auth, blob storage, database persistence, release publication, and artifact hosting behavior.
Changes
- Added
@punks/scaffoldwith Effect Schema-backed model primitives and tests. - Kept
packages/contractindependent; it owns HTTP wire schemas directly instead of importing sibling scaffold models. - Updated
apps/clito consume scaffold-owned model types forPackId,PackCategory,BaselineChannel, andBaselineSource. - Updated
apps/apipackage dependencies and implementation so the API app composes@punks/contractwith@punks/scaffolddirectly. - Updated docs to document the scaffold model package boundary.
Manual Review Checklist
| Check | Result | Evidence |
|---|---|---|
| Shared candidates listed | Pass | SPEC and implementation notes list baseline, artifact, provenance, pack, and tool models. |
| CLI-only behavior excluded | Pass | Package exports schemas/types only; CLI runtime behavior remains in apps/cli. |
| API-only behavior excluded | Pass | Auth/blob/storage behavior remains outside packages/scaffold. |
| Both app consumers present | Pass | apps/cli and apps/api both depend on and import @punks/scaffold. |
| Package boundary clean | Pass | packages/contract no longer imports @punks/scaffold; app surfaces compose packages. |
| No sibling imports | Pass | packages/scaffold imports only effect. |
Validation Evidence
bun install --filter @punks/scaffoldbun run check-types --filter=@punks/scaffoldbun run test --filter=@punks/scaffoldbun run check-types --filter=@punks/contractbun run test --filter=@punks/contractbun run check-types --filter=@punks/apibun run test --filter=@punks/apibun run check-types --filter=@punks/clibun run checkbun run check-typesbun run testbun run buildgit diff --check
Review Notes
- The review gate found no unresolved behavior or boundary issues after local validation.
- Two read-only review workers timed out without returning findings; local review and root validation completed before docs-ingest-phase/commit.