pi 扩展包 · MIT 开源 · v0.1.0pi extension · MIT · v0.1.0

一个人,
撑起一家有规矩的 AI 公司。
One human.
A governed autonomous company.

你在对话里说需求、点头确认。后台的 PM 拆任务、派代理写代码、审查、验收,最后把结果交回你手上。每一步能不能往下走,由你和程序决定,不由模型自己说了算。Describe what you want in chat and sign off. A background PM plans the work and sends agents to build, review and verify it, then hands the result back. You and the program decide what moves forward, not a model’s own claims.

$pi install git:github.com/0xBB2B/one-company
在 GitHub 上查看View on GitHub

OneCompany 是 pi 的扩展包。pi 是一个在终端里运行的编码代理。OneCompany is an extension for pi, a coding agent that runs in your terminal.

pi · status panel
● 2 个需求运行中
├─ ⠹ 角色跳跃、跳跃动画 · 任务 1/5 · ↻5 · 5 tool uses · 33.8k token · 12.3s
│    ├ ⚑ login 待裁决:2 次未完成
│    ├ jump 第 1 轮审查
│    │ ├ ⠹ reviewer · ↻5/12 · 1m2s
│    │ ├ ⠹ go-reviewer · ↻3/12 · 58.0s
│    │ └ ✓ vue-reviewer 通过 · ↻6/12 · 1m40s
│    └ ⠹ anim 执行 · vue-worker(第 1 次尝试)· ↻8/20 · 3m2s
└─ ⠹ 角色快跑 · 任务 0/3 · ↻42 · 38 tool uses · 91.0k token · 2m17s
     └ 规划中(计划 v2 · 3 个任务)

状态面板示例。产品界面目前是中文。Sample status panel. The product UI is Chinese-only today.

一个需求怎么走完How a requirement gets done

标出来的三步只有你能做。其余由代理完成,程序逐步核对。The three marked steps are yours alone. Agents do the rest, and the program checks each one.

  1. 01 · 主代理Main agent理清需求Clarify和你理清目标、不做什么、约束;涉及界面时先出 HTML 原型。Pins down goals, non-goals and constraints. UI work gets an HTML prototype first.
  2. 02 · 你You批准Approve在程序弹出的窗口里选"确认"才生效。Takes effect only when you confirm in the program’s window.
  3. 03 · PM规划Plan读批准的需求,写计划、拆任务、派工。Reads the approved requirement, writes the plan, assigns tasks.
  4. 04 · worker实现Build在需求自己的分支里,按技术栈写代码。Writes code by stack, on the requirement’s own branch.
  5. 05 · reviewer审查Review通用审查和专项审查同时跑,全部通过才算过。General and stack reviewers run together. All must pass.
  6. 06 · QA · 你QA · You验收VerifyQA 黑盒验收后交给你,你通过需求才关闭。QA tests the behavior, then you accept it to close the requirement.
  7. 07 · 你You交付Deliver选合并方式,开 PR 或合进本地分支。Pick a merge method, then open a PR or merge locally.

模型说的不算,程序核对的才算A model saying so isn’t enough. The program checks.

代理写代码很快,也很会说"做完了"。OneCompany 把关键判断交给程序和你。Agents write code fast, and they are quick to say “done”. OneCompany leaves the key calls to the program and to you.

只有你能批准Only you can approve

批准和裁决只认你的原话和你在程序窗口里的选择。代理说"用户同意了"不算数,代理之间也不能互相批准。Approvals count only from your own words or your choice in a program window. An agent saying “the user agreed” does not count, and agents can’t approve each other.

自称完成不算完成Claiming done isn’t done

各角色的权限、版本和阶段门槛都由程序核对。代理说"通过了"不能代替实际检查。The program checks every role’s permissions, versions and stage gates. An agent saying “passed” never replaces the actual check.

改动不出范围Changes stay in scope

worker 改了本需求任务范围外的文件,结果被拒收。写入范围重叠的任务不会同时派出。A worker that edits files outside the requirement’s task scopes gets its result rejected. Tasks with overlapping write scopes are never dispatched at the same time.

每处改动查得回需求Every change traces back

提交带需求编号,需求完成时正文和原型归档进分支。以后能从代码查到当初为什么这样做。Commits carry the requirement ID, and the requirement and prototypes are archived in the branch when it completes. You can always find why the code looks the way it does.

一支随包附带的团队A team that ships with the package

你只和主代理说话,其他角色都在后台运行。不用另装子代理系统。You talk only to the main agent. Every other role runs in the background, with no separate subagent system to install.

主代理Main agent
和你理清需求,弹窗问你拿主意Clarifies the requirement and asks for your decisions
PM
一个需求一个 PM,写计划、拆任务、派工One per requirement: plans, splits tasks, assigns work
worker
写代码,按技术栈有专项 workerWrites code, with specialists for each stack
reviewer
代码审查,每个任务必审Reviews the code of every task
QA
验收实际行为是否符合批准的目标Verifies behavior against the approved goal
explore
只读查资料,不改代码Read-only research, never edits code
prototype
需求涉及界面时出 HTML 原型Draws HTML prototypes for UI work

内置六个技术栈Six stacks built in

  • Go
  • Node.js / TypeScript
  • Python
  • Java / Spring
  • Vue
  • React

也能换成你们的规矩Bring your own rules

角色定义是普通 md 文件,复制后可以自己改。/one:examples 把 Go、Vue 设计规范样例复制到项目里,照着改成团队自己的规范。Role definitions are plain md files you can copy and edit. /one:examples copies Go and Vue design guides into your project to adapt.

现在的状态Where it stands today

项目还在早期,这几件事先说清楚。This is an early project. Better to say these up front.

完整的已知限制 →Full list of known limits →
  • 版本 0.1.0,还没有正式发布Version 0.1.0, no stable release yet
  • 产品界面和规则目前是中文Product UI and rules are in Chinese
  • 只在 macOS 上测过Tested on macOS only
  • 真实模型验收只用 gpt-6.1-sol 跑过Live-model acceptance has only run on gpt-6.1-sol

三步开始Start in three steps

  1. 1准备Prepare

    装好 pi(Node ≥ 22.19)和 Git ≥ 2.38,给主窗口的模型配好凭据。Install pi (Node ≥ 22.19) and Git ≥ 2.38, and set up credentials for your model.

  2. 2安装Install

    在终端运行上面那条安装命令。角色代理随包提供。Run the install command above. Role agents ship with the package.

  3. 3开工Build

    在 Git 仓库里打开 pi,直接说需求,比如"登录页加上验证码登录"。Open pi inside a Git repo and say what you want, like “add code login to the sign-in page”.

$pi install git:github.com/0xBB2B/one-company