Skip to content

Plan: move openhcs/core's 114 flat modules into packages - #1283

Open
trissim wants to merge 1 commit into
mainfrom
claude-a/core-package-plan
Open

trissim wants to merge 1 commit into
mainfrom
claude-a/core-package-plan

Conversation

@trissim

@trissim trissim commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

The plan for turning openhcs/core's 114 flat modules into packages. Nothing is applied: this PR adds one file, plans/core_package_plan_20261109.md.

Numbers

  • 114 flat modules in openhcs/core, beside 12 subpackages. The file-name prefixes are the missing packages: runtime_ 29, source_ 14, measurement_ 5, function_ 5.
  • The table assigns all 114, each exactly once (checked against the module list): 7 new packages (values, measurements, execution, sources, configuration, debugging, streaming) and 9 existing ones.
  • Biggest files are reference cycles: materialization/core.py has 49 of 57 class families (~4,470 of 5,101 lines) in one strongly connected component. Moving files doesn't change that; phase 2 does.

The catch it found

openhcs/serialization/pycodify_formatters.py:51 writes type(value).__module__ into every generated pipeline and config script. Saved scripts import core modules by path, so the batches that move serialized classes ship with a one-time tools/cutover/ rewrite of saved scripts, generated from the same table. No alias or re-export is left behind.

How it gets applied

Four NRA batches (one run and one test pass each), the same procedure that moved 103 agent-comms modules today: agent-comms 669acfa7, 553 files, about 3,450 import lines, 0 import failures. Then the prefix-dropping renames, then two guards: no new flat module in core, and the import direction between its packages.

🤖 Generated with Claude Code

https://claude.ai/code/session_016gZLdtUjVTc4WSHYkdJZRv

A destination for every flat module in core (7 new packages, 9 existing),
the four batches that apply it through NRA, the one-time rewrite saved
pipeline scripts need (they import classes by __module__), and the cycle
cores that block splitting the biggest files. Nothing is applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdtUjVTc4WSHYkdJZRv
Copilot AI balanced review requested due to automatic review settings November 9, 2026 16:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

This branch has not been deployed

No deployments
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.

2 participants