Phase 10.1: Aggressive Workflow Modularization - 5 plan(s) in 3 wave(s) - Wave 1: Foundation (rename files, analyze boundaries, user approval) - Wave 2: 3 parallel extractions (batch-ui, status, confirmation) - Wave 3: Integration verification and UAT - Ready for execution Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6.9 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | must_haves | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 10.1-aggressive-workflow-modularization | 03 | execute | 2 |
|
|
true |
|
Purpose: Remove ~10-15 nodes from main workflow by extracting the container list and status display domain. Output: New n8n-status.json sub-workflow, updated main workflow with list/status nodes extracted.
<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-CONTEXT.md @.planning/phases/10.1-aggressive-workflow-modularization/10.1-01-SUMMARY.md @n8n-workflow.json Task 1: Create n8n-status.json sub-workflow with extracted list/status nodes n8n-status.json (new) Create new sub-workflow containing container list and status display nodes.Input contract (Execute Workflow Trigger):
- chatId: number (required)
- messageId: number (optional, 0 for new message)
- action: string ('list' | 'status' | 'paginate')
- containerId: string (optional, for status action)
- containerName: string (optional, for status action)
- page: number (optional, for pagination, default 1)
- responseMode: string ('text' or 'callback')
Nodes to extract (list/pagination related):
- Docker List Containers, Docker List for Action, Docker List for Update
- Get Containers For List, Prepare List Fetch
- Build Container List Keyboard, Build Paginated List
- Edit Container List, Send Container List
- Answer List Callback
Also consider extracting status display nodes:
- Get Single Container, Check Single Container
- Build Container Submenu, Build Container Submenu Direct
- Send Container Submenu, Send Container Submenu Direct
- Prepare Container Fetch
Structure:
- Execute Workflow Trigger (entry point)
- Parse Input (validate action type)
- Switch on action type (list vs status vs paginate)
- For list: Query Docker, build paginated list keyboard
- For status: Get container details, build submenu
- Return structured result
Output contract:
{
success: true/false,
action: 'list|status|paginate',
// For list:
keyboard: {...},
text: "message text",
totalContainers: number,
currentPage: number,
totalPages: number,
// For status:
container: { id, name, state, image, ports },
keyboard: {...},
text: "container status text",
// Error:
error: "error message" || null
}
-
Remove extracted list/status nodes from main workflow
-
Add Execute Workflow node ("Execute Container Status"):
- Source: database
- WorkflowId: use TODO_DEPLOY_STATUS_WORKFLOW placeholder
- Mode: once
- waitForSubWorkflow: true
- Input: { chatId, messageId, action, containerId, containerName, page, responseMode }
-
Update routing in main workflow:
- Keyword Router should route "list" command to Execute Container Status with action='list'
- Route Callback should route list pagination callbacks (list:page:N) to Execute Container Status with action='paginate'
- Container selection callbacks should route to Execute Container Status with action='status'
-
Add result handler after Execute Container Status:
- If result has keyboard: send/edit Telegram message with keyboard
- If result has error: send error message
Note: This extraction may be smaller than batch UI. If analysis from 10.1-01 shows fewer than 8 nodes in this domain, consider whether extraction is worthwhile per the "don't extract 2-3 node groups" decision. If close to threshold, proceed with extraction for consistency.
- Main workflow has "Execute Container Status" node
- No list/pagination nodes remain in main workflow except routing
- TODO_DEPLOY_STATUS_WORKFLOW placeholder exists Main workflow updated with status nodes extracted and replaced by sub-workflow call.
-
Verify the extraction:
- Main workflow node count reduced by ~10-15 from previous state
- n8n-status.json exists with extracted nodes
- No orphan references
-
Commit the extraction:
git add n8n-workflow.json n8n-status.json n8n-workflow.json.backup-status git commit -m "feat(10.1-03): extract container status to sub-workflow - Created n8n-status.json with list and status display nodes - Handles container list, pagination, and single container status - Added TODO_DEPLOY_STATUS_WORKFLOW placeholder"
<success_criteria>
- New n8n-status.json sub-workflow created
- Main workflow reduced by ~10-15 additional nodes
- List and status display functionality extracted cleanly
- Backup created for rollback
- Changes committed to git </success_criteria>