Harness Intelligence Wiki
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/scaffold with Effect Schema-backed model primitives and tests.
  • Kept packages/contract independent; it owns HTTP wire schemas directly instead of importing sibling scaffold models.
  • Updated apps/cli to consume scaffold-owned model types for PackId, PackCategory, BaselineChannel, and BaselineSource.
  • Updated apps/api package dependencies and implementation so the API app composes @punks/contract with @punks/scaffold directly.
  • Updated docs to document the scaffold model package boundary.

Manual Review Checklist

CheckResultEvidence
Shared candidates listedPassSPEC and implementation notes list baseline, artifact, provenance, pack, and tool models.
CLI-only behavior excludedPassPackage exports schemas/types only; CLI runtime behavior remains in apps/cli.
API-only behavior excludedPassAuth/blob/storage behavior remains outside packages/scaffold.
Both app consumers presentPassapps/cli and apps/api both depend on and import @punks/scaffold.
Package boundary cleanPasspackages/contract no longer imports @punks/scaffold; app surfaces compose packages.
No sibling importsPasspackages/scaffold imports only effect.

Validation Evidence

  • bun install --filter @punks/scaffold
  • bun run check-types --filter=@punks/scaffold
  • bun run test --filter=@punks/scaffold
  • bun run check-types --filter=@punks/contract
  • bun run test --filter=@punks/contract
  • bun run check-types --filter=@punks/api
  • bun run test --filter=@punks/api
  • bun run check-types --filter=@punks/cli
  • bun run check
  • bun run check-types
  • bun run test
  • bun run build
  • git 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.

On this page