java/src/main/resources/targets/claude/skills/core/plan/x-arch-update/SKILL.md
Incrementally updates the service architecture document with changes from architecture plans. Adds new components, integrations, flows, and ADR references without rewriting existing content. Use after implementation to keep architecture documentation current.
npx skillsauth add edercnj/claude-environment x-arch-updateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Incrementally updates the service architecture document (steering/service-architecture.md) with changes from architecture plans. Adds new components, integrations, flows, and ADR references without rewriting existing content.
/x-arch-update [STORY-ID] — update architecture doc from the architecture plan for the given story/x-arch-update [architecture-plan-path] — update architecture doc from the specified plan filex-story-implement is executing| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| STORY-ID | String | Yes (or path) | Story identifier to locate the architecture plan |
| architecture-plan-path | String | Yes (or ID) | Direct path to the architecture plan file |
steering/service-architecture.mdservice-architecture.md does NOT exist, read the template from resources/templates/_TEMPLATE-SERVICE-ARCHITECTURE.md and create the initial document by replacing {{ placeholders }} with project identity valuesFor each changed section, INSERT new content at the appropriate location. NEVER remove or rewrite existing content.
| # | Section Heading | Update Action | |---|-----------------|---------------| | 1 | 1. Overview | Append new interfaces or technology changes | | 2 | 2. C4 Diagrams | Add new nodes and edges to existing Mermaid diagrams | | 3 | 3. Integrations | Append new rows to the integration table | | 4 | 4. Data Model | Add new entities and relationships to the ER diagram | | 5 | 5. Critical Flows | Add new sequence diagrams as new subsections | | 6 | 6. NFRs | Update targets only if changed; never remove rows | | 7 | 7. Architectural Decisions | Append new ADR references to the table | | 8 | 8. Observability | Add new metrics, alerts, or dashboard entries | | 9 | 9. Resilience | Add new circuit breaker, retry, or fallback configurations | | 10 | 10. Change History | Append a new changelog entry with date, story ID, and summary |
| Date | Author | Description | |------|--------|-------------| | YYYY-MM-DD | AI (story-XXXX-YYYY) | Sections affected: [list]. Summary: [brief description] |
ALWAYS append a new row to Section 10 (Change History). Include: today's date, story ID, list of sections modified, brief summary.
steering/service-architecture.mdIf steering/service-architecture.md does NOT exist:
resources/templates/_TEMPLATE-SERVICE-ARCHITECTURE.md{{ placeholders }} with project identity valuesIf resources/templates/_TEMPLATE-SERVICE-ARCHITECTURE.md is not found, create a minimal service architecture document with 10 numbered sections and populate from the architecture plan. Log a warning: "Template not found; using inline fallback structure."
Launch a single general-purpose subagent:
You are a Documentation Engineer performing an incremental update of the service architecture document for {{PROJECT_NAME}}.
Step 1 — Read inputs:
- Read the architecture plan at the path provided as argument
- Read the current service architecture doc at
steering/service-architecture.md- If
service-architecture.mddoes NOT exist, read the template fromresources/templates/_TEMPLATE-SERVICE-ARCHITECTURE.mdand create the initial document by replacing{{ placeholders }}with project identity valuesStep 2 — Identify changes:
- Compare the architecture plan sections against the current service architecture doc
- For each section, identify: new components, new integrations, new flows, new ADRs, changed NFRs, new observability or resilience configurations
- Build a diff list of changes per section
Step 3 — Apply incremental updates (RULE-008):
- For each changed section, INSERT new content at the appropriate location
- NEVER remove or rewrite existing content
- For C4 diagrams: add new Mermaid nodes and edges within existing graph blocks
- For tables: append new rows
- For sequence diagrams: add new subsections with new diagrams
- For ADR references: append new rows to the ADR table
Step 4 — Update Change History:
- ALWAYS append a new row to Section 10 (Change History)
- Include: today's date, story ID, list of sections modified, brief summary
Step 5 — Save:
- Write the updated document to
steering/service-architecture.md- Report: sections updated, changes applied, new entries added
Conventions:
- All content in English (RULE-012)
- Mermaid syntax for all diagrams
- Incremental updates only — never full rewrite (RULE-008)
| Scenario | Action | |----------|--------| | Architecture plan not found | Skip with log: "No architecture plan found; skipping architecture doc update" | | Service architecture doc not found | Create from template (see Document Creation from Scratch) | | Template not found | Use inline fallback structure, log warning | | Section heading mismatch | Match by numeric prefix, warn if heading text differs | | Merge conflict in Mermaid diagram | Preserve both versions, add comment marking conflict |
| Skill | Relationship | Context |
|-------|-------------|---------|
| x-story-implement | called-by | Invoked during Phase 3 (Documentation) to update architecture doc |
| x-arch-plan | reads | Generates the input architecture plans consumed by this skill |
| x-adr-generate | calls | May trigger ADR generation for new architectural decisions |
| architecture | reads | References architecture principles and patterns KP |
| Pack | Files | Purpose |
|------|-------|---------|
| architecture | knowledge/architecture.md | Architecture principles and patterns |
tools
Documentation automation v2: stack-aware generation from documentation.targets.
development
Generates or updates CI/CD pipelines per project stack with actionlint validation.
tools
Generates ADRs from architecture-plan mini-ADRs with sequential numbering and index update.
development
Formats source code; first step of the pre-commit chain (format -> lint -> compile).