Skip to content

Commit 86fb48c

Browse files
committed
update skills
1 parent ada0334 commit 86fb48c

9 files changed

Lines changed: 114 additions & 42 deletions

File tree

.agents/skills/add-integration/SKILL.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,13 @@ and leave the field unannotated.
147147
`mode: 'private-provenance'` when there is no textual projection. The route must call
148148
`validateOpaqueModelInputProvenance` before downloading or sending content to the model and must
149149
apply the workspace-file provenance guard before reading a persisted workspace file.
150-
- **Sim-owned durable storage** that can later re-enter a workflow/model (table cells, Agent
151-
memory, knowledge documents/chunks, and workspace-file contents): transport encrypted
152-
field-scoped provenance with
153-
`request.secretProvenance`, persist it through the shared sidecar service, and load/import it at
154-
every re-entry boundary. Preserve shared legacy behavior for rows/files whose provenance marker
155-
is `NULL`; never invent a tool-local migration rule.
150+
- **Sim-owned durable storage or internal execution handoff** that can later enter a workflow/model
151+
(table cells, Agent memory, knowledge documents/chunks, workspace-file contents, or child-workflow
152+
input): transport encrypted field-scoped provenance with `request.secretProvenance`. The
153+
authenticated receiver validates the exact selection and scope, strips the private envelope, and
154+
persists, imports, or propagates it at the owning boundary. Preserve shared legacy behavior for
155+
headerless internal calls and rows/files whose provenance marker is `NULL`; never invent a
156+
tool-local migration rule.
156157

157158
Hard rules:
158159

@@ -592,7 +593,7 @@ If creating V2 versions (API-aligned outputs):
592593
- [ ] Created `index.ts` barrel export
593594
- [ ] Registered all tools in `tools/registry.ts`
594595
- [ ] Ran `bun run tool-metadata:generate` and committed the regenerated artifacts
595-
- [ ] Classified every model-visible, opaque, and Sim-durable request field
596+
- [ ] Classified every model-visible, opaque, Sim-durable, and internal-execution request field
596597
- [ ] Added shared model-input projection, centralized opaque rejection, or private provenance only
597598
where required
598599
- [ ] Confirmed ordinary third-party tool results are not generically sanitized

.agents/skills/add-tools/SKILL.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,22 @@ export const {serviceName}{Action}Tool: ToolConfig<
145145
- Always explicitly set `required: true` or `required: false`
146146
- Optional params should have `required: false`
147147

148+
## Resolved Secrets and Provenance Boundaries
149+
150+
- Leave ordinary external API inputs and third-party results unchanged. Add provenance handling only
151+
when an exact field is proven to cross a Sim model, durable-storage, or internal-execution boundary.
152+
- Project AI-consumed text/structured fields with the smallest exact `request.modelInput` selector.
153+
- Reject resolved secrets in opaque model input sent directly to an external provider with
154+
`request.opaqueModelInput`; never attach private metadata to an external URL or `directExecution`.
155+
- For authenticated internal routes, use `privateProvenance` for opaque model input or
156+
`request.secretProvenance` for durable writes and execution handoffs. Authenticate first, validate
157+
the exact selection and scope, strip the private envelope, then import or propagate provenance at
158+
the receiving boundary. Preserve documented headerless legacy behavior.
159+
- Never substitute secret plaintext into source, serialize plaintext provenance, hand-roll private
160+
headers, or blanket-sanitize tool results.
161+
- Add focused tests for named projection, identical unproven public text, malformed/incomplete
162+
metadata, metadata stripping, scope isolation, and legacy compatibility where applicable.
163+
148164
## Critical Rules for Outputs
149165

150166
### Output Types
@@ -456,6 +472,9 @@ All tool IDs MUST use `snake_case`: `{service}_{action}` (e.g., `x_create_tweet`
456472
- [ ] Tools registered in `tools/registry.ts`
457473
- [ ] `bun run tool-metadata:generate` run and the regenerated artifacts committed
458474
- [ ] Block wired: `tools.access`, dropdown options, subBlocks, `tools.config`, outputs, inputs
475+
- [ ] Model, durable-storage, and internal-execution boundaries use the shared provenance mechanisms
476+
only where a concrete Sim `{{...}}` resolution path requires them
477+
- [ ] Ordinary third-party inputs/results remain unchanged and private metadata never leaves Sim
459478

460479
## Final Validation (Required)
461480

.agents/skills/validate-integration/SKILL.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ search, extraction, or "AI-powered" marketing terminology.
151151
- [ ] Persisted workspace-file contents are checked with the shared provenance guard only when
152152
their bytes or decoded content cross into a model/tool-result boundary; ordinary file APIs
153153
remain unchanged. Unsupported secret-bearing file paths are rejected at `file_write`
154-
- [ ] Sim-owned durable writes that can re-enter workflows/models use field-scoped
155-
`request.secretProvenance` and the shared sidecar/load/import services
154+
- [ ] Sim-owned durable writes and internal execution handoffs that can enter workflows/models use
155+
field-scoped `request.secretProvenance`; authenticated receivers validate the exact selection
156+
and scope, strip private metadata, and persist, import, or propagate it at the owning boundary
156157
- [ ] Private provenance is never attached to external URLs or `directExecution`; those paths use
157158
centralized `opaqueModelInput` rejection when their opaque values are model-bound
158159
- [ ] No tool performs raw secret plaintext/source substitution or serializes plaintext provenance
@@ -170,9 +171,10 @@ search, extraction, or "AI-powered" marketing terminology.
170171
or I/O with safe-byte preservation, headerless legacy requests, metadata stripping, and
171172
durable legacy/stale/scope cases when applicable
172173

173-
Treat a missing or bypassed model/durable provenance boundary as **critical**. Do not fix it with a
174-
tool-specific string replacer or by sanitizing every provider result; repair the shared request,
175-
authenticated internal-route, persistence, or re-entry boundary that owns the data.
174+
Treat a missing or bypassed model, durable, or internal-execution provenance boundary as
175+
**critical**. Do not fix it with a tool-specific string replacer or by sanitizing every provider
176+
result; repair the shared request, authenticated internal-route, persistence, or re-entry boundary
177+
that owns the data.
176178

177179
## Step 4: Validate Block
178180

@@ -349,7 +351,8 @@ Group findings by severity:
349351
- AI-consumed request fields bypass the shared projection, centralized opaque rejection, or
350352
private-provenance boundary
351353
- Opaque model input is downloaded or sent before provenance and workspace-file checks
352-
- A Sim-owned durable sink/re-entry path drops encrypted provenance or breaks legacy `NULL` data
354+
- A Sim-owned durable sink or internal execution handoff drops encrypted provenance or breaks
355+
legacy headerless/`NULL` data
353356
- A tool substitutes secret plaintext into source, leaks private metadata, or generically sanitizes
354357
unrelated third-party results
355358

@@ -426,7 +429,8 @@ After fixing, confirm:
426429
- [ ] Validated memory load safety using `.agents/skills/memory-load-check/SKILL.md` when tools list/search/download/import/export/batch data
427430
- [ ] Validated error handling (error checks, meaningful messages)
428431
- [ ] Validated registry entries (tools and block, alphabetical, correct imports)
429-
- [ ] Validated model-visible/opaque inputs and Sim-durable provenance at their owning boundaries
432+
- [ ] Validated model-visible/opaque inputs and Sim-durable/internal-execution provenance at their
433+
owning boundaries
430434
- [ ] Confirmed legacy persisted data keeps working and tracked invalid provenance fails closed
431435
- [ ] Confirmed ordinary third-party results remain unchanged absent activated Sim provenance
432436
- [ ] Validated `{Service}BlockMeta` exported with at least 7 templates

.claude/commands/add-integration.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,13 @@ and leave the field unannotated.
146146
`mode: 'private-provenance'` when there is no textual projection. The route must call
147147
`validateOpaqueModelInputProvenance` before downloading or sending content to the model and must
148148
apply the workspace-file provenance guard before reading a persisted workspace file.
149-
- **Sim-owned durable storage** that can later re-enter a workflow/model (table cells, Agent
150-
memory, knowledge documents/chunks, and workspace-file contents): transport encrypted
151-
field-scoped provenance with
152-
`request.secretProvenance`, persist it through the shared sidecar service, and load/import it at
153-
every re-entry boundary. Preserve shared legacy behavior for rows/files whose provenance marker
154-
is `NULL`; never invent a tool-local migration rule.
149+
- **Sim-owned durable storage or internal execution handoff** that can later enter a workflow/model
150+
(table cells, Agent memory, knowledge documents/chunks, workspace-file contents, or child-workflow
151+
input): transport encrypted field-scoped provenance with `request.secretProvenance`. The
152+
authenticated receiver validates the exact selection and scope, strips the private envelope, and
153+
persists, imports, or propagates it at the owning boundary. Preserve shared legacy behavior for
154+
headerless internal calls and rows/files whose provenance marker is `NULL`; never invent a
155+
tool-local migration rule.
155156

156157
Hard rules:
157158

@@ -591,7 +592,7 @@ If creating V2 versions (API-aligned outputs):
591592
- [ ] Created `index.ts` barrel export
592593
- [ ] Registered all tools in `tools/registry.ts`
593594
- [ ] Ran `bun run tool-metadata:generate` and committed the regenerated artifacts
594-
- [ ] Classified every model-visible, opaque, and Sim-durable request field
595+
- [ ] Classified every model-visible, opaque, Sim-durable, and internal-execution request field
595596
- [ ] Added shared model-input projection, centralized opaque rejection, or private provenance only
596597
where required
597598
- [ ] Confirmed ordinary third-party tool results are not generically sanitized

.claude/commands/add-tools.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,22 @@ export const {serviceName}{Action}Tool: ToolConfig<
144144
- Always explicitly set `required: true` or `required: false`
145145
- Optional params should have `required: false`
146146

147+
## Resolved Secrets and Provenance Boundaries
148+
149+
- Leave ordinary external API inputs and third-party results unchanged. Add provenance handling only
150+
when an exact field is proven to cross a Sim model, durable-storage, or internal-execution boundary.
151+
- Project AI-consumed text/structured fields with the smallest exact `request.modelInput` selector.
152+
- Reject resolved secrets in opaque model input sent directly to an external provider with
153+
`request.opaqueModelInput`; never attach private metadata to an external URL or `directExecution`.
154+
- For authenticated internal routes, use `privateProvenance` for opaque model input or
155+
`request.secretProvenance` for durable writes and execution handoffs. Authenticate first, validate
156+
the exact selection and scope, strip the private envelope, then import or propagate provenance at
157+
the receiving boundary. Preserve documented headerless legacy behavior.
158+
- Never substitute secret plaintext into source, serialize plaintext provenance, hand-roll private
159+
headers, or blanket-sanitize tool results.
160+
- Add focused tests for named projection, identical unproven public text, malformed/incomplete
161+
metadata, metadata stripping, scope isolation, and legacy compatibility where applicable.
162+
147163
## Critical Rules for Outputs
148164

149165
### Output Types
@@ -455,6 +471,9 @@ All tool IDs MUST use `snake_case`: `{service}_{action}` (e.g., `x_create_tweet`
455471
- [ ] Tools registered in `tools/registry.ts`
456472
- [ ] `bun run tool-metadata:generate` run and the regenerated artifacts committed
457473
- [ ] Block wired: `tools.access`, dropdown options, subBlocks, `tools.config`, outputs, inputs
474+
- [ ] Model, durable-storage, and internal-execution boundaries use the shared provenance mechanisms
475+
only where a concrete Sim `{{...}}` resolution path requires them
476+
- [ ] Ordinary third-party inputs/results remain unchanged and private metadata never leaves Sim
458477

459478
## Final Validation (Required)
460479

.claude/commands/validate-integration.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,9 @@ search, extraction, or "AI-powered" marketing terminology.
150150
- [ ] Persisted workspace-file contents are checked with the shared provenance guard only when
151151
their bytes or decoded content cross into a model/tool-result boundary; ordinary file APIs
152152
remain unchanged. Unsupported secret-bearing file paths are rejected at `file_write`
153-
- [ ] Sim-owned durable writes that can re-enter workflows/models use field-scoped
154-
`request.secretProvenance` and the shared sidecar/load/import services
153+
- [ ] Sim-owned durable writes and internal execution handoffs that can enter workflows/models use
154+
field-scoped `request.secretProvenance`; authenticated receivers validate the exact selection
155+
and scope, strip private metadata, and persist, import, or propagate it at the owning boundary
155156
- [ ] Private provenance is never attached to external URLs or `directExecution`; those paths use
156157
centralized `opaqueModelInput` rejection when their opaque values are model-bound
157158
- [ ] No tool performs raw secret plaintext/source substitution or serializes plaintext provenance
@@ -169,9 +170,10 @@ search, extraction, or "AI-powered" marketing terminology.
169170
or I/O with safe-byte preservation, headerless legacy requests, metadata stripping, and
170171
durable legacy/stale/scope cases when applicable
171172

172-
Treat a missing or bypassed model/durable provenance boundary as **critical**. Do not fix it with a
173-
tool-specific string replacer or by sanitizing every provider result; repair the shared request,
174-
authenticated internal-route, persistence, or re-entry boundary that owns the data.
173+
Treat a missing or bypassed model, durable, or internal-execution provenance boundary as
174+
**critical**. Do not fix it with a tool-specific string replacer or by sanitizing every provider
175+
result; repair the shared request, authenticated internal-route, persistence, or re-entry boundary
176+
that owns the data.
175177

176178
## Step 4: Validate Block
177179

@@ -348,7 +350,8 @@ Group findings by severity:
348350
- AI-consumed request fields bypass the shared projection, centralized opaque rejection, or
349351
private-provenance boundary
350352
- Opaque model input is downloaded or sent before provenance and workspace-file checks
351-
- A Sim-owned durable sink/re-entry path drops encrypted provenance or breaks legacy `NULL` data
353+
- A Sim-owned durable sink or internal execution handoff drops encrypted provenance or breaks
354+
legacy headerless/`NULL` data
352355
- A tool substitutes secret plaintext into source, leaks private metadata, or generically sanitizes
353356
unrelated third-party results
354357

@@ -425,7 +428,8 @@ After fixing, confirm:
425428
- [ ] Validated memory load safety using `.agents/skills/memory-load-check/SKILL.md` when tools list/search/download/import/export/batch data
426429
- [ ] Validated error handling (error checks, meaningful messages)
427430
- [ ] Validated registry entries (tools and block, alphabetical, correct imports)
428-
- [ ] Validated model-visible/opaque inputs and Sim-durable provenance at their owning boundaries
431+
- [ ] Validated model-visible/opaque inputs and Sim-durable/internal-execution provenance at their
432+
owning boundaries
429433
- [ ] Confirmed legacy persisted data keeps working and tracked invalid provenance fails closed
430434
- [ ] Confirmed ordinary third-party results remain unchanged absent activated Sim provenance
431435
- [ ] Validated `{Service}BlockMeta` exported with at least 7 templates

.cursor/commands/add-integration.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,13 @@ and leave the field unannotated.
141141
`mode: 'private-provenance'` when there is no textual projection. The route must call
142142
`validateOpaqueModelInputProvenance` before downloading or sending content to the model and must
143143
apply the workspace-file provenance guard before reading a persisted workspace file.
144-
- **Sim-owned durable storage** that can later re-enter a workflow/model (table cells, Agent
145-
memory, knowledge documents/chunks, and workspace-file contents): transport encrypted
146-
field-scoped provenance with
147-
`request.secretProvenance`, persist it through the shared sidecar service, and load/import it at
148-
every re-entry boundary. Preserve shared legacy behavior for rows/files whose provenance marker
149-
is `NULL`; never invent a tool-local migration rule.
144+
- **Sim-owned durable storage or internal execution handoff** that can later enter a workflow/model
145+
(table cells, Agent memory, knowledge documents/chunks, workspace-file contents, or child-workflow
146+
input): transport encrypted field-scoped provenance with `request.secretProvenance`. The
147+
authenticated receiver validates the exact selection and scope, strips the private envelope, and
148+
persists, imports, or propagates it at the owning boundary. Preserve shared legacy behavior for
149+
headerless internal calls and rows/files whose provenance marker is `NULL`; never invent a
150+
tool-local migration rule.
150151

151152
Hard rules:
152153

@@ -586,7 +587,7 @@ If creating V2 versions (API-aligned outputs):
586587
- [ ] Created `index.ts` barrel export
587588
- [ ] Registered all tools in `tools/registry.ts`
588589
- [ ] Ran `bun run tool-metadata:generate` and committed the regenerated artifacts
589-
- [ ] Classified every model-visible, opaque, and Sim-durable request field
590+
- [ ] Classified every model-visible, opaque, Sim-durable, and internal-execution request field
590591
- [ ] Added shared model-input projection, centralized opaque rejection, or private provenance only
591592
where required
592593
- [ ] Confirmed ordinary third-party tool results are not generically sanitized

.cursor/commands/add-tools.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,22 @@ export const {serviceName}{Action}Tool: ToolConfig<
139139
- Always explicitly set `required: true` or `required: false`
140140
- Optional params should have `required: false`
141141

142+
## Resolved Secrets and Provenance Boundaries
143+
144+
- Leave ordinary external API inputs and third-party results unchanged. Add provenance handling only
145+
when an exact field is proven to cross a Sim model, durable-storage, or internal-execution boundary.
146+
- Project AI-consumed text/structured fields with the smallest exact `request.modelInput` selector.
147+
- Reject resolved secrets in opaque model input sent directly to an external provider with
148+
`request.opaqueModelInput`; never attach private metadata to an external URL or `directExecution`.
149+
- For authenticated internal routes, use `privateProvenance` for opaque model input or
150+
`request.secretProvenance` for durable writes and execution handoffs. Authenticate first, validate
151+
the exact selection and scope, strip the private envelope, then import or propagate provenance at
152+
the receiving boundary. Preserve documented headerless legacy behavior.
153+
- Never substitute secret plaintext into source, serialize plaintext provenance, hand-roll private
154+
headers, or blanket-sanitize tool results.
155+
- Add focused tests for named projection, identical unproven public text, malformed/incomplete
156+
metadata, metadata stripping, scope isolation, and legacy compatibility where applicable.
157+
142158
## Critical Rules for Outputs
143159

144160
### Output Types
@@ -450,6 +466,9 @@ All tool IDs MUST use `snake_case`: `{service}_{action}` (e.g., `x_create_tweet`
450466
- [ ] Tools registered in `tools/registry.ts`
451467
- [ ] `bun run tool-metadata:generate` run and the regenerated artifacts committed
452468
- [ ] Block wired: `tools.access`, dropdown options, subBlocks, `tools.config`, outputs, inputs
469+
- [ ] Model, durable-storage, and internal-execution boundaries use the shared provenance mechanisms
470+
only where a concrete Sim `{{...}}` resolution path requires them
471+
- [ ] Ordinary third-party inputs/results remain unchanged and private metadata never leaves Sim
453472

454473
## Final Validation (Required)
455474

0 commit comments

Comments
 (0)