ifc-commit/AGENT.md
2026-03-24 16:11:15 +01:00

40 lines
1.3 KiB
Markdown

# AGENT.md
This file provides additional guidance for AI agents working on this repository.
## Project Overview
**ifc-commit** is a CLI tool for slicing, inspecting, and composing IFC (Industry Foundation Classes) files used in Building Information Modeling (BIM).
## Key Files
| File | Purpose |
|------|---------|
| `ifccommit.py` | Main CLI entry point (~1100 lines) |
| `webapp/main.py` | FastAPI web server |
| `webapp/pipeline.py` | Modification pipeline logic |
| `pyproject.toml` | Project dependencies and scripts |
## Commands
```bash
uv run ifccommit.py list <input.ifc> # list IFC types and counts
uv run ifccommit.py info <input.ifc> <IfcType> # dump element attributes
uv run ifccommit.py extract <input.ifc> <out.ifc> <IfcType> [...] # extract to new file
uv run ifccommit.py space <input.ifc> <out.ifc> <SpaceId> # extract space contents
uv run ifccommit.py split <input.ifc> <dist/> [type] # split by storey
uv run ifccommit.py move <input.ifc> <out.ifc> <id> --x <val> [--y] [--z] # translate element
uv run ifccommit.py insert <base.ifc> <part.ifc> <out.ifc> # merge files
uv run ifccommit.py replace <base.ifc> <spaceId> <part.ifc> <out.ifc> # replace space
```
## Testing
```bash
make test # run pytest
make test-pipeline # run full pipeline then pytest
```
## Important Notes
- Use `uv` for package management