unxed/f4 / .agents/skills/aif-improve
aif-improve
VerifiedRefine an existing implementation plan with a second iteration. Re-analyzes the codebase for gaps, missing tasks, and wrong dependencies. Use after /aif-plan or to improve an /aif-fix plan. Optional +check flag validates refinements via a fresh-context subagent.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 29.4 KB |
| references/CHECK-MODE.md | markdown | 7.2 KB |
| references/EXAMPLES.md | markdown | 2.7 KB |
| references/LIST-MODE.md | markdown | 4.1 KB |
| references/VALIDATOR.md | markdown | 8.6 KB |
references/LIST-MODE.md
View on GitHub# `--list` mode procedure
This file describes the read-only plan discovery procedure that runs when `aif-improve` is invoked with the `--list` flag. The parent skill defers to this document instead of inlining the procedure, because `--list` is a conditional branch and keeps the main `SKILL.md` body within the size limit.
The examples and output shapes in this reference define structure only. Render user-facing human-readable text in resolved `ui_language`.
## When this runs
`aif-improve --list` is invoked. The flag may appear anywhere in `$ARGUMENTS`. When `--list` is present, this procedure runs to completion and the skill stops — no refinement is performed even if other tokens (`+check`, `@path`, free-form prompt) are also passed. Those tokens are silently ignored in `--list` mode.
## Procedure
1. **Get the current branch** (git mode only):
```bash
git branch --show-current
```
2. **Convert the branch name to a filename stem** (git mode only): replace `/` with `-`. The result is `<branch-slug>`. Example: `feature/user-auth` → `feature-user-auth`.
3. **Check existence of every plan location below.** Use the path values resolved from `.ai-factory/config.yaml` (see Step 0 of `SKILL.md` for the defaults applied when the config file is missing):
- `<configured plans dir>/<branch-slug>.md` and
`<configured plans dir>/<branch-slug>/index.md`. Read the directory
entrypoint and treat it as available only when it contains exactly one
`<!-- aif:plan-mode:ultra -->`.
- When `workflow.plan_id_format = sequential`, additionally glob both
`<configured plans dir>/[0-9][0-9][0-9][0-9]_<branch-slug>.md` and
`<configured plans dir>/[0-9][0-9][0-9][0-9]_<branch-slug>/index.md`;
Read every directory entrypoint, discard those without exactly one ultra
marker, and report all remaining matches with the highest-numbered match
first.
- If git mode is off or branch creation is disabled, list every root `*.md`
full plan and every direct child `*/index.md` entrypoint containing exactly
one `<!-- aif:plan-mode:ultra -->`. Exclude the resolved fast/fix plan paths
and do not list ultra phase files independently.
- The resolved fast plan path (`paths.plan`).
- The resolved fix plan path (`paths.fix_plan`).
4. **Print the availability summary**, followed by usage hints that the user can copy verbatim. Example output shape:
```
## Available Plans
Current branch: feature/user-auth
- [x] .ai-factory/plans/feature-user-auth.md
- [ ] .ai-factory/PLAN.md
- [x] .ai-factory/FIX_PLAN.md
Use:
- /aif-improve @<path> <optional prompt>
- /aif-improve <optional prompt> # automatic priority
```
- Mark each candidate with `[x]` when it exists and `[ ]` when it does not.
- Show absolute paths only if the configured paths are absolute; otherwise show them relative to the project root.
5. **If no plan exists at any of the locations above**, suggest creating one:
```
No plans found. Create one first:
- /aif-plan full <description>
- /aif-plan ultra <description>
- /aif-plan fast <description>
- /aif-fix <bug description>
```
6. **Archived plans.** If `paths.archive/plans/` exists and contains root `*.md`
files or direct child `*/index.md` ultra bundles, display a separate count
line after the main list. Do not list individual archived plans — use
`/aif-archive list` for that.
7. **STOP.** Do not proceed to any refinement step.
## Read-only contract
In `--list` mode the skill MUST NOT:
- modify any files,
- create or delete any plans,
- update `TaskList` entries or task statuses,
- call the validator subagent (the `+check` flag is silently ignored — there is nothing to validate before refinement runs).
Only `git` (read-only), `Read`, `Glob`, and `Grep` are required to satisfy the procedure above.
## Example
```
User: /aif-improve --list
## Available Plans
Current branch: feature/user-auth
- [x] .ai-factory/plans/feature-user-auth.md
- [ ] <resolved fast plan path>
- [x] <resolved fix plan path>
Use:
- /aif-improve @.ai-factory/plans/feature-user-auth.md
- /aif-improve add validation and retries
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |