Harness Intelligence Wiki
SpecsCLIIssue 58 Windows Scaffold Setup Mirrors

Spec: Windows Scaffold Setup Mirrors

Spec: Windows Scaffold Setup Mirrors

Initial Debt

dp scaffold setup writes generated Harness assets, then runs .agents/scripts/sync-subagents.mjs to project shared prompts, hooks, skills, and subagents into Codex, Claude, Cursor, and OpenCode surfaces. Issue 58 reports Windows 11 users can reach that final script and then fail on fs.symlink with EPERM, because symlink creation requires administrator rights or Developer Mode in common Windows setups. The same report says .claude/settings.json is overwritten with only Harness hooks, deleting existing permissions.allow settings.

Why Matters

The final mirror step is part of setup completion. It should not make Windows users repair generated files manually, and it should not destroy user-authored Claude permissions while adding Harness hooks.

Bounded Fix

  • Keep generated sync behavior owned by apps/cli/src/data/scripts/sync-subagents.mjs.
  • Use Windows-compatible directory junctions where directory links are still useful.
  • Fall back to copying managed mirror files or directories when symlink creation fails with EPERM.
  • Merge generated Claude hook settings into the existing .claude/settings.json object, preserving unrelated keys and existing permission allow-lists.

Non-Goals

  • Rewriting the subagent manifest model.
  • Changing selected packs or repo detection.
  • Changing Claude's permissions schema beyond preserving existing values.
  • Changing update drift behavior outside generated sync output.

Acceptance Checks

  • Regression test covers symlink EPERM fallback for generated prompt/skill/hook mirrors through the script's public execution path.
  • Regression test covers .claude/settings.json merge preserving existing permissions.
  • Existing sync-subagents prompt generation tests still pass.
  • docs/README.md and docs/runbooks/dp-cli-scaffolding.md document the setup behavior.

On this page