[Feature Area] — Workflows
[Feature Area] — Workflows
Section titled “[Feature Area] — Workflows”Overview
Section titled “Overview”Brief description of the workflows in this functional area.
Workflow 1: [Name]
Section titled “Workflow 1: [Name]”Trigger: [User action / cron schedule / API call / webhook] Owner: [Which module/service handles this]
[Trigger] → [Step 1] → [Step 2] → [Outcome]Detailed Steps
Section titled “Detailed Steps”-
[Step name]
- File:
path/to/file.ts - Function:
functionName() - Input: [what it receives]
- Output: [what it produces]
- Side effects: [DB writes, notifications, etc.]
- File:
-
[Step name]
- File:
path/to/file.ts - [continue pattern]
- File:
State Transitions
Section titled “State Transitions”If the workflow involves state changes:
| Current State | Event | Next State | Side Effects |
|---|---|---|---|
| draft | publish | active | Triggers classification |
Error Handling
Section titled “Error Handling”| Error Condition | Handling | User Feedback |
|---|---|---|
| [condition] | [what happens] | [what user sees] |
Database Operations
Section titled “Database Operations”| Operation | Table | Columns | RLS Policy |
|---|---|---|---|
| INSERT | table_name | col1, col2 | Editor+ |
Workflow 2: [Name]
Section titled “Workflow 2: [Name]”Automated Processes
Section titled “Automated Processes”| Process | Schedule | Route/Script | Purpose |
|---|---|---|---|
| Example cron | Daily 02:00 | /api/cron/example | Clean up expired items |
Integration Points
Section titled “Integration Points”| External System | Direction | Protocol | Purpose |
|---|---|---|---|
| Supabase | Read/Write | REST + RPC | Primary data store |
| Claude API | Request | HTTP | Classification, summaries |
| OpenAI API | Request | HTTP | Embeddings |
Current Limitations
Section titled “Current Limitations”- [Known limitation 1]
- [Known limitation 2]