feat: Major update with validators, skills, dashboard, and docs reorganization

- Add validation framework (config, model, results, study validators)
- Add Claude Code skills (create-study, run-optimization, generate-report,
  troubleshoot, analyze-model)
- Add Atomizer Dashboard (React frontend + FastAPI backend)
- Reorganize docs into structured directories (00-09)
- Add neural surrogate modules and training infrastructure
- Add multi-objective optimization support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-25 19:23:58 -05:00
parent 74a92803b7
commit e3bdb08a22
155 changed files with 52729 additions and 37 deletions

View File

@@ -1,7 +1,7 @@
# Create Optimization Study Skill
**Last Updated**: November 24, 2025
**Version**: 1.0 - Complete Study Scaffolding
**Last Updated**: November 25, 2025
**Version**: 1.1 - Complete Study Scaffolding with Validator Integration
You are helping the user create a complete Atomizer optimization study from a natural language description.
@@ -18,6 +18,8 @@ Guide the user through an interactive conversation to:
A complete Atomizer study has this structure:
**CRITICAL**: All study files, including README.md and results, MUST be located within the study directory. NEVER create study documentation at the project root.
```
studies/{study_name}/
├── 1_setup/
@@ -33,7 +35,7 @@ studies/{study_name}/
│ └── [various analysis files]
├── run_optimization.py # YOU GENERATE THIS
├── reset_study.py # YOU GENERATE THIS
├── README.md # YOU GENERATE THIS
├── README.md # YOU GENERATE THIS (INSIDE study directory!)
└── NX_FILE_MODIFICATIONS_REQUIRED.md # YOU GENERATE THIS (if needed)
```
@@ -275,6 +277,10 @@ except Exception as e:
### 5. README.md
**CRITICAL: ALWAYS place README.md INSIDE the study directory at `studies/{study_name}/README.md`**
Never create study documentation at the project root. All study-specific documentation must be centralized within the study directory structure.
Comprehensive documentation including:
- Engineering scenario and context
- Problem statement with real-world constraints
@@ -289,6 +295,7 @@ Comprehensive documentation including:
- Comparison with other studies
- Technical notes
**Location**: `studies/{study_name}/README.md` (NOT at project root)
**Template**: Use [studies/drone_gimbal_arm_optimization/README.md](../studies/drone_gimbal_arm_optimization/README.md:1) as reference
### 6. NX_FILE_MODIFICATIONS_REQUIRED.md (if needed)
@@ -441,6 +448,91 @@ Extractors: extract_solid_stress, extract_displacement
Multi-Solution: No (static only)
```
## Validation Integration
After generating files, always validate the study setup using the validator system:
### Config Validation
```python
from optimization_engine.validators import validate_config_file
result = validate_config_file("studies/{study_name}/1_setup/optimization_config.json")
if result.is_valid:
print("[OK] Configuration is valid!")
else:
for error in result.errors:
print(f"[ERROR] {error}")
```
### Model Validation
```python
from optimization_engine.validators import validate_study_model
result = validate_study_model("{study_name}")
if result.is_valid:
print(f"[OK] Model files valid!")
print(f" Part: {result.prt_file.name}")
print(f" Simulation: {result.sim_file.name}")
else:
for error in result.errors:
print(f"[ERROR] {error}")
```
### Complete Study Validation
```python
from optimization_engine.validators import validate_study
result = validate_study("{study_name}")
print(result) # Shows complete health check
```
### Validation Checklist for Generated Studies
Before declaring a study complete, ensure:
1. **Config Validation Passes**:
- All design variables have valid bounds (min < max)
- All objectives have proper extraction methods
- All constraints have thresholds defined
- Protocol matches objective count
2. **Model Files Ready** (user must provide):
- Part file (.prt) exists in model directory
- Simulation file (.sim) exists
- FEM file (.fem) will be auto-generated
3. **Run Script Works**:
- Test with `python run_optimization.py --trials 1`
- Verify imports resolve correctly
- Verify NX solver can be reached
### Automated Pre-Flight Check
Add this to run_optimization.py:
```python
def preflight_check():
"""Validate study setup before running."""
from optimization_engine.validators import validate_study
result = validate_study(STUDY_NAME)
if not result.is_ready_to_run:
print("[X] Study validation failed!")
print(result)
sys.exit(1)
print("[OK] Pre-flight check passed!")
return True
if __name__ == "__main__":
preflight_check()
# ... rest of optimization
```
## Critical Reminders
### Multi-Objective Return Format