/software-craft:iaqifrom software-craft
Iteratively refines skills, prompts, commands, or agents through parallel reviewer scoring and fixes until a quality target is met, using semantic anchors to prevent intent drift.
Ships in software-craft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Intent-Anchored Quality Iteration (IAQI) prevents semantic drift during iterative improvement. The problem: each iteration risks optimizing for reviewer preferences rather than original intent. IAQI solves this through anchors—semantic checksums verified after every change.
<iaqi_philosophy>
Before iterating, define anchors at three levels:
| Layer | Purpose | Can Change? | Example |
|---|---|---|---|
| Immutable | Core identity phrases | Never | "Skills encode judgment. References encode facts." |
| Semantic | Meaning to preserve | Wording only | "Force intentional choices" (can rephrase, not remove) |
| Structural | Organization patterns | Flexible | 7-section template (order can change, sections preserved) |
Why anchors matter: Without them, iteration 5 optimizes for reviewer 5's preferences, not iteration 0's intent. Anchors are checksums against drift.
A good anchor set has:
<iaqi_workflow>
Parse arguments from invocation:
artifact-path (required): file to improve--reviewers N (default: 5): parallel reviewer count--target X.X (default: 9.0): score threshold for success--max-iterations N (default: 7): iteration limit<iaqi_dimensions> based on typeRun the iteration loop until exit condition:
iteration = 0
LOOP:
iteration += 1
IF iteration > max_iterations:
HALT("Max iterations reached")
Write final report to state file
EXIT
# 1. Spawn reviewers (parallel)
Spawn N Agent calls in a SINGLE message (parallel execution):
- subagent_type: "general-purpose"
- model: opus (or configured)
- prompt: reviewer template with filled variables
Wait for all reviewers to complete.
# 2. Aggregate scores
Calculate average per dimension
Calculate overall average
Check all immutable anchors present (unanimous agreement)
# 3. Check exit conditions
IF average >= target AND all_anchors_present:
Write SUCCESS to state file
Report final artifact with improvement summary
EXIT SUCCESS
IF any_anchor_missing:
HALT("Anchor violation detected")
Use AskUserQuestion: "Anchor '[phrase]' is missing. Options:"
- "Revert last fix and continue"
- "Update anchor (it was wrong)"
- "Stop iteration"
Handle response accordingly
IF score_plateau (3 iterations with < 0.1 improvement):
HALT("Diminishing returns - scores plateaued")
Write report to state file
EXIT
# 4. Apply fixes
Collect top fixes from each reviewer
Prioritize by:
1. Anchor safety (never break immutable anchors)
2. Non-negotiable dimension improvement
3. Lowest scoring dimension
Apply fixes using Edit tool
Follow <iaqi_fix_principles>
# 5. Verify anchors
Check all immutable anchors still present after edits
IF any anchor lost:
Revert the problematic edit
Try alternative fix approach
# 6. Update state file
Write iteration details (scores, fixes, anchor status)
GOTO LOOP
</iaqi_workflow>
<iaqi_reviewer_template>
Use this template when spawning reviewer agents. Fill variables before spawning.
You are an IAQI reviewer. Score an artifact against a rubric while verifying anchor preservation.
## Artifact
Read: $ARTIFACT_PATH
## Context
This artifact's intent: $INTENT_STATEMENT
## Immutable Anchors (must appear verbatim)
$IMMUTABLE_ANCHORS
## Scoring Dimensions
$DIMENSIONS_TABLE
Score each dimension 1-10 based on its description.
## Output Format (exactly)
### Scores
| Dimension | Score | Notes |
|-----------|-------|-------|
$DIMENSION_ROWS
| **OVERALL** | **X.X** | |
### Anchor Check
| Anchor | Present? |
|--------|----------|
$ANCHOR_ROWS
### Verdict
**PASS/FAIL** (target: $TARGET_SCORE, all anchors must be present)
### If FAIL: Top Fix
**Issue**: [most critical problem affecting score]
**Location**: [file:line or section name]
**Suggested fix**: [specific improvement, preserving intent]
</iaqi_reviewer_template>
<iaqi_dimensions>
Select the appropriate template based on artifact type. Human can customize during Phase 3.
| Dimension | Description |
|---|---|
| Clarity | Instructions unambiguous? Followable without guessing? |
| Trigger Quality | User intents named as categories in a "Use when" clause? Activates correctly? NOT-for disambiguation? |
| Anti-Slop Power | Pushes away from generic output? Opinionated? Distinctive? |
| Structure | Well-organized? Proper semantic tags? Logical flow? |
| Composability | Integrates with other skills/commands? Handles dependencies? |
| Completeness | Everything needed to execute? No gaps? |
| Best Practices | Positive framing? Explicit instructions? Good examples? |
| Dimension | Description |
|---|---|
| Clarity | Steps clear? No ambiguous instructions? |
| Argument Design | Hints helpful? Defaults sensible? Required vs optional clear? |
| Error Handling | Failure cases addressed? Graceful degradation? |
| Tool Usage | Correct tools specified? Appropriate permissions? |
| Output Quality | Results actionable? Format appropriate for context? |
| Best Practices | Positive framing? Explicit instructions? |
| Dimension | Description |
|---|---|
| Clarity | Intent clear? No ambiguity in request? |
| Specificity | Concrete enough to act on? Measurable outcomes? |
| Tone | Appropriate voice? No condescending words? |
| Structure | Well-organized? Right length for purpose? |
| Best Practices | Positive framing? Examples where needed? Explicit constraints? |
| Dimension | Description |
|---|---|
| Context Clarity | Stateless awareness explained? Role clear? |
| Responsibilities | Clear scope? Actionable tasks? Boundaries defined? |
| Constraints | Boundaries stated with their reason? Prohibitions limited to failures that actually occur? |
| Return Format | Output structure specified? All required fields documented? |
| Tool Usage | Correct tools? Appropriate permissions? |
| Best Practices | Context efficiency? Explicit instructions? |
| Dimension | Description |
|---|---|
| Accuracy | Technically correct? Up to date with code? |
| Clarity | Understandable? Jargon defined? |
| Completeness | All necessary info? No critical gaps? |
| Structure | Well-organized? Easy to navigate? |
| Examples | Concrete? Copy-pasteable? Cover common cases? |
| </iaqi_dimensions> |
<iaqi_state_file>
Location: <artifact-dir>/.iaqi/<artifact-name>-<YYYY-MM-DD>.md
Create the .iaqi/ directory if it doesn't exist. Write state after each phase completes.
# IAQI State: [artifact-name]
**Date**: YYYY-MM-DD
**Artifact**: [full-path]
**Target Score**: X.X/10
**Max Iterations**: N
**Reviewers**: N
**Status**: in_progress | completed | halted
---
## Phase 1: Understanding
### Intent Statement
> "[1-2 sentences: why this artifact exists, its distinctive quality]"
### Workflow Diagram
[ASCII or Mermaid diagram]
**Status**: LOCKED
---
## Phase 2: Anchors
### Immutable Anchors (must appear verbatim)
1. "[exact phrase 1]"
2. "[exact phrase 2]"
...
### Semantic Anchors (meaning preserved)
| Concept | Meaning |
|---------|---------|
| [name] | [what it means] |
...
### Structural Anchors (organization preserved)
1. [pattern 1]
2. [pattern 2]
...
### Forbidden Changes
- [what would violate intent]
...
**Status**: LOCKED
---
## Phase 3: Scoring System
### Artifact Type
[skill | command | prompt | agent | doc]
### Dimensions
| Dimension | Description |
|-----------|-------------|
| [dim1] | [desc] |
...
### Target Score
X.X/10
### Non-Negotiable Dimension
[dimension] >= Y.Y
**Status**: LOCKED
---
## Phase 4: Iteration History
| Iter | Score | Delta | Anchors | Status |
|------|-------|-------|---------|--------|
| 0 | X.X | - | OK | baseline |
| 1 | X.X | +X.X | OK | continue |
...
### Iteration N Details
**Scores**:
| Reviewer | D1 | D2 | ... | Overall |
|----------|----|----|-----|---------|
| R1 | X | X | ... | X.X |
...
| **Avg** | X | X | ... | **X.X** |
**Anchor Check**: All present / VIOLATION: [details]
**Fixes Applied**:
1. [fix] - [rationale]
...
---
## Outcome
**Result**: SUCCESS | HALTED | IN_PROGRESS
**Final Score**: X.X/10
**Total Iterations**: N
**Anchors Preserved**: YES | [violations]
</iaqi_state_file>
<iaqi_fix_principles>
When applying fixes during iteration, follow these principles:
When fixing prompt text, check:
When rewriting any passage:
<iaqi_success_criteria>
Your IAQI run succeeded when:
Signs of a quality IAQI run:
<iaqi_closing>
The goal of IAQI is not perfection—it's preserving intent while improving execution. If your final artifact scores 9.5 but doesn't sound like the original author, you've failed. Anchors exist to keep the soul intact while polishing the surface. </iaqi_closing>
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bengous/claude-code-plugins --plugin software-craft4 skills in this plugin
/cli-designCreate distinctive, user-respecting command-line interfaces with exceptional UX. Use this skill when the user asks to build CLI tools, scripts, or terminal applications. Generates well-crafted CLIs that follow platform conventions and treat users as humans, not machines./excellence-skill-creatorCreate opinionated, anti-slop skills that encode taste. Use when the user wants a skill that makes Claude less generic in a domain, in the style of frontend-design, cli-design or system-architecture. NOT for: general skill structure, reference guides, procedural docs (use skill-creator instead)./system-architectureDesign systems with appropriate complexity—no more, no less. Use this skill when the user asks to architect applications, design system boundaries, or make structural decisions. Generates pragmatic architectures that solve real problems without premature abstraction.Other plugins' skills for the same job