How lee-to/ai-factory works
AI Factory is a CLI for configuring AI coding agents with skills, integrations, and agent-specific files. The main setup flow begins with init, gathers agent and skill choices, then installs and transforms assets, writes project configuration, and configures MCP servers. Update and upgrade maintain existing installations; extension commands manage add-on assets. The README also describes a broad bundled skill workflow. Source excerpts support many setup and extension relationships, but not the internal execution of individual skills.
Main entry points: init.ts Initialize project · installer.ts Asset installer · index.ts CLI router · upgrade.ts Upgrade installation
Components 22
CLI and Setup
- CLI router
src/cli/index.ts - Setup prompts
src/cli/wizard/prompts.ts - Initialize project
src/cli/commands/init.ts - Update installation
src/cli/commands/update.ts - Upgrade installation
src/cli/commands/upgrade.ts - Audit artifacts
src/cli/commands/audit-artifacts.ts - Extension commands
src/cli/commands/extension.ts
Agent Runtime
- Project configuration
src/core/config.ts - Agent registry
src/core/agents.ts - Agent transformers
src/core/transformer.ts - Antigravity adapter
src/core/transformers/antigravity.ts
Skills and Migration
- Asset installer
src/core/installer.ts - Skill target resolver
src/core/skill-targets.ts - Skill migration
src/core/skills-migration.ts - Bundled skills
skills
Extensions and Integrations
- Extension resolver
src/core/extensions.ts - Extension operations
src/core/extension-ops.ts - Skill injections
src/core/injections.ts - MCP configuration
src/core/mcp.ts
Other components
- Project developer
- MCP servers
- Project files
Connections 35
- Project developer → CLI router: runs commands
README.md - CLI router → Initialize project: routes init
src/cli/index.ts - CLI router → Update installation: routes update
src/cli/index.ts - CLI router → Upgrade installation: routes upgrade
src/cli/index.ts - CLI router → Audit artifacts: routes audit
src/cli/index.ts - CLI router → Extension commands: routes extensions
src/cli/index.ts - Initialize project → Setup prompts: prompts choices
src/cli/commands/init.ts - Initialize project → Asset installer: installs assets
src/cli/commands/init.ts - Initialize project → Project configuration: loads and saves
src/cli/commands/init.ts - Initialize project → MCP configuration: configures servers
src/cli/commands/init.ts - Initialize project → Agent registry: resolves agents
src/cli/commands/init.ts - Initialize project → Agent transformers: transforms assets
src/cli/commands/init.ts - Update installation → Project configuration: loads settings
src/cli/commands/update.ts - Update installation → Asset installer: updates assets
src/cli/commands/update.ts - Upgrade installation → Skill migration: recovers migration
src/cli/commands/upgrade.ts - Upgrade installation → Asset installer: renders assets
src/cli/commands/upgrade.ts - Upgrade installation → Project configuration: loads settings
src/cli/commands/upgrade.ts - Upgrade installation → Antigravity adapter: checks workflows
src/cli/commands/upgrade.ts - Asset installer → Skill target resolver: renders for targets
src/core/installer.ts - Asset installer → Agent transformers: transforms content
src/core/installer.ts - Asset installer → Bundled skills: installs skills
README.md - Project configuration → Agent registry: resolves agent config
src/core/config.ts - Project configuration → Extension resolver: loads extensions
src/core/config.ts - Agent registry → Extension resolver: hydrates runtimes
src/core/agents.ts - Agent transformers → Antigravity adapter: selects adapter
src/core/transformer.ts - Extension commands → Extension operations: manages assets
src/cli/commands/extension.ts - Extension commands → Extension resolver: loads manifests
src/cli/commands/extension.ts - Extension operations → Skill target resolver: resolves destinations
src/core/extension-ops.ts - Extension operations → Skill injections: applies injections
src/core/extension-ops.ts - Extension operations → MCP configuration: removes server entries
src/core/extension-ops.ts - Extension resolver → Project files: reads extension data
- MCP configuration → Project files: writes settings
src/core/mcp.ts - MCP configuration → MCP servers: configures servers
README.md - Skill migration → Asset installer: renders skill state
src/core/skills-migration.ts - Initialize project → Skill migration: prepares skill targets
src/cli/commands/init.ts