diff --git a/Change-V5.6.0%3A-Domain-Advisory-Pattern-%28Sprint-9-Implementation%29.md b/Change-V5.6.0%3A-Domain-Advisory-Pattern-%28Sprint-9-Implementation%29.md new file mode 100644 index 0000000..0d69e4b --- /dev/null +++ b/Change-V5.6.0%3A-Domain-Advisory-Pattern-%28Sprint-9-Implementation%29.md @@ -0,0 +1,128 @@ +> **Type:** Change Proposal Implementation +> **Version:** V5.6.0 +> **Status:** In Progress +> **Date:** 2026-02-01 +> **Origin:** [Proposal](https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace/wiki/Change-V5.6.0%3A-Domain-Advisory-Pattern-Proposal) +> **Sprint:** Sprint 9 + +# Implementation Details + +Sprint 9 delivers the full domain advisory pattern for viz-platform, including the projman skill that serves as the reusable backbone for all future domain integrations. + +## Scope + +### Files to Create (5) + +| File | Risk | Description | +|------|------|-------------| +| `plugins/projman/skills/domain-consultation.md` | Medium | Core integration skill - detection rules, consultation protocol, gate logic | +| `plugins/viz-platform/agents/design-reviewer.md` | Low | Review agent using MCP tools for design system compliance | +| `plugins/viz-platform/commands/design-review.md` | Low | Standalone command: `/design-review ` | +| `plugins/viz-platform/commands/design-gate.md` | Low | Binary pass/fail: `/design-gate ` | +| `plugins/viz-platform/skills/design-system-audit.md` | Low | Audit rules, severity levels, violation patterns | + +### Files to Modify (7) + +| File | Risk | Description | +|------|------|-------------| +| `plugins/projman/agents/planner.md` | Medium | Add skill load + domain consultation step | +| `plugins/projman/agents/orchestrator.md` | Medium | Add skill load + domain gate check step | +| `plugins/projman/skills/label-taxonomy/labels-reference.md` | Low | Add Domain/Viz and Domain/Data labels | +| `plugins/viz-platform/.claude-plugin/plugin.json` | Low | Verify commands auto-discovery | +| `.claude-plugin/marketplace.json` | Low | Bump to 5.6.0 | +| `CHANGELOG.md` | Low | Add v5.6.0 entry | +| `README.md` | Low | Update version, add domain advisory section | + +## Implementation Specifications + +### 1. domain-consultation.md (projman skill) + +**Sections:** +- Purpose: Enable projman to consult domain-specific plugins +- When to Use: Planning phase for domain detection, execution phase for gates +- Domain Detection Rules: + - viz-platform: `plugins/viz-platform/**`, `*.dash.py`, keywords: dashboard, chart, theme + - data-platform: `plugins/data-platform/**`, `*.sql`, keywords: dataframe, query, pipeline +- Planning Protocol: Detect domains, present considerations, adjust labels +- Execution Gate Protocol: Run domain gates before issue completion +- Review Protocol: Include domain compliance in review summary +- Extensibility: How to add new domains + +### 2. design-reviewer.md (viz-platform agent) + +**MCP Tools Used:** +- `validate_component` - Check component prop validity +- `get_component_props` - Get expected props for component +- `theme_validate` - Validate theme configuration +- `accessibility_validate_colors` - Check color contrast +- `accessibility_validate_theme` - Full accessibility audit + +**Output Format:** +``` +Design System Audit Report +========================== +Path: +Files Scanned: N +Violations Found: N + +FAIL: [component.py:42] Invalid prop 'colour' - did you mean 'color'? +WARN: [theme.py:15] Color contrast ratio 3.8:1 below AA standard (4.5:1) +INFO: [layout.py:8] Consider using responsive breakpoints for mobile +``` + +### 3. design-system-audit.md (viz-platform skill) + +**What to Check:** +- Component prop validity (typos, invalid values) +- Theme token usage (hardcoded colors vs theme tokens) +- Accessibility (color contrast, ARIA labels) +- Responsive design (breakpoint usage) + +**Severity Classification:** +- FAIL: Breaking issues (invalid props, missing required) +- WARN: Quality issues (accessibility, best practices) +- INFO: Suggestions (optimizations, patterns) + +### 4. design-review.md and design-gate.md (commands) + +**design-review:** Detailed audit mode, shows all findings with context +**design-gate:** Returns 0 (pass) or 1 (fail), used by orchestrator + +### 5. Label Taxonomy Extension + +| Label | Color | Description | +|-------|-------|-------------| +| `Domain/Viz` | #7c4dff | Work involves visualization/dashboard domain | +| `Domain/Data` | #00bfa5 | Work involves data engineering domain | + +## Dependencies + +``` +#1 domain-consultation.md + | + +-- #6 planner.md (depends on #1) + +-- #7 orchestrator.md (depends on #1) + | + +-- #5 design-gate.md (must exist before orchestrator uses it) + | + +-- #3 design-reviewer.md (agent called by gate) + | + +-- #2 design-system-audit.md (skill loaded by agent) + +#4 design-review.md (independent - standalone command) +#8 labels + version + docs (can run last) +``` + +## Issues + +Issues will be created and linked here after planning approval. + +## Validation Checklist + +- [ ] Run `./scripts/validate-marketplace.sh` +- [ ] Run `./scripts/verify-hooks.sh` +- [ ] Run `/validate-contracts` +- [ ] Run `/labels-sync` (after Domain labels added) +- [ ] Verify design-reviewer agent auto-discovered +- [ ] Verify commands discoverable +- [ ] Test `/design-review` against real viz-platform code