diff --git a/scripts/context-sync.sh b/scripts/context-sync.sh index a3f9468..bdf38ee 100755 --- a/scripts/context-sync.sh +++ b/scripts/context-sync.sh @@ -39,7 +39,17 @@ fi if [ -n "$ROOT_CONTEXT" ] && [ -f "$ROOT_CONTEXT" ]; then echo " Root context: $ROOT_CONTEXT" else - echo " No root AGENT.md found (project context only)" + # No reachable root AGENT.md — common in CI's clean checkout. The root+project + # adapters (AGENTS.md, .cursorrules, .aider.conventions.md, system-prompt.txt) + # require the root context to regenerate correctly, so we skip them entirely + # and only regenerate CLAUDE.md (which is project-only and inherits root via + # tree walk in Claude Code itself). + echo " No root AGENT.md found — regenerating CLAUDE.md only" + echo "Syncing project context from $PROJECT_FILE..." + cat "$PROJECT_FILE" > CLAUDE.md + echo " → CLAUDE.md (project-only)" + echo "Done." + exit 0 fi # Emit root context + separator