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>
This commit is contained in:
Lucas Berger
2026-02-05 09:03:57 -05:00
parent 4d101a4299
commit 1337f89114
2 changed files with 225 additions and 8 deletions
@@ -0,0 +1,214 @@
---
phase: 10.1-aggressive-workflow-modularization
plan: 06
type: execute
wave: 1
depends_on: []
files_modified:
- .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
autonomous: false
gap_closure: true
must_haves:
truths:
- "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"
artifacts:
- path: ".planning/phases/10.1-aggressive-workflow-modularization/10.1-SUB-WORKFLOW-CONTRACTS.md"
provides: "Input/output contract documentation for all 6 sub-workflows"
- path: ".planning/phases/10.1-aggressive-workflow-modularization/10.1-CODE-NODE-ANALYSIS.md"
provides: "Classification of 62 Code nodes by purpose"
key_links: []
---
<objective>
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.
</objective>
<execution_context>
@/home/luc/.claude/get-shit-done/workflows/execute-plan.md
@/home/luc/.claude/get-shit-done/templates/summary.md
</execution_context>
<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
</context>
<tasks>
<task type="auto">
<name>Task 1: Document Sub-workflow Input/Output Contracts</name>
<files>.planning/phases/10.1-aggressive-workflow-modularization/10.1-SUB-WORKFLOW-CONTRACTS.md</files>
<action>
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.
</action>
<verify>File exists at .planning/phases/10.1-aggressive-workflow-modularization/10.1-SUB-WORKFLOW-CONTRACTS.md with documented contracts for all 6 sub-workflows</verify>
<done>All 6 sub-workflows have documented input/output contracts with field-level detail</done>
</task>
<task type="auto">
<name>Task 2: Analyze and Classify Code Nodes</name>
<files>.planning/phases/10.1-aggressive-workflow-modularization/10.1-CODE-NODE-ANALYSIS.md</files>
<action>
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
</action>
<verify>File exists at .planning/phases/10.1-aggressive-workflow-modularization/10.1-CODE-NODE-ANALYSIS.md with all 62 Code nodes classified</verify>
<done>All 62 Code nodes classified with extraction potential assessment</done>
</task>
<task type="checkpoint:decision" gate="blocking">
<decision>How to address Gap 1 (node count: 168 current vs 115-125 target)?</decision>
<context>
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
</context>
<options>
<option id="option-a">
<name>Accept Current State</name>
<pros>
- 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
</pros>
<cons>
- Gap 1 remains unresolved
- Original 115-125 target not met
- Matching logic remains in main workflow
</cons>
</option>
<option id="option-b">
<name>Extract Matching Domain</name>
<pros>
- Addresses Matching extraction that was deferred
- ~10-15 node reduction (168 -> ~153-158)
- Cleaner separation of concerns
- Matching logic reusable if needed elsewhere
</pros>
<cons>
- Still won't reach 115-125 target
- Additional integration complexity
- More Execute Workflow nodes needed
- Diminishing returns on effort
</cons>
</option>
<option id="option-c">
<name>Revisit Telegram Decision</name>
<pros>
- Could achieve 115-125 target
- Maximum modularization
- Single response handler pattern
</pros>
<cons>
- Reverses locked architectural decision
- Significant refactoring effort
- Adds complexity to sub-workflow contracts
- Risk of breaking working system
</cons>
</option>
</options>
<resume-signal>Select: option-a (accept), option-b (extract matching), or option-c (revisit telegram)</resume-signal>
</task>
</tasks>
<verification>
- [ ] 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
</verification>
<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>
<output>
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.
</output>