Commit Graph

10 Commits

Author SHA1 Message Date
rob 2dbcbf1443 agent upgrade 2025-11-04 18:44:29 -04:00
rob e203323ac7 agents refactor 2025-11-04 17:45:11 -04:00
rob 05959e6884 feat: add provider feedback logs 2025-11-02 00:40:02 -03:00
rob 372d24b30d feat: add multi-provider AI system with model hint optimization
Major automation enhancements for flexible AI provider configuration:

1. Add config/ai.yml - Centralized AI configuration
   - Three command chains: default, fast, quality
   - Multi-provider fallback (Claude → Codex → Gemini)
   - Configurable per optimization level
   - Sentinel token configuration

2. Extend automation/ai_config.py
   - Add RunnerSettings with three chain support
   - Add get_chain_for_hint() method
   - Load and validate all three command chains
   - Proper fallback to defaults

3. Update automation/runner.py
   - Read model_hint from .ai-rules.yml
   - Pass model_hint to generate_output()
   - Support output_type hint overrides

4. Update automation/patcher.py
   - Add model_hint parameter throughout pipeline
   - Inject TASK COMPLEXITY hint into prompts
   - ModelConfig.get_commands_for_hint() selects chain
   - Fallback mechanism tries all commands in chain

5. Add design discussion stage to features.ai-rules.yml
   - New design_gate_writer rule (model_hint: fast)
   - New design_discussion_writer rule (model_hint: quality)
   - Update feature_request to create design gate
   - Update feature_discussion to create design gate
   - Add design.discussion.md file associations
   - Proper status transitions: READY_FOR_DESIGN → READY_FOR_IMPLEMENTATION

6. Add assets/templates/design.discussion.md
   - Template for Stage 3 design discussions
   - META header with tokens support
   - Design goals and participation instructions

7. Update tools/setup_claude_agents.sh
   - Agent descriptions reference TASK COMPLEXITY hint
   - cdev-patch: "MUST BE USED when TASK COMPLEXITY is FAST"
   - cdev-patch-quality: "MUST BE USED when TASK COMPLEXITY is QUALITY"

8. Fix assets/hooks/pre-commit
   - Correct template path comment (process/templates not assets/templates)

9. Update tools/mock_ai.sh
   - Log prompts to /tmp/mock_ai_prompts.log for debugging

Impact:
- Users can configure AI providers via config/ai.yml
- Automatic fallback between Claude, Codex, Gemini
- Fast models for simple tasks (vote counting, gate checks)
- Quality models for complex tasks (design, implementation planning)
- Reduced costs through intelligent model selection
- Design stage now properly integrated into workflow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 21:43:13 -03:00
rob 57255a7e09 feat: load ai command chain from shared config 2025-11-01 14:37:57 -03:00
rob feb8580b3a feat: add ai fallback chain with no-change sentinel 2025-11-01 14:25:22 -03:00
rob 2862b2ad50 updated uml diagrams 2025-11-01 11:34:06 -03:00
rob 70c3f6f80d refactor: Clean up pre-commit hook and add comprehensive comments
Removed dead code and added detailed documentation:

1. Removed unused functions (61 lines deleted)
   - resolve_template() - Template resolution now handled by config.py
   - apply_patch_with_3way() - Patch application now handled by patcher.py

2. Added comprehensive function documentation
   - check_append_only_discussion: Detailed docstring explaining validation logic
   - ensure_summary: Explains companion file creation and auto-staging

3. Added execution flow documentation
   - STEP 1: Collect staged files
   - STEP 2: Process discussion files (validation + summary creation)
   - STEP 3: Run AI automation (runner.py) with examples and debug info
   - STEP 4: Run workflow automation (workflow.py) with vote tracking details

4. Improved inline comments
   - Explained what each automation phase does
   - Documented exit codes and behavior
   - Added examples of file transformations
   - Noted debug artifact locations

Result:
- Hook reduced from 141 lines to 109 lines (cleaner)
- Every section now clearly documented
- Easier for users to understand automation flow
- Better debugging guidance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-01 01:08:00 -03:00
rob c231edcd82 fix: Handle API overload errors gracefully
- Detect Claude API 500 Overloaded errors
- Continue processing other files on error instead of aborting
- Log errors to stderr for visibility

This allows commits to succeed even if some AI requests fail due to rate limiting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-31 10:15:48 -03:00
rob 4176f51e7d fix: Add YAML syntax fix and mock AI script for testing
- Fix missing space after colon in features.ai-rules.yml
- Add tools/mock_ai.sh for testing automation without real AI
- Ensures installer has valid YAML templates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-31 09:18:59 -03:00