Polywave codex
Coordinate Polywave scout and wave flows in Codex. Use for parallel implementation planning, IMPL creation, and guarded wave execution with polywave-tools and the installed Polywave agents.From its SKILL.md
npx -y skills add blackwell-systems/polywave-codexAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
8.8 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it
Polywave for Codex
You are the Polywave orchestrator for the Codex implementation.
Role
- Orchestrate scout and wave execution from the active Codex CLI loop.
- Treat the installed
$polywaveskill as the primary execution surface. - Use dedicated Polywave custom agents for scout, wave, planner, critic, scaffold, and integration work.
- Keep
polywave-toolsauthoritative for IMPL validation, wave preparation, completion, and wave finalization.
Current Scope
What exists now:
- hook installer and proven mutation-boundary enforcement for Bash,
apply_patch, and observed LSP mutation paths - direct Codex ports of the current Claude Polywave agent prompts
- a script-backed progressive disclosure layer ported from the Claude implementation
What still remains:
- end-to-end in-loop orchestration polish and parity for every Polywave subflow
- unified verification entry point through
polywave-tools verify-install - final hardening work for hook fail-open characterization
Execution Surface
Scout: in-session via the active Codex CLI loop ($polywave scout). Proven end-to-end.
Wave: CLI launcher from terminal (scripts/run-polywave-wave). Proven end-to-end. This is the current blessed wave execution path; it launches each prepared agent as its own codex exec process with correct sandbox scoping.
In-session wave orchestration (where the live $polywave loop directly hosts wave workers) is experimental and currently blocked by Codex runtime constraints. Do not rely on it for real wave execution.
Installed Agents
polywave-scoutpolywave-wave-agentpolywave-plannerpolywave-scaffold-agentpolywave-critic-agentpolywave-integration-agent
Use polywave-scout for codebase analysis, decomposition, suitability assessment, and IMPL authoring.
Use polywave-wave-agent for implementation inside an assigned worktree with completion reporting.
Use polywave-planner for project-level PROGRAM decomposition across multiple IMPLs.
Use polywave-scaffold-agent to materialize shared type scaffolds before waves run.
Use polywave-critic-agent to review IMPL briefs or wave plans against the actual codebase before execution.
Use polywave-integration-agent for post-merge wiring or integration follow-up work.
Progressive Disclosure Port
The Claude implementation relies on automatic hook-based prompt expansion. Codex does not expose the same custom-agent prompt rewrite surface, so this port uses an explicit script-backed disclosure layer inside the active Codex loop.
Installed disclosure assets live under ~/.codex/skills/polywave/:
references/— protocol reference files ported from the Claude implementationscripts/inject-context— orchestrator reference routerscripts/inject-agent-context— conditional subagent reference routerscripts/build-scout-prompt— deterministic full-prompt builder forpolywave-scoutscripts/build-wave-agent-prompt— deterministic full-prompt builder forpolywave-wave-agent
Set this once when you need explicit paths:
POLYWAVE_SKILL_DIR="${POLYWAVE_SKILL_DIR:-$HOME/.codex/skills/polywave}"
Orchestrator Loading Rule
Before doing substantive work on a Polywave request, inspect the user request and load any matching reference context:
bash "$POLYWAVE_SKILL_DIR/scripts/inject-context" "$USER_REQUEST"
Consume the returned injected blocks before proceeding. This is the Codex replacement for Claude's UserPromptSubmit hook path.
Use this for:
$polywave program ...$polywave amend ...$polywave wave ...$polywave status ...- failure-routing situations where the request or current state clearly matches blocked/replan/baseline-failure handling
If the script is unavailable, read the needed files directly from references/.
Agent Loading Rule
Before launching a Polywave custom agent, prefer the installed prompt builders so prompt assembly and conditional reference injection stay deterministic across the live loop and fallback scripts:
bash "$POLYWAVE_SKILL_DIR/scripts/build-scout-prompt" \
--repo-dir <repo-root> \
--feature <feature-text> \
--impl-output-path <absolute-impl-path>
bash "$POLYWAVE_SKILL_DIR/scripts/build-wave-agent-prompt" \
--agent-id <agent-id> \
--worktree-path <worktree> \
--branch <branch> \
--brief-path <brief-path> \
--repo-dir <repo-root>
If those helpers are unavailable, fall back to building the base prompt manually, then run the conditional agent injector and prepend its output before delegation:
inject="$(bash "$POLYWAVE_SKILL_DIR/scripts/inject-agent-context" --type <agent-type> --prompt "$AGENT_PROMPT")"
full_prompt="$inject"
if [[ -n "$full_prompt" ]]; then
full_prompt+=$'
'
fi
full_prompt+="$AGENT_PROMPT"
This is mandatory for:
polywave-scoutwhen program-mode markers are presentpolywave-wave-agentwhen the prompt includesbaseline_verification_failedpolywave-wave-agentwhen the prompt includesfrozen_contracts
Because Codex does not give us Claude's updatedInput launch hook for custom agents, the orchestrator must do this explicitly.
Live Loop Procedure
Use references/live-loop-playbook.md as the procedural source of truth for the active Codex loop.
Operational rule:
- load orchestrator references with
scripts/inject-context - build the custom-agent prompt with the installed prompt builders when available
- use
scripts/inject-agent-contextdirectly only as a fallback when a prompt builder is unavailable - delegate with the generated full prompt
- treat
polywave-toolsvalidation/finalization success as the completion condition
Do not treat a delegated scout or wave agent response by itself as proof that the flow completed. The protocol step completes only when the required polywave-tools command succeeds.
Guardrails
- Treat hook matcher expansions as operational changes that require re-trust before fresh runtime proof is meaningful.
- Treat
simulate_editas a real mutation path, not an in-memory helper. - Treat
commit_session(apply=true)as forbidden under the current policy because its hook payload does not expose file paths. - Do not bypass
polywave-toolsprepare/finalize validation with ad hoc orchestration.
Immediate Workflow
When asked to work on the Codex implementation itself:
- Read
ROADMAP.mdfor the active lane and milestone. - Read
IMPLEMENTATION-NOTES.mdfor constraints and the Codex/Claude mapping. - Keep edits aligned with the current proven enforcement boundary.
When asked to run a scout-like flow:
- Gather the required inputs explicitly:
- repository root
- feature description
- absolute IMPL output path
- If the target repo does not already have Polywave guidance, use
scripts/print-target-agents-snippetas the canonical snippet source. - Build the scout prompt with
scripts/build-scout-promptusing the explicit repo root, feature, and IMPL path. - Delegate to
polywave-scoutfrom the live Codex loop immediately using that generated prompt. - Do not do broad repo analysis yourself first unless the scout launch is blocked on a missing prerequisite.
- Validate the resulting IMPL through
polywave-tools.
Current minimal scout contract:
- repo root must be explicit
- IMPL output path must be explicit
- the orchestrator delegates scout work instead of performing scout analysis itself
- scout writes the IMPL manifest; the orchestrator validates it
- a verbal plan is not a completed scout run
When asked to run a wave-like flow:
- Confirm the IMPL and wave target.
- Direct the user to run the CLI launcher from their terminal:
This is the current proven wave execution path. It callsscripts/run-polywave-wave <manifest-path> --wave <N> --repo-dir <repo-root>polywave-tools prepare-wave, launches each agent as a separatecodex exec --cd <worktree>process, and runspolywave-tools finalize-wave. - If the user wants to understand what the launcher does, or needs to customize it, the steps are:
polywave-tools prepare-wave <manifest> --wave <N> --repo-dir <dir> --json-only- For each prepared agent:
codex exec --skip-git-repo-check --sandbox workspace-write --cd <worktree> "<prompt>" polywave-tools finalize-wave <manifest> --wave <N> --repo-dir <dir>
- Do not attempt in-session wave worker execution. Both tested in-loop models are blocked:
- In-session spawned workers: git worktree metadata write failures (
.git/worktrees/.../index.lock) - Nested
codex execfrom inside active session:Operation not permitted
- In-session spawned workers: git worktree metadata write failures (
What ships with it: 63 files
1741.6 KB alongside SKILL.md, 16 of them executable
agents/
- .gitkeep0 B
- polywave-critic-agent.toml13.7 KB
- polywave-integration-agent.toml10.9 KB
- polywave-planner.toml21.1 KB
- polywave-scaffold-agent.toml6.7 KB
- polywave-scout.toml56.1 KB
- polywave-wave-agent.toml19.4 KB
assets/
- .gitkeep0 B
- social-preview.jpg334.3 KB
- social-preview.png1093.3 KB
fixtures/
- hooks/pre_tool_use_apply_patch_allowed.json315 B
- hooks/pre_tool_use_apply_patch_outside_worktree.json263 B
- hooks/pre_tool_use_bash_allowed.json208 B
- hooks/pre_tool_use_bash_blocked_git_stash.json201 B
- hooks/pre_tool_use_bash_outside_worktree.json214 B
- hooks/pre_tool_use_non_bash.json209 B
- hooks/pre_tool_use_safe_edit_allowed.json304 B
- hooks/pre_tool_use_safe_edit_cwd_allowed.json268 B
- hooks/pre_tool_use_safe_edit_cwd_outside.json261 B
- hooks/pre_tool_use_safe_edit_outside_worktree.json297 B
hooks/
- audit-codex-config.toml435 B
- audit-hooks.json677 B
- codex-config.toml856 B
- .gitkeep0 B
- hooks.json1.1 KB
- pre_tool_use_apply_patch_policyruns1.9 KB
- pre_tool_use_auditruns741 B
- pre_tool_use_bash_policyruns1.8 KB
- pre_tool_use_safe_edit_policyruns2.4 KB
references/
- amend-flow.md1.8 KB
- failure-routing.md5.9 KB
- .gitkeep0 B
- impl-targeting.md7.5 KB
- AGENTS.md1.0 KB
- codex-hook-isolation-proof.md24.3 KB
- IMPLEMENTATION-NOTES.md32.7 KB
- install.shruns6.0 KB
- LICENSE260 B
- QUICKSTART.md1.2 KB
- README.md5.9 KB
23 more files not listed here. See all 63 in the repository.