Version 2.0: Adds ISO 14764 maintenance classification and automated pipeline cascade modes.
When to use
Invoke requirements change when you need to:- Add new features or requirements to the system
- Modify existing requirements and propagate changes through specs
- Deprecate requirements with proper impact analysis
- Handle corrective maintenance (bug fixes)
- Handle adaptive maintenance (external API changes, dependency updates)
- Handle perfective maintenance (feature enhancements)
- Handle preventive maintenance (tech debt reduction)
- Trigger re-planning and re-tasking after spec changes
Invocation modes
Cascade modes
| Mode | Behavior | When to use |
|---|---|---|
manual (default) | Update pipeline-state.json, print recommended commands | User wants control over each step |
auto | Invoke downstream skills in sequence after changes | Full pipeline automation |
dry-run | Compute invalidation scope but change nothing | Impact preview before committing |
plan-only | Cascade through planning skills, stop before implementation | Updated plans + tasks without code changes |
ISO 14764 maintenance classification
Each change is classified by maintenance category:| Classification | Sub-classification | Signal |
|---|---|---|
| ADD | Perfective | New capability |
| ADD | Adaptive | New external integration, dependency addition |
| MODIFY | Corrective | Bug fix, incorrect behavior |
| MODIFY | Perfective | Feature enhancement |
| MODIFY | Adaptive | External API change, dependency update, platform migration |
| MODIFY | Preventive | Tech debt reduction, code health improvement |
| DEPRECATE | Perfective | Feature simplification |
| DEPRECATE | Adaptive | External dependency removal |
| DEPRECATE | Preventive | Removing tech debt source |
| Urgency | Criteria | Response |
|---|---|---|
| P0 (Critical) | Data loss risk, core feature completely broken | Immediate |
| P1 (High) | Major feature broken, no workaround | Same day |
| P2 (Medium) | Feature broken, workaround exists | Next sprint |
| P3 (Low) | Minor defect, cosmetic issue | Backlog |
The 9 phases
Phase 0: Inventory & context loading
Goal: Build complete understanding of current spec state.- Glob all
.mdfiles underspec/— build manifest with IDs, types, versions - Read
requirements/REQUIREMENTS.md— extract all REQ IDs, categories, traceability - Read
spec/domain/01-GLOSSARY.md— load ubiquitous language (MANDATORY reference) - Read
spec/CLARIFICATIONS.md— load business rules - Read
spec/CHANGELOG.md— identify current spec version - Read
audits/AUDIT-BASELINE.md— know current audit state - Read
pipeline-state.json— load current pipeline state - Scan
changes/for existing DRAFT/REVIEWED deltas — warn if unapplied deltas exist - Build internal index: REQ-ID → specs, spec → REQs, REQ dependencies, stage status
- G1: Specs exist → STOP if missing: “Run specifications-engineer first”
- G2: REQUIREMENTS.md exists → STOP if missing: “Run requirements-engineer first”
- G3: Glossary exists → STOP if missing: “Cannot proceed without ubiquitous language”
- G4: Audit-clean (warning only) → WARN if open findings
- G5: Pipeline state (info only) → INFO if missing
Phase 1: Change request intake & classification
Goal: Parse, classify, and structure each change request.- Parse user input (natural language) and/or structured file
- Classify each change as ADD, MODIFY, or DEPRECATE
- Classify by ISO 14764 maintenance category (using
--maintenance=TYPEor auto-detect) - Identify category (FUN/NFR/OPS/REG/DER), subcategory, affected REQs, priority, stability
- Apply SWEBOK 5-Whys technique for unclear requests
- Generate Change Request Summary table
- Present to user for confirmation
Phase 2: Impact analysis
Goal: Identify ALL documents affected by each change.- Direct impact: Documents that MUST change
- Indirect impact: Documents that SHOULD be reviewed
- Trace the full chain per affected REQ: REQ → UC → WF → API → BDD → INV → ADR → RN
- Conflict detection: Check for contradictions with existing INVs, ADRs, BDD, business rules
- Complexity rating: Low (1-3 docs), Medium (4-8), High (9-15), Very High (16+)
- Generate Impact Matrix with direct impact, indirect impact, conflicts, regression risk
- Commit impact analysis (if git available): artifact → commits → files blast radius via
git log --grep - Code intelligence impact analysis (if SDD MCP server available):
- Call
sdd_impact({ artifact_id, direction: "downstream", maxDepth: 3 }) - Classify by depth: d=1 (WILL_BREAK), d=2 (LIKELY_AFFECTED), d=3 (MAY_NEED_REVIEW)
- Enrich Impact Matrix with symbol-level detail: symbol, file, depth, callers, risk
- Fallback: Use git-based analysis from Step 7 if MCP not available
- Call
Phase 3: Clarification & decision
Goal: Eliminate ALL ambiguities before planning changes.- Evaluate each change against 7 SWEBOK properties (unambiguous, testable, binding, atomic, true, stakeholder vocabulary, acceptable)
- For each ambiguity/gap, present options with recommendation in a table format
- For DEPRECATE changes: ask about data/behavior migration, deprecation marking strategy
- For ADD changes: formulate EARS statement, draft acceptance criteria (Gherkin)
- For MODIFY changes: show current vs. proposed EARS statements
- Collect all answers
- Generate Clarification Log
Phase 4: Change plan generation
Goal: Generate a complete, reviewable plan showing every change to every document with before/after.- For ADD: generate new REQ with full template, draft new specs (UC/API/BDD/INV/ADR/RN)
- For MODIFY: show current (before) and proposed (after) state of every affected section
- For DEPRECATE:
- Mark REQ as deprecated with reason and date
- Identify all spec sections to update/remove
- Identify migration steps
- For multi-REQ deprecations: generate a Feature Sunset Plan (4-phase timeline)
- Apply Atomic Cross-Check Rule (if you modify domain model, also check value objects, states, invariants, UCs, contracts)
- Group changes by document for atomic execution
- Generate
changes/CHANGE-PLAN-{id}.md
--dry-run: STOP HERE and present plan.
Phase 5: User review & approval
Goal: Get explicit user approval before modifying any file.- Present Change Plan summary
- Ask workflow mode: Batch (apply all) or Interactive (approve per CR)
- For Interactive: show full before/after, ask “Apply this change? (Yes / Modify / Skip)”
- For Batch: show summary, ask “Apply all N changes? (Yes / Review individually)”
Phase 6: Change execution
Goal: Apply all approved changes atomically across all documents. Execution order (MANDATORY — requirements-first, then propagate to specs):Why requirements-first? The requirement defines WHAT changes. Specifications define HOW it manifests. By writing the requirement first, every subsequent spec edit can reference the authoritative REQ-ID as the source of truth.
Phase 7: Alignment audit
Goal: Verify that after all changes, requirements and specifications are perfectly aligned. 8 alignment verifications (focused mini-audit on affected documents only):| Check | Description | Severity if Fails |
|---|---|---|
| AA-01 | REQ → Spec Forward Coverage | Critical |
| AA-02 | Spec → REQ Backward Coverage | Critical |
| AA-03 | Traceability Chain Completeness | High |
| AA-04 | Cross-Reference Validity | Critical |
| AA-05 | Glossary Compliance | High |
| AA-06 | Contradiction Check | Critical |
| AA-07 | EARS Pattern Compliance | Medium |
| AA-08 | Acceptance Criteria Testability | Medium |
- AA-09: No Orphan References (no document references deprecated REQ)
- AA-10: Dependent REQ Update (all dependent REQs updated or flagged)
- Auto-fixable issues (typos, broken refs): fix immediately and re-audit
- Non-auto-fixable issues: include in Change Report as “Open Items”
- NEVER ignore a failed alignment check
Phase 8: Change report generation
Goal: Generate a comprehensive document that provides full context for subsequent planning, task creation, and implementation. Output:changes/CHANGE-REPORT-{YYYY-MM-DD}-{short-id}.md
Structure:
- Executive Summary with Change Request Summary table
- Changes Applied (New REQs, Modified REQs, Deprecated REQs)
- New Artifacts Created (REQ, INV, ADR, RN, BDD)
- Impact Analysis Summary (documents modified, breaking changes, cross-reference updates)
- Alignment Audit Results (from Phase 7)
- Clarification Decisions (from Phase 3)
- Context for Planning & Implementation:
- Affected FASE files
- Architecture impact
- Implementation considerations (new API endpoints, DB changes, events, tests)
- Recommended next steps
- Risk assessment
- Maintenance classification (ISO 14764 category per CR)
- Pipeline cascade plan (which skills to re-run, estimated impact)
- Technical debt impact (if applicable)
- Git Commits (hash, message, files)
- Statistics
Phase 9: Pipeline cascade execution
Goal: Propagate changes through the downstream pipeline.-
Read cascade mode from invocation flags (default:
manual) - Compute invalidation scope: which downstream stages need re-execution
-
Update
pipeline-state.json: mark affected stages as"stale", record Change Report ID -
Execute based on cascade mode:
If
--cascade=manual(default):If--cascade=dry-run: Print full cascade plan, do NOT updatepipeline-state.json, exit If--cascade=plan-only: Invoke spec-auditor (focused), test-planner (audit), plan-architect, task-generator, update pipeline state, exit (do NOT invoke task-implementer) If--cascade=auto: Execute full pipeline sequence (spec-auditor → test-planner → plan-architect → task-generator → task-implementer), update pipeline state after each step, generatechanges/CASCADE-REPORT-{id}.md - Generate cascade summary (always, regardless of mode)
Constraints
- Requirements-first execution order: The requirement defines the change; specs propagate it
- Never skip clarification: Every ambiguity must get a question with options and recommendation
- Never ignore alignment failures: Failed checks must be fixed or reported as open items
- Atomic document updates: Each document gets ONE edit pass
- Respect ADRs and business rules: If covered by ADR or RN, not a defect
- Git optional: Commit impact analysis gracefully skips if git not available
- Code intelligence optional: Symbol-level blast radius uses fallback if SDD MCP server not available
Related skills
Spec Auditor
Audit specs after requirements changes
Plan Architect
Regenerate FASEs after changes
Task Generator
Generate new tasks for changed requirements
Traceability Check
Verify alignment after changes