You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 29b76e7
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .agents/skills/add-block/SKILL.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,7 @@ When adding or changing an OAuth integration block:
177
177
`packages/sim-setup/src/capability-config.ts`. The CLI catalog is exhaustively typed and checked
178
178
against the runtime field list; do not infer secrecy from the field name.
179
179
4. If the canonical OAuth service declares `serviceAccountProviderId`, run
180
-
`bun run deployment-config:generate`; this regenerates the provider-ID facts in
180
+
`bun run generate:deployment-config`; this regenerates the provider-ID facts in
181
181
`packages/deployment-config/src/service-account-providers.generated.ts`. Never hand-edit that
182
182
generated map. Add `deploymentRequirement` policy in
183
183
`packages/deployment-config/src/service-account-metadata.ts` only when the service-account path
@@ -959,11 +959,11 @@ Verify it with `bun run check:block-successors`.
959
959
Adding a block on its own needs no **tool metadata** regeneration — a block references existing
960
960
tool IDs through `tools.access` and does not change any tool's shape.
961
961
962
-
But if the same change also adds, edits **or removes** a tool, run `bun run tool-metadata:generate` and commit the result, or CI fails on stale artifacts. That matters here because a block's `outputs` are authored to match its tools' outputs, and the UI reads those from the generated metadata, not the executable registry — an unregenerated tool change makes the block's outputs disagree with what the panel renders. See `.agents/skills/tool-registry-boundary/SKILL.md`.
962
+
But if the same change also adds, edits **or removes** a tool, run `bun run generate:tool-metadata` and commit the result, or CI fails on stale artifacts. That matters here because a block's `outputs` are authored to match its tools' outputs, and the UI reads those from the generated metadata, not the executable registry — an unregenerated tool change makes the block's outputs disagree with what the panel renders. See `.agents/skills/tool-registry-boundary/SKILL.md`.
963
963
964
964
A visible integration block does require the generated integration catalog and docs to be refreshed:
965
-
`bun run tool-metadata:generate` (only when a tool changed), `bun run scripts/generate-docs.ts`,
966
-
`bun run deployment-config:generate`, then `bun run check:audits`. Also run
965
+
`bun run generate:tool-metadata` (only when a tool changed), `bun run scripts/generate-docs.ts`,
966
+
`bun run generate:deployment-config`, then `bun run check:audits`. Also run
967
967
`bun run apps/sim/scripts/check-block-registry.ts origin/staging` (CI runs it outside `check:audits`). Commit the
968
968
full generator output. For what each check verifies, see the `validate-integration` skill →
Then regenerate the generated tool metadata and commit it:
294
294
295
295
```bash
296
-
bun run tool-metadata:generate
296
+
bun run generate:tool-metadata
297
297
```
298
298
299
299
Client code reads `params`/`outputs` from these artifacts rather than importing
@@ -370,7 +370,7 @@ the OAuth service configuration, deployment availability, and the setup CLI.
370
370
infer secret fields from naming; the CLI mapping is exhaustively checked against the runtime
371
371
fields.
372
372
4. If the canonical OAuth service has `serviceAccountProviderId`, run
373
-
`bun run deployment-config:generate` to refresh
373
+
`bun run generate:deployment-config` to refresh
374
374
`packages/deployment-config/src/service-account-providers.generated.ts`; never hand-edit the
375
375
generated provider-ID map. In `packages/deployment-config/src/service-account-metadata.ts`, use:
376
376
- no `deploymentRequirement` when the service-account path works independently of OAuth client fields;
@@ -386,8 +386,8 @@ a resolvable capability must fail validation; an independent service account use
386
386
387
387
## Step 8: Generate and Validate the Catalog
388
388
389
-
Run `bun run tool-metadata:generate`, `bun run scripts/generate-docs.ts`,
390
-
`bun run deployment-config:generate`, then `bun run check:audits` (see the `validate-integration`
389
+
Run `bun run generate:tool-metadata`, `bun run scripts/generate-docs.ts`,
390
+
`bun run generate:deployment-config`, then `bun run check:audits` (see the `validate-integration`
391
391
skill → Regenerate Derived Artifacts for the full list and what each check verifies).
392
392
393
393
The docs generator creates `apps/docs/content/docs/integrations/{service}.mdx` — one page per service carrying the block's Actions and, if it has one, its Triggers section. Never hand-edit generated pages; the only editable region is the `{/* MANUAL-CONTENT */}` block (see `scripts/README.md`).
@@ -457,7 +457,7 @@ If creating V2 versions (API-aligned outputs):
457
457
-[ ] All optional outputs have `optional: true`
458
458
-[ ] Created `index.ts` barrel export
459
459
-[ ] Registered all tools in `tools/registry.ts`
460
-
-[ ] Ran `bun run tool-metadata:generate` and committed the regenerated artifacts
460
+
-[ ] Ran `bun run generate:tool-metadata` and committed the regenerated artifacts
461
461
-[ ] Classified every model-visible, opaque, Sim-durable, and internal-execution request field
462
462
-[ ] Added shared model-input projection or private provenance only where required; ordinary
463
463
external resource locators and control inputs retain their request semantics
@@ -530,15 +530,15 @@ If creating V2 versions (API-aligned outputs):
530
530
531
531
### Docs and deployment metadata
532
532
-[ ] Ran `bun run scripts/generate-docs.ts`
533
-
-[ ] Ran `bun run deployment-config:generate` for OAuth or service-account changes
533
+
-[ ] Ran `bun run generate:deployment-config` for OAuth or service-account changes
534
534
-[ ] Verified docs file created
535
535
-[ ] Wrote the `{/* MANUAL-CONTENT-START:intro */}` section under `<BlockInfoCard />` and confirmed it survives a regenerate
536
536
-[ ] Reviewed and committed the generated `packages/deployment-config/src/integrations.json` change
537
-
-[ ]`bun run integration-catalog:check` passes
538
-
-[ ]`bun run docs:check` passes — CI fails on stale generated docs, so commit the full generator
537
+
-[ ]`bun run check:integration-catalog` passes
538
+
-[ ]`bun run check:docs` passes — CI fails on stale generated docs, so commit the full generator
539
539
output, including catch-up regeneration for pages another PR left stale (never revert it as
540
540
"unrelated drift")
541
-
-[ ]`bun run deployment-config:check` passes
541
+
-[ ]`bun run check:deployment-config` passes
542
542
543
543
### Final Validation (Required)
544
544
-[ ] Read every tool file and cross-referenced inputs/outputs against the API docs
Copy file name to clipboardExpand all lines: .agents/skills/add-model/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ Use a precise WebFetch prompt: *"Extract for {model_id}: exact model id string,
54
54
|`reasoningEffort`|`openai/core.ts`, `azure-openai`, `xai`, `deepseek`, `groq`, `zai`, `kimi`, `cerebras`, `meta`, `litellm` (each `index.ts`) | Not read by anthropic/gemini (they use `thinking`) or by mistral, openrouter, fireworks, vertex — re-grep before assuming |
55
55
|`verbosity`|`openai/core.ts`, `azure-openai/index.ts` only | Dead elsewhere |
56
56
|`thinking`|`anthropic/core.ts`, `gemini/core.ts`; `deepseek`, `groq`, `zai`, `kimi` (each `index.ts`) read the resolved `thinkingLevel`| Dead elsewhere |
57
-
|`thinking.streamed`| Docs generator + `getThinkingStreamVisibility` (`models.ts`); `anthropic/core.ts` uses `'summary'` to request `display: 'summarized'` on agent-events runs |**Mandatory on Anthropic-family thinking models** (`agent-stream-docs:check` fails without it); other families fall back to provider defaults |
57
+
|`thinking.streamed`| Docs generator + `getThinkingStreamVisibility` (`models.ts`); `anthropic/core.ts` uses `'summary'` to request `display: 'summarized'` on agent-events runs |**Mandatory on Anthropic-family thinking models** (`check:agent-stream-docs` fails without it); other families fall back to provider defaults |
58
58
|`nativeStructuredOutputs`|`anthropic/core.ts`, `bedrock/index.ts` (via `models.ts``supportsNativeStructuredOutputs`, which reads the flag), `nebius/index.ts`, `nvidia/index.ts` (via `getModelCapabilities`) | Dead elsewhere — fireworks/baseten/together/openrouter call their own provider-level `supportsNativeStructuredOutputs` that ignores the model flag (always on, always off, or OpenRouter API metadata) |
59
59
|`maxOutputTokens`| Read by UI + executor for token estimation | Always meaningful — set if provider documents a cap |
60
60
|`computerUse`|`providers/utils.ts` (`getComputerUseModels` → `computerUseModels` routing) | Set only on actual computer-use SKUs |
Copy file name to clipboardExpand all lines: .agents/skills/ship/SKILL.md
+7-11Lines changed: 7 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,10 +49,10 @@ When the user runs `/ship`:
49
49
- `bun run check:migrations origin/staging` must pass (staging is the PR base). Do not silence a flagged statement with a `-- migration-safe:` annotation unless `/db-migrate` confirmed the old code no longer depends on it; otherwise split the destructive change into a later deploy.
50
50
6. **Run pre-ship checks** from the repo root before staging. This has two phases: first **regenerate** every committed artifact so generated files never drift into a CI failure (this is what catches things like `agent-stream-docs` going stale after a `models.ts` edit), then run the **full audit suite** CI's `lint` job enforces. Both phases parallelize — but only across commands that write **disjoint** outputs — and a bare `wait` swallows child exit codes, so both phases below explicitly collect each job's status and abort ship if any failed.
51
51
52
-
**Phase A — regenerate the always-in-repo committed artifacts (parallel), then let step 7 stage whatever changed.** Regenerate only the generators whose inputs live entirely in this repo and that any ordinary code change can drift — `agent-stream-docs:generate` (derives from the provider model registry), `docs-manifest:generate` (derives from docs page paths), and `skills:sync` (derives from `.agents/skills/**`). They write disjoint outputs (`apps/docs/…/agent.mdx`, `apps/sim/lib/mothership/generated/docs-manifest.ts`, and `.claude/skills` links), so they parallelize safely, and each is idempotent (a no-op when already in sync):
52
+
**Phase A — regenerate the always-in-repo committed artifacts (parallel), then let step 7 stage whatever changed.** Regenerate only the generators whose inputs live entirely in this repo and that any ordinary code change can drift — `generate:agent-stream-docs` (derives from the provider model registry), `generate:docs-manifest` (derives from docs page paths), `generate:tool-metadata` (derives from the tool registry), and `skills:sync` (derives from `.agents/skills/**`). They write disjoint outputs (`apps/docs/…/agent.mdx`, `apps/sim/lib/mothership/generated/docs-manifest.ts`, `apps/sim/tools/generated/*`, and `.claude/skills` links), so they parallelize safely, and each is idempotent (a no-op when already in sync):
53
53
```bash
54
54
rm -f /tmp/ship-gen-results
55
-
for g in agent-stream-docs:generate docs-manifest:generate skills:sync; do
55
+
for g in generate:agent-stream-docs generate:docs-manifestgenerate:tool-metadata skills:sync; do
56
56
( bun run "$g" >"/tmp/ship-gen-${g//:/-}.log" 2>&1; echo "$? $g" >>/tmp/ship-gen-results ) &
57
57
done
58
58
wait
@@ -64,7 +64,7 @@ When the user runs `/ship`:
64
64
```
65
65
Then `git status --short` to see what regenerated — those files must be staged in step 7 alongside your own changes.
66
66
67
-
**Do NOT blanket-run the domain generators here.** `mship:generate` (`generate-mship-contracts.ts`) is an **umbrella** that drives all nine mothership contract generators (`mship-contracts`, `billing-protocol-contract`, `mship-tools`, the four `trace-*`, `metrics-contract`, `vfs-snapshot-contract`) and biome-formats `apps/sim/lib/mothership/generated/` — never run it *and* its constituents (they write the same files and corrupt each other in parallel), and never run it on an ordinary ship: it reads an **external** copilot-contract source that isn't checked out in most worktrees, so it hard-fails with `ENOENT` and would abort ship for an unrelated reason. `generate:pi-model-catalog` (under `apps/sim`) likewise regenerates from the installed Pi package, not repo source. `scripts/generate-docs.ts` rewrites the integration docs and client-safe catalog; run it when this PR changes their block/icon/landing-content inputs or when `integration-catalog:check` reports drift, then review its broad generated diff. Only when **this PR's diff actually touches** a domain generator's input do you regenerate it deliberately and run its matching `:check` (`bun run mship:check` / the individual `*:check`) — with the external source present.
67
+
**Do NOT blanket-run the domain generators here.** `mship:generate` (`generate-mship-contracts.ts`) is an **umbrella** that drives all nine mothership contract generators (`mship-contracts`, `billing-protocol-contract`, `mship-tools`, the four `trace-*`, `metrics-contract`, `vfs-snapshot-contract`) and biome-formats `apps/sim/lib/mothership/generated/` — never run it *and* its constituents (they write the same files and corrupt each other in parallel), and never run it on an ordinary ship: it reads an **external** copilot-contract source that isn't checked out in most worktrees, so it hard-fails with `ENOENT` and would abort ship for an unrelated reason. `generate:pi-model-catalog` (under `apps/sim`) likewise regenerates from the installed Pi package, not repo source. `scripts/generate-docs.ts` rewrites the integration docs and client-safe catalog; run it when this PR changes their block/icon/landing-content inputs or when `check:integration-catalog` reports drift, then review its broad generated diff. Only when **this PR's diff actually touches** a domain generator's input do you regenerate it deliberately and run its matching `:check` (`bun run mship:check` / the individual `*:check`) — with the external source present.
68
68
69
69
**Phase B — run lint + every audit CI enforces, in parallel, and abort ship if any fails.** Before running the commands, compare this list with `.github/workflows/checks.yml`; when CI adds an audit, run it and update this skill instead of trusting a stale snapshot. The env-flag audit is currently an inline workflow block rather than a package script: when `apps/sim/lib/core/config/env-flags.ts` changed, run that current workflow block verbatim instead of copying a second version into this skill. Run `bun run lint` first (it autofixes formatting and mutates files, so don't parallelize it with the read-only audits), then run the base-sensitive block-registry check, then fan the independent audits out and collect exit codes:
70
70
```bash
@@ -77,17 +77,13 @@ When the user runs `/ship`:
77
77
}
78
78
# Runs every audit CI runs, concurrently, and replays the output of any that fail.
79
79
# The audit list is derived in scripts/run-audits.ts — do not hand-list audits here.
80
-
# Install CI's pinned actionlint version for the host OS/architecture and verify its
81
-
# artifact against the official release checksums in a local mktemp directory.
82
-
# Preserve CI's -shellcheck= -pyflakes= flags; lint all workflows and abort ship if it fails.
80
+
# Workflow lint (actionlint) runs only in CI's "Lint workflows" step.
83
81
bun run check:audits || { echo"❌ audit(s) failed — do not ship";exit 1; }
84
82
bun run type-check || { echo"❌ type-check failed — do not ship";exit 1; }
85
-
# CI's "Verify docs manifest is in sync" step is not a `check:*` script, so the runner above
86
-
# does not cover it. (CI's "Security audit" `bun audit` step is `continue-on-error` — advisory
87
-
# only, not a gate — so it is deliberately not run here.)
88
-
bun run docs-manifest:check || { echo"❌ docs manifest out of sync — do not ship";exit 1; }
83
+
# CI's "Security audit" `bun audit` step is `continue-on-error` — advisory only, not a gate —
84
+
# so it is deliberately not run here.
89
85
```
90
-
If Phase A regenerated a file, its matching `:check`in Phase B now passes trivially — that parity is the point. Do not ship with any generator or audit failing; fix the cause (never silence it) and re-run. `check:migrations` is covered by step 5 and is not repeated here.
86
+
If Phase A regenerated a file, its matching `check:*` auditin Phase B now passes trivially — that parity is the point. Do not ship with any generator or audit failing; fix the cause (never silence it) and re-run. `check:migrations` is covered by step 5 and is not repeated here.
91
87
7. **Stage and commit** the changes with the generated message — including any files Phase A regenerated in step 6
92
88
8. **Push to origin** using the current branch name — `--force-with-lease`if step 2's sync
93
89
check did any history rewrite (a clean rebase or a cherry-pick rebuild) on a branch that had
0 commit comments