Skip to content

feat(cad): launch Interactive CAD Agent & seaweed-safe FPV boat model. - #12

Merged
archat-hash merged 5 commits into
mainfrom
feature/fpv-boat
Jun 6, 2026
Merged

archat-hash merged 5 commits into
mainfrom
feature/fpv-boat

Conversation

@archat-hash

Copy link
Copy Markdown
Owner

🎯 Overview
This PR marks a significant evolution of FlyCLI's CAD capabilities, moving from simple script execution to a full
Interactive CAD Collaboration ecosystem. It introduces the Model Context Protocol (MCP) integration, allowing AI agents and
human designers to work together in real-time within FreeCAD. The centerpiece of this update is the co-designed
fpv_boat.stl.

✨ Key Changes

  • Interactive CAD Engine: Updated assets/python/freecad_listener.py and launcher.cjs to support bidirectional state
    synchronization. The agent can now "inspect" human-made changes before proposing its own.
  • FPV Boat Model: Inclusion of fpv_boat.stl, a seaweed-safe hull design developed through collaborative AI-human sessions.
  • CAD Knowledge Base: Added docs/reference/cad-examples.md, providing the agent with robust code patterns for Part API and
    CadQuery.
  • Human-in-the-Loop Protocol: Updated skills/flycli/SKILL.md with the "Synchronize-and-React" standard. This ensures the
    agent respects user intent and provides live feedback during the modeling process.

🛠 Technical Improvements

  • Zero-File IPC: Modeling commands are now streamed directly to FreeCAD via IPC/STDIO, eliminating the need for temporary
    .py or .json files in the root directory.
  • Process Persistence: Implemented detached process management to ensure the FreeCAD GUI remains open and interactive even
    if the CLI session restarts.
  • Repository Hygiene: Updated .gitignore to exclude pycache and cleaned up legacy build artifacts.

🚢 How to Verify

  1. Checkout to feature/fpv-boat.
  2. Launch the CAD session: npx flycli cad.
  3. Verify the model file: ls fpv_boat.stl.
  4. Test the agent's awareness by asking it to "inspect the current document" after manually adding an object in FreeCAD.

- Add McpCadTools (src/infrastructure/ai/McpCadTools.js)
  * Provides Gemini function-calling tool definitions (render_cadquery, get_engine_state)
  * CQRS: renderCadQuery [Command], getEngineState [Query], getToolDefinitions [static Query]
  * Validates GeometryScript input before IPC dispatch

- Add CadAgent CLI command (src/interfaces/cli/cad.js)
  * Orchestrates EnvironmentManager -> CadEngineProcess -> McpCadTools
  * Graceful cleanup via finally block (engine.stop() always called)
  * Placeholder script for MVP pipeline validation (Phase 5: Gemini AI loop)

- Register flycli cad <prompt> in index.js

- Add unit tests (TDD — RED -> GREEN -> REFACTOR cycle)
  * test/unit/McpCadTools.test.js (5 tests)
  * test/unit/CadCommand.test.js (2 tests)

- Bump version 1.1.0 -> 1.2.0 (MINOR: new feature)

Traceability:
  - ddd_interfaces.md: CadAgent, IpcBridge, GeometryScript, EngineState
  - implementation_plan.md: Phase 3 & 4
  - DEVELOPER.md: TDD cycle, CQRS, Cyclomatic Complexity <= 5
@archat-hash
archat-hash merged commit b47d756 into main Jun 6, 2026
2 checks passed
@archat-hash
archat-hash deleted the feature/fpv-boat branch June 6, 2026 14:16
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