# 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. If target is outside workspace, prefer `projectfs-mcp-server`; fall back to shell/escalation only if projectfs cannot read it.
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.
- If effective `GLOBAL.md`, `SUBAGENTS.md`, or a referenced local doc is outside the workspace, prefer `projectfs-mcp-server`; fall back to shell/escalation only when projectfs cannot read it.
- Persist memory only for reusable decisions, validated root causes, constraints, workarounds, and handoff checkpoints.
