Agent Skillsshinpr/claude-code-workflows › recipe-update-doc

recipe-update-doc

GitHub

用于更新现有设计文档(Design Doc/PRD/ADR)的编排技能。通过识别目标、澄清变更、调用子代理执行更新,并经过严格的质量门禁审查与一致性校验,确保文档最终获得批准。

dev-workflows/skills/recipe-update-doc/SKILL.md shinpr/claude-code-workflows

Trigger Scenarios

需要修改或更新现有的设计文档、产品需求文档或架构决策记录 对已生成的技术设计或PRD进行迭代和完善

Install

npx skills add shinpr/claude-code-workflows --skill recipe-update-doc -g -y
More Options

Non-standard path

npx skills add https://github.com/shinpr/claude-code-workflows/tree/main/dev-workflows/skills/recipe-update-doc -g -y

Use without installing

npx skills use shinpr/claude-code-workflows@recipe-update-doc

指定 Agent (Claude Code)

npx skills add shinpr/claude-code-workflows --skill recipe-update-doc -a claude-code -g -y

安装 repo 全部 skill

npx skills add shinpr/claude-code-workflows --all -g -y

预览 repo 内 skill

npx skills add shinpr/claude-code-workflows --list

SKILL.md

Frontmatter
{
    "name": "recipe-update-doc",
    "description": "Update existing design documents (Design Doc \/ PRD \/ ADR) with review",
    "disable-model-invocation": true
}

Execute Skill: llm-friendly-context before writing Agent prompts, handoffs, or generated artifacts.

Context: Dedicated to updating existing design documents.

Orchestrator Definition

Core Identity: "I am an orchestrator." (see subagents-orchestration-guide skill)

First Action: Register Steps 1-6 using TaskCreate before any execution.

Execution Protocol:

  1. Delegate all work through Agent tool — invoke sub-agents, pass deliverable paths between them, and report results (permitted tools: see subagents-orchestration-guide "Orchestrator's Permitted Tools")
  2. Execute update flow:
    • Identify target → Clarify changes → Update document → Review → Consistency check
    • Stop at every [Stop: ...] marker → Wait for user approval before proceeding
  3. Scope: Complete when updated document receives approval

CRITICAL: Execute document-reviewer and all stopping points — each serves as a quality gate for document accuracy.

Workflow Overview

Target document → [Stop: Confirm changes]
                        ↓
              technical-designer / technical-designer-frontend / prd-creator (update mode)
                        ↓ (Design Doc only)
              code-verifier → document-reviewer → [Stop: Review approval]
                        ↓ (Design Doc only)
              design-sync → [Stop: Final approval]

Scope Boundaries

Included in this skill:

  • Existing document identification and selection
  • Change content clarification with user
  • Document update with appropriate agent (update mode)
  • Document review with document-reviewer
  • Consistency verification with design-sync (Design Doc only)

Out of scope (redirect to appropriate skills):

  • New requirement analysis
  • Work planning or implementation

Responsibility Boundary: This skill completes with updated document approval.

Target document: $ARGUMENTS

Execution Flow

Step 1: Target Document Identification

