This repo's copy of context-sync.sh was two days stale against the version Mathias's Cursor/Aider decision (2026-09-01) already landed in dma-cli: still generated .cursorrules and .aider.conventions.md, and lacked the --force/placeholder pre-flight and .context/mcp.json root-merge dma-cli's copy has had since. Found while building the estate-wide context-sync drift gate (ADR-0019) -- this is exactly the drift the gate exists to catch, found by hand while establishing the baseline it will check going forward. - script synced to the canonical hash (dma-cli's current copy) - .cursorrules, .aider.conventions.md, .aider.conf.yml deleted - Taskfile's drift assertion and file list narrowed to match - AGENTS.md, .context/system-prompt.txt regenerated against canonical task check -> exit 0.
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
version: '3'
|
|
|
|
tasks:
|
|
build:
|
|
desc: Build the binary
|
|
cmds: [go build -o bin/gitea-mcp ./cmd/gitea-mcp]
|
|
run:
|
|
desc: Run the binary
|
|
deps: [build]
|
|
cmds: [./bin/gitea-mcp]
|
|
test:
|
|
desc: Run all tests
|
|
cmds: [go test ./... -race -count=1]
|
|
lint:
|
|
desc: Run golangci-lint
|
|
cmds: [golangci-lint run ./...]
|
|
vet:
|
|
cmds:
|
|
- go vet ./...
|
|
- govulncheck ./... || true
|
|
|
|
check:
|
|
desc: Run all checks (context freshness + lint + test + vet)
|
|
cmds:
|
|
- cmd: |
|
|
if [ -n "${CI:-}" ]; then
|
|
echo "✓ context sync: skipped in CI"
|
|
else
|
|
bash scripts/context-sync.sh
|
|
drift=$(git status --porcelain -- AGENTS.md CLAUDE.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 .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"
|
|
fi
|
|
- task: lint
|
|
- task: test
|
|
- task: vet
|
|
|
|
context:sync:
|
|
desc: Regenerate all harness-specific context files
|
|
cmds:
|
|
- bash scripts/context-sync.sh
|
|
|
|
setup:hooks:
|
|
desc: Install git hooks (.githooks/pre-push)
|
|
cmds:
|
|
- git config core.hooksPath .githooks
|
|
- chmod +x .githooks/pre-push
|
|
- echo "✓ git hooks installed (pre-push runs task check)"
|
|
|
|
context:sync:claude:
|
|
cmds: [bash scripts/context-sync.sh claude]
|
|
context:sync:agents:
|
|
cmds: [bash scripts/context-sync.sh agents]
|