{"slug":"phx-compound","title":"phx-compound","summary":"Capture solved problems as searchable solution docs. Use after fixing","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-04T15:14:24.359925Z","repo":{"url":"https://github.com/oliver-kriska/claude-elixir-phoenix","stars":560,"forks":44,"license":"MIT","updatedAt":"2026-10-02T04:11:38Z"},"bodyHtml":"<hr>\n<h2>name: phx-compound\ndescription: Capture solved problems as searchable solution docs. Use after fixing\nbugs, when \"that worked\", or after successful phx-review or phx-investigate.</h2>\n<h1>Compound — Capture Solutions as Knowledge</h1>\n<p>After fixing a problem, capture the solution as searchable\ninstitutional documentation.</p>\n<h2>Usage</h2>\n<pre><code>phx-compound Fixed N+1 query in user listing\nphx-compound Resolved LiveView timeout in dashboard\nphx-compound   # Auto-detects from recent session context\n</code></pre>\n<h2>Philosophy</h2>\n<blockquote>\n<p>Each unit of engineering work should make subsequent units\neasier — not harder.</p>\n</blockquote>\n<h2>Workflow</h2>\n<h3>Step 1: Detect Context</h3>\n<ol>\n<li>If <code>$ARGUMENTS</code> provided, use as description</li>\n<li>If no args, check scratchpad DEAD-END/DECISION entries,\n<code>git diff</code>, <code>.claude/plans/{slug}/progress.md</code> for recent completions</li>\n<li>If unclear, ask: \"What problem did you just solve?\"</li>\n</ol>\n<p><strong>Only document non-trivial problems</strong> that required investigation.</p>\n<h3>Step 2: Search Existing Solutions</h3>\n<p>Create <code>.claude/solutions/</code> directory if it doesn't exist (run <code>mkdir -p .claude/solutions</code>).\nThen search <code>.claude/solutions/</code> for relevant keywords using Grep.</p>\n<p>If found: <strong>Create new</strong> (different root cause), <strong>Update\nexisting</strong> (same root cause, new symptom), or <strong>Skip</strong>.</p>\n<h3>Step 3: Gather Details and Create Solution</h3>\n<p>Extract from session context: module, symptoms, investigation\nsteps, root cause, solution code, and prevention advice.</p>\n<p>Validate frontmatter against <code>../compound-docs/references/schema.md</code>,\nthen create file using <code>../compound-docs/references/resolution-template.md</code>.</p>\n<p><strong>Write-blocked fallback</strong>: if writing to <code>.claude/solutions/</code> is denied\nby permissions, do NOT silently drop the solution. Output the full\nsolution doc inline (fenced markdown the user can paste), then suggest\n<code>phx-permissions</code> to allow <code>.claude/solutions/</code> writes for next time.</p>\n<h3>Step 4: Decision Menu</h3>\n<ol>\n<li><strong>Continue</strong> (default)</li>\n<li><strong>Promote to Iron Law check</strong> — Add to iron-law-judge</li>\n<li><strong>Update skill reference</strong> — Add to relevant skill</li>\n<li><strong>Update CLAUDE.md</strong> — Add prevention rule</li>\n</ol>\n<h2>Auto-Trigger Phrases</h2>\n<p>When user says \"that worked\", \"it's fixed\", \"problem solved\",\n\"the fix was\" — suggest <code>phx-compound</code>.</p>\n<h3>Supply-chain finding auto-feed (Phase 3)</h3>\n<p>When <code>phx-deps-audit</code> produces a BLOCK-severity finding that the\nuser investigates and confirms is a real malicious pattern (not a\nfalse positive), suggest:</p>\n<blockquote>\n<p>Caught a high-severity finding in <code>&lt;pkg&gt;@&lt;version&gt;</code>. Run\n<code>phx-compound</code> to capture this for future audits?</p>\n</blockquote>\n<p>If accepted, the resulting solution doc goes to\n<code>.claude/solutions/supply-chain/&lt;pkg&gt;-&lt;cve_or_pattern&gt;.md</code> and\nincludes the exact rule-id + snippet + diff window that triggered\nthe finding. This compounds the audit corpus: future runs of\n<code>phx-deps-audit</code> grep <code>solutions/supply-chain/</code> for snippet\nmatches and pre-elevate severity on known-bad patterns.</p>\n<p><strong>Always prompt; never auto-write.</strong> Solution docs are durable and\nshape future trust calls — the user reviews before committing.</p>\n<h2>Iron Laws</h2>\n<ol>\n<li><strong>YAML frontmatter validates or STOP</strong></li>\n<li><strong>Symptoms must be specific</strong> — not \"it broke\"</li>\n<li><strong>Root cause is WHY, not WHAT</strong></li>\n<li><strong>One problem per file</strong></li>\n<li><strong>NEVER document a fix before verifying it works</strong> — run <code>mix compile &amp;&amp; mix test</code> first; unverified solutions poison the knowledge base</li>\n</ol>\n<h2>Integration with Workflow</h2>\n<pre><code>phx-review → Complete → phx-compound  ← YOU ARE HERE\n                              │\n                 .claude/solutions/{category}/{fix}.md\n                              │\n              phx-investigate and phx-plan search here\n</code></pre>\n<h2>References</h2>\n<ul>\n<li><code>references/compound-workflow.md</code> — Detailed step-by-step</li>\n<li>See also: <code>compound-docs</code> skill for schema and templates</li>\n</ul>\n","files":[{"path":"references/compound-workflow.md","sizeBytes":3409,"isText":true},{"path":"SKILL.md","sizeBytes":3743,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-10-04T15:16:31.001001Z","sha256":"5BA22E2EF9B6A8AC0288C5CEF7F09444B30BDEC823B7CE94B793AD0A47895BF2","sizeBytes":3733},"review":null,"source":{"repositoryUrl":"https://github.com/oliver-kriska/claude-elixir-phoenix","path":"targets/amp/skills/phx-compound","license":"MIT","commit":"9767a82d24ddddad553e85f88efc2869a7fd7d88","subtreeSha":"0A951CF36B3A4FEBAD98ABDCF38BCFD8832D43953641B22E579D14A8FEFF7F05","lastSyncedAt":"2026-10-04T15:14:09.139242Z"},"reviewedAt":"2026-10-04T15:20:17.799232Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/targets/amp/skills/phx-compound"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install oliver-kriska-claude-elixir-phoenix@llmmart"},{"target":"git","command":"git clone https://github.com/oliver-kriska/claude-elixir-phoenix.git"}]}