# Check existing documents
ls docs/design/*.md docs/prd/*.md docs/adr/*.md 2>/dev/null | grep -v template

Decision flow:

Situation Action
$ARGUMENTS specifies a path Use specified document
$ARGUMENTS describes a topic Search documents matching the topic
Multiple candidates found Present options with AskUserQuestion
No documents found Report and end (document creation is out of scope)

Step 2: Document Type and Layer Determination

Determine type from document path, then determine the layer to select the correct update agent:

Path Pattern Type Update Agent Notes
docs/design/*.md Design Doc technical-designer or technical-designer-frontend See layer detection below
docs/prd/*.md PRD prd-creator -
docs/adr/*.md ADR technical-designer or technical-designer-frontend See layer detection below

Layer detection (for Design Doc and ADR): Read the document and determine its layer from content signals:

  • Frontend (→ technical-designer-frontend): Document title/scope mentions React, components, UI, frontend; or file contains component hierarchy, state management, UI interactions
  • Backend (→ technical-designer): All other cases (API, data layer, business logic, infrastructure)

ADR Update Guidance:

  • Minor changes (clarification, typo fix, small scope adjustment): Update the existing ADR file
  • Major changes (decision reversal, significant scope change): Create a new ADR that supersedes the original

Step 3: Change Content Clarification [Stop]

Use AskUserQuestion to clarify what changes are needed:

  • What sections need updating
  • Reason for the change (bug fix findings, spec change, review feedback, etc.)
  • Expected outcome after the update

Confirm understanding of changes with user before proceeding.

Step 4: Document Update

Invoke the update agent determined in Step 2:

subagent_type: [Update Agent from Step 2]
description: "Update [Type from Step 2]"
prompt: |
  Operation Mode: update
  Existing Document: [path from Step 1]

  ## Changes Required
  [Changes clarified in Step 3]

  Update the document to reflect the specified changes.
  Add change history entry.

Step 5: Document Review [Stop]

For Design Doc updates only: Before document-reviewer, invoke code-verifier:

subagent_type: code-verifier
description: "Verify updated Design Doc"
prompt: |
  doc_type: design-doc
  document_path: [path from Step 1]
  Verify the updated Design Doc against current codebase.

  Verification focus: Pay special attention to literal identifier referential
  integrity in the updated sections (paths, endpoints, type names, config keys).

Store output as: $CODE_VERIFICATION_OUTPUT

Invoke document-reviewer:

subagent_type: document-reviewer
description: "Review updated document"
prompt: |
  Review the following updated document.

  doc_type: [Design Doc / PRD / ADR]
  target: [path from Step 1]
  mode: standard
  code_verification: $CODE_VERIFICATION_OUTPUT (Design Doc only, omit for PRD/ADR)

  Focus on:
  - Consistency of updated sections with rest of document
  - No contradictions introduced by changes
  - Completeness of change history

Store output as: $STEP_5_OUTPUT

On review result:

  • Approved → Proceed to Step 6
  • Needs revision → Return to Step 4 with the following prompt (max 2 iterations):
    subagent_type: [Update Agent from Step 2]
    description: "Revise [Type from Step 2]"
    prompt: |
      Operation Mode: update
      Existing Document: [path from Step 1]
    
      ## Review Feedback to Address
      $STEP_5_OUTPUT
    
      Address each issue raised in the review feedback.
    
  • After 2 rejections → Flag for human review, present accumulated feedback to user and end

Present review result to user for approval.

Step 6: Consistency Verification (Design Doc only) [Stop]

Skip condition: Document type is PRD or ADR → Proceed to completion.

For Design Doc, invoke design-sync:

subagent_type: design-sync
description: "Verify consistency"
prompt: |
  Verify consistency of the updated Design Doc with other design documents.

  Updated document: [path from Step 1]

On consistency result:

  • No conflicts → Present result to user for final approval
  • Conflicts detected → Present conflicts to user with AskUserQuestion:
    • A: Return to Step 4 to resolve conflicts in this document
    • B: End and address conflicts separately

Error Handling

Error Action
Target document not found Report and end (document creation is out of scope)
Sub-agent update fails Log failure, present error to user, retry once
Review rejects after 2 revisions Stop loop, flag for human intervention
design-sync detects conflicts Present to user for resolution decision

Completion Criteria

  • Identified target document
  • Clarified change content with user
  • Updated document with appropriate agent (update mode)
  • Executed code-verifier before document-reviewer (Design Doc only)
  • Executed document-reviewer and addressed feedback
  • Executed design-sync for consistency verification (Design Doc only)
  • Obtained user approval for updated document

Output Example

Document update completed.

  • Updated document: docs/design/[document-name].md
  • Approval status: User approved

Version History

  • 66e3b29 Current 2026-07-05 12:01

Same Skill Collection

dev-skills/skills/ai-development-guide/SKILL.md
dev-skills/skills/coding-principles/SKILL.md
dev-skills/skills/documentation-criteria/SKILL.md
dev-skills/skills/external-resource-context/SKILL.md
dev-skills/skills/frontend-ai-guide/SKILL.md
dev-skills/skills/implementation-approach/SKILL.md
dev-skills/skills/integration-e2e-testing/SKILL.md
dev-skills/skills/llm-friendly-context/SKILL.md
dev-skills/skills/test-implement/SKILL.md
dev-skills/skills/testing-principles/SKILL.md
dev-skills/skills/typescript-rules/SKILL.md
dev-workflows-frontend/skills/ai-development-guide/SKILL.md
dev-workflows-frontend/skills/coding-principles/SKILL.md
dev-workflows-frontend/skills/documentation-criteria/SKILL.md
dev-workflows-frontend/skills/external-resource-context/SKILL.md
dev-workflows-frontend/skills/frontend-ai-guide/SKILL.md
dev-workflows-frontend/skills/implementation-approach/SKILL.md
dev-workflows-frontend/skills/integration-e2e-testing/SKILL.md
dev-workflows-frontend/skills/llm-friendly-context/SKILL.md
dev-workflows-frontend/skills/recipe-diagnose/SKILL.md
dev-workflows-frontend/skills/recipe-front-adjust/SKILL.md
dev-workflows-frontend/skills/recipe-front-build/SKILL.md
dev-workflows-frontend/skills/recipe-front-design/SKILL.md
dev-workflows-frontend/skills/recipe-front-plan/SKILL.md
dev-workflows-frontend/skills/recipe-front-review/SKILL.md
dev-workflows-frontend/skills/recipe-task/SKILL.md
dev-workflows-frontend/skills/recipe-update-doc/SKILL.md
dev-workflows-frontend/skills/subagents-orchestration-guide/SKILL.md
dev-workflows-frontend/skills/task-analyzer/SKILL.md
dev-workflows-frontend/skills/test-implement/SKILL.md
dev-workflows-frontend/skills/testing-principles/SKILL.md
dev-workflows-frontend/skills/typescript-rules/SKILL.md
dev-workflows-fullstack/skills/ai-development-guide/SKILL.md
dev-workflows-fullstack/skills/coding-principles/SKILL.md
dev-workflows-fullstack/skills/documentation-criteria/SKILL.md
dev-workflows-fullstack/skills/external-resource-context/SKILL.md
dev-workflows-fullstack/skills/frontend-ai-guide/SKILL.md
dev-workflows-fullstack/skills/implementation-approach/SKILL.md
dev-workflows-fullstack/skills/integration-e2e-testing/SKILL.md
dev-workflows-fullstack/skills/llm-friendly-context/SKILL.md
dev-workflows-fullstack/skills/recipe-add-integration-tests/SKILL.md
dev-workflows-fullstack/skills/recipe-build/SKILL.md
dev-workflows-fullstack/skills/recipe-design/SKILL.md
dev-workflows-fullstack/skills/recipe-diagnose/SKILL.md
dev-workflows-fullstack/skills/recipe-front-adjust/SKILL.md
dev-workflows-fullstack/skills/recipe-front-build/SKILL.md
dev-workflows-fullstack/skills/recipe-front-design/SKILL.md
dev-workflows-fullstack/skills/recipe-front-plan/SKILL.md
dev-workflows-fullstack/skills/recipe-front-review/SKILL.md
dev-workflows-fullstack/skills/recipe-fullstack-build/SKILL.md
dev-workflows-fullstack/skills/recipe-fullstack-implement/SKILL.md
dev-workflows-fullstack/skills/recipe-implement/SKILL.md
dev-workflows-fullstack/skills/recipe-plan/SKILL.md
dev-workflows-fullstack/skills/recipe-prepare-implementation/SKILL.md
dev-workflows-fullstack/skills/recipe-reverse-engineer/SKILL.md
dev-workflows-fullstack/skills/recipe-review/SKILL.md
dev-workflows-fullstack/skills/recipe-task/SKILL.md
dev-workflows-fullstack/skills/recipe-update-doc/SKILL.md
dev-workflows-fullstack/skills/subagents-orchestration-guide/SKILL.md
dev-workflows-fullstack/skills/task-analyzer/SKILL.md
dev-workflows-fullstack/skills/test-implement/SKILL.md
dev-workflows-fullstack/skills/testing-principles/SKILL.md
dev-workflows-fullstack/skills/typescript-rules/SKILL.md
dev-workflows/skills/ai-development-guide/SKILL.md
dev-workflows/skills/coding-principles/SKILL.md
dev-workflows/skills/documentation-criteria/SKILL.md
dev-workflows/skills/external-resource-context/SKILL.md
dev-workflows/skills/implementation-approach/SKILL.md
dev-workflows/skills/integration-e2e-testing/SKILL.md
dev-workflows/skills/llm-friendly-context/SKILL.md
dev-workflows/skills/recipe-add-integration-tests/SKILL.md
dev-workflows/skills/recipe-build/SKILL.md
dev-workflows/skills/recipe-design/SKILL.md
dev-workflows/skills/recipe-diagnose/SKILL.md
dev-workflows/skills/recipe-implement/SKILL.md
dev-workflows/skills/recipe-plan/SKILL.md
dev-workflows/skills/recipe-prepare-implementation/SKILL.md
dev-workflows/skills/recipe-reverse-engineer/SKILL.md
dev-workflows/skills/recipe-review/SKILL.md
dev-workflows/skills/recipe-task/SKILL.md
dev-workflows/skills/subagents-orchestration-guide/SKILL.md
dev-workflows/skills/task-analyzer/SKILL.md
dev-workflows/skills/testing-principles/SKILL.md
skills/ai-development-guide/SKILL.md
skills/coding-principles/SKILL.md
skills/documentation-criteria/SKILL.md
skills/external-resource-context/SKILL.md
skills/frontend-ai-guide/SKILL.md
skills/implementation-approach/SKILL.md
skills/integration-e2e-testing/SKILL.md
skills/llm-friendly-context/SKILL.md
skills/recipe-add-integration-tests/SKILL.md
skills/recipe-build/SKILL.md
skills/recipe-design/SKILL.md
skills/recipe-diagnose/SKILL.md
skills/recipe-front-adjust/SKILL.md
skills/recipe-front-build/SKILL.md
skills/recipe-front-design/SKILL.md
skills/recipe-front-plan/SKILL.md
skills/recipe-front-review/SKILL.md
skills/recipe-fullstack-build/SKILL.md
skills/recipe-fullstack-implement/SKILL.md
skills/recipe-implement/SKILL.md
skills/recipe-plan/SKILL.md
skills/recipe-prepare-implementation/SKILL.md
skills/recipe-reverse-engineer/SKILL.md
skills/recipe-review/SKILL.md
skills/recipe-task/SKILL.md
skills/recipe-update-doc/SKILL.md
skills/subagents-orchestration-guide/SKILL.md
skills/task-analyzer/SKILL.md
skills/test-implement/SKILL.md
skills/testing-principles/SKILL.md
skills/typescript-rules/SKILL.md

Metadata

Files
0
Version
66e3b29
Hash
f4f16c72
Indexed
2026-07-05 12:01

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-08 22:52
浙ICP备14020137号-1 $Carte des visiteurs$