autonomous-development

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Overview

概述

The Autonomous Development skill provides comprehensive strategies, patterns, and best practices for managing full development lifecycles autonomously - from user requirements to production-ready implementation with minimal human intervention.
Autonomous Development技能提供了全面的策略、模式和最佳实践,用于自主管理完整的开发生命周期——从用户需求到可投产的实现,只需极少的人工干预。

When to Apply

适用场景

Use Autonomous Development strategies when:
  • Implementing features from high-level requirements
  • Managing complex multi-phase development projects
  • Need to maintain quality while developing autonomously
  • Implementing with continuous testing and validation
  • Debugging and fixing issues automatically
  • Ensuring parameter consistency and type safety
在以下场景中应用Autonomous Development策略:
  • 从高层需求实现功能
  • 管理复杂的多阶段开发项目
  • 需要在自主开发的同时维持质量
  • 实施持续测试与验证
  • 自动调试和修复问题
  • 确保参数一致性和类型安全

Milestone Planning Strategies

里程碑规划策略

Requirements Decomposition

需求拆解

Pattern: Feature-to-Milestone Mapping
User Requirement → Feature Breakdown → Milestone Plan

Example: "Add MQTT broker with certificate support"

Decomposition:
1. Dependencies & Configuration (Simple)
   - Install required libraries
   - Create configuration module
   - Time: 10-15 minutes

2. Core Functionality (Medium)
   - Implement main feature logic
   - Add error handling
   - Time: 20-30 minutes

3. Integration & Testing (Medium)
   - Write unit tests
   - Write integration tests
   - Time: 15-25 minutes

4. Documentation (Simple)
   - API documentation
   - Usage examples
   - Time: 10-15 minutes
Complexity Assessment Matrix
Simple Milestone:
├─ Single file modification
├─ Well-defined scope
├─ No external dependencies
├─ Existing patterns to follow
└─ Estimated: 10-20 minutes

Medium Milestone:
├─ Multiple file modifications
├─ Some external dependencies
├─ Integration with existing code
├─ Moderate complexity
└─ Estimated: 20-45 minutes

Complex Milestone:
├─ Multiple component changes
├─ New dependencies or frameworks
├─ Significant integration work
├─ Architectural considerations
└─ Estimated: 45-90 minutes

Expert Milestone:
├─ Major architectural changes
├─ Multiple system integrations
├─ Advanced algorithms or patterns
├─ Security-critical implementations
└─ Estimated: 90+ minutes
模式:功能到里程碑映射
User Requirement → Feature Breakdown → Milestone Plan

Example: "Add MQTT broker with certificate support"

Decomposition:
1. Dependencies & Configuration (Simple)
   - Install required libraries
   - Create configuration module
   - Time: 10-15 minutes

2. Core Functionality (Medium)
   - Implement main feature logic
   - Add error handling
   - Time: 20-30 minutes

3. Integration & Testing (Medium)
   - Write unit tests
   - Write integration tests
   - Time: 15-25 minutes

4. Documentation (Simple)
   - API documentation
   - Usage examples
   - Time: 10-15 minutes
复杂度评估矩阵
Simple Milestone:
├─ Single file modification
├─ Well-defined scope
├─ No external dependencies
├─ Existing patterns to follow
└─ Estimated: 10-20 minutes

Medium Milestone:
├─ Multiple file modifications
├─ Some external dependencies
├─ Integration with existing code
├─ Moderate complexity
└─ Estimated: 20-45 minutes

Complex Milestone:
├─ Multiple component changes
├─ New dependencies or frameworks
├─ Significant integration work
├─ Architectural considerations
└─ Estimated: 45-90 minutes

Expert Milestone:
├─ Major architectural changes
├─ Multiple system integrations
├─ Advanced algorithms or patterns
├─ Security-critical implementations
└─ Estimated: 90+ minutes

Milestone Sequencing

里程碑排序

Pattern: Dependency-First Ordering
Order milestones to minimize dependencies:

1. Foundation Layer
   - Dependencies
   - Configuration
   - Data models

2. Core Logic Layer
   - Business logic
   - Core algorithms
   - Main functionality

3. Integration Layer
   - API endpoints
   - External integrations
   - Service connections

4. Quality Layer
   - Testing
   - Documentation
   - Validation
模式:依赖优先排序
Order milestones to minimize dependencies:

1. Foundation Layer
   - Dependencies
   - Configuration
   - Data models

2. Core Logic Layer
   - Business logic
   - Core algorithms
   - Main functionality

3. Integration Layer
   - API endpoints
   - External integrations
   - Service connections

4. Quality Layer
   - Testing
   - Documentation
   - Validation

Incremental Development Patterns

增量开发模式

Commit-Per-Milestone Strategy

每里程碑提交策略

Pattern: Working State Commits
Each milestone must result in a working state:

✅ Good Milestone:
- Feature partially complete but functional
- All tests pass for implemented functionality
- No breaking changes to existing code
- Commit: "feat: add user authentication (phase 1/3)"

❌ Bad Milestone:
- Feature incomplete and non-functional
- Tests failing
- Breaking changes uncommitted
- Half-implemented logic
Conventional Commit Format
<type>(<scope>): <description>

[optional body]

[optional footer]

Types:
- feat: New feature
- fix: Bug fix
- refactor: Code refactoring
- test: Adding tests
- docs: Documentation
- chore: Maintenance
- perf: Performance improvement

Examples:
feat(mqtt): add broker connection with SSL
fix(auth): correct token validation logic
test(api): add integration tests for user endpoints
docs(readme): update installation instructions
模式:可工作状态提交
Each milestone must result in a working state:

✅ Good Milestone:
- Feature partially complete but functional
- All tests pass for implemented functionality
- No breaking changes to existing code
- Commit: "feat: add user authentication (phase 1/3)"

❌ Bad Milestone:
- Feature incomplete and non-functional
- Tests failing
- Breaking changes uncommitted
- Half-implemented logic
Conventional Commit Format
<type>(<scope>): <description>

[optional body]

[optional footer]

Types:
- feat: New feature
- fix: Bug fix
- refactor: Code refactoring
- test: Adding tests
- docs: Documentation
- chore: Maintenance
- perf: Performance improvement

Examples:
feat(mqtt): add broker connection with SSL
fix(auth): correct token validation logic
test(api): add integration tests for user endpoints
docs(readme): update installation instructions

Progressive Enhancement Pattern

渐进增强模式

Start simple, enhance progressively:

Phase 1: Basic Implementation
├─ Core functionality only
├─ No error handling
├─ No optimization
└─ Purpose: Prove concept works

Phase 2: Error Handling
├─ Add try-catch blocks
├─ Add input validation
├─ Add logging
└─ Purpose: Make it robust

Phase 3: Optimization
├─ Performance improvements
├─ Memory optimization
├─ Caching if needed
└─ Purpose: Make it efficient

Phase 4: Polish
├─ Documentation
├─ Examples
├─ Edge case handling
└─ Purpose: Make it production-ready
Start simple, enhance progressively:

Phase 1: Basic Implementation
├─ Core functionality only
├─ No error handling
├─ No optimization
└─ Purpose: Prove concept works

Phase 2: Error Handling
├─ Add try-catch blocks
├─ Add input validation
├─ Add logging
└─ Purpose: Make it robust

Phase 3: Optimization
├─ Performance improvements
├─ Memory optimization
├─ Caching if needed
└─ Purpose: Make it efficient

Phase 4: Polish
├─ Documentation
├─ Examples
├─ Edge case handling
└─ Purpose: Make it production-ready

Auto-Debugging Strategies

自动调试策略

Error Classification System

错误分类体系

Error Categories and Fix Strategies:

1. Syntax Errors (100% auto-fixable)
   - Missing colons, brackets, quotes
   - Indentation errors
   - Strategy: Parse and fix immediately

2. Import Errors (95% auto-fixable)
   - Missing imports
   - Incorrect module paths
   - Strategy: Auto-add imports, fix paths

3. Type Errors (90% auto-fixable)
   - Type mismatches
   - Type hint violations
   - Strategy: Add type conversions or fix hints

4. Name Errors (85% auto-fixable)
   - Undefined variables
   - Typos in names
   - Strategy: Fix typos or add definitions

5. Logic Errors (60% auto-fixable)
   - Wrong algorithm
   - Incorrect conditions
   - Strategy: Analyze and refactor logic

6. Integration Errors (70% auto-fixable)
   - Connection failures
   - API mismatches
   - Strategy: Add retry logic, fix endpoints

7. Performance Errors (40% auto-fixable)
   - Timeouts
   - Memory issues
   - Strategy: Optimize algorithms, add caching
Error Categories and Fix Strategies:

1. Syntax Errors (100% auto-fixable)
   - Missing colons, brackets, quotes
   - Indentation errors
   - Strategy: Parse and fix immediately

2. Import Errors (95% auto-fixable)
   - Missing imports
   - Incorrect module paths
   - Strategy: Auto-add imports, fix paths

3. Type Errors (90% auto-fixable)
   - Type mismatches
   - Type hint violations
   - Strategy: Add type conversions or fix hints

4. Name Errors (85% auto-fixable)
   - Undefined variables
   - Typos in names
   - Strategy: Fix typos or add definitions

5. Logic Errors (60% auto-fixable)
   - Wrong algorithm
   - Incorrect conditions
   - Strategy: Analyze and refactor logic

6. Integration Errors (70% auto-fixable)
   - Connection failures
   - API mismatches
   - Strategy: Add retry logic, fix endpoints

7. Performance Errors (40% auto-fixable)
   - Timeouts
   - Memory issues
   - Strategy: Optimize algorithms, add caching

Debug Loop Pattern

调试循环模式

Maximum 5 iterations per issue:

Iteration 1: Quick Fix (confidence > 90%)
├─ Fix obvious issues (typos, imports)
├─ Success rate: 70%
└─ Time: 30 seconds

Iteration 2: Pattern-Based Fix (confidence 70-90%)
├─ Apply known successful patterns
├─ Success rate: 50%
└─ Time: 1-2 minutes

Iteration 3: Analysis-Based Fix (confidence 50-70%)
├─ Deep error analysis
├─ Root cause investigation
├─ Success rate: 30%
└─ Time: 3-5 minutes

Iteration 4: Alternative Approach (confidence 30-50%)
├─ Try different implementation
├─ Success rate: 20%
└─ Time: 5-10 minutes

Iteration 5: Last Attempt (confidence < 30%)
├─ Aggressive fixes
├─ Success rate: 10%
└─ Time: 10-15 minutes

If all iterations fail → Manual intervention required
Maximum 5 iterations per issue:

Iteration 1: Quick Fix (confidence > 90%)
├─ Fix obvious issues (typos, imports)
├─ Success rate: 70%
└─ Time: 30 seconds

Iteration 2: Pattern-Based Fix (confidence 70-90%)
├─ Apply known successful patterns
├─ Success rate: 50%
└─ Time: 1-2 minutes

Iteration 3: Analysis-Based Fix (confidence 50-70%)
├─ Deep error analysis
├─ Root cause investigation
├─ Success rate: 30%
└─ Time: 3-5 minutes

Iteration 4: Alternative Approach (confidence 30-50%)
├─ Try different implementation
├─ Success rate: 20%
└─ Time: 5-10 minutes

Iteration 5: Last Attempt (confidence < 30%)
├─ Aggressive fixes
├─ Success rate: 10%
└─ Time: 10-15 minutes

If all iterations fail → Manual intervention required

Common Fix Patterns

常见修复模式

Connection Retry Pattern
python
undefined
Connection Retry Pattern
python
undefined

Problem: Connection refused

Problem: Connection refused

Fix: Add exponential backoff retry

Fix: Add exponential backoff retry

import time from functools import wraps
def with_retry(max_attempts=3, backoff_factor=2): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): for attempt in range(max_attempts): try: return func(*args, **kwargs) except ConnectionError as e: if attempt == max_attempts - 1: raise delay = backoff_factor ** attempt time.sleep(delay) return None return wrapper return decorator
@with_retry(max_attempts=3) def connect_to_service(): # Connection logic pass

**Type Conversion Pattern**

```python
import time from functools import wraps
def with_retry(max_attempts=3, backoff_factor=2): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): for attempt in range(max_attempts): try: return func(*args, **kwargs) except ConnectionError as e: if attempt == max_attempts - 1: raise delay = backoff_factor ** attempt time.sleep(delay) return None return wrapper return decorator
@with_retry(max_attempts=3) def connect_to_service(): # Connection logic pass

**Type Conversion Pattern**

```python

Problem: Type mismatch (str vs int)

Problem: Type mismatch (str vs int)

Fix: Add safe type conversion

Fix: Add safe type conversion

def safe_int(value, default=0): try: return int(value) except (ValueError, TypeError): return default
def safe_int(value, default=0): try: return int(value) except (ValueError, TypeError): return default

Usage

Usage

user_id = safe_int(request.params.get('user_id'))

**Null Safety Pattern**

```python
user_id = safe_int(request.params.get('user_id'))

**Null Safety Pattern**

```python

Problem: NoneType attribute error

Problem: NoneType attribute error

Fix: Add null checks

Fix: Add null checks

Bad

Bad

result = data.get('user').get('name')
result = data.get('user').get('name')

Good

Good

result = data.get('user', {}).get('name', 'Unknown')
result = data.get('user', {}).get('name', 'Unknown')

Better

Better

user = data.get('user') result = user.get('name', 'Unknown') if user else 'Unknown'

**Parameter Validation Pattern**

```python
user = data.get('user') result = user.get('name', 'Unknown') if user else 'Unknown'

**Parameter Validation Pattern**

```python

Problem: Invalid parameters

Problem: Invalid parameters

Fix: Add validation decorator

Fix: Add validation decorator

from functools import wraps from typing import get_type_hints
def validate_params(func): @wraps(func) def wrapper(*args, **kwargs): hints = get_type_hints(func) for param_name, param_type in hints.items(): if param_name in kwargs: value = kwargs[param_name] if not isinstance(value, param_type): raise TypeError( f"{param_name} must be {param_type}, " f"got {type(value)}" ) return func(*args, **kwargs) return wrapper
@validate_params def create_user(name: str, age: int) -> dict: return {'name': name, 'age': age}
undefined
from functools import wraps from typing import get_type_hints
def validate_params(func): @wraps(func) def wrapper(*args, **kwargs): hints = get_type_hints(func) for param_name, param_type in hints.items(): if param_name in kwargs: value = kwargs[param_name] if not isinstance(value, param_type): raise TypeError( f"{param_name} must be {param_type}, " f"got {type(value)}" ) return func(*args, **kwargs) return wrapper
@validate_params def create_user(name: str, age: int) -> dict: return {'name': name, 'age': age}
undefined

Parameter Consistency Validation

参数一致性验证

Cross-File Parameter Validation

跨文件参数验证

Critical validation checklist:

1. Function Signatures
   ✓ Parameter names match between definition and calls
   ✓ Parameter order consistent
   ✓ Default values aligned

2. Configuration Files
   ✓ Config keys match code usage
   ✓ Environment variables consistent
   ✓ No undefined config references

