Run build command during worktree creation

Build agents enter fresh worktrees and hit 283 test failures (MODULE_NOT_FOUND) because `dist/` is gitignored and `createWorktree()` never runs the project's build command. The developer wants worktrees to be ready for baseline testing the moment they're created — deps installed, env linked, artifacts built.

verdict PASSscore 11 / 12findings 7 (2 risk · 1 debt · 4 obs)duration 1h 7mrejection cycles 0shipped May 14, 2026surface cli

Pipeline timeline

Intent to proven code in 1h 7m across Think, Plan, Build, and Verify.

Think
4m
Plan
4m
Build
5m
Verify
5m

Assertion ledger

12 claims, each independently verified. Showing 8 — show all →

IDSaysMatcher
A001Worktree creation runs the project's build command automaticallyverifiedok
A002The build produces artifacts inside the worktreeverifiedok
A003The build runs inside the worktree directory, not the main treeverifiedok
A004A failed build does not block worktree creationverifiedok
A005A failed build is reported in the resultverifiedok
A006All worktree setup steps complete even when the build failsverifiedok
A007Projects without a build command skip the build stepverifiedok
A008Skipping the build does not affect other worktree setup stepsverifiedok

Findings 7 total

riskpackages/cli/src/utils/worktree.tsclosed
No timeout on spawnSync — hanging build command blocks worktree creation indefinitely
riskpackages/cli/src/utils/worktree.tsclosed
Empty string build command passes typeof guard and executes spawnSync('')
debtpackages/cli/src/utils/worktree.tsscope
getBuildCommandString re-reads ana.json instead of receiving command from runBuildCommand — duplicate I/O with misleading 'pnpm run build' fallback
obspackages/cli/src/utils/worktree.tsclosed
getBuildCommandString fallback 'pnpm run build' is unreachable in practice — dead code path
obspackages/cli/tests/utils/worktree.test.tsclosed
A010 assertion uses toContain('## Build Status') — confirms heading exists but not that content follows the spec mockup format
+2more findings

Integrity seal

scopesha256:df3a12a701d45...
contractsha256:9df90d101d04a...
plansha256:658d430557f22...
specsha256:2696054c92b9c...
build-reportsha256:c94046e13cb62...
build-datasha256:b84ff5875d080...
verify-reportsha256:c24694fdffd6a...
verify-datasha256:6186d43e4d140...
audit cmd$ ana proof audit worktree-build-step   → all hashes match