@tesselate-digital/notion-agent-hive 0.0.8 → 0.0.10-alpha

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.
package/README.md CHANGED
@@ -8,31 +8,27 @@
8
8
 
9
9
  ## Why this exists
10
10
 
11
- Two, ahem, persistent problems with AI coding agents:
11
+ Like many, I've been using LLMs extensively, in every flavour, and with all sorts of harnesses (Claude code, Codex, Copilot, etc.)
12
12
 
13
- **Sessions die at the worst time.** You're mid-feature when rate limits hit or sessions expire. There's no clean way to continue on another platform. You learn to ask agents to write plans in markdown first, but it's easy to forget - and then the context is gone.
13
+ While they can be wildly effective, I found some limitations in my workflow:
14
+
15
+ **Form factor** CLIs can be a bit clunky to collect one's thoughts. I love to write, edit, revisit, add structure through headers and richer markup ... Command line doesn't feel like the best place for that.
14
16
 
15
17
  **You lose track of what actually happened.** When working on larger features that take time, you often switch between your agent and other tasks. Coming back later, it's hard to trace what happened and what the agent was working on. You get a "done!" checklist but lose the 200k tokens of reasoning behind it, leaving you wondering what was actually discussed and implemented.
16
18
 
17
- **Limited task horizon.** Most AI coding sessions work best for small, contained tasks. When you want to tackle more ambitious, long-running features that span multiple sessions or days, you're left managing context manually - if you can at all.
19
+ **Sessions die at the worst time.** Especially when Anthropic cuts your plan allowance. The plan and logs live somewhere in some temp folder, you could do some digging, fire opencode, and let it handle the context all over again, but this is a bit awkward and wasteful.
20
+
21
+ **Limited task horizon.** Models' performance tend to degrade far below their max context size. I found it hard to reliably tackle more ambitious features because of it. Harnesses _may_ compact, or _may_ use subagents, which can help, but feels like a roll of dice. Being diligent, going through plan -> execute loops helps too, but then you're still facing issues 1-3 in this list.
18
22
 
19
23
  ## What this does
20
24
 
21
- Uses **Notion kanban boards as persistent memory** for your entire workflow. Every feature gets:
25
+ This uses Notion as a persistent memory layer and source of truth. Every feature gets:
22
26
 
23
27
  - A dedicated Notion page with the full plan, decisions, and reasoning
24
28
  - An inline kanban board with detailed task tickets
25
29
  - Context that persists across sessions and tools
26
30
 
27
- Why Notion specifically:
28
-
29
- - **You might already be using it at work** - You can easily link the wider context, specs, or designs to the notion agent
30
- - **Pick up where you left off instantly** - Any agent can read tickets and continue, no chat history needed
31
- - **Review what actually happened** - See plans, decisions, and reasoning without digging through conversation logs
32
-
33
- ## How It Works
34
-
35
- A coordinator manages three specialized subagents through a shared Notion board:
31
+ Under the hood, the tool will synchronise a few specialised subagents:
36
32
 
37
33
  | Agent | Role |
38
34
  | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
@@ -41,29 +37,17 @@ A coordinator manages three specialized subagents through a shared Notion board:
41
37
  | **Executor** | Implements code for the specific ticket assigned by the Coordinator. Writes findings/work summaries on that ticket, then reports back; does not route itself to other tasks. |
42
38
  | **Reviewer** | Verifies implementations against acceptance criteria. Gates tasks for human review before they can be marked done. |
43
39
 
