mancode 0.3.13 → 0.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -17,7 +17,7 @@
17
17
  <p align="center">
18
18
  <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>
19
19
  <a href="https://www.npmjs.com/package/mancode"><img src="https://img.shields.io/npm/v/mancode?style=flat-square" alt="npm version" /></a>
20
- <img src="https://img.shields.io/badge/status-stable%20v0.3.13-green?style=flat-square" alt="Status: stable v0.3.13" />
20
+ <img src="https://img.shields.io/badge/status-V3%20beta%20v0.3.14-orange?style=flat-square" alt="Status: V3 beta v0.3.14" />
21
21
  <img src="https://img.shields.io/badge/platforms-Claude%20Code%20%7C%20Cursor%20%7C%20Codex%20%7C%20Copilot%20%7C%20ZCode-5865F2?style=flat-square" alt="Platforms: Claude Code, Cursor, Codex in ChatGPT desktop and CLI, GitHub Copilot, ZCode" />
22
22
  </p>
23
23
 
@@ -177,7 +177,7 @@ the original mode entries, never task/session snapshots. `mancode init
177
177
  default `solo` for lightweight implementation, or continue the full `/man`
178
178
  validation and bounded risk-review workflow.
179
179
  - **Keep workflow artifacts on disk**: save research, plans, review reports,
180
- and summaries under `.mancode/local/workflows/<taskId>/`.
180
+ and summaries under `.mancode/<namespace>/workflows/<ULID>/`.
181
181
  - **Support team context**: use `/manteam` with confirmed typed entities under
182
182
  `.mancode/shared/`.
183
183
  - **Scan project health**: use `mancode manps` to detect stale TODOs, unused
@@ -263,7 +263,7 @@ Context Pack:
263
263
  work. A planning or research request made from default `solo` routes into `/man`.
264
264
  It inspects the project, asks only questions that can change scope, architecture,
265
265
  cost, or acceptance, and recommends 2–3 options when a decision benefits from
266
- guidance. It writes the plan under `.mancode/local/workflows/<taskId>/` only
266
+ guidance. It writes the plan under `.mancode/local/workflows/<ULID>/` only
267
267
  after the requirements are ready.
268
268
 
269
269
  Finishing the plan does not automatically start the full workflow. At the plan
@@ -350,9 +350,9 @@ it should behave, and why previous decisions were made.
350
350
 
351
351
  ## Installation
352
352
 
353
- **Status**: stable v0.3.13. Claude Code, Cursor, Codex in the ChatGPT desktop app
354
- and CLI, and GitHub Copilot are supported. ZCode adapter support is included,
355
- with project skill discovery kept behind a verification gate before release.
353
+ **Status**: V3 beta v0.3.14. Claude Code, Cursor, Codex in the ChatGPT desktop
354
+ app and CLI, GitHub Copilot, and ZCode adapters are included. Stable release
355
+ still requires the five-host real-session acceptance and the `context beta` B1 gate.
356
356
 
357
357
  Requires Node.js 20 or newer. macOS, Linux, Windows CMD, PowerShell, and Git Bash
358
358
  are supported. Git is optional: without it, initialization continues with solo
@@ -426,6 +426,8 @@ mancode list-platforms
426
426
  mancode team identity create --name "<name>"
427
427
  mancode context session new --client <platform>
428
428
  mancode workflow create <man|manba|manteam> "<task>" --session <id>
429
+ mancode workflow list --json
430
+ mancode workflow show <namespace:ULID> --json
429
431
  mancode context resume <local:ULID|shared:ULID> --session <id>
430
432
  mancode workflow requirements <namespace:ULID> finalize --file <requirements.json> --expected-revision <n> --session <id>
431
433
  mancode workflow plan <namespace:ULID> revise --file <plan.md> --expected-revision <n> --session <id>
@@ -447,7 +449,7 @@ mancode version
447
449
  Simplified output:
448
450
 
449
451
  ```text
450
- mancode v0.3.13
452
+ mancode v0.3.14
451
453
 
452
454
  Project: my-app
453
455
  Runtime: ready
@@ -507,9 +509,11 @@ mancode context session new --client codex
507
509
  mancode workflow create man "refactor auth module" --session <id>
508
510
  mancode workflow requirements <local:ULID> finalize --file requirements.json --expected-revision <n> --session <id>
509
511
  mancode workflow plan <local:ULID> revise --file plan.md --expected-revision <n> --session <id>
512
+ mancode workflow plan <local:ULID> confirm --plan-decision <plan_only|governed_execution> --expected-revision <n> --session <id>
510
513
  mancode workflow review <local:ULID> apply --file review-ledger.json --expected-revision <n> --session <id>
