Skip to content

Commit ed93bcd

Browse files
chore: delete the orphaned helper_nodes package, keeping its two corrections
langgraph_engine/helper_nodes/ held five modules and 538 lines that nothing imported. CLAUDE.md has described it as "scheduled for removal in a follow-up cleanup" since the subpackage migration; this is that cleanup. Closes item 3 of issue #296. "No importers" was not the whole justification, and checking further changed what this commit does. All nine of the package's public node functions are also defined in orchestrator.py -- the module create_flow_graph actually wires -- so this was an extraction that was begun and never finished, not a component that lost its callers. Both copies were last touched by the same commit (06b0463, the Level/Step rename), which had been maintaining them in lockstep. Comparing the two copies function by function found five character-identical and four divergent. The divergences are mostly the adaptations a deeper package needs -- parent.parent.parent instead of parent.parent, renamed module constants, different log tags -- but two of them are documentation corrections that exist ONLY in the orphaned copy, with the stale text in the live one: save_workflow_memory's comment named ~/.claude/memory/sessions/ while the code beneath it writes to memory/logs/sessions/. The comment contradicted the line it described. optimize_context_after_level1 said "Level 3" in a docstring line, a summary line and an inline comment. Level 3 stopped existing in 06b0463, which renamed it to Level 2. The orphan's docstring was updated by that rename; the live one's was not. Both are ported into orchestrator.py here, before the deletion rather than alongside it, so nothing is discarded that the live module lacked. Deleting the package first and noticing afterwards is how a fix disappears without anyone recording that it ever existed. The Quick Info counts move 253 -> 248 and 493 -> 488. That was not spotted by hand: tests/test_doc_counts_match_the_tree.py, merged one commit ago in #297, failed on the deletion and named both figures. It is the first thing that enforcement caught, and it caught it immediately. Verified: orchestrator imports and create_flow_graph(hook_mode=True) builds a graph, every test that touches the orchestrator passes, all six CI gates pass, test collection is clean, and no .py file anywhere still names helper_nodes. CHANGELOG.md, docs/orchestration_prompt.md and docs/architecture/ still refer to the package. The CHANGELOG entry and the architecture draft are point-in-time records; orchestration_prompt.md explicitly sequenced this removal as separate work, which is exactly what happened. Rewriting any of them would falsify the history rather than correct it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 1afcecf commit ed93bcd

8 files changed

Lines changed: 8 additions & 545 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
1111

1212
### Removed
1313

14+
- **`langgraph_engine/helper_nodes/` is deleted** (5 modules, 538 lines). All nine of its public node functions were also defined in `orchestrator.py`, which is the module the graph actually wires, and nothing imported the package -- it was an extraction that was started and never completed. Two documentation corrections existed **only** in the orphaned copy and were ported to `orchestrator.py` before the deletion rather than discarded with it: `save_workflow_memory`'s comment named `~/.claude/memory/sessions/` while its code writes to `memory/logs/sessions/`, and `optimize_context_after_level1` still said "Level 3" in three places, a level that stopped existing in the `06b0463` rename. The live module had the stale text in both cases.
15+
1416
- **Step 1 no longer decomposes or executes the prompt it emits** (fb7bbaa). Phase 2 ran `todo_decomposer` to split the orchestration prompt into a TODO list and `orchestrator_agent_caller` once per TODO, each a nested `claude -p` subprocess. Both re-derived work that belongs elsewhere: the master template's STEP 13 already produces the MULTI-AGENT PROMPT BUNDLE, and the node runs inside a hook subprocess, so it cannot execute in the session it is serving -- it can only hand that session something to run. `orchestrator_result` now records what was emitted (`mode`, `prompt_chars`, `template_source`, `library_version`) rather than what was executed. An empty dict would have satisfied the contracts equally well, but `flow_trace_converter` and `decision_explainer` both read the field to build reports, and handing them a hollow value to keep a postcondition green is how a trace starts lying about what happened.
1517
- **The three Step 1 Phase 2 scripts are deleted** (c1d1d47): `todo_decomposer.py`, `todo_executor.py`, `orchestrator_agent_caller.py`, together with `tests/test_todo_decomposition.py` (27 tests, which imported them directly and covered nothing else). They had no caller after fb7bbaa. Dead code that still looks live is worse than absent code -- the next reader would have found three plausible scripts describing an execution model the pipeline no longer has.
1618
- **Four FlowState fields dropped** (e59a271): `todo_list`, `todo_results`, `completed_todos`, `current_todo_index`. With the scripts gone they had neither a writer nor a reader anywhere in the engine. `completed_todos` additionally declared an `_merge_lists` parallel-write reducer for a value no node produces.

‎CLAUDE.md‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Claude Workflow Engine is a 3-level LangGraph-based orchestration pipeline for a
2020
| **Status** | Active Development |
2121
| **Primary Location** | langgraph_engine/ |
2222
| **MCP Servers** | 13 servers -- all in separate repos under [techdeveloper-org](https://github.com/orgs/techdeveloper-org/repositories); 1 also keeps an in-engine copy in `src/mcp/` |
23-
| **Total Python Files** | 253 (langgraph_engine/); 493 repo-wide |
23+
| **Total Python Files** | 248 (langgraph_engine/); 488 repo-wide |
2424
| **Test Files** | 100 (91 unit, 5 integration, 3 e2e, 1 load) |
2525
| **Call Graph** | 578 classes, 3,985 methods, 4 languages (Python/Java/TS/Kotlin) |
2626

@@ -141,7 +141,7 @@ Level 2: SDLC Execution Core (9 active steps: Steps 0-8)
141141
| +-- project_session.py # Session utilities (imported by hook packages)
142142
| +-- policy_tracking_helper.py # Policy tracking (imported by hook packages)
143143
+-- langgraph_engine/ # Core orchestration engine (REPO ROOT -- sibling of scripts/, NOT nested under it)
144-
| +-- core/ state/ routing/ helper_nodes/ # LazyLoader/ErrorHandler, FlowState, routing, helper nodes
144+
| +-- core/ state/ routing/ # LazyLoader/ErrorHandler, FlowState, routing
145145
| +-- diagrams/ (+drawio/) parsers/ integrations/ # Strategy/Factory: UML gens, 4 lang parsers, GitHub/Jira/Figma/Jenkins
146146
| +-- analysis/ context/ engine_logging/ github/ metrics/ quality/ security/ skills/ standards/ # domain subpackages (v1.20 migration)
147147
| +-- build_dependency_resolver/ runtime_verification/ # build-dep parsers; node contracts + verifier
@@ -177,7 +177,6 @@ Level 2: SDLC Execution Core (9 active steps: Steps 0-8)
177177
| State Package | langgraph_engine/state/ | FlowState, StepKeys, reducers, WorkflowContextOptimizer |
178178
| Core Package | langgraph_engine/core/ | LazyLoader, get_logger, node_error_handler, NodeResult, create_step_node |
179179
| Routing Package | langgraph_engine/routing/ | All routing functions split by level |
180-
| Helper Nodes | langgraph_engine/helper_nodes/ | Orphaned package -- no live importers anywhere in the repo (confirmed by repo-wide grep); kept internally consistent but scheduled for removal in a follow-up cleanup |
181180
| Graph Factory | langgraph_engine/orchestrator.py | create_flow_graph(hook_mode): single canonical StateGraph factory (verify_node runtime-verification wrapping applied here) |
182181
| Diagrams Package | langgraph_engine/diagrams/ | Strategy Pattern: DiagramFactory + 13 generators |
183182
| Parsers Package | langgraph_engine/parsers/ | Abstract Factory: ParserRegistry + 4 language parsers |

‎langgraph_engine/helper_nodes/__init__.py‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎langgraph_engine/helper_nodes/context_helpers.py‎

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)