Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .claude/pipeline.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -493,5 +493,67 @@
"showSpeedupEstimate": true,
"includeTimeline": true
}
},
"caching": {
"enabled": true,
"strategy": "content-hash",
"directory": ".claude/pipeline-cache",
"maxAgedays": 7,
"inputCategories": {
"source": ["src/**/*.{ts,tsx,js,jsx}", "components/**/*.{ts,tsx}"],
"styles": ["src/**/*.css", "styles/**/*.css", "tailwind.config.*"],
"tests": ["**/*.test.{ts,tsx,js,jsx}", "**/*.spec.{ts,tsx}"],
"config": ["package.json", "tsconfig.json", "vite.config.*", "next.config.*"],
"tokens": ["design-tokens.lock.json", "tailwind.config.*"],
"figma": ["build-spec.json", "design-tokens.lock.json"]
},
"phaseInputs": {
"token-sync": ["tokens", "config"],
"intake": ["figma"],
"token-lock": ["figma", "tokens"],
"tdd-scaffold": ["figma", "tokens", "tests"],
"component-build": ["source", "styles", "tokens", "tests", "config"],
"storybook": ["source", "styles"],
"visual-diff": ["source", "styles"],
"dark-mode": ["source", "styles"],
"e2e-tests": ["source", "tests", "config"],
"cross-browser": ["source", "styles"],
"quality-gate": ["source", "tests", "config"],
"responsive": ["source", "styles"]
},
"invalidateOnConfigChange": true
},
"profiling": {
"enabled": true,
"metricsDirectory": ".claude/pipeline-cache/metrics",
"historyLimit": 50,
"slowStageThresholdMs": 30000,
"alerts": {
"enabled": true,
"slowStageWarning": true,
"memoryThresholdMb": 1024,
"trendDegradationPercent": 20
},
"reporting": {
"generateOnComplete": true,
"formats": ["md", "json"],
"includeMemoryMetrics": true,
"includeTimeline": true
}
},
"incrementalBuild": {
"enabled": true,
"parallelPhases": true,
"skipCachedPhases": true,
"forceRebuildOn": ["package.json", "pnpm-lock.yaml", "pipeline.config.json"],
"maxParallelPhases": 4
},
"dashboard": {
"enabled": true,
"outputDirectory": ".claude/visual-qa/dashboard",
"formats": ["html", "md"],
"autoGenerateAfterBuild": true,
"includeCharts": true,
"retentionDays": 30
}
}
Empty file.
34 changes: 32 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,24 @@ node scripts/visual-diff.js --batch <actual-dir> <expected-dir> [--output-dir di

# Run visual regression tests against baselines
./scripts/regression-test.sh [url] [--update-baselines] [--json]

# Incremental build with caching and profiling
./scripts/incremental-build.sh [phase|all] [--force] [--parallel]

# Pipeline cache management
node scripts/pipeline-cache.js status # Show cache status
node scripts/pipeline-cache.js check <phase> # Check cache validity
node scripts/pipeline-cache.js invalidate <phase> # Invalidate cache

# Stage profiling and performance analysis
node scripts/stage-profiler.js report # Generate performance report
node scripts/stage-profiler.js analyze # Analyze slow stages
node scripts/stage-profiler.js history # View build history

# Build performance dashboard
node scripts/metrics-dashboard.js generate # Generate HTML dashboard
node scripts/metrics-dashboard.js summary # Show metrics summary
node scripts/metrics-dashboard.js trends # Show performance trends
```

## Development Commands
Expand Down Expand Up @@ -502,7 +520,19 @@ gh issue create # Create issue
./scripts/regression-test.sh # Visual regression testing
```

**Build Performance & Caching:**
```bash
./scripts/incremental-build.sh # Incremental build with caching
./scripts/incremental-build.sh --parallel # Parallel execution
./scripts/incremental-build.sh --force # Force rebuild (ignore cache)
node scripts/pipeline-cache.js status # Cache status
node scripts/stage-profiler.js report # Performance report
node scripts/stage-profiler.js analyze # Slow stage analysis
node scripts/metrics-dashboard.js generate # HTML dashboard
node scripts/metrics-dashboard.js summary # Quick metrics summary
```

---

**Last Updated:** 2026-03-25
**Architecture:** 53 agents, 19 skills, 4 plugins + gh CLI, Figma + Canva + Playwright MCP, 21 scripts, 8 hooks
**Last Updated:** 2026-03-30
**Architecture:** 53 agents, 19 skills, 4 plugins + gh CLI, Figma + Canva + Playwright MCP, 25 scripts, 8 hooks
60 changes: 59 additions & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Scripts Reference

**Last Updated:** 2026-03-17
**Last Updated:** 2026-03-30

All scripts live in `scripts/` and are designed to run from the project root.

Expand Down Expand Up @@ -79,6 +79,64 @@ All scripts live in `scripts/` and are designed to run from the project root.
- **Exit codes**: 0 = pass, 1 = fail (above threshold), 2 = error
- **Config**: Reads defaults from `.claude/pipeline.config.json`

## Build Performance & Caching

### Incremental Build (`incremental-build.sh`)
- **Purpose**: Run pipeline phases with intelligent caching and profiling
- **Usage**:
```bash
./scripts/incremental-build.sh # Run all quality checks
./scripts/incremental-build.sh lint # Run specific phase
./scripts/incremental-build.sh quality # Run full quality gate
./scripts/incremental-build.sh --force # Ignore cache, force rebuild
./scripts/incremental-build.sh --parallel # Run independent phases in parallel
./scripts/incremental-build.sh --no-cache # Disable caching
```
- **Phases**: lint, types, tests, build, bundle, a11y, tokens, quality, all
- **Features**: Hash-based caching, automatic phase skipping, stage profiling

### Pipeline Cache (`pipeline-cache.js`)
- **Purpose**: Content-addressable caching for pipeline phases using SHA-256 hashing
- **Usage**:
```bash
node scripts/pipeline-cache.js status # Show cache status
node scripts/pipeline-cache.js check <phase> # Check if phase cache is valid
node scripts/pipeline-cache.js hash <file|dir> # Hash a file or directory
node scripts/pipeline-cache.js invalidate <phase> # Invalidate a phase cache
node scripts/pipeline-cache.js invalidate all # Invalidate all caches
node scripts/pipeline-cache.js clean --max-age 7 # Clean old entries
```
- **Features**: Phase-level cache, file hash tracking, cache metrics

### Stage Profiler (`stage-profiler.js`)
- **Purpose**: Track timing and performance metrics for each pipeline stage
- **Usage**:
```bash
node scripts/stage-profiler.js start <stage> # Start timing a stage
node scripts/stage-profiler.js end <stage> # End timing a stage
node scripts/stage-profiler.js complete # Archive current run
node scripts/stage-profiler.js report # Generate performance report
node scripts/stage-profiler.js report --format md # Markdown report
node scripts/stage-profiler.js history --last 10 # Show recent runs
node scripts/stage-profiler.js analyze # Analyze performance trends
node scripts/stage-profiler.js status # Show current run status
```
- **Features**: Sub-second timing, memory tracking, slow stage detection, trend analysis

### Metrics Dashboard (`metrics-dashboard.js`)
- **Purpose**: Generate visual build performance dashboards
- **Usage**:
```bash
node scripts/metrics-dashboard.js generate # Generate HTML dashboard
node scripts/metrics-dashboard.js generate --format md # Markdown dashboard
node scripts/metrics-dashboard.js summary # Show performance summary
node scripts/metrics-dashboard.js trends # Show 7-day trends
node scripts/metrics-dashboard.js trends --period 30d # 30-day trends
node scripts/metrics-dashboard.js compare <id1> <id2> # Compare two runs
```
- **Output**: HTML/Markdown dashboards in `.claude/visual-qa/dashboard/`
- **Features**: Cache efficiency tracking, stage breakdown, historical trends

## Project Setup

### Setup Project (`setup-project.sh`)
Expand Down
Loading
Loading