@autohq/cli 0.1.173 → 0.1.175

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.
@@ -21149,6 +21149,10 @@ var ConnectionsToolAuthSchema = external_exports.object({
21149
21149
  kind: external_exports.literal("connections"),
21150
21150
  connections: external_exports.array(ProviderConnectionReferenceSchema).min(1)
21151
21151
  });
21152
+ var ConnectionBackedToolSchema = ProviderConnectionReferenceSchema.extend({
21153
+ kind: external_exports.literal("connection"),
21154
+ description: external_exports.string().trim().min(1).optional()
21155
+ });
21152
21156
  var ToolAliasSchema = ResourceNameSchema.refine(
21153
21157
  (value2) => value2 !== "workspace",
21154
21158
  {
@@ -21227,6 +21231,7 @@ var GithubToolSchema = external_exports.object({
21227
21231
  });
21228
21232
  var ToolSpecSchema = external_exports.discriminatedUnion("kind", [
21229
21233
  RemoteMcpToolSchema,
21234
+ ConnectionBackedToolSchema,
21230
21235
  LocalToolSchema
21231
21236
  ]);
21232
21237
  var AgentToolConnectRequestSchema = external_exports.object({
@@ -21246,11 +21251,18 @@ var AgentToolConnectRequestSchema = external_exports.object({
21246
21251
  var AgentToolConnectResponseSchema = external_exports.discriminatedUnion("status", [
21247
21252
  external_exports.object({
21248
21253
  status: external_exports.literal("authorization_required"),
21249
- agent: ResourceNameSchema,
21254
+ agent: ResourceNameSchema.optional(),
21250
21255
  tool: ResourceNameSchema,
21251
21256
  connection: ResourceNameSchema,
21252
21257
  authorizationUrl: external_exports.string().trim().url(),
21253
21258
  message: external_exports.string().trim().min(1)
21259
+ }),
21260
+ external_exports.object({
21261
+ status: external_exports.literal("connected"),
21262
+ agent: ResourceNameSchema.optional(),
21263
+ tool: ResourceNameSchema,
21264
+ connection: ResourceNameSchema,
21265
+ message: external_exports.string().trim().min(1)
21254
21266
  })
21255
21267
  ]);
21256
21268
  var AgentToolConnectCompleteResponseSchema = external_exports.object({
@@ -21263,6 +21275,10 @@ var AgentToolConnectCompleteResponseSchema = external_exports.object({
21263
21275
  var InlineAgentToolSchema = RemoteMcpToolSchema.extend({
21264
21276
  disabled: external_exports.boolean().optional()
21265
21277
  }).or(
21278
+ ConnectionBackedToolSchema.extend({
21279
+ disabled: external_exports.boolean().optional()
21280
+ })
21281
+ ).or(
21266
21282
  LocalToolSchema.and(
21267
21283
  external_exports.object({
21268
21284
  disabled: external_exports.boolean().optional()
@@ -22378,7 +22394,7 @@ var SessionRecordSchema = external_exports.object({
22378
22394
  external_exports.object({
22379
22395
  source: external_exports.literal("inline"),
22380
22396
  alias: ToolAliasSchema,
22381
- spec: RemoteMcpToolSchema.or(LocalToolSchema).or(GithubToolSchema)
22397
+ spec: RemoteMcpToolSchema.or(ConnectionBackedToolSchema).or(LocalToolSchema).or(GithubToolSchema)
22382
22398
  })
22383
22399
  ),
22384
22400
  input: JsonValueSchema2,
@@ -26556,7 +26572,7 @@ Object.assign(lookup, {
26556
26572
  // package.json
26557
26573
  var package_default = {
26558
26574
  name: "@autohq/cli",
26559
- version: "0.1.173",
26575
+ version: "0.1.175",
26560
26576
  license: "SEE LICENSE IN README.md",
26561
26577
  publishConfig: {
26562
26578
  access: "public"
package/dist/index.js CHANGED
@@ -17766,7 +17766,7 @@ function remoteMcpToolSchema(input) {
17766
17766
  ]).default({ kind: "none" })
17767
17767
  });
17768
17768
  }
17769
- var REMOTE_MCP_TRANSPORTS, LOCAL_TOOL_IMPLEMENTATIONS, SecretReferenceSchema, NoToolAuthSchema, McpOAuthToolAuthSchema, ConnectionToolAuthSchema, ConnectionsToolAuthSchema, ToolAliasSchema, RemoteMcpToolSchema, LocalAutoToolSchema, LocalPingToolSchema, LocalChatToolSchema, LocalToolSchema, GithubToolSchema, ToolSpecSchema, AgentToolConnectRequestSchema, AgentToolConnectResponseSchema, AgentToolConnectCompleteResponseSchema, InlineAgentToolSchema, AgentToolRefSchema, AgentToolsSchema;
17769
+ var REMOTE_MCP_TRANSPORTS, LOCAL_TOOL_IMPLEMENTATIONS, SecretReferenceSchema, NoToolAuthSchema, McpOAuthToolAuthSchema, ConnectionToolAuthSchema, ConnectionsToolAuthSchema, ConnectionBackedToolSchema, ToolAliasSchema, RemoteMcpToolSchema, LocalAutoToolSchema, LocalPingToolSchema, LocalChatToolSchema, LocalToolSchema, GithubToolSchema, ToolSpecSchema, AgentToolConnectRequestSchema, AgentToolConnectResponseSchema, AgentToolConnectCompleteResponseSchema, InlineAgentToolSchema, AgentToolRefSchema, AgentToolsSchema;
17770
17770
  var init_tools = __esm({
17771
17771
  "../../packages/schemas/src/tools.ts"() {
17772
17772
  "use strict";
@@ -17794,6 +17794,10 @@ var init_tools = __esm({
17794
17794
  kind: external_exports.literal("connections"),
17795
17795
  connections: external_exports.array(ProviderConnectionReferenceSchema).min(1)
17796
17796
  });
17797
+ ConnectionBackedToolSchema = ProviderConnectionReferenceSchema.extend({
17798
+ kind: external_exports.literal("connection"),
17799
+ description: external_exports.string().trim().min(1).optional()
17800
+ });
17797
17801
  ToolAliasSchema = ResourceNameSchema.refine(
17798
17802
  (value) => value !== "workspace",
17799
17803
  {
@@ -17836,6 +17840,7 @@ var init_tools = __esm({
17836
17840
  });
17837
17841
  ToolSpecSchema = external_exports.discriminatedUnion("kind", [
17838
17842
  RemoteMcpToolSchema,
17843
+ ConnectionBackedToolSchema,
17839
17844
  LocalToolSchema
17840
17845
  ]);
17841
17846
  AgentToolConnectRequestSchema = external_exports.object({
@@ -17855,11 +17860,18 @@ var init_tools = __esm({
17855
17860
  AgentToolConnectResponseSchema = external_exports.discriminatedUnion("status", [
17856
17861
  external_exports.object({
17857
17862
  status: external_exports.literal("authorization_required"),
17858
- agent: ResourceNameSchema,
17863
+ agent: ResourceNameSchema.optional(),
17859
17864
  tool: ResourceNameSchema,
17860
17865
  connection: ResourceNameSchema,
17861
17866
  authorizationUrl: external_exports.string().trim().url(),
17862
17867
  message: external_exports.string().trim().min(1)
17868
+ }),
17869
+ external_exports.object({
17870
+ status: external_exports.literal("connected"),
17871
+ agent: ResourceNameSchema.optional(),
17872
+ tool: ResourceNameSchema,
17873
+ connection: ResourceNameSchema,
17874
+ message: external_exports.string().trim().min(1)
17863
17875
  })
17864
17876
  ]);
17865
17877
  AgentToolConnectCompleteResponseSchema = external_exports.object({
@@ -17872,6 +17884,10 @@ var init_tools = __esm({
17872
17884
  InlineAgentToolSchema = RemoteMcpToolSchema.extend({
17873
17885
  disabled: external_exports.boolean().optional()
17874
17886
  }).or(
17887
+ ConnectionBackedToolSchema.extend({
17888
+ disabled: external_exports.boolean().optional()
17889
+ })
17890
+ ).or(
17875
17891
  LocalToolSchema.and(
17876
17892
  external_exports.object({
17877
17893
  disabled: external_exports.boolean().optional()
@@ -19153,7 +19169,7 @@ var init_sessions = __esm({
19153
19169
  external_exports.object({
19154
19170
  source: external_exports.literal("inline"),
19155
19171
  alias: ToolAliasSchema,
19156
- spec: RemoteMcpToolSchema.or(LocalToolSchema).or(GithubToolSchema)
19172
+ spec: RemoteMcpToolSchema.or(ConnectionBackedToolSchema).or(LocalToolSchema).or(GithubToolSchema)
19157
19173
  })
19158
19174
  ),
19159
19175
  input: JsonValueSchema,
@@ -21666,7 +21682,7 @@ var init_package = __esm({
21666
21682
  "package.json"() {
21667
21683
  package_default = {
21668
21684
  name: "@autohq/cli",
21669
- version: "0.1.173",
21685
+ version: "0.1.175",
21670
21686
  license: "SEE LICENSE IN README.md",
21671
21687
  publishConfig: {
21672
21688
  access: "public"
@@ -22444,6 +22460,9 @@ async function connectAgentTool(input) {
22444
22460
  scopeContext = await scopeContextPromise;
22445
22461
  connection = result;
22446
22462
  writeConnectionStart(input.writeOutput, result);
22463
+ if (result.status === "connected") {
22464
+ return;
22465
+ }
22447
22466
  input.writeOutput("Waiting for browser authorization...");
22448
22467
  openBrowser(result.authorizationUrl);
22449
22468
  const authorized = await callback.result;
@@ -22500,7 +22519,9 @@ function writeConnectionStart(writeOutput, result) {
22500
22519
  writeOutput(
22501
22520
  `connect agent/${result.agent} tool/${result.tool} connection/${result.connection}`
22502
22521
  );
22503
- writeOutput(`authorization_url ${result.authorizationUrl}`);
22522
+ if (result.status === "authorization_required") {
22523
+ writeOutput(`authorization_url ${result.authorizationUrl}`);
22524
+ }
22504
22525
  }
22505
22526
  var init_agent_tool_connect = __esm({
22506
22527
  "src/commands/apply/agent-tool-connect.ts"() {
@@ -33818,7 +33839,7 @@ Docs and help: auto --help
33818
33839
  `;
33819
33840
 
33820
33841
  // src/commands/onboard/skill-content.generated.ts
33821
- var onboardingSkillMarkdown = "# Intent\n\nYou are onboarding a user onto auto. Achieve three goals, in roughly this order, as rapidly as the user's pace allows:\n\n1. **Educate** \u2014 teach the user what auto is and how it works, and get them genuinely excited about it.\n2. **Magic moment** \u2014 get a tailor-made, deployed, proactive workflow live that solves a _real_ problem for them, and have them witness it working end to end. This label is private steering for you: never say or write the words \"magic moment\" to the user, in chat, PRs, comments, generated files, or any other user-facing surface. Show the result; do not name this concept.\n3. **Self-sufficiency** \u2014 leave them with the building blocks (mental model, GitHub Sync, a self-improvement loop) to iterate on their auto system rapidly and safely on their own.\n\n# Background\n\n**What is auto?**\n\nauto lets you program software factories the same way you program CI/CD.\n\nCompose agents and triggers into workflows using simple YAML files. GitHub Sync automatically applies committed `.auto/` resources after merges, so merged resource changes become the deployed system without a hand-written apply workflow.\n\nYou can use auto to build simple (but effective) automations:\n\n- Ticket / feedback triage and resolution\n- Automated incident / bug response\n- Custom tailored code review agents\n\nYou can also use auto to push the frontier of agentic labor:\n\n- Organized fleets of agents on long-horizon tasks\n- Multi-agent autoresearch / optimization loops\n- Agentic BDR and outbound lead engines\n- \u221E more ideas we've yet to dream up\n\nAnything that can be described in a standard operating procedure can be translated into a \"chart\" of agents and triggers in auto \u2014 the only limit is your imagination.\n\n# Reference material\n\nThis skill ships with documentation and worked examples. Read them before you onboard anyone; cite and copy from them as you go.\n\n| Path | What it covers |\n| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| `docs/index.md` | The mental model: resources, events, triggers, sessions. Start here. |\n| `docs/resource-model.md` | The `.auto/agents` directory, inline identities/environments, imports, and `auto apply` semantics. |\n| `docs/agents-and-triggers.md` | Agents, the trigger/event/routing vocabulary, filters, and PR checks. |\n| `docs/environments-and-profiles.md` | Sandbox images, setup steps and caching, environment fragments, and durable agent prompts. |\n| `docs/tools-and-connections.md` | MCP tools, chat tools, provider connections, secrets, and the runtime tool surface agents see. |\n| `docs/cli.md` | The `auto` CLI command reference. |\n| `docs/ci-cd.md` | Historical CI/CD context; prefer GitHub Sync for apply-on-merge unless the current docs and CLI say otherwise. |\n| `examples/index.md` | Prose outline of every example \u2014 read this to know what's on the shelf. |\n| `examples/` | Complete, copyable `.auto/` directories \u2014 one per workflow archetype, each with a README explaining the moving parts. |\n\nIf these relative paths are not available (for example this playbook was printed by `auto onboard --agent` rather than installed as a skill directory), fetch the same content from the skills mirror: `npx skills add auto-dot-sh/skills`, or browse https://github.com/auto-dot-sh/skills.\n\n# Operating principles\n\nHold these throughout the onboarding:\n\n- **Trust live command output over this document.** The CLI evolves; run `auto --help` early and whenever in doubt, and when a command's real output disagrees with anything written here, trust the command output over this document and adapt.\n- **Converse, don't lecture.** Short messages, one question at a time, and adapt your vocabulary to the user's technical level. The pitch should take seconds, not paragraphs.\n- **Acknowledge before significant work.** Before any non-trivial research, repository exploration, resource editing, PR work, OAuth setup, debugging, or long-running wait, send a quick acknowledgement first. Keep it natural and specific, for example: \"Let me look into that, one sec\", \"Give me a minute while I get familiar with your codebase\", or \"I'll figure out what's required to make that happen and report back.\" Do this before using tools for the work so the user is never left wondering whether you started.\n- **Ask before changing anything outside `.auto/`.** The onboarding's write surface is the `.auto/` directory. Any other file in the user's repo gets touched only with their explicit go-ahead.\n- **Warn before browsers open, and surface the link either way.** `auto auth login`, `auto connect`, and `auto agents connect` open a browser window _and_ print the authorization URL. Give a one-sentence heads-up first (\"this will open your browser to install the GitHub App\") so it doesn't feel like something hijacked their machine. If the browser doesn't pop (some environments can't open one), don't leave the user hunting through command output \u2014 repeat the printed authorization URL back to them on its own line as a clickable fallback, one provider at a time, and tell them plainly to click it.\n- **Signal before going quiet.** Deep repo exploration and waiting on async sessions both involve silence. Say what you're about to do and roughly how long it will take.\n- **Enlist the user as the second pair of hands.** They trigger the inputs you can't (tagging a bot in Slack, commenting on a PR) and verify the outputs you can't see (a Slack message arriving). Make those asks explicit and specific.\n- **Hand off, don't hint.** When the user needs to do something, spell it out the _first_ time \u2014 before they have to ask. Name the exact trigger (which label, which channel, which command), where to click, and what they'll see when it works. \"Label the issue whenever you're ready\" assumes they can see what's in your head and the YAML you wrote; a numbered \"in Linear: create an issue \u2192 add the `auto-triage` label \u2192 that label is the trigger\" does not. If you catch yourself about to post a one-line \"go ahead and \u2026\", expand it.\n- **Set expectations once, then stay quiet.** When you start watching an async session, tell the user up front roughly how long it takes and what \"normal\" looks like (\"the coder session provisions a sandbox first \u2014 expect a quiet couple of minutes\"), then hold until something _they'd care about_ changes. Don't narrate every monitor tick or re-report the same event from a second watcher \u2014 a stream of \"still queued / still running / no news\" reads as noise, not reassurance.\n- **Expect trouble; own the troubleshooting.** OAuth flows fail, secrets get mistyped, webhooks misfire. When something breaks, diagnose it with the CLI (`auto sessions list`, `auto sessions show`, `auto sessions conversation`, `auto apply --dry-run`) rather than asking the user to debug.\n- **Validate before PRs, deploy through Sync.** Use `auto apply --dry-run` to validate `.auto/` changes and inspect the plan. Do not run a real `auto apply` during onboarding unless the user explicitly asks for a local interactive apply. The normal deployment path is PR merge followed by GitHub Sync.\n- **Stage remote MCP OAuth tools through fragments.** A remote MCP tool must exist on an applied agent resource before its OAuth flow can be started; a bare fragment is source only and is not connectable by itself. When the final agent is not ready yet, put the remote MCP tool definition in a reusable fragment under `.auto/fragments/` (for example `.auto/fragments/tools/<tool>.yaml`), import that fragment into the smallest scaffold/carrier agent that can be deployed, let GitHub Sync apply that carrier agent, then connect the tool. After the connection succeeds, import the same fragment into the full agent resource and let GitHub Sync apply again. Remove the temporary carrier agent once the real agent imports the fragment and the smoke test passes.\n- **Asynchronous means asynchronous.** Triggered sessions take time to spawn and act. Tell the user when a wait is expected, and tail session state rather than declaring failure early.\n- **Never fabricate success.** Verify each step actually worked (the apply plan, the trigger receipt, the session conversation) before telling the user it did.\n- **Celebrate real wins.** When a workflow completes end to end for the first time, mark the moment \u2014 emoji, a pun, a little flourish. This should feel fun.\n- **Never say the private milestone label.** Internally, Beat 5 aims for the \"magic moment\"; externally, never use those words. Describe the concrete thing that worked instead.\n\n# Procedure\n\nWork through the following beats in order. They are a roadmap, not a script \u2014 skip or reorder when the user's situation clearly calls for it (for example, a user who already has an account and connections can jump straight to Beat 3).\n\n## Beat 0: Learn auto\n\nBefore talking to the user, make sure you have a working command of the system: read `docs/index.md` for the mental model, skim the rest of `docs/`, and look through `examples/` to internalize what complete workflows look like. You will be drawing on the examples heavily in Beats 3-5.\n\n## Beat 1: Establish rapport\n\n**Your very first message after launching is a plain-language pitch, not a form.** Two or three sentences on what auto is and where it's valuable, then _one_ opening question. Do **not** open with `AskUserQuestion` or a multiple-choice menu \u2014 that skips the _Educate_ goal and makes the onboarding feel like a config wizard. Lead with words; reach for `AskUserQuestion` only once you're past the pitch and genuinely offering discrete choices (e.g. the hero workflow in Beat 3).\n\nAfter the pitch, shift into lightly interviewing the user. You want to learn:\n\n1. **Who they are and their professional context.**\n - Hobbyist, or evaluating auto for a real business?\n - How technical are they? Engineer, or a more managerial / operational role?\n2. **Where the work that matters most to them happens.**\n - Do they have a GitHub account / organization? Is there a repo that would make a good home for their auto system \u2014 better yet, are you running inside it right now?\n - Do they work out of Slack day-to-day, and could they install auto there?\n - What else is in their operating loop? Linear, Datadog, Sentry, PostHog, Notion, Telegram, internal webhooks, and so on.\n\nKeep this light \u2014 a few questions, not a survey. You're gathering enough signal to propose workflows that will land.\n\n## Beat 2: Get up to speed\n\nIf you are running inside a repo the user has indicated is their focus, tell them you're going to explore it for a few minutes (and that you'll go quiet while a research agent reads the repo) \u2014 then **dispatch a subagent to do the deep read in parallel** rather than reading file-by-file in the main thread. This keeps the conversation responsive and your own context clean, and it forces real exploration instead of leaning on whatever `CLAUDE.md` / `AGENTS.md` happened to load.\n\nSpawn one general-purpose / Explore subagent (or a small fan-out of them for a large monorepo) and have it read **both**:\n\n- **The repo:** what the project does, how the team works (CI, review culture, issue-tracker and chat integrations), the conventions written down in `CLAUDE.md`/`AGENTS.md`/`docs/`, and \u2014 most importantly \u2014 where the recurring, automatable toil is.\n- **This skill's `docs/` and `examples/`**, so the ideas it returns are already expressed in auto's vocabulary (agents, triggers, inline tools, and fragments) and mapped to a concrete archetype.\n\nHave the subagent return a structured shortlist: for each candidate workflow, a one-line description, the matching archetype, the trigger/event that would fire it, and the _specific evidence in this repo_ that the toil is real (a file, a workflow, a documented rule, a past incident). That shortlist is the raw material for Beat 3.\n\nWhen the agent returns, don't just move on \u2014 **surface 1-2 concrete observations to the user** (\"you renumber migrations by hand and a missed renumber caused a prod outage; your `postman/collection.json` updates are marked NOT OPTIONAL\") so they see the exploration paid off and trust that your pitches are grounded in _their_ code. If `CLAUDE.md` already told you something, say so and confirm it against the repo rather than presenting it as discovery.\n\n## Beat 3: Present some options\n\nCombine what you know about the user, their goals, and their codebase, and brainstorm at least three workflows they could deploy _today_. Anchor on the archetypes in `examples/index.md` \u2014 code review, issue triage, incident response, chat assistant, scheduled digest, an orchestrated agent fleet, a research/optimization loop, an outbound lead engine \u2014 but tailor each pitch to their actual stack and pain points (\"a review agent that enforces _your_ `docs/style.md`\", not \"a code review bot\"). The archetypes are anchors, not a menu: if the user's situation suggests a useful workflow that matches none of them, it is absolutely fair game \u2014 pitch it. Calibrate ambition to the user: the simple automations usually land a first real win fastest, while the frontier examples (fleet, research loop) make better second acts unless the user is clearly hungry for them.\n\nPresent the options as a question, one line each on what the workflow would do for them, and let them pick \u2014 including the option to propose their own idea instead. The winner becomes the hero use case.\n\n## Beat 4: Setup & smoke test\n\nGet the user from zero to a deployed, _hollow_ version of the hero workflow \u2014 a shell that proves every input and output is wired up before you invest in the real logic. In practice:\n\n1. **Install the CLI**: `npm install -g @autohq/cli` (requires Node 20+). Verify with `auto --version`.\n2. **Sign in**: `auto auth login` (heads-up: opens a browser; account creation happens there too). You're blocked on the user completing the flow either way, so wait for them \u2014 don't busy yourself with other work mid-sign-in, which only confuses things. When you're driving from a terminal with no browser, `auto auth login --device` prints a code the user enters in their browser.\n3. **Create the org and project**: `auto orgs create` / `auto projects create`. Ask the user what they want to name them \u2014 don't pick names for them.\n4. **Connect providers**: `auto connections list --available` to see what's offered, then `auto connect <provider>` for each one the workflow needs (heads-up: browser again). GitHub connects as an App installation; Slack and Linear as OAuth grants.\n5. **Scaffold `.auto/`**: create the directory in their repo and draft the minimal agent files \u2014 an agent with the workflow's prompt, inline identity, triggers, and any environment/tool fragments it imports. Copy from the matching example and strip it down. If the workflow needs a remote MCP OAuth tool before the real agent is ready, stage that tool in a fragment and import it into a minimal scaffold/carrier agent first, because only applied agents expose connectable tools.\n6. **Validate**: run `auto apply --dry-run`, show the user the plan, then open a PR. Do not apply directly; GitHub Sync deploys after merge. After the carrier agent is applied, connect any staged remote MCP OAuth tools, verify the connection, then update the full agent to import the same fragment and let GitHub Sync apply again.\n\nThen run the smoke test. Its exact shape depends on the use case, but the goal is always the same: verify that the trigger fires and the agent's output surfaces reach the user. A workflow almost always involves some communication channel, so a good smoke test \"breaks the fourth wall\" \u2014 have the hollow agent send the user a hello in Slack (or wherever they live).\n\nEnlist the user, and **hand off, don't hint** (see the operating principle): when you ask them to fire the input only they can fire, give the full, numbered steps the first time \u2014 _which_ label on _which_ issue, _which_ channel to create, the exact command to run, and what they'll see when it lands. Don't post \"go ahead and label the issue\" and assume they know a label is the trigger; that one-liner is what makes a user ask \"wait, what exactly do I do?\". Right after GitHub Sync deploys the merged PR, before you start watching, tell them in plain words what just deployed and what their next action is. Then **set expectations once** \u2014 \"the session takes a minute or two to spawn; I'll tell you when it acts\" \u2014 and watch progress yourself with `auto sessions list` and `auto attach <session-id>` (live stream; `auto sessions conversation <session-id>` for a snapshot), surfacing only meaningful changes rather than every tick. Troubleshoot until the smoke test passes.\n\nIf a channel install is blocked \u2014 for example the Slack workspace requires admin approval \u2014 don't stall the onboarding on it. Pick an output surface the user can verify without the channel (a PR comment, a GitHub check, the session transcript via `auto sessions conversation`), continue the beats, and circle back to realize the channel identity once the approval lands.\n\n## Beat 5: Build the real thing\n\nWith inputs and outputs proven, flesh the workflow out to its real form in `.auto/` \u2014 the full agent system prompt, the real initial prompt, the filters and routing that make it production-shaped. Tell the user what you're changing, validate it with `auto apply --dry-run`, update the PR, and let GitHub Sync deploy after merge.\n\nTest end to end: trigger the workflow for real, follow the run, and enlist the user again for out-of-band inputs and output verification. Iterate until you've witnessed one complete, successful run of the real workflow.\n\nThen celebrate. This is the private milestone you have been steering toward \u2014 act like it. \u{1F389}\n\n## Beat 6: Bring the user up to speed\n\nWalk the user through what you built, piece by piece: which agent files, environment fragments, inline identity, tools, and triggers you composed, how an event flows through them to become a run, and where each file lives in `.auto/`. Show short snippets from the actual files rather than describing them abstractly.\n\nThen ask: anything they want to dig into further, or shall we put the resource changes through the normal PR-and-merge path?\n\n## Beat 7: Ship through GitHub Sync\n\nMake merges to their default branch the durable deployment mechanism for their auto system. Auto's GitHub Sync applies committed `.auto/` resources after merge; do not add a GitHub Actions workflow for `auto apply` unless current product docs or the user explicitly require a legacy setup.\n\n1. Run `auto apply --dry-run` yourself before opening the PR and summarize the plan.\n2. Open a focused PR containing the `.auto/` resource changes.\n3. Ask the user to review and merge the PR when ready.\n4. After merge, verify GitHub Sync applied the resources by inspecting Auto resource/session state rather than GitHub Actions logs.\n\nWhen the merge lands and sync has applied cleanly, congratulate them \u2014 their factory now ships from committed resource changes.\n\n## Beat 8: Set up a self-improvement loop\n\nTell the user there's one last step we've found high-leverage: a workflow that watches their auto system itself \u2014 sweeping recent sessions for failures, bottlenecks, and drift, and proposing improvements. Explain that it's just another auto workflow, fully theirs to tune.\n\nIf they're in, copy `examples/self-improvement/` and tailor it to their setup (their channel, their agents, their cadence). Since GitHub Sync is now the deployment path, do **not** run `auto apply` yourself for the final change \u2014 open a PR and let them merge it. That's the new normal, and modeling it is the point.\n\n## Beat 9: Conclusion\n\nTell the user they're all set: a live workflow, GitHub Sync for their auto system, and a loop that helps it improve. Recap in two or three lines what now exists. Offer to help them build or optimize additional workflows \u2014 Beat 3's runner-up ideas are natural next candidates.\n";
33842
+ var onboardingSkillMarkdown = "# Intent\n\nYou are onboarding a user onto auto. Achieve three goals, in roughly this order, as rapidly as the user's pace allows:\n\n1. **Educate** \u2014 teach the user what auto is and how it works, and get them genuinely excited about it.\n2. **Magic moment** \u2014 get a tailor-made, deployed, proactive workflow live that solves a _real_ problem for them, and have them witness it working end to end. This label is private steering for you: never say or write the words \"magic moment\" to the user, in chat, PRs, comments, generated files, or any other user-facing surface. Show the result; do not name this concept.\n3. **Self-sufficiency** \u2014 leave them with the building blocks (mental model, GitHub Sync, a self-improvement loop) to iterate on their auto system rapidly and safely on their own.\n\n# Background\n\n**What is auto?**\n\nauto lets you program software factories the same way you program CI/CD.\n\nCompose agents and triggers into workflows using simple YAML files. GitHub Sync automatically applies committed `.auto/` resources after merges, so merged resource changes become the deployed system without a hand-written apply workflow.\n\nYou can use auto to build simple (but effective) automations:\n\n- Ticket / feedback triage and resolution\n- Automated incident / bug response\n- Custom tailored code review agents\n\nYou can also use auto to push the frontier of agentic labor:\n\n- Organized fleets of agents on long-horizon tasks\n- Multi-agent autoresearch / optimization loops\n- Agentic BDR and outbound lead engines\n- \u221E more ideas we've yet to dream up\n\nAnything that can be described in a standard operating procedure can be translated into a \"chart\" of agents and triggers in auto \u2014 the only limit is your imagination.\n\n# Reference material\n\nThis skill ships with documentation and worked examples. Read only what the current onboarding step needs; cite and copy from them as you go. Start with the mental model and examples index, then open the specific example or doc page that matches the user's chosen workflow.\n\n| Path | What it covers |\n| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| `docs/index.md` | The mental model: resources, events, triggers, sessions. Start here. |\n| `docs/resource-model.md` | The `.auto/agents` directory, inline identities/environments, imports, and `auto apply` semantics. |\n| `docs/agents-and-triggers.md` | Agents, the trigger/event/routing vocabulary, filters, and PR checks. |\n| `docs/environments-and-profiles.md` | Sandbox images, setup steps and caching, environment fragments, and durable agent prompts. |\n| `docs/tools-and-connections.md` | MCP tools, chat tools, provider connections, secrets, and the runtime tool surface agents see. |\n| `docs/cli.md` | The `auto` CLI command reference. |\n| `docs/ci-cd.md` | Historical CI/CD context; prefer GitHub Sync for apply-on-merge unless the current docs and CLI say otherwise. |\n| `examples/index.md` | Prose outline of every example \u2014 read this to know what's on the shelf. |\n| `examples/` | Complete, copyable `.auto/` directories \u2014 one per workflow archetype, each with a README explaining the moving parts. |\n\nIf these relative paths are not available (for example this playbook was printed by `auto onboard --agent` rather than installed as a skill directory), fetch the same content from the skills mirror: `npx skills add auto-dot-sh/skills`, or browse https://github.com/auto-dot-sh/skills.\n\n# Operating principles\n\nHold these throughout the onboarding:\n\n- **Trust live command output over this document.** The CLI evolves; run `auto --help` early and whenever in doubt, and when a command's real output disagrees with anything written here, trust the command output over this document and adapt.\n- **Converse, don't lecture.** Short messages, one question at a time, and adapt your vocabulary to the user's technical level. The pitch should take seconds, not paragraphs.\n- **Acknowledge before significant work.** Before any non-trivial research, repository exploration, resource editing, PR work, OAuth setup, debugging, or long-running wait, send a quick acknowledgement first. Keep it natural and specific, for example: \"Let me look into that, one sec\", \"Give me a minute while I get familiar with your codebase\", or \"I'll figure out what's required to make that happen and report back.\" Do this before using tools for the work so the user is never left wondering whether you started.\n- **Ask before changing anything outside `.auto/`.** The onboarding's write surface is the `.auto/` directory. Any other file in the user's repo gets touched only with their explicit go-ahead.\n- **Warn before browsers open, and surface the link either way.** `auto auth login`, `auto connect`, and `auto agents connect` open a browser window _and_ print the authorization URL. Give a one-sentence heads-up first (\"this will open your browser to install the GitHub App\") so it doesn't feel like something hijacked their machine. If the browser doesn't pop (some environments can't open one), don't leave the user hunting through command output \u2014 repeat the printed authorization URL back to them on its own line as a clickable fallback, one provider at a time, and tell them plainly to click it.\n- **Signal before going quiet.** Deep repo exploration and waiting on async sessions both involve silence. Say what you're about to do and roughly how long it will take.\n- **Enlist the user as the second pair of hands.** They trigger the inputs you can't (tagging a bot in Slack, commenting on a PR) and verify the outputs you can't see (a Slack message arriving). Make those asks explicit and specific.\n- **Use the routed agent handle in Slack examples.** Slack mentions route by the agent's identity, not by a generic workspace bot. When you describe how a user should trigger an agent, use the handle implied by the agent you built, such as `@auto.coder`, and not just `@auto`.\n- **Hand off, don't hint.** When the user needs to do something, spell it out the _first_ time \u2014 before they have to ask. Name the exact trigger (which label, which channel, which command), where to click, and what they'll see when it works. \"Label the issue whenever you're ready\" assumes they can see what's in your head and the YAML you wrote; a numbered \"in Linear: create an issue \u2192 add the `auto-triage` label \u2192 that label is the trigger\" does not. If you catch yourself about to post a one-line \"go ahead and \u2026\", expand it.\n- **Set expectations once, then stay quiet.** When you start watching an async session, tell the user up front roughly how long it takes and what \"normal\" looks like (\"the coder session provisions a sandbox first \u2014 expect a quiet couple of minutes\"), then hold until something _they'd care about_ changes. Don't narrate every monitor tick or re-report the same event from a second watcher \u2014 a stream of \"still queued / still running / no news\" reads as noise, not reassurance.\n- **Expect trouble; own the troubleshooting.** OAuth flows fail, secrets get mistyped, webhooks misfire. When something breaks, diagnose it with the local Auto MCP tools (`auto.sessions.*`, `auto.resources.dry_run`, `auto.agent_tools.connect`) rather than asking the user to debug.\n- **Validate before PRs, deploy through Sync.** Use `mcp__auto__auto_resources_dry_run` to validate `.auto/` changes and inspect the plan. Do not run a real apply during onboarding unless the user explicitly asks for a local interactive apply. The normal deployment path is PR merge followed by GitHub Sync.\n- **Stage remote MCP OAuth tools through fragments.** When a workflow needs a remote MCP OAuth tool such as Notion, Datadog, or Vercel, create the tool first as a reusable source fragment under `.auto/fragments/tools/<tool>.yaml`. Dry-run that fragment as source if you need to validate its YAML; do not import it into the full agent yet. After the fragment PR merges, connect the tool from that fragment source. The connect tool reports whether the fragment is already backed by a live connection; if not, it returns the authorization URL. Only after the connection succeeds should you import the same fragment into the real agent. Full agents that import an `mcp_oauth` tool must still validate against an existing connected tool.\n- **Asynchronous means asynchronous.** Triggered sessions take time to spawn and act. Tell the user when a wait is expected, and tail session state rather than declaring failure early.\n- **Never fabricate success.** Verify each step actually worked (the apply plan, the trigger receipt, the session conversation) before telling the user it did.\n- **Celebrate real wins.** When a workflow completes end to end for the first time, mark the moment \u2014 emoji, a pun, a little flourish. This should feel fun.\n- **Never say the private milestone label.** Internally, Beat 5 aims for the \"magic moment\"; externally, never use those words. Describe the concrete thing that worked instead.\n\n# Procedure\n\nWork through the following beats in order. They are a roadmap, not a script \u2014 skip or reorder when the user's situation clearly calls for it (for example, a user who already has an account and connections can jump straight to Beat 3).\n\n## Beat 0: Learn auto\n\nBefore deeper setup work, make sure you have a working command of the system without disappearing into a docs crawl. Read `docs/index.md` for the mental model and `examples/index.md` to know the available archetypes. Do **not** skim every doc or every example up front. When the user chooses a workflow, open the matching example README and only the supporting docs you need for that workflow (for example `docs/tools-and-connections.md` when adding a tool).\n\n## Beat 1: Establish rapport\n\n**Your very first message after launching is a plain-language pitch, not a form.** Two or three sentences on what auto is and where it's valuable, then _one_ opening question. Do **not** open with `AskUserQuestion` or a multiple-choice menu \u2014 that skips the _Educate_ goal and makes the onboarding feel like a config wizard. Lead with words; reach for `AskUserQuestion` only once you're past the pitch and genuinely offering discrete choices (e.g. the hero workflow in Beat 3).\n\nAfter the pitch, shift into lightly interviewing the user. You want to learn:\n\n1. **Who they are and their professional context.**\n - Hobbyist, or evaluating auto for a real business?\n - How technical are they? Engineer, or a more managerial / operational role?\n2. **Where the work that matters most to them happens.**\n - Do they have a GitHub account / organization? Is there a repo that would make a good home for their auto system \u2014 better yet, are you running inside it right now?\n - Do they work out of Slack day-to-day, and could they install auto there?\n - What else is in their operating loop? Linear, Datadog, Sentry, PostHog, Notion, Telegram, internal webhooks, and so on.\n\nKeep this light \u2014 a few questions, not a survey. You're gathering enough signal to propose workflows that will land.\n\n## Beat 2: Get up to speed\n\nIf you are running inside a repo the user has indicated is their focus, tell them you're going to explore it for a few minutes (and that you'll go quiet while a research agent reads the repo) \u2014 then **dispatch a subagent to do the deep read in parallel** rather than reading file-by-file in the main thread. This keeps the conversation responsive and your own context clean, and it forces real exploration instead of leaning on whatever `CLAUDE.md` / `AGENTS.md` happened to load.\n\nSpawn one general-purpose / Explore subagent (or a small fan-out of them for a large monorepo) and have it read **both**:\n\n- **The repo:** what the project does, how the team works (CI, review culture, issue-tracker and chat integrations), the conventions written down in `CLAUDE.md`/`AGENTS.md`/`docs/`, and \u2014 most importantly \u2014 where the recurring, automatable toil is.\n- **This skill's `docs/` and `examples/`**, so the ideas it returns are already expressed in auto's vocabulary (agents, triggers, inline tools, and fragments) and mapped to a concrete archetype.\n\nHave the subagent return a structured shortlist: for each candidate workflow, a one-line description, the matching archetype, the trigger/event that would fire it, and the _specific evidence in this repo_ that the toil is real (a file, a workflow, a documented rule, a past incident). That shortlist is the raw material for Beat 3.\n\nWhen the agent returns, don't just move on \u2014 **surface 1-2 concrete observations to the user** (\"you renumber migrations by hand and a missed renumber caused a prod outage; your `postman/collection.json` updates are marked NOT OPTIONAL\") so they see the exploration paid off and trust that your pitches are grounded in _their_ code. If `CLAUDE.md` already told you something, say so and confirm it against the repo rather than presenting it as discovery.\n\n## Beat 3: Present some options\n\nCombine what you know about the user, their goals, and their codebase, and brainstorm at least three workflows they could deploy _today_. Anchor on the archetypes in `examples/index.md` \u2014 code review, issue triage, incident response, chat assistant, scheduled digest, an orchestrated agent fleet, a research/optimization loop, an outbound lead engine \u2014 but tailor each pitch to their actual stack and pain points (\"a review agent that enforces _your_ `docs/style.md`\", not \"a code review bot\"). The archetypes are anchors, not a menu: if the user's situation suggests a useful workflow that matches none of them, it is absolutely fair game \u2014 pitch it. Calibrate ambition to the user: the simple automations usually land a first real win fastest, while the frontier examples (fleet, research loop) make better second acts unless the user is clearly hungry for them.\n\nPresent the options as a question, one line each on what the workflow would do for them, and let them pick \u2014 including the option to propose their own idea instead. The winner becomes the hero use case.\n\n## Beat 4: Setup & smoke test\n\nGet the user from zero to a deployed, _hollow_ version of the hero workflow \u2014 a shell that proves every input and output is wired up before you invest in the real logic. In practice:\n\n1. **Install the CLI**: `npm install -g @autohq/cli` (requires Node 20+). Verify with `auto --version`.\n2. **Sign in**: `auto auth login` (heads-up: opens a browser; account creation happens there too). You're blocked on the user completing the flow either way, so wait for them \u2014 don't busy yourself with other work mid-sign-in, which only confuses things. When you're driving from a terminal with no browser, `auto auth login --device` prints a code the user enters in their browser.\n3. **Create the org and project**: `auto orgs create` / `auto projects create`. Ask the user what they want to name them \u2014 don't pick names for them.\n4. **Connect providers**: `auto connections list --available` to see what's offered, then `auto connect <provider>` for each one the workflow needs (heads-up: browser again). GitHub connects as an App installation; Slack and Linear as OAuth grants.\n5. **Scaffold `.auto/`**: create the directory in their repo and draft the minimal agent files \u2014 an agent with the workflow's prompt, inline identity, triggers, and any environment/tool fragments it imports. Copy from the matching example and strip it down. If the workflow needs a remote MCP OAuth tool, split setup into phases: first add only `.auto/fragments/tools/<tool>.yaml` and validate the fragment as source; after that lands, connect the tool from the fragment source; after OAuth succeeds, import the fragment into the real agent. For Slack-triggered workflows, make the agent's `identity.username` match the handle you tell the user to mention, for example `@auto.coder`.\n6. **Validate**: call `mcp__auto__auto_resources_dry_run` with the resource objects or source files you drafted, show the user the plan, then open a PR. Do not apply directly; GitHub Sync deploys after merge. After a staged tool fragment lands, connect it from the fragment source and verify that the connect tool reports a live connection, then update the full agent to import the same fragment and let GitHub Sync apply again.\n\nThen run the smoke test. Its exact shape depends on the use case, but the goal is always the same: verify that the trigger fires and the agent's output surfaces reach the user. A workflow almost always involves some communication channel, so a good smoke test \"breaks the fourth wall\" \u2014 have the hollow agent send the user a hello in Slack (or wherever they live).\n\nEnlist the user, and **hand off, don't hint** (see the operating principle): when you ask them to fire the input only they can fire, give the full, numbered steps the first time \u2014 _which_ label on _which_ issue, _which_ channel to create, the exact command to run, and what they'll see when it lands. Don't post \"go ahead and label the issue\" and assume they know a label is the trigger; that one-liner is what makes a user ask \"wait, what exactly do I do?\". Right after GitHub Sync deploys the merged PR, before you start watching, tell them in plain words what just deployed and what their next action is. Then **set expectations once** \u2014 \"the session takes a minute or two to spawn; I'll tell you when it acts\" \u2014 and watch progress yourself with `auto sessions list` and `auto attach <session-id>` (live stream; `auto sessions conversation <session-id>` for a snapshot), surfacing only meaningful changes rather than every tick. Troubleshoot until the smoke test passes.\n\nIf a channel install is blocked \u2014 for example the Slack workspace requires admin approval \u2014 don't stall the onboarding on it. Pick an output surface the user can verify without the channel (a PR comment, a GitHub check, the session transcript via `auto sessions conversation`), continue the beats, and circle back to realize the channel identity once the approval lands.\n\n## Beat 5: Build the real thing\n\nWith inputs and outputs proven, flesh the workflow out to its real form in `.auto/` \u2014 the full agent system prompt, the real initial prompt, the filters and routing that make it production-shaped. Tell the user what you're changing, validate it with `mcp__auto__auto_resources_dry_run`, update the PR, and let GitHub Sync deploy after merge.\n\nTest end to end: trigger the workflow for real, follow the run, and enlist the user again for out-of-band inputs and output verification. Iterate until you've witnessed one complete, successful run of the real workflow.\n\nThen celebrate. This is the private milestone you have been steering toward \u2014 act like it. \u{1F389}\n\n## Beat 6: Bring the user up to speed\n\nWalk the user through what you built, piece by piece: which agent files, environment fragments, inline identity, tools, and triggers you composed, how an event flows through them to become a run, and where each file lives in `.auto/`. Show short snippets from the actual files rather than describing them abstractly.\n\nThen ask: anything they want to dig into further, or shall we put the resource changes through the normal PR-and-merge path?\n\n## Beat 7: Ship through GitHub Sync\n\nMake merges to their default branch the durable deployment mechanism for their auto system. Auto's GitHub Sync applies committed `.auto/` resources after merge; do not add a GitHub Actions workflow for `auto apply` unless current product docs or the user explicitly require a legacy setup.\n\n1. Run `mcp__auto__auto_resources_dry_run` before opening the PR and summarize the plan.\n2. Open a focused PR containing the `.auto/` resource changes.\n3. Ask the user to review and merge the PR when ready.\n4. After merge, verify GitHub Sync applied the resources by inspecting Auto resource/session state rather than GitHub Actions logs.\n\nWhen the merge lands and sync has applied cleanly, congratulate them \u2014 their factory now ships from committed resource changes.\n\n## Beat 8: Set up a self-improvement loop\n\nTell the user there's one last step we've found high-leverage: a workflow that watches their auto system itself \u2014 sweeping recent sessions for failures, bottlenecks, and drift, and proposing improvements. Explain that it's just another auto workflow, fully theirs to tune.\n\nIf they're in, copy `examples/self-improvement/` and tailor it to their setup (their channel, their agents, their cadence). Since GitHub Sync is now the deployment path, do **not** run `auto apply` yourself for the final change \u2014 open a PR and let them merge it. That's the new normal, and modeling it is the point.\n\n## Beat 9: Conclusion\n\nTell the user they're all set: a live workflow, GitHub Sync for their auto system, and a loop that helps it improve. Recap in two or three lines what now exists. Offer to help them build or optimize additional workflows \u2014 Beat 3's runner-up ideas are natural next candidates.\n";
33822
33843
 
33823
33844
  // src/commands/onboard/commands.ts
33824
33845
  function registerOnboardCommands(program, context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.173",
3
+ "version": "0.1.175",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"