Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions docs/proposals/notion-db-writer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Proposal: Notion DB writer output

**Author:** Bren · **For:** Vasanth · **Date:** 2026-07-14

## Goal

Write GitHub activity events straight into a Notion database. One row per event. Read by the daily digest agent. No cubby / Vault dependency.

## Why

- Digest agent can't reach cubbies from cowork today (blocked on MCP / connector work).
- Notion DB is a source the digest already reads.
- Faster to ship than fixing cowork → cubby.

## Test repo

`CEF-AI/agent-catalog` — where daily engineering activity lands.

## Trigger

Same as existing action:

```yaml
on:
pull_request:
types: [opened, closed, reopened]
pull_request_review:
types: [submitted]
push:
branches: ["**"]
```

## Notion DB schema

| Field | Type | Notes |
|---|---|---|
| `timestamp` | Date | ISO datetime of the event |
| `user` | Text | GitHub login (`bren-cere`, `vasanth5528`, …) |
| `repo` | Text | `owner/name`, e.g. `CEF-AI/agent-catalog` |
| `action` | Select | `pr_opened` / `pr_merged` / `pr_closed` / `pr_reopened` / `review_submitted` / `push` |
| `pr_number` | Number | Null on push events |
| `title` | Text | PR title, or head-commit message on push |
| `url` | URL | PR URL or commit URL |
| `branch` | Text | Head branch for PRs, ref for push |

## Open decisions for you

1. **One row per push, or one row per commit?** One-per-push is simpler; one-per-commit gives finer signal on squash-merges. Recommend one-per-push for v1.
2. **PR closed vs merged split:** `pr_merged` when `pull_request.merged == true`, else `pr_closed`. Confirm.
3. **Notion DB location:** new DB you create + share with the digest agent's Notion integration, or an existing one? Prefer new + dedicated (`GitHub Activity`) so the schema stays clean.
4. **Secrets:** `NOTION_API_KEY` + `NOTION_DATABASE_ID` at org level, consumed by the action.

## Rollout

1. You ship the action (new or extend this one).
2. Bren drops the workflow into `CEF-AI/agent-catalog`.
3. Bren shares the Notion DB page with Lynn tonight, tests it as a digest source in a prompt.
Loading