Skip to content

Commit 1ab9397

Browse files
committed
chore: add triage-inbox skill for morning agent triage
Layer 1 of the multi-agent karrio engineering setup. Reads pending items from the Notion Agent Inbox database plus open GitHub issues, tags scope ([connector] [server] [frontend] [release] [bug] [PRD-needed]), ranks by risk + scope size, and surfaces the top 5 for human approval. Approval-gated by design: the skill never marks Inbox rows Approved, opens issues, or spawns workspaces on its own.
1 parent 8211f50 commit 1ab9397

2 files changed

Lines changed: 144 additions & 0 deletions

File tree

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Triage Inbox Skill
2+
3+
Pull pending items from the Notion **Agent Inbox** plus the karrio GitHub backlog, rank them, tag scope, and produce a ranked work list for the day. Approval-gated — never auto-acts on items.
4+
5+
## When to Use
6+
7+
- Start of a karrio working day (morning triage)
8+
- Before opening a new Conductor workspace ("what should I pick up?")
9+
- Whenever the Inbox grows beyond ~10 pending items
10+
11+
## Inputs
12+
13+
| Source | Tool | Filter |
14+
|---|---|---|
15+
| Notion Agent Inbox | `mcp__claude_ai_Notion__notion-fetch` on `collection://e8147767-2ae6-43df-a1f5-9d89c2312640` | `Status = Pending` and (`Agent = Eng` or `Agent` is empty) |
16+
| GitHub issues | `gh issue list --repo karrioapi/karrio --state open --limit 30` | recent open issues |
17+
| In-repo TODOs (optional) | `Grep "TODO\|FIXME"` | only when explicitly asked |
18+
19+
The Inbox schema:
20+
21+
| Field | Values |
22+
|---|---|
23+
| `Task` | title (required) |
24+
| `Status` | `Pending` / `Approved` / `Done` / `Rejected` |
25+
| `Risk Level` | `Low` / `Medium` / `High` |
26+
| `Suggested Action` | free text |
27+
| `Link` | URL (often a GH issue / PR / Notion doc) |
28+
| `Agent` | `Chief` / `Logger` / `Eng` / `Research` / `Admin` |
29+
30+
## Process
31+
32+
### 1. Pull pending items
33+
34+
```
35+
mcp__claude_ai_Notion__notion-search with
36+
query: "Pending"
37+
data_source_url: "collection://e8147767-2ae6-43df-a1f5-9d89c2312640"
38+
```
39+
40+
Then `gh issue list --repo karrioapi/karrio --state open --limit 30 --json number,title,labels,updatedAt`.
41+
42+
### 2. Tag each item by scope
43+
44+
Apply scope tags based on Task / Link content:
45+
46+
| Tag | Trigger keywords |
47+
|---|---|
48+
| `[connector]` | carrier name (UPS, FedEx, SmartKargo, ...), `mapper`, `proxy`, `provider`, `rate`, `tracking`, `shipment` |
49+
| `[server]` | `Django`, `migration`, `model`, `serializer`, `viewset`, `huey`, `graphql` |
50+
| `[frontend]` | `dashboard`, `next`, `react`, `apps/dashboard`, `packages/ui` |
51+
| `[release]` | `version`, `changelog`, `release`, `bump` |
52+
| `[bug]` | `bug`, `error`, `broken`, `regression`, `fix` |
53+
| `[PRD-needed]` | new feature, multi-module, schema change, breaking API — see `.claude/rules/prd-and-review.md` for the rule |
54+
| `[docs]` | `README`, `docs/`, `AGENTS.md`, doc-only |
55+
| `[chore]` | dependency bump, lint config, CI tweak |
56+
57+
Multiple tags allowed. Items with `[PRD-needed]` cannot be `Approved` until a PRD exists in `PRDs/`.
58+
59+
### 3. Rank
60+
61+
Sort by:
62+
1. `Risk Level = High` first (these are usually outages or release blockers)
63+
2. Items linked to an open GitHub issue with `bug` label
64+
3. Smallest scope first (single `[connector]` before cross-module work)
65+
4. Freshness (newer `createdTime` wins ties)
66+
67+
Cap output at **5 items**. Your Life OS rule is "max 3 priorities per week" — surface the top 5, the user picks.
68+
69+
### 4. Suggest workspace + role
70+
71+
For each surfaced item, recommend:
72+
73+
| Tag combo | Suggested skill / role |
74+
|---|---|
75+
| `[connector]` | `carrier-integration` skill, fresh Conductor workspace named `<carrier>-<short-task>` |
76+
| `[server]` + `[bug]` | `debugging` skill, current workspace OK |
77+
| `[server]` + `[PRD-needed]` | `create-prd` skill first, then fresh workspace |
78+
| `[frontend]` | fresh workspace, no skill yet (gap) |
79+
| `[release]` | `release` skill, dedicated release workspace |
80+
| `[bug]` no clear scope | gstack `/investigate` |
81+
82+
### 5. Output
83+
84+
Print a markdown table to chat (do **not** write to Notion until the user approves):
85+
86+
```
87+
## Triage — <date>
88+
89+
| # | Risk | Tags | Task | Suggested action | Workspace |
90+
|---|---|---|---|---|---|
91+
| 1 | High | [connector] [bug] | Fix smartkargo fractional seconds | `debugging` skill in cancun | (current) |
92+
| 2 | Med | [server] [PRD-needed] | Tenant-scoped webhook retries | Write PRD first | new: webhook-retries |
93+
| ... |
94+
```
95+
96+
Below the table, list:
97+
- **Skipped:** items that didn't make the top 5 with one-line reason each
98+
- **Inbox health:** count by Status, count by Agent — flag if Pending > 20
99+
100+
### 6. Approval gate (per Life OS rules)
101+
102+
Wait for the user to pick items. Do **not**:
103+
- Mark Inbox items `Approved` automatically
104+
- Open GitHub issues
105+
- Spawn Conductor workspaces
106+
107+
Once the user approves item N:
108+
- `mcp__claude_ai_Notion__notion-update-page` — set `Status = Approved` on that Inbox row
109+
- If they request a workspace, give them the exact Conductor command to run (don't run it yourself)
110+
111+
## Scheduling
112+
113+
To run this every weekday morning:
114+
115+
```
116+
/schedule create "Karrio morning triage" cron="0 8 * * 1-5" prompt="/triage-inbox"
117+
```
118+
119+
The schedule should produce the table only — actual approval happens when the user reads it.
120+
121+
## Anti-Patterns
122+
123+
- ❌ Auto-marking items `Done` based on commit messages — Logger agent's job, not Eng's
124+
- ❌ Triaging items where `Agent = Admin` or `Research` — wrong lane
125+
- ❌ Surfacing >5 items — defeats the purpose, your rule is max 3 priorities
126+
- ❌ Writing to the Daily Log database from this skill — that's the Logger's role
127+
- ❌ Skipping PRD detection — `[PRD-needed]` items going straight to code is the #1 way scope creeps
128+
129+
## Outputs This Skill Does NOT Produce
130+
131+
To stay in lane (single-responsibility):
132+
133+
- Daily Log entries → Logger agent
134+
- Decision Log entries → Chief of Staff
135+
- Weekly Reviews → separate `/retro` flow
136+
- Code changes → spawned specialist workspaces
137+
138+
## Reference
139+
140+
- Inbox schema: `collection://e8147767-2ae6-43df-a1f5-9d89c2312640`
141+
- Life OS doc: https://www.notion.so/3547c752109c80dc9938dd1bfc13e9f1
142+
- PRD rule: `.claude/rules/prd-and-review.md`
143+
- Conductor workspace conventions: one workspace = one task

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Skills in `.claude/skills/` provide step-by-step guides:
6262
- `project-setup/` — Environment setup, running servers, schema generation
6363
- `create-prd/` — Write PRDs with ASCII diagrams before non-trivial features
6464
- `review-implementation/` — Fresh-context review checklist for quality gates
65+
- `triage-inbox/` — Pull Notion Agent Inbox + GitHub backlog, rank, tag scope, surface top 5 (morning triage)
6566

6667
## Full Reference
6768

0 commit comments

Comments
 (0)