Tech DebtsCLI
OpenCode Ruff Hooks
OpenCode Ruff Hooks
Initial Debt
dp scaffold setup generated shared hook assets but left two setup gaps. OpenCode's auto-loaded plugin and a generated native formatter entry competed for the same edit. The neutral hook also ignored Python backend files, so apps/backend/**/*.py edits did not run Ruff.
Resolution
- Kept OpenCode activation plugin-only through
.opencode/pluginsand removed the exact managed legacy native formatter entry while preserving other config. - Added
.pysupport to the neutral hook. - Routed captured Python bytes through Ruff stdin with
uv run --project, the original path as--stdin-filename, and successful-output-only publication. - Scaffolded the neutral hook for Python-detected repositories, not only Oxfmt-detected TypeScript repositories.
Resolution Spec
apps/wiki/content/docs/project/specs/cli/issue-16-opencode-ruff-hooks/SPEC.md
Implementation Notes
apps/wiki/content/docs/project/specs/cli/issue-16-opencode-ruff-hooks/IMPLEMENTATION-NOTES.md
Backlog Mirror
- GitHub issue #16:
https://github.com/wearedevpunks/harness-intelligence/issues/16
Validation
bun run test --filter=@punks/cli -- data/hooks.test.ts content/content.test.ts scaffold/run.test.tsbun run check-types --filter=@punks/clibun run check --filter=@punks/cligit diff --check