From 6a5f5a1e6c6e7d6e08b5e88472ccfb3ea4834bd5 Mon Sep 17 00:00:00 2001 From: Snider Date: Mon, 2 Feb 2026 15:35:58 +0000 Subject: [PATCH] chore: add task spec for issue 258 --- .core/task/issue/258/spec.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .core/task/issue/258/spec.md diff --git a/.core/task/issue/258/spec.md b/.core/task/issue/258/spec.md new file mode 100644 index 00000000..a73ae46e --- /dev/null +++ b/.core/task/issue/258/spec.md @@ -0,0 +1,29 @@ +# Issue 258: Smart Test Detection + +## Original Issue +https://github.com/host-uk/core/issues/258 + +## Summary +Make `core test` smart - detect changed files and run only relevant tests. + +## Commands +```bash +core test # Run tests for changed files only +core test --all # Run all tests +core test --filter UserTest # Run specific test +core test --coverage # With coverage report +``` + +## Acceptance Criteria +- [ ] Detect changed `.go` files via `git diff --name-only` +- [ ] Map source files to test files (`foo.go` → `foo_test.go`) +- [ ] Run only relevant tests via `go test` +- [ ] Support `--all` flag to run all tests +- [ ] Support `--filter` flag for pattern matching +- [ ] Support `--coverage` flag for coverage reports + +## Technical Context +- Go CLI using Cobra +- Commands in `cmd/core/cmd/` +- Follow existing patterns in `dev_*.go` files +