diff --git a/Taskfile.yml b/Taskfile.yml index fbca41b..fe5c7f5 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,37 +1,79 @@ version: '3' tasks: - generate: - desc: Run templ generate - cmds: [templ generate] - build: - desc: Build the binary - deps: [generate] - cmds: [go build -o bin/hostexecutor ./cmd/hostexecutor] - run: - deps: [build] - cmds: [./bin/hostexecutor] - test: - desc: Run all tests - deps: [generate] - cmds: [go test ./... -race] - lint: - cmds: [golangci-lint run ./...] + + # ── Quality gate ────────────────────────────────────────────────────────── + check: - desc: Lint, vet, and test (used by CI) - deps: [generate] + desc: "Full quality gate: lint + vet + test (run before every commit)" cmds: - - golangci-lint run ./... - - go vet ./... - - go test ./... -race -count=1 + - golangci-lint run ./src/... + - go vet ./src/... + - go test ./src/... -race -count=1 + - cd model && python -m pytest tests/ -q + + test: + desc: Run Go tests only + cmds: [go test ./src/... -race] + + lint: + desc: Lint Go code + cmds: [golangci-lint run ./src/...] + + # ── Data ───────────────────────────────────────────────────────────────── + + data:fetch: + desc: "Download G10 tick data from DUKASCopy (2003–2022)" + cmds: [go run ./src/cmd/fetch --config data/config.yaml] + + data:process: + desc: "Resample ticks → hourly OHLCV + features (log-return, rolling HV)" + cmds: [go run ./src/cmd/process --input data/raw --output data/processed] + + data:validate: + desc: "Validate processed data: gap detection, outlier report, regime coverage" + cmds: [go run ./src/cmd/validate --input data/processed] + + # ── Experiment ─────────────────────────────────────────────────────────── + + experiment:run: + desc: "Run an experiment from a spec file. Usage: task experiment:run -- --spec specs/phase-0-ssl-feasibility.md" + cmds: [go run ./src/cmd/experiment {{.CLI_ARGS}}] + + experiment:list: + desc: List all recorded experiment runs + cmds: [ls -lt experiments/ | head -20] + + # ── Evaluation ─────────────────────────────────────────────────────────── + + eval:silhouette: + desc: "Compute silhouette score on embedding output. Usage: task eval:silhouette -- --run experiments/RUNID" + cmds: [go run ./src/cmd/eval silhouette {{.CLI_ARGS}}] + + eval:probe: + desc: "Run linear probe on frozen embeddings vs. realised-vol decile" + cmds: [go run ./src/cmd/eval probe {{.CLI_ARGS}}] + + eval:collapse: + desc: "Check collapse diagnostic: PC1 correlation with rolling HV" + cmds: [go run ./src/cmd/eval collapse {{.CLI_ARGS}}] + + # ── Model (Python) ─────────────────────────────────────────────────────── + + model:train: + desc: "Train TS-JEPA model. Usage: task model:train -- --config model/configs/phase0.yaml" + dir: model + cmds: [python train.py {{.CLI_ARGS}}] + + model:setup: + desc: "Create Python venv and install model dependencies (uv)" + dir: model + cmds: + - uv venv .venv + - uv pip install -r requirements.txt + + # ── Context ────────────────────────────────────────────────────────────── context:sync: - desc: Regenerate all harness-specific context files - cmds: - - bash scripts/context-sync.sh - context:sync:claude: - cmds: [bash scripts/context-sync.sh claude] - context:sync:agents: - cmds: [bash scripts/context-sync.sh agents] - context:sync:cursor: - cmds: [bash scripts/context-sync.sh cursor] + desc: "Regenerate CLAUDE.md and AGENTS.md from .context/PROJECT.md" + cmds: [bash scripts/context-sync.sh]