Files
foxhunt/.claude/helpers/README.md
jgrusewski 12fdd18223 refactor: remove entire CPU training path — 5,307 lines of dead code
Deleted:
- DQN::compute_loss_internal (280 lines) — old Candle forward+loss
- DQN::train_step (55 lines) — old Candle training step
- DQN::compute_gradients (47 lines) — old gradient accumulation
- ComputeLossResult struct — only used by deleted functions
- RegimeConditionalDQN::train_step (65 lines) — old dispatch
- RegimeConditionalDQN::train_step_gpu_regime (100 lines) — old GPU path
- RegimeConditionalDQN::compute_gradients_gpu (130 lines) — old regime gradients
- RegimeConditionalDQN::compute_gradients (92 lines) — old dispatch
- DQNAgentType::train_step dispatch — dead
- DQNAgentType::compute_gradients dispatch — dead
- GpuDqnTrainer::upload_batch (71 lines) — old CPU→GPU upload
- train_step.rs (500 lines) — entire module including ensure_fused_ctx
- dqn_benchmark.rs — used old train_step
- examples.rs — used old train_step
- validation/adapters.rs (289 lines) — used old train_step
- dqn/trainable_adapter.rs — used old train_step
- gpu_smoketest.rs — tested old train_step
- Gradient accumulation path in training_loop.rs (144 lines)
- IQN d_h_s2().clone() → raw pointer (zero alloc)
- Causal intervention format! string alloc removed
- Dead HER relabel functions (320 lines)

Kept:
- ensure_fused_ctx logic inlined into training_loop.rs
- set_noise_sigma_scale re-added to RegimeConditionalDQN

Fixed:
- GpuReplayBuffer max_batch_size wired from batch_size parameter
  (was hardcoded 1024, blocking batch_size=8192)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 09:06:23 +02:00

97 lines
3.0 KiB
Markdown

# Claude Flow V3 Helpers
This directory contains helper scripts and utilities for V3 development.
## 🚀 Quick Start
```bash
# Initialize V3 development environment
.claude/helpers/v3.sh init
# Quick status check
.claude/helpers/v3.sh status
# Update progress metrics
.claude/helpers/v3.sh update domain 3
.claude/helpers/v3.sh update agent 8
.claude/helpers/v3.sh update security 2
```
## Available Helpers
### 🎛️ V3 Master Tool
- **`v3.sh`** - Main command-line interface for all V3 operations
```bash
.claude/helpers/v3.sh help # Show all commands
.claude/helpers/v3.sh status # Quick development status
.claude/helpers/v3.sh update domain 3 # Update specific metrics
.claude/helpers/v3.sh validate # Validate configuration
.claude/helpers/v3.sh full-status # Complete status overview
```
### 📊 V3 Progress Management
- **`update-v3-progress.sh`** - Update V3 development metrics
```bash
# Usage examples:
.claude/helpers/update-v3-progress.sh domain 3 # Mark 3 domains complete
.claude/helpers/update-v3-progress.sh agent 8 # 8 agents active
.claude/helpers/update-v3-progress.sh security 2 # 2 CVEs fixed
.claude/helpers/update-v3-progress.sh performance 2.5x # Performance boost
.claude/helpers/update-v3-progress.sh status # Show current status
```
### 🔍 Configuration Validation
- **`validate-v3-config.sh`** - Comprehensive environment validation
- Checks all required directories and files
- Validates JSON configuration files
- Verifies Node.js and development tools
- Confirms Git repository status
- Validates file permissions
### ⚡ Quick Status
- **`v3-quick-status.sh`** - Compact development progress overview
- Shows domain, agent, and DDD progress
- Displays security and performance metrics
- Color-coded status indicators
- Current Git branch information
## Helper Script Standards
### File Naming
- Use kebab-case: `update-v3-progress.sh`
- Include version prefix: `v3-*` for V3-specific helpers
- Use descriptive names that indicate purpose
### Script Requirements
- Must be executable (`chmod +x`)
- Include proper error handling (`set -e`)
- Provide usage help when called without arguments
- Use consistent exit codes (0 = success, non-zero = error)
### Configuration Integration
Helpers are configured in `.claude/settings.json`:
```json
{
"helpers": {
"directory": ".claude/helpers",
"enabled": true,
"v3ProgressUpdater": ".claude/helpers/update-v3-progress.sh"
}
}
```
## Development Guidelines
1. **Security First**: All helpers must validate inputs
2. **Idempotent**: Scripts should be safe to run multiple times
3. **Fast Execution**: Keep helper execution under 1 second when possible
4. **Clear Output**: Provide clear success/error messages
5. **JSON Safe**: When updating JSON files, use `jq` for safety
## Adding New Helpers
1. Create script in `.claude/helpers/`
2. Make executable: `chmod +x script-name.sh`
3. Add to settings.json helpers section
4. Test thoroughly before committing
5. Update this README with usage documentation