Connect the Triage Workflow to Linear¶
| Category | AI Solutions Engineering |
| Status | ๐ก Partially completed |
| Repo | nextwork-connect-the-triage-workflow-to-linear |
| Original NextWork guide | nextwork.ai |
Learning project
Practice work following a NextWork guide, separate from my production projects.
๐ NextWork learning project. This is a practice project I built while working through NextWork's Connect the Triage Workflow to Linear guide. It is part of my Learning portfolio and is fully separate from my production projects.
Category: Learning โบ AI Solutions Engineering
Status: ๐ก Partially completed
Overview¶
Automatic triage is only useful if it files issues once, in the right place, and knows when to stop. My sync fingerprints every report, checks the tracker before creating, and holds anything it can't place.
Summary¶
I built my own triage-to-tracker sync in Python and tested it end to end against a local GraphQL stand-in, because there's no Linear workspace or API key here. Each report gets a team and a 1-4 priority from my rules. Reports no team matches are held for a person. Every filed issue carries a content fingerprint, so a whitespace-only repeat in the same batch and a full rerun both create nothing new. The stand-in server needs a bearer key (401 without one) and validates team and priority. On 7 sample reports: 5 created, 1 duplicate caught, 1 held; the rerun created 0. Partial: the tracker is my mock with Linear-style issueCreate and issues queries, not real Linear, and the triage is rule-based.
The checks behind this are in docs/verification.txt.
Skills & tools¶
Python, GraphQL, Flask, Idempotency, Shell testing
What I built¶
triage_sync.py:triage(team and priority rules),fingerprint(normalised content hash),Tracker(GraphQL client with a bearer key from the environment) andsync(hold, de-duplicate or create).mock_linear.py: a local GraphQL stand-in with key check, issueCreate validation, an issues filter and a teams list.reports.json: 7 sample reports I wrote, including a near-duplicate and an unplaceable one.tests/e2e.sh: starts the mock with a throwaway key, checks 401 without a key, syncs twice and asserts the counts.docs/e2e-run.txtis the output.
How to run¶
PY=python3 sh tests/e2e.sh
# against a real tracker: TRACKER_URL=... TRACKER_KEY=... python triage_sync.py reports.json
Verification¶
I ran the verification command on 2026-12-03. The full output is in docs/verification.txt.
PY=/workspace/nextwork-portfolio/.venv/bin/python PORT=5293 sh tests/e2e.sh > /tmp/linear-e2e.txt 2>&1; tail -1 /tmp/linear-e2e.txt; grep 'LINEAR SYNC OK' /tmp/linear-e2e.txt > /dev/null && echo LINEAR OK
What isn't done, and why¶
No Linear workspace, API key or webhook: the tracker is my local mock with a Linear-like GraphQL shape, and the fingerprint field (externalRef) is my own, not a Linear field. The triage is keyword rules, not a model.
Original project: https://nextwork.ai/projects/65ae18a6-092b-495e-9d52-009c49772c86 ยท Part of my NextWork Learning portfolio (hub).
Verification output¶
From docs/verification.txt:
$ PY=/workspace/nextwork-portfolio/.venv/bin/python PORT=5293 sh tests/e2e.sh > /tmp/linear-e2e.txt 2>&1; tail -1 /tmp/linear-e2e.txt; grep 'LINEAR SYNC OK' /tmp/linear-e2e.txt > /dev/null && echo LINEAR OK
LINEAR SYNC OK: created 5 dup 1 held 1; rerun created 0
LINEAR OK
[exit code 0]