deepworkplan

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

DeepWorkPlan — Methodology Skill (Router)

DeepWorkPlan —— 方法论技能(路由层)

Models matter; context matters more. The DeepWorkPlan skill turns any repository into a structured environment — context, guardrails, and a durable plan — where any coding agent executes reliably on short or long work. It makes the repository "AI-first" —
AGENTS.md
+
docs/
+ per-module docs +
.agents/
(with the
.claude → .agents
and
.cursor → .agents
symlinks) — and runs structured Deep Work Plans: Lite plans for bounded work and Full task-file plans for longer work; an AI agent creates, refines, executes task-by-task, and resumes. All plan output lands in a gitignored
.dwp/
directory at the repo root (
.dwp/plans/
).
Source of truth: https://deepworkplan.com. License: MIT.
模型很重要,但上下文更关键。DeepWorkPlan 技能可将任意代码仓库转化为具备上下文、防护规则和可持续计划的结构化环境,让任何编码Agent都能可靠地执行短期或长期工作。它让代码仓库实现「AI优先」—— 包含
AGENTS.md
+
docs/
+ 各模块文档 +
.agents/
(通过
.claude → .agents
和
.cursor → .agents
符号链接实现)—— 并运行结构化的深度工作计划(Deep Work Plans):轻量计划用于边界清晰的工作,完整任务文件计划用于长期工作;由AI Agent创建、优化、逐任务执行并支持恢复。所有计划输出都存放在仓库根目录下被git忽略的
.dwp/
目录中(具体路径为
.dwp/plans/
)。
官方参考:https://deepworkplan.com。许可证:MIT。

Start here (first run)

从这里开始(首次运行)

This skill is a self-sufficient entry point: whether a developer arrives from https://deepworkplan.com/init.md or simply installs this skill, the setup plan is the same — and it lives here, so no network is required.
If the repository is not yet AI-first — there is no root
AGENTS.md
and no
.agents/
directory — the recommended first action is to onboard it, even if the developer's request was vague ("set this up", "make this repo AI-first", or a plain install). Before routing anywhere else:
  1. Read the standard locally. Read
    spec/
    (five RFC-2119 documents) and
    shared/adaptation.md
    . The overriding rule is REASON, do not copy-paste: this skill is the reusable engine; what you produce must be adapted to this repository, never templated.
  2. Run onboarding. Read
    onboard/SKILL.md
    and execute it. It is non-destructive: detect existing
    AGENTS.md
    ,
    docs/
    ,
    .agents/
    , or
    CLAUDE.md
    , reconcile rather than overwrite, and ask the developer before replacing anything. The result:
    AGENTS.md
    +
    CLAUDE.md
    symlink, a reasoned
    docs/
    tree, per-module docs, a
    .agents/
    kit, and a gitignored
    .dwp/
    — the repository becomes the agent harness.
  3. Verify conformance. Read
    verify/SKILL.md
    and run it to confirm, objectively, that the repository now meets the standard (AGENTS.md with real commands, the
    .agents/
    catalog, the gitignored
    .dwp/
    , and so on).
  4. Then plan and execute. With the harness in place, create and execute Deep Work Plans (below) — long-horizon, gated, resumable work an agent can run autonomously for hours.
If the repository is already AI-first but its harness predates this skill —
AGENTS.md
/
.agents/
exist, yet there is no
DWP standard:
provenance line, the provenance line is older than the standard shipped here, or
docs/TESTING_GUIDE.md
lacks the scoped-invocation and mapping content the standard requires — offer the targeted harness upgrade before routing: reinstalling the skill is the whole upgrade path, so no separate installer exists. Say in one line what is out of date, then run
onboard/SKILL.md
in
upgrade
mode (Phase 0), which reconciles only the missing or outdated pieces, leaves every handwritten section, custom skill and in-flight plan untouched, and changes nothing on a second run. An in-flight plan keeps its recorded lifecycle; migrating one is a separate, explicit
refine migrate
. If the developer declines, route by intent as normal.
If the repository is already AI-first and current, skip onboarding and route by intent silently — do not announce the detection or the routing decision (no "the repo is already AI-first" / "routing to the create sub-skill" preamble). Just begin the matched sub-skill's flow directly.
该技能是一个自包含的入口:无论开发者是从 https://deepworkplan.com/init.md 跳转而来,还是直接安装本技能,设置流程都是一致的——且流程内置在本地,无需联网。
如果代码仓库尚未实现AI优先——即根目录没有
AGENTS.md
且不存在
.agents/
目录——推荐的首个操作是执行仓库接入,即便开发者的需求很模糊(比如「设置一下」「让这个仓库AI优先」,或是单纯的安装操作)。在路由到其他任何功能之前:
  1. 本地读取标准规范。读取
    spec/
    (5份RFC-2119文档)和
    shared/adaptation.md
    。最高原则是主动推理适配,切勿直接复制粘贴:本技能是可复用的引擎,你生成的内容必须适配当前仓库,绝不能直接套用模板。
  2. 执行接入流程。读取
    onboard/SKILL.md
    并执行。该流程是非破坏性的:会检测已有的
    AGENTS.md
    、
    docs/
    、
    .agents/
    或
    CLAUDE.md
    ,采用协调合并而非覆盖的方式,替换任何内容前都会询问开发者。最终产出:
    AGENTS.md
    +
    CLAUDE.md
    符号链接、结构合理的
    docs/
    目录树、各模块文档、
    .agents/
    工具包,以及被git忽略的
    .dwp/
    目录——代码仓库将成为Agent的运行载体。
  3. 验证合规性。读取
    verify/SKILL.md
    并运行,客观确认仓库现已符合标准(包含带实际可用命令的AGENTS.md、
    .agents/
    目录、被git忽略的
    .dwp/
    目录等)。
  4. 随后规划并执行。有了运行载体后,即可创建并执行深度工作计划(见下文)——这类工作周期长、有阶段校验、可中断恢复,Agent能够自主运行数小时。
