{"at":"2026-11-23T04:29:47.872Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T04:29:48.379Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T04:29:48.480Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T04:29:48.976Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"resources":{"listChanged":true},"tools":{"listChanged":true}},"instructions":"Two jobs: the project's context (project.faf) and its memory (.fafm).\nFor questions about the project (stack, goal, commands), read project.faf first and answer from it.\nContext: faf_score shows what is missing; faf_trust checks it is well-formed; faf_init creates one; faf_sync writes the context files from it, one way: the ones that exist (CLAUDE.md, .cursorrules, .windsurfrules, .clinerules), or CLAUDE.md when there are none.\nMemory: refresh_faf re-reads project.faf and reports drift since the last load; refresh_fafm reloads named souls; refresh_blend does both.\nfaf_get_orchestration_policy shows the policy without running faf_orchestrate_recommendation.\nrag_query needs an xAI Collection: XAI_API_KEY set (XAI_COLLECTION_ID picks the collection). Without the key, use the faf_ tools.","protocolVersion":"2025-11-25","serverInfo":{"name":"grok-faf-mcp","version":"2.2.4"}}}}
{"at":"2026-11-23T04:29:48.976Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T04:29:48.976Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T04:29:49.001Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Score a project's AI-readiness 0–100% against the fixed 33-slot context model — how much project DNA an agent has before it has to guess. Deterministic: the same .faf always scores the same. Returns the score, tier, and per-slot breakdown.","inputSchema":{"properties":{"details":{"description":"Include detailed breakdown and improvement suggestions","type":"boolean"}},"type":"object"},"name":"faf_score"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Re-ground on the live .faf — re-read + re-score the current project DNA, report drift vs your last-known score, and return the fresh context. The explicit re-grounding primitive for long sessions: drift → refresh → re-grounded. Built for Grok, by request.","inputSchema":{"properties":{"baseline":{"description":"Your last-known score (0-100). If provided, the drift delta is reported.","type":"number"},"path":{"description":"Project directory or .faf path (supports ~). Defaults to the session working directory.","type":"string"}},"type":"object"},"name":"refresh_faf"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Reload the latest structured memory (`.fafm`) for one or more souls into the current session. Returns a stamped delta by default (added/updated facts since last refresh or a given timestamp). Use `verbatim: true` to receive the full current `.fafm` content instead. Reads your files and writes a refresh receipt (.fafm-refresh-receipts.json) to the project folder. Always returns a content hash + timestamp stamp. Complements `recall`, `load_soul`, and `etch` — does not replace them.","inputSchema":{"additionalProperties":false,"properties":{"since":{"description":"Optional ISO timestamp. Only return facts modified after this time. Ignored when verbatim=true.","format":"date-time","type":"string"},"soul":{"default":"default","description":"Specific soul to refresh. Omit or use 'default' for the primary memory layer. Use 'all' to refresh every available soul.","type":"string"},"verbatim":{"default":false,"description":"If true, returns the full current .fafm content for the requested soul(s) instead of a delta. Use sparingly — deltas are preferred for normal operation.","type":"boolean"}},"type":"object"},"name":"refresh_fafm"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Heavy orchestrator — given current substrate state, returns a structured recommendation about drift: which refresh to call (or `no_action`), why, how severe, and the underlying signals. ADVISORY ONLY — never auto-fires. Composes the full 1.5 substrate (drift detection · contradiction check · repeat-offender · take-a-hint · refresh history). Writes a recommendation receipt on every call (auditable trail, no silent decisions). Read-only WRT substrate state.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"faf_orchestrate_recommendation"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Introspect the effective orchestration policy WITHOUT running the orchestrator. Returns `{ tier, thresholds, source, overrides_applied }` — what aggressiveness tier the next `faf_orchestrate_recommendation` call would use, and whether it came from defaults or a `.faf:orchestration:` override. No drift detection, no signals, no receipt — pure introspection. Read-only.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Optional explicit `.faf` file path or project directory (supports ~). When omitted, the live process cwd is searched for project.faf / .faf.","type":"string"}},"type":"object"},"name":"faf_get_orchestration_policy"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Baked-in two-intensity refresh (Cmd+R / Cmd+Shift+R analog). Fires BOTH `refresh_faf` + `refresh_fafm` in one call. `mode: \"blend\"` (default) = light `.faf` + delta `.fafm` — the everyday re-ground. `mode: \"nuke\"` = light `.faf` + verbatim `.fafm` — the hard reload for polluted session memory. Intensity matches drift rate per layer.","inputSchema":{"additionalProperties":false,"properties":{"baseline":{"description":"For refresh_faf: your last-known score (0-100). Drift delta reported if provided.","type":"number"},"mode":{"default":"blend","description":"'blend' (Cmd+R analog, default) = .faf + .fafm delta. 'nuke' (Cmd+Shift+R analog) = .faf + .fafm verbatim.","enum":["blend","nuke"],"type":"string"},"path":{"description":"For refresh_faf: project directory or .faf path (supports ~).","type":"string"},"since":{"description":"For refresh_fafm (delta mode only): ISO timestamp. Only facts modified after this. Ignored when mode=nuke (verbatim).","format":"date-time","type":"string"},"soul":{"description":"For refresh_fafm: specific soul. Omit or 'default' for primary; 'all' for every soul.","type":"string"}},"type":"object"},"name":"refresh_blend"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false,"title":"Initialize project.faf"},"description":"Create a project.faf — the IANA-registered context file (application/vnd.faf+yaml) that gives Grok persistent project DNA (stack, structure, intent) in one portable file, so an agent reads the whole project cold each session instead of re-discovering it. Writes project.faf to the target directory (created if missing) and refuses to overwrite an existing context file unless `force` is set. Run once at project start, or with `force` to regenerate, then call faf_score to check readiness. Returns a text confirmation with the written file path and the detected project type.","inputSchema":{"properties":{"directory":{"description":"Absolute or ~-relative project directory to initialize; created if it does not exist. Defaults to the current working directory.","type":"string"},"force":{"description":"Overwrite an existing project.faf. Default false: if a context file already exists, faf_init refuses and leaves it untouched.","type":"boolean"},"path":{"description":"Alias for `directory`; takes precedence if both are supplied.","type":"string"},"projectName":{"description":"Project name used to resolve the directory via the Projects convention when no directory/path is given.","type":"string"}},"type":"object"},"name":"faf_init"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Validate a project.faf with faf-cli — confirm the context file is well-formed and parses cleanly before an agent grounds on it, and report its always-33 score. The pre-flight trust check: never build on a broken context layer.","inputSchema":{"properties":{"path":{"description":"Project directory to check. Defaults to the current working directory.","type":"string"}},"type":"object"},"name":"faf_trust"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Sync project.faf into your AI context files: the ones that exist (CLAUDE.md, .cursorrules, .windsurfrules, .clinerules), or CLAUDE.md when there are none (target: all writes every one). Non-destructive: puts a structured .faf block at the top and keeps your own text; a file faf cannot safely write (not UTF-8, a link out of the project) is left unchanged and named in the reply. One way: never writes project.faf.","inputSchema":{"properties":{"target":{"description":"auto (default): the context files that already exist, or CLAUDE.md when there are none; a single file; or all","enum":["auto",".clinerules",".cursorrules",".windsurfrules","CLAUDE.md","all"],"type":"string"}},"type":"object"},"name":"faf_sync"},{"annotations":{"openWorldHint":true,"readOnlyHint":true},"description":"Ask a question with RAG-enhanced context from xAI Collections. Uses LAZY-RAG cache for 100,000x speedup on repeated queries.","inputSchema":{"properties":{"question":{"description":"Question to ask","type":"string"}},"required":["question"],"type":"object"},"name":"rag_query"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Get LAZY-RAG cache statistics - hits, misses, hit rate, cache size","inputSchema":{"properties":{},"type":"object"},"name":"rag_cache_stats"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Clear the LAZY-RAG cache — drop all cached retrievals so the next rag_query rebuilds from source. Use when the underlying context has changed and you want fresh results instead of cached ones.","inputSchema":{"properties":{},"type":"object"},"name":"rag_cache_clear"}]}}}
