spec-update

Original🇨🇳 Chinese
Translated

Execute update iterations of existing features (Single Agent Mode). Trigger condition: Requirements or design of completed features change (plan.md + summary.md exist in the directory). Responsible for the complete process from creating update-xxx.md to implementation and review. If the update scale is large and requires multi-role collaboration, create a new Spec and follow the spec-start process.

1installs
Added on

NPX Install

npx skill4agent add hhu3637kr/skills spec-update

Tags

Translated version includes tags in frontmatter

SKILL.md Content (Chinese)

View Translation Comparison →

Spec Update

Core Principles

  1. Same Directory Principle: Update documents must be placed in the same directory as the original plan.md; creating new directories is prohibited
  2. Non-Archiving Principle: Do not archive after the update is completed; keep it in the original directory for future updates
  3. Incremental Numbering: update-001.md → update-002.md → update-003.md (three digits, no skipping numbers)
  4. Strictly Follow the Plan: Only implement the modifications defined in update-xxx.md; do not add content beyond the plan
  5. Regression Tests Must Pass: All new tests + modified tests + regression tests for original features must pass

User Confirmation (Mandatory)

Use the
AskUserQuestion
tool must be used at the following two nodes:
Node 1 — Update Plan Confirmation (after creating update-xxx.md):
python
AskUserQuestion(
    questions=[{
        "question": "update-xxx.md has been created, can we start executing the update plan?",
        "header": "Confirm Plan",
        "multiSelect": false,
        "options": [
            {
                "label": "Confirm, start execution",
                "description": "The update plan is correct, can start implementation"
            },
            {
                "label": "Need modification",
                "description": "The update plan needs adjustment, please specify modification requirements"
            }
        ]
    }]
)
Node 2 — Review Report Confirmation (after generating update-xxx-review.md):
python
AskUserQuestion(
    questions=[{
        "question": "update-xxx-review.md has been created, is the review result approved?",
        "header": "Confirm Review",
        "multiSelect": false,
        "options": [
            {
                "label": "Review approved",
                "description": "The update implementation meets requirements, review passed"
            },
            {
                "label": "Need fixes",
                "description": "There are issues that need to be fixed, please specify the problems"
            }
        ]
    }]
)
Response handling: Select the confirmation option → proceed; select modification/fix or "Other" → adjust according to user feedback and re-confirm.

Document Templates

  • update-xxx.md template: See references/update-template.md (includes frontmatter field descriptions)
  • update-xxx-summary.md template: See references/summary-template.md (includes frontmatter field descriptions)

Workflow

  1. Confirm Original Spec Directory: Locate the directory and confirm that both
    plan.md
    and
    summary.md
    exist. If summary.md is missing, first complete the original feature using spec-execute
  2. Determine Update Number: Check existing
    update-*.md
    in the directory to determine the next number
  3. Create update-xxx.md: Refer to references/update-template.md and create it in the same directory
  4. Wait for User Confirmation: Use the
    AskUserQuestion
    tool (Node 1)
  5. Retrieve Historical Experience: Call
    /exp-search <keywords>
  6. Create Task List: Create based on the "Implementation Steps" section of update-xxx.md
  7. Implement Update According to Plan: Strictly follow the plan; do not modify code beyond the plan
  8. Write/Update Tests: New tests + modified tests + regression tests
  9. Run Test Verification: Proceed only after all tests pass
  10. Create update-xxx-summary.md: Refer to references/summary-template.md, apply Obsidian format:
    [[plan|Design Plan]]
    double links,
    > [!success]
    /
    > [!warning]
    Callout,
    #spec/更新
    tag
  11. Review with spec-review: Generate update-xxx-review.md
  12. Wait for User Confirmation on Review Report: Use the
    AskUserQuestion
    tool (Node 2), do not archive after completion

Error Handling

ScenarioSolution
Original Spec directory does not existConfirm the path; if it is a new feature, use spec-write + spec-execute
Missing summary.mdFirst complete the original feature using spec-execute
Regression test failsAnalyze the cause → fix the regression code → retest → proceed only after all tests pass

Follow-up Actions

After completing the update:
  1. Call
    /exp-reflect
    for experience reflection
  2. If there is experience precipitation, update the summary to add experience references
  3. Do not archive, keep it in the original directory