511
514
  mancode workflow verify <local:ULID> apply --file verification-ledger.json --expected-revision <n> --session <id>
512
515
  mancode workflow complete <local:ULID> --expected-revision <n> --session <id>
516
+ mancode context compact --dry-run
513
517
  ```
514
518
 
515
519
  ### `mancode manps`
@@ -635,23 +639,34 @@ Ensure the `.cursor/rules/mancode-*.mdc` files exist. Rules with
635
639
  Mode-specific rules (manba, man, manteam, manps) trigger based on the
636
640
  description field — invoke them by asking for `/manba` or similar.
637
641
 
638
- ### How to do a clean reinstall
642
+ ### How to reinstall V3 adapters
639
643
 
640
644
  ```bash
641
- mancode uninstall --all --force
642
- mancode init
643
- mancode install <platform>
645
+ mancode uninstall claude-code --force
646
+ mancode uninstall cursor --force
647
+ mancode uninstall codex --force
648
+ mancode uninstall copilot --force
649
+ mancode uninstall zcode --force
650
+ mancode install claude-code
651
+ mancode install cursor
652
+ mancode install codex
653
+ mancode install copilot
654
+ mancode install zcode
644
655
  ```
645
656
 
646
- ### How to completely remove mancode
657
+ V3 authority is protected, so `mancode uninstall --all` does not delete workflow
658
+ authority. To inspect removable runtime records, run
659
+ `mancode context compact --dry-run` first.
660
+
661
+ ### How to remove the CLI
647
662
 
648
663
  ```bash
649
- mancode uninstall --all --force
650
664
  npm uninstall -g mancode
651
665
  ```
652
666
 
653
- This removes `.mancode/`, platform config files, and mancode hooks from
654
- `.claude/settings.json`. User-authored rules and instructions are preserved.
667
+ Uninstalling each platform removes its mancode bootstrap while preserving
668
+ user-authored rules, instructions, and V3 workflow data. The `--all` form is only
669
+ supported for projects explicitly initialized with `mancode init --legacy`.
655
670
 
656
671
  ## FAQ
657
672
 
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  <p align="center">
18
18
  <a href="./LICENSE"><img src="https://img.shields.io/badge/License-AGPL--3.0-blue.svg?style=flat-square" alt="许可证:AGPL-3.0" /></a>
19
19
  <a href="https://www.npmjs.com/package/mancode"><img src="https://img.shields.io/npm/v/mancode?style=flat-square" alt="npm 版本" /></a>
20
- <img src="https://img.shields.io/badge/status-stable%20v0.3.13-green?style=flat-square" alt="状态:稳定版 v0.3.13" />
20
+ <img src="https://img.shields.io/badge/status-V3%20beta%20v0.3.14-orange?style=flat-square" alt="状态:V3 Beta v0.3.14" />
21
21
  <img src="https://img.shields.io/badge/platforms-Claude%20Code%20%7C%20Cursor%20%7C%20Codex%20%7C%20Copilot%20%7C%20ZCode-5865F2?style=flat-square" alt="平台:Claude Code、Cursor、ChatGPT 桌面端 Codex、Codex CLI、GitHub Copilot、ZCode" />
22
22
  </p>
23
23
 
@@ -155,7 +155,7 @@ AGENTS.md # Codex(ChatGPT 桌面端/CLI):托管 ins
155
155
  - **在存在 UI 时匹配现有设计系统**:检查项目 UI 依赖、Tailwind 配置、CSS 变量和已有组件,让 agent 复用现有颜色、字体和交互模式。
156
156
  - **先把需求和计划对齐**:`/man` 会调研项目、引导澄清会改变方案的需求、推荐可行选项并生成可确认的持久计划;计划完成后不会自动进入完整实施。
157
157
  - **自由选择执行强度**:计划确认后,可只保留计划、交给默认 `solo` 轻量开发,或继续完整 `/man` 的验证与有界风险审查。
158
- - **保留工作流产物**:调研、计划、审查报告和总结会保存到 `.mancode/local/workflows/<taskId>/`。
158
+ - **保留工作流产物**:调研、计划、审查报告和总结会保存到 `.mancode/<namespace>/workflows/<ULID>/`。
159
159
  - **支持团队上下文**:`/manteam` 通过 `.mancode/shared/` 的类型化实体共享已确认信息。
160
160
  - **扫描项目健康度**:`mancode manps` 检测陈旧 TODO、未使用依赖、风险依赖和硬编码设计值。
161
161
 
@@ -228,7 +228,7 @@ mancode 不把“当前模式”写进持久状态。需要某种工作方式时
228
228
  `solo`,当用户要求先调研、给方案或出计划时,也会进入 `/man`。它会先了解项目,
229
229
  只追问会改变范围、架构、成本或验收的问题;适合由系统推荐的决策会给出 2–3 个
230
230
  方案、优缺点和明确建议。需求足够清楚后,计划才会写入
231
- `.mancode/local/workflows/<taskId>/plan.md`。
231
+ `.mancode/local/workflows/<ULID>/plan.md`。
232
232
 
233
233
  计划完成不会自动开始完整开发。用户在计划关卡选择:交给 `solo` 按已确认计划
234
234
  轻量开发、继续完整 `/man`、只保留计划,或修改计划。只有选择完整 `/man` 才继续
@@ -305,9 +305,9 @@ src/components/
305
305
 
306
306
  ## 安装
307
307
 
308
- **状态**:稳定版 v0.3.13。Claude Code、Cursor、ChatGPT 桌面端中的 Codex、
309
- Codex CLI 和 GitHub Copilot 均已支持。ZCode adapter 已接入,但项目级 skill
310
- 发现路径在发布前仍作为验证门禁。
308
+ **状态**:V3 Beta v0.3.14。Claude Code、Cursor、ChatGPT 桌面端中的 Codex、
309
+ Codex CLI 和 GitHub Copilot 均已接入;ZCode adapter 已接入。正式稳定发布仍需
310
+ 完成五平台真实宿主验收和 `context beta` B1 门禁。
311
311
 
312
312
  需要 Node.js 20 或更高版本。原生支持 macOS、Linux、Windows CMD、
313
313
  PowerShell 和 Git Bash。Git 是可选依赖:未安装时仍可初始化,只会把团队
@@ -379,6 +379,8 @@ mancode list-platforms
379
379
  mancode team identity create --name "<name>"
380
380
  mancode context session new --client <platform>
381
381
  mancode workflow create <man|manba|manteam> "<task>" --session <id>
382
+ mancode workflow list --json
383
+ mancode workflow show <namespace:ULID> --json
382
384
  mancode context resume <local:ULID|shared:ULID> --session <id>
383
385
  mancode workflow requirements <namespace:ULID> finalize --file <requirements.json> --expected-revision <n> --session <id>
384
386
  mancode workflow plan <namespace:ULID> revise --file <plan.md> --expected-revision <n> --session <id>
@@ -400,7 +402,7 @@ mancode version
400
402
  以下是简化输出示例:
401
403
 
402
404
  ```text
