platform/doc/ai_workflow.md
2024-11-25 20:33:45 -07:00

3.2 KiB

AI-Assisted Development Workflow

This document explains how our AI assistance features integrate with the IDD-AI methodology for developing our Laravel platform.

Integration with IDD-AI Cycle

1. Research Phase

AI Tools Used:

  • /ai analyze-laravel [component] - Analyze Laravel's implementation
  • /ai compare-frameworks - Compare different framework approaches
  • /ai suggest-architecture - Get architecture recommendations

2. Identify Phase

AI Tools Used:

  • /ai map-dependencies - Map package dependencies
  • /ai analyze-api - Analyze API requirements
  • /ai suggest-structure - Get package structure suggestions

3. Transform Phase

AI Tools Used:

  • /ai generate-contracts - Generate interface definitions
  • /ai suggest-implementation - Get implementation suggestions
  • /ai check-compatibility - Verify Laravel compatibility

4. Inform Phase

AI Tools Used:

  • /ai document-decisions - Document architectural decisions
  • /ai generate-specs - Generate technical specifications
  • /ai review-approach - Get implementation review

5. Generate Phase

AI Tools Used:

  • /ai generate-code - Generate implementation code
  • /ai generate-tests - Create test suites
  • /ai generate-docs - Create documentation

6. Implement Phase

AI Tools Used:

  • /ai review-code - Get code review
  • /ai suggest-refactor - Get refactoring suggestions
  • /ai check-patterns - Verify Laravel patterns

7. Test Phase

AI Tools Used:

  • /ai verify-tests - Verify test coverage
  • /ai generate-scenarios - Generate test scenarios
  • /ai check-behavior - Verify Laravel behavior

8. Iterate Phase

AI Tools Used:

  • /ai suggest-improvements - Get improvement suggestions
  • /ai analyze-performance - Get performance insights
  • /ai check-quality - Check code quality

9. Review Phase

AI Tools Used:

  • /ai review-complete - Get comprehensive review
  • /ai verify-compatibility - Final compatibility check
  • /ai generate-report - Generate review report

10. Release Phase

AI Tools Used:

  • /ai generate-changelog - Generate changelog
  • /ai update-docs - Update documentation
  • /ai create-examples - Generate usage examples

Workflow Example

Here's how to use AI assistance when implementing a new component:

  1. Start Research:
# Analyze Laravel's implementation
/ai analyze-laravel Cache

# Get implementation suggestions
/ai suggest-architecture Cache
  1. Begin Implementation:
# Generate initial structure
/ai generate-structure Cache

# Get implementation guidance
/ai suggest-implementation Cache::put
  1. Test Development:
# Generate test cases
/ai generate-tests Cache

# Verify Laravel compatibility
/ai verify-behavior Cache
  1. Documentation:
# Generate documentation
/ai generate-docs Cache

# Create usage examples
/ai create-examples Cache

Best Practices

  1. Always verify AI suggestions against Laravel's source code
  2. Use AI for initial implementation, then review and refine
  3. Let AI help maintain API compatibility
  4. Use AI-generated tests as a starting point
  5. Review AI-generated documentation for accuracy