Spaces:
Sleeping
Sleeping
Commit History
-
feat: constrain agent questions to user-friendly abstraction level (#13)
Daniel Tu +1: Claude Opus 4.6 (1M context)Unverified signatureAgents and gap analyzer were asking overly technical questions like "What are the precise X, Y, Z coordinates for the M4 mounting holes?" — details only a CAD engineer would know. Users describe intent; agents should derive the technical parameters. - Add question abstraction rules to gap analyzer system prompt - Apply CrewAI system_template on advisory agents (design, engineering, cnc) via {{ .System }} / {{ .Prompt }} to preserve default behaviour while injecting question-level guidance - Improve part name extraction patterns in DesignState Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>afd1605 -
feat: add model selector dropdown to UI
Users can now pick which model to use per backend (e.g. gemini-2.5-flash vs gemini-2.5-pro) from a dropdown in the top bar. Available models are configured in config.yaml and served via GET /api/backend-models. Also adds .gitignore entries for Claude Code local files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1f27d6a -
feat: add severity field to GeneratedQuestionCard
Adds a Literal["blocking", "recommended", "nice_to_have"] severity field (default "recommended") to GeneratedQuestionCard so the frontend receives severity directly on each card. Also updates the system prompt to instruct the LLM to mirror gap severity onto the corresponding question cards. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>54db1da -
fix: pass max_tokens to LLM, add debug log for JSON parse fallback
Addresses code review findings: - max_tokens config was defined but not passed to crewai.LLM - JSON parse fallback now logs at debug level for diagnostics Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>a3f1aa5 -
feat: replace keyword gap analyzer with LLM-based analyze_gaps
Replace the old keyword-matching gap detection (MissingItem, GapAnalysis, QuestionCard, QUESTION_TEMPLATES, generate_question_cards) with an LLM-based approach using structured output via crewai.LLM.call(response_model=...). New models: DetectedGap, GeneratedQuestionCard, GapAnalysisResult. New function: analyze_gaps() now takes agent_responses + DesignState + user_message, calls the LLM with a system prompt, and returns a GapAnalysisResult with enriched agent metadata. Falls back to empty result on any LLM failure. Update callers in crew_orchestrator.py and agent_flow.py to use the new API (analyze_gaps returns question_cards directly, no separate generate_question_cards step). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>2919322
-
refactor: update CrewOrchestrator to return ChatTurnResponse
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>98e04b1 -
refactor: update BaseOrchestrator and MockChatBackend to return ChatTurnResponse
Replace raw dict returns with typed Pydantic models throughout the orchestrator layer: BaseOrchestrator.chat_turn() now declares ChatTurnResponse return type, MockChatBackend builds and returns ChatTurnResponse directly, and _execute_cad_code returns PreviewData. Remove unused _format_response helper and AGENT_COLORS/NAMES/AVATARS imports. Bridge CrewOrchestrator._fallback() and server routes to handle the new typed returns until Tasks 9-10 complete their migration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>6d4f152 -
refactor: type ContextVar design state as DesignState
Change set_design_state() and get_design_state() to use DesignState objects instead of dicts. Update QueryDesignStateTool._run() to use the state directly without reconstruction. Update callers in CrewOrchestrator to pass DesignState objects instead of model_dump(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>83f3ff9 -
refactor: type analyze_gaps and extract_decisions with AgentResponse
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>a9d0aec -
feat: add PreviewData and ChatTurnResponse pydantic models
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>e1e8953 -
refactor: convert AgentDef from dataclass to Pydantic BaseModel
b20b4ef -
refactor: add ToolConfig pydantic model, replace tool_config dicts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>cdccbe3 -
feat: add memory recall/remember, planning, and collaboration to Flow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>923cd86 -
feat: remove raw history, add Memory to CrewOrchestrator
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>a79f922 -
refactor: migrate tools to BaseTool subclasses with args_schema
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1db1a69 -
refactor: extract derive_part_name, remove dead code from prompts.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>44c1e10 -
fix: address code review findings from Flow refactor
- Guard AgentResponse.from_agent() with descriptive ValueError for unknown IDs - Fix _run_single_agent_crew to handle CrewAI pydantic output correctly - Replace _format_response with AgentResponse in error path - Add test for GENERATORS_ONLY Flow path Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>9ff7a7c -
refactor: wire AgentDispatchFlow, remove RoutingEngine
Replace the inline Crew construction in CrewOrchestrator._run_crew with AgentDispatchFlow.kickoff(), remove the RoutingEngine class and its module-level singletons, and update MockChatBackend + all tests to use route_agents from agent_flow.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>b70c3c9 -
feat: add AgentDispatchFlow with router-gated agent dispatch
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>39c4d96 -
feat: add agent_flow models, routing, and readiness helpers
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>dd37dce -
fix: ask agent confirm now correctly updates plan card fields
askAgentForField() and confirmRecommendation() both called sendMessage() which triggered a backend round-trip. The crew orchestrator blindly reset phase from "planning" to "exploring" and cleared the plan on any message, destroying the plan state before the auto-fill could take effect. - Add plan_context flag through the full backend chain so plan-field queries preserve the planning phase - confirmRecommendation() now updates locally instead of sending to backend, preventing the phase reset that broke auto-fill - sendMessage() accepts options param to pass planContext flag Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>cfa0cbb -
feat: add notes field to DesignPlan and field_agents config
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>e43a92b -
fix: include geometry stats in CrewOrchestrator preview to prevent toFixed crash
CrewOrchestrator was hardcoding execution as {"success": True} without volume_mm3, bounding_box_mm, face_count, or edge_count. The frontend's updateGeoStats() called .toFixed() on undefined, crashing the 3D viewer. Extract geometry metadata from the CadQuery shape and add a null guard in the frontend for safety. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>8742594 -
fix: prevent question card loop when agent mentions keywords as context
- Add finish category to _is_category_satisfied (checks constraints for surface finish entries) - Add anti-loop protection: skip cards for categories whose keywords appear in the user's current message (they just answered it) - Pass user_message through to generate_question_cards in both crew and fallback paths Fixes: CNC agent mentioning "surface finish" and "Ra" in NOT READY context text caused the gap analyzer to repeatedly show a finish card even after the user answered it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>e65e6f8 -
feat: integrate gap analyzer into orchestrator, update CNC/CAM NOT READY prompts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>15c16a0 -
feat: add gap analyzer with analyze_gaps() and generate_question_cards()
Implements the gap analyzer module that scans agent NOT READY: responses, classifies missing design info into categories, deduplicates across agents, and generates structured question cards filtered against current design state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>523f06c -
fix: path traversal in model endpoints, XSS in plan card, remove dead code
- Validate model file names against safe character regex and resolve path to prevent directory traversal in all /api/models/ endpoints - Escape HTML in plan card and wizard review to prevent XSS from agent responses containing markup - Remove duplicate _is_plan_trigger check in _run_crew (dead code, already handled in chat_turn) - Use Literal type for DesignState.phase field to catch invalid states Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>d35c03c -
feat: include threemf_url in preview response
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>737682f -
feat: add planning phase branching to CrewOrchestrator
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>ae64dca -
feat: add DesignPlan model, compute_score(), phase/plan fields to DesignState
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>eb89dca -
refactor: eliminate all Serializer classes, use Pydantic model_dump() directly
- Delete core/serializers.py entirely - Remove CAMResultSerializer from core/cam.py - ExecutionResult uses Field(serialization_alias=...) + model_dump(by_alias=True) - CNCValidationResult uses @computed_field for error_count/warning_count - All callers updated: .model_dump() replaces Serializer.to_dict() - 196 tests passing, zero Serializer references remain Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>2330e12 -
refactor: typed Pydantic config + Pydantic result models, eliminate dict access
- Replace all dict[str, Any] config fields with typed Pydantic sub-models (ServerConfig, PathsConfig, BackendsConfig, OrchestrationConfig, ValidationConfig, ExportConfig, CAMConfig, AgentConfig, RoutingConfig) - Convert ExecutionResult, CNCValidationResult, CNCIssue, CAMResult from dataclasses to Pydantic BaseModel with to_api_dict() methods - Simplify serializers to thin wrappers calling to_api_dict() - Update all 8 consumer files from dict bracket/get access to attribute access - 197 tests passing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>e660ef7
-
fix: remove unused AGENTS import from orchestrator
cee4242 -
refactor: remove SingleCallOrchestrator, unify all backends through CrewAI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>65c5308 -
fix: remove unused json import from crew_orchestrator
2f6c69b -
feat(crewai): rewrite orchestrator with native LLM, tools, structured output
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>455ecfa -
feat(tools): add generate_gcode_tool, store last shape on execution
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>7ac569f -
feat(cam): integrate CAM generation into orchestrator pipeline
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>01e29f9 -
fix: increase max_tokens to 8192, improve retry for truncated code
SyntaxError from truncated LLM output now triggers a rewrite-from-scratch retry prompt instead of trying to patch incomplete code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>f39bf92 -
feat: add confirm/revise buttons to agent recommendations
Agent messages now show CONFIRM and REVISE buttons. Confirming sends the recommendation as a decision that updates the design state. Revising pre-fills the input with context for the user to edit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>0b9dfdd -
fix: surface LLM backend errors to user instead of silent fallback
Previously, LLM failures silently returned canned messages in a loop. Now the actual error is shown so users can diagnose API key or backend issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>e74a008 -
feat: agents build on each other's responses in sequential chain
CrewAI sequential process already passes earlier outputs to later tasks. Updated task descriptions so agents explicitly reference, agree/disagree, and build on teammates' input. CAD agent reviews full team discussion before deciding whether to generate. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>d5d5b46 -
feat: agents clarify before acting, CAD agent gates on sufficient specs
Orchestrator now evaluates request clarity first and directs agents to ask domain-specific questions when details are missing. CAD agent only generates code when shape, dimensions, and features are established — otherwise responds with what info is still needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>3eba5ca -
feat: add CrewAI CadQuery tools — execute_cad_tool, validate_cad_tool
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>9304064 -
feat: complete LLM adapter — enable function calling, add vision support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>46a70e8 -
refactor: CrewOrchestrator inherits BaseOrchestrator, uses RoutingEngine + BackendFactory + settings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>ed1ba8c -
refactor: orchestrators inherit BaseOrchestrator, use RoutingEngine
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>43fc71d -
refactor: move extract_decisions into DesignState.update_from_messages, config-drive domain data
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>133a491 -
refactor: load agent definitions from config.yaml
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a26fb14 -
feat: add BaseOrchestrator ABC
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>249942d