一键导入
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 职业分类
Builds comprehensive, living code-atlases as multi-layer architecture documents derived from code-first truth. Defaults to both Graphviz DOT and Mermaid. User can override to single format. Language-agnostic (Go, TypeScript, Python, .NET, Rust, Java). Files issues with 'code-atlas-bughunt' label. Treats atlas-building as a multi-agent bug-hunting journey: graph-form reasoning exposes structural bugs, route/DTO mismatches, orphaned env vars, dead code paths, and stale documentation that linear review misses. Three-pass bug hunt with per-journey PASS/FAIL/NEEDS_ATTENTION verdicts. Use when: creating architecture documentation, investigating unfamiliar codebases, hunting structural bugs, setting up CI/CD diagram refresh, or publishing to GitHub Pages/mkdocs.
Move the active amplihack CLI session (Copilot/Claude/Amplifier) to a fresh azlin-managed VM, preserving auth, plugins, skills, plan.md, todos, and conversation history. Resumes the session in a detached tmux on the destination host.
Development workflow for features, bugs, refactoring. Normally executed as a sub-recipe by dev-orchestrator/smart-orchestrator. Supports direct invocation via recipe runner for standalone use.
Generates an illustrated, plain-language walkthrough document for a pull request — problem statement, approach overview, step-by-step code tour with mermaid diagrams, deep diff links, key decisions, and testing summary. Use when explaining, documenting, or summarizing a PR, creating a reviewer-friendly illustrated guide, or producing walkthrough notes at the end of default-workflow. Works with GitHub and Azure DevOps.
Checks whether a PR/pull request satisfies the project's merge criteria and records the required evidence in the PR/pull request description. Use with `/merge-ready` before review or merge when QA-team scenarios, docs links, quality-audit convergence, checks/build validation status, and diff scope must be verified.
Expert project manager orchestrating backlog-curator, work-delegator, workstream-coordinator, and roadmap-strategist sub-skills. Coordinates complex software projects through delegation and strategic oversight. Activates when managing projects, coordinating work, or tracking overall progress.
| 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.mdamplihack memory store-discovery CLI commandCost: 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.