You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(papercuts): triage overlay and an agent-facing CLI (show, list, mark) #24
Stages 3 and 4 of docs/fork/papercuts.md need a place to record what happened to a report: triaged, issue linked, fixed in build X, dismissed, reopened. Today PapercutStatus has five values but only new is ever written (apps/server/src/papercuts/Papercuts.ts:272), there is no way to read one record in full, and the only CLI verb is list (apps/server/src/cli/papercuts.ts). An agent that triages or fixes needs show and mark.
What the code shows
The live server owns the record files and writes them atomically (Papercuts.ts:267-288). A second process rewriting those files would race the server and would blur what the client originally sent.
listPapercutRecords already reads the directory directly and the CLI works with the server stopped.
Plan
Records stay immutable. Triage state lives in an overlay file <id>.triage.json beside the record. Append-only history: [{ at, status, by, note }], plus optional summary, classification, signature, clusterId, issueUrl, fixedInVersion. Effective status is the latest history entry, else the record's own new. Reversal is appending another entry, so every status is reachable from every other (dismissed is reopenable).
SchemaPapercutTriage in packages/contracts/src/papercut.ts, additive.
CLIt3 papercuts:
list [--status s] [--since t] [--json] shows effective status.
Part of #22. Wave 1, independent.
Problem
Stages 3 and 4 of
docs/fork/papercuts.mdneed a place to record what happened to a report: triaged, issue linked, fixed in build X, dismissed, reopened. TodayPapercutStatushas five values but onlynewis ever written (apps/server/src/papercuts/Papercuts.ts:272), there is no way to read one record in full, and the only CLI verb islist(apps/server/src/cli/papercuts.ts). An agent that triages or fixes needsshowandmark.What the code shows
Papercuts.ts:267-288). A second process rewriting those files would race the server and would blur what the client originally sent.listPapercutRecordsalready reads the directory directly and the CLI works with the server stopped.Plan
<id>.triage.jsonbeside the record. Append-onlyhistory: [{ at, status, by, note }], plus optionalsummary,classification,signature,clusterId,issueUrl,fixedInVersion. Effective status is the latest history entry, else the record's ownnew. Reversal is appending another entry, so every status is reachable from every other (dismissedis reopenable).PapercutTriageinpackages/contracts/src/papercut.ts, additive.t3 papercuts:list [--status s] [--since t] [--json]shows effective status.show <id> [--json]prints the whole record and overlay, the screenshot path, and (once feat(papercuts): capture the server's full picture at report time #26 lands) the trace slice path. No redaction: within the loop, agents read everything (decision 2026-10-05).mark <id> <status> [--issue url] [--fixed-in version] [--note text].list..jsonrecord or the SQLite database.listshows the record asnewand flags the overlay.Acceptance
markrefusing unknown ids.t3 papercuts show <id>is enough for an agent to start work without opening the data directory by hand.Surfaces and decisions
apps/server/src/mcp/toolkits/) is deferred until an agent that cannot run commands needs it.Related
#22, #26, #29, #30.