c122803fad
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>
135 lines
4.5 KiB
Markdown
135 lines
4.5 KiB
Markdown
---
|
|
phase: 10-workflow-modularization
|
|
plan: 01
|
|
type: execute
|
|
wave: 1
|
|
depends_on: []
|
|
files_modified: [n8n-workflow.json]
|
|
autonomous: true
|
|
|
|
must_haves:
|
|
truths:
|
|
- "Workflow has no orphan nodes visible in n8n canvas"
|
|
- "All existing functionality still works after cleanup"
|
|
- "Workflow node count reduced by 8"
|
|
artifacts:
|
|
- path: "n8n-workflow.json"
|
|
provides: "Cleaned workflow without orphan nodes"
|
|
contains: "Telegram Trigger"
|
|
key_links:
|
|
- from: "Telegram Trigger"
|
|
to: "All action paths"
|
|
via: "No broken connections"
|
|
pattern: "connections.*main"
|
|
---
|
|
|
|
<objective>
|
|
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.
|
|
</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-workflow-modularization/10-RESEARCH.md
|
|
@n8n-workflow.json
|
|
</context>
|
|
|
|
<tasks>
|
|
|
|
<task type="auto">
|
|
<name>Task 1: Identify and document orphan nodes</name>
|
|
<files>n8n-workflow.json</files>
|
|
<action>
|
|
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.)
|
|
</action>
|
|
<verify>Create a list of all 8 orphan nodes with their positions and types</verify>
|
|
<done>All 8 orphan nodes identified and documented</done>
|
|
</task>
|
|
|
|
<task type="auto">
|
|
<name>Task 2: Remove orphan nodes and deploy</name>
|
|
<files>n8n-workflow.json</files>
|
|
<action>
|
|
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)
|
|
</action>
|
|
<verify>
|
|
- `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
|
|
</verify>
|
|
<done>8 orphan nodes removed, workflow deployed, core functionality verified working</done>
|
|
</task>
|
|
|
|
</tasks>
|
|
|
|
<verification>
|
|
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 <name>) still work
|
|
</verification>
|
|
|
|
<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>
|
|
|
|
<output>
|
|
After completion, create `.planning/phases/10-workflow-modularization/10-01-SUMMARY.md`
|
|
</output>
|