From ecw
Multi-domain requirement analysis. Use when a requirement spans 2+ business domains. Auto-routed by ecw:risk-classifier for cross-domain changes; invoke manually via /ecw:domain-collab.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ecw:domain-collabThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Accepts natural language requirements spanning 2+ domains, dispatches domain-specific Agents in parallel for analysis, and outputs a structured report after Coordinator cross-validation.
Accepts natural language requirements spanning 2+ domains, dispatches domain-specific Agents in parallel for analysis, and outputs a structured report after Coordinator cross-validation.
Output language: Read ecw.yml → project.output_language. All artifact headings, table headers, and labels follow this language. Pass output_language value to every dispatched agent prompt.
Announce at start: "Using ecw:domain-collab to coordinate multi-domain requirement analysis."
paths.domain_registry (default .claude/ecw/routing/domain-registry.md) to get domain definitionscross-domain-rules.md exists under ecw.yml paths.knowledge_sharedKnowledge file robustness: If
domain-registry.mddoes not exist, halt and notify user: "Domain registry not found. Run/ecw-initto initialize." Ifcross-domain-rules.mddoes not exist, log[Warning: cross-domain-rules.md not found, Round 3 cross-validation will be degraded]and continue — Round 3 §3c will skip rule validation for missing files.
For a visual overview of the process, see ./workflow-diagram.md.
Phases: Domain Identification → Round 1 (Independent Analysis, parallel) → Round 2 (Inter-Domain Negotiation, parallel) → Round 3 (Coordinator Cross-Validation) → Output Report.
/requirements-elicitation. This skill focuses on multi-domain collaboration analysis"/domain-collab), confirm with user: "Identified domains: {domain list}. Will proceed with multi-domain collaboration analysis."Dispatch one Agent per matched domain (using Agent tool, subagent_type: general-purpose).
Model selection: model: opus (default from models.defaults.analysis; configurable via ecw.yml). Reason: domain analysis requires deep understanding of business rules, state machines, and cross-domain dependencies — errors here cascade to all downstream workflow. Exception: if Phase 1 or prior context strongly predicts a domain's impact_level: none, use model: haiku (models.defaults.mechanical) for that domain to reduce cost.
Prerequisites (Coordinator executes before dispatching Agents): Read .claude/ecw/ecw.yml to get project.name and component_types; read the file at ecw.yml paths.domain_registry to get domain definitions.
All domain Agents are dispatched with subagent_type: "ecw:domain-analyst", which auto-injects the agent's base instructions (output format, reading limits, subagent boundary rules). Coordinator passes domain-specific context in the prompt parameter: project_name, domain_id, domain_name, description, knowledge_root, index path, business_rules path, data_model path, code_root, related_code_dirs, extra_knowledge_lines, component_types (from ecw.yml), and user_requirement.
Budget cap: Maximum 8 domain Agents per round. If matched domains exceed 8, use AskUserQuestion to ask user which domains to prioritize, then proceed with the selected subset.
Timeout per Agent: 180s. If a domain Agent has not returned within this time, terminate it and mark that domain as [timeout, analysis unavailable].
Read ./prompts/round-execution.md for coordinator operation steps, prompt construction, return value validation, and retry rules.
Round 1 Checkpoint: After collecting all Round 1 YAML results, write them to .claude/ecw/session-data/{workflow-id}/domain-collab-r1.md (one YAML block per domain). This ensures Round 1 results survive context compaction before Round 2 begins.
After Round 1 independent analysis completes, Coordinator distributes each domain's change plan to others for cross-impact assessment.
Model selection: model: opus (default from models.defaults.analysis; configurable via ecw.yml). Reason: negotiation requires reasoning about cross-domain conflicts, companion changes, and impact propagation.
Timeout per Agent: 120s (Round 2 is lighter than Round 1). If a domain Agent times out, use its Round 1 result unchanged.
Read ./prompts/round-execution.md for coordinator operation steps, prompt construction, return value validation, and retry rules.
Round 2 Checkpoint: After collecting all Round 2 YAML results, write them to .claude/ecw/session-data/{workflow-id}/domain-collab-r2.md. This ensures negotiation results survive context compaction before Round 3 cross-validation.
Round 2 skip rule: If a domain returned impact_level: none in Round 1 AND no other domain's cross_domain_risks points to it, skip Round 2 Agent dispatch for that domain.
Stall detection: If Round 2 produces no revised_impact_level changes and no new conflicts compared to Round 1 across all domains, the negotiation has not decreased uncertainty — skip Round 3 cross-validation rule-checking (§3c) and proceed directly to report generation with a note: [stall: Round 2 produced no new findings, rule validation skipped].
Read ./prompts/round3-synthesis.md for the full 3a–3f execution steps (merge, conflict detection, rule validation, code verification, report output, knowledge summary).
Read ./prompts/round-execution.md § Fallback Logic for handling the case where all domain Agents return impact_level: none.
| Scenario | Handling |
|---|---|
| Round 1/2 domain Agent returns empty or malformed YAML | Log FAILED to trace (ecw_trace.jsonl) → retry once with explicit "return YAML only" instruction → still fails: mark domain as [analysis unavailable] and continue with remaining domains |
| All domain Agents fail in a Round | Escalate to user via AskUserQuestion: "Domain analysis agents failed. Options: (1) retry, (2) provide manual domain impact assessment, (3) abort." Do not proceed to next Round automatically |
Knowledge file missing (domain-registry.md, cross-domain-rules.md, per-domain knowledge) | Log [Warning: {file} not found, analysis degraded] → continue with available data. If domain-registry.md missing: halt and ask user to run /ecw-init |
Report file write failure (domain-collab-report.md, knowledge-summary.md) | Retry once → still fails: output full report content in conversation so downstream skills can reference it |
Read ./prompts/common-rationalizations.md for anti-patterns to avoid.
prompts/round-execution.md — Round 1/2 coordinator steps, prompt construction, retry rules, fallback logicprompts/round3-synthesis.md — Round 3 merge, conflict detection, rule validation, code verification, report outputworkflow-diagram.md — DOT visual overview of the 3-Round processreport-template.md — Full report template for domain-collab-report.md outputknowledge-summary-template.md — Knowledge summary file structure for downstream reuseprompts/common-rationalizations.md — Common anti-patterns to avoidnpx claudepluginhub aimeerrhythm/enterprise-change-workflow --plugin ecwGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.