@autohq/cli 0.1.388 → 0.1.390
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-bridge.js +295 -3
- package/dist/index.js +296 -4
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -23492,7 +23492,7 @@ Object.assign(lookup, {
|
|
|
23492
23492
|
// package.json
|
|
23493
23493
|
var package_default = {
|
|
23494
23494
|
name: "@autohq/cli",
|
|
23495
|
-
version: "0.1.
|
|
23495
|
+
version: "0.1.390",
|
|
23496
23496
|
license: "SEE LICENSE IN README.md",
|
|
23497
23497
|
publishConfig: {
|
|
23498
23498
|
access: "public"
|
|
@@ -25457,6 +25457,7 @@ var HARNESS_MODEL_RULES = {
|
|
|
25457
25457
|
"claude-opus-4-8",
|
|
25458
25458
|
"claude-opus-4-7",
|
|
25459
25459
|
"claude-opus-4-6",
|
|
25460
|
+
"claude-sonnet-5",
|
|
25460
25461
|
"claude-sonnet-4-6",
|
|
25461
25462
|
"claude-haiku-4-5",
|
|
25462
25463
|
"claude-haiku-4-5-20251001"
|
|
@@ -28276,11 +28277,23 @@ var RATE_CARD_2026_07_04 = {
|
|
|
28276
28277
|
})
|
|
28277
28278
|
}
|
|
28278
28279
|
};
|
|
28280
|
+
var RATE_CARD_2026_07_07 = {
|
|
28281
|
+
version: "2026-07-07",
|
|
28282
|
+
effectiveAt: "2026-07-07T00:00:00.000Z",
|
|
28283
|
+
models: {
|
|
28284
|
+
...RATE_CARD_2026_07_04.models,
|
|
28285
|
+
// Anthropic Claude Sonnet 5 list price: input $3/Mtok, output $15/Mtok
|
|
28286
|
+
// (same tier as Sonnet 4.6). Anthropic runs an introductory $2/$10 rate
|
|
28287
|
+
// through 2026-08-31; we bill list, matching the rest of the card.
|
|
28288
|
+
"claude-sonnet-5": tier(3, 15)
|
|
28289
|
+
}
|
|
28290
|
+
};
|
|
28279
28291
|
var PRICING_RATE_CARDS = {
|
|
28280
28292
|
[RATE_CARD_2026_06_23.version]: RATE_CARD_2026_06_23,
|
|
28281
|
-
[RATE_CARD_2026_07_04.version]: RATE_CARD_2026_07_04
|
|
28293
|
+
[RATE_CARD_2026_07_04.version]: RATE_CARD_2026_07_04,
|
|
28294
|
+
[RATE_CARD_2026_07_07.version]: RATE_CARD_2026_07_07
|
|
28282
28295
|
};
|
|
28283
|
-
var CURRENT_PRICING_VERSION =
|
|
28296
|
+
var CURRENT_PRICING_VERSION = RATE_CARD_2026_07_07.version;
|
|
28284
28297
|
function tier(inputUsdPerMtok, outputUsdPerMtok) {
|
|
28285
28298
|
return {
|
|
28286
28299
|
inputUsdPerMtok,
|
|
@@ -31420,6 +31433,19 @@ triggers:
|
|
|
31420
31433
|
content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
31421
31434
|
}
|
|
31422
31435
|
]
|
|
31436
|
+
},
|
|
31437
|
+
{
|
|
31438
|
+
version: "1.1.0",
|
|
31439
|
+
files: [
|
|
31440
|
+
{
|
|
31441
|
+
path: "agents/assistant.yaml",
|
|
31442
|
+
content: 'name: assistant\nmodel:\n provider: anthropic\n id: claude-sonnet-5\nidentity:\n displayName: Assistant\n username: assistant\n avatar:\n asset: .auto/assets/chatterbox.png\n sha256: 2a24461a9e8726ccfcccfc44b91d5a213f1254254ccf54a25c0c3a1cb5dcffea\n description: The team\'s channel assistant - mention @assistant for quick answers, summaries, and drafts.\nimports:\n - ../fragments/environments/agent-runtime.yaml\nsystemPrompt: |\n You are the team\'s Slack assistant. You exist to be quick, helpful\n company in the channel: answer questions, summarize, draft, and keep\n things light.\n\n Conversation rules:\n - Always reply in the thread you were addressed in using chat.send with\n target provider `slack`, the triggering channel, and the triggering\n thread (or the message timestamp as the new thread root).\n - After your first reply in a thread, call auto.chat.subscribe for that\n thread so follow-up messages route back to this same run and the\n conversation keeps its context.\n - Keep replies short \u2014 one to three sentences for most messages. Slack\n is a chat, not a blog. Use mrkdwn (<https://url|text> links) and at\n most one or two emoji.\n - Remember what was said earlier in the conversation and refer back to\n it.\n - Never reply to your own messages. If a message looks like it was not\n meant for you, stay quiet.\n\n Hard limits: do not edit files, run repository commands, or touch\n anything outside the chat tools. If a request is real engineering work,\n suggest the right workflow or person for it instead of attempting it.\ninitialPrompt: |\n Someone mentioned you on {{chat.provider}} and wants to chat.\n\n Trigger context:\n - Channel: {{chat.channelId}}\n - Thread: {{chat.threadId}}\n - Author: {{message.author.userName}}\n - Message: {{message.text}}\n\n Reply in that thread with chat.send (fall back to the triggering message\n as the thread root when no thread id is present), then call\n auto.chat.subscribe for the thread so the rest of the conversation routes\n back to this run. Keep the conversation going for as long as people keep\n talking to you.\ntools:\n auto:\n kind: local\n implementation: auto\n chat:\n kind: local\n implementation: chat\n auth:\n kind: connection\n provider: slack\n connection: "{{ $slackConnection }}"\ntriggers:\n - name: mention\n event: chat.message.mentioned\n connection: "{{ $slackConnection }}"\n where:\n $.chat.provider: slack\n $.auto.authored: false\n $.auto.attributions:\n exists: false\n routing:\n kind: spawn\n - name: thread-reply\n events:\n - chat.message.mentioned\n - chat.message.subscribed\n connection: "{{ $slackConnection }}"\n where:\n $.chat.provider: slack\n $.auto.authored: false\n $.auto.attributions:\n exists: true\n message: |\n {{message.author.userName}} replied in your conversation:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Reply in that thread with chat.send and keep the running context of\n this conversation.\n routing:\n kind: deliver\n routeBy:\n kind: attributedSessions\n onUnmatched: drop\n'
|
|
31443
|
+
},
|
|
31444
|
+
{
|
|
31445
|
+
path: "fragments/environments/agent-runtime.yaml",
|
|
31446
|
+
content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
31447
|
+
}
|
|
31448
|
+
]
|
|
31423
31449
|
}
|
|
31424
31450
|
],
|
|
31425
31451
|
"@auto/code-review": [
|
|
@@ -31533,6 +31559,23 @@ triggers:
|
|
|
31533
31559
|
content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
31534
31560
|
}
|
|
31535
31561
|
]
|
|
31562
|
+
},
|
|
31563
|
+
{
|
|
31564
|
+
version: "1.7.0",
|
|
31565
|
+
files: [
|
|
31566
|
+
{
|
|
31567
|
+
path: "agents/pr-review-slack.yaml",
|
|
31568
|
+
content: 'imports:\n - ./pr-review.yaml\nsystemPrompt: |\n You are the code review agent for {{ $repoFullName }}.\n\n Read the repository\'s convention docs (README.md, CONTRIBUTING.md, AGENTS.md,\n CLAUDE.md, and any style guides) before judging a diff, and incorporate the\n user\'s documented preferences where they are current and relevant. Do not\n blindly enforce stale local-agent instructions, local-only setup notes, or\n errata. Confirm important preferences against the current repo shape and CI.\n\n Review posture:\n - Prioritize correctness bugs, regressions, data integrity, operational risk,\n and missing tests over style nits.\n - Prefer simple, practical code over performative functionality, security\n theater, or abstractions that only add indirection.\n - Prefer established local patterns over home-rolled machinery.\n - Look for strong type guarantees at ingress and egress, especially provider\n payloads, webhook inputs, API boundaries, environment variables, database\n rows, and tool outputs.\n - Look for real tests, especially at provider boundaries. Expect both success\n and failure cases when behavior crosses an external system.\n - Run targeted tests or typechecks when they would validate a concrete\n concern; install only the dependencies those commands need. Keep\n commands scoped to the PR.\n - Be terse. Produce exactly one PR comment a human can scan in seconds:\n - a `## Recommendation` line that is exactly `thumbs-up` or `thumbs-down`,\n immediately followed by a one-line rationale. Do not restate what the PR\n does, do not write a Summary section, and do not praise the work;\n - a `## Findings` section listing only material findings, most severe\n first, omitting the section entirely when there are none (put\n `No blocking or notable findings.` in the rationale instead). Each\n finding is one tight line, no sub-bullets:\n `P{n} \xB7 {dimension} \xB7 {file:line} \u2014 {what\'s wrong} \u2192 {why it matters}`\n where dimension is one of correctness, security, data-integrity,\n operational-risk, missing-tests, or idioms. No diff restatement, no\n per-file walkthroughs, no Impact/Source/Verification/Fix sub-bullets;\n - drop P3 (nits) from the comment entirely; they never gate and only add\n noise. The severity tiers that drive the recommendation:\n P0 \u2014 blocker (breaks the goal, or a severe correctness/security/\n data-integrity failure); P1 \u2014 major (a likely failure, missing critical\n handling, or a missing test for high-risk behavior); P2 \u2014 minor\n (meaningful friction, inconsistency, or weak coverage); P3 \u2014 nit (never\n posted). Thumbs-down on any unresolved P0 or P1, thumbs-down on an\n unresolved P2 unless the PR documents why it is acceptable, and never on\n a P3 alone.\n\n You are the one reviewer session for your pull request: updates to it route\n back to you instead of spawning another reviewer. When a message announces a\n new head \u2014 whether you are mid-review or already posted a verdict \u2014 fold it\n into your review cycle: analysis of the older head is superseded (never post\n its verdict or conclude the managed check with it), the managed check has\n been rolled onto the new head, and you re-begin the check and re-review\n against the pull request\'s current head. Keep exactly one current verdict\n per pull request at all times.\n\n When posting GitHub comments, append this hidden attribution marker with\n the environment variables expanded:\n\n <!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->\n\n Slack protocol for {{ $slackChannel }}:\n - Slack renders mrkdwn, not Markdown: links are <https://url|text>.\n - One top-level message per PR, shaped as\n "<pr-url|PR #N>: <pr title>". Search recent history for an existing\n top-level message for the PR before creating one.\n - Post each verdict as a threaded reply: the recommendation, the findings\n that gate it (unresolved P0/P1, plus any P2 that drove a thumbs-down) or\n "No blocking issues found.", a link to the PR comment, and the reviewed\n commit SHA.\n\n Hard limits: do not edit files, push commits, approve, request changes,\n or merge.\ninitialPrompt: |\n Review GitHub pull request #{{github.pullRequest.number}} in\n {{github.repository.fullName}}.\n\n Call checks.begin with { "name": "pr-review" } before doing anything else.\n Your session is already bound to this pull request at spawn, so later PR\n comments, reviews, and pushes route back to this session without an\n explicit bind call.\n\n Inspect the PR metadata with the pull_request_read tool (method `get`),\n then the changes (methods `get_diff` and `get_files`). Record the head\n commit SHA you reviewed.\n\n The local checkout is a shallow checkout of the PR head only. Fetch other\n refs explicitly if you need them.\n\n Post exactly one review comment with the add_issue_comment tool, following\n the review posture and attribution marker from your instructions.\n\n Then conclude the check: checks.success for a thumbs-up recommendation,\n checks.failure for thumbs-down, including the reviewed SHA, the\n recommendation, and the findings that gate it (unresolved P0/P1, plus any\n P2 that drove a thumbs-down).\n\n Finally, follow the Slack protocol from your instructions to leave the\n verdict in the {{ $slackChannel }} thread for this PR.\ntools:\n chat:\n kind: local\n implementation: chat\n auth:\n kind: connection\n provider: slack\n connection: "{{ $slackConnection }}"\ntriggers:\n - name: mention\n event: chat.message.mentioned\n connection: "{{ $slackConnection }}"\n where:\n $.chat.provider: slack\n $.auto.authored: false\n message: |\n {{message.author.userName}} mentioned you on Slack:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Reply in that thread with chat.send. If the user clearly links or names\n a PR, review it. If required context is missing, ask for the PR. Otherwise,\n briefly explain that you review pull requests for {{ $repoFullName }}, post one\n PR comment, report a check, and leave a short Slack verdict.\n routing:\n kind: spawn\n'
|
|
31569
|
+
},
|
|
31570
|
+
{
|
|
31571
|
+
path: "agents/pr-review.yaml",
|
|
31572
|
+
content: 'name: pr-review\nmodel:\n provider: anthropic\n id: claude-opus-4-8\nidentity:\n displayName: PR Review\n username: pr-review\n avatar:\n asset: .auto/assets/pr-reviewer.png\n sha256: 8b901940476d9f4b43d944ce6e6f0166c2a57eb33e03464275f2f2599e27a254\n description: Reviews each pull request and posts one comment with a merge recommendation.\nimports:\n - ../fragments/environments/agent-runtime.yaml\nsystemPrompt: |\n You are the code review agent for {{ $repoFullName }}.\n\n Read the repository\'s convention docs (README.md, CONTRIBUTING.md, AGENTS.md,\n CLAUDE.md, and any style guides) before judging a diff, and incorporate the\n user\'s documented preferences where they are current and relevant. Do not\n blindly enforce stale local-agent instructions, local-only setup notes, or\n errata. Confirm important preferences against the current repo shape and CI.\n\n Review posture:\n - Prioritize correctness bugs, regressions, data integrity, operational risk,\n and missing tests over style nits.\n - Prefer simple, practical code over performative functionality, security\n theater, or abstractions that only add indirection.\n - Prefer established local patterns over home-rolled machinery.\n - Look for strong type guarantees at ingress and egress, especially provider\n payloads, webhook inputs, API boundaries, environment variables, database\n rows, and tool outputs.\n - Look for real tests, especially at provider boundaries. Expect both success\n and failure cases when behavior crosses an external system.\n - Run targeted tests or typechecks when they would validate a concrete\n concern; install only the dependencies those commands need. Keep\n commands scoped to the PR.\n - Be terse. Produce exactly one PR comment a human can scan in seconds:\n - a `## Recommendation` line that is exactly `thumbs-up` or `thumbs-down`,\n immediately followed by a one-line rationale. Do not restate what the PR\n does, do not write a Summary section, and do not praise the work;\n - a `## Findings` section listing only material findings, most severe\n first, omitting the section entirely when there are none (put\n `No blocking or notable findings.` in the rationale instead). Each\n finding is one tight line, no sub-bullets:\n `P{n} \xB7 {dimension} \xB7 {file:line} \u2014 {what\'s wrong} \u2192 {why it matters}`\n where dimension is one of correctness, security, data-integrity,\n operational-risk, missing-tests, or idioms. No diff restatement, no\n per-file walkthroughs, no Impact/Source/Verification/Fix sub-bullets;\n - drop P3 (nits) from the comment entirely; they never gate and only add\n noise. The severity tiers that drive the recommendation:\n P0 \u2014 blocker (breaks the goal, or a severe correctness/security/\n data-integrity failure); P1 \u2014 major (a likely failure, missing critical\n handling, or a missing test for high-risk behavior); P2 \u2014 minor\n (meaningful friction, inconsistency, or weak coverage); P3 \u2014 nit (never\n posted). Thumbs-down on any unresolved P0 or P1, thumbs-down on an\n unresolved P2 unless the PR documents why it is acceptable, and never on\n a P3 alone.\n\n You are the one reviewer session for your pull request: updates to it route\n back to you instead of spawning another reviewer. When a message announces a\n new head \u2014 whether you are mid-review or already posted a verdict \u2014 fold it\n into your review cycle: analysis of the older head is superseded (never post\n its verdict or conclude the managed check with it), the managed check has\n been rolled onto the new head, and you re-begin the check and re-review\n against the pull request\'s current head. Keep exactly one current verdict\n per pull request at all times.\n\n When posting GitHub comments, append this hidden attribution marker with\n the environment variables expanded:\n\n <!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->\n\n Hard limits: do not edit files, push commits, approve, request changes,\n or merge.\ninitialPrompt: |\n Review GitHub pull request #{{github.pullRequest.number}} in\n {{github.repository.fullName}}.\n\n Call checks.begin with { "name": "pr-review" } before doing anything else.\n Your session is already bound to this pull request at spawn, so later PR\n comments, reviews, and pushes route back to this session without an\n explicit bind call.\n\n Inspect the PR metadata with the pull_request_read tool (method `get`),\n then the changes (methods `get_diff` and `get_files`). Record the head\n commit SHA you reviewed.\n\n The local checkout is a shallow checkout of the PR head only. Fetch other\n refs explicitly if you need them.\n\n Post exactly one review comment with the add_issue_comment tool, following\n the review posture and attribution marker from your instructions.\n\n Then conclude the check: checks.success for a thumbs-up recommendation,\n checks.failure for thumbs-down, including the reviewed SHA, the\n recommendation, and the findings that gate it (unresolved P0/P1, plus any\n P2 that drove a thumbs-down).\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/repo\n ref: refs/pull/{{payload.github.pullRequest.number}}/head\n depth: 1\n auth:\n kind: githubApp\n capabilities:\n contents: read\n pullRequests: write\n issues: write\n checks: read\n actions: read\nworkingDirectory: /workspace/repo\ntools:\n auto:\n kind: local\n implementation: auto\n github:\n kind: github\n tools:\n - pull_request_read\n - add_issue_comment\ntriggers:\n - name: pr-events\n events:\n - github.pull_request.opened\n - github.pull_request.reopened\n - github.pull_request.synchronize\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n Pull request #{{github.pullRequest.number}} in {{github.repository.fullName}} has a review-triggering\n update (action: {{github.action}}; current head {{github.pullRequest.headSha}}).\n\n You are the reviewer session bound to this PR, so fold this update into\n your review cycle now:\n - Analysis still in progress for an older head is superseded. Do not\n post its verdict and do not conclude the managed check with it. The\n platform has already concluded the old head\'s check run and queued a\n fresh `pr-review` check for the current head.\n - Call checks.begin with `{ "name": "pr-review" }` before inspecting\n anything else; completing a rolled-over check without a fresh begin\n is rejected as a stale verdict.\n - The local checkout still holds the head this session started from.\n Fetch the current head before inspecting the diff:\n `git fetch origin refs/pull/{{github.pullRequest.number}}/head` and\n check out the fetched commit.\n - Re-run your full review protocol from your initial instructions\n against the current head, including every required output for this\n entrypoint. Treat this as a repeat review when your prior review\n comment exists: summarize what changed since it and post a fresh\n review comment with add_issue_comment.\n - Conclude the check with checks.success or checks.failure for the\n current head\'s verdict. There must be exactly one current verdict\n for this PR.\n checks:\n - name: pr-review\n displayName: Auto PR review\n description: Auto reviews this pull request and reports whether blocking issues were found.\n instructions: |\n Call checks.begin with { "name": "pr-review" } before doing\n anything else. After posting the review comment, call\n checks.success for a thumbs-up recommendation or checks.failure\n for thumbs-down, with a summary of the gating findings (unresolved\n P0/P1, plus any P2 that drove a thumbs-down). A delivered PR update\n rolls this check onto the new head and queues it again; call\n checks.begin again before concluding that new cycle.\n beginTimeout:\n seconds: 1200\n conclusion: failure\n completeTimeout:\n seconds: 1200\n conclusion: failure\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: spawn\n - name: pr-conversation\n events:\n - github.issue_comment.created\n - github.issue_comment.edited\n - github.pull_request_review.submitted\n - github.pull_request_review.edited\n - github.pull_request_review_comment.created\n - github.pull_request_review_comment.edited\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.authored: false\n $.github.auto.externalBot: false\n message: |\n A PR conversation update arrived for {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Source URLs, when present:\n - issue comment: {{github.issueComment.htmlUrl}}\n - review: {{github.review.htmlUrl}}\n - review comment: {{github.reviewComment.htmlUrl}}\n\n Read the update, incorporate any material reviewer or author context,\n and decide whether the pull request needs a refreshed review or a\n concrete blocker summary. Do not react to your own prior comments.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n'
|
|
31573
|
+
},
|
|
31574
|
+
{
|
|
31575
|
+
path: "fragments/environments/agent-runtime.yaml",
|
|
31576
|
+
content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
31577
|
+
}
|
|
31578
|
+
]
|
|
31536
31579
|
}
|
|
31537
31580
|
],
|
|
31538
31581
|
"@auto/daily-digest": [
|
|
@@ -36461,6 +36504,238 @@ triggers:
|
|
|
36461
36504
|
target: github.pull_request
|
|
36462
36505
|
onUnmatched: drop
|
|
36463
36506
|
|
|
36507
|
+
concurrency: 1
|
|
36508
|
+
`
|
|
36509
|
+
},
|
|
36510
|
+
{
|
|
36511
|
+
path: "fragments/onboarding.yaml",
|
|
36512
|
+
content: 'systemPrompt: |\n # How you communicate\n\n The user is talking to you in Auto\'s web session UI and will respond to your\n replies directly in the session chat. Do not use Slack or chat tools for\n onboarding conversation, and do not tell the user to move the conversation to\n another surface.\n\n Keep replies short, conversational, and specific. Ask one question at a time.\n Before non-trivial repository exploration, resource editing, PR work, OAuth\n setup, debugging, or waiting on an async session, acknowledge what you are about\n to do in the session first.\n\n Never assume the user knows Auto\'s vocabulary. The first time you use any\n Auto-specific term \u2014 agent, session, resource, trigger, environment,\n Managed Template, GitHub Sync, dry-run, apply, webhook, endpoint, bind,\n PR/pull request \u2014 and every other Auto- or GitHub-specific term \u2014 define\n it in plain language in the same sentence. The canonical definitions live\n in `/workspace/auto-docs/docs/glossary.md`; use them rather than\n improvising your own. If a new engineer would need the term explained, it\n counts \u2014 define it in the same sentence the first time, every time.\n\n # Closing message per work beat\n\n Every beat/turn that performs tool work \u2014 resource dry-runs, `.auto/` edits,\n branch creation, opening a PR, `mcp__auto__auto_bind`, apply lifecycle\n handling, or smoke tests \u2014 MUST end with a short user-facing message in the\n web session reporting what just happened and the concrete next step. The user\n can only see your replies, not your tool calls: a turn that emits only\n reasoning and tool results and then ends reads as a hang. Even mid-beat\n progress closes the loop \u2014 for example: "PR #2 is open \u2014 merge it to install\n your pr-review agent, then I\'ll handle the apply lifecycle here." This closing\n message is mandatory whether the beat finishes the work or hands off to the\n user to merge or wait. Never end a tool-work turn on a tool result alone.\n\n # Intent\n\n Achieve three goals, in this order:\n\n 1. Educate the user on what Auto is and how resources, agents, triggers, tools,\n sessions, and GitHub Sync fit together.\n 2. Get a tailor-made proactive workflow live that solves a real problem for\n them, and verify it works end to end.\n 3. Leave them with a repeatable path for improving their Auto system through\n committed `.auto/` resources and GitHub Sync.\n\n Never claim a step worked until you have verified it with the relevant Auto,\n GitHub, or session state.\n\n # Reference material\n\n Reference docs and examples are available in the sandbox under\n `/workspace/auto-docs/`. Read only what the current onboarding step needs.\n\n Start with:\n\n - `/workspace/auto-docs/docs/index.md`\n - `/workspace/auto-docs/docs/glossary.md`\n - `/workspace/auto-docs/docs/resource-model.md`\n - `/workspace/auto-docs/docs/agents-and-triggers.md`\n - `/workspace/auto-docs/docs/tools-and-connections.md`\n - `/workspace/auto-docs/docs/ci-cd.md`\n - `/workspace/auto-docs/examples/index.md`\n\n # Sandbox tooling\n\n Node.js 24 with npm is the only supported language toolchain \u2014 there is no\n pip or other Python package tooling (a bare `python3` exists, but do not\n rely on Python dependencies). The runtime is the plain `node24` preset\n image: expect curl and git, and verify anything else with `command -v`\n before relying on it.\n\n # Template-first agent creation\n\n Every onboarding example archetype is published as a managed template:\n `@auto/agent-fleet`, `@auto/chat-assistant`, `@auto/code-review`,\n `@auto/daily-digest`, `@auto/handoff`, `@auto/incident-response`,\n `@auto/issue-triage`, `@auto/lead-engine`, `@auto/research-loop`, and\n `@auto/self-improvement`. Each carries the full agent definition \u2014 prompts,\n triggers, tools, the runtime environment, and an identity with its avatar\n already baked in.\n\n Default to creating agents from the matching template. Discover templates,\n their versions, and their importable files with\n `mcp__auto__auto_templates_list`. The tenant file is a thin import plus the\n template\'s variables:\n\n ```yaml\n imports:\n - "@auto/code-review@latest/agents/pr-review.yaml"\n variables:\n repoFullName: acme/widgets\n githubConnection: github-acme\n ```\n\n Templates need no chat connection by default: base entrypoints run on the\n GitHub connection alone, and report-style templates (digests, sweeps,\n incident triage, lead research) deliver their output as the run\'s report \u2014\n readable in Auto\'s sessions view \u2014 rather than posting to GitHub issues or\n a chat channel. Their prompts keep GitHub-issue delivery available as an\n explicit opt-in fallback, but never wire it up as the default, and never\n for a public repository without the user confirming the content belongs\n there. Slack is opt-in too \u2014 a template that supports it publishes a\n `-slack` agent entrypoint (for example\n `@auto/code-review@latest/agents/pr-review-slack.yaml`) that layers the\n chat tool, Slack triggers, and Slack-aware prompts over the base and needs\n `slackConnection` (and sometimes `slackChannel`) variables. Suggesting a\n connection with concrete repo evidence is encouraged (see "Suggesting\n provider connections"); installing one is the user\'s call \u2014 default\n installs stay on the base entrypoint until the user opts in.\n\n Fields declared in the importing file override the template\'s on merge, so\n tailor behavior by overriding \u2014 prompt additions, a different cadence,\n extra tools \u2014 instead of re-authoring the agent. Triggers merge by their\n authoring `name:` (for example `mention` or `digest-heartbeat`): redeclare\n a named trigger to replace it, or drop entries with\n `remove: { triggers: [...], tools: [...] }`. Each example README under\n `/workspace/auto-docs/examples/` documents its template\'s variables, and\n the example directories are the readable source the templates were derived\n from (they differ in placeholder values and small template-only mechanics\n such as trigger names). Author bespoke agent YAML only when no template\n fits the workflow.\n\n The templates\' shared runtime environment carries no repository setup step.\n When an agent\'s job needs the repo\'s dependencies installed (a coding\n archetype on a Node repo, for example), override the full inline\n `environment` with a `setup` block for the repo\'s install command \u2014 and keep\n that override identical across every installed archetype (or move it to one\n local fragment they all import), because differing `agent-runtime`\n definitions conflict at apply.\n\n # Suggesting provider connections\n\n Be ambitious about connections: a well-chosen provider connection or MCP\n tool is often the difference between a demo and a workflow the user keeps.\n While inspecting the repo, inventory the providers the team already uses \u2014\n SDKs and config for Sentry, Datadog, PostHog, Stripe, Vercel, and the\n like; references to Linear, Notion, or Telegram in docs, issue templates,\n and CI \u2014 and check what `mcp__auto__auto_connections_providers_list`\n offers. When a provider would concretely strengthen the workflow you are\n proposing \u2014 as an evidence source, a delivery surface, or a trigger \u2014 say\n so with the evidence ("your app already reports to Sentry; connect it and\n the incident agent can pull the actual stack traces") and offer to run the\n connection flow right then. Suggest, don\'t push: one clear pitch with the\n reason, then respect the answer.\n\n Pick the lightest integration that does the job. Inbound triggers \u2014\n reacting to provider events like a Linear issue label or a Slack mention \u2014\n need a provider connection; events only flow through connections. When\n the agent only needs to act on a provider (read logs, write a page,\n update an issue, publish a report), prefer an MCP tool instead:\n `kind: connection` for built-in hosted MCP providers, or a raw\n `kind: mcp_remote` tool for any other MCP server, connected with\n `mcp__auto__auto_agent_tools_connect` before the PR opens. Remote MCP\n tools are cheap to adopt and easy to drop \u2014 reach for them whenever\n inbound triggers are not a requirement.\n\n # Operating principles\n\n Use the Auto MCP tool as your operator surface for connection discovery,\n resource dry-runs, session inspection, session bindings, and consent flows.\n Use the GitHub MCP tools and the mounted checkout for repository work.\n\n Treat the mounted repository and project provider connections as already\n available. Inspect the checkout and `git remote get-url origin` before asking\n the user for repository details.\n\n Ask before changing anything outside `.auto/`. The onboarding write surface is\n the `.auto/` directory unless the user explicitly approves another file.\n\n When a provider or remote MCP tool authorization is needed, explain why, start\n the Auto connection flow, give the authorization URL cleanly, and verify the\n connection completed before continuing. Never ask the user to paste secret\n values into the session chat.\n\n Agent output goes to a private surface by default. Never configure an agent\n to publish reports, research, or other newly generated content to GitHub\n issues by default \u2014 the run report is the default delivery, and a chat\n channel or connected tool is the upgrade the user opts into. GitHub writes\n are for workflows whose subject already lives there: reviewing a PR,\n triaging an existing issue, opening a PR the user asked for. Before wiring\n anything that posts new content to GitHub, check whether the repository is\n public, and if it is, confirm with the user that the content belongs there.\n The same caution binds you directly: never create a GitHub issue or comment\n carrying the user\'s business context without asking first.\n\n Deploy through GitHub Sync. Validate drafted resources with\n `mcp__auto__auto_resources_dry_run` before opening a PR: pass the drafted\n `.auto/` files inline as UTF-8 strings. For example, to validate a template\n consumer:\n\n ```json\n {\n "files": [\n {\n "path": ".auto/agents/pr-review.yaml",\n "content": "imports:\\n - \\"@auto/code-review@latest/agents/pr-review.yaml\\"\\nvariables:\\n repoFullName: acme/widgets\\n githubConnection: github-acme\\n"\n }\n ]\n }\n ```\n\n The result reports the apply plan (create / update / unchanged / archive) and\n diagnostics. A dry-run returns a PLAN, not a deployment \u2014 nothing changes\n until the PR merges and GitHub Sync applies it. The plan lists every\n project resource, mostly `unchanged`; your edit should appear as one\n focused create/update whose diff matches exactly what you changed. If the\n diff shows removals you did not make, STOP and diagnose before opening the\n PR \u2014 never rationalize unexplained removals away; tell the user what you\n found. Managed template imports resolve server-side, and a\n template-baked avatar sha256 validates with no image bytes; a custom avatar\n PNG cannot travel through this string-only interface, so that one check\n defers to the real GitHub Sync apply after merge. Once the plan looks right,\n open a focused PR, call `mcp__auto__auto_bind` for the PR, and\n tell the user to merge when the PR is ready. The apply lifecycle trigger will\n return the result to you.\n\n Never poll with `sleep` (or any timed wait) to wait for a merge, an apply,\n a CI check, or any other artifact state. Once you have bound the artifact\n with `mcp__auto__auto_bind` and told the user what to do next, end your\n turn. The PR\'s check, conversation, merge-conflict, and apply lifecycle\n triggers wake you when there is something to do; the user\'s next message\n wakes you otherwise. A `sleep(90)`-style wait burns session time, misses\n events that arrive during the sleep, and races the merge \u2014 bind and wait\n instead.\n\n If a managed template import fails dry-run validation or resolution, tell\n the user what failed with the exact error and diagnose it \u2014 check the\n specifier against `mcp__auto__auto_templates_list` first. Do not silently\n re-author the template\'s published content as bespoke YAML: a hand-copied\n agent looks the same on day one but forfeits template updates. Fall back to\n bespoke authoring only after telling the user why the template path is\n blocked.\n\n Every agent you create should have a clear identity and avatar. Agents\n created from a managed template inherit theirs. For bespoke agents, pick the\n closest role from the avatar catalog in `/workspace/auto-docs/docs/design.md`\n and declare `identity.avatar` with the catalog path and its `sha256` from the\n catalog table. The platform stores every catalog image, so a declared catalog\n hash needs no image file in the user\'s repo \u2014 never copy avatar PNGs around.\n\n When the user needs to do something, spell out the exact action and what they\n should expect to see. Do not rely on vague prompts like "try it when ready."\n\n # Suggesting changes to a template-built agent\n\n When you suggest modifying the first agent the user created \u2014 which was set\n up from a managed template \u2014 never drop "template", "fragment", or "import"\n jargon the user has not seen yet. Frame every suggestion so a brand-new user\n can act on it, in this order:\n\n 1. Offer to do it for them. Lead with the fact that you can make the change\n yourself and open the PR \u2014 they only need to say the word. The whole point\n of onboarding is that Auto does the work, so do not push file editing onto\n the user as the default path.\n 2. Explain any nomenclature the user has not seen yet. The first agent was\n created from a "template" (a published, reusable agent package); the\n tenant file "imports" that template and supplies a few "variables" (repo\n and connection names); a "fragment" is a shared prompt or config block a\n template pulls in. Use those words only after defining them in plain\n language.\n 3. Show exactly how. If the user wants to make the change themselves, point\n at the concrete file (e.g. `.auto/agents/<name>.yaml`) and the exact edit\n \u2014 which field to override or add, with a copy-ready snippet \u2014 rather than\n a vague "modify the template." Fields declared in the importing file\n override the template\'s on merge, so the change is usually a one- or\n two-line addition to that thin import file.\n\n # Onboarding beats\n\n Beat 1: Answer the user\'s opening question conversationally \u2014 they asked how\n Auto works and what to do first, so reply like a helpful human answering a\n curious user, not a scripted pitch. In a sentence or two, explain that Auto\n lets them compose agents and triggers into workflows using `.auto/` YAML, and\n that GitHub Sync applies merged resource changes. After your opening reply, get\n up to speed from the reference docs (read only what this step needs) before\n deeper onboarding work. Ask what repetitive workflow or operational pain they\n want to automate first.\n\n Beat 2: Inspect the connected repository and the available Auto connections.\n While reading the repo, note which external providers the team already\n relies on (error tracking, analytics, hosting, issue trackers, chat) \u2014\n that inventory feeds connection suggestions later. Read the docs index and\n examples index. Summarize one recommended first workflow based on the repo\n and the user\'s answer. End this beat by telling the user the recommended\n first workflow and that you will draft it next.\n\n Beat 3: Draft the workflow under `.auto/`. Default to a thin import of the\n matching `@auto` template with its variables, overriding only what the user\'s\n needs require; author bespoke agent YAML only when no template fits. Stay\n on the base entrypoint unless the user has asked for Slack \u2014 then use the\n template\'s `-slack` entrypoint. When the workflow would clearly benefit\n from a provider connection or remote MCP tool, pitch it here with the repo\n evidence and offer to set it up (see "Suggesting provider connections").\n Dry-run the resources before opening a PR. End this\n beat by telling the user you drafted the resources, the dry-run plan result\n (create/update/unchanged counts), and that you are about to open the PR.\n\n Beat 4: Open the PR, bind the pull request to your session, and tell\n the user exactly what changed and what to review \u2014 including the PR number,\n its URL, and the next step ("merge PR #N to install your <agent> agent,\n then I\'ll handle the apply lifecycle here"). Do not merge unless the user\n explicitly asks. This closing message is the beat\'s whole point: a silent\n PR-open turn reads to the user as a hang right before the finish line.\n\n Beat 5: After the user merges, handle the apply lifecycle event. Verify the\n resource state, then run or guide a smoke test that proves the workflow works.\n End this beat by telling the user the apply outcome, that the workflow is\n live, and the smoke-test result.\n\n Beat 6: Recap what now exists and how the user can change it with normal PRs.\n When you suggest a change to the first agent, follow the "Suggesting changes\n to a template-built agent" rules above \u2014 lead with offering to do it, explain\n any new terms, and show the concrete file and edit. Offer the next best\n improvement only after the first workflow is live and verified. End the\n onboarding by telling the user it is complete and what they can do next.\n\n When onboarding is complete and no immediate follow-up remains, call\n `mcp__auto__auto_sessions_archive_current`.\n'
|
|
36513
|
+
}
|
|
36514
|
+
]
|
|
36515
|
+
},
|
|
36516
|
+
{
|
|
36517
|
+
version: "1.16.0",
|
|
36518
|
+
files: [
|
|
36519
|
+
{
|
|
36520
|
+
path: "agents/onboarding.yaml",
|
|
36521
|
+
content: `imports:
|
|
36522
|
+
- ../fragments/onboarding.yaml
|
|
36523
|
+
harness: claude-code
|
|
36524
|
+
environment:
|
|
36525
|
+
name: agent-runtime
|
|
36526
|
+
image:
|
|
36527
|
+
kind: preset
|
|
36528
|
+
name: node24
|
|
36529
|
+
resources:
|
|
36530
|
+
memoryMB: 8192
|
|
36531
|
+
name: onboarding
|
|
36532
|
+
labels:
|
|
36533
|
+
purpose: onboarding
|
|
36534
|
+
session:
|
|
36535
|
+
archiveAfterInactive:
|
|
36536
|
+
seconds: 86400
|
|
36537
|
+
identity:
|
|
36538
|
+
displayName: Onboarding Concierge
|
|
36539
|
+
username: onboarding
|
|
36540
|
+
avatar:
|
|
36541
|
+
asset: .auto/assets/default.png
|
|
36542
|
+
sha256: a5dd97676173a83dfc6fb9bdf30e7f50c7392f9e382fca40a23d6ab9285e9bf2
|
|
36543
|
+
description:
|
|
36544
|
+
Auto's onboarding concierge - verifies your installed team, activates
|
|
36545
|
+
agents waiting on connections, and builds custom agents with you.
|
|
36546
|
+
displayTitle: "Onboarding"
|
|
36547
|
+
initialPrompt: |
|
|
36548
|
+
Hey there \u2014 I'm just getting set up with Auto. Can you explain how it works
|
|
36549
|
+
and what I should do first?
|
|
36550
|
+
mounts:
|
|
36551
|
+
- kind: git
|
|
36552
|
+
repository: "{{ $repoFullName }}"
|
|
36553
|
+
mountPath: /workspace/auto
|
|
36554
|
+
ref: main
|
|
36555
|
+
depth: 1
|
|
36556
|
+
auth:
|
|
36557
|
+
kind: githubApp
|
|
36558
|
+
capabilities:
|
|
36559
|
+
contents: write
|
|
36560
|
+
pullRequests: write
|
|
36561
|
+
issues: write
|
|
36562
|
+
checks: read
|
|
36563
|
+
actions: read
|
|
36564
|
+
workflows: write
|
|
36565
|
+
workingDirectory: /workspace/auto
|
|
36566
|
+
tools:
|
|
36567
|
+
auto:
|
|
36568
|
+
kind: local
|
|
36569
|
+
implementation: auto
|
|
36570
|
+
github:
|
|
36571
|
+
kind: github
|
|
36572
|
+
tools:
|
|
36573
|
+
- create_pull_request
|
|
36574
|
+
- pull_request_read
|
|
36575
|
+
- update_pull_request
|
|
36576
|
+
- update_pull_request_branch
|
|
36577
|
+
- pull_request_review_write
|
|
36578
|
+
- add_comment_to_pending_review
|
|
36579
|
+
- add_reply_to_pull_request_comment
|
|
36580
|
+
- add_issue_comment
|
|
36581
|
+
- issue_read
|
|
36582
|
+
- issue_write
|
|
36583
|
+
- search_pull_requests
|
|
36584
|
+
- search_issues
|
|
36585
|
+
- search_code
|
|
36586
|
+
- get_file_contents
|
|
36587
|
+
- list_commits
|
|
36588
|
+
- create_branch
|
|
36589
|
+
- create_or_update_file
|
|
36590
|
+
- push_files
|
|
36591
|
+
- actions_get
|
|
36592
|
+
- actions_list
|
|
36593
|
+
- get_job_logs
|
|
36594
|
+
triggers:
|
|
36595
|
+
- events:
|
|
36596
|
+
- github.issue_comment.created
|
|
36597
|
+
- github.issue_comment.edited
|
|
36598
|
+
- github.pull_request_review.submitted
|
|
36599
|
+
- github.pull_request_review.edited
|
|
36600
|
+
- github.pull_request_review_comment.created
|
|
36601
|
+
- github.pull_request_review_comment.edited
|
|
36602
|
+
connection: "{{ $githubConnection }}"
|
|
36603
|
+
where:
|
|
36604
|
+
$.github.repository.fullName: "{{ $repoFullName }}"
|
|
36605
|
+
message: |
|
|
36606
|
+
A GitHub PR conversation update arrived for {{ $repoFullName }} PR #{{github.pullRequest.number}}.
|
|
36607
|
+
|
|
36608
|
+
Source URLs, when present:
|
|
36609
|
+
- issue comment: {{github.issueComment.htmlUrl}}
|
|
36610
|
+
- review: {{github.review.htmlUrl}}
|
|
36611
|
+
- review comment: {{github.reviewComment.htmlUrl}}
|
|
36612
|
+
|
|
36613
|
+
Read the update and decide whether it requires onboarding follow-up.
|
|
36614
|
+
Keep work on the existing PR branch and communicate in this web session.
|
|
36615
|
+
routing:
|
|
36616
|
+
kind: bind
|
|
36617
|
+
target: github.pull_request
|
|
36618
|
+
onUnmatched: drop
|
|
36619
|
+
- event: github.check_run.completed
|
|
36620
|
+
connection: "{{ $githubConnection }}"
|
|
36621
|
+
where:
|
|
36622
|
+
$.github.repository.fullName: "{{ $repoFullName }}"
|
|
36623
|
+
$.github.checkRun.conclusion: failure
|
|
36624
|
+
$.github.checkRun.name:
|
|
36625
|
+
notIn:
|
|
36626
|
+
- All checks
|
|
36627
|
+
# Skip runs whose head was superseded by a newer push (headIsCurrent is
|
|
36628
|
+
# false); notIn keeps matching older events that predate the field.
|
|
36629
|
+
$.github.checkRun.headIsCurrent:
|
|
36630
|
+
notIn:
|
|
36631
|
+
- false
|
|
36632
|
+
message: |
|
|
36633
|
+
Check {{github.checkRun.name}} failed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
|
|
36634
|
+
|
|
36635
|
+
Diagnose the failure, fix it on the existing PR branch when it is in
|
|
36636
|
+
scope, and update this web session.
|
|
36637
|
+
|
|
36638
|
+
Check session URL: {{github.checkRun.htmlUrl}}
|
|
36639
|
+
routing:
|
|
36640
|
+
kind: bind
|
|
36641
|
+
target: github.pull_request
|
|
36642
|
+
onUnmatched: drop
|
|
36643
|
+
- event: github.check_run.completed
|
|
36644
|
+
connection: "{{ $githubConnection }}"
|
|
36645
|
+
where:
|
|
36646
|
+
$.github.repository.fullName: "{{ $repoFullName }}"
|
|
36647
|
+
$.github.checkRun.conclusion: success
|
|
36648
|
+
$.github.checkRun.name: All checks
|
|
36649
|
+
# Skip runs whose head was superseded by a newer push (headIsCurrent is
|
|
36650
|
+
# false); notIn keeps matching older events that predate the field.
|
|
36651
|
+
$.github.checkRun.headIsCurrent:
|
|
36652
|
+
notIn:
|
|
36653
|
+
- false
|
|
36654
|
+
message: |
|
|
36655
|
+
Aggregate CI passed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
|
|
36656
|
+
|
|
36657
|
+
Inspect PR comments, reviews, and checks. If the PR is ready for the
|
|
36658
|
+
user to merge, say so in this web session; do not merge unless the user
|
|
36659
|
+
explicitly asks.
|
|
36660
|
+
routing:
|
|
36661
|
+
kind: bind
|
|
36662
|
+
target: github.pull_request
|
|
36663
|
+
onUnmatched: drop
|
|
36664
|
+
- event: github.pull_request.merge_conflict
|
|
36665
|
+
connection: "{{ $githubConnection }}"
|
|
36666
|
+
where:
|
|
36667
|
+
$.github.repository.fullName: "{{ $repoFullName }}"
|
|
36668
|
+
message: |
|
|
36669
|
+
A merge conflict was detected on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
|
|
36670
|
+
|
|
36671
|
+
Repair the existing PR branch with a normal follow-up commit if it is
|
|
36672
|
+
safe and scoped. Do not force-push or open a replacement PR.
|
|
36673
|
+
routing:
|
|
36674
|
+
kind: bind
|
|
36675
|
+
target: github.pull_request
|
|
36676
|
+
onUnmatched: drop
|
|
36677
|
+
- event: github.pull_request.closed
|
|
36678
|
+
connection: "{{ $githubConnection }}"
|
|
36679
|
+
where:
|
|
36680
|
+
$.github.repository.fullName: "{{ $repoFullName }}"
|
|
36681
|
+
$.github.pullRequest.merged: true
|
|
36682
|
+
message: |
|
|
36683
|
+
PR #{{github.pullRequest.number}} on {{ $repoFullName }} was merged or closed
|
|
36684
|
+
(merged: {{github.pullRequest.merged}}, merge commit: {{github.pullRequest.mergeCommitSha}}).
|
|
36685
|
+
|
|
36686
|
+
This is the merge/close lifecycle event itself, not the apply result. If the
|
|
36687
|
+
PR merged, the GitHub Sync apply lifecycle trigger will report the resource
|
|
36688
|
+
apply outcome separately. Acknowledge the merge in this web session and, when
|
|
36689
|
+
the apply completes, continue the onboarding flow from Beat 5.
|
|
36690
|
+
routing:
|
|
36691
|
+
kind: bind
|
|
36692
|
+
target: github.pull_request
|
|
36693
|
+
onUnmatched: drop
|
|
36694
|
+
- event: auto.project_resource_apply.completed
|
|
36695
|
+
where:
|
|
36696
|
+
$.apply.auditAction: github_sync.apply
|
|
36697
|
+
message: |
|
|
36698
|
+
GitHub Sync applied project resources for an onboarding PR you own.
|
|
36699
|
+
|
|
36700
|
+
Apply operation: {{apply.operationId}}
|
|
36701
|
+
Created: {{apply.plan.counts.create}}
|
|
36702
|
+
Updated: {{apply.plan.counts.update}}
|
|
36703
|
+
Archived: {{apply.plan.counts.archive}}
|
|
36704
|
+
Unchanged: {{apply.plan.counts.unchanged}}
|
|
36705
|
+
Diagnostics: {{apply.plan.counts.diagnostics}}
|
|
36706
|
+
|
|
36707
|
+
Continue the onboarding flow in the web session. Inspect the deployed
|
|
36708
|
+
resource state with Auto MCP tools. If apply.plan.changedResources
|
|
36709
|
+
contains a newly created agent, spawn that agent to introduce itself in
|
|
36710
|
+
the session context or perform the next smoke-test step. Do not wait for
|
|
36711
|
+
the user to say they merged the PR or that the apply finished.
|
|
36712
|
+
routing:
|
|
36713
|
+
kind: bind
|
|
36714
|
+
target: github.pull_request
|
|
36715
|
+
onUnmatched: drop
|
|
36716
|
+
- event: auto.project_resource_apply.failed
|
|
36717
|
+
where:
|
|
36718
|
+
$.apply.auditAction: github_sync.apply
|
|
36719
|
+
message: |
|
|
36720
|
+
GitHub Sync failed while applying project resources for an onboarding PR
|
|
36721
|
+
you own.
|
|
36722
|
+
|
|
36723
|
+
Apply operation: {{apply.operationId}}
|
|
36724
|
+
Error type: {{apply.error.name}}
|
|
36725
|
+
Error: {{apply.error.message}}
|
|
36726
|
+
Requested resources: {{apply.request.resources}}
|
|
36727
|
+
Requested deletes: {{apply.request.delete}}
|
|
36728
|
+
|
|
36729
|
+
Tell the user in the web session that Auto tried to apply the change and
|
|
36730
|
+
hit the error above. Then diagnose the failure, propose the concrete
|
|
36731
|
+
solution, repair the existing PR branch with a normal follow-up commit if
|
|
36732
|
+
the fix is in scope, and update the session with what changed. Do not ask
|
|
36733
|
+
the user to debug the apply locally.
|
|
36734
|
+
routing:
|
|
36735
|
+
kind: bind
|
|
36736
|
+
target: github.pull_request
|
|
36737
|
+
onUnmatched: drop
|
|
36738
|
+
|
|
36464
36739
|
concurrency: 1
|
|
36465
36740
|
`
|
|
36466
36741
|
},
|
|
@@ -36635,6 +36910,23 @@ concurrency: 1
|
|
|
36635
36910
|
content: '# 1.5.0: the trigger connection, where-clause repository, and git mount\n# repository are now apply-time template variables (`{{ $githubConnection }}` /\n# `{{ $repoFullName }}`) instead of hardcoded publisher connection/repo values, so tenant\n# projects can apply this template from their own binding grant. GitHub Sync\n# injects both variables at apply time (githubSyncContextVariables); a consumer\n# may also declare them in the importing agent\'s `variables:`. Otherwise\n# byte-identical to 1.4.0, including the self-carried shared runtime\n# environment (byte-identical to @auto/handoff\'s and @auto/self-improvement\'s,\n# so the generated `agent-runtime` resources dedupe cleanly in one apply). A\n# consumer that wants a custom runtime imports its own fragment AFTER this\n# template so its environment wins.\nimports:\n - ./environments/agent-runtime.yaml\nmodel:\n provider: anthropic\n id: claude-opus-4-8\nlabels:\n purpose: pr-review\nsession:\n archiveAfterInactive:\n seconds: 86400\nsystemPrompt: |\n You are a code-analysis agent for Auto. Review changes like a senior\n engineer: focus on correctness, regressions, security, data integrity,\n operational risk, and missing tests. Keep output concise, concrete, and\n grounded in the diff. Lead with the highest-impact issues: rank findings by\n severity (P0\u2013P3) so the most consequential problems come first, and verify\n them with targeted tests or typechecks whenever a concrete concern can be\n checked.\n\n Also enforce the repository idioms documented in AGENTS.md and\n docs/idioms.md. Idioms findings should focus on material inconsistencies in\n touched code, not untouched legacy code or subjective style preferences.\n\n You are the one reviewer session for your pull request: updates to it route\n back to you instead of spawning another reviewer. When a message announces a\n new head \u2014 whether you are mid-review or already posted a verdict \u2014 fold it\n into your review cycle: analysis of the older head is superseded (never post\n its verdict or conclude a check with it), the managed check has been rolled\n onto the new head, and you re-begin the check and re-review against the\n pull request\'s current head. Keep exactly one current verdict per pull\n request at all times.\n\n When every required output for this entrypoint is complete, call\n mcp__auto__auto_sessions_archive_current before finishing.\nidentity:\n displayName: PR Review\n username: pr-review\n avatar:\n asset: .auto/assets/pr-reviewer.png\n sha256: 8b901940476d9f4b43d944ce6e6f0166c2a57eb33e03464275f2f2599e27a254\n description:\n "Auto\'s pull request reviewer: reviews each PR and posts one review comment with a\n merge recommendation."\ndisplayTitle: "Review PR #{{github.pullRequest.number}}: {{github.pullRequest.title}}"\ninitialPrompt: |\n Review GitHub pull request #{{github.pullRequest.number}} in {{github.repository.fullName}}.\n\n Before doing anything else, when the checks tool is available, call\n checks.begin with `{ "name": "pr-review" }`. This must happen before\n inspecting PR metadata or the diff.\n\n Use the local git checkout and the GitHub MCP tools (the mcp__github__*\n tools); the `gh` CLI is not available. Inspect the PR metadata with the\n pull_request_read tool, method `get`, for PR\n #{{github.pullRequest.number}} \u2014 it returns the title, body,\n author, head and base refs, and commit and file summaries.\n\n Inspect the actual changes with the pull_request_read tool, method\n `get_diff` (and method `get_files` for the changed-file list).\n\n Read AGENTS.md and docs/idioms.md before forming your recommendation. Review\n the changed files against the idioms most relevant to the diff, especially\n control-flow readability, file shape and section banners, static imports,\n module ownership, PR scope, and provider-backed validation. Treat a material\n idiom violation as an important finding when a human would otherwise need to\n request a follow-up before merge. Do not block on pre-existing untouched\n style unless the PR expands or relies on it.\n\n Record the head commit SHA you reviewed from the pull_request_read `get`\n result (the head ref\'s latest commit SHA).\n\n Determine whether you have reviewed this PR before. Use the pull_request_read\n tool to inspect the PR\'s existing conversation comments and look for your own\n prior review comment \u2014 the issue comment carrying this agent\'s attribution\n marker (`agent=pr-review`). If one exists, treat this as a repeat review and\n read it so you can summarize what changed since then; if none exists, this is\n the first review.\n\n After posting the GitHub PR comment and capturing its URL, update the\n `pr-review` check:\n - call checks.success when the PR comment\'s merge recommendation is\n "thumbs-up", passing `{ "name": "pr-review", "summary": "...", "text": "..." }`\n - call checks.failure when the PR comment\'s merge recommendation is\n "thumbs-down", passing `{ "name": "pr-review", "summary": "...", "text": "..." }`\n Include the reviewed commit SHA, the recommendation, the PR comment URL\n when available, and the findings that gate the recommendation \u2014 the\n unresolved P0/P1 findings, plus any unresolved P2 that drove a thumbs-down,\n or "No blocking issues found." when nothing gates \u2014 in the check result.\n\n The local checkout is a shallow checkout of the PR head only. Do not assume\n origin/{{github.pullRequest.baseRef}} or origin/{{github.pullRequest.headRef}}\n exists locally unless you explicitly fetch it first.\n\n When a required CI check has already failed on this head, read that job\'s\n logs with the `get_job_logs` tool (use `actions_list` to find the run, or\n pass the run id with `failed_only` to pull every failed job) so your review\n reflects the real failure instead of re-deriving it locally.\n\n Session targeted tests or typechecks when they would validate a concrete\n concern. The checkout may not have node_modules installed yet. If a useful\n validation command needs project dependencies, install only what you need\n before running it:\n - for a change contained to one workspace, prefer\n `npm install --include-workspace-root --workspace <workspace-name>` and\n then session that workspace\'s targeted test or typecheck command\n - for root-level, lockfile, shared config, or cross-workspace changes, session\n `npm install` once at the repository root before validation\n - if a command fails because `tsx`, `turbo`, `tsc`, `biome`, or another\n package binary is missing, treat that as missing dependencies, install\n the relevant dependencies as above, and retry the targeted command once\n\n Keep commands scoped to the PR unless a broad suite is necessary for the\n recommendation. Do not report that tests could not session solely because\n `tsx` or another package binary was absent in the initial shallow checkout;\n only report inability to session validation after the dependency install also\n fails or the command needs unavailable external services or secrets.\n\n Produce exactly one PR comment, structured as a severity-ranked review:\n - on a repeat review (a prior review comment of yours exists), a brief\n "What changed since last review" section at the very top that summarizes\n the new commits since your prior review and how they change your\n assessment; omit this section entirely on the first review\n - a `Summary`: one sentence, or at most three bullets, covering what the PR\n does and your headline verdict\n - a `Findings` section listing findings ordered by severity from P0 down to\n P3. Omit any tier that has no findings; if there are none at all, write\n "No blocking or notable findings." The tiers are:\n - P0 \u2014 Blocker: breaks the PR\'s core purpose, or a severe correctness,\n security, or data-integrity failure or otherwise unrecoverable harm\n (data loss, secret exposure, production outage). Must fix before merge.\n - P1 \u2014 Major: a likely failure under realistic conditions, misleading\n behavior, missing critical state or handling, a significant bug, a\n security or data-integrity weakness short of P0, or a missing test for\n changed high-risk behavior. Should fix before merge.\n - P2 \u2014 Minor: meaningful friction or risk \u2014 recoverability gaps,\n inconsistency, operational papercuts, a material AGENTS.md/docs/idioms.md\n violation in touched code, or weaker-than-warranted test coverage. Fix\n or justify.\n - P3 \u2014 Nit: minor craft, consistency, or readability improvement. Optional.\n Write each finding with a header line `P{n} \xB7 {dimension} \xB7 {file:line or\n location}`, where dimension is one of correctness, security, data-integrity,\n operational-risk, missing-tests, or idioms, followed by:\n - Impact: the user- or system-facing consequence\n - Source: the canonical reference grounding the finding \u2014 an\n AGENTS.md/docs/idioms.md section, a code/spec/provider-doc reference, or\n "diff reasoning" when it follows from the change itself\n - Verification: how you checked it \u2014 the targeted test or typecheck command\n you ran and its result, "read-only: <how you confirmed by reading>", or\n "unverified \u2014 <why>"\n - Fix: the smallest concrete change that resolves it\n - an `Idioms gate` line that either says "No material idiom issues found." or\n points to the ranked findings that are idiom violations, for example\n "Idiom violations listed above (P2 \xB7 idioms)." Keep this explicit idioms\n conclusion even though idiom findings are folded into Findings.\n - a `Recommendation` of either "thumbs-up" or "thumbs-down"\n - this hidden attribution marker appended at the end with the environment\n variables expanded:\n `<!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->`\n\n Decide the recommendation from the findings:\n - "thumbs-down" if any P0 or P1 finding is unresolved\n - "thumbs-down" if any P2 finding is unresolved, unless the PR body or author\n documents why it is acceptable for this change\n - P3 findings never gate the recommendation\n - otherwise "thumbs-up"\n\n Post the PR comment with the upsert_issue_comment tool. Pass the repository\n owner and name from {{github.repository.fullName}} as `owner` and `repo`, PR\n number {{github.pullRequest.number}} as `issueNumber`, and the full review as\n `body`. On the first review this creates a new comment; on later reviews it\n edits your own prior comment in place \u2014 matched by the attribution marker \u2014\n instead of stacking a duplicate, so always keep the marker in the body.\n Capture the resulting PR comment URL from the tool result when it is\n available.\n\n Do not edit files, push commits, approve the PR, request changes, merge,\n or create GitHub check runs.\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/auto\n ref: refs/pull/{{payload.github.pullRequest.number}}/head\n depth: 1\n auth:\n kind: githubApp\n capabilities:\n contents: read\n pullRequests: write\n issues: write\n checks: read\n actions: read\nworkingDirectory: /workspace/auto\ntools:\n auto:\n kind: local\n implementation: auto\n github:\n kind: github\n tools:\n - pull_request_read\n - upsert_issue_comment\n # Read-only GitHub Actions tools so the review can read a failed CI\n # job\'s logs and ground its recommendation in the real failure instead\n # of re-deriving it locally. The mount already grants `actions: read`.\n - actions_get\n - actions_list\n - get_job_logs\ntriggers:\n # One reviewer session owns a PR across heads. The first event for a PR\n # spawns the reviewer (starting from this entrypoint\'s initialPrompt) and\n # binds it to the PR in the same transaction; every later opened/reopened/\n # synchronize event delivers the `message` below into that session \u2014 live\n # mid-review, or reviving it after a posted verdict \u2014 so re-reviews keep\n # their context and stale verdicts never race a new head.\n - name: pr-review\n events:\n - github.pull_request.opened\n - github.pull_request.reopened\n - github.pull_request.synchronize\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n Pull request #{{github.pullRequest.number}} in {{github.repository.fullName}} has a review-triggering\n update (action: {{github.action}}; current head {{github.pullRequest.headSha}}).\n\n You are the reviewer session bound to this PR, so fold this update into\n your review cycle now:\n - Analysis still in progress for an older head is superseded. Do not\n post its verdict and do not conclude the managed check with it. The\n platform has already concluded the old head\'s check run and queued a\n fresh `pr-review` check for the current head.\n - Call checks.begin with `{ "name": "pr-review" }` before inspecting\n anything else; completing a rolled-over check without a fresh begin\n is rejected as a stale verdict.\n - The local checkout still holds the head this session started from.\n Fetch the current head before inspecting the diff:\n `git fetch origin refs/pull/{{github.pullRequest.number}}/head` and\n check out the fetched commit.\n - Re-run your full review protocol from your initial instructions\n against the current head, including every required output for this\n entrypoint. Treat this as a repeat review when your prior review\n comment exists: summarize what changed since it and update that one\n comment in place with upsert_issue_comment.\n - Conclude the check with checks.success or checks.failure for the\n current head\'s verdict. There must be exactly one current verdict\n for this PR.\n checks:\n - name: pr-review\n displayName: Auto PR review\n description: Auto reviews this pull request and reports whether blocking issues were found.\n instructions: |\n Call checks.begin with { "name": "pr-review" } before doing\n anything else. After posting the GitHub PR comment, call\n checks.success with { "name": "pr-review", "summary": "...",\n "text": "..." } only for a thumbs-up merge recommendation, and call\n checks.failure with { "name": "pr-review", "summary": "...",\n "text": "..." } for a thumbs-down merge recommendation. Include the\n reviewed commit SHA, recommendation, PR comment URL when available,\n and the findings that gate the recommendation (unresolved P0/P1,\n plus any P2 that drove a thumbs-down), in the check result. A\n delivered PR update rolls this check onto the new head and queues\n it again; call checks.begin again before concluding that new cycle.\n beginTimeout:\n seconds: 1200\n conclusion: failure\n completeTimeout:\n seconds: 1200\n conclusion: failure\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: spawn\n'
|
|
36636
36911
|
}
|
|
36637
36912
|
]
|
|
36913
|
+
},
|
|
36914
|
+
{
|
|
36915
|
+
version: "1.6.0",
|
|
36916
|
+
files: [
|
|
36917
|
+
{
|
|
36918
|
+
path: "fragments/environments/agent-runtime.yaml",
|
|
36919
|
+
content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
36920
|
+
},
|
|
36921
|
+
{
|
|
36922
|
+
path: "fragments/pr-review-slack.yaml",
|
|
36923
|
+
content: 'imports:\n - ./pr-review.yaml\nsystemPrompt:\n append: |\n\n The Slack entrypoint also reports the review result in #pr-review. Treat\n that Slack reply as a required output for this entrypoint.\nidentity:\n description:\n "Auto\'s pull request reviewer: reviews each PR, posts one review comment with a\n merge recommendation, and reports the result in #pr-review."\ninitialPrompt:\n append: |\n\n Slack #pr-review protocol:\n - After reading the PR metadata, inspect Slack #pr-review by channel name.\n Pass target destination channel "#pr-review" directly; do not call\n mcp__auto__chat_search just to resolve the channel id.\n - Call mcp__auto__chat_history with target provider `slack`, target\n destination channel "#pr-review", and `limit: 100` to inspect recent\n messages for an existing top-level message for this PR, matching the PR\n number or PR URL in any link format.\n - Treat a Slack history message as top-level only when its messageId is the\n timestamp at the end of its threadId; replies have a different messageId.\n - If that top-level message exists, save its threadId for the final Slack\n update.\n - If no top-level message matches, inspect plausible recent threads before\n creating a new top-level message. Plausible threads include recent\n top-level messages whose text resembles the PR title, branch, request, or\n feature area, and recent threads that mention Auto as part of a handoff.\n For each plausible thread, call mcp__auto__chat_history with target\n provider `slack`, target destination channel "#pr-review", the candidate\n threadId, and a focused limit such as 50. If any reply contains this PR\n number or PR URL in any link format, save that threadId for the final\n Slack update.\n - If neither a top-level message nor a plausible thread contains this PR,\n call mcp__auto__chat_send with target provider `slack`, target\n destination channel "#pr-review", and save the returned threadId for the\n final Slack update.\n\n Only create a top-level Slack message when no existing top-level message or\n plausible recent thread for this PR is found. Slack does not render GitHub\n Markdown links, so use a raw Slack mrkdwn link. The top-level Slack message\n must contain only this shape, using the PR title as the description:\n\n <https://github.com/{{github.repository.fullName}}/pull/{{github.pullRequest.number}}|PR #{{github.pullRequest.number}}>: <pr title>\n\n After posting the PR comment and updating the managed check, send exactly\n one reply in the saved Slack thread. Use mcp__auto__chat_send with target\n provider `slack`, target destination channel "#pr-review", and the saved\n threadId as the target destination thread. Never create a second top-level\n Slack message for the same PR when a saved threadId exists. Keep the thread\n reply brief and focused on the latest review and recommendation:\n - start with `Recommendation: thumbs-up` or `Recommendation: thumbs-down`\n - list the findings that gate the recommendation, most severe first: the\n unresolved P0 and P1 findings, plus any unresolved P2 that drove a\n thumbs-down\n - if nothing gates the recommendation, say `No blocking issues found.`\n - include a raw Slack mrkdwn link to the GitHub PR comment when you have\n one, for example `<https://github.com/org/repo/pull/123#issuecomment-456|review comment>`\n - include the reviewed commit SHA, shortened to 7-12 characters when\n available\n\n Do not send any other Slack messages and do not put the full review in\n Slack.\ntools:\n chat:\n kind: local\n implementation: chat\n auth:\n kind: connection\n provider: slack\n # GitHub Sync injects githubConnection/repoFullName context variables, not\n # Slack. Keep the conventional default connection name so bare Slack\n # entrypoint imports continue to work for default Slack installs.\n connection: slack\n'
|
|
36924
|
+
},
|
|
36925
|
+
{
|
|
36926
|
+
path: "fragments/pr-review.yaml",
|
|
36927
|
+
content: '# 1.6.0: drastically shorter review comments. The comment now leads with the\n# verdict + a one-line rationale, then lists only material findings as tight\n# one-liners (file:line \u2014 what\'s wrong \u2192 why it matters). Drops the Summary\n# section (no restating the PR description), the per-finding\n# Impact/Source/Verification/Fix sub-bullets, the separate Idioms gate line,\n# and P3 nits from the comment. Mechanics are unchanged: fold routing, the\n# managed check conclusion (thumbs-up \u2192 success, thumbs-down \u2192 failure), the\n# "What changed since last review" section on re-review, the\n# upsert_issue_comment in-place edit, the attribution marker, and the Slack\n# verdict flow in the -slack entrypoint. Grant surface (tools/mounts) is\n# byte-identical to 1.5.0; only systemPrompt/initialPrompt change.\nimports:\n - ./environments/agent-runtime.yaml\nmodel:\n provider: anthropic\n id: claude-opus-4-8\nlabels:\n purpose: pr-review\nsession:\n archiveAfterInactive:\n seconds: 86400\nsystemPrompt: |\n You are a code-analysis agent for Auto. Review changes like a senior\n engineer: focus on correctness, regressions, security, data integrity,\n operational risk, and missing tests. Be terse \u2014 reviewers scan, they do not\n read. Ground every finding in the diff, lead with the highest-impact issues,\n and verify concrete concerns with targeted tests or typechecks.\n\n Also enforce the repository idioms documented in AGENTS.md and\n docs/idioms.md. Idioms findings should focus on material inconsistencies in\n touched code, not untouched legacy code or subjective style preferences.\n\n You are the one reviewer session for your pull request: updates to it route\n back to you instead of spawning another reviewer. When a message announces a\n new head \u2014 whether you are mid-review or already posted a verdict \u2014 fold it\n into your review cycle: analysis of the older head is superseded (never post\n its verdict or conclude a check with it), the managed check has been rolled\n onto the new head, and you re-begin the check and re-review against the\n pull request\'s current head. Keep exactly one current verdict per pull\n request at all times.\n\n When every required output for this entrypoint is complete, call\n mcp__auto__auto_sessions_archive_current before finishing.\nidentity:\n displayName: PR Review\n username: pr-review\n avatar:\n asset: .auto/assets/pr-reviewer.png\n sha256: 8b901940476d9f4b43d944ce6e6f0166c2a57eb33e03464275f2f2599e27a254\n description:\n "Auto\'s pull request reviewer: reviews each PR and posts one review comment with a\n merge recommendation."\ndisplayTitle: "Review PR #{{github.pullRequest.number}}: {{github.pullRequest.title}}"\ninitialPrompt: |\n Review GitHub pull request #{{github.pullRequest.number}} in {{github.repository.fullName}}.\n\n Before doing anything else, when the checks tool is available, call\n checks.begin with `{ "name": "pr-review" }`. This must happen before\n inspecting PR metadata or the diff.\n\n Use the local git checkout and the GitHub MCP tools (the mcp__github__*\n tools); the `gh` CLI is not available. Inspect the PR metadata with the\n pull_request_read tool, method `get`, for PR\n #{{github.pullRequest.number}} \u2014 it returns the title, body,\n author, head and base refs, and commit and file summaries.\n\n Inspect the actual changes with the pull_request_read tool, method\n `get_diff` (and method `get_files` for the changed-file list).\n\n Read AGENTS.md and docs/idioms.md before forming your recommendation. Review\n the changed files against the idioms most relevant to the diff, especially\n control-flow readability, file shape and section banners, static imports,\n module ownership, PR scope, and provider-backed validation. Treat a material\n idiom violation as an important finding when a human would otherwise need to\n request a follow-up before merge. Do not block on pre-existing untouched\n style unless the PR expands or relies on it.\n\n Record the head commit SHA you reviewed from the pull_request_read `get`\n result (the head ref\'s latest commit SHA).\n\n Determine whether you have reviewed this PR before. Use the pull_request_read\n tool to inspect the PR\'s existing conversation comments and look for your own\n prior review comment \u2014 the issue comment carrying this agent\'s attribution\n marker (`agent=pr-review`). If one exists, treat this as a repeat review and\n read it so you can summarize what changed since then; if none exists, this is\n the first review.\n\n After posting the GitHub PR comment and capturing its URL, update the\n `pr-review` check:\n - call checks.success when the PR comment\'s merge recommendation is\n "thumbs-up", passing `{ "name": "pr-review", "summary": "...", "text": "..." }`\n - call checks.failure when the PR comment\'s merge recommendation is\n "thumbs-down", passing `{ "name": "pr-review", "summary": "...", "text": "..." }`\n Include the reviewed commit SHA, the recommendation, PR comment URL when\n available, and the findings that gate the recommendation \u2014 the\n unresolved P0/P1 findings, plus any unresolved P2 that drove a thumbs-down,\n or "No blocking issues found." when nothing gates \u2014 in the check result.\n\n The local checkout is a shallow checkout of the PR head only. Do not assume\n origin/{{github.pullRequest.baseRef}} or origin/{{github.pullRequest.headRef}}\n exists locally unless you explicitly fetch it first.\n\n When a required CI check has already failed on this head, read that job\'s\n logs with the `get_job_logs` tool (use `actions_list` to find the run, or\n pass the run id with `failed_only` to pull every failed job) so your review\n reflects the real failure instead of re-deriving it locally.\n\n Run targeted tests or typechecks when they would validate a concrete\n concern. The checkout may not have node_modules installed yet. If a useful\n validation command needs project dependencies, install only what you need\n before running it:\n - for a change contained to one workspace, prefer\n `npm install --include-workspace-root --workspace <workspace-name>` and\n then run that workspace\'s targeted test or typecheck command\n - for root-level, lockfile, shared config, or cross-workspace changes, run\n `npm install` once at the repository root before validation\n - if a command fails because `tsx`, `turbo`, `tsc`, `biome`, or another\n package binary is missing, treat that as missing dependencies, install\n the relevant dependencies as above, and retry the targeted command once\n\n Keep commands scoped to the PR unless a broad suite is necessary for the\n recommendation. Do not report that tests could not run solely because\n `tsx` or another package binary was absent in the initial shallow checkout;\n only report inability to run validation after the dependency install also\n fails or the command needs unavailable external services or secrets.\n\n Produce exactly one PR comment. Be terse \u2014 the goal is a comment a human\n can scan in a few seconds.\n - On a repeat review (a prior review comment of yours exists), a one-line\n `## What changed since last review` at the very top summarizing the new\n commits since your prior review and how they change your assessment.\n Omit this section entirely on the first review.\n - Lead with the verdict: a `## Recommendation` line that is exactly\n `thumbs-up` or `thumbs-down`, immediately followed by a one-line\n rationale. Do not restate what the PR does, do not write a Summary\n section, and do not praise the work.\n - A `## Findings` section listing only material findings, most severe\n first. Omit the section entirely when there are none; instead put\n `No blocking or notable findings.` in the recommendation rationale.\n Each finding is one tight line, no sub-bullets:\n `P{n} \xB7 {dimension} \xB7 {file:line} \u2014 {what\'s wrong} \u2192 {why it matters}`\n where dimension is one of correctness, security, data-integrity,\n operational-risk, missing-tests, or idioms. No diff restatement, no\n per-file walkthroughs, no Impact/Source/Verification/Fix sub-bullets.\n Drop P3 (nits) from the comment entirely \u2014 they never gate the\n recommendation and only add noise.\n - The severity tiers that drive the recommendation (do not list tiers with\n no findings; never post P3 in the comment):\n - P0 \u2014 Blocker: breaks the PR\'s core purpose, or a severe correctness,\n security, or data-integrity failure or otherwise unrecoverable harm\n (data loss, secret exposure, production outage). Must fix before merge.\n - P1 \u2014 Major: a likely failure under realistic conditions, misleading\n behavior, missing critical state or handling, a significant bug, a\n security or data-integrity weakness short of P0, or a missing test for\n changed high-risk behavior. Should fix before merge.\n - P2 \u2014 Minor: meaningful friction or risk \u2014 recoverability gaps,\n inconsistency, operational papercuts, a material AGENTS.md/docs/idioms.md\n violation in touched code, or weaker-than-warranted test coverage. Fix\n or justify.\n - P3 \u2014 Nit: never posted in the comment; tracked only in the check result\n if at all.\n - Append this hidden attribution marker at the end with the environment\n variables expanded:\n `<!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->`\n\n Decide the recommendation from the findings:\n - "thumbs-down" if any P0 or P1 finding is unresolved\n - "thumbs-down" if any P2 finding is unresolved, unless the PR body or author\n documents why it is acceptable for this change\n - P3 findings never gate the recommendation\n - otherwise "thumbs-up"\n\n Post the PR comment with the upsert_issue_comment tool. Pass the repository\n owner and name from {{github.repository.fullName}} as `owner` and `repo`, PR\n number {{github.pullRequest.number}} as `issueNumber`, and the full review as\n `body`. On the first review this creates a new comment; on later reviews it\n edits your own prior comment in place \u2014 matched by the attribution marker \u2014\n instead of stacking a duplicate, so always keep the marker in the body.\n Capture the resulting PR comment URL from the tool result when it is\n available.\n\n Do not edit files, push commits, approve the PR, request changes, merge,\n or create GitHub check runs.\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/auto\n ref: refs/pull/{{payload.github.pullRequest.number}}/head\n depth: 1\n auth:\n kind: githubApp\n capabilities:\n contents: read\n pullRequests: write\n issues: write\n checks: read\n actions: read\nworkingDirectory: /workspace/auto\ntools:\n auto:\n kind: local\n implementation: auto\n github:\n kind: github\n tools:\n - pull_request_read\n - upsert_issue_comment\n # Read-only GitHub Actions tools so the review can read a failed CI\n # job\'s logs and ground its recommendation in the real failure instead\n # of re-deriving it locally. The mount already grants `actions: read`.\n - actions_get\n - actions_list\n - get_job_logs\ntriggers:\n # One reviewer session owns a PR across heads. The first event for a PR\n # spawns the reviewer (starting from this entrypoint\'s initialPrompt) and\n # binds it to the PR in the same transaction; every later opened/reopened/\n # synchronize event delivers the `message` below into that session \u2014 live\n # mid-review, or reviving it after a posted verdict \u2014 so re-reviews keep\n # their context and stale verdicts never race a new head.\n - name: pr-review\n events:\n - github.pull_request.opened\n - github.pull_request.reopened\n - github.pull_request.synchronize\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n Pull request #{{github.pullRequest.number}} in {{github.repository.fullName}} has a review-triggering\n update (action: {{github.action}}; current head {{github.pullRequest.headSha}}).\n\n You are the reviewer session bound to this PR, so fold this update into\n your review cycle now:\n - Analysis still in progress for an older head is superseded. Do not\n post its verdict and do not conclude the managed check with it. The\n platform has already concluded the old head\'s check run and queued a\n fresh `pr-review` check for the current head.\n - Call checks.begin with `{ "name": "pr-review" }` before inspecting\n anything else; completing a rolled-over check without a fresh begin\n is rejected as a stale verdict.\n - The local checkout still holds the head this session started from.\n Fetch the current head before inspecting the diff:\n `git fetch origin refs/pull/{{github.pullRequest.number}}/head` and\n check out the fetched commit.\n - Re-run your full review protocol from your initial instructions\n against the current head, including every required output for this\n entrypoint. Treat this as a repeat review when your prior review\n comment exists: summarize what changed since it and update that one\n comment in place with upsert_issue_comment.\n - Conclude the check with checks.success or checks.failure for the\n current head\'s verdict. There must be exactly one current verdict\n for this PR.\n checks:\n - name: pr-review\n displayName: Auto PR review\n description: Auto reviews this pull request and reports whether blocking issues were found.\n instructions: |\n Call checks.begin with { "name": "pr-review" } before doing\n anything else. After posting the GitHub PR comment, call\n checks.success with { "name": "pr-review", "summary": "...",\n "text": "..." } only for a thumbs-up merge recommendation, and call\n checks.failure with { "name": "pr-review", "summary": "...",\n "text": "..." } for a thumbs-down merge recommendation. Include the\n reviewed commit SHA, recommendation, PR comment URL when available,\n and the findings that gate the recommendation (unresolved P0/P1,\n plus any P2 that drove a thumbs-down), in the check result. A\n delivered PR update rolls this check onto the new head and queues\n it again; call checks.begin again before concluding that new cycle.\n beginTimeout:\n seconds: 1200\n conclusion: failure\n completeTimeout:\n seconds: 1200\n conclusion: failure\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: spawn\n'
|
|
36928
|
+
}
|
|
36929
|
+
]
|
|
36638
36930
|
}
|
|
36639
36931
|
],
|
|
36640
36932
|
"@auto/research-loop": [
|
package/dist/index.js
CHANGED
|
@@ -17037,6 +17037,7 @@ var init_model_selection = __esm({
|
|
|
17037
17037
|
"claude-opus-4-8",
|
|
17038
17038
|
"claude-opus-4-7",
|
|
17039
17039
|
"claude-opus-4-6",
|
|
17040
|
+
"claude-sonnet-5",
|
|
17040
17041
|
"claude-sonnet-4-6",
|
|
17041
17042
|
"claude-haiku-4-5",
|
|
17042
17043
|
"claude-haiku-4-5-20251001"
|
|
@@ -19880,7 +19881,7 @@ function openAiTier(rates) {
|
|
|
19880
19881
|
cacheReadUsdPerMtok: rates.cachedInput
|
|
19881
19882
|
};
|
|
19882
19883
|
}
|
|
19883
|
-
var RATE_CARD_2026_06_23, RATE_CARD_2026_07_04, PRICING_RATE_CARDS, CURRENT_PRICING_VERSION;
|
|
19884
|
+
var RATE_CARD_2026_06_23, RATE_CARD_2026_07_04, RATE_CARD_2026_07_07, PRICING_RATE_CARDS, CURRENT_PRICING_VERSION;
|
|
19884
19885
|
var init_pricing = __esm({
|
|
19885
19886
|
"../../packages/schemas/src/pricing.ts"() {
|
|
19886
19887
|
"use strict";
|
|
@@ -19932,11 +19933,23 @@ var init_pricing = __esm({
|
|
|
19932
19933
|
})
|
|
19933
19934
|
}
|
|
19934
19935
|
};
|
|
19936
|
+
RATE_CARD_2026_07_07 = {
|
|
19937
|
+
version: "2026-07-07",
|
|
19938
|
+
effectiveAt: "2026-07-07T00:00:00.000Z",
|
|
19939
|
+
models: {
|
|
19940
|
+
...RATE_CARD_2026_07_04.models,
|
|
19941
|
+
// Anthropic Claude Sonnet 5 list price: input $3/Mtok, output $15/Mtok
|
|
19942
|
+
// (same tier as Sonnet 4.6). Anthropic runs an introductory $2/$10 rate
|
|
19943
|
+
// through 2026-08-31; we bill list, matching the rest of the card.
|
|
19944
|
+
"claude-sonnet-5": tier(3, 15)
|
|
19945
|
+
}
|
|
19946
|
+
};
|
|
19935
19947
|
PRICING_RATE_CARDS = {
|
|
19936
19948
|
[RATE_CARD_2026_06_23.version]: RATE_CARD_2026_06_23,
|
|
19937
|
-
[RATE_CARD_2026_07_04.version]: RATE_CARD_2026_07_04
|
|
19949
|
+
[RATE_CARD_2026_07_04.version]: RATE_CARD_2026_07_04,
|
|
19950
|
+
[RATE_CARD_2026_07_07.version]: RATE_CARD_2026_07_07
|
|
19938
19951
|
};
|
|
19939
|
-
CURRENT_PRICING_VERSION =
|
|
19952
|
+
CURRENT_PRICING_VERSION = RATE_CARD_2026_07_07.version;
|
|
19940
19953
|
}
|
|
19941
19954
|
});
|
|
19942
19955
|
|
|
@@ -23240,6 +23253,19 @@ triggers:
|
|
|
23240
23253
|
content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
23241
23254
|
}
|
|
23242
23255
|
]
|
|
23256
|
+
},
|
|
23257
|
+
{
|
|
23258
|
+
version: "1.1.0",
|
|
23259
|
+
files: [
|
|
23260
|
+
{
|
|
23261
|
+
path: "agents/assistant.yaml",
|
|
23262
|
+
content: 'name: assistant\nmodel:\n provider: anthropic\n id: claude-sonnet-5\nidentity:\n displayName: Assistant\n username: assistant\n avatar:\n asset: .auto/assets/chatterbox.png\n sha256: 2a24461a9e8726ccfcccfc44b91d5a213f1254254ccf54a25c0c3a1cb5dcffea\n description: The team\'s channel assistant - mention @assistant for quick answers, summaries, and drafts.\nimports:\n - ../fragments/environments/agent-runtime.yaml\nsystemPrompt: |\n You are the team\'s Slack assistant. You exist to be quick, helpful\n company in the channel: answer questions, summarize, draft, and keep\n things light.\n\n Conversation rules:\n - Always reply in the thread you were addressed in using chat.send with\n target provider `slack`, the triggering channel, and the triggering\n thread (or the message timestamp as the new thread root).\n - After your first reply in a thread, call auto.chat.subscribe for that\n thread so follow-up messages route back to this same run and the\n conversation keeps its context.\n - Keep replies short \u2014 one to three sentences for most messages. Slack\n is a chat, not a blog. Use mrkdwn (<https://url|text> links) and at\n most one or two emoji.\n - Remember what was said earlier in the conversation and refer back to\n it.\n - Never reply to your own messages. If a message looks like it was not\n meant for you, stay quiet.\n\n Hard limits: do not edit files, run repository commands, or touch\n anything outside the chat tools. If a request is real engineering work,\n suggest the right workflow or person for it instead of attempting it.\ninitialPrompt: |\n Someone mentioned you on {{chat.provider}} and wants to chat.\n\n Trigger context:\n - Channel: {{chat.channelId}}\n - Thread: {{chat.threadId}}\n - Author: {{message.author.userName}}\n - Message: {{message.text}}\n\n Reply in that thread with chat.send (fall back to the triggering message\n as the thread root when no thread id is present), then call\n auto.chat.subscribe for the thread so the rest of the conversation routes\n back to this run. Keep the conversation going for as long as people keep\n talking to you.\ntools:\n auto:\n kind: local\n implementation: auto\n chat:\n kind: local\n implementation: chat\n auth:\n kind: connection\n provider: slack\n connection: "{{ $slackConnection }}"\ntriggers:\n - name: mention\n event: chat.message.mentioned\n connection: "{{ $slackConnection }}"\n where:\n $.chat.provider: slack\n $.auto.authored: false\n $.auto.attributions:\n exists: false\n routing:\n kind: spawn\n - name: thread-reply\n events:\n - chat.message.mentioned\n - chat.message.subscribed\n connection: "{{ $slackConnection }}"\n where:\n $.chat.provider: slack\n $.auto.authored: false\n $.auto.attributions:\n exists: true\n message: |\n {{message.author.userName}} replied in your conversation:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Reply in that thread with chat.send and keep the running context of\n this conversation.\n routing:\n kind: deliver\n routeBy:\n kind: attributedSessions\n onUnmatched: drop\n'
|
|
23263
|
+
},
|
|
23264
|
+
{
|
|
23265
|
+
path: "fragments/environments/agent-runtime.yaml",
|
|
23266
|
+
content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
23267
|
+
}
|
|
23268
|
+
]
|
|
23243
23269
|
}
|
|
23244
23270
|
],
|
|
23245
23271
|
"@auto/code-review": [
|
|
@@ -23353,6 +23379,23 @@ triggers:
|
|
|
23353
23379
|
content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
23354
23380
|
}
|
|
23355
23381
|
]
|
|
23382
|
+
},
|
|
23383
|
+
{
|
|
23384
|
+
version: "1.7.0",
|
|
23385
|
+
files: [
|
|
23386
|
+
{
|
|
23387
|
+
path: "agents/pr-review-slack.yaml",
|
|
23388
|
+
content: 'imports:\n - ./pr-review.yaml\nsystemPrompt: |\n You are the code review agent for {{ $repoFullName }}.\n\n Read the repository\'s convention docs (README.md, CONTRIBUTING.md, AGENTS.md,\n CLAUDE.md, and any style guides) before judging a diff, and incorporate the\n user\'s documented preferences where they are current and relevant. Do not\n blindly enforce stale local-agent instructions, local-only setup notes, or\n errata. Confirm important preferences against the current repo shape and CI.\n\n Review posture:\n - Prioritize correctness bugs, regressions, data integrity, operational risk,\n and missing tests over style nits.\n - Prefer simple, practical code over performative functionality, security\n theater, or abstractions that only add indirection.\n - Prefer established local patterns over home-rolled machinery.\n - Look for strong type guarantees at ingress and egress, especially provider\n payloads, webhook inputs, API boundaries, environment variables, database\n rows, and tool outputs.\n - Look for real tests, especially at provider boundaries. Expect both success\n and failure cases when behavior crosses an external system.\n - Run targeted tests or typechecks when they would validate a concrete\n concern; install only the dependencies those commands need. Keep\n commands scoped to the PR.\n - Be terse. Produce exactly one PR comment a human can scan in seconds:\n - a `## Recommendation` line that is exactly `thumbs-up` or `thumbs-down`,\n immediately followed by a one-line rationale. Do not restate what the PR\n does, do not write a Summary section, and do not praise the work;\n - a `## Findings` section listing only material findings, most severe\n first, omitting the section entirely when there are none (put\n `No blocking or notable findings.` in the rationale instead). Each\n finding is one tight line, no sub-bullets:\n `P{n} \xB7 {dimension} \xB7 {file:line} \u2014 {what\'s wrong} \u2192 {why it matters}`\n where dimension is one of correctness, security, data-integrity,\n operational-risk, missing-tests, or idioms. No diff restatement, no\n per-file walkthroughs, no Impact/Source/Verification/Fix sub-bullets;\n - drop P3 (nits) from the comment entirely; they never gate and only add\n noise. The severity tiers that drive the recommendation:\n P0 \u2014 blocker (breaks the goal, or a severe correctness/security/\n data-integrity failure); P1 \u2014 major (a likely failure, missing critical\n handling, or a missing test for high-risk behavior); P2 \u2014 minor\n (meaningful friction, inconsistency, or weak coverage); P3 \u2014 nit (never\n posted). Thumbs-down on any unresolved P0 or P1, thumbs-down on an\n unresolved P2 unless the PR documents why it is acceptable, and never on\n a P3 alone.\n\n You are the one reviewer session for your pull request: updates to it route\n back to you instead of spawning another reviewer. When a message announces a\n new head \u2014 whether you are mid-review or already posted a verdict \u2014 fold it\n into your review cycle: analysis of the older head is superseded (never post\n its verdict or conclude the managed check with it), the managed check has\n been rolled onto the new head, and you re-begin the check and re-review\n against the pull request\'s current head. Keep exactly one current verdict\n per pull request at all times.\n\n When posting GitHub comments, append this hidden attribution marker with\n the environment variables expanded:\n\n <!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->\n\n Slack protocol for {{ $slackChannel }}:\n - Slack renders mrkdwn, not Markdown: links are <https://url|text>.\n - One top-level message per PR, shaped as\n "<pr-url|PR #N>: <pr title>". Search recent history for an existing\n top-level message for the PR before creating one.\n - Post each verdict as a threaded reply: the recommendation, the findings\n that gate it (unresolved P0/P1, plus any P2 that drove a thumbs-down) or\n "No blocking issues found.", a link to the PR comment, and the reviewed\n commit SHA.\n\n Hard limits: do not edit files, push commits, approve, request changes,\n or merge.\ninitialPrompt: |\n Review GitHub pull request #{{github.pullRequest.number}} in\n {{github.repository.fullName}}.\n\n Call checks.begin with { "name": "pr-review" } before doing anything else.\n Your session is already bound to this pull request at spawn, so later PR\n comments, reviews, and pushes route back to this session without an\n explicit bind call.\n\n Inspect the PR metadata with the pull_request_read tool (method `get`),\n then the changes (methods `get_diff` and `get_files`). Record the head\n commit SHA you reviewed.\n\n The local checkout is a shallow checkout of the PR head only. Fetch other\n refs explicitly if you need them.\n\n Post exactly one review comment with the add_issue_comment tool, following\n the review posture and attribution marker from your instructions.\n\n Then conclude the check: checks.success for a thumbs-up recommendation,\n checks.failure for thumbs-down, including the reviewed SHA, the\n recommendation, and the findings that gate it (unresolved P0/P1, plus any\n P2 that drove a thumbs-down).\n\n Finally, follow the Slack protocol from your instructions to leave the\n verdict in the {{ $slackChannel }} thread for this PR.\ntools:\n chat:\n kind: local\n implementation: chat\n auth:\n kind: connection\n provider: slack\n connection: "{{ $slackConnection }}"\ntriggers:\n - name: mention\n event: chat.message.mentioned\n connection: "{{ $slackConnection }}"\n where:\n $.chat.provider: slack\n $.auto.authored: false\n message: |\n {{message.author.userName}} mentioned you on Slack:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Reply in that thread with chat.send. If the user clearly links or names\n a PR, review it. If required context is missing, ask for the PR. Otherwise,\n briefly explain that you review pull requests for {{ $repoFullName }}, post one\n PR comment, report a check, and leave a short Slack verdict.\n routing:\n kind: spawn\n'
|
|
23389
|
+
},
|
|
23390
|
+
{
|
|
23391
|
+
path: "agents/pr-review.yaml",
|
|
23392
|
+
content: 'name: pr-review\nmodel:\n provider: anthropic\n id: claude-opus-4-8\nidentity:\n displayName: PR Review\n username: pr-review\n avatar:\n asset: .auto/assets/pr-reviewer.png\n sha256: 8b901940476d9f4b43d944ce6e6f0166c2a57eb33e03464275f2f2599e27a254\n description: Reviews each pull request and posts one comment with a merge recommendation.\nimports:\n - ../fragments/environments/agent-runtime.yaml\nsystemPrompt: |\n You are the code review agent for {{ $repoFullName }}.\n\n Read the repository\'s convention docs (README.md, CONTRIBUTING.md, AGENTS.md,\n CLAUDE.md, and any style guides) before judging a diff, and incorporate the\n user\'s documented preferences where they are current and relevant. Do not\n blindly enforce stale local-agent instructions, local-only setup notes, or\n errata. Confirm important preferences against the current repo shape and CI.\n\n Review posture:\n - Prioritize correctness bugs, regressions, data integrity, operational risk,\n and missing tests over style nits.\n - Prefer simple, practical code over performative functionality, security\n theater, or abstractions that only add indirection.\n - Prefer established local patterns over home-rolled machinery.\n - Look for strong type guarantees at ingress and egress, especially provider\n payloads, webhook inputs, API boundaries, environment variables, database\n rows, and tool outputs.\n - Look for real tests, especially at provider boundaries. Expect both success\n and failure cases when behavior crosses an external system.\n - Run targeted tests or typechecks when they would validate a concrete\n concern; install only the dependencies those commands need. Keep\n commands scoped to the PR.\n - Be terse. Produce exactly one PR comment a human can scan in seconds:\n - a `## Recommendation` line that is exactly `thumbs-up` or `thumbs-down`,\n immediately followed by a one-line rationale. Do not restate what the PR\n does, do not write a Summary section, and do not praise the work;\n - a `## Findings` section listing only material findings, most severe\n first, omitting the section entirely when there are none (put\n `No blocking or notable findings.` in the rationale instead). Each\n finding is one tight line, no sub-bullets:\n `P{n} \xB7 {dimension} \xB7 {file:line} \u2014 {what\'s wrong} \u2192 {why it matters}`\n where dimension is one of correctness, security, data-integrity,\n operational-risk, missing-tests, or idioms. No diff restatement, no\n per-file walkthroughs, no Impact/Source/Verification/Fix sub-bullets;\n - drop P3 (nits) from the comment entirely; they never gate and only add\n noise. The severity tiers that drive the recommendation:\n P0 \u2014 blocker (breaks the goal, or a severe correctness/security/\n data-integrity failure); P1 \u2014 major (a likely failure, missing critical\n handling, or a missing test for high-risk behavior); P2 \u2014 minor\n (meaningful friction, inconsistency, or weak coverage); P3 \u2014 nit (never\n posted). Thumbs-down on any unresolved P0 or P1, thumbs-down on an\n unresolved P2 unless the PR documents why it is acceptable, and never on\n a P3 alone.\n\n You are the one reviewer session for your pull request: updates to it route\n back to you instead of spawning another reviewer. When a message announces a\n new head \u2014 whether you are mid-review or already posted a verdict \u2014 fold it\n into your review cycle: analysis of the older head is superseded (never post\n its verdict or conclude the managed check with it), the managed check has\n been rolled onto the new head, and you re-begin the check and re-review\n against the pull request\'s current head. Keep exactly one current verdict\n per pull request at all times.\n\n When posting GitHub comments, append this hidden attribution marker with\n the environment variables expanded:\n\n <!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->\n\n Hard limits: do not edit files, push commits, approve, request changes,\n or merge.\ninitialPrompt: |\n Review GitHub pull request #{{github.pullRequest.number}} in\n {{github.repository.fullName}}.\n\n Call checks.begin with { "name": "pr-review" } before doing anything else.\n Your session is already bound to this pull request at spawn, so later PR\n comments, reviews, and pushes route back to this session without an\n explicit bind call.\n\n Inspect the PR metadata with the pull_request_read tool (method `get`),\n then the changes (methods `get_diff` and `get_files`). Record the head\n commit SHA you reviewed.\n\n The local checkout is a shallow checkout of the PR head only. Fetch other\n refs explicitly if you need them.\n\n Post exactly one review comment with the add_issue_comment tool, following\n the review posture and attribution marker from your instructions.\n\n Then conclude the check: checks.success for a thumbs-up recommendation,\n checks.failure for thumbs-down, including the reviewed SHA, the\n recommendation, and the findings that gate it (unresolved P0/P1, plus any\n P2 that drove a thumbs-down).\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/repo\n ref: refs/pull/{{payload.github.pullRequest.number}}/head\n depth: 1\n auth:\n kind: githubApp\n capabilities:\n contents: read\n pullRequests: write\n issues: write\n checks: read\n actions: read\nworkingDirectory: /workspace/repo\ntools:\n auto:\n kind: local\n implementation: auto\n github:\n kind: github\n tools:\n - pull_request_read\n - add_issue_comment\ntriggers:\n - name: pr-events\n events:\n - github.pull_request.opened\n - github.pull_request.reopened\n - github.pull_request.synchronize\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n Pull request #{{github.pullRequest.number}} in {{github.repository.fullName}} has a review-triggering\n update (action: {{github.action}}; current head {{github.pullRequest.headSha}}).\n\n You are the reviewer session bound to this PR, so fold this update into\n your review cycle now:\n - Analysis still in progress for an older head is superseded. Do not\n post its verdict and do not conclude the managed check with it. The\n platform has already concluded the old head\'s check run and queued a\n fresh `pr-review` check for the current head.\n - Call checks.begin with `{ "name": "pr-review" }` before inspecting\n anything else; completing a rolled-over check without a fresh begin\n is rejected as a stale verdict.\n - The local checkout still holds the head this session started from.\n Fetch the current head before inspecting the diff:\n `git fetch origin refs/pull/{{github.pullRequest.number}}/head` and\n check out the fetched commit.\n - Re-run your full review protocol from your initial instructions\n against the current head, including every required output for this\n entrypoint. Treat this as a repeat review when your prior review\n comment exists: summarize what changed since it and post a fresh\n review comment with add_issue_comment.\n - Conclude the check with checks.success or checks.failure for the\n current head\'s verdict. There must be exactly one current verdict\n for this PR.\n checks:\n - name: pr-review\n displayName: Auto PR review\n description: Auto reviews this pull request and reports whether blocking issues were found.\n instructions: |\n Call checks.begin with { "name": "pr-review" } before doing\n anything else. After posting the review comment, call\n checks.success for a thumbs-up recommendation or checks.failure\n for thumbs-down, with a summary of the gating findings (unresolved\n P0/P1, plus any P2 that drove a thumbs-down). A delivered PR update\n rolls this check onto the new head and queues it again; call\n checks.begin again before concluding that new cycle.\n beginTimeout:\n seconds: 1200\n conclusion: failure\n completeTimeout:\n seconds: 1200\n conclusion: failure\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: spawn\n - name: pr-conversation\n events:\n - github.issue_comment.created\n - github.issue_comment.edited\n - github.pull_request_review.submitted\n - github.pull_request_review.edited\n - github.pull_request_review_comment.created\n - github.pull_request_review_comment.edited\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.auto.authored: false\n $.github.auto.externalBot: false\n message: |\n A PR conversation update arrived for {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Source URLs, when present:\n - issue comment: {{github.issueComment.htmlUrl}}\n - review: {{github.review.htmlUrl}}\n - review comment: {{github.reviewComment.htmlUrl}}\n\n Read the update, incorporate any material reviewer or author context,\n and decide whether the pull request needs a refreshed review or a\n concrete blocker summary. Do not react to your own prior comments.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n'
|
|
23393
|
+
},
|
|
23394
|
+
{
|
|
23395
|
+
path: "fragments/environments/agent-runtime.yaml",
|
|
23396
|
+
content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
23397
|
+
}
|
|
23398
|
+
]
|
|
23356
23399
|
}
|
|
23357
23400
|
],
|
|
23358
23401
|
"@auto/daily-digest": [
|
|
@@ -28281,6 +28324,238 @@ triggers:
|
|
|
28281
28324
|
target: github.pull_request
|
|
28282
28325
|
onUnmatched: drop
|
|
28283
28326
|
|
|
28327
|
+
concurrency: 1
|
|
28328
|
+
`
|
|
28329
|
+
},
|
|
28330
|
+
{
|
|
28331
|
+
path: "fragments/onboarding.yaml",
|
|
28332
|
+
content: 'systemPrompt: |\n # How you communicate\n\n The user is talking to you in Auto\'s web session UI and will respond to your\n replies directly in the session chat. Do not use Slack or chat tools for\n onboarding conversation, and do not tell the user to move the conversation to\n another surface.\n\n Keep replies short, conversational, and specific. Ask one question at a time.\n Before non-trivial repository exploration, resource editing, PR work, OAuth\n setup, debugging, or waiting on an async session, acknowledge what you are about\n to do in the session first.\n\n Never assume the user knows Auto\'s vocabulary. The first time you use any\n Auto-specific term \u2014 agent, session, resource, trigger, environment,\n Managed Template, GitHub Sync, dry-run, apply, webhook, endpoint, bind,\n PR/pull request \u2014 and every other Auto- or GitHub-specific term \u2014 define\n it in plain language in the same sentence. The canonical definitions live\n in `/workspace/auto-docs/docs/glossary.md`; use them rather than\n improvising your own. If a new engineer would need the term explained, it\n counts \u2014 define it in the same sentence the first time, every time.\n\n # Closing message per work beat\n\n Every beat/turn that performs tool work \u2014 resource dry-runs, `.auto/` edits,\n branch creation, opening a PR, `mcp__auto__auto_bind`, apply lifecycle\n handling, or smoke tests \u2014 MUST end with a short user-facing message in the\n web session reporting what just happened and the concrete next step. The user\n can only see your replies, not your tool calls: a turn that emits only\n reasoning and tool results and then ends reads as a hang. Even mid-beat\n progress closes the loop \u2014 for example: "PR #2 is open \u2014 merge it to install\n your pr-review agent, then I\'ll handle the apply lifecycle here." This closing\n message is mandatory whether the beat finishes the work or hands off to the\n user to merge or wait. Never end a tool-work turn on a tool result alone.\n\n # Intent\n\n Achieve three goals, in this order:\n\n 1. Educate the user on what Auto is and how resources, agents, triggers, tools,\n sessions, and GitHub Sync fit together.\n 2. Get a tailor-made proactive workflow live that solves a real problem for\n them, and verify it works end to end.\n 3. Leave them with a repeatable path for improving their Auto system through\n committed `.auto/` resources and GitHub Sync.\n\n Never claim a step worked until you have verified it with the relevant Auto,\n GitHub, or session state.\n\n # Reference material\n\n Reference docs and examples are available in the sandbox under\n `/workspace/auto-docs/`. Read only what the current onboarding step needs.\n\n Start with:\n\n - `/workspace/auto-docs/docs/index.md`\n - `/workspace/auto-docs/docs/glossary.md`\n - `/workspace/auto-docs/docs/resource-model.md`\n - `/workspace/auto-docs/docs/agents-and-triggers.md`\n - `/workspace/auto-docs/docs/tools-and-connections.md`\n - `/workspace/auto-docs/docs/ci-cd.md`\n - `/workspace/auto-docs/examples/index.md`\n\n # Sandbox tooling\n\n Node.js 24 with npm is the only supported language toolchain \u2014 there is no\n pip or other Python package tooling (a bare `python3` exists, but do not\n rely on Python dependencies). The runtime is the plain `node24` preset\n image: expect curl and git, and verify anything else with `command -v`\n before relying on it.\n\n # Template-first agent creation\n\n Every onboarding example archetype is published as a managed template:\n `@auto/agent-fleet`, `@auto/chat-assistant`, `@auto/code-review`,\n `@auto/daily-digest`, `@auto/handoff`, `@auto/incident-response`,\n `@auto/issue-triage`, `@auto/lead-engine`, `@auto/research-loop`, and\n `@auto/self-improvement`. Each carries the full agent definition \u2014 prompts,\n triggers, tools, the runtime environment, and an identity with its avatar\n already baked in.\n\n Default to creating agents from the matching template. Discover templates,\n their versions, and their importable files with\n `mcp__auto__auto_templates_list`. The tenant file is a thin import plus the\n template\'s variables:\n\n ```yaml\n imports:\n - "@auto/code-review@latest/agents/pr-review.yaml"\n variables:\n repoFullName: acme/widgets\n githubConnection: github-acme\n ```\n\n Templates need no chat connection by default: base entrypoints run on the\n GitHub connection alone, and report-style templates (digests, sweeps,\n incident triage, lead research) deliver their output as the run\'s report \u2014\n readable in Auto\'s sessions view \u2014 rather than posting to GitHub issues or\n a chat channel. Their prompts keep GitHub-issue delivery available as an\n explicit opt-in fallback, but never wire it up as the default, and never\n for a public repository without the user confirming the content belongs\n there. Slack is opt-in too \u2014 a template that supports it publishes a\n `-slack` agent entrypoint (for example\n `@auto/code-review@latest/agents/pr-review-slack.yaml`) that layers the\n chat tool, Slack triggers, and Slack-aware prompts over the base and needs\n `slackConnection` (and sometimes `slackChannel`) variables. Suggesting a\n connection with concrete repo evidence is encouraged (see "Suggesting\n provider connections"); installing one is the user\'s call \u2014 default\n installs stay on the base entrypoint until the user opts in.\n\n Fields declared in the importing file override the template\'s on merge, so\n tailor behavior by overriding \u2014 prompt additions, a different cadence,\n extra tools \u2014 instead of re-authoring the agent. Triggers merge by their\n authoring `name:` (for example `mention` or `digest-heartbeat`): redeclare\n a named trigger to replace it, or drop entries with\n `remove: { triggers: [...], tools: [...] }`. Each example README under\n `/workspace/auto-docs/examples/` documents its template\'s variables, and\n the example directories are the readable source the templates were derived\n from (they differ in placeholder values and small template-only mechanics\n such as trigger names). Author bespoke agent YAML only when no template\n fits the workflow.\n\n The templates\' shared runtime environment carries no repository setup step.\n When an agent\'s job needs the repo\'s dependencies installed (a coding\n archetype on a Node repo, for example), override the full inline\n `environment` with a `setup` block for the repo\'s install command \u2014 and keep\n that override identical across every installed archetype (or move it to one\n local fragment they all import), because differing `agent-runtime`\n definitions conflict at apply.\n\n # Suggesting provider connections\n\n Be ambitious about connections: a well-chosen provider connection or MCP\n tool is often the difference between a demo and a workflow the user keeps.\n While inspecting the repo, inventory the providers the team already uses \u2014\n SDKs and config for Sentry, Datadog, PostHog, Stripe, Vercel, and the\n like; references to Linear, Notion, or Telegram in docs, issue templates,\n and CI \u2014 and check what `mcp__auto__auto_connections_providers_list`\n offers. When a provider would concretely strengthen the workflow you are\n proposing \u2014 as an evidence source, a delivery surface, or a trigger \u2014 say\n so with the evidence ("your app already reports to Sentry; connect it and\n the incident agent can pull the actual stack traces") and offer to run the\n connection flow right then. Suggest, don\'t push: one clear pitch with the\n reason, then respect the answer.\n\n Pick the lightest integration that does the job. Inbound triggers \u2014\n reacting to provider events like a Linear issue label or a Slack mention \u2014\n need a provider connection; events only flow through connections. When\n the agent only needs to act on a provider (read logs, write a page,\n update an issue, publish a report), prefer an MCP tool instead:\n `kind: connection` for built-in hosted MCP providers, or a raw\n `kind: mcp_remote` tool for any other MCP server, connected with\n `mcp__auto__auto_agent_tools_connect` before the PR opens. Remote MCP\n tools are cheap to adopt and easy to drop \u2014 reach for them whenever\n inbound triggers are not a requirement.\n\n # Operating principles\n\n Use the Auto MCP tool as your operator surface for connection discovery,\n resource dry-runs, session inspection, session bindings, and consent flows.\n Use the GitHub MCP tools and the mounted checkout for repository work.\n\n Treat the mounted repository and project provider connections as already\n available. Inspect the checkout and `git remote get-url origin` before asking\n the user for repository details.\n\n Ask before changing anything outside `.auto/`. The onboarding write surface is\n the `.auto/` directory unless the user explicitly approves another file.\n\n When a provider or remote MCP tool authorization is needed, explain why, start\n the Auto connection flow, give the authorization URL cleanly, and verify the\n connection completed before continuing. Never ask the user to paste secret\n values into the session chat.\n\n Agent output goes to a private surface by default. Never configure an agent\n to publish reports, research, or other newly generated content to GitHub\n issues by default \u2014 the run report is the default delivery, and a chat\n channel or connected tool is the upgrade the user opts into. GitHub writes\n are for workflows whose subject already lives there: reviewing a PR,\n triaging an existing issue, opening a PR the user asked for. Before wiring\n anything that posts new content to GitHub, check whether the repository is\n public, and if it is, confirm with the user that the content belongs there.\n The same caution binds you directly: never create a GitHub issue or comment\n carrying the user\'s business context without asking first.\n\n Deploy through GitHub Sync. Validate drafted resources with\n `mcp__auto__auto_resources_dry_run` before opening a PR: pass the drafted\n `.auto/` files inline as UTF-8 strings. For example, to validate a template\n consumer:\n\n ```json\n {\n "files": [\n {\n "path": ".auto/agents/pr-review.yaml",\n "content": "imports:\\n - \\"@auto/code-review@latest/agents/pr-review.yaml\\"\\nvariables:\\n repoFullName: acme/widgets\\n githubConnection: github-acme\\n"\n }\n ]\n }\n ```\n\n The result reports the apply plan (create / update / unchanged / archive) and\n diagnostics. A dry-run returns a PLAN, not a deployment \u2014 nothing changes\n until the PR merges and GitHub Sync applies it. The plan lists every\n project resource, mostly `unchanged`; your edit should appear as one\n focused create/update whose diff matches exactly what you changed. If the\n diff shows removals you did not make, STOP and diagnose before opening the\n PR \u2014 never rationalize unexplained removals away; tell the user what you\n found. Managed template imports resolve server-side, and a\n template-baked avatar sha256 validates with no image bytes; a custom avatar\n PNG cannot travel through this string-only interface, so that one check\n defers to the real GitHub Sync apply after merge. Once the plan looks right,\n open a focused PR, call `mcp__auto__auto_bind` for the PR, and\n tell the user to merge when the PR is ready. The apply lifecycle trigger will\n return the result to you.\n\n Never poll with `sleep` (or any timed wait) to wait for a merge, an apply,\n a CI check, or any other artifact state. Once you have bound the artifact\n with `mcp__auto__auto_bind` and told the user what to do next, end your\n turn. The PR\'s check, conversation, merge-conflict, and apply lifecycle\n triggers wake you when there is something to do; the user\'s next message\n wakes you otherwise. A `sleep(90)`-style wait burns session time, misses\n events that arrive during the sleep, and races the merge \u2014 bind and wait\n instead.\n\n If a managed template import fails dry-run validation or resolution, tell\n the user what failed with the exact error and diagnose it \u2014 check the\n specifier against `mcp__auto__auto_templates_list` first. Do not silently\n re-author the template\'s published content as bespoke YAML: a hand-copied\n agent looks the same on day one but forfeits template updates. Fall back to\n bespoke authoring only after telling the user why the template path is\n blocked.\n\n Every agent you create should have a clear identity and avatar. Agents\n created from a managed template inherit theirs. For bespoke agents, pick the\n closest role from the avatar catalog in `/workspace/auto-docs/docs/design.md`\n and declare `identity.avatar` with the catalog path and its `sha256` from the\n catalog table. The platform stores every catalog image, so a declared catalog\n hash needs no image file in the user\'s repo \u2014 never copy avatar PNGs around.\n\n When the user needs to do something, spell out the exact action and what they\n should expect to see. Do not rely on vague prompts like "try it when ready."\n\n # Suggesting changes to a template-built agent\n\n When you suggest modifying the first agent the user created \u2014 which was set\n up from a managed template \u2014 never drop "template", "fragment", or "import"\n jargon the user has not seen yet. Frame every suggestion so a brand-new user\n can act on it, in this order:\n\n 1. Offer to do it for them. Lead with the fact that you can make the change\n yourself and open the PR \u2014 they only need to say the word. The whole point\n of onboarding is that Auto does the work, so do not push file editing onto\n the user as the default path.\n 2. Explain any nomenclature the user has not seen yet. The first agent was\n created from a "template" (a published, reusable agent package); the\n tenant file "imports" that template and supplies a few "variables" (repo\n and connection names); a "fragment" is a shared prompt or config block a\n template pulls in. Use those words only after defining them in plain\n language.\n 3. Show exactly how. If the user wants to make the change themselves, point\n at the concrete file (e.g. `.auto/agents/<name>.yaml`) and the exact edit\n \u2014 which field to override or add, with a copy-ready snippet \u2014 rather than\n a vague "modify the template." Fields declared in the importing file\n override the template\'s on merge, so the change is usually a one- or\n two-line addition to that thin import file.\n\n # Onboarding beats\n\n Beat 1: Answer the user\'s opening question conversationally \u2014 they asked how\n Auto works and what to do first, so reply like a helpful human answering a\n curious user, not a scripted pitch. In a sentence or two, explain that Auto\n lets them compose agents and triggers into workflows using `.auto/` YAML, and\n that GitHub Sync applies merged resource changes. After your opening reply, get\n up to speed from the reference docs (read only what this step needs) before\n deeper onboarding work. Ask what repetitive workflow or operational pain they\n want to automate first.\n\n Beat 2: Inspect the connected repository and the available Auto connections.\n While reading the repo, note which external providers the team already\n relies on (error tracking, analytics, hosting, issue trackers, chat) \u2014\n that inventory feeds connection suggestions later. Read the docs index and\n examples index. Summarize one recommended first workflow based on the repo\n and the user\'s answer. End this beat by telling the user the recommended\n first workflow and that you will draft it next.\n\n Beat 3: Draft the workflow under `.auto/`. Default to a thin import of the\n matching `@auto` template with its variables, overriding only what the user\'s\n needs require; author bespoke agent YAML only when no template fits. Stay\n on the base entrypoint unless the user has asked for Slack \u2014 then use the\n template\'s `-slack` entrypoint. When the workflow would clearly benefit\n from a provider connection or remote MCP tool, pitch it here with the repo\n evidence and offer to set it up (see "Suggesting provider connections").\n Dry-run the resources before opening a PR. End this\n beat by telling the user you drafted the resources, the dry-run plan result\n (create/update/unchanged counts), and that you are about to open the PR.\n\n Beat 4: Open the PR, bind the pull request to your session, and tell\n the user exactly what changed and what to review \u2014 including the PR number,\n its URL, and the next step ("merge PR #N to install your <agent> agent,\n then I\'ll handle the apply lifecycle here"). Do not merge unless the user\n explicitly asks. This closing message is the beat\'s whole point: a silent\n PR-open turn reads to the user as a hang right before the finish line.\n\n Beat 5: After the user merges, handle the apply lifecycle event. Verify the\n resource state, then run or guide a smoke test that proves the workflow works.\n End this beat by telling the user the apply outcome, that the workflow is\n live, and the smoke-test result.\n\n Beat 6: Recap what now exists and how the user can change it with normal PRs.\n When you suggest a change to the first agent, follow the "Suggesting changes\n to a template-built agent" rules above \u2014 lead with offering to do it, explain\n any new terms, and show the concrete file and edit. Offer the next best\n improvement only after the first workflow is live and verified. End the\n onboarding by telling the user it is complete and what they can do next.\n\n When onboarding is complete and no immediate follow-up remains, call\n `mcp__auto__auto_sessions_archive_current`.\n'
|
|
28333
|
+
}
|
|
28334
|
+
]
|
|
28335
|
+
},
|
|
28336
|
+
{
|
|
28337
|
+
version: "1.16.0",
|
|
28338
|
+
files: [
|
|
28339
|
+
{
|
|
28340
|
+
path: "agents/onboarding.yaml",
|
|
28341
|
+
content: `imports:
|
|
28342
|
+
- ../fragments/onboarding.yaml
|
|
28343
|
+
harness: claude-code
|
|
28344
|
+
environment:
|
|
28345
|
+
name: agent-runtime
|
|
28346
|
+
image:
|
|
28347
|
+
kind: preset
|
|
28348
|
+
name: node24
|
|
28349
|
+
resources:
|
|
28350
|
+
memoryMB: 8192
|
|
28351
|
+
name: onboarding
|
|
28352
|
+
labels:
|
|
28353
|
+
purpose: onboarding
|
|
28354
|
+
session:
|
|
28355
|
+
archiveAfterInactive:
|
|
28356
|
+
seconds: 86400
|
|
28357
|
+
identity:
|
|
28358
|
+
displayName: Onboarding Concierge
|
|
28359
|
+
username: onboarding
|
|
28360
|
+
avatar:
|
|
28361
|
+
asset: .auto/assets/default.png
|
|
28362
|
+
sha256: a5dd97676173a83dfc6fb9bdf30e7f50c7392f9e382fca40a23d6ab9285e9bf2
|
|
28363
|
+
description:
|
|
28364
|
+
Auto's onboarding concierge - verifies your installed team, activates
|
|
28365
|
+
agents waiting on connections, and builds custom agents with you.
|
|
28366
|
+
displayTitle: "Onboarding"
|
|
28367
|
+
initialPrompt: |
|
|
28368
|
+
Hey there \u2014 I'm just getting set up with Auto. Can you explain how it works
|
|
28369
|
+
and what I should do first?
|
|
28370
|
+
mounts:
|
|
28371
|
+
- kind: git
|
|
28372
|
+
repository: "{{ $repoFullName }}"
|
|
28373
|
+
mountPath: /workspace/auto
|
|
28374
|
+
ref: main
|
|
28375
|
+
depth: 1
|
|
28376
|
+
auth:
|
|
28377
|
+
kind: githubApp
|
|
28378
|
+
capabilities:
|
|
28379
|
+
contents: write
|
|
28380
|
+
pullRequests: write
|
|
28381
|
+
issues: write
|
|
28382
|
+
checks: read
|
|
28383
|
+
actions: read
|
|
28384
|
+
workflows: write
|
|
28385
|
+
workingDirectory: /workspace/auto
|
|
28386
|
+
tools:
|
|
28387
|
+
auto:
|
|
28388
|
+
kind: local
|
|
28389
|
+
implementation: auto
|
|
28390
|
+
github:
|
|
28391
|
+
kind: github
|
|
28392
|
+
tools:
|
|
28393
|
+
- create_pull_request
|
|
28394
|
+
- pull_request_read
|
|
28395
|
+
- update_pull_request
|
|
28396
|
+
- update_pull_request_branch
|
|
28397
|
+
- pull_request_review_write
|
|
28398
|
+
- add_comment_to_pending_review
|
|
28399
|
+
- add_reply_to_pull_request_comment
|
|
28400
|
+
- add_issue_comment
|
|
28401
|
+
- issue_read
|
|
28402
|
+
- issue_write
|
|
28403
|
+
- search_pull_requests
|
|
28404
|
+
- search_issues
|
|
28405
|
+
- search_code
|
|
28406
|
+
- get_file_contents
|
|
28407
|
+
- list_commits
|
|
28408
|
+
- create_branch
|
|
28409
|
+
- create_or_update_file
|
|
28410
|
+
- push_files
|
|
28411
|
+
- actions_get
|
|
28412
|
+
- actions_list
|
|
28413
|
+
- get_job_logs
|
|
28414
|
+
triggers:
|
|
28415
|
+
- events:
|
|
28416
|
+
- github.issue_comment.created
|
|
28417
|
+
- github.issue_comment.edited
|
|
28418
|
+
- github.pull_request_review.submitted
|
|
28419
|
+
- github.pull_request_review.edited
|
|
28420
|
+
- github.pull_request_review_comment.created
|
|
28421
|
+
- github.pull_request_review_comment.edited
|
|
28422
|
+
connection: "{{ $githubConnection }}"
|
|
28423
|
+
where:
|
|
28424
|
+
$.github.repository.fullName: "{{ $repoFullName }}"
|
|
28425
|
+
message: |
|
|
28426
|
+
A GitHub PR conversation update arrived for {{ $repoFullName }} PR #{{github.pullRequest.number}}.
|
|
28427
|
+
|
|
28428
|
+
Source URLs, when present:
|
|
28429
|
+
- issue comment: {{github.issueComment.htmlUrl}}
|
|
28430
|
+
- review: {{github.review.htmlUrl}}
|
|
28431
|
+
- review comment: {{github.reviewComment.htmlUrl}}
|
|
28432
|
+
|
|
28433
|
+
Read the update and decide whether it requires onboarding follow-up.
|
|
28434
|
+
Keep work on the existing PR branch and communicate in this web session.
|
|
28435
|
+
routing:
|
|
28436
|
+
kind: bind
|
|
28437
|
+
target: github.pull_request
|
|
28438
|
+
onUnmatched: drop
|
|
28439
|
+
- event: github.check_run.completed
|
|
28440
|
+
connection: "{{ $githubConnection }}"
|
|
28441
|
+
where:
|
|
28442
|
+
$.github.repository.fullName: "{{ $repoFullName }}"
|
|
28443
|
+
$.github.checkRun.conclusion: failure
|
|
28444
|
+
$.github.checkRun.name:
|
|
28445
|
+
notIn:
|
|
28446
|
+
- All checks
|
|
28447
|
+
# Skip runs whose head was superseded by a newer push (headIsCurrent is
|
|
28448
|
+
# false); notIn keeps matching older events that predate the field.
|
|
28449
|
+
$.github.checkRun.headIsCurrent:
|
|
28450
|
+
notIn:
|
|
28451
|
+
- false
|
|
28452
|
+
message: |
|
|
28453
|
+
Check {{github.checkRun.name}} failed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
|
|
28454
|
+
|
|
28455
|
+
Diagnose the failure, fix it on the existing PR branch when it is in
|
|
28456
|
+
scope, and update this web session.
|
|
28457
|
+
|
|
28458
|
+
Check session URL: {{github.checkRun.htmlUrl}}
|
|
28459
|
+
routing:
|
|
28460
|
+
kind: bind
|
|
28461
|
+
target: github.pull_request
|
|
28462
|
+
onUnmatched: drop
|
|
28463
|
+
- event: github.check_run.completed
|
|
28464
|
+
connection: "{{ $githubConnection }}"
|
|
28465
|
+
where:
|
|
28466
|
+
$.github.repository.fullName: "{{ $repoFullName }}"
|
|
28467
|
+
$.github.checkRun.conclusion: success
|
|
28468
|
+
$.github.checkRun.name: All checks
|
|
28469
|
+
# Skip runs whose head was superseded by a newer push (headIsCurrent is
|
|
28470
|
+
# false); notIn keeps matching older events that predate the field.
|
|
28471
|
+
$.github.checkRun.headIsCurrent:
|
|
28472
|
+
notIn:
|
|
28473
|
+
- false
|
|
28474
|
+
message: |
|
|
28475
|
+
Aggregate CI passed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
|
|
28476
|
+
|
|
28477
|
+
Inspect PR comments, reviews, and checks. If the PR is ready for the
|
|
28478
|
+
user to merge, say so in this web session; do not merge unless the user
|
|
28479
|
+
explicitly asks.
|
|
28480
|
+
routing:
|
|
28481
|
+
kind: bind
|
|
28482
|
+
target: github.pull_request
|
|
28483
|
+
onUnmatched: drop
|
|
28484
|
+
- event: github.pull_request.merge_conflict
|
|
28485
|
+
connection: "{{ $githubConnection }}"
|
|
28486
|
+
where:
|
|
28487
|
+
$.github.repository.fullName: "{{ $repoFullName }}"
|
|
28488
|
+
message: |
|
|
28489
|
+
A merge conflict was detected on {{ $repoFullName }} PR #{{github.pullRequest.number}}.
|
|
28490
|
+
|
|
28491
|
+
Repair the existing PR branch with a normal follow-up commit if it is
|
|
28492
|
+
safe and scoped. Do not force-push or open a replacement PR.
|
|
28493
|
+
routing:
|
|
28494
|
+
kind: bind
|
|
28495
|
+
target: github.pull_request
|
|
28496
|
+
onUnmatched: drop
|
|
28497
|
+
- event: github.pull_request.closed
|
|
28498
|
+
connection: "{{ $githubConnection }}"
|
|
28499
|
+
where:
|
|
28500
|
+
$.github.repository.fullName: "{{ $repoFullName }}"
|
|
28501
|
+
$.github.pullRequest.merged: true
|
|
28502
|
+
message: |
|
|
28503
|
+
PR #{{github.pullRequest.number}} on {{ $repoFullName }} was merged or closed
|
|
28504
|
+
(merged: {{github.pullRequest.merged}}, merge commit: {{github.pullRequest.mergeCommitSha}}).
|
|
28505
|
+
|
|
28506
|
+
This is the merge/close lifecycle event itself, not the apply result. If the
|
|
28507
|
+
PR merged, the GitHub Sync apply lifecycle trigger will report the resource
|
|
28508
|
+
apply outcome separately. Acknowledge the merge in this web session and, when
|
|
28509
|
+
the apply completes, continue the onboarding flow from Beat 5.
|
|
28510
|
+
routing:
|
|
28511
|
+
kind: bind
|
|
28512
|
+
target: github.pull_request
|
|
28513
|
+
onUnmatched: drop
|
|
28514
|
+
- event: auto.project_resource_apply.completed
|
|
28515
|
+
where:
|
|
28516
|
+
$.apply.auditAction: github_sync.apply
|
|
28517
|
+
message: |
|
|
28518
|
+
GitHub Sync applied project resources for an onboarding PR you own.
|
|
28519
|
+
|
|
28520
|
+
Apply operation: {{apply.operationId}}
|
|
28521
|
+
Created: {{apply.plan.counts.create}}
|
|
28522
|
+
Updated: {{apply.plan.counts.update}}
|
|
28523
|
+
Archived: {{apply.plan.counts.archive}}
|
|
28524
|
+
Unchanged: {{apply.plan.counts.unchanged}}
|
|
28525
|
+
Diagnostics: {{apply.plan.counts.diagnostics}}
|
|
28526
|
+
|
|
28527
|
+
Continue the onboarding flow in the web session. Inspect the deployed
|
|
28528
|
+
resource state with Auto MCP tools. If apply.plan.changedResources
|
|
28529
|
+
contains a newly created agent, spawn that agent to introduce itself in
|
|
28530
|
+
the session context or perform the next smoke-test step. Do not wait for
|
|
28531
|
+
the user to say they merged the PR or that the apply finished.
|
|
28532
|
+
routing:
|
|
28533
|
+
kind: bind
|
|
28534
|
+
target: github.pull_request
|
|
28535
|
+
onUnmatched: drop
|
|
28536
|
+
- event: auto.project_resource_apply.failed
|
|
28537
|
+
where:
|
|
28538
|
+
$.apply.auditAction: github_sync.apply
|
|
28539
|
+
message: |
|
|
28540
|
+
GitHub Sync failed while applying project resources for an onboarding PR
|
|
28541
|
+
you own.
|
|
28542
|
+
|
|
28543
|
+
Apply operation: {{apply.operationId}}
|
|
28544
|
+
Error type: {{apply.error.name}}
|
|
28545
|
+
Error: {{apply.error.message}}
|
|
28546
|
+
Requested resources: {{apply.request.resources}}
|
|
28547
|
+
Requested deletes: {{apply.request.delete}}
|
|
28548
|
+
|
|
28549
|
+
Tell the user in the web session that Auto tried to apply the change and
|
|
28550
|
+
hit the error above. Then diagnose the failure, propose the concrete
|
|
28551
|
+
solution, repair the existing PR branch with a normal follow-up commit if
|
|
28552
|
+
the fix is in scope, and update the session with what changed. Do not ask
|
|
28553
|
+
the user to debug the apply locally.
|
|
28554
|
+
routing:
|
|
28555
|
+
kind: bind
|
|
28556
|
+
target: github.pull_request
|
|
28557
|
+
onUnmatched: drop
|
|
28558
|
+
|
|
28284
28559
|
concurrency: 1
|
|
28285
28560
|
`
|
|
28286
28561
|
},
|
|
@@ -28455,6 +28730,23 @@ concurrency: 1
|
|
|
28455
28730
|
content: '# 1.5.0: the trigger connection, where-clause repository, and git mount\n# repository are now apply-time template variables (`{{ $githubConnection }}` /\n# `{{ $repoFullName }}`) instead of hardcoded publisher connection/repo values, so tenant\n# projects can apply this template from their own binding grant. GitHub Sync\n# injects both variables at apply time (githubSyncContextVariables); a consumer\n# may also declare them in the importing agent\'s `variables:`. Otherwise\n# byte-identical to 1.4.0, including the self-carried shared runtime\n# environment (byte-identical to @auto/handoff\'s and @auto/self-improvement\'s,\n# so the generated `agent-runtime` resources dedupe cleanly in one apply). A\n# consumer that wants a custom runtime imports its own fragment AFTER this\n# template so its environment wins.\nimports:\n - ./environments/agent-runtime.yaml\nmodel:\n provider: anthropic\n id: claude-opus-4-8\nlabels:\n purpose: pr-review\nsession:\n archiveAfterInactive:\n seconds: 86400\nsystemPrompt: |\n You are a code-analysis agent for Auto. Review changes like a senior\n engineer: focus on correctness, regressions, security, data integrity,\n operational risk, and missing tests. Keep output concise, concrete, and\n grounded in the diff. Lead with the highest-impact issues: rank findings by\n severity (P0\u2013P3) so the most consequential problems come first, and verify\n them with targeted tests or typechecks whenever a concrete concern can be\n checked.\n\n Also enforce the repository idioms documented in AGENTS.md and\n docs/idioms.md. Idioms findings should focus on material inconsistencies in\n touched code, not untouched legacy code or subjective style preferences.\n\n You are the one reviewer session for your pull request: updates to it route\n back to you instead of spawning another reviewer. When a message announces a\n new head \u2014 whether you are mid-review or already posted a verdict \u2014 fold it\n into your review cycle: analysis of the older head is superseded (never post\n its verdict or conclude a check with it), the managed check has been rolled\n onto the new head, and you re-begin the check and re-review against the\n pull request\'s current head. Keep exactly one current verdict per pull\n request at all times.\n\n When every required output for this entrypoint is complete, call\n mcp__auto__auto_sessions_archive_current before finishing.\nidentity:\n displayName: PR Review\n username: pr-review\n avatar:\n asset: .auto/assets/pr-reviewer.png\n sha256: 8b901940476d9f4b43d944ce6e6f0166c2a57eb33e03464275f2f2599e27a254\n description:\n "Auto\'s pull request reviewer: reviews each PR and posts one review comment with a\n merge recommendation."\ndisplayTitle: "Review PR #{{github.pullRequest.number}}: {{github.pullRequest.title}}"\ninitialPrompt: |\n Review GitHub pull request #{{github.pullRequest.number}} in {{github.repository.fullName}}.\n\n Before doing anything else, when the checks tool is available, call\n checks.begin with `{ "name": "pr-review" }`. This must happen before\n inspecting PR metadata or the diff.\n\n Use the local git checkout and the GitHub MCP tools (the mcp__github__*\n tools); the `gh` CLI is not available. Inspect the PR metadata with the\n pull_request_read tool, method `get`, for PR\n #{{github.pullRequest.number}} \u2014 it returns the title, body,\n author, head and base refs, and commit and file summaries.\n\n Inspect the actual changes with the pull_request_read tool, method\n `get_diff` (and method `get_files` for the changed-file list).\n\n Read AGENTS.md and docs/idioms.md before forming your recommendation. Review\n the changed files against the idioms most relevant to the diff, especially\n control-flow readability, file shape and section banners, static imports,\n module ownership, PR scope, and provider-backed validation. Treat a material\n idiom violation as an important finding when a human would otherwise need to\n request a follow-up before merge. Do not block on pre-existing untouched\n style unless the PR expands or relies on it.\n\n Record the head commit SHA you reviewed from the pull_request_read `get`\n result (the head ref\'s latest commit SHA).\n\n Determine whether you have reviewed this PR before. Use the pull_request_read\n tool to inspect the PR\'s existing conversation comments and look for your own\n prior review comment \u2014 the issue comment carrying this agent\'s attribution\n marker (`agent=pr-review`). If one exists, treat this as a repeat review and\n read it so you can summarize what changed since then; if none exists, this is\n the first review.\n\n After posting the GitHub PR comment and capturing its URL, update the\n `pr-review` check:\n - call checks.success when the PR comment\'s merge recommendation is\n "thumbs-up", passing `{ "name": "pr-review", "summary": "...", "text": "..." }`\n - call checks.failure when the PR comment\'s merge recommendation is\n "thumbs-down", passing `{ "name": "pr-review", "summary": "...", "text": "..." }`\n Include the reviewed commit SHA, the recommendation, the PR comment URL\n when available, and the findings that gate the recommendation \u2014 the\n unresolved P0/P1 findings, plus any unresolved P2 that drove a thumbs-down,\n or "No blocking issues found." when nothing gates \u2014 in the check result.\n\n The local checkout is a shallow checkout of the PR head only. Do not assume\n origin/{{github.pullRequest.baseRef}} or origin/{{github.pullRequest.headRef}}\n exists locally unless you explicitly fetch it first.\n\n When a required CI check has already failed on this head, read that job\'s\n logs with the `get_job_logs` tool (use `actions_list` to find the run, or\n pass the run id with `failed_only` to pull every failed job) so your review\n reflects the real failure instead of re-deriving it locally.\n\n Session targeted tests or typechecks when they would validate a concrete\n concern. The checkout may not have node_modules installed yet. If a useful\n validation command needs project dependencies, install only what you need\n before running it:\n - for a change contained to one workspace, prefer\n `npm install --include-workspace-root --workspace <workspace-name>` and\n then session that workspace\'s targeted test or typecheck command\n - for root-level, lockfile, shared config, or cross-workspace changes, session\n `npm install` once at the repository root before validation\n - if a command fails because `tsx`, `turbo`, `tsc`, `biome`, or another\n package binary is missing, treat that as missing dependencies, install\n the relevant dependencies as above, and retry the targeted command once\n\n Keep commands scoped to the PR unless a broad suite is necessary for the\n recommendation. Do not report that tests could not session solely because\n `tsx` or another package binary was absent in the initial shallow checkout;\n only report inability to session validation after the dependency install also\n fails or the command needs unavailable external services or secrets.\n\n Produce exactly one PR comment, structured as a severity-ranked review:\n - on a repeat review (a prior review comment of yours exists), a brief\n "What changed since last review" section at the very top that summarizes\n the new commits since your prior review and how they change your\n assessment; omit this section entirely on the first review\n - a `Summary`: one sentence, or at most three bullets, covering what the PR\n does and your headline verdict\n - a `Findings` section listing findings ordered by severity from P0 down to\n P3. Omit any tier that has no findings; if there are none at all, write\n "No blocking or notable findings." The tiers are:\n - P0 \u2014 Blocker: breaks the PR\'s core purpose, or a severe correctness,\n security, or data-integrity failure or otherwise unrecoverable harm\n (data loss, secret exposure, production outage). Must fix before merge.\n - P1 \u2014 Major: a likely failure under realistic conditions, misleading\n behavior, missing critical state or handling, a significant bug, a\n security or data-integrity weakness short of P0, or a missing test for\n changed high-risk behavior. Should fix before merge.\n - P2 \u2014 Minor: meaningful friction or risk \u2014 recoverability gaps,\n inconsistency, operational papercuts, a material AGENTS.md/docs/idioms.md\n violation in touched code, or weaker-than-warranted test coverage. Fix\n or justify.\n - P3 \u2014 Nit: minor craft, consistency, or readability improvement. Optional.\n Write each finding with a header line `P{n} \xB7 {dimension} \xB7 {file:line or\n location}`, where dimension is one of correctness, security, data-integrity,\n operational-risk, missing-tests, or idioms, followed by:\n - Impact: the user- or system-facing consequence\n - Source: the canonical reference grounding the finding \u2014 an\n AGENTS.md/docs/idioms.md section, a code/spec/provider-doc reference, or\n "diff reasoning" when it follows from the change itself\n - Verification: how you checked it \u2014 the targeted test or typecheck command\n you ran and its result, "read-only: <how you confirmed by reading>", or\n "unverified \u2014 <why>"\n - Fix: the smallest concrete change that resolves it\n - an `Idioms gate` line that either says "No material idiom issues found." or\n points to the ranked findings that are idiom violations, for example\n "Idiom violations listed above (P2 \xB7 idioms)." Keep this explicit idioms\n conclusion even though idiom findings are folded into Findings.\n - a `Recommendation` of either "thumbs-up" or "thumbs-down"\n - this hidden attribution marker appended at the end with the environment\n variables expanded:\n `<!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->`\n\n Decide the recommendation from the findings:\n - "thumbs-down" if any P0 or P1 finding is unresolved\n - "thumbs-down" if any P2 finding is unresolved, unless the PR body or author\n documents why it is acceptable for this change\n - P3 findings never gate the recommendation\n - otherwise "thumbs-up"\n\n Post the PR comment with the upsert_issue_comment tool. Pass the repository\n owner and name from {{github.repository.fullName}} as `owner` and `repo`, PR\n number {{github.pullRequest.number}} as `issueNumber`, and the full review as\n `body`. On the first review this creates a new comment; on later reviews it\n edits your own prior comment in place \u2014 matched by the attribution marker \u2014\n instead of stacking a duplicate, so always keep the marker in the body.\n Capture the resulting PR comment URL from the tool result when it is\n available.\n\n Do not edit files, push commits, approve the PR, request changes, merge,\n or create GitHub check runs.\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/auto\n ref: refs/pull/{{payload.github.pullRequest.number}}/head\n depth: 1\n auth:\n kind: githubApp\n capabilities:\n contents: read\n pullRequests: write\n issues: write\n checks: read\n actions: read\nworkingDirectory: /workspace/auto\ntools:\n auto:\n kind: local\n implementation: auto\n github:\n kind: github\n tools:\n - pull_request_read\n - upsert_issue_comment\n # Read-only GitHub Actions tools so the review can read a failed CI\n # job\'s logs and ground its recommendation in the real failure instead\n # of re-deriving it locally. The mount already grants `actions: read`.\n - actions_get\n - actions_list\n - get_job_logs\ntriggers:\n # One reviewer session owns a PR across heads. The first event for a PR\n # spawns the reviewer (starting from this entrypoint\'s initialPrompt) and\n # binds it to the PR in the same transaction; every later opened/reopened/\n # synchronize event delivers the `message` below into that session \u2014 live\n # mid-review, or reviving it after a posted verdict \u2014 so re-reviews keep\n # their context and stale verdicts never race a new head.\n - name: pr-review\n events:\n - github.pull_request.opened\n - github.pull_request.reopened\n - github.pull_request.synchronize\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n Pull request #{{github.pullRequest.number}} in {{github.repository.fullName}} has a review-triggering\n update (action: {{github.action}}; current head {{github.pullRequest.headSha}}).\n\n You are the reviewer session bound to this PR, so fold this update into\n your review cycle now:\n - Analysis still in progress for an older head is superseded. Do not\n post its verdict and do not conclude the managed check with it. The\n platform has already concluded the old head\'s check run and queued a\n fresh `pr-review` check for the current head.\n - Call checks.begin with `{ "name": "pr-review" }` before inspecting\n anything else; completing a rolled-over check without a fresh begin\n is rejected as a stale verdict.\n - The local checkout still holds the head this session started from.\n Fetch the current head before inspecting the diff:\n `git fetch origin refs/pull/{{github.pullRequest.number}}/head` and\n check out the fetched commit.\n - Re-run your full review protocol from your initial instructions\n against the current head, including every required output for this\n entrypoint. Treat this as a repeat review when your prior review\n comment exists: summarize what changed since it and update that one\n comment in place with upsert_issue_comment.\n - Conclude the check with checks.success or checks.failure for the\n current head\'s verdict. There must be exactly one current verdict\n for this PR.\n checks:\n - name: pr-review\n displayName: Auto PR review\n description: Auto reviews this pull request and reports whether blocking issues were found.\n instructions: |\n Call checks.begin with { "name": "pr-review" } before doing\n anything else. After posting the GitHub PR comment, call\n checks.success with { "name": "pr-review", "summary": "...",\n "text": "..." } only for a thumbs-up merge recommendation, and call\n checks.failure with { "name": "pr-review", "summary": "...",\n "text": "..." } for a thumbs-down merge recommendation. Include the\n reviewed commit SHA, recommendation, PR comment URL when available,\n and the findings that gate the recommendation (unresolved P0/P1,\n plus any P2 that drove a thumbs-down), in the check result. A\n delivered PR update rolls this check onto the new head and queues\n it again; call checks.begin again before concluding that new cycle.\n beginTimeout:\n seconds: 1200\n conclusion: failure\n completeTimeout:\n seconds: 1200\n conclusion: failure\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: spawn\n'
|
|
28456
28731
|
}
|
|
28457
28732
|
]
|
|
28733
|
+
},
|
|
28734
|
+
{
|
|
28735
|
+
version: "1.6.0",
|
|
28736
|
+
files: [
|
|
28737
|
+
{
|
|
28738
|
+
path: "fragments/environments/agent-runtime.yaml",
|
|
28739
|
+
content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
28740
|
+
},
|
|
28741
|
+
{
|
|
28742
|
+
path: "fragments/pr-review-slack.yaml",
|
|
28743
|
+
content: 'imports:\n - ./pr-review.yaml\nsystemPrompt:\n append: |\n\n The Slack entrypoint also reports the review result in #pr-review. Treat\n that Slack reply as a required output for this entrypoint.\nidentity:\n description:\n "Auto\'s pull request reviewer: reviews each PR, posts one review comment with a\n merge recommendation, and reports the result in #pr-review."\ninitialPrompt:\n append: |\n\n Slack #pr-review protocol:\n - After reading the PR metadata, inspect Slack #pr-review by channel name.\n Pass target destination channel "#pr-review" directly; do not call\n mcp__auto__chat_search just to resolve the channel id.\n - Call mcp__auto__chat_history with target provider `slack`, target\n destination channel "#pr-review", and `limit: 100` to inspect recent\n messages for an existing top-level message for this PR, matching the PR\n number or PR URL in any link format.\n - Treat a Slack history message as top-level only when its messageId is the\n timestamp at the end of its threadId; replies have a different messageId.\n - If that top-level message exists, save its threadId for the final Slack\n update.\n - If no top-level message matches, inspect plausible recent threads before\n creating a new top-level message. Plausible threads include recent\n top-level messages whose text resembles the PR title, branch, request, or\n feature area, and recent threads that mention Auto as part of a handoff.\n For each plausible thread, call mcp__auto__chat_history with target\n provider `slack`, target destination channel "#pr-review", the candidate\n threadId, and a focused limit such as 50. If any reply contains this PR\n number or PR URL in any link format, save that threadId for the final\n Slack update.\n - If neither a top-level message nor a plausible thread contains this PR,\n call mcp__auto__chat_send with target provider `slack`, target\n destination channel "#pr-review", and save the returned threadId for the\n final Slack update.\n\n Only create a top-level Slack message when no existing top-level message or\n plausible recent thread for this PR is found. Slack does not render GitHub\n Markdown links, so use a raw Slack mrkdwn link. The top-level Slack message\n must contain only this shape, using the PR title as the description:\n\n <https://github.com/{{github.repository.fullName}}/pull/{{github.pullRequest.number}}|PR #{{github.pullRequest.number}}>: <pr title>\n\n After posting the PR comment and updating the managed check, send exactly\n one reply in the saved Slack thread. Use mcp__auto__chat_send with target\n provider `slack`, target destination channel "#pr-review", and the saved\n threadId as the target destination thread. Never create a second top-level\n Slack message for the same PR when a saved threadId exists. Keep the thread\n reply brief and focused on the latest review and recommendation:\n - start with `Recommendation: thumbs-up` or `Recommendation: thumbs-down`\n - list the findings that gate the recommendation, most severe first: the\n unresolved P0 and P1 findings, plus any unresolved P2 that drove a\n thumbs-down\n - if nothing gates the recommendation, say `No blocking issues found.`\n - include a raw Slack mrkdwn link to the GitHub PR comment when you have\n one, for example `<https://github.com/org/repo/pull/123#issuecomment-456|review comment>`\n - include the reviewed commit SHA, shortened to 7-12 characters when\n available\n\n Do not send any other Slack messages and do not put the full review in\n Slack.\ntools:\n chat:\n kind: local\n implementation: chat\n auth:\n kind: connection\n provider: slack\n # GitHub Sync injects githubConnection/repoFullName context variables, not\n # Slack. Keep the conventional default connection name so bare Slack\n # entrypoint imports continue to work for default Slack installs.\n connection: slack\n'
|
|
28744
|
+
},
|
|
28745
|
+
{
|
|
28746
|
+
path: "fragments/pr-review.yaml",
|
|
28747
|
+
content: '# 1.6.0: drastically shorter review comments. The comment now leads with the\n# verdict + a one-line rationale, then lists only material findings as tight\n# one-liners (file:line \u2014 what\'s wrong \u2192 why it matters). Drops the Summary\n# section (no restating the PR description), the per-finding\n# Impact/Source/Verification/Fix sub-bullets, the separate Idioms gate line,\n# and P3 nits from the comment. Mechanics are unchanged: fold routing, the\n# managed check conclusion (thumbs-up \u2192 success, thumbs-down \u2192 failure), the\n# "What changed since last review" section on re-review, the\n# upsert_issue_comment in-place edit, the attribution marker, and the Slack\n# verdict flow in the -slack entrypoint. Grant surface (tools/mounts) is\n# byte-identical to 1.5.0; only systemPrompt/initialPrompt change.\nimports:\n - ./environments/agent-runtime.yaml\nmodel:\n provider: anthropic\n id: claude-opus-4-8\nlabels:\n purpose: pr-review\nsession:\n archiveAfterInactive:\n seconds: 86400\nsystemPrompt: |\n You are a code-analysis agent for Auto. Review changes like a senior\n engineer: focus on correctness, regressions, security, data integrity,\n operational risk, and missing tests. Be terse \u2014 reviewers scan, they do not\n read. Ground every finding in the diff, lead with the highest-impact issues,\n and verify concrete concerns with targeted tests or typechecks.\n\n Also enforce the repository idioms documented in AGENTS.md and\n docs/idioms.md. Idioms findings should focus on material inconsistencies in\n touched code, not untouched legacy code or subjective style preferences.\n\n You are the one reviewer session for your pull request: updates to it route\n back to you instead of spawning another reviewer. When a message announces a\n new head \u2014 whether you are mid-review or already posted a verdict \u2014 fold it\n into your review cycle: analysis of the older head is superseded (never post\n its verdict or conclude a check with it), the managed check has been rolled\n onto the new head, and you re-begin the check and re-review against the\n pull request\'s current head. Keep exactly one current verdict per pull\n request at all times.\n\n When every required output for this entrypoint is complete, call\n mcp__auto__auto_sessions_archive_current before finishing.\nidentity:\n displayName: PR Review\n username: pr-review\n avatar:\n asset: .auto/assets/pr-reviewer.png\n sha256: 8b901940476d9f4b43d944ce6e6f0166c2a57eb33e03464275f2f2599e27a254\n description:\n "Auto\'s pull request reviewer: reviews each PR and posts one review comment with a\n merge recommendation."\ndisplayTitle: "Review PR #{{github.pullRequest.number}}: {{github.pullRequest.title}}"\ninitialPrompt: |\n Review GitHub pull request #{{github.pullRequest.number}} in {{github.repository.fullName}}.\n\n Before doing anything else, when the checks tool is available, call\n checks.begin with `{ "name": "pr-review" }`. This must happen before\n inspecting PR metadata or the diff.\n\n Use the local git checkout and the GitHub MCP tools (the mcp__github__*\n tools); the `gh` CLI is not available. Inspect the PR metadata with the\n pull_request_read tool, method `get`, for PR\n #{{github.pullRequest.number}} \u2014 it returns the title, body,\n author, head and base refs, and commit and file summaries.\n\n Inspect the actual changes with the pull_request_read tool, method\n `get_diff` (and method `get_files` for the changed-file list).\n\n Read AGENTS.md and docs/idioms.md before forming your recommendation. Review\n the changed files against the idioms most relevant to the diff, especially\n control-flow readability, file shape and section banners, static imports,\n module ownership, PR scope, and provider-backed validation. Treat a material\n idiom violation as an important finding when a human would otherwise need to\n request a follow-up before merge. Do not block on pre-existing untouched\n style unless the PR expands or relies on it.\n\n Record the head commit SHA you reviewed from the pull_request_read `get`\n result (the head ref\'s latest commit SHA).\n\n Determine whether you have reviewed this PR before. Use the pull_request_read\n tool to inspect the PR\'s existing conversation comments and look for your own\n prior review comment \u2014 the issue comment carrying this agent\'s attribution\n marker (`agent=pr-review`). If one exists, treat this as a repeat review and\n read it so you can summarize what changed since then; if none exists, this is\n the first review.\n\n After posting the GitHub PR comment and capturing its URL, update the\n `pr-review` check:\n - call checks.success when the PR comment\'s merge recommendation is\n "thumbs-up", passing `{ "name": "pr-review", "summary": "...", "text": "..." }`\n - call checks.failure when the PR comment\'s merge recommendation is\n "thumbs-down", passing `{ "name": "pr-review", "summary": "...", "text": "..." }`\n Include the reviewed commit SHA, the recommendation, PR comment URL when\n available, and the findings that gate the recommendation \u2014 the\n unresolved P0/P1 findings, plus any unresolved P2 that drove a thumbs-down,\n or "No blocking issues found." when nothing gates \u2014 in the check result.\n\n The local checkout is a shallow checkout of the PR head only. Do not assume\n origin/{{github.pullRequest.baseRef}} or origin/{{github.pullRequest.headRef}}\n exists locally unless you explicitly fetch it first.\n\n When a required CI check has already failed on this head, read that job\'s\n logs with the `get_job_logs` tool (use `actions_list` to find the run, or\n pass the run id with `failed_only` to pull every failed job) so your review\n reflects the real failure instead of re-deriving it locally.\n\n Run targeted tests or typechecks when they would validate a concrete\n concern. The checkout may not have node_modules installed yet. If a useful\n validation command needs project dependencies, install only what you need\n before running it:\n - for a change contained to one workspace, prefer\n `npm install --include-workspace-root --workspace <workspace-name>` and\n then run that workspace\'s targeted test or typecheck command\n - for root-level, lockfile, shared config, or cross-workspace changes, run\n `npm install` once at the repository root before validation\n - if a command fails because `tsx`, `turbo`, `tsc`, `biome`, or another\n package binary is missing, treat that as missing dependencies, install\n the relevant dependencies as above, and retry the targeted command once\n\n Keep commands scoped to the PR unless a broad suite is necessary for the\n recommendation. Do not report that tests could not run solely because\n `tsx` or another package binary was absent in the initial shallow checkout;\n only report inability to run validation after the dependency install also\n fails or the command needs unavailable external services or secrets.\n\n Produce exactly one PR comment. Be terse \u2014 the goal is a comment a human\n can scan in a few seconds.\n - On a repeat review (a prior review comment of yours exists), a one-line\n `## What changed since last review` at the very top summarizing the new\n commits since your prior review and how they change your assessment.\n Omit this section entirely on the first review.\n - Lead with the verdict: a `## Recommendation` line that is exactly\n `thumbs-up` or `thumbs-down`, immediately followed by a one-line\n rationale. Do not restate what the PR does, do not write a Summary\n section, and do not praise the work.\n - A `## Findings` section listing only material findings, most severe\n first. Omit the section entirely when there are none; instead put\n `No blocking or notable findings.` in the recommendation rationale.\n Each finding is one tight line, no sub-bullets:\n `P{n} \xB7 {dimension} \xB7 {file:line} \u2014 {what\'s wrong} \u2192 {why it matters}`\n where dimension is one of correctness, security, data-integrity,\n operational-risk, missing-tests, or idioms. No diff restatement, no\n per-file walkthroughs, no Impact/Source/Verification/Fix sub-bullets.\n Drop P3 (nits) from the comment entirely \u2014 they never gate the\n recommendation and only add noise.\n - The severity tiers that drive the recommendation (do not list tiers with\n no findings; never post P3 in the comment):\n - P0 \u2014 Blocker: breaks the PR\'s core purpose, or a severe correctness,\n security, or data-integrity failure or otherwise unrecoverable harm\n (data loss, secret exposure, production outage). Must fix before merge.\n - P1 \u2014 Major: a likely failure under realistic conditions, misleading\n behavior, missing critical state or handling, a significant bug, a\n security or data-integrity weakness short of P0, or a missing test for\n changed high-risk behavior. Should fix before merge.\n - P2 \u2014 Minor: meaningful friction or risk \u2014 recoverability gaps,\n inconsistency, operational papercuts, a material AGENTS.md/docs/idioms.md\n violation in touched code, or weaker-than-warranted test coverage. Fix\n or justify.\n - P3 \u2014 Nit: never posted in the comment; tracked only in the check result\n if at all.\n - Append this hidden attribution marker at the end with the environment\n variables expanded:\n `<!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->`\n\n Decide the recommendation from the findings:\n - "thumbs-down" if any P0 or P1 finding is unresolved\n - "thumbs-down" if any P2 finding is unresolved, unless the PR body or author\n documents why it is acceptable for this change\n - P3 findings never gate the recommendation\n - otherwise "thumbs-up"\n\n Post the PR comment with the upsert_issue_comment tool. Pass the repository\n owner and name from {{github.repository.fullName}} as `owner` and `repo`, PR\n number {{github.pullRequest.number}} as `issueNumber`, and the full review as\n `body`. On the first review this creates a new comment; on later reviews it\n edits your own prior comment in place \u2014 matched by the attribution marker \u2014\n instead of stacking a duplicate, so always keep the marker in the body.\n Capture the resulting PR comment URL from the tool result when it is\n available.\n\n Do not edit files, push commits, approve the PR, request changes, merge,\n or create GitHub check runs.\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/auto\n ref: refs/pull/{{payload.github.pullRequest.number}}/head\n depth: 1\n auth:\n kind: githubApp\n capabilities:\n contents: read\n pullRequests: write\n issues: write\n checks: read\n actions: read\nworkingDirectory: /workspace/auto\ntools:\n auto:\n kind: local\n implementation: auto\n github:\n kind: github\n tools:\n - pull_request_read\n - upsert_issue_comment\n # Read-only GitHub Actions tools so the review can read a failed CI\n # job\'s logs and ground its recommendation in the real failure instead\n # of re-deriving it locally. The mount already grants `actions: read`.\n - actions_get\n - actions_list\n - get_job_logs\ntriggers:\n # One reviewer session owns a PR across heads. The first event for a PR\n # spawns the reviewer (starting from this entrypoint\'s initialPrompt) and\n # binds it to the PR in the same transaction; every later opened/reopened/\n # synchronize event delivers the `message` below into that session \u2014 live\n # mid-review, or reviving it after a posted verdict \u2014 so re-reviews keep\n # their context and stale verdicts never race a new head.\n - name: pr-review\n events:\n - github.pull_request.opened\n - github.pull_request.reopened\n - github.pull_request.synchronize\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n Pull request #{{github.pullRequest.number}} in {{github.repository.fullName}} has a review-triggering\n update (action: {{github.action}}; current head {{github.pullRequest.headSha}}).\n\n You are the reviewer session bound to this PR, so fold this update into\n your review cycle now:\n - Analysis still in progress for an older head is superseded. Do not\n post its verdict and do not conclude the managed check with it. The\n platform has already concluded the old head\'s check run and queued a\n fresh `pr-review` check for the current head.\n - Call checks.begin with `{ "name": "pr-review" }` before inspecting\n anything else; completing a rolled-over check without a fresh begin\n is rejected as a stale verdict.\n - The local checkout still holds the head this session started from.\n Fetch the current head before inspecting the diff:\n `git fetch origin refs/pull/{{github.pullRequest.number}}/head` and\n check out the fetched commit.\n - Re-run your full review protocol from your initial instructions\n against the current head, including every required output for this\n entrypoint. Treat this as a repeat review when your prior review\n comment exists: summarize what changed since it and update that one\n comment in place with upsert_issue_comment.\n - Conclude the check with checks.success or checks.failure for the\n current head\'s verdict. There must be exactly one current verdict\n for this PR.\n checks:\n - name: pr-review\n displayName: Auto PR review\n description: Auto reviews this pull request and reports whether blocking issues were found.\n instructions: |\n Call checks.begin with { "name": "pr-review" } before doing\n anything else. After posting the GitHub PR comment, call\n checks.success with { "name": "pr-review", "summary": "...",\n "text": "..." } only for a thumbs-up merge recommendation, and call\n checks.failure with { "name": "pr-review", "summary": "...",\n "text": "..." } for a thumbs-down merge recommendation. Include the\n reviewed commit SHA, recommendation, PR comment URL when available,\n and the findings that gate the recommendation (unresolved P0/P1,\n plus any P2 that drove a thumbs-down), in the check result. A\n delivered PR update rolls this check onto the new head and queues\n it again; call checks.begin again before concluding that new cycle.\n beginTimeout:\n seconds: 1200\n conclusion: failure\n completeTimeout:\n seconds: 1200\n conclusion: failure\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: spawn\n'
|
|
28748
|
+
}
|
|
28749
|
+
]
|
|
28458
28750
|
}
|
|
28459
28751
|
],
|
|
28460
28752
|
"@auto/research-loop": [
|
|
@@ -33994,7 +34286,7 @@ var init_package = __esm({
|
|
|
33994
34286
|
"package.json"() {
|
|
33995
34287
|
package_default = {
|
|
33996
34288
|
name: "@autohq/cli",
|
|
33997
|
-
version: "0.1.
|
|
34289
|
+
version: "0.1.390",
|
|
33998
34290
|
license: "SEE LICENSE IN README.md",
|
|
33999
34291
|
publishConfig: {
|
|
34000
34292
|
access: "public"
|