Skip to content

poc#2

Merged
JheisonMB merged 32 commits into
mainfrom
develop
Jun 3, 2026
Merged

poc#2
JheisonMB merged 32 commits into
mainfrom
develop

Conversation

@JheisonMB
Copy link
Copy Markdown
Contributor

What changed

poc

Jheison Martinez Bolivar and others added 30 commits May 29, 2026 17:04
Marks the 0.1.0 series as beta across the workspace, signalling API
instability while the project stabilizes the constraints system, the
workspace split, and the new CLI subcommands.
…rio, cotas)

Replaces the single 'planta.cf' starter with four domain layers matching
real architectural conventions: muros (walls), puertas (doors), mobiliario
(furniture) and cotas (dimensions). Updates the .gitignore template to
exclude preview.png and preview.meta.json in addition to output.dxf.
Exposes --width, --height, and --layer on the preview subcommand so
downstream tooling and AI agents can request a specific resolution or
render a single layer without recompiling the whole project.
…idation

Introduces a declarative constraint system on top of the project model.

- [constraints] block in project.toml wires layers together with
  'parent', 'belongs_to', and 'from -> to' (spatial_dependency) keys.
- 'strict = true' on [project] (or inside [constraints]) upgrades
  constraint warnings into hard build/check failures.
- A new 'belongs_to' attribute on every primitive lets furniture and
  fixtures reference the room or parent entity they sit inside.
- The compiler now reports the offending bounding boxes for parent
  violations and the missing ids for belongs_to references, giving
  agents and humans a precise signal to fix the layout.
Moves the binary out of src/main.rs into a dedicated cadforge-cli crate
and introduces a cadforge-view stub crate for the upcoming wgpu-based
viewer. The cadforge root package is now a pure library.

- compile_project gains an 'output' parameter so the CLI can route DXF
  generation to arbitrary paths (used later by the viewer).
- list_layers switches to the shared load_layers helper and renders a
  tabular view with the per-layer color.
- Integration tests are updated to the new signature and now assert
  'count > 0' instead of a hardcoded entity total, since the example
  project layout has grown.
Extends the cadforge CLI with the workflows needed to iterate on a
project without leaving the terminal:

- 'cadforge fmt [--check]' normalizes .cf files via toml_edit, keeping
  keys sorted and whitespace consistent.
- 'cadforge watch' uses notify to recompile on .cf/.toml changes with a
  300ms debounce window.
- 'cadforge import <dxf>' converts an external DXF into a fresh project
  tree (project.toml + per-layer .cf files) so legacy drawings can be
  round-tripped into cadforge.
- 'cadforge view' hands off to the cadforge-view binary (stubbed for
  now, real wgpu renderer to follow).
- 'cadforge config set/show' stores global defaults in
  ~/.cadforge/config.toml (currently author, units).

The Build subcommand also grows '--output <path>' and '--check' flags
to leverage the new compile_project signature.
Switches from the UniverLab/workflows reusable workflow to explicit
per-job steps (check, test, fmt, clippy) so failures point at the exact
gate and the cache settings are visible inline. Triggers are now
explicit: push to main/dev and pull_request targeting main.
Adds three end-to-end tests: one for non-strict constraint warnings,
one for the strict-mode failure path, and one that compiles the
vivienda example, imports the resulting DXF back into a fresh
cadforge project, and recompiles to prove the round-trip is lossless.
Grows the vivienda example into a 12x9 m plan with two bedrooms, a
kitchen, a bathroom, a closet, and full dimensioning, door swings,
furniture, and hatching. Anchors it as the reference layout used by
the integration tests and the constraint validation.
- Replace 4-job inline CI with centralized rust-ci.yml
- Enables version bump validation on main PRs
- Adds publish --dry-run check for crates.io
- Improves cache and tooling consistency across projects

This aligns cadforge with harness-canopy CI pattern.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JheisonMB JheisonMB merged commit 8fb25f7 into main Jun 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant