Skip to content

Commit 1a0446c

Browse files
committed
fix(api): align descriptions across resource families
1 parent 8ac4255 commit 1a0446c

18 files changed

Lines changed: 103 additions & 94 deletions

File tree

.agents/skills/v2-api-conventions/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ Use the [API description conventions](../../../apps/sim/lib/api/contracts/v2/ope
155155

156156
Keep archive versus permanent-delete behavior, replacement versus partial-update semantics, partial success, retry safety, redaction, and asynchronous completion explicit. Verify these claims against the implementation. Describe observable behavior without exposing storage formats, locking mechanisms, internal identifiers, deployment architecture, or implementation history unless that detail changes how the caller must use the API.
157157

158+
Reuse wording across resource families when behavior matches: “Omitted fields remain unchanged,” “Archive,” and “permanently delete.” Prefer “during the request” or “asynchronously” to “settled inline.” Preserve real semantic differences; do not standardize them away.
159+
158160
Put field-specific rules in the source schema and reuse shared authentication and pagination wording. Shared schema descriptions also feed CLI help, so refer to related operation names rather than HTTP paths. Regenerate OpenAPI, CLI metadata, and CLI docs after changing their source descriptions; never hand-edit generated output.
159161

160162
## Rule 6 — a transient failure says when to come back

apps/docs/openapi-v2-files-audit.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"get": {
4444
"operationId": "listFiles",
4545
"summary": "List Files",
46-
"description": "List workspace files with search, sorting, folder filtering, and opaque cursor pagination. Defaults to active files; pass `scope=archived` to page over soft-deleted ones. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.",
46+
"description": "List active workspace files with folder filtering, search, sorting, and cursor pagination. Use `scope=archived` to find files available for restoration. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.",
4747
"x-sim-operation": "files.list",
4848
"x-oauth-scope": "api:read",
4949
"tags": ["Files"],
@@ -449,7 +449,7 @@
449449
"delete": {
450450
"operationId": "abortFileUpload",
451451
"summary": "Abort File Upload",
452-
"description": "Abort an active upload session and release provider-side multipart state.\n\nOAuth scope: `api:write`.",
452+
"description": "Abort an incomplete upload session and discard its uploaded data. Completed uploads cannot be aborted.\n\nOAuth scope: `api:write`.",
453453
"x-sim-operation": "files.upload.cancel",
454454
"x-oauth-scope": "api:write",
455455
"tags": ["Files"],
@@ -1407,7 +1407,7 @@
14071407
"get": {
14081408
"operationId": "getFile",
14091409
"summary": "Get File Metadata",
1410-
"description": "Get file metadata together with the nullable current public-share state.\n\nOAuth scope: `api:read`.",
1410+
"description": "Get file metadata and its public-share configuration. The `share` field is null when the file has never been shared.\n\nOAuth scope: `api:read`.",
14111411
"x-sim-operation": "files.read_metadata",
14121412
"x-oauth-scope": "api:read",
14131413
"tags": ["Files"],
@@ -1754,7 +1754,7 @@
17541754
"post": {
17551755
"operationId": "moveFileItems",
17561756
"summary": "Move Files",
1757-
"description": "Move up to 1,000 files to a canonical folder path or the workspace root.\n\nOAuth scope: `api:write`.",
1757+
"description": "Move up to 1,000 files to a folder path or the workspace root.\n\nOAuth scope: `api:write`.",
17581758
"x-sim-operation": "files.move",
17591759
"x-oauth-scope": "api:write",
17601760
"tags": ["Files"],
@@ -2169,7 +2169,7 @@
21692169
"get": {
21702170
"operationId": "searchFileContent",
21712171
"summary": "Search File Content",
2172-
"description": "Search indexed text in active workspace files and return matching lines with file IDs and line numbers. `folderPaths` limits both results and the coverage reported by `complete` and `indexStatus`. Because indexing is asynchronous, a missing term is unknown rather than absent when `complete` is false. `truncated` means additional matches exist beyond `maxResults`.\n\nOAuth scope: `api:read`.",
2172+
"description": "Search indexed text in active workspace files and return matching lines with file IDs and line numbers. `folderPaths` limits both results and reported coverage. Missing matches are inconclusive if `complete` is false or `indexStatus.skippedFiles` or `indexStatus.partialFiles` is nonzero. `truncated` means additional matches exist beyond `maxResults`.\n\nOAuth scope: `api:read`.",
21732173
"x-sim-operation": "files.search_content",
21742174
"x-oauth-scope": "api:read",
21752175
"tags": ["Files"],
@@ -2542,7 +2542,7 @@
25422542
"post": {
25432543
"operationId": "createFilesFolder",
25442544
"summary": "Create Folder",
2545-
"description": "Create a canonical folder path in a workspace.\n\nOAuth scope: `api:write`.",
2545+
"description": "Create a folder at the supplied workspace path.\n\nOAuth scope: `api:write`.",
25462546
"x-sim-operation": "files.folders.create",
25472547
"x-oauth-scope": "api:write",
25482548
"tags": ["Files"],
@@ -2614,7 +2614,7 @@
26142614
"patch": {
26152615
"operationId": "relocateFilesFolder",
26162616
"summary": "Rename or Move Folder",
2617-
"description": "Rename or move a folder and atomically rewrite descendant canonical paths.\n\nOAuth scope: `api:write`.",
2617+
"description": "Rename or move a folder and atomically update all descendant paths.\n\nOAuth scope: `api:write`.",
26182618
"x-sim-operation": "files.folders.update",
26192619
"x-oauth-scope": "api:write",
26202620
"tags": ["Files"],
@@ -2686,7 +2686,7 @@
26862686
"delete": {
26872687
"operationId": "deleteFilesFolder",
26882688
"summary": "Delete Folder",
2689-
"description": "Delete a folder, optionally including every nested file and folder.\n\nOAuth scope: `api:write`.",
2689+
"description": "Archive an empty folder, or set `recursive=true` to archive its files and subfolders. Use Restore Folder to recover the archived contents.\n\nOAuth scope: `api:write`.",
26902690
"x-sim-operation": "files.folders.delete",
26912691
"x-oauth-scope": "api:write",
26922692
"tags": ["Files"],
@@ -4204,7 +4204,7 @@
42044204
],
42054205
"additionalProperties": false,
42064206
"title": "File metadata",
4207-
"description": "Workspace file metadata enriched with nullable public-share state."
4207+
"description": "Workspace file metadata and current public-share configuration."
42084208
},
42094209
"V2FileMetadataResponse": {
42104210
"type": "object",

apps/docs/openapi-v2-knowledge.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
"post": {
191191
"operationId": "createKnowledgeBase",
192192
"summary": "Create Knowledge Base",
193-
"description": "Create a knowledge base in a workspace with optional folder placement and chunking configuration. An unknown `folderPath` is a `404`. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.",
193+
"description": "Create a knowledge base in a workspace with optional folder placement and chunking configuration. An unknown `folderPath` returns `404`. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.",
194194
"x-sim-operation": "knowledge.create",
195195
"x-oauth-scope": "api:write",
196196
"tags": ["Knowledge Bases"],
@@ -343,7 +343,7 @@
343343
"patch": {
344344
"operationId": "updateKnowledgeBase",
345345
"summary": "Update Knowledge Base",
346-
"description": "Update a knowledge base name, description, chunking configuration, or folder placement. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.",
346+
"description": "Update a knowledge base's name, description, chunking configuration, or folder placement. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.",
347347
"x-sim-operation": "knowledge.update",
348348
"x-oauth-scope": "api:write",
349349
"tags": ["Knowledge Bases"],
@@ -506,7 +506,7 @@
506506
"get": {
507507
"operationId": "listKnowledgeConnectors",
508508
"summary": "List Knowledge Connectors",
509-
"description": "List external sources connected to a knowledge base with opaque cursor pagination. Stored API keys and encrypted secret material are never returned. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.",
509+
"description": "List external sources connected to a knowledge base with cursor pagination. Stored API keys are never returned. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.",
510510
"x-sim-operation": "knowledge.connectors.list",
511511
"x-oauth-scope": "api:read",
512512
"tags": ["Knowledge Bases"],
@@ -631,7 +631,7 @@
631631
"post": {
632632
"operationId": "createKnowledgeConnector",
633633
"summary": "Create Knowledge Connector",
634-
"description": "Validate and connect an external source, then queue its initial synchronization. The apiKey field is write-only and is never returned. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.",
634+
"description": "Validate and connect an external source, then queue its initial synchronization. The `apiKey` field is never returned. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.",
635635
"x-sim-operation": "knowledge.connectors.create",
636636
"x-oauth-scope": "api:write",
637637
"tags": ["Knowledge Bases"],
@@ -718,7 +718,7 @@
718718
"get": {
719719
"operationId": "getKnowledgeConnector",
720720
"summary": "Get Knowledge Connector",
721-
"description": "Get one connector and its ten most recent synchronization attempts. Stored API keys and encrypted secret material are never returned. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.",
721+
"description": "Get one connector and its ten most recent synchronization attempts. Stored API keys are never returned. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:read`.",
722722
"x-sim-operation": "knowledge.connectors.read",
723723
"x-oauth-scope": "api:read",
724724
"tags": ["Knowledge Bases"],
@@ -1391,7 +1391,7 @@
13911391
"get": {
13921392
"operationId": "listKnowledgeTags",
13931393
"summary": "List Tags",
1394-
"description": "List the knowledge base's tag vocabulary: each tag's display name, the slot it is stored in, and its field type. Filters and document reads use display names; document writes address slots. Returns the complete set in one page; `nextCursor` is always null.\n\nOAuth scope: `api:read`.",
1394+
"description": "List the knowledge base's tag definitions with display names, write slots, and field types. Filters and document reads use display names; document writes use slots. Returns the complete set in one page; `nextCursor` is always null.\n\nOAuth scope: `api:read`.",
13951395
"x-sim-operation": "knowledge.tags.list",
13961396
"x-oauth-scope": "api:read",
13971397
"tags": ["Knowledge Bases"],
@@ -2160,7 +2160,7 @@
21602160
"delete": {
21612161
"operationId": "abortKnowledgeDocumentUpload",
21622162
"summary": "Abort Document Upload",
2163-
"description": "Abort an incomplete upload and discard provider-side multipart state.\n\nOAuth scope: `api:write`.",
2163+
"description": "Abort an incomplete upload session and discard its uploaded data. Completed uploads cannot be aborted.\n\nOAuth scope: `api:write`.",
21642164
"x-sim-operation": "knowledge.documents.upload.cancel",
21652165
"x-oauth-scope": "api:write",
21662166
"tags": ["Knowledge Bases"],
@@ -2489,7 +2489,7 @@
24892489
"get": {
24902490
"operationId": "getKnowledgeDocument",
24912491
"summary": "Get Document",
2492-
"description": "Get document detail, processing state, and connector provenance.\n\nOAuth scope: `api:read`.",
2492+
"description": "Get document metadata, processing status, and source connector details.\n\nOAuth scope: `api:read`.",
24932493
"x-sim-operation": "knowledge.documents.read",
24942494
"x-oauth-scope": "api:read",
24952495
"tags": ["Knowledge Bases"],
@@ -2576,7 +2576,7 @@
25762576
"patch": {
25772577
"operationId": "updateKnowledgeDocument",
25782578
"summary": "Update Document",
2579-
"description": "Rename a document, change search availability, update tag slots, or requeue processing. Omitted fields remain unchanged; indexing state is read-only. Use List Tags to resolve names to slots and Get Document for connector provenance, which this response omits. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.",
2579+
"description": "Rename a document, change search availability, update tag slots, or requeue processing. Omitted fields remain unchanged; indexing state is read-only. Use List Tags to resolve names to slots and Get Document for source connector details, which this response omits. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.",
25802580
"x-sim-operation": "knowledge.documents.update",
25812581
"x-oauth-scope": "api:write",
25822582
"tags": ["Knowledge Bases"],
@@ -3017,7 +3017,7 @@
30173017
"delete": {
30183018
"operationId": "deleteKnowledgeFolder",
30193019
"summary": "Delete Folder",
3020-
"description": "Delete a folder, optionally including nested folders and knowledge bases.\n\nOAuth scope: `api:write`.",
3020+
"description": "Archive an empty folder, or set `recursive=true` to archive its subfolders and knowledge bases. Use Restore Knowledge Base to recover knowledge bases.\n\nOAuth scope: `api:write`.",
30213021
"x-sim-operation": "knowledge.folders.delete",
30223022
"x-oauth-scope": "api:write",
30233023
"tags": ["Knowledge Bases"],

apps/docs/openapi-v2-logs.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"get": {
4040
"operationId": "listLogs",
4141
"summary": "List Logs",
42-
"description": "List logs with filters, selectable detail, sorting, and cursor pagination. `includeJobRuns=true` includes chat and Sim-agent jobs only with `sortBy=startedAt`, because other orderings are unsupported. `files` contains only run-produced files; use the files API for input attachments. Expired runs are hard-deleted. Retention is 30 days from run start on Free, unbounded on Pro and Team, and configured per organization on Enterprise with an optional workspace override. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.",
42+
"description": "List logs with filters, selectable detail, sorting, and cursor pagination. `includeJobRuns=true` includes chat and Sim-agent jobs only with `sortBy=startedAt`, because other orderings are unsupported. `files` contains only run-produced files; use the files API for input attachments. Expired runs are permanently deleted. Retention is 30 days from run start on Free, unlimited on Pro and Team, and configured per organization on Enterprise with workspace overrides. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.",
4343
"x-sim-operation": "logs.list",
4444
"x-oauth-scope": "api:read",
4545
"tags": ["Logs"],
@@ -356,7 +356,7 @@
356356
"get": {
357357
"operationId": "getLog",
358358
"summary": "Get Log",
359-
"description": "Get a run's workflow graph, trace spans, final output, and cost. Trace spans expire separately, so an empty `traceSpans` array does not prove none were recorded. Expired runs are hard-deleted. Retention is 30 days from run start on Free, unbounded on Pro and Team, and configured per organization on Enterprise with an optional workspace override. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.",
359+
"description": "Get a run's workflow graph, trace spans, final output, and cost. Trace spans expire separately, so an empty `traceSpans` array does not prove none were recorded. Expired runs are permanently deleted. Retention is 30 days from run start on Free, unlimited on Pro and Team, and configured per organization on Enterprise with workspace overrides. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.",
360360
"x-sim-operation": "logs.read_detail",
361361
"x-oauth-scope": "api:read",
362362
"tags": ["Logs"],
@@ -428,7 +428,7 @@
428428
"get": {
429429
"operationId": "getLogStats",
430430
"summary": "Get Log Statistics",
431-
"description": "Get run counts, success and error counts, and latency by workspace or workflow. Default bounds span recorded runs, or the last 24 hours when empty. Buckets may extend past the end. Folder filters include descendants; `workflowsTruncated` affects series, not totals. Expired runs are hard-deleted. Retention is 30 days from run start on Free, unbounded on Pro and Team, and configured per organization on Enterprise with an optional workspace override. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.",
431+
"description": "Get run counts, success and error counts, and latency by workspace or workflow. Default bounds span recorded runs, or the last 24 hours when empty. Buckets may extend past the end. Folder filters include descendants; `workflowsTruncated` affects series, not totals. Expired runs are permanently deleted. Retention is 30 days from run start on Free, unlimited on Pro and Team, and configured per organization on Enterprise with workspace overrides. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:read`.",
432432
"x-sim-operation": "logs.read_stats",
433433
"x-oauth-scope": "api:read",
434434
"tags": ["Logs"],

0 commit comments

Comments
 (0)