# Autofactory: An AI-Driven Code Automation Factory Based on Temporal

> Autofactory is a fully automated code workflow system inspired by the AI dark factory model It uses Temporal for persistent workflow orchestration, supports multiple AI backends such as OpenCode, Codex, and Claude, and enables end-to-end DevOps automation from Issue classification to PR auto-merge.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-05-08T16:45:02.000Z
- 最近活动: 2026-05-08T16:54:14.776Z
- 热度: 143.8
- 关键词: AI自动化, Temporal, DevOps, 代码生成, GitHub自动化, CI/CD, OpenCode, Codex, Claude
- 页面链接: https://www.zingnex.cn/en/forum/thread/autofactory-temporalai
- Canonical: https://www.zingnex.cn/forum/thread/autofactory-temporalai
- Markdown 来源: floors_fallback

---

## Autofactory: AI-Driven Code Automation Factory Based on Temporal (Introduction)

Autofactory is a fully automated code workflow system inspired by the AI dark factory model. It uses Temporal for persistent workflow orchestration, supports multiple AI backends (OpenCode, Codex, Claude), and enables end-to-end DevOps automation from Issue classification to PR auto-merge. It also supports GitHub/GitLab platforms and provides REST API integration.

## Project Background & Core Concept

The core vision of Autofactory is to introduce the "dark factory" (fully automated production without human intervention) concept into code development, aiming for end-to-end automation from Issue classification to PR verification and merge. Its tech stack prioritizes reliability and scalability: Temporal as workflow orchestration engine (ensures fault recovery), and multiple AI backends (OpenCode, Codex, Claude) for flexible choice based on needs and cost.

## Architecture Design & Core Workflows

**Architecture**: Autofactory uses a master-subagent pattern (Orchestrator for task decomposition/coordination; Subagents for specific tasks) following "Spec→Plan→Implementation↔Reviews" workflow. Temporal ensures workflow state recovery, long-task progress retention, concurrent resource sharing, and horizontal scaling. It supports pluggable AI backends with respective CLI installations:
- OpenCode: `npm install -g opencode-ai`
- Codex: `npm install -g @openai/codex`
- Claude Code: `npm install -g @anthropic-ai/claude-code`

**Core Workflows**: 
1. @factory triggered PR creation (semi-automated: user mentions @factory→analyze Issue→AI plan→code implementation→create PR→wait human review). 
2. Fully automatic pipeline (no human intervention: auto Issue classification→AI plan→implement→create PR→run tests→auto fix→merge if passed).

## Multi-platform Support & Deployment Details

**Multi-platform**: Supports GitHub and GitLab. Configuration:
| Platform | Host Config | Auth Method |
|----------|-------------|-------------|
| GitHub | Configurable via factory.github.host | GITHUB_TOKEN (env var) |
| GitLab | Configurable via factory.gitlab.host | GITLAB_TOKEN (env var) |
Both support full pipeline.

**Deployment**: System requirements: Node.js≥20, pnpm≥9, Docker, AI CLI tools. One-click install via `install.sh` (generates .env). Startup steps: edit .env→run `start.sh`→trigger workflow with `pnpm autofactory run --repo ...`. State is persisted in `~/.autofactory/` (logs, workspaces, cost tracking).

## Practical Applications & Cost Considerations

**Applications**: 
1. Open source project maintenance (auto classify Issues, generate PRs for simple tasks). 
2. Internal tool development (handle small features/bugs).
3. Document updates (auto fix outdated docs).
4. Dependency updates (auto create PRs, test, merge). 

**Cost**: AI backend calls incur fees; cost tracking is built-in (records LLM token usage in `~/.autofactory/costs/`). Users can set workflow triggers based on budget (e.g., only specific Issue tags).

## Summary & Future Outlook

Autofactory explores the frontier of AI-driven software development automation. It combines Temporal's reliability, multi-AI flexibility, and well-designed orchestration to demonstrate the feasibility of "AI dark factory" in code development. Currently in active development, it's suitable for teams exploring AI automation potential. As AI improves and costs decrease, such tools may become standard, freeing developers from repetitive work to focus on creative tasks like architecture design and problem-solving.
