.ai/README.md
This directory (community/.ai) contains the templates and documentation source used by:
node community/.ai/render-guides.mjs
The renderer produces guide files (AGENTS.md, CLAUDE.md), skill stubs, and OpenCode config/skills.
node community/.ai/render-guides.mjs
Force edition when needed:
AI_GUIDE_EDITION=COMMUNITY node community/.ai/render-guides.mjs
AI_GUIDE_EDITION=ULTIMATE node community/.ai/render-guides.mjs
AGENTS.mdcommunity/AGENTS.md (generated in ultimate workspace)CLAUDE.md (ultimate only)opencode.json (from .mcp.json).opencode/skill/* (mirrored from .codex/skills/*).agents/skills/*, .claude/skills/*, community/.claude/skills/* community/.ai/guide.md
|
| inject partials + compilation rule
v
+---------------------------------------------+
| template transforms |
| - rewrite markdown links |
| - apply IF_TOOL blocks |
| - apply IF_EDITION blocks |
| - strip TEMPLATE:COMMENT blocks |
| - normalize whitespace |
+----------------------+----------------------+
|
+--> AGENTS.md
+--> community/AGENTS.md (ultimate workspace)
+--> CLAUDE.md (ultimate only)
+--> opencode.json
+--> .opencode/skill/*
+--> skill stubs (see next section)
The renderer has two skill sources:
community/.agents/skills/*/SKILL.md.agents/skills/*/SKILL.mdGenerated stubs are recognized by marker:
<!-- Generated by community/.ai/render-guides.mjs; edit ... -->
Manual files in .agents/skills/ without that marker are treated as ultimate-only sources.
PASS 1 (community source skills)
--------------------------------
community/.agents/skills/<name>/SKILL.md
|--> .agents/skills/<name>/SKILL.md
|--> .claude/skills/<name>/SKILL.md
'--> community/.claude/skills/<name>/SKILL.md
PASS 2 (ultimate-only manual skills)
------------------------------------
.agents/skills/<name>/SKILL.md [manual, non-generated]
'--> .claude/skills/<name>/SKILL.md [ULTIMATE only]
Cleanup
-------
Generated stubs not in the expected set are pruned.
Only generated stubs are deleted. Manual files are preserved.
Edition resolution order:
AI_GUIDE_EDITIONRENDER_EDITION.ultimate.root.marker presence (ULTIMATE if present, else COMMUNITY)Accepted values: COMMUNITY, ULTIMATE.
Edition impact:
ULTIMATE
.claude/skills/* stubs)COMMUNITY
.claude/skills/community/.ai/guide.mdcommunity/.ai/partials/*.md.ai/partials/*.mdTool gating:
<!-- IF_TOOL:CODEX -->
... only in Codex outputs ...
<!-- /IF_TOOL:CODEX -->
Edition gating:
<!-- IF_EDITION:ULTIMATE -->
... only in ultimate outputs ...
<!-- /IF_EDITION:ULTIMATE -->
Template-only comments (removed in outputs):
<!-- TEMPLATE:COMMENT -->
internal notes only
<!-- /TEMPLATE:COMMENT -->
{{FORBIDDEN_TOOLS_SUFFIX}} is filled per output target.If placeholders remain after rendering, the renderer fails fast.
community/.ai/render-guides.test.mjsRun:
node --test community/.ai/render-guides.test.mjs
Unknown partial: ...
{{PARTIAL:name}} token spelling.IF_TOOL / IF_EDITION guards and selected edition.