Skip to content

[PRD] Framework and Build System Detection #29

@charleslbryant

Description

@charleslbryant

Product Requirement Document (PRD)

Problem Statement

CMDS delivery mode currently assumes specific tech stacks (e.g., dotnet) when running builds and tests, causing failures when projects use different frameworks. This breaks the delivery workflow and prevents reliable automation across diverse project types.

Vision

Create an intelligent framework detection system that automatically identifies project tech stacks and selects appropriate build/test commands, enabling CMDS to work seamlessly across any technology ecosystem.

Target Users

  • AI Agents: Need to automatically detect and use correct build/test commands
  • Development Teams: Using diverse tech stacks (Node.js, Python, Java, .NET, Go, etc.)
  • CMDS Operators: Need reliable delivery workflows regardless of project type

Business Impact

  • Reliability: Eliminate delivery failures due to incorrect build commands
  • Versatility: Enable CMDS adoption across all major tech stacks
  • Automation: Reduce manual configuration for build/test processes
  • User Experience: Seamless workflow regardless of project technology

Success Metrics

  • 100% accurate framework detection across supported tech stacks
  • Zero delivery failures due to incorrect build commands
  • Support for top 10 programming ecosystems
  • Sub-second detection performance

Requirements Overview

Core Detection Capabilities

  • File-based Detection: Analyze project files (package.json, pom.xml, requirements.txt, etc.)
  • Directory Structure: Recognize standard project layouts
  • Configuration Files: Parse build configuration files
  • Multi-stack Projects: Handle polyglot repositories

Supported Frameworks (Phase 1)

  • JavaScript/TypeScript: npm, yarn, pnpm
  • Python: pip, poetry, conda
  • Java: Maven, Gradle
  • .NET: dotnet CLI
  • Go: go modules
  • Rust: Cargo
  • Ruby: Bundler
  • PHP: Composer

Command Mapping

  • Build Commands: Framework-specific build processes
  • Test Commands: Framework-specific test runners
  • Lint Commands: Framework-specific linting tools
  • Format Commands: Framework-specific code formatters

High-Level Solution

Implement a detection engine that:

  1. Scans project root for framework indicator files
  2. Analyzes file contents for version and configuration info
  3. Maps detected frameworks to appropriate commands
  4. Provides fallback mechanisms for unknown configurations
  5. Caches detection results for performance

Technical Requirements

  • Detection Speed: Sub-second analysis for typical projects
  • Accuracy: 99%+ correct framework identification
  • Extensibility: Plugin system for new frameworks
  • Configuration: Override mechanism for edge cases
  • Logging: Clear detection reasoning for troubleshooting

Implementation Approach

  1. Phase 1: Core detection for top 5 frameworks
  2. Phase 2: Extended framework support
  3. Phase 3: Plugin system and customization
  4. Phase 4: Performance optimization and caching

Integration Points

  • Delivery Mode: Automatic test/build command selection
  • Dev Mode: Framework-aware development workflows
  • QA Mode: Framework-specific quality checks
  • Documentation: Framework-specific setup guides

Acceptance Criteria

  • Accurate detection of project frameworks
  • Correct build/test command mapping
  • Integration with all CMDS modes
  • Documentation for supported frameworks
  • Fallback handling for unknown frameworks
  • Performance benchmarks met
  • Test coverage >95%

Dependencies

  • File system access for project scanning
  • Command execution capabilities
  • Configuration management system
  • Integration with CMDS mode system

Timeline

  • Week 1: Core detection engine
  • Week 2: Command mapping system
  • Week 3: Integration with delivery mode
  • Week 4: Testing and documentation

Risk Assessment

  • Technical Risk: Complex polyglot project detection
  • Maintenance Risk: Keeping up with framework evolution
  • Performance Risk: Large repository scanning overhead

This PRD addresses the critical gap preventing reliable CMDS delivery across diverse tech stacks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    futurePlanned but not yet readyprdProduct Requirement Document

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions