Skip to content

Platform Guide

Language: English | 日本語 Last updated: 2026-04-18 Audience: Platform porters

This page explains how Aphelion is adapted for each supported platform, what the generator script does, and how to port Aphelion to a new platform.


Aphelion has one canonical source (Claude Code) and two generated targets (GitHub Copilot, OpenAI Codex). The canonical source lives in .claude/. Platform-specific files are generated by scripts/generate.mjs and stored in platforms/.

PlatformConfig locationEntry pointMulti-agent orchestration
Claude Code.claude/agents/, .claude/rules/Slash commands (/discovery-flow)Full (sub-agent calls)
GitHub Copilot.github/agents/Agent mode in IDEFull (agent-to-agent via Copilot)
OpenAI CodexAGENTS.md, skills/AGENTS.md global instructionsNot supported

Claude Code is the authoritative platform. All agent definitions, rules, and orchestrator behavior are maintained here. Other platforms are generated from this source.

File structure:

.claude/
CLAUDE.md # Workflow overview (auto-loaded)
orchestrator-rules.md # Triage, approval gates, rollback rules (read on-demand)
agents/
discovery-flow.md # Flow orchestrators
delivery-flow.md
operations-flow.md
interviewer.md # Discovery domain agents
researcher.md
... # (27 agents total)
rules/
agent-communication-protocol.md
build-verification-commands.md
... # (9 rules total)
commands/
discovery-flow.md # Slash command definitions
delivery-flow.md
pm.md
...

Slash commands (defined in .claude/commands/):

CommandLaunches
/discovery-flow {description}discovery-flow orchestrator
/delivery-flowdelivery-flow orchestrator
/pm {description}delivery-flow (shorthand)
/operations-flowoperations-flow orchestrator
/analyst {issue}analyst standalone agent
/codebase-analyzer {instruction}codebase-analyzer standalone agent

Setup:

Terminal window
cp -r /path/to/aphelion-agents/.claude /path/to/your-project/
cd /path/to/your-project && claude

The Copilot platform files are generated from Claude Code canonical agents by scripts/generate.mjs. They are stored in platforms/copilot/ and users copy them to .github/ in their project.

File structure (in user’s project):

.github/
copilot-instructions.md # Global workflow instructions (from .claude/CLAUDE.md)
orchestrator-rules.md # Inlined into orchestrator agents
agents/
discovery-flow.agent.md
delivery-flow.agent.md
... # (27 agents total)

Key differences from Claude Code:

AspectClaude CodeGitHub Copilot
Frontmatter format---\nname: ...\ndescription: ...\ntools: Read, Write, Bash, ...---\nname: ...\ndescription: ...\ntools:\n - read\n - edit\n - execute\n - ...
Tool namesRead, Write, Edit, Bash, Glob, Grepread, edit, execute, search
Orchestrator rulesSeparate file (read on-demand)Inlined into each orchestrator agent file
Global instructions.claude/CLAUDE.md (auto-loaded).github/copilot-instructions.md
Model selectionSpecified in frontmatterCopilot’s own model selection (omitted)

Tool name mapping (applied by generate.mjs):

Claude CodeCopilot
Readread
Writeedit
Editedit
Bashexecute
Globsearch
Grepsearch
Agentagent
WebSearch, WebFetchweb

Setup:

