| name | elixir-phoenix-compound |
| description | Capture a solved Phoenix problem as a reusable solution doc. |
| metadata | {"short-description":"Capture reusable Phoenix fix docs"} |
Compound — Capture Solutions as Knowledge
After fixing a problem, capture the solution as searchable
institutional documentation.
Usage
`elixir-phoenix-compound` Fixed N+1 query in user listing
`elixir-phoenix-compound` Resolved LiveView timeout in dashboard
`elixir-phoenix-compound` # Auto-detects from recent session context
Philosophy
Each unit of engineering work should make subsequent units
easier — not harder.
Workflow
Step 1: Detect Context
- If
$ARGUMENTS provided, use as description
- If no args, check scratchpad DEAD-END/DECISION entries,
git diff, .codex/plans/{slug}/progress.md for recent completions
- If unclear, ask: "What problem did you just solve?"
Only document non-trivial problems that required investigation.
Step 2: Search Existing Solutions
Create .codex/solutions/ directory if it doesn't exist (run mkdir -p .codex/solutions).
Then search .codex/solutions/ for relevant keywords using rg.
If found: Create new (different root cause), Update
existing (same root cause, new symptom), or Skip.
Step 3: Gather Details and Create Solution
Extract from session context: module, symptoms, investigation
steps, root cause, solution code, and prevention advice.
Open elixir-phoenix-compound-docs and use its schema and
resolution template references before writing the solution file.
Step 4: Decision Menu
- Continue (default)
- Promote to Iron Law check — Add to iron-law-judge
- Update skill reference — Add to relevant skill
- Update AGENTS.md — Add prevention rule
Auto-Trigger Phrases
When user says "that worked", "it's fixed", "problem solved",
"the fix was" — suggest elixir-phoenix-compound.
Iron Laws
- YAML frontmatter validates or STOP
- Symptoms must be specific — not "it broke"
- Root cause is WHY, not WHAT
- One problem per file
- NEVER document a fix before verifying it works — run
mix compile && mix test first; unverified solutions poison the knowledge base
Integration with Workflow
`elixir-phoenix-review` → Complete → `elixir-phoenix-compound` ← YOU ARE HERE
│
.codex/solutions/{category}/{fix}.md
│
`elixir-phoenix-investigate` and `elixir-phoenix-plan` search here
References
references/compound-workflow.md — Detailed step-by-step
- See also:
elixir-phoenix-compound-docs for schema and templates