-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: replace backlog-triage judgment heuristics with prompt guidance (#358) #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d0b12f8
e17c018
4ff2f45
3c6cea4
3d16ca9
57d2d38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,4 +5,3 @@ activity_days: | |
| warm: 14 | ||
| cold: 60 | ||
| stale_days: 60 | ||
| duplicate_threshold: 0.75 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,8 +25,8 @@ Phase 1 — Report (default, read-only) Phase 2 — Apply (explicit mutation | |
| | Phase | Step | Completion boundary | | ||
| | --- | --- | --- | | ||
| | Report | Collect | One `gh` fetch writes a snapshot JSON; downstream steps use `--snapshot PATH` and do not re-fetch. | | ||
| | Report | Analyze | Classification, relationships, stale/obsolete signals, Alignment, and Decision Review are computed from the same snapshot/spec evidence. | | ||
| | Report | Render | One markdown report is written with anchored proposals and a consolidated Apply Checklist. | | ||
| | Report | Analyze | Classification and deterministic signals come from scripts; the model judges blocks/depends-on/duplicates, priority, and milestone actions from the snapshot and writes them to a `--model-actions` JSON file. Alignment and Decision Review are prompt-driven from the same evidence. | | ||
| | Report | Render | `triage-report.js` validates the model actions, merges them with deterministic signals, and writes one markdown report with anchored proposals and a consolidated Apply Checklist. | | ||
|
Comment on lines
+28
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
제공된 Also applies to: 71-80, 148-152 🤖 Prompt for AI Agents |
||
| | Apply | Review | A human accepts proposals by flipping paired checkboxes from `[ ]` to `[x]`; unchecked anchors remain inert. | | ||
| | Apply | Dry-run | `triage-apply.js <report.md>` prints intended `gh` mutations without writing. | | ||
| | Apply | Mutate | `triage-apply.js <report.md> --apply` executes only accepted actions; `--yes` is required for non-interactive apply. | | ||
|
|
@@ -68,14 +68,16 @@ The report is a derived artifact under `backlog/triage/`. GitHub Issues remain t | |
| Required sections: | ||
|
|
||
| - `## Classification` — issue buckets by theme, label, age, activity, and milestone state. | ||
| - `## Relationships` — mentions, blocks, depends-on, duplicate candidates, and merged closing PR links. | ||
| - `## Relationships` — deterministic mentions/comment-mentions/merged-PR links from scripts, plus model-judged blocks, depends-on, and duplicate-candidate edges passed via `--model-actions`. | ||
| - `## Obsolete Candidates` — anchored close/revisit proposals with evidence. | ||
| - `## Priority Proposals` — anchored priority proposals with rationale. | ||
| - `## Milestone Suggestions` — anchored milestone proposals grouped into candidate sprint clusters. | ||
| - `## Priority Proposals` — model-judged anchored priority proposals with rationale (delivered via `--model-actions`). | ||
| - `## Milestone Suggestions` — model-judged anchored milestone proposals grouped into candidate sprint clusters (delivered via `--model-actions`). | ||
| - `## Alignment` — objective coverage, orphan work, neglected objectives, contradictions, and proposed charter changes; when no charter exists, record that alignment was skipped. | ||
| - `## Decision Review` — `Do Now`, `Shape First`, `Defer`, and `Drop / Close`. | ||
| - `## Apply Checklist` — consolidated review surface for every anchored action. | ||
|
|
||
| Judgment distribution: scripts own deterministic signals (issue refs, merged-PR links, dates, labels); the model owns semantic judgment (blocks, depends-on, duplicates, priority and milestone proposals). The model's judgment is rendered by `triage-report.js` from a `--model-actions` JSON file, so anchor formatting, dedupe, and the Apply Checklist stay deterministic. | ||
|
|
||
| Full section examples and rubric details live in `references/classification.md`, `references/relationships.md`, `references/stale.md`, `references/decision-review.md`, and `references/apply.md`. | ||
|
|
||
| ## Relationship To dev-backlog | ||
|
|
@@ -105,19 +107,55 @@ node "$skill_dir/scripts/triage-collect.js" --dry-run --json | |
| node "$skill_dir/scripts/triage-apply.js" backlog/triage/YYYY-MM-DD-report.md | ||
| ``` | ||
|
|
||
| Model-judged actions (`--model-actions`) are a JSON array of action objects. Sections `priority` / `milestone` / `obsolete` carry a positive `issueNumber`, `verb`, `summary`, and `args` with the mutation payload; section `relationship` carries `args.from` / `args.to` / `args.kind` for a model-judged edge. `triage-report.js` validates every entry before rendering (see `references/apply.md` for the anchor grammar each verb maps to): | ||
|
|
||
| ```json | ||
| [ | ||
| { | ||
| "section": "priority", | ||
| "verb": "set-priority", | ||
| "issueNumber": 42, | ||
| "args": { "value": "high", "reason": "customer-reported outage blocks the auth theme" }, | ||
| "summary": "Set priority:high on #42 — customer-reported outage blocks the auth theme" | ||
| }, | ||
| { | ||
| "section": "milestone", | ||
| "verb": "assign-milestone", | ||
| "issueNumber": 43, | ||
| "args": { "name": "Sprint W34" }, | ||
| "cluster": "auth", | ||
| "sprintName": "Sprint W34", | ||
| "summary": "Assign Sprint W34 to #43 — auth cluster" | ||
| }, | ||
| { | ||
| "section": "obsolete", | ||
| "verb": "close-duplicate", | ||
| "issueNumber": 44, | ||
| "args": { "target": "#12", "reason": "open issue duplicates closed #12" }, | ||
| "summary": "Close duplicate #44 into #12 — open issue duplicates closed #12" | ||
| }, | ||
| { | ||
| "section": "relationship", | ||
| "verb": "edge", | ||
| "args": { "from": 45, "to": 46, "kind": "blocks", "evidence": { "phrase": "Blocks #46" } }, | ||
| "summary": "Blocks edge 45 -> 46" | ||
| } | ||
| ] | ||
| ``` | ||
|
|
||
| Useful scripts: | ||
|
|
||
| - `scripts/triage-collect.js [--repo OWNER/REPO] [--limit N] [--json] [--dry-run] [--with-comments] [--with-closed-issues]` — fetch open issues and write `backlog/triage/.cache/<ISO-timestamp>.json`; `--with-comments` enables comment-mention edges and `--with-closed-issues` enables duplicate-of-closed signals, see `references/classification.md`. | ||
| - `scripts/triage-relate.js --snapshot PATH [--json]` — detect mentions, blocks, depends-on, duplicates, and merged PR links. | ||
| - `scripts/triage-stale.js --snapshot PATH [--since N] [--json]` — flag stale/obsolete candidates with evidence. | ||
| - `scripts/triage-report.js --snapshot PATH [--relate PATH] [--stale PATH] [--active-sprint PATH] [--out PATH] [--json]` — render report; creates `.bak` on overwrite. | ||
| - `scripts/triage-collect.js [--repo OWNER/REPO] [--limit N] [--json] [--dry-run] [--with-comments] [--with-closed-issues]` — fetch open issues and write `backlog/triage/.cache/<ISO-timestamp>.json`; `--with-comments` hydrates comment bodies and `--with-closed-issues` enriches the snapshot with recent closed issues for the model's duplicate judgment, see `references/classification.md`. | ||
| - `scripts/triage-relate.js --snapshot PATH [--json]` — deterministic edges: mentions, comment-mentions, and merged closing PR links. | ||
| - `scripts/triage-stale.js --snapshot PATH [--since N] [--json]` — deterministic stale/obsolete candidates from dates and labels. | ||
| - `scripts/triage-report.js --snapshot PATH [--relate PATH] [--stale PATH] [--active-sprint PATH] [--model-actions PATH] [--out PATH] [--json]` — render report; model-judged actions (blocks/depends-on/duplicate edges, priority and milestone proposals) come from `--model-actions` JSON; creates `.bak` on overwrite. | ||
| - `scripts/triage-apply.js <report.md> [--apply] [--yes] [--json]` — parse accepted anchors and execute/dry-run GitHub mutations. | ||
| - `scripts/triage-apply.integration.test.js` — opt-in live integration test against the disposable sandbox repo; requires `TRIAGE_APPLY_INTEGRATION=1` and `GH_TOKEN`. | ||
|
|
||
| ## References | ||
|
|
||
| - `references/classification.md` — bucketing rules and YAML config schema. | ||
| - `references/relationships.md` — relationship heuristics and evidence format. | ||
| - `references/relationships.md` — deterministic edge rules and the model-judged blocks/depends-on/duplicate rubric. | ||
| - `references/stale.md` — obsolescence signals, thresholds, and suggested-action grammar. | ||
| - `references/apply.md` — anchor grammar, parse rules, idempotency contract, and apply-log schema. | ||
| - `references/decision-review.md` — prompt-driven Do Now / Shape First / Defer / Drop rubric. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the documented workflow,
triage-collect.jsis still invoked without--with-closed-issues, so the snapshot contains noclosed_issuesevidence even though this new model step advertises duplicate edges and replaces duplicate-of-closed detection. Because the skill defines the snapshot as the canonical input and forbids downstream re-fetches, following this command sequence cannot produce duplicate-of-closed proposals; add the collection flag to this workflow (and the matching workflow-patterns example) or narrow the advertised scope to open/open duplicates.Useful? React with 👍 / 👎.