Terminal window
cp -r platforms/copilot/* /path/to/your-project/.github/

Then use GitHub Copilot’s agent mode in VS Code, JetBrains, or Neovim. Agents appear in .github/agents/.


The Codex platform uses a single AGENTS.md file as global instructions, plus individual skill files. It is generated by scripts/generate.mjs but with significant limitations.

File structure (in user’s project):

AGENTS.md # Merged global instructions (all rules + workflow overview)
skills/
vuln-scan/
SKILL.md # Dependency vulnerability scan
secrets-scan/
SKILL.md # Hardcoded secrets detection

Key limitations:

LimitationDetail
No sub-agent orchestrationCodex cannot invoke agents from within agents. Multi-phase flows are not available.
32 KB size limitAGENTS.md is capped at 32 KB. The generator truncates if needed.
Skills onlyOnly vuln-scan and secrets-scan are available as individual utilities.
No slash commandsEntry is via AGENTS.md global instructions, not slash commands.

Available skills:

  • vuln-scan: Detects the project’s tech stack from package files, runs the appropriate vulnerability scanner (pip-audit, npm audit, govulncheck, cargo audit), and reports findings.
  • secrets-scan: Scans source code for hardcoded API keys, passwords, tokens, connection strings, AWS keys, private keys, and Bearer tokens. Excludes .env and test fixtures.

Setup:

Terminal window
cp platforms/codex/AGENTS.md /path/to/your-project/
cp -r platforms/codex/skills/ /path/to/your-project/

For full multi-phase orchestration, use Claude Code or GitHub Copilot.


Aphelion agents execute shell commands via the Bash tool on behalf of the user. The sandbox system provides a structured way to classify risky commands and route them through platform-native permission controls before execution.

For the full policy reference, see .claude/rules/sandbox-policy.md. For the executor agent, see .claude/agents/sandbox-runner.md.

CapabilityClaude CodeGitHub CopilotOpenAI Codex
Container isolation via devcontainerYes (container mode — highest priority)Yes (when Docker available)No
Native permission gateYes (permission mode)Partial (IDE confirmation prompt)No
Allow / Ask / Deny tiersYesAsk onlyNo
Persistent settings.claude/settings.jsonIDE configN/A
Session-local override.claude/settings.local.jsonPer-sessionN/A
sandbox-runner integrationAuto-insert (Standard+) + explicitExplicit onlyAdvisory only
Recommended fallbackManual review before executionManual review before execution

Aphelion supports a container isolation mode in addition to platform permission modes. When .devcontainer/devcontainer.json exists and Docker is available, sandbox-runner executes high-risk commands inside the project’s devcontainer rather than relying solely on permission gates.

Key properties of container mode:

  • Provides real physical isolation — the command runs in a separate container process with a restricted filesystem view.
  • Effective even in auto/allow mode — even when Claude Code’s permission mode would normally execute commands without prompting, container mode still enforces a structural boundary.
  • infra-builder generates .devcontainer/devcontainer.json and docker-compose.dev.yml on Light plans and above.
  • If Docker is unavailable at runtime (Standard/Full plans), sandbox-runner degrades gracefully to platform_permission and records FALLBACK_REASON in AGENT_RESULT.

Priority order: container > platform_permission > advisory_only > blocked

For the full policy, see .claude/rules/sandbox-policy.md §3–§5. For the execution path selection logic, see .claude/agents/sandbox-runner.md §Workflow Step 2.

Claude Code offers three permission levels for Bash commands:

ModeBehavior
allowExecute automatically without confirmation
askPause and request user confirmation before executing
denyRefuse execution entirely

Settings persistence:

  • Persistent — Stored in .claude/settings.json (can be committed to the repository and shared across the team).
  • Session / local — Stored in .claude/settings.local.json (gitignored by default; for personal or per-environment overrides).

Priority: Session-local settings take precedence over persistent settings.

Relationship with sandbox-runner: sandbox-runner respects whichever permission mode is in effect. It does not replace or bypass Claude Code’s permission system — it calls into it. Aphelion never modifies .claude/settings.json or .claude/settings.local.json directly; users configure these files themselves.

The following profiles are recommendations only. Configure them in your own .claude/settings.json or .claude/settings.local.json as appropriate for your environment.

Environmentdestructive_fsprod_dbexternal_netprivilege_escalationsecret_accessNotes
dev (local developer)askdenyaskaskaskAll required categories require confirmation; external network also asks
CIdenydenyallow (allowlist)denydenyNetwork permitted only for known registries; all destructive ops denied
near-productiondenydenydenydenydenyFull deny; human-in-the-loop required for any exception
  1. Triage determines activation level — Minimal plan: advisory warnings only. Light: explicit delegation. Standard/Full: orchestrator auto-inserts sandbox-runner before required-tier commands.
  2. sandbox-runner re-classifies — Even when an agent provides a risk_hint, sandbox-runner independently re-classifies the command against sandbox-policy.md.
  3. Platform mode is applied — On Claude Code, the appropriate permission mode is invoked. On Copilot/Codex, an advisory warning is shown.
  4. Audit trail returnedAGENT_RESULT from sandbox-runner always includes DETECTED_RISKS and DECISION, regardless of whether execution was allowed or denied.

Platform files are generated from the Claude Code canonical source using scripts/generate.mjs.

Usage:

Terminal window
# Generate all platforms
node scripts/generate.mjs
# Copilot only
node scripts/generate.mjs --platform copilot
# Codex only
node scripts/generate.mjs --platform codex
# Remove generated files
node scripts/generate.mjs --clean

What the generator does for each platform:

For Copilot:

  1. Reads each .claude/agents/{name}.md file
  2. Converts YAML frontmatter (tool names, removes model field)
  3. Inlines orchestrator-rules.md content into orchestrator agents (discovery-flow, delivery-flow, operations-flow)
  4. Writes output to platforms/copilot/agents/{name}.agent.md
  5. Copies .claude/CLAUDE.md to platforms/copilot/copilot-instructions.md

For Codex:

  1. Merges .claude/CLAUDE.md and all .claude/rules/*.md files into AGENTS.md
  2. Appends the full orchestrator-rules.md content
  3. Truncates to 32 KB if needed
  4. Converts .claude/commands/vuln-scan.md and secrets-scan.md to platforms/codex/skills/ format

When to re-run:

Run node scripts/generate.mjs whenever .claude/agents/, .claude/rules/, or .claude/orchestrator-rules.md is modified. Platform files in platforms/ should never be edited directly — they are generated artifacts.


FeatureClaude CodeGitHub CopilotOpenAI Codex
Full 3-domain flowYesYesNo
Discovery flowYesYesNo
Delivery flowYesYesNo
Operations flowYesYesNo
Individual agents (standalone)YesYesPartial (skills only)
Triage systemYesYesNo
Session resume (TASK.md)YesYesNo
Vuln scanYes (security-auditor)Yes (security-auditor)Yes (/vuln-scan skill)
Secrets scanYes (security-auditor)Yes (security-auditor)Yes (/secrets-scan skill)
Slash commandsYesVia agent modeNo

To add support for a new AI coding platform:

  1. Understand the platform’s agent model: Does it support sub-agent invocation? What is the instruction file format? Is there a size limit?

  2. Add a generator function to scripts/generate.mjs: Follow the pattern of generateCopilot() or generateCodex(). The generator should:

    • Read from .claude/agents/ and .claude/rules/
    • Apply platform-specific transformations (frontmatter, tool names, etc.)
    • Write to platforms/{platform-name}/
  3. Create the platform directory structure in platforms/{platform-name}/.

  4. Add CLI support: Add --platform {name} to the generate.mjs argument parser.

  5. Document the platform in this wiki page (Platform-Guide) with a new section following the Claude Code / Copilot / Codex pattern.

  6. Update the feature matrix table above.

If the platform does not support sub-agent orchestration, implement skills/utilities for vuln-scan and secrets-scan at minimum (matching the Codex skills pattern).