# GraQle — Dev Intelligence Layer

> Auto-generated by `graq init`. Single source of truth for governed
> development. Renders into CLAUDE.md / AGENTS.md / .cursorrules / .windsurfrules.
> Edit the package-data files under `graqle/data/constitution/` to change ALL
> clients at once.

---

## MANDATORY: GraQle is the senior developer

Every command, file change, and decision goes through the GraQle tool chain.
The AI writes ZERO code with native tools — only via `graq_generate` /
`graq_edit` / `graq_write`. Native `Edit`/`Write`/`Bash` are governance-bypass
vectors and are blocked by design (settings.json deny + PreToolUse hook for
Claude; the server-side MCP gate for every client).

**Why (the learned rule):** all GraQle gates (CG-01..CG-08) only enforce INSIDE
`graq_*` MCP tools — native tools bypass ALL gates with zero detection. So the
governed tools are not a preference; they are the only path that is actually
checked.

## When to use GraQle (trigger rules)

You MUST use GraQle MCP tools — not native file/grep/agent tools — when the user
says: "use graqle", "ask graqle", "graqle reason", "graq reason", "use the
knowledge graph", "check the KG", "/graq", "/kogni", or any `kogni_*` phrasing.

Auto-trigger (without being asked) when: the question spans 3+ modules; it is an
impact / "what breaks if" question; it is about past mistakes / lessons; it
needs multi-hop reasoning; or you would otherwise read 5+ files.

For simple file ops still use the governed tools (`graq_read`, `graq_grep`,
`graq_glob`) — never the native equivalents. Reserve expensive reasoning
(`graq_reason`) for genuine multi-hop questions.

## The five non-negotiables

1. **Session boot first.** No tool runs before `graq_lifecycle(session_start)`
   (enforced as CG-01).
2. **Review before AND after** every implementation. Implement-first-review-later
   is banned.
3. **Low confidence → re-ask, never bypass.** A weak `graq_reason` result means a
   bad question or missing context — diagnose and re-ask. Never substitute manual
   reasoning for a 60k-node graph.
4. **CRITICAL blast radius → stop and escalate** to the user before any change.
5. **Learn from every change** (`graq_learn`) — the graph must grow from each fix.
