[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E5EFW37C0QJ0VZZG7SAWHD":3,"skill-same:01M7E5EFW37C0QJ0VZZG7SAWHD":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M7E5EFW37C0QJ0VZZG7SAWHD","speckit-ext-update-workspace",null,"Update workspace documentation after feature completion","stefanwalther\u002Fghn","stefanwalther","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F669728?v=4","01M7E59BWN972ZZWN6SJ3RBZS8","Stefan Walther","01M7E59BX6XCFE72NWR5BN5M78",1,"MIT","https:\u002F\u002Fgithub.com\u002Fstefanwalther\u002Fghn\u002Fblob\u002Fmain\u002F.specify\u002Fextensions\u002Fext\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-ext-update-workspace\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: speckit-ext-update-workspace\ndescription: Update workspace documentation after feature completion\ncompatibility: Requires spec-kit project structure with .specify\u002F directory\nmetadata:\n  author: github-spec-kit\n  source: ext:commands\u002Fspeckit.ext.update-workspace.md\n---\n\n## User Input\n\n```text\n$ARGUMENTS\n```\n\nYou **MUST** consider the user input before proceeding (if not empty).\n\n## Outline\n\nThis extension updates workspace-level documentation (README.md, roadmap, learnings) after a feature is completed. It extracts feature information from spec.md and git, prompts for subjective details, discovers documentation files by convention, and applies validated updates with backup support.\n\n**Core Principle**: Convention over configuration - discover docs by pattern, user confirms selection.\n\n### Execution Steps\n\n1. **Parse Arguments**\n\nParse `$ARGUMENTS` to extract:\n- Target directory (required, first argument) - the spec directory (e.g., `specs\u002F003-feature-name\u002F`)\n- Flags: `--dry-run` (preview mode without modifications)\n- If `--help` or no arguments: Display usage and exit\n\n**Default behavior**: If no target provided, attempt to detect from current git branch name:\n```bash\ngit rev-parse --abbrev-ref HEAD\n```\nParse branch name for pattern `{number}-{name}` and look for matching `specs\u002F{number}-{name}\u002F` directory.\n\n2. **Extract Feature Information**\n\n**From spec.md** (using Read tool):\n- Read `{target}\u002Fspec.md`\n- Extract feature title: First `# ` heading\n- Extract status: `**Status**:` field value\n- Extract created date: `**Created**:` field value\n\n**From directory name**:\n- Parse `specs\u002F{number}-{name}\u002F` pattern\n- Extract feature number (e.g., \"003\")\n- Extract feature name (e.g., \"update-workspace-docs\")\n\n**From git** (using Bash tool):\n```bash\n# Completion date (last commit on feature)\ngit log -1 --format=%cs\n\n# Files changed compared to main\ngit diff --name-only main...HEAD | wc -l\n\n# Current branch name\ngit rev-parse --abbrev-ref HEAD\n```\n\n**Display extracted info**:\n```\n=== Feature Information ===\nNumber:      003\nName:        update-workspace-docs\nTitle:       Update Workspace Documentation\nStatus:      Draft\nCreated:     2025-12-31\nCompleted:   2025-12-31\nFiles:       15 files changed\nBranch:      003-update-workspace-docs\n```\n\n**Validation**:\n- If spec.md not found: ERROR \"No spec.md found in {target}\"\n- If feature number cannot be parsed: WARN and prompt user for manual input\n\n3. **Discover Documentation Files**\n\nUse Glob tool to find documentation files by convention:\n\n**Priority 1 (Always check)**:\n```\nREADME.md                    # Repository root\n```\n\n**Priority 2 (Common patterns)**:\n```\ndocs\u002F*.md                    # Most common docs directory\ndoc\u002F*.md                     # Alternative spelling\nCHANGELOG.md                 # Version history at root\nROADMAP.md                   # If at root\n```\n\n**Discovery execution**:\n```\nGlob: README.md\nGlob: docs\u002F*.md\nGlob: doc\u002F*.md\nGlob: CHANGELOG.md\nGlob: ROADMAP.md\n```\n\n**Present discovered files**:\n```\n=== Documentation Files Found ===\n[1] README.md\n[2] docs\u002Froadmap.md\n[3] docs\u002Flearnings.md\n[4] CHANGELOG.md\n\nWhich files should be updated? (comma-separated numbers, or 'all'):\n```\n\nUse AskUserQuestion tool to let user select which files to update.\n\n**If no files found**: Ask user to specify paths manually.\n\n4. **Gather Subjective Information**\n\nPrompt user for information that cannot be automatically extracted:\n\n**4.1 Feature Description**\n\nUse AskUserQuestion:\n```\nDescribe the capabilities delivered by this feature (1-2 sentences, stakeholder-friendly):\n\nExamples:\n- \"LLM-driven extension for updating workspace docs after feature completion\"\n- \"Automated milestone tracking and learnings capture\"\n\nYour description:\n```\n\n**4.2 Breaking Changes**\n\nUse AskUserQuestion:\n```\nAre there any breaking changes? (yes\u002Fno)\n```\n\nIf yes, prompt for details:\n```\nDescribe the breaking changes:\n```\n\n**4.3 Dependencies Resolved**\n\nUse AskUserQuestion:\n```\nDid this feature unblock other work? (yes\u002Fno)\n```\n\nIf yes, prompt for details:\n```\nWhich features\u002Fmilestones were unblocked:\n```\n\n**4.4 Patterns\u002FLearnings Identified**\n\nUse AskUserQuestion:\n```\nDid this feature reveal any patterns, anti-patterns, or lessons worth documenting? (yes\u002Fno)\n```\n\nIf yes, prompt for details:\n```\nBriefly describe the pattern\u002Flearning:\n```\n\n5. **Analyze Target Files (Parallel)**\n\n**Threshold Check**: If selected file count ≤ 2, process sequentially (skip parallelization).\n\nFor 3+ selected documentation files, analyze in parallel using sub-agents:\n\n**Display**:\n```\nAnalyzing {count} documentation files in parallel...\n```\n\na. **Launch parallel sub-agents** for each selected file:\n\n**CRITICAL**: Launch these as PARALLEL Task calls in a single tool call block.\n\nFor each file, use Task tool with:\n- subagent_type: \"general-purpose\"\n- description: \"Analyze documentation file\"\n- prompt: |\n    You are analyzing a documentation file to find update locations.\n\n    ## File to Analyze\n    {file_path}\n\n    ## Feature Context\n    Feature Number: {feature_number}\n    Feature Title: {feature_title}\n\n    ## Instructions\n    1. Read the file using the Read tool\n    2. Find sections matching these patterns:\n       - Milestone: \"## Completed Milestones\", \"## Completed\", \"## Done\", \"## Changelog\", \"## History\", \"## What's New\"\n       - Status: \"## Current Status\", \"## Project Status\", \"## Roadmap\", \"## Progress\"\n       - Learnings: \"## Learnings\", \"## Patterns\", \"## Lessons Learned\", \"## Notes\"\n    3. For milestone sections, detect table format:\n       - Look for `|` characters indicating markdown table\n       - Parse header row to understand column structure\n       - Note whether newest entries are first or last\n    4. Check for duplicates:\n       - Search for feature number or title in existing content\n       - Report if feature appears already documented\n\n    ## Output Format (JSON)\n    ```json\n    {\n      \"file\": \"README.md\",\n      \"sections\": [\n        {\n          \"name\": \"Completed Milestones\",\n          \"line\": 45,\n          \"type\": \"milestone\",\n          \"header_pattern\": \"## Completed Milestones\"\n        }\n      ],\n      \"table_format\": {\n        \"found\": true,\n        \"columns\": [\"Feature\", \"Status\", \"Date\", \"Description\"],\n        \"order\": \"newest_first\",\n        \"header_line\": 46,\n        \"separator_line\": 47\n      },\n      \"duplicate_found\": false,\n      \"duplicate_context\": null\n    }\n    ```\n\nb. **Wait for all agents to complete** before proceeding.\n\nc. **Aggregate results**:\n   - Parse JSON from each agent\n   - Merge all file analyses into unified structure\n   - Flag any files with duplicates or issues\n\nd. **Error handling**:\n   - If an agent fails: Skip that file with warning, continue with others\n   - If all agents fail: Fall back to sequential processing with warning\n   - Report errors clearly: \"Analysis failed for {file}. Skipping.\"\n\n**Display progress**:\n```\nAnalyzing documentation files in parallel...\n✓ README.md (1 section found)\n✓ docs\u002Froadmap.md (2 sections found)\n✓ CHANGELOG.md (1 section found)\nAll files analyzed. Proceeding with update generation.\n```\n\n**For ≤2 files (sequential processing)**:\n\nFor each selected documentation file:\n\na. **Read the file** using Read tool\n\nb. **Identify relevant sections** by searching for common markers:\n\n**Milestone\u002FCompleted sections**:\n```\n## Completed Milestones\n## Completed\n## Done\n## Changelog\n## History\n## What's New\n```\n\n**Status sections**:\n```\n## Current Status\n## Project Status\n## Roadmap\n```\n\n**Learnings sections**:\n```\n## Learnings\n## Patterns\n## Lessons Learned\n## Notes\n```\n\nc. **Detect table format** (if milestone section found):\n- Look for `|` characters indicating markdown table\n- Parse header row to understand column structure\n- Note whether newest entries are first or last\n\nd. **Check for duplicates**:\n- Search for feature number or title in existing content\n- If found: WARN \"Feature may already be documented\"\n\n6. **Generate Updates**\n\nBased on gathered information and detected file formats:\n\n**6.1 Milestone Table Row** (for roadmap\u002FREADME with milestone table):\n\nDetect existing format and match it. Common formats:\n\nFormat A (with status emoji):\n```markdown\n| **Feature Title** | Status | Date | Description |\n```\n\nFormat B (simple):\n```markdown\n| Feature | Date | Notes |\n```\n\nGenerate row matching detected format:\n```markdown\n| **{feature_title}** | Done | {completion_date} | {description} |\n```\n\nInsert as first data row after header (newest first) or last row (oldest first) based on detected pattern.\n\n**6.2 Learnings Entry** (if learnings captured):\n\n```markdown\n### {Learning Title}\n\n**Context**: Feature #{number} - {feature_name}\n\n**Problem**: {problem description from user input}\n\n**Lesson**: {lesson from user input}\n\n**Date**: {completion_date}\n```\n\n**6.3 Status Update** (if status section found):\n\nUpdate status indicators if applicable:\n```markdown\n- [x] Feature #{number}: {feature_title} (Completed {date})\n```\n\n7. **Validate Updates**\n\nBefore presenting to user, validate generated content:\n\n**Markdown Syntax**:\n- Table rows have correct number of columns\n- No unclosed formatting (**, *, etc.)\n- Links are properly formatted\n\n**Duplicate Check**:\n- Verify feature not already in milestone table\n- If duplicate found: Offer to skip or replace\n\n**Date Format**:\n- Ensure dates are consistently formatted (YYYY-MM-DD or Mon YYYY)\n\n**Show validation results**:\n```\n=== Validation Results ===\n[PASS] Markdown syntax valid\n[PASS] No duplicate entries\n[PASS] Date formats consistent\n[WARN] Link to specs\u002F003\u002F may not resolve (verify after merge)\n\nReady to proceed.\n```\n\n8. **Present Changes for Review**\n\nShow all proposed changes in diff-style format:\n\n```\n=== Proposed Updates ===\n\nFILE: README.md\nSECTION: ## Completed Milestones\nACTION: Add row\n----------------------------------------\n+ | **Update Workspace Documentation** | Done | 2025-12-31 | LLM-driven extension for updating workspace docs |\n----------------------------------------\n\nFILE: docs\u002Flearnings.md\nSECTION: ## Patterns\nACTION: Add entry\n----------------------------------------\n+ ### Convention Over Configuration\n+\n+ **Context**: Feature #003 - update-workspace-docs\n+\n+ **Lesson**: Discovering files by convention reduces config overhead...\n----------------------------------------\n```\n\n**In dry-run mode**:\n```\n=== DRY RUN MODE ===\nNo files will be modified.\n\nTo apply these changes, re-run without --dry-run flag:\n  \u002Fspeckit.ext.update-workspace specs\u002F003-update-workspace-docs\u002F\n```\nStop execution here.\n\n**In normal mode**:\nUse AskUserQuestion:\n```\nApply these updates? (yes\u002Fno\u002Fedit)\n```\n\nIf \"edit\": Allow user to modify content before applying.\n\n9. **Apply Updates**\n\nFor each file to be modified:\n\na. **Create backup**:\n```bash\ncp {file} {file}.backup\n```\n\nb. **Apply edit** using Edit tool:\n- Find the insertion point (section marker + table header or section end)\n- Insert generated content\n\nc. **Track results**:\n- Success: Note file updated\n- Failure: Note error, continue with other files\n\n**Rollback preparation**:\nTrack all backup files for potential rollback.\n\n10. **Task Completion Marking** (Optional)\n\nCheck for incomplete tasks in the feature's tasks.md:\n\n```bash\ngrep -c '^\\- \\[ \\]' {target}\u002Ftasks.md\n```\n\nIf incomplete tasks found:\n\nUse AskUserQuestion:\n```\nFound {count} incomplete tasks in tasks.md.\nMark all tasks as complete? (yes\u002Fno)\n```\n\nIf yes:\n- Read tasks.md\n- Use Edit tool with `replace_all=true` to replace `- [ ]` with `- [X]`\n- Verify all tasks marked complete\n\nIf no:\n- WARN \"Remember to update tasks.md manually\"\n\n11. **Summary Report**\n\nDisplay final summary:\n\n```\n=== UPDATE SUMMARY ===\n\nFiles Updated:\n  - README.md (1 milestone added)\n  - docs\u002Flearnings.md (1 pattern added)\n  - specs\u002F003-update-workspace-docs\u002Ftasks.md (12 tasks marked complete)\n\nBackups Created:\n  - README.md.backup\n  - docs\u002Flearnings.md.backup\n\nSuggested Commit Message:\n  docs: update workspace docs for feature #003\n\nTo rollback changes:\n  git restore README.md docs\u002Flearnings.md\n  # Or use backup files:\n  mv README.md.backup README.md\n  mv docs\u002Flearnings.md.backup docs\u002Flearnings.md\n\nNext Steps:\n  - Review changes: git diff\n  - Commit: git add . && git commit -m \"docs: update workspace docs for feature #003\"\n  - Or run: \u002Fcommit\n```\n\n## Section Detection Patterns\n\n### Milestone Tables\n\nCommon patterns to search for (case-insensitive):\n```\n## Completed Milestones\n## Completed\n## Done\n## Delivered\n## Released\n## Changelog\n## What's New\n```\n\nTable indicators:\n- Line starting with `|`\n- Header separator `|---|`\n\n### Status Sections\n\n```\n## Current Status\n## Project Status\n## Status\n## Roadmap\n## Progress\n```\n\n### Learnings Sections\n\n```\n## Learnings\n## Patterns\n## Lessons\n## Notes\n## Retrospective\n```\n\n## Usage\n\n```bash\n# Update docs for specific feature\n\u002Fspeckit.ext.update-workspace specs\u002F003-update-workspace-docs\u002F\n\n# Preview changes without applying\n\u002Fspeckit.ext.update-workspace specs\u002F003-update-workspace-docs\u002F --dry-run\n\n# Auto-detect feature from branch name\n\u002Fspeckit.ext.update-workspace\n```\n\n## Notes\n\n**Workflow Position**: This extension is part of the pre-PR completion pipeline:\n1. `\u002Fspeckit.ext.closeout` - Create COMPLETION.md, HANDOVER.md\n2. `\u002Fspeckit.ext.cleanup` - Remove transient files\n3. `\u002Fspeckit.ext.update-workspace` - Update documentation (this extension)\n4. `\u002Fspeckit.ext.pr` or manual PR creation\n\n**Independence**: Can run independently without cleanup. Does not require cleanup to run first.\n\n**Convention Over Configuration**: No config files needed. Discovers documentation by standard patterns. User confirms file selection.\n\n**Portability**: Works on any spec-kit project. No project-specific scripts or dependencies.\n\n**Safety**:\n- Always creates .backup files before modifying\n- Dry-run mode for preview\n- Git restore available for rollback\n- Validates content before applying\n\n**LLM-Driven**: Pure markdown instructions executed by Claude. Uses built-in tools only: Read, Edit, Write, Glob, Grep, Bash, AskUserQuestion.","## User Input\n\n```text\n$ARGUMENTS\n```\n\nYou **MUST** consider the user input before proceeding (if not empty).\n\n## Outline\n\nThis extension updates workspace-level documentation (README.md, roadmap, learnings) after a feature is completed. It extracts feature information from spec.md and git, prompts for subjective details, discovers documentation files by convention, and applies validated updates with backup support.\n\n**Core Principle**: Convention over configuration - discover docs by pattern, user confirms selection.\n\n### Execution Steps\n\n1. **Parse Arguments**\n\nParse `$ARGUMENTS` to extract:\n- Target directory (required, first argument) - the spec directory (e.g., `specs\u002F003-feature-name\u002F`)\n- Flags: `--dry-run` (preview mode without modifications)\n- If `--help` or no arguments: Display usage and exit\n\n**Default behavior**: If no target provided, attempt to detect from current git branch name:\n```bash\ngit rev-parse --abbrev-ref HEAD\n```\nParse branch name for pattern `{number}-{name}` and look for matching `specs\u002F{number}-{name}\u002F` directory.\n\n2. **Extract Feature Information**\n\n**From spec.md** (using Read tool):\n- Read `{target}\u002Fspec.md`\n- Extract feature title: First `# ` heading\n- Extract status: `**Status**:` field value\n- Extract created date: `**Created**:` field value\n\n**From directory name**:\n- Parse `specs\u002F{number}-{name}\u002F` pattern\n- Extract feature number (e.g., \"003\")\n- Extract feature name (e.g., \"update-workspace-docs\")\n\n**From git** (using Bash tool):\n```bash\n# Completion date (last commit on feature)\ngit log -1 --format=%cs\n\n# Files changed compared to main\ngit diff --name-only main...HEAD | wc -l\n\n# Current branch name\ngit rev-parse --abbrev-ref HEAD\n```\n\n**Display extracted info**:\n```\n=== Feature Information ===\nNumber:      003\nName:        update-workspace-docs\nTitle:       Update Workspace Documentation\nStatus:      Draft\nCreated:     2025-12-31\nCompleted:   2025-12-31\nFiles:       15 files changed\nBranch:      003-update-workspace-docs\n```\n\n**Validation**:\n- If spec.md not found: ERROR \"No spec.md found in {target}\"\n- If feature number cannot be parsed: WARN and prompt user for manual input\n\n3. **Discover Documentation Files**\n\nUse Glob tool to find documentation files by convention:\n\n**Priority 1 (Always check)**:\n```\nREADME.md                    # Repository root\n```\n\n**Priority 2 (Common patterns)**:\n```\ndocs\u002F*.md                    # Most common docs directory\ndoc\u002F*.md                     # Alternative spelling\nCHANGELOG.md                 # Version history at root\nROADMAP.md                   # If at root\n```\n\n**Discovery execution**:\n```\nGlob: README.md\nGlob: docs\u002F*.md\nGlob: doc\u002F*.md\nGlob: CHANGELOG.md\nGlob: ROADMAP.md\n```\n\n**Present discovered files**:\n```\n=== Documentation Files Found ===\n[1] README.md\n[2] docs\u002Froadmap.md\n[3] docs\u002Flearnings.md\n[4] CHANGELOG.md\n\nWhich files should be updated? (comma-separated numbers, or 'all'):\n```\n\nUse AskUserQuestion tool to let user select which files to update.\n\n**If no files found**: Ask user to specify paths manually.\n\n4. **Gather Subjective Information**\n\nPrompt user for information that cannot be automatically extracted:\n\n**4.1 Feature Description**\n\nUse AskUserQuestion:\n```\nDescribe the capabilities delivered by this feature (1-2 sentences, stakeholder-friendly):\n\nExamples:\n- \"LLM-driven extension for updating workspace docs after feature completion\"\n- \"Automated milestone tracking and learnings capture\"\n\nYour description:\n```\n\n**4.2 Breaking Changes**\n\nUse AskUserQuestion:\n```\nAre there any breaking changes? (yes\u002Fno)\n```\n\nIf yes, prompt for details:\n```\nDescribe the breaking changes:\n```\n\n**4.3 Dependencies Resolved**\n\nUse AskUserQuestion:\n```\nDid this feature unblock other work? (yes\u002Fno)\n```\n\nIf yes, prompt for details:\n```\nWhich features\u002Fmilestones were unblocked:\n```\n\n**4.4 Patterns\u002FLearnings Identified**\n\nUse AskUserQuestion:\n```\nDid this feature reveal any patterns, anti-patterns, or lessons worth documenting? (yes\u002Fno)\n```\n\nIf yes, prompt for details:\n```\nBriefly describe the pattern\u002Flearning:\n```\n\n5. **Analyze Target Files (Parallel)**\n\n**Threshold Check**: If selected file count ≤ 2, process sequentially (skip parallelization).\n\nFor 3+ selected documentation files, analyze in parallel using sub-agents:\n\n**Display**:\n```\nAnalyzing {count} documentation files in parallel...\n```\n\na. **Launch parallel sub-agents** for each selected file:\n\n**CRITICAL**: Launch these as PARALLEL Task calls in a single tool call block.\n\nFor each file, use Task tool with:\n- subagent_type: \"general-purpose\"\n- description: \"Analyze documentation file\"\n- prompt: |\n    You are analyzing a documentation file to find update locations.\n\n    ## File to Analyze\n    {file_path}\n\n    ## Feature Context\n    Feature Number: {feature_number}\n    Feature Title: {feature_title}\n\n    ## Instructions\n    1. Read the file using the Read tool\n    2. Find sections matching these patterns:\n       - Milestone: \"## Completed Milestones\", \"## Completed\", \"## Done\", \"## Changelog\", \"## History\", \"## What's New\"\n       - Status: \"## Current Status\", \"## Project Status\", \"## Roadmap\", \"## Progress\"\n       - Learnings: \"## Learnings\", \"## Patterns\", \"## Lessons Learned\", \"## Notes\"\n    3. For milestone sections, detect table format:\n       - Look for `|` characters indicating markdown table\n       - Parse header row to understand column structure\n       - Note whether newest entries are first or last\n    4. Check for duplicates:\n       - Search for feature number or title in existing content\n       - Report if feature appears already documented\n\n    ## Output Format (JSON)\n    ```json\n    {\n      \"file\": \"README.md\",\n      \"sections\": [\n        {\n          \"name\": \"Completed Milestones\",\n          \"line\": 45,\n          \"type\": \"milestone\",\n          \"header_pattern\": \"## Completed Milestones\"\n        }\n      ],\n      \"table_format\": {\n        \"found\": true,\n        \"columns\": [\"Feature\", \"Status\", \"Date\", \"Description\"],\n        \"order\": \"newest_first\",\n        \"header_line\": 46,\n        \"separator_line\": 47\n      },\n      \"duplicate_found\": false,\n      \"duplicate_context\": null\n    }\n    ```\n\nb. **Wait for all agents to complete** before proceeding.\n\nc. **Aggregate results**:\n   - Parse JSON from each agent\n   - Merge all file analyses into unified structure\n   - Flag any files with duplicates or issues\n\nd. **Error handling**:\n   - If an agent fails: Skip that file with warning, continue with others\n   - If all agents fail: Fall back to sequential processing with warning\n   - Report errors clearly: \"Analysis failed for {file}. Skipping.\"\n\n**Display progress**:\n```\nAnalyzing documentation files in parallel...\n✓ README.md (1 section found)\n✓ docs\u002Froadmap.md (2 sections found)\n✓ CHANGELOG.md (1 section found)\nAll files analyzed. Proceeding with update generation.\n```\n\n**For ≤2 files (sequential processing)**:\n\nFor each selected documentation file:\n\na. **Read the file** using Read tool\n\nb. **Identify relevant sections** by searching for common markers:\n\n**Milestone\u002FCompleted sections**:\n```\n## Completed Milestones\n## Completed\n## Done\n## Changelog\n## History\n## What's New\n```\n\n**Status sections**:\n```\n## Current Status\n## Project Status\n## Roadmap\n```\n\n**Learnings sections**:\n```\n## Learnings\n## Patterns\n## Lessons Learned\n## Notes\n```\n\nc. **Detect table format** (if milestone section found):\n- Look for `|` characters indicating markdown table\n- Parse header row to understand column structure\n- Note whether newest entries are first or last\n\nd. **Check for duplicates**:\n- Search for feature number or title in existing content\n- If found: WARN \"Feature may already be documented\"\n\n6. **Generate Updates**\n\nBased on gathered information and detected file formats:\n\n**6.1 Milestone Table Row** (for roadmap\u002FREADME with milestone table):\n\nDetect existing format and match it. Common formats:\n\nFormat A (with status emoji):\n```markdown\n| **Feature Title** | Status | Date | Description |\n```\n\nFormat B (simple):\n```markdown\n| Feature | Date | Notes |\n```\n\nGenerate row matching detected format:\n```markdown\n| **{feature_title}** | Done | {completion_date} | {description} |\n```\n\nInsert as first data row after header (newest first) or last row (oldest first) based on detected pattern.\n\n**6.2 Learnings Entry** (if learnings captured):\n\n```markdown\n### {Learning Title}\n\n**Context**: Feature #{number} - {feature_name}\n\n**Problem**: {problem description from user input}\n\n**Lesson**: {lesson from user input}\n\n**Date**: {completion_date}\n```\n\n**6.3 Status Update** (if status section found):\n\nUpdate status indicators if applicable:\n```markdown\n- [x] Feature #{number}: {feature_title} (Completed {date})\n```\n\n7. **Validate Updates**\n\nBefore presenting to user, validate generated content:\n\n**Markdown Syntax**:\n- Table rows have correct number of columns\n- No unclosed formatting (**, *, etc.)\n- Links are properly formatted\n\n**Duplicate Check**:\n- Verify feature not already in milestone table\n- If duplicate found: Offer to skip or replace\n\n**Date Format**:\n- Ensure dates are consistently formatted (YYYY-MM-DD or Mon YYYY)\n\n**Show validation results**:\n```\n=== Validation Results ===\n[PASS] Markdown syntax valid\n[PASS] No duplicate entries\n[PASS] Date formats consistent\n[WARN] Link to specs\u002F003\u002F may not resolve (verify after merge)\n\nReady to proceed.\n```\n\n8. **Present Changes for Review**\n\nShow all proposed changes in diff-style format:\n\n```\n=== Proposed Updates ===\n\nFILE: README.md\nSECTION: ## Completed Milestones\nACTION: Add row\n----------------------------------------\n+ | **Update Workspace Documentation** | Done | 2025-12-31 | LLM-driven extension for updating workspace docs |\n----------------------------------------\n\nFILE: docs\u002Flearnings.md\nSECTION: ## Patterns\nACTION: Add entry\n----------------------------------------\n+ ### Convention Over Configuration\n+\n+ **Context**: Feature #003 - update-workspace-docs\n+\n+ **Lesson**: Discovering files by convention reduces config overhead...\n----------------------------------------\n```\n\n**In dry-run mode**:\n```\n=== DRY RUN MODE ===\nNo files will be modified.\n\nTo apply these changes, re-run without --dry-run flag:\n  \u002Fspeckit.ext.update-workspace specs\u002F003-update-workspace-docs\u002F\n```\nStop execution here.\n\n**In normal mode**:\nUse AskUserQuestion:\n```\nApply these updates? (yes\u002Fno\u002Fedit)\n```\n\nIf \"edit\": Allow user to modify content before applying.\n\n9. **Apply Updates**\n\nFor each file to be modified:\n\na. **Create backup**:\n```bash\ncp {file} {file}.backup\n```\n\nb. **Apply edit** using Edit tool:\n- Find the insertion point (section marker + table header or section end)\n- Insert generated content\n\nc. **Track results**:\n- Success: Note file updated\n- Failure: Note error, continue with other files\n\n**Rollback preparation**:\nTrack all backup files for potential rollback.\n\n10. **Task Completion Marking** (Optional)\n\nCheck for incomplete tasks in the feature's tasks.md:\n\n```bash\ngrep -c '^\\- \\[ \\]' {target}\u002Ftasks.md\n```\n\nIf incomplete tasks found:\n\nUse AskUserQuestion:\n```\nFound {count} incomplete tasks in tasks.md.\nMark all tasks as complete? (yes\u002Fno)\n```\n\nIf yes:\n- Read tasks.md\n- Use Edit tool with `replace_all=true` to replace `- [ ]` with `- [X]`\n- Verify all tasks marked complete\n\nIf no:\n- WARN \"Remember to update tasks.md manually\"\n\n11. **Summary Report**\n\nDisplay final summary:\n\n```\n=== UPDATE SUMMARY ===\n\nFiles Updated:\n  - README.md (1 milestone added)\n  - docs\u002Flearnings.md (1 pattern added)\n  - specs\u002F003-update-workspace-docs\u002Ftasks.md (12 tasks marked complete)\n\nBackups Created:\n  - README.md.backup\n  - docs\u002Flearnings.md.backup\n\nSuggested Commit Message:\n  docs: update workspace docs for feature #003\n\nTo rollback changes:\n  git restore README.md docs\u002Flearnings.md\n  # Or use backup files:\n  mv README.md.backup README.md\n  mv docs\u002Flearnings.md.backup docs\u002Flearnings.md\n\nNext Steps:\n  - Review changes: git diff\n  - Commit: git add . && git commit -m \"docs: update workspace docs for feature #003\"\n  - Or run: \u002Fcommit\n```\n\n## Section Detection Patterns\n\n### Milestone Tables\n\nCommon patterns to search for (case-insensitive):\n```\n## Completed Milestones\n## Completed\n## Done\n## Delivered\n## Released\n## Changelog\n## What's New\n```\n\nTable indicators:\n- Line starting with `|`\n- Header separator `|---|`\n\n### Status Sections\n\n```\n## Current Status\n## Project Status\n## Status\n## Roadmap\n## Progress\n```\n\n### Learnings Sections\n\n```\n## Learnings\n## Patterns\n## Lessons\n## Notes\n## Retrospective\n```\n\n## Usage\n\n```bash\n# Update docs for specific feature\n\u002Fspeckit.ext.update-workspace specs\u002F003-update-workspace-docs\u002F\n\n# Preview changes without applying\n\u002Fspeckit.ext.update-workspace specs\u002F003-update-workspace-docs\u002F --dry-run\n\n# Auto-detect feature from branch name\n\u002Fspeckit.ext.update-workspace\n```\n\n## Notes\n\n**Workflow Position**: This extension is part of the pre-PR completion pipeline:\n1. `\u002Fspeckit.ext.closeout` - Create COMPLETION.md, HANDOVER.md\n2. `\u002Fspeckit.ext.cleanup` - Remove transient files\n3. `\u002Fspeckit.ext.update-workspace` - Update documentation (this extension)\n4. `\u002Fspeckit.ext.pr` or manual PR creation\n\n**Independence**: Can run independently without cleanup. Does not require cleanup to run first.\n\n**Convention Over Configuration**: No config files needed. Discovers documentation by standard patterns. User confirms file selection.\n\n**Portability**: Works on any spec-kit project. No project-specific scripts or dependencies.\n\n**Safety**:\n- Always creates .backup files before modifying\n- Dry-run mode for preview\n- Git restore available for rollback\n- Validates content before applying\n\n**LLM-Driven**: Pure markdown instructions executed by Claude. Uses built-in tools only: Read, Edit, Write, Glob, Grep, Bash, AskUserQuestion.",{"name":5,"metadata":24,"description":7,"compatibility":27},{"author":25,"source":26},"github-spec-kit","ext:commands\u002Fspeckit.ext.update-workspace.md","Requires spec-kit project structure with .specify\u002F directory","main","2045797696f3923d9e47519e2302e944260b2266",".specify\u002Fextensions\u002Fext\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-ext-update-workspace",0,"https:\u002F\u002Fgithub.com\u002Fstefanwalther\u002Fghn","https:\u002F\u002Fgithub.com\u002Fstefanwalther","2026-11-15 06:19:35",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add stefanwalther\u002Fghn --skill speckit-ext-update-workspace",{"tool":41,"command":42},"bunx","bunx skills add stefanwalther\u002Fghn --skill speckit-ext-update-workspace",{"tool":44,"command":45},"pnpm","pnpm dlx skills add stefanwalther\u002Fghn --skill speckit-ext-update-workspace","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstefanwalther\u002Fghn\u002Fblob\u002Fmain\u002F.specify\u002Fextensions\u002Fext\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-ext-update-workspace\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7E5EJAJD6R57EE4YSMDJWMP","speckit-ext-validate","Pre-merge validation and quality gate for feature completion","https:\u002F\u002Fgithub.com\u002Fstefanwalther\u002Fghn\u002Fblob\u002Fmain\u002F.specify\u002Fextensions\u002Fext\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-ext-validate\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7E5EBDFYZPMJ1HM484EH8K8","speckit-ext-session-handover","Mid-implementation context handover with proactive monitoring and continuation prompts","https:\u002F\u002Fgithub.com\u002Fstefanwalther\u002Fghn\u002Fblob\u002Fmain\u002F.specify\u002Fextensions\u002Fext\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-ext-session-handover\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7E5E92Y08ME10QRAW8T0ES9","speckit-ext-scope-change","Document scope changes and ad-hoc additions during feature implementation","https:\u002F\u002Fgithub.com\u002Fstefanwalther\u002Fghn\u002Fblob\u002Fmain\u002F.specify\u002Fextensions\u002Fext\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-ext-scope-change\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7E5E3DJ0B3B0FHF0YQAE2JV","speckit-ext-pr","Create a pull request for spec-kit features with agent-based workflow and spec-kit context awareness","https:\u002F\u002Fgithub.com\u002Fstefanwalther\u002Fghn\u002Fblob\u002Fmain\u002F.specify\u002Fextensions\u002Fext\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-ext-pr\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7E5E1B26HH69228R8MD54H5","speckit-ext-post-merge","Spec-kit workflow command: speckit-ext-post-merge","https:\u002F\u002Fgithub.com\u002Fstefanwalther\u002Fghn\u002Fblob\u002Fmain\u002F.specify\u002Fextensions\u002Fext\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-ext-post-merge\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7E5DXC0ZRPQW9J7T163FJNM","speckit-ext-manual-testing","User-led manual testing with structured feedback collection","https:\u002F\u002Fgithub.com\u002Fstefanwalther\u002Fghn\u002Fblob\u002Fmain\u002F.specify\u002Fextensions\u002Fext\u002F.specify-dev\u002Fagent-commands\u002Fclaude\u002Fspeckit-ext-manual-testing\u002FSKILL.md",[],[]]