feat: Add DevLoop automation and HTML Reports
## DevLoop - Closed-Loop Development System - Orchestrator for plan → build → test → analyze cycle - Gemini planning via OpenCode CLI - Claude implementation via CLI bridge - Playwright browser testing integration - Test runner with API, filesystem, and browser tests - Persistent state in .devloop/ directory - CLI tool: tools/devloop_cli.py Usage: python tools/devloop_cli.py start 'Create new feature' python tools/devloop_cli.py plan 'Fix bug in X' python tools/devloop_cli.py test --study support_arm python tools/devloop_cli.py browser --level full ## HTML Reports (optimization_engine/reporting/) - Interactive Plotly-based reports - Convergence plot, Pareto front, parallel coordinates - Parameter importance analysis - Self-contained HTML (offline-capable) - Tailwind CSS styling ## Playwright E2E Tests - Home page tests - Test results in test-results/ ## LAC Knowledge Base Updates - Session insights (failures, workarounds, patterns) - Optimization memory for arm support study
This commit is contained in:
@@ -9,3 +9,11 @@
|
||||
{"timestamp": "2026-01-01T21:06:37.877252", "category": "failure", "context": "V13 optimization had 45 FEA failures (34% failure rate)", "insight": "rib_thickness parameter has CAD geometry constraint at ~9mm. All trials with rib_thickness > 9.0 failed. Set max to 9.0 (was 12.0). This is a critical CAD constraint not documented anywhere - the NX model geometry breaks with thicker radial ribs.", "confidence": 0.95, "tags": ["m1_mirror", "cad_constraint", "rib_thickness", "V13", "parameter_bounds"]}
|
||||
{"timestamp": "2026-01-06T11:00:00.000000", "category": "failure", "context": "flat_back_final study failed at journal line 1042. params.exp contained '[mm]description=Best design from V10...' which is not a valid NX expression.", "insight": "CONFIG DATA LEAKAGE INTO EXPRESSIONS: When config contains a 'starting_design' section with documentation fields like 'description', these string values get passed to NX as expressions if not filtered. The fix is to check isinstance(value, (int, float)) before adding to expressions dict. NEVER blindly iterate config dictionaries and pass to NX - always filter by type. The journal failed because NX cannot create an expression named 'description' with a string value.", "confidence": 1.0, "tags": ["nx", "expressions", "config", "starting_design", "type-filtering", "journal-failure"]}
|
||||
{"timestamp": "2026-01-13T11:00:00.000000", "category": "failure", "context": "Created m1_mirror_flatback_lateral study without README.md despite: (1) OP_01 protocol requiring it, (2) PRIOR LAC FAILURE entry from 2025-12-17 documenting same mistake", "insight": "REPEATED FAILURE - DID NOT LEARN FROM LAC: This exact failure was documented on 2025-12-17 with clear remediation (use TodoWrite to track ALL required outputs). Yet I repeated the same mistake. ROOT CAUSE: Did not read failure.jsonl at session start as required by CLAUDE.md initialization steps. The CLAUDE.md explicitly says MANDATORY: Read knowledge_base/lac/session_insights/failure.jsonl. I skipped this step. FIX: Actually follow the initialization protocol. When creating studies, the checklist MUST include README.md and I must verify its creation before declaring the study complete.", "confidence": 1.0, "tags": ["study-creation", "readme", "repeated-failure", "lac-not-read", "session-initialization", "process-discipline"], "severity": "critical", "rule": "At session start, ACTUALLY READ failure.jsonl as mandated. When creating studies, use TodoWrite with explicit README.md item and verify completion."}
|
||||
{"timestamp": "2026-01-22T13:27:00", "category": "failure", "context": "DevLoop end-to-end test of support_arm study - NX solver failed to load geometry parts", "insight": "NX SOLVER PART LOADING: When running FEA on a new study, the NX journal may fail with NoneType error when trying to load geometry/idealized parts. The issue is that Parts.Open() returns a tuple (part, status) but the code expects just the part. Also need to ensure the part paths are absolute. Fix: Check return tuple and use absolute paths for part loading.", "confidence": 0.9, "tags": ["nx", "solver", "part-loading", "devloop", "support_arm"], "severity": "high"}
|
||||
{"timestamp": "2026-01-22T13:37:05.354753", "category": "failure", "context": "Importing extractors from optimization_engine.extractors", "insight": "extract_displacement and extract_mass_from_bdf were not exported in __init__.py __all__ list. Always verify new extractors are added to both imports AND __all__ exports.", "confidence": 0.95, "tags": ["extractors", "imports", "python"]}
|
||||
{"timestamp": "2026-01-22T13:37:05.357090", "category": "failure", "context": "NX solver failing to load geometry parts in solve_simulation.py", "insight": "Parts.Open() can return (None, status) instead of (part, status). Must check if loaded_part is not None before accessing .Name attribute. Fixed around line 852 in solve_simulation.py.", "confidence": 0.95, "tags": ["nx", "solver", "parts", "null-check"]}
|
||||
{"timestamp": "2026-01-22T13:37:05.357090", "category": "failure", "context": "Nastran solve failing with memory allocation error", "insight": "Nastran may request large memory (28GB+) and fail if not available. Check support_arm_sim1-solution_1.log for memory error code 12. May need to configure memory limits in Nastran or close other applications.", "confidence": 0.8, "tags": ["nastran", "memory", "solver", "error"]}
|
||||
{"timestamp": "2026-01-22T15:12:01.584128", "category": "failure", "context": "DevLoop closed-loop development system", "insight": "DevLoop was built but NOT used in this session. Claude defaulted to manual debugging instead of using devloop_cli.py. Need to make DevLoop the default workflow for any multi-step task. Add reminder in CLAUDE.md to use DevLoop for any task with 3+ steps.", "confidence": 0.95, "tags": ["devloop", "process", "automation", "workflow"]}
|
||||
{"timestamp": "2026-01-22T15:23:37.040324", "category": "failure", "context": "NXSolver initialization with license_server parameter", "insight": "NXSolver does NOT have license_server in __init__. It reads from SPLM_LICENSE_SERVER env var. Set os.environ before creating solver.", "confidence": 1.0, "tags": ["nxsolver", "license", "config", "gotcha"]}
|
||||
{"timestamp": "2026-01-22T21:00:03.480993", "category": "failure", "context": "Stage 3 arm baseline test: stress=641.8 MPa vs limit=82.5 MPa", "insight": "Stage 3 arm baseline design has stress 641.8 MPa, far exceeding 30%% Al yield (82.5 MPa). Either the constraint is too restrictive for this geometry, or design needs significant thickening. Consider relaxing constraint to 200 MPa (73%% yield) like support_arm study, or find stiff/light designs.", "confidence": 0.9, "tags": ["stage3_arm", "stress_constraint", "infeasible_baseline"]}
|
||||
{"timestamp": "2026-01-22T21:10:37.955211", "category": "failure", "context": "Stage 3 arm optimization: 21 trials, 0 feasible (stress 600-680 MPa vs 200 MPa limit)", "insight": "Stage 3 arm geometry has INHERENT HIGH STRESS CONCENTRATIONS. Even 200 MPa (73%% yield) constraint is impossible to satisfy with current design variables (arm_thk, center_space, end_thk). All 21 trials showed stress 600-680 MPa regardless of parameters. This geometry needs: (1) stress-reducing features (fillets), (2) higher yield material, or (3) redesigned load paths. DO NOT use stress constraint <600 MPa for this geometry without redesign.", "confidence": 1.0, "tags": ["stage3_arm", "stress_constraint", "geometry_limitation", "infeasible"]}
|
||||
|
||||
Reference in New Issue
Block a user