Show HN: AI-factory – a spec-driven pipeline that stops AI agents rotting code
0→1 with an AI coding agent is easy. 1→100 is where it gets hard — the code that survives review, scales past the demo, and doesn't quietly rot the codebase over months. That's where ai-factory comes in.
A complete spec-driven development practice for AI coding agents — skills, agents, deterministic hooks, and a role-based capability model — installed once and parameterized to your org through config, not forks.
git clone https://github.com/highflame-ai/ai-factory.git cd ai-factory && ./install.sh install.sh is idempotent and repair-capable. It symlinks:
It also writes the aif CLI shim to ~/bin ( doctor , check , agents render , compile , renumber ), scaffolds ~/.claude/aif/config.yml (delegation off by default), and finishes with aif doctor — a full environment health check that prints a copy-pasteable fix for every failure. ./install.sh --dry-run previews; --repair re-stamps after moving the clone.
The journey: install → fill in workspace-CLAUDE.md and the machine config ( ~/.claude/aif/config.yml ) → run claude → /init in each code repo to bootstrap its .aif/ structure → then fill that repo's .aif/config.yml (optionally starting from a skills/presets/ starter). Along the way, an adopting org customizes five things (details in examples/README.md ):
AIF pipeline (spec-driven lifecycle) Skill Description /init Bootstrap .aif/ structure in a repo /onboard Adopt the toolkit in an existing codebase — drafts the service map, starter experts, conventions, and config for review /measure Measure whether the toolkit is paying off — delivery/quality metrics from git, PRs, and .aif/ artifacts, with honest caveats /spec Write requirement specs from feature requests /architect Design architecture and break requirements into tasks /validate Validate any AIF phase output before advancing /proceed End-to-end pipeline: validate → architect → implement → reflect → review → PR → wrapup /sprint Parallel pipeline orchestrator — multiple /proceed runs across REQs ( --workflow engine) /reflect Post-implementation self-review before formal review /review Multi-agent code review (correctness, quality, architecture, tests, security) /adversary Adversarial review of any artifact — assumes it is wrong and tries to prove it /canary Canary deployment with smoke tests /wrapup Close out a feature — commit, merge, deploy, update artifacts /bugfix Streamlined bug fix workflow /status / /manifest Local / remote-derived view of in-flight AIF work /analyze Codebase health audit /optimize API cost & performance scanner /template-drift Detect drift between a project's .aif/templates/ and the toolkit's Core workflow:
/spec → /validate → /architect → /validate → implement → /reflect → /review → merge → /wrapup Org workflow Skill Description /using-aif Meta-skill routing table — injected at SessionStart /from-issue Issue → merge-ready PR orchestrator (classify, route, implement, ship, babysit CI) /feature-prep Does the spec registry need an entry first? Where do tests go? /grill-feature Adversarial design review before architectural work /ship Pre-merge orchestrator — parallel reviewer fan-out → go/no-go → post-deploy verify /triage-dev Investigate your shared dev environment in a configured observability order /source-driven Read the authoritative source (config, code, MCP) instead of guessing /incremental-implementation Thin vertical slices, one repo at a time /debug Local repro and root-cause; Phase 1 = fast deterministic feedback loop /deprecate Multi-stage removal across your configured repos /git-workflow Commit prefixes (configurable regex), atomic commits, branching, worktrees, PR flow /handoff Compact a multi-repo session into a handoff doc /release-notes Multi-audience release-notes draft (customer, engineering, executive) from a git tag or range /dep-update Vetted dependency updates — changelog risk review, isolated branch, test-proven, one PR per batch /license-audit SBOM + license compliance — resolve every component's license, judge against org.license_policy /rotate-secrets Proactive secret rotation — expiry gate over the secrets: inventory, overlap-pattern rotation, human gate before revoke /audit-permissions Review and prune risky standing Claude permission grants in .claude/settings*.json (pairs with aif doctor 's permissions-audit ) /doc-drift Find and fix docs made stale by a change — diff-derived surfaces, stale vs missing classification /threat-model STRIDE threat model from a spec/RFC — assets, trust boundaries, refuted threats, mitigation punch list /expert Curate a domain expert — path-scoped context distilled from your docs, injected only when a change touches its domain /add-detector Template: scaffold a module in an extensible service, following your documented pattern /new-admin-module Template: scaffold a CRUD module (schema → migration → repository → service → handler → registration) Agents 26 subagents in agents/ , each with tier-based model selection rendered by aif agents render (config: ~/.claude/aif/config.yml ).
Hacker News
news.ycombinator.com