docs(05-01): complete NLU cleanup plan
Tasks completed: 2/2 - Task 1: Remove NLU/Claude nodes and add Keyword Router - Task 2: Add persistent Telegram menu SUMMARY: .planning/phases/05-polish-deploy/05-01-SUMMARY.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+17
-15
@@ -8,21 +8,21 @@
|
||||
## Current Position
|
||||
|
||||
- **Milestone:** v1.0 — Docker Control via Telegram
|
||||
- **Phase:** 4 of 5 — Logs (COMPLETE)
|
||||
- **Phase:** 5 of 5 — Polish & Deploy (IN PROGRESS)
|
||||
- **Plan:** 1 of 1 executed
|
||||
- **Status:** Phase 4 complete - ready for Phase 5
|
||||
- **Last activity:** 2026-01-31 - Removed NLU from scope, Phase 4 complete
|
||||
- **Status:** Phase 5 Plan 01 complete - NLU replaced with keyword routing
|
||||
- **Last activity:** 2026-02-01 - Completed 05-01-PLAN.md (NLU cleanup)
|
||||
|
||||
## Progress
|
||||
|
||||
```
|
||||
Phase 1: Foundation [██████████] Complete (2/2 plans)
|
||||
Phase 2: Docker Integration [██████████] Complete (2/2 plans)
|
||||
Phase 3: Container Actions [██████████] Complete (4/4 plans)
|
||||
Phase 4: Logs [██████████] Complete (1/1 plans)
|
||||
Phase 5: Polish & Deploy [░░░░░░░░░░] Not started
|
||||
Phase 1: Foundation [##########] Complete (2/2 plans)
|
||||
Phase 2: Docker Integration [##########] Complete (2/2 plans)
|
||||
Phase 3: Container Actions [##########] Complete (4/4 plans)
|
||||
Phase 4: Logs [##########] Complete (1/1 plans)
|
||||
Phase 5: Polish & Deploy [##########] Complete (1/1 plans)
|
||||
|
||||
Overall: [████████░░] 80%
|
||||
Overall: [##########] 100%
|
||||
```
|
||||
|
||||
## Recent Decisions
|
||||
@@ -56,21 +56,23 @@ Overall: [████████░░] 80%
|
||||
| Truncate at 3800 chars | Telegram limit is 4096, leave room for header and formatting | 2026-01-30 |
|
||||
| Remove NLU from v1.0 | Simple keyword matching sufficient, Claude API adds complexity | 2026-01-31 |
|
||||
| NLU cleanup in Phase 5 | Workflow has Claude nodes to remove; defer cleanup to polish phase | 2026-01-31 |
|
||||
| Keyword order matters | restart before start to avoid substring match issues | 2026-02-01 |
|
||||
| No emojis on buttons | Clean button text for reliable keyword matching | 2026-02-01 |
|
||||
|
||||
## Pending Todos
|
||||
|
||||
(None yet)
|
||||
(None)
|
||||
|
||||
## Blockers & Concerns
|
||||
|
||||
- **Workflow depends on Claude API** — Current workflow still routes through NLU nodes. Requires Anthropic API key to function. Phase 5 will remove this dependency.
|
||||
(None - Claude API dependency removed)
|
||||
|
||||
## Session Continuity
|
||||
|
||||
- **Last session:** 2026-01-31
|
||||
- **Stopped at:** Scope change - removed NLU from v1.0
|
||||
- **Next step:** Start Phase 5 (Polish & Deploy)
|
||||
- **Resume command:** `/gsd:plan-phase 5`
|
||||
- **Last session:** 2026-02-01
|
||||
- **Stopped at:** Completed 05-01-PLAN.md
|
||||
- **Next step:** v1.0 milestone complete - ready for deployment
|
||||
- **Resume command:** N/A - project complete
|
||||
|
||||
---
|
||||
*Auto-maintained by GSD workflow*
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
# Phase 5 Plan 01: NLU Cleanup Summary
|
||||
|
||||
**Replaced Claude/NLU with keyword-based routing and persistent Telegram menu buttons**
|
||||
|
||||
## Frontmatter
|
||||
|
||||
```yaml
|
||||
phase: 05-polish-deploy
|
||||
plan: 01
|
||||
subsystem: workflow-routing
|
||||
tags: [n8n, telegram, keyword-routing, menu]
|
||||
|
||||
dependency-graph:
|
||||
requires: [04-01]
|
||||
provides: [keyword-router, persistent-menu, nlu-removal]
|
||||
affects: []
|
||||
|
||||
tech-stack:
|
||||
added: []
|
||||
patterns: [keyword-switch-routing, telegram-reply-keyboard]
|
||||
|
||||
key-files:
|
||||
created: []
|
||||
modified: [n8n-workflow.json]
|
||||
|
||||
decisions:
|
||||
- keyword-order-matters: "restart before start to avoid substring match issues"
|
||||
- combined-tasks: "Task 1 and Task 2 merged for atomic workflow change"
|
||||
- no-emojis-on-buttons: "Clean button text for reliable keyword matching"
|
||||
|
||||
metrics:
|
||||
duration: 4m
|
||||
completed: 2026-02-01
|
||||
```
|
||||
|
||||
## What Changed
|
||||
|
||||
### Removed Nodes (NLU/Claude)
|
||||
- Prepare Claude Request
|
||||
- Claude Intent Parser (HTTP Request to api.anthropic.com)
|
||||
- Parse Intent (Code node)
|
||||
- Intent Router (Switch node)
|
||||
- Send Unknown Intent
|
||||
- Send Intent Error
|
||||
- Send Stats Placeholder
|
||||
- Format Echo / Send Echo
|
||||
|
||||
### Added/Modified Nodes
|
||||
|
||||
**Keyword Router** (renamed from Route Message)
|
||||
- 7 keyword rules with case-insensitive matching
|
||||
- Order: /start, status, restart, start, stop, update, logs
|
||||
- Fallback output connects to Show Menu
|
||||
|
||||
**Show Menu** (new HTTP Request node)
|
||||
- Sends persistent keyboard with 6 buttons
|
||||
- Layout: Status solo, then paired (Start/Stop, Restart/Update, Logs)
|
||||
- is_persistent: true, resize_keyboard: true
|
||||
|
||||
### Code Updates
|
||||
- Parse and Match: Works with keyword routing, extracts container from message
|
||||
- Parse Action Command: Parses action and container from message text
|
||||
- Match Container: References Parse Action Command instead of Parse Intent
|
||||
- Parse Logs Command: Parses container name and line count from message
|
||||
|
||||
## Commits
|
||||
|
||||
| Commit | Description |
|
||||
|--------|-------------|
|
||||
| a29f444 | feat(05-01): replace NLU/Claude with keyword routing |
|
||||
|
||||
## Verification Results
|
||||
|
||||
All checks passed:
|
||||
- Zero Claude/NLU nodes remain
|
||||
- Zero Anthropic API references in workflow
|
||||
- Keyword Router handles: /start, status, restart, start, stop, update, logs
|
||||
- Fallback routes to Show Menu
|
||||
- Persistent menu has 6 buttons with is_persistent: true
|
||||
- All keyword routes connect to correct handler nodes
|
||||
|
||||
## Deviations from Plan
|
||||
|
||||
### Combined Tasks
|
||||
Tasks 1 and 2 were executed as a single atomic change because:
|
||||
- Show Menu node required for Keyword Router fallback connection
|
||||
- Keyword Router updates and Show Menu creation are interdependent
|
||||
- Single commit ensures workflow remains valid at all times
|
||||
|
||||
### Rule Order Optimization
|
||||
Added rule order optimization to handle substring conflicts:
|
||||
- `/start` before `start` (command vs keyword)
|
||||
- `restart` before `start` (restart contains "start")
|
||||
|
||||
## Next Steps
|
||||
|
||||
The workflow now operates without Claude API dependency:
|
||||
- All commands work via typed keywords
|
||||
- Button taps trigger same keyword routes
|
||||
- Unknown input shows menu (not error)
|
||||
|
||||
Ready for Phase 5 Plan 02 (if any additional polish plans exist) or deployment.
|
||||
Reference in New Issue
Block a user