@rallycry/conveyor-agent 11.1.13 → 11.1.15

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.
@@ -37,7 +37,7 @@ import {
37
37
  workbenchEnabled
38
38
  } from "./chunk-KMB3BU4S.js";
39
39
 
40
- // ../shared/dist/chunk-3AWZOROM.js
40
+ // ../shared/dist/chunk-JZBZKZDQ.js
41
41
  import { z } from "zod";
42
42
  import { z as z2 } from "zod";
43
43
  import { z as z3 } from "zod";
@@ -48,7 +48,7 @@ var DEFAULT_HAIKU_MODEL = "claude-haiku-5-5";
48
48
  var FABLE_MODEL = "claude-fable-5-2";
49
49
  var PREVIOUS_SONNET_MODEL = "claude-sonnet-5";
50
50
  var PREVIOUS_OPUS_MODEL = "claude-opus-5";
51
- var MODEL_PROVIDERS = ["anthropic", "zen", "typesafe"];
51
+ var MODEL_PROVIDERS = ["anthropic", "openai", "zen", "typesafe"];
52
52
  function formatModelId(provider, model) {
53
53
  return `${provider}/${model}`;
54
54
  }
@@ -2004,7 +2004,9 @@ var CreateProjectDriveFolderRequestSchema = z7.object({
2004
2004
  var StartProjectBuildRequestSchema = z7.object({
2005
2005
  projectId: z7.string(),
2006
2006
  taskId: z7.string(),
2007
- requestingUserId: z7.string().optional()
2007
+ requestingUserId: z7.string().optional(),
2008
+ /** Start a Planning card as Plan + Build (agentMode "auto"). */
2009
+ planAndBuild: z7.boolean().optional()
2008
2010
  });
2009
2011
  var StopProjectBuildRequestSchema = z7.object({
2010
2012
  projectId: z7.string(),
@@ -2283,6 +2285,15 @@ var PostChannelMessageRequestSchema = z11.object({
2283
2285
  /** Reply inside a thread rather than to the channel. */
2284
2286
  threadTs: z11.string().max(100).optional()
2285
2287
  });
2288
+ var ChannelFileIdSchema = z11.string().min(1).max(100).regex(/^[A-Za-z0-9._-]+$/);
2289
+ var GetChannelFileRequestSchema = z11.object({
2290
+ projectId: ChannelFileIdSchema,
2291
+ channelId: ChannelFileIdSchema,
2292
+ messageId: ChannelFileIdSchema,
2293
+ fileId: ChannelFileIdSchema,
2294
+ /** The thread the message lives in, as the read reported it. */
2295
+ threadTs: ChannelFileIdSchema.optional()
2296
+ });
2286
2297
  var GET_ANALYTICS_SUMMARY_MAX_RANGE_DAYS = 90;
2287
2298
  var GetProjectAnalyticsSummaryRequestSchema = z11.object({
2288
2299
  projectId: z11.string(),
@@ -2503,6 +2514,42 @@ var CRITICAL_AUTOMATED_SOURCES = /* @__PURE__ */ new Set([
2503
2514
  ]);
2504
2515
  var CODEX_REASONING_EFFORTS = ["low", "medium", "high", "xhigh", "max"];
2505
2516
  var DEFAULT_CODEX_CODING_MODEL = "gpt-6.1-terra";
2517
+ var SOL = "gpt-6.1-sol";
2518
+ var ASTRA = "gpt-6-astra";
2519
+ var CODEX_CATALOG = [
2520
+ {
2521
+ id: ASTRA,
2522
+ label: "GPT-6 Astra",
2523
+ description: "For complex planning, coding, and research",
2524
+ inputPrice: 10,
2525
+ outputPrice: 50,
2526
+ efforts: CODEX_REASONING_EFFORTS
2527
+ },
2528
+ {
2529
+ id: SOL,
2530
+ label: "GPT-6.1 Sol",
2531
+ description: "For complex coding and review at a lower cost",
2532
+ inputPrice: 2,
2533
+ outputPrice: 10,
2534
+ efforts: CODEX_REASONING_EFFORTS
2535
+ },
2536
+ {
2537
+ id: DEFAULT_CODEX_CODING_MODEL,
2538
+ label: "GPT-6.1 Terra",
2539
+ description: "For visual reasoning, computer use, and writing",
2540
+ inputPrice: 1,
2541
+ outputPrice: 5,
2542
+ efforts: CODEX_REASONING_EFFORTS
2543
+ },
2544
+ {
2545
+ id: "gpt-6-luna",
2546
+ label: "GPT-6 Luna",
2547
+ description: "For small, well-defined changes",
2548
+ inputPrice: 0.1,
2549
+ outputPrice: 0.5,
2550
+ efforts: CODEX_REASONING_EFFORTS
2551
+ }
2552
+ ];
2506
2553
  function isCodexReasoningEffort(value) {
2507
2554
  return typeof value === "string" && CODEX_REASONING_EFFORTS.includes(value);
2508
2555
  }
@@ -3089,6 +3136,17 @@ var ANTHROPIC_CATALOG = [
3089
3136
  anthropicEntry(DEFAULT_HAIKU_MODEL, "Haiku 5.5", 0.1, 0.5),
3090
3137
  anthropicEntry(FABLE_MODEL, "Fable 5.2", 8, 40)
3091
3138
  ];
3139
+ var OPENAI_CATALOG = CODEX_CATALOG.map((option) => ({
3140
+ provider: "openai",
3141
+ model: option.id,
3142
+ id: formatModelId("openai", option.id),
3143
+ label: option.label,
3144
+ format: "openai-responses",
3145
+ inputPrice: option.inputPrice / 1e6,
3146
+ outputPrice: option.outputPrice / 1e6,
3147
+ supportsTools: true,
3148
+ supportsEffort: true
3149
+ }));
3092
3150
  var HUMAN_PROSE_WRITING_STYLE = `## Writing style for humans
3093
3151
  When you write prose a person will read \u2014 chat messages, plan updates, PR titles and bodies, review comments \u2014 follow these rules (based on ASD-STE100 Simplified Technical English):
3094
3152
  - Use active voice. Say who does what ("The API rejects the request", not "the request is rejected").
@@ -5619,6 +5677,18 @@ var agentSettingsSchema = schemaOf()(
5619
5677
  var agentSummarySchema2 = schemaOf()(
5620
5678
  z30.object({ id: z30.string(), name: z30.string(), image: z30.string().nullable() })
5621
5679
  );
5680
+ var channelFileUnavailableReasonSchema = schemaOf()(
5681
+ z30.enum(["external", "canvas", "deleted", "hidden", "too_large", "no_access"])
5682
+ );
5683
+ var channelFileDTOSchema = schemaOf()(
5684
+ z30.object({
5685
+ fileId: z30.string(),
5686
+ name: z30.string(),
5687
+ mimeType: z30.string().nullable(),
5688
+ sizeBytes: z30.number().nullable(),
5689
+ unavailable: channelFileUnavailableReasonSchema.optional()
5690
+ })
5691
+ );
5622
5692
  var channelMessageDTOSchema = schemaOf()(
5623
5693
  z30.object({
5624
5694
  id: z30.string(),
@@ -5629,7 +5699,9 @@ var channelMessageDTOSchema = schemaOf()(
5629
5699
  ts: z30.string(),
5630
5700
  createdAt: z30.string(),
5631
5701
  threadTs: z30.string().optional(),
5632
- replyCount: z30.number().optional()
5702
+ replyToId: z30.string().optional(),
5703
+ replyCount: z30.number().optional(),
5704
+ files: z30.array(channelFileDTOSchema).optional()
5633
5705
  })
5634
5706
  );
5635
5707
  var repoCreationErrorCodeSchema = schemaOf()(
@@ -5668,6 +5740,15 @@ var forgeConfigDTOSchema = schemaOf()(
5668
5740
  repositoryUrl: z30.string().optional()
5669
5741
  })
5670
5742
  );
5743
+ var getChannelFileResponseSchema = schemaOf()(
5744
+ z30.object({
5745
+ channelId: z30.string(),
5746
+ provider: z30.enum(["slack", "discord"]),
5747
+ messageId: z30.string(),
5748
+ file: channelFileDTOSchema,
5749
+ agentDownloadUrl: z30.string()
5750
+ })
5751
+ );
5671
5752
  var integrationsOverviewDTOSchema = schemaOf()(
5672
5753
  z30.object({
5673
5754
  repository: z30.enum(["github", "forgejo"]).nullable(),
@@ -5681,7 +5762,12 @@ var integrationsOverviewDTOSchema = schemaOf()(
5681
5762
  cloudflare: z30.boolean(),
5682
5763
  ops: z30.boolean(),
5683
5764
  incidents: z30.boolean(),
5684
- providerKeys: z30.object({ anthropic: z30.boolean(), zen: z30.boolean(), typesafe: z30.boolean() })
5765
+ providerKeys: z30.object({
5766
+ anthropic: z30.boolean(),
5767
+ openai: z30.boolean(),
5768
+ zen: z30.boolean(),
5769
+ typesafe: z30.boolean()
5770
+ })
5685
5771
  })
5686
5772
  );
5687
5773
  var keyRotationStrategySchema = schemaOf()(z30.enum(["lowest", "random", "tokenmax"]));
@@ -9142,6 +9228,7 @@ var editProjectMeetingChecklistItemResponseSchema = schemaOf()(meetingChecklistI
9142
9228
  var endReviewSessionResponseSchema = schemaOf()(z63.object({ sessionId: z63.string(), ended: z63.boolean(), endedAt: z63.string() }));
9143
9229
  var evaluateQuestionsResponseSchema2 = schemaOf()(evaluateQuestionsResponseSchema);
9144
9230
  var getActiveAuditSessionsResponseSchema = schemaOf()(activeAuditSessionsSchema);
9231
+ var getChannelFileResponseSchema2 = schemaOf()(getChannelFileResponseSchema);
9145
9232
  var getConnectionContextResponseSchema = schemaOf()(connectionContextDTOSchema);
9146
9233
  var getMeetingResponseSchema = schemaOf()(meetingForAgentSchema);
9147
9234
  var getProjectAnalyticsSummaryResponseSchema = schemaOf()(gaAnalyticsSummaryDTOSchema);
@@ -10185,7 +10272,12 @@ var agentSessionContract = defineContract("agentSessionService", {
10185
10272
  readChannelMessages: query({
10186
10273
  input: ReadChannelMessagesRequestSchema,
10187
10274
  output: standard(readChannelMessagesResponseSchema2),
10188
- describe: "Reads recent messages, newest first, from a readable registered work channel or one of its threads, for a card's agent and the conveyor-mcp server. Messages are fetched live and never stored."
10275
+ describe: "Reads recent messages, newest first, from a readable registered work channel or one of its threads, for a card's agent and the conveyor-mcp server. Each message lists its attached files. Messages are fetched live and never stored."
10276
+ }),
10277
+ getChannelFile: query({
10278
+ input: GetChannelFileRequestSchema,
10279
+ output: standard(getChannelFileResponseSchema2),
10280
+ describe: "Finds one file attached to a message in a readable registered work channel, for a card's agent and the conveyor-mcp server, and answers its metadata with a five-minute link the tool downloads it from. The message is read again from Slack or Discord, and nothing is stored."
10189
10281
  }),
10190
10282
  postChannelMessage: mutation({
10191
10283
  input: PostChannelMessageRequestSchema,
@@ -10345,7 +10437,7 @@ var agentSessionContract = defineContract("agentSessionService", {
10345
10437
  startProjectBuild: mutation({
10346
10438
  input: StartProjectBuildRequestSchema,
10347
10439
  output: standard(startProjectBuildResponseSchema),
10348
- describe: "Starts a cloud build of a card, named by id, for the conveyor-mcp server, booting or waking its pod. A card past Planning boots in autonomous build mode rather than planning."
10440
+ describe: "Starts a cloud build of a card, named by id, for the conveyor-mcp server, booting or waking its pod. A card past Planning boots in autonomous build mode rather than planning. With planAndBuild, a Planning card starts as Plan + Build: with no plan a Planner plans it first and the saved plan hands off to a Builder; with a plan it builds."
10349
10441
  }),
10350
10442
  stopProjectBuild: mutation({
10351
10443
  input: StopProjectBuildRequestSchema,
@@ -14240,7 +14332,7 @@ var updateCodingAgentKeySchema = z100.object({
14240
14332
  });
14241
14333
  var modelCatalogEntrySchema = schemaOf()(
14242
14334
  z101.object({
14243
- provider: z101.enum(["anthropic", "zen", "typesafe"]),
14335
+ provider: z101.enum(["anthropic", "openai", "zen", "typesafe"]),
14244
14336
  model: z101.string(),
14245
14337
  id: z101.string(),
14246
14338
  label: z101.string(),
@@ -14275,7 +14367,7 @@ var codingAgentKeyDTOSchema = schemaOf()(
14275
14367
  id: z102.string(),
14276
14368
  label: z102.string(),
14277
14369
  tui: z102.enum(["claude-code", "opencode", "codex"]),
14278
- provider: z102.enum(["anthropic", "zen", "openai"]),
14370
+ provider: z102.enum(["anthropic", "openai", "zen"]),
14279
14371
  model: z102.string().nullable(),
14280
14372
  kind: z102.enum(["oauth_token", "api_key", "chatgpt_oauth", "claude_oauth"]),
14281
14373
  createdAt: z102.string(),
@@ -14296,7 +14388,7 @@ var codingAgentKeyDTOSchema = schemaOf()(
14296
14388
  var anthropicKeyDTOSchema = schemaOf()(
14297
14389
  z103.object({
14298
14390
  id: z103.string(),
14299
- provider: z103.enum(["anthropic", "zen", "typesafe"]),
14391
+ provider: z103.enum(["anthropic", "openai", "zen", "typesafe"]),
14300
14392
  label: z103.string(),
14301
14393
  createdAt: z103.string(),
14302
14394
  updatedAt: z103.string()
@@ -14374,7 +14466,10 @@ var projectKeyContract = defineContract("projectKeyService", {
14374
14466
  listAvailableModels: query({
14375
14467
  input: listAvailableModelsSchema,
14376
14468
  output: standard(z104.array(modelCatalogEntrySchema)),
14377
- describe: "Lists the models the project's model pickers offer: Anthropic models always, plus OpenCode Zen models when the project has a Zen key."
14469
+ // Read again when a provider key is saved or removed, so a new key's
14470
+ // models show in the pickers at once.
14471
+ watch: { service: ["projectProviderKey"] },
14472
+ describe: "Lists the models the project's model pickers offer: Anthropic models always, plus OpenAI models when the project has an OpenAI key and OpenCode Zen models when it has a Zen key."
14378
14473
  }),
14379
14474
  startClaudeOAuth: mutation({
14380
14475
  input: startClaudeOAuthSchema,
@@ -8,7 +8,7 @@ import {
8
8
  readWorkspaceBytes,
9
9
  statWorkspacePath,
10
10
  workspacePathExists
11
- } from "./chunk-2JW3ILVM.js";
11
+ } from "./chunk-6TPI4RUV.js";
12
12
  import {
13
13
  reportBootMilestone
14
14
  } from "./chunk-74BAVQKD.js";
@@ -107,7 +107,7 @@ import {
107
107
  toMemberMentionRows,
108
108
  updateRemoteToken,
109
109
  verifyGitCredential
110
- } from "./chunk-2JW3ILVM.js";
110
+ } from "./chunk-6TPI4RUV.js";
111
111
  import {
112
112
  reportBootMilestone
113
113
  } from "./chunk-74BAVQKD.js";
@@ -8907,6 +8907,7 @@ var pullRequestContracts = [createPullRequestContract];
8907
8907
  var REGISTRY_RULE = "Only channels an admin registered as work channels in project settings are reachable \u2014 an unregistered channel is invisible here no matter what the bot can see in the workspace, and the card-sync channels are NOT automatically included.";
8908
8908
  var NO_STORAGE = "Messages are fetched live from Slack/Discord on every call and are never stored by Conveyor.";
8909
8909
  var READ_MENTIONS = "People who are Conveyor users appear in `text` as @[user:<id>] tokens instead of raw Slack or Discord ids, and `authorMention` is the author's token when the author is one. Reuse those tokens to mention people back.";
8910
+ var READ_FILES = "A message with attachments lists them in `files` (fileId, name, type, size); open one with get_channel_file, passing the message's `id` and `threadTs`. A file whose `unavailable` is set cannot be opened, and the value says why.";
8910
8911
  var listProjectIntegrationsContract = defineToolContract({
8911
8912
  name: "list_project_integrations",
8912
8913
  agent: {
@@ -8937,11 +8938,11 @@ var CHANNEL_ID_DESC = "Provider channel id, exactly as list_project_channels rep
8937
8938
  var LIMIT_DESC = "How many messages to return, newest first. Defaults to 25, maximum 50. Prefer a small read plus a follow-up over one large one \u2014 channel history spends context fast.";
8938
8939
  var BEFORE_DESC = "Page further back: return messages older than this cursor. Pass the `olderCursor` from a previous call; a null cursor there means you have reached the start of the channel.";
8939
8940
  var AFTER_DESC = "Return only messages newer than this cursor. Use to catch up on a channel.";
8940
- var THREAD_DESC = "Read one thread instead of the channel surface. Pass a `threadTs` seen on a message from a previous read.";
8941
+ var THREAD_DESC = "Read one thread instead of the channel surface. Pass the `threadTs` a previous read reported on a message: the thread that message lives in, or the one it started.";
8941
8942
  var readChannelMessagesContract = defineToolContract({
8942
8943
  name: "read_channel_messages",
8943
8944
  agent: {
8944
- description: `Read recent messages from a registered work channel, newest first \u2014 to catch up on a discussion, find the context behind a decision, or check whether something was already raised. Each message reports its author, whether that author is a bot (Conveyor's own card feed posts show up here too, so check this before treating a message as a teammate's), its text, and a cursor for paging further back. ${READ_MENTIONS} ${REGISTRY_RULE} ${NO_STORAGE}`,
8945
+ description: `Read recent messages from a registered work channel, newest first \u2014 to catch up on a discussion, find the context behind a decision, or check whether something was already raised. Each message reports its author, whether that author is a bot (Conveyor's own card feed posts show up here too, so check this before treating a message as a teammate's), its text, and a cursor for paging further back. ${READ_MENTIONS} ${READ_FILES} ${REGISTRY_RULE} ${NO_STORAGE}`,
8945
8946
  fields: {
8946
8947
  channelId: f.string({ desc: CHANNEL_ID_DESC }),
8947
8948
  limit: f.optional(f.number({ desc: LIMIT_DESC, int: true, min: 1, max: 50 })),
@@ -8951,7 +8952,7 @@ var readChannelMessagesContract = defineToolContract({
8951
8952
  }
8952
8953
  },
8953
8954
  mcp: {
8954
- description: `Read recent messages from a project's registered work channel, newest first. Each message carries author name, a bot flag, text, a provider-native cursor, and a timestamp; the response carries an olderCursor for paging back. ${READ_MENTIONS} ${REGISTRY_RULE} ${NO_STORAGE} Pass projectId to target a specific project; otherwise the configured default project is used.`,
8955
+ description: `Read recent messages from a project's registered work channel, newest first. Each message carries author name, a bot flag, text, a provider-native cursor, and a timestamp; the response carries an olderCursor for paging back. ${READ_MENTIONS} ${READ_FILES} ${REGISTRY_RULE} ${NO_STORAGE} Pass projectId to target a specific project; otherwise the configured default project is used.`,
8955
8956
  fields: {
8956
8957
  projectId: mcpProjectId,
8957
8958
  channelId: f.string({ desc: CHANNEL_ID_DESC }),
@@ -8962,6 +8963,32 @@ var readChannelMessagesContract = defineToolContract({
8962
8963
  }
8963
8964
  }
8964
8965
  });
8966
+ var FILE_MESSAGE_DESC = "The `id` of the message the file is attached to, exactly as read_channel_messages reported it.";
8967
+ var FILE_ID_DESC = "The file's `fileId` from that message's `files` list.";
8968
+ var FILE_THREAD_DESC = "The message's `threadTs`, exactly as read_channel_messages reported it. Pass it whenever the message had one: a file on a thread reply cannot be found without it.";
8969
+ var FILE_RULES = "Reading must be enabled for the channel: the same grant read_channel_messages needs. A file whose `unavailable` was set on the read cannot be opened (a canvas, an external link, a deleted or hidden file, or one over 25 MB). The file is fetched live from Slack/Discord on every call and Conveyor never stores it.";
8970
+ var getChannelFileContract = defineToolContract({
8971
+ name: "get_channel_file",
8972
+ agent: {
8973
+ description: `Open a file attached to a message in a registered work channel \u2014 a PDF, a screenshot, a log a teammate shared \u2014 after read_channel_messages listed it in the message's \`files\`. The file is saved into this workspace and the tool returns its path: open it with the Read tool (images and PDFs render there) or process it with Bash. ${FILE_RULES} ${REGISTRY_RULE}`,
8974
+ fields: {
8975
+ channelId: f.string({ desc: CHANNEL_ID_DESC, min: 1, max: 100 }),
8976
+ messageId: f.string({ desc: FILE_MESSAGE_DESC, min: 1, max: 100 }),
8977
+ fileId: f.string({ desc: FILE_ID_DESC, min: 1, max: 100 }),
8978
+ threadTs: f.optional(f.string({ desc: FILE_THREAD_DESC, max: 100 }))
8979
+ }
8980
+ },
8981
+ mcp: {
8982
+ description: `Download a file attached to a message in a project's registered work channel, after read_channel_messages listed it in the message's \`files\`. The file is saved under the system temp directory and the result names its path; a small image is also shown inline, and a small text file is inlined. ${FILE_RULES} ${REGISTRY_RULE} Pass projectId to target a specific project; otherwise the configured default project is used.`,
8983
+ fields: {
8984
+ projectId: mcpProjectId,
8985
+ channelId: f.string({ desc: CHANNEL_ID_DESC, min: 1, max: 100 }),
8986
+ messageId: f.string({ desc: FILE_MESSAGE_DESC, min: 1, max: 100 }),
8987
+ fileId: f.string({ desc: FILE_ID_DESC, min: 1, max: 100 }),
8988
+ threadTs: f.optional(f.string({ desc: FILE_THREAD_DESC, max: 100 }))
8989
+ }
8990
+ }
8991
+ });
8965
8992
  var POST_TEXT_DESC = `What to say, in plain text or light markdown. An attribution footer naming you is appended automatically, so do not sign the message yourself. ${CHANNEL_MENTION_GUIDANCE} Channel-wide and group pings (@everyone, @here, <!channel>, <!subteam^\u2026>) are rendered as ordinary text and will not notify anyone.`;
8966
8993
  var POST_THREAD_DESC = "Reply inside a thread rather than to the channel. Prefer this when responding to a specific message \u2014 pass the `threadTs` from the message you are answering.";
8967
8994
  var POST_WARNING = "This is visible to everyone in the channel and cannot be edited or deleted afterwards. Posting requires a per-channel grant that is OFF by default, separate from read access, so most registered channels will refuse it.";
@@ -9010,6 +9037,7 @@ var integrationsContracts = [
9010
9037
  listProjectIntegrationsContract,
9011
9038
  listProjectChannelsContract,
9012
9039
  readChannelMessagesContract,
9040
+ getChannelFileContract,
9013
9041
  postChannelMessageContract,
9014
9042
  getAnalyticsSummaryContract
9015
9043
  ];
@@ -12220,6 +12248,43 @@ function buildReadChannelMessagesTool(connection, projectId) {
12220
12248
  }
12221
12249
  });
12222
12250
  }
12251
+ function buildGetChannelFileTool(connection, projectId) {
12252
+ return defineContractTool(getChannelFileContract, async (input) => {
12253
+ let located;
12254
+ try {
12255
+ located = await connection.call("getChannelFile", {
12256
+ projectId,
12257
+ channelId: input.channelId,
12258
+ messageId: input.messageId,
12259
+ fileId: input.fileId,
12260
+ threadTs: input.threadTs
12261
+ });
12262
+ } catch (error) {
12263
+ return errText3("Failed to get the channel file", error);
12264
+ }
12265
+ const { agentDownloadUrl, ...shown } = located;
12266
+ const header = JSON.stringify(shown, null, 2);
12267
+ try {
12268
+ const saved = await saveAttachmentToDisk({
12269
+ url: agentDownloadUrl,
12270
+ fileId: `ch-${located.provider}-${located.file.fileId}`,
12271
+ fileName: located.file.name
12272
+ });
12273
+ return textResult(
12274
+ `${header}
12275
+
12276
+ Saved to ${saved.path} (${saved.bytes} bytes). Open it with the Read tool (images and PDFs render there; a PDF over 10 pages needs the pages parameter) or process it with Bash.`
12277
+ );
12278
+ } catch (error) {
12279
+ const code = error instanceof AttachmentSaveError ? error.code : "network";
12280
+ return textResult(
12281
+ `${header}
12282
+
12283
+ Could not save the file (${code}). Call get_channel_file again; each call mints a fresh 5-minute link.`
12284
+ );
12285
+ }
12286
+ });
12287
+ }
12223
12288
  function buildPostChannelMessageTool(connection, projectId) {
12224
12289
  return defineContractTool(postChannelMessageContract, async (input) => {
12225
12290
  try {
@@ -12256,6 +12321,7 @@ function buildChannelTools(connection, projectId) {
12256
12321
  return [
12257
12322
  buildListProjectChannelsTool(connection, projectId),
12258
12323
  buildReadChannelMessagesTool(connection, projectId),
12324
+ buildGetChannelFileTool(connection, projectId),
12259
12325
  buildPostChannelMessageTool(connection, projectId)
12260
12326
  ];
12261
12327
  }
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  WorkspaceCommandSupervisor,
8
8
  startWorkspaceCommandsAfterConnect,
9
9
  stopWorkspaceCommands
10
- } from "./chunk-CWGU7HVC.js";
10
+ } from "./chunk-AKGAH7WY.js";
11
11
  import {
12
12
  PtyHarness,
13
13
  SessionRunner,
@@ -25,7 +25,7 @@ import {
25
25
  resolveTuiKindFromEnv,
26
26
  sampleKeyUsage,
27
27
  usesNativeUsageReporting
28
- } from "./chunk-6FEFEVVF.js";
28
+ } from "./chunk-ESWEZ24T.js";
29
29
  import "./chunk-VYE7XV6U.js";
30
30
  import {
31
31
  inheritedEnv,
@@ -41,7 +41,7 @@ import {
41
41
  createServiceLogger,
42
42
  loadAndAnnotateDiscoveredPorts,
43
43
  loadConveyorConfig
44
- } from "./chunk-2JW3ILVM.js";
44
+ } from "./chunk-6TPI4RUV.js";
45
45
  import "./chunk-74BAVQKD.js";
46
46
  import "./chunk-W4LZ7R6Z.js";
47
47
  import "./chunk-372R6E4C.js";
@@ -1424,7 +1424,7 @@ if (!RUNNER_MODES.includes(CONVEYOR_MODE)) {
1424
1424
  process.exit(1);
1425
1425
  }
1426
1426
  if (CONVEYOR_MODE === "serving") {
1427
- const { runServingSession } = await import("./serve-boot-MHESEHYF.js");
1427
+ const { runServingSession } = await import("./serve-boot-7SKV7KUI.js");
1428
1428
  exitContext.runnerMode = "serving";
1429
1429
  exitContext.sessionId = process.env.CONVEYOR_SESSION_ID ?? exitContext.sessionId;
1430
1430
  const outcome = await runServingSession({
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SessionRunner,
3
3
  unshallowRepo
4
- } from "./chunk-6FEFEVVF.js";
4
+ } from "./chunk-ESWEZ24T.js";
5
5
  import "./chunk-VYE7XV6U.js";
6
6
  import "./chunk-76JCOHPE.js";
7
7
  import {
@@ -17,7 +17,7 @@ import {
17
17
  stageAndCommit,
18
18
  updateRemoteToken,
19
19
  workspacePathExists
20
- } from "./chunk-2JW3ILVM.js";
20
+ } from "./chunk-6TPI4RUV.js";
21
21
  import "./chunk-74BAVQKD.js";
22
22
  import {
23
23
  runAuthTokenCommand,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  WorkspaceCommandSupervisor
3
- } from "./chunk-CWGU7HVC.js";
3
+ } from "./chunk-AKGAH7WY.js";
4
4
  import {
5
5
  AgentConnection,
6
6
  DEFAULT_LIFECYCLE_CONFIG,
@@ -11,7 +11,7 @@ import {
11
11
  ensureOnTaskBranch,
12
12
  loadAndAnnotateDiscoveredPorts,
13
13
  loadConveyorConfig
14
- } from "./chunk-2JW3ILVM.js";
14
+ } from "./chunk-6TPI4RUV.js";
15
15
  import "./chunk-74BAVQKD.js";
16
16
  import "./chunk-W4LZ7R6Z.js";
17
17
  import "./chunk-L2E4EMEP.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rallycry/conveyor-agent",
3
- "version": "11.1.13",
3
+ "version": "11.1.15",
4
4
  "description": "Conveyor Agent Runner v10 - PTY harness for the task chat (SDK harness for audit/project-chat). Agent-as-User architecture with BaseService patterns. Works locally too.",
5
5
  "keywords": [
6
6
  "agent",
@@ -29,7 +29,7 @@ Announce a one-line plan naming the sources you found, then sweep. **Say what yo
29
29
 
30
30
  | Source | How |
31
31
  | ------ | --- |
32
- | Work channels | `read_channel_messages` per registered readable channel, paging back with `olderCursor` until the window covers the question. `authorIsBot` separates the team's discussion from Conveyor's own card feed — check it before treating a message as a teammate's. Read thread replies (`threadTs`) where a thread carries the argument. |
32
+ | Work channels | `read_channel_messages` per registered readable channel, paging back with `olderCursor` until the window covers the question. `authorIsBot` separates the team's discussion from Conveyor's own card feed — check it before treating a message as a teammate's. Read thread replies (`threadTs`) where a thread carries the argument. A message's `files` lists what was shared with it; open a PDF, screenshot or export with `get_channel_file` when it carries the evidence. |
33
33
  | Conveyor cards | `search_tasks` with ALL `typeFilters` (task, incident, suggestion) and several keyword variants — the term, the term plus symptom words, the adjacent nouns people actually use. Incidents carry fingerprint dedup, so an incident's upvote count is itself a frequency signal. |
34
34
  | Decisions | `list_decisions` — open ones are the questions on the table, Decided ones carry their resolution and are the project's own record of what it already settled. A verdict that contradicts a Decided decision has to say so and say why. `list_project_integrations` reports `decisions.openCount` / `decidedCount`, so you know whether there is a log here before you search it. |
35
35
  | Tags | `list_tags` then `get_tag` on the relevant ones — the overview is the project's own domain vocabulary, and it names the subsystems your categories should line up with. |
@@ -108,6 +108,16 @@ Scale to the idea's size; a one-file tweak needs minutes, not a survey.
108
108
  parent when the card is a pack child (in a pod pass `task_id`; the local
109
109
  surface takes `taskId`). Source documents, screenshots and worksheets usually
110
110
  live there, and a plan written without reading them plans the wrong work.
111
+ - **The card's own context**: on an existing card, read the chat with
112
+ `mcp__conveyor__read_task_chat` (locally pass `full: true`, or long messages
113
+ are cut at 2,000 characters) and read its attachments. Human context and
114
+ `/conveyor-spike` briefs live there. A spike brief's Settled list is
115
+ decided; its Still open list is yours. If the card records a `githubBranch`
116
+ that is not the base, research THAT code without checking it out: run
117
+ `git fetch origin <branch>:refs/remotes/origin/<branch>`, then read it with
118
+ `git diff origin/<base>...origin/<branch>` and
119
+ `git show origin/<branch>:<path>`. Cite its lines, write the plan as a delta
120
+ on that branch, and record `Planned against <sha> of <branch>` in Notes.
111
121
  - **Prior art**: `mcp__conveyor__search_tasks` on 2-3 keyword variants
112
122
  (`typeFilters` to include incidents/suggestions when relevant), then
113
123
  `mcp__conveyor__get_task` on the closest hits. You're looking for duplicates
@@ -217,6 +227,14 @@ touching Conveyor, unless they asked you to just ship it.
217
227
  > scoped to the session's OWN task in a pod and cannot draw an edge between two
218
228
  > children.
219
229
  >
230
+ > **Locally, an existing card is planned in place, too.** When the argument
231
+ > names an existing card (a slug, URL or id: a `/conveyor-spike` handoff card,
232
+ > or any Planning card), plan ONTO it. Replace step 1's `create_task` with
233
+ > `mcp__conveyor__update_task` (`taskId`, `plan`, and `description` if it
234
+ > needs sharpening). Steps 2-5 apply unchanged, except when the caller said to
235
+ > stop in Planning (a `/conveyor-manager` planner brief does): then skip step
236
+ > 3's status flip.
237
+ >
220
238
  > **In a pod, create every child BEFORE you save the parent plan.** The parent
221
239
  > plan save is what triggers the handoff, and the handoff reads the card's child
222
240
  > count at that instant to decide what to spawn: children present → a pack
@@ -169,4 +169,4 @@ one card.
169
169
 
170
170
  `Planning -> Open -> InProgress -> ReviewPR -> ReviewDev -> ReviewLive -> Complete`
171
171
 
172
- `Cancelled` is terminal. A task must be `Open` before `start_task`.
172
+ `Cancelled` is terminal. A task must be `Open` before `start_task`, except a Plan + Build start (`planAndBuild: true`) of an unplanned Planning card.
@@ -0,0 +1,218 @@
1
+ ---
2
+ name: conveyor-spike
3
+ description: Prototype an idea as fast as possible in the local checkout — no tests, lint, gates or code-quality bar — get it on the user's screen, iterate with them live, then drop it or hand it off as a new unplanned Conveyor card that carries the spike's findings (and optionally its branch) for /conveyor-plan or Plan + Build. Use when the user says "/conveyor-spike <idea>", "spike this idea", "hack it together so I can see it", "quick and dirty prototype", "try this idea fast". Needs a person watching the screen; never run it headless, from a loop, a manager or a subagent. Local surface only; inside a pod it says so instead of failing. Not for work meant to ship as written — that is /conveyor-plan then /conveyor-build.
4
+ ---
5
+
6
+ # Conveyor Spike
7
+
8
+ Speed is the only bar. Get the idea onto the user's screen in minutes, ugly
9
+ code and all, so they can see how hard it is and which direction is right. The
10
+ screen is the question: build first, ask second. The output is a verdict and a
11
+ set of findings, never shippable code.
12
+
13
+ > **Environment — this skill does not apply inside a pod.** Check the
14
+ > environment first, before any tool call, so the first cut never waits for
15
+ > the Conveyor MCP to connect: if `CONVEYOR_TASK_ID`, `CONVEYOR_AGENT_VERSION`
16
+ > or `CONVEYOR_POD_IMAGE` is set, you are in a pod. Say so and stop. A pod is
17
+ > bound to its own card, and `mcp__conveyor__create_task` does not exist
18
+ > there. Today the cloud way to iterate live with an agent is an Interactive
19
+ > card. Locally, the Conveyor MCP is needed only at the handoff.
20
+
21
+ ## Goal and finish line
22
+
23
+ **Goal:** the idea working on the user's screen as fast as possible, then the
24
+ user's verdict on it.
25
+
26
+ **Finish line,** one of two:
27
+
28
+ - **Dropped.** The checkout is back on the starting branch. The logged side
29
+ effects are undone, or named to the user. The checkout claim is released.
30
+ The spike branch stays unless the user says to delete it.
31
+ - **Handed off.** A card sits in Planning with the spike brief attached and
32
+ summarized in its chat. The branch decision is applied. The card URL and
33
+ next steps are reported. The checkout is back on the starting branch (unless
34
+ the user asked to stay), and the claim is released.
35
+
36
+ **A turn may end only when:**
37
+
38
+ 1. a new result is visible and you asked the user for their reaction;
39
+ 2. an AskUserQuestion is pending; or
40
+ 3. the finish line is true.
41
+
42
+ **Runtime:** *Codex CLI* — do NOT create a thread goal. A spike is a
43
+ conversation, and a goal would keep iterating without the user. Ask the user to
44
+ run the dev server in their own terminal, because a held command session blocks
45
+ the conversation. Codex sets no session id, so pass one stable
46
+ `--session <id>` to every checkout command and record it in the spike log.
47
+ *Claude Code* — there is no goal tool; the turn endings above are the loop.
48
+
49
+ ## Ground rules
50
+
51
+ - **Quality rules are suspended.** Tests, lint, typecheck, formatting, repo
52
+ gates, contracts-first and service patterns, docs regeneration, file-size
53
+ rules, i18n and polish all wait for the real build. Invoking this skill is
54
+ the user's instruction to skip them, git hooks included: commit and push with
55
+ `--no-verify`. The repo's own quality and verification rules do not apply to
56
+ a spike.
57
+ - **Safety rules stay.**
58
+ - Never touch production, or shared data and infrastructure.
59
+ - Never commit secrets.
60
+ - Never push to the base branch or to anyone else's branch.
61
+ - Never open a pull request, and never merge.
62
+ - Never send real outbound effects (email, Slack or Discord posts, GitHub
63
+ writes, payments). Stub them.
64
+ - Never reset the shared dev database or change it destructively.
65
+ - Harness hooks still apply.
66
+ - **Show, don't ask.** Build the most plausible reading of the idea first. Ask
67
+ before the first cut only when no reasonable cut exists without the answer.
68
+ - **Take the cheapest path to something visible.**
69
+ - Use inline fake data, hardcoded values, copy-paste and inline styles.
70
+ - Reuse existing components, and call existing endpoints directly.
71
+ - Add no service methods, schema changes or migrations unless the backend IS
72
+ the idea. Fake missing data in the client first.
73
+ - A schema change needs the user's OK. Make it on an isolated dev database
74
+ when the repo has one, for example a second dev-stack configuration with
75
+ its own database.
76
+ - **No ceremony.** No plan mode, TODO lists, research sweeps or subagents.
77
+ Read only the one to three files the idea plugs into.
78
+ - **Time-box.** Aim for the first visible result in about 15 minutes. Past
79
+ that, stop, name what is slow, and offer a cheaper cut that fakes the hard
80
+ part. The slowness is a finding.
81
+ - **Commit every iteration, and log it.** Each iteration is a checkpoint
82
+ commit. Log every side effect the moment it happens: database writes or
83
+ schema pushes, installed dependencies, generated code, env or config edits,
84
+ and extra processes. The brief and the clean-up are built from the log.
85
+ - **"Visible" depends on the idea.** It can be a page in the user's browser, a
86
+ response body, or command output and numbers.
87
+
88
+ ## Every turn starts here
89
+
90
+ Run `checkout verify --card spike-<slug>` and read the tail of the spike log.
91
+ The log survives context compaction; your memory does not.
92
+
93
+ On `lost` or `branch-moved`, stop and tell the user: another session took the
94
+ checkout or switched its branch.
95
+
96
+ ## Phase 0 — Set up (under a minute)
97
+
98
+ 1. Pick a short kebab-case slug for the idea.
99
+ 2. Record the starting point: `git branch --show-current`,
100
+ `git rev-parse --short HEAD` and `git status --porcelain`.
101
+ 3. Take the checkout claim with `--card spike-<slug>`, using the forms in
102
+ [checkout-claim.md](../conveyor-build/references/checkout-claim.md)
103
+ ("How to call it").
104
+ - On `held`: name the holder (card, branch and host) and offer
105
+ `checkout wait`. Never use a git worktree. The provisioned checkout, with
106
+ its dependencies, env and running stack, is the whole value of working
107
+ locally.
108
+ - On `dirty`: ask the user to commit, stash or discard the changes, or to
109
+ say that they belong to the idea. Never stash for them.
110
+ 4. Run `git switch -c spike/<slug>` from the current HEAD. It is instant, and
111
+ a running dev stack keeps serving. Then run
112
+ `checkout acquire --card spike-<slug> --branch spike/<slug>`. If the branch
113
+ already exists, treat it as a resume (below) or add a `-2` suffix.
114
+ 5. Start the spike log. Run
115
+ `mkdir -p "$(git rev-parse --git-path conveyor-spike)"`, then write
116
+ `<that dir>/<slug>.md`. A file in the git dir is never committed and never
117
+ shows in `git status`. The header holds:
118
+ - the idea, in the user's own words;
119
+ - the starting branch and sha;
120
+ - the base branch;
121
+ - the date;
122
+ - the Codex session id, when there is one.
123
+ 6. Get the app running. Find how this repo runs locally, in this order:
124
+ 1. a repo skill that stands it up (a `*-standup` or `run` skill);
125
+ 2. `.claude/launch.json` through `preview_start`, when the harness has it;
126
+ 3. the dev command in the repo's CLAUDE.md or README.
127
+
128
+ Reuse a stack that already runs. Start a missing one in the background.
129
+ Prefer a hot-reload dev server over a production build.
130
+
131
+ ## Phase 1 — First cut on screen
132
+
133
+ 1. Find the seam with the repo's code graph or with grep. Open only what you
134
+ must edit.
135
+ 2. Make the change the simplest way that works.
136
+ 3. Make it visible. When you cannot see the screen, check it with a cheap text
137
+ probe (`curl`, the page text). Give the user the exact URL and click path.
138
+ Take a screenshot only when the user cannot see the screen, or for the
139
+ handoff.
140
+ 4. Checkpoint, in ONE shell call:
141
+ `<checkout verify --card spike-<slug>> && git add <paths> && git commit --no-verify -m "spike(<slug>): v1 — <what>"`.
142
+ Stage by path, never with `git add -A`: in a shared checkout an untracked
143
+ file can belong to another session.
144
+ 5. Log what v1 does, what is faked (with `file:line`), what was hard, the time
145
+ it took, and any side effects.
146
+ 6. Report in 10 lines or fewer, then end the turn:
147
+ - what you built, and where to look;
148
+ - what is faked;
149
+ - a difficulty read: what made it easy, and what a real version needs;
150
+ - one to three concrete next iterations.
151
+
152
+ ## Phase 2 — Iterate
153
+
154
+ - **For each reaction:** make the smallest change, make it visible, checkpoint
155
+ it (v2, v3, …), log the user's words and the change, report, and end the
156
+ turn.
157
+ - **"Go back to vN":** run `git restore --source <vN sha> -- <paths>`, then
158
+ commit it as a new version.
159
+ - **"Show me another take":**
160
+ - For a different take, cut a sibling branch `spike/<slug>-alt-<n>` from the
161
+ starting sha. Run `checkout acquire --branch` after every switch.
162
+ - For a side-by-side comparison, add a temporary toggle in the page instead
163
+ (`?spike=a|b`).
164
+ - Log which take the user preferred, and why.
165
+ - **A change needs a restart** (server code without watch, env, dependencies):
166
+ say so, and restart only that process.
167
+ - **The real version needs heavy work** (a schema change, a new service,
168
+ permissions): say so. That is a finding. Offer to keep faking it.
169
+ - **Ask for a verdict** when the reactions settle, or when a few iterations
170
+ bring no new direction.
171
+
172
+ ## Phase 3 — Verdict
173
+
174
+ Follow the user's words when they are clear. Otherwise ask one
175
+ AskUserQuestion: Keep iterating / Drop it / Move it forward.
176
+
177
+ **Drop it:**
178
+
179
+ 1. Undo the logged side effects: reinstall dependencies from the lockfile,
180
+ regenerate generated code, restore the schema from the starting branch. Or
181
+ tell the user exactly what is left.
182
+ 2. Run `git switch <starting branch>`.
183
+ 3. Keep `spike/<slug>` and its log unless the user says to delete them. Run
184
+ `git branch -D` only on their word.
185
+ 4. Release the checkout claim.
186
+ 5. If the spike found something worth remembering, offer to file it with
187
+ `mcp__conveyor__create_suggestion`. Do not file it unasked.
188
+
189
+ **Move it forward:** follow [references/handoff.md](references/handoff.md).
190
+
191
+ **Keep iterating:** back to Phase 2.
192
+
193
+ ## Resume
194
+
195
+ `/conveyor-spike resume [slug]`:
196
+
197
+ 1. With no slug, list the logs in the spike-log directory
198
+ (`git rev-parse --git-path conveyor-spike`) and ask which one.
199
+ 2. Read the log.
200
+ 3. Run `git switch spike/<slug>`, then
201
+ `checkout acquire --card spike-<slug> --branch spike/<slug>`. The same
202
+ `--card` lets you take over a stale claim on the spike's own dirty tree.
203
+ 4. Check that the dev stack runs.
204
+ 5. Continue at Phase 2.
205
+
206
+ ## What this skill is not
207
+
208
+ - **Not a builder.** Nothing it writes ships as written. The real build is
209
+ `/conveyor-plan`, then `/conveyor-build` or `/conveyor-start`.
210
+ - **Not a planner.** The brief is input for `/conveyor-plan`, never a plan.
211
+ - **Not a launcher.** Never call `mcp__conveyor__start_task` unless the user
212
+ asks for it after the handoff.
213
+
214
+ ## Improve This Skill
215
+
216
+ If this skill was insufficient or slowed the work down, file it with
217
+ `mcp__conveyor__create_suggestion` on the Conveyor project: the issue,
218
+ evidence, and proposed fix.
@@ -0,0 +1,161 @@
1
+ # Spike handoff — move a spike forward as an unplanned card
2
+
3
+ The "Move it forward" half of [conveyor-spike](../SKILL.md). The spike becomes
4
+ a NEW card in Planning with no plan. The card carries the spike brief, a short
5
+ chat summary of it, and optionally the spike branch as its starting point.
6
+ Planning belongs to `/conveyor-plan`, and Plan + Build boots a Planner only for
7
+ a card with no plan, so never write the brief into the card's `plan`.
8
+
9
+ Every Conveyor tool below is the local MCP surface, fully qualified.
10
+
11
+ ## 1. Look for an existing card
12
+
13
+ Resolve the project first: `mcp__conveyor__get_connection_context`; if it
14
+ reports no default project, call `mcp__conveyor__list_projects` and match
15
+ `githubRepoOwner/Name` to the checkout's `git remote`. Ambiguous → ask.
16
+
17
+ If the user named a card, or `mcp__conveyor__search_tasks` on two or three
18
+ keywords of the idea finds a near-duplicate, offer to hand off onto that card
19
+ instead. Then attach the brief and post the summary there (step 5, items 3-5),
20
+ and skip `mcp__conveyor__create_task`.
21
+
22
+ ## 2. Decide the branch
23
+
24
+ You propose; the user confirms. Two options:
25
+
26
+ - **Starting point.** The code sits in the right files and layers, and what is
27
+ left is hardening: replace the fakes, add tests, handle the edge cases. The
28
+ Builder keeps the behavior and removes the shortcuts.
29
+ - **None.** The real build belongs elsewhere, or the spike is mostly fakes.
30
+ The brief's snippets carry what matters.
31
+
32
+ If the user preferred an alt take, that branch is the one to push.
33
+
34
+ ## 3. Prepare a starting point
35
+
36
+ Only for the starting-point option. Every check must pass; if one fails, fall
37
+ back to none and say why.
38
+
39
+ 1. Run `git fetch origin <base>`. Then `git log --oneline origin/<base>..<branch>`
40
+ must list only spike commits. If the starting HEAD was not the base, run
41
+ `git rebase --onto origin/<base> <start-sha> <branch>`. On any conflict,
42
+ run `git rebase --abort` and fall back to none.
43
+ 2. Read `git diff origin/<base>...<branch>`. Look for secrets, tokens,
44
+ personal data and stray debug files. Check `.npmrc`, `bunfig.toml` and
45
+ every `.env*` file by name. Remove anything you find in a final spike
46
+ commit. `--no-verify` skipped any commit-time secret guard the repo has, so
47
+ this read replaces it.
48
+ 3. Run `git ls-remote --heads origin <branch>`. It must print nothing; if the
49
+ name is taken, add a suffix. Keep the `spike/` prefix. Never use a name of
50
+ the shape `conveyor/new-card-…`, `conveyor/task-…` or
51
+ `conveyor/untitled-…`: Conveyor treats those as placeholders and renames
52
+ them.
53
+ 4. Run `git push --no-verify -u origin <branch>`. A local pre-push hook can
54
+ run the repo's whole gate, and spike code fails it by design.
55
+
56
+ ## 4. Confirm with the user
57
+
58
+ Show it in one message, then wait for their yes:
59
+
60
+ - **Title:** imperative, naming the real feature. Never "Spike: …".
61
+ - **Description:** 255 characters or fewer, in plain words, ending
62
+ "Prototyped in a spike; the brief is attached."
63
+ - **The brief's outline** (below).
64
+ - **The branch decision.**
65
+
66
+ ## 5. File the card
67
+
68
+ Every call after the create uses the returned task **id**, not the slug.
69
+
70
+ 1. `mcp__conveyor__create_task` with `title` and `description`. Do NOT pass
71
+ `plan`, and omit `status` (it defaults to Planning). Omit `tags` unless you
72
+ are certain: pre-set tags make identification skip choosing them.
73
+ 2. For a starting point, call `mcp__conveyor__update_task` with
74
+ `{ taskId, githubBranch: <branch> }` straight away. Do it BEFORE anyone
75
+ starts the card: a start mints a branch of its own, and a live environment
76
+ then refuses a new one. If the write fails, say so, and mark the branch
77
+ "reference only" in the brief.
78
+ 3. Write the brief to `<spike-log dir>/<slug>-brief.md`. Call
79
+ `mcp__conveyor__upload_attachment` with
80
+ `{ taskId, path, comment: "Spike brief — read this before planning" }`.
81
+ The `comment` posts the file to the card's chat, which is what puts the
82
+ brief in front of a cloud Planner when it starts.
83
+ 4. Call `mcp__conveyor__post_to_chat` with `{ taskId, content }`: a summary
84
+ under 2,000 characters. Include the Settled list, the number of open
85
+ questions, the branch line, and "full brief attached". Chat posts can be
86
+ mirrored to Slack or Discord, so keep it short.
87
+ 5. For a visual spike, take a screenshot of the final state with the repo's
88
+ screenshot tool or Playwright. Upload it with a `comment`. Never set
89
+ `showcase: true`: a showcase file is appended to the eventual pull
90
+ request's body, and this is not the finished result.
91
+ 6. Do not move the card to Open. Do not set story points, an agent or an
92
+ icon. Do not start the card.
93
+
94
+ ## 6. Report and finish
95
+
96
+ 1. Give the card URL (`<project url>/cards/<slug>`) and say what is on it.
97
+ 2. Give the next step. It runs in a FRESH session or in the web app, never in
98
+ this one: this session's context is full of shortcuts. Either:
99
+ - plan it locally: `/conveyor-plan <card url>`, then `/conveyor-build` or
100
+ `/conveyor-start`;
101
+ - or run Plan + Build in the cloud: the card's Plan popover → Plan + Build,
102
+ or `/conveyor-start <card>` asking for Plan + Build.
103
+ 3. Switch back to the starting branch, unless the user wants to stay on the
104
+ spike.
105
+ 4. Release the checkout claim.
106
+ 5. Keep the local spike branch until the card ships. Cancelling the card
107
+ deletes its branch on origin.
108
+
109
+ ## 7. No Conveyor MCP connected
110
+
111
+ Write the brief to the spike-log directory, then print the title, the
112
+ description and the brief for the user. Point them to
113
+ [mcp-setup.md](../../conveyor-workflows/references/mcp-setup.md) to connect
114
+ the MCP, then run step 5. Never improvise another way to file the card.
115
+
116
+ ## The brief
117
+
118
+ Fixed headings, under about 4,000 characters:
119
+
120
+ ```markdown
121
+ ## Spike brief — <idea>
122
+
123
+ Filed by /conveyor-spike from a local session on <date>. Input for
124
+ /conveyor-plan, not a plan.
125
+
126
+ ### The idea
127
+ <the user's own words>
128
+
129
+ ### What the spike proved
130
+ - <bullets; refer to the screenshot when there is one>
131
+
132
+ ### Settled with <user> — do not relitigate
133
+ - <decision> — <the user's reason>
134
+
135
+ ### Still open
136
+ - <questions the planner owns>
137
+
138
+ ### Difficulty and direction
139
+ - Easy because: <…>
140
+ - Faked, and what the real build needs instead: <…>
141
+ - Size guess: <one card | a pack>
142
+ - Riskiest unknown: <…>
143
+
144
+ ### How the spike did it
145
+ <`git diff --stat <start-sha>..<branch>`, then the 1-3 snippets that carry the idea>
146
+
147
+ ### De-spike checklist
148
+ - [ ] <every fake, hardcode, toggle and stub, with file:line>
149
+
150
+ ### Side effects left behind
151
+ - <only when there are any>
152
+
153
+ ### Branch
154
+ <one of:>
155
+ starting point `<branch>`, cut from `<base>` at `<sha>`. Cancelling this card deletes it on origin.
156
+ reference only `<branch>`
157
+ none
158
+ ```
159
+
160
+ With a starting point, the de-spike checklist is exactly what the Builder
161
+ removes.
@@ -54,14 +54,24 @@ starting anyway:
54
54
  `/conveyor-manager` run's duty card. Its plan is a charter; a pod has nothing
55
55
  to build from it.
56
56
 
57
+ **Plan + Build is the exception.** A Planning card with no plan may start as
58
+ Plan + Build when the user asks for Plan + Build by name; a `/conveyor-spike`
59
+ handoff card is the usual case. A Planner plans it first, and the saved plan
60
+ hands off to a Builder on the same pod. The dependency and manager-card checks
61
+ still apply. Without that ask, offer `/conveyor-plan` first.
62
+
57
63
  If any check fails, report which one and what would fix it. Do not start.
58
64
 
59
65
  ## 2. Start it
60
66
 
61
67
  ```
62
68
  mcp__conveyor__start_task(taskId)
69
+ mcp__conveyor__start_task(taskId, planAndBuild: true) # the Plan + Build exception
63
70
  ```
64
71
 
72
+ Pass the card's `id` from `get_task`, never its slug: `start_task` does not
73
+ resolve a slug and answers "Task not found".
74
+
65
75
  The build runs on **your** account and key, and starting reassigns the card to
66
76
  you — that is the documented contract, not a side effect. If you are starting
67
77
  something on someone else's behalf, say so, because their name comes off the
@@ -85,6 +95,12 @@ longer than a warm one. Then report the outcome honestly:
85
95
  instead of guessing, and do not immediately retry — a terminal cause will
86
96
  fail the same way.
87
97
 
98
+ For a Plan + Build start, also confirm the card left Planning: an auto start
99
+ moves a plan-less Planning card to Open. If it is still Planning once the
100
+ workspace runs, the server ignored the flag (an older API drops unknown
101
+ fields) and booted a Builder with no plan. Run `mcp__conveyor__stop_task` and
102
+ point the user to the card's Plan popover → Plan + Build.
103
+
88
104
  Never report "started" from the tool call alone.
89
105
 
90
106
  ## 4. Hand back a place to watch
@@ -151,6 +151,7 @@ labels. Each tag carries a `description` (≤255 — the summary), an `overview`
151
151
 
152
152
  | Phase | Skill |
153
153
  | --- | --- |
154
+ | Try an idea before planning it | `conveyor-spike` → a fast local prototype; when the user keeps it, a Planning card with the spike brief attached (local surface only — it needs `create_task`) |
154
155
  | Investigate an unverified report | `conveyor-triage` → hands off a planned card, never a PR |
155
156
  | Plan the work | `conveyor-plan` → writes an executable plan onto the card |
156
157
  | Hand it to the cloud | `conveyor-start` → starts a pod and confirms it came up (local surface only — `start_task` does not exist in a pod) |
@@ -169,7 +170,8 @@ labels. Each tag carries a `description` (≤255 — the summary), an `overview`
169
170
  incident goes to `conveyor-triage` before `conveyor-plan` — planning a fix
170
171
  from a symptom is how the wrong thing gets built confidently.
171
172
  - **Cloud or local**: `mcp__conveyor__start_task` boots a cloud agent
172
- environment for an Open card (that agent run is the card's "build" —
173
+ environment for an Open card (or, with `planAndBuild: true`, an unplanned
174
+ Planning card as Plan + Build; that agent run is the card's "build" —
173
175
  `mcp__conveyor__get_build_status` reports it), and that agent runs
174
176
  `conveyor-build` itself. To execute cards on the local machine instead, use
175
177
  `conveyor-build` directly for one card, or `conveyor-local-loop` to work a