Files
unraid-docker-manager/.planning/phases/10-workflow-modularization/10-01-PLAN.md
T
Lucas Berger c122803fad docs(10): create phase plan for workflow modularization
Phase 10: Workflow Modularization
- 4 plan(s) in 3 wave(s)
- Wave 1: Orphan cleanup (1 plan)
- Wave 2: Sub-workflow extraction (2 plans parallel)
- Wave 3: Integration verification (1 plan)
- Ready for execution

Plans:
- 10-01: Remove 8 orphan nodes
- 10-02: Extract container-update sub-workflow (DEBT-03)
- 10-03: Extract container-actions sub-workflow
- 10-04: Integration verification with user checkpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:39:54 -05:00

4.5 KiB

phase, plan, type, wave, depends_on, files_modified, autonomous, must_haves
phase plan type wave depends_on files_modified autonomous must_haves
10-workflow-modularization 01 execute 1
n8n-workflow.json
true
truths artifacts key_links
Workflow has no orphan nodes visible in n8n canvas
All existing functionality still works after cleanup
Workflow node count reduced by 8
path provides contains
n8n-workflow.json Cleaned workflow without orphan nodes Telegram Trigger
from to via pattern
Telegram Trigger All action paths No broken connections connections.*main
Remove 8 orphan nodes from the n8n workflow before modularization work begins.

Purpose: Clean up vestigial nodes from workflow evolution to establish a clean baseline for modularization. Orphan nodes clutter the canvas and may cause confusion during sub-workflow extraction.

Output: Workflow JSON with orphan nodes removed, deployed and verified working.

<execution_context> @/home/luc/.claude/get-shit-done/workflows/execute-plan.md @/home/luc/.claude/get-shit-done/templates/summary.md </execution_context>

@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @.planning/phases/10-workflow-modularization/10-RESEARCH.md @n8n-workflow.json Task 1: Identify and document orphan nodes n8n-workflow.json Analyze the workflow to identify all orphan nodes - nodes with no incoming connections that are not triggers, and nodes with no outgoing connections that are not legitimate terminal nodes (like Telegram send messages).

Programmatic analysis has found at minimum:

  • "Answer Batch Exec" (position [1340, 900]) - httpRequest with no incoming connection
  • "Batch Loop" (position [3100, -500]) - splitInBatches with no connections

The user reports 8 total orphan nodes. Examine the workflow carefully to identify all 8:

  1. Search for nodes with no incoming connections that aren't triggers
  2. Search for nodes with no outgoing connections that aren't terminal nodes (Send/Edit messages)
  3. Check positions far from main flow (negative Y positions, isolated X positions)
  4. Look for vestigial nodes from prior development phases

Document each orphan with:

  • Node name
  • Node type
  • Position
  • Why it's orphaned (no connections, leftover from development, etc.) Create a list of all 8 orphan nodes with their positions and types All 8 orphan nodes identified and documented
Task 2: Remove orphan nodes and deploy n8n-workflow.json Remove all identified orphan nodes from n8n-workflow.json:
  1. For each orphan node:

    • Remove the node object from the "nodes" array
    • Remove any connection entries referencing the node from "connections" object
    • Note: Use the node "name" field to find connections, not "id"
  2. Verify JSON validity after removal:

    • Parse the JSON to confirm it's valid
    • Check that no connections reference removed nodes
  3. Deploy updated workflow to n8n:

    • Use n8n API to update the workflow
    • Verify workflow activates without errors
  4. Test core functionality still works:

    • Test /status command
    • Test container submenu navigation
    • Test at least one action (start/stop/restart)

Do NOT remove any nodes that:

  • Are triggers (Telegram Trigger)
  • Are legitimate terminal nodes (Send/Edit message nodes)
  • Have both incoming AND outgoing connections
  • Are part of the batch execution flow (even if appears orphaned, verify first)
  • python3 -c "import json; json.load(open('n8n-workflow.json'))" succeeds
  • Workflow deploys via n8n API without errors
  • /status command returns container list
  • At least one container action works 8 orphan nodes removed, workflow deployed, core functionality verified working
1. Workflow JSON is valid and parses without errors 2. n8n workflow is deployed and active 3. /status command shows container list inline keyboard 4. Container actions (start/stop/restart) work 5. Batch operations still function 6. Text commands (status, update ) still work

<success_criteria>

  • 8 orphan nodes removed from workflow
  • Node count reduced from 248 to ~240
  • All existing bot functionality works
  • Workflow ready for modularization </success_criteria>
After completion, create `.planning/phases/10-workflow-modularization/10-01-SUMMARY.md`