emit_companions
Regenerate companion rule files for AI agents from rule memories. Writes to AGENTS.md, CLAUDE.md, Cursor rules, or Gemini instructions, with optional target filtering.
Instructions
Regenerate companion rule files from the current rule memories. Writes one or more of: AGENTS.md (universal cross-tool standard, Linux Foundation), CLAUDE.md (Claude Code's 5-level hierarchy), .cursor/rules/*.mdc (Cursor's MDC format · hard rules get alwaysApply:true, soft rules become description-driven), .gemini/instructions.md (Gemini CLI). Default writes ALL four targets. Use targets to filter. Output dir resolves from out_dir, then AGENT_MEMORY_COMPANION_DIR env, then process.cwd().
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out_dir | No | Optional output directory. Defaults to AGENT_MEMORY_COMPANION_DIR env, then process.cwd(). | |
| targets | No | Which companion files to emit. Omit (or pass empty) to emit all four. Examples: ['agents'] for AGENTS.md only, ['claude','cursor'] for Claude Code + Cursor. |