oliver-kriska/claude-elixir-phoenix / targets/amp/skills/phx-work
phx-work
VerifiedExecute Elixir/Phoenix plan tasks with progress tracking. Use after phx-plan to implement features with mix compile and mix test verification after each step, or --continue to resume interrupted work.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.9 KB |
| references/error-recovery.md | markdown | 2.0 KB |
| references/execution-guide.md | markdown | 9.4 KB |
| references/file-formats.md | markdown | 1.7 KB |
| references/harness-patterns.md | markdown | 2.7 KB |
| references/resume-strategies.md | markdown | 2.3 KB |
references/harness-patterns.md
View on GitHub# Harness Patterns for Error Recovery
Adapted from AutoHarness (Lou et al., 2026): programmatic verification
outperforms unstructured retry. A smaller model with good harnesses
beats a larger model without them.
## Critic-Refiner Pattern
When a task fails verification, use structured analysis instead of
immediate retry:
```
Attempt → Verify → FAIL
↓
Critic Phase (consolidate):
- What EXACTLY failed? (first error only)
- Is this the SAME error as before?
- What has been tried already?
↓
Refiner Phase (targeted fix):
- Address root cause from critic analysis
- Don't repeat previous approaches
- Check compound docs for known solutions
```
### When to Apply
- **Attempt 1**: Normal retry with error context
- **Attempt 2**: Pause. Compare errors. Same root cause = wrong mental model
- **Attempt 3**: Full critic analysis before BLOCKER decision
### Critic Analysis Template
Before the 3rd retry, consolidate:
```markdown
## Error Consolidation
**Command**: mix compile / mix test path:line
**Attempts**: 2 failed
**Error #1**: [exact error message]
**Error #2**: [exact error message]
**Same error?** Yes/No
- If YES → Root cause not addressed. Re-read source file.
- If NO → Progress made. New error is the real issue.
**Compound docs match?** grep -rl "KEYWORD" .claude/solutions/
**Dead-ends from scratchpad?** [any relevant entries]
**Next approach**: [specific, different from previous attempts]
```
## Action Verification Pattern
Portable targets assume no lifecycle hooks. Verify actions explicitly after
each edit and use command output as feedback:
```bash
mix format --check-formatted <changed_files>
mix compile --warnings-as-errors
mix test <affected_test_files>
mix credo --strict
```
For auth/security changes, also search the changed files for unsafe atom
creation and untrusted raw HTML, then run negative-path authorization tests.
For repeated failures, capture the exact command and first error in the
scratchpad before trying a different approach.
The loop is: edit, run the explicit command, read its concrete failure, fix the
root cause, and rerun the same command. Do not rely on implicit automation.
## Anti-Pattern: Unstructured Retry Loop
```
# BAD: Same approach, hope for different result
Attempt 1: mix test → FAIL
Attempt 2: tweak code → mix test → FAIL (same error)
Attempt 3: tweak more → mix test → FAIL (same error)
→ BLOCKER (wasted 3 attempts)
```
```
# GOOD: Critic-refiner with structured analysis
Attempt 1: mix test → FAIL
Attempt 2: compare errors → same root cause → re-read source
→ different fix approach → mix test → PASS
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |