ACF - AgentCodeFactory Local Edition
AI-powered code generation pipeline. Run locally or use cloud APIs.
Read the Manifesto — Why we believe local AI is the future of secure, private code generation.
Features
- Flexible Backends: Ollama, LM Studio (local) or OpenAI, Anthropic (cloud)
- 7-Stage Pipeline: SPEC → CONTEXT → DESIGN → IMPLEMENTATION → TESTING → REVIEW → DONE
- Multi-Model Routing: Automatically routes tasks to appropriate model sizes
- Extension Marketplace: Install premium agents, profiles, and RAG kits
- Local Git Versioning: Every iteration auto-committed for easy rollback
Quick Start
1. Install
git clone https://github.com/Tennisee-data/acf.git cd acf pip install -e .
2. Start your LLM backend (required before running)
Pick one:
# Option A: Ollama (recommended - local, free) brew install ollama # macOS (see ollama.ai for Linux/Windows) ollama serve # Start server (keep this running!) ollama pull qwen2.5-coder:7b # In another terminal # Option B: LM Studio (local, GUI) # Download from https://lmstudio.ai, start local server on port 1234 # Option C: Cloud API export OPENAI_API_KEY=sk-... # or export ANTHROPIC_API_KEY=sk-...
3. Verify and run
acf check # Verify LLM backend is working acf run "Add user authentication" # Run your first feature
Important: The pipeline will fail if no LLM backend is available. Make sure Ollama is running (
ollama serve) or LM Studio's server is started before runningacf run.
Detailed setup guides:
- Ollama Setup Guide - Recommended for CLI users
- LM Studio Setup Guide - GUI alternative
Installation
From PyPI (when published)
From Source (local development)
git clone https://github.com/Tennisee-data/acf.git cd acf pip install -e .
Note: If you cloned the repo, you must use
pip install -e .from the project directory. Runningpip install acfwill attempt to install from PyPI, not your local copy.
Optional Dependencies
From source:
pip install -e ".[semantic]" # Semantic RAG (better code retrieval) pip install -e ".[openai]" # OpenAI backend pip install -e ".[anthropic]" # Anthropic backend pip install -e ".[full]" # Everything
From PyPI (when published):
pip install "acf[semantic]" pip install "acf[openai]" pip install "acf[anthropic]" pip install "acf[full]"
Usage
Basic Generation
acf run "Build a REST API with FastAPI" acf run "Add user authentication" --repo ./my-project acf run "Build an API" --output ./my-api # Custom output directory
Each run creates a project directory with code at the root and history in .acf/:
2026-01-24-130821/ # Project directory (run ID by default)
├── app/ # Your generated code at root level
│ └── main.py
├── requirements.txt
├── .gitignore # Includes .acf/
└── .acf/ # Pipeline history (gitignored)
└── runs/
└── 2026-01-24-130821/ # Run artifacts
├── state.json # Pipeline state
├── feature_spec.json # Parsed requirements
├── design_proposal.json
├── change_set.json
├── diff.patch
└── *.md # Reports
Use --output to specify a custom project directory:
acf run "Build REST API" --output ./my-projectCLI Reference
acf run "feature" [OPTIONS]| Option | Short | Description |
|---|---|---|
--repo PATH |
-r |
Target repository (default: current directory) |
--output PATH |
-o |
Output directory for generated project (default: ./{run_id}/) |
--profile NAME |
-p |
Configuration profile (default: dev) |
--auto-approve |
-y |
Skip all approval prompts |
--resume ID |
Resume a paused run by ID | |
--dry-run |
Show what would be done without executing |
Pipeline Stages (built-in):
| Option | Description |
|---|---|
--decompose |
Break feature into sub-tasks before design |
--api-contract |
Generate OpenAPI spec before implementation |
--coverage |
Enforce test coverage (default: 80%) |
--coverage-threshold N |
Set coverage threshold (e.g., 90) |
--secrets-scan |
Detect hardcoded secrets, auto-fix with env vars |
--dependency-audit |
Scan for CVEs and outdated packages |
--rollback-strategy |
Generate CI/CD rollback and canary templates |
--observability |
Inject logging, metrics, tracing scaffolding |
--docs |
Generate documentation and ADRs |
--code-review |
Senior engineer code review |
--policy |
Enforce policy rules before verification |
--pr-package |
Build PR with changelog and spec links |
Marketplace Extensions (install separately):
| Option | Description |
|---|---|
--config |
Enforce 12-factor config layout |
Issue Integration:
| Option | Description |
|---|---|
--jira PROJ-123 |
Fetch requirements from JIRA issue |
--issue URL |
Fetch from GitHub/JIRA issue URL |
Examples
# Basic run with auto-approval acf run "Add login rate-limit" --auto-approve # Full pipeline with all quality checks acf run "Build payment API" --api-contract --coverage --secrets-scan --code-review # Resume a paused run acf run "Add feature" --resume 2026-01-24-130821 # Iterate on existing project acf iterate 2026-01-24-130821 "Add error handling"
Other Commands
# List all runs acf list # Show run details acf show 2026-01-24-130821 # Extract generated code to a directory acf extract 2026-01-24-130821 --output ./my-project # Create git scaffold with proper structure acf scaffold 2026-01-24-130821 # Generate tests for existing code acf generate-tests 2026-01-24-130821 # Deploy generated project acf deploy 2026-01-24-130821 --version v1.0.0
Extension Marketplace
# Browse extensions acf marketplace search "security" acf marketplace featured # Install extensions acf marketplace install secrets-scan acf marketplace install semantic-rag # Manage installed extensions acf extensions list acf extensions enable secrets-scan
Skills (Standalone Code Transformations)
Skills are standalone, composable code transformations that run directly on files without requiring a full pipeline execution.
# Run a skill on a file or directory acf skill run add-error-handling ./src/main.py acf skill run add-type-hints ./src --dry-run # Run a chained skill (multi-step transformation) acf skill chain production-ready ./src # List and inspect installed skills acf skill list acf skill show add-error-handling
Creating a skill:
- Create a directory with
manifest.yamlandskill.py - Install:
cp -r my-skill ~/.coding-factory/extensions/skills/
# manifest.yaml name: my-skill version: 1.0.0 type: skill author: Your Name description: What it does license: free skill_class: MySkill input_type: files output_type: modified_files file_patterns: ["*.py"] supports_dry_run: true
# skill.py from skills.base import BaseSkill, FileChange, SkillInput, SkillOutput class MySkill(BaseSkill): def run(self, input_data: SkillInput) -> SkillOutput: changes = [] for path in input_data.target_paths: content = path.read_text() modified = self.transform(content) if modified != content: changes.append(FileChange( path=path, original_content=content, modified_content=modified, change_type="modified", )) return SkillOutput( success=True, changes=changes, summary=f"Transformed {len(changes)} files", ) def transform(self, content: str) -> str: # Your transformation logic return content
Configuration
Create config.toml in your project. Make sure models match what you have installed (ollama list):
[llm] backend = "auto" # ollama, lmstudio, openai, anthropic model_general = "qwen2.5-coder:7b" # Must match an installed model model_code = "qwen2.5-coder:7b" [extensions] extensions_dir = "~/.coding-factory/extensions" [routing] # Enable to use different models for different task complexities # All models must be installed: ollama pull <model> enabled = true model_cheap = "qwen2.5-coder:7b" # Simple tasks model_medium = "yi-coder:9b" # Medium complexity model_premium = "qwen2.5-coder:32b" # Complex tasks
Common error:
404 Not Foundmeans the model in config.toml is not installed. Runollama listto see available models.
Optional Configuration Files
These files are optional but provide additional customization when populated:
| File | Purpose |
|---|---|
context_libraries.cfg |
Allowlist of libraries to include in context analysis |
safety_patterns.toml |
Custom security patterns for code scanning |
tailwind_patterns.toml |
Tailwind CSS patterns for frontend generation |
Empty template files are included in the repo. Populate them as needed:
context_libraries.cfg - List libraries to always include in context:
# One library per line
requests
fastapi
sqlalchemy
safety_patterns.toml - Define security rules:
[patterns] # Add custom regex patterns to flag api_key_in_code = "api[_-]?key\\s*=\\s*['\"][^'\"]+['\"]"
tailwind_patterns.toml - Define Tailwind conventions:
[components] # Map component types to Tailwind classes button_primary = "bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded"
Marketplace: Build & Sell Extensions
The ACF Marketplace lets you create and sell extensions. Earn money by building agents, profiles, or RAG kits that solve real problems.
Browse the Marketplace | Full Developer Guide
Extension Types
| Type | Purpose | Price Range |
|---|---|---|
| Agents | Add pipeline stages (security scanning, code review, etc.) | Free - $49 |
| Profiles | Framework templates (Vue, Go, Flutter, etc.) | Free - $15 |
| RAG Kits | Custom code retrieval systems | Free - $39 |
| Skills | Standalone code transformations (error handling, tests, etc.) | Free - $49 |
Official Free Extensions
Get started with our free official extensions in official_extensions/:
| Extension | Hook Point | Description |
|---|---|---|
| decomposition | before:design | Break complex features into subtasks |
| api-contract | before:implementation | Define API boundaries and contracts |
| code-review | after:implementation | Senior engineer review with feedback |
Install them:
cp -r official_extensions/* ~/.coding-factory/extensions/agents/ acf extensions list
Quick Start: Create Your Own
- Create extension directory
mkdir my-agent && cd my-agent
- Create manifest.yaml
name: my-agent version: 1.0.0 type: agent author: Your Name description: What it does license: free hook_point: "after:implementation" agent_class: MyAgent
- Create agent.py
from dataclasses import dataclass, field from typing import Any @dataclass class AgentOutput: success: bool data: dict[str, Any] errors: list[str] | None = None artifacts: list[str] | None = None metadata: dict[str, Any] = field(default_factory=dict) agent_name: str | None = None class MyAgent: def __init__(self, llm: Any, **kwargs): self.llm = llm self.name = "my-agent" def run(self, input_data) -> AgentOutput: context = input_data.context # Your logic here return AgentOutput( success=True, data={"result": "done"}, agent_name=self.name )
- Install and test
cp -r my-agent ~/.coding-factory/extensions/agents/ acf run "Build an API" --auto-approve
See full guide with profile and RAG kit examples →
Submit to the Marketplace
Share your extensions with the community and earn from your work.
1. Create an account
Sign up at https://agentcodefactory.com/signup.html
2. Verify your email
Check your inbox and click the verification link. This unlocks API access and marketplace submissions.
Didn't receive it? Log in and go to Settings to resend.
3. Create an API key
Go to Settings → Platform API Keys and click "Create Key". Copy it immediately—it's only shown once.
export ACF_MARKETPLACE_API_KEY=acf_sk_xxxx...4. Build your extension
Create a directory with:
my-extension/
├── manifest.yaml # Required: name, version, type, description
├── agent.py # Your code
└── README.md # Documentation
5. Submit for review
acf marketplace submit ./my-extension --price 15.00
# Use --price 0 for free extensionsTrust Badges
Revenue
- You keep 82.35% of each sale
- 17.65% covers payment processing (Stripe/PayPal) and infrastructure
- Payments via PayPal or Stripe
Architecture
~/.coding-factory/
├── extensions/ # Installed extensions
│ ├── agents/
│ ├── profiles/
│ ├── rag/
│ └── skills/
└── memory/ # Learning from past runs
Links
License
MIT License - Free for personal and commercial use.