Major changes: - Organized Python v1 implementation into v1/ subdirectory - Created Rust workspace with 9 modular crates: - wifi-densepose-core: Core types, traits, errors - wifi-densepose-signal: CSI processing, phase sanitization, FFT - wifi-densepose-nn: Neural network inference (ONNX/Candle/tch) - wifi-densepose-api: Axum-based REST/WebSocket API - wifi-densepose-db: SQLx database layer - wifi-densepose-config: Configuration management - wifi-densepose-hardware: Hardware abstraction - wifi-densepose-wasm: WebAssembly bindings - wifi-densepose-cli: Command-line interface Documentation: - ADR-001: Workspace structure - ADR-002: Signal processing library selection - ADR-003: Neural network inference strategy - DDD domain model with bounded contexts Testing: - 69 tests passing across all crates - Signal processing: 45 tests - Neural networks: 21 tests - Core: 3 doc tests Performance targets: - 10x faster CSI processing (~0.5ms vs ~5ms) - 5x lower memory usage (~100MB vs ~500MB) - WASM support for browser deployment
2.1 KiB
2.1 KiB
hook pre-task
Execute pre-task preparations and context loading.
Usage
npx claude-flow hook pre-task [options]
Options
--description, -d <text>- Task description for context--auto-spawn-agents- Automatically spawn required agents (default: true)--load-memory- Load relevant memory from previous sessions--optimize-topology- Select optimal swarm topology--estimate-complexity- Analyze task complexity
Examples
Basic pre-task hook
npx claude-flow hook pre-task --description "Implement user authentication"
With memory loading
npx claude-flow hook pre-task -d "Continue API development" --load-memory
Manual agent control
npx claude-flow hook pre-task -d "Debug issue #123" --auto-spawn-agents false
Full optimization
npx claude-flow hook pre-task -d "Refactor codebase" --optimize-topology --estimate-complexity
Features
Auto Agent Assignment
- Analyzes task requirements
- Determines needed agent types
- Spawns agents automatically
- Configures agent parameters
Memory Loading
- Retrieves relevant past decisions
- Loads previous task contexts
- Restores agent configurations
- Maintains continuity
Topology Optimization
- Analyzes task structure
- Selects best swarm topology
- Configures communication patterns
- Optimizes for performance
Complexity Estimation
- Evaluates task difficulty
- Estimates time requirements
- Suggests agent count
- Identifies dependencies
Integration
This hook is automatically called by Claude Code when:
- Starting a new task
- Resuming work after a break
- Switching between projects
- Beginning complex operations
Manual usage in agents:
# In agent coordination
npx claude-flow hook pre-task --description "Your task here"
Output
Returns JSON with:
{
"continue": true,
"topology": "hierarchical",
"agentsSpawned": 5,
"complexity": "medium",
"estimatedMinutes": 30,
"memoryLoaded": true
}
See Also
hook post-task- Post-task cleanupagent spawn- Manual agent creationmemory usage- Memory managementswarm init- Swarm initialization