/update-instructions
Smart merge for CLAUDE.md and AGENTS.md instruction files that preserves user customizations while updating SpecWeave sections. Use after plugin refresh, version upgrade, or when instruction files need sync. Parses SW-managed sections and preserves user content.
> /plugin marketplace add anton-abyzov/specweave > /plugin install sw@specweave
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/update-instructions
Context preview
What this command does when you run it.
Smart merge for CLAUDE.md and AGENTS.md instruction files that preserves user customizations while updating SpecWeave sections. Use after plugin refresh, version upgrade, or when instruction files need sync. Parses SW-managed sections and preserves user content.
Command definition
update-instructions.mddescription: Smart merge for CLAUDE.md and AGENTS.md instruction files that preserves user customizations while updating SpecWeave sections. Use after plugin refresh, version upgrade, or when instruction files need sync. Parses SW-managed sections and preserves user content.
user-invocable: false
Update Instructions Skill
Smart merge for CLAUDE.md and AGENTS.md instruction files.
What It Does
1. **Reads existing instruction files** (if present) 2. **Parses SW-managed sections** (marked with `<!-- SW:SECTION:X -->`) 3. **Preserves user content** (anything between or after SW sections) 4. **Updates SW sections** with latest template content 5. **Writes merged result** back to file
When to Use
- After running `specweave refresh-plugins`
- After upgrading SpecWeave version (`npm update -g specweave`)
- When CLAUDE.md or AGENTS.md seem outdated
- To sync instruction files with latest framework features
Usage
sw:update-instructions
Or via CLI:
npx specweave update-instructions
How Merge Works
Fresh Install (no existing file)
Creates new file with all SW sections + meta header
Legacy File (no SW markers)
Prepends new SW content, preserves original below separator
Marked File (has SW markers)
Updates SW sections in-place, preserves user content between sections
Section Format
Template sections (in `.template` files):
<!-- SECTION:rules required -->
## Rules
Content here...
<!-- /SECTION -->
Generated sections (in output files):
<!-- SW:META template="claude" version="1.0.0" sections="header,rules,..." -->
<!-- SW:SECTION:header version="1.0.0" -->
Content...
<!-- SW:END:header -->
User Customization
Add custom content **between** SW sections or **after** the last section:
<!-- SW:END:docs -->
## My Custom Section
This will be preserved during updates!
Files Affected
- `CLAUDE.md` - Claude Code instruction file
- `AGENTS.md` - Generic AI tool instruction file
Read more
description: Smart merge for CLAUDE.md and AGENTS.md instruction files that preserves user customizations while updating SpecWeave sections. Use after plugin refresh, version upgrade, or when instruction files need sync. Parses SW-managed sections and preserves user content. user-invocable: false
Update Instructions Skill
Smart merge for CLAUDE.md and AGENTS.md instruction files.
What It Does
1. **Reads existing instruction files** (if present) 2. **Parses SW-managed sections** (marked with `<!-- SW:SECTION:X -->`) 3. **Preserves user content** (anything between or after SW sections) 4. **Updates SW sections** with latest template content 5. **Writes merged result** back to file
When to Use
- After running `specweave refresh-plugins`
- After upgrading SpecWeave version (`npm update -g specweave`)
- When CLAUDE.md or AGENTS.md seem outdated
- To sync instruction files with latest framework features
Usage
sw:update-instructions
Or via CLI:
npx specweave update-instructions
How Merge Works
Fresh Install (no existing file)
Creates new file with all SW sections + meta header
Legacy File (no SW markers)
Prepends new SW content, preserves original below separator
Marked File (has SW markers)
Updates SW sections in-place, preserves user content between sections
Section Format
Template sections (in `.template` files):
<!-- SECTION:rules required --> ## Rules Content here... <!-- /SECTION -->
Generated sections (in output files):
<!-- SW:META template="claude" version="1.0.0" sections="header,rules,..." --> <!-- SW:SECTION:header version="1.0.0" --> Content... <!-- SW:END:header -->
User Customization
Add custom content **between** SW sections or **after** the last section:
<!-- SW:END:docs --> ## My Custom Section This will be preserved during updates!
Files Affected
- `CLAUDE.md` - Claude Code instruction file
- `AGENTS.md` - Generic AI tool instruction file
Spec-first AI development: describe a feature → AI creates spec + plan + tasks, builds autonomously, syncs to GitHub/JIRA. Domain-expert skills for PM, Architect, Frontend, QA learn your patterns permanently. Claude Code, Codex, Cursor, Copilot & more.
Repo: anton-abyzov/specweave
Other commands on specweave.
- /abandon
Abandon an incomplete increment (requirements changed, obsolete)
Open command - /ado-cleanup-duplicates
Clean up duplicate Azure DevOps work items for a Feature. Finds work items with duplicate titles and closes all except the first created item.
Open command - /ado-clone
Clone Azure DevOps repositories to local workspace. Use after init if cloning was skipped, or to add repos later.
Open command - /ado-close
Close Azure DevOps work item when increment complete
Open command - /ado-create
Create Azure DevOps work item from SpecWeave increment
Open command - /ado-import-areas
Import Azure DevOps area paths from a project and map them to SpecWeave projects. Creates 2-level directory structure with area path-based organization.
Open command

