From 3426580d8d74fbe205dd2342c3e7a2ce05f203e5 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 26 Nov 2026 14:52:25 -0800 Subject: [PATCH 1/2] fix(sim-cli): keep the workflow primer within its byte budget #10440 and #10444 each fit the 4096-byte budget, but together the workflow primer reached 4127 bytes and the primer budget test failed on staging. Tighten two sentences (88 bytes of headroom) without dropping any rule. --- packages/sim-cli/src/commands/protocol/source-primer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sim-cli/src/commands/protocol/source-primer.ts b/packages/sim-cli/src/commands/protocol/source-primer.ts index b5feb40a08e..760d21ea492 100644 --- a/packages/sim-cli/src/commands/protocol/source-primer.ts +++ b/packages/sim-cli/src/commands/protocol/source-primer.ts @@ -56,9 +56,9 @@ ${PATTERNS_HEADING} (\`.sim/examples/\`, indexed atop \`cookbook.ts\`; any build const WORKFLOW_PRIMER = `# Sim workflow source: primer -\`${SOURCE_ENTRY_FILE}\` is a Sim workflow as TypeScript; the server compiles it statically and nothing in it runs. Commands here (table ones too) act on the workflow \`${SOURCE_BASE_FILE}\` names and its workspace (a starter's \`${SOURCE_STARTER_FILE}\` names the workspace, and its loop runs \`create\` where the loop below runs \`apply\`: no workflow exists until then). +\`${SOURCE_ENTRY_FILE}\` is a Sim workflow as TypeScript; the server compiles it statically and nothing in it runs. Commands here (table ones too) act on the workflow \`${SOURCE_BASE_FILE}\` names and its workspace (a starter's \`${SOURCE_STARTER_FILE}\` names the workspace, and its loop runs \`create\` in place of \`apply\`: no workflow exists yet). -**Edit loop**: write every file, then run one chained command; fix what it reports: \`sim workflows source check --dir . && sim workflows source apply --dir . --yes --run '{…}' --deploy\` applies, dry-runs that input on the draft, and deploys only if the run completed (no \`--deploy\`: stays a draft). \`check\` also type-checks (no \`tsc\`). Apply re-checks (\`apply --dry\` only plans) and rewrites \`${SOURCE_ENTRY_FILE}\`: reread it before the next edit. +**Edit loop**: write every file, then run one chained command; fix what it reports: \`sim workflows source check --dir . && sim workflows source apply --dir . --yes --run '{…}' --deploy\` applies, dry-runs that input, and deploys only if it completed (no \`--deploy\`: stays a draft). \`check\` also type-checks (no \`tsc\`). Apply re-checks (\`apply --dry\` only plans) and rewrites \`${SOURCE_ENTRY_FILE}\`: reread it before the next edit. - **Scope**: the workflow alone. A table's columns and rows: \`sim tables columns update --column-name --updates '{…}'\`, \`sim tables rows update
--data '{…}'\`. - **Deletes**: removing a block or variable needs \`apply --allow-delete\`. From 7d0f53d9f8fb7659c58d5830fa5db5151605514b Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 26 Nov 2026 15:03:20 -0800 Subject: [PATCH 2/2] fix(sim-cli): keep the primer's note that --run tests the draft --- packages/sim-cli/src/commands/protocol/source-primer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sim-cli/src/commands/protocol/source-primer.ts b/packages/sim-cli/src/commands/protocol/source-primer.ts index 760d21ea492..ea1c1968582 100644 --- a/packages/sim-cli/src/commands/protocol/source-primer.ts +++ b/packages/sim-cli/src/commands/protocol/source-primer.ts @@ -58,9 +58,9 @@ const WORKFLOW_PRIMER = `# Sim workflow source: primer \`${SOURCE_ENTRY_FILE}\` is a Sim workflow as TypeScript; the server compiles it statically and nothing in it runs. Commands here (table ones too) act on the workflow \`${SOURCE_BASE_FILE}\` names and its workspace (a starter's \`${SOURCE_STARTER_FILE}\` names the workspace, and its loop runs \`create\` in place of \`apply\`: no workflow exists yet). -**Edit loop**: write every file, then run one chained command; fix what it reports: \`sim workflows source check --dir . && sim workflows source apply --dir . --yes --run '{…}' --deploy\` applies, dry-runs that input, and deploys only if it completed (no \`--deploy\`: stays a draft). \`check\` also type-checks (no \`tsc\`). Apply re-checks (\`apply --dry\` only plans) and rewrites \`${SOURCE_ENTRY_FILE}\`: reread it before the next edit. +**Edit loop**: write every file, then run one chained command; fix what it reports: \`sim workflows source check --dir . && sim workflows source apply --dir . --yes --run '{…}' --deploy\` applies, dry-runs that input on the draft, and deploys only if it completed (no \`--deploy\`: stays a draft). \`check\` also type-checks (no \`tsc\`). Apply re-checks (\`apply --dry\` only plans) and rewrites \`${SOURCE_ENTRY_FILE}\`: reread it before editing. -- **Scope**: the workflow alone. A table's columns and rows: \`sim tables columns update
--column-name --updates '{…}'\`, \`sim tables rows update
--data '{…}'\`. +- **Scope**: the workflow alone. Table columns and rows: \`sim tables columns update
--column-name --updates '{…}'\`, \`sim tables rows update
--data '{…}'\`. - **Deletes**: removing a block or variable needs \`apply --allow-delete\`. ${sharedRules('sim workflows source')} `