How mattzh72/articraft works
Articraft turns a prompt (optionally with a reference image) into an articulated 3D record, then exposes records through a browser-based viewer. The principal path is CLI → agent run and tool loop → model code using the SDK → compiled/persisted record; users can also fork/edit records and inspect library metadata, runs, trajectories, and geometry. The README documents generation, editing, library maintenance, and viewing; SOURCE INDEX references support several internal links. Unsampled implementations are represented only at the exact paths available in the tree, with uncertain wiring omitted.
Main entry points: harness.py Generation harness · App.tsx Viewer application · repo.py Record repository · runner.py Agent runner
Components 25
Generation agent
- Agent runner
agent/runner.py - Generation harness
agent/harness.py - Prompt loading
agent/prompts/loader.py - Provider selection
agent/providers/factory.py - LLM providers
agent/providers - Agent tools
agent/tools - Feedback and evaluation
agent/feedback.py
3D modeling
- Articulated asset SDK
sdk/v0 - CadQuery extension
sdk/_extensions/cadquery/v0/cadquery.py - Model compilation
agent/compiler.py
Records and library
- Record repository
storage/repo.py - Revision history
storage/revisions.py - Library manifest
storage/library_manifest.py - Run persistence
agent/record_persistence.py
Viewer
- Viewer API
viewer/api/app.py - Record and run routes
viewer/api/routes - 3D scene loader
viewer/web/src/components/viewer3d/useUrdfLoader.ts - URDF parser
viewer/web/src/components/viewer3d/urdf-parser.ts
User interfaces
- Articraft CLI
cli/main.py - Viewer application
viewer/web/src/App.tsx - Record browser
viewer/web/src/components/browser/RecordBrowser.tsx - Asset inspector
viewer/web/src/components/inspector/InspectPanel.tsx
Other components
- User
- Generated model code
- Model provider service
Connections 25
- User → Articraft CLI: requests generation
README.md - Articraft CLI → Agent runner: starts run
cli/main.py - Agent runner → Generation harness: runs agent
- Generation harness → Prompt loading: loads prompts
agent/harness.py - Generation harness → Provider selection: selects provider
agent/harness.py - Provider selection → LLM providers: creates client
agent/providers/factory.py - LLM providers → Model provider service: sends requests
- Generation harness → Agent tools: dispatches tools
agent/harness.py - Agent tools → Generated model code: edits and checks
agent/tools/__init__.py - Generated model code → Articulated asset SDK: builds asset
README.md - Articulated asset SDK → CadQuery extension: optional extension
sdk/_extensions/cadquery/v0/cadquery.py - Agent tools → Model compilation: compiles model
- Generation harness → Feedback and evaluation: records feedback
agent/harness.py - Agent runner → Run persistence: saves run
- Run persistence → Record repository: writes records
- Record repository → Revision history: tracks revisions
storage/revisions.py - Record repository → Library manifest: indexes library
storage/library_manifest.py - User → Viewer application: browses assets
README.md - Viewer application → Viewer API: requests data
- Viewer API → Record and run routes: registers routes
viewer/api/app.py - Record and run routes → Record repository: reads records
- Viewer application → Record browser: renders browser
- Viewer application → Asset inspector: renders inspector
- Asset inspector → 3D scene loader: loads geometry
- 3D scene loader → URDF parser: parses URDF
viewer/web/src/components/viewer3d/useUrdfLoader.ts