返回 CodeWhale
ISSUE_TRIAGE.md
根目录 / docs / ISSUE_TRIAGE.md
1 # Issue Triage
2
3 Triage decides which issues are startable and how a behaviour change is
4 recorded. The [Agent task](../.github/ISSUE_TEMPLATE/agent-task.yml) form
5 describes the shape an executable issue should have, but it no longer marks
6 itself executable: `agent-ready` is a maintainer grant. This page covers that
7 gate, the regression standard, the closing standard, and the `needs-info`
8 lifecycle that runs alongside them.
9
10 ## Startability
11
12 An issue is startable by an autonomous agent only when a maintainer has added
13 `agent-ready`. The Agent task form does not apply the label, so a reporter
14 cannot pre-authorise execution. Absence means the issue waits for triage: do
15 not implement it or dispatch a worker against it.
16
17 `agent-in-progress` and `needs-human` describe the state after work starts.
18 `autonomous-ready` remains the stronger autonomous-loop grant; whether to reuse
19 it, a milestone, or a maintainer comment is the maintainer's choice.
20
21 ## Regressions
22
23 A behaviour change is a **regression** when all three hold:
24
25 1. the behaviour was documented — a `docs/features.toml` row, a `docs/*.md`
26 statement, or a guard test;
27 2. it changed or disappeared; and
28 3. the commit did not say so.
29
30 Otherwise it is a normal change. Record a regression with the existing scale,
31 not a new label:
32
33 - `priority:p1` at minimum;
34 - `release-blocker` at a maintainer's decision;
35 - `priority:p0` only when data loss, security, or the release path is involved.
36
37 `release-blocker` is protected from stale cleanup, so marking one also keeps
38 the issue out of automated closure. Every regression should gain a positive
39 guard in `crates/engine/tests/behavioural_guards.rs` when the behaviour is
40 expressible there, so a later rename cannot invert it silently.
41
42 The protocol is forward-looking: it does not re-tag history. The skills-index
43 case (#7432) is closed by restoring the parent-prompt behaviour or by
44 correcting the docs to state that the parent renders no index; either is
45 acceptable, leaving the docs wrong is not. That choice belongs to a maintainer.
46
47 ## Closing an issue
48
49 An issue whose body asks for a user-observable outcome may be closed when that
50 outcome is demonstrable — a measurement, a config showing the new value in
51 effect, or a transcript. "The implementation is in source" is not a closing
52 standard. If the requested outcome is not observable yet, leave the issue open
53 and say what remains.
54
55 ## Stale `needs-info` cleanup
56
57 The stale workflow only acts on issues that a maintainer has explicitly labeled
58 `needs-info`. This keeps old roadmap, release, security, and current milestone
59 work out of automatic cleanup unless a maintainer first marks the issue as
60 waiting on reporter input.
61
62 Required labels:
63
64 - `needs-info`: waiting on reporter information or current-version reproduction details.
65 - `stale`: inactive `needs-info` issue pending automatic closure.
66 - `keep-open`: protected because maintainers intentionally keep it open.
67 - `pinned`: protected maintainer issue.
68
69 Protected labels for stale cleanup:
70
71 - `pinned`
72 - `keep-open`
73 - `release-blocker`
74 - `security`
75
76 A `bug` issue is not protected just because it is a bug. If a maintainer has
77 also labeled it `needs-info`, it is eligible for stale warning and closure
78 unless one of the protected labels above is present.
79
80 ## Dry-run queries
81
82 Run these before changing stale policy or doing a manual cleanup pass:
83
84 ```sh
85 STALE_CUTOFF=$(python3 -c 'from datetime import date, timedelta; print(date.today() - timedelta(days=45))')
86 NEEDS_INFO_CUTOFF=$(python3 -c 'from datetime import date, timedelta; print(date.today() - timedelta(days=30))')
87
88 gh issue list --repo codewhale-hq/CodeWhale --state open \
89 --search "updated:<${STALE_CUTOFF}" \
90 --limit 100 \
91 --json number,title,updatedAt,labels,url
92
93 gh issue list --repo codewhale-hq/CodeWhale --state open \
94 --search "label:needs-info updated:<${NEEDS_INFO_CUTOFF}" \
95 --limit 100 \
96 --json number,title,updatedAt,labels,url
97
98 gh issue list --repo codewhale-hq/CodeWhale --state open \
99 --search "created:<${STALE_CUTOFF} comments:0 -label:keep-open -label:release-blocker -label:security" \
100 --limit 100 \
101 --json number,title,createdAt,updatedAt,labels,url
102 ```
103
104 Use `updatedAt`, labels, and current release relevance as the closure basis.
105 Creation date alone is too aggressive.
106
107 ## First cleanup pass
108
109 Before relying on automation, perform one manual pass:
110
111 - Label unresolved old bug reports as `needs-info` only after asking for
112 current-version reproduction details.
113 - Close obvious GUI, VS Code, and web UI duplicates with links to canonical
114 desktop/runtime issues.
115 - Close old brand-discussion issues as superseded when the Codewhale rebrand
116 and README/history work already covers them.
117 - Protect intentional roadmap shards with `keep-open` or close them as
118 superseded by a canonical epic.
119
120 Do not close release blockers, security issues, or active milestone work from
121 stale automation alone.
122
122 lines MARKDOWN