一键导入
n-version-workflow
N-version programming for critical implementations - generates N independent solutions and selects the best through comparison
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
N-version programming for critical implementations - generates N independent solutions and selects the best through comparison
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Orchestrate large-scale changes across a codebase in parallel
Review changed code for reuse, quality, and efficiency, then fix any issues found
Consolidated Claude Code sync and parity tracking for RustyClawd. Fetches latest Claude Code features from official sources, compares against the local feature inventory, identifies gaps, and optionally creates GitHub issues. Also supports deep analysis by deminifying the installed Claude Code cli.js.
Track and report agent invocation metrics including usage counts, success/failure rates, and completion times. Use for understanding which agents are utilized, identifying underused agents, and optimizing agent delegation patterns.
Automated dependency conflict detection and resolution. Detects local vs CI environment mismatches, compares versions, and generates pinning recommendations. Run as pre-push check to catch issues early.
Auto-discovers and configures Language Server Protocol (LSP) servers for your project's languages
| name | n-version-workflow |
| version | 1.0.0 |
| description | N-version programming for critical implementations - generates N independent solutions and selects the best through comparison |
| auto_activates | ["critical security feature","authentication system","authorization logic","complex algorithm","high-risk refactoring","multiple valid approaches"] |
| explicit_triggers | ["/amplihack:n-version"] |
| confirmation_required | true |
| token_budget | 3500 |
Execute N-version programming workflow for critical implementations where multiple independent solutions should be generated and compared to select the best approach.
USE FOR:
AVOID FOR:
N (Number of Versions):
3 - Default for standard tasks4-6 - Critical features requiring high confidence2 - Quick validation of approachSelection Criteria (priority order):
Agent Diversity Profiles:
conservative - Proven patterns and safetyinnovative - Novel approaches and optimizationsminimalist - Ruthless simplicitypragmatic - Balance trade-offs for practical solutionsperformance-focused - Optimize for speed and efficiencyOutput: Single authoritative specification document
Example for N=3:
Comparison Matrix:
| Version | Correctness | Security | Simplicity | Philosophy | Performance | Lines of Code |
|---------|-------------|----------|------------|------------|-------------|---------------|
| v1 | PASS | PASS | 7/10 | 8/10 | 150ms | 180 |
| v2 | PASS | PASS | 9/10 | 9/10 | 180ms | 95 |
| v3 | FAIL | N/A | 10/10 | 7/10 | N/A | 65 |
Evaluation Process:
Decision Tree:
Example Synthesis:
Selected: Hybrid of v1 and v2
- Core logic from v2 (ruthless simplicity)
- Error handling from v1 (comprehensive coverage)
- Testing approach from v2 (focused, minimal)
- Documentation style from v1 (thorough)
Rationale: v2's minimalist core paired with v1's robust
error handling provides optimal balance of simplicity
and production-readiness.
Documentation Template:
"""
N-Version Implementation Selection
Generated Versions: 3
Selection: Hybrid of v1 (conservative) and v2 (pragmatic)
Rationale:
- v1 had superior error handling and edge case coverage
- v2 had cleaner architecture and better testability
- v3 failed correctness tests (edge case handling)
This implementation combines v2's core logic with v1's
defensive programming approach for production robustness.
Selection Criteria Applied:
1. Correctness: v1=PASS, v2=PASS, v3=FAIL
2. Security: All passed
3. Simplicity: v2 ranked highest
4. Philosophy: v1 and v2 tied
5. Performance: Negligible difference
n_version_analysis.md.claude/context/DISCOVERIES.md with patterns learnedCost: N times the compute resources and time Benefit: Significantly reduced risk of critical errors Best For: Features where bugs are expensive (security, data integrity)
Task: Implement JWT-based authentication Configuration: N=4 (critical security feature) Profiles: conservative, security-focused, pragmatic, minimalist
Result:
Selection: Hybrid of v2 and v3
Rationale: Security cannot be compromised, but v3's cleaner API design improved usability without sacrificing security.
Task: Process large CSV files efficiently Configuration: N=3 (performance-critical) Profiles: pragmatic, performance-focused, minimalist
Result:
Selection: v2 (performance-focused)
Rationale: Performance requirements justified complexity. v2's streaming approach met throughput requirements while v1 and v3 could not scale.
This workflow enforces:
This workflow replaces Steps 4-5 (Research/Design and Implementation) of the DEFAULT_WORKFLOW when enabled. All other steps (requirements, testing, CI/CD) remain the same.