preserve
Keeps the existing hierarchy, layout, component system, and interaction patterns. The agent makes only the UI changes required by the task.
diff --git a/tests/website-docs.test.ts b/tests/website-docs.test.ts
index 95e9879..9cdab08 100644
--- a/tests/website-docs.test.ts
+++ b/tests/website-docs.test.ts
@@ -54,6 +54,10 @@ describe('website documentation', () => {
'refresh-project',
'manps [area]',
'--remediate',
+ 'design configure --expected-revision',
+ '--confirm-experimental',
+ 'forbid-as-interface-icon',
+ '--browser-validation',
'workflow verify',
'workflow review',
'governed_execution',
@@ -139,17 +143,23 @@ describe('website documentation', () => {
expect(english).toContain('Project rules · commands');
expect(english).toContain('Repository instructions · prompts');
expect(english).toContain('Preview adapter');
+ expect(english).toContain('id="design"');
+ expect(english).toContain('05 / Design policy');
+ expect(english).toContain('Present
2–3 routes.');
expect(english).toContain('id="continuity"');
- expect(english).toContain('06 / Cross-session continuity');
+ expect(english).toContain('07 / Cross-session continuity');
expect(english).toContain('Raw chat history is not copied');
- expect(english).toContain('07 / Quick start');
+ expect(english).toContain('08 / Quick start');
expect(chinese).toContain('id="context"');
expect(chinese).toContain('04 / 项目感知');
- expect(chinese).toContain('05 / 适配器');
+ expect(chinese).toContain('id="design"');
+ expect(chinese).toContain('05 / 设计策略');
+ expect(chinese).toContain('先给出
2–3 个方向。');
+ expect(chinese).toContain('06 / 适配器');
expect(chinese).toContain('id="continuity"');
- expect(chinese).toContain('06 / 跨会话续接');
+ expect(chinese).toContain('07 / 跨会话续接');
expect(chinese).toContain('不复制原始聊天记录');
- expect(chinese).toContain('07 / 快速开始');
+ expect(chinese).toContain('08 / 快速开始');
expect(chinese).toContain('交付干净');
expect(chinese).toContain('代码,避免');
expect(chinese).toContain('AI 屎山。');
@@ -159,6 +169,23 @@ describe('website documentation', () => {
expect(chinese).toContain(`Continuity / v${version}`);
});
+ it('documents the opt-in design policy and its safety boundaries', async () => {
+ for (const name of ['docs.html', 'docs.zh-CN.html']) {
+ const html = await readPage(name);
+ expect(html).toContain('id="design"');
+ expect(html).toContain('
--platform LISTclaude-code, cursor, codex, copilot, and zcode.--emptygit init or a package manifest.--team / --no-team--style NAME--style NAME--legacymancode design policy instead.--lang en|zh-CNUse /man when a wrong choice would be expensive, hard to reverse, or difficult to inspect later—not simply because the task is large.
The design policy is an explicit, opt-in Continuity feature for UI work. mancode init does not create it. When no valid policy is active, design context fails open to preserve, so ordinary coding and workflow recovery are not blocked.
Keeps the existing hierarchy, layout, component system, and interaction patterns. The agent makes only the UI changes required by the task.
Improves hierarchy, typography, spacing, states, and responsive behavior without changing the product structure.
Allows one stronger product-appropriate composition and purposeful motion after --confirm-experimental. It still cannot expand scope or invent product features.
For a new UI surface or aesthetic redesign, if the user has not chosen a visual direction, the agent presents 2–3 distinct, product-appropriate directions with concise tradeoffs and a recommendation, then waits for a choice. Scoped UI fixes, work inside an established design system, and tasks with an already selected direction continue directly.
+Brand, campaign, editorial, portfolio, and launch surfaces may use a memorable first viewport and one visual motif across the page. Task-oriented products keep workflow clarity ahead of spectacle.
$ mancode design status --json
+$ mancode design configure --expected-revision 0 --preset refine --icons lucide --emoji forbid-as-interface-icon --motion purposeful --browser-validation when-available
+$ mancode design context --json
+$ mancode design configure --expected-revision 1 --preset experimental --confirm-experimental
+$ mancode design disable --expected-revision 2| Control | Accepted values | Boundary |
|---|---|---|
--preset | preserve, refine, experimental | experimental requires explicit confirmation every time it is enabled. |
--icons | existing-first, lucide | Choosing Lucide does not install a package; dependency changes still require task approval. |
--emoji | allow, forbid-as-interface-icon | The stricter value prevents emoji from replacing interface icons. |
--motion | minimal, purposeful | Motion must support hierarchy, feedback, or narrative—not obscure the core workflow. |
--browser-validation | off, when-available, required | required creates a hard quality gate when browser verification cannot run. |
No design preset authorizes new features, information-architecture changes, silent dependency installation, or unrelated redesign. The policy is stored at .mancode/shared/context/design-policy.json and should be reviewed like any other repository configuration.
Mode names are portable, but invocation follows the extension model of each agent. Run them in the agent chat—not in your operating-system shell. /mansolo or $mansolo explicitly returns to the default solo mode.
The CLI installs adapters and enforces durable workflow state. Run state-reading commands from an initialized project. Invalid transitions fail safely instead of silently editing workflow metadata.
Creates .mancode/, detects the project, scans style tokens where relevant, and installs adapters.
--force, --yes, --team, --no-team, --style <name>, --platform <list>, --empty, --lang <locale>.Creates .mancode/, detects the project, scans style tokens where relevant, and installs adapters.
--force, --yes, --team, --no-team, --platform <list>, --empty, --lang <locale>. --style <name> is legacy-only.Installs one adapter through the journaled upgrade path after initialization.
--confirm --operation-id <operationId> and an active session authorize the previewed managed writes.--minimal remains available for legacy compatibility.Compares managed-content digests, stages changes with --dry-run, and publishes that exact preview only with --confirm --operation-id <operationId>.
Previews or commits the project Policy 2 default without rewriting existing workflows. A commit requires the preview's operation ID and an active session.
Lists adapters known to the installed CLI and marks those already configured in the project.
Creates and validates Continuity requirements, plans, verification evidence, reviews, remediation, and completion.
list and show <namespace:ULID> [--json].context compact --dry-run to inspect removable runtime records; Continuity workflow authority is not deleted by workflow clean.Runs 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.Inspects effective UI guidance or changes the revisioned project design policy. Configuration requires --expected-revision <n>; experimental mode also requires --confirm-experimental.
Refreshes project facts after adding Git, a manifest, a framework, or validation commands, then reports stale adapters.
Refreshes the project profile and design tokens. Preview any adapter repair with mancode adapter upgrade --platform <platform> --dry-run.
Removes one Continuity adapter. Continuity protects authority from bulk removal; use context compact --dry-run for retention candidates. The --all form is legacy-only.
--platform LISTclaude-code、cursor、codex、copilot、zcode 中的一个或多个。--emptygit init 或创建 manifest,也能初始化通用项目。--team / --no-team--style NAME--style NAME--legacy 初始化mancode design 策略。--lang en|zh-CN不要因为任务很长就默认使用 /man。当错误选择代价高、难以回滚,或事后很难审查时,再升级到它。
设计策略是面向 UI 任务的显式启用 Continuity 能力。mancode init 不会自动创建它;策略缺失、禁用或损坏时,设计上下文会安全降级为 preserve,不会阻塞普通编码或工作流恢复。
保留现有层级、布局、组件系统和交互模式,只完成任务真正要求的 UI 改动。
改善层级、排版、间距、状态和响应式行为,但不改变产品结构。
传入 --confirm-experimental 后允许一个更强、符合产品语境的构图与有目的动效,但不能扩大范围或虚构产品功能。
新建 UI 或视觉重做时,如果用户尚未选定方向,Agent 会先给出 2–3 个差异明确、符合产品语境的方向,简述取舍并推荐一个,再等待用户选择。局部 UI 修复、既有设计系统内的改动,以及用户已经选定方向的任务不会被这一步打断。
+品牌、活动、编辑、作品集和发布型页面可以强化首屏记忆点,并让一个视觉母题贯穿全页;任务型产品仍然把工作流清晰度放在视觉奇观之前。
$ mancode design status --json
+$ mancode design configure --expected-revision 0 --preset refine --icons lucide --emoji forbid-as-interface-icon --motion purposeful --browser-validation when-available
+$ mancode design context --json
+$ mancode design configure --expected-revision 1 --preset experimental --confirm-experimental
+$ mancode design disable --expected-revision 2| 控制项 | 可选值 | 边界 |
|---|---|---|
--preset | preserve、refine、experimental | 每次启用 experimental 都需要显式确认。 |
--icons | existing-first、lucide | 选择 Lucide 不会自动安装依赖;依赖变更仍需任务明确授权。 |
--emoji | allow、forbid-as-interface-icon | 严格模式禁止用表情符号代替界面图标。 |
--motion | minimal、purposeful | 动效必须服务于层级、反馈或叙事,不能遮蔽核心工作流。 |
--browser-validation | off、when-available、required | required 会在无法执行浏览器验证时形成硬质量门槛。 |
任何设计 preset 都不授权新增功能、改变信息架构、静默安装依赖或重做无关界面。策略保存在 .mancode/shared/context/design-policy.json,应像其他仓库配置一样审查。
模式名称是通用的,但调用方式取决于平台的扩展机制。下面这些内容应输入 Agent 对话框,而不是操作系统终端。/mansolo 或 $mansolo 会显式回到默认 solo 模式。
CLI 负责安装适配器和强制执行持久化工作流状态。读取状态的命令应在已初始化项目中运行;非法状态转换会安全失败,不会静默篡改元数据。
创建 .mancode/,识别项目,在适用时扫描样式 token,并安装平台适配器。
--force、--yes、--team、--no-team、--style <name>、--platform <list>、--empty、--lang <locale>。创建 .mancode/,识别项目,在适用时扫描样式 token,并安装平台适配器。
--force、--yes、--team、--no-team、--platform <list>、--empty、--lang <locale>。--style <name> 仅适用于 legacy。初始化后通过 journaled upgrade 路径安装一个平台。
--confirm --operation-id <operationId> 和 active session 授权发布预览中的 managed 写入。--minimal 保留用于 legacy 兼容。比较 managed-content digest,用 --dry-run 生成 staging,并且只用 --confirm --operation-id <operationId> 发布该次预览。
预览或提交项目的 Policy 2 默认值,不重写已有 workflow;提交需要预览返回的 operation ID 和 active session。
列出当前 CLI 支持的平台,并标出项目中已经配置的平台。
创建和校验 Continuity 需求、计划、验证证据、评审、修复与完成状态。
list 和 show <namespace:ULID> [--json] 检查。context compact --dry-run 检查可回收的运行时记录;Continuity workflow authority 不会被 workflow clean 删除。对 all、deps、security、dead-code 或 config 执行确定性健康扫描。
--json 输出机器可读结果。--remediate 显式进入修复路径;默认只扫描。检查有效 UI 指导,或修改带 revision 的项目设计策略。配置必须传入 --expected-revision <n>;experimental 还需要 --confirm-experimental。
在加入 Git、manifest、框架或验证命令后刷新项目事实,并报告 stale adapter。
刷新项目画像和设计 token;adapter 修复先用 mancode adapter upgrade --platform <platform> --dry-run 预览。
移除一个 Continuity 适配器。Continuity 会保护权威数据不被批量删除;用 context compact --dry-run 检查保留候选。--all 只适用于 legacy 项目。
New in 0.5.0
++ A new UI or visual redesign no longer starts from one silent default. When the direction + is open, mancode asks the agent for 2–3 product-appropriate routes, the tradeoffs, and a + recommendation. You choose. Then it builds one coherent system. +
+ Configure the policy +Distinct visual logic. Clear tradeoffs. One recommendation. No code until the direction is yours.
+Keep the hierarchy, components, layout, and interaction patterns. Change only what the task requires.
+Improve type, spacing, hierarchy, states, and responsive behavior without changing the product structure.
+Allow one stronger composition and purposeful motion—after confirmation, inside the existing product scope.
+mancode 是工作流层,不是新的编码 Agent。Claude Code 获得最完整的原生集成;其他工具获得持久 rules、skills 或 instruction 文件。
0.5.0 新能力
新建 UI 或视觉重做,不再由 Agent 默默套用唯一默认风格。方向尚未确定时,mancode 会先给出 2–3 个符合产品语境的方案、简明取舍和一个推荐;你选定后,它再把一个视觉系统做完整。
+ 配置设计策略 +视觉逻辑要有差异,取舍要说清楚,并给出一个推荐。在方向属于你之前,不急着写代码。
保留现有层级、组件、布局和交互模式,只完成任务真正要求的 UI 改动。
改善排版、间距、层级、状态和响应式行为,但不改变产品结构。
确认后允许更强的构图与有目的的动效,仍然不能突破既有产品范围。
mancode 是工作流层,不是新的编码 Agent。Claude Code 获得最完整的原生集成;其他工具获得持久 rules、skills 或 instruction 文件。
mancode 把目标、需求、计划、检查结果和交接信息保存在稳定 TaskRef 下。新聊天窗口或 CLI session 可以恢复这项任务,只加载当前目的需要的 Context Pack,不依赖旧窗口一直打开。
@@ -84,7 +117,7 @@准备上场
不需要账户、Dashboard、API Key 或新编辑器。原生支持 Windows CMD、PowerShell、Git Bash、macOS 与 Linux。
阅读完整文档 ↗npm install -g mancodecd your-projectmancode init准备上场
不需要账户、Dashboard、API Key 或新编辑器。原生支持 Windows CMD、PowerShell、Git Bash、macOS 与 Linux。
阅读完整文档 ↗npm install -g mancodecd your-projectmancode init简单任务少一点仪式。
关键任务多一点纪律。