nixcfg/config/opencode/agents
Harald Hoyer d5d90d8b9f fix(opencode): reject Rust src/tests/ paths as a wrong task spec
A workflow run on a Bevy/Rust project produced the test-file path
`src/tests/test_<feature>.rs`, which @test correctly flagged as
contradictory: it isn't a valid Rust test location (would require
declaring `mod tests;` in production source, which @test cannot do)
yet the file-gate glob `**/tests/**/*.rs` accidentally matched it.

Phase 5 now gives language-aware Test File guidance: Python uses
colocated or top-level `tests/`, Rust uses crate-level `tests/<feature>.rs`,
and Rust unit-only tasks are routed to NOT_TESTABLE for @make to
handle inline. Phase 6's file gate gains an explicit anti-pattern
clause discarding any new file under `src/` even when the glob matches.

@test's own File Constraint mirrors the anti-pattern so the agent
rejects the bad path with BLOCKED before the orchestrator's gate
even runs — defense in depth on both sides of the dispatch boundary.
2026-05-06 18:31:14 +02:00
..
check.md fix(opencode): remove temperature 2026-05-06 16:43:35 +02:00
make.md feat(opencode): make @make and @test polyglot (Python, Rust, nix devshell) 2026-05-06 17:09:34 +02:00
pm.md refactor(opencode): let @pm read TODO.md via git show, drop tempfile 2026-05-06 15:42:17 +02:00
simplify.md fix(opencode): remove agent models and temperature 2026-05-06 15:33:11 +02:00
test.md fix(opencode): reject Rust src/tests/ paths as a wrong task spec 2026-05-06 18:31:14 +02:00