如果代码仓库已经实现AI优先,但适配套件版本早于本技能——即存在
AGENTS.md
/
.agents/
,但没有
DWP standard:
来源标识行,或来源标识行的版本早于本技能内置的标准版本,或是
docs/TESTING_GUIDE.md
缺少标准要求的范围调用和映射内容——请在路由前提供定向适配套件升级:重新安装本技能就是完整的升级路径,无需单独的安装程序。先用一句话说明哪些内容已过时,然后以
upgrade
模式运行
onboard/SKILL.md
(阶段0),该模式仅合并缺失或过时的部分,不会改动任何手写内容、自定义技能和进行中的计划,且二次运行不会产生任何变更。进行中的计划会保留其已记录的生命周期;迁移计划是一个单独的显式操作
refine migrate
。如果开发者拒绝升级,则按正常流程根据意图路由。
如果代码仓库已经实现AI优先且版本为最新,跳过接入流程,静默根据意图路由——无需告知检测结果或路由决策(不要先说「该仓库已实现AI优先」/「正在路由到创建子技能」这类开场白),直接启动匹配的子技能流程即可。

What it does

功能说明

This is the router. It does not run any flow itself — it maps the developer's intent to the right sub-skill and tells the agent to read that sub-skill's
SKILL.md
and execute it there.
这是路由层。它本身不执行任何流程——只是将开发者的意图匹配到对应的子技能,指示Agent读取该子技能的
SKILL.md
并在对应流程中执行。

Trust boundary (write scope)

信任边界(写入范围)

allowed-tools
includes write-capable
Edit
,
Write
, and
Bash
because the sub-skills this router delegates to need them; the router itself only reads (the repo tree, the local
spec/
,
shared/
, and sub-skill files). Writes happen inside the delegated sub-skill, each of which declares its own trust boundary:
  • Onboard writes
    AGENTS.md
    ,
    docs/
    , per-module docs,
    .agents/
    , and appends to
    .gitignore
    — reconciling with, never clobbering, what exists, and asking before replacing anything.
  • Create / refine write plan artifacts under the gitignored
    .dwp/
    directory only.
  • Execute / resume write task outputs, progress, and per-task commits — gated by each task's validation, never committing secrets, never pushing without the developer's instruction.
  • Addons install or configure anything only after the developer explicitly accepts the offer, always via pinned, verified install paths.
It MUST NOT: make network calls in the core flow, read or commit credentials, run installers unprompted, or write anywhere outside the surfaces above. The full guarantees and a runnable self-audit live in
TRUST.md
.

allowed-tools
包含具备写入权限的
Edit
、
Write
和
Bash
,因为本路由层委派的子技能需要这些工具;路由层本身仅执行读取操作(读取仓库目录树、本地
spec/
、
shared/
目录及子技能文件)。写入操作都在被委派的子技能中执行,每个子技能都声明了自身的信任边界:
  • Onboard 写入
    AGENTS.md
    、
    docs/
    、各模块文档、
    .agents/
    ,并追加内容到
    .gitignore
    ——会与已有内容协调合并,绝不会覆盖现有内容,替换任何内容前都会询问开发者。
  • Create / refine 仅在被git忽略的
    .dwp/
    目录下写入计划产物。
  • Execute / resume 写入任务输出、进度及逐任务提交——受每个任务的校验规则约束,绝不会提交密钥,未经开发者指示绝不会执行推送操作。
  • Addons 仅在开发者明确接受提议后才安装或配置内容,且始终通过固定的、经过验证的安装路径执行。
严禁以下行为:在核心流程中发起网络调用、读取或提交凭证、未经提示运行安装程序、或写入上述范围之外的任何位置。完整的保障说明及可运行的自审计流程见
TRUST.md
。

For the agent — routing rules

给Agent的说明 —— 路由规则

