Skip to main content

Extended Python asyncio port of the OpenAI Symphony spec

Project description

Code Factory

🏭 Orchestrate coding agents via Kanban — high autonomy, isolated per-issue workspaces, single-file repo-owned workflow contract

Quick Start · CLI · Workflow · Specification

Code Factory operator dashboard showing live issue execution, throughput, token usage, and operator links

Code Factory is a Python asyncio implementation and extension of the OpenAI Symphony spec. It polls tracker work, creates isolated per-issue workspaces, runs coding-agent sessions inside them, and keeps the workflow contract versioned in WORKFLOW.md.

Use it when you want repeatable issue execution, repo-owned workflow policy, and enough observability to operate concurrent agent runs without building a custom harness around your coding agent.

Typical Workflow

Typical Code Factory workflow showing tracker intake, per-issue workspace creation, coding-agent execution, operator review, and issue state progression

What You Need

  • Python 3.12
  • uv
  • A valid WORKFLOW.md
  • Access to the tracker configured in WORKFLOW.md
  • A working coding-agent command available to codex.command

Installation

Install cf from PyPI as a uv tool:

uv tool install code-factory-agent

Then run it directly:

cf --help
cf serve --no-guardrails

If you prefer not to install the tool, you can still run it from the repo with uv run cf ....

Quick Start

1. Install from PyPI

uv tool install code-factory-agent

2. Create a starter workflow in a new project

cf init

cf init walks you through the starter values, renders a project-specific WORKFLOW.md, and copies this repo's bundled skills into ./.agents/skills. Re-run with --force if you want to overwrite an existing workflow or skills bundle.

Most projects should make a few repo-specific edits before first real use. The starter workflow is intentionally generic; adapt the bootstrap, verification, and review setup to your stack.

Example additions to copy into WORKFLOW.md and tailor:

hooks:
  after_create: |
    git clone --depth 1 git@github.com:your-org/your-repo.git .
    uv sync

states:
  "In Progress":
    hooks:
      before_complete: |
        make verify
  "Rework":
    hooks:
      before_complete: |
        make verify

review:
  prepare: |
    uv sync
  servers:
    - name: app
      base_port: 8000
      command: |
        uv run python -m uvicorn your_project.app:app --host 127.0.0.1 --port {{ review.port }}
      url: http://127.0.0.1:{{ review.port }}

Use these as patterns, not defaults:

  • hooks.after_create: install dependencies, build generated assets, or run any one-time workspace bootstrap your repo needs.
  • states.<state>.hooks.before_complete: run the quality gate your team expects before handoff, for example make verify, uv run pytest -q, or a lint/test script.
  • review.prepare and review.servers: make cf review immediately useful by starting the exact app or dev server a reviewer should inspect.

3. Start the service

cf serve --no-guardrails

If you omit the workflow path, the CLI defaults to ./WORKFLOW.md.

4. Create issues and move to Todo

  • Create new issues in Linear Backlog
  • Move ready-for-dev issues to Todo

5. Steer agents during execution (optional)

Run:

cf steer ENG-123 "also add integration tests please"

This appends operator guidance to an in-flight issue turn.

6. Review PRs

Run:

cf review ENG-123

This will:

  • Launch a review worktree and any configured review servers.
  • Open the browser automatically, if configured.
  • Let you quickly submit PR comments with any problems you find.

7. Move issues to Merging, Todo, or Rework

Move reviewed issues to:

  • Merging, if review was successful
  • Todo, if you left review comments in the PR
  • Rework, if you left review comments and want a full, clean re-attempt at the issue

CLI Overview

The main operator commands are:

  • cf init to bootstrap a repo-local workflow and bundled skills
  • cf serve to run the long-lived automation service
  • cf review to launch a review worktree and any configured review servers
  • cf steer to append operator guidance to an in-flight issue turn
  • cf issue, cf comment, cf workpad, and cf tracker for tracker-facing operator actions

See docs/cli.md for the general CLI reference and docs/ticket-cli.md for ticket-oriented commands.

Ticket Surfaces

Agent sessions use flat tracker_issue_*, tracker_comment_*, tracker_pr_link, and tracker_file_upload tools for ticket work. The orchestrator manages workpad.md synchronization to a ticket comment automatically during the run.

Operators can use the CLI for the same ticket surface area:

cf issue get ISSUE
cf issue list [--project PROJECT] [--team TEAM] [--state STATE]
cf issue create --team TEAM --title TITLE
cf issue update ISSUE
cf issue move ISSUE --state STATE
cf issue link-pr ISSUE --url URL
cf comment list ISSUE
cf comment create ISSUE
cf comment update COMMENT
cf workpad get ISSUE
cf workpad sync ISSUE

Workflow

WORKFLOW.md is the main operator surface for Code Factory. It keeps tracker configuration, active states, prompt sections, completion gates, review setup, workspace hooks, and observability settings in the repo so teams can version and hot-reload automation policy alongside application code.

See the workflow docs for the current contract:

Observability

Code Factory exposes a local observability API and, when stderr is attached to a TTY, a live terminal dashboard for operators. See docs/observability.md for endpoints, dashboard behavior, and steering/discovery details.

Runtime Notes

  • Startup validates the workflow and required dispatch settings before the scheduler loop begins.
  • WORKFLOW.md is hot-reloaded automatically; valid changes affect future dispatches without restarting the service.
  • Only issues in active workflow states are dispatched.

Development

For local development from a checkout:

git clone git@github.com:Benjoyo/code-factory.git
cd code-factory
make setup

Run the CLI directly from the repo with uv run:

uv run cf --help
uv run cf serve --no-guardrails

If you want the checkout on your PATH during development, install the local editable tool:

uv tool install --editable .

Run the full verification suite:

make verify

Create and publish a release in one command:

make release-patch
make release-minor
make release-major

Each release target runs make verify, bumps project.version, creates a matching annotated v... tag, and pushes the current branch plus tag to origin. Override the remote with make release-patch REMOTE=<remote> if needed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

code_factory_agent-0.2.0.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

code_factory_agent-0.2.0-py3-none-any.whl (234.3 kB view details)

Uploaded Python 3

File details

Details for the file code_factory_agent-0.2.0.tar.gz.

File metadata

  • Download URL: code_factory_agent-0.2.0.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for code_factory_agent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 15ab512b091f67ca0c09097ace0c6a7805bd2ad750322c1a971fec7d2113917d
MD5 f781116387b7781f61f649504da2fa5b
BLAKE2b-256 8b0e8a3a23df05cfb3f614d2e5e0321513f9dc5ee9ca502d7d18e0666af01849

See more details on using hashes here.

Provenance

The following attestation bundles were made for code_factory_agent-0.2.0.tar.gz:

Publisher: publish.yml on Benjoyo/code-factory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file code_factory_agent-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for code_factory_agent-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ead7f8737318b6345652ba5fe7a224bdb63401c21c58f3211e461d062761acd1
MD5 d7571be9fb00058f0b2a76b8b997acaf
BLAKE2b-256 b96bd870ef2510daf5a6b0f28ba7547a529830c8e0c509c9d4144be58707a8ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for code_factory_agent-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Benjoyo/code-factory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page