Build, Test & Lint
The root Makefile workflow — building the Go modules, running race tests, the local CI gate, and golangci-lint setup.
The root Makefile drives every sibling Go module. Each module is independently go build/go testable with its own go.mod.
Toolchain
Common targets
make build # build all Go modules
make install # drop the runnable CLIs into ./bin
make test # go test -count=1 -race ./... per module
make vet # go vet ./... per module
make ci # gofmt-check + vet + tests (mirrors GitHub Actions)
make version # print Go + golangci-lint + Docker versions
A clean make ci is the bar for opening a PR.
Linting
make lint-install # installs golangci-lint (pinned to v1.61.0)
make lint
The lint config (.golangci.yml) narrows static analysis to bugs and correctness rather than style churn.
Test discipline
- Don't weaken existing tests. Removing or skipping a test requires an explicit reason in the PR description.
- Add tests for new behavior — at minimum a happy path plus one error path.
- Cortex mutation paths need a
Rebuild-after-mutation test (seecortex/rebuild_test.go). - MCL lexer/parser/validator changes need token + parser tests, and every new validator rule needs a green-path and red-path test.
- Skill corpus:
./bin/mcl-validate skills/<slug>/SKILL.mtx; themtx-corpusCI job validates everySKILL.mtxon each PR.