44
- ### Ticket Lifecycle
45
-
46
- ```mermaid
47
- flowchart LR
48
- Backlog --> ToDo["To Do"]
49
- ToDo -->|"Executor picks up"| InProgress["In Progress"]
50
- InProgress -->|"Executor reports done"| InTest["In Test"]
51
- InTest -->|"Reviewer approves"| HumanReview["Human Review"]
52
- InTest -->|"Reviewer rejects"| ToDo
53
- HumanReview -->|"Human approves"| Done
54
- HumanReview -->|"Human requests changes"| ToDo
55
-
56
- style Done fill:#2ecc71,color:#fff
57
- style HumanReview fill:#9b59b6,color:#fff
58
- style InTest fill:#e67e22,color:#fff
59
- style InProgress fill:#f1c40f,color:#000
60
- style ToDo fill:#3498db,color:#fff
61
- style Backlog fill:#95a5a6,color:#fff
62
- ```
40
+ It's quite flexible. Fire it with a rough idea, either inline or in a Notion page, and it will interactively create a plan. Give it an existing plan in Notion, and it will resume the work. Just like that, you get:
63
41
 
64
- **Key rule:** No agent can mark a task as Done. Only you can. The human always has final say.
42
+ - **A proper space to think.** Notion pages with headers, tables, and structure. Each step becomes a ticket on a board with rich context, not a checklist item in a terminal.
43
+ - **A proper space to review.** Leave comments on specific parts of the plan. Add notes. Give feedback where it matters, not in a chat thread that scrolls away.
44
+ - **A proper space to supervise.** The board shows you exactly where everything stands at a glance.
65
45
 
66
- A task can also be moved to **Needs Human Input** at any point when a decision requires your judgment. The agent won't guess.
46
+ Each task runs with a fresh context, so you stay in the sweet spot where models perform best. When you want to review what an agent did, just look at the ticket: the work summary and QA report are right there.
47
+
48
+ It also saves money. You can assign a strong model for planning, a fast one for coordination, and a cheaper one for execution, since the thinking has already been done.
49
+
50
+ I'm still toying with different configurations, but had some good results using chatGPT 5.4 mini as the fast coordinator, chatGPT 5.4 (With high effort) or opus 4.6 as the thinker/reviewer, and at this point anything "Not considered SOTA but still good" like KIMI K2.5, GLM-5, or Devstral as the executor, where most of the tokens are spent.
67
51
 
68
52
  ## Installation
69
53
 
@@ -84,92 +68,6 @@ This command:
84
68
  - A Notion workspace with an [integration/API token](https://www.notion.so/my-integrations)
85
69
  - The [Notion MCP server](https://github.com/makenotion/notion-mcp-server) configured in OpenCode
86
70
 
87
- ### Local Development
88
-
89
- If you're developing from this repo instead of installing a published npm package, use a local plugin file.
90
-
91
- OpenCode auto-loads `.ts` plugin files from `~/.config/opencode/plugins/` (or `$OPENCODE_CONFIG_DIR/plugins` / `$XDG_CONFIG_HOME/opencode/plugins` if you use those).
92
-
93
- 1. Build the plugin bundle:
94
-
95
- ```bash
96
- bun install
97
- bun build src/index.ts --outdir dist --target bun --format esm
98
- ```
99
-
100
- 2. Create `~/.config/opencode/plugins/notion-agent-hive.ts`:
101
-
102
- ```ts
103
- import { NotionAgentHivePlugin } from "/absolute/path/to/notion-agent-hive/dist/index.js";
104
-
105
- export { NotionAgentHivePlugin };
106
- ```
107
-
108
- 3. Create `~/.config/opencode/notion-agent-hive.json` to choose models for each internal agent:
109
-
110
- ```json
111
- {
112
- "agents": {
113
- "coordinator": { "model": "openai/gpt-5.2" },
114
- "thinker": { "model": "openai/gpt-5.4", "variant": "xhigh" },
115
- "executor": { "model": "kimi-for-coding/k2p5" },
116
- "reviewer": { "model": "openai/gpt-5.4", "variant": "xhigh" }
117
- },
118
- "fallback": {
119
- "enabled": true,
120
- "chains": {}
121
- }
122
- }
123
- ```
124
-
125
- 4. Configure your Notion MCP server in `~/.config/opencode/opencode.json` if you haven't already:
126
-
127
- ```json
128
- {
129
- "mcp": {
130
- "notion": {
131
- "type": "remote",
132
- "url": "https://mcp.notion.com/mcp"
133
- }
134
- }
135
- }
136
- ```
137
-
138
- 5. Restart OpenCode.
139
- 6. Start a session with the `notion agent hive` agent.
140
-
141
- When you change plugin source, rebuild `dist/index.js` so OpenCode picks up the new code.
142
-
143
- ### Published Package
144
-
145
- ```bash
146
- bunx @tesselate-digital/notion-agent-hive install
147
- ```
148
-
149
- This command:
150
-
151
- 1. Adds `@tesselate-digital/notion-agent-hive` to the `plugin` array in `~/.config/opencode/opencode.json` (or `$OPENCODE_CONFIG_DIR/opencode.json` / `$XDG_CONFIG_HOME/opencode/opencode.json`)
152
- 2. Creates a `~/.config/opencode/notion-agent-hive.json` starter config (or the matching `$OPENCODE_CONFIG_DIR` / `$XGD_CONFIG_HOME` location)
153
-
154
- If you want per-project overrides, create `notion-agent-hive.json` in the project root manually.
155
-
156
- Then configure your Notion MCP server in `~/.config/opencode/opencode.json` if you haven't already:
157
-
158
- ```json
159
- {
160
- "mcp": {
161
- "notion": {
162
- "type": "npx",
163
- "command": "npx",
164
- "args": ["-y", "@notionhq/notion-mcp-server"],
165
- "env": {
166
- "OPENAPI_MCP_HEADERS": "{\"Authorization\": \"Bearer YOUR_NOTION_TOKEN\"}"
167
- }
168
- }
169
- }
170
- }
171
- ```
172
-
173
71
  ### Configuring Models
174
72
 
175
73
  There are two places to configure models, merged at startup:
@@ -181,15 +79,7 @@ There are two places to configure models, merged at startup:
181
79
 
182
80
  Project config takes precedence. Agent keys are merged individually — setting `thinker` in the project config does not wipe out `executor` from your global config.
183
81
 
184
- Restart OpenCode for changes to take effect.
185
-
186
- ---
187
-
188
- Model IDs use the `provider/model-name` format that OpenCode uses — any provider configured in your OpenCode setup works here.
189
-
190
- The public agent name is `notion agent hive`, but the model config key is still `coordinator`.
191
-
192
- The `$schema` path depends on how you installed the plugin. For local development or global config, it's simplest to omit `$schema`.
82
+ Example config:
193
83
 
194
84
  ```json
195
85
  {
@@ -202,27 +92,7 @@ The `$schema` path depends on how you installed the plugin. For local developmen
202
92
  }
203
93
  ```
204
94
 
205
- Each agent has a distinct role, so you can tune them independently:
206
-
207
- | Agent | Role | Suggested model profile |
208
- | --------------- | ------------------------------------ | ----------------------------------------------------------- |
209
- | **coordinator** | Dispatches agents, moves tickets | Fast and cheap — it mostly routes, not thinks |
210
- | **thinker** | Deep research, feature decomposition | Most capable model you have — this is where quality matters |
211
- | **executor** | Code implementation | Balanced — good at coding tasks |
212
- | **reviewer** | QA verification, criteria checking | Same tier as executor |
213
-
214
- #### Variants
215
-
216
- Some providers support model-specific variants such as `"xhigh"` or `"max"`:
217
-
218
- ```json
219
- {
220
- "agents": {
221
- "thinker": { "model": "openai/gpt-5.4", "variant": "xhigh" },
222
- "reviewer": { "model": "anthropic/claude-opus-4", "variant": "max" }
223
- }
224
- }
225
- ```
95
+ Restart OpenCode for changes to take effect.
226
96
 
227
97
  #### Fallback chains
228
98
 
@@ -257,47 +127,3 @@ You can also pass the full chain directly as the `model` value — the first ent
257
127
  }
258
128
  }
259
129
  ```
260
-
261
- ### Usage
262
-
263
- 1. Open OpenCode and start a session with the **notion agent hive** agent
264
- 2. Describe the feature you want to build
265
- 3. The Coordinator dispatches the Thinker, who interrogates you, explores your codebase, and creates the Notion feature page + task board
266
- 4. Say **"execute"** and the Coordinator dispatches tasks to the Executor, runs them through the Reviewer, and surfaces completed work for your review
267
- 5. Review tasks in the **Human Review** column and move them to **Done**, or send them back with comments
268
-
269
- You can close your session at any point. When you come back, point the Coordinator at the same Notion board and pick up where you left off.
270
-
271
- ---
272
-
273
- <details>
274
- <summary><strong>Technical Details</strong></summary>
275
-
276
- ### Repository Structure
277
-
278
- ```
279
- notion-agent-hive/
280
- ├── src/
281
- │ ├── agents/
282
- │ │ ├── types.ts # AgentDefinition + AgentConfig interfaces
283
- │ │ ├── coordinator.ts # notion agent hive agent factory
284
- │ │ ├── thinker.ts # notion-thinker agent factory
285
- │ │ ├── executor.ts # notion-executor agent factory
286
- │ │ └── reviewer.ts # notion-reviewer agent factory
287
- │ ├── cli/
288
- │ │ ├── index.ts # CLI entry point
289
- │ │ └── install.ts # install command
290
- │ ├── config.ts # Config loading + Zod validation
291
- │ ├── fallback.ts # Runtime model fallback manager
292
- │ └── index.ts # Plugin entry point + public API
293
- ├── schema.json # JSON Schema for notion-agent-hive.json
294
- ├── biome.json
295
- ├── tsconfig.json
296
- └── package.json
297
- ```
298
-
299
- ### MCP Requirements
300
-
301
- Only the **Notion MCP server** is required. No other MCP servers are mandatory for core functionality.
302
-
303
- </details>
@@ -0,0 +1,5 @@
1
+ import type { AgentDefinition } from "./types";
2
+ export declare function createThinkerInvestigatorAgent(model?: string | Array<string | {
3
+ id: string;
4
+ variant?: string;
5
+ }>, variant?: string): AgentDefinition;
@@ -0,0 +1,5 @@
1
+ import type { AgentDefinition } from "./types";
2
+ export declare function createThinkerPlannerAgent(model?: string | Array<string | {
3
+ id: string;
4
+ variant?: string;
5
+ }>, variant?: string): AgentDefinition;
@@ -0,0 +1,5 @@
1
+ import type { AgentDefinition } from "./types";
2
+ export declare function createThinkerRefinerAgent(model?: string | Array<string | {
3
+ id: string;
4
+ variant?: string;
5
+ }>, variant?: string): AgentDefinition;
package/dist/cli/index.js CHANGED
@@ -1,17 +1,13 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
3
  var __defProp = Object.defineProperty;
4
- var __returnValue = (v) => v;
5
- function __exportSetter(name, newValue) {
6
- this[name] = __returnValue.bind(null, newValue);
7
- }
8
4
  var __export = (target, all) => {
9
5
  for (var name in all)
10
6
  __defProp(target, name, {
11
7
  get: all[name],
12
8
  enumerable: true,
13
9
  configurable: true,
14
- set: __exportSetter.bind(all, name)
10
+ set: (newValue) => all[name] = () => newValue
15
11
  });
16
12
  };
17
13
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export type { AgentDefinition } from "./agents/types";
2
2
  export { loadConfig, DEFAULT_MODELS, DEFAULT_VARIANTS } from "./config";
3
3
  export { createCoordinatorAgent } from "./agents/coordinator";
4
- export { createThinkerAgent } from "./agents/thinker";
4
+ export { createThinkerPlannerAgent } from "./agents/thinker-planner";
5
+ export { createThinkerInvestigatorAgent } from "./agents/thinker-investigator";
6
+ export { createThinkerRefinerAgent } from "./agents/thinker-refiner";
5
7
  export { createExecutorAgent } from "./agents/executor";
6
8
  export { createReviewerAgent } from "./agents/reviewer";
7
9
  export { ForegroundFallbackManager } from "./fallback";