This file is the Claude Code session-start instruction surface for this repository.
AGENTS.md is the authoritative execution contract. All rules in AGENTS.md apply equally to
Claude Code sessions. If anything in this file conflicts with AGENTS.md, follow AGENTS.md.
Nine execution agent roles are defined for this repository:
team-lead (orchestrator) — plans, delegates, synthesizesdeveloper — implements scoped changesresearcher — read-only information gatheringwriter — content creationeditor — content quality and fixesfact-checker — source verificationseo-expert — discoverability and SEOpublisher-release — packaging and release flowhistorical-post-editor — legacy content refreshRole definitions live in .agents/roles/<name>/soul.md and instructions.md (shared across
platforms; created by CWS-23 — not yet present). Each role has a One Piece character identity
defined in docs/master-plan.md.
When spawning a subagent via the Agent tool:
soul.md and instructions.md from .agents/roles/<name>/ and
incorporate into the agent prompt (once role files exist).isolation: "worktree" for read-heavy or risky work.Agent tool calls in a single message.docs/agent-context.md at task start; update when meaningful context changes.docs/sop.md for orchestration patterns and platform capabilities.docs/master-plan.md for architecture and backlog context.~/.claude/) is available for cross-session continuity..agents/skills/ follow the agentskills.io open standard.SKILL.md files directly when a skill matches the task shape.agents/openai.yaml files within skills (Codex-specific extension).AGENTS.md: Linear first, local second.cws/<id>-<slug>.docs/tasks/CWS-<id>.md before PR creation.gt CLI for stacked PR lifecycle (create, modify, submit, stack).gh CLI for GitHub object operations (checks, labels, comments, PR metadata).Do not place heredocs inside $() command substitutions — bash 3.2 (macOS default) cannot
reliably parse them and may lose quote state for the rest of the file. Instead, write the
heredoc to a temp file and execute that. Bare heredocs (not inside $()) are safe and do not
need the temp-file pattern.
# WRONG — breaks bash 3.2:
result="$(ruby - "$arg" <<'RUBY'
...
RUBY
)"
# RIGHT — bash 3.2 safe:
_tmp="$(mktemp)"
cat > "$_tmp" <<'RUBY'
...
RUBY
result="$(ruby "$_tmp" "$arg")"
rm -f "$_tmp"
# ALSO FINE — bare heredoc, not inside $():
ruby - "$arg" <<'RUBY'
...
RUBY
When using temp files for heredocs, register them with trap cleanup EXIT early in the script
so they are cleaned up on any exit path (including set -e failures).
make qa-local is the required local release gate.make create-pr TYPE=... standardizes PR metadata packaging.make finalize-merge PR=... standardizes rebase-only integration closeout.