ns-spec-driven
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNextStage Spec-Driven
NextStage 规格驱动交付
Delivery face for spec-driven journey: clarify, specify, (consistency / partition), tasks, execute, close.
Orchestrate — not implement phase bodies inline. Read phase reference at delegation time. State on disk (, , handoff files), not chat history.
docs/versions/docs/context/Entry priority 2 (feature / version / SDD / multi-day / resume). Harness table: . Trigger phrases: . Bare quick fix, no SDD context → redirect (priority 5) unless user explicitly invoked this skill.
../../ns-harness/references/code-skill-routing.mdreferences/entry-triggers.mdns-coder交付界面用于规格驱动的开发流程:澄清需求、制定规格、(一致性检查/任务拆分)、生成任务、执行、收尾。
编排而非内联实现阶段内容。在委托执行时读取阶段参考文档。状态存储在磁盘(、、交接文件)中,而非聊天记录。
docs/versions/docs/context/进入优先级2(功能/版本/SDD/多日工作/恢复)。参考Harness表:。触发短语:。无SDD上下文的单纯快速修复 → 重定向至(优先级5),除非用户明确调用本技能。
../../ns-harness/references/code-skill-routing.mdreferences/entry-triggers.mdns-coderRouting (read first)
路由规则(请先阅读)
| Handoff | Target |
|---|---|
| Small / quick inside SDD | |
| Version + handoff | |
| Task file generation | |
| Bare quick fix, no SDD context | Redirect |
| 交接场景 | 目标技能 |
|---|---|
| SDD范围内的小型/快速任务 | |
| 版本+交接文件 | |
| 任务文件生成 | |
| 无SDD上下文的单纯快速修复 | 重定向至 |
Harness
Harness相关
See , , .
../../ns-harness/references/session-boot.md../../ns-harness/references/artifact-layout.mdreferences/gates.md| Variable | Resolve via |
|---|---|
| User scope or existing folder under |
详见、、。
../../ns-harness/references/session-boot.md../../ns-harness/references/artifact-layout.mdreferences/gates.md| 变量 | 解析方式 |
|---|---|
| 用户指定范围或 |
Out of band (not this skill)
非本技能处理场景
Brownfield onboarding manual — never auto-run, never pipeline phase:
| Need | Skill |
|---|---|
Full prepare after | |
| Single worker only | |
architecture-rules.mddocs/context/brownfield-map.md/ns-harness prepare this repo遗留系统接入为手动操作 — 绝不自动运行,绝不作为流水线阶段:
| 需求 | 对应技能 |
|---|---|
| |
| 仅需单个工作进程 | |
若仍为占位文件或缺失且任务需要这些文件:告知用户运行,然后停止操作 — 或在用户警告后坚持继续时,才继续SDD流程。
architecture-rules.mddocs/context/brownfield-map.md/ns-harness prepare this repoJourney (delivery only)
交付流程(仅交付环节)
mermaid
flowchart LR
user[User request]
size[Auto-size]
clarify[Clarify]
specify[Specify]
consist[Consistency]
part[Partition]
tasks[Tasks]
exec[Execute]
close[Close]
quick[Quick mode]
user --> size
size -->|Small| quick
size -->|Medium+| clarify
clarify --> specify
specify --> consist
specify --> part
specify --> tasks
tasks --> exec
exec --> close
quick --> exec| Phase | When | Reference |
|---|---|---|
| Clarify | Ambiguity / gray areas | |
| Specify | Always for Medium+ | |
| Consistency | Before tasks (Large+) | |
| Partition | Multi-slice versions | |
| Tasks | Medium+ formal tasks | |
| Execute | Always | See execute routing below |
| Close | After delivery | |
| Quick | ≤3 files, one-sentence scope | |
Details: , .
references/auto-sizing.mdreferences/router.mdmermaid
flowchart LR
user[User request]
size[Auto-size]
clarify[Clarify]
specify[Specify]
consist[Consistency]
part[Partition]
tasks[Tasks]
exec[Execute]
close[Close]
quick[Quick mode]
user --> size
size -->|Small| quick
size -->|Medium+| clarify
clarify --> specify
specify --> consist
specify --> part
specify --> tasks
tasks --> exec
exec --> close
quick --> exec| 阶段 | 触发时机 | 参考文档 |
|---|---|---|
| 澄清需求 | 存在歧义/模糊领域 | |
| 制定规格 | 中型及以上项目必须执行 | |
| 一致性检查 | 生成任务前(大型项目) | |
| 任务拆分 | 多切片版本 | |
| 生成任务 | 中型及以上项目的正式任务 | |
| 执行 | 所有场景 | 见下方执行路由规则 |
| 收尾 | 交付完成后 | |
| 快速模式 | ≤3个文件、单句描述范围 | |
详情:、。
references/auto-sizing.mdreferences/router.mdBoot (mandatory, once per session)
会话启动(强制要求,每会话一次)
- Classify request → Small / Medium / Large ().
references/auto-sizing.md - Check resume signals (,
execution-handoff.md, partial version) →version-roadmap.md.references/session-continuity.md - Agent runtime gate — agent-api / intelligent SaaS (): MUST load
references/agent-runtime-integration.mdin session before any phase; stop if skill not installed.ns-langgraph-agents - Scan installed complements (soft) → .
references/skill-integrations.md - Confirm once when needed: target version id, language for markdown artifacts — natural chat (). Never open with telegraphic status dump or phase jargon.
references/human-communication.md
- 分类请求 → 小型/中型/大型()。
references/auto-sizing.md - 检查恢复信号(、
execution-handoff.md、部分完成的版本) →version-roadmap.md。references/session-continuity.md - Agent运行时网关 — agent-api / 智能SaaS():必须在任何阶段前加载
references/agent-runtime-integration.md到会话中;若技能未安装则停止操作。ns-langgraph-agents - 扫描已安装的补充技能(软依赖) → 。
references/skill-integrations.md - 必要时确认一次:目标版本ID、Markdown工件使用的语言 — 使用自然对话()。绝不要以电报式状态转储或阶段术语开场。
references/human-communication.md
Human communication
人机沟通规则
Chat short, natural language. Read before any human gate or boot confirm.
references/human-communication.md- Name next deliverable ("requirements document", "task files") — not internal phases ("Specify", "Clarify").
- Chat stand alone: highlights in plain language; document IDs only after meaning (Gate 1 highlights in that file).
- Never use ,
Reply:, or "go for Specify".Premise: - Caveman / artifact-compress = files only — never chat.
使用简短、自然的语言聊天。在进行任何人机网关确认或会话启动确认前,请阅读。
references/human-communication.md- 明确下一个交付物(如“需求文档”、“任务文件”)—— 而非内部阶段名称(如“制定规格”、“澄清需求”)。
- 聊天内容需独立可理解:用平实语言突出重点;仅在说明含义后提及文档ID(见该文件中的Gate 1 highlights)。
- 绝不要使用、
Reply:或“进入制定规格阶段”这类表述。Premise: - 极简/工件压缩模式 = 仅发送文件 — 绝不发送聊天内容。
Orchestration mandate
编排强制规则
- Delegate = spawn bridge when available (else read phase reference in-session). Not "skip reference" while bridge present. See .
../../ns-harness/references/subagent-dispatch.md - Read phase reference before that phase — never improvise from memory.
- Do not ask "continue to next phase?" between phases in same sized pipeline.
- Do not invoke or brownfield prepare references.
/ns-harness prepare - Do not load multiple version specs into context — see .
references/context-budget.md - After each phase, verify expected artifact paths exist before advancing.
- 委托执行 = 可用时生成桥接(否则在会话内读取阶段参考文档)。桥接存在时绝不要“跳过参考文档”。详见。
../../ns-harness/references/subagent-dispatch.md - 在进入对应阶段前必须阅读阶段参考文档 — 绝不凭记忆即兴操作。
- 在同一规模的流水线各阶段之间,不要询问“是否继续下一阶段?”。
- 不要调用或遗留系统准备相关参考文档。
/ns-harness prepare - 不要加载多个版本规格到上下文 — 详见。
references/context-budget.md - 每个阶段完成后,在进入下一阶段前验证预期的工件路径是否存在。
Auto-size summary
自动规模调整总结
| Size | Pipeline |
|---|---|
| Small | |
| Medium | Clarify (if needed) → Specify → Tasks (MUST |
| Large | Full chain including Consistency and/or Partition when scope warrants |
Safety valve: scope exceeds ~3 files or explodes mid-session → stop, formalize via Medium+ pipeline (requirements + tasks).
| 规模 | 流水线流程 |
|---|---|
| 小型 | |
| 中型 | 澄清需求(若需要)→ 制定规格 → 生成任务(可用时必须使用 |
| 大型 | 完整流程链,包括根据范围需要进行的一致性检查和/或任务拆分 |
安全机制:范围超过约3个文件或会话中范围突然扩大 → 停止操作,通过中型及以上流水线(需求+任务)规范化处理。
Execute routing
执行路由规则
Worker dispatch: MUST use harness project agents when available — . Inline mapped skill while bridge present = forbidden.
../../ns-harness/references/subagent-dispatch.md| Context | Worker |
|---|---|
| Ad-hoc / quick / single task | |
Version with | |
Partitioned version ( | |
| GitLab issue URL + MCP available | |
| Autonomous multi-step local plan | |
Face = orchestrator (); does not implement — drives (classic) or (slices).
ns-spec-drivenrun-implementation.mdorchestrator.mdTests while executing version tasks: unit/integration only. Forbidden for agents to run E2E during task/batch loop; human runs E2E at version end ().
../ns-coder/references/run-implementation.md工作进程调度:必须在可用时使用Harness项目Agent — 。桥接存在时禁止使用内联映射技能。
../../ns-harness/references/subagent-dispatch.md| 上下文 | 工作进程 |
|---|---|
| 临时/快速/单个任务 | |
带有 | |
已拆分的版本( | |
| GitLab问题URL + MCP可用 | |
| 自主多步骤本地计划 | |
界面=编排器();不负责实现 — 驱动(经典模式)或(切片模式)。
ns-spec-drivenrun-implementation.mdorchestrator.md执行版本任务时的测试:仅支持单元/集成测试。禁止Agent在任务/批量循环中运行端到端测试;需由人工在版本结束时运行端到端测试()。
../ns-coder/references/run-implementation.mdTrigger → reference
触发词→参考文档
| User says | Read first |
|---|---|
| "specify", "requirements for vX" | |
| "clarify", vague scope | |
| "implement", "build version", tasks exist | |
| "quick fix", "just change X" | |
"resume", "continue version", partial | |
| "orchestrate slices", partitioned roadmap | |
| UI / design work | |
| README / docs | |
| security headers / modernize | |
| agent-api / intelligent SaaS / LangGraph scope | |
| MR / PR review | |
| 用户表述 | 优先阅读文档 |
|---|---|
| "specify"、"requirements for vX" | |
| "clarify"、模糊范围 | |
| "implement"、"build version"、任务已存在 | |
| "quick fix"、"just change X" | |
"resume"、"continue version"、 | |
| "orchestrate slices"、已拆分的路线图 | |
| UI/设计工作 | |
| README/文档 | |
| 安全头/现代化改造 | |
| agent-api/智能SaaS/LangGraph范围 | |
| MR/PR评审 | 直接使用 |
Agent runtime (mandatory when detected)
Agent运行时(检测到则强制要求)
Non-negotiable for agent-api and intelligent SaaS products. See . Greenfield with no : Feature 001 = langgraph bootstrap, then version deltas.
references/agent-runtime-integration.mdagent-api/对于agent-api和智能SaaS产品为非协商要求。详见。无的新项目:Feature 001=LangGraph引导,然后进行版本增量开发。
references/agent-runtime-integration.mdagent-api/Complement integrations
补充技能集成
spec-drivengitlabagentsns-frontend-designns-docs-writerns-best-practicesns-coderdepends.agents/skills/references/skill-integrations.mdbash
npx @nextstage-brasil/harness --skill ns-frontend-design --skill ns-docs-writer --skill ns-best-practices --no-scaffold -yspec-drivengitlabagentsns-coderdependsns-frontend-designns-docs-writerns-best-practices.agents/skills/references/skill-integrations.mdbash
npx @nextstage-brasil/harness --skill ns-frontend-design --skill ns-docs-writer --skill ns-best-practices --no-scaffold -yCompletion summary
完成总结
When version or quick fix closes, report:
- Artifacts written or updated (paths).
- Handoff status if applicable.
- Suggested next step (living spec done → next version clarify; quick fix → optional review).
版本或快速修复完成时,需报告:
- 已写入或更新的工件(路径)。
- 交接状态(若适用)。
- 建议的下一步操作(活规格完成 → 下一版本需求澄清;快速修复 → 可选评审)。
Forbidden
禁止操作
- Auto-run or chain .
/ns-harness prepare - List Prepare as SDD phase.
- Hard-require complement skills when missing from (delegate when present; see Complement integrations).
.agents/skills/ - Plan or execute agent-api / intelligent SaaS work without loading when detection signals match.
ns-langgraph-agents - Generate requirements/tasks yourself without reading phase references / delegating task files via .
task-writer-agent - Skip when formal tasks exist for version.
execution-handoff.md - Address human with internal phase names ("Specify", "Clarify") or bot chrome (,
Reply:).Premise:
- 自动运行或链式调用。
/ns-harness prepare - 将Prepare列为SDD阶段。
- 当中缺少补充技能时强制要求使用(存在时委托执行;见补充技能集成)。
.agents/skills/ - 检测到匹配信号时,未加载就规划或执行agent-api/智能SaaS工作。
ns-langgraph-agents - 未阅读阶段参考文档/未通过委托生成任务文件,自行生成需求/任务。
task-writer-agent - 版本存在正式任务时跳过。
execution-handoff.md - 使用内部阶段名称(如“制定规格”、“澄清需求”)或机器人格式(如、
Reply:)与用户沟通。Premise:
Invocation examples
调用示例
/ns-spec-drivenSpecify and implement user notifications for version 2.1Quick fix: add nullable email field to the signup formResume implementation — handoff exists for docs/versions/1.0.0/Continue partitioned version 3.8.0 — run pending slices from version-roadmap.md/ns-spec-drivenSpecify and implement user notifications for version 2.1Quick fix: add nullable email field to the signup formResume implementation — handoff exists for docs/versions/1.0.0/Continue partitioned version 3.8.0 — run pending slices from version-roadmap.md