feat: Add Studio UI, intake system, and extractor improvements
Dashboard: - Add Studio page with drag-drop model upload and Claude chat - Add intake system for study creation workflow - Improve session manager and context builder - Add intake API routes and frontend components Optimization Engine: - Add CLI module for command-line operations - Add intake module for study preprocessing - Add validation module with gate checks - Improve Zernike extractor documentation - Update spec models with better validation - Enhance solve_simulation robustness Documentation: - Add ATOMIZER_STUDIO.md planning doc - Add ATOMIZER_UX_SYSTEM.md for UX patterns - Update extractor library docs - Add study-readme-generator skill Tools: - Add test scripts for extraction validation - Add Zernike recentering test Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
skill_id: SKILL_001
|
||||
version: 2.4
|
||||
last_updated: 2025-12-31
|
||||
version: 2.5
|
||||
last_updated: 2026-01-22
|
||||
type: reference
|
||||
code_dependencies:
|
||||
- optimization_engine/extractors/__init__.py
|
||||
@@ -14,8 +14,8 @@ requires_skills:
|
||||
|
||||
# Atomizer Quick Reference Cheatsheet
|
||||
|
||||
**Version**: 2.4
|
||||
**Updated**: 2025-12-31
|
||||
**Version**: 2.5
|
||||
**Updated**: 2026-01-22
|
||||
**Purpose**: Rapid lookup for common operations. "I want X → Use Y"
|
||||
|
||||
---
|
||||
@@ -37,6 +37,8 @@ requires_skills:
|
||||
| **Use SAT (Self-Aware Turbo)** | **SYS_16** | SAT v3 for high-efficiency neural-accelerated optimization |
|
||||
| Generate physics insight | SYS_17 | `python -m optimization_engine.insights generate <study>` |
|
||||
| **Manage knowledge/playbook** | **SYS_18** | `from optimization_engine.context import AtomizerPlaybook` |
|
||||
| **Automate dev tasks** | **DevLoop** | `python tools/devloop_cli.py start "task"` |
|
||||
| **Test dashboard UI** | **DevLoop** | `python tools/devloop_cli.py browser --level full` |
|
||||
|
||||
---
|
||||
|
||||
@@ -678,6 +680,67 @@ feedback.process_trial_result(
|
||||
|
||||
---
|
||||
|
||||
## DevLoop Quick Reference
|
||||
|
||||
Closed-loop development system using AI agents + Playwright testing.
|
||||
|
||||
### CLI Commands
|
||||
|
||||
| Task | Command |
|
||||
|------|---------|
|
||||
| Full dev cycle | `python tools/devloop_cli.py start "Create new study"` |
|
||||
| Plan only | `python tools/devloop_cli.py plan "Fix validation"` |
|
||||
| Implement plan | `python tools/devloop_cli.py implement` |
|
||||
| Test study files | `python tools/devloop_cli.py test --study support_arm` |
|
||||
| Analyze failures | `python tools/devloop_cli.py analyze` |
|
||||
| Browser smoke test | `python tools/devloop_cli.py browser` |
|
||||
| Browser full tests | `python tools/devloop_cli.py browser --level full` |
|
||||
| Check status | `python tools/devloop_cli.py status` |
|
||||
| Quick test | `python tools/devloop_cli.py quick` |
|
||||
|
||||
### Browser Test Levels
|
||||
|
||||
| Level | Description | Tests |
|
||||
|-------|-------------|-------|
|
||||
| `quick` | Smoke test (page loads) | 1 |
|
||||
| `home` | Home page verification | 2 |
|
||||
| `full` | All UI + study tests | 5+ |
|
||||
| `study` | Canvas/dashboard for specific study | 3 |
|
||||
|
||||
### State Files (`.devloop/`)
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `current_plan.json` | Current implementation plan |
|
||||
| `test_results.json` | Filesystem/API test results |
|
||||
| `browser_test_results.json` | Playwright test results |
|
||||
| `analysis.json` | Failure analysis |
|
||||
|
||||
### Prerequisites
|
||||
|
||||
```bash
|
||||
# Start backend
|
||||
cd atomizer-dashboard/backend && python -m uvicorn api.main:app --reload --port 8000
|
||||
|
||||
# Start frontend
|
||||
cd atomizer-dashboard/frontend && npm run dev
|
||||
|
||||
# Install Playwright (once)
|
||||
cd atomizer-dashboard/frontend && npx playwright install chromium
|
||||
```
|
||||
|
||||
### Standalone Playwright Tests
|
||||
|
||||
```bash
|
||||
cd atomizer-dashboard/frontend
|
||||
npm run test:e2e # Run all E2E tests
|
||||
npm run test:e2e:ui # Playwright UI mode
|
||||
```
|
||||
|
||||
**Full documentation**: `docs/guides/DEVLOOP.md`
|
||||
|
||||
---
|
||||
|
||||
## Report Generation Quick Reference (OP_08)
|
||||
|
||||
Generate comprehensive study reports from optimization data.
|
||||
|
||||
206
.claude/skills/modules/study-readme-generator.md
Normal file
206
.claude/skills/modules/study-readme-generator.md
Normal file
@@ -0,0 +1,206 @@
|
||||
# Study README Generator Skill
|
||||
|
||||
**Skill ID**: STUDY_README_GENERATOR
|
||||
**Version**: 1.0
|
||||
**Purpose**: Generate intelligent, context-aware README.md files for optimization studies
|
||||
|
||||
## When to Use
|
||||
|
||||
This skill is invoked automatically during the study intake workflow when:
|
||||
1. A study moves from `introspected` to `configured` status
|
||||
2. User explicitly requests README generation
|
||||
3. Finalizing a study from the inbox
|
||||
|
||||
## Input Context
|
||||
|
||||
The README generator receives:
|
||||
|
||||
```json
|
||||
{
|
||||
"study_name": "bracket_mass_opt_v1",
|
||||
"topic": "Brackets",
|
||||
"description": "User's description from intake form",
|
||||
"spec": { /* Full AtomizerSpec v2.0 */ },
|
||||
"introspection": {
|
||||
"expressions": [...],
|
||||
"mass_kg": 1.234,
|
||||
"solver_type": "NX_Nastran"
|
||||
},
|
||||
"context_files": {
|
||||
"goals.md": "User's goals markdown content",
|
||||
"notes.txt": "Any additional notes"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Output Format
|
||||
|
||||
Generate a README.md with these sections:
|
||||
|
||||
### 1. Title & Overview
|
||||
```markdown
|
||||
# {Study Name}
|
||||
|
||||
**Topic**: {Topic}
|
||||
**Created**: {Date}
|
||||
**Status**: {Status}
|
||||
|
||||
{One paragraph executive summary of the optimization goal}
|
||||
```
|
||||
|
||||
### 2. Engineering Problem
|
||||
```markdown
|
||||
## Engineering Problem
|
||||
|
||||
{Describe the physical problem being solved}
|
||||
|
||||
### Model Description
|
||||
- **Geometry**: {Describe the part/assembly}
|
||||
- **Material**: {If known from introspection}
|
||||
- **Baseline Mass**: {mass_kg} kg
|
||||
|
||||
### Loading Conditions
|
||||
{Describe loads and boundary conditions if available}
|
||||
```
|
||||
|
||||
### 3. Optimization Formulation
|
||||
```markdown
|
||||
## Optimization Formulation
|
||||
|
||||
### Design Variables ({count})
|
||||
| Variable | Expression | Range | Units |
|
||||
|----------|------------|-------|-------|
|
||||
| {name} | {expr_name} | [{min}, {max}] | {units} |
|
||||
|
||||
### Objectives ({count})
|
||||
| Objective | Direction | Weight | Source |
|
||||
|-----------|-----------|--------|--------|
|
||||
| {name} | {direction} | {weight} | {extractor} |
|
||||
|
||||
### Constraints ({count})
|
||||
| Constraint | Condition | Threshold | Type |
|
||||
|------------|-----------|-----------|------|
|
||||
| {name} | {operator} | {threshold} | {type} |
|
||||
```
|
||||
|
||||
### 4. Methodology
|
||||
```markdown
|
||||
## Methodology
|
||||
|
||||
### Algorithm
|
||||
- **Primary**: {algorithm_type}
|
||||
- **Max Trials**: {max_trials}
|
||||
- **Surrogate**: {if enabled}
|
||||
|
||||
### Physics Extraction
|
||||
{Describe extractors used}
|
||||
|
||||
### Convergence Criteria
|
||||
{Describe stopping conditions}
|
||||
```
|
||||
|
||||
### 5. Expected Outcomes
|
||||
```markdown
|
||||
## Expected Outcomes
|
||||
|
||||
Based on the optimization setup:
|
||||
- Expected improvement: {estimate if baseline available}
|
||||
- Key trade-offs: {identify from objectives/constraints}
|
||||
- Risk factors: {any warnings from validation}
|
||||
```
|
||||
|
||||
## Generation Guidelines
|
||||
|
||||
1. **Be Specific**: Use actual values from the spec, not placeholders
|
||||
2. **Be Concise**: Engineers don't want to read novels
|
||||
3. **Be Accurate**: Only state facts that can be verified from input
|
||||
4. **Be Helpful**: Include insights that aid understanding
|
||||
5. **No Fluff**: Avoid marketing language or excessive praise
|
||||
|
||||
## Claude Prompt Template
|
||||
|
||||
```
|
||||
You are generating a README.md for an FEA optimization study.
|
||||
|
||||
CONTEXT:
|
||||
{json_context}
|
||||
|
||||
RULES:
|
||||
1. Use the actual data provided - never use placeholder values
|
||||
2. Write in technical engineering language appropriate for structural engineers
|
||||
3. Keep each section concise but complete
|
||||
4. If information is missing, note it as "TBD" or skip the section
|
||||
5. Include physical units wherever applicable
|
||||
6. Format tables properly with alignment
|
||||
|
||||
Generate the README.md content:
|
||||
```
|
||||
|
||||
## Example Output
|
||||
|
||||
```markdown
|
||||
# Bracket Mass Optimization V1
|
||||
|
||||
**Topic**: Simple_Bracket
|
||||
**Created**: 2026-01-22
|
||||
**Status**: Configured
|
||||
|
||||
Optimize the mass of a structural L-bracket while maintaining stress below yield and displacement within tolerance.
|
||||
|
||||
## Engineering Problem
|
||||
|
||||
### Model Description
|
||||
- **Geometry**: L-shaped mounting bracket with web and flange
|
||||
- **Material**: Steel (assumed based on typical applications)
|
||||
- **Baseline Mass**: 0.847 kg
|
||||
|
||||
### Loading Conditions
|
||||
Static loading with force applied at mounting holes. Fixed constraints at base.
|
||||
|
||||
## Optimization Formulation
|
||||
|
||||
### Design Variables (3)
|
||||
| Variable | Expression | Range | Units |
|
||||
|----------|------------|-------|-------|
|
||||
| Web Thickness | web_thickness | [2.0, 10.0] | mm |
|
||||
| Flange Width | flange_width | [15.0, 40.0] | mm |
|
||||
| Fillet Radius | fillet_radius | [2.0, 8.0] | mm |
|
||||
|
||||
### Objectives (1)
|
||||
| Objective | Direction | Weight | Source |
|
||||
|-----------|-----------|--------|--------|
|
||||
| Total Mass | minimize | 1.0 | mass_extractor |
|
||||
|
||||
### Constraints (1)
|
||||
| Constraint | Condition | Threshold | Type |
|
||||
|------------|-----------|-----------|------|
|
||||
| Max Stress | <= | 250 MPa | hard |
|
||||
|
||||
## Methodology
|
||||
|
||||
### Algorithm
|
||||
- **Primary**: TPE (Tree-structured Parzen Estimator)
|
||||
- **Max Trials**: 100
|
||||
- **Surrogate**: Disabled
|
||||
|
||||
### Physics Extraction
|
||||
- Mass: Extracted from NX expression `total_mass`
|
||||
- Stress: Von Mises stress from SOL101 static analysis
|
||||
|
||||
### Convergence Criteria
|
||||
- Max trials: 100
|
||||
- Early stopping: 20 trials without improvement
|
||||
|
||||
## Expected Outcomes
|
||||
|
||||
Based on the optimization setup:
|
||||
- Expected improvement: 15-30% mass reduction (typical for thickness optimization)
|
||||
- Key trade-offs: Mass vs. stress margin
|
||||
- Risk factors: None identified
|
||||
```
|
||||
|
||||
## Integration Points
|
||||
|
||||
- **Backend**: `api/services/claude_readme.py` calls Claude API with this prompt
|
||||
- **Endpoint**: `POST /api/intake/{study_name}/readme`
|
||||
- **Trigger**: Automatic on status transition to `configured`
|
||||
Reference in New Issue
Block a user