// Self-improvement system enabling Claude Code to detect code quality violations,
| name | dogfooding-system |
| description | Self-improvement system enabling Claude Code to detect code quality violations, retrieve past fix patterns from memory, and orchestrate automated improvement cycles. Uses Connascence Analyzer for 7+ violation types, Memory-MCP for pattern storage with WHO/WHEN/PROJECT/WHY tagging, and sandbox testing with automated rollback. Perfect for continuous quality improvement and self-healing codebases. |
| version | 1.0.0 |
| category | quality |
| tags | ["quality","testing","validation"] |
| author | ruv |
A comprehensive 3-phase self-improvement system that enables Claude Code to automatically improve itself and connected MCP servers through quality detection, pattern retrieval, and safe automated fixes.
The Dogfooding System orchestrates three integrated phases:
Key Components:
Activate this skill when:
This skill is particularly valuable when:
Run Connascence Analysis to detect violations and store findings in Memory-MCP.
Workflow:
Violations Detected:
Execution:
# Run quality detection for single project
.\resources\scripts\run-quality-detection.bat memory-mcp
# Run for all projects
.\resources\scripts\run-quality-detection.bat all
Agents: code-analyzer, reviewer
Outputs:
metrics/dogfooding/<project>_<timestamp>.jsonmetrics/dogfooding/summary_<timestamp>.txtQuery Memory-MCP for similar past fixes using vector search, rank by relevance, optionally apply.
Workflow:
all-MiniLM-L6-v2Vector Search:
all-MiniLM-L6-v2 (384-dimensional embeddings)Transformation Strategies:
Execution:
# Query only (no application)
.\resources\scripts\run-pattern-retrieval.bat "God Object with 26 methods"
# Query + apply best pattern
.\resources\scripts\run-pattern-retrieval.bat "Parameter Bomb 10 params" --apply
Agents: code-analyzer, coder, reviewer
Outputs:
retrievals/query-<timestamp>.json (vector search results)retrievals/best-pattern-<timestamp>.jsonFull cycle orchestration combining Quality Detection + Pattern Retrieval + Safe Application.
Workflow:
Safety Checks (MANDATORY):
Execution:
# Single cycle with safety checks
.\resources\scripts\run-continuous-improvement.bat memory-mcp
# Dry-run (no fixes applied)
.\resources\scripts\run-continuous-improvement.bat memory-mcp --dry-run
# Full cycle all projects (round-robin)
.\resources\scripts\run-continuous-improvement.bat all
Agents: hierarchical-coordinator, code-analyzer, coder, reviewer
Outputs:
cycle-summaries/cycle-<id>.txtarchive/<cycle_id>/ (all artifacts)ALL Memory-MCP writes use automatic metadata tagging:
WHO: Agent name, category, capabilities WHEN: ISO timestamp, Unix timestamp, readable format PROJECT: connascence-analyzer, memory-mcp-triple-system, claude-flow, etc. WHY: Intent (implementation, bugfix, refactor, testing, documentation, analysis, planning, research)
Implementation:
const { taggedMemoryStore } = require('./hooks/12fa/memory-mcp-tagging-protocol.js');
// Auto-tagged memory write
const tagged = taggedMemoryStore('code-analyzer', 'Detected God Object with 26 methods', {
violation_type: 'god-object',
severity: 'high',
project: 'memory-mcp'
});
// Automatically includes: agent metadata, timestamps, project, intent
Documentation: C:\Users\17175\docs\DOGFOODING-SAFETY-RULES.md
mkdir C:\Users\17175\tmp\dogfood-sandbox
xcopy /E /I /Q <project> C:\Users\17175\tmp\dogfood-sandbox
cd C:\Users\17175\tmp\dogfood-sandbox && npm test
# If pass โ apply to production
# If fail โ reject fix
git stash push -u -m "backup-<timestamp>"
<apply-fix>
npm test || git stash pop # Rollback on failure
.github/workflows/dogfooding-safety.yml.\resources\scripts\run-quality-detection.bat memory-mcp
.\resources\scripts\run-pattern-retrieval.bat "God Object with 26 methods"
.\resources\scripts\run-continuous-improvement.bat memory-mcp
# Windows Task Scheduler (daily at 12:00 UTC)
schtasks /create /tn "Dogfooding-Cycle" \
/tr "C:\Users\17175\claude-code-plugins\ruv-sparc-three-loop-system\skills\dogfooding-system\resources\scripts\run-continuous-improvement.bat all" \
/sc daily /st 12:00
run-quality-detection.bat - Execute Phase 1 (Quality Detection)run-pattern-retrieval.bat - Execute Phase 2 (Pattern Retrieval)run-continuous-improvement.bat - Execute Phase 3 (Full Cycle)generate-cycle-summary.js - Generate cycle summary reportsviolation-report.md - Violation report template with metadatafix-pattern.json - Fix pattern schema for Memory-MCP storagecycle-summary.md - Cycle summary template with metricstest-quality-detection.js - Verify Phase 1 workflowtest-pattern-retrieval.js - Verify Phase 2 vector searchtest-continuous-improvement.js - Verify Phase 3 full cycleFix: Already patched in Memory-MCP
def __init__(self, ...):
self.client = chromadb.PersistentClient(path=persist_directory)
self.create_collection() # <-- Added this line
Solution: Run Phase 1 (Quality Detection) first to populate Memory-MCP with violations and fixes
Solution: Enhanced sandbox testing to better replicate production environment
Upstream Skills (that feed into dogfooding):
functionality-audit - Sandbox testing + debuggingtheater-detection-audit - Byzantine consensus verificationproduction-readiness - Complete deployment checklistDownstream Skills (that use dogfooding):
cicd-intelligent-recovery - Automated failure recoveryperformance-analysis - Performance optimizationcode-review-assistant - Multi-agent swarm reviewdogfooding-system/
โโโ skill.md (this file)
โโโ INDEX.md (comprehensive documentation)
โโโ resources/
โ โโโ scripts/
โ โ โโโ run-quality-detection.bat
โ โ โโโ run-pattern-retrieval.bat
โ โ โโโ run-continuous-improvement.bat
โ โ โโโ generate-cycle-summary.js
โ โโโ templates/
โ โโโ violation-report.md
โ โโโ fix-pattern.json
โ โโโ cycle-summary.md
โโโ tests/
โ โโโ test-quality-detection.js
โ โโโ test-pattern-retrieval.js
โ โโโ test-continuous-improvement.js
โโโ graphviz/
โโโ dogfooding-system-process.dot
Since implementation:
Status: โ PRODUCTION READY Version: 1.0 (Gold Tier) Skills: 3 SOPs (Quality Detection, Pattern Retrieval, Continuous Improvement) Agents: hierarchical-coordinator, code-analyzer, coder, reviewer MCP Tools: connascence-analyzer, memory-mcp, claude-flow Safety: Sandbox testing + automated rollback + verification