Multi-AI agent-instructions support via symlinks#43
Open
kirkabowman wants to merge 3 commits into
Open
Conversation
- analyze.py: change glob() to rglob() so folder-nested CFs are found; filter out folder separator pseudo-files via stub XML existence check; add folder_path to CF data and index loader - fmcontext.sh: fix sanitized body path lookup to be subfolder-relative (flat lookup silently missed nested CFs, misclassifying all as functional); add FolderPath as 7th column to custom_functions.index header and output; replace mapfile with while-read loop for bash 3.2 compatibility on macOS
- build_cf_names: use rglob instead of iterdir so custom functions nested inside folder-group subdirectories are discovered - parse_scripts: extend bracket guard to include lines with ']' so zero-argument CF calls on expression-continuation lines are not skipped Made-with: Cursor
Adds AGENTS.md (root) and .github/copilot-instructions.md as symlinks to the canonical .claude/CLAUDE.md so non-Claude AI tools (Aider, Cline, Continue.dev, OpenAI Codex CLI, GitHub Copilot, plus the existing Cursor .cursor/AGENTS.md symlink) find the same project conventions at the paths they expect, without duplicating content. Adds a verifier script (agent/scripts/sync_agent_docs.sh) suitable for pre-commit/CI to confirm all four paths resolve to byte-identical content. Documents the convention in both the canonical doc and ARCHITECTURE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AGENTS.mdat the repo root (symlink to.claude/CLAUDE.md) so AI tools that use the AGENTS.md convention — Aider, Cline, Continue.dev, OpenAI Codex CLI, generic AGENTS.md-aware tools — find the project conventions at the path they expect..github/copilot-instructions.md(symlink to.claude/CLAUDE.md) so GitHub Copilot picks up the same content..cursor/AGENTS.mdsymlink. Now four paths point to one canonical file:.claude/CLAUDE.md. Edit only the canonical; symlinks pick up changes automatically.agent/scripts/sync_agent_docs.sh— a verifier (md5-checks all four paths, prints how to restore symlinks if broken). Suitable for pre-commit or CI.ARCHITECTURE.md§ "Update documentation together".Why
Currently only Claude Code (
.claude/CLAUDE.md) and Cursor (.cursor/AGENTS.md) get the project conventions. Other AI assistants — Aider, Cline, Continue.dev, OpenAI Codex CLI, GitHub Copilot — read different conventional paths. This PR makes agentic-fm tool-agnostic without content duplication.Symlink-vs-copy choice
Symlinks (mode 120000 in git) avoid sync drift entirely. The existing
.cursor/AGENTS.mdis already a symlink, so this PR just extends the pattern. Caveats:Test plan
agent/scripts/sync_agent_docs.sh).claude/CLAUDE.md, confirmAGENTS.mdand.github/copilot-instructions.mdreflect the change without re-running anythingsync_agent_docs.shdetects the divergence and exits non-zero🤖 Generated with Claude Code