feat: Implement Agentic Architecture for robust session workflows

Phase 1 - Session Bootstrap:
- Add .claude/ATOMIZER_CONTEXT.md as single entry point for new sessions
- Add study state detection and task routing

Phase 2 - Code Deduplication:
- Add optimization_engine/base_runner.py (ConfigDrivenRunner)
- Add optimization_engine/generic_surrogate.py (ConfigDrivenSurrogate)
- Add optimization_engine/study_state.py for study detection
- Add optimization_engine/templates/ with registry and templates
- Studies now require ~50 lines instead of ~300

Phase 3 - Skill Consolidation:
- Add YAML frontmatter metadata to all skills (versioning, dependencies)
- Consolidate create-study.md into core/study-creation-core.md
- Update 00_BOOTSTRAP.md, 01_CHEATSHEET.md, 02_CONTEXT_LOADER.md

Phase 4 - Self-Expanding Knowledge:
- Add optimization_engine/auto_doc.py for auto-generating documentation
- Generate docs/generated/EXTRACTORS.md (27 extractors documented)
- Generate docs/generated/TEMPLATES.md (6 templates)
- Generate docs/generated/EXTRACTOR_CHEATSHEET.md

Phase 5 - Subagent Implementation:
- Add .claude/commands/study-builder.md (create studies)
- Add .claude/commands/nx-expert.md (NX Open API)
- Add .claude/commands/protocol-auditor.md (config validation)
- Add .claude/commands/results-analyzer.md (results analysis)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Antoine
2025-12-07 14:52:25 -05:00
parent 6cf12d9344
commit 0e04457539
22 changed files with 4708 additions and 2212 deletions

View File

