Update WSL setup guide: remove WSL1, add virtualization and .wslconfig#79
Conversation
- Add 4 new domains to schema: cost, foundation, structures, analysis - Create 3 demonstration scripts showing lattice capabilities: - Simple 3-project bootstrap - Aircraft development workflow (FEA example) - Multi-domain program bootstrap - Add validation utility for checking lattice structure - Add comprehensive documentation for demonstrations - All scripts use das_service account and support cleanup
- Change from /api/namespace/simple to /api/namespaces/released - Update namespace parsing to handle direct array response
Knowledge links require target projects to be published, but demo projects are in draft state. Commented out for now.
- Add visualize_lattice.py: Generates interactive Cytoscape.js HTML visualization - Add execute_workflow.py: Step-by-step workflow execution with mock workbenches - Mock workbenches perform calculations (FEA adds loads, cost estimates, etc.) - Interactive mode for step-by-step demonstration - Update documentation with visualization and execution instructions
- Single command runs full demonstration workflow - Creates lattice, validates, visualizes, executes workflow, cleans up - Perfect for customer demonstrations - Update documentation with quick start guide
…and scripts folder reorganization
Complete implementation of Pre-Milestone A demonstrator with: Core Capabilities: - Program bootstrapper: Rule-based lattice generation from requirements - Real-time event bus: Actual pub/sub for live event delivery - Live visualization: Grid layout (L0-L3 vertical, domains horizontal) - Mock analyses: Computational work simulation with realistic timing - Mock Gray System: Continuous sensitivity analysis simulation - Mock X-layer: Evolutionary exploration simulation Living System Features: - Projects as computational cells (not data stores) - Autonomous decision-making with explicit decision points - Continuous processing with state transitions - Event-driven responsiveness and cascading updates - Real-time visualization showing system 'breathing' - Decision support with actionable insights Demonstrates SDD Vision: - Self-assembling enterprise from intent - Projects process, decide, and evolve autonomously - Coordinated organism behavior - Event-driven architecture - Proactive analysis (Gray System) - Evolutionary improvement (X-layer) Usage: python scripts/demo/run_living_lattice_demo.py
- Complete implementation summary - Usage instructions - Learning outcomes - Integration path to ODRAS - Files structure overview
- Added 'project_level' to SQL queries in DatabaseService for better project categorization. - Updated Living Lattice demo script to handle non-interactive mode more gracefully. - Improved error handling in LatticeWebSocketServer for fetching and sending initial data. - Adjusted visualization server to better manage WebSocket connections and errors. - Enhanced lattice visualization with inferred project levels and improved layout handling. - Rate-limited event logging to prevent excessive duplicate entries and refined project state management.
- Introduced a new canvas legend for better visualization of project levels and data flow. - Removed the previous static legend to enhance layout and positioning. - Styled the legend for improved aesthetics and usability.
- Introduced a debug button to display LLM context and mock generation details. - Implemented a new method to show mock debug information when no LLM context is available. - Enhanced user experience by allowing users to view generated structure and analysis summary in a debug panel. - The debug button is conditionally displayed based on the generation context.
- Deleted the LLM Debug Service script to streamline the demo. - Updated README to include a management script for starting, stopping, and monitoring demo services. - Added detailed instructions for service dependencies and ports to improve user experience.
- Added detailed guidelines for calculating a real confidence level (0.0-1.0) based on analysis quality. - Specified criteria for evaluating input data quality, requirements clarity, analysis completeness, and data availability. - Emphasized the importance of deriving confidence from actual analysis rather than using default values. - Updated response format to include a detailed confidence reasoning explanation.
…use virtual environment Python
…dd .wslconfig configuration
There was a problem hiding this comment.
Pull Request Overview
This PR updates the WSL setup guide and adds a comprehensive demo system for the ODRAS living lattice visualization. The main changes include:
- Removed WSL1 instructions and CMMC compliance sections from documentation
- Added virtualization enablement and .wslconfig configuration to WSL setup guide
- Added complete demo infrastructure including visualization server, LLM service, and mock simulation systems
- Introduced new dependencies (flask, flask-cors) for the demo LLM service
Reviewed Changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 29 comments.
Show a summary per file
| File | Description |
|---|---|
| requirements.txt | Added Flask and Flask-CORS dependencies for demo LLM service |
| scripts/simple_external_worker.py | New external task worker for script execution with Camunda integration |
| scripts/run_external_task_worker.py | Runner script for starting the external task worker |
| scripts/demo/visualization_server.py | WebSocket server for real-time lattice visualization |
| scripts/demo/test_demo_simple.py | Simple test script to verify demo components |
| scripts/demo/static/lattice_demo.js | JavaScript visualization client with Cytoscape integration |
| scripts/demo/static/lattice_demo.html | HTML interface for lattice visualization |
| scripts/demo/static/lattice_demo.css | Styling for lattice demo interface |
| scripts/demo/static/intelligent_lattice_demo.html | HTML for intelligent lattice generator interface |
| scripts/demo/static/intelligent_lattice.js | JavaScript for LLM-powered lattice generation |
| scripts/demo/start_demo.sh | Bash script to start demo servers |
| scripts/demo/start_complete_demo.sh | Complete demo startup with ODRAS validation |
| scripts/demo/run_living_lattice_demo.py | Main orchestrator for living lattice demonstration |
| scripts/demo/program_bootstrapper.py | Rule-based program lattice bootstrapping from requirements |
| scripts/demo/mock_x_layer.py | Simulation of X-layer evolutionary exploration |
| scripts/demo/mock_llm_generator.py | Mock LLM for project generation without OpenAI |
| scripts/demo/mock_gray_system.py | Simulation of Gray System sensitivity analysis |
| scripts/demo/mock_analyses.py | Mock analysis functions for project processing |
| scripts/demo/llm_service.py | Flask service for LLM-powered project lattice generation |
Comments suppressed due to low confidence (2)
backend/services/db.py:290
- Variable parent_domain is not used.
parent_domain = result["domain"]
backend/services/db.py:57
- 'except' clause does nothing but pass and there is no explanatory comment.
except Exception:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if os.path.exists(".env"): | ||
| with open(".env") as f: | ||
| for line in f: | ||
| if line.startswith("OPENAI_API_KEY=") and not "your-openai" in line: |
There was a problem hiding this comment.
Use 'not in' instead of 'not ... in' for consistency with Python style. Change to and 'your-openai' not in line.
| if line.startswith("OPENAI_API_KEY=") and not "your-openai" in line: | |
| if line.startswith("OPENAI_API_KEY=") and 'your-openai' not in line: |
| path = getattr(websocket, 'path', '') | ||
| await self.handle_websocket(websocket, path) |
There was a problem hiding this comment.
The path parameter is extracted but then passed to handle_websocket, which also has websocket.path available. Consider simplifying by removing the path parameter if it's redundant, or document why this indirection is necessary.
| path = getattr(websocket, 'path', '') | |
| await self.handle_websocket(websocket, path) | |
| await self.handle_websocket(websocket) |
| findEventSubscribers(eventType, sourceId) { | ||
| // Mock subscription logic | ||
| const subscribers = []; | ||
|
|
||
| this.cy.nodes().forEach(node => { | ||
| const nodeId = node.id(); | ||
| const level = node.data('level'); | ||
| const domain = node.data('domain'); | ||
|
|
||
| // Children of source project | ||
| if (node.data('parent') === sourceId) { | ||
| subscribers.push(nodeId); | ||
| } | ||
|
|
||
| // Cross-domain subscriptions based on event type | ||
| if (eventType.includes('requirements') && level > 1) { | ||
| subscribers.push(nodeId); | ||
| } else if (eventType.includes('scenarios') && domain.includes('analysis')) { | ||
| subscribers.push(nodeId); | ||
| } else if (eventType.includes('constraints') && level === 3) { | ||
| subscribers.push(nodeId); | ||
| } | ||
| }); | ||
|
|
||
| return subscribers; | ||
| } |
There was a problem hiding this comment.
The function findEventSubscribers is defined twice (lines 605 and 952). This duplicate definition will cause the second one to override the first, which may lead to unexpected behavior. Remove one of the duplicate definitions.
| findEventSubscribers(eventType, sourceId) { | |
| // Mock subscription logic | |
| const subscribers = []; | |
| this.cy.nodes().forEach(node => { | |
| const nodeId = node.id(); | |
| const level = node.data('level'); | |
| const domain = node.data('domain'); | |
| // Children of source project | |
| if (node.data('parent') === sourceId) { | |
| subscribers.push(nodeId); | |
| } | |
| // Cross-domain subscriptions based on event type | |
| if (eventType.includes('requirements') && level > 1) { | |
| subscribers.push(nodeId); | |
| } else if (eventType.includes('scenarios') && domain.includes('analysis')) { | |
| subscribers.push(nodeId); | |
| } else if (eventType.includes('constraints') && level === 3) { | |
| subscribers.push(nodeId); | |
| } | |
| }); | |
| return subscribers; | |
| } |
| - Lower confidence (0.60-0.71): Vague requirements, missing upstream data, incomplete analysis | ||
| - Low confidence (0.50-0.59): Very unclear requirements, no upstream data, minimal analysis possible |
There was a problem hiding this comment.
The confidence ranges have overlapping boundaries (e.g., 0.71 appears to be both the upper bound of 'Lower confidence' and potentially part of 'Medium confidence'). Use consistent, non-overlapping ranges like 0.60-0.70 and 0.50-0.59 to avoid ambiguity.
| # Update HTML file with correct WebSocket URL | ||
| sed -i "s|ws://localhost:8081|ws://localhost:$WS_PORT|g" static/lattice_demo.html |
There was a problem hiding this comment.
Using sed -i to modify HTML files in-place during runtime can cause issues if the script is run multiple times or if the original WebSocket URL is already modified. Consider restoring the file from a template or checking if the replacement is necessary before applying it.
| # Update HTML file with correct WebSocket URL | |
| sed -i "s|ws://localhost:8081|ws://localhost:$WS_PORT|g" static/lattice_demo.html | |
| # Restore HTML file from template and update with correct WebSocket URL | |
| cp static/lattice_demo.html.template static/lattice_demo.html | |
| sed -i "s|__WS_URL__|ws://localhost:$WS_PORT|g" static/lattice_demo.html |
| """ | ||
|
|
||
| import sys | ||
| import time |
There was a problem hiding this comment.
Import of 'time' is not used.
| import time |
| deleted += 1 | ||
| if deleted % 10 == 0: | ||
| print(f" Deleted {deleted} projects...") | ||
| except: |
There was a problem hiding this comment.
Except block directly handles BaseException.
| except: | |
| except Exception: |
| try: | ||
| response = requests.get(f"{camunda_url}/engine", timeout=5) | ||
| return response.status_code == 200 | ||
| except: |
There was a problem hiding this comment.
Except block directly handles BaseException.
| deleted += 1 | ||
| if deleted % 10 == 0: | ||
| print(f" Deleted {deleted} projects...") | ||
| except: |
There was a problem hiding this comment.
'except' clause does nothing but pass and there is no explanatory comment.
| json_str = line.replace("📋 BPMN_RESULT:", "").strip() | ||
| script_result = json.loads(json_str) | ||
| break | ||
| except json.JSONDecodeError: |
There was a problem hiding this comment.
'except' clause does nothing but pass and there is no explanatory comment.
Updates WSL Windows Setup Guide: