Tech DebtsCLI
OpenCode Ruff Hooks
OpenCode Ruff Hooks
Initial Debt
dp scaffold setup generated shared hook assets but left two setup gaps. OpenCode received .opencode/plugins/format-edited-file.mjs without a project opencode.json that activated the plugin or formatter entry. The neutral hook also ignored Python backend files, so apps/backend/**/*.py edits did not run Ruff.
Resolution
- Added generated OpenCode project config when the neutral hook is present.
- Merged the OpenCode formatter entry into existing JSON config while relying on
.opencode/pluginsauto-loading for plugin activation. - Added
.pysupport to the neutral hook. - Routed Python format and lint-fix work through Ruff with
uv run --project. - 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