From bfe812b4e8ec912d0af04a0f7c1d042486a6e2c4 Mon Sep 17 00:00:00 2001 From: Rasmus Widing Date: Sun, 19 Apr 2026 09:17:56 +0300 Subject: [PATCH 1/3] =?UTF-8?q?feat(workflows):=20add=20repo-triage=20?= =?UTF-8?q?=E2=80=94=206-node=20periodic=20maintenance=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds .archon/workflows/repo-triage.yaml: a self-contained periodic maintenance workflow that uses inline sub-agents (Claude SDK agents: field introduced in #1276) for map-reduce across open issues and PRs. Six DAG nodes, three-layer topology: - Layer 1 (parallel): triage-issues, link-prs, closed-pr-dedup-check, stale-nudge - Layer 2: closed-dedup-check (reads triage-issues state) - Layer 3: digest (synthesises all prior nodes + writes markdown) Capabilities per node: - triage-issues: delegates labeling to on-disk triage-agent; inline brief-gen Haiku for duplicate detection; 3-day auto-close clock for unanswered duplicate warnings - link-prs: conservative PR ↔ issue cross-refs via inline pr-issue- matcher Haiku, Sonnet re-verifies fully-addresses claims before suggesting Closes #X; auto-nudges on low-quality PR template fill with first-run grandfather guard (snapshot-only, no nudge spam) - closed-dedup-check: cross-matches open issues against recently- closed ones via inline closed-brief-gen Haiku; same 3-day clock - closed-pr-dedup-check: flags open PRs duplicating recently-closed PRs via inline pr-brief-gen Haiku; comment-only, never closes PRs - stale-nudge: 60-day inactivity pings (configurable); no auto-close - digest: synthesises per-node outputs + reads state files to emit $ARTIFACTS_DIR/digest.md with clickable GitHub comment links Env-gated rollout knobs: - DRY_RUN=1 (read-only; prints [DRY] lines, no gh/state mutations) - SKIP_PR_LINK=1, SKIP_CLOSED_DEDUP=1, SKIP_CLOSED_PR_DEDUP=1, SKIP_STALE_NUDGE=1 - STALE_DAYS=N (stale-nudge window; default 60) Cross-run state under .archon/state/ (gitignored): - triage-state.json briefs + pendingDedupComments - closed-dedup-state.json closedBriefs + closedMatchComments - closed-pr-dedup-state.json openBriefs + closedBriefs + matches - pr-state.json linkedPrs + commentIds + templateAdherence - stale-nudge-state.json nudged (with updatedAtAtNudge for re-nudge) Every bot comment: - @-tags the target human (reporter for issues, author for PRs) - Tracks comment ID in state for traceability - Is idempotent — re-runs skip existing comments Intended use: invoke periodically (`archon workflow run repo-triage --no-worktree`) once a scheduler lands; live state persists across runs so previously-flagged items reconcile correctly. .gitignore: adds .archon/state/ for cross-run memory files. --- .archon/workflows/repo-triage.yaml | 1339 ++++++++++++++++++++++++++++ .gitignore | 3 + 2 files changed, 1342 insertions(+) create mode 100644 .archon/workflows/repo-triage.yaml diff --git a/.archon/workflows/repo-triage.yaml b/.archon/workflows/repo-triage.yaml new file mode 100644 index 0000000000..0928f3f3d8 --- /dev/null +++ b/.archon/workflows/repo-triage.yaml @@ -0,0 +1,1339 @@ +name: repo-triage +description: >- + Periodic repo maintenance — in parallel, triages open issues (labels + + dedup detection + 3-day auto-close) and cross-references open PRs against + open issues (conservative: suggests Closes #X only when a PR fully + addresses an issue, never closes anything itself). State is persisted + under .archon/state/ so prior runs are remembered. Designed for periodic + runs; safe to re-run; idempotent. +interactive: false + +nodes: + # --------------------------------------------------------------------------- + # Issue triage — runs concurrently with pr-link (no depends_on between them). + # --------------------------------------------------------------------------- + - id: triage-issues + model: sonnet + allowed_tools: [Bash, Read, Write, Task] + agents: + brief-gen: + description: >- + Reads a single GitHub issue and returns a concise JSON brief, + plus a template-adherence check if the caller provided template + context. Used for duplicate detection + template-fill reporting. + model: haiku + tools: [Bash, Read] + prompt: | + You are a concise GitHub issue summariser. The caller's prompt + will include an issue number AND (optionally) the issue + templates from `.github/ISSUE_TEMPLATE/`. + + Fetch the issue: + gh issue view --json number,title,body,labels,author + + Return ONLY a single JSON object — no fences, no prose: + + { + "number": , + "summary": "2-3 sentence neutral summary", + "primarySymptom": "one short sentence — the core symptom or ask", + "area": "best-guess tag, e.g. backend, frontend, docs, core, isolation, cli, workflows, providers", + "templateAdherence": { + "templateType": "bug_report | feature_request | other | none", + "sectionsFilled": ["
"], + "sectionsMissing": ["