Connect AIF to an existing project
Starting point for a repository that already has code, documentation, rules, local constraints, and decision history.
How to choose AIF skills for project setup, planning, implementation, verification, bug fixing, and closure.
Starting point for a repository that already has code, documentation, rules, local constraints, and decision history.
Helps decide whether to start with exploration, fact-checking, source intake, a plan, or a bug fix.
Classic AI Factory cycle: roadmap, plan, improve, implement, verify, docs, rework, review, QA, and commit.
Shows when one pass is not enough and several deliberate, quality-checked iterations are needed.
How to bring a new document, owner decision, policy, or external source into the project working context.
Route from symptom to root cause, fix, re-check, and final gates.
When runs and checks must be repeatable for people, CI, and agents.
The final route before “done”: strict verify, gates, commit, roadmap, archive, and evolve.
What each skill does, why it exists, when to choose it, and what result to expect.
| Skill | What it is and why | When to use | Result 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. |