Commit bfe812b
committed
feat(workflows): add repo-triage — 6-node periodic maintenance workflow
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.1 parent 60eeb00 commit bfe812b
2 files changed
Lines changed: 1342 additions & 0 deletions
0 commit comments