mirror of
https://github.com/daffy0208/ai-dev-standards.git
synced 2026-09-14 20:49:49 +08:00
a1abcd95f8
Co-authored-by: daffy0208 <207889146+daffy0208@users.noreply.github.com>
6.5 KiB
6.5 KiB
Audit & Quality System
Last Updated: 2025-10-22 Status: ✅ Operational Next Review: 2025-11-22
Purpose
This document consolidates the audit and quality assurance system for ai-dev-standards. It provides:
- Validation checklist for quality audits
- Current system status and trust measures
- Testing procedures for registry completeness
Archived: This replaces AUDIT-TRUST-RESTORATION.md, AUDIT-VALIDATION-CHECKLIST.md, and QUALITY-AUDIT-REPORT.md.
✅ Current System Status
Registry Validation
- ✅ 100% resource discoverability (all 36 skills + 3 MCPs tracked)
- ✅ Automated validation via tests/registry-validation.test.ts
- ✅ CI/CD enforcement blocks merges if validation fails
- ✅ 30/30 tests passing (Phase 1 + Phase 2)
Relationship Metadata (Phase 2)
- ✅ 3/3 MCPs have
enablesfield - ✅ 18/36 skills have
requiresfield - ✅ 9/9 components have
dependenciesfield - ✅ 3/3 installers have structured manifests
Known Gaps
- ⚠️ 12:1 skill-to-MCP ratio (36 skills, 3 MCPs) — See BUILD_FOCUS.md for resolution plan
- ⚠️ 18 skills lack relationship metadata — Low priority (methodologies only)
- ⚠️ CLI has TODOs — Needs refactor to fetch from actual registry
🔍 Quality Audit Checklist
Phase 0: Resource Discovery (MANDATORY)
Before scoring anything, verify all resources are discoverable.
# Run registry validation tests
npm run test:registry
# Check for gaps
grep -r "TODO\|FIXME" CLI/ --include="*.js"
# Verify counts match
cat meta/registry.json | jq '{skills: (.skills | length), mcps: (.mcpServers | length)}'
Pass Criteria:
- All tests pass (30/30)
- Skills in registry = Skills in skills/ directory
- MCPs in registry = MCPs in mcp-servers/ directory
- No "TODO: Fetch from actual repo" in CLI code
Phase 1: Registry Completeness
# Validate all categories are registered
node scripts/update-registry.js --dry-run
# Check for orphaned files
find SKILLS -type d ! -name "_TEMPLATE" | wc -l
cat meta/registry.json | jq '.skills | length'
Pass Criteria:
- Directory count = Registry count for all categories
- No files missing from registry
- Registry lastUpdated is recent (<7 days)
Phase 2: Relationship Validation
# Check MCPs have enables field
cat meta/registry.json | jq '.mcpServers[] | select(.enables == null)'
# Check skills have requires field
cat meta/registry.json | jq '.skills[] | select(.requires != null) | .name' | wc -l
Pass Criteria:
- All MCPs list skills they enable
- High-priority skills have relationship metadata
- Components declare dependencies
Phase 3: Cross-Reference Validation
# Verify MCP enables reference existing skills
npm run test:registry | grep "enables reference"
# Check skill requires reference existing components
npm run test:registry | grep "requires reference"
Pass Criteria:
- MCP enables field only references real skills
- Skill requires field only references real components
- No broken references
🧪 Test Procedures
Running Tests
# Full validation suite
npm run test:registry
# Watch mode during development
npm run test:watch tests/registry-validation.test.ts
Test Coverage
- 24 Phase 1 tests: Registry completeness
- 6 Phase 2 tests: Relationship validation
- Total: 30 tests covering all resource types
Adding New Tests
When adding new resource types:
- Add category to meta/registry.json
- Add validation test in tests/registry-validation.test.ts
- Update this checklist
🚨 Trust Measures
What We Fixed (Oct 2025)
- 81% invisible skills → 100% discoverable
- CLI mock data → Registry-based (partially complete)
- No relationship tracking → Phase 2 metadata system
- No validation → Comprehensive test suite + CI/CD
Current Confidence Levels
- Registry accuracy: HIGH (automated validation)
- Resource discovery: HIGH (100% coverage)
- Relationship integrity: MEDIUM (18/36 skills mapped)
- CLI reliability: MEDIUM (has TODOs, needs refactor)
- MCP coverage: LOW (3/36 skills have tools)
📊 Quality Scoring Framework
Scoring Dimensions (When Needed)
- Resource Discovery (0-10) — Are all resources findable?
- Documentation (0-10) — Is it clear and accurate?
- Validation (0-10) — Are there tests?
- Relationships (0-10) — Are dependencies clear?
- Completeness (0-10) — Do features match docs?
Overall Quality = Average of dimensions
Audit Rule: If Resource Discovery < 5, cap overall score at 6/10.
🔧 Remediation Templates
When Registry Validation Fails
# 1. Identify the gap
npm run test:registry
# 2. Check directory vs registry count
ls -d skills/*/ | wc -l
cat meta/registry.json | jq '.skills | length'
# 3. Add missing items to registry
# Edit meta/registry.json
# 4. Update timestamp
node -e "const fs=require('fs'); const r=JSON.parse(fs.readFileSync('meta/registry.json','utf8')); r.lastUpdated=new Date().toISOString(); fs.writeFileSync('meta/registry.json', JSON.stringify(r,null,2));"
# 5. Re-run tests
npm run test:registry
When Relationship Validation Fails
# Use helper scripts
node scripts/add-skill-requirements.js
node scripts/add-component-dependencies.js
# Or manually edit registry for specific entries
📅 Audit Schedule
- Continuous: CI/CD runs tests on every commit
- Weekly: Manual review of test results
- Monthly: Full quality audit with scoring
- Quarterly: External validation with real users
🎯 Success Criteria
The audit system is successful when:
- Tests catch gaps before users do
- Registry is always accurate (automated sync)
- Relationship metadata enables discovery
- External users can find what they need
The audit system has failed when:
- User discovers resource that isn't in registry
- Tests pass but system doesn't work
- Documentation claims capabilities that don't exist
📚 Reference
Key Files:
meta/registry.json- Central source of truthtests/registry-validation.test.ts- Validation suitemeta/relationship-mapping.json- Dependency map.github/workflows/ci.yml- CI/CD enforcement
Related Docs:
- BUILD_FOCUS.md - Current execution priorities
- SKILL-MCP-GAP-ANALYSIS.md - Known gaps
- ECOSYSTEM-PARITY-ANALYSIS.md - System relationships
Next Review: 2025-11-22 (after MCP build sprint)