Commit Graph

3 Commits

Author SHA1 Message Date
James (Claude Code) 6e97ddcbd1 feat: Implement Gemini's universal environment-adaptive solution with .bmad_env state file
Collaborative solution with Gemini to resolve bash approval prompts by shifting from
shell conditionals to agent guidance with persistent state management.

## Key Changes Based on Gemini's Analysis

### 1. Universal State Persistence (.bmad_env file)
- Updated lightweight-ide-detection.md to write IDE environment vars to .bmad_env
- Updated auto-language-init.md to append language environment vars to .bmad_env
- Each Bash tool call can now 'source .bmad_env' to load persistent state
- Supports all IDEs: Claude Code CLI, Cursor AI, Windsurf, Cline, Roo, Trae, Gemini, GitHub Copilot, CLI

### 2. Agent Guidance vs Shell Conditionals
- Restructured reality-audit-comprehensive.md Phase 2 from shell conditionals to agent instructions
- Replaced shell logic with clear procedural guidance for agents
- Task files now provide instructions FOR agents rather than literal bash scripts to execute

### 3. Universal Dev Agent Adaptive Tool Selection
- Added adaptive_tool_selection section to dev.md agent configuration
- Core directive: environment-adaptive tool selection based on detected IDE and language
- Universal compatibility: detects and optimizes for any supported IDE environment
- Language agnostic: supports C#, TypeScript, JavaScript, Java, Rust, Go, Python, Ruby, PHP

### 4. Environment Context Loading Pattern
- All environment-dependent operations start with 'source .bmad_env'
- Agent instructions specify when to use native vs CLI tools based on loaded environment
- Eliminates stateless environment variable issues across separate Bash tool calls
- Universal approach works across all IDE environments automatically

## Expected Results
- No more bash approval prompts in Claude Code CLI environments
- Native tool optimization in Cursor AI, Windsurf, and other supported IDEs
- Agents load environment state and make conscious tool selection decisions
- Graceful fallback to CLI batch mode when appropriate
- Universal language and IDE compatibility

## Collaboration Credit
This solution resulted from collaborative analysis with Gemini AI, identifying that
agents were interpreting shell conditionals as literal commands rather than guidance.

Key insight: shift from 'execute this shell logic' to 'read the state and decide what to do'.
2025-07-24 08:49:20 -04:00
James (Claude Code) 4c83cc614c feat: Complete dev.md agent restoration with full quality framework integration
Restored dev agent to original BMAD Method structure while preserving complete
quality framework enhancements:

- Restored essential commands: reality-audit, build-context, escalate, workspace-*
- Complete task dependencies for quality framework automation
- Preserved develop-story workflow with order-of-execution rules
- Maintained original simplicity with enhanced capabilities
- Fixed dependency organization (tasks vs checklists)

Dev agent now provides original BMAD Method discipline with full quality
enforcement and collaborative workspace capabilities.
2025-07-24 00:01:51 -04:00
James (Claude Code) 7190efdd07 fix: Add all missing files from quality-framework-enhancements branch
MISSING CORE INFRASTRUCTURE:
 bmad-core/ - Complete core framework (70+ files)
  - agents/, checklists/, data/, tasks/, templates/, workflows/
  - core-config.yaml, user-guide.md
 tools/lib/yaml-utils.js - Required by installer
 tools/lib/dependency-resolver.js - Required by installer
 tools/cli.js - Main CLI interface
 tools/bmad-npx-wrapper.js - NPX wrapper
 tools/builders/ - Web builder infrastructure
 Complete build and version management tools

MISSING PROJECT INFRASTRUCTURE:
 .github/ workflows and templates
 .husky/ git hooks
 Build configuration (.prettierrc, .releaserc.json, etc.)
 CHANGELOG.md, CONTRIBUTING.md, LICENSE

This completes the merge by adding all missing files required for
full BMAD functionality including installer, CLI, and core framework.

Total: 90+ missing files added (yaml-utils.js was causing installer failure)
2025-07-23 20:59:37 -04:00