AIF skillsworkflow map

How to choose AIF skills for project setup, planning, implementation, verification, bug fixing, and closure.

Scenario table of contents8 scenarios
scenario 01 Connect AIF to an existing project Starting point for a repository that already has code, documentation, rules, local constraints, and decision history. $aif, $aif-reference, $aif-docs, $aif-rules, $aif-best-practices +6 scenario 02 Choose the right entry point Helps decide whether to start with exploration, fact-checking, source intake, a plan, or a bug fix. $aif-explore, $aif-grounded, $aif-reference, $aif-distillation, $aif-fix +3 scenario 03 Core milestone cycle Classic AI Factory cycle: roadmap, plan, improve, implement, verify, docs, rework, review, QA, and commit. $aif-roadmap, $aif-plan, $aif-loop, $aif-improve, $aif-implement +8 scenario 04 When to use $aif-loop Shows when one pass is not enough and several deliberate, quality-checked iterations are needed. $aif-loop, $aif-plan, $aif-improve, $aif-docs, $aif-grounded +5 scenario 05 New knowledge, documentation, and rules How to bring a new document, owner decision, policy, or external source into the project working context. $aif-distillation, $aif-reference, $aif-skill-generator, $aif-rules, $aif-rules-check +3 scenario 06 Error, review comment, or failed verification Route from symptom to root cause, fix, re-check, and final gates. $aif-explore, $aif-grounded, $aif-fix, $aif-improve, $aif-loop +6 scenario 07 Build, CI, Docker, and release readiness When runs and checks must be repeatable for people, CI, and agents. $aif-build-automation, $aif-dockerize, $aif-ci, $aif-security-checklist, $aif-qa +3 scenario 08 Acceptance, commit, learning, and closure The final route before “done”: strict verify, gates, commit, roadmap, archive, and evolve. $aif-verify, $aif-fix, $aif-improve, $aif-loop, $aif-review +8
scenario 01

Connect AIF to an existing project

Starting point for a repository that already has code, documentation, rules, local constraints, and decision history.

01
startExisting projectCode, documentation, rules, and local constraints already exist.
02
03
04
05
06
questionDo run commands, CI, or environment need standardization?
No
actionLeave infrastructure unchangedmove to the roadmap without changing build/CI/Docker
07
skill$aif-roadmapbreak work into milestones↗ new chat
outputAIF context is readythe next step can be planning a milestone or feature
scenario 02

Choose the right entry point

Helps decide whether to start with exploration, fact-checking, source intake, a plan, or a bug fix.

01
startNew task or questionChoose the right entry skill before making changes.
02
questionAre the requirements clear?
Yes
actionMove to the next questionscope is clear enough to choose plan/fix/reference
03
questionDoes the answer need to rely only on verified facts?
No
actionNormal answer modea working conclusion is enough without a separate evidence gate
04
questionIs there a new external source or handoff document?
No
actionNo new source materialuse the current AIF context
05
questionIs the material large and meant to become reusable knowledge?
No
actionA compact reference is enoughkeep a compact note
06
07
questionIs the artifact complex and does it need several passes?
No
outputReady to workthere is a plan, fix path, or honest blocker
scenario 03

Core milestone cycle

Classic AI Factory cycle: roadmap, plan, improve, implement, verify, docs, rework, review, QA, and commit.

scenario 04

When to use $aif-loop

Shows when one pass is not enough and several deliberate, quality-checked iterations are needed.

01
startIteration candidateThere is an artifact that may be weak after one pass.
02
questionIs one pass enough?
Yes
actionUse the normal skillloop is not needed; use the domain skill directly
03
questionAre iterations needed for a plan?
04
questionAre iterations needed for a document or spec?
05
questionAre iterations needed for an architecture decision?
06
07
outputResult improvedthere is a clear iteration history and rationale for the final version
scenario 05

New knowledge, documentation, and rules

How to bring a new document, owner decision, policy, or external source into the project working context.

01
startNew source or decisionDocument, URL, policy, owner decision, or handoff.
02
03
questionShould this become a repeatable process for agents?
No
actionKeep it as project knowledgereference/distillation is enough
04
questionIs there a new rule or prohibition?
05
questionShould project documentation change?
No
actionLeave documentation unchangedcheck roadmap impact
06
questionDo work order or priorities change?
No
actionRoadmap does not changekeep the current order
07
questionIs the decision complex and does it need several refinements?
No
outputKnowledge integratedthe material is available to the next agents
scenario 06

Error, review comment, or failed verification

Route from symptom to root cause, fix, re-check, and final gates.

01
startProblem signalError, failing test, review finding, regression, or verification failure.
02
questionIs the cause already understood?
Yes
actionMove to the problem typefix/improve/loop can be chosen
03
questionIs this a local bug?
No
actionNot a local bugcheck for a plan gap
04
06
questionDo changes affect security, secrets, PII, or external systems?
No
actionSecurity gate is not neededmove to rules/review
07
questionIs a separate project-rules check needed?
No
actionRules gate is not neededmove to review/QA
08
scenario 07

