implementation-approach
Selects implementation strategy (vertical slice, horizontal, or hybrid) with risk assessment. Use when planning feature implementation.
shinpr · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add shinpr/ai-coding-project-boilerplate --skill implementation-approach技能说明
name: implementation-approach description: Selects implementation strategy (vertical slice, horizontal, or hybrid) with risk assessment. Use when planning feature implementation.
Implementation Strategy Selection Framework (Meta-cognitive Approach)
Meta-cognitive Strategy Selection Process
Phase 1: Decision-Sufficient Current State Analysis
Core Question: "What does the existing implementation look like?"
Analysis Framework
Architecture Analysis: Responsibility separation, data flow, dependencies, technical debt
Implementation Quality Assessment: Code quality, test coverage, performance, security
Historical Context Understanding: Current form rationale, past decision validity, constraint changes, requirement evolution
Meta-cognitive Question List
- What is the true responsibility of this implementation?
- Which parts are business essence and which derive from technical constraints?
- What dependencies or implicit preconditions are unclear from the code?
- What benefits and constraints does the current design bring?
Stop when another current-state fact cannot change responsibility, reuse, option validity, total complexity, a contract, or verification.
Completion evidence: inspected paths, observed architecture/data-flow facts, known constraints, inferred historical rationale labeled as inferred, and unknowns that could change strategy selection.
Transition: proceed when every strategy-relevant claim is observed, explicitly inferred with evidence, or recorded as unknown.
Phase 2: Design Convergence
Core Question: "What is the smallest design that delivers the current required outcome, and what evidence forces each addition beyond it?"
Complete these steps in order before exploring implementation strategies:
- Existing-Surface Baseline: Form the simplest end-to-end path that delivers the current outcome through existing responsibilities. Explicit requirements and accepted decisions are binding; suggested mechanisms remain candidates.
- Evidence Check: Test that path against current requirements, verified constraints, observed in-scope problems, and evidence-backed material risks. Keep only the unmet conditions that can change the selected design.
- Targeted Comparison: For each unmet condition, test reuse, derivation from existing data, on-demand computation, or responsibility at the current caller or boundary before adding design surface. Compare viable choices by total complexity across the dimensions that materially differ: user decisions, settings, modes, concepts, outputs, persistent state, implementation paths, UX, runtime, implementation, testing, documentation, and maintenance. Select the lowest-total-complexity choice that satisfies the condition.
- Subtraction Check: Remove each proposed addition and re-test its governing condition. Retain it only when the confirmed outcome, a required boundary, or necessary proof becomes unmet.
Candidate paths and rejected additions remain active analysis. The durable output is the Selected Design: the complete chosen path plus evidence for each added design surface and the condition that fails when it is removed. Only an accepted ADR may retain alternatives as decision history. During implementation, use the same convergence check without producing a separate artifact.
Completion evidence: one complete Selected Design; every added design surface names its current evidence, why lower-surface resolutions fail, and its subtraction result.
Transition: proceed when every supporting claim is observed, explicitly inferred with evidence, or recorded as unknown; route an unknown that blocks the next step as an exact evidence prerequisite. User interaction is required only when the unknown requires changing the confirmed outcome, desired-future requirements, or non-goals, or authorizing an irreversible action.
Phase 3: Strategy Exploration and Creation
Core Question: "When determining before -> after, what implementation patterns or strategies should be referenced?"
Strategy Discovery Process
Research and Exploration: repository patterns first; then official documentation for the resolved dependency version; then maintained OSS implementations; use literature/blogs only for supplementary alternatives and label them as non-authoritative
Creative Thinking: Strategy combinations, constraint-based design, phase division, extension point design
Reference Strategy Patterns (Creative Combinations Encouraged)
Legacy Handling Strategies:
- Strangler Pattern: Gradual migration through phased replacement
- Facade Pattern: Complexity hiding through unified interface
- Adapter Pattern: Bridge with existing systems
New Development Strategies:
- Feature-driven Development: Vertical implementation prioritizing user value
- Foundation-driven Development: Foundation-first construction prioritizing stability
- Risk-driven Development: Prioritize addressing maximum risk elements
Integration/Migration Strategies:
- Proxy Pattern: Transparent feature extension
- Decorator Pattern: Phased enhancement of existing features
- Bridge Pattern: Flexibility through abstraction
Completion evidence: at least two feasible candidate approaches when the decision is non-trivial, with each candidate mapped to the observed constraints it satisfies and the constraints it leaves unresolved.
Transition: proceed when candidates are comparable against the same constraint set.
Phase 4: Risk Assessment and Control
Core Question: "What risks arise when applying this to the existing implementation, and which control measurably reduces likelihood or impact while preserving verification and rollback?"
Risk Analysis Matrix
Technical Risks: System impact, data consistency, performance degradation, integration complexity
Operational Risks: Service availability, deployment downtime, process changes, rollback procedures
P
阅读完整来源 ↗