Harness Intelligence Wiki
SpecsCLICli Update Enforcement

CLI Update Enforcement Implementation Notes

Implementation Notes: CLI Update Enforcement

Delivered

  • .devpunks/settings.json now preserves and writes cliVersion and baselineVersion pins on accepted scaffold-writing CLI flows.
  • dp check is a read-only drift command for CLI executable drift, managed scaffold/baseline drift, and settings pin drift.
  • dp check --json includes failed, cli, settings, releaseSummary, and update.
  • Session-start scaffold hooks now call dp check or punks check.
  • Drift remediation guidance tells operators to ask before proceeding and run accepted dp upgrade or dp update remediation in a subagent.
  • Packaged CLI dist includes CHANGELOG.md and BASELINE_CHANGELOG.md so changelog summaries work from global/npm installs.
  • Upstream dp-cli skill source was updated, pushed, and synced into Harness mirrors.
  • Docs ingest completed for root docs, scaffolding runbook, wiki scaffold lifecycle pages, hook page, basic usage, wiki log, and CLI spec index.

Review Fixes

  • Fixed packaged/global CLI changelog availability by copying root changelogs into apps/cli/dist and asserting they exist in the installed package layout.
  • Fixed settings-pin drift coverage by comparing .devpunks/settings.json cliVersion and baselineVersion during dp check, failing on drift, rendering a Version Pins section, and exposing the result in JSON.
  • Fixed final review blockers: changelog lookup now continues until a candidate contains the requested release heading, and stale project cliVersion pins route to an accepted project write path instead of dp upgrade.

Validation

  • bun --cwd apps/cli test src/cli/check-command.test.ts src/scaffold/stage.test.ts src/scaffold/run.test.ts src/update/run.test.ts src/content/content.test.ts src/data/hooks.test.ts src/data/scripts/sync-subagents.test.ts passed: 7 files, 100 tests.
  • bun --cwd apps/cli test src/ui/brand.test.ts src/cli/check-command.test.ts src/content/content.test.ts src/data/hooks.test.ts src/data/scripts/sync-subagents.test.ts passed: 5 files, 39 tests.
  • bun --cwd apps/cli test src/cli/check-command.test.ts passed: 9 tests.
  • bun --cwd apps/cli check-types passed.
  • bun --cwd apps/cli check passed.
  • bun run --cwd apps/wiki check-types passed.
  • git diff --check passed.
  • bun --cwd apps/cli build passed.
  • node scripts/assert-dist-commands.mjs from apps/cli passed.
  • Temp scaffold smoke ran dp check --json --baseline bundled, exited 1 due detected drift, returned failed, cli, settings, and update, and left .devpunks plus .agents hashes unchanged.

Phase Closeout

  • Requirements: closed 100%.
  • Spec: reviewed.
  • Plan: executed.
  • Implementation: complete.
  • Review: mandatory review found two blockers; both fixed and revalidated before final review.
  • Debugging: skipped; no runtime failure after fixes.
  • Docs ingest: complete.

On this page