3. Type Consistency
   ✓ Type hints present and correct
   ✓ Return types specified
   ✓ Type conversions explicit

4. API Contracts
   ✓ Request parameters match backend expectations
   ✓ Response structure consistent
   ✓ Error codes standardized

5. Database Schemas
   ✓ Column names match model attributes
   ✓ Data types aligned
   ✓ Foreign key constraints correct
Critical validation checklist:

1. Function Signatures
   ✓ Parameter names match between definition and calls
   ✓ Parameter order consistent
   ✓ Default values aligned

2. Configuration Files
   ✓ Config keys match code usage
   ✓ Environment variables consistent
   ✓ No undefined config references

3. Type Consistency
   ✓ Type hints present and correct
   ✓ Return types specified
   ✓ Type conversions explicit

4. API Contracts
   ✓ Request parameters match backend expectations
   ✓ Response structure consistent
   ✓ Error codes standardized

5. Database Schemas
   ✓ Column names match model attributes
   ✓ Data types aligned
   ✓ Foreign key constraints correct

Validation Automation Pattern

验证自动化模式

python
undefined
python
undefined

Automated parameter validation

Automated parameter validation

def validate_function_calls(codebase): issues = []
# Extract all function definitions
definitions = extract_function_definitions(codebase)

# Extract all function calls
calls = extract_function_calls(codebase)

for call in calls:
    definition = definitions.get(call.function_name)

    if not definition:
        issues.append({
            'type': 'undefined_function',
            'function': call.function_name,
            'location': call.location
        })
        continue

    # Check parameter count
    if len(call.args) != len(definition.params):
        issues.append({
            'type': 'parameter_count_mismatch',
            'function': call.function_name,
            'expected': len(definition.params),
            'actual': len(call.args)
        })

    # Check parameter names (for keyword args)
    for arg_name in call.kwargs:
        if arg_name not in definition.param_names:
            issues.append({
                'type': 'undefined_parameter',
                'function': call.function_name,
                'parameter': arg_name
            })

return issues
undefined
def validate_function_calls(codebase): issues = []
# Extract all function definitions
definitions = extract_function_definitions(codebase)

# Extract all function calls
calls = extract_function_calls(codebase)

for call in calls:
    definition = definitions.get(call.function_name)

    if not definition:
        issues.append({
            'type': 'undefined_function',
            'function': call.function_name,
            'location': call.location
        })
        continue

    # Check parameter count
    if len(call.args) != len(definition.params):
        issues.append({
            'type': 'parameter_count_mismatch',
            'function': call.function_name,
            'expected': len(definition.params),
            'actual': len(call.args)
        })

    # Check parameter names (for keyword args)
    for arg_name in call.kwargs:
        if arg_name not in definition.param_names:
            issues.append({
                'type': 'undefined_parameter',
                'function': call.function_name,
                'parameter': arg_name
            })

return issues
undefined

Quality Assurance Patterns

质量保证模式

Quality Score Calculation

质量分数计算

Quality Score (0-100):

Code Quality (40 points):
├─ Syntax correctness (10)
├─ Style compliance (10)
├─ Code complexity (10)
└─ Best practices (10)

Test Quality (30 points):
├─ Test coverage (15)
├─ Test success rate (10)
└─ Test quality (5)

Documentation Quality (20 points):
├─ Docstrings (10)
├─ Comments (5)
└─ Examples (5)

Security Quality (10 points):
├─ No vulnerabilities (5)
├─ Secure patterns (5)

Thresholds:
├─ 85-100: Excellent (production-ready)
├─ 70-84: Good (acceptable)
├─ 50-69: Fair (needs improvement)
└─ 0-49: Poor (not acceptable)
Quality Score (0-100):

Code Quality (40 points):
├─ Syntax correctness (10)
├─ Style compliance (10)
├─ Code complexity (10)
└─ Best practices (10)

