Repository navigation
Add maintainer loop (orchestrator + triage skills) - #1
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request introduces a self-running maintenance loop for repositories using Claude Code Routines. It adds two Claude skills (github-project-triage and maintainer-orchestrator) along with a documentation guide (docs/MAINTAINER_LOOP.md). Feedback on the changes highlights that the GitHub API does not support state_reason: duplicate or duplicate_of parameters, which would cause API errors when the orchestrator attempts to close duplicate ledgers. Additionally, the referenced script scripts/fanout-maintainer-skills.sh is missing from the pull request.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| `🤖 Maintainer Loop — Ledger`. **Exactly one must stay open.** If several are | ||
| open — two runs can race and each create one — keep the **lowest-numbered** | ||
| open ledger, close the rest as duplicates (`state_reason: duplicate` with | ||
| `duplicate_of` set to the survivor), and continue on the survivor. If none exists, create it, ensure the |
There was a problem hiding this comment.
This section instructs the orchestrator to close duplicate ledgers using state_reason: duplicate and duplicate_of. However, the GitHub REST and GraphQL APIs do not support duplicate as a valid value for state_reason (only completed and not_planned are supported for closed issues), nor is there a duplicate_of parameter. Attempting to use these will result in a 422 Unprocessable Entity API error. Please update this instruction to close the duplicates using state_reason: not_planned along with a comment linking to the survivor ledger.
| Close duplicate ledgers via the connector/REST API so `state_reason: duplicate` | ||
| (+ `duplicate_of`) sticks — verified working. Note `gh issue close --reason` | ||
| accepts only `completed`/`not_planned`, so if you must use `gh`, close with | ||
| `not_planned` and a comment linking the survivor instead. |
There was a problem hiding this comment.
As noted in the ledger discovery section, the GitHub REST API does not support state_reason: duplicate or a duplicate_of parameter. To prevent the orchestrator from encountering API errors when attempting to close duplicate ledgers, the instructions should be updated to use state_reason: not_planned (or completed) and post a comment linking to the survivor ledger, similar to the fallback behavior described for the gh CLI.
| ```bash | ||
| # Copy the skills + this runbook into every ITSEZMONEY repo and open a PR each. | ||
| scripts/fanout-maintainer-skills.sh # all org repos (needs gh + perms) | ||
| scripts/fanout-maintainer-skills.sh repo-a repo-b # just these | ||
| ``` |
There was a problem hiding this comment.
The script scripts/fanout-maintainer-skills.sh referenced in this section is not included in the pull request. Since this script is documented as the primary way to fan out the maintainer skills to other repositories, please ensure it is added to the repository or update the documentation if it is located elsewhere.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47d7893b62
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - It touches **none** of: auth, payments/Stripe, `certificates/` or any | ||
| key/secret, DB schema or migrations (`shared/schema.ts`, drizzle), CI/release | ||
| config, or anything in `.env*`. |
There was a problem hiding this comment.
Protect Trackfa.st's event schema from auto-merge
For this repo, insight.yml is the source for generated src/lib/event-schemas.ts, and middleware.ts/src/lib/analytics.ts use that generated contract for runtime validation and tracking. Because the copied protected list does not include that schema/analytics surface, while the preceding bullet allows a small “clearly-scoped config tweak,” a PR that changes event names, revenue properties, or validation rules can be classified low-risk and auto-merged even though it changes user-facing analytics data. Please adapt this list to Trackfa.st before enabling autonomous merges.
Useful? React with 👍 / 👎.
| scripts/fanout-maintainer-skills.sh # all org repos (needs gh + perms) | ||
| scripts/fanout-maintainer-skills.sh repo-a repo-b # just these |
There was a problem hiding this comment.
Add the advertised fan-out script
The runbook advertises scripts/fanout-maintainer-skills.sh, but this commit does not add it; a repo-wide file search only finds the existing scripts/doctor.ts and scripts/gen-schema.ts. Anyone following this section to copy the skills to other repos will immediately hit No such file or directory, so the documented fan-out workflow is unusable unless the script is committed or these commands are removed.
Useful? React with 👍 / 👎.
| 2. **Triage.** Invoke the `github-project-triage` skill to build item cards for | ||
| every open issue and PR (URL, what/why, author trust, fit, risk, proof/test | ||
| state, blockers, next action) and sort them into three buckets: | ||
| **autonomous · needs-owner · defer/close**. |
There was a problem hiding this comment.
Exclude the ledger issue from backlog triage
After the first run creates the 🤖 Maintainer Loop — Ledger, it is itself an open GitHub issue, but this triage step still asks for item cards for every open issue and PR before the ledger is identified. On subsequent runs the loop can classify its own durable-state issue as stale/defer/needs-owner and potentially close or mutate it as normal backlog, which breaks the ledger mechanism; the queue discovery should explicitly skip issues with the maintainer-ledger label/title.
Useful? React with 👍 / 👎.
| decisions. Label `needs-owner`, leave a one-paragraph comment stating the | ||
| decision required and the options, and record it in the ledger. |
There was a problem hiding this comment.
Ensure the needs-owner label exists
This path labels escalated items as needs-owner, but unlike the ledger path it never creates or verifies that label first. On fresh GitHub repositories the default label set does not include needs-owner, and GitHub's Add labels endpoint can fail validation when a label is missing (https://docs.github.com/rest/issues/labels#add-labels-to-an-issue), so escalation can stop before leaving the required comment and ledger entry unless the label is ensured up front.
Useful? React with 👍 / 👎.
| - Only broaden to multiple repos / the whole `ITSEZMONEY` org when the prompt | ||
| explicitly says `all`, `broad`, `org-wide`, or `everything`. |
There was a problem hiding this comment.
Don't hard-code the gate-slip org
This Trackfa.st repo's package/README point at trackfast, but the triage scope says an explicit all/org-wide request should broaden to the whole ITSEZMONEY org copied from the source project. In that scenario the maintainer loop would query and potentially act on the wrong organization while missing this product's repos, so the org should be derived from the selected GitHub repos/remote or made configurable.
Useful? React with 👍 / 👎.
47d7893 to
61c2352
Compare
61c2352 to
eb8d832
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb8d8321a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - Only operate on repositories whose owner is `adityash8` or `ITSEZMONEY`. | ||
| - If a cloned repo is outside those owners, skip it entirely (no triage, no | ||
| merge, no PR) and log the skip in the run output (not the skipped repo's ledger). |
There was a problem hiding this comment.
Include the Trackfast owner in the scope guard
With the committed setup prompt, a routine configured for this repo will skip it entirely when the GitHub owner is trackfast (the repo's README points users at github.com/trackfast/template). Since the guard only permits adityash8 and ITSEZMONEY, the maintainer loop would do no triage, PRs, merges, or ledger updates for the Trackfa.st repository it is being added to unless the owner allowlist is adapted.
Useful? React with 👍 / 👎.
| - The change is one of: dependency patch/minor bump that is non-breaking, | ||
| lockfile sync, docs/comments/typo, formatting or lint autofix, test-only | ||
| additions, or a clearly-scoped config tweak. | ||
| - Diff is small and bounded (rule of thumb: ≤ ~50 changed lines, single | ||
| concern). | ||
| - It touches **none** of: auth, payments/Stripe, `certificates/` or any | ||
| key/secret, DB schema or migrations (`shared/schema.ts`, drizzle), CI/release | ||
| config, infra/deployment config, or anything in `.env*`. |
There was a problem hiding this comment.
Protect the maintainer-loop policy files themselves
Because docs/comment changes are eligible for autonomous merge and the protected list does not include .claude/skills/** or this runbook, a small trusted PR that edits the autonomy policy itself can still satisfy every gate and be merged by the routine. These files define what the agent may merge in future runs, so changes to them should be treated like CI/release config and routed to owner review instead of being considered low-risk docs.
Useful? React with 👍 / 👎.
Maintainer Loop — last run 2026-06-27 UTC (Run #167)
Landed this run
(none)
Needs owner
(none)
In flight
(none)
Deferred / closed
(none)
67 repos in scope this pass. 6 repos have open PRs (all needs-owner, no change). 61 repos clean.