Executing Plans Inline
obra/superpowers
Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.
Execute implementation tasks from the current plan. An agent skill from unxed/f4.
The automated check flagged lines worth reading first. See the safety section below.
$ npx skills add unxed/f4 --skill aif-implement -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install unxed/f4 aif-implement --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/aif-implement .claude/skills/aif-implement && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "aif-implement" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/aif-implement into .claude/skills/aif-implement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aif-implement", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/unxed/f4/tree/main/.agents/skills/aif-implementType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add unxed/f4 --skill aif-implement -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install unxed/f4 aif-implement --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/aif-implement .agents/skills/aif-implement && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "aif-implement" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/aif-implement into .agents/skills/aif-implement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aif-implement", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add unxed/f4 --skill aif-implement -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install unxed/f4 aif-implement --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/aif-implement .cursor/skills/aif-implement && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "aif-implement" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/aif-implement into .cursor/skills/aif-implement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aif-implement", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/unxed/f4.git --path .agents/skills/aif-implement--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add unxed/f4 --skill aif-implement -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install unxed/f4 aif-implement --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/aif-implement .gemini/skills/aif-implement && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "aif-implement" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/aif-implement into .gemini/skills/aif-implement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aif-implement", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install unxed/f4 aif-implementInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add unxed/f4 --skill aif-implement -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/aif-implement .github/skills/aif-implement && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "aif-implement" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/aif-implement into .github/skills/aif-implement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aif-implement", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add unxed/f4 --skill aif-implement -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install unxed/f4 aif-implement --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/unxed/f4.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/aif-implement .opencode/skills/aif-implement && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "aif-implement" agent skill from https://github.com/unxed/f4/tree/main/.agents/skills/aif-implement into .opencode/skills/aif-implement/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "aif-implement", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
aif-implementExecute implementation tasks from the current plan. An agent skill from unxed/f4.
Aif Implement is an agent skill from unxed/f4. Execute implementation tasks from the current plan. Works through tasks sequentially, marks completion, and preserves progress for continuation across sessions. Use when user says "implement", "start coding", "execute plan", or "continue implementation".
Its SKILL.md is about 11k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/IMPLEMENTATION-GUIDE.md` and `references/LOGGING-GUIDE.md`).
It sits in Agent Workflows, covering Planning. The repository describes itself as: dual pane like a charm. The licence is BSD-3-Clause.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e4d719a. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGlobGrepBashTaskListTaskGetTaskUpdateAskUserQuestion…and 6 more on the same allowed-tools line.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Aif Implement loads about 11k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 67 tokens; SKILL.md has 4,269 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found patterns that need a careful read before installing.
- ❌ Skip tasks without user permissionallowed-tools: Read, Write, Edit, Glob, Grep, Bash, TaskList, TaskGet, TaskUpdate, AskUserQuestion, Questions, mcp_Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from unxed/f4 at commit e4d719a, republished under its BSD-3-Clause licence (© unxed). 4,269 words, ~10,879 tokens.
.claude/skills/aif-implement/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Execute tasks from the plan, track progress, and enable session continuation.
Determine Handoff mode. If the caller passed HANDOFF_MODE and HANDOFF_SKIP_REVIEW as explicit text in the prompt, use those values. Otherwise, use the Bash tool:
Bash: printenv HANDOFF_MODE || true
Bash: printenv HANDOFF_SKIP_REVIEW || trueThen check HANDOFF_MODE:
HANDOFF_MODE is 1 (autonomous Handoff agent)The Handoff coordinator already manages status transitions and DB writes directly. Do NOT call MCP tools. Instead:
AskUserQuestion — use sensible defaults (auto-commit at checkpoints, skip pause prompts).HANDOFF_MODE is NOT 1 (manual Claude Code session)Handoff sync is handled inline — see Step 0.2 (after reading the plan file) for the task ID extraction and MCP sync trigger. The sync points are:
handoff_sync_status → "implementing" (with paused: true)handoff_push_plan with updated plan contenthandoff_push_plan with final plan, then handoff_sync_status → "review" (with paused: true) or "done" (with paused: false when HANDOFF_SKIP_REVIEW=1)CRITICAL: Always pass paused: true with every handoff_sync_status call except done. This prevents the autonomous Handoff agent from picking up the task while you work manually. Only done passes paused: false.
FIRST: Determine what state we're in:
1. Read `.ai-factory/config.yaml` if it exists to resolve:
- `paths.description`, `paths.architecture`, `paths.rules_file`, `paths.roadmap`, `paths.research`; derive `research_bundles_dir = <parent directory of paths.research>/research/`
- `paths.plan`, `paths.plans`, `paths.fix_plan`, `paths.patches`
- `paths.archive`
- `paths.rules`
- `language.ui`, `language.artifacts`
- `git.enabled`, `git.base_branch`, `git.create_branches`
- `workflow.plan_id_format` (default: `slug`) — used by branch-based plan discovery.
Active values: `slug` and `sequential`. Discovery treats a root `*.md` as
a full plan unless it is the resolved `paths.plan` or `paths.fix_plan`.
Treat a direct child `*/index.md` as an ultra bundle only after reading it
and confirming that it contains exactly one
`<!-- aif:plan-mode:ultra -->`; ignore unrelated directories and never count
phase files independently.
When `sequential`, resolve both
`<paths.plans>/[0-9]{4}_<branch-slug>.md` and
`<paths.plans>/[0-9]{4}_<branch-slug>/index.md`, then choose the
highest-numbered matching artifact.
`timestamp` and `uuid` are **reserved values** and currently behave like `slug`.
Treat any unknown value as `slug`.
- `rules.base` plus any named `rules.<area>` entries
2. Parse arguments:
- --list → list available plans only (no implementation; STOP)
- --without-plan <description> → inline implementation mode; skip plan discovery and jump to Step 0.inline
- @<path> → explicit plan file, ultra directory, or ultra `index.md` override (highest priority)
- <number> → start from specific task
- status → status-only mode
- Optional inline-mode flag: --docs=yes|no|warn (only valid with --without-plan; default: warn)
3. If `git.enabled = true`, check for uncommitted changes (`git status`)
4. If `git.enabled = true`, check current branch--list)If $ARGUMENTS contains --list, run read-only plan discovery and stop.
1. Get current branch:
git branch --show-current (git mode only)
2. Convert branch to canonical stem: replace "/" with "-" (git mode only)
3. Check existence of:
- <configured plans dir>/<branch-stem>.md and
<configured plans dir>/<branch-stem>/index.md (git mode only); Read the
directory entrypoint and report it only when it contains exactly one
`<!-- aif:plan-mode:ultra -->`
- when `workflow.plan_id_format = sequential`: also glob
`<configured plans dir>/[0-9][0-9][0-9][0-9]_<branch-stem>.md` and
`<configured plans dir>/[0-9][0-9][0-9][0-9]_<branch-stem>/index.md`;
Read every directory entrypoint, discard those without exactly one marker,
and report all valid matches (highest-numbered first)
- if git mode is off or branch creation is disabled: any root `*.md` full
plan or declared-ultra direct child `*/index.md` entrypoint in
`<configured plans dir>/`; exclude the resolved fast/fix plan paths
- <resolved fast plan path>
- <resolved fix plan path>
4. Print plan availability summary and usage hints
5. STOP.Important: In --list mode:
For detailed output format and examples, see:
skills/aif-implement/references/IMPLEMENTATION-GUIDE.md → "List Available Plans (--list)"--without-plan)If $ARGUMENTS contains --without-plan, execute a single scoped task from the description WITHOUT creating or reading any plan file. This is the lightweight path for small feat/chore tasks that do not justify a full plan but are not bug fixes either (use /aif-fix for bugs).
Argument parsing:
1. description = everything after `--without-plan`, excluding any recognized flag tokens (`--docs=...`).
2. docs_policy = value of `--docs=yes|no|warn` if present, else `warn` (default).
3. Validation:
- description is empty →
ERROR: "Usage: /aif-implement --without-plan <description> [--docs=yes|no|warn]"
→ STOP
- arguments also contain `@<path>`, `status`, or a bare task id number →
ERROR: "`--without-plan` is mutually exclusive with @plan-file, status, and task id."
→ STOP
- `--docs=<value>` where <value> not in {yes, no, warn} →
ERROR: "Invalid --docs value. Expected yes|no|warn."
→ STOPScope guard (prevent silent mega-tasks):
Before executing, assess the description. If it looks too broad for a one-shot inline task — multiple unrelated imperatives joined by "and"/"и", references to multiple subsystems, or roughly more than ~300 characters of scope — do NOT attempt to guess a plan. Instead print:
Description looks too broad for inline implementation. Recommended:
/aif-plan fast <description>→ STOP.
Small, focused descriptions (e.g. "add GET /healthz returning 200 with {status:"ok"}") proceed.
Surprise-warn on existing plan artifacts (non-blocking):
Inline mode ignores plan files by design. If any of these exist on disk, emit a WARN [inline] line so the user notices the intentional skip (do NOT read them, do NOT redirect):
<configured plans dir>/<branch>.md or
<configured plans dir>/<branch>/index.md (git mode only) — or their
[0-9]{4}_<branch> sequential formspaths.plan)paths.fix_plan)Example: WARN [inline] paths.plan exists but is ignored in --without-plan mode.
Load project context (same as regular implement):
Use the resolved config from Step 0:
paths.description (DESCRIPTION.md) if presentpaths.architecture (ARCHITECTURE.md) if presentpaths.rules_file (RULES.md) + rules.base + named rules.<area> entries.ai-factory/skill-context/aif-implement/SKILL.md — MANDATORY if the file exists (same precedence and enforcement as regular mode in Step 0.1)language.ui, language.artifactsPlan artifact policy: inline mode does NOT load or use plan/fix-plan files. Plan files are never read, parsed, or executed. A minimal existence probe is permitted (see the surprise-warn section above) solely to emit the WARN [inline] line — nothing is read from disk. Also skip: resume/recovery reconciliation, TaskList loading, checkbox state comparison.
Execute the task (one-shot):
Inline implementation: <description>references/LOGGING-GUIDE.md/aif-plan if wider test coverage is needed.Prohibited in inline mode:
paths.plan / paths.plans/* / paths.fix_plan./aif-plan or /aif-fix.paths.patches (no [FIX] self-improvement patch — this is not a bugfix flow).TaskList / TaskGet / TaskUpdate (no plan = no persisted tasks).Handoff inline support:
Naming clarification:
--without-planmeans "without a local plan artifact on disk" (nopaths.plan/paths.plans/*/paths.fix_plan). When a Handoff task is linked, the task is still represented as a synthetic plan inside Handoff viahandoff_push_plan— that's a remote representation, not a local file. The local-no-plan contract is preserved; only the remote sync surface is unchanged.
When HANDOFF_MODE is 1 (autonomous Handoff agent invoked inline mode):
mcp__handoff__* tool (the coordinator manages status/sync directly — same rule as Step 0 (pre)).When HANDOFF_MODE is NOT 1 and HANDOFF_TASK_ID is set (manual Claude Code session linked to a Handoff task):
Build synthetic plan content:
# Inline implementation
- [ ] <description>Call handoff_sync_status with { taskId: <HANDOFF_TASK_ID>, newStatus: "implementing", sourceTimestamp: "<current UTC ISO 8601>", direction: "aif_to_handoff", paused: true }.
Call handoff_push_plan with { taskId: <HANDOFF_TASK_ID>, planContent: <synthetic content above> }.
After successful execution, flip the checkbox to - [x] in the synthetic content and call handoff_push_plan again with the updated text.
Finalize sync:
HANDOFF_SKIP_REVIEW is 1 → handoff_sync_status → "done" with paused: false.handoff_sync_status → "review" with paused: true.If HANDOFF_TASK_ID is missing → skip all MCP sync for this run.
Docs policy (inline mode, driven by --docs):
--docs=yes → after completion, show the docs checkpoint (same AskUserQuestion as Docs: yes in regular mode) and route changes through /aif-docs.--docs=no → suppress the documentation checkpoint, emit WARN [docs] --docs=no in inline mode; documentation checkpoint skipped.--docs=warn (default) → emit WARN [docs] Inline mode default is warn-only; documentation checkpoint skipped. Pass --docs=yes to enable.Context maintenance in inline mode:
AGENTS.md: allowed only if new modules/folders were actually created.Completion output (inline mode):
## Inline Implementation Complete
Task: <description>
Files modified:
- <file> (created|modified)
Documentation: <outcome per --docs>
What's next?
1. 🔍 /aif-verify — Verify the change (recommended)
2. 💾 /aif-commit — Commit directlyThen offer:
AskUserQuestion: Inline task complete. What's next?
Options:
1. Verify first — Run /aif-verify (recommended)
2. Skip to commit — Go straight to /aif-commit→ STOP after the chosen follow-up completes. No summary document, no report file.
If the user is resuming the next day, says the session was abandoned, or you suspect context was lost (e.g. after /clear), rebuild local context from the repo before continuing tasks:
If git.enabled = true:
1. git status
2. git branch --show-current
3. git log --oneline --decorate -20
4. (optional) git diff --stat
5. (optional) git stash listIf git.enabled = false, skip git recovery commands and reconcile only from the resolved plan/fix-plan paths plus the working tree state.
Then reconcile plan/task state:
@path override wins; otherwise a branch-named full file or ultra directory takes priority over the resolved fast plan).git.enabled = false or full/ultra plans were created without a branch, prefer:@plan-file-or-directory,*.md full plan or declared-ultra direct child
*/index.md entrypoint in the configured plans dir, excluding the
resolved fast/fix plan paths,TaskList statuses vs plan-entrypoint checkboxes.TaskUpdate(..., status: "completed") and update the plan checkbox.If uncommitted changes exist:
AskUserQuestion: You have uncommitted changes. Commit them first?
Options:
1. Yes, commit now (/aif-commit)
2. No, stash and continue
3. CancelBased on choice:
/aif-commit, then continue to plan discoverygit stash push -m "aif-implement: stash before plan execution", then continueIf NO plan file exists but the resolved fix plan exists:
A fix plan was created by /aif-fix in plan mode. Redirect to fix workflow:
Found a fix plan at the resolved fix plan path.
This plan was created by /aif-fix and should be executed through the fix workflow
(it creates a patch and handles cleanup automatically).
Running /aif-fix to execute the plan...→ Invoke /aif-fix (without arguments – it will detect the resolved fix plan and execute it).
→ STOP — do not continue with implement workflow.
If NO plan file exists AND no resolved fix plan (all tasks completed or fresh start):
AskUserQuestion: No active plan found. Current branch: <current-branch>.
What would you like to do?
Options:
1. Start new feature from current branch
2. Return to configured base branch and start new feature
3. Create quick task plan (no branch)
4. Nothing, just checking statusBased on choice:
/aif-plan full <description>git checkout <configured-base-branch>, then git pull origin <configured-base-branch> → /aif-plan full <description> (git mode only)/aif-plan fast <description>If git.enabled = false, replace option 2 with:
2. Create rich full plan without branch creation/aif-plan full <description> without any git commandsIf plan file exists → continue to Step 0.1
Use the resolved config from Step 0:
language.ui for prompts, language.artifacts for generated contentrules.base + named rules.<area> entriesRead .ai-factory/DESCRIPTION.md (use path from config) if it exists to understand:
Read the resolved architecture artifact if it exists (paths.architecture, default: .ai-factory/ARCHITECTURE.md) to understand:
Read the resolved RULES.md path if it exists:
Read rules hierarchy (paths from config):
<area> — area-specific rule entries resolved from config (for example rules.api, rules.frontend)Load all available rule files and merge them. More specific rules override general ones.
Read .ai-factory/skill-context/aif-implement/SKILL.md — MANDATORY if the file exists.
This file contains project-specific rules accumulated by /aif-evolve from patches,
codebase conventions, and tech-stack analysis. These rules are tailored to the current project.
How to apply skill-context rules:
Enforcement: After generating any output artifact, verify it against all skill-context rules. If any rule is violated — fix the output before presenting it to the user.
Patch fallback (limited, only when skill-context is missing):
.ai-factory/skill-context/aif-implement/SKILL.md does not exist and the resolved patches dir exists:Glob to find *.md files in the resolved patches dirUse this context when implementing:
Normalize every selected artifact to:
plan_entrypoint — the single markdown file containing settings and ## Tasksplan_bundle_dir — empty for fast/full/fix plans; the ultra directory otherwisephase_files — empty for single-file plans; ordered links from the ultra
entrypoint's ## Phase Index otherwiseIf $ARGUMENTS contains @<path>:
index.md,
or that ultra bundle's index.md.index.md as ultra,
Read index.md and require exactly one
<!-- aif:plan-mode:ultra -->; otherwise STOP with a plan-integrity error.paths.fix_plan, invoke /aif-fix and STOP.Without an explicit override, resolve in this order:
1. Branch-based full/ultra artifact:
a. Compute <branch-stem> by replacing "/" with "-".
b. For workflow.plan_id_format=sequential, glob both:
<paths.plans>/[0-9][0-9][0-9][0-9]_<branch-stem>.md
<paths.plans>/[0-9][0-9][0-9][0-9]_<branch-stem>/index.md
Read every directory candidate and retain it only when `index.md` contains
exactly one <!-- aif:plan-mode:ultra -->. Choose the highest numeric prefix
across valid artifacts. If multiple valid candidates exist, emit
WARN [aif-implement] and name the chosen artifact; if both shapes share
the highest prefix, prefer ultra.
c. If no valid sequential candidate exists, or sequential mode is inactive,
check:
<paths.plans>/<branch-stem>/index.md
<paths.plans>/<branch-stem>.md
Read the directory entrypoint before selection and ignore it unless it
contains exactly one <!-- aif:plan-mode:ultra -->. If both valid shapes
exist, emit WARN and prefer the ultra entrypoint.
2. If no branch artifact resolves, count active named artifacts as:
- each root <paths.plans>/*.md file except resolved paths.plan and paths.fix_plan
- each direct child <paths.plans>/*/index.md containing <!-- aif:plan-mode:ultra -->
Exactly one total → use it. More than one → ask the user to choose or use
@<path>; do not count phase files as independent plans.
3. No named artifact → paths.plan.
4. No regular plan → paths.fix_plan, then redirect to /aif-fix and STOP.Priority remains: explicit path → branch-based full/ultra artifact → single
named full/ultra artifact → fast plan → fix-plan redirect. Discovery scans only
paths.plans; archived files and directories under paths.archive/plans are
excluded.
Read the selected artifact:
<!-- aif:plan-mode:ultra -->, it is not an AI Factory plan. Ignore it and
continue discovery. If it contains the marker but its Phase Index is malformed,
STOP with a plan-integrity error instead of falling back to another plan.plan_entrypoint completely.<!-- aif:plan-mode:ultra -->),
validate every relative Phase Index link, reject paths escaping the bundle,
record the ordered phase files, and ensure every indexed task maps to exactly
one ## Task N section. Warn and STOP on a broken bundle rather than guessing.index.md is the only progress source; phase files must not own duplicate
task checkboxes.## Original Request as useful original scope context. Executable inputs
remain settings, dependencies, the task checklist, committed Research Context,
and (for ultra) linked phase specifications.Source: / Reference: line with canonical
^(?:Source|Reference):\s+\x60([^\x60]+)\x60\s+\( syntax; capture the backtick-delimited
path so spaces and brackets remain intact. For older bare-path lines, fall back
to ^(?:Source|Reference):\s+(.+?)\s+\(. Fall back to paths.research only
when neither form identifies a usable path.research_bundles_dir, require its sibling
INDEX.md to contain <!-- aif:research-mode:ultra --> exactly once and link
that RESEARCH.md from ## Artifact Index; otherwise emit
WARN [research-drift]. Valid sibling C4/ADR/dependency artifacts remain
rationale only and do not expand committed scope.SHA256: is present, extract the current source text strictly between
<!-- aif:active-summary:start --> and <!-- aif:active-summary:end -->,
remove HTML comment blocks, preserve line order and leading whitespace, trim
trailing spaces from every line, use LF endings, and end with one newline.
Hash through stdin with shasum -a 256 or sha256sum; the digest is
authoritative. Use Updated: only as a legacy fallback when SHA256: is
absent. On a missing/invalid source or revision mismatch, emit
WARN [research-drift] and continue using committed plan context.
In the single-file wording of this contract: emit WARN [research-drift] and continue using the plan's embedded Research Context as scope.Immediately after reading plan_entrypoint, check its first line for
<!-- handoff:task:<uuid> -->:
handoff_sync_status with status
implementing, the actual current UTC timestamp, direction
aif_to_handoff, and paused: true.When pushing ultra progress to Handoff, serialize the full bundle as entrypoint
content followed by each linked phase file in order, prefixed with
<!-- ultra-phase:<relative-path> -->.
TaskList → Get all tasks with statusFind:
## Implementation Progress
✅ Completed: 3/8 tasks
🔄 In Progress: Task #4 - Implement search service
⏳ Pending: 4 tasks
Current task: #4 - Implement search serviceFor each task:
3.1: Fetch full details
TaskGet(taskId) → Get description, files, contextFor an ultra bundle, resolve the task's details link from index.md, then read
the entire linked phase file before marking the task in progress. Treat its
ordered implementation steps, interfaces, edge cases, logging, acceptance
criteria, and verification as requirements. Do not substitute a new approach
merely because TaskGet contains a shorter summary. If phase instructions conflict
with current code or project context, stop and report the concrete drift; do not
silently make the architectural choice that ultra was meant to pre-plan.
3.2: Mark as in_progress
TaskUpdate(taskId, status: "in_progress")3.3: Implement the task
3.4: Verify implementation
3.5: Mark as completed
TaskUpdate(taskId, status: "completed")3.6: Update checkbox in plan entrypoint
IMMEDIATELY after completing a task, update the checkbox in the plan entrypoint
(index.md for ultra):
# Before
- [ ] Task 1: Create user model
# After
- [x] Task 1: Create user modelThis is MANDATORY — checkboxes must reflect actual progress:
Edit tool to change - [ ] to - [x]Handoff sync (manual mode ONLY — skip when HANDOFF_MODE is 1): If a Handoff task ID was extracted in Step 0.2, call handoff_push_plan with { taskId: <id>, planContent: <full updated plan text> } to sync the checklist progress. For ultra, use the bundle serialization defined in Step 0.2.
3.7: Update the resolved description artifact if needed
If during implementation:
→ Update the resolved description artifact (paths.description, default: .ai-factory/DESCRIPTION.md) to reflect the change:
## Tech Stack
- **Cache:** Redis (added for session storage)This keeps the resolved description artifact as the source of truth.
3.7.1: Update AGENTS.md and ARCHITECTURE.md if project structure changed
If during implementation:
src/modules/, new API routes directory, etc.)→ Update AGENTS.md — refresh the "Project Structure" tree and "Key Entry Points" table to reflect new directories/files.
→ Update the resolved architecture artifact — if new modules or layers were added that should be documented in the folder structure section.
Only update if structure actually changed — don't rewrite on every task. Check if new directories were created that aren't in the current structure map.
3.8: Check for commit checkpoint
If the plan has commit checkpoints and current task is at a checkpoint:
AskUserQuestion: ✅ Tasks <first>-<last> completed. This is a commit checkpoint. Ready to commit? Suggested message: "<conventional commit message>"
Options:
1. Yes, commit now (/aif-commit)
2. No, continue to next task
3. Skip all commit checkpointsBased on choice:
/aif-commit with the suggested message, then continue to next task/aif-implement run, skip the prompt automatically and proceed directly to the next task (as if user selected "No, continue to next task" each time). This is in-context memory — resets on /clear or new session3.9: Move to next task or pause
Progress is automatically saved via TaskUpdate.
To pause:
Current progress saved.
Completed: 4/8 tasks
Next task: #5 - Add pagination support
To resume later, run:
/aif-implementTo resume (next session):
/aif-implement→ Automatically finds next incomplete task
Handoff sync (manual mode ONLY — skip entirely when HANDOFF_MODE is 1): If a Handoff task ID was extracted from the plan annotation AND HANDOFF_MODE is NOT 1:
handoff_push_plan with { taskId: <id>, planContent: <final updated plan text> }; serialize the complete bundle for ultra.HANDOFF_SKIP_REVIEW is 1: call handoff_sync_status with { taskId: <id>, newStatus: "done", sourceTimestamp: "<current UTC time in ISO 8601 format>", direction: "aif_to_handoff", paused: false }.handoff_sync_status with { taskId: <id>, newStatus: "review", sourceTimestamp: "<current UTC time in ISO 8601 format>", direction: "aif_to_handoff", paused: true }.When all tasks are done:
## Implementation Complete
All 8 tasks completed.
Branch: feature/product-search
Plan artifact: .ai-factory/plans/feature-product-search.md
Files modified:
- src/services/search.ts (created)
- src/api/products/search.ts (created)
- src/types/search.ts (created)
Documentation: updated existing docs | created docs/<feature-slug>.md | skipped by user | warn-only (Docs: no/unset)
What's next?
1. 🔍 /aif-verify — Verify nothing was missed (recommended)
2. 💾 /aif-commit — Commit the changes directlyCheck ROADMAP.md progress:
If the resolved roadmap artifact exists:
## Roadmap Linkage with a non-none milestone, prefer that milestone for completion marking[x] and add entry to the Completed table with today's dateOnly do this step when there is something concrete to capture.
DESCRIPTION.md (allowed in this command):
ARCHITECTURE.md + AGENTS.md (allowed in this command):
AGENTS.md structure maps or entry points, refresh them only when they are now incorrect.ROADMAP.md (allowed, limited):
WARN [roadmap] ... and suggest the owner command:/aif-roadmap check/aif-roadmap <short update request>RULES.md (NOT allowed in this command):
paths.rules_file artifact from /aif-implement./aif-rules./aif-rules automatically (it is user-invoked).If candidate rules exist:
AskUserQuestion: Capture new project rules in the resolved RULES.md artifact?
Options:
1. Yes — output `/aif-rules ...` commands (recommended)
2. No — skipDocumentation policy checkpoint (after completion, before plan cleanup):
Read the plan entrypoint setting Docs: yes/no.
If plan setting is Docs: yes:
AskUserQuestion: Documentation checkpoint — how should we document this feature?
Options:
1. Update existing docs (recommended) — invoke /aif-docs
2. Create a new feature doc page — invoke /aif-docs with feature-page context
3. Skip documentationHandling:
/aif-docs to update README/docs based on completed work/aif-docs with context to create docs/<feature-slug>.md, include sections (Summary, Usage/user-facing behavior, Configuration, API/CLI changes, Examples, Troubleshooting, See Also), and add a README docs-table link/aif-docs; emit WARN [docs] Documentation skipped by userIf plan setting is Docs: no or setting is unset:
/aif-docs automaticallyWARN [docs] Docs policy is no/unset; skipping documentation checkpointAlways include documentation outcome in the final completion output:
Documentation: updated existing docsDocumentation: created docs/<feature-slug>.mdDocumentation: skipped by userDocumentation: warn-only (Docs: no/unset)Handle plan artifact after completion:
If the resolved fast plan path (from /aif-plan fast):
AskUserQuestion: Would you like to delete the resolved fast plan file? (It's no longer needed)
Options:
1. Yes, delete it
2. No, keep itBased on choice:
rm <resolved fast plan path>If branch-named full file or ultra bundle directory:
Check if running in a git worktree:
Detect worktree context:
# If .git is a file (not a directory), we're in a worktree
[ -f .git ]If we ARE in a worktree, offer to merge back and clean up:
You're working in a parallel worktree.
Branch: <current-branch>
Worktree: <current-directory>
Main repo: <main-repo-path>
AskUserQuestion: Would you like to merge this branch into the configured base branch and clean up?
Options:
1. Yes, merge and clean up (recommended)
2. No, I'll handle it manuallyBased on choice:
To merge and clean up later:
cd <main-repo-path>
git merge <branch>
/aif-plan --cleanup <branch>Ensure everything is committed — check git status. If uncommitted changes exist, suggest /aif-commit first and wait.
Get repository root path:
MAIN_REPO=$(git rev-parse --git-common-dir | sed 's|/\.git$||')
BRANCH=$(git branch --show-current)Switch to the repository root:
cd "${MAIN_REPO}"Merge the branch:
git checkout <configured-base-branch>
git pull origin <configured-base-branch>
git merge "${BRANCH}"If merge conflict occurs:
⚠️ Merge conflict detected. Resolve manually:
cd <main-repo-path>
git merge --abort # to cancel
# or resolve conflicts and git commit→ STOP here, do not proceed with cleanup.
Remove worktree and branch (only if merge succeeded):
git worktree remove <worktree-path>
git branch -d "${BRANCH}"Confirm:
✅ Merged and cleaned up!
Branch <branch> merged into <configured-base-branch>.
Worktree removed.
You're now in: <main-repo-path> (<configured-base-branch>)→ STOP — worktree merged and removed, no further steps needed.
AskUserQuestion: All tasks complete. What's next?
Options:
1. Verify first — Run /aif-verify to check completeness (recommended)
2. Skip to commit — Go straight to /aif-commitBased on choice:
/aif-verify → after it completes, continue to context cleanup below/aif-commit → after it completes, continue to context cleanup belowContext cleanup (after verify or commit):
Suggest the user to free up context space if needed: /clear (full reset) or /compact (compress history).
IMPORTANT: NO summary reports, NO analysis documents, NO wrap-up tasks.
/aif-implementContinues from next incomplete task.
/aif-implement --listLists the resolved fast/fix plan paths and current-branch full/ultra artifacts (including sequential identifiers), then exits without implementation.
/aif-implement @my-custom-plan.md
/aif-implement @.ai-factory/plans/feature-user-auth.md status
/aif-implement @.ai-factory/plans/feature-user-auth statusUses the provided plan file, ultra directory, or ultra index.md instead of
auto-detecting by branch/default artifacts.
/aif-implement --without-plan add GET /healthz endpoint returning {"status":"ok"}
/aif-implement --without-plan rename LogLevel.VERBOSE to LogLevel.TRACE --docs=yesOne-shot execution of a small task without any plan file. Mutually exclusive with @plan-file, status, and task id. Does not create FIX_PLAN.md or patches. Default docs policy is warn; pass --docs=yes to run the docs checkpoint, --docs=no to silence the warning. See Step 0.inline for the full flow.
/aif-implement 5Starts from task #5 (useful for skipping or re-doing).
/aif-implement statusShows progress without executing.
/aif-best-practices guidelines (naming, structure, error handling)paths.rules_file, configured paths.research, and any exact research source linked from the plan entrypoint.WARN/ERROR outputs only; this does not replace the required verbose implementation logging rules below.For progress display format, blocker handling, session continuity examples, and full flow examples → see references/IMPLEMENTATION-GUIDE.md
- [ ] → - [x] immediately after task completionALWAYS add verbose logging when implementing code. For logging guidelines, patterns, and management requirements → read references/LOGGING-GUIDE.md
Key rules: log function entry/exit, state changes, external calls, error context. Use structured logging, configurable log levels (LOG_LEVEL env var).
DO NOT skip logging to "keep code clean" - verbose logging is REQUIRED during implementation, but MUST be configurable.
© unxed, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in .agents/skills/aif-implement of unxed/f4.
Open the folder on GitHubat commit e4d719a
Aif Implement next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Aif Implement this skillunxed/f4 | 241 | — | ~11k | Automated safety check: Warn | BSD-3-Clause | |
| Executing Plans Inlineobra/superpowers | 296k | 2 repos | ~5.1k | Automated safety check: Pass | MIT | |
| Interview Meaddyosmani/agent-skills | 103k | 6 repos | ~3.8k | Automated safety check: Pass | MIT | |
| OpenSpec Guided OnboardingFission-AI/OpenSpec | 71k | 1 repos | ~4.5k | Automated safety check: Pass | MIT | |
| Writing Plansgeeksblabla/stateofdev.ma | 163 | 57 repos | ~661 | Automated safety check: Pass | None | |
| Subagent Driven DevelopmentAsvarox/allkaraoke | 261 | 38 repos | ~1.2k | Automated safety check: Pass | None |
obra/superpowers
Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.
addyosmani/agent-skills
Asks one question at a time, each with a best guess attached, until the agent is about 95 percent sure what you really want, before any plan, spec or code.
Fission-AI/OpenSpec
Walks you through a complete OpenSpec workflow cycle with narration while doing real work in your codebase.
geeksblabla/stateofdev.ma
A skill your agent uses when design is complete and you need detailed implementation tasks for engineers with zero codebase context - creates comprehensive implementation plans with exact file…
Asvarox/allkaraoke
A skill your agent uses when executing implementation plans with independent tasks in the current session
jd-opensource/JoySafeter
Implements Manus-style file-based planning for complex tasks.
unxed/f4
Comprehensive documentation guide for Golang projects, covering godoc comments, README, CONTRIBUTING, CHANGELOG, Go Playground, Example tests, API docs, and llms.txt.
unxed/f4
Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt.
unxed/f4
Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…
unxed/f4
Security audit checklist based on OWASP Top 10 and best practices.
unxed/f4
Go (Golang) naming conventions — covers packages, constructors, structs, interfaces, constants, enums, errors, booleans, receivers, getters/setters, functional options, acronyms, test functions, and…
unxed/f4
Golang concurrency design — goroutine lifecycle and leak prevention, channels and select, channel ownership and direction, sync.Mutex/RWMutex/sync.Map/sync.Once/atomics, errgroup, singleflight…
Categories
Execute implementation tasks from the current plan. An agent skill from unxed/f4. Aif Implement is an agent skill from unxed/f4. Execute implementation tasks from the current plan.
Aif Implement fits situations like: user says implement; continue implementation.
Run `npx skills add unxed/f4 --skill aif-implement -a claude-code`. Or copy the skill folder (.agents/skills/aif-implement in unxed/f4) into .claude/skills/aif-implement in your project. Claude Code loads it when a task matches its description.
Run `npx skills add unxed/f4 --skill aif-implement -a codex`. Or copy the skill folder (.agents/skills/aif-implement in unxed/f4) into .agents/skills/aif-implement in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add unxed/f4 --skill aif-implement -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/aif-implement, .gemini/skills/aif-implement, .github/skills/aif-implement and .opencode/skills/aif-implement in your project.
Going by SKILL.md and its folder, Aif Implement needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep, Bash, TaskList, TaskGet, TaskUpdate, AskUserQuestion, Questions, mcp__handoff__handoff_sync_status, mcp__handoff__handoff_push_plan, mcp__handoff__handoff_get_task, mcp__handoff__handoff_list_tasks, mcp__handoff__handoff_update_task.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md flagged 1 warning(s): contains instruction-override wording (e.g. “without asking the user”). Read the flagged lines before installing; the check is not a guarantee either way.
Aif Implement is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 11k tokens (SKILL.md is roughly 44k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.8k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Aif Implement: Executing Plans Inline (obra/superpowers, 296k stars), Interview Me (addyosmani/agent-skills, 103k stars), OpenSpec Guided Onboarding (Fission-AI/OpenSpec, 71k stars) and Writing Plans (geeksblabla/stateofdev.ma, 163 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
unxed (a GitHub user) maintains it in unxed/f4, which has 241 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on October 8, 2026.
Source: unxed/f4 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.