feat(agents): Update one stale example per workflow run - #13714
Closed
anthonyshew wants to merge 1 commit into
Closed
anthonyshew wants to merge 1 commit into
anthonyshew wants to merge 1 commit into
Conversation
The examples agent treated "update our examples" as a single run over every example. Split that into dispatch work and update work: - Add `find_stale_examples`, which reads each `examples/<name>` commit date from GitHub and marks an example stale after a week without a commit. Examples touched by an open pull request are reported as skipped so the agent never opens a duplicate. - Enable the experimental `Workflow` tool so a broad request fans out one child run per queued example, each opening a single pull request on `agents/examples/<example>`. - Move the GitHub App auth and request plumbing out of `create_pull_request` into `agent/lib/github.ts`, and add the pull request, pull request file, and commit queries the new tool needs. - Rewrite the instructions, the maintenance skill, and the weekly audit prompt around the per-example contract. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Anthony Shew <35677084+anthonyshew@users.noreply.github.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
anthonyshew
added a commit
that referenced
this pull request
Aug 11, 2026
## Summary - Replace the broad weekly examples run with one deterministic example per day at 14:00 UTC. - Select from the current sorted example list using the Eve session date, so runs are stateless and cannot change targets across UTC midnight. - Enforce the selected example across audits, reads, writes, installs, validation, and automated PR publication. - Create focused branches and draft PRs named for the selected example and date. - Add dashboard example selection, defaulted to that day’s rotation, for focused manual runs. - Run the agent with the latest Moonshot model, `moonshotai/kimi-k3-fast`. This supersedes #13714 with the simpler stateless rotation requested in review. ## Verification - `fnm exec --using=24 pnpm check-types` - `fnm exec --using=24 pnpm build` - `eve info` reports zero diagnostics, daily cron discovery, and the `select_daily_example` tool. - Verified consecutive UTC dates select consecutive entries for a stable sorted list. - Pre-push formatting and TOML checks.
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The examples agent read "update our examples" as one run that walks all of
examples/. This splits that into dispatch work and update work: a fan-out run picks the stale examples, and each one gets its own child run and its own pull request.find_stale_examples(new tool). Reads the last commit for everyexamples/<name>from the GitHub API and marks an example stale after a week without a commit (staleAfterDays, default7). It also inspects open pull requests and attributes each one to the example directories it touches, so anything already covered comes back underskippedwith reasonopen-pull-requestinstead of inupdateQueue. The queue is sorted oldest-first, and the other skip reasons (updated-recently,unknown-history) are reported too, so nothing disappears silently.Workflowtool enabled.agent/tools/workflow.tsre-exports theExperimentalWorkflowopt-in marker. A broad update request now becomes onetools.agentcall per queued example, each scoped to a single example and a single pull request onagents/examples/<example>.agent/lib/github.ts(new). The GitHub App JWT, installation-token cache, and request helper moved out ofcreate_pull_requestso both tools share them, plus the open-pull-request, pull-request-files, and last-commit-for-path queries the new tool needs.create_pull_requestkeeps its existing behavior.instructions.mdand theexamples_maintenanceskill now describe the two roles: a fan-out run dispatches and reports, a single-example run updates one example and opens one pull request. The weekly audit stays read-only but starts from the same queue.The fan-out uses the built-in
agenttool rather than a declared subagent on purpose: children ofagentshare the parent's sandbox and tool surface, whichcreate_pull_requestdepends on when it reads the edited files back out of the sandbox. A declared subagent would get its own sandbox and would need every tool re-declared under it.Repository resolution for the new tool takes
owner/repoinputs and falls back toGITHUB_REPOSITORY; it throws a clear error when neither is available.Testing Instructions
pnpm exec tsgoinapps/agents(passes)pnpm exec oxlint apps/agents/agent/andpnpm exec oxfmt --check apps/agents/agent/(clean)pnpm exec eve buildinapps/agentsbuilds with 0 diagnostics; the compiled manifest reportsworkflowEnabled: trueand listsfind_stale_examplesamong the discovered tools.vercel/turborepo(commits by path, open pull requests, pull-request files) and match the response shapes the code parses.🤖 Generated with Claude Code