| name | compound-engineering |
| description | Orchestration layer that coordinates Debt-Sentinel, Red Team Tribunal, and Spec-Lock into unified workflows. Use when you need comprehensive quality assurance with multiple validation stages. Provides safe-edit workflows, CI pipelines, enhancement pipelines, and engineering metrics dashboard. |
| version | 1.0.0 |
| author | Essential 2026 Suite |
| tags | ["orchestration","workflows","quality","ci-cd","engineering"] |
| trigger_patterns | ["run workflow","quality gate","compound engineering","safe edit","ci pipeline","enhancement pipeline","engineering dashboard","metrics","quality check","validate changes"] |
| allowed_tools | ["Bash","Read","Write","Edit"] |
Compound Engineering: Workflow Orchestration
Overview
Compound Engineering orchestrates the Essential 2026 Plugin Suite (Debt-Sentinel, Red Team Tribunal, Spec-Lock) into unified, multi-stage workflows. It provides comprehensive quality gates and metrics tracking.
Workflows
1. Safe Edit Workflow โญ Most Popular
Three-stage quality gate for individual file edits
Stage 1: Pre-Edit Validation (Debt-Sentinel)
โโ BLOCKS critical anti-patterns
โโ Scores technical debt
Stage 2: Post-Edit Sync (Spec-Lock)
โโ Detects documentation drift
โโ Auto-resolves if possible
Stage 3: Adversarial Review (Red Team Tribunal)
โโ Multi-agent consensus required
โโ REJECTS if concerns not addressed
Usage:
python3 /a0/usr/plugins/compound-engineering/compound-engineering.py \
--workflow safe-edit --file src/auth/login.ts
Outcomes:
- APPROVED: All stages passed โ Ready to merge
- BLOCKED: Critical debt detected โ Must fix
- CONDITIONAL: Minor concerns โ Address then merge
- REJECTED: Tribunal rejected โ Significant rework needed
2. CI Pipeline Workflow
Pre-deployment validation for entire codebase
Stage 1: Technical Debt Analysis
โโ Scan all files for accumulated debt
โโ Calculate aggregate scores
Stage 2: Critical Path Review
โโ Tribunal reviews security files
โโ Auth, payment, API validation
Stage 3: Documentation Health
โโ Verify all specs synchronized
โโ Check for drift across codebase
Result: DEPLOY_READY or BLOCKED
Usage:
python3 /a0/usr/plugins/compound-engineering/compound-engineering.py \
--workflow ci-pipeline --branch main
3. Enhancement Pipeline ๐ Progressive Quality
Four-level enhancement for new features
Level 1: Basic Implementation
โโ Anti-pattern checks (Debt-Sentinel)
โโ Clean architecture validation
Level 2: Performance Optimization
โโ Algorithm review
โโ Resource usage analysis
โโ Caching opportunities
Level 3: Security Hardening
โโ Vulnerability scan
โโ Input validation
โโ Rate limiting
Level 4: Documentation Sync
โโ Update all affected specs
โโ Generate migration guides
โโ Verify sync status
Usage:
python3 /a0/usr/plugins/compound-engineering/compound-engineering.py \
--workflow enhancement --feature "OAuth Integration"
Dashboard & Metrics
Real-Time Dashboard
python3 /a0/usr/plugins/compound-engineering/compound-engineering.py --dashboard
Shows:
- Recent workflow runs
- 7-day statistics
- Plugin health status
- Overall quality score
Quality Score
Quality Score = (1 - Block Rate) ร 100
90-100%: ๐ EXCELLENT
75-89%: โ
GOOD
50-74%: โ ๏ธ NEEDS ATTENTION
0-49%: ๐ด CRITICAL
Tracked Metrics
- Total Workflow Runs: Quality gates executed
- Block/Rejection Rate: % stopped by issues
- Average Debt Score: Mean technical debt
- Average Duration: Execution time
- Documentation Sync Rate: Spec alignment
When to Use
Use Safe Edit When:
- Editing individual files
- Making quick changes
- Need immediate feedback
- Want automatic blocking
Use CI Pipeline When:
- Preparing deployment
- Merging feature branches
- Validating releases
- Checking codebase health
Use Enhancement Pipeline When:
- Building new features
- Want progressive quality
- Need comprehensive validation
- Multiple quality levels desired
Integration
Agent Zero Hooks
Add to settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit(*)|Write(*)",
"command": "python3 /a0/usr/plugins/compound-engineering/compound-engineering.py --workflow safe-edit --file"
}
],
"PostToolUse": [
{
"command": "python3 /a0/usr/plugins/compound-engineering/compound-engineering.py --dashboard"
}
]
}
}
GitHub Actions
name: Quality Gates
on: [pull_request]
jobs:
tribunal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Compound Engineering
run: |
python3 compound-engineering.py \
--workflow ci-pipeline --branch ${{ github.head_ref }}
Sample Output
Safe Edit - Approved
๐ง COMPOUND ENGINEERING: Safe Edit Workflow
Target: src/auth/login.ts
๐ Stage 1: Pre-Edit Validation
โ
Passed: No architectural violations
๐ Stage 2: Documentation Sync
โ
In sync
๐ Stage 3: Adversarial Review
๐ค Skeptic: โ
PASS (92%)
๐ค User Proxy: โ
PASS (88%)
โก Optimizer: โ
PASS (85%)
๐ CONSENSUS: APPROVED
Status: Code ready for merge
Enhancement - Complete
๐ง COMPOUND ENGINEERING: Enhancement Pipeline
Feature: API Rate Limiting
๐ Level 1: Basic Implementation โ
๐ Level 2: Performance Optimization โ
๐ Level 3: Security Hardening โ
๐ Level 4: Documentation Sync โ
๐ Feature enhanced through all 4 quality levels!
Dashboard
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ COMPOUND ENGINEERING DASHBOARD โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ RECENT WORKFLOW RUNS:
โ
safe-edit APPROVED 2026-02-12 1.2s
โ safe-edit BLOCKED 2026-02-12 0.3s
โ
enhancement COMPLETE 2026-02-12 4.5s
๐ฏ OVERALL QUALITY SCORE: 93.3%
Status: ๐ EXCELLENT
Database Schema
SQLite database tracks workflows:
CREATE TABLE workflow_runs (
workflow_type TEXT,
target TEXT,
status TEXT,
duration_ms INTEGER,
debt_score INTEGER,
tribunal_verdict TEXT,
timestamp TIMESTAMP
);
Success Metrics
- Gate Effectiveness: % of real issues caught
- False Positive Rate: % of unnecessary blocks
- Developer Velocity: Time from edit to approval
- Quality Trend: Score improvement over time
Commands Reference
--workflow safe-edit --file <path>
--workflow ci-pipeline --branch <branch>
--workflow enhancement --feature <name>
--dashboard
--metrics --days 30
--help
Troubleshooting
Workflow Stuck
Check individual plugins:
python3 /a0/usr/plugins/debt-sentinel/debt-sentinel.py --check <file>
Metrics Not Updating
Verify database:
docker exec agent-zero sqlite3 /a0/usr/plugins/compound-engineering/engineering_metrics.db
Slow Execution
Agents may timeout on large files. Adjust in script:
subprocess.run(..., timeout=120)
Part of the Essential 2026 Plugin Suite