Test Quality (30 points):
├─ Test coverage (15)
├─ Test success rate (10)
└─ Test quality (5)

Documentation Quality (20 points):
├─ Docstrings (10)
├─ Comments (5)
└─ Examples (5)

Security Quality (10 points):
├─ No vulnerabilities (5)
├─ Secure patterns (5)

Thresholds:
├─ 85-100: Excellent (production-ready)
├─ 70-84: Good (acceptable)
├─ 50-69: Fair (needs improvement)
└─ 0-49: Poor (not acceptable)

Auto-Fix Priority System

自动修复优先级体系

Fix Priority Order:

Priority 1 (Always fix):
├─ Syntax errors
├─ Import errors
├─ Undefined variables
├─ Type errors (obvious)
└─ Success rate: 95%+

Priority 2 (Usually fix):
├─ Style violations
├─ Missing docstrings
├─ Unused imports
├─ Simple complexity issues
└─ Success rate: 80-95%

Priority 3 (Suggest fix):
├─ Complex refactoring
├─ Performance optimizations
├─ Architecture improvements
└─ Success rate: 60-80%

Priority 4 (Report only):
├─ Design decisions
├─ Major refactoring
├─ Architectural changes
└─ Requires human judgment
Fix Priority Order:

Priority 1 (Always fix):
├─ Syntax errors
├─ Import errors
├─ Undefined variables
├─ Type errors (obvious)
└─ Success rate: 95%+

Priority 2 (Usually fix):
├─ Style violations
├─ Missing docstrings
├─ Unused imports
├─ Simple complexity issues
└─ Success rate: 80-95%

Priority 3 (Suggest fix):
├─ Complex refactoring
├─ Performance optimizations
├─ Architecture improvements
└─ Success rate: 60-80%

Priority 4 (Report only):
├─ Design decisions
├─ Major refactoring
├─ Architectural changes
└─ Requires human judgment

Testing Strategies for Autonomous Development

自主开发的测试策略

Test Generation Priorities

测试生成优先级

Test Priority Matrix:

Critical Path Tests (Must have):
├─ Core functionality tests
├─ Error handling tests
├─ Edge case tests
└─ Coverage target: 100%

Integration Tests (Should have):
├─ Component integration
├─ External service integration
├─ End-to-end workflows
└─ Coverage target: 80%

Performance Tests (Nice to have):
├─ Load tests
├─ Stress tests
├─ Benchmark tests
└─ Coverage target: 50%
Test Priority Matrix:

Critical Path Tests (Must have):
├─ Core functionality tests
├─ Error handling tests
├─ Edge case tests
└─ Coverage target: 100%

Integration Tests (Should have):
├─ Component integration
├─ External service integration
├─ End-to-end workflows
└─ Coverage target: 80%

Performance Tests (Nice to have):
├─ Load tests
├─ Stress tests
├─ Benchmark tests
└─ Coverage target: 50%

Test-First Development Pattern

测试先行开发模式

For autonomous development:

1. Generate Test Cases First
   - Based on requirements
   - Cover happy path and edge cases
   - Include error scenarios

2. Implement to Pass Tests
   - Write minimal code to pass
   - Refactor after passing
   - Maintain test coverage

3. Expand Tests as Needed
   - Add tests for bugs found
   - Add tests for edge cases discovered
   - Keep tests up-to-date
For autonomous development:

1. Generate Test Cases First
   - Based on requirements
   - Cover happy path and edge cases
   - Include error scenarios

2. Implement to Pass Tests
   - Write minimal code to pass
   - Refactor after passing
   - Maintain test coverage

3. Expand Tests as Needed
   - Add tests for bugs found
   - Add tests for edge cases discovered
   - Keep tests up-to-date

Requirements Verification Patterns

需求验证模式

Acceptance Criteria Validation

验收标准验证

Verification Checklist Template:

Functional Requirements:
├─ [ ] Feature X implemented
├─ [ ] Feature Y working
├─ [ ] All specified behaviors present
└─ [ ] Edge cases handled

Non-Functional Requirements:
├─ [ ] Performance targets met
├─ [ ] Security requirements satisfied
├─ [ ] Scalability considered
└─ [ ] Maintainability ensured

Quality Requirements:
├─ [ ] Tests passing (100%)
├─ [ ] Code quality ≥ 85/100
├─ [ ] Documentation complete
└─ [ ] No critical issues

User Experience:
├─ [ ] Easy to use
├─ [ ] Clear error messages
├─ [ ] Good documentation
└─ [ ] Examples provided
Verification Checklist Template:

Functional Requirements:
├─ [ ] Feature X implemented
├─ [ ] Feature Y working
├─ [ ] All specified behaviors present
└─ [ ] Edge cases handled

Non-Functional Requirements:
├─ [ ] Performance targets met
├─ [ ] Security requirements satisfied
├─ [ ] Scalability considered
└─ [ ] Maintainability ensured

Quality Requirements:
├─ [ ] Tests passing (100%)
├─ [ ] Code quality ≥ 85/100
├─ [ ] Documentation complete
└─ [ ] No critical issues

User Experience:
├─ [ ] Easy to use
├─ [ ] Clear error messages
├─ [ ] Good documentation
└─ [ ] Examples provided

Integration with Learning System

与学习系统的集成

Pattern Storage for Development

开发模式存储

json
{
  "dev_pattern": {
    "requirement_type": "mqtt_integration",
    "complexity": "medium",

    "successful_approach": {
      "milestone_count": 5,
      "milestone_sequence": [
        "dependencies",
        "core_logic",
        "integration",
        "testing",
        "documentation"
      ],
      "avg_milestone_time": 9.7,
      "total_time": 48.5
    },

    "common_issues": [
      {
        "issue": "certificate_path_mismatch",
        "frequency": 0.65,
        "fix": "use_relative_paths",
        "success_rate": 0.95
      },
      {
        "issue": "connection_timeout",
        "frequency": 0.45,
        "fix": "add_retry_logic",
        "success_rate": 0.88
      }
    ],

    "quality_metrics": {
      "avg_code_quality": 92,
      "avg_test_coverage": 91,
      "avg_security_score": 94
    },

    "skill_effectiveness": {
      "code-analysis": 0.94,
      "testing-strategies": 0.91,
      "security-patterns": 0.88
    }
  }
}
json
{
  "dev_pattern": {
    "requirement_type": "mqtt_integration",
    "complexity": "medium",

    "successful_approach": {
      "milestone_count": 5,
      "milestone_sequence": [
        "dependencies",
        "core_logic",
        "integration",
        "testing",
        "documentation"
      ],
      "avg_milestone_time": 9.7,
      "total_time": 48.5
    },

    "common_issues": [
      {
        "issue": "certificate_path_mismatch",
        "frequency": 0.65,
        "fix": "use_relative_paths",
        "success_rate": 0.95
      },
      {
        "issue": "connection_timeout",
        "frequency": 0.45,
        "fix": "add_retry_logic",
        "success_rate": 0.88
      }
    ],

    "quality_metrics": {
      "avg_code_quality": 92,
      "avg_test_coverage": 91,
      "avg_security_score": 94
    },

    "skill_effectiveness": {
      "code-analysis": 0.94,
      "testing-strategies": 0.91,
      "security-patterns": 0.88
    }
  }
}

Best Practices

最佳实践

DO's

建议事项

Break Down Complexity
  • Decompose requirements into small, manageable milestones
  • Each milestone should be independently testable
  • Commit each working milestone
Validate Continuously
  • Run tests after each change
  • Check parameter consistency frequently
  • Validate type safety throughout
Debug Systematically
  • Start with high-confidence fixes
  • Use pattern-based approaches
  • Learn from failures
Document Progressively
  • Document as you implement
  • Keep documentation synchronized
  • Include usage examples
Learn from Experience
  • Store successful patterns
  • Record failed approaches
  • Optimize based on learnings
拆解复杂度
  • 将需求拆解为小的、可管理的里程碑
  • 每个里程碑应可独立测试
  • 提交每个可工作的里程碑
持续验证
  • 每次变更后运行测试
  • 频繁检查参数一致性
  • 全程确保类型安全
系统化调试
  • 从高置信度修复开始
  • 使用基于模式的方法
  • 从失败中学习
渐进式文档
  • 边实现边文档化
  • 保持文档同步
  • 包含使用示例
从经验中学习
  • 存储成功模式
  • 记录失败的方法
  • 基于学习优化

DON'Ts

禁忌事项

Don't Skip Validation
  • Never commit without tests passing
  • Don't ignore parameter mismatches
  • Don't skip quality checks
Don't Implement Everything at Once
  • Avoid big-bang implementation
  • Don't commit non-working code
  • Don't skip incremental commits
Don't Ignore Patterns
  • Don't repeat failed approaches
  • Don't ignore learned patterns
  • Don't make same mistakes twice
Don't Compromise Quality
  • Don't accept quality score < 70
  • Don't skip security validation
  • Don't skip documentation
不要跳过验证
  • 绝不要在测试未通过时提交
  • 不要忽略参数不匹配
  • 不要跳过质量检查
不要一次性实现所有内容
  • 避免大爆炸式实现
  • 不要提交无法工作的代码
  • 不要跳过增量提交
不要忽略模式
  • 不要重复失败的方法
  • 不要忽略已学习的模式
  • 不要重复相同的错误
不要妥协质量
  • 不要接受质量分数<70
  • 不要跳过安全验证
  • 不要跳过文档

Advanced Patterns

高级模式

Parallel Milestone Execution

里程碑并行执行

When milestones are independent:

Sequential (slower):
Milestone 1 → Milestone 2 → Milestone 3
Total time: 30 minutes

Parallel (faster):
Milestone 1 ─┐
Milestone 2 ─┼→ Sync → Milestone 4
Milestone 3 ─┘
Total time: 12 minutes

Use parallel execution for:
- Independent components
- Test generation
- Documentation updates
- Multiple bug fixes
When milestones are independent:

Sequential (slower):
Milestone 1 → Milestone 2 → Milestone 3
Total time: 30 minutes

Parallel (faster):
Milestone 1 ─┐
Milestone 2 ─┼→ Sync → Milestone 4
Milestone 3 ─┘
Total time: 12 minutes

Use parallel execution for:
- Independent components
- Test generation
- Documentation updates
- Multiple bug fixes

Adaptive Planning Pattern

自适应规划模式

Adjust plan based on execution:

Initial Plan:
├─ Milestone 1: 15 min (estimated)
├─ Milestone 2: 20 min (estimated)
├─ Milestone 3: 15 min (estimated)
└─ Total: 50 minutes

After Milestone 1 (took 25 min):
├─ Reason: Unexpected complexity
├─ Adjust remaining estimates: +10 min each
├─ New total: 70 minutes
└─ Re-evaluate approach if needed
The Autonomous Development skill provides comprehensive guidance for managing full development lifecycles with minimal human intervention, ensuring high quality and continuous improvement through learning.
Adjust plan based on execution:

Initial Plan:
├─ Milestone 1: 15 min (estimated)
├─ Milestone 2: 20 min (estimated)
├─ Milestone 3: 15 min (estimated)
└─ Total: 50 minutes

After Milestone 1 (took 25 min):
├─ Reason: Unexpected complexity
├─ Adjust remaining estimates: +10 min each
├─ New total: 70 minutes
└─ Re-evaluate approach if needed
Autonomous Development技能为以极少人工干预管理完整开发生命周期提供了全面指导,通过学习确保高质量和持续改进。