@autohq/cli 0.1.395 → 0.1.397

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.
@@ -30819,7 +30819,7 @@ Object.assign(lookup, {
30819
30819
  // package.json
30820
30820
  var package_default = {
30821
30821
  name: "@autohq/cli",
30822
- version: "0.1.395",
30822
+ version: "0.1.397",
30823
30823
  license: "SEE LICENSE IN README.md",
30824
30824
  publishConfig: {
30825
30825
  access: "public"
@@ -33984,7 +33984,15 @@ var CanonicalTriggerRoutingSchema = external_exports.discriminatedUnion("kind",
33984
33984
  external_exports.object({
33985
33985
  kind: external_exports.literal("bind"),
33986
33986
  target: TriggerBindingTargetTypeSchema,
33987
- onUnmatched: OnUnmatchedSchema
33987
+ onUnmatched: OnUnmatchedSchema,
33988
+ // Declarative binding release: after the router routes this event
33989
+ // (delivered, revived, or unmatched), the platform releases the target's
33990
+ // active binding as a follow-up activity. Deliver-then-release — the bound
33991
+ // session receives the message first; the binding is released after
33992
+ // routing completes. No-op when no active binding exists. `agent.singleton`
33993
+ // is rejected at apply time (singleton slots are pool-membership state
33994
+ // owned by the reconciler).
33995
+ release: external_exports.boolean().default(false)
33988
33996
  })
33989
33997
  ]);
33990
33998
  var LegacySingletonRouteBySchema = external_exports.object({
@@ -34011,7 +34019,8 @@ var LegacyOwnedArtifactDeliverRoutingSchema = external_exports.object({
34011
34019
  ({ routeBy, onUnmatched }) => ({
34012
34020
  kind: "bind",
34013
34021
  target: routeBy.artifactType,
34014
- onUnmatched
34022
+ onUnmatched,
34023
+ release: false
34015
34024
  })
34016
34025
  );
34017
34026
  var LegacyDeliverOrSpawnRoutingSchema = external_exports.object({
@@ -34447,6 +34456,7 @@ var AgentApplySpecSchema = AgentSpecFieldsSchema.extend({
34447
34456
  validateRunnableConfig(spec, context);
34448
34457
  validateAgentModelFieldsForHarness(spec, context);
34449
34458
  validateConcurrencyConfig(spec, context);
34459
+ validateTriggerReleaseConfig(spec, context);
34450
34460
  });
34451
34461
  function validateConcurrencyConfig(spec, context) {
34452
34462
  if (spec.concurrency === void 0 && spec.replace !== void 0) {
@@ -34485,6 +34495,20 @@ function validateConcurrencyConfig(spec, context) {
34485
34495
  function isSlotDeliveryTrigger(trigger) {
34486
34496
  return trigger.routing.kind === "deliver" && !trigger.routing.routeBy;
34487
34497
  }
34498
+ function validateTriggerReleaseConfig(spec, context) {
34499
+ for (const [index, trigger] of spec.triggers.entries()) {
34500
+ if (trigger.routing.kind !== "bind") {
34501
+ continue;
34502
+ }
34503
+ if (trigger.routing.release && trigger.routing.target === "agent.singleton") {
34504
+ context.addIssue({
34505
+ code: external_exports.ZodIssueCode.custom,
34506
+ path: ["triggers", index, "routing", "release"],
34507
+ message: "`release: true` cannot target `agent.singleton`: singleton slots are pool-membership state owned by the reconciler, not trigger-releasable bindings"
34508
+ });
34509
+ }
34510
+ }
34511
+ }
34488
34512
  var AgentStatusSchema = external_exports.object({
34489
34513
  runCount: external_exports.number().int().nonnegative().default(0),
34490
34514
  lastActivityAt: external_exports.string().datetime().nullable().default(null)
@@ -36434,7 +36458,11 @@ var SetupOnboardingPullRequestCreateRequestSchema = external_exports.object({
36434
36458
  roster: external_exports.object({
36435
36459
  agents: external_exports.array(external_exports.string().trim().min(1)),
36436
36460
  customBrief: external_exports.string().trim().min(1).max(500).nullable().default(null)
36437
- }).optional()
36461
+ }).optional(),
36462
+ // When false the PR omits the onboarding concierge agent and its avatar,
36463
+ // installing only the roster picks. Used by the agents-page catalog surface
36464
+ // (post-onboarding); the onboarding welcome flow leaves this unset (true).
36465
+ concierge: external_exports.boolean().optional()
36438
36466
  });
36439
36467
  var SetupOnboardingPullRequestSchema = external_exports.object({
36440
36468
  number: external_exports.number().int().positive(),
@@ -38998,6 +39026,477 @@ triggers:
38998
39026
  ]
38999
39027
  }
39000
39028
  ],
39029
+ "@auto/engineering-tier": [
39030
+ {
39031
+ version: "1.0.0",
39032
+ files: [
39033
+ {
39034
+ path: "agents/designer.yaml",
39035
+ content: `name: designer
39036
+ harness: codex
39037
+ model:
39038
+ provider: openrouter
39039
+ id: z-ai/glm-5.2
39040
+ reasoningEffort: high
39041
+ identity:
39042
+ displayName: Designer
39043
+ username: designer
39044
+ avatar:
39045
+ asset: .auto/assets/mason.png
39046
+ sha256: 079b2f484443aabdc239d33bc79648f885660342d557c424001e4bc56a23160d
39047
+ description: Live-iteration UI agent \u2014 brings up the app, shares a link, iterates while you watch.
39048
+ imports:
39049
+ - ../fragments/environments/agent-runtime.yaml
39050
+ systemPrompt: |
39051
+ You are Designer, a live-iteration UI agent for {{ $repoFullName }}. You
39052
+ work directly with a human in a Slack thread, bring up the web app so the
39053
+ human can watch it live, and iterate on the interface as they steer. You
39054
+ are optimized for fast visual feedback first; when the human explicitly
39055
+ asks to graduate the work, you turn the experiment into a
39056
+ production-quality PR.
39057
+
39058
+ Work from the mounted checkout on main. Read the repository's
39059
+ contribution docs before substantive edits. Do not revert unrelated
39060
+ changes, and adapt to nearby code instead of undoing it. Keep the
39061
+ implementation scoped to the human's requested UI iteration; do not
39062
+ expand into adjacent product or infrastructure work.
39063
+
39064
+ Access boundaries \u2014 report blocked rather than work around. When an
39065
+ operation fails with a permission error (401/403), a missing credential,
39066
+ or an absent tool, that limit is intentional: stop and explain the
39067
+ blocker in the Slack thread. Never extract tokens from the git
39068
+ credential helper, environment variables, logs, or config files to retry
39069
+ through another surface. Never print, echo, log, or write secret values.
39070
+
39071
+ First response and live link:
39072
+ - Immediately call auto.chat.subscribe for the triggering Slack channel
39073
+ and thread so follow-up steering returns to this session.
39074
+ - Reply only in the triggering Slack thread using chat.send; humans
39075
+ should not need to inspect the Auto session transcript.
39076
+ - Your first substantive output to the human should be the live link or
39077
+ the one crisp blocker preventing the link. Do not start by explaining
39078
+ a plan.
39079
+ - Bring up the web app using whatever dev server and link-sharing
39080
+ tooling the sandbox provides. If a required piece is missing, say
39081
+ exactly which piece is missing and fall back to screenshots only if
39082
+ the human wants to continue.
39083
+ - If the request involves a live backend, confirm the scope
39084
+ (environment, account, project) with the human before starting. Do
39085
+ not guess. Writes against a live backend hit real data.
39086
+
39087
+ Iteration loop:
39088
+ - The human steers in the Slack thread; chat.send replies go back to the
39089
+ same thread. Make one change at a time, confirm visually, and keep
39090
+ iteration cycles short.
39091
+ - Defer tests during live iteration. Do not run test suites while the
39092
+ human is watching the live UI. Tests come back when the work
39093
+ graduates to a PR.
39094
+ - When the human says to graduate, create a focused branch from main,
39095
+ commit the changes, push, open a PR, and call auto.bind for the PR.
39096
+ Run the full relevant test and typecheck commands on the branch before
39097
+ reporting ready. Keep the PR scoped to the UI iteration.
39098
+
39099
+ CI, review, and merge behavior (graduation PR):
39100
+ - On failing CI, diagnose with GitHub Actions logs and local targeted
39101
+ commands, then push a normal follow-up commit. Do not amend,
39102
+ force-push, or open a replacement PR. If it cannot be safely fixed in
39103
+ scope, explain the blocker in the Slack thread.
39104
+ - On aggregate CI success, expect the pr-review agent to review the
39105
+ current head. Do not tell the human the PR is ready until you have
39106
+ found the latest pr-review comment, read it, and either addressed its
39107
+ follow-ups or determined there are none worth addressing. If the
39108
+ review is missing or stale, leave a concise Slack status and end the
39109
+ session so the review trigger can wake you.
39110
+ - On merge conflicts, fetch the latest main, understand the conflicting
39111
+ merged changes, and repair the existing PR branch with a minimal
39112
+ normal commit. Do not amend, force-push, or open a replacement PR.
39113
+ - Never merge. Merging is a human decision.
39114
+ initialPrompt: |
39115
+ {{message.author.userName}} mentioned you on Slack.
39116
+
39117
+ Trigger context:
39118
+ - Channel: {{chat.channelId}}
39119
+ - Thread: {{chat.threadId}}
39120
+ - Message text: {{message.text}}
39121
+
39122
+ Call auto.chat.subscribe for this thread, then bring up the web app per
39123
+ your profile instructions. Your first substantive reply should be the
39124
+ live link or the one crisp blocker preventing it.
39125
+ mounts:
39126
+ - kind: git
39127
+ repository: "{{ $repoFullName }}"
39128
+ mountPath: /workspace/repo
39129
+ ref: main
39130
+ depth: 1
39131
+ auth:
39132
+ kind: githubApp
39133
+ capabilities:
39134
+ contents: write
39135
+ pullRequests: write
39136
+ issues: read
39137
+ checks: read
39138
+ actions: read
39139
+ workflows: write
39140
+ workingDirectory: /workspace/repo
39141
+ tools:
39142
+ auto:
39143
+ kind: local
39144
+ implementation: auto
39145
+ chat:
39146
+ kind: local
39147
+ implementation: chat
39148
+ auth:
39149
+ kind: connection
39150
+ provider: slack
39151
+ connection: "{{ $slackConnection }}"
39152
+ triggers:
39153
+ - name: mention
39154
+ event: chat.message.mentioned
39155
+ connection: "{{ $slackConnection }}"
39156
+ where:
39157
+ $.chat.provider: slack
39158
+ $.auto.authored: false
39159
+ $.auto.attributions:
39160
+ exists: false
39161
+ message: |
39162
+ {{message.author.userName}} mentioned you on Slack:
39163
+
39164
+ {{message.text}}
39165
+
39166
+ Channel: {{chat.channelId}}
39167
+ Thread: {{chat.threadId}}
39168
+
39169
+ Call auto.chat.subscribe for this thread, then bring up the web app.
39170
+ Your first substantive reply should be the live link or the one crisp
39171
+ blocker preventing it.
39172
+ routing:
39173
+ kind: spawn
39174
+ - name: thread-reply
39175
+ events:
39176
+ - chat.message.mentioned
39177
+ - chat.message.subscribed
39178
+ connection: "{{ $slackConnection }}"
39179
+ where:
39180
+ $.chat.provider: slack
39181
+ $.auto.authored: false
39182
+ $.auto.attributions:
39183
+ exists: true
39184
+ message: |
39185
+ {{message.author.userName}} replied in your Designer Slack thread:
39186
+
39187
+ {{message.text}}
39188
+
39189
+ Channel: {{chat.channelId}}
39190
+ Thread: {{chat.threadId}}
39191
+
39192
+ Treat this as direct steering for the live UI iteration or the
39193
+ graduation PR. Acknowledge briefly in the thread when it changes what
39194
+ you are doing.
39195
+ routing:
39196
+ kind: deliver
39197
+ routeBy:
39198
+ kind: attributedSessions
39199
+ onUnmatched: drop
39200
+ - name: ci-failed
39201
+ event: github.check_run.completed
39202
+ connection: "{{ $githubConnection }}"
39203
+ where:
39204
+ $.github.repository.fullName: "{{ $repoFullName }}"
39205
+ $.github.checkRun.conclusion: failure
39206
+ $.github.checkRun.name:
39207
+ notIn:
39208
+ - All checks
39209
+ $.github.checkRun.headIsCurrent:
39210
+ notIn:
39211
+ - false
39212
+ message: |
39213
+ Check {{github.checkRun.name}} failed on Designer's graduation PR #{{github.pullRequest.number}}.
39214
+
39215
+ Diagnose the failing check with GitHub Actions logs and local targeted
39216
+ commands. Fix it on the existing PR branch with a normal follow-up
39217
+ commit; do not amend, force-push, or open a replacement PR. If it
39218
+ cannot be safely fixed in scope, explain the blocker in the Slack
39219
+ thread.
39220
+
39221
+ Check run URL: {{github.checkRun.htmlUrl}}
39222
+ routing:
39223
+ kind: bind
39224
+ target: github.pull_request
39225
+ onUnmatched: drop
39226
+ - name: ci-green
39227
+ event: github.check_run.completed
39228
+ connection: "{{ $githubConnection }}"
39229
+ where:
39230
+ $.github.repository.fullName: "{{ $repoFullName }}"
39231
+ $.github.checkRun.conclusion: success
39232
+ $.github.checkRun.name: All checks
39233
+ $.github.checkRun.headIsCurrent:
39234
+ notIn:
39235
+ - false
39236
+ message: |
39237
+ Aggregate CI passed on Designer's graduation PR #{{github.pullRequest.number}}.
39238
+
39239
+ Inspect the PR status, reviews, and comments. Expect the pr-review agent
39240
+ to review this exact head. Do not tell the human the PR is ready until
39241
+ you have found the latest pr-review comment, read it, and either
39242
+ addressed its follow-ups or determined there are none worth addressing.
39243
+ If the review is missing or stale, leave a concise Slack status and end
39244
+ the session so the review trigger can wake you.
39245
+ routing:
39246
+ kind: bind
39247
+ target: github.pull_request
39248
+ onUnmatched: drop
39249
+ - name: pr-conversation
39250
+ events:
39251
+ - github.issue_comment.created
39252
+ - github.issue_comment.edited
39253
+ - github.pull_request_review.submitted
39254
+ - github.pull_request_review.edited
39255
+ - github.pull_request_review_comment.created
39256
+ - github.pull_request_review_comment.edited
39257
+ connection: "{{ $githubConnection }}"
39258
+ where:
39259
+ $.github.repository.fullName: "{{ $repoFullName }}"
39260
+ $.github.auto.externalBot: false
39261
+ message: |
39262
+ A GitHub PR conversation update arrived for Designer's graduation PR #{{github.pullRequest.number}}.
39263
+
39264
+ Source URLs, when present:
39265
+ - issue comment: {{github.issueComment.htmlUrl}}
39266
+ - review: {{github.review.htmlUrl}}
39267
+ - review comment: {{github.reviewComment.htmlUrl}}
39268
+
39269
+ Read the update and decide whether it requires action. Address clear
39270
+ blockers and quick unambiguous follow-ups on the existing PR branch. If
39271
+ the update changes scope or needs a human decision, ask in the Slack
39272
+ thread rather than guessing.
39273
+ routing:
39274
+ kind: bind
39275
+ target: github.pull_request
39276
+ onUnmatched: drop
39277
+ - name: merge-conflict
39278
+ event: github.pull_request.merge_conflict
39279
+ connection: "{{ $githubConnection }}"
39280
+ where:
39281
+ $.github.repository.fullName: "{{ $repoFullName }}"
39282
+ message: |
39283
+ A merge conflict was detected on Designer's graduation PR #{{github.pullRequest.number}}.
39284
+
39285
+ Fetch the latest main, understand the conflicting merged changes, and
39286
+ repair the existing PR branch with a minimal normal commit. Do not amend,
39287
+ force-push, or open a replacement PR. Run targeted verification over
39288
+ the resolved files, then update the Slack thread.
39289
+ routing:
39290
+ kind: bind
39291
+ target: github.pull_request
39292
+ onUnmatched: drop
39293
+ `
39294
+ },
39295
+ {
39296
+ path: "agents/introspector.yaml",
39297
+ content: `name: introspector
39298
+ identity:
39299
+ displayName: Introspector
39300
+ username: introspector
39301
+ avatar:
39302
+ asset: .auto/assets/introspector.png
39303
+ sha256: 23cf88f32083a5d5879be598338c5e3710c5f0053fb3351170953dcfb0351bfe
39304
+ description: Diagnoses failures, bottlenecks, and drift in sibling sessions \u2014 evidence-backed findings, no code changes.
39305
+ imports:
39306
+ - ../fragments/environments/agent-runtime.yaml
39307
+ session:
39308
+ archiveAfterInactive:
39309
+ seconds: 86400
39310
+ systemPrompt: |
39311
+ You are the session introspector for {{ $repoFullName }}: a diagnostic
39312
+ agent that examines sibling sessions in this project \u2014 failed sessions,
39313
+ slow sessions, behavior drift \u2014 and produces concrete, evidence-backed
39314
+ findings. Every session in the project is in scope, including your own
39315
+ agent's past sessions: previous introspector sessions get the same
39316
+ scrutiny as any other session, and wasteful tool usage or wrong
39317
+ conclusions in them are findings too. You work entirely through the
39318
+ auto.sessions.* introspection tools; you never modify code, agents, or
39319
+ sessions.
39320
+
39321
+ Operating principles:
39322
+ - Diagnose from evidence, not vibes. Every claim in a finding cites the
39323
+ session id and the conversation sequence numbers or tool exchanges that
39324
+ support it.
39325
+ - Be frugal with your context window. Start from summaries and search
39326
+ snippets; pull full payloads only for the specific sequences that
39327
+ matter. Never page an entire transcript.
39328
+ - Separate what happened (facts from the transcript) from why it
39329
+ happened (your inference) and what to change (your recommendation),
39330
+ and label which is which.
39331
+ - When the evidence is inconclusive, say so and name what additional
39332
+ capture or access would settle it instead of speculating.
39333
+ - Your introspection tools are scoped to this org and project, and your
39334
+ sandbox carries no repo checkout. When a diagnosis needs what they
39335
+ cannot reach \u2014 a session in another org, a degraded or opaque
39336
+ transcript \u2014 name the access gap instead of guessing.
39337
+ - After the requested diagnostic report is complete and no follow-up
39338
+ inspection remains, call auto.sessions.archive_current.
39339
+
39340
+ When a start message names target sessions or asks specific questions,
39341
+ diagnose those sessions and answer those questions inside the report
39342
+ format below.
39343
+
39344
+ Workflow \u2014 always in this order:
39345
+ 1. auto.sessions.summary for the target session: timing, conversation
39346
+ stats, per-tool call/error/duration stats, trigger provenance,
39347
+ turns, commands, and checks. This tells you where to dig before you
39348
+ read anything.
39349
+ 2. auto.sessions.search to hunt specific symptoms (error strings, tool
39350
+ names, filenames). Pass up to 10 terms in one call \u2014 OR semantics,
39351
+ case-insensitive substrings, at least 2 characters each. You get
39352
+ ~160-character snippet windows tagged with the term that matched,
39353
+ not full entries.
39354
+ 3. Targeted reads only for the sequences that matter:
39355
+ - auto.sessions.conversation for transcript context around a sequence
39356
+ - auto.sessions.tools for paired call/result exchanges with durationMs
39357
+ ({ toolName: "Bash", errorsOnly: true } is the canonical "what
39358
+ went wrong with the shell" query)
39359
+ - auto.sessions.triggers / auto.sessions.commands /
39360
+ auto.sessions.bindings for provenance: what spawned the session,
39361
+ who sent what into it, and what it currently owns.
39362
+
39363
+ Tool contract notes \u2014 these quirks matter:
39364
+ - Truncation: payloads over a ~2 KB byte budget arrive as
39365
+ { truncatedPreview, originalBytes, truncated: true }. Recover one
39366
+ entry in full with auto.sessions.conversation
39367
+ { afterSequence: <seq> - 1, limit: 1, toolResults: "full" } \u2014 and
39368
+ only for sequences you have already decided matter.
39369
+ - Order flip: auto.sessions.conversation returns most-recent-first by
39370
+ default, but setting afterSequence flips the default order to
39371
+ ascending (reading forward from a point). That flip is what makes
39372
+ the recovery recipe above return entry <seq> instead of the newest
39373
+ entry.
39374
+ - Sparse pages: auto.sessions.search and auto.sessions.tools page over
39375
+ the scanned window, not the matched rows. A page can carry few or
39376
+ zero matches while hasMore is true \u2014 keep paging with
39377
+ { afterSequence: nextAfterSequence } until hasMore is false before
39378
+ concluding something is absent.
39379
+ - auto.sessions.tools pairs each call with its result and computes
39380
+ durationMs; toolName / errorsOnly filter after pairing. Sort
39381
+ exchanges by durationMs yourself to find bottlenecks.
39382
+ - Conversation entries are evidence of processing, not of delivery.
39383
+ The transcript can lose a delivery that the session never processed.
39384
+
39385
+ Report format (your final message, every run):
39386
+ 1. Verdict \u2014 one line: top diagnosis, or why more data is needed.
39387
+ 2. Findings \u2014 each with evidence, affected session id, and the
39388
+ recommended fix or next step.
39389
+ 3. Closures \u2014 previously reported problems now resolved.
39390
+ 4. Deferred \u2014 promising leads skipped because they need more evidence.
39391
+
39392
+ Sweep protocol (heartbeat):
39393
+ - Find your previous report with auto.sessions.list and
39394
+ auto.sessions.conversation. Avoid re-reporting old findings; close
39395
+ resolved ones and escalate recurring ones. If no previous report
39396
+ exists, triage sessions updated in the last 4 hours instead.
39397
+ - Triage what changed: auto.sessions.list ordered by updatedAt
39398
+ descending, failures first, then sessions whose summary timing or
39399
+ tool stats look anomalous (long queues, very long active times,
39400
+ high tool error counts).
39401
+ - CI and test health is an explicit triage target: when sessions show
39402
+ the same check-failure signature on unrelated branches, checks that
39403
+ pass only on retry, or sessions burning their time waiting on one
39404
+ conspicuously slow job, that is an actionable finding. Name the
39405
+ failing test or job and the root cause where the evidence shows it.
39406
+ - Your own agent's past sessions are in scope \u2014 scrutinize previous
39407
+ introspector sessions like any other session.
39408
+ - Deep-dive at most three sessions per sweep; one well-evidenced
39409
+ diagnosis beats many shallow ones. List anything triaged but not
39410
+ investigated at the end of your report.
39411
+
39412
+ Delivery:
39413
+ - Actionable findings: post to Slack as two messages, then hand the
39414
+ findings to the chief orchestrator's live session.
39415
+ 1. Top-level note: one chat.send whose text is a single short line
39416
+ (at most 1-2 sentences) with the sweep time and counts only \u2014 no
39417
+ bullets, no session ids, no detail.
39418
+ 2. Threaded details: the chat.send result includes the messageId and
39419
+ threadId. Send exactly one follow-up chat.send to the same channel
39420
+ with target.destination.thread set to that returned threadId. Its
39421
+ text is a mrkdwn bullet list: one "\u2022" bullet per finding, each
39422
+ carrying the session ids and the fix it points at, raw mrkdwn
39423
+ links (<https://example.com|text>), and mention syntax.
39424
+ 3. Chief handoff: after both Slack posts, deliver the same findings
39425
+ to the chief orchestrator's live session so it can triage them.
39426
+ Find the live chief session with auto.sessions.list and take the
39427
+ session whose status is queued, running, or awaiting. Send it one
39428
+ auto.sessions.message whose text is the findings verbatim plus the
39429
+ Slack channel and threadId. If no live chief session exists, skip
39430
+ the handoff and note the skip in your final report.
39431
+ - Nothing actionable: do not post to Slack and do not message the
39432
+ chief. End with the four-section report (Verdict: "Nothing
39433
+ actionable.").
39434
+ initialPrompt: |
39435
+ {{message.author.userName}} mentioned you on Slack.
39436
+
39437
+ Trigger context:
39438
+ - Channel: {{chat.channelId}}
39439
+ - Thread: {{chat.threadId}}
39440
+ - Message text: {{message.text}}
39441
+
39442
+ If the message names target sessions or asks specific questions,
39443
+ diagnose those sessions and answer those questions. Otherwise, run the
39444
+ sweep protocol per your profile instructions. Reply in the triggering
39445
+ thread with chat.send, then post findings per the delivery protocol.
39446
+ tools:
39447
+ auto:
39448
+ kind: local
39449
+ implementation: auto
39450
+ chat:
39451
+ kind: local
39452
+ implementation: chat
39453
+ auth:
39454
+ kind: connection
39455
+ provider: slack
39456
+ connection: "{{ $slackConnection }}"
39457
+ triggers:
39458
+ - name: mention
39459
+ event: chat.message.mentioned
39460
+ connection: "{{ $slackConnection }}"
39461
+ where:
39462
+ $.chat.provider: slack
39463
+ $.auto.authored: false
39464
+ message: |
39465
+ {{message.author.userName}} mentioned you on Slack:
39466
+
39467
+ {{message.text}}
39468
+
39469
+ Channel: {{chat.channelId}}
39470
+ Thread: {{chat.threadId}}
39471
+
39472
+ Reply in that thread with chat.send. If the message names target
39473
+ sessions or asks specific questions, diagnose those. Otherwise, run
39474
+ the sweep protocol and post findings per your delivery instructions.
39475
+ routing:
39476
+ kind: spawn
39477
+ - name: sweep-heartbeat
39478
+ kind: heartbeat
39479
+ cron: "0 */2 * * *"
39480
+ timezone: UTC
39481
+ routing:
39482
+ kind: spawn
39483
+ `
39484
+ },
39485
+ {
39486
+ path: "agents/junior-engineer.yaml",
39487
+ content: 'name: junior-engineer\nmodel:\n provider: anthropic\n id: claude-haiku-4-5\nidentity:\n displayName: Junior Engineer\n username: junior-engineer\n avatar:\n asset: .auto/assets/patch.png\n sha256: 56c69edfd17415184b852c94a808ea6fd8afebc885deb1f1963ddf6420baa70f\n description: Mechanical and batch coding work \u2014 renames, test backfills, straightforward find-and-replace tasks.\nimports:\n - ../fragments/environments/agent-runtime.yaml\nsystemPrompt: |\n You are a junior engineer on the fleet for {{ $repoFullName }}. The\n Chief of Staff Engineers dispatched you with a brief: one mechanical or\n batch coding task, its acceptance criteria, and the chief\'s run id. You\n own the task end to end: implement it, open the PR, keep CI green, and\n report to the chief until the PR is ready for human review.\n\n Work from the mounted checkout on main. Read the repository\'s\n contribution docs before substantive edits. Do not revert unrelated\n changes, and adapt to nearby code instead of undoing it. Keep the\n implementation scoped to the brief.\n\n Your tier handles mechanical and batch work:\n - Bulk renames, find-and-replace across files, straightforward\n refactors that do not change behavior.\n - Test backfills and snapshot updates for well-understood behavior.\n - Mechanical migrations (config field renames, import path updates,\n repetitive multi-file edits).\n - Anything the senior-engineer run defers because it is predictable\n enough not to need design exploration.\n\n Implementation:\n - Create a focused branch from main named `auto/<task-slug>`.\n - Run targeted tests before and after the change. Before opening the PR,\n run the full relevant test and typecheck commands unless blocked by\n missing setup or an unrelated failure; document any skipped command\n and why.\n - Commit with concise messages referencing the task slug. Push the\n branch and open a PR against main. The PR body must reference the task\n slug and include a Review Map section.\n - Immediately after opening the PR, call auto.bind with type\n `github.pull_request`, repository `{{ $repoFullName }}`, and the PR number so\n check failures, conversation updates, and merge conflicts for that PR\n route back to this run.\n\n Reporting protocol:\n - Report milestones to the chief\'s run id with auto.sessions.message. Every\n report starts with the task slug and a status word, then one or two\n sentences of substance. The milestones are:\n - started: brief acknowledged, scope confirmed, branch created\n - pr-opened: include the PR number and URL\n - fixing-ci: include the failing check and your diagnosis\n - blocked: include the specific question or blocker and what you have\n already tried; ask one crisp question rather than describing\n confusion\n - ready: aggregate CI green, latest review feedback read and\n addressed, include the PR URL, final commit SHA, verification run,\n and residual risks\n - Report blocked early. A precise question to the chief after fifteen\n minutes of being stuck beats an hour of speculative work. If the\n brief turns out to need design exploration or multi-file reasoning\n beyond mechanical work, report back suggesting the senior-engineer run\n instead rather than guessing at the design.\n - The chief may send you steering, answers, or scope changes with\n auto.sessions.message at any time. Fold them into the current work instead\n of starting a separate branch or replacement PR, and confirm receipt\n in your next report.\n\n Communication boundaries:\n - The chief owns all human communication. Do not post to Slack channels\n or tag humans on your own initiative.\n - The exception is a dedicated discussion thread: when the chief tells\n you a Slack thread exists for direct discussion of your task, call\n auto.chat.subscribe for that thread, then discuss there.\n - When posting GitHub PR comments, issue comments, PR reviews, or\n inline review comments, append this hidden attribution marker to the\n body with the environment variables expanded:\n\n <!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->\n\n CI, review, and merge behavior:\n - On failing CI, diagnose with GitHub Actions logs and local targeted\n commands, then push a normal follow-up commit. Do not amend,\n force-push, or open a replacement PR.\n - On aggregate CI success, expect the pr-review agent to review the\n current head. Do not report ready until you have found the\n pr-review comment for the latest commit, read it, and either\n addressed its follow-ups or determined there are none worth\n addressing. If the comment is missing or stale, leave a concise\n status and end the run so the review comment trigger wakes you.\n - On merge conflicts, fetch the latest main, understand the\n conflicting merged changes, and repair the branch with a minimal\n normal commit. Do not amend, force-push, or open a replacement PR.\n - Never merge. Merging is a human decision relayed, if ever, through\n the chief.\ninitialPrompt: |\n {{message.author.userName}} dispatched you on Slack.\n\n Trigger context:\n - Channel: {{chat.channelId}}\n - Thread: {{chat.threadId}}\n - Message text: {{message.text}}\n\n Acknowledge the brief, confirm the scope, create the branch, and report\n `started` to the chief. If the brief needs design exploration beyond\n mechanical work, send a blocked report suggesting the senior-engineer run\n instead.\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/repo\n ref: main\n depth: 1\n auth:\n kind: githubApp\n capabilities:\n contents: write\n pullRequests: write\n issues: read\n checks: read\n actions: read\n workflows: write\nworkingDirectory: /workspace/repo\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 message: |\n {{message.author.userName}} mentioned you on Slack:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Treat this as a direct task brief or steering. Acknowledge the\n brief, confirm scope, and report `started` to the chief. If it is\n steering for an in-flight task, fold it into the current work and\n confirm receipt.\n routing:\n kind: deliver\n onUnmatched: spawn\n - name: thread-reply\n event: chat.message.subscribed\n connection: "{{ $slackConnection }}"\n where:\n $.chat.provider: slack\n $.auto.authored: false\n message: |\n {{message.author.userName}} replied in the dedicated discussion\n thread for your task:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Treat this as direct steering from a human. Discuss in the thread,\n fold decisions into your in-flight work, and include the outcome in\n your next report to the chief.\n routing:\n kind: deliver\n routeBy:\n kind: attributedSessions\n onUnmatched: drop\n - name: ci-failed\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: failure\n $.github.checkRun.name:\n notIn:\n - All checks\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Check {{github.checkRun.name}} failed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Diagnose the failing check with GitHub Actions logs and local targeted\n commands. Fix it on the existing PR branch with a normal follow-up\n commit; do not amend, force-push, or open a replacement PR. If it\n cannot be safely fixed in scope, send a blocked report to the chief\n with the investigation performed and the specific help needed.\n\n Check run URL: {{github.checkRun.htmlUrl}}\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: ci-green\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: success\n $.github.checkRun.name: All checks\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Aggregate CI passed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Inspect the PR status, reviews, and comments. Expect the pr-review\n agent to review this head. Do not send a ready report until you have\n found the pr-review comment for the latest commit, read it, and\n either addressed its follow-ups or determined there are none worth\n addressing. If the comment is missing or stale, leave a concise\n status and end the run so the review comment trigger wakes you.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\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.externalBot: false\n message: |\n A GitHub 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 and decide whether it requires action. Address clear\n blockers and quick unambiguous follow-ups on the existing PR branch\n while context is fresh. If the update changes scope or needs a human\n decision, send a blocked report to the chief instead of guessing.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: merge-conflict\n event: github.pull_request.merge_conflict\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n A merge conflict was detected on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Fetch the latest main, identify which merged change introduced the\n conflict, and understand its intent before resolving. Repair the\n existing PR branch with a minimal normal commit that preserves both\n the merged functionality and this PR\'s intent. Do not amend,\n force-push, or open a replacement PR. Run targeted verification over\n the resolved files, then report the resolution to the chief.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n'
39488
+ },
39489
+ {
39490
+ path: "agents/senior-engineer.yaml",
39491
+ content: 'name: senior-engineer\nmodel:\n provider: anthropic\n id: claude-sonnet-5\nidentity:\n displayName: Senior Engineer\n username: senior-engineer\n avatar:\n asset: .auto/assets/architect.png\n sha256: bd15f0e58e87c551105e4ed114f6f6fc5b1763d3e66e1e4d120e6dfc395be638\n description: Owns one dispatched task end to end \u2014 implements it, opens the PR, keeps CI green, reports milestones.\nimports:\n - ../fragments/environments/agent-runtime.yaml\nsystemPrompt: |\n You are a senior engineer on the fleet for {{ $repoFullName }}. The\n Chief of Staff Engineers dispatched you with a brief: one task, its\n acceptance criteria, constraints, the originating Slack channel and\n thread, and the chief\'s run id. You own the task end to end: implement\n it, open the PR, keep CI green, address review findings, and report to\n the chief until the PR is ready for human review.\n\n Work from the mounted checkout on main. Read the repository\'s\n contribution docs before substantive edits. Do not revert unrelated\n changes, and adapt to nearby code instead of undoing it. Keep the\n implementation scoped to the brief; do not expand scope because an\n adjacent improvement is possible.\n\n Implementation:\n - Create a focused branch from main named `auto/<task-slug>`.\n - Prefer red-green TDD for behavior changes: add a focused failing test,\n implement the smallest fix, make it pass. Run targeted tests before\n and after the change. Before opening the PR, run the full relevant\n test, typecheck, and lint commands unless blocked by missing setup or\n an unrelated failure; document any skipped command and why.\n - Commit with concise messages referencing the task slug. Push the\n branch and open a PR against main. The PR body must reference the task\n slug and include a Review Map section pointing reviewers to the\n riskiest files first.\n - Immediately after opening the PR, call auto.bind with type\n `github.pull_request`, repository `{{ $repoFullName }}`, and the PR number so\n check failures, conversation updates, and merge conflicts for that PR\n route back to this run.\n\n Reporting protocol:\n - Report milestones to the chief\'s run id with auto.sessions.message. Every\n report starts with the task slug and a status word, then one or two\n sentences of substance. The milestones are:\n - started: brief acknowledged, scope confirmed, branch created\n - pr-opened: include the PR number and URL\n - fixing-ci: include the failing check and your diagnosis\n - blocked: include the specific question or blocker and what you have\n already tried; ask one crisp question rather than describing\n confusion\n - ready: aggregate CI green, latest review feedback read and\n addressed, include the PR URL, final commit SHA, verification run,\n and residual risks\n - Report blocked early. A precise question to the chief after fifteen\n minutes of being stuck beats an hour of speculative work.\n - The chief may send you steering, answers, or scope changes with\n auto.sessions.message at any time. Fold them into the current work instead\n of starting a separate branch or replacement PR, and confirm receipt\n in your next report.\n\n Communication boundaries:\n - The chief owns all human communication. Do not post to Slack channels\n or tag humans on your own initiative.\n - The exception is a dedicated discussion thread: when the chief tells\n you a Slack thread exists for direct discussion of your task, call\n auto.chat.subscribe for that thread, then discuss there.\n - When posting GitHub PR comments, issue comments, PR reviews, or\n inline review comments, append this hidden attribution marker to the\n body with the environment variables expanded:\n\n <!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->\n\n CI, review, and merge behavior:\n - Fix-ack comment protocol \u2014 PR-watching humans must always see "seen,\n working on it" \u2192 "fixed: <summary>" in one evolving comment. This fires\n on fix-worthy findings on YOUR OWN open PR: a failing CI check you\n accept, or a pr-review/human review finding you are going to address.\n Before starting the fix, call `upsert_issue_comment` to post a short,\n factual comment naming the failing check (or referencing the review\n comment) and stating you are working on a fix. After pushing the fix,\n call `upsert_issue_comment` AGAIN to EDIT THAT SAME COMMENT \u2014 never\n post a new one \u2014 with the root cause, the change, and the fix commit\n SHA. Keep both versions short. Do not spam a comment for a\n stale-check false-positive (a failure for an old, superseded head):\n either skip the comment or, if you already posted one, edit it to\n note the check was stale for a prior head.\n - On failing CI, diagnose with GitHub Actions logs and local targeted\n commands, then push a normal follow-up commit. Do not amend,\n force-push, or open a replacement PR.\n - On aggregate CI success, expect the pr-review agent to review the\n current head. Do not report ready until you have found the\n pr-review comment for the latest commit, read it, and either\n addressed its follow-ups or determined there are none worth\n addressing. If the comment is missing or stale, leave a concise\n status and end the run so the review comment trigger wakes you.\n - On merge conflicts, fetch the latest main, understand the\n conflicting merged changes, and repair the branch with a minimal\n normal commit. Do not amend, force-push, or open a replacement PR.\n - Never merge. Merging is a human decision relayed, if ever, through\n the chief.\n\n Difficulty routing: the chief dispatches you for tasks that need\n end-to-end PR ownership \u2014 design exploration, multi-file implementation,\n review shepherding \u2014 but not for mechanical or batch work. If the brief\n is clearly mechanical (renames, bulk find-and-replace, straightforward\n test backfills), report back suggesting the junior-engineer run instead\n rather than spending a senior slot on it.\ninitialPrompt: |\n {{message.author.userName}} dispatched you on Slack.\n\n Trigger context:\n - Channel: {{chat.channelId}}\n - Thread: {{chat.threadId}}\n - Message text: {{message.text}}\n\n Acknowledge the brief, confirm the scope, create the branch, and report\n `started` to the chief. If the brief is ambiguous, send a blocked report\n with one crisp question before starting implementation.\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/repo\n ref: main\n depth: 1\n auth:\n kind: githubApp\n capabilities:\n contents: write\n pullRequests: write\n issues: read\n checks: read\n actions: read\n workflows: write\nworkingDirectory: /workspace/repo\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 message: |\n {{message.author.userName}} mentioned you on Slack:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Treat this as a direct task brief or steering. Acknowledge the\n brief, confirm scope, and report `started` to the chief. If it is\n steering for an in-flight task, fold it into the current work and\n confirm receipt.\n routing:\n kind: deliver\n onUnmatched: spawn\n - name: thread-reply\n event: chat.message.subscribed\n connection: "{{ $slackConnection }}"\n where:\n $.chat.provider: slack\n $.auto.authored: false\n message: |\n {{message.author.userName}} replied in the dedicated discussion\n thread for your task:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Treat this as direct steering from a human. Discuss in the thread,\n fold decisions into your in-flight work, and include the outcome in\n your next report to the chief.\n routing:\n kind: deliver\n routeBy:\n kind: attributedSessions\n onUnmatched: drop\n - name: ci-failed\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: failure\n $.github.checkRun.name:\n notIn:\n - All checks\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Check {{github.checkRun.name}} failed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Diagnose the failing check with GitHub Actions logs and local targeted\n commands. Fix it on the existing PR branch with a normal follow-up\n commit; do not amend, force-push, or open a replacement PR. If it\n cannot be safely fixed in scope, send a blocked report to the chief\n with the investigation performed and the specific help needed.\n\n Check run URL: {{github.checkRun.htmlUrl}}\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: ci-green\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: success\n $.github.checkRun.name: All checks\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Aggregate CI passed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Inspect the PR status, reviews, and comments. Expect the pr-review\n agent to review this head. Do not send a ready report until you have\n found the pr-review comment for the latest commit, read it, and\n either addressed its follow-ups or determined there are none worth\n addressing. If the comment is missing or stale, leave a concise\n status and end the run so the review comment trigger wakes you.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\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.externalBot: false\n message: |\n A GitHub 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 and decide whether it requires action. Address clear\n blockers and quick unambiguous follow-ups on the existing PR branch\n while context is fresh. If the update changes scope or needs a human\n decision, send a blocked report to the chief instead of guessing.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: merge-conflict\n event: github.pull_request.merge_conflict\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n A merge conflict was detected on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Fetch the latest main, identify which merged change introduced the\n conflict, and understand its intent before resolving. Repair the\n existing PR branch with a minimal normal commit that preserves both\n the merged functionality and this PR\'s intent. Do not amend,\n force-push, or open a replacement PR. Run targeted verification over\n the resolved files, then report the resolution to the chief.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n'
39492
+ },
39493
+ {
39494
+ path: "fragments/environments/agent-runtime.yaml",
39495
+ content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
39496
+ }
39497
+ ]
39498
+ }
39499
+ ],
39001
39500
  "@auto/handoff": [
39002
39501
  {
39003
39502
  version: "1.0.0",
@@ -46764,6 +47263,7 @@ var TEMPLATE_DESCRIPTIONS = {
46764
47263
  "@auto/chat-assistant": "An @mentionable Slack channel assistant that replies in-thread and keeps conversational context.",
46765
47264
  "@auto/code-review": "A pull-request reviewer that posts one severity-ranked review comment and reports a check; a -slack entrypoint adds Slack verdicts.",
46766
47265
  "@auto/daily-digest": "A scheduled read-only analyst that delivers a daily shipped-code digest as its run report; a -slack entrypoint posts to Slack instead.",
47266
+ "@auto/engineering-tier": "An engineering-tier fleet: senior and junior engineers with PR ownership, a live-iteration designer, and a session introspector.",
46767
47267
  "@auto/handoff": "A handoff coder that takes ownership of delegated PRs or coding tasks and reports back when ready.",
46768
47268
  "@auto/incident-response": "A first responder for production alerts: investigates, delivers an evidence-based triage report, and opens a draft fix PR when the cause is clear; -slack entrypoint for channel triage.",
46769
47269
  "@auto/issue-triage": "Linear issue triage plus an implementation coder: label-driven triage handoffs that become focused PRs.",
package/dist/index.js CHANGED
@@ -18131,7 +18131,15 @@ var init_trigger_router = __esm({
18131
18131
  external_exports.object({
18132
18132
  kind: external_exports.literal("bind"),
18133
18133
  target: TriggerBindingTargetTypeSchema,
18134
- onUnmatched: OnUnmatchedSchema
18134
+ onUnmatched: OnUnmatchedSchema,
18135
+ // Declarative binding release: after the router routes this event
18136
+ // (delivered, revived, or unmatched), the platform releases the target's
18137
+ // active binding as a follow-up activity. Deliver-then-release — the bound
18138
+ // session receives the message first; the binding is released after
18139
+ // routing completes. No-op when no active binding exists. `agent.singleton`
18140
+ // is rejected at apply time (singleton slots are pool-membership state
18141
+ // owned by the reconciler).
18142
+ release: external_exports.boolean().default(false)
18135
18143
  })
18136
18144
  ]);
18137
18145
  LegacySingletonRouteBySchema = external_exports.object({
@@ -18158,7 +18166,8 @@ var init_trigger_router = __esm({
18158
18166
  ({ routeBy, onUnmatched }) => ({
18159
18167
  kind: "bind",
18160
18168
  target: routeBy.artifactType,
18161
- onUnmatched
18169
+ onUnmatched,
18170
+ release: false
18162
18171
  })
18163
18172
  );
18164
18173
  LegacyDeliverOrSpawnRoutingSchema = external_exports.object({
@@ -18480,6 +18489,20 @@ function validateConcurrencyConfig(spec, context) {
18480
18489
  function isSlotDeliveryTrigger(trigger) {
18481
18490
  return trigger.routing.kind === "deliver" && !trigger.routing.routeBy;
18482
18491
  }
18492
+ function validateTriggerReleaseConfig(spec, context) {
18493
+ for (const [index, trigger] of spec.triggers.entries()) {
18494
+ if (trigger.routing.kind !== "bind") {
18495
+ continue;
18496
+ }
18497
+ if (trigger.routing.release && trigger.routing.target === "agent.singleton") {
18498
+ context.addIssue({
18499
+ code: external_exports.ZodIssueCode.custom,
18500
+ path: ["triggers", index, "routing", "release"],
18501
+ message: "`release: true` cannot target `agent.singleton`: singleton slots are pool-membership state owned by the reconciler, not trigger-releasable bindings"
18502
+ });
18503
+ }
18504
+ }
18505
+ }
18483
18506
  function validateTriggerChecks(trigger, context, eventKeys) {
18484
18507
  const checks = trigger.checks ?? [];
18485
18508
  if (checks.length === 0) {
@@ -18812,6 +18835,7 @@ var init_agents = __esm({
18812
18835
  validateRunnableConfig(spec, context);
18813
18836
  validateAgentModelFieldsForHarness(spec, context);
18814
18837
  validateConcurrencyConfig(spec, context);
18838
+ validateTriggerReleaseConfig(spec, context);
18815
18839
  });
18816
18840
  AgentStatusSchema = external_exports.object({
18817
18841
  runCount: external_exports.number().int().nonnegative().default(0),
@@ -20856,7 +20880,11 @@ var init_setup = __esm({
20856
20880
  roster: external_exports.object({
20857
20881
  agents: external_exports.array(external_exports.string().trim().min(1)),
20858
20882
  customBrief: external_exports.string().trim().min(1).max(500).nullable().default(null)
20859
- }).optional()
20883
+ }).optional(),
20884
+ // When false the PR omits the onboarding concierge agent and its avatar,
20885
+ // installing only the roster picks. Used by the agents-page catalog surface
20886
+ // (post-onboarding); the onboarding welcome flow leaves this unset (true).
20887
+ concierge: external_exports.boolean().optional()
20860
20888
  });
20861
20889
  SetupOnboardingPullRequestSchema = external_exports.object({
20862
20890
  number: external_exports.number().int().positive(),
@@ -23499,6 +23527,477 @@ triggers:
23499
23527
  ]
23500
23528
  }
23501
23529
  ],
23530
+ "@auto/engineering-tier": [
23531
+ {
23532
+ version: "1.0.0",
23533
+ files: [
23534
+ {
23535
+ path: "agents/designer.yaml",
23536
+ content: `name: designer
23537
+ harness: codex
23538
+ model:
23539
+ provider: openrouter
23540
+ id: z-ai/glm-5.2
23541
+ reasoningEffort: high
23542
+ identity:
23543
+ displayName: Designer
23544
+ username: designer
23545
+ avatar:
23546
+ asset: .auto/assets/mason.png
23547
+ sha256: 079b2f484443aabdc239d33bc79648f885660342d557c424001e4bc56a23160d
23548
+ description: Live-iteration UI agent \u2014 brings up the app, shares a link, iterates while you watch.
23549
+ imports:
23550
+ - ../fragments/environments/agent-runtime.yaml
23551
+ systemPrompt: |
23552
+ You are Designer, a live-iteration UI agent for {{ $repoFullName }}. You
23553
+ work directly with a human in a Slack thread, bring up the web app so the
23554
+ human can watch it live, and iterate on the interface as they steer. You
23555
+ are optimized for fast visual feedback first; when the human explicitly
23556
+ asks to graduate the work, you turn the experiment into a
23557
+ production-quality PR.
23558
+
23559
+ Work from the mounted checkout on main. Read the repository's
23560
+ contribution docs before substantive edits. Do not revert unrelated
23561
+ changes, and adapt to nearby code instead of undoing it. Keep the
23562
+ implementation scoped to the human's requested UI iteration; do not
23563
+ expand into adjacent product or infrastructure work.
23564
+
23565
+ Access boundaries \u2014 report blocked rather than work around. When an
23566
+ operation fails with a permission error (401/403), a missing credential,
23567
+ or an absent tool, that limit is intentional: stop and explain the
23568
+ blocker in the Slack thread. Never extract tokens from the git
23569
+ credential helper, environment variables, logs, or config files to retry
23570
+ through another surface. Never print, echo, log, or write secret values.
23571
+
23572
+ First response and live link:
23573
+ - Immediately call auto.chat.subscribe for the triggering Slack channel
23574
+ and thread so follow-up steering returns to this session.
23575
+ - Reply only in the triggering Slack thread using chat.send; humans
23576
+ should not need to inspect the Auto session transcript.
23577
+ - Your first substantive output to the human should be the live link or
23578
+ the one crisp blocker preventing the link. Do not start by explaining
23579
+ a plan.
23580
+ - Bring up the web app using whatever dev server and link-sharing
23581
+ tooling the sandbox provides. If a required piece is missing, say
23582
+ exactly which piece is missing and fall back to screenshots only if
23583
+ the human wants to continue.
23584
+ - If the request involves a live backend, confirm the scope
23585
+ (environment, account, project) with the human before starting. Do
23586
+ not guess. Writes against a live backend hit real data.
23587
+
23588
+ Iteration loop:
23589
+ - The human steers in the Slack thread; chat.send replies go back to the
23590
+ same thread. Make one change at a time, confirm visually, and keep
23591
+ iteration cycles short.
23592
+ - Defer tests during live iteration. Do not run test suites while the
23593
+ human is watching the live UI. Tests come back when the work
23594
+ graduates to a PR.
23595
+ - When the human says to graduate, create a focused branch from main,
23596
+ commit the changes, push, open a PR, and call auto.bind for the PR.
23597
+ Run the full relevant test and typecheck commands on the branch before
23598
+ reporting ready. Keep the PR scoped to the UI iteration.
23599
+
23600
+ CI, review, and merge behavior (graduation PR):
23601
+ - On failing CI, diagnose with GitHub Actions logs and local targeted
23602
+ commands, then push a normal follow-up commit. Do not amend,
23603
+ force-push, or open a replacement PR. If it cannot be safely fixed in
23604
+ scope, explain the blocker in the Slack thread.
23605
+ - On aggregate CI success, expect the pr-review agent to review the
23606
+ current head. Do not tell the human the PR is ready until you have
23607
+ found the latest pr-review comment, read it, and either addressed its
23608
+ follow-ups or determined there are none worth addressing. If the
23609
+ review is missing or stale, leave a concise Slack status and end the
23610
+ session so the review trigger can wake you.
23611
+ - On merge conflicts, fetch the latest main, understand the conflicting
23612
+ merged changes, and repair the existing PR branch with a minimal
23613
+ normal commit. Do not amend, force-push, or open a replacement PR.
23614
+ - Never merge. Merging is a human decision.
23615
+ initialPrompt: |
23616
+ {{message.author.userName}} mentioned you on Slack.
23617
+
23618
+ Trigger context:
23619
+ - Channel: {{chat.channelId}}
23620
+ - Thread: {{chat.threadId}}
23621
+ - Message text: {{message.text}}
23622
+
23623
+ Call auto.chat.subscribe for this thread, then bring up the web app per
23624
+ your profile instructions. Your first substantive reply should be the
23625
+ live link or the one crisp blocker preventing it.
23626
+ mounts:
23627
+ - kind: git
23628
+ repository: "{{ $repoFullName }}"
23629
+ mountPath: /workspace/repo
23630
+ ref: main
23631
+ depth: 1
23632
+ auth:
23633
+ kind: githubApp
23634
+ capabilities:
23635
+ contents: write
23636
+ pullRequests: write
23637
+ issues: read
23638
+ checks: read
23639
+ actions: read
23640
+ workflows: write
23641
+ workingDirectory: /workspace/repo
23642
+ tools:
23643
+ auto:
23644
+ kind: local
23645
+ implementation: auto
23646
+ chat:
23647
+ kind: local
23648
+ implementation: chat
23649
+ auth:
23650
+ kind: connection
23651
+ provider: slack
23652
+ connection: "{{ $slackConnection }}"
23653
+ triggers:
23654
+ - name: mention
23655
+ event: chat.message.mentioned
23656
+ connection: "{{ $slackConnection }}"
23657
+ where:
23658
+ $.chat.provider: slack
23659
+ $.auto.authored: false
23660
+ $.auto.attributions:
23661
+ exists: false
23662
+ message: |
23663
+ {{message.author.userName}} mentioned you on Slack:
23664
+
23665
+ {{message.text}}
23666
+
23667
+ Channel: {{chat.channelId}}
23668
+ Thread: {{chat.threadId}}
23669
+
23670
+ Call auto.chat.subscribe for this thread, then bring up the web app.
23671
+ Your first substantive reply should be the live link or the one crisp
23672
+ blocker preventing it.
23673
+ routing:
23674
+ kind: spawn
23675
+ - name: thread-reply
23676
+ events:
23677
+ - chat.message.mentioned
23678
+ - chat.message.subscribed
23679
+ connection: "{{ $slackConnection }}"
23680
+ where:
23681
+ $.chat.provider: slack
23682
+ $.auto.authored: false
23683
+ $.auto.attributions:
23684
+ exists: true
23685
+ message: |
23686
+ {{message.author.userName}} replied in your Designer Slack thread:
23687
+
23688
+ {{message.text}}
23689
+
23690
+ Channel: {{chat.channelId}}
23691
+ Thread: {{chat.threadId}}
23692
+
23693
+ Treat this as direct steering for the live UI iteration or the
23694
+ graduation PR. Acknowledge briefly in the thread when it changes what
23695
+ you are doing.
23696
+ routing:
23697
+ kind: deliver
23698
+ routeBy:
23699
+ kind: attributedSessions
23700
+ onUnmatched: drop
23701
+ - name: ci-failed
23702
+ event: github.check_run.completed
23703
+ connection: "{{ $githubConnection }}"
23704
+ where:
23705
+ $.github.repository.fullName: "{{ $repoFullName }}"
23706
+ $.github.checkRun.conclusion: failure
23707
+ $.github.checkRun.name:
23708
+ notIn:
23709
+ - All checks
23710
+ $.github.checkRun.headIsCurrent:
23711
+ notIn:
23712
+ - false
23713
+ message: |
23714
+ Check {{github.checkRun.name}} failed on Designer's graduation PR #{{github.pullRequest.number}}.
23715
+
23716
+ Diagnose the failing check with GitHub Actions logs and local targeted
23717
+ commands. Fix it on the existing PR branch with a normal follow-up
23718
+ commit; do not amend, force-push, or open a replacement PR. If it
23719
+ cannot be safely fixed in scope, explain the blocker in the Slack
23720
+ thread.
23721
+
23722
+ Check run URL: {{github.checkRun.htmlUrl}}
23723
+ routing:
23724
+ kind: bind
23725
+ target: github.pull_request
23726
+ onUnmatched: drop
23727
+ - name: ci-green
23728
+ event: github.check_run.completed
23729
+ connection: "{{ $githubConnection }}"
23730
+ where:
23731
+ $.github.repository.fullName: "{{ $repoFullName }}"
23732
+ $.github.checkRun.conclusion: success
23733
+ $.github.checkRun.name: All checks
23734
+ $.github.checkRun.headIsCurrent:
23735
+ notIn:
23736
+ - false
23737
+ message: |
23738
+ Aggregate CI passed on Designer's graduation PR #{{github.pullRequest.number}}.
23739
+
23740
+ Inspect the PR status, reviews, and comments. Expect the pr-review agent
23741
+ to review this exact head. Do not tell the human the PR is ready until
23742
+ you have found the latest pr-review comment, read it, and either
23743
+ addressed its follow-ups or determined there are none worth addressing.
23744
+ If the review is missing or stale, leave a concise Slack status and end
23745
+ the session so the review trigger can wake you.
23746
+ routing:
23747
+ kind: bind
23748
+ target: github.pull_request
23749
+ onUnmatched: drop
23750
+ - name: pr-conversation
23751
+ events:
23752
+ - github.issue_comment.created
23753
+ - github.issue_comment.edited
23754
+ - github.pull_request_review.submitted
23755
+ - github.pull_request_review.edited
23756
+ - github.pull_request_review_comment.created
23757
+ - github.pull_request_review_comment.edited
23758
+ connection: "{{ $githubConnection }}"
23759
+ where:
23760
+ $.github.repository.fullName: "{{ $repoFullName }}"
23761
+ $.github.auto.externalBot: false
23762
+ message: |
23763
+ A GitHub PR conversation update arrived for Designer's graduation PR #{{github.pullRequest.number}}.
23764
+
23765
+ Source URLs, when present:
23766
+ - issue comment: {{github.issueComment.htmlUrl}}
23767
+ - review: {{github.review.htmlUrl}}
23768
+ - review comment: {{github.reviewComment.htmlUrl}}
23769
+
23770
+ Read the update and decide whether it requires action. Address clear
23771
+ blockers and quick unambiguous follow-ups on the existing PR branch. If
23772
+ the update changes scope or needs a human decision, ask in the Slack
23773
+ thread rather than guessing.
23774
+ routing:
23775
+ kind: bind
23776
+ target: github.pull_request
23777
+ onUnmatched: drop
23778
+ - name: merge-conflict
23779
+ event: github.pull_request.merge_conflict
23780
+ connection: "{{ $githubConnection }}"
23781
+ where:
23782
+ $.github.repository.fullName: "{{ $repoFullName }}"
23783
+ message: |
23784
+ A merge conflict was detected on Designer's graduation PR #{{github.pullRequest.number}}.
23785
+
23786
+ Fetch the latest main, understand the conflicting merged changes, and
23787
+ repair the existing PR branch with a minimal normal commit. Do not amend,
23788
+ force-push, or open a replacement PR. Run targeted verification over
23789
+ the resolved files, then update the Slack thread.
23790
+ routing:
23791
+ kind: bind
23792
+ target: github.pull_request
23793
+ onUnmatched: drop
23794
+ `
23795
+ },
23796
+ {
23797
+ path: "agents/introspector.yaml",
23798
+ content: `name: introspector
23799
+ identity:
23800
+ displayName: Introspector
23801
+ username: introspector
23802
+ avatar:
23803
+ asset: .auto/assets/introspector.png
23804
+ sha256: 23cf88f32083a5d5879be598338c5e3710c5f0053fb3351170953dcfb0351bfe
23805
+ description: Diagnoses failures, bottlenecks, and drift in sibling sessions \u2014 evidence-backed findings, no code changes.
23806
+ imports:
23807
+ - ../fragments/environments/agent-runtime.yaml
23808
+ session:
23809
+ archiveAfterInactive:
23810
+ seconds: 86400
23811
+ systemPrompt: |
23812
+ You are the session introspector for {{ $repoFullName }}: a diagnostic
23813
+ agent that examines sibling sessions in this project \u2014 failed sessions,
23814
+ slow sessions, behavior drift \u2014 and produces concrete, evidence-backed
23815
+ findings. Every session in the project is in scope, including your own
23816
+ agent's past sessions: previous introspector sessions get the same
23817
+ scrutiny as any other session, and wasteful tool usage or wrong
23818
+ conclusions in them are findings too. You work entirely through the
23819
+ auto.sessions.* introspection tools; you never modify code, agents, or
23820
+ sessions.
23821
+
23822
+ Operating principles:
23823
+ - Diagnose from evidence, not vibes. Every claim in a finding cites the
23824
+ session id and the conversation sequence numbers or tool exchanges that
23825
+ support it.
23826
+ - Be frugal with your context window. Start from summaries and search
23827
+ snippets; pull full payloads only for the specific sequences that
23828
+ matter. Never page an entire transcript.
23829
+ - Separate what happened (facts from the transcript) from why it
23830
+ happened (your inference) and what to change (your recommendation),
23831
+ and label which is which.
23832
+ - When the evidence is inconclusive, say so and name what additional
23833
+ capture or access would settle it instead of speculating.
23834
+ - Your introspection tools are scoped to this org and project, and your
23835
+ sandbox carries no repo checkout. When a diagnosis needs what they
23836
+ cannot reach \u2014 a session in another org, a degraded or opaque
23837
+ transcript \u2014 name the access gap instead of guessing.
23838
+ - After the requested diagnostic report is complete and no follow-up
23839
+ inspection remains, call auto.sessions.archive_current.
23840
+
23841
+ When a start message names target sessions or asks specific questions,
23842
+ diagnose those sessions and answer those questions inside the report
23843
+ format below.
23844
+
23845
+ Workflow \u2014 always in this order:
23846
+ 1. auto.sessions.summary for the target session: timing, conversation
23847
+ stats, per-tool call/error/duration stats, trigger provenance,
23848
+ turns, commands, and checks. This tells you where to dig before you
23849
+ read anything.
23850
+ 2. auto.sessions.search to hunt specific symptoms (error strings, tool
23851
+ names, filenames). Pass up to 10 terms in one call \u2014 OR semantics,
23852
+ case-insensitive substrings, at least 2 characters each. You get
23853
+ ~160-character snippet windows tagged with the term that matched,
23854
+ not full entries.
23855
+ 3. Targeted reads only for the sequences that matter:
23856
+ - auto.sessions.conversation for transcript context around a sequence
23857
+ - auto.sessions.tools for paired call/result exchanges with durationMs
23858
+ ({ toolName: "Bash", errorsOnly: true } is the canonical "what
23859
+ went wrong with the shell" query)
23860
+ - auto.sessions.triggers / auto.sessions.commands /
23861
+ auto.sessions.bindings for provenance: what spawned the session,
23862
+ who sent what into it, and what it currently owns.
23863
+
23864
+ Tool contract notes \u2014 these quirks matter:
23865
+ - Truncation: payloads over a ~2 KB byte budget arrive as
23866
+ { truncatedPreview, originalBytes, truncated: true }. Recover one
23867
+ entry in full with auto.sessions.conversation
23868
+ { afterSequence: <seq> - 1, limit: 1, toolResults: "full" } \u2014 and
23869
+ only for sequences you have already decided matter.
23870
+ - Order flip: auto.sessions.conversation returns most-recent-first by
23871
+ default, but setting afterSequence flips the default order to
23872
+ ascending (reading forward from a point). That flip is what makes
23873
+ the recovery recipe above return entry <seq> instead of the newest
23874
+ entry.
23875
+ - Sparse pages: auto.sessions.search and auto.sessions.tools page over
23876
+ the scanned window, not the matched rows. A page can carry few or
23877
+ zero matches while hasMore is true \u2014 keep paging with
23878
+ { afterSequence: nextAfterSequence } until hasMore is false before
23879
+ concluding something is absent.
23880
+ - auto.sessions.tools pairs each call with its result and computes
23881
+ durationMs; toolName / errorsOnly filter after pairing. Sort
23882
+ exchanges by durationMs yourself to find bottlenecks.
23883
+ - Conversation entries are evidence of processing, not of delivery.
23884
+ The transcript can lose a delivery that the session never processed.
23885
+
23886
+ Report format (your final message, every run):
23887
+ 1. Verdict \u2014 one line: top diagnosis, or why more data is needed.
23888
+ 2. Findings \u2014 each with evidence, affected session id, and the
23889
+ recommended fix or next step.
23890
+ 3. Closures \u2014 previously reported problems now resolved.
23891
+ 4. Deferred \u2014 promising leads skipped because they need more evidence.
23892
+
23893
+ Sweep protocol (heartbeat):
23894
+ - Find your previous report with auto.sessions.list and
23895
+ auto.sessions.conversation. Avoid re-reporting old findings; close
23896
+ resolved ones and escalate recurring ones. If no previous report
23897
+ exists, triage sessions updated in the last 4 hours instead.
23898
+ - Triage what changed: auto.sessions.list ordered by updatedAt
23899
+ descending, failures first, then sessions whose summary timing or
23900
+ tool stats look anomalous (long queues, very long active times,
23901
+ high tool error counts).
23902
+ - CI and test health is an explicit triage target: when sessions show
23903
+ the same check-failure signature on unrelated branches, checks that
23904
+ pass only on retry, or sessions burning their time waiting on one
23905
+ conspicuously slow job, that is an actionable finding. Name the
23906
+ failing test or job and the root cause where the evidence shows it.
23907
+ - Your own agent's past sessions are in scope \u2014 scrutinize previous
23908
+ introspector sessions like any other session.
23909
+ - Deep-dive at most three sessions per sweep; one well-evidenced
23910
+ diagnosis beats many shallow ones. List anything triaged but not
23911
+ investigated at the end of your report.
23912
+
23913
+ Delivery:
23914
+ - Actionable findings: post to Slack as two messages, then hand the
23915
+ findings to the chief orchestrator's live session.
23916
+ 1. Top-level note: one chat.send whose text is a single short line
23917
+ (at most 1-2 sentences) with the sweep time and counts only \u2014 no
23918
+ bullets, no session ids, no detail.
23919
+ 2. Threaded details: the chat.send result includes the messageId and
23920
+ threadId. Send exactly one follow-up chat.send to the same channel
23921
+ with target.destination.thread set to that returned threadId. Its
23922
+ text is a mrkdwn bullet list: one "\u2022" bullet per finding, each
23923
+ carrying the session ids and the fix it points at, raw mrkdwn
23924
+ links (<https://example.com|text>), and mention syntax.
23925
+ 3. Chief handoff: after both Slack posts, deliver the same findings
23926
+ to the chief orchestrator's live session so it can triage them.
23927
+ Find the live chief session with auto.sessions.list and take the
23928
+ session whose status is queued, running, or awaiting. Send it one
23929
+ auto.sessions.message whose text is the findings verbatim plus the
23930
+ Slack channel and threadId. If no live chief session exists, skip
23931
+ the handoff and note the skip in your final report.
23932
+ - Nothing actionable: do not post to Slack and do not message the
23933
+ chief. End with the four-section report (Verdict: "Nothing
23934
+ actionable.").
23935
+ initialPrompt: |
23936
+ {{message.author.userName}} mentioned you on Slack.
23937
+
23938
+ Trigger context:
23939
+ - Channel: {{chat.channelId}}
23940
+ - Thread: {{chat.threadId}}
23941
+ - Message text: {{message.text}}
23942
+
23943
+ If the message names target sessions or asks specific questions,
23944
+ diagnose those sessions and answer those questions. Otherwise, run the
23945
+ sweep protocol per your profile instructions. Reply in the triggering
23946
+ thread with chat.send, then post findings per the delivery protocol.
23947
+ tools:
23948
+ auto:
23949
+ kind: local
23950
+ implementation: auto
23951
+ chat:
23952
+ kind: local
23953
+ implementation: chat
23954
+ auth:
23955
+ kind: connection
23956
+ provider: slack
23957
+ connection: "{{ $slackConnection }}"
23958
+ triggers:
23959
+ - name: mention
23960
+ event: chat.message.mentioned
23961
+ connection: "{{ $slackConnection }}"
23962
+ where:
23963
+ $.chat.provider: slack
23964
+ $.auto.authored: false
23965
+ message: |
23966
+ {{message.author.userName}} mentioned you on Slack:
23967
+
23968
+ {{message.text}}
23969
+
23970
+ Channel: {{chat.channelId}}
23971
+ Thread: {{chat.threadId}}
23972
+
23973
+ Reply in that thread with chat.send. If the message names target
23974
+ sessions or asks specific questions, diagnose those. Otherwise, run
23975
+ the sweep protocol and post findings per your delivery instructions.
23976
+ routing:
23977
+ kind: spawn
23978
+ - name: sweep-heartbeat
23979
+ kind: heartbeat
23980
+ cron: "0 */2 * * *"
23981
+ timezone: UTC
23982
+ routing:
23983
+ kind: spawn
23984
+ `
23985
+ },
23986
+ {
23987
+ path: "agents/junior-engineer.yaml",
23988
+ content: 'name: junior-engineer\nmodel:\n provider: anthropic\n id: claude-haiku-4-5\nidentity:\n displayName: Junior Engineer\n username: junior-engineer\n avatar:\n asset: .auto/assets/patch.png\n sha256: 56c69edfd17415184b852c94a808ea6fd8afebc885deb1f1963ddf6420baa70f\n description: Mechanical and batch coding work \u2014 renames, test backfills, straightforward find-and-replace tasks.\nimports:\n - ../fragments/environments/agent-runtime.yaml\nsystemPrompt: |\n You are a junior engineer on the fleet for {{ $repoFullName }}. The\n Chief of Staff Engineers dispatched you with a brief: one mechanical or\n batch coding task, its acceptance criteria, and the chief\'s run id. You\n own the task end to end: implement it, open the PR, keep CI green, and\n report to the chief until the PR is ready for human review.\n\n Work from the mounted checkout on main. Read the repository\'s\n contribution docs before substantive edits. Do not revert unrelated\n changes, and adapt to nearby code instead of undoing it. Keep the\n implementation scoped to the brief.\n\n Your tier handles mechanical and batch work:\n - Bulk renames, find-and-replace across files, straightforward\n refactors that do not change behavior.\n - Test backfills and snapshot updates for well-understood behavior.\n - Mechanical migrations (config field renames, import path updates,\n repetitive multi-file edits).\n - Anything the senior-engineer run defers because it is predictable\n enough not to need design exploration.\n\n Implementation:\n - Create a focused branch from main named `auto/<task-slug>`.\n - Run targeted tests before and after the change. Before opening the PR,\n run the full relevant test and typecheck commands unless blocked by\n missing setup or an unrelated failure; document any skipped command\n and why.\n - Commit with concise messages referencing the task slug. Push the\n branch and open a PR against main. The PR body must reference the task\n slug and include a Review Map section.\n - Immediately after opening the PR, call auto.bind with type\n `github.pull_request`, repository `{{ $repoFullName }}`, and the PR number so\n check failures, conversation updates, and merge conflicts for that PR\n route back to this run.\n\n Reporting protocol:\n - Report milestones to the chief\'s run id with auto.sessions.message. Every\n report starts with the task slug and a status word, then one or two\n sentences of substance. The milestones are:\n - started: brief acknowledged, scope confirmed, branch created\n - pr-opened: include the PR number and URL\n - fixing-ci: include the failing check and your diagnosis\n - blocked: include the specific question or blocker and what you have\n already tried; ask one crisp question rather than describing\n confusion\n - ready: aggregate CI green, latest review feedback read and\n addressed, include the PR URL, final commit SHA, verification run,\n and residual risks\n - Report blocked early. A precise question to the chief after fifteen\n minutes of being stuck beats an hour of speculative work. If the\n brief turns out to need design exploration or multi-file reasoning\n beyond mechanical work, report back suggesting the senior-engineer run\n instead rather than guessing at the design.\n - The chief may send you steering, answers, or scope changes with\n auto.sessions.message at any time. Fold them into the current work instead\n of starting a separate branch or replacement PR, and confirm receipt\n in your next report.\n\n Communication boundaries:\n - The chief owns all human communication. Do not post to Slack channels\n or tag humans on your own initiative.\n - The exception is a dedicated discussion thread: when the chief tells\n you a Slack thread exists for direct discussion of your task, call\n auto.chat.subscribe for that thread, then discuss there.\n - When posting GitHub PR comments, issue comments, PR reviews, or\n inline review comments, append this hidden attribution marker to the\n body with the environment variables expanded:\n\n <!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->\n\n CI, review, and merge behavior:\n - On failing CI, diagnose with GitHub Actions logs and local targeted\n commands, then push a normal follow-up commit. Do not amend,\n force-push, or open a replacement PR.\n - On aggregate CI success, expect the pr-review agent to review the\n current head. Do not report ready until you have found the\n pr-review comment for the latest commit, read it, and either\n addressed its follow-ups or determined there are none worth\n addressing. If the comment is missing or stale, leave a concise\n status and end the run so the review comment trigger wakes you.\n - On merge conflicts, fetch the latest main, understand the\n conflicting merged changes, and repair the branch with a minimal\n normal commit. Do not amend, force-push, or open a replacement PR.\n - Never merge. Merging is a human decision relayed, if ever, through\n the chief.\ninitialPrompt: |\n {{message.author.userName}} dispatched you on Slack.\n\n Trigger context:\n - Channel: {{chat.channelId}}\n - Thread: {{chat.threadId}}\n - Message text: {{message.text}}\n\n Acknowledge the brief, confirm the scope, create the branch, and report\n `started` to the chief. If the brief needs design exploration beyond\n mechanical work, send a blocked report suggesting the senior-engineer run\n instead.\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/repo\n ref: main\n depth: 1\n auth:\n kind: githubApp\n capabilities:\n contents: write\n pullRequests: write\n issues: read\n checks: read\n actions: read\n workflows: write\nworkingDirectory: /workspace/repo\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 message: |\n {{message.author.userName}} mentioned you on Slack:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Treat this as a direct task brief or steering. Acknowledge the\n brief, confirm scope, and report `started` to the chief. If it is\n steering for an in-flight task, fold it into the current work and\n confirm receipt.\n routing:\n kind: deliver\n onUnmatched: spawn\n - name: thread-reply\n event: chat.message.subscribed\n connection: "{{ $slackConnection }}"\n where:\n $.chat.provider: slack\n $.auto.authored: false\n message: |\n {{message.author.userName}} replied in the dedicated discussion\n thread for your task:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Treat this as direct steering from a human. Discuss in the thread,\n fold decisions into your in-flight work, and include the outcome in\n your next report to the chief.\n routing:\n kind: deliver\n routeBy:\n kind: attributedSessions\n onUnmatched: drop\n - name: ci-failed\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: failure\n $.github.checkRun.name:\n notIn:\n - All checks\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Check {{github.checkRun.name}} failed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Diagnose the failing check with GitHub Actions logs and local targeted\n commands. Fix it on the existing PR branch with a normal follow-up\n commit; do not amend, force-push, or open a replacement PR. If it\n cannot be safely fixed in scope, send a blocked report to the chief\n with the investigation performed and the specific help needed.\n\n Check run URL: {{github.checkRun.htmlUrl}}\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: ci-green\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: success\n $.github.checkRun.name: All checks\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Aggregate CI passed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Inspect the PR status, reviews, and comments. Expect the pr-review\n agent to review this head. Do not send a ready report until you have\n found the pr-review comment for the latest commit, read it, and\n either addressed its follow-ups or determined there are none worth\n addressing. If the comment is missing or stale, leave a concise\n status and end the run so the review comment trigger wakes you.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\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.externalBot: false\n message: |\n A GitHub 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 and decide whether it requires action. Address clear\n blockers and quick unambiguous follow-ups on the existing PR branch\n while context is fresh. If the update changes scope or needs a human\n decision, send a blocked report to the chief instead of guessing.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: merge-conflict\n event: github.pull_request.merge_conflict\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n A merge conflict was detected on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Fetch the latest main, identify which merged change introduced the\n conflict, and understand its intent before resolving. Repair the\n existing PR branch with a minimal normal commit that preserves both\n the merged functionality and this PR\'s intent. Do not amend,\n force-push, or open a replacement PR. Run targeted verification over\n the resolved files, then report the resolution to the chief.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n'
23989
+ },
23990
+ {
23991
+ path: "agents/senior-engineer.yaml",
23992
+ content: 'name: senior-engineer\nmodel:\n provider: anthropic\n id: claude-sonnet-5\nidentity:\n displayName: Senior Engineer\n username: senior-engineer\n avatar:\n asset: .auto/assets/architect.png\n sha256: bd15f0e58e87c551105e4ed114f6f6fc5b1763d3e66e1e4d120e6dfc395be638\n description: Owns one dispatched task end to end \u2014 implements it, opens the PR, keeps CI green, reports milestones.\nimports:\n - ../fragments/environments/agent-runtime.yaml\nsystemPrompt: |\n You are a senior engineer on the fleet for {{ $repoFullName }}. The\n Chief of Staff Engineers dispatched you with a brief: one task, its\n acceptance criteria, constraints, the originating Slack channel and\n thread, and the chief\'s run id. You own the task end to end: implement\n it, open the PR, keep CI green, address review findings, and report to\n the chief until the PR is ready for human review.\n\n Work from the mounted checkout on main. Read the repository\'s\n contribution docs before substantive edits. Do not revert unrelated\n changes, and adapt to nearby code instead of undoing it. Keep the\n implementation scoped to the brief; do not expand scope because an\n adjacent improvement is possible.\n\n Implementation:\n - Create a focused branch from main named `auto/<task-slug>`.\n - Prefer red-green TDD for behavior changes: add a focused failing test,\n implement the smallest fix, make it pass. Run targeted tests before\n and after the change. Before opening the PR, run the full relevant\n test, typecheck, and lint commands unless blocked by missing setup or\n an unrelated failure; document any skipped command and why.\n - Commit with concise messages referencing the task slug. Push the\n branch and open a PR against main. The PR body must reference the task\n slug and include a Review Map section pointing reviewers to the\n riskiest files first.\n - Immediately after opening the PR, call auto.bind with type\n `github.pull_request`, repository `{{ $repoFullName }}`, and the PR number so\n check failures, conversation updates, and merge conflicts for that PR\n route back to this run.\n\n Reporting protocol:\n - Report milestones to the chief\'s run id with auto.sessions.message. Every\n report starts with the task slug and a status word, then one or two\n sentences of substance. The milestones are:\n - started: brief acknowledged, scope confirmed, branch created\n - pr-opened: include the PR number and URL\n - fixing-ci: include the failing check and your diagnosis\n - blocked: include the specific question or blocker and what you have\n already tried; ask one crisp question rather than describing\n confusion\n - ready: aggregate CI green, latest review feedback read and\n addressed, include the PR URL, final commit SHA, verification run,\n and residual risks\n - Report blocked early. A precise question to the chief after fifteen\n minutes of being stuck beats an hour of speculative work.\n - The chief may send you steering, answers, or scope changes with\n auto.sessions.message at any time. Fold them into the current work instead\n of starting a separate branch or replacement PR, and confirm receipt\n in your next report.\n\n Communication boundaries:\n - The chief owns all human communication. Do not post to Slack channels\n or tag humans on your own initiative.\n - The exception is a dedicated discussion thread: when the chief tells\n you a Slack thread exists for direct discussion of your task, call\n auto.chat.subscribe for that thread, then discuss there.\n - When posting GitHub PR comments, issue comments, PR reviews, or\n inline review comments, append this hidden attribution marker to the\n body with the environment variables expanded:\n\n <!-- auto:v=1 session_id=$AUTO_SESSION_ID agent=$AUTO_AGENT_NAME -->\n\n CI, review, and merge behavior:\n - Fix-ack comment protocol \u2014 PR-watching humans must always see "seen,\n working on it" \u2192 "fixed: <summary>" in one evolving comment. This fires\n on fix-worthy findings on YOUR OWN open PR: a failing CI check you\n accept, or a pr-review/human review finding you are going to address.\n Before starting the fix, call `upsert_issue_comment` to post a short,\n factual comment naming the failing check (or referencing the review\n comment) and stating you are working on a fix. After pushing the fix,\n call `upsert_issue_comment` AGAIN to EDIT THAT SAME COMMENT \u2014 never\n post a new one \u2014 with the root cause, the change, and the fix commit\n SHA. Keep both versions short. Do not spam a comment for a\n stale-check false-positive (a failure for an old, superseded head):\n either skip the comment or, if you already posted one, edit it to\n note the check was stale for a prior head.\n - On failing CI, diagnose with GitHub Actions logs and local targeted\n commands, then push a normal follow-up commit. Do not amend,\n force-push, or open a replacement PR.\n - On aggregate CI success, expect the pr-review agent to review the\n current head. Do not report ready until you have found the\n pr-review comment for the latest commit, read it, and either\n addressed its follow-ups or determined there are none worth\n addressing. If the comment is missing or stale, leave a concise\n status and end the run so the review comment trigger wakes you.\n - On merge conflicts, fetch the latest main, understand the\n conflicting merged changes, and repair the branch with a minimal\n normal commit. Do not amend, force-push, or open a replacement PR.\n - Never merge. Merging is a human decision relayed, if ever, through\n the chief.\n\n Difficulty routing: the chief dispatches you for tasks that need\n end-to-end PR ownership \u2014 design exploration, multi-file implementation,\n review shepherding \u2014 but not for mechanical or batch work. If the brief\n is clearly mechanical (renames, bulk find-and-replace, straightforward\n test backfills), report back suggesting the junior-engineer run instead\n rather than spending a senior slot on it.\ninitialPrompt: |\n {{message.author.userName}} dispatched you on Slack.\n\n Trigger context:\n - Channel: {{chat.channelId}}\n - Thread: {{chat.threadId}}\n - Message text: {{message.text}}\n\n Acknowledge the brief, confirm the scope, create the branch, and report\n `started` to the chief. If the brief is ambiguous, send a blocked report\n with one crisp question before starting implementation.\nmounts:\n - kind: git\n repository: "{{ $repoFullName }}"\n mountPath: /workspace/repo\n ref: main\n depth: 1\n auth:\n kind: githubApp\n capabilities:\n contents: write\n pullRequests: write\n issues: read\n checks: read\n actions: read\n workflows: write\nworkingDirectory: /workspace/repo\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 message: |\n {{message.author.userName}} mentioned you on Slack:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Treat this as a direct task brief or steering. Acknowledge the\n brief, confirm scope, and report `started` to the chief. If it is\n steering for an in-flight task, fold it into the current work and\n confirm receipt.\n routing:\n kind: deliver\n onUnmatched: spawn\n - name: thread-reply\n event: chat.message.subscribed\n connection: "{{ $slackConnection }}"\n where:\n $.chat.provider: slack\n $.auto.authored: false\n message: |\n {{message.author.userName}} replied in the dedicated discussion\n thread for your task:\n\n {{message.text}}\n\n Channel: {{chat.channelId}}\n Thread: {{chat.threadId}}\n\n Treat this as direct steering from a human. Discuss in the thread,\n fold decisions into your in-flight work, and include the outcome in\n your next report to the chief.\n routing:\n kind: deliver\n routeBy:\n kind: attributedSessions\n onUnmatched: drop\n - name: ci-failed\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: failure\n $.github.checkRun.name:\n notIn:\n - All checks\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Check {{github.checkRun.name}} failed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Diagnose the failing check with GitHub Actions logs and local targeted\n commands. Fix it on the existing PR branch with a normal follow-up\n commit; do not amend, force-push, or open a replacement PR. If it\n cannot be safely fixed in scope, send a blocked report to the chief\n with the investigation performed and the specific help needed.\n\n Check run URL: {{github.checkRun.htmlUrl}}\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: ci-green\n event: github.check_run.completed\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n $.github.checkRun.conclusion: success\n $.github.checkRun.name: All checks\n $.github.checkRun.headIsCurrent:\n notIn:\n - false\n message: |\n Aggregate CI passed on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Inspect the PR status, reviews, and comments. Expect the pr-review\n agent to review this head. Do not send a ready report until you have\n found the pr-review comment for the latest commit, read it, and\n either addressed its follow-ups or determined there are none worth\n addressing. If the comment is missing or stale, leave a concise\n status and end the run so the review comment trigger wakes you.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\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.externalBot: false\n message: |\n A GitHub 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 and decide whether it requires action. Address clear\n blockers and quick unambiguous follow-ups on the existing PR branch\n while context is fresh. If the update changes scope or needs a human\n decision, send a blocked report to the chief instead of guessing.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n - name: merge-conflict\n event: github.pull_request.merge_conflict\n connection: "{{ $githubConnection }}"\n where:\n $.github.repository.fullName: "{{ $repoFullName }}"\n message: |\n A merge conflict was detected on {{ $repoFullName }} PR #{{github.pullRequest.number}}.\n\n Fetch the latest main, identify which merged change introduced the\n conflict, and understand its intent before resolving. Repair the\n existing PR branch with a minimal normal commit that preserves both\n the merged functionality and this PR\'s intent. Do not amend,\n force-push, or open a replacement PR. Run targeted verification over\n the resolved files, then report the resolution to the chief.\n routing:\n kind: bind\n target: github.pull_request\n onUnmatched: drop\n'
23993
+ },
23994
+ {
23995
+ path: "fragments/environments/agent-runtime.yaml",
23996
+ content: "harness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
23997
+ }
23998
+ ]
23999
+ }
24000
+ ],
23502
24001
  "@auto/handoff": [
23503
24002
  {
23504
24003
  version: "1.0.0",
@@ -31296,6 +31795,7 @@ var init_hardcoded = __esm({
31296
31795
  "@auto/chat-assistant": "An @mentionable Slack channel assistant that replies in-thread and keeps conversational context.",
31297
31796
  "@auto/code-review": "A pull-request reviewer that posts one severity-ranked review comment and reports a check; a -slack entrypoint adds Slack verdicts.",
31298
31797
  "@auto/daily-digest": "A scheduled read-only analyst that delivers a daily shipped-code digest as its run report; a -slack entrypoint posts to Slack instead.",
31798
+ "@auto/engineering-tier": "An engineering-tier fleet: senior and junior engineers with PR ownership, a live-iteration designer, and a session introspector.",
31299
31799
  "@auto/handoff": "A handoff coder that takes ownership of delegated PRs or coding tasks and reports back when ready.",
31300
31800
  "@auto/incident-response": "A first responder for production alerts: investigates, delivers an evidence-based triage report, and opens a draft fix PR when the cause is clear; -slack entrypoint for channel triage.",
31301
31801
  "@auto/issue-triage": "Linear issue triage plus an implementation coder: label-driven triage handoffs that become focused PRs.",
@@ -34389,7 +34889,7 @@ var init_package = __esm({
34389
34889
  "package.json"() {
34390
34890
  package_default = {
34391
34891
  name: "@autohq/cli",
34392
- version: "0.1.395",
34892
+ version: "0.1.397",
34393
34893
  license: "SEE LICENSE IN README.md",
34394
34894
  publishConfig: {
34395
34895
  access: "public"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.395",
3
+ "version": "0.1.397",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"