diff --git a/Taskfile.yml b/Taskfile.yml index 871edb2..c0fe26f 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -22,18 +22,22 @@ tasks: check: desc: Run all checks (context freshness + lint + test + vet) 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 + 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 - echo "✓ context: canonical and adapters are in sync" - task: lint - task: test - task: vet