# Local Agent Bootstrap

Before any substantial analysis, implementation, or answer:

1. Read effective `GLOBAL.md`; it is authoritative shared project rules for this root.
2. If `GLOBAL.md` is a symlink, resolve target and read target content.
3. Prefer `projectfs-mcp-server` for every supported read-only filesystem operation, including paths inside the workspace: use `read_file` for one known file, `read_many` for multiple known files, `list_dir` for exploration, `grep_files` for literal search, and `stat` for metadata. Fall back to shell/escalation only when ProjectFS is unavailable, its guardrails deny the path, or it lacks the required capability; state the concrete limitation first.
4. Bootstrap is incomplete until effective `GLOBAL.md` content is read or access is explicitly blocked.

This file only locates shared rules. Future local additions must extend, not replace, `GLOBAL.md`.

Sub-agents: before spawning/delegating, read effective `SUBAGENTS.md` with the same symlink/projectfs fallback rules. `SUBAGENTS.md` extends this file only for delegation policy.

## Docs/memory routing on demand

- On session start and before non-trivial answers, decide whether the prompt needs docs or memory context.
- For shared/project docs, use `docs-mcp-server` first: search docs; if empty, inspect tags/list documents and retry with IT/EN domain synonyms before saying no docs exist.
- For reusable operational memory, use `memory-mcp-server`: search/read before writing; treat memory as context, not authority; verify against primary docs/code/tickets.
- For effective `GLOBAL.md`, `SUBAGENTS.md`, `SKILL.md`, referenced files, and local governance/docs, prefer `projectfs-mcp-server` inside and outside the workspace; apply the fallback rule above.
- Persist memory only for reusable decisions, validated root causes, constraints, workarounds, and handoff checkpoints.
