- Create domain-consultation.md skill with detection rules and gate protocols - Update orchestrator.md to load skill and run domain gates before completion - Add critical reminder for domain gate enforcement Closes #356 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5.5 KiB
name, description
| name | description |
|---|---|
| domain-consultation | Cross-plugin domain consultation for specialized planning and validation |
Domain Consultation
Purpose
Enables projman agents to detect domain-specific work and consult specialized plugins for expert validation during planning and execution phases. This skill is the backbone of the Domain Advisory Pattern.
When to Use
| Agent | Phase | Action |
|---|---|---|
| Planner | After task sizing, before issue creation | Detect domains, add acceptance criteria |
| Orchestrator | Before marking issue complete | Run domain gates, block if violations |
| Code Reviewer | During review | Include domain compliance in findings |
Domain Detection Rules
| Signal Type | Detection Pattern | Domain Plugin | Action |
|---|---|---|---|
| Label-based | Component/Frontend, Component/UI |
viz-platform | Add design system criteria, apply Domain/Viz |
| Content-based | Keywords: DMC, Dash, layout, theme, component, dashboard, chart, responsive, color, UI, frontend, Plotly | viz-platform | Same as above |
| Label-based | Component/Database, Component/Data |
data-platform | Add data validation criteria, apply Domain/Data |
| Content-based | Keywords: schema, migration, pipeline, dbt, table, column, query, PostgreSQL, lineage, data model | data-platform | Same as above |
| Both signals | Frontend + Data signals present | Both plugins | Apply both sets of criteria |
Planning Protocol
When creating issues, the planner MUST:
-
Analyze each issue for domain signals (check labels AND scan description for keywords)
-
For Domain/Viz issues, append this acceptance criteria block:
## Design System Compliance - [ ] All DMC components validated against registry - [ ] Theme tokens used (no hardcoded colors/sizes) - [ ] Accessibility check passed (WCAG contrast) - [ ] Responsive breakpoints verified -
For Domain/Data issues, append this acceptance criteria block:
## Data Integrity - [ ] Schema changes validated - [ ] dbt tests pass - [ ] Lineage intact (no orphaned models) - [ ] Data types verified -
Apply the corresponding
Domain/*label to route the issue through gates -
Document in planning summary which issues have domain gates active
Execution Gate Protocol
Before marking any issue as complete, the orchestrator MUST:
-
Check issue labels for
Domain/*labels -
If
Domain/Vizlabel present:- Identify files changed by this issue
- Invoke
/design-gate <path-to-changed-files> - Gate PASS → proceed to mark issue complete
- Gate FAIL → add comment to issue with failure details, keep issue open
-
If
Domain/Datalabel present:- Identify files changed by this issue
- Invoke
/data-gate <path-to-changed-files> - Gate PASS → proceed to mark issue complete
- Gate FAIL → add comment to issue with failure details, keep issue open
-
If gate command unavailable (MCP server not running):
- Warn user: "Domain gate unavailable - proceeding without validation"
- Proceed with completion (non-blocking degradation)
- Do NOT silently skip - always inform user
Review Protocol
During code review, the code reviewer SHOULD:
-
After completing standard code quality and security checks, check for
Domain/*labels -
If Domain/Viz: Include "Design System Compliance" section in review report
- Reference
/design-reviewfindings if available - Check for hardcoded colors, invalid props, accessibility issues
- Reference
-
If Domain/Data: Include "Data Integrity" section in review report
- Reference
/data-gatefindings if available - Check for schema validity, lineage integrity
- Reference
Extensibility
To add a new domain (e.g., Domain/Infra for cmdb-assistant):
-
In domain plugin: Create advisory agent + gate command
- Agent:
agents/infra-advisor.md - Gate command:
commands/infra-gate.md - Audit skill:
skills/infra-audit.md
- Agent:
-
In this skill: Add detection rules to the Detection Rules table above
- Define label-based signals (e.g.,
Component/Infrastructure) - Define content-based keywords (e.g., "server", "network", "NetBox")
- Define label-based signals (e.g.,
-
In label taxonomy: Add
Domain/Infralabel with appropriate color- Update
plugins/projman/skills/label-taxonomy/labels-reference.md
- Update
-
No changes needed to planner.md or orchestrator.md agent files
- They read this skill dynamically
- Detection rules table is the single source of truth
This pattern ensures domain expertise stays in domain plugins while projman orchestrates when to ask.
Domain Acceptance Criteria Templates
Design System Compliance (Domain/Viz)
## Design System Compliance
- [ ] All DMC components validated against registry
- [ ] Theme tokens used (no hardcoded colors/sizes)
- [ ] Accessibility check passed (WCAG contrast)
- [ ] Responsive breakpoints verified
Data Integrity (Domain/Data)
## Data Integrity
- [ ] Schema changes validated
- [ ] dbt tests pass
- [ ] Lineage intact (no orphaned models)
- [ ] Data types verified
Gate Command Reference
| Domain | Gate Command | Review Command | Advisory Agent |
|---|---|---|---|
| Viz | /design-gate <path> |
/design-review <path> |
design-reviewer |
| Data | /data-gate <path> |
/data-review <path> |
data-advisor |
Gate commands return binary PASS/FAIL for automation. Review commands return detailed reports for human review.