# Feasibility Report: Context-First Workflow UX

## 📊 Score: 🟢 POSSIBLE — 8.5/10

## ✅ Why POSSIBLE

### Dependencies Available
| Dependency | Status | Notes |
|---|---|---|
| n8n URL detection | ✅ Ready | `chrome.tabs.query` gives active tab URL |
| Workflow ID extraction | ✅ Trivial | Regex on URL: `/workflow/([a-zA-Z0-9]+)` |
| McpService.callTool | ✅ Ready | Already in bg/index.ts, can call `n8n_get_workflow` |
| Adapter.insertText | ✅ Ready | ChatGPTAdapter & GeminiAdapter have this |
| chrome.storage.session | ✅ Built-in | Ephemeral storage, perfect for active context |
| Popup.vue | ✅ Exists | Already has tab detection logic |

### New Code Required
| Component | Effort | Complexity |
|---|---|---|
| Popup: n8n detection + platform launcher | 2h | Low |
| Background: workflow state management | 1h | Low |
| Content: context injection on load | 1h | Low |
| Bridge: auto-attach workflowId | 30min | Low |

### Total Effort: **M (~4-5 hours)**

## ⚠️ Risks
| Risk | Impact | Mitigation |
|---|---|---|
| n8n URL format varies by deployment | Medium | Support multiple patterns: `/workflow/ID`, `/workflows/ID` |
| Workflow JSON too large for chat input | Low | Summarize: only send node names + connections, not full config |
| ChatGPT DOM selectors change | Medium | Already mitigated by adapter pattern |
| MCP server not connected | Low | Show clear error in Popup before launching |

## 🟢 Verdict: PROCEED TO EXECUTION

No blockers. All dependencies exist. Pure UI/UX wiring work.

---
_Evaluated: 2026-04-28 | Feasibility: POSSIBLE (8.5/10)_
