Skip to content

feat: standard names pipeline, DD tools improvement, dot-notation support - #32

Merged
Simon-McIntosh merged 5 commits into
iterorganization:mainfrom
Simon-McIntosh:pr/v5.2.0
Apr 9, 2026
Merged

feat: standard names pipeline, DD tools improvement, dot-notation support#32
Simon-McIntosh merged 5 commits into
iterorganization:mainfrom
Simon-McIntosh:pr/v5.2.0

Conversation

@Simon-McIntosh

Copy link
Copy Markdown
Collaborator

Summary

This PR brings three major feature areas validated through comprehensive A/B testing against production.

Standard Names Pipeline

  • LLM-backed composition pipeline with source extraction plugins for DD paths and facility signals
  • Cross-model review, benchmarking, and publish commands
  • CLI interface: imas-codex sn compose/review/benchmark/publish
  • New cross-domain StandardName schema bridging DD and facility signals
  • HAS_STANDARD_NAME relationship for schema compliance

DD Tools Improvement (A/B tested against production)

Based on systematic A/B testing of all 17 DD tools vs 11 production tools:

  • search_dd_paths: Semantic cluster results alongside path matches (3× more token-efficient than prod)
  • check_dd_paths: Fuzzy typo suggestions via PathFuzzyMatcher (fixed swapped constructor args)
  • get_dd_overview: Physics domain aggregation, lifecycle stats, rich IDS descriptions
  • get_ids_structure: Graph-backed COCOS fields, semantic clusters, identifiers, coordinate arrays (4KB vs prod's 20KB)
  • Renamed internal _imas_ tool methods to _dd_ convention
  • Added format_cocos_fields_report and format_dd_changelog_report formatters
  • Fixed server.py method name mismatches for cocos and error field tools

Dot-Notation Support with Natural Language Safety

  • normalize_imas_path() converts core_profiles.profiles_1d.electrons.temperature to slash notation
  • _looks_like_path() guard rejects natural language (e.g., B0., eV.s, version strings)
  • Strips annotations before checking: handles equilibrium.time_slice(itime).profiles_1d.psi
  • Space-separated multi-path input correctly splits before normalizing
  • 65 regression tests covering all edge cases

A/B Test Results

DD server average: 8.6/10 vs production: 5.5/10 (unique value to frontend LLMs)

Tool DD Prod Winner
search_dd_paths 9 7 DD
check_dd_paths 8 5 DD
get_dd_overview 9 5 DD
get_ids_structure 10 4 DD
get_dd_cocos_fields 10 DD unique
get_dd_migration_guide 10 DD unique
search_dd_clusters 9 DD unique
find_related_dd_paths 9 5 DD

Commits

  1. feat: Standard names pipeline with cross-domain schema
  2. docs: Standard names implementation plans and research
  3. feat: Improve DD tools with fuzzy matching, dot-notation, and graph-backed structure
  4. test: 65 regression tests for dot-notation normalization
  5. docs: Update agent guidelines for fork-based workflow

Add LLM-backed standard name composition pipeline:
- Source extraction plugins for DD paths and facility signals
- Compose workers with structured LLM output via Pydantic models
- Cross-model review, benchmarking, and publish commands
- CLI interface (imas-codex sn compose/review/benchmark/publish)
- Pipeline state machine with graph-backed persistence

Extract StandardName to dedicated cross-domain schema:
- New imas_codex/schemas/standard_name.yaml bridges DD and facility
- StandardName, StandardNameSource enum, StandardNameReviewStatus enum
- HAS_STANDARD_NAME relationship declared for schema compliance
- Both IMASNode and FacilitySignal can reference StandardName
Add implementation plans for standard names pipeline phases:
- Plans 09-14: LLM compose, pipeline fixes, publish validation,
  rich compose, catalog import, MCP tools benchmark
- Research documents: implementation review, archived plans
- Superseded plans preserved for reference
…acked structure

Improve 4 poorest-performing DD tools based on A/B testing:
- search_dd_paths: add semantic cluster results alongside path matches
- check_dd_paths: add fuzzy typo suggestions via PathFuzzyMatcher
- get_dd_overview: physics domain aggregation, lifecycle stats, IDS descriptions
- get_ids_structure: graph-backed COCOS fields, semantic clusters, identifiers,
  coordinate arrays — 4KB vs prod's 20KB for equivalent information

Rename internal _imas_ tool methods to _dd_ convention for DD-specific functions.
Recover ~470 lines of search intelligence lost during rename commit.

Add dot-notation normalization with natural-language safety guard:
- _looks_like_path() rejects NL text (e.g., 'B0.', 'eV.s', version strings)
- Strips annotations before checking (handles 'equilibrium.time_slice(itime)')
- Space-separated multi-path input correctly splits before normalizing

Fix PathFuzzyMatcher: swap constructor arguments from (paths, ids_names)
to correct order (ids_names, paths) — was silently treating 20K paths as
IDS names and 87 IDS names as paths.

Add format_cocos_fields_report and format_dd_changelog_report formatters.
Fix server.py method name mismatches for cocos and error field tools.
Comprehensive test coverage for path normalization safety:
- TestLooksLikePath: validates guard rejects NL text, versions, units
- TestNormalizeImasPathDotNotation: dot-to-slash conversion cases
- TestNormalizeImasPathAnnotations: bracket/parenthesis stripping
- TestNormalizeImasPathEdgeCases: empty, no-dots, already-slash paths
- TestNormalizePaths: space-separated, comma-separated, JSON array,
  mixed notation inputs
Align git sync discipline with fork-based development workflow.
Clarify push targets: origin (fork) for daily work, upstream via PR only.
@Simon-McIntosh
Simon-McIntosh merged commit 902ec26 into iterorganization:main Apr 9, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant