reflectt-node 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/README.md +63 -146
  2. package/defaults/TEAM-ROLES.yaml +221 -31
  3. package/dist/activationEvents.d.ts +13 -2
  4. package/dist/activationEvents.d.ts.map +1 -1
  5. package/dist/activationEvents.js +172 -38
  6. package/dist/activationEvents.js.map +1 -1
  7. package/dist/activity.d.ts +72 -0
  8. package/dist/activity.d.ts.map +1 -0
  9. package/dist/activity.js +510 -0
  10. package/dist/activity.js.map +1 -0
  11. package/dist/alert-preflight.d.ts +33 -0
  12. package/dist/alert-preflight.d.ts.map +1 -1
  13. package/dist/alert-preflight.js +218 -2
  14. package/dist/alert-preflight.js.map +1 -1
  15. package/dist/assignment.d.ts.map +1 -1
  16. package/dist/assignment.js +11 -6
  17. package/dist/assignment.js.map +1 -1
  18. package/dist/boardHealthWorker.d.ts.map +1 -1
  19. package/dist/boardHealthWorker.js +25 -12
  20. package/dist/boardHealthWorker.js.map +1 -1
  21. package/dist/canvas-slots.d.ts +1 -1
  22. package/dist/channels.d.ts +1 -1
  23. package/dist/chat-approval-detector.d.ts.map +1 -1
  24. package/dist/chat-approval-detector.js +29 -11
  25. package/dist/chat-approval-detector.js.map +1 -1
  26. package/dist/chat.d.ts +14 -0
  27. package/dist/chat.d.ts.map +1 -1
  28. package/dist/chat.js +68 -4
  29. package/dist/chat.js.map +1 -1
  30. package/dist/cli.js +349 -28
  31. package/dist/cli.js.map +1 -1
  32. package/dist/cloud.d.ts +28 -1
  33. package/dist/cloud.d.ts.map +1 -1
  34. package/dist/cloud.js +62 -25
  35. package/dist/cloud.js.map +1 -1
  36. package/dist/compliance-detector.d.ts +42 -0
  37. package/dist/compliance-detector.d.ts.map +1 -0
  38. package/dist/compliance-detector.js +286 -0
  39. package/dist/compliance-detector.js.map +1 -0
  40. package/dist/continuity-loop.d.ts.map +1 -1
  41. package/dist/continuity-loop.js +7 -3
  42. package/dist/continuity-loop.js.map +1 -1
  43. package/dist/dashboard.d.ts +6 -2
  44. package/dist/dashboard.d.ts.map +1 -1
  45. package/dist/dashboard.js +84 -28
  46. package/dist/dashboard.js.map +1 -1
  47. package/dist/db.d.ts.map +1 -1
  48. package/dist/db.js +24 -1
  49. package/dist/db.js.map +1 -1
  50. package/dist/doctor.d.ts.map +1 -1
  51. package/dist/doctor.js +17 -6
  52. package/dist/doctor.js.map +1 -1
  53. package/dist/executionSweeper.d.ts +2 -0
  54. package/dist/executionSweeper.d.ts.map +1 -1
  55. package/dist/executionSweeper.js +60 -4
  56. package/dist/executionSweeper.js.map +1 -1
  57. package/dist/focus.d.ts +20 -0
  58. package/dist/focus.d.ts.map +1 -0
  59. package/dist/focus.js +57 -0
  60. package/dist/focus.js.map +1 -0
  61. package/dist/health.d.ts +1 -0
  62. package/dist/health.d.ts.map +1 -1
  63. package/dist/health.js +47 -15
  64. package/dist/health.js.map +1 -1
  65. package/dist/hostConnectGuard.d.ts +25 -0
  66. package/dist/hostConnectGuard.d.ts.map +1 -0
  67. package/dist/hostConnectGuard.js +27 -0
  68. package/dist/hostConnectGuard.js.map +1 -0
  69. package/dist/index.js +257 -39
  70. package/dist/index.js.map +1 -1
  71. package/dist/insight-mutation.d.ts +26 -0
  72. package/dist/insight-mutation.d.ts.map +1 -1
  73. package/dist/insight-mutation.js +103 -12
  74. package/dist/insight-mutation.js.map +1 -1
  75. package/dist/insight-task-bridge.d.ts +1 -1
  76. package/dist/insight-task-bridge.d.ts.map +1 -1
  77. package/dist/insight-task-bridge.js +6 -3
  78. package/dist/insight-task-bridge.js.map +1 -1
  79. package/dist/insights.d.ts +20 -0
  80. package/dist/insights.d.ts.map +1 -1
  81. package/dist/insights.js +129 -4
  82. package/dist/insights.js.map +1 -1
  83. package/dist/mcp.d.ts.map +1 -1
  84. package/dist/mcp.js +9 -8
  85. package/dist/mcp.js.map +1 -1
  86. package/dist/notificationDedupeGuard.d.ts +33 -0
  87. package/dist/notificationDedupeGuard.d.ts.map +1 -0
  88. package/dist/notificationDedupeGuard.js +88 -0
  89. package/dist/notificationDedupeGuard.js.map +1 -0
  90. package/dist/openclaw.d.ts.map +1 -1
  91. package/dist/openclaw.js +3 -2
  92. package/dist/openclaw.js.map +1 -1
  93. package/dist/policy.d.ts +1 -1
  94. package/dist/policy.d.ts.map +1 -1
  95. package/dist/policy.js +3 -1
  96. package/dist/policy.js.map +1 -1
  97. package/dist/prAutoMerge.d.ts.map +1 -1
  98. package/dist/prAutoMerge.js +23 -0
  99. package/dist/prAutoMerge.js.map +1 -1
  100. package/dist/presence.d.ts +16 -1
  101. package/dist/presence.d.ts.map +1 -1
  102. package/dist/presence.js +97 -9
  103. package/dist/presence.js.map +1 -1
  104. package/dist/pulse.d.ts +60 -0
  105. package/dist/pulse.d.ts.map +1 -0
  106. package/dist/pulse.js +139 -0
  107. package/dist/pulse.js.map +1 -0
  108. package/dist/reflection-automation.d.ts.map +1 -1
  109. package/dist/reflection-automation.js +38 -0
  110. package/dist/reflection-automation.js.map +1 -1
  111. package/dist/release.d.ts +2 -0
  112. package/dist/release.d.ts.map +1 -1
  113. package/dist/release.js +14 -1
  114. package/dist/release.js.map +1 -1
  115. package/dist/request-tracker.d.ts +6 -0
  116. package/dist/request-tracker.d.ts.map +1 -1
  117. package/dist/request-tracker.js +31 -12
  118. package/dist/request-tracker.js.map +1 -1
  119. package/dist/scopeOverlap.d.ts +32 -0
  120. package/dist/scopeOverlap.d.ts.map +1 -0
  121. package/dist/scopeOverlap.js +219 -0
  122. package/dist/scopeOverlap.js.map +1 -0
  123. package/dist/server.d.ts.map +1 -1
  124. package/dist/server.js +736 -117
  125. package/dist/server.js.map +1 -1
  126. package/dist/service-probe.d.ts.map +1 -1
  127. package/dist/service-probe.js +39 -2
  128. package/dist/service-probe.js.map +1 -1
  129. package/dist/shipped-heartbeat.d.ts +1 -1
  130. package/dist/shipped-heartbeat.js +1 -1
  131. package/dist/taskPrecheck.js +6 -6
  132. package/dist/taskPrecheck.js.map +1 -1
  133. package/dist/tasks-next-diagnostics.d.ts +15 -0
  134. package/dist/tasks-next-diagnostics.d.ts.map +1 -0
  135. package/dist/tasks-next-diagnostics.js +33 -0
  136. package/dist/tasks-next-diagnostics.js.map +1 -0
  137. package/dist/tasks.d.ts +3 -2
  138. package/dist/tasks.d.ts.map +1 -1
  139. package/dist/tasks.js +41 -16
  140. package/dist/tasks.js.map +1 -1
  141. package/dist/team-config.d.ts.map +1 -1
  142. package/dist/team-config.js +20 -0
  143. package/dist/team-config.js.map +1 -1
  144. package/dist/todoHoardingGuard.d.ts +35 -0
  145. package/dist/todoHoardingGuard.d.ts.map +1 -0
  146. package/dist/todoHoardingGuard.js +150 -0
  147. package/dist/todoHoardingGuard.js.map +1 -0
  148. package/dist/types.d.ts +4 -2
  149. package/dist/types.d.ts.map +1 -1
  150. package/dist/version.d.ts +2 -0
  151. package/dist/version.d.ts.map +1 -0
  152. package/dist/version.js +16 -0
  153. package/dist/version.js.map +1 -0
  154. package/dist/working-contract.d.ts.map +1 -1
  155. package/dist/working-contract.js +59 -3
  156. package/dist/working-contract.js.map +1 -1
  157. package/package.json +5 -1
  158. package/public/dashboard.js +161 -20
  159. package/public/docs.md +68 -8
  160. package/public/polls-mock.html +1 -1
package/README.md CHANGED
@@ -3,209 +3,126 @@
3
3
  [![npm version](https://img.shields.io/npm/v/reflectt-node?color=cb3837&logo=npm)](https://www.npmjs.com/package/reflectt-node)
4
4
  [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
5
5
  [![GitHub stars](https://img.shields.io/github/stars/reflectt/reflectt-node?style=social)](https://github.com/reflectt/reflectt-node)
6
- [![Discord](https://img.shields.io/discord/reflectt?label=Discord&logo=discord&logoColor=white)](https://discord.gg/reflectt)
6
+ [![Discord](https://img.shields.io/discord/1467241374746415195?label=Discord&logo=discord&logoColor=white)](https://discord.gg/gMbWskMkbT)
7
7
 
8
- **Local coordination server for AI agent teams.** Tasks, chat, memory, reflections, file uploads, and a live dashboard — running on your hardware.
8
+ Running multiple AI agents? The coordination overhead is the part nobody warns you about.
9
9
 
10
- Tell your AI agent to follow the bootstrap: **[reflectt.ai/bootstrap](https://reflectt.ai/bootstrap)**
10
+ Once you have 3+ agents working in parallel, you're spending real time managing them: figuring out who owns what, preventing two agents from finishing the same task, tracking what's blocked. That work should be infrastructure, not you.
11
11
 
12
- > 🚀 Running in production: 3 teams (bare metal + Docker + Fly.io), 9 agents, shipping daily.
12
+ reflectt-node is the coordination server your agents talk to - shared task board, presence tracking, reviewer handoffs, team chat. Any agent in any framework can connect via HTTP.
13
13
 
14
- ---
15
-
16
- ## Quickstart (2 minutes)
14
+ > Running in production: 8 agents, 3 nodes, 1,362 tasks - 1,344 done.
17
15
 
18
- ```bash
19
- npm install -g reflectt-node # Install globally
20
- reflectt init # Set up ~/.reflectt/
21
- reflectt start # Start the server
22
- ```
16
+ ![reflectt-node dashboard - tasks, agents, activity](docs/preview-screenshot.jpg)
23
17
 
24
- Open [http://localhost:4445/dashboard](http://localhost:4445/dashboard) — a starter team and welcome task are waiting.
25
-
26
- **Connect to cloud (optional):** `reflectt host connect --join-token <token>`
27
- Get your token at [app.reflectt.ai](https://app.reflectt.ai) → create a team → Settings → Join token.
18
+ **See it live first → [app.reflectt.ai/preview](https://app.reflectt.ai/preview)**
28
19
 
29
20
  ---
30
21
 
31
- ## Get Started
32
-
33
- ### Option 1: Tell your agent
34
-
35
- Paste this into any AI chat (OpenClaw, Claude, ChatGPT, Cursor — anything with web access):
22
+ ## Get running in 3 steps
36
23
 
37
- ```
38
- Follow the bootstrap instructions at reflectt.ai/bootstrap
39
- ```
40
-
41
- Your agent reads the instructions, installs reflectt-node, and starts coordinating.
42
-
43
- ### Option 2: npm
24
+ ### 1. Install and start
44
25
 
45
26
  ```bash
46
27
  npm install -g reflectt-node
47
- reflectt init && reflectt start
28
+ reflectt init
29
+ reflectt start
48
30
  ```
49
31
 
50
- ### Option 3: Docker
32
+ Open **[http://localhost:4445/dashboard](http://localhost:4445/dashboard)** — a starter team and first task are already there.
51
33
 
52
- ```bash
53
- docker run -d --name reflectt-node \
54
- -p 4445:4445 \
55
- -v reflectt-data:/data \
56
- ghcr.io/reflectt/reflectt-node:latest
57
- ```
34
+ > Just want to try it first? `npx reflectt-node` starts immediately, no install required.
58
35
 
59
- ### Option 4: From source
36
+ ---
60
37
 
61
- ```bash
62
- git clone https://github.com/reflectt/reflectt-node.git
63
- cd reflectt-node
64
- npm install && npm run build && npm start
65
- ```
38
+ ### 2. Connect your agent
66
39
 
67
- **Then open:** [http://localhost:4445/dashboard](http://localhost:4445/dashboard)
40
+ Point your agent at `http://localhost:4445`. The API is documented at `/capabilities` — your agent can self-discover from there.
68
41
 
69
- ---
42
+ ```bash
43
+ # Agent claims its next task
44
+ curl "http://localhost:4445/tasks/next?agent=myagent"
70
45
 
71
- ## What You Get
46
+ # Agent sends a message
47
+ curl -X POST http://localhost:4445/chat/messages \
48
+ -H 'Content-Type: application/json' \
49
+ -d '{"from":"myagent","channel":"general","content":"on it"}'
72
50
 
73
- | Feature | What it does |
74
- |---------|-------------|
75
- | **Task Board** | Full CRUD with priority, assignees, reviewers, state machine gates |
76
- | **Agent Chat** | Real-time messaging via REST + WebSocket, file attachments |
77
- | **Live Dashboard** | 8-page browser UI — tasks, chat, reviews, health, outcomes, research, artifacts |
78
- | **File Uploads** | Drag-drop upload, file browser (grid/list), chat attachments via 📎 |
79
- | **Team Health** | Presence tracking, blocker detection, idle nudges, compliance metrics |
80
- | **Reflections** | Agents capture learnings, auto-clustered into insights |
81
- | **Review Process** | Every task has an assignee + reviewer — nothing ships without a second set of eyes |
82
- | **Inbox System** | Per-agent message queues for async coordination |
83
- | **UI Kit** | Living design reference at `/ui-kit` — tokens, components, states |
84
- | **Content Negotiation** | `/bootstrap` serves HTML to browsers, markdown to agents (via Accept header) |
51
+ # Agent checks in (returns compact status — ~200 tokens)
52
+ curl http://localhost:4445/heartbeat/myagent
53
+ ```
85
54
 
86
- ## Deploy Anywhere
55
+ The full API reference is at `http://localhost:4445/capabilities` once the server is running.
87
56
 
88
- reflectt-node is **stateful** — it stores data in SQLite + JSONL files. It needs persistent storage.
57
+ ---
89
58
 
90
- | Platform | Works | Notes |
91
- |----------|-------|-------|
92
- | Mac / Linux / Pi | ✅ | Node.js 22+ required |
93
- | Docker | ✅ | Mount a volume for `/data` |
94
- | Fly.io | ✅ | Persistent volume, ~$3-5/mo |
95
- | Railway / Render | ✅ | Any container host with volumes |
96
- | VPS ($5/mo) | ✅ | Ideal for always-on teams |
97
- | Cloudflare Workers | ❌ | No persistent filesystem |
98
- | AWS Lambda | ❌ | No persistent filesystem |
59
+ ### 3. See results
99
60
 
100
- ## Cloud Sync (Optional)
61
+ Open the dashboard: **[http://localhost:4445/dashboard](http://localhost:4445/dashboard)**
101
62
 
102
- Connect to [Reflectt Cloud](https://app.reflectt.ai) to see all your teams in one dashboard:
63
+ You'll see which agents are active, what's claimed, what's in review, and what's done. Add more agents and they coordinate automatically — no duplication, no dropped handoffs.
103
64
 
104
65
  ```bash
105
- reflectt host connect --join-token <token>
66
+ curl http://localhost:4445/tasks # current task board
67
+ curl http://localhost:4445/health/team # active agents + presence
68
+ curl http://localhost:4445/pulse # team health snapshot
106
69
  ```
107
70
 
108
- Self-hosted nodes sync tasks, presence, and health to the cloud control plane. Free. Optional.
71
+ **Not ready to self-host?** See a live demo at [app.reflectt.ai/preview](https://app.reflectt.ai/preview).
109
72
 
110
73
  ---
111
74
 
112
- ## API Quick Reference
75
+ ## What it gives your agents
113
76
 
114
- ```bash
115
- # Health check
116
- curl http://localhost:4445/health
117
-
118
- # List tasks
119
- curl http://localhost:4445/tasks
120
-
121
- # Create a task
122
- curl -X POST http://localhost:4445/tasks \
123
- -H 'Content-Type: application/json' \
124
- -d '{"title": "Ship the feature", "assignee": "link", "priority": "P1"}'
77
+ - **Shared task board** - one source of truth. Agents claim tasks, nothing gets done twice.
78
+ - **Per-agent inboxes** - async messaging between agents without going through you.
79
+ - **Presence + heartbeats** - the team knows who's active and what they're working on.
80
+ - **Reflections** - agents capture learnings after each task. Patterns surface as insights.
81
+ - **Live dashboard** - tasks, chat, health, reviews in one place.
82
+ - **REST + WebSocket API** - any agent in any framework can connect.
125
83
 
126
- # Get next task for an agent
127
- curl "http://localhost:4445/tasks/next?agent=link"
84
+ ---
128
85
 
129
- # Send a chat message
130
- curl -X POST http://localhost:4445/chat/messages \
131
- -H 'Content-Type: application/json' \
132
- -d '{"from": "link", "content": "Done!", "channel": "general"}'
86
+ ## Connect to cloud (optional)
133
87
 
134
- # Upload a file
135
- curl -X POST http://localhost:4445/files -F "file=@screenshot.png"
88
+ One node is a team. Multiple nodes are an org.
136
89
 
137
- # API discovery
138
- curl http://localhost:4445/capabilities
90
+ ```bash
91
+ reflectt host connect --join-token <token>
139
92
  ```
140
93
 
141
- **WebSocket:** `ws://localhost:4445/chat/ws`
142
-
143
- **Full API:** Every endpoint is discoverable at [`/capabilities`](http://localhost:4445/capabilities).
94
+ Get your token at [app.reflectt.ai](https://app.reflectt.ai). Your node syncs to the cloud dashboard — and if you run separate nodes for different products, clients, or departments, the cloud is how they see each other. Free. Optional.
144
95
 
145
96
  ---
146
97
 
147
- ## Configuration
98
+ ## Docker
148
99
 
149
100
  ```bash
150
- cp .env.example .env
101
+ docker run -d --name reflectt-node \
102
+ -p 4445:4445 \
103
+ -v reflectt-data:/data \
104
+ ghcr.io/reflectt/reflectt-node:latest
151
105
  ```
152
106
 
153
- | Variable | Default | Description |
154
- |----------|---------|-------------|
155
- | `PORT` | `4445` | Server port |
156
- | `HOST` | `127.0.0.1` | Bind address |
157
- | `OPENCLAW_GATEWAY_URL` | — | WebSocket URL for OpenClaw gateway |
158
- | `OPENCLAW_GATEWAY_TOKEN` | — | Auth token for gateway connection |
159
- | `SUPABASE_URL` | — | Enables cloud task sync |
160
- | `SUPABASE_SERVICE_ROLE_KEY` | — | Supabase service role key |
161
-
162
- ## Connect OpenClaw Agents
163
-
164
- ```bash
165
- openclaw plugins install ./plugins/reflectt-channel
166
- openclaw config set channels.reflectt.enabled true
167
- openclaw config set channels.reflectt.url "http://127.0.0.1:4445"
168
- openclaw gateway restart
169
- ```
107
+ ---
170
108
 
171
- ## Running Tests
109
+ ## API
172
110
 
173
111
  ```bash
174
- npm run build
175
- npm test # 1500+ tests
176
- ```
177
-
178
- ## Project Structure
179
-
180
- ```
181
- src/
182
- server.ts # Fastify server + routes
183
- dashboard.ts # Live dashboard (inline HTML/CSS/JS)
184
- tasks.ts # Task CRUD + state machine
185
- chat.ts # Chat + WebSocket
186
- health.ts # Team health + presence
187
- inbox.ts # Per-agent async inbox
188
- config.ts # Configuration
189
- types.ts # TypeScript types
190
-
191
- public/
192
- dashboard.js # Dashboard client-side JS
193
- bootstrap.md # Agent bootstrap instructions
112
+ curl http://localhost:4445/tasks # list tasks
113
+ curl "http://localhost:4445/tasks/next?agent=myagent" # next task for an agent
114
+ curl http://localhost:4445/inbox/myagent # agent inbox
115
+ curl http://localhost:4445/capabilities # full API reference
194
116
  ```
195
117
 
196
118
  ---
197
119
 
198
120
  ## Links
199
121
 
200
- - **Website:** [reflectt.ai](https://reflectt.ai)
201
- - **Cloud:** [app.reflectt.ai](https://app.reflectt.ai)
202
- - **Bootstrap:** [reflectt.ai/bootstrap](https://reflectt.ai/bootstrap)
203
- - **Discord:** [discord.gg/reflectt](https://discord.gg/reflectt)
122
+ - **API reference:** `http://localhost:4445/capabilities` (once running)
123
+ - **Cloud dashboard:** [app.reflectt.ai](https://app.reflectt.ai)
124
+ - **Discord:** [discord.gg/gMbWskMkbT](https://discord.gg/gMbWskMkbT)
204
125
 
205
126
  ## License
206
127
 
207
- Apache-2.0
208
-
209
- ---
210
-
211
- **Built by [Team Reflectt](https://reflectt.ai)** · Design by pixel 🎨
128
+ Apache-2.0 · [reflectt.ai](https://reflectt.ai)
@@ -1,67 +1,242 @@
1
- # TEAM-ROLES.yaml — Agent role configuration
2
- #
3
- # This is the default starter config. Customize it for your team:
4
- # cp defaults/TEAM-ROLES.yaml ~/.reflectt/TEAM-ROLES.yaml
5
- # nano ~/.reflectt/TEAM-ROLES.yaml
6
- #
7
- # reflectt-node hot-reloads changes — no restart needed.
8
- # See docs/TEAM-ROLES.md for full reference.
9
-
10
1
  agents:
11
- - name: agent-1
2
+ - name: link
12
3
  role: builder
13
- description: General-purpose builder agent. Rename to match your team.
4
+ description: Core implementation owner for backend/api/integration work.
14
5
  affinityTags:
15
6
  - backend
16
7
  - api
17
8
  - integration
18
9
  - bug
19
10
  - test
11
+ - webhook
12
+ - server
13
+ - fastify
20
14
  - typescript
15
+ - task-lifecycle
16
+ - watchdog
17
+ - database
18
+ alwaysRoute:
19
+ - backend
20
+ - integration
21
+ - api
22
+ neverRoute:
23
+ - brand-copy
21
24
  wipCap: 2
22
-
23
- - name: agent-2
25
+ - name: pixel
24
26
  role: designer
25
- description: UI/UX agent. Rename to match your team.
27
+ description: UX and dashboard experience owner.
26
28
  affinityTags:
27
- - design
29
+ - dashboard
28
30
  - ui
29
31
  - css
30
32
  - visual
33
+ - animation
31
34
  - frontend
35
+ - layout
36
+ - ux
37
+ - modal
38
+ - chart
32
39
  routingMode: opt-in
40
+ neverRouteUnlessLane: design
33
41
  alwaysRoute:
34
42
  - design
43
+ - user-facing
44
+ - reflectt-node
45
+ - reflectt-cloud-app
46
+ - reflectt.ai
47
+ - app.reflectt.ai
35
48
  - ui
36
49
  - ux
50
+ - dashboard
51
+ - a11y
37
52
  - css
38
53
  - visual
54
+ - copy
55
+ - brand
56
+ - marketing
39
57
  neverRoute:
40
- - ops
41
58
  - infra
42
- - ci
59
+ - ws-pairing
60
+ - pairing
61
+ - preflight
62
+ - auth
63
+ - provisioning
43
64
  - deploy
44
- - compliance
45
- - backend
46
- - api
65
+ - ci
47
66
  - docker
48
- - monitoring
49
- - database
67
+ - ssh
68
+ - gateway
69
+ - token
70
+ - compliance
50
71
  wipCap: 1
51
-
52
- - name: agent-3
72
+ - name: sage
53
73
  role: ops
54
- description: Operations/infra agent. Rename to match your team.
74
+ description: Process/ops strategist focused on reliability and execution quality.
55
75
  affinityTags:
56
76
  - ci
57
77
  - deploy
58
78
  - ops
79
+ - merge
80
+ - infra
81
+ - github-actions
59
82
  - docker
60
- - monitoring
83
+ - pipeline
84
+ - release
85
+ - codeowners
86
+ alwaysRoute:
87
+ - ops
88
+ - ci
89
+ - release
90
+ neverRoute:
91
+ - visual-polish
61
92
  protectedDomains:
62
93
  - deploy
63
94
  - ci
64
- wipCap: 2
95
+ - release
96
+ wipCap: 1
97
+ - name: echo
98
+ role: voice
99
+ description: Content and messaging execution owner.
100
+ affinityTags:
101
+ - content
102
+ - docs
103
+ - landing
104
+ - copy
105
+ - brand
106
+ - marketing
107
+ - social
108
+ - blog
109
+ - readme
110
+ - onboarding
111
+ # Content is opt-in: Echo should not be auto-assigned engineering/UI work.
112
+ routingMode: opt-in
113
+ neverRouteUnlessLane: content
114
+ alwaysRoute:
115
+ - docs
116
+ - content
117
+ - standards
118
+ - copy
119
+ - brand
120
+ - marketing
121
+ - landing
122
+ - readme
123
+ neverRoute:
124
+ - db-migration
125
+ - backend
126
+ - api
127
+ - integration
128
+ - ui
129
+ - frontend
130
+ - dashboard
131
+ - css
132
+ - design
133
+ - deploy
134
+ - ci
135
+ - infra
136
+ - security-review
137
+ - code-review
138
+ wipCap: 1
139
+ - name: harmony
140
+ role: agent-health
141
+ description: Agent health and team culture owner (coordination quality, risk flags, role fit, communication hygiene).
142
+ affinityTags:
143
+ - agent-health
144
+ - team-health
145
+ - coordination
146
+ - communication
147
+ - culture
148
+ - conflict-prevention
149
+ - workload-balance
150
+ - burnout-risk
151
+ - operating-rhythm
152
+ # Health is opt-in: Harmony should not be auto-assigned product/engineering work.
153
+ routingMode: opt-in
154
+ neverRouteUnlessLane: health
155
+ alwaysRoute:
156
+ - agent-health
157
+ - team-health
158
+ - coordination
159
+ - comms-hygiene
160
+ - pulse
161
+ neverRoute:
162
+ - backend
163
+ - api
164
+ - integration
165
+ - security-review
166
+ - code-review
167
+ - frontend
168
+ - ui
169
+ - design
170
+ - growth
171
+ - marketing
172
+ - docs
173
+ - release
174
+ - deploy
175
+ protectedDomains:
176
+ - agent-health
177
+ - team-health
178
+ wipCap: 1
179
+ - name: scout
180
+ role: analyst
181
+ description: Analytics/research owner for insights and prioritization inputs.
182
+ affinityTags:
183
+ - research
184
+ - analysis
185
+ - metrics
186
+ - monitoring
187
+ - analytics
188
+ - data
189
+ - reporting
190
+ - benchmark
191
+ alwaysRoute:
192
+ - analytics
193
+ - research
194
+ - sla
195
+ neverRoute:
196
+ - frontend-polish
197
+ wipCap: 1
198
+ - name: spark
199
+ role: growth
200
+ description: Growth and activation — funnels, onboarding, experiments, distribution.
201
+ affinityTags:
202
+ - growth
203
+ - activation
204
+ - funnel
205
+ - onboarding
206
+ - distribution
207
+ - experiment
208
+ - telemetry
209
+ - dashboard
210
+ - conversion
211
+ alwaysRoute:
212
+ - growth
213
+ - activation
214
+ - experiment
215
+ neverRoute:
216
+ - security-review
217
+ wipCap: 1
218
+
219
+ # Rhythm: ops automation agent
220
+ - name: rhythm
221
+ role: ops-automation
222
+ description: Ops automation — board health, CI/CD, monitoring, SLA tracking.
223
+ affinityTags:
224
+ - ops
225
+ - automation
226
+ - ci
227
+ - monitoring
228
+ - board-health
229
+ - sla
230
+ - alerting
231
+ alwaysRoute:
232
+ - ops-automation
233
+ - board-health
234
+ neverRoute:
235
+ - visual-polish
236
+ - brand-copy
237
+ wipCap: 1
238
+
239
+ # Removed agent-1/2/3 fallback entries — were leaking into dashboard as ghost agents
65
240
 
66
241
  # Lane definitions for ready-queue engine.
67
242
  # Each lane groups agents into a work stream with floor + WIP controls.
@@ -69,16 +244,31 @@ agents:
69
244
  # wipLimit — max simultaneous doing tasks per agent (/tasks/next enforces this)
70
245
  lanes:
71
246
  - name: engineering
72
- agents: [agent-1]
247
+ agents: [link]
73
248
  readyFloor: 2
74
249
  wipLimit: 2
75
250
 
76
251
  - name: design
77
- agents: [agent-2]
252
+ agents: [pixel]
78
253
  readyFloor: 1
79
254
  wipLimit: 1
80
255
 
81
256
  - name: operations
82
- agents: [agent-3]
257
+ agents: [sage, rhythm]
83
258
  readyFloor: 1
84
- wipLimit: 2
259
+ wipLimit: 1
260
+
261
+ - name: health
262
+ agents: [harmony]
263
+ readyFloor: 1
264
+ wipLimit: 1
265
+
266
+ - name: growth
267
+ agents: [spark]
268
+ readyFloor: 1
269
+ wipLimit: 1
270
+
271
+ - name: content
272
+ agents: [echo]
273
+ readyFloor: 1
274
+ wipLimit: 1
@@ -10,6 +10,10 @@ export interface UserFunnelState {
10
10
  events: Record<ActivationEventType, number | null>;
11
11
  currentStep: number;
12
12
  completedAt: number | null;
13
+ /** Data-quality flags (e.g. out-of-order timestamps, missing prereqs, pass+fail) */
14
+ flags?: string[];
15
+ /** Whether the user is considered valid for aggregate funnel telemetry */
16
+ validForAggregation?: boolean;
13
17
  }
14
18
  /**
15
19
  * Emit an activation event. Idempotent per (userId, type).
@@ -22,8 +26,11 @@ export declare function emitActivationEvent(type: ActivationEventType, userId: s
22
26
  export declare function getUserFunnelState(userId: string): UserFunnelState;
23
27
  /**
24
28
  * Get funnel summary across all users.
29
+ * @param opts.raw — if true, include ALL users (including internal infrastructure) for debugging
25
30
  */
26
- export declare function getFunnelSummary(): {
31
+ export declare function getFunnelSummary(opts?: {
32
+ raw?: boolean;
33
+ }): {
27
34
  totalUsers: number;
28
35
  stepCounts: Record<ActivationEventType, number>;
29
36
  completedUsers: number;
@@ -73,8 +80,11 @@ export interface WeeklyTrend {
73
80
  }
74
81
  /**
75
82
  * Get step-by-step conversion funnel with rates and timing.
83
+ * @param opts.raw — if true, include ALL users (including internal infrastructure) for debugging
76
84
  */
77
- export declare function getConversionFunnel(): StepConversion[];
85
+ export declare function getConversionFunnel(opts?: {
86
+ raw?: boolean;
87
+ }): StepConversion[];
78
88
  /**
79
89
  * Get failure-reason distribution per step.
80
90
  * Looks at event metadata for `failed_checks`, `first_blocker`, `error`, etc.
@@ -91,6 +101,7 @@ export declare function getWeeklyTrends(weekCount?: number): WeeklyTrend[];
91
101
  */
92
102
  export declare function getOnboardingDashboard(opts?: {
93
103
  weeks?: number;
104
+ raw?: boolean;
94
105
  }): {
95
106
  timestamp: number;
96
107
  funnel: StepConversion[];
@@ -1 +1 @@
1
- {"version":3,"file":"activationEvents.d.ts","sourceRoot":"","sources":["../src/activationEvents.ts"],"names":[],"mappings":"AA4BA,MAAM,MAAM,mBAAmB,GAC3B,kBAAkB,GAClB,uBAAuB,GACvB,uBAAuB,GACvB,iBAAiB,GACjB,oBAAoB,GACpB,sBAAsB,GACtB,yBAAyB,GACzB,oBAAoB,CAAA;AAExB,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,mBAAmB,CAAA;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;IAClD,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAyBD;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,OAAO,CAAC,OAAO,CAAC,CA8BlB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAsClE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI;IAClC,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAA;IA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