403
- mancode v0.3.13
405
+ mancode v0.3.14
404
406
 
405
407
  Project: my-app
406
408
  Runtime: ready
@@ -458,9 +460,11 @@ mancode context session new --client codex
458
460
  mancode workflow create man "refactor auth module" --session <id>
459
461
  mancode workflow requirements <local:ULID> finalize --file requirements.json --expected-revision <n> --session <id>
460
462
  mancode workflow plan <local:ULID> revise --file plan.md --expected-revision <n> --session <id>
463
+ mancode workflow plan <local:ULID> confirm --plan-decision <plan_only|governed_execution> --expected-revision <n> --session <id>
461
464
  mancode workflow review <local:ULID> apply --file review-ledger.json --expected-revision <n> --session <id>
462
465
  mancode workflow verify <local:ULID> apply --file verification-ledger.json --expected-revision <n> --session <id>
463
466
  mancode workflow complete <local:ULID> --expected-revision <n> --session <id>
467
+ mancode context compact --dry-run
464
468
  ```
465
469
 
466
470
  ### `mancode manps`
@@ -575,23 +579,33 @@ mancode/
575
579
  (context、practice、solo)在每次对话加载。模式规则(manba、man、manteam、
576
580
  manps)按 description 触发——输入 `/manba` 等关键词即可激活。
577
581
 
578
- ### 如何完全重装
582
+ ### 如何重装 V3 适配器
579
583
 
580
584
  ```bash
581
- mancode uninstall --all --force
582
- mancode init
583
- mancode install <platform>
585
+ mancode uninstall claude-code --force
586
+ mancode uninstall cursor --force
587
+ mancode uninstall codex --force
588
+ mancode uninstall copilot --force
589
+ mancode uninstall zcode --force
590
+ mancode install claude-code
591
+ mancode install cursor
592
+ mancode install codex
593
+ mancode install copilot
594
+ mancode install zcode
584
595
  ```
585
596
 
586
- ### 如何完全卸载 mancode
597
+ V3 authority 受保护,`mancode uninstall --all` 不会删除工作流权威数据。需要
598
+ 清理运行时保留记录时,先用 `mancode context compact --dry-run` 检查候选。
599
+
600
+ ### 如何移除 CLI
587
601
 
588
602
  ```bash
