- Merge base.mdc and architecture-map.mdc into .ai/AGENTS.md (global always-apply rules) - Create .ai/skills/node-development/SKILL.md (node.mdc + api-routing §3-6) - Create .ai/skills/web-development/SKILL.md (web.mdc + 4 UI policies + api-routing §1-2,6-7) - Simplify create-plan SKILL.md §3 to reference new domain skills instead of inline rules - Replace scripts/sync_agent_config.py with scripts/sync.sh (shell-based sync) - Update Makefile sync-ruler target to use sync.sh - Update .gitignore: replace /CLAUDE.md with /AGENTS.md - Untrack .claude/ and .cursor/ directories (gitignored generated outputs) - Remove old agent-config/, .agents/ directories and CLAUDE.md
33 lines
815 B
Bash
Executable File
33 lines
815 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
AI_DIR="$ROOT/.ai"
|
|
|
|
# --- AGENTS.md ---
|
|
if [ -f "$AI_DIR/AGENTS.md" ]; then
|
|
if ! cmp -s "$AI_DIR/AGENTS.md" "$ROOT/AGENTS.md" 2>/dev/null; then
|
|
cp "$AI_DIR/AGENTS.md" "$ROOT/AGENTS.md"
|
|
echo "sync-ruler: AGENTS.md updated"
|
|
fi
|
|
fi
|
|
|
|
# --- Skills ---
|
|
if [ -d "$AI_DIR/skills" ]; then
|
|
for dest in .claude/skills .cursor/skills .agent/skills; do
|
|
mkdir -p "$ROOT/$dest"
|
|
rsync -a --delete "$AI_DIR/skills/" "$ROOT/$dest/"
|
|
echo "sync-ruler: $dest synced"
|
|
done
|
|
fi
|
|
|
|
# --- Ignore files ---
|
|
if [ -f "$AI_DIR/ignore" ]; then
|
|
for dest in .claudeignore .cursorignore .aiignore; do
|
|
if ! cmp -s "$AI_DIR/ignore" "$ROOT/$dest" 2>/dev/null; then
|
|
cp "$AI_DIR/ignore" "$ROOT/$dest"
|
|
echo "sync-ruler: $dest updated"
|
|
fi
|
|
done
|
|
fi
|