Summary
The repo's semgrep architecture-lint hook is currently blocked by pre-existing violations in internal/cli/, which prevents normal commits even when a change does not introduce any new boundary violations.
Current blockers seen from the hook output:
Why this matters
These are existing baseline violations, but the pre-commit hook runs across the whole boundary layer:
commit -> semgrep hook -> existing findings in unrelated files -> commit blocked
That means:
- unrelated changes need
--no-verify to land
- architecture lint loses signal because developers get blocked by old debt instead of new regressions
- boundary rules in
AGENTS.md / semgrep are harder to enforce incrementally
Desired outcome
Pick one of these approaches and make it explicit:
- Fix the existing violations in
master_worker.go and remote_control.go.
- Move them behind daemon /
orchapi APIs so CLI no longer crosses the boundary directly.
- If immediate cleanup is too large, add a deliberate temporary baseline/allowlist strategy so the hook blocks only new violations until the debt is retired.
Acceptance criteria
make lint does not fail solely because of the known internal/cli/ baseline violations.
- Commits for unrelated changes do not require
--no-verify.
- The long-term boundary remains: CLI should use daemon APIs rather than direct daemon/process/multiplexer/OpenCode/file-system operations.
Summary
The repo's semgrep architecture-lint hook is currently blocked by pre-existing violations in
internal/cli/, which prevents normal commits even when a change does not introduce any new boundary violations.Current blockers seen from the hook output:
internal/cli/master_worker.gosemgrep.cli-no-daemon-importinternal/daemondirectly.internal/cli/remote_control.gosemgrep.no-raw-exec-in-boundary-layersexec.Commandin a CLI boundary file.semgrep.cli-no-worktree-fs-check-incrementalos.Statworktree checks in CLI.semgrep.cli-no-opencode-clientagent.NewOpenCodeClient(...)directly.semgrep.cli-no-multiplexer-directWhy this matters
These are existing baseline violations, but the pre-commit hook runs across the whole boundary layer:
That means:
--no-verifyto landAGENTS.md/ semgrep are harder to enforce incrementallyDesired outcome
Pick one of these approaches and make it explicit:
master_worker.goandremote_control.go.orchapiAPIs so CLI no longer crosses the boundary directly.Acceptance criteria
make lintdoes not fail solely because of the knowninternal/cli/baseline violations.--no-verify.