Code — apr code Agentic Surface

Recipes for the apr code Claude-Code-parity surface. Each demonstrates the file layout and discovery/parsing/validation pattern an apr code install uses for one of the 7 P0/P1 SHIPPED rows of apr-code-parity-v1.yaml v5.1.

The recipes are CLI-independent — they implement the same parsing/discovery logic in Rust without invoking the apr code binary, so they ship correct documentation now and continue working when apr code lands in the next aprender release.

Recipes

#RecipeParity row
C.1code_mcp_client_configPMAT-CODE-MCP-CLIENT-001
C.2code_slash_command_extensionPMAT-CODE-SLASH-PARITY-001
C.3code_hook_session_startPMAT-CODE-HOOKS-001
C.4code_subagent_spawn_payloadPMAT-CODE-SPAWN-PARITY-001
C.5code_custom_agent_definitionPMAT-CODE-CUSTOM-AGENTS-001
C.6code_skill_discoveryPMAT-CODE-SKILLS-001
C.7code_worktree_isolation_permission_modePMAT-CODE-WORKTREE-001 + PMAT-CODE-PERMISSIONS-001 (combined)

Conventions covered

  • .apr/agents/<name>.md----fenced YAML frontmatter, hand-rolled parser
  • .apr/skills/{<name>.md, <name>/SKILL.md} — flat + nested layouts; .apr precedence over .claude on collision
  • .apr/hooks/<event>/<name>.sh — executable shell scripts at lifecycle events
  • .apr/commands/<name>.md — project-local slash command extensions
  • .mcp.json — MCP server registry (stdio / sse / http transports)
  • Task spawn payload — JSON envelope with subagent_type + prompt + description
  • <repo>/.apr/worktrees/<branch>/HEAD — worktree marker; permission-mode lattice (deny < ask < allow < always_allow)

Provenance

Added during PMAT-074 (expand-cookbooks initiative, v6.1.0).