docs: Add OP_08 report generation and update protocol numbering
- Add OP_08 to cheatsheet task lookup table - Create Report Generation section in cheatsheet - Update SYS_16/17/18 numbering (SAT, Insights, Context) - Create StatusBadge component for dashboard - Create OP_08_GENERATE_REPORT.md protocol document 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,10 +31,12 @@ requires_skills:
|
||||
| Export neural training data | OP_05 | `python run_optimization.py --export-training` |
|
||||
| Fix an error | OP_06 | Read error log → follow diagnostic tree |
|
||||
| **Free disk space** | **OP_07** | `archive_study.bat cleanup <study> --execute` |
|
||||
| **Generate report** | **OP_08** | `python -m optimization_engine.future.report_generator <study>` |
|
||||
| Add custom physics extractor | EXT_01 | Create in `optimization_engine/extractors/` |
|
||||
| Add lifecycle hook | EXT_02 | Create in `optimization_engine/plugins/` |
|
||||
| Generate physics insight | SYS_16 | `python -m optimization_engine.insights generate <study>` |
|
||||
| **Manage knowledge/playbook** | **SYS_17** | `from optimization_engine.context import AtomizerPlaybook` |
|
||||
| **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` |
|
||||
|
||||
---
|
||||
|
||||
@@ -384,12 +386,13 @@ Without it, `UpdateFemodel()` runs but the mesh doesn't change!
|
||||
| 13 | Dashboard | Real-time tracking and visualization |
|
||||
| 14 | Neural | Surrogate model acceleration |
|
||||
| 15 | Method Selector | Recommends optimization strategy |
|
||||
| 16 | Study Insights | Physics visualizations (Zernike, stress, modal) |
|
||||
| 17 | Context Engineering | ACE framework - self-improving knowledge system |
|
||||
| 16 | Self-Aware Turbo | SAT v3 - high-efficiency neural optimization |
|
||||
| 17 | Study Insights | Physics visualizations (Zernike, stress, modal) |
|
||||
| 18 | Context Engineering | ACE framework - self-improving knowledge system |
|
||||
|
||||
---
|
||||
|
||||
## Study Insights Quick Reference (SYS_16)
|
||||
## Study Insights Quick Reference (SYS_17)
|
||||
|
||||
Generate physics-focused visualizations from FEA results.
|
||||
|
||||
@@ -572,7 +575,7 @@ convert_custom_to_optuna(db_path, study_name)
|
||||
|
||||
---
|
||||
|
||||
## Context Engineering Quick Reference (SYS_17)
|
||||
## Context Engineering Quick Reference (SYS_18)
|
||||
|
||||
The ACE (Agentic Context Engineering) framework enables self-improving optimization through structured knowledge capture.
|
||||
|
||||
@@ -672,3 +675,42 @@ feedback.process_trial_result(
|
||||
| Context API | `http://localhost:5000/api/context` | Playbook management |
|
||||
|
||||
**Full documentation**: `docs/protocols/system/SYS_18_CONTEXT_ENGINEERING.md`
|
||||
|
||||
---
|
||||
|
||||
## Report Generation Quick Reference (OP_08)
|
||||
|
||||
Generate comprehensive study reports from optimization data.
|
||||
|
||||
### Quick Commands
|
||||
|
||||
| Task | Command |
|
||||
|------|---------|
|
||||
| Generate markdown report | `python -m optimization_engine.future.report_generator <study> --format markdown` |
|
||||
| Generate HTML report | `python -m optimization_engine.future.report_generator <study> --format html` |
|
||||
| Generate via API | `POST /api/optimization/studies/{study_id}/generate-report` |
|
||||
|
||||
### Python API
|
||||
|
||||
```python
|
||||
from optimization_engine.future.report_generator import generate_study_report
|
||||
from pathlib import Path
|
||||
|
||||
# Generate markdown report
|
||||
output = generate_study_report(
|
||||
study_dir=Path("studies/my_study"),
|
||||
output_format="markdown"
|
||||
)
|
||||
print(f"Report saved to: {output}")
|
||||
```
|
||||
|
||||
### Report Contents
|
||||
|
||||
| Section | Data Source |
|
||||
|---------|-------------|
|
||||
| Executive Summary | Calculated from trial stats |
|
||||
| Best Result | `study.db` best trial |
|
||||
| Top 5 Designs | Sorted by objective |
|
||||
| Optimization Progress | Trial history |
|
||||
|
||||
**Full details**: `docs/protocols/operations/OP_08_GENERATE_REPORT.md`
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
import React from 'react';
|
||||
import { CheckCircle, PauseCircle, StopCircle, PlayCircle, AlertCircle } from 'lucide-react';
|
||||
|
||||
export type OptimizationStatus = 'running' | 'paused' | 'stopped' | 'completed' | 'error' | 'not_started';
|
||||
|
||||
interface StatusBadgeProps {
|
||||
status: OptimizationStatus;
|
||||
showLabel?: boolean;
|
||||
size?: 'sm' | 'md' | 'lg';
|
||||
pulse?: boolean;
|
||||
}
|
||||
|
||||
const statusConfig = {
|
||||
running: {
|
||||
label: 'Running',
|
||||
icon: PlayCircle,
|
||||
dotClass: 'bg-green-500',
|
||||
textClass: 'text-green-400',
|
||||
bgClass: 'bg-green-500/10 border-green-500/30',
|
||||
},
|
||||
paused: {
|
||||
label: 'Paused',
|
||||
icon: PauseCircle,
|
||||
dotClass: 'bg-yellow-500',
|
||||
textClass: 'text-yellow-400',
|
||||
bgClass: 'bg-yellow-500/10 border-yellow-500/30',
|
||||
},
|
||||
stopped: {
|
||||
label: 'Stopped',
|
||||
icon: StopCircle,
|
||||
dotClass: 'bg-dark-500',
|
||||
textClass: 'text-dark-400',
|
||||
bgClass: 'bg-dark-700 border-dark-600',
|
||||
},
|
||||
completed: {
|
||||
label: 'Completed',
|
||||
icon: CheckCircle,
|
||||
dotClass: 'bg-primary-500',
|
||||
textClass: 'text-primary-400',
|
||||
bgClass: 'bg-primary-500/10 border-primary-500/30',
|
||||
},
|
||||
error: {
|
||||
label: 'Error',
|
||||
icon: AlertCircle,
|
||||
dotClass: 'bg-red-500',
|
||||
textClass: 'text-red-400',
|
||||
bgClass: 'bg-red-500/10 border-red-500/30',
|
||||
},
|
||||
not_started: {
|
||||
label: 'Not Started',
|
||||
icon: StopCircle,
|
||||
dotClass: 'bg-dark-600',
|
||||
textClass: 'text-dark-500',
|
||||
bgClass: 'bg-dark-800 border-dark-700',
|
||||
},
|
||||
};
|
||||
|
||||
const sizeConfig = {
|
||||
sm: { dot: 'w-2 h-2', text: 'text-xs', padding: 'px-2 py-0.5', icon: 'w-3 h-3' },
|
||||
md: { dot: 'w-3 h-3', text: 'text-sm', padding: 'px-3 py-1', icon: 'w-4 h-4' },
|
||||
lg: { dot: 'w-4 h-4', text: 'text-base', padding: 'px-4 py-2', icon: 'w-5 h-5' },
|
||||
};
|
||||
|
||||
export function StatusBadge({
|
||||
status,
|
||||
showLabel = true,
|
||||
size = 'md',
|
||||
pulse = true
|
||||
}: StatusBadgeProps) {
|
||||
const config = statusConfig[status];
|
||||
const sizes = sizeConfig[size];
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`inline-flex items-center gap-2 rounded-full border ${config.bgClass} ${sizes.padding}`}
|
||||
>
|
||||
<div
|
||||
className={`rounded-full ${config.dotClass} ${sizes.dot} ${
|
||||
pulse && status === 'running' ? 'animate-pulse' : ''
|
||||
}`}
|
||||
/>
|
||||
{showLabel && (
|
||||
<span className={`font-semibold uppercase tracking-wide ${config.textClass} ${sizes.text}`}>
|
||||
{config.label}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to determine status from process state
|
||||
*/
|
||||
export function getStatusFromProcess(
|
||||
isRunning: boolean,
|
||||
isPaused: boolean,
|
||||
completedTrials: number,
|
||||
totalTrials: number,
|
||||
hasError?: boolean
|
||||
): OptimizationStatus {
|
||||
if (hasError) return 'error';
|
||||
if (completedTrials >= totalTrials && totalTrials > 0) return 'completed';
|
||||
if (isPaused) return 'paused';
|
||||
if (isRunning) return 'running';
|
||||
if (completedTrials === 0) return 'not_started';
|
||||
return 'stopped';
|
||||
}
|
||||
|
||||
export default StatusBadge;
|
||||
Reference in New Issue
Block a user