cold-start
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCold Start: Memory Bank + Agents bootstrap (greenfield & brownfield)
冷启动:Memory Bank + Agent 搭建(全新项目greenfield & 遗留系统brownfield)
Summary
概述
Note:is the package skill for all-in-one bootstrap. Do not confuse it with the generated project commandcold-start: that command is a lightweight router used after skeleton creation inside a target repo. For modular usage, prefer individual skills:/cold-start(skeleton),mb-init(greenfield),mb-from-prd(brownfield),mb-map-codebase(review),mb-review(implementation),mb-execute(UAT).mb-verify
- What it does: creates the Memory Bank skeleton, writes agent entry points, and routes the repo into the right workflow.
- Use it when: you want one entry point for either a new project with a PRD or an existing codebase that needs mapping first.
- Input: repository root plus either / requirements text or an existing codebase.
prd.md - Output: ,
.memory-bank/,.tasks/, agent entry files, and the next step for greenfield or brownfield work..protocols/
Supported scenarios:
- Greenfield: repo has or requirements text, but no code yet.
prd.md - Brownfield: repo already contains code and needs as-is documentation before change planning.
注意:是一站式搭建的包技能。 请勿将其与生成的项目命令cold-start混淆:该命令是目标仓库内骨架创建完成后使用的轻量级路由工具。 如需模块化使用,建议选用独立技能:/cold-start(骨架搭建)、mb-init(全新项目greenfield)、mb-from-prd(遗留系统brownfield)、mb-map-codebase(评审)、mb-review(实施)、mb-execute(用户验收测试UAT)。mb-verify
- 功能:创建Memory Bank骨架,编写Agent入口点,并将仓库接入对应的工作流。
- 适用场景:你希望通过单一入口点处理两种情况——一是带有PRD的新项目,二是需要先进行映射的现有代码库。
- 输入:仓库根目录,加上/需求文本,或现有代码库。
prd.md - 输出:、
.memory-bank/、.tasks/、Agent入口文件,以及全新项目或遗留系统工作的下一步指引。.protocols/
支持的场景:
- 全新项目(Greenfield):仓库包含或需求文本,但尚无代码。
prd.md - 遗留系统(Brownfield):仓库已包含代码,在变更规划前需要如实完成文档记录。
Non-negotiable principles
不可妥协的原则
1) Orchestrator vs workers
1) 编排者 vs 执行者
- You (main agent) are the orchestrator. You plan and coordinate.
- Workers (subagents) do the heavy lifting (scanning many files, producing long reports).
- Max depth = 2: orchestrator → subagent. No sub-sub-agents.
- 你(主Agent)是编排者:负责规划与协调工作。
- 执行者(子Agent)负责繁重工作(扫描大量文件、生成冗长报告)。
- 最大层级=2:编排者 → 子Agent。不允许存在子子Agent。
2) .tasks/
is runtime memory (НЕ Memory Bank)
.tasks/2) .tasks/
是运行时内存(而非Memory Bank)
.tasks/- Every agent process gets a unique task folder: .
.tasks/TASK-XXX/ - Subagents write detailed outputs there, and return only short summaries to the orchestrator.
- 每个Agent进程都会获得唯一的任务文件夹:。
.tasks/TASK-XXX/ - 子Agent在其中写入详细输出,仅向编排者返回简短摘要。
3) Avoid conflicts by design
3) 从设计层面避免冲突
- Split work by non-overlapping file sets.
- If overlap is unavoidable, use git branches/worktrees per agent and merge later.
- 按无重叠的文件集拆分工作。
- 若无法避免重叠,为每个Agent使用Git分支/工作区,后续再合并。
4) Parallelism limits
4) 并行性限制
- Run up to 5–7 subagents in parallel.
- If your runtime supports multi-tool calls: spawn parallel subagents in a single orchestrator turn.
- 最多并行运行5–7个子Agent。
- 若运行时支持多工具调用:在单次编排者轮次中启动并行子Agent。
5) Docs First
5) 文档优先
After completing any meaningful unit of work:
- Update Memory Bank while context is fresh.
- Then change code / commit.
完成任何有意义的工作单元后:
- 在上下文清晰时更新Memory Bank。
- 再进行代码修改/提交。
Output you MUST create/maintain
你必须创建/维护的输出
Repo root
仓库根目录
- (canonical, short, ~100 lines)
AGENTS.md - → symlink (or copy) to
CLAUDE.mdAGENTS.md - (optional) → symlink (or copy) to
GEMINI.mdAGENTS.md
- (标准规范,简短,约100行)
AGENTS.md - → 符号链接(或副本)指向
CLAUDE.mdAGENTS.md - (可选) → 符号链接(或副本)指向
GEMINI.mdAGENTS.md
Repo folders
仓库文件夹
- — durable knowledge base
.memory-bank/ - — operational runtime memory
.tasks/ - — file-based protocols (plans / decision logs / resume)
.protocols/
- — 持久化知识库
.memory-bank/ - — 运行时操作内存
.tasks/ - — 基于文件的协议(计划/决策日志/进展记录)
.protocols/
Step 0 — Detect environment (don’t guess)
步骤0 — 检测环境(请勿猜测)
-
Check what tools you have:
- Codex available? (Codex CLI / MCP tool)
- Claude Code available? (CLI , subagents)
claude - Browser tools? (Playwright / agent-browser / CDP MCP)
-
Decide primary engine:
- If working inside Codex: use for implementation and review (prefer fresh sessions for critical reviews).
gpt-5.2-high - If working inside Claude Code: use subagents for analysis + use Opus for synthesis; optionally call Codex via shell for second opinion or structured review.
- If both Codex and Claude are available (dual-engine): use Claude for wide-context scanning and synthesis, Codex for structured review and implementation. Cross-validate critical outputs (MB compliance, architecture) by running the review step on the other engine. See Step 4 for the hybrid workflow.
- If working inside Codex: use
If you don’t control Codex model selection via UI, create a projectprofile set (see Step 1.5)..codex/config.toml
-
检查可用工具:
- 是否有Codex?(Codex CLI / MCP工具)
- 是否有Claude Code?(CLI 、子Agent)
claude - 是否有浏览器工具?(Playwright / agent-browser / CDP MCP)
-
确定主引擎:
- 若在Codex内工作:使用进行实施与评审(关键评审建议使用全新会话)。
gpt-5.2-high - 若在Claude Code内工作:使用子Agent进行分析 + 使用Opus进行合成;可通过Shell调用Codex获取第二意见或结构化评审。
- 若同时拥有Codex和Claude(双引擎):使用Claude进行宽上下文扫描与合成,使用Codex进行结构化评审与实施。通过在另一引擎上运行评审步骤,交叉验证关键输出(MB合规性、架构)。混合工作流详见步骤4。
- 若在Codex内工作:使用
若无法通过UI选择Codex模型,创建项目配置文件(见步骤1.5)。.codex/config.toml
Step 1 — Bootstrap the skeleton
步骤1 — 搭建骨架
1.1 Create directories
1.1 创建目录
Create (if missing):
-
.memory-bank/mbb/architecture/guides/adrs/tech-specs/- (optional but recommended)
domains/ - (optional but recommended)
contracts/ - (optional but recommended)
runbooks/ - (optional; can keep
workflows/if you already use it)wfs/ - (optional but recommended)
quality/ testing/skills/epics/features/- (Memory Bank backlog & plans)
tasks/ - (slash-command specs used by humans/agents)
commands/ - (subagent prompt library)
agents/ archive/bugs/
-
.tasks/ -
.protocols/
创建(若不存在):
-
.memory-bank/mbb/architecture/guides/adrs/tech-specs/- (可选但推荐)
domains/ - (可选但推荐)
contracts/ - (可选但推荐)
runbooks/ - (可选;若已使用
workflows/可保留)wfs/ - (可选但推荐)
quality/ testing/skills/epics/features/- (Memory Bank 待办事项与计划)
tasks/ - (人类/Agent使用的斜杠命令规范)
commands/ - (子Agent提示词库)
agents/ archive/bugs/
-
.tasks/ -
.protocols/
1.2 Create core files (use the templates)
1.2 创建核心文件(使用模板)
Use the templates in:
./references/shared-structure-template.md
At minimum you must create:
AGENTS.md- symlink/copy
CLAUDE.md .memory-bank/index.md.memory-bank/mbb/index.md.memory-bank/product.md.memory-bank/requirements.md.memory-bank/testing/index.md.memory-bank/tasks/backlog.md
Also create the command specs under (use ).
.memory-bank/commands/references/commands/*使用以下路径中的模板:
./references/shared-structure-template.md
至少必须创建:
AGENTS.md- 符号链接/副本
CLAUDE.md .memory-bank/index.md.memory-bank/mbb/index.md.memory-bank/product.md.memory-bank/requirements.md.memory-bank/testing/index.md.memory-bank/tasks/backlog.md
同时在下创建命令规范(使用)。
.memory-bank/commands/references/commands/*1.2.1 Create native skills (proxy commands)
1.2.1 创建原生技能(代理命令)
Create thin proxy skills so commands work natively in each runtime:
- → Claude Code + OpenCode
.claude/skills/<name>/SKILL.md - → Codex CLI + OpenCode
.agents/skills/<name>/SKILL.md
Each proxy just says: .
This makes commands available natively (, , , etc.) in all three tools.
Read and follow the instructions in .memory-bank/commands/<name>.md/mb/prd/executeThe script creates both sets automatically.
init-mb.js创建轻量代理技能,使命令可在各运行时原生工作:
- → Claude Code + OpenCode
.claude/skills/<name>/SKILL.md - → Codex CLI + OpenCode
.agents/skills/<name>/SKILL.md
每个代理仅需包含:(读取并遵循中的指令)。
这样可使命令在三个工具中原生可用(、、等)。
Read and follow the instructions in .memory-bank/commands/<name>.md.memory-bank/commands/<name>.md/mb/prd/executeinit-mb.js1.3 Enforce frontmatter rule
1.3 强制实施前置元数据规则
Every markdown file inside must include YAML frontmatter with at least:
.memory-bank/description: ...status: draft|active|deprecated|archived
.memory-bank/description: ...status: draft|active|deprecated|archived
1.4 Create .tasks/
protocol
.tasks/1.4 创建.tasks/
协议
.tasks/Create a task folder for this run (pick a new id):
.tasks/TASK-MB-INIT/
Inside it, create:
- — what you will do + which subagents
TASK-MB-INIT-S-00-orchestrator-plan.md
为此运行创建任务文件夹(选择新ID):
.tasks/TASK-MB-INIT/
在其中创建:
- — 你的工作计划 + 子Agent分配
TASK-MB-INIT-S-00-orchestrator-plan.md
1.5 Optional: Codex profile presets
1.5 可选:Codex配置预设
If Codex is used, create with profiles:
.codex/config.toml- default: coding (gpt-5.2, high)
- profile : review (gpt-5.2, xhigh)
deep-review
(If your repo is shared, consider keeping it local or documenting it in .)
.memory-bank/runbooks/若使用Codex,创建配置文件,包含以下配置:
.codex/config.toml- default: coding (gpt-5.2, high)
- profile : review (gpt-5.2, xhigh)
deep-review
(若仓库为共享仓库,建议将其设为本地文件,或在中记录)。
.memory-bank/runbooks/Step 2 — Choose scenario
步骤2 — 选择场景
Decision rule
决策规则
- If repo has substantial code (,
src/,package.json,go.mod, etc.) → Brownfield (Step 3B).Cargo.toml - If repo is mostly empty and you have → Greenfield (Step 3A).
prd.md - If both exist: treat as Brownfield + PRD delta (Step 3B).
- If repo is empty/new and no → Skeleton-only (Step 3C).
prd.md
Record the scenario in:
.tasks/TASK-MB-INIT/TASK-MB-INIT-S-00-orchestrator-plan.md
- 若仓库包含大量代码(、
src/、package.json、go.mod等)→ 遗留系统(Brownfield)(步骤3B)。Cargo.toml - 若仓库基本为空且包含→ 全新项目(Greenfield)(步骤3A)。
prd.md - 若两者都存在:按遗留系统 + PRD增量处理(步骤3B)。
- 若仓库为新创建/空仓库且无→ 仅骨架(步骤3C)。
prd.md
将场景记录在:
.tasks/TASK-MB-INIT/TASK-MB-INIT-S-00-orchestrator-plan.md
Step 3A — Greenfield workflow (PRD → Memory Bank)
步骤3A — 全新项目工作流(PRD → Memory Bank)
3A.1 Read PRD and do Deep Questioning
3A.1 读取PRD并进行深度提问
- Read .
prd.md - If gaps exist, run deep questioning in rounds (3–5 questions each). Use .
./references/shared-deep-questioning.md - If PRD mentions “use skills/tools/CLIs” — run first (project-installed → marketplace).
/find-skills
If user is temporarily unavailable (“запуск и ушёл”):
- Record in
Open questions..protocols/PRD-BOOTSTRAP/decision-log.md - Stop and wait (do not invent facts; do not proceed to EP/FT/backlog generation without answers).
If the user explicitly wants autonomous mode:
- record non-blocking gaps as
Assumptions - halt only on blocking gaps (security/compliance/external contract/data-loss risks)
- after L1–L3 + review gate, continue with
/autonomous
- 读取。
prd.md - 若存在信息缺口,分轮次进行深度提问(每轮3–5个问题)。使用。
./references/shared-deep-questioning.md - 若PRD提及“使用技能/工具/CLI” — 先运行(优先项目已安装技能 → 市场技能)。
/find-skills
若用户暂时不可用(“启动后离开”):
- 将记录在
未解决问题中。.protocols/PRD-BOOTSTRAP/decision-log.md - 停止并等待(请勿编造信息;未得到答案前,请勿进行史诗/功能/待办事项生成)。
若用户明确要求自主模式:
- 将非阻塞缺口记录为
假设 - 仅在遇到阻塞缺口(安全/合规/外部合同/数据丢失风险)时暂停
- 完成L1–L3 + 评审关卡后,使用继续
/autonomous
3A.2 Write product brief (L1)
3A.2 编写产品简介(L1)
Update using user’s wording.
.memory-bank/product.md使用用户的表述更新。
.memory-bank/product.md3A.3 Requirements + RTM
3A.3 需求 + 需求跟踪矩阵(RTM)
Update :
.memory-bank/requirements.md- REQ-IDs
- RTM table mapping REQ → Epic → Feature → Test
更新:
.memory-bank/requirements.md- 需求ID(REQ-IDs)
- RTM表格,映射需求 → 史诗 → 功能 → 测试
3A.4 Create epics and features
3A.4 创建史诗与功能
Create:
.memory-bank/epics/EP-001-<slug>.md.memory-bank/features/FT-001-<slug>.md
Each feature MUST include:
- use cases
- acceptance criteria
- failure modes / edge cases
- test strategy pointers
Status policy:
- Default EP/FT frontmatter to until
status: draftare resolved.Open questions - Promote to only when acceptance criteria + verification plan are stable.
status: active
创建:
.memory-bank/epics/EP-001-<slug>.md.memory-bank/features/FT-001-<slug>.md
每个功能必须包含:
- 用例
- 验收标准
- 失败模式/边缘情况
- 测试策略指引
状态规则:
- 默认史诗/功能前置元数据为,直至
status: draft得到解决。未解决问题 - 仅当验收标准 + 验证计划稳定后,才升级为。
status: active
3A.5 Tasks planning (per-feature, no “everything at once”)
3A.5 任务规划(按功能拆分,禁止“一次性全部生成”)
Do not generate a full task backlog for all features in one pass.
Instead:
- Create/refresh as a skeleton (waves + placeholders).
.memory-bank/tasks/backlog.md - For each selected feature, run to produce:
/prd-to-tasks FT-<NNN>.memory-bank/tasks/plans/IMPL-FT-<NNN>.md- atomic items grouped by waves in
TASK-*backlog.md
请勿一次性为所有功能生成完整的任务待办事项。
而是:
- 创建/更新作为骨架(阶段 + 占位符)。
.memory-bank/tasks/backlog.md - 对每个选定的功能,运行生成:
/prd-to-tasks FT-<NNN>.memory-bank/tasks/plans/IMPL-FT-<NNN>.md- 在中按阶段分组的原子化
backlog.md项TASK-*
3A.6 Identify key concepts and create duo docs
3A.6 识别关键概念并创建配套文档
For every non-trivial concept, create a duo:
- (WHAT/WHY)
.memory-bank/architecture/<concept>.md - (HOW)
.memory-bank/guides/<concept>.md
对于每个非平凡概念,创建一组配套文档:
- (是什么/为什么)
.memory-bank/architecture/<concept>.md - (怎么做)
.memory-bank/guides/<concept>.md
3A.7 Update index
3A.7 更新索引
Update with annotated links to all created docs.
.memory-bank/index.md使用带注释的链接更新,指向所有已创建的文档。
.memory-bank/index.mdStep 3B — Brownfield workflow (Repo → Memory Bank)
步骤3B — 遗留系统工作流(仓库 → Memory Bank)
3B.1 Spawn repo-scanning subagents (parallel)
3B.1 启动仓库扫描子Agent(并行)
Create a new task folder:
.tasks/TASK-MB-MAP/
Spawn up to 5 subagents in parallel with non-overlapping scopes:
- : build/tooling (package managers, scripts, CI)
S-01 - : backend/services
S-02 - : frontend/UI
S-03 - : data layer (DB, migrations, schema)
S-04 - : tests + quality gates
S-05
Each subagent MUST:
- verify its file glob targets exist ("smart calling")
- write a detailed report into using naming:
.tasks/TASK-MB-MAP/TASK-MB-MAP-S-0X-final-report-<code|docs>-YY.md - return a 5–10 line summary + file list
Use as baseline prompt, but scope it.
./agents/shared-repo-scanner.md创建新的任务文件夹:
.tasks/TASK-MB-MAP/
并行启动最多5个具有无重叠范围的子Agent:
- :构建/工具链(包管理器、脚本、CI)
S-01 - :后端/服务
S-02 - :前端/UI
S-03 - :数据层(数据库、迁移、 schema)
S-04 - :测试 + 质量关卡
S-05
每个子Agent必须:
- 验证其文件匹配目标是否存在(“智能调用”)
- 将详细报告写入,命名格式:
.tasks/TASK-MB-MAP/TASK-MB-MAP-S-0X-final-report-<code|docs>-YY.md - 返回5–10行摘要 + 文件列表
使用作为基础提示词,但需限定范围。
./agents/shared-repo-scanner.md3B.2 Synthesize Memory Bank from reports
3B.2 从报告合成Memory Bank
Using the reports, fill:
.tasks/TASK-MB-MAP/- — what the system is today
.memory-bank/product.md - — C4 L1–L3 overview + key invariants
.memory-bank/architecture/ - — setup, dev, test, deploy
.memory-bank/runbooks/ - — API/event contracts
.memory-bank/contracts/ - — canonical gates + verification notes
.memory-bank/testing/index.md - — annotated links
.memory-bank/index.md
PRD-less rule (non-negotiable): if there is no, you MUST NOT create or populate:prd.md
.memory-bank/epics/*.memory-bank/features/* with waves/tasks.memory-bank/tasks/backlog.mdEmpty skeleton files/folders are allowed if they were created by bootstrap.Repo mapping is as-is documentation, not roadmap planning. If something cannot be derived from code/logs/tests, record it as a hypothesis or an open question.
使用中的报告,填充:
.tasks/TASK-MB-MAP/- — 当前系统的实际情况
.memory-bank/product.md - — C4 L1–L3概览 + 关键不变量
.memory-bank/architecture/ - — 搭建、开发、测试、部署指南
.memory-bank/runbooks/ - — API/事件契约
.memory-bank/contracts/ - — 标准质量关卡 + 验证说明
.memory-bank/testing/index.md - — 带注释的链接
.memory-bank/index.md
无PRD规则(不可妥协):若无,禁止创建或填充:prd.md
.memory-bank/epics/*.memory-bank/features/*- 包含阶段/任务的
.memory-bank/tasks/backlog.md允许保留由搭建过程创建的空骨架文件/文件夹。仓库映射是如实记录文档,而非路线图规划。若无法从代码/日志/测试中推导信息,将其记录为假设或未解决问题。
3B.3 Ask user for PRD delta
3B.3 向用户请求PRD增量
After baseline MB exists:
- ask the user for describing what to change/add
prd.md - run and
/prdstyle decomposition against the existing baseline/prd-to-tasks
基准Memory Bank创建完成后:
- 向用户请求,描述需要修改/添加的内容
prd.md - 针对现有基准运行和
/prd风格的分解流程/prd-to-tasks
Step 3C — Skeleton-only workflow (no PRD, no code)
步骤3C — 仅骨架工作流(无PRD,无代码)
When the repo is new/empty and no is available:
prd.md当仓库为新创建/空仓库且无时:
prd.md3C.1 Create skeleton only
3C.1 仅创建骨架
Run Step 1 as usual — create all directories, core files from templates, , symlink.
AGENTS.mdCLAUDE.mdThe skeleton provides a ready-to-fill structure: , , , etc. remain as draft stubs.
product.mdrequirements.mdbacklog.md按步骤1正常执行 — 创建所有目录、模板核心文件、、符号链接。
AGENTS.mdCLAUDE.md骨架提供了可直接填充的结构:、、等保留为草稿占位符。
product.mdrequirements.mdbacklog.md3C.2 Ask for PRD
3C.2 请求PRD
After skeleton is created, ask the user to provide a PRD:
"Memory Bank skeleton created. To fill it with product details, epics, features, and a backlog, please provide afile (or paste requirements text). You can do this now or later — runprd.mdwhen ready."/prd
骨架创建完成后,向用户请求提供PRD:
"Memory Bank骨架已创建。如需填充产品详情、史诗、功能与待办事项,请提供文件(或粘贴需求文本)。你可现在提供或稍后提供 — 准备就绪后运行prd.md命令即可。"/prd
3C.3 Wait or proceed
3C.3 等待或继续
- If user provides PRD now → continue to Step 3A (Greenfield workflow).
- If user defers → stop here. The skeleton is valid and usable. The user can invoke or
$mb-from-prdlater to fill the Memory Bank./prd - If user provides partial info → run deep questioning () to extract enough for product.md, then stop and wait for full PRD.
./references/shared-deep-questioning.md
Note: The skeleton-only state is a valid stopping point.+AGENTS.md+ MBB rules are enough for agents to start navigating the repo..memory-bank/index.md
- 若用户现在提供PRD → 继续执行步骤3A(全新项目工作流)。
- 若用户推迟提供 → 在此停止。骨架已可用,用户可稍后调用或
$mb-from-prd填充Memory Bank。/prd - 若用户提供部分信息 → 运行深度提问()以提取足够信息用于
./references/shared-deep-questioning.md,然后停止并等待完整PRD。product.md
注意:仅骨架状态是有效的停止点。+AGENTS.md+ MBB规则已足够Agent开始导航仓库。.memory-bank/index.md
Step 4 — Hybrid mode (Claude ↔ Codex)
步骤4 — 混合模式(Claude ↔ Codex)
If you’re in Claude Code but want Codex quality or long-horizon autonomy:
- Use Claude subagents to produce the scan reports into .
.tasks/TASK-MB-MAP/ - Call Codex via shell to synthesize Memory Bank:
bash
codex exec --ephemeral --full-auto -m gpt-5.2-high \
'Read .tasks/TASK-MB-MAP and build/refresh .memory-bank per MBB. Keep AGENTS.md short. Produce a summary and run a self-review.'- Then run a Codex deep review profile (or a fresh Claude session) for 5-expert review.
若在Claude Code内工作,但希望获得Codex的质量或长周期自主性:
- 使用Claude子Agent将扫描报告生成到。
.tasks/TASK-MB-MAP/ - 通过Shell调用Codex合成Memory Bank:
bash
codex exec --ephemeral --full-auto -m gpt-5.2-high \
'Read .tasks/TASK-MB-MAP and build/refresh .memory-bank per MBB. Keep AGENTS.md short. Produce a summary and run a self-review.'- 然后运行Codex深度评审配置(或全新Claude会话)进行5专家评审。
Step 5 — Multi-expert review loop (fresh context)
步骤5 — 多专家评审循环(全新上下文)
Run fresh-context reviewers (do not reuse the writer context):
- Architect (C4 + dependencies)
- Scope analyst (REQ → Epic → Feature → Task coverage)
- MBB compliance reviewer (frontmatter, links, atomics, duo)
- Plan reviewer (backlog quality, waves, gates)
- Security reviewer (auth, sensitive data, OWASP risks)
- Code quality reviewer (conditional: if code exists — quality gates, conventions, hotspots)
Use prompts in and .
./agents/shared-review-*.md./agents/shared-mb-reviewer.mdRules:
- If any reviewer returns REJECT → fix MB and repeat review.
- Persist reviewer reports into .
.tasks/TASK-MB-REVIEW/
运行全新上下文评审者(请勿复用编写者上下文):
- 架构师(C4 + 依赖关系)
- 范围分析师(需求 → 史诗 → 功能 → 任务覆盖)
- MBB合规性评审者(前置元数据、链接、原子化、配套文档)
- 计划评审者(待办事项质量、阶段、关卡)
- 安全评审者(认证、敏感数据、OWASP风险)
- 代码质量评审者(条件:若存在代码 — 质量关卡、规范、热点)
使用和中的提示词。
./agents/shared-review-*.md./agents/shared-mb-reviewer.md规则:
- 若任何评审者返回REJECT → 修复Memory Bank并重复评审。
- 将评审报告持久化到。
.tasks/TASK-MB-REVIEW/
Step 6 — Start executing tasks
步骤6 — 开始执行任务
After review gate passes (APPROVE):
- Pick the highest-priority task from .
.memory-bank/tasks/backlog.md - Run for the task (plan → implement → quality gates → MB-SYNC).
mb-execute - Run to check acceptance criteria and record evidence.
mb-verify - Repeat until the wave is complete or user stops.
If the intended mode is unattended end-to-end:
- do not stay in manual loop here
- switch to generated project command
/autonomous
Iformb-executeare not installed, follow their SKILL.md manually.mb-verify
评审关卡通过(APPROVE)后:
- 从中选择最高优先级任务。
.memory-bank/tasks/backlog.md - 对该任务运行(计划 → 实施 → 质量关卡 → MB同步)。
mb-execute - 运行检查验收标准并记录证据。
mb-verify - 重复直至阶段完成或用户停止。
若目标模式为无人值守端到端执行:
- 请勿停留在手动循环
- 切换为生成的项目命令
/autonomous
若未安装或mb-execute,手动遵循其SKILL.md中的指引。mb-verify
Definition of done
完成定义
You are done when:
- exists, short, points to
AGENTS.md..memory-bank/index.md - is a symlink/copy of
CLAUDE.md.AGENTS.md - contains at minimum: index + MBB + product + testing (requirements/backlog can remain as stubs until PRD exists).
.memory-bank/ - contains scan/review artifacts with naming + stage ids.
.tasks/ - Greenfield: epics/features/backlog created from PRD.
- Brownfield: repo mapped as-is into MB and user asked for PRD delta (no roadmap entities invented without PRD).
- Skeleton-only: skeleton created, user asked for PRD (valid stopping point).
- Multi-expert review passes (APPROVE) — for Greenfield/Brownfield; skip for Skeleton-only.
- Execution loop is available (mb-execute + mb-verify reachable or documented).
- Autonomous loop is available (+
/autonomousdocumented)./autopilot
满足以下条件即完成:
- 已存在,内容简短,指向
AGENTS.md。.memory-bank/index.md - 是
CLAUDE.md的符号链接/副本。AGENTS.md - 至少包含:索引 + MBB + 产品 + 测试文档(需求/待办事项可保留为占位符,直至PRD存在)。
.memory-bank/ - 包含符合命名规范 + 阶段ID的扫描/评审产物。
.tasks/ - 全新项目场景:已从PRD创建史诗/功能/待办事项。
- 遗留系统场景:仓库已如实映射到Memory Bank,且已向用户请求PRD增量(无PRD时禁止创建路线图实体)。
- 仅骨架场景:骨架已创建,已向用户请求PRD(有效停止点)。
- 多专家评审通过(APPROVE) — 适用于全新项目/遗留系统场景;仅骨架场景可跳过。
- 执行循环可用(+
mb-execute可访问或已文档化)。mb-verify - 自主循环可用(+
/autonomous已文档化)。/autopilot
References in this skill
本技能中的参考文件
./references/shared-structure-template.md./references/shared-deep-questioning.md./agents/shared-repo-scanner.md./agents/shared-mb-reviewer.md./agents/shared-review-architect.md./agents/shared-review-scope.md./agents/shared-review-code.md./agents/shared-review-plan.md./agents/shared-review-security.md- (optional helper)
./scripts/shared-init-mb.js
./references/shared-structure-template.md./references/shared-deep-questioning.md./agents/shared-repo-scanner.md./agents/shared-mb-reviewer.md./agents/shared-review-architect.md./agents/shared-review-scope.md./agents/shared-review-code.md./agents/shared-review-plan.md./agents/shared-review-security.md- (可选辅助工具)
./scripts/shared-init-mb.js