docs: add .agents workspace and the Astro refactor plan

Adds the agent-facing workspace and a 20-task plan for migrating the site
to Astro. Nothing here implements the refactor; these are briefs, rules and
templates that the task agents read.

- .agents/ holds context, rules, checklists, skills, specialist agents,
  component/page/config templates and gate scripts. It is vendor-neutral so
  MiniMax, Gemini and Codex can all read it; CLAUDE.md just points at
  AGENTS.md.
- .husky/ plus .lintstagedrc.json wire the three gate tiers. gate.sh locks on
  the shared git-common-dir so parallel worktrees serialise, and guards the
  assertion count in scripts/verify.mjs against a coverage drop.
- plans/astro-refactor/ carries the phase graph, per-task briefs and the
  model-routing recommendation.

These files must be tracked before fanning out: a worktree only checks out
tracked files, so an untracked plan is invisible to every agent working in one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Marcos Paulo
2026-09-05 01:18:27 +00:00
parent aa85c1d0b7
commit aae4d42229
79 changed files with 3805 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
#!/usr/bin/env bash
# Guards the silent-failure mode described in .agents/rules/gates.md.
#
# Husky points core.hooksPath at `.husky/_`, but that directory is GENERATED by
# `npm install` and is NOT committed. A fresh `git worktree add` therefore has
# hooks configured and the directory missing — so every hook silently does
# nothing and every commit passes unchecked.
#
# Run this in any worktree you did not create with worktree.sh.
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
fail=0
path=$(git config --get core.hooksPath || true)
if [ -z "$path" ]; then
echo "✗ core.hooksPath is unset — husky was never installed here"
fail=1
else
echo "✓ core.hooksPath = $path"
fi
if [ ! -d "${path:-.husky/_}" ]; then
echo "${path:-.husky/_}/ does not exist — HOOKS ARE NOT RUNNING"
fail=1
else
echo "${path} exists"
fi
for hook in pre-commit commit-msg pre-push; do
if [ -f ".husky/$hook" ]; then
echo "✓ .husky/$hook present"
else
echo "✗ .husky/$hook missing"
fail=1
fi
done
if [ ! -d node_modules ]; then
echo "✗ node_modules missing — lint-staged and astro check cannot run"
fail=1
fi
if [ "$fail" -ne 0 ]; then
echo
echo "Fix: npm ci --prefer-offline (its prepare script regenerates .husky/_)"
exit 1
fi
echo
echo "hooks are live in this worktree"