Closes #27. PROJECT.md - Git section: TBD as the convention. Commit to main, one logical change per commit, `task check` locally before push, CI is the quality gate. PRs only for the parallel-agent exception. - Agent rule 6: rewritten to match. .gitea/workflows/cd.yml - Drop the pull_request trigger — vestigial under TBD. - Drop the `if: github.event_name != 'pull_request'` guard on the build job (now always true since pull_request no longer fires). Tag pushes still build (no version gating regression). - Deploy `if` left alone — already correctly limits deploy to main pushes, skipping tag-push builds. .githooks/pre-push (new) - Runs `task check` before every push. Set up via `task setup:hooks`, which sets core.hooksPath to the in-repo .githooks dir. Taskfile.yml - New `setup:hooks` task to install the pre-push hook on a fresh clone. README.md - Quickstart section showing `task setup:hooks` + the TBD policy. Derived adapters regenerated via `task context:sync` and committed in the same commit (single-commit invariant). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
63 lines
1.8 KiB
YAML
63 lines
1.8 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 .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"
|
|
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]
|
|
context:sync:cursor:
|
|
cmds: [bash scripts/context-sync.sh cursor]
|