wishforge-ide/README.md
eust-w da1cfcea13 🔥 Remove the cloud IDE
The cluster never ran Theia or the IDE gateway, so every workspace stayed
"未配置" forever. The feature is gone instead of half-present:

- API: workspace, launch and lifecycle endpoints, the gateway identity and
  its internal routes, the dispatcher's workspace provisioning and the
  lifecycle worker. Migration 003 deletes stored workspaces and settles
  their pending outbox items.
- Provisioner: workspace provisioning and lifecycle for both backends.
- Web: the 云 IDE panel, the launch route, the start-branch picker that
  listed IDE branches, and the workspace count on usage.
- apps/ide, infra/oct, dev:ide and the CI job; IDE parts of local k3s,
  network policies, RBAC, docs and the architecture diagram.

A wish can still start from a pushed branch through the API (sourceBranch).
Plan files and stored entitlements may still carry maxWorkspaces; it is
accepted and ignored.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-04 12:43:02 +08:00

95 lines
5.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# WishForge
远程、意图驱动的软件交付平台:用一句话提出愿望(目标 + 验收标准),后端编码 Agent 在隔离环境中实现,独立验证器按受保护的命令判定,失败时把失败信息交还 Agent 自修复,通过后合入代码并按需构建、审批与部署。可以从 Web 工作台或 WorkBuddy/Codex(MCP)发起与跟进。
- 使用手册(使用者与本机服务维护者):[docs/user-manual.md](docs/user-manual.md)
- 综合指引(使用、架构与高频 QA):[docs/wishforge-summary.md](docs/wishforge-summary.md)
- 需求与范围:[docs/requirements.md](docs/requirements.md)
- 架构设计:[docs/architecture.md](docs/architecture.md)
- 本地开发:[docs/development.md](docs/development.md)
- 生产运维:[docs/operations.md](docs/operations.md)
- 专题参考:[docs/reference/](docs/reference/)
- 本机 Claude → Gitea POC:[运行说明](docs/local-poc-operations.md) · [真实交付验收](docs/reference/local-poc-acceptance-2026-10-22.md)
## 核心架构与模型哲学
WishForge 不做脆弱的提示词包装,而专注于大模型落地于严肃工程时的物理世界边界与确定性保障。系统设计贯穿六大核心思想:
1. **理解模型的能力边界,比知道哪个模型排名第一更重要**
模型能力必须按任务切片来看:前端、后端、问答、知识整理;再往下,还有规划、执行、调试、验收。同一个模型在不同环节的可靠性可能完全不同。真正会用 AI 的系统,应该知道在流水线的哪一步停止相信一个模型,以及下一步由谁接盘。
2. **Superagent 最大的竞争对手,是下一代基础模型**
复杂的任务拆解、反思循环、多角色协作,如果主要是在弥补当前模型的认知不足,就存在被模型升级直接吸收的风险。不要把模型暂时的缺陷当成系统的永久护城河,避免构建脆弱的虚假抽象。
3. **会做规划,不代表会执行;会执行,不代表会验收**
规划需要抓住关键约束,执行需要持续准确地完成细节,验收需要发现错误、寻找反例。为什么习惯让同一个模型包办全部工作?“方案写得好”与“能把事情做好”之间隔着深渊,全流程同质化是失控的根源。
4. **多一个验收 Agent,不等于多一份独立判断**
如果执行者和验收者共享同样的盲点,多角色协作可能只是重复确认错误。三个 Agent 一致同意,有时只是同一个错误获得了三票。验收必须依靠隔离沙箱中的编译检查、真实测试、构建产物与外部运行证据,绝不能停留在另一个模型口头说“没问题”。
5. **Agent 架构的进步,应该包括删掉多少东西**
每次升级模型,都值得重新检查:任务拆解还需要这么细吗?反思循环还有收益吗?这些中间角色能不能去掉?优秀的 Agent 架构,应该允许模型变强之后,系统反而变简单。把“删除某个模块后,效果是否下降”作为架构演化的评估标准。
6. **模型会吞噬哪些工程,哪些工程还有独立价值?**
工程分为两类:一类**补偿模型的认知不足**,容易随基础模型升级而被直接吞噬;另一类**处理现实世界的物理约束**——例如租户权限隔离、数据接入、分布式事务一致性、不可篡改审计、物理回滚与业务验收探针。后者的需求永远不会仅因模型更聪明就自动解决,是系统的核心资产。
## 快速开始
需要 Node.js 22+、npm、Git 与 Docker Compose。
```bash
npm ci
```
```bash
npm run setup:local
```
```bash
docker compose -f infra/compose.yaml up -d
```
```bash
npm run db:migrate
```
```bash
npm run db:seed
```
```bash
npm run dev:all
```
打开 http://localhost:3000,创建项目、配置验证命令、连接 Codex 凭据后即可提交第一个愿望。完整步骤见 [docs/development.md](docs/development.md)。
> 本地开发使用 `host` 执行模式:Agent 生成的代码与项目测试直接在本机运行,没有隔离。只在可信的项目上使用。
## 仓库结构
| 目录 | 内容 |
|---|---|
| `apps/api` | 控制面 API(REST `/v1`、内部接口 `/internal`、MCP `/mcp`、模型代理) |
| `apps/web` | Web 工作台(Next.js,含 OIDC BFF) |
| `apps/worker` | Temporal worker:coordinator / executor / verifier / deployer |
| `apps/provisioner` | 执行环境的创建(`local` 与 `kubernetes` 后端) |
| `apps/git-service` | 平台 Git 服务 |
| `apps/runner` | 目标环境侧的部署 Runner |
| `packages/contracts` | 领域类型、输入校验、规范化 JSON |
| `packages/agent` | Agent 配置与提示词组装 |
| `packages/runtime` | 执行器适配、Git、验证、构建与部署适配 |
| `packages/github`、`packages/artifacts` | GitHub App 客户端、对象存储 |
| `connectors` | Codex 与 WorkBuddy 的 MCP 接入配置 |
| `infra` | 本地 Compose、Keycloak、Kubernetes 基线与镜像构建 |
## 检查
```bash
npm run format:check
```
```bash
npm run typecheck
```
```bash
npm test
```
需要外部服务的集成测试默认跳过,开启方式见 [docs/development.md](docs/development.md#6-测试与检查)。