feat(maintainer): Pi/Minimax variant of repo-triage#1562
Conversation
Adds repo-triage-minimax.yaml — a Pi/Minimax M2.7 port of the existing repo-triage workflow. Identical DAG shape, state files, and guardrails; all four LLM-orchestrated nodes rewritten to do per-issue/per-PR work inline since Pi has no Task tool / inline sub-agents. Differences from the Claude variant: - Drops the four `agents:` blocks (brief-gen, closed-brief-gen, pr-brief-gen, pr-issue-matcher) — Pi can't invoke them. - Removes Task from `allowed_tools` for every prompt node. - Each "BRIEF/MATCH PASS" reads the gh JSON dump once and processes every entry inline; JSON shapes that the deleted sub-agents returned are now spec'd in the orchestrator prompt. - Skips the LABEL pass — labelling requires Claude's Task tool to invoke the on-disk triage-agent sub-agent. Run repo-triage.yaml (the Claude variant) when label-coverage matters. Validates clean: 1 valid, 0 errors, 0 warnings.
📝 WalkthroughWalkthroughAdds a comprehensive Archon repository maintenance workflow with five concurrent nodes—triage-issues, closed-dedup-check, closed-pr-dedup-check, link-prs, and stale-nudge—that periodically identify and reconcile duplicate issues/PRs, link PRs to issues, post reminders, and synthesize findings into a maintainer digest. ChangesRepository Triage and Deduplication Workflow
Sequence DiagramsequenceDiagram
participant GitHub as GitHub API
participant Triage as triage-issues
participant ClosedDedup as closed-dedup-check
participant ClosedPRDedup as closed-pr-dedup-check
participant LinkPRs as link-prs
participant StaleNudge as stale-nudge
participant Digest as digest
participant State as State Files
participant Slack as Slack (optional)
Triage->>GitHub: Fetch open issues & templates
Triage->>Triage: Compute brief summaries
Triage->>Triage: Cluster & identify duplicates
Triage->>GitHub: Post dedup comments
Triage->>State: Save triage-state.json
Triage-->>ClosedDedup: ✓ Node complete
ClosedDedup->>State: Read triage state
ClosedDedup->>GitHub: Fetch recently closed issues
ClosedDedup->>GitHub: Post resolution comments
ClosedDedup->>GitHub: Auto-close (3-day check)
ClosedDedup->>State: Save closed-dedup-state.json
ClosedDedup-->>ClosedPRDedup: ✓ Node complete
ClosedPRDedup->>GitHub: Fetch open & closed PRs
ClosedPRDedup->>GitHub: Fetch PR diffs
ClosedPRDedup->>GitHub: Post informational comments
ClosedPRDedup->>State: Save closed-pr-dedup-state.json
ClosedPRDedup-->>LinkPRs: ✓ Node complete
LinkPRs->>GitHub: Fetch open PRs & issues
LinkPRs->>LinkPRs: Match via diffs
LinkPRs->>GitHub: Post Closes/related comments
LinkPRs->>GitHub: Post template nudges
LinkPRs->>State: Save pr-state.json
LinkPRs-->>StaleNudge: ✓ Node complete
StaleNudge->>GitHub: Fetch quiet issues & PRs
StaleNudge->>GitHub: Post stale reminders
StaleNudge->>State: Save stale-nudge-state.json
StaleNudge-->>Digest: ✓ Node complete
Digest->>State: Read all state files
Digest->>Digest: Build digest.md
Digest->>Digest: Index comment URLs
Digest->>Digest: Carry forward 3-day items
Digest->>Slack: Post optional summary
Digest->>Digest: Output final digest
Estimated Code Review Effort🎯 5 (Critical) | ⏱️ ~120 minutes The workflow introduces 1456 lines of intricate, multi-node orchestration logic with stateful reconciliation, conservative deduplication heuristics, idempotency guarantees, and 3-day clock semantics across six interdependent nodes. Each node combines GitHub API interaction, cached state merging, bot-comment tracking, and atomic writes with multiple conditional branches and guardrails. The complexity density, multi-file state management, sequential dependency chain, and need to verify logic correctness across DRY_RUN modes and concurrent/serial execution patterns demands careful, line-by-line review. Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.archon/workflows/maintainer/repo-triage-minimax.yaml (2)
458-463: 💤 Low valueMinor documentation clarification.
Lines 461-462 could be slightly clearer. "Only drop entry on exit 0" followed by "Drop entry from state" on a separate bullet reads as two separate actions. Consider consolidating:
- - Only drop entry on exit 0. - - Drop entry from state. + - Only drop entry from state on close success (exit 0).This is purely a wording nit — the logic described is correct.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.archon/workflows/maintainer/repo-triage-minimax.yaml around lines 458 - 463, Consolidate the two bullets that read "Only drop entry on exit 0" and "Drop entry from state" into a single, clear action under the `gh issue close <O> --reason "not planned"` branch: indicate that on exit code 0 you should drop the entry from state (and on non-zero set `closeAttemptFailed: true`, log the failure, and do not drop state). Update the bullet list so the successful-exit behavior and the drop-from-state action are one line to avoid implying two separate actions.
863-867: 💤 Low valueClarify or remove potentially misleading cross-reference.
Lines 863-867 mention "
closed-pr-dedup-checkfeeds this pattern too", butlink-prsoperates on its own state file (pr-state.json) and doesn't consume briefs fromclosed-pr-dedup-state.json. ThediffTruncatedhandling described here applies to PRs processed withinlink-prsitself.Consider removing the
closed-pr-dedup-checkreference to avoid confusion, or clarify that this is a general principle applicable to both nodes independently.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.archon/workflows/maintainer/repo-triage-minimax.yaml around lines 863 - 867, The cross-reference is misleading: update the text so it no longer implies `closed-pr-dedup-check` consumes the `link-prs` briefs; either remove the phrase "`closed-pr-dedup-check` feeds this pattern too" or rewrite it to state the principle applies independently to both nodes. Specifically mention that `link-prs` uses `pr-state.json` and `closed-pr-dedup-check` uses `closed-pr-dedup-state.json`, and clarify that when `diffTruncated: true` any `fully-addresses`-style claim should be downgraded to `related` in each node's processing (e.g., when `link-prs` sees `diffTruncated` in a brief it downgrades `fully-addresses` → `related`).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.archon/workflows/maintainer/repo-triage-minimax.yaml:
- Around line 458-463: Consolidate the two bullets that read "Only drop entry on
exit 0" and "Drop entry from state" into a single, clear action under the `gh
issue close <O> --reason "not planned"` branch: indicate that on exit code 0 you
should drop the entry from state (and on non-zero set `closeAttemptFailed:
true`, log the failure, and do not drop state). Update the bullet list so the
successful-exit behavior and the drop-from-state action are one line to avoid
implying two separate actions.
- Around line 863-867: The cross-reference is misleading: update the text so it
no longer implies `closed-pr-dedup-check` consumes the `link-prs` briefs; either
remove the phrase "`closed-pr-dedup-check` feeds this pattern too" or rewrite it
to state the principle applies independently to both nodes. Specifically mention
that `link-prs` uses `pr-state.json` and `closed-pr-dedup-check` uses
`closed-pr-dedup-state.json`, and clarify that when `diffTruncated: true` any
`fully-addresses`-style claim should be downgraded to `related` in each node's
processing (e.g., when `link-prs` sees `diffTruncated` in a brief it downgrades
`fully-addresses` → `related`).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 6140b273-47ca-460b-9902-7a261270eae7
📒 Files selected for processing (1)
.archon/workflows/maintainer/repo-triage-minimax.yaml
Adds repo-triage-minimax.yaml — a Pi/Minimax M2.7 port of the existing repo-triage workflow. Identical DAG shape, state files, and guardrails; all four LLM-orchestrated nodes rewritten to do per-issue/per-PR work inline since Pi has no Task tool / inline sub-agents. Differences from the Claude variant: - Drops the four `agents:` blocks (brief-gen, closed-brief-gen, pr-brief-gen, pr-issue-matcher) — Pi can't invoke them. - Removes Task from `allowed_tools` for every prompt node. - Each "BRIEF/MATCH PASS" reads the gh JSON dump once and processes every entry inline; JSON shapes that the deleted sub-agents returned are now spec'd in the orchestrator prompt. - Skips the LABEL pass — labelling requires Claude's Task tool to invoke the on-disk triage-agent sub-agent. Run repo-triage.yaml (the Claude variant) when label-coverage matters. Validates clean: 1 valid, 0 errors, 0 warnings.
Summary
repo-triage.yaml(Claude variant) is the only triage workflow; running it on every cadence burns Claude tokens and is blocked when the nested-Claude-Code session bug (2 issues: v0.3.5: CLI workflow run silently hangs — dotenv loads .env from CWD instead of ~/.archon/.env,, + rchon serve hardcodes skipPlatformAdapters:true — Telegram/Discord/Slack adapters are unreachable #1067) hits.maintainer-standup-minimax.yaml(feat(maintainer): Pi/Minimax variant of maintainer-standup + dual-format persist #1480) — a Pi/Minimax M2.7 port lets the daily/weekly maintenance run cheaply and avoids the nested-Claude class of failure..archon/workflows/maintainer/repo-triage-minimax.yaml. Identical DAG shape and state files as the Claude variant; all four LLM-orchestrated nodes rewritten to process issues/PRs inline (Pi has noTasktool / no inline sub-agents).repo-triage.yamlis untouched. State files (.archon/state/triage-state.json,closed-dedup-state.json,closed-pr-dedup-state.json,pr-state.json,stale-nudge-state.json) are wire-compatible with the Claude variant — runs of either workflow can resume from the other's state.UX Journey
Before
After (additive — Claude path unchanged)
Architecture Diagram
Before
After
Connection inventory:
repo-triage-minimax.yaml.archon/state/triage-state.jsonrepo-triage-minimax.yaml.archon/state/closed-dedup-state.jsonrepo-triage-minimax.yaml.archon/state/closed-pr-dedup-state.jsonrepo-triage-minimax.yaml.archon/state/pr-state.jsonrepo-triage-minimax.yaml.archon/state/stale-nudge-state.jsonrepo-triage-minimax.yaml.claude/agents/triage-agent.mdrepo-triage.yamlLabel Snapshot
risk: lowsize: Mworkflowsworkflows:maintainerChange Metadata
featureworkflowsLinked Issue
Validation Evidence
bun run validate(full suite — no code changed; YAML-only PR)Security Impact
NoNo(samegh+ Slack-webhook surface as Claude variant)NoNo(writes only under.archon/state/and$ARTIFACTS_DIR, identical to Claude variant)Compatibility / Migration
Yes— additive; existingrepo-triage.yamluntouched.No— uses the sameDRY_RUN,SKIP_*, andSLACK_WEBHOOKenv vars as the Claude variant.Nobun run cli workflow run repo-triage-minimax.Human Verification
bun run cli validate workflows repo-triage-minimaxpasses clean (no warnings).repo-triage.yaml: identical DAG (triage-issues→closed-dedup-check,triage-issues→link-prs, standaloneclosed-pr-dedup-checkandstale-nudge, all →digest).agents:blocks,Taskcalls, and named sub-agents (brief-gen,closed-brief-gen,pr-brief-gen,pr-issue-matcher,triage-agent) has been removed or converted to a negative ("no Task fan-out") instruction.[DRY] would ...instructions remain, just without the Task-prepend sub-bullet).DRY_RUN=1before any live invocation. (The Claude variant's behavioural guarantees apply.)Side Effects / Blast Radius
repo-triage-minimax. No effect on default workflows or any code path.repo-triage.yamlleft briefs intriage-state.json, the Pi variant will re-shape them on its next BRIEF PASS (same JSON shape — no data loss; cached briefs are simply re-validated against new sha digests).Rollback Plan
git revert <commit>orrm .archon/workflows/maintainer/repo-triage-minimax.yaml.SKIP_CLOSED_DEDUP,SKIP_CLOSED_PR_DEDUP,SKIP_PR_LINK,SKIP_STALE_NUDGE) work identically to the Claude variant.$ARTIFACTS_DIR/digest.mdand the per-node summaries.Risks and Mitigations
fully-addressesjudgements than Sonnet, leading to noisy or wrong dedup comments.related", "when in doubt, skip"); operator runs DRY_RUN first; the Claude variant remains the gold-standard fallback.gh issue list --limit 200cap is unchanged. If a run truncates, increase the cap or fall back to the Claude variant (which uses Task fan-out).Summary by CodeRabbit