Add Pathfinder as an optional Step 0 and offload prompt depth to references

Pathfinder charts an idea that is too big to plan as a map of decision
questions under specs/<idea>/pathfinder/, clearing one per session until it
can hand a PLAN-DRAFT to Step 1. Finalize now archives pathfinder/ with the
spec and revise-plan no longer deletes it — both previously described the
cleanup target in wording that pointed at questions/. Init-update Step 7 and
review Session End move to reference files with inline fallbacks.

AI Assisted
This commit is contained in:
2026-08-08 12:39:13 -07:00
parent 48a7cf68bd
commit 0501260098
16 changed files with 2557 additions and 102 deletions
@@ -0,0 +1,65 @@
# Step 7 — AI Agent File Sync
Check for other AI agent config files and offer to replace them with AGENTS.md
references, so AGENTS.md stays the single source of truth.
## Files to Detect
| File | Reference Path |
|------|----------------|
| `CLAUDE.md` (root) | `./AGENTS.md` |
| `GEMINI.md` (root) | `./AGENTS.md` |
| `.cursorrules` (root) | `./AGENTS.md` |
| `.github/copilot-instructions.md` | `../AGENTS.md` |
| `.cursor/rules/*.md` | `../../AGENTS.md` |
| `.windsurf/rules/*.md` | `../../AGENTS.md` |
**No files found:** Skip silently, end workflow.
## If Files Found
```
+---+
| o |
| ~ | Found other AI agent configs!
+---+
```
> Found AI config files that could reference AGENTS.md:
>
> | File | Size |
> |------|------|
> | `CLAUDE.md` | 45 lines |
>
> Replace with AGENTS.md references?
> - **Yes** - Update all
> - **Select** - Choose specific (numbered list)
> - **No** - Keep as-is
**Warning** for files >10 lines: "[file] has custom content that will be replaced."
## CLAUDE.md Template
CLAUDE.md gets a special template because Claude Code auto-loads it — the `CRITICAL — MANDATORY FIRST STEP` directive ensures AGENTS.md is always read:
```markdown
# CLAUDE.md
**CRITICAL — MANDATORY FIRST STEP: You MUST read [AGENTS.md](./AGENTS.md) before responding to ANY user message, including simple questions. Do NOT skip this step regardless of how trivial the request appears. No exceptions.**
See AGENTS.md for full project documentation: commands, architecture, environment, testing, deployment, and .agents-docs/ section details.
This file exists for Claude Code auto-loading. All AI coding agents should reference AGENTS.md.
```
## Reference Template (all other files)
Use title and path from the detection table:
```markdown
# [Title]
See [AGENTS.md]([Path]) for full project documentation: commands, architecture, environment, testing, deployment, and .agents-docs/ section details.
```
**For directory configs** (`.cursor/rules/`, `.windsurf/rules/`): Delete existing `.md` files, create single `reference.md`.