mancode 0.3.6 → 0.3.8
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.md +44 -16
- package/README.zh-CN.md +33 -12
- package/dist/cli.js +2310 -908
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
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="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.
|
|
20
|
+
<img src="https://img.shields.io/badge/status-stable%20v0.3.8-green?style=flat-square" alt="Status: stable v0.3.8" />
|
|
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
|
<img src="https://img.shields.io/badge/tests-381%20passed-brightgreen?style=flat-square" alt="Tests: 381 passed" />
|
|
23
23
|
</p>
|
|
@@ -125,9 +125,12 @@ coding agent reads.
|
|
|
125
125
|
- **Match an existing UI system when present**: inspect project UI dependencies,
|
|
126
126
|
Tailwind configuration, CSS variables, and components so the agent reuses
|
|
127
127
|
established colors, fonts, and interaction patterns.
|
|
128
|
-
- **
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
- **Align requirements before planning**: `/man` investigates the project,
|
|
129
|
+
clarifies decisions that would change the solution, recommends viable
|
|
130
|
+
options, and produces a durable plan without automatically starting full execution.
|
|
131
|
+
- **Choose the delivery depth**: after plan approval, keep the plan, hand it to
|
|
132
|
+
default `solo` for lightweight implementation, or continue the full `/man`
|
|
133
|
+
validation and bounded risk-review workflow.
|
|
131
134
|
- **Keep workflow artifacts on disk**: save research, plans, review reports,
|
|
132
135
|
and summaries under `.mancode/workflows/<taskId>/`.
|
|
133
136
|
- **Support team memory**: use `/manteam` to read and update shared project
|
|
@@ -203,20 +206,28 @@ slash commands in your AI coding agent's conversation:
|
|
|
203
206
|
|---|---|---|
|
|
204
207
|
| `solo` | Daily coding · practice day | Lightweight hooks, style awareness, YAGNI checks, and one bounded diff self-check |
|
|
205
208
|
| `/manba` | Diagnosis and real validation · Mamba mentality | Reproduces defects, finds root causes, drives real user flows, and runs regression checks |
|
|
206
|
-
| `/man` |
|
|
209
|
+
| `/man` | Work needing requirement alignment or a formal plan · playoffs | Research, recommendations, and a durable plan; then choose lightweight solo delivery or the full 9-step workflow |
|
|
207
210
|
| `/manteam` | Team projects · five on the floor, one mind | Shared memory, decisions, coordination, and Conventional Commits |
|
|
208
211
|
| `/manps` | Cleanup and maintenance · preseason | Project health scan with Markdown and JSON reports |
|
|
209
212
|
| `/mansolo` | Returning to default mode | Resets current mode back to `solo` |
|
|
210
213
|
|
|
211
214
|
## How `/man` Works: Playoffs Mode
|
|
212
215
|
|
|
213
|
-
`/man` is
|
|
214
|
-
|
|
216
|
+
`/man` is both the formal planning entry point and playoffs mode for production
|
|
217
|
+
work. A planning or research request made from default `solo` routes into `/man`.
|
|
218
|
+
It inspects the project, asks only questions that can change scope, architecture,
|
|
219
|
+
cost, or acceptance, and recommends 2–3 options when a decision benefits from
|
|
220
|
+
guidance. It writes `plan.md` only after the requirements are ready.
|
|
221
|
+
|
|
222
|
+
Finishing the plan does not automatically start the full workflow. At the plan
|
|
223
|
+
gate, choose lightweight `solo` implementation, full `/man` execution, plan-only,
|
|
224
|
+
or plan revision. Only full execution continues through implementation, validation,
|
|
225
|
+
and risk review:
|
|
215
226
|
|
|
216
227
|
1. **Scout report**: maps existing code, risks, and unknowns.
|
|
217
|
-
2. **Clarification**:
|
|
218
|
-
3. **Plan**: Plan Coach creates a durable,
|
|
219
|
-
4. **Plan gate**: choose plan-only,
|
|
228
|
+
2. **Clarification**: asks every unresolved decision-changing question, across as many batches as needed, without repeating confirmed answers; it makes a clear recommendation when a suitable approach exists.
|
|
229
|
+
3. **Plan**: Plan Coach checks input readiness, then creates a durable plan with technical choices, boundaries, and acceptance criteria.
|
|
230
|
+
4. **Plan gate**: choose lightweight solo delivery, full `/man`, plan-only, or plan revision.
|
|
220
231
|
5. **Implementation**: Head Coach applies the confirmed plan.
|
|
221
232
|
6. **Validation and review scope**: run build, lint, tests, smoke checks, then select targeted or full review from the actual diff and hard-risk triggers.
|
|
222
233
|
7. **Film session 1**: evidence-backed quality review, limited to the changed behavior.
|
|
@@ -293,7 +304,7 @@ it should behave, and why previous decisions were made.
|
|
|
293
304
|
|
|
294
305
|
## Installation
|
|
295
306
|
|
|
296
|
-
**Status**: stable v0.3.
|
|
307
|
+
**Status**: stable v0.3.8. Claude Code, Cursor, Codex in the ChatGPT desktop app
|
|
297
308
|
and CLI, and GitHub Copilot are supported. ZCode adapter support is included,
|
|
298
309
|
with project skill discovery kept behind a verification gate before release.
|
|
299
310
|
|
|
@@ -366,10 +377,20 @@ mancode status --json
|
|
|
366
377
|
mancode install <claude-code|cursor|codex|copilot|zcode>
|
|
367
378
|
mancode list-platforms
|
|
368
379
|
mancode workflow create <man|manba|manteam> "<task>" [--parent-task <taskId>]
|
|
369
|
-
mancode workflow
|
|
380
|
+
mancode workflow requirements <taskId> finalize --file <requirements-input.json>
|
|
381
|
+
mancode workflow update <taskId> [--step N] [--status in_progress|planned|completed|blocked|abandoned] [--requirements-status ready|needs_clarification] [--blocking-reason "<reason>"] [--outcome fixed|verified|no_repro|manual_test_required] [--plan-version N] [--skipped clarification]
|
|
382
|
+
mancode workflow decide <taskId> --plan-decision plan_only|governed_execution
|
|
383
|
+
mancode workflow handoff <taskId> --to solo
|
|
384
|
+
mancode workflow handoff <taskId> --complete
|
|
385
|
+
mancode workflow verify <taskId> init
|
|
386
|
+
mancode workflow verify <taskId> record --acceptance AC-1 --method automated --result passed|failed --evidence "<summary>" --command "<command>" --exit-code <code> [--evidence-file <path>]
|
|
387
|
+
mancode workflow verify <taskId> require-manual --acceptance AC-1 --evidence "<reason>"
|
|
388
|
+
mancode workflow verify <taskId> confirm-manual --acceptance AC-1 --evidence "<user confirmation>"
|
|
389
|
+
mancode workflow verify <taskId> show [--json]
|
|
370
390
|
mancode workflow review <taskId> init --review-depth <targeted|full> [--review-domain <quality|security>]
|
|
371
391
|
mancode workflow review <taskId> complete --review-domain <quality|security> --report <path> [--blockers Q1,Q2]
|
|
372
392
|
mancode workflow review <taskId> remediate --resolved Q1,Q2
|
|
393
|
+
mancode workflow review <taskId> skip --reason "<explicit user reason>"
|
|
373
394
|
mancode workflow review <taskId> show [--json]
|
|
374
395
|
mancode workflow list [--json]
|
|
375
396
|
mancode workflow show <taskId> [--json]
|
|
@@ -386,7 +407,7 @@ mancode version
|
|
|
386
407
|
Example output for a UI project (not a default stack):
|
|
387
408
|
|
|
388
409
|
```text
|
|
389
|
-
mancode v0.3.
|
|
410
|
+
mancode v0.3.8
|
|
390
411
|
|
|
391
412
|
Project: my-app (React + TypeScript + Tailwind)
|
|
392
413
|
Mode: solo (default)
|
|
@@ -449,13 +470,20 @@ mancode status --json
|
|
|
449
470
|
### `mancode workflow`
|
|
450
471
|
|
|
451
472
|
Creates and manages validated workflow metadata used by `/manba`, `/man`, and
|
|
452
|
-
`/manteam`.
|
|
453
|
-
|
|
454
|
-
|
|
473
|
+
`/manteam`. New governed workflows finalize seven explicit coverage dimensions,
|
|
474
|
+
structured requirements, and stable acceptance IDs. Automated verification
|
|
475
|
+
records the command and exit code. Remediation invalidates earlier evidence, so
|
|
476
|
+
all required checks must be re-recorded at Step 9. Manual checks block until
|
|
477
|
+
explicit user confirmation is recorded. Review can only be skipped through the
|
|
478
|
+
Step 6 review skip command with a reason; targeted review treats its second
|
|
479
|
+
domain as not applicable.
|
|
455
480
|
|
|
456
481
|
```bash
|
|
457
482
|
mancode workflow create man "refactor auth module"
|
|
483
|
+
mancode workflow requirements <taskId> finalize --file requirements-input.json
|
|
458
484
|
mancode workflow update <taskId> --step 4 --plan-version 2
|
|
485
|
+
mancode workflow verify <taskId> init
|
|
486
|
+
mancode workflow verify <taskId> record --acceptance AC-1 --method automated --result passed --evidence "tests passed" --command "npm test" --exit-code 0
|
|
459
487
|
mancode workflow review <taskId> init --review-depth full
|
|
460
488
|
mancode workflow review <taskId> complete --review-domain quality --report film-report-1.md --blockers Q1
|
|
461
489
|
mancode workflow review <taskId> remediate --resolved Q1
|
package/README.zh-CN.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.
|
|
20
|
+
<img src="https://img.shields.io/badge/status-stable%20v0.3.8-green?style=flat-square" alt="状态:稳定版 v0.3.8" />
|
|
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
|
<img src="https://img.shields.io/badge/tests-381%20passed-brightgreen?style=flat-square" alt="测试:381 通过" />
|
|
23
23
|
</p>
|
|
@@ -112,7 +112,8 @@ AGENTS.md # Codex(ChatGPT 桌面端/CLI):托管 ins
|
|
|
112
112
|
|
|
113
113
|
- **减少 AI 过度设计**:先复用已有代码、标准库、已安装依赖和一行修复,再考虑新增抽象。
|
|
114
114
|
- **在存在 UI 时匹配现有设计系统**:检查项目 UI 依赖、Tailwind 配置、CSS 变量和已有组件,让 agent 复用现有颜色、字体和交互模式。
|
|
115
|
-
-
|
|
115
|
+
- **先把需求和计划对齐**:`/man` 会调研项目、引导澄清会改变方案的需求、推荐可行选项并生成可确认的持久计划;计划完成后不会自动进入完整实施。
|
|
116
|
+
- **自由选择执行强度**:计划确认后,可只保留计划、交给默认 `solo` 轻量开发,或继续完整 `/man` 的验证与有界风险审查。
|
|
116
117
|
- **保留工作流产物**:调研、计划、审查报告和总结会保存到 `.mancode/workflows/<taskId>/`。
|
|
117
118
|
- **支持团队记忆**:`/manteam` 读写 `.mancode/memory/` 下的共享项目上下文。
|
|
118
119
|
- **扫描项目健康度**:`mancode manps` 检测陈旧 TODO、未使用依赖、风险依赖和硬编码设计值。
|
|
@@ -174,20 +175,27 @@ mancode 不是 Claude Code、Cursor、Codex 或 Copilot 的替代品。它是在
|
|
|
174
175
|
|---|---|---|
|
|
175
176
|
| `solo` | 日常编码 · 日常训练 | 轻量 hooks、风格感知、YAGNI 检查和一次受限 diff 自检 |
|
|
176
177
|
| `/manba` | 诊断与真实验证 · 曼巴心态 | 复现缺陷、定位根因、驱动真实用户路径并执行回归检查 |
|
|
177
|
-
| `/man` |
|
|
178
|
+
| `/man` | 需要需求对齐或正式计划的改动 · 季后赛 | 调研、方案推荐和持久计划;确认后选择 solo 轻量开发或完整 9 步治理 |
|
|
178
179
|
| `/manteam` | 团队项目 · 上场五人,一条心 | 共享记忆、决策记录、协作和 Conventional Commits |
|
|
179
180
|
| `/manps` | 清理和维护 · 季前赛 | 输出 Markdown 和 JSON 项目健康报告 |
|
|
180
181
|
| `/mansolo` | 回到默认模式 | 将当前模式重置为 `solo` |
|
|
181
182
|
|
|
182
183
|
## `/man` 如何工作:季后赛模式
|
|
183
184
|
|
|
184
|
-
`/man`
|
|
185
|
-
|
|
185
|
+
`/man` 既是正式计划入口,也是面向关键任务的季后赛模式。即使当前处于默认
|
|
186
|
+
`solo`,当用户要求先调研、给方案或出计划时,也会进入 `/man`。它会先了解项目,
|
|
187
|
+
只追问会改变范围、架构、成本或验收的问题;适合由系统推荐的决策会给出 2–3 个
|
|
188
|
+
方案、优缺点和明确建议。需求足够清楚后,计划才会写入
|
|
189
|
+
`.mancode/workflows/<taskId>/plan.md`。
|
|
190
|
+
|
|
191
|
+
计划完成不会自动开始完整开发。用户在计划关卡选择:交给 `solo` 按已确认计划
|
|
192
|
+
轻量开发、继续完整 `/man`、只保留计划,或修改计划。只有选择完整 `/man` 才继续
|
|
193
|
+
后续实施、验证和风险审查:
|
|
186
194
|
|
|
187
195
|
1. **球探报告**:梳理既有代码、风险和未知项。
|
|
188
|
-
2.
|
|
189
|
-
3. **计划**:Plan Coach
|
|
190
|
-
4.
|
|
196
|
+
2. **需求澄清**:按需求就绪程度引导对齐;问出所有会改变方案且无法从项目查清的疑问,可按需分多批,不限制数量、不重复已确认内容,有合适方案时直接给出推荐。
|
|
197
|
+
3. **计划**:Plan Coach 先检查输入是否完整,再输出包含技术选择、边界和验收标准的持久计划。
|
|
198
|
+
4. **计划关卡**:选择 solo 轻量执行、完整 `/man`、只保留计划或修改计划。
|
|
191
199
|
5. **实施**:Head Coach 按确认计划实现。
|
|
192
200
|
6. **验证与审查范围**:运行 build、lint、test、smoke test,再根据实际 diff 和硬风险选择定向或完整审查。
|
|
193
201
|
7. **录像分析 1**:只对改动行为做有证据的质量审查。
|
|
@@ -254,7 +262,7 @@ src/components/
|
|
|
254
262
|
|
|
255
263
|
## 安装
|
|
256
264
|
|
|
257
|
-
**状态**:稳定版 v0.3.
|
|
265
|
+
**状态**:稳定版 v0.3.8。Claude Code、Cursor、ChatGPT 桌面端中的 Codex、
|
|
258
266
|
Codex CLI 和 GitHub Copilot 均已支持。ZCode adapter 已接入,但项目级 skill
|
|
259
267
|
发现路径在发布前仍作为验证门禁。
|
|
260
268
|
|
|
@@ -325,10 +333,20 @@ mancode status --json
|
|
|
325
333
|
mancode install <claude-code|cursor|codex|copilot|zcode>
|
|
326
334
|
mancode list-platforms
|
|
327
335
|
mancode workflow create <man|manba|manteam> "<task>" [--parent-task <taskId>]
|
|
328
|
-
mancode workflow
|
|
336
|
+
mancode workflow requirements <taskId> finalize --file <requirements-input.json>
|
|
337
|
+
mancode workflow update <taskId> [--step N] [--status in_progress|planned|completed|blocked|abandoned] [--requirements-status ready|needs_clarification] [--blocking-reason "<reason>"] [--outcome fixed|verified|no_repro|manual_test_required] [--plan-version N] [--skipped clarification]
|
|
338
|
+
mancode workflow decide <taskId> --plan-decision plan_only|governed_execution
|
|
339
|
+
mancode workflow handoff <taskId> --to solo
|
|
340
|
+
mancode workflow handoff <taskId> --complete
|
|
341
|
+
mancode workflow verify <taskId> init
|
|
342
|
+
mancode workflow verify <taskId> record --acceptance AC-1 --method automated --result passed|failed --evidence "<summary>" --command "<command>" --exit-code <code> [--evidence-file <path>]
|
|
343
|
+
mancode workflow verify <taskId> require-manual --acceptance AC-1 --evidence "<reason>"
|
|
344
|
+
mancode workflow verify <taskId> confirm-manual --acceptance AC-1 --evidence "<user confirmation>"
|
|
345
|
+
mancode workflow verify <taskId> show [--json]
|
|
329
346
|
mancode workflow review <taskId> init --review-depth <targeted|full> [--review-domain <quality|security>]
|
|
330
347
|
mancode workflow review <taskId> complete --review-domain <quality|security> --report <path> [--blockers Q1,Q2]
|
|
331
348
|
mancode workflow review <taskId> remediate --resolved Q1,Q2
|
|
349
|
+
mancode workflow review <taskId> skip --reason "<用户明确理由>"
|
|
332
350
|
mancode workflow review <taskId> show [--json]
|
|
333
351
|
mancode workflow list [--json]
|
|
334
352
|
mancode workflow show <taskId> [--json]
|
|
@@ -345,7 +363,7 @@ mancode version
|
|
|
345
363
|
以下是 UI 项目的输出示例,并非默认技术栈:
|
|
346
364
|
|
|
347
365
|
```text
|
|
348
|
-
mancode v0.3.
|
|
366
|
+
mancode v0.3.8
|
|
349
367
|
|
|
350
368
|
Project: my-app (React + TypeScript + Tailwind)
|
|
351
369
|
Mode: solo (default)
|
|
@@ -405,11 +423,14 @@ mancode status --json
|
|
|
405
423
|
|
|
406
424
|
### `mancode workflow`
|
|
407
425
|
|
|
408
|
-
创建和管理 `/manba`、`/man` 和 `/manteam` 使用的受校验 workflow
|
|
426
|
+
创建和管理 `/manba`、`/man` 和 `/manteam` 使用的受校验 workflow 元数据。新 `/man`/`/manteam` 任务通过七项 coverage、结构化需求和验收 ID 固化范围;自动验证记录命令与退出码。remediation 会让旧证据失效,必须在 Step 9 重新登记全部 required 验收。人工验收会阻塞流程,直到记录用户明确确认。跳过 review 只能在 Step 6 使用专用 skip 命令并记录理由;targeted 的第二领域是不适用。
|
|
409
427
|
|
|
410
428
|
```bash
|
|
411
429
|
mancode workflow create man "refactor auth module"
|
|
430
|
+
mancode workflow requirements <taskId> finalize --file requirements-input.json
|
|
412
431
|
mancode workflow update <taskId> --step 4 --plan-version 2
|
|
432
|
+
mancode workflow verify <taskId> init
|
|
433
|
+
mancode workflow verify <taskId> record --acceptance AC-1 --method automated --result passed --evidence "tests passed" --command "npm test" --exit-code 0
|
|
413
434
|
mancode workflow review <taskId> init --review-depth full
|
|
414
435
|
mancode workflow review <taskId> complete --review-domain quality --report film-report-1.md --blockers Q1
|
|
415
436
|
mancode workflow review <taskId> remediate --resolved Q1
|