When the developer wants to plan, execute, or manage structured work, or make a repo AI-agent-ready, match the intent below and read that sub-skill's
SKILL.md
to execute it
. Do not answer directly — each sub-skill carries the full step-by-step flow.
Developer says…Route to
"create a plan", "plan this small fix", "organize this work", "new deep work plan", "/dwp-create"Create → read
create/SKILL.md
"execute the plan", "run the plan", "/dwp-execute"Execute → read
execute/SKILL.md
"modify the plan", "change the scope", "/dwp-refine"Refine → read
refine/SKILL.md
"resume", "continue the interrupted plan", "/dwp-resume"Resume → read
resume/SKILL.md
"plan status", "what's left", "/dwp-status"Status → read
status/SKILL.md
"verify", "is this repo AI-first?", "check conformance", "/dwp-verify"Verify → read
verify/SKILL.md
"make this repo AI-first", "onboard this repo", "set up AGENTS.md + docs + .agents"Onboard → read
onboard/SKILL.md
"create/update a skill or agent", "evolve the kit", "/skill-create", "/agent-create"Author → read
author/SKILL.md
If the intent is ambiguous between planning and managing existing work, ask the developer which they mean before routing.
当开发者需要规划、执行或管理结构化工作,或是让代码仓库适配AI Agent时,请匹配以下意图,并读取对应子技能的
SKILL.md
来执行
。不要直接回答——每个子技能都包含完整的分步执行流程。
开发者的需求示例路由到
「创建一个计划」「规划这个小修复」「整理这项工作」「新建深度工作计划」、
/dwp-create
Create → 读取
create/SKILL.md
「执行计划」「运行计划」、
/dwp-execute
Execute → 读取
execute/SKILL.md
「修改计划」「调整范围」、
/dwp-refine
Refine → 读取
refine/SKILL.md
「恢复」「继续中断的计划」、
/dwp-resume
Resume → 读取
resume/SKILL.md
「计划状态」「还剩什么」、
/dwp-status
Status → 读取
status/SKILL.md
「验证」「这个仓库是AI优先的吗?」「检查合规性」、
/dwp-verify
Verify → 读取
verify/SKILL.md
「让这个仓库AI优先」「接入这个仓库」「设置AGENTS.md + docs + .agents」Onboard → 读取
onboard/SKILL.md
「创建/更新技能或Agent」「升级工具包」、
/skill-create
、
/agent-create
Author → 读取
author/SKILL.md
如果意图在「规划新工作」和「管理现有工作」之间存在歧义,请先询问开发者的需求,再进行路由。

Normative specification (ships with the skill)

规范性规范(随技能内置)

The methodology's authoritative standard lives at
spec/
— five RFC-2119 documents (
DOCUMENTATION_STANDARD
,
DWP_SPECIFICATION
,
AGENT_PROTOCOL
,
ARCHETYPES
,
ADDONS
). It ships inside the skill so an agent reads the standard locally — no network needed. The
onboard
flow and
shared/adaptation.md
reference it as the standard to produce. The public, rendered version lives at https://deepworkplan.com/spec.
该方法论的权威标准存放在
spec/
目录下——包含5份遵循RFC-2119规范的文档(
DOCUMENTATION_STANDARD
、
DWP_SPECIFICATION
、
AGENT_PROTOCOL
、
ARCHETYPES
、
ADDONS
)。标准随技能内置,因此Agent可以本地读取标准,无需联网。
onboard
流程和
shared/adaptation.md
均以此作为生成内容的标准。公开的渲染版标准可访问 https://deepworkplan.com/spec 查看。

Shared resources used by every sub-skill

所有子技能共用的资源

  • shared/context.sh
    — detect repo root, branch, and agent tool; resolve the
    .dwp/
    output location.
  • shared/dwp-paths.md
    — the
    .dwp/plans/
    +
    .dwp/plans/
    output convention and how to override it.
  • shared/adaptation.md
    — the reasoning-over-copy-paste principle and the two repository archetypes (individual repo vs orchestrator hub).
  • shared/troubleshooting.md
    — read only when something is already wrong: discovery failure, stale installation, missing test command, unsupported host capability, inconsistent state.
  • shared/context.sh
    —— 检测仓库根目录、分支和Agent工具;解析
    .dwp/
    输出位置。
  • shared/dwp-paths.md
    ——
    .dwp/plans/
    输出目录约定及覆盖方法。
  • shared/adaptation.md
    —— 「推理优先而非复制粘贴」原则,以及两种仓库原型(独立仓库 vs 编排中心)。
  • shared/troubleshooting.md
    —— 仅在出现问题时读取:包括检测失败、安装过期、测试命令缺失、主机能力不支持、状态不一致等问题的排查。

Addons — one required local review, four opt-in

附加组件 —— 1个必选本地审查,4个可选接入

The
addons/
area holds the capabilities the
onboard
flow layers onto a repo. The AI Diff Reviewer local review is part of the baseline since standard 2.3.0 (installed by
onboard
Phase 7a, run by every Final Review; its CI surface stays optional). The other four addons are opt-in and never part of the AI-first baseline — a repo is fully conformant with zero optional addons. The first optional addon is devcontainer support.
addons/
目录存放
onboard
流程可叠加到仓库中的功能。AI Diff Reviewer 本地审查自标准2.3.0版本起成为基线的一部分(由
onboard
阶段7a安装,每次最终审查都会运行;其CI功能仍为可选)。其余四个附加组件均为可选接入,不属于AI优先基线的组成部分——即便不安装任何可选附加组件,仓库也完全符合合规要求。第一个可选附加组件是devcontainer支持。