Build, CI, Docker, and release readiness

When runs and checks must be repeatable for people, CI, and agents.

01
startThe project must run and be checked reliablyLocally, in CI, or in a container.
02
questionAre there shared local commands?
Yes
actionCommands already existcheck containers
03
questionIs a consistent container environment needed?
No
actionContainer is not neededcheck CI
04
questionAre automated checks needed on PR or push?
No
actionLeave CI unchangedcheck risks
05
questionAre there external systems, secrets, or PII?
No
actionNo sensitive areasmove to QA/docs
06
questionIs manual acceptance of the run needed?
No
actionManual acceptance is not neededautomated checks are enough
07
questionShould commands or run steps be described in docs?
No
actionLeave docs unchangedmove to verify
scenario 08

Acceptance, commit, learning, and closure

The final route before “done”: strict verify, gates, commit, roadmap, archive, and evolve.

02
questionDid all gates pass?
03
questionIs final code review needed?
No
actionReview is not neededmove to security
04
questionIs a security check needed?
No
actionSecurity gate is not neededmove to rules
05
questionIs a project-rules check needed?
No
actionRules gate is not neededmove to QA
06
questionIs manual QA acceptance needed?
No
actionQA is not neededmove to docs
07
questionIs documentation affected?
No
actionLeave docs unchangedmove to commit

Detailed AIF skills table

What each skill does, why it exists, when to choose it, and what result to expect.

SkillWhat it is and whyWhen to useResult and next step
$aif Set up agent context for a project. Analyzes tech stack, installs relevant skills from skills.sh, generates custom skills, and configures MCP servers. Use when starting a new project, setting up AI context, or asking "set up project", "configure AI", "what skills do I need". Agent-ready project context: path settings, artifact language, project map, skills, and MCP configuration.
$aif-architecture Generate architecture guidelines for the project. Analyzes tech stack from DESCRIPTION.md, recommends an architecture pattern, and creates .ai-factory/ARCHITECTURE.md. Use when setting up project architecture, asking "which architecture", or after $aif setup. An ARCHITECTURE.md with practical constraints for future plans, reviews, and implementation.
$aif-archive Archive completed plans and roadmap milestones. Moves finished plans to the archive directory and optionally trims closed milestones from ROADMAP.md. Use when user says "archive plans", "clean up plans", "archive completed", or "trim roadmap". Closed plans and roadmap snapshots are moved out of the active workspace while history remains available.
$aif-best-practices Code quality guidelines and best practices for writing clean, maintainable code. Covers naming, structure, error handling, testing, and code review standards. Use when writing code, reviewing, refactoring, or asking "how should I name this", "best practice for", "clean code". Clear quality defaults that can be turned into project rules and used during planning, reviews, and implementation.
$aif-build-automation Analyze project and generate or enhance build automation file (Makefile, Taskfile.yml, Justfile, Magefile.go). If a build file already exists, improves it by adding missing targets and best practices. Use when user says "generate makefile", "create taskfile", "add justfile", "setup mage", or "build automation". One repeatable command interface for people, CI, and agents.
$aif-ci Generate or enhance CI/CD pipeline (GitHub Actions / GitLab CI) with linting, static analysis, tests, and security checks; supports --enhance. Use when user says "ci", "setup ci", "github actions", "gitlab ci", "pipeline". CI configuration that repeats key checks and reduces the chance of breaking main.
$aif-commit Create conventional commit messages by analyzing staged changes. Generates semantic commit messages following the Conventional Commits specification. Use when user says "commit", "save changes", or "create commit". A clear Conventional Commit message that matches the staged changes.
$aif-distillation Distill books, documents, folders, or URLs into compact, practical Agent Skills. Use when source material should become either one reusable skill package or a split set of focused skills, each with a concise SKILL.md plus detailed references and examples. A reusable skill package or split set of focused skills instead of repeatedly rereading the full source material.
$aif-dockerize Analyze project and generate Docker configuration: Dockerfile (multi-stage dev/prod), compose.yml, compose.override.yml (dev), compose.production.yml (hardened), and .dockerignore. Includes production security audit. Use when user says "dockerize", "add docker", "docker compose", "containerize", or "setup docker". Repeatable container startup and a more predictable dev/CI environment.
$aif-docs Generate and maintain project documentation. Creates a lean README as a landing page with detailed docs pages split by topic in the configured docs directory. Use when user says "create docs", "write documentation", "update docs", "generate readme", or "document project". Current documentation tied to real files, commands, architecture, integrations, QA, or operations.
$aif-evolve Self-improve AI Factory skills based on project context, accumulated patches, and codebase patterns. Analyzes what went wrong, what works, and enhances skills to prevent future issues. Use when you want to make AI smarter for your project. Project-specific skill context improves so agents repeat fewer old mistakes.
$aif-explore Enter explore mode: a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change. Clarified scope, options, risks, and open questions; if saved to .ai-factory/RESEARCH.md, it can feed $aif-plan from a fresh chat.
$aif-fix Fix a specific bug or problem in the codebase. Supports two modes - immediate fix or plan-first. Without arguments executes existing FIX_PLAN.md. Always suggests test coverage and adds logging. Use when user says "fix bug", "debug this", "something is broken", or pastes an error message. A targeted fix with checks and notes for future learning when useful.
$aif-grounded Reliability gate for answers. Forces evidence-based reasoning, explicit uncertainty, and “insufficient information” instead of guesses. Use when user says “be 100% sure”, “no hallucinations”, “only if verified”, “grounded answer”, or when stakes are high. A verified answer with evidence, explicit uncertainty, and honest “insufficient information” when proof is missing.
$aif-implement Execute implementation tasks from the current plan. Works through tasks sequentially, marks completion, and preserves progress for continuation across sessions; supports --list, @plan-file, status, and inline --without-plan. Use when user says "implement", "start coding", "execute plan", or "continue implementation". Plan tasks executed with progress preserved for continuation, then ready for $aif-verify.
$aif-improve Refine 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. Use after $aif-plan, to improve an $aif-fix plan, or when a plan needs an auto-review / targeted improvement prompt before implementation. A more realistic implementation-ready plan with gaps, dependencies, and risks addressed.
$aif-loop Run a strict multi-iteration Reflex Loop with phases PLAN, PRODUCE/PREPARE, EVALUATE, CRITIQUE, REFINE to improve an artifact until quality gates pass or iteration limits are reached. Use when user asks for iterative refinement, quality-gated generation, or "generate -> critique -> refine" loops. An improved artifact with iteration history, gate results, and rationale; loop state is on disk, so continuation from a fresh chat uses $aif-loop resume.
$aif-plan Plan implementation for a feature or task. Two modes — fast (single quick plan) or full (richer plan with optional git branch/worktree flow). Use when user says "plan", "new feature", "start feature", "create tasks". A markdown implementation plan that can be refined with $aif-improve and executed with $aif-implement.
$aif-qa QA workflow for testing a feature or task implementation. Analyzes changes, produces test plans, and describes concrete test scenarios. Use when user says "test this", "write test plan", "what should I test", or "QA this branch". QA artifacts: change summary, test plan, concrete scenarios, and edge cases.
$aif-reference Create knowledge references from URLs, documents, or files for use by AI agents. Fetch, process, and store structured references in the configured references directory (default: .ai-factory/references/). Use when a URL, document, file, or handoff material must become a reusable project reference. A structured reference in .ai-factory/references or the configured references directory.
$aif-review Perform code review on staged changes or a pull request. Checks for bugs, security issues, performance problems, and best practices. Use when user says "review code", "check my code", "review PR", or "is this code okay". Optional +check flag validates findings via a fresh-context subagent. Prioritized findings with concrete locations, ready for fix or follow-up.
$aif-roadmap Create or update a project roadmap with major milestones. Generates the configured roadmap artifact (default .ai-factory/ROADMAP.md) — a strategic checklist of high-level goals. Use when user says "roadmap", "project plan", "milestones", or "what to build next". A high-level ROADMAP.md that connects milestones, order of work, progress, and next steps.
$aif-rules Add project-specific rules and conventions to the configured RULES.md artifact. Each invocation appends new rules. These rules are automatically loaded by $aif-implement before execution. Use when user says "add rule", "remember this", "convention", or "always do X". Updated RULES.md or rules/*.md loaded by later skills before planning, implementation, and checks.
$aif-rules-check Run a standalone read-only rules compliance gate against changed files or a git ref. Use when you need a dedicated project-rules check without a full review or verify pass. A rules-gate result: violations to fix or confirmation that changes comply.
$aif-security-checklist Security audit checklist based on OWASP Top 10 and best practices. Covers authentication, injection, XSS, CSRF, secrets management, and more. Use when reviewing security, before deploy, asking "is this secure", "security check", "vulnerability". A security checklist with risks and required actions before work proceeds.
$aif-skill-generator Generate professional Agent Skills for AI agents. Creates complete skill packages with SKILL.md, references, scripts, and templates. Use when creating new skills, generating custom slash commands, or building reusable AI capabilities; can start from a skill name, search <query>, or URL(s), and validates against the Agent Skills specification. A complete skill package with SKILL.md, references, scripts, templates, and validation.
$aif-verify Verify completed implementation against the plan. Checks that all tasks were fully implemented, nothing was forgotten, code compiles, tests pass, and quality standards are met; supports --strict. Use after $aif-implement completes, or when user says "verify", "check work", or "did we miss anything". A pass/fail result against the plan, build/test/lint, and quality standards.