Skip to content

@kekkai/blueprint / emitAgentFiles

Function: emitAgentFiles() ​

emitAgentFiles(blueprint, defaultTargets?, facts?): AgentFile[]

Defined in: src/emit/agent/targets.ts:75

Distribute the agent contract across tool-specific files. Shared context files (merge) get the compact pointer block, since people maintain those documents; tool-owned rule files (own) get the full contract. defaultTargets overrides the built-in default when emit.agents is unset; facts carries evidence no Blueprint holds, including lint integration and the package-install root. Pure — writes nothing.

Parameters ​

blueprint ​

Blueprint

defaultTargets? ​

AgentTarget[]

facts? ​

StackFacts & object = {}

Returns ​

AgentFile[]

Example ​

ts
for (const file of emitAgentFiles(blueprint)) {
  writeFileSync(file.path, file.content); // e.g. 'CLAUDE.md', '.cursor/rules/blueprint.mdc'
}