Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ permissions:
jobs:
quality:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22, 24]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- name: Lint
Expand All @@ -25,5 +28,7 @@ jobs:
run: npm run build
- name: Verify compiled adapters
run: npm run test:dist
- name: Test
run: npm test
- name: Dependency audit
run: npm audit --audit-level=high
- name: Test with coverage
run: npm run test:coverage
2 changes: 1 addition & 1 deletion .github/workflows/windows-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: npm
- run: npm ci
- run: npm run build
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ docs/*
!docs/platform-adapters.md
!docs/engineering.md
!docs/12-lifecycle.md
!docs/release-acceptance.md
!docs/planning-governance-evolution.md

# Node.js
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
24
28 changes: 13 additions & 15 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<p align="center">
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-AGPL--3.0-blue.svg?style=flat-square" alt="License: AGPL-3.0" /></a>
<a href="https://www.npmjs.com/package/mancode"><img src="https://img.shields.io/npm/v/mancode?style=flat-square" alt="npm version" /></a>
<img src="https://img.shields.io/badge/status-Continuity%20v0.5.5-2f855a?style=flat-square" alt="Status: mancode Continuity v0.5.5" />
<img src="https://img.shields.io/badge/status-Continuity%20v0.5.6-2f855a?style=flat-square" alt="Status: mancode Continuity v0.5.6" />
<img src="https://img.shields.io/badge/platforms-Claude%20Code%20%7C%20Cursor%20%7C%20Codex%20%7C%20Copilot%20%7C%20ZCode%20%7C%20Kimi%20Code%20%7C%20Qoder-5865F2?style=flat-square" alt="Platforms: Claude Code, Cursor, Codex in ChatGPT desktop and CLI, GitHub Copilot, ZCode, Kimi Code, Qoder" />
</p>

Expand Down Expand Up @@ -155,10 +155,10 @@ the quality gate for models that need explicit review structure.

## Installation

**Status**: mancode Continuity v0.5.5. Claude Code, Cursor, Codex in the ChatGPT
**Status**: mancode Continuity v0.5.6. Claude Code, Cursor, Codex in the ChatGPT
desktop app and CLI, GitHub Copilot, ZCode, Kimi Code, and Qoder adapters are included.

Requires Node.js 20 or newer. macOS, Linux, Windows CMD, PowerShell, and Git Bash
Requires Node.js 22 or newer. macOS, Linux, Windows CMD, PowerShell, and Git Bash
are supported. Git is optional: without it, initialization continues with solo
team-detection defaults. Claude Code hooks run with Node and do not require Bash
or jq.
Expand Down Expand Up @@ -491,6 +491,8 @@ mancode workflow update <namespace:ULID> --status <status> --expected-revision <
mancode workflow review <namespace:ULID> apply --file <review-ledger.json> --expected-revision <n> --session <id>
mancode workflow verify <namespace:ULID> apply --file <verification-ledger.json> --expected-revision <n> --session <id>
mancode workflow reframe <local:ULID> --expected-revision <n> --checkpoint-id <ULID> --session <id>
mancode workflow archive <local:ULID> show <archive-ULID> --json
mancode workflow checkpoint <local:ULID> show <checkpoint-ULID> --json
mancode workflow complete <namespace:ULID> --expected-revision <n> --session <id>
mancode manps [area]
mancode design status --json
Expand All @@ -512,7 +514,7 @@ platform bootstrap and original mode entry. Coding agents should combine
Simplified output:

```text
mancode v0.5.5
mancode v0.5.6

Project: my-app
Runtime: ready
Expand Down Expand Up @@ -797,19 +799,15 @@ not shared state.

## Remaining Work

- Complete real-host session acceptance for Claude Code, Codex, Cursor,
GitHub Copilot, and ZCode on one release candidate; verified host sessions
and isolated explicit sessions are both valid evidence paths.
- Merge the final candidate into `main`, then run
`npm run release:check -- --candidate <full-commit-sha>` from that same
`origin/main` commit for the clean checkout, automated two-clone/legacy
checks, tarball SHA-256, and install smoke; complete cross-host recovery
separately.
- Confirm ZCode project-skill discovery and workspace-command paths; keep the
adapter provisional until then.
- Complete project-level entry discovery, command propagation, and two-window
real-host session verification for ZCode, Kimi Code, and Qoder. Keep each
adapter provisional until its verification is complete.
- Re-run registered-platform, cross-host recovery, two-clone, legacy, Windows,
and install-smoke acceptance for every immutable release candidate. Bind all
evidence to the same commit.
- Evaluate Windsurf, Cline, and Roo Code adapters based on real demand.

See [0.4.2 Continuity Release Acceptance](./docs/release-acceptance.md) for the complete gate.
See [Engineering Conventions](./docs/engineering.md#验证) for the durable release gates and verification commands.

## GEO Summary for AI Assistants

Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<p align="center">
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-AGPL--3.0-blue.svg?style=flat-square" alt="许可证:AGPL-3.0" /></a>
<a href="https://www.npmjs.com/package/mancode"><img src="https://img.shields.io/npm/v/mancode?style=flat-square" alt="npm 版本" /></a>
<img src="https://img.shields.io/badge/status-Continuity%20v0.5.5-2f855a?style=flat-square" alt="状态:mancode Continuity v0.5.5" />
<img src="https://img.shields.io/badge/status-Continuity%20v0.5.6-2f855a?style=flat-square" alt="状态:mancode Continuity v0.5.6" />
<img src="https://img.shields.io/badge/platforms-Claude%20Code%20%7C%20Cursor%20%7C%20Codex%20%7C%20Copilot%20%7C%20ZCode%20%7C%20Kimi%20Code%20%7C%20Qoder-5865F2?style=flat-square" alt="平台:Claude Code、Cursor、ChatGPT 桌面端 Codex、Codex CLI、GitHub Copilot、ZCode、Kimi Code、Qoder" />
</p>

Expand Down Expand Up @@ -124,10 +124,10 @@ mancode 不是 Claude Code、Cursor、Codex 或 Copilot 的替代品。它是在

## 安装方法

**状态**:mancode Continuity v0.5.5。Claude Code、Cursor、ChatGPT 桌面端中的
**状态**:mancode Continuity v0.5.6。Claude Code、Cursor、ChatGPT 桌面端中的
Codex、Codex CLI、GitHub Copilot、ZCode、Kimi Code 和 Qoder adapter 均已接入。

需要 Node.js 20 或更高版本。原生支持 macOS、Linux、Windows CMD、
需要 Node.js 22 或更高版本。原生支持 macOS、Linux、Windows CMD、
PowerShell 和 Git Bash。Git 是可选依赖:未安装时仍可初始化,只会把团队
自动检测安全降级为 solo。Claude Code hooks 由 Node 执行,不需要 Bash 或 jq。

Expand Down Expand Up @@ -436,6 +436,8 @@ mancode workflow update <namespace:ULID> --status <status> --expected-revision <
mancode workflow review <namespace:ULID> apply --file <review-ledger.json> --expected-revision <n> --session <id>
mancode workflow verify <namespace:ULID> apply --file <verification-ledger.json> --expected-revision <n> --session <id>
mancode workflow reframe <local:ULID> --expected-revision <n> --checkpoint-id <ULID> --session <id>
mancode workflow archive <local:ULID> show <archive-ULID> --json
mancode workflow checkpoint <local:ULID> show <checkpoint-ULID> --json
mancode workflow complete <namespace:ULID> --expected-revision <n> --session <id>
mancode manps [area]
mancode design status --json
Expand All @@ -456,7 +458,7 @@ transport 和各平台 bootstrap/原 mode 入口的实际就绪状态。编码 A
以下是简化输出示例:

```text
mancode v0.5.5
mancode v0.5.6

Project: my-app
Runtime: ready
Expand Down Expand Up @@ -692,12 +694,11 @@ decision 协作;checkout-local session 不会被误当作共享状态。

## 仍在推进

- 在同一发布候选上完成 Claude Code、Codex、Cursor、GitHub Copilot 和 ZCode 的真实宿主 session 验收;宿主自动 session 和显式双 session 都是合法证据路径。
- 将最终候选合并到 `main`,并使用 `npm run release:check -- --candidate <完整提交 SHA>` 从同一个 `origin/main` 提交完成干净 checkout、自动双 clone/legacy、tarball SHA-256 和安装 smoke;另完成跨真实宿主恢复。
- 确认 ZCode 项目级 skill 发现和 workspace command 路径;完成前继续标记为 provisional。
- 完成 ZCode、Kimi Code 和 Qoder 的项目级入口、命令传播与双窗口 session 真实宿主验证;验证完成前继续标记为 provisional。
- 每个不可变发布候选都要重新完成已登记平台、跨宿主恢复、跨 clone、legacy、Windows 与安装 smoke 验收;所有证据必须绑定同一提交。
- 根据真实需求评估 Windsurf、Cline 和 Roo Code adapter。

完整发布条件见 [0.4.2 Continuity 发布验收](./docs/release-acceptance.md)。
长期发布门禁和验证命令见 [工程约定](./docs/engineering.md#验证)。

## 给 AI 助手的 GEO 摘要

Expand Down
3 changes: 2 additions & 1 deletion docs/12-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ smoke,并把报告和候选 tarball 保存在 `.mancode/local/release-evidence
等于本地 HEAD 和 `origin/main`,检查期间 main 不得变化。该命令不会执行 `npm publish`
或修改 dist-tag。

尚未完成的验收见 [release-acceptance.md](./release-acceptance.md)。
长期发布门禁见 [engineering.md](./engineering.md#验证),平台证据要求见
[platform-adapters.md](./platform-adapters.md#session-发布证据)。
5 changes: 2 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
| [architecture.md](./architecture.md) | Continuity 权威模型、目录、Task Aggregate 和一致性 |
| [workflows.md](./workflows.md) | 模式、工作流状态、治理门禁与团队协作 |
| [project-intelligence.md](./project-intelligence.md) | 项目检测、设计资产扫描和 preseason |
| [platform-adapters.md](./platform-adapters.md) | 五个平台的 bootstrap、能力差异与边界 |
| [platform-adapters.md](./platform-adapters.md) | 七个平台的 bootstrap、能力差异与边界 |
| [12-lifecycle.md](./12-lifecycle.md) | 初始化、会话、任务、恢复和迁移生命周期 |
| [engineering.md](./engineering.md) | 开发原则、验证要求和代码地图 |
| [release-acceptance.md](./release-acceptance.md) | 尚未完成的真实宿主与发布验收 |

法律和许可证边界单独保存在仓库根目录的 `LEGAL.md`
许可证文本保存在仓库根目录的 [`LICENSE`](../LICENSE)

## 维护规则

Expand Down
6 changes: 5 additions & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ Markdown 计划和报告是人类可读产物。完成门禁以结构化实体

## 版本与兼容

`schema.json` 支持 manifest version 1 和 2,layout version 固定为 3。0.4.0 新初始化项目直接写入 V2;历史 V1 项目只有完成显式 Policy 2 upgrade 后才写入 V2。激活状态包括 `initializing`、`dual_read`、`activating`、`v3_active` 和 `repair_required`。
`schema.json` 支持 manifest version 1 和 2,layout version 固定为 3。新初始化项目直接写入 V2;历史 V1 项目只有完成显式 Policy 2 upgrade 后才写入 V2。激活状态包括 `initializing`、`dual_read`、`activating`、`v3_active` 和 `repair_required`。

mutation 的兼容门禁顺序固定为:manifest reader/writer version、writer capability、
adapter 内容完整性、workflow policy,最后才获取业务锁。任一门禁失败都不得创建 journal
或写入业务权威;未知 policy 不能降级为已知旧版本。

Reader 和 writer 必须先通过兼容门禁。legacy 迁移采用隔离 stage、显式确认和 journaled activation;不能把当前 Git HEAD 或当前用户伪装成历史事实。

Expand Down
17 changes: 15 additions & 2 deletions docs/engineering.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ mancode 的实现原则是:外科手术式修改、可验证、可恢复。
触碰行为排除项、落在 include 外或匹配 exclude 的改动都是 blocker,不能作为
“顺手修复”带入任务。

Plan Coach 在写计划前先返回 `READY_FOR_PLAN` 或 `NEEDS_CLARIFICATION`。所有真实选项
必须解决同一个目标、验收边界和 scope,写明复杂度由谁承担及可观察成本,并只给出一个
推荐和明确的停止条件。简单任务可以只有一个真实方向,不为凑数制造伪选项。

入口跨平台不一致、semantic owner 或 source of truth 不清、状态/contract 语义变化,
或者涉及跨 workflow、团队、transport、迁移与多版本兼容时,可以在 `plan.md` 中加入
Domain Matrix。它只辅助计划审查,不是新的 authority。

实施中返回 `NEEDS_REALIGNMENT` 与 `MANCODE_REFRAME_REQUIRED` 是只读诊断。它必须保留
metadata、requirements、plan、ledger、claim 和 handoff;只有受支持的 reframe operation
才能归档旧权威、释放 claim 并返回需求澄清步骤。

默认 Solo 不主动运行这套深入发现;普通小任务仍保持轻量。Solo 接手已有 `/man`
计划时必须继承其 requirements、plan 和 `implementationScope`,不能重新规划或扩权。
这些状态写入既有 ledger、plan revision 和 workflow metadata,不建立第二套提示词 authority。
Expand All @@ -68,7 +80,8 @@ mancode 的实现原则是:外科手术式修改、可验证、可恢复。
npx vitest run tests/<affected-file>.test.ts
npm run typecheck
npm run lint
npm test
npm audit --audit-level=high
npm run test:coverage
npm run build
npm run test:dist
```
Expand All @@ -87,7 +100,7 @@ npm run test:dist
## 文档与发布

- `README.md` 和 `README.en.md` 面向用户并保持功能声明一致。
- `docs/` 只描述当前契约和未完成验收,不保存已完成实施计划
- `docs/` 只描述当前契约和长期发布门禁,不保存版本候选清单或已完成实施计划
- 新 CLI 入口必须同步 help、测试和公开参考。
- 平台能力声明必须区分自动化 contract 与真实宿主证据。
- 发布版本由 `package.json` 与 `src/version.ts` 共同约束。
Loading
Loading