How ashwin-magalu/claw-code works
This repository is primarily a Python porting workspace, not yet a runtime-equivalent agent harness. Its main workflow is to invoke the CLI, assemble a workspace manifest, and produce summaries or other views of mirrored commands, tools, and runtime behavior. The Python runtime models routing and turns, while query/session modules provide turn output and persistence. The README also identifies parity auditing and inventory views as workspace capabilities. Rust crates are present as an in-progress port, but the available documentation centers the active Python workspace; unsampled Python subsystems are shown only where the CLI or source index supports them.
Main entry points: main.py Python CLI · query_engine.py Query engine · runtime.py Port runtime · tools.py Tool inventory
Components 15
CLI and reporting
- Python CLI
src/main.py
Port inventory
- Port manifest
src/port_manifest.py - Port models
src/models.py - Command inventory
src/commands.py - Tool inventory
src/tools.py - Tool permissions
src/permissions.py
Mirrored runtime
- Query engine
src/query_engine.py - Port runtime
src/runtime.py - Runtime context
src/context.py
Workspace state
- Turn history
src/history.py - Session store
src/session_store.py - Transcript store
src/transcript.py - Setup report
src/setup.py - Parity audit
src/parity_audit.py
Other components
- CLI user
Connections 21
- CLI user → Python CLI: invokes
README.md - Python CLI → Port manifest: builds
src/main.py - Python CLI → Query engine: renders summary
src/main.py - Python CLI → Port runtime: runs turns
src/main.py - Python CLI → Command inventory: lists commands
src/main.py - Python CLI → Tool inventory: lists tools
src/main.py - Python CLI → Tool permissions: configures permissions
src/main.py - Python CLI → Parity audit: runs audit
src/main.py - Python CLI → Setup report: reports setup
src/main.py - Query engine → Port manifest: builds workspace view
src/query_engine.py - Query engine → Command inventory: loads backlog
src/query_engine.py - Query engine → Tool inventory: loads backlog
src/query_engine.py - Query engine → Port models: uses data types
src/query_engine.py - Query engine → Session store: loads and saves
src/query_engine.py - Query engine → Transcript store: records turns
src/query_engine.py - Port runtime → Query engine: runs turn engine
src/runtime.py - Port runtime → Command inventory: routes commands
src/runtime.py - Port runtime → Tool inventory: routes tools
src/runtime.py - Port runtime → Runtime context: builds context
src/runtime.py - Port runtime → Turn history: records events
src/runtime.py - Tool inventory → Tool permissions: filters tools
src/tools.py