@@ -1,6 +1,16 @@
---
skill_id: SKILL_000
version: 2.0
last_updated: 2025-12-07
type: bootstrap
code_dependencies: []
requires_skills: []
---
# Atomizer LLM Bootstrap
**Version**: 1.0
**Version**: 2.0
**Updated**: 2025-12-07
**Purpose**: First file any LLM session reads. Provides instant orientation and task routing.
---
@@ -61,7 +71,7 @@ User Request
| User Intent | Keywords | Protocol | Skill to Load | Privilege |
|-------------|----------|----------|---------------|-----------|
| Create study | "new", "set up", "create", "optimize" | OP_01 | **create-study-wizard.md** | user |
| Create study | "new", "set up", "create", "optimize" | OP_01 | **core/study-creation-core.md** | user |
| Run optimization | "start", "run", "execute", "begin" | OP_02 | - | user |
| Monitor progress | "status", "progress", "trials", "check" | OP_03 | - | user |
| Analyze results | "results", "best", "compare", "pareto" | OP_04 | - | user |
@@ -107,15 +117,14 @@ See `02_CONTEXT_LOADER.md` for complete loading rules.
**Quick Reference**:
```
CREATE_STUDY → create-study-wizard.md (PRIMARY)
Use: from optimization_engine.study_wizard import StudyWizard, create_study
→ modules/extractors-catalog.md (if asks about extractors)
CREATE_STUDY → core/study-creation-core.md (PRIMARY)
SYS_12_EXTRACTOR_LIBRARY.md (extractor reference)
→ modules/zernike-optimization.md (if telescope/mirror)
→ modules/neural-acceleration.md (if >50 trials)
RUN_OPTIMIZATION → OP_02_RUN_OPTIMIZATION.md
→ SYS_10_IMSO.md (if adaptive)
→ SYS_13_DASHBOARD_TRACKING.md (if monitoring)
→ SYS_15_METHOD_SELECTOR.md (method recommendation)
→ SYS_14_NEURAL_ACCELERATION.md (if neural/turbo)
DEBUG → OP_06_TROUBLESHOOT.md
→ Relevant SYS_* based on error type

View File

@@ -1,6 +1,19 @@
---
skill_id: SKILL_001
version: 2.0
last_updated: 2025-12-07
type: reference
code_dependencies:
- optimization_engine/extractors/__init__.py
- optimization_engine/method_selector.py
requires_skills:
- SKILL_000
---
# Atomizer Quick Reference Cheatsheet
**Version**: 1.0
**Version**: 2.0
**Updated**: 2025-12-07
**Purpose**: Rapid lookup for common operations. "I want X → Use Y"
---

View File

@@ -1,6 +1,17 @@
---
skill_id: SKILL_002
version: 2.0
last_updated: 2025-12-07
type: loader
code_dependencies: []
requires_skills:
- SKILL_000
---
# Atomizer Context Loader
**Version**: 1.0
**Version**: 2.0
**Updated**: 2025-12-07
**Purpose**: Define what documentation to load based on task type. Ensures LLM sessions have exactly the context needed.
---
@@ -22,26 +33,29 @@
**Always Load**:
```
.claude/skills/core/study-creation-core.md
.claude/skills/core/study-creation-core.md (SKILL_CORE_001)
```
**Load If**:
| Condition | Load |
|-----------|------|
| User asks about extractors | `modules/extractors-catalog.md` |
| User asks about extractors | `docs/protocols/system/SYS_12_EXTRACTOR_LIBRARY.md` |
| Telescope/mirror/optics mentioned | `modules/zernike-optimization.md` |
| >50 trials OR "neural" OR "surrogate" | `modules/neural-acceleration.md` |
| >50 trials OR "neural" OR "surrogate" | `docs/protocols/system/SYS_14_NEURAL_ACCELERATION.md` |
| Multi-objective (2+ goals) | `docs/protocols/system/SYS_11_MULTI_OBJECTIVE.md` |
| Method selection needed | `docs/protocols/system/SYS_15_METHOD_SELECTOR.md` |
**Example Context Stack**:
```
# Simple bracket optimization
core/study-creation-core.md
SYS_12_EXTRACTOR_LIBRARY.md
# Mirror optimization with neural acceleration
core/study-creation-core.md
modules/zernike-optimization.md
modules/neural-acceleration.md
SYS_14_NEURAL_ACCELERATION.md
SYS_15_METHOD_SELECTOR.md
```
---
@@ -254,9 +268,10 @@ Load Stack:
User: "I need to optimize my M1 mirror's wavefront error with 200 trials"
Load Stack:
1. core/study-creation-core.md # Core study creation
2. modules/zernike-optimization.md # Zernike-specific patterns
3. modules/neural-acceleration.md # Neural acceleration for 200 trials
1. core/study-creation-core.md # Core study creation
2. modules/zernike-optimization.md # Zernike-specific patterns
3. SYS_14_NEURAL_ACCELERATION.md # Neural acceleration for 200 trials
4. SYS_15_METHOD_SELECTOR.md # Method recommendation
```
### Example 3: Multi-Objective Structural
@@ -281,8 +296,8 @@ Load Stack:
User: "I need to extract thermal gradients from my results"
Load Stack:
1. EXT_01_CREATE_EXTRACTOR.md # Extractor creation guide
2. modules/extractors-catalog.md # Reference existing patterns
1. EXT_01_CREATE_EXTRACTOR.md # Extractor creation guide
2. SYS_12_EXTRACTOR_LIBRARY.md # Reference existing patterns
```
---

View File

@@ -1,7 +1,20 @@
---
skill_id: SKILL_CORE_001
version: 2.4
last_updated: 2025-12-07
type: core
code_dependencies:
- optimization_engine/base_runner.py
- optimization_engine/extractors/__init__.py
- optimization_engine/templates/registry.json
requires_skills: []
replaces: create-study.md
---
# Study Creation Core Skill
**Last Updated**: December 6, 2025
**Version**: 2.3 - Added Model Introspection
**Version**: 2.4
**Updated**: 2025-12-07
**Type**: Core Skill
You are helping the user create a complete Atomizer optimization study from a natural language description.

File diff suppressed because it is too large Load Diff