mancode init
StartCreates .mancode/, detects the project, scans style tokens where relevant, and installs adapters.
- Options:
--force,--yes,--team,--no-team,--style <name>,--platform <list>,--empty,--lang <locale>.
diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index a8ba87f..185e516 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -23,5 +23,7 @@ jobs: run: npm run typecheck - name: Build run: npm run build + - name: Verify compiled adapters + run: npm run test:dist - name: Test run: npm test diff --git a/README.en.md b/README.en.md index 92da94c..f789ebe 100644 --- a/README.en.md +++ b/README.en.md @@ -17,7 +17,7 @@
@@ -34,6 +34,9 @@ different gears for different stakes: light solo mode for daily practice, `/man` for playoff-level engineering discipline, and coaching-staff subagents for research, planning, implementation, and review. +**mancode Continuity** is the continuous-context runtime that carries tasks, +decisions, and verification evidence safely into later conversations. + [Installation](#installation) · [Usage](#usage) mancode ships with adapters for Claude Code, Cursor, Codex in the ChatGPT @@ -102,7 +105,7 @@ explicitly resumes the existing TaskRef, preserving continuity without treating one window's temporary state as another window's identity. ```bash -mancode status --json +mancode status --brief --json mancode context session new --client claude-code mancode context resume
mancode
- Documentation / v0.3.14
+ Documentation / v0.3.16
$ mancode status
$ mancode status --jsonThe human-readable result names the project, current mode, team state, installed adapters, and each adapter's ready or not ready status. JSON is the stable choice for scripts. A ready adapter means its required generated files are present; it does not guarantee that an already-open agent session has reloaded them.
+The human-readable result names the project, current mode, team state, installed adapters, and each adapter's ready or not ready status. JSON is the stable choice for scripts; mancode status --brief --json returns the compact public Continuity view used by coding agents. A ready adapter means its required generated files are present; it does not guarantee that an already-open agent session has reloaded them.
Restart or reload the coding agent after initialization. Then start a small request in solo. If an adapter remains not ready, repair it with mancode install <platform> --force.
mancode works locally, scans only the current project, and sends no telemetry. It deliberately does not rewrite your project's .gitignore, so your team—not the installer—decides which generated context belongs in version control.
| Path | What it contains | Before committing |
|---|---|---|
.mancode/schema.json.mancode/shared/.mancode/local/ | V3 authority, project policy, sessions, workflow metadata, and local runtime records. Legacy state.json exists only after explicit --legacy initialization. | Review workflow evidence and local records before sharing; raw host session keys are never persisted. |
.mancode/schema.json.mancode/shared/.mancode/local/ | Continuity authority, project policy, sessions, workflow metadata, and local runtime records. Legacy state.json exists only after explicit --legacy initialization. | Review workflow evidence and local records before sharing; raw host session keys are never persisted. |
.mancode/shared/context/project.json.mancode/local/cache/style-tokens.json | Detected stack, validation commands, and local UI tokens. | Inspect for internal project details and decide whether reproducibility justifies sharing. |
.mancode/local/workflows/.mancode/shared/workflows/ | Requirements, plans, review and verification ledgers, reports, checkpoints, and summaries. | Review carefully. Evidence and reports may contain sensitive data; shared workflows pass the V3 privacy boundary. |
.mancode/local/workflows/.mancode/shared/workflows/ | Requirements, plans, review and verification ledgers, reports, checkpoints, and summaries. | Review carefully. Evidence and reports may contain sensitive data; shared workflows pass the Continuity privacy boundary. |
.mancode/shared/context/decisions/.mancode/shared/team/ | Confirmed decisions and durable coordination authority. | Commit only information intentionally written for the team. |
.claude/, .cursor/, .agents/, .github/, AGENTS.md | Adapter instructions, commands or prompts, skills, hooks, and managed blocks. | Share when the adapter is part of the team's development workflow. Content outside mancode's managed blocks remains yours. |
mancode stores goals, requirements, plans, validation results, and handoff notes under a stable TaskRef. A new chat window or supported CLI can resume the same task and load a purpose-specific Context Pack.
This is task continuity, not a copy of raw chat history. Sessions from different clients remain isolated; the new session must identify its own client and explicitly resume the existing TaskRef.
$ mancode status --json
+ $ mancode status --brief --json
$ mancode context session new --client claude-code
$ mancode context resume <namespace:ULID> --session <id> --client claude-code
$ mancode context show --purpose orient --session <id> --client claude-code
@@ -169,21 +169,21 @@ CLI reference
mancode init
StartCreates .mancode/, detects the project, scans style tokens where relevant, and installs adapters.
- Options:
--force, --yes, --team, --no-team, --style <name>, --platform <list>, --empty, --lang <locale>.
mancode install [platform]
AdapterInstalls or repairs an adapter after initialization. Omit the platform for interactive selection.
--force regenerates managed content.--minimal installs solo-mode essentials only.
- mancode status [--json]
InspectReports project facts, current mode and workflow, adapter readiness, and Claude hook registration where applicable.
+ mancode status [--json] [--brief]
InspectReports project facts, current mode and workflow, adapter readiness, and Claude hook registration where applicable. Combine --brief --json for the compact Continuity runtime view.
mancode list-platforms
DiscoverLists adapters known to the installed CLI and marks those already configured in the project.
- mancode workflow <subcommand>
GovernCreates and validates V3 requirements, plans, verification evidence, reviews, remediation, and completion.
- Inspect with
list and show <namespace:ULID> [--json]. - Use
context compact --dry-run to inspect removable runtime records; V3 workflow authority is not deleted by workflow clean.
+ mancode workflow <subcommand>
GovernCreates and validates Continuity requirements, plans, verification evidence, reviews, remediation, and completion.
- Inspect with
list and show <namespace:ULID> [--json]. - Use
context compact --dry-run to inspect removable runtime records; Continuity workflow authority is not deleted by workflow clean.
mancode manps [area]
ScanRuns a deterministic health scan for all, deps, security, dead-code, config.
--json emits machine-readable output.--remediate enters the explicit remediation path; the default is scan-only.
mancode refresh-project
RescanRefreshes project facts after adding Git, a manifest, a framework, or validation commands, then updates installed static adapters.
mancode refresh-style
DesignRefreshes the project profile and design tokens. Reinstall static adapters with --force afterward.
- mancode uninstall [platform]
RemoveRemoves one V3 adapter. V3 protects authority from bulk removal; use context compact --dry-run for retention candidates. The --all form is legacy-only.
+ mancode uninstall [platform]
RemoveRemoves one Continuity adapter. Continuity protects authority from bulk removal; use context compact --dry-run for retention candidates. The --all form is legacy-only.
mancode version
VersionPrints the installed CLI version for upgrade checks and issue reports.
Study the /man workflow
- /man is a progressive nine-step protocol. It first makes the decision inspectable, then lets the user choose between a lightweight handoff, a plan-only result, or governed execution. Every gate is backed by V3 files under .mancode/<namespace>/workflows/<ULID>/.
- Who runs these commands?The installed V3 mode entry creates the task and reads its Context Pack. The commands below are the machine contract for studying, debugging, or integrating the process. V3 identifies tasks with explicit namespace:ULID TaskRefs and does not use a legacy active pointer.
+ /man is a progressive nine-step protocol. It first makes the decision inspectable, then lets the user choose between a lightweight handoff, a plan-only result, or governed execution. Every gate is backed by Continuity files under .mancode/<namespace>/workflows/<ULID>/.
+ Who runs these commands?The installed Continuity mode entry creates the task and reads its Context Pack. The commands below are the machine contract for studying, debugging, or integrating the process. Continuity identifies tasks with explicit namespace:ULID TaskRefs and does not use a legacy active pointer.
The nine steps and their gates
Step Agent work Durable gate
@@ -239,8 +239,8 @@ The Step 4 decision
All three choices require an active man workflow, confirmed requirements, and plan.md. Revise the plan with workflow plan ... revise; every successful mutation returns the revision required by the next command.
- A valid V3 sequence
- V3 uses explicit TaskRefs and expected revisions. The CLI owns every durable mutation; do not edit metadata files or use the legacy --step protocol.
+ A valid Continuity sequence
+ Continuity uses explicit TaskRefs and expected revisions. The CLI owns every durable mutation; do not edit metadata files or use the legacy --step protocol.
# Bootstrap an actor and explicit session
$ mancode team identity create --name "Your name"
$ mancode context session new --client codex --json
@@ -262,7 +262,7 @@ A valid V3 sequence
Verification, manual checks, and remediation
Case Required record Gate behavior
- Automated The canonical verification ledger records the criterion, command, exit code, evidence summary, and result. workflow verify ... apply rejects a ledger that does not satisfy the V3 schema and current revision.
+ Automated The canonical verification ledger records the criterion, command, exit code, evidence summary, and result. workflow verify ... apply rejects a ledger that does not satisfy the Continuity schema and current revision.
Manual The ledger records why automation cannot decide and only changes to passed after explicit user confirmation. Completion remains blocked while required manual evidence is pending.
Review finding The canonical review ledger stores stable blocker IDs and their remediation state. Applying a review ledger makes earlier verification stale; apply current verification after review and before completion.
User skips review The review ledger records the explicit user decision and residual risk. Completion still requires a valid summary and every remaining gate.
@@ -279,8 +279,8 @@ Workflow subcommands
planRevise a plan or confirm its execution decision. revise --file; confirm --plan-decision; both require revision and session.
updateChange lifecycle status or a blocking reason. --status --expected-revision --session; governed fields use dedicated commands.
handoffTransfer a confirmed local plan to solo and later close it. --to solo or --complete, with revision and session.
- verify / reviewApply canonical V3 ledgers. apply --file --expected-revision --session.
- list / show / cleanList or inspect V3 TaskRefs. clean is not a V3 authority deletion command. show <namespace:ULID> --json; use context compact --dry-run for retention.
+ verify / reviewApply canonical Continuity ledgers. apply --file --expected-revision --session.
+ list / show / cleanList or inspect Continuity TaskRefs. clean is not a Continuity authority deletion command. show <namespace:ULID> --json; use context compact --dry-run for retention.
@@ -307,7 +307,7 @@ Refresh project context
Uninstall safely
- Uninstalling one adapter preserves user-authored rules, instructions, unrelated Claude settings, and V3 workflow authority. Use context compact --dry-run to inspect eligible runtime retention records.
+ Uninstalling one adapter preserves user-authored rules, instructions, unrelated Claude settings, and Continuity workflow authority. Use context compact --dry-run to inspect eligible runtime retention records.
Remove one adapter
$ mancode uninstall cursor --force
Reinstall one adapter
@@ -328,7 +328,7 @@ Claude Code hooks do not run
Cursor rules do not trigger
Confirm that .cursor/rules/mancode-*.mdc and .cursor/commands/*.md exist. Core context and solo rules are persistent; higher-intensity rules are description-triggered, so invoke the generated mode command explicitly.
A workflow command is rejected
- Treat the rejection as a gate, not a file-corruption problem. Use mancode workflow list --json to discover TaskRefs, then mancode workflow show <namespace:ULID> --json to inspect metadata, revision, aggregate, and blockers. Do not edit V3 metadata manually.
+ Treat the rejection as a gate, not a file-corruption problem. Use mancode workflow list --json to discover TaskRefs, then mancode workflow show <namespace:ULID> --json to inspect metadata, revision, aggregate, and blockers. Do not edit Continuity metadata manually.
Project facts became stale
After adding Git, a manifest, dependencies, or validation scripts, run mancode refresh-project. Use refresh-style for UI tokens. Then repair a static adapter only if its generated files need regeneration.
diff --git a/website/docs.zh-CN.html b/website/docs.zh-CN.html
index 0ca73be..02f2a7c 100644
--- a/website/docs.zh-CN.html
+++ b/website/docs.zh-CN.html
@@ -24,7 +24,7 @@
mancode
- 文档 / v0.3.14
+ 文档 / v0.3.16
官网
GitHub
@@ -90,7 +90,7 @@ 指定平台或非交互初始化
验证安装结果
$ mancode status
$ mancode status --json
- 普通输出会列出项目、当前模式、团队状态、已安装平台,以及每个平台的 ready 或 not ready 状态;脚本应使用 JSON。ready 表示适配器要求的生成文件已经存在,但不代表一个早已打开的 Agent 会话已经重新加载这些文件。
+ 普通输出会列出项目、当前模式、团队状态、已安装平台,以及每个平台的 ready 或 not ready 状态;脚本应使用 JSON,编码 Agent 可用 mancode status --brief --json 获取精简的 Continuity 公开视图。ready 表示适配器要求的生成文件已经存在,但不代表一个早已打开的 Agent 会话已经重新加载这些文件。
初始化后重载安装后重启或重新加载编程 Agent,再用 solo 完成一个小任务。如果平台仍显示 not ready,执行 mancode install <platform> --force 修复。
@@ -98,9 +98,9 @@ 验证安装结果
文件与隐私
mancode 本地运行,只扫描当前项目,不发送遥测。它不会擅自改写项目的 .gitignore,因此哪些生成上下文应该进入版本控制,需要由你的团队明确决定。
路径 包含什么 提交前怎么处理
- .mancode/schema.json
.mancode/shared/
.mancode/local/V3 权威、项目策略、会话、工作流元数据和本地运行时记录。只有显式使用 --legacy 初始化后才会出现旧 state.json。 共享前检查工作流证据和本地记录;原始宿主 session key 不会持久化。
+ .mancode/schema.json
.mancode/shared/
.mancode/local/Continuity 权威、项目策略、会话、工作流元数据和本地运行时记录。只有显式使用 --legacy 初始化后才会出现旧 state.json。 共享前检查工作流证据和本地记录;原始宿主 session key 不会持久化。
.mancode/shared/context/project.json
.mancode/local/cache/style-tokens.json识别出的技术栈、验证命令和本地 UI token。 检查是否带有内部项目信息,再权衡复现能力与暴露范围。
- .mancode/local/workflows/
.mancode/shared/workflows/需求、计划、评审和验证台账、报告、checkpoint 与总结。 重点检查。证据和报告可能含敏感数据;shared workflow 必须通过 V3 隐私边界。
+ .mancode/local/workflows/
.mancode/shared/workflows/需求、计划、评审和验证台账、报告、checkpoint 与总结。 重点检查。证据和报告可能含敏感数据;shared workflow 必须通过 Continuity 隐私边界。
.mancode/shared/context/decisions/
.mancode/shared/team/已确认决策与持久化协调权威。 只提交有意写给团队的内容。
.claude/、.cursor/、.agents/、.github/、AGENTS.md平台 instructions、命令或 prompt、skills、hooks 与受控区块。 团队确实把该适配器作为开发流程的一部分时再共享;mancode 管理标记之外的内容仍归用户所有。
@@ -111,7 +111,7 @@ 文件与隐私
跨会话继续工作
mancode 把目标、需求、计划、检查结果和交接信息保存在稳定的 TaskRef 下。新聊天窗口或受支持的 CLI 可以恢复同一项任务,再按当前目的读取精简的 Context Pack。
会带过去什么这是任务上下文的续接,不是原始聊天记录的复制。不同客户端的 session 仍然隔离;新 session 必须使用自己的 client 身份,并显式恢复已有 TaskRef。
- $ mancode status --json
+ $ mancode status --brief --json
$ mancode context session new --client claude-code
$ mancode context resume <namespace:ULID> --session <id> --client claude-code
$ mancode context show --purpose orient --session <id> --client claude-code
@@ -169,21 +169,21 @@ CLI 参考
mancode init
初始化创建 .mancode/,识别项目,在适用时扫描样式 token,并安装平台适配器。
- 选项:
--force、--yes、--team、--no-team、--style <name>、--platform <list>、--empty、--lang <locale>。
mancode install [platform]
适配器初始化后安装或修复一个平台。省略平台名时进入交互选择。
--force 重新生成受控内容。--minimal 只安装 solo 的必要内容。
- mancode status [--json]
检查报告项目事实、当前模式和工作流、平台就绪状态,以及适用时的 Claude hook 注册情况。
+ mancode status [--json] [--brief]
检查报告项目事实、当前模式和工作流、平台就绪状态,以及适用时的 Claude hook 注册情况。组合使用 --brief --json 可获得精简的 Continuity 运行时视图。
mancode list-platforms
发现列出当前 CLI 支持的平台,并标出项目中已经配置的平台。
- mancode workflow <subcommand>
治理创建和校验 V3 需求、计划、验证证据、评审、修复与完成状态。
- 使用
list 和 show <namespace:ULID> [--json] 检查。 - 使用
context compact --dry-run 检查可回收的运行时记录;V3 workflow authority 不会被 workflow clean 删除。
+ mancode workflow <subcommand>
治理创建和校验 Continuity 需求、计划、验证证据、评审、修复与完成状态。
- 使用
list 和 show <namespace:ULID> [--json] 检查。 - 使用
context compact --dry-run 检查可回收的运行时记录;Continuity workflow authority 不会被 workflow clean 删除。
mancode manps [area]
扫描对 all、deps、security、dead-code 或 config 执行确定性健康扫描。
--json 输出机器可读结果。--remediate 显式进入修复路径;默认只扫描。
mancode refresh-project
重扫项目在加入 Git、manifest、框架或验证命令后刷新项目事实,并更新已安装的静态适配器。
mancode refresh-style
设计上下文刷新项目画像和设计 token,之后可用 --force 重装需要更新的静态适配器。
- mancode uninstall [platform]
移除移除一个 V3 适配器。V3 会保护权威数据不被批量删除;用 context compact --dry-run 检查保留候选。--all 只适用于 legacy 项目。
+ mancode uninstall [platform]
移除移除一个 Continuity 适配器。Continuity 会保护权威数据不被批量删除;用 context compact --dry-run 检查保留候选。--all 只适用于 legacy 项目。
mancode version
版本输出已安装 CLI 版本,便于升级检查和提交问题。
深入研究 /man 工作流
- /man 是一个渐进式九步协议:先让决策变得可检查,再由用户选择轻量交接、仅保留计划,或继续治理式执行。每个闸门都由 V3 的 .mancode/<namespace>/workflows/<ULID>/ 文件支撑。
- 谁来运行这些命令?安装后的 V3 mode entry 会创建任务并读取 Context Pack。下面展示的是供研究、排错或集成使用的机器契约。V3 使用显式 namespace:ULID TaskRef,不依赖旧的活动指针。
+ /man 是一个渐进式九步协议:先让决策变得可检查,再由用户选择轻量交接、仅保留计划,或继续治理式执行。每个闸门都由 Continuity 的 .mancode/<namespace>/workflows/<ULID>/ 文件支撑。
+ 谁来运行这些命令?安装后的 Continuity mode entry 会创建任务并读取 Context Pack。下面展示的是供研究、排错或集成使用的机器契约。Continuity 使用显式 namespace:ULID TaskRef,不依赖旧的活动指针。
九个步骤与闸门
步骤 Agent 工作 持久化闸门
@@ -239,8 +239,8 @@ Step 4 的三种决策
三种选择都要求活动中的 man 工作流、已确认需求和 plan.md。使用 workflow plan ... revise 修订计划;每次成功写入都会返回下一个命令需要的 revision。
- 一条合法的 V3 顺序
- V3 使用显式 TaskRef 和 expected revision。所有持久化变更都由 CLI 完成;不要手工编辑 metadata,也不要使用 legacy --step 协议。
+ 一条合法的 Continuity 顺序
+ Continuity 使用显式 TaskRef 和 expected revision。所有持久化变更都由 CLI 完成;不要手工编辑 metadata,也不要使用 legacy --step 协议。
# 创建 actor 和显式 session
$ mancode team identity create --name "Your name"
$ mancode context session new --client codex --json
@@ -262,7 +262,7 @@ 一条合法的 V3 顺序
自动验证、手工确认与修复后重验
场景 必须记录 闸门行为
- 自动验证 规范化 verification ledger 记录验收项、命令、退出码、证据摘要与结果。 workflow verify ... apply 会拒绝不符合 V3 schema 或 revision 的台账。
+ 自动验证 规范化 verification ledger 记录验收项、命令、退出码、证据摘要与结果。 workflow verify ... apply 会拒绝不符合 Continuity schema 或 revision 的台账。
手工验证 台账记录自动化不能判断的原因;只有用户明确确认后才能改为 passed。 必需人工证据未完成时,completion 持续阻塞。
评审发现 规范化 review ledger 保存稳定 blocker ID 及其 remediation 状态。 应用 review ledger 会使旧验证失效;评审后、完成前必须 apply 当前验证。
用户跳过评审 review ledger 记录用户显式决定和残余风险。 仍然需要有效 summary 和其余全部门禁。
@@ -279,8 +279,8 @@ workflow 子命令速查
plan修订计划或确认执行决策。 revise --file;confirm --plan-decision;两者都需要 revision 和 session。
update改变生命周期状态或阻塞原因。 --status --expected-revision --session;治理字段使用专用命令。
handoff把已确认的本地计划交给 solo,随后关闭。 --to solo 或 --complete,并传 revision 与 session。
- verify / review应用规范化 V3 台账。 apply --file --expected-revision --session。
- list / show / clean列出或检查 V3 TaskRef;clean 不是删除 V3 权威数据的命令。 show <namespace:ULID> --json;保留清理使用 context compact --dry-run。
+ verify / review应用规范化 Continuity 台账。 apply --file --expected-revision --session。
+ list / show / clean列出或检查 Continuity TaskRef;clean 不是删除 Continuity 权威数据的命令。 show <namespace:ULID> --json;保留清理使用 context compact --dry-run。
@@ -307,7 +307,7 @@ 刷新项目上下文
安全卸载
- 卸载单个平台会保留用户自己编写的 rules、instructions、无关的 Claude settings 和 V3 工作流权威数据。使用 context compact --dry-run 检查可清理的运行时保留记录。
+ 卸载单个平台会保留用户自己编写的 rules、instructions、无关的 Claude settings 和 Continuity 工作流权威数据。使用 context compact --dry-run 检查可清理的运行时保留记录。
移除一个适配器
$ mancode uninstall cursor --force
重装一个适配器
@@ -328,7 +328,7 @@ Claude Code hooks 没有触发
Cursor rules 没有触发
确认 .cursor/rules/mancode-*.mdc 和 .cursor/commands/*.md 都存在。核心上下文与 solo rules 持续生效;高强度规则按描述触发,因此应显式调用生成的模式命令。
workflow 命令被拒绝
- 把拒绝当作流程闸门,而不是元数据损坏。先用 mancode workflow list --json 找到 TaskRef,再用 mancode workflow show <namespace:ULID> --json 检查元数据、revision、aggregate 和 blocker。不要手工编辑 V3 metadata。
+ 把拒绝当作流程闸门,而不是元数据损坏。先用 mancode workflow list --json 找到 TaskRef,再用 mancode workflow show <namespace:ULID> --json 检查元数据、revision、aggregate 和 blocker。不要手工编辑 Continuity metadata。
项目事实已经过期
添加 Git、manifest、依赖或验证脚本后执行 mancode refresh-project;UI token 改变时执行 refresh-style。只有静态适配器的生成文件需要更新时,才重新安装对应平台。
diff --git a/website/index.html b/website/index.html
index f0528b1..d1a1eeb 100644
--- a/website/index.html
+++ b/website/index.html
@@ -439,7 +439,7 @@ Stop babysitting
AI bloat.
中文
AGPL-3.0
-
+