mancode 0.2.0 → 0.3.0
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 +78 -57
- package/README.zh-CN.md +62 -52
- package/dist/cli.js +1780 -774
- package/dist/cli.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
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
|
-
<img src="https://img.shields.io/badge/status-stable%20v0.2.
|
|
19
|
+
<img src="https://img.shields.io/badge/status-stable%20v0.2.1-green?style=flat-square" alt="Status: stable v0.2.1" />
|
|
20
20
|
<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 CLI, GitHub Copilot, ZCode" />
|
|
21
|
-
<img src="https://img.shields.io/badge/tests-
|
|
21
|
+
<img src="https://img.shields.io/badge/tests-364%20passed-brightgreen?style=flat-square" alt="Tests: 364 passed" />
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
24
|
<p align="center">
|
|
@@ -43,10 +43,10 @@ mancode installs three things:
|
|
|
43
43
|
|
|
44
44
|
1. **Hooks** that inject project context, design tokens, and YAGNI checks into
|
|
45
45
|
agent prompts.
|
|
46
|
-
2. **Skills / modes** for `solo`, `/
|
|
46
|
+
2. **Skills / modes** for `solo`, `/mamba`, `/man`, `/manteam`, `/manps`, and
|
|
47
47
|
`/mansolo`.
|
|
48
|
-
3. **Coaching-staff subagents**: Scout, Head Coach, Film Analyst
|
|
49
|
-
Film Analyst (Defense).
|
|
48
|
+
3. **Coaching-staff subagents**: Scout, Plan Coach, Head Coach, Film Analyst
|
|
49
|
+
(Offense), and Film Analyst (Defense).
|
|
50
50
|
|
|
51
51
|
Use mancode when an AI coding agent writes too much code, ignores your existing
|
|
52
52
|
UI system, skips planning, or needs a repeatable engineering workflow for
|
|
@@ -82,9 +82,9 @@ testing, and multi-agent review: playoffs, every possession counts.
|
|
|
82
82
|
.claude/ # Claude Code: hooks, skills, agents
|
|
83
83
|
.cursor/rules/ # Cursor: project rules
|
|
84
84
|
AGENTS.md # Codex CLI: managed instruction block
|
|
85
|
-
.
|
|
85
|
+
.agents/skills/ # Codex CLI: mode skills
|
|
86
86
|
.github/copilot-instructions.md # GitHub Copilot: managed instruction block
|
|
87
|
-
.
|
|
87
|
+
.agents/skills/ # ZCode: project mode skills
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
`.mancode/` stores local state, project style signals, workflow reports, and
|
|
@@ -95,9 +95,10 @@ coding agent reads.
|
|
|
95
95
|
|
|
96
96
|
- **Reduce AI over-engineering**: prefer existing code, standard libraries,
|
|
97
97
|
installed dependencies, and one-line fixes before writing new abstractions.
|
|
98
|
-
- **Match
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
- **Match an existing UI system when present**: inspect project UI dependencies,
|
|
99
|
+
Tailwind configuration, CSS variables, and components so the agent reuses
|
|
100
|
+
established colors, fonts, and interaction patterns.
|
|
101
|
+
- **Add structured AI code review**: use `/man` for a 9-step workflow with
|
|
101
102
|
research, plan approval, implementation, tests, and dual review.
|
|
102
103
|
- **Keep workflow artifacts on disk**: save research, plans, review reports,
|
|
103
104
|
and summaries under `.mancode/workflows/<taskId>/`.
|
|
@@ -110,12 +111,12 @@ coding agent reads.
|
|
|
110
111
|
|
|
111
112
|
mancode is useful for:
|
|
112
113
|
|
|
113
|
-
- Developers using AI coding agents on
|
|
114
|
+
- Developers using AI coding agents on backend, web, mobile, desktop, CLI,
|
|
115
|
+
library, data, or mixed projects
|
|
114
116
|
- Claude Code users who want hooks, skills, and subagents today
|
|
115
117
|
- Teams that want AI agents to reuse existing components and patterns
|
|
116
118
|
- Projects that need a repeatable AI-assisted code review workflow
|
|
117
|
-
-
|
|
118
|
-
conventions
|
|
119
|
+
- UI codebases with existing design conventions (when a UI is present)
|
|
119
120
|
- Teams that want local workflow memory without telemetry
|
|
120
121
|
|
|
121
122
|
mancode is not a replacement for your coding agent. It is a workflow layer that
|
|
@@ -136,19 +137,22 @@ design tokens:
|
|
|
136
137
|
</Button>
|
|
137
138
|
```
|
|
138
139
|
|
|
139
|
-
The default workflow asks
|
|
140
|
+
The default workflow asks six questions before writing code:
|
|
140
141
|
|
|
141
142
|
1. What problem does this change solve?
|
|
142
143
|
2. Can an existing implementation be reused?
|
|
143
144
|
3. What is the smallest change that works?
|
|
145
|
+
4. Can this avoid a new subsystem?
|
|
146
|
+
5. What is the smallest meaningful runtime check?
|
|
147
|
+
6. What remains uncertain after checking the code and docs?
|
|
144
148
|
|
|
145
149
|
## Modes
|
|
146
150
|
|
|
147
151
|
| Mode | Best For | What It Does |
|
|
148
152
|
|---|---|---|
|
|
149
153
|
| `solo` | Daily coding · practice day | Lightweight hooks, style awareness, and YAGNI checks |
|
|
150
|
-
| `/
|
|
151
|
-
| `/man` | Production or high-risk changes · playoffs | Full
|
|
154
|
+
| `/mamba` | Diagnosis and real validation · Mamba mentality | Reproduces defects, finds root causes, drives real user flows, and runs regression checks |
|
|
155
|
+
| `/man` | Production or high-risk changes · playoffs | Full 9-step workflow with dual multi-agent review |
|
|
152
156
|
| `/manteam` | Team projects · five on the floor, one mind | Shared memory, decisions, coordination, and Conventional Commits |
|
|
153
157
|
| `/manps` | Cleanup and maintenance · preseason | Project health scan with Markdown and JSON reports |
|
|
154
158
|
| `/mansolo` | Returning to default mode | Resets current mode back to `solo` |
|
|
@@ -156,18 +160,17 @@ The default workflow asks three questions before writing code:
|
|
|
156
160
|
## How `/man` Works: Playoffs Mode
|
|
157
161
|
|
|
158
162
|
`/man` is playoffs mode for production work. It creates a durable workflow under
|
|
159
|
-
`.mancode/workflows/<taskId>/` and moves through
|
|
160
|
-
|
|
161
|
-
1. **Scout report**:
|
|
162
|
-
2. **
|
|
163
|
-
3. **Plan
|
|
164
|
-
4. **
|
|
165
|
-
5. **
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
8. **Post-game summary**: final summary, skipped steps, and artifact locations.
|
|
163
|
+
`.mancode/workflows/<taskId>/` and moves through nine steps:
|
|
164
|
+
|
|
165
|
+
1. **Scout report**: maps existing code, risks, and unknowns.
|
|
166
|
+
2. **Clarification**: resolves requirements in up to two rounds.
|
|
167
|
+
3. **Plan**: Plan Coach creates a durable, verifiable plan.
|
|
168
|
+
4. **Plan gate**: choose plan-only, execution, or plan revision.
|
|
169
|
+
5. **Implementation**: Head Coach applies the confirmed plan.
|
|
170
|
+
6. **Validation**: build, lint, tests, smoke checks, and `/mamba` when real diagnosis is needed.
|
|
171
|
+
7. **Film session 1**: code quality review and fixes.
|
|
172
|
+
8. **Film session 2**: security and boundary review.
|
|
173
|
+
9. **Wrap-up**: final verification, summary, workflow status, and memory updates.
|
|
171
174
|
|
|
172
175
|
Skipped steps are recorded. Artifacts remain on disk so you can inspect why a
|
|
173
176
|
decision was made later.
|
|
@@ -189,7 +192,10 @@ rules or instruction files that carry the same practice rules and mode guidance.
|
|
|
189
192
|
|
|
190
193
|
### Design Token Awareness
|
|
191
194
|
|
|
192
|
-
mancode
|
|
195
|
+
mancode first writes `.mancode/project-profile.json` from detected project facts.
|
|
196
|
+
It can work with backend services, web applications, mobile apps, desktop apps,
|
|
197
|
+
CLIs, libraries, and mixed repositories; it does not assume a JavaScript or UI
|
|
198
|
+
stack. It scans signals such as:
|
|
193
199
|
|
|
194
200
|
```text
|
|
195
201
|
tailwind.config.js
|
|
@@ -199,13 +205,14 @@ src/components/
|
|
|
199
205
|
|
|
200
206
|
It detects common signals:
|
|
201
207
|
|
|
202
|
-
-
|
|
203
|
-
- UI libraries
|
|
204
|
-
- Design
|
|
208
|
+
- Languages, manifests, source roots, and available validation commands
|
|
209
|
+
- UI assets and UI libraries when they are actually detected (for example, a web UI)
|
|
210
|
+
- Design signals: colors, fonts, CSS variables, and components
|
|
205
211
|
- Team status: contributor count and team-mode hints
|
|
206
212
|
|
|
207
|
-
For
|
|
208
|
-
design tokens instead of inventing generic styles.
|
|
213
|
+
For UI work in a project with detected UI assets, the agent is nudged to reuse
|
|
214
|
+
existing components and design tokens instead of inventing generic styles.
|
|
215
|
+
For other project types, it follows the detected runtime and validation path.
|
|
209
216
|
|
|
210
217
|
### YAGNI Ladder
|
|
211
218
|
|
|
@@ -234,7 +241,7 @@ it should behave, and why previous decisions were made.
|
|
|
234
241
|
|
|
235
242
|
## Installation
|
|
236
243
|
|
|
237
|
-
**Status**: stable v0.2.
|
|
244
|
+
**Status**: stable v0.2.1. Claude Code, Cursor, Codex CLI, and GitHub Copilot
|
|
238
245
|
are supported. ZCode adapter support is included, with project skill discovery
|
|
239
246
|
kept behind a verification gate before release.
|
|
240
247
|
|
|
@@ -252,7 +259,7 @@ Supported platforms:
|
|
|
252
259
|
- Codex CLI: managed `AGENTS.md` block
|
|
253
260
|
- GitHub Copilot: managed `.github/copilot-instructions.md` block
|
|
254
261
|
- ZCode: managed `AGENTS.md` block and provisional `$man*` skills in
|
|
255
|
-
`.
|
|
262
|
+
`.agents/skills/`; project skill discovery and slash commands pending verified
|
|
256
263
|
workspace paths
|
|
257
264
|
- Windsurf, Cline, Roo Code: planned later
|
|
258
265
|
|
|
@@ -272,8 +279,8 @@ mancode install --minimal # Install only solo-mode essentials
|
|
|
272
279
|
## Agent Modes
|
|
273
280
|
|
|
274
281
|
```bash
|
|
275
|
-
/
|
|
276
|
-
/man # Full
|
|
282
|
+
/mamba # Diagnose bugs and validate real user flows
|
|
283
|
+
/man # Full 9-step workflow with dual review
|
|
277
284
|
/manps # Project health check
|
|
278
285
|
/manteam # Team mode and shared memory
|
|
279
286
|
/mansolo # Return to solo mode
|
|
@@ -287,10 +294,10 @@ mancode status
|
|
|
287
294
|
mancode status --json
|
|
288
295
|
mancode install <claude-code|cursor|codex|copilot|zcode>
|
|
289
296
|
mancode list-platforms
|
|
290
|
-
mancode workflow create <
|
|
291
|
-
mancode workflow update <taskId> [--step N] [--status in_progress|completed|abandoned]
|
|
292
|
-
mancode workflow list
|
|
293
|
-
mancode workflow show <taskId>
|
|
297
|
+
mancode workflow create <man|mamba|manteam> "<task>" [--parent-task <taskId>]
|
|
298
|
+
mancode workflow update <taskId> [--step N] [--status in_progress|planned|completed|blocked|abandoned] [--blocking-reason "<reason>"] [--outcome fixed|verified|no_repro|manual_test_required] [--plan-version N] [--skipped a,b]
|
|
299
|
+
mancode workflow list [--json]
|
|
300
|
+
mancode workflow show <taskId> [--json]
|
|
294
301
|
mancode workflow clean [--older-than 30d] [--dry-run]
|
|
295
302
|
mancode manps [area]
|
|
296
303
|
mancode refresh-style
|
|
@@ -301,6 +308,8 @@ mancode version
|
|
|
301
308
|
|
|
302
309
|
### `mancode status`
|
|
303
310
|
|
|
311
|
+
Example output for a UI project (not a default stack):
|
|
312
|
+
|
|
304
313
|
```text
|
|
305
314
|
mancode v0.2.0
|
|
306
315
|
|
|
@@ -320,9 +329,9 @@ Installed platforms:
|
|
|
320
329
|
Platform status:
|
|
321
330
|
✓ Claude Code: ready (.claude/)
|
|
322
331
|
✓ Cursor: ready (.cursor/rules/)
|
|
323
|
-
✓ Codex CLI: ready (AGENTS.md + .
|
|
332
|
+
✓ Codex CLI: ready (AGENTS.md + .agents/skills/)
|
|
324
333
|
✓ GitHub Copilot: ready (.github/copilot-instructions.md)
|
|
325
|
-
✓ ZCode: ready (AGENTS.md + .
|
|
334
|
+
✓ ZCode: ready (AGENTS.md + .agents/skills/)
|
|
326
335
|
|
|
327
336
|
Hooks:
|
|
328
337
|
✓ session-start.sh
|
|
@@ -364,12 +373,16 @@ mancode status --json
|
|
|
364
373
|
|
|
365
374
|
### `mancode workflow`
|
|
366
375
|
|
|
367
|
-
Creates and manages workflow metadata used by `/
|
|
376
|
+
Creates and manages validated workflow metadata used by `/mamba`, `/man`, and
|
|
377
|
+
`/manteam`. A linked `/mamba` child can only be created while its parent is
|
|
378
|
+
active at Step 6.
|
|
368
379
|
|
|
369
380
|
```bash
|
|
370
381
|
mancode workflow create man "refactor auth module"
|
|
371
|
-
mancode workflow update <taskId> --step 4
|
|
372
|
-
mancode workflow
|
|
382
|
+
mancode workflow update <taskId> --step 4 --plan-version 2
|
|
383
|
+
mancode workflow create mamba "verify auth regression" --parent-task <taskId>
|
|
384
|
+
mancode workflow update <mambaTaskId> --status completed --outcome verified
|
|
385
|
+
mancode workflow show <taskId> --json
|
|
373
386
|
mancode workflow clean --older-than 30d --dry-run
|
|
374
387
|
```
|
|
375
388
|
|
|
@@ -395,10 +408,12 @@ Outputs:
|
|
|
395
408
|
|
|
396
409
|
### `mancode refresh-style`
|
|
397
410
|
|
|
398
|
-
|
|
411
|
+
Refreshes the project profile and, when UI assets are detected, rescans design
|
|
412
|
+
tokens. It updates:
|
|
399
413
|
|
|
400
414
|
```text
|
|
401
415
|
.mancode/aesthetics/style-tokens.json
|
|
416
|
+
.mancode/project-profile.json
|
|
402
417
|
```
|
|
403
418
|
|
|
404
419
|
Claude Code reads refreshed tokens through hooks. Cursor, Codex CLI, and GitHub
|
|
@@ -420,13 +435,15 @@ mancode/
|
|
|
420
435
|
│
|
|
421
436
|
├── Skills
|
|
422
437
|
│ ├── solo/SKILL.md
|
|
423
|
-
│ ├──
|
|
438
|
+
│ ├── mamba/SKILL.md
|
|
424
439
|
│ ├── man/SKILL.md
|
|
425
440
|
│ ├── manteam/SKILL.md
|
|
426
|
-
│
|
|
441
|
+
│ ├── manps/SKILL.md
|
|
442
|
+
│ └── mansolo/SKILL.md
|
|
427
443
|
│
|
|
428
444
|
└── Subagents
|
|
429
445
|
├── Scout
|
|
446
|
+
├── Plan Coach
|
|
430
447
|
├── Head Coach
|
|
431
448
|
├── Film Analyst (Offense)
|
|
432
449
|
└── Film Analyst (Defense)
|
|
@@ -437,7 +454,9 @@ mancode/
|
|
|
437
454
|
- mancode is local-first.
|
|
438
455
|
- Scans are written under `.mancode/`.
|
|
439
456
|
- No telemetry is sent by mancode.
|
|
440
|
-
-
|
|
457
|
+
- mancode does not rewrite your project's `.gitignore`. Review `.mancode/`
|
|
458
|
+
before committing and ignore local workflow evidence or browser artifacts
|
|
459
|
+
that may contain sensitive data.
|
|
441
460
|
- `/manps` scans only; remediation should be explicitly confirmed before code
|
|
442
461
|
changes.
|
|
443
462
|
- Irreversible operations such as force pushes, schema migrations, and bulk
|
|
@@ -448,7 +467,7 @@ mancode/
|
|
|
448
467
|
| Phase | Focus |
|
|
449
468
|
|---|---|
|
|
450
469
|
| MVP-1 | solo mode, aesthetics, and Claude Code hooks |
|
|
451
|
-
| MVP-2 | `/
|
|
470
|
+
| MVP-2 | `/mamba`, `/man`, `/manteam`, `/manps`, and coaching-staff subagents |
|
|
452
471
|
| MVP-3 | Cursor, Codex CLI, and GitHub Copilot adapters |
|
|
453
472
|
| Public Release | stable npm release, marketplace distribution, docs, and demos |
|
|
454
473
|
|
|
@@ -456,8 +475,10 @@ mancode/
|
|
|
456
475
|
|
|
457
476
|
### `mancode init` says "not a project directory"
|
|
458
477
|
|
|
459
|
-
mancode requires either a `.git` directory or a
|
|
460
|
-
|
|
478
|
+
mancode requires either a `.git` directory or a recognized project manifest
|
|
479
|
+
(such as `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `pom.xml`,
|
|
480
|
+
`build.gradle`, `build.gradle.kts`, `Package.swift`, or `pubspec.yaml`). Run `mancode init` inside
|
|
481
|
+
a git repository or a supported project directory.
|
|
461
482
|
|
|
462
483
|
### Claude Code hooks not triggering
|
|
463
484
|
|
|
@@ -480,7 +501,7 @@ markers is preserved.
|
|
|
480
501
|
|
|
481
502
|
### ZCode skills not appearing
|
|
482
503
|
|
|
483
|
-
Ensure `.
|
|
504
|
+
Ensure `.agents/skills/mamba/SKILL.md` through `.agents/skills/mansolo/SKILL.md`
|
|
484
505
|
exist, then restart or refresh ZCode. ZCode slash commands are not generated
|
|
485
506
|
yet because the workspace command file path still needs explicit verification.
|
|
486
507
|
|
|
@@ -488,8 +509,8 @@ yet because the workspace command file path still needs explicit verification.
|
|
|
488
509
|
|
|
489
510
|
Ensure the `.cursor/rules/mancode-*.mdc` files exist. Rules with
|
|
490
511
|
`alwaysApply: true` (context, practice, solo) load on every conversation.
|
|
491
|
-
Mode-specific rules (
|
|
492
|
-
description field — invoke them by asking for `/
|
|
512
|
+
Mode-specific rules (mamba, man, manteam, manps) trigger based on the
|
|
513
|
+
description field — invoke them by asking for `/mamba` or similar.
|
|
493
514
|
|
|
494
515
|
### How to do a clean reinstall
|
|
495
516
|
|
package/README.zh-CN.md
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
<p align="center">
|
|
17
17
|
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-AGPL--3.0-blue.svg?style=flat-square" alt="许可证:AGPL-3.0" /></a>
|
|
18
|
-
<img src="https://img.shields.io/badge/status-stable%20v0.2.
|
|
18
|
+
<img src="https://img.shields.io/badge/status-stable%20v0.2.1-green?style=flat-square" alt="状态:稳定版 v0.2.1" />
|
|
19
19
|
<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、Codex CLI、GitHub Copilot、ZCode" />
|
|
20
|
-
<img src="https://img.shields.io/badge/tests-
|
|
20
|
+
<img src="https://img.shields.io/badge/tests-364%20passed-brightgreen?style=flat-square" alt="测试:364 通过" />
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
23
|
<p align="center">
|
|
@@ -39,10 +39,10 @@ skills 或 instructions 文件提供降级适配。
|
|
|
39
39
|
mancode 会安装三类能力:
|
|
40
40
|
|
|
41
41
|
1. **Hooks**:在 agent 提示词中注入项目上下文、设计 token 和 YAGNI 检查。
|
|
42
|
-
2. **Skills / modes**:提供 `solo`、`/
|
|
42
|
+
2. **Skills / modes**:提供 `solo`、`/mamba`、`/man`、`/manteam`、`/manps`、
|
|
43
43
|
`/mansolo` 工作流模式。
|
|
44
|
-
3. **教练组 subagents**:Scout、Head Coach、Film Analyst
|
|
45
|
-
Film Analyst (Defense)。
|
|
44
|
+
3. **教练组 subagents**:Scout、Plan Coach、Head Coach、Film Analyst
|
|
45
|
+
(Offense) 和 Film Analyst (Defense)。
|
|
46
46
|
|
|
47
47
|
当 AI 编码代理写太多代码、忽略已有 UI 系统、跳过计划,或者关键改动需要稳定工程流程时,
|
|
48
48
|
mancode 可以作为一层本地工作流约束。
|
|
@@ -76,9 +76,9 @@ mancode init
|
|
|
76
76
|
.claude/ # Claude Code:hooks、skills、agents
|
|
77
77
|
.cursor/rules/ # Cursor:项目 rules
|
|
78
78
|
AGENTS.md # Codex CLI:托管 instruction block
|
|
79
|
-
.
|
|
79
|
+
.agents/skills/ # Codex CLI:mode skills
|
|
80
80
|
.github/copilot-instructions.md # GitHub Copilot:托管 instruction block
|
|
81
|
-
.
|
|
81
|
+
.agents/skills/ # ZCode:项目 mode skills
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
`.mancode/` 保存本地状态、项目风格信号、工作流报告和团队记忆。平台文件保存对应
|
|
@@ -87,8 +87,8 @@ AGENTS.md # Codex CLI:托管 instruction block
|
|
|
87
87
|
## 为什么使用 mancode?
|
|
88
88
|
|
|
89
89
|
- **减少 AI 过度设计**:先复用已有代码、标准库、已安装依赖和一行修复,再考虑新增抽象。
|
|
90
|
-
-
|
|
91
|
-
- **加入结构化 AI 代码审查**:`/man` 提供
|
|
90
|
+
- **在存在 UI 时匹配现有设计系统**:检查项目 UI 依赖、Tailwind 配置、CSS 变量和已有组件,让 agent 复用现有颜色、字体和交互模式。
|
|
91
|
+
- **加入结构化 AI 代码审查**:`/man` 提供 9 步流程,包括调研、计划审批、实现、测试和双重审查。
|
|
92
92
|
- **保留工作流产物**:调研、计划、审查报告和总结会保存到 `.mancode/workflows/<taskId>/`。
|
|
93
93
|
- **支持团队记忆**:`/manteam` 读写 `.mancode/memory/` 下的共享项目上下文。
|
|
94
94
|
- **扫描项目健康度**:`mancode manps` 检测陈旧 TODO、未使用依赖、风险依赖和硬编码设计值。
|
|
@@ -97,11 +97,11 @@ AGENTS.md # Codex CLI:托管 instruction block
|
|
|
97
97
|
|
|
98
98
|
mancode 适合:
|
|
99
99
|
|
|
100
|
-
- 正在使用 AI
|
|
100
|
+
- 正在使用 AI 编码代理的后端、Web、移动端、桌面端、CLI、库、数据或混合项目
|
|
101
101
|
- 当前希望在 Claude Code 中使用 hooks、skills 和 subagents 的用户
|
|
102
102
|
- 希望 AI 代理复用已有组件和代码模式的团队
|
|
103
103
|
- 需要可重复 AI 辅助代码审查流程的项目
|
|
104
|
-
-
|
|
104
|
+
- 已有 UI 组件、主题、CSS 变量或设计约定的界面项目
|
|
105
105
|
- 希望保留本地团队记忆、但不希望引入遥测的团队
|
|
106
106
|
|
|
107
107
|
mancode 不是 Claude Code、Cursor、Codex CLI 或 Copilot 的替代品。它是在现有 agent
|
|
@@ -120,19 +120,22 @@ mancode 不是 Claude Code、Cursor、Codex CLI 或 Copilot 的替代品。它
|
|
|
120
120
|
</Button>
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
默认工作流会在写代码前推动 agent
|
|
123
|
+
默认工作流会在写代码前推动 agent 思考六个问题:
|
|
124
124
|
|
|
125
125
|
1. 这个改动解决什么问题?
|
|
126
126
|
2. 能否复用已有实现?
|
|
127
127
|
3. 最小可行改动是什么?
|
|
128
|
+
4. 能否不拆新系统?
|
|
129
|
+
5. 非平凡逻辑怎样做最小运行验证?
|
|
130
|
+
6. 有什么没把握的(先自查,仍不确定再问用户)?
|
|
128
131
|
|
|
129
132
|
## 模式
|
|
130
133
|
|
|
131
134
|
| 模式 | 适合场景 | 做什么 |
|
|
132
135
|
|---|---|---|
|
|
133
136
|
| `solo` | 日常编码 · 日常训练 | 轻量 hooks、风格感知、YAGNI 检查 |
|
|
134
|
-
| `/
|
|
135
|
-
| `/man` | 生产级或高风险改动 · 季后赛 | 完整
|
|
137
|
+
| `/mamba` | 诊断与真实验证 · 曼巴心态 | 复现缺陷、定位根因、驱动真实用户路径并执行回归检查 |
|
|
138
|
+
| `/man` | 生产级或高风险改动 · 季后赛 | 完整 9 步工作流和双重多 agent 审查 |
|
|
136
139
|
| `/manteam` | 团队项目 · 上场五人,一条心 | 共享记忆、决策记录、协作和 Conventional Commits |
|
|
137
140
|
| `/manps` | 清理和维护 · 季前赛 | 输出 Markdown 和 JSON 项目健康报告 |
|
|
138
141
|
| `/mansolo` | 回到默认模式 | 将当前模式重置为 `solo` |
|
|
@@ -140,16 +143,17 @@ mancode 不是 Claude Code、Cursor、Codex CLI 或 Copilot 的替代品。它
|
|
|
140
143
|
## `/man` 如何工作:季后赛模式
|
|
141
144
|
|
|
142
145
|
`/man` 是面向关键任务的季后赛模式。它会在 `.mancode/workflows/<taskId>/`
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
1.
|
|
146
|
-
2.
|
|
147
|
-
3.
|
|
148
|
-
4.
|
|
149
|
-
5.
|
|
150
|
-
6.
|
|
151
|
-
7. **录像分析
|
|
152
|
-
8.
|
|
146
|
+
下创建可追溯工作流,并推进九个步骤:
|
|
147
|
+
|
|
148
|
+
1. **球探报告**:梳理既有代码、风险和未知项。
|
|
149
|
+
2. **需求澄清**:最多两轮确认需求。
|
|
150
|
+
3. **计划**:Plan Coach 输出可验证的持久计划。
|
|
151
|
+
4. **计划关卡**:选择只要计划、继续执行或修改计划。
|
|
152
|
+
5. **实施**:Head Coach 按确认计划实现。
|
|
153
|
+
6. **验证**:build、lint、test、smoke test;需要真实诊断时使用 `/mamba`。
|
|
154
|
+
7. **录像分析 1**:代码质量审查与修复。
|
|
155
|
+
8. **录像分析 2**:安全与边界审查。
|
|
156
|
+
9. **收尾**:最终复验、summary、workflow 状态和 memory 更新。
|
|
153
157
|
|
|
154
158
|
跳过的步骤会被记录。所有产物保留在本地,之后可以回看当时为什么做某个决策。
|
|
155
159
|
|
|
@@ -168,7 +172,7 @@ rules 或 instruction 文件,把同一套实践规则和模式指导带过去
|
|
|
168
172
|
|
|
169
173
|
### 设计 Token 感知
|
|
170
174
|
|
|
171
|
-
mancode
|
|
175
|
+
mancode 会先把检测到的项目事实写入 `.mancode/project-profile.json`。它可用于后端服务、Web、移动端、桌面端、CLI、库和混合仓库;不会预设 JavaScript 或 UI 技术栈。它会扫描如下信号:
|
|
172
176
|
|
|
173
177
|
```text
|
|
174
178
|
tailwind.config.js
|
|
@@ -178,12 +182,12 @@ src/components/
|
|
|
178
182
|
|
|
179
183
|
它会检测常见信号:
|
|
180
184
|
|
|
181
|
-
-
|
|
182
|
-
- UI
|
|
183
|
-
-
|
|
185
|
+
- 语言、manifest、源码目录和可用验证命令
|
|
186
|
+
- 仅在确实检测到时记录 UI 资产和 UI 库(例如 Web UI)
|
|
187
|
+
- 设计信号:颜色、字体、CSS 变量和组件
|
|
184
188
|
- 团队状态:贡献者数量和团队模式提示
|
|
185
189
|
|
|
186
|
-
|
|
190
|
+
只有在 profile 确认存在 UI 资产且任务涉及界面时,mancode 才会推动 agent 复用已有组件和设计 token,而不是生成通用样式。其他项目类型则遵循已检测到的运行时和验证路径。
|
|
187
191
|
|
|
188
192
|
### YAGNI 阶梯
|
|
189
193
|
|
|
@@ -211,7 +215,7 @@ src/components/
|
|
|
211
215
|
|
|
212
216
|
## 安装
|
|
213
217
|
|
|
214
|
-
**状态**:稳定版 v0.2.
|
|
218
|
+
**状态**:稳定版 v0.2.1。Claude Code、Cursor、Codex CLI 和 GitHub Copilot
|
|
215
219
|
均已支持。ZCode adapter 已接入,但项目级 skill 发现路径在发布前仍作为验证门禁。
|
|
216
220
|
|
|
217
221
|
```bash
|
|
@@ -227,7 +231,7 @@ mancode init --platform cursor
|
|
|
227
231
|
- Cursor:`.cursor/rules/*.mdc` rules
|
|
228
232
|
- Codex CLI:托管 `AGENTS.md` block
|
|
229
233
|
- GitHub Copilot:托管 `.github/copilot-instructions.md` block
|
|
230
|
-
- ZCode:托管 `AGENTS.md` block,并暂按 `.
|
|
234
|
+
- ZCode:托管 `AGENTS.md` block,并暂按 `.agents/skills/` 生成 `$man*`
|
|
231
235
|
skills;项目级 skill 发现和 slash commands 仍需确认 workspace 路径后再发布承诺
|
|
232
236
|
- Windsurf、Cline、Roo Code:后续计划
|
|
233
237
|
|
|
@@ -247,8 +251,8 @@ mancode install --minimal # 只安装 solo 必需文件
|
|
|
247
251
|
## Agent Modes
|
|
248
252
|
|
|
249
253
|
```bash
|
|
250
|
-
/
|
|
251
|
-
/man # 完整
|
|
254
|
+
/mamba # 定位 bug 并验证真实用户路径
|
|
255
|
+
/man # 完整 9 步流程和双重审查
|
|
252
256
|
/manps # 项目健康检查
|
|
253
257
|
/manteam # 团队模式和共享记忆
|
|
254
258
|
/mansolo # 回到 solo 模式
|
|
@@ -262,10 +266,10 @@ mancode status
|
|
|
262
266
|
mancode status --json
|
|
263
267
|
mancode install <claude-code|cursor|codex|copilot|zcode>
|
|
264
268
|
mancode list-platforms
|
|
265
|
-
mancode workflow create <
|
|
266
|
-
mancode workflow update <taskId> [--step N] [--status in_progress|completed|abandoned]
|
|
267
|
-
mancode workflow list
|
|
268
|
-
mancode workflow show <taskId>
|
|
269
|
+
mancode workflow create <man|mamba|manteam> "<task>" [--parent-task <taskId>]
|
|
270
|
+
mancode workflow update <taskId> [--step N] [--status in_progress|planned|completed|blocked|abandoned] [--blocking-reason "<reason>"] [--outcome fixed|verified|no_repro|manual_test_required] [--plan-version N] [--skipped a,b]
|
|
271
|
+
mancode workflow list [--json]
|
|
272
|
+
mancode workflow show <taskId> [--json]
|
|
269
273
|
mancode workflow clean [--older-than 30d] [--dry-run]
|
|
270
274
|
mancode manps [area]
|
|
271
275
|
mancode refresh-style
|
|
@@ -276,6 +280,8 @@ mancode version
|
|
|
276
280
|
|
|
277
281
|
### `mancode status`
|
|
278
282
|
|
|
283
|
+
以下是 UI 项目的输出示例,并非默认技术栈:
|
|
284
|
+
|
|
279
285
|
```text
|
|
280
286
|
mancode v0.2.0
|
|
281
287
|
|
|
@@ -295,9 +301,9 @@ Installed platforms:
|
|
|
295
301
|
Platform status:
|
|
296
302
|
✓ Claude Code: ready (.claude/)
|
|
297
303
|
✓ Cursor: ready (.cursor/rules/)
|
|
298
|
-
✓ Codex CLI: ready (AGENTS.md + .
|
|
304
|
+
✓ Codex CLI: ready (AGENTS.md + .agents/skills/)
|
|
299
305
|
✓ GitHub Copilot: ready (.github/copilot-instructions.md)
|
|
300
|
-
✓ ZCode: ready (AGENTS.md + .
|
|
306
|
+
✓ ZCode: ready (AGENTS.md + .agents/skills/)
|
|
301
307
|
|
|
302
308
|
Hooks:
|
|
303
309
|
✓ session-start.sh
|
|
@@ -337,12 +343,14 @@ mancode status --json
|
|
|
337
343
|
|
|
338
344
|
### `mancode workflow`
|
|
339
345
|
|
|
340
|
-
创建和管理 `/
|
|
346
|
+
创建和管理 `/mamba`、`/man` 和 `/manteam` 使用的受校验 workflow 元数据。关联 `/mamba` 子任务只能在父任务处于 Step 6 且正在进行时创建。
|
|
341
347
|
|
|
342
348
|
```bash
|
|
343
349
|
mancode workflow create man "refactor auth module"
|
|
344
|
-
mancode workflow update <taskId> --step 4
|
|
345
|
-
mancode workflow
|
|
350
|
+
mancode workflow update <taskId> --step 4 --plan-version 2
|
|
351
|
+
mancode workflow create mamba "verify auth regression" --parent-task <taskId>
|
|
352
|
+
mancode workflow update <mambaTaskId> --status completed --outcome verified
|
|
353
|
+
mancode workflow show <taskId> --json
|
|
346
354
|
mancode workflow clean --older-than 30d --dry-run
|
|
347
355
|
```
|
|
348
356
|
|
|
@@ -368,10 +376,11 @@ mancode manps config
|
|
|
368
376
|
|
|
369
377
|
### `mancode refresh-style`
|
|
370
378
|
|
|
371
|
-
|
|
379
|
+
刷新项目 profile;检测到 UI 资产时,还会重新扫描设计 token。它会更新:
|
|
372
380
|
|
|
373
381
|
```text
|
|
374
382
|
.mancode/aesthetics/style-tokens.json
|
|
383
|
+
.mancode/project-profile.json
|
|
375
384
|
```
|
|
376
385
|
|
|
377
386
|
Claude Code 会通过 hooks 读取刷新后的 token。Cursor、Codex CLI 和 GitHub Copilot 使用静态生成的
|
|
@@ -393,13 +402,15 @@ mancode/
|
|
|
393
402
|
│
|
|
394
403
|
├── Skills
|
|
395
404
|
│ ├── solo/SKILL.md
|
|
396
|
-
│ ├──
|
|
405
|
+
│ ├── mamba/SKILL.md
|
|
397
406
|
│ ├── man/SKILL.md
|
|
398
407
|
│ ├── manteam/SKILL.md
|
|
399
|
-
│
|
|
408
|
+
│ ├── manps/SKILL.md
|
|
409
|
+
│ └── mansolo/SKILL.md
|
|
400
410
|
│
|
|
401
411
|
└── Subagents
|
|
402
412
|
├── Scout
|
|
413
|
+
├── Plan Coach
|
|
403
414
|
├── Head Coach
|
|
404
415
|
├── Film Analyst (Offense)
|
|
405
416
|
└── Film Analyst (Defense)
|
|
@@ -410,7 +421,7 @@ mancode/
|
|
|
410
421
|
- mancode 本地优先。
|
|
411
422
|
- 扫描结果写入 `.mancode/`。
|
|
412
423
|
- mancode 不发送遥测。
|
|
413
|
-
- `.mancode
|
|
424
|
+
- mancode 不会改写项目的 `.gitignore`。提交前请检查 `.mancode/`,并忽略可能含敏感信息的本地 workflow 证据或浏览器产物。
|
|
414
425
|
- `/manps` 默认只扫描;进入整改前应明确确认代码改动。
|
|
415
426
|
- force push、schema migration、批量删除等不可逆操作需要明确人工确认。
|
|
416
427
|
|
|
@@ -419,7 +430,7 @@ mancode/
|
|
|
419
430
|
| 阶段 | 重点 |
|
|
420
431
|
|---|---|
|
|
421
432
|
| MVP-1 | solo 模式、审美扫描、Claude Code hooks |
|
|
422
|
-
| MVP-2 | `/
|
|
433
|
+
| MVP-2 | `/mamba`、`/man`、`/manteam`、`/manps` 和教练组 subagents |
|
|
423
434
|
| MVP-3 | Cursor、Codex CLI、GitHub Copilot 适配 |
|
|
424
435
|
| 公开发布 | npm 稳定版、marketplace 分发、文档和演示 |
|
|
425
436
|
|
|
@@ -427,8 +438,7 @@ mancode/
|
|
|
427
438
|
|
|
428
439
|
### `mancode init` 提示"not a project directory"
|
|
429
440
|
|
|
430
|
-
mancode 要求目标目录有 `.git`
|
|
431
|
-
项目目录中运行 `mancode init`。
|
|
441
|
+
mancode 要求目标目录有 `.git` 或已识别的项目 manifest(如 `package.json`、`pyproject.toml`、`go.mod`、`Cargo.toml`、`pom.xml`、`build.gradle`、`build.gradle.kts`、`Package.swift` 或 `pubspec.yaml`)。请在 git 仓库或支持的项目目录中运行 `mancode init`。
|
|
432
442
|
|
|
433
443
|
### Claude Code hooks 不生效
|
|
434
444
|
|
|
@@ -449,15 +459,15 @@ mancode 要求目标目录有 `.git` 或 `package.json`。请在 git 仓库或 N
|
|
|
449
459
|
|
|
450
460
|
### ZCode skills 未出现
|
|
451
461
|
|
|
452
|
-
确认 `.
|
|
462
|
+
确认 `.agents/skills/mamba/SKILL.md` 到 `.agents/skills/mansolo/SKILL.md`
|
|
453
463
|
都存在,然后重启或刷新 ZCode。当前尚不生成 ZCode `/man*` slash commands,
|
|
454
464
|
因为 workspace command 的文件路径仍需显式验证。
|
|
455
465
|
|
|
456
466
|
### Cursor rules 不触发
|
|
457
467
|
|
|
458
468
|
确认 `.cursor/rules/mancode-*.mdc` 文件存在。`alwaysApply: true` 的规则
|
|
459
|
-
(context、practice、solo)在每次对话加载。模式规则(
|
|
460
|
-
manps)按 description 触发——输入 `/
|
|
469
|
+
(context、practice、solo)在每次对话加载。模式规则(mamba、man、manteam、
|
|
470
|
+
manps)按 description 触发——输入 `/mamba` 等关键词即可激活。
|
|
461
471
|
|
|
462
472
|
### 如何完全重装
|
|
463
473
|
|