Files
unraid-docker-manager/.planning/phases/10.1-aggressive-workflow-modularization/10.1-06-PLAN.md
T
Lucas Berger 1337f89114 docs(10.1): create gap closure plan for verification gaps
Phase 10.1 verification found 3 gaps:
- Gap 1: Node count 168 vs 115-125 target (needs user decision)
- Gap 2: Code node analysis incomplete (documentation task)
- Gap 3: Sub-workflow contracts not documented (documentation task)

Plan 10.1-06 addresses gaps with:
- Task 1: Document all 6 sub-workflow input/output contracts
- Task 2: Classify all 62 Code nodes by purpose
- Task 3: User decision checkpoint on node count approach

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 09:03:57 -05:00

8.3 KiB

phase, plan, type, wave, depends_on, files_modified, autonomous, gap_closure, must_haves
phase plan type wave depends_on files_modified autonomous gap_closure must_haves
10.1-aggressive-workflow-modularization 06 execute 1
.planning/phases/10.1-aggressive-workflow-modularization/10.1-SUB-WORKFLOW-CONTRACTS.md
.planning/phases/10.1-aggressive-workflow-modularization/10.1-CODE-NODE-ANALYSIS.md
false true
truths artifacts key_links
All sub-workflow input/output contracts are documented
Code nodes are categorized as orchestration vs domain logic
User has made decision on node count gap closure approach
path provides
.planning/phases/10.1-aggressive-workflow-modularization/10.1-SUB-WORKFLOW-CONTRACTS.md Input/output contract documentation for all 6 sub-workflows
path provides
.planning/phases/10.1-aggressive-workflow-modularization/10.1-CODE-NODE-ANALYSIS.md Classification of 62 Code nodes by purpose
Close verification gaps from Phase 10.1 by documenting sub-workflow contracts, analyzing Code nodes, and obtaining user decision on node count gap.

Purpose: VERIFICATION.md identified 3 gaps - this plan addresses Gap 2 (Code node analysis incomplete), Gap 3 (contract consistency uncertain), and presents options for Gap 1 (node count target not met).

Output: Documentation artifacts and user decision on whether to proceed with additional extraction or accept current state.

<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.1-aggressive-workflow-modularization/10.1-VERIFICATION.md @.planning/phases/10.1-aggressive-workflow-modularization/10.1-01-domain-analysis.md @n8n-workflow.json @n8n-batch-ui.json @n8n-status.json @n8n-confirmation.json @n8n-update.json @n8n-actions.json @n8n-logs.json Task 1: Document Sub-workflow Input/Output Contracts .planning/phases/10.1-aggressive-workflow-modularization/10.1-SUB-WORKFLOW-CONTRACTS.md Create comprehensive documentation of input/output contracts for all 6 sub-workflows by inspecting:
  1. Each sub-workflow's Execute Workflow Trigger node (input fields)
  2. Each sub-workflow's terminal nodes (output structure)
  3. Main workflow's Prepare* nodes that build inputs for Execute Workflow calls
  4. Main workflow's Route* nodes that handle sub-workflow outputs

Document for each sub-workflow:

  • Input contract: All expected fields, types, and which are required vs optional
  • Output contract: The action field values and associated data fields
  • Caller nodes: Which Execute Workflow nodes in main workflow call this sub-workflow
  • Prepare nodes: Which Code nodes prepare the input data

Sub-workflows to document:

  1. n8n-update.json (Container Update) - ID: 7AvTzLtKXM2hZTio92_mC
  2. n8n-actions.json (Container Actions) - ID: fYSZS5PkH0VSEaT5
  3. n8n-logs.json (Container Logs) - ID: oE7aO2GhbksXDEIw
  4. n8n-batch-ui.json (Batch UI) - ID: ZJhnGzJT26UUmW45
  5. n8n-status.json (Container Status) - ID: lqpg2CqesnKE2RJQ
  6. n8n-confirmation.json (Confirmation Dialogs) - ID: fZ1hu8eiovkCk08G

Format as markdown with tables showing field name, type, required, and description. File exists at .planning/phases/10.1-aggressive-workflow-modularization/10.1-SUB-WORKFLOW-CONTRACTS.md with documented contracts for all 6 sub-workflows All 6 sub-workflows have documented input/output contracts with field-level detail

Task 2: Analyze and Classify Code Nodes .planning/phases/10.1-aggressive-workflow-modularization/10.1-CODE-NODE-ANALYSIS.md Analyze all 62 Code nodes in the main workflow and classify each as one of:
  1. ORCHESTRATION - Must stay in main workflow

    • Prepare* nodes that build sub-workflow inputs
    • Route/Handle nodes that process sub-workflow outputs
    • Parse* nodes that interpret user input for routing
  2. PRESENTATION - Locked to main per Telegram decision

    • Build* nodes that construct Telegram messages/keyboards
    • Format* nodes that prepare display data
  3. DOMAIN_LOGIC - Potentially extractable

    • Match* nodes (container matching logic)
    • Find* nodes (search/filter logic)
    • Check* nodes with business logic (not routing switches)
  4. HYBRID - Partially extractable

    • Nodes that mix orchestration with domain logic

Create table with columns:

  • Node name
  • Category (ORCHESTRATION/PRESENTATION/DOMAIN_LOGIC/HYBRID)
  • Rationale (why this classification)
  • Extraction potential (YES/NO/PARTIAL with explanation)

Summarize:

  • Count by category
  • Total extractable nodes (DOMAIN_LOGIC + partial HYBRID)
  • Estimated node reduction if extracted File exists at .planning/phases/10.1-aggressive-workflow-modularization/10.1-CODE-NODE-ANALYSIS.md with all 62 Code nodes classified All 62 Code nodes classified with extraction potential assessment
How to address Gap 1 (node count: 168 current vs 115-125 target)? Phase 10.1 reduced main workflow from 192 to 168 nodes (12.5% reduction) through extraction of: - Batch UI (16 nodes in sub-workflow) - Container Status (11 nodes in sub-workflow) - Confirmation Dialogs (16 nodes in sub-workflow)

The 115-125 target assumed extracting 4 domains, but Matching/Disambiguation was deferred.

Analysis shows:

  • 18 Matching/Disambiguation nodes exist in main workflow
  • Extracting could reduce by ~10-15 nodes (net after integration overhead)
  • Would bring main to ~153-158 nodes (still 30+ nodes above 115-125 target)
  • Reaching 115-125 would require reconsidering the locked decision about Telegram responses staying in main workflow

The verification also notes:

  • UAT passed with all functionality working
  • 13/16 must-haves verified
  • MOD-01 and MOD-02 requirements satisfied Accept Current State - Phase functionally complete (UAT passed) - 12.5% reduction achieved (192 -> 168) - 6 sub-workflows deployed and working - Requirements MOD-01/MOD-02 satisfied - Can move on to Phase 10.2/11 - Gap 1 remains unresolved - Original 115-125 target not met - Matching logic remains in main workflow Extract Matching Domain - Addresses Matching extraction that was deferred - ~10-15 node reduction (168 -> ~153-158) - Cleaner separation of concerns - Matching logic reusable if needed elsewhere - Still won't reach 115-125 target - Additional integration complexity - More Execute Workflow nodes needed - Diminishing returns on effort Revisit Telegram Decision - Could achieve 115-125 target - Maximum modularization - Single response handler pattern - Reverses locked architectural decision - Significant refactoring effort - Adds complexity to sub-workflow contracts - Risk of breaking working system Select: option-a (accept), option-b (extract matching), or option-c (revisit telegram)
- [ ] SUB-WORKFLOW-CONTRACTS.md documents all 6 sub-workflows - [ ] CODE-NODE-ANALYSIS.md classifies all 62 Code nodes - [ ] User has selected gap closure approach - [ ] If option-b selected, plan 10.1-07 will be created for Matching extraction

<success_criteria>

  1. Gap 3 closed: Sub-workflow contracts documented with field-level detail
  2. Gap 2 closed: Code nodes analyzed and classified
  3. Gap 1 addressed: User decision recorded on approach </success_criteria>
After completion, create `.planning/phases/10.1-aggressive-workflow-modularization/10.1-06-SUMMARY.md`

If user selects option-b, additional gap closure plan 10.1-07 will be needed for Matching domain extraction.