Skip to content

refactor(adf): dismantle monolithic types.ts into domain-owned modules#22

Merged
SmartBrandStrategies merged 1 commit intomainfrom
refactor/split-types
Mar 3, 2026
Merged

refactor(adf): dismantle monolithic types.ts into domain-owned modules#22
SmartBrandStrategies merged 1 commit intomainfrom
refactor/split-types

Conversation

@SmartBrandStrategies
Copy link
Copy Markdown
Contributor

Summary

  • Split types.ts (258 LOC) into 6 focused domain files under types/:
    • ast.ts — AdfDocument, AdfSection, AdfContent, AdfMapEntry, AdfMetricEntry
    • decorations.ts — STANDARD_DECORATIONS, CANONICAL_KEY_ORDER
    • patch.ts — PatchOperation union and 7 op interfaces
    • manifest.ts — Manifest, ManifestModule, SyncEntry, CadenceEntry, MetricSource
    • bundle.ts — BundleResult
    • validation.ts — ConstraintStatus, ConstraintResult, WeightSummary, EvidenceResult, AdfLockfile, AdfSyncStatus
  • Barrel re-export from types.ts preserves all existing imports unchanged
  • Zero consumer-side import changes needed

Closes #10

Test plan

  • pnpm run build clean (TypeScript resolves all re-exports)
  • pnpm run test — 251 tests pass (zero changes to any test file)
  • ADF evidence ceilings green

🤖 Generated with Claude Code

Split types.ts (258 LOC) into 6 focused domain files under types/:
- ast.ts: AdfDocument, AdfSection, AdfContent, AdfMapEntry, AdfMetricEntry
- decorations.ts: STANDARD_DECORATIONS, CANONICAL_KEY_ORDER
- patch.ts: PatchOperation union and 7 op interfaces
- manifest.ts: Manifest, ManifestModule, SyncEntry, CadenceEntry, MetricSource
- bundle.ts: BundleResult
- validation.ts: ConstraintStatus, ConstraintResult, WeightSummary, EvidenceResult, AdfLockfile, AdfSyncStatus

Original types.ts replaced with barrel re-export for backward compatibility.
Zero import changes needed across all consumers.

Closes #10

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SmartBrandStrategies SmartBrandStrategies merged commit 01c5170 into main Mar 3, 2026
4 checks passed
@SmartBrandStrategies SmartBrandStrategies deleted the refactor/split-types branch March 3, 2026 11:17
stackbilt-admin pushed a commit that referenced this pull request Apr 9, 2026
Both packages are now powering downstream integrations in cc-taskrunner
(Stackbilt-dev/cc-taskrunner#21, #22). Added "Downstream integrations"
sections to both READMEs pointing at the taskrunner as a real-world
example of wiring these primitives into a governance workflow.

blast:
- Documents cc-taskrunner 1.5.0's 4-level severity ladder with gate
  behavior table
- Explains the auto_safe downgrade on critical severity
- Points at compute_blast_radius() in taskrunner.sh

surface:
- Documents cc-taskrunner 1.4.0's mission brief fingerprint injection
- Mentions the 80-line cap and graceful no-op behavior
- Points at build_fingerprint() in taskrunner.sh

Both sections help readers understand how these zero-dep analysis
packages compose with real autonomous-agent workflows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

refactor(adf): dismantle monolithic types.ts into domain-owned modules

2 participants