@gregiteen/ssss-cli 0.7.0

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/LICENSE +15 -0
  3. package/README.md +162 -0
  4. package/VERSION +1 -0
  5. package/conformance/README.md +72 -0
  6. package/conformance/fixtures.json +763 -0
  7. package/conformance/reference-bundle.ucw.json +135 -0
  8. package/docs/help/autolink.md +15 -0
  9. package/docs/help/bundle.md +47 -0
  10. package/docs/help/conformance.md +34 -0
  11. package/docs/help/export.md +20 -0
  12. package/docs/help/import.md +19 -0
  13. package/docs/help/overview.md +33 -0
  14. package/docs/help/portability.md +27 -0
  15. package/docs/help/provision.md +19 -0
  16. package/docs/help/provisioning.md +43 -0
  17. package/docs/help/roles.md +61 -0
  18. package/docs/help/runtime.md +78 -0
  19. package/docs/help/scaffold.md +47 -0
  20. package/docs/ssss-spec.md +1325 -0
  21. package/package.json +62 -0
  22. package/registry/core.json +225 -0
  23. package/registry/extensions/festech.json +134 -0
  24. package/scripts/audit-registry-field-usage.mjs +136 -0
  25. package/scripts/autolink.mjs +341 -0
  26. package/scripts/build-reference-bundle.mjs +169 -0
  27. package/scripts/cmd-export.mjs +72 -0
  28. package/scripts/cmd-help.mjs +60 -0
  29. package/scripts/cmd-import.mjs +71 -0
  30. package/scripts/cmd-inspect.mjs +78 -0
  31. package/scripts/cmd-new.mjs +262 -0
  32. package/scripts/cmd-provision.mjs +68 -0
  33. package/scripts/cmd-validate.mjs +43 -0
  34. package/scripts/conformance.mjs +408 -0
  35. package/scripts/lib/cli.mjs +92 -0
  36. package/scripts/release.sh +35 -0
  37. package/scripts/ssss.mjs +93 -0
  38. package/scripts/validate-skills.mjs +115 -0
  39. package/src/bundle.mjs +261 -0
  40. package/src/engine.mjs +452 -0
  41. package/src/frontmatter.mjs +109 -0
  42. package/src/registry.mjs +67 -0
  43. package/src/runtime.mjs +212 -0
@@ -0,0 +1,763 @@
1
+ {
2
+ "$schema": "https://ssss.dev/conformance/v1",
3
+ "version": "1.4.0",
4
+ "description": "Canonical SSSS Operation Contract conformance fixtures. These define the canonical request/response shapes for the Operation Contract (spec §6) and are the shared test contract every SSSS implementation MUST pass. A host is conformant only if, for every fixture, it produces the expected response and status code (spec §12).",
5
+ "spec_url": "../docs/ssss-spec.md",
6
+ "operation_types": {
7
+ "operation": {
8
+ "description": "Full atomic file write. Creates or fully replaces a VFS file.",
9
+ "required_fields": [
10
+ "type",
11
+ "idempotency_key",
12
+ "path",
13
+ "workspace_id",
14
+ "content"
15
+ ],
16
+ "optional_fields": [
17
+ "lease_id",
18
+ "intent",
19
+ "dry_run",
20
+ "actor"
21
+ ]
22
+ },
23
+ "patch": {
24
+ "description": "Partial frontmatter or body merge into an existing VFS file.",
25
+ "required_fields": [
26
+ "type",
27
+ "idempotency_key",
28
+ "path",
29
+ "workspace_id",
30
+ "patches"
31
+ ],
32
+ "optional_fields": [
33
+ "lease_id",
34
+ "intent",
35
+ "dry_run",
36
+ "actor"
37
+ ],
38
+ "patches_body_key": "__body__"
39
+ },
40
+ "event": {
41
+ "description": "Append-only immutable event. Never overwrites; stored in the SSSS event log.",
42
+ "required_fields": [
43
+ "type",
44
+ "idempotency_key",
45
+ "path",
46
+ "workspace_id",
47
+ "content"
48
+ ],
49
+ "optional_fields": [
50
+ "intent",
51
+ "actor"
52
+ ],
53
+ "note": "Content must be a valid JSON string for the event payload. Gated by the fixed 'write:event' permission (spec §6.3 Stage 5.5), not a resolved document type."
54
+ },
55
+ "delete": {
56
+ "description": "Deletes a VFS file.",
57
+ "required_fields": [
58
+ "type",
59
+ "idempotency_key",
60
+ "path",
61
+ "workspace_id"
62
+ ],
63
+ "optional_fields": [
64
+ "intent",
65
+ "actor"
66
+ ]
67
+ }
68
+ },
69
+ "idempotency": {
70
+ "ttl_hours": 24,
71
+ "key_format": "UUID v4 recommended",
72
+ "behavior": "If the same idempotency_key + workspace_id + request_hash is seen within TTL and previously committed=true, the server returns a replay response with the original operation_id without re-applying the mutation. Reusing the same idempotency_key + workspace_id with a different request_hash is an idempotency_conflict."
73
+ },
74
+ "validation_rules": {
75
+ "envelope": [
76
+ "type must be one of: operation, patch, event, delete",
77
+ "idempotency_key must be a safe replay identifier (letters, numbers, dot, underscore, hyphen; 1-128 chars)",
78
+ "path must be a relative VFS path string (no leading /)",
79
+ "workspace_id must be a safe filesystem identifier (letters, numbers, dot, underscore, hyphen; 1-128 chars)",
80
+ "content is required for type:operation and type:event",
81
+ "patches (object) is required for type:patch"
82
+ ],
83
+ "ssss_content": [
84
+ "Files in SSSS directories must have YAML frontmatter",
85
+ "Frontmatter must include a 'type' field matching a known primitive",
86
+ "Required fields for each primitive type must be present and non-empty",
87
+ "required_when-conditional fields must be present when their condition matches (spec §9)",
88
+ "Fields with a registry-declared enum must take one of the declared values",
89
+ "See /api/v1/ssss/schema for the full type schema definitions"
90
+ ],
91
+ "authorization": [
92
+ "Stage 5.5 (Granular Authorization): actor.role='system' bypasses all checks; actor.role='admin' gets write:*/read:*; any other role is resolved from roles/<role>/ROLE.md's permissions list.",
93
+ "A MISSING actor.role is DENIED, not promoted to admin (fail-closed — spec §6.3 Stage 3 MUST: a host exposing the Operation Contract to untrusted clients MUST overwrite actor with verified identity before this stage runs).",
94
+ "event envelopes are gated on the fixed permission 'write:event' (they have no resolved document type)."
95
+ ]
96
+ },
97
+ "runtime_contract": {
98
+ "description": "Workflow runtime conformance metadata (spec §11.8). A daemon or scheduler bridge reads workflow triggers from the vault and derives Operation Contract envelopes; no scheduler database is source-of-truth.",
99
+ "trigger_types": [
100
+ "manual",
101
+ "cron",
102
+ "interval",
103
+ "event",
104
+ "webhook",
105
+ "file_change",
106
+ "condition"
107
+ ],
108
+ "misfire_policies": [
109
+ "skip",
110
+ "run_once",
111
+ "catch_up"
112
+ ],
113
+ "concurrency_policies": [
114
+ "allow_parallel",
115
+ "skip_if_running",
116
+ "enqueue",
117
+ "replace"
118
+ ],
119
+ "idempotency_basis": "workspace_id + workflow_id + trigger_id + scheduled_for"
120
+ },
121
+ "fixtures": [
122
+ {
123
+ "id": "fixture-001",
124
+ "name": "Create assistant — valid operation",
125
+ "description": "A well-formed operation to create an assistant definition.",
126
+ "request": {
127
+ "type": "operation",
128
+ "idempotency_key": "11111111-1111-1111-1111-111111111111",
129
+ "path": "assistants/test-bot/ASSISTANT.md",
130
+ "workspace_id": "TEST_WORKSPACE_ID",
131
+ "actor": {
132
+ "role": "system"
133
+ },
134
+ "content": "---\ntype: assistant\ntitle: \"Test Bot\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: \"Test Bot\"\ndescription: \"A conformance test assistant.\"\nmodel: \"openai/gpt-4o\"\n---\n\n## Instructions\n\nYou are a conformance test assistant.",
135
+ "intent": "Conformance fixture: create a valid assistant"
136
+ },
137
+ "expected_response": {
138
+ "success": true,
139
+ "type": "operation",
140
+ "path": "assistants/test-bot/ASSISTANT.md",
141
+ "dry_run": false,
142
+ "validation": {
143
+ "valid": true,
144
+ "type": "assistant",
145
+ "errors": [],
146
+ "warnings": []
147
+ }
148
+ }
149
+ },
150
+ {
151
+ "id": "fixture-002",
152
+ "name": "Create assistant — missing required name field",
153
+ "description": "An operation with a missing 'name' field. Must return 422 with repair feedback.",
154
+ "request": {
155
+ "type": "operation",
156
+ "idempotency_key": "22222222-2222-2222-2222-222222222222",
157
+ "path": "assistants/bad-bot/ASSISTANT.md",
158
+ "workspace_id": "TEST_WORKSPACE_ID",
159
+ "content": "---\ntype: assistant\ntitle: \"Create Assistant — Missing Required Name Field\"\ntimestamp: \"2026-07-02T00:00:00Z\"\ndescription: \"Missing the name field.\"\n---\n\n## Instructions\n\nBroken bot.",
160
+ "intent": "Conformance fixture: missing required name field"
161
+ },
162
+ "expected_response": {
163
+ "success": false,
164
+ "validation": {
165
+ "valid": false,
166
+ "type": "assistant",
167
+ "errors": [
168
+ "Missing required field 'name' for type 'assistant' in assistants/bad-bot/ASSISTANT.md."
169
+ ]
170
+ },
171
+ "repair": {
172
+ "field_errors": [
173
+ {
174
+ "field": "name",
175
+ "issue": "Missing required field 'name' for type 'assistant'."
176
+ }
177
+ ]
178
+ }
179
+ },
180
+ "expected_http_status": 422
181
+ },
182
+ {
183
+ "id": "fixture-003",
184
+ "name": "Dry run — valid operation returns success without commit",
185
+ "description": "A dry_run request must return success: true and committed_at: null.",
186
+ "request": {
187
+ "type": "operation",
188
+ "idempotency_key": "33333333-3333-3333-3333-333333333333",
189
+ "path": "assistants/dry-run-bot/ASSISTANT.md",
190
+ "workspace_id": "TEST_WORKSPACE_ID",
191
+ "actor": {
192
+ "role": "system"
193
+ },
194
+ "content": "---\ntype: assistant\ntitle: \"Dry Run Bot\"\ndescription: \"Dry Run Bot SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: \"Dry Run Bot\"\n---\n\n## Instructions\n\nNot committed.",
195
+ "dry_run": true,
196
+ "intent": "Conformance fixture: dry run pre-flight check"
197
+ },
198
+ "expected_response": {
199
+ "success": true,
200
+ "dry_run": true,
201
+ "committed_at": null,
202
+ "validation": {
203
+ "valid": true,
204
+ "type": "assistant"
205
+ }
206
+ }
207
+ },
208
+ {
209
+ "id": "fixture-004",
210
+ "name": "Patch operation — update model field",
211
+ "description": "A patch that updates only the model field of an existing assistant.",
212
+ "preconditions": [
213
+ "fixture-001 must be committed first"
214
+ ],
215
+ "request": {
216
+ "type": "patch",
217
+ "idempotency_key": "44444444-4444-4444-4444-444444444444",
218
+ "path": "assistants/test-bot/ASSISTANT.md",
219
+ "workspace_id": "TEST_WORKSPACE_ID",
220
+ "actor": {
221
+ "role": "system"
222
+ },
223
+ "patches": {
224
+ "model": "anthropic/claude-opus-4-5"
225
+ },
226
+ "intent": "Conformance fixture: patch model to Claude Opus"
227
+ },
228
+ "expected_response": {
229
+ "success": true,
230
+ "type": "patch",
231
+ "validation": {
232
+ "valid": true,
233
+ "type": "assistant"
234
+ }
235
+ }
236
+ },
237
+ {
238
+ "id": "fixture-005",
239
+ "name": "Event — append immutable credit deduction event",
240
+ "description": "An event operation appending to the immutable event log.",
241
+ "request": {
242
+ "type": "event",
243
+ "idempotency_key": "55555555-5555-5555-5555-555555555555",
244
+ "path": "events/credit-deducted",
245
+ "workspace_id": "TEST_WORKSPACE_ID",
246
+ "actor": {
247
+ "role": "system"
248
+ },
249
+ "content": "{\"event_type\":\"credit_deducted\",\"amount_credits\":150,\"model_id\":\"openai/gpt-4o\",\"timestamp\":\"2026-05-16T00:00:00Z\"}",
250
+ "intent": "Conformance fixture: log a credit deduction event"
251
+ },
252
+ "expected_response": {
253
+ "success": true,
254
+ "type": "event",
255
+ "validation": {
256
+ "valid": true
257
+ }
258
+ }
259
+ },
260
+ {
261
+ "id": "fixture-006",
262
+ "name": "Idempotency replay — same key returns cached result",
263
+ "description": "Submitting fixture-001 a second time returns a replay response without re-committing.",
264
+ "preconditions": [
265
+ "fixture-001 must be committed first"
266
+ ],
267
+ "request": {
268
+ "type": "operation",
269
+ "idempotency_key": "11111111-1111-1111-1111-111111111111",
270
+ "path": "assistants/test-bot/ASSISTANT.md",
271
+ "workspace_id": "TEST_WORKSPACE_ID",
272
+ "actor": {
273
+ "role": "system"
274
+ },
275
+ "content": "---\ntype: assistant\ntitle: \"Test Bot\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: \"Test Bot\"\ndescription: \"A conformance test assistant.\"\nmodel: \"openai/gpt-4o\"\n---\n\n## Instructions\n\nYou are a conformance test assistant.",
276
+ "intent": "Conformance fixture: idempotency replay test"
277
+ },
278
+ "expected_response": {
279
+ "success": true,
280
+ "replay": {}
281
+ }
282
+ },
283
+ {
284
+ "id": "fixture-007",
285
+ "name": "Envelope validation — missing type field",
286
+ "description": "A request with a missing 'type' field must return 422.",
287
+ "request": {
288
+ "idempotency_key": "77777777-7777-7777-7777-777777777777",
289
+ "path": "assistants/missing-type/ASSISTANT.md",
290
+ "workspace_id": "TEST_WORKSPACE_ID",
291
+ "content": "---\ntype: assistant\ntitle: \"Missing Type Bot\"\ndescription: \"Missing Type Bot SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: \"Missing Type Bot\"\n---"
292
+ },
293
+ "expected_response": {
294
+ "success": false,
295
+ "validation": {
296
+ "valid": false,
297
+ "errors": [
298
+ "Invalid or missing 'type'. Must be one of: operation, patch, event, delete."
299
+ ]
300
+ }
301
+ },
302
+ "expected_http_status": 422
303
+ },
304
+ {
305
+ "id": "fixture-008",
306
+ "name": "Create workflow — valid operation",
307
+ "description": "A well-formed workflow definition.",
308
+ "request": {
309
+ "type": "operation",
310
+ "idempotency_key": "88888888-8888-8888-8888-888888888888",
311
+ "path": "workflows/daily-digest/WORKFLOW.md",
312
+ "workspace_id": "TEST_WORKSPACE_ID",
313
+ "actor": {
314
+ "role": "system"
315
+ },
316
+ "content": "---\ntype: workflow\ntitle: \"Daily Digest\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nworkflow_id: daily-digest\nname: \"Daily Digest\"\ndescription: \"Sends a daily summary email.\"\npriority: 80\ntriggers:\n - type: cron\n id: daily-0800\n cron: \"0 8 * * *\"\n timezone: \"America/Denver\"\n misfire_policy: run_once\n concurrency: skip_if_running\nneeds: []\nisActive: true\n---\n\n## Steps\n\n1. Gather unread inbox messages.\n2. Summarize via LLM.\n3. Send digest email.",
317
+ "intent": "Conformance fixture: create a valid cron workflow"
318
+ },
319
+ "expected_response": {
320
+ "success": true,
321
+ "type": "operation",
322
+ "validation": {
323
+ "valid": true,
324
+ "type": "workflow",
325
+ "errors": []
326
+ }
327
+ }
328
+ },
329
+ {
330
+ "id": "fixture-009",
331
+ "name": "Delete assistant — valid delete operation",
332
+ "description": "A well-formed delete operation to remove an assistant.",
333
+ "preconditions": [
334
+ "fixture-001 must be committed first"
335
+ ],
336
+ "request": {
337
+ "type": "delete",
338
+ "idempotency_key": "99999999-9999-9999-9999-999999999999",
339
+ "path": "assistants/test-bot/ASSISTANT.md",
340
+ "workspace_id": "TEST_WORKSPACE_ID",
341
+ "actor": {
342
+ "role": "system"
343
+ },
344
+ "intent": "Conformance fixture: delete test assistant"
345
+ },
346
+ "expected_response": {
347
+ "success": true,
348
+ "type": "delete",
349
+ "validation": {
350
+ "valid": true,
351
+ "errors": []
352
+ }
353
+ }
354
+ },
355
+ {
356
+ "id": "fixture-010",
357
+ "name": "Create security role — valid operation",
358
+ "description": "A well-formed operation to create a security role definition.",
359
+ "request": {
360
+ "type": "operation",
361
+ "idempotency_key": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
362
+ "path": "roles/admin/ROLE.md",
363
+ "workspace_id": "TEST_WORKSPACE_ID",
364
+ "actor": {
365
+ "role": "admin"
366
+ },
367
+ "content": "---\ntype: security_role\ntitle: \"Admin\"\ndescription: \"Admin SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: \"admin\"\npermissions:\n - \"write:assistant\"\n - \"write:workflow\"\n - \"write:rule\"\n - \"write:domain\"\n - \"write:page\"\n - \"write:security_role\"\n - \"write:task\"\n---\n\nFull administrative access.",
368
+ "intent": "Conformance fixture: create a valid security role"
369
+ },
370
+ "expected_response": {
371
+ "success": true,
372
+ "type": "operation",
373
+ "path": "roles/admin/ROLE.md",
374
+ "dry_run": false,
375
+ "validation": {
376
+ "valid": true,
377
+ "type": "security_role",
378
+ "errors": [],
379
+ "warnings": []
380
+ }
381
+ }
382
+ },
383
+ {
384
+ "id": "fixture-011",
385
+ "name": "Stage 5.5 fail-closed — missing actor is denied, not admin-promoted",
386
+ "description": "An otherwise-valid operation with NO actor field must be denied. Regression fixture for the fail-open default that was caught before this WIP was committed (spec §6.3 Stage 3 MUST).",
387
+ "request": {
388
+ "type": "operation",
389
+ "idempotency_key": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
390
+ "path": "assistants/no-actor-bot/ASSISTANT.md",
391
+ "workspace_id": "TEST_WORKSPACE_ID",
392
+ "content": "---\ntype: assistant\ntitle: \"No Actor Bot\"\ndescription: \"No Actor Bot SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: \"No Actor Bot\"\n---\n\n## Instructions\n\nShould never commit without a verified actor.",
393
+ "intent": "Conformance fixture: envelope with no actor must be denied"
394
+ },
395
+ "expected_response": {
396
+ "success": false,
397
+ "validation": {
398
+ "valid": false,
399
+ "type": "assistant",
400
+ "errors": [
401
+ "Access denied: role '(none)' lacks permission 'write:assistant'."
402
+ ]
403
+ },
404
+ "repair": {
405
+ "field_errors": [
406
+ {
407
+ "field": "actor.role",
408
+ "issue": "Missing actor.role — the envelope was not authorized by a verified identity."
409
+ }
410
+ ]
411
+ }
412
+ },
413
+ "expected_http_status": 422
414
+ },
415
+ {
416
+ "id": "fixture-012",
417
+ "name": "Memory schema_version 2 — all required_when fields present",
418
+ "description": "A memory node declaring schema_version: 2 with every conditionally-required field (spec §9) present must validate.",
419
+ "request": {
420
+ "type": "operation",
421
+ "idempotency_key": "cccccccc-cccc-cccc-cccc-cccccccccccc",
422
+ "path": "memory/prefer-atomic-writes.md",
423
+ "workspace_id": "TEST_WORKSPACE_ID",
424
+ "actor": {
425
+ "role": "system"
426
+ },
427
+ "content": "---\ntype: memory\ndescription: \"Prefer Atomic Writes SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nslug: prefer-atomic-writes\ncategory: patterns\ntitle: \"Prefer atomic writes\"\nstatus: active\nschema_version: 2\nconfidence: 0.9\nimportance: 4\nmodality: should\nsubject: engine\npredicate: performs\nobject: atomic_write\nsentiment_polarity: descriptive\n---\n\nWrite-then-rename, never write-in-place.",
428
+ "intent": "Conformance fixture: schema_version 2 memory with all conditional fields"
429
+ },
430
+ "expected_response": {
431
+ "success": true,
432
+ "type": "operation",
433
+ "validation": {
434
+ "valid": true,
435
+ "type": "memory",
436
+ "errors": []
437
+ }
438
+ }
439
+ },
440
+ {
441
+ "id": "fixture-013",
442
+ "name": "Memory schema_version 2 — missing required_when fields is denied",
443
+ "description": "A memory node declaring schema_version: 2 but omitting the conditionally-required fields must be denied. Regression fixture for the registry declaring required_when with zero engine enforcement.",
444
+ "request": {
445
+ "type": "operation",
446
+ "idempotency_key": "dddddddd-dddd-dddd-dddd-dddddddddddd",
447
+ "path": "memory/incomplete-schema2.md",
448
+ "workspace_id": "TEST_WORKSPACE_ID",
449
+ "actor": {
450
+ "role": "system"
451
+ },
452
+ "content": "---\ntype: memory\ndescription: \"Incomplete Schema 2 Node SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nslug: incomplete-schema2\ncategory: patterns\ntitle: \"Incomplete schema 2 node\"\nstatus: active\nschema_version: 2\n---\n\nMissing confidence/importance/modality/subject/predicate/object/sentiment_polarity.",
453
+ "intent": "Conformance fixture: schema_version 2 memory missing conditional fields"
454
+ },
455
+ "expected_response": {
456
+ "success": false,
457
+ "validation": {
458
+ "valid": false,
459
+ "type": "memory",
460
+ "errors": [
461
+ "Missing required field 'confidence' for type 'memory' when schema_version==2 in memory/incomplete-schema2.md.",
462
+ "Missing required field 'importance' for type 'memory' when schema_version==2 in memory/incomplete-schema2.md.",
463
+ "Missing required field 'modality' for type 'memory' when schema_version==2 in memory/incomplete-schema2.md.",
464
+ "Missing required field 'subject' for type 'memory' when schema_version==2 in memory/incomplete-schema2.md.",
465
+ "Missing required field 'predicate' for type 'memory' when schema_version==2 in memory/incomplete-schema2.md.",
466
+ "Missing required field 'object' for type 'memory' when schema_version==2 in memory/incomplete-schema2.md.",
467
+ "Missing required field 'sentiment_polarity' for type 'memory' when schema_version==2 in memory/incomplete-schema2.md."
468
+ ]
469
+ },
470
+ "expected_http_status": 422
471
+ }
472
+ },
473
+ {
474
+ "id": "fixture-014",
475
+ "name": "Task with an out-of-enum status is denied",
476
+ "description": "A task whose status is not one of the registry's declared enum values must be denied. Regression fixture for the registry declaring enums with zero engine enforcement.",
477
+ "request": {
478
+ "type": "operation",
479
+ "idempotency_key": "eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee",
480
+ "path": "tasks/bad-status.md",
481
+ "workspace_id": "TEST_WORKSPACE_ID",
482
+ "actor": {
483
+ "role": "system"
484
+ },
485
+ "content": "---\ntype: task\ntitle: \"Task With An Out Of Enum Status Is Denied\"\ndescription: \"Task With An Out Of Enum Status Is Denied SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T00:00:00Z\"\npriority: normal\ncategory: support\nstatus: archived\n---\n\n'archived' is not a declared task status.",
486
+ "intent": "Conformance fixture: task with invalid status enum value"
487
+ },
488
+ "expected_response": {
489
+ "success": false,
490
+ "validation": {
491
+ "valid": false,
492
+ "type": "task",
493
+ "errors": [
494
+ "Invalid value 'archived' for field 'status' on type 'task'; must be one of: pending, in_progress, done, failed."
495
+ ]
496
+ }
497
+ },
498
+ "expected_http_status": 422
499
+ },
500
+ {
501
+ "id": "fixture-015",
502
+ "name": "Create reporter security role — write:event only",
503
+ "description": "A limited role that may only append events, used to prove event envelopes are gated on 'write:event' rather than 'write:null'.",
504
+ "request": {
505
+ "type": "operation",
506
+ "idempotency_key": "ffffffff-ffff-ffff-ffff-ffffffffffff",
507
+ "path": "roles/reporter/ROLE.md",
508
+ "workspace_id": "TEST_WORKSPACE_ID",
509
+ "actor": {
510
+ "role": "system"
511
+ },
512
+ "content": "---\ntype: security_role\ntitle: \"Reporter\"\ndescription: \"Reporter SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: \"reporter\"\npermissions:\n - \"write:event\"\n---\n\nMay only append events (e.g. usage/telemetry logging).",
513
+ "intent": "Conformance fixture: create a write:event-only role"
514
+ },
515
+ "expected_response": {
516
+ "success": true,
517
+ "type": "operation",
518
+ "validation": {
519
+ "valid": true,
520
+ "type": "security_role",
521
+ "errors": []
522
+ }
523
+ }
524
+ },
525
+ {
526
+ "id": "fixture-016",
527
+ "name": "Event write by reporter role — allowed via write:event",
528
+ "description": "The reporter role (write:event only) may append an event. Proves event envelopes resolve a real permission, not 'write:null'.",
529
+ "preconditions": [
530
+ "fixture-015 must be committed first"
531
+ ],
532
+ "request": {
533
+ "type": "event",
534
+ "idempotency_key": "10101010-1010-1010-1010-101010101010",
535
+ "path": "events/report-logged",
536
+ "workspace_id": "TEST_WORKSPACE_ID",
537
+ "actor": {
538
+ "role": "reporter"
539
+ },
540
+ "content": "{\"event_type\":\"report_logged\",\"report_id\":\"r-1\"}",
541
+ "intent": "Conformance fixture: event write by a write:event-scoped role"
542
+ },
543
+ "expected_response": {
544
+ "success": true,
545
+ "type": "event",
546
+ "validation": {
547
+ "valid": true
548
+ }
549
+ }
550
+ },
551
+ {
552
+ "id": "fixture-017",
553
+ "name": "Create viewer security role — read:* only",
554
+ "description": "A read-only role with no write permissions of any kind, used to prove a role lacking write:event is correctly denied on event writes.",
555
+ "request": {
556
+ "type": "operation",
557
+ "idempotency_key": "20202020-2020-2020-2020-202020202020",
558
+ "path": "roles/viewer/ROLE.md",
559
+ "workspace_id": "TEST_WORKSPACE_ID",
560
+ "actor": {
561
+ "role": "system"
562
+ },
563
+ "content": "---\ntype: security_role\ntitle: \"Viewer\"\ndescription: \"Viewer SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: \"viewer\"\npermissions:\n - \"read:*\"\n---\n\nRead-only access; may not write anything, including events.",
564
+ "intent": "Conformance fixture: create a read-only role"
565
+ },
566
+ "expected_response": {
567
+ "success": true,
568
+ "type": "operation",
569
+ "validation": {
570
+ "valid": true,
571
+ "type": "security_role",
572
+ "errors": []
573
+ }
574
+ }
575
+ },
576
+ {
577
+ "id": "fixture-018",
578
+ "name": "Event write by viewer role — denied",
579
+ "description": "The viewer role (read:* only) must be denied on an event write against the fixed 'write:event' permission.",
580
+ "preconditions": [
581
+ "fixture-017 must be committed first"
582
+ ],
583
+ "request": {
584
+ "type": "event",
585
+ "idempotency_key": "30303030-3030-3030-3030-303030303030",
586
+ "path": "events/should-be-denied",
587
+ "workspace_id": "TEST_WORKSPACE_ID",
588
+ "actor": {
589
+ "role": "viewer"
590
+ },
591
+ "content": "{\"event_type\":\"should_not_land\"}",
592
+ "intent": "Conformance fixture: event write by a role lacking write:event"
593
+ },
594
+ "expected_response": {
595
+ "success": false,
596
+ "validation": {
597
+ "valid": false,
598
+ "errors": [
599
+ "Access denied: role 'viewer' lacks permission 'write:event'."
600
+ ]
601
+ },
602
+ "repair": {
603
+ "field_errors": [
604
+ {
605
+ "field": "actor.role",
606
+ "issue": "Insufficient permissions."
607
+ }
608
+ ]
609
+ }
610
+ },
611
+ "expected_http_status": 422
612
+ },
613
+ {
614
+ "id": "fixture-019",
615
+ "name": "Valid skill primitive write",
616
+ "description": "A skill manifest with type, name, and description (the spec §5.4 skill example verbatim) must validate. Regression coverage: registry/core.json has defined a `skill` primitive since early in the project, but no fixture ever exercised it.",
617
+ "request": {
618
+ "type": "operation",
619
+ "idempotency_key": "31313131-3131-3131-3131-313131313131",
620
+ "path": "skills/deploy/SKILL.md",
621
+ "workspace_id": "TEST_WORKSPACE_ID",
622
+ "actor": {
623
+ "role": "system"
624
+ },
625
+ "content": "---\ntype: skill\ntitle: \"Deploy\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: deploy\ndescription: >-\n Deploy services with zero downtime. Use when the user mentions deploy,\n release, ship, or production push.\n---\n\n# Deploy\n\nSteps to deploy safely.",
626
+ "intent": "Conformance fixture: valid skill primitive (spec §5.4 example)"
627
+ },
628
+ "expected_response": {
629
+ "success": true,
630
+ "type": "operation",
631
+ "validation": {
632
+ "valid": true,
633
+ "type": "skill",
634
+ "errors": []
635
+ }
636
+ }
637
+ },
638
+ {
639
+ "id": "fixture-020",
640
+ "name": "Skill missing the type discriminator is denied",
641
+ "description": "A skill manifest with only name+description (valid under the open Agent Skills standard) but no `type: skill` is not a conformant SSSS-managed manifest — the registry can't route it without the discriminator (spec §5.4 skill).",
642
+ "request": {
643
+ "type": "operation",
644
+ "idempotency_key": "32323232-3232-3232-3232-323232323232",
645
+ "path": "skills/broken-skill/SKILL.md",
646
+ "workspace_id": "TEST_WORKSPACE_ID",
647
+ "actor": {
648
+ "role": "system"
649
+ },
650
+ "content": "---\ntitle: \"Broken Skill\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: broken-skill\ndescription: \"Missing the type discriminator.\"\n---\n\n# Broken",
651
+ "intent": "Conformance fixture: skill manifest missing type: skill"
652
+ },
653
+ "expected_response": {
654
+ "success": false,
655
+ "validation": {
656
+ "valid": false,
657
+ "errors": [
658
+ "Missing required frontmatter field 'type' in skills/broken-skill/SKILL.md."
659
+ ]
660
+ }
661
+ },
662
+ "expected_http_status": 422
663
+ },
664
+ {
665
+ "id": "fixture-021",
666
+ "name": "Skill missing description is denied",
667
+ "description": "A skill manifest declaring type: skill and name but no description is denied — description is a required_field on the skill primitive (spec §5.4).",
668
+ "request": {
669
+ "type": "operation",
670
+ "idempotency_key": "33333333-3333-3333-3333-333333333333",
671
+ "path": "skills/broken-skill-2/SKILL.md",
672
+ "workspace_id": "TEST_WORKSPACE_ID",
673
+ "actor": {
674
+ "role": "system"
675
+ },
676
+ "content": "---\ntype: skill\ntitle: \"Broken Skill 2\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: broken-skill-2\n---\n\n# Broken",
677
+ "intent": "Conformance fixture: skill manifest missing description"
678
+ },
679
+ "expected_response": {
680
+ "success": false,
681
+ "validation": {
682
+ "valid": false,
683
+ "type": "skill",
684
+ "errors": [
685
+ "Missing required field 'description' for type 'skill' in skills/broken-skill-2/SKILL.md."
686
+ ]
687
+ }
688
+ },
689
+ "expected_http_status": 422
690
+ },
691
+ {
692
+ "id": "fixture-022",
693
+ "name": "Runtime run primitive — valid queued run",
694
+ "description": "A worker-created run with the runtime status vocabulary must validate. This proves the daemon contract can persist run state through the same Operation Contract as every other primitive.",
695
+ "request": {
696
+ "type": "operation",
697
+ "idempotency_key": "34343434-3434-3434-3434-343434343434",
698
+ "path": "runs/daily-digest/run-runtime-001/RUN.md",
699
+ "workspace_id": "TEST_WORKSPACE_ID",
700
+ "actor": {
701
+ "role": "system"
702
+ },
703
+ "content": "---\ntype: run\ntitle: \"Run Runtime 001\"\ndescription: \"Run Runtime 001 SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T14:00:00.000Z\"\nrun_id: \"run-runtime-001\"\nworkflow_id: \"daily-digest\"\ntask_path: \"tasks/daily-digest/daily-0800-20260702T140000000Z.md\"\nworkspace_id: \"TEST_WORKSPACE_ID\"\nstatus: queued\nstarted_at: \"2026-07-02T14:00:00.000Z\"\n---\n\n### run created - 2026-07-02T14:00:00.000Z - queued\nTask claimed by the runtime worker.",
704
+ "intent": "Conformance fixture: valid runtime run primitive"
705
+ },
706
+ "expected_response": {
707
+ "success": true,
708
+ "type": "operation",
709
+ "validation": {
710
+ "valid": true,
711
+ "type": "run",
712
+ "errors": []
713
+ }
714
+ }
715
+ },
716
+ {
717
+ "id": "fixture-023",
718
+ "name": "Idempotency conflict — same key with different payload is denied",
719
+ "description": "Reusing fixture-001's idempotency key with a different request payload must fail instead of returning a false replay success.",
720
+ "preconditions": [
721
+ "fixture-001 must be committed first"
722
+ ],
723
+ "request": {
724
+ "type": "operation",
725
+ "idempotency_key": "11111111-1111-1111-1111-111111111111",
726
+ "path": "assistants/test-bot/ASSISTANT.md",
727
+ "workspace_id": "TEST_WORKSPACE_ID",
728
+ "actor": {
729
+ "role": "system"
730
+ },
731
+ "content": "---\ntype: assistant\ntitle: \"Test Bot V2 — Should Not Apply\"\ndescription: \"Test Bot V2 — Should Not Apply SSSS conformance fixture.\"\ntimestamp: \"2026-07-02T00:00:00Z\"\nname: \"Test Bot V2 — should not apply\"\n---\n\n## Instructions\n\nThis should not overwrite.",
732
+ "intent": "Conformance fixture: idempotency conflict test"
733
+ },
734
+ "expected_response": {
735
+ "success": false,
736
+ "validation": {
737
+ "valid": false,
738
+ "errors": [
739
+ "Idempotency conflict: key '11111111-1111-1111-1111-111111111111' was already committed for a different request payload."
740
+ ]
741
+ }
742
+ },
743
+ "expected_http_status": 409
744
+ }
745
+ ],
746
+ "error_codes": {
747
+ "400": "invalid_request — Invalid parameters, directory traversal, malformed request envelope, or path template mismatch",
748
+ "401": "unauthorized — Missing or invalid auth token / session",
749
+ "403": "forbidden — Access denied (workspace membership check failed or system scope isolation violation)",
750
+ "404": "not_found — The requested file to patch or delete does not exist",
751
+ "409": "lease_conflict, version_conflict, or idempotency_conflict — Lease locked, out-of-date expected version, or idempotency key replay payload mismatch",
752
+ "422": "validation_failed — Primitive registry/conformance validation errors (contains validation.errors and repair in body)",
753
+ "500": "internal_error — Unexpected server error, VFS write failed, or DB transactional RPC error"
754
+ },
755
+ "implementations": [
756
+ "festech.live",
757
+ "ultrachat",
758
+ "total-recall"
759
+ ],
760
+ "maintained_by": "SSSS standard (canonical: this repo)",
761
+ "provenance": "Seeded from the festech.live reference implementation, which authored the original shared contract; canonicalized here as the vendor-neutral source of truth.",
762
+ "last_updated": "2026-07-02"
763
+ }