156 lines
5.1 KiB
YAML
156 lines
5.1 KiB
YAML
version: '3'
|
|
|
|
vars:
|
|
PROJECT_NAME: hyperguild
|
|
VERSION:
|
|
sh: git describe --tags --always --dirty 2>/dev/null || echo "dev"
|
|
SHORT_SHA:
|
|
sh: git rev-parse --short HEAD
|
|
|
|
tasks:
|
|
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]
|
|
|
|
# ── Development ────────────────────────────────────────────────────────────
|
|
|
|
start:
|
|
desc: Start ingestion + supervisor (requires goreman — go install github.com/mattn/goreman@latest)
|
|
cmds:
|
|
- goreman start
|
|
|
|
stop:
|
|
desc: Stop all hyperguild processes (Ctrl-C in the goreman terminal, or kill by port)
|
|
cmds:
|
|
- lsof -ti:3300 | xargs kill -9 2>/dev/null || true
|
|
- lsof -ti:3200 | xargs kill -9 2>/dev/null || true
|
|
- echo "hyperguild stopped"
|
|
|
|
supervisor:dev:
|
|
desc: Run supervisor MCP server (development)
|
|
cmds:
|
|
- go run ./cmd/supervisor
|
|
|
|
hyperguild:dev:
|
|
desc: Run hyperguild CLI from source (e.g. task hyperguild:dev -- tier)
|
|
cmds:
|
|
- go run ./cmd/hyperguild {{.CLI_ARGS}}
|
|
|
|
hyperguild:build:
|
|
desc: Build the hyperguild binary into ./bin/hyperguild
|
|
cmds:
|
|
- mkdir -p bin
|
|
- go build -o bin/hyperguild ./cmd/hyperguild
|
|
|
|
hyperguild:install:
|
|
desc: Install hyperguild into $GOBIN
|
|
cmds:
|
|
- go install ./cmd/hyperguild
|
|
|
|
ingestion:dev:
|
|
desc: Run ingestion server in development mode
|
|
dir: ingestion
|
|
env:
|
|
INGEST_BRAIN_DIR: "{{.ROOT_DIR}}/brain"
|
|
INGEST_PORT: "3300"
|
|
cmds:
|
|
- go run ./cmd/server
|
|
|
|
# ── Build ──────────────────────────────────────────────────────────────────
|
|
|
|
build:
|
|
desc: Build all binaries
|
|
cmds:
|
|
- task: supervisor:build
|
|
- task: ingestion:build
|
|
|
|
supervisor:build:
|
|
desc: Build supervisor binary
|
|
cmds:
|
|
- go build -trimpath -ldflags="-s -w -X main.version={{.VERSION}}" -o bin/supervisor ./cmd/supervisor
|
|
|
|
ingestion:build:
|
|
desc: Build ingestion server binary
|
|
dir: ingestion
|
|
cmds:
|
|
- go build -trimpath -ldflags="-s -w" -o ../bin/ingestion-server ./cmd/server
|
|
|
|
# ── Quality ────────────────────────────────────────────────────────────────
|
|
|
|
check:
|
|
desc: Run all checks (context freshness + lint + test + vet) across all modules
|
|
cmds:
|
|
- task: context:sync
|
|
- cmd: |
|
|
drift=$(git status --porcelain -- AGENTS.md CLAUDE.md .cursorrules .aider.conventions.md .context/system-prompt.txt 2>/dev/null)
|
|
if [ -n "$drift" ]; then
|
|
echo "ERROR: derived adapters drifted from canonical context." >&2
|
|
echo "$drift" >&2
|
|
echo "" >&2
|
|
echo "Run: git add AGENTS.md CLAUDE.md .cursorrules .aider.conventions.md .context/system-prompt.txt" >&2
|
|
echo " git commit -m 'chore: re-sync context adapters'" >&2
|
|
exit 1
|
|
fi
|
|
echo "✓ context: canonical and adapters are in sync"
|
|
- task: lint
|
|
- task: test
|
|
- task: vet
|
|
|
|
lint:
|
|
cmds:
|
|
- golangci-lint run ./...
|
|
- cd ingestion && golangci-lint run ./...
|
|
|
|
test:
|
|
cmds:
|
|
- go test -race -count=1 ./...
|
|
- cd ingestion && go test -race -count=1 ./...
|
|
|
|
vet:
|
|
cmds:
|
|
- go vet ./...
|
|
- govulncheck ./... || true
|
|
- cd ingestion && go vet ./...
|
|
|
|
supervisor:test:smoke:
|
|
desc: Smoke test supervisor via MCP (requires start running)
|
|
cmds:
|
|
- |
|
|
curl -s -X POST http://localhost:${SUPERVISOR_PORT:-3200}/mcp \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | jq .
|
|
|
|
smoke:routing:
|
|
desc: Boot the routing pod against live LiteLLM + brain and verify _routing logs land
|
|
cmds:
|
|
- bash scripts/smoke-routing.sh
|
|
|
|
# ── Git / Release ──────────────────────────────────────────────────────────
|
|
|
|
tag:
|
|
desc: Create and push a semver tag (usage — task tag version=v1.2.3)
|
|
preconditions:
|
|
- sh: '[[ "{{.version}}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$ ]]'
|
|
msg: "version must be semver, e.g. v1.2.3 or v1.2.3-rc.1"
|
|
- sh: "git diff --quiet && git diff --cached --quiet"
|
|
msg: "working tree must be clean before tagging"
|
|
cmds:
|
|
- git tag -a {{.version}} -m "Release {{.version}}"
|
|
- git push origin {{.version}}
|
|
|
|
push:
|
|
desc: Push current branch and tags to origin
|
|
vars:
|
|
BRANCH:
|
|
sh: git rev-parse --abbrev-ref HEAD
|
|
cmds:
|
|
- git push origin {{.BRANCH}} --tags
|