Skip to content

Add maintainer loop (orchestrator + triage skills) - #1

Merged
adityash8 merged 1 commit into
mainfrom
chore/maintainer-loop
Jun 16, 2026
Merged

adityash8 merged 1 commit into
mainfrom
chore/maintainer-loop

Conversation

@adityash8

@adityash8 adityash8 commented Jun 16, 2026 •

Copy link
Copy Markdown
Owner

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.

@vercel

vercel Bot commented Jun 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
trackfast Error Error Jun 16, 2026 6:15am

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +37 to +40
`🤖 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Comment on lines +118 to +121
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Comment thread docs/MAINTAINER_LOOP.md
Comment on lines +91 to +95
```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
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

@adityash8 adityash8 closed this Jun 16, 2026
@adityash8 adityash8 reopened this Jun 16, 2026
@adityash8
adityash8 marked this pull request as ready for review June 16, 2026 05:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +70 to +72
- 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*`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread docs/MAINTAINER_LOOP.md Outdated
Comment on lines +93 to +94
scripts/fanout-maintainer-skills.sh # all org repos (needs gh + perms)
scripts/fanout-maintainer-skills.sh repo-a repo-b # just these

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +31 to +34
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**.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +48 to +49
decisions. Label `needs-owner`, leave a one-paragraph comment stating the
decision required and the options, and record it in the ledger.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +20 to +21
- Only broaden to multiple repos / the whole `ITSEZMONEY` org when the prompt
explicitly says `all`, `broad`, `org-wide`, or `everything`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread docs/MAINTAINER_LOOP.md
Comment on lines +72 to +74
- 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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +69 to +76
- 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*`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@adityash8
adityash8 merged commit 574eba2 into main Jun 16, 2026
3 of 5 checks passed

This branch had an error being deployed

1 failed deployment
Preview — eb8d8321 Deployed Jun 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant