Instruction file imported from jmdjean/Context-Generator-for-AI-Agent (
.cursor/rules/module-exporters.mdc). Copyright stays with the author.
Exporters — ai-project-docs
Rule exclusive to this repo. Read src/exporters/README.md. Documentation in English.
Responsibility
Translate ProjectKnowledge into agent-facing files. Presentation layer — no repo analysis, no AI calls.
Registered exporters today
| Exporter | Target | Output |
|---|---|---|
generic-agent-exporter.ts |
generic |
.ai-docs/agent-pack/AGENTS.generated.md |
cursor-exporter.ts |
cursor |
.cursor/rules/ai-project-docs.mdc |
New targets (claude, codex, copilot): register in exporter-registry.ts.
Adding an exporter
- Pure renderer (
*-renderer.ts) — receivesProjectKnowledgeonly - Exporter (
*-exporter.ts) — implementsAgentExporter - Register in
exporter-registry.ts - Reuse
export-file-writer.tsandagent-export-sections.tswhen possible - Reuse
render-helpers.tsfromsrc/docs/markdown-renderers/for consistency
Required marker
Every tool-managed file starts with:
<!-- Generated by AI Project Docs. Safe to update. -->
Files without the marker (e.g. agent-workflow.mdc) are user-managed — the exporter must not overwrite them.
Pipeline
Step Export Agent Context — runs only with --export-agents. Results in analysis.agentExports, persisted to .ai-docs/knowledge/agent-exports.json.
Hard stops
fsreads on the target repo to discover facts- OpenRouter
- Bypass pipeline from
cli.ts - Hardcode project facts — read from PKM
- Overwrite user-managed rules in
.cursor/rules/ - Non-English prose in generated export content