589
- mancode uninstall --all --force
590
603
  npm uninstall -g mancode
591
604
  ```
592
605
 
593
- 这会移除 `.mancode/`、平台配置文件和 `.claude/settings.json` 中的 mancode
594
- hooks。用户自定义的 rules instructions 会被保留。
606
+ 逐个平台卸载会移除对应的 mancode bootstrap,并保留用户自定义 rules、instructions
607
+ V3 工作流数据。旧项目若明确使用 `mancode init --legacy`,才支持 legacy 的
608
+ `mancode uninstall --all --force`。
595
609
 
596
610
  ## 常见问题
597
611
 
@@ -6714,14 +6714,9 @@ var V3ContextStore = class {
6714
6714
  })
6715
6715
  };
6716
6716
  }
6717
- /**
6718
- * Lists non-terminal children from canonical metadata only. Callers that
6719
- * need a completion gate must hold the parent task lock while invoking it;
6720
- * V3 child creation takes that same parent lock before publishing.
6721
- */
6722
- async listActiveChildTaskRefs(parentTaskRef) {
6723
- const parent = parseTaskRefValue(parentTaskRef);
6724
- const children = [];
6717
+ /** Lists every canonical V3 workflow without relying on a session pointer. */
6718
+ async listWorkflowMetadata() {
6719
+ const workflows = [];
6725
6720
  for (const namespace of ["local", "shared"]) {
6726
6721
  const directory = path9.join(".mancode", namespace, "workflows");
6727
6722
  const entries = await readDirectoryEntriesWithin(
@@ -6730,7 +6725,7 @@ var V3ContextStore = class {
6730
6725
  );
6731
6726
  for (const taskId of entries.sort(compareUtf83)) {
6732
6727
  try {
6733
- assertUlid(taskId, "workflow child directory");
6728
+ assertUlid(taskId, "workflow directory");
6734
6729
  } catch {
6735
6730
  throw new Error("MANCODE_CONTEXT_COLLECTION_ENTRY_INVALID");
6736
6731
  }
@@ -6745,12 +6740,26 @@ var V3ContextStore = class {
6745
6740
  "metadata.json",
6746
6741
  parseWorkflowMetadata
6747
6742
  );
6748
- if (metadata.parent !== null && sameTaskRef(metadata.parent.taskRef, parent) && !isTerminalWorkflowStatus(metadata.status)) {
6749
- children.push(metadata.taskRef);
6743
+ if (!sameTaskRef(metadata.taskRef, taskRef)) {
6744
+ throw new Error("MANCODE_CONTEXT_TASK_LOCATION_MISMATCH");
6750
6745
  }
6746
+ workflows.push(metadata);
6751
6747
  }
6752
6748
  }
6753
- return children.sort(
6749
+ return workflows.sort(
6750
+ (left, right) => Date.parse(right.updatedAt) - Date.parse(left.updatedAt) || compareUtf83(left.taskRef.namespace, right.taskRef.namespace) || compareUtf83(left.taskRef.taskId, right.taskRef.taskId)
6751
+ );
6752
+ }
6753
+ /**
6754
+ * Lists non-terminal children from canonical metadata only. Callers that
6755
+ * need a completion gate must hold the parent task lock while invoking it;
6756
+ * V3 child creation takes that same parent lock before publishing.
6757
+ */
6758
+ async listActiveChildTaskRefs(parentTaskRef) {
6759
+ const parent = parseTaskRefValue(parentTaskRef);
6760
+ return (await this.listWorkflowMetadata()).filter(
6761
+ (metadata) => metadata.parent !== null && sameTaskRef(metadata.parent.taskRef, parent) && !isTerminalWorkflowStatus(metadata.status)
6762
+ ).map((metadata) => metadata.taskRef).sort(
6754
6763
  (left, right) => compareUtf83(left.namespace, right.namespace) || compareUtf83(left.taskId, right.taskId)
6755
6764
  );
6756
6765
  }
@@ -7114,4 +7123,4 @@ export {
7114
7123
  V3ContextStore,
7115
7124
  storedTaskAggregateDigest
7116
7125
  };
7117
- //# sourceMappingURL=chunk-O3QAKAPJ.js.map
7126
+ //# sourceMappingURL=chunk-LMXUPBCN.js.map