Class: RosettAi::Compiler::Backends::AgentsMdBackend
- Inherits:
-
RosettAi::Compiler::Backend
- Object
- RosettAi::Compiler::Backend
- RosettAi::Compiler::Backends::AgentsMdBackend
- Defined in:
- lib/rosett_ai/compiler/backends/agents_md_backend.rb
Overview
Compiler backend for AGENTS.md (AAIF standard format).
Renders behaviour configuration into idiomatic AGENTS.md files compatible with Claude Code, Goose, Cursor, and other AAIF-aligned tools. Output is valid Markdown without YAML frontmatter, following the AGENTS.md v0.1.0 specification.
Constant Summary collapse
- MARKER_PREFIX =
'<!-- rosett-ai-agents-md-managed'
Constants inherited from RosettAi::Compiler::Backend
RosettAi::Compiler::Backend::BUILTIN_BACKENDS
Instance Attribute Summary
Attributes inherited from RosettAi::Compiler::Backend
Instance Method Summary collapse
-
#generated_marker ⇒ String
Marker prefix for managed file detection.
-
#render(data) ⇒ String
Renders behaviour data into AGENTS.md format.
Methods inherited from RosettAi::Compiler::Backend
#file_extension, for, #initialize, #managed_file?
Constructor Details
This class inherits a constructor from RosettAi::Compiler::Backend
Instance Method Details
#generated_marker ⇒ String
Returns marker prefix for managed file detection.
34 35 36 |
# File 'lib/rosett_ai/compiler/backends/agents_md_backend.rb', line 34 def generated_marker MARKER_PREFIX end |
#render(data) ⇒ String
Renders behaviour data into AGENTS.md format.
25 26 27 28 29 30 31 |
# File 'lib/rosett_ai/compiler/backends/agents_md_backend.rb', line 25 def render(data) lines = build_header(data) lines.concat(build_description(data)) lines.concat(build_rules(data)) lines << '' lines.join("\n") end |