Skip to content

Target Support

aspens separates two concepts:

  • Target — where generated docs are written and how the AI tool discovers them
  • Backend — which CLI generates the content

aspens supports three targets: Claude, Codex, and OpenCode.

Claude support is hook-aware and file-aware.

Published artifacts:

ArtifactPath
InstructionsCLAUDE.md
Skills.claude/skills/<name>/skill.md
Hooks.claude/hooks/...
Settings.claude/settings.json

Claude reads CLAUDE.md on startup and auto-activates skills through hooks and activation rules.

Codex support is document-driven rather than hook-driven.

Published artifacts:

ArtifactPath
InstructionsAGENTS.md
Skills.agents/skills/<name>/SKILL.md
Directory scope<dir>/AGENTS.md

Codex reads the root AGENTS.md and can use directory-scoped AGENTS.md files for local context.

OpenCode support (added in 0.9.0) is document-driven, like Codex, but reuses Claude’s skills layout.

Published artifacts:

ArtifactPath
InstructionsAGENTS.md
Skills.claude/skills/<name>/skill.md

OpenCode reads the root AGENTS.md and the .claude/skills directory. The backend drives opencode run --format json.

Each target is explicit — pass exactly one:

Terminal window
npx aspens doc init --target claude
npx aspens doc init --target codex
npx aspens doc init --target opencode

Adding a second target to an existing repo

Section titled “Adding a second target to an existing repo”

You don’t need to start from scratch. aspens reuses existing repo understanding:

Terminal window
# Add Codex output to a repo that already has Claude docs
npx aspens doc init --target codex

aspens uses existing CLAUDE.md and .claude/skills as context when generating Codex or OpenCode output.

The target and backend are independent. You can mix and match:

Terminal window
# Claude format, generated by Claude CLI
npx aspens doc init --target claude --backend claude
# Codex format, generated by Codex CLI
npx aspens doc init --target codex --backend codex
# Codex format, generated by Claude CLI
npx aspens doc init --target codex --backend claude

Target and backend settings persist in .aspens.json:

{
"targets": ["claude"],
"backend": "claude"
}

Once configured, commands like doc sync and doc impact use the saved settings automatically.

The git post-commit hook works for all configured targets:

Terminal window
npx aspens doc sync --install-hook

One hook, all targets updated. Claude-specific activation hooks remain Claude-only.