@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.
- package/CHANGELOG.md +124 -0
- package/LICENSE +15 -0
- package/README.md +162 -0
- package/VERSION +1 -0
- package/conformance/README.md +72 -0
- package/conformance/fixtures.json +763 -0
- package/conformance/reference-bundle.ucw.json +135 -0
- package/docs/help/autolink.md +15 -0
- package/docs/help/bundle.md +47 -0
- package/docs/help/conformance.md +34 -0
- package/docs/help/export.md +20 -0
- package/docs/help/import.md +19 -0
- package/docs/help/overview.md +33 -0
- package/docs/help/portability.md +27 -0
- package/docs/help/provision.md +19 -0
- package/docs/help/provisioning.md +43 -0
- package/docs/help/roles.md +61 -0
- package/docs/help/runtime.md +78 -0
- package/docs/help/scaffold.md +47 -0
- package/docs/ssss-spec.md +1325 -0
- package/package.json +62 -0
- package/registry/core.json +225 -0
- package/registry/extensions/festech.json +134 -0
- package/scripts/audit-registry-field-usage.mjs +136 -0
- package/scripts/autolink.mjs +341 -0
- package/scripts/build-reference-bundle.mjs +169 -0
- package/scripts/cmd-export.mjs +72 -0
- package/scripts/cmd-help.mjs +60 -0
- package/scripts/cmd-import.mjs +71 -0
- package/scripts/cmd-inspect.mjs +78 -0
- package/scripts/cmd-new.mjs +262 -0
- package/scripts/cmd-provision.mjs +68 -0
- package/scripts/cmd-validate.mjs +43 -0
- package/scripts/conformance.mjs +408 -0
- package/scripts/lib/cli.mjs +92 -0
- package/scripts/release.sh +35 -0
- package/scripts/ssss.mjs +93 -0
- package/scripts/validate-skills.mjs +115 -0
- package/src/bundle.mjs +261 -0
- package/src/engine.mjs +452 -0
- package/src/frontmatter.mjs +109 -0
- package/src/registry.mjs +67 -0
- package/src/runtime.mjs +212 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the SSSS (Structured Semantic Syntax System) spec will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.7.0] - 2026-07-02
|
|
9
|
+
### Changed
|
|
10
|
+
- **BREAKING: universal frontmatter enforcement** — every SSSS document primitive
|
|
11
|
+
now requires `type`, `title`, `description`, and `timestamp`. Primitive-specific
|
|
12
|
+
required fields still apply after these universal fields.
|
|
13
|
+
- Registry `spec_version` -> `0.6`; spec header -> v0.6 draft. Reference bundle
|
|
14
|
+
metadata now targets SSSS core `0.6`.
|
|
15
|
+
- The reference engine, bundle validator, skill validator, runtime helpers,
|
|
16
|
+
scaffold output, conformance fixtures, shipped skills, and reference bundle now
|
|
17
|
+
share the universal metadata requirement.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- OKF compatibility guidance documenting `resource`, `tags`, and `aliases` as
|
|
21
|
+
recommended discovery enrichment fields while keeping the mandatory universal
|
|
22
|
+
metadata minimal and deterministic.
|
|
23
|
+
- Security hardening for the reference engine and CLI:
|
|
24
|
+
- VFS paths now reject absolute, root, dot-segment, empty-segment, backslash,
|
|
25
|
+
and directory targets.
|
|
26
|
+
- `workspace_id`, `idempotency_key`, and role names are constrained to safe
|
|
27
|
+
filesystem identifiers.
|
|
28
|
+
- Idempotency replay is bound to a request hash; same-key/different-payload
|
|
29
|
+
requests now fail as conflicts.
|
|
30
|
+
- Leases fail closed when unreadable and no longer derive filenames directly
|
|
31
|
+
from raw VFS paths.
|
|
32
|
+
- Bundle validation rejects unsafe and duplicate file paths, and export refuses
|
|
33
|
+
symlinked vault entries.
|
|
34
|
+
- Autolink skips symlinked Markdown targets before `--write`.
|
|
35
|
+
- Repo-local skill utility scripts avoid shell-string execution and validate
|
|
36
|
+
write-target names.
|
|
37
|
+
|
|
38
|
+
## [0.6.0] - 2026-07-02
|
|
39
|
+
### Added
|
|
40
|
+
- **Workflow Runtime & Daemon Contract (spec §11.8)** — standardizes workflow
|
|
41
|
+
trigger evaluation across daemon, cron, webhook, file-change, event, condition,
|
|
42
|
+
and manual runtimes. Workflows own `triggers[]`; external schedulers are only
|
|
43
|
+
wake-up mechanisms.
|
|
44
|
+
- **`@ssss/cli/runtime` helpers** — deterministic `planWorkflowTrigger()` and
|
|
45
|
+
`createRunEnvelope()` helpers derive `workflow_triggered` events, task
|
|
46
|
+
documents, and run documents through the Operation Contract.
|
|
47
|
+
- **Runtime conformance metadata/checks** — `conformance/fixtures.json` v1.3.0
|
|
48
|
+
declares trigger/misfire/concurrency vocabularies and proves duplicate daemon
|
|
49
|
+
ticks replay idempotently.
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
- Registry `spec_version` -> `0.5`; spec header -> v0.5 draft. Reference bundle
|
|
53
|
+
metadata now targets SSSS core `0.5`.
|
|
54
|
+
|
|
55
|
+
## [0.5.0] - 2026-06-25
|
|
56
|
+
### Added
|
|
57
|
+
- **`ssss new <dir>` scaffolder** — bootstrap a fresh SSSS-native repo in one command:
|
|
58
|
+
a starter `vault/` of core primitives (incl. a `tenant_private` task to demonstrate
|
|
59
|
+
the sale-drop), a dependency-free conformance test (`node --test`) that replays the
|
|
60
|
+
canonical fixtures through the engine and round-trips the vault as a `sale` bundle,
|
|
61
|
+
plus `package.json` (pinned to the matching `@ssss/cli` tag), `CLAUDE.md`, `README`,
|
|
62
|
+
and `.gitignore`. Flags: `--with-total-recall` (wire the Total Recall memory OS),
|
|
63
|
+
`--install` (npm install + Total Recall init + verify), `--ref`, `--name`, `--force`,
|
|
64
|
+
`--no-git`. All shelling-out uses `execFileSync` with fixed argv (no shell). Docs:
|
|
65
|
+
`ssss help scaffold`.
|
|
66
|
+
|
|
67
|
+
## [0.4.0] - 2026-06-24
|
|
68
|
+
### Added
|
|
69
|
+
- **The `.ucw` bundle format (spec §16, registry `bundle`)** — the canonical transportable
|
|
70
|
+
package of a vault: a manifest plus path-sorted files, content-hashed for integrity. The
|
|
71
|
+
manifest declares `ssss_core_version`, `required_extensions`, `export_profile`,
|
|
72
|
+
`primitive_inventory` (registry-driven, replacing ultrachat's closed `categories` enum),
|
|
73
|
+
`provisioning[]`, `parameters[]`, and `provenance{content_hash, exporter, signature?}`.
|
|
74
|
+
Harvested from ultrachat's `WorkspaceVfsPackageService` and generalized to be portability-
|
|
75
|
+
and registry-driven.
|
|
76
|
+
- **The provisioning contract (spec §17, registry `provisioning`)** — three deterministic,
|
|
77
|
+
idempotent verbs: `export` (pure, profile-filtered), `provision` (params + link-integrity
|
|
78
|
+
+ id-remap → replayable envelope plan), `import` (engine replay, idempotent via
|
|
79
|
+
idempotency_key). Adopts ultrachat's `WorkspaceProvisioningStep.mode`/`system` and
|
|
80
|
+
`WorkspaceGraphEdge.relation` as the canonical binding/dependency vocabularies, plus
|
|
81
|
+
`installMode` composition and structural-only `migration`+`patch` upgrades.
|
|
82
|
+
- **Reference engine for bundles (`src/bundle.mjs`)** — dependency-free `exportBundle`,
|
|
83
|
+
`validateBundle`, `provisionBundle`, `importBundle` over the registry bundle schema.
|
|
84
|
+
- **Reference bundle (`conformance/reference-bundle.ucw.json`, "Festival in a Box")** — a
|
|
85
|
+
real `sale`-profile bundle, built deterministically by `scripts/build-reference-bundle.mjs`.
|
|
86
|
+
Proves the §5.5 keystone: structural + resource_bound files ship, the `tenant_private`
|
|
87
|
+
ticket record is dropped. Round-tripped (validate → provision → import → re-import) by
|
|
88
|
+
`ssss conformance --engine`; 6/6 bundle/provisioning checks pass alongside the 9 fixtures.
|
|
89
|
+
- **`language_convention` documented (spec §11.7)** — the festech-shipped, `structural`
|
|
90
|
+
presentation-overlay primitive, formally placed in the semantic layer.
|
|
91
|
+
- **CLI command surface for the full lifecycle** — `ssss export`, `validate`, `inspect`,
|
|
92
|
+
`provision`, and `import` wire the bundle/provisioning verbs to the command line, plus
|
|
93
|
+
`ssss help [topic]` serving offline docs from `docs/help/` and `ssss version`. Each
|
|
94
|
+
command has its own `--help`. Shared parsing/formatting in `scripts/lib/cli.mjs`.
|
|
95
|
+
- **Open-source packaging** — `README.md`, `LICENSE` (ISC), `.gitignore`, and
|
|
96
|
+
`package.json` metadata (`engines`, `repository`, `files`) so `@ssss/cli` is
|
|
97
|
+
publishable and the runtime-read paths (`VERSION`, `docs/help`) ship in the tarball.
|
|
98
|
+
|
|
99
|
+
### Changed
|
|
100
|
+
- Registry `spec_version` → `0.4`; spec header + §14 → v0.4. Engine exports add `./bundle`.
|
|
101
|
+
|
|
102
|
+
## [0.3.0] - 2026-06-24
|
|
103
|
+
### Added
|
|
104
|
+
- **Portability classification (spec §5.5, registry `portability`)** — every document
|
|
105
|
+
primitive now declares a portability class: `structural` (the sellable business model),
|
|
106
|
+
`tenant_private` (the operator's private data, never sold), or `resource_bound` (needs a
|
|
107
|
+
real resource bound at provision). Export profiles `backup | template | sale` are filters
|
|
108
|
+
over these classes; `template`/`sale` exports MUST drop all `tenant_private` primitives.
|
|
109
|
+
Files MAY override their type default with `x_portability`. Lifted and generalized from
|
|
110
|
+
ultrachat's ad-hoc export filter in `WorkspaceVfsPackageService`.
|
|
111
|
+
- **`delete` envelope (spec §6.2)** — promoted from festech's `SsssOperationService` into
|
|
112
|
+
the canonical Operation Contract as the fourth envelope type. Removes a replace-type file,
|
|
113
|
+
rejects append-type targets, and emits a deletion event for audit. Idempotent.
|
|
114
|
+
- **Reference engine (`src/engine.mjs`, `src/registry.mjs`, `src/frontmatter.mjs`)** — the
|
|
115
|
+
canonical, dependency-free `@ssss/cli` Operation Contract engine. Harvested from total-recall
|
|
116
|
+
(§6.3 pipeline, idempotency replay from the audit log, `buildRepair`/§9 repair blocks) and
|
|
117
|
+
festech (`delete` envelope, `resolveContainedPath` path-traversal guard, registry-driven
|
|
118
|
+
content validation). Validates content against `registry/core.json` + `registry/extensions/*`
|
|
119
|
+
with no per-type code and no Zod/YAML dependency. Runs all 9 conformance fixtures in-process
|
|
120
|
+
via `ssss conformance --engine` (now wired into `npm test`).
|
|
121
|
+
|
|
122
|
+
### Changed
|
|
123
|
+
- Registry now defines **5 contract primitives** (added `delete`); `spec_version` → `0.3`.
|
|
124
|
+
- §5.1 Document Primitives table gains a **Portability** column.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Greg Iteen
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# SSSS — Structured Semantic Syntax System
|
|
2
|
+
|
|
3
|
+
> A database-free, Markdown-first schema and mutation contract for AI-agent state.
|
|
4
|
+
> Turn a running business into a single tradeable file — *a festival in a box.*
|
|
5
|
+
|
|
6
|
+
[](conformance/)
|
|
7
|
+
[](docs/ssss-spec.md)
|
|
8
|
+
[](docs/ssss-spec.md)
|
|
9
|
+
|
|
10
|
+
SSSS is the vendor-neutral standard and reference implementation shared by
|
|
11
|
+
[festech.live](https://festech.live), **ultrachat**, and **total-recall**. It defines:
|
|
12
|
+
|
|
13
|
+
- **Document primitives** — typed Markdown files with YAML frontmatter (`workflow`,
|
|
14
|
+
`rule`, `page`, `assistant`, …), validated against a registry, not hand-written code.
|
|
15
|
+
- **The Operation Contract** (§6) — four envelope types (`operation` / `patch` /
|
|
16
|
+
`event` / `delete`) for mutating a vault, with idempotency replay and audit.
|
|
17
|
+
- **The Workflow Runtime Contract** (§11.8) — workflows own triggers; daemons,
|
|
18
|
+
crons, and webhooks derive idempotent event/task/run envelopes from the vault.
|
|
19
|
+
- **Portability classification** (§5.5) — the keystone: every primitive is
|
|
20
|
+
`structural`, `tenant_private`, or `resource_bound`, so a vault can be *sold*
|
|
21
|
+
without leaking the operator's private data.
|
|
22
|
+
- **The `.ucw` bundle format** (§16) and **provisioning contract** (§17) — package a
|
|
23
|
+
vault, then `export → provision → import` it into a fresh tenant, deterministically.
|
|
24
|
+
|
|
25
|
+
This package, `@ssss/cli`, is **dependency-free**: a host needs neither Zod nor a YAML
|
|
26
|
+
library to be conformant. The reference engine *is* the validator.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install -g @ssss/cli # the `ssss` command
|
|
32
|
+
# or use it as a library:
|
|
33
|
+
npm install @ssss/cli
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Requires Node 18+. No runtime dependencies.
|
|
37
|
+
|
|
38
|
+
## Start a new project
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
ssss new my-app --install # scaffold + install + run the conformance test
|
|
42
|
+
ssss new my-app --with-total-recall # also wire the Total Recall memory OS
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Scaffolds a starter `vault/`, a dependency-free conformance test, and a `CLAUDE.md`.
|
|
46
|
+
See `ssss help scaffold`.
|
|
47
|
+
|
|
48
|
+
## Quick start — the lifecycle
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
vault ──export──▶ .ucw bundle ──provision──▶ envelope plan ──import──▶ new vault
|
|
52
|
+
(§16, pure) (§17, params + links) (§6, idempotent)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# 1. Package a vault as a sellable bundle (drops tenant-private data)
|
|
57
|
+
ssss export ./my-vault --profile sale --out festival.ucw.json
|
|
58
|
+
|
|
59
|
+
# 2. Inspect / verify it
|
|
60
|
+
ssss inspect festival.ucw.json --files
|
|
61
|
+
ssss validate festival.ucw.json
|
|
62
|
+
|
|
63
|
+
# 3. Stand up a fresh tenant from it
|
|
64
|
+
ssss import festival.ucw.json --vault ./new-tenant \
|
|
65
|
+
--param business_name="Acme Fest" --param domain=acme.live
|
|
66
|
+
|
|
67
|
+
# Re-running import commits nothing — it is idempotent.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Commands
|
|
71
|
+
|
|
72
|
+
| Command | Purpose |
|
|
73
|
+
|---------|---------|
|
|
74
|
+
| `ssss new <dir>` | Scaffold a new SSSS project (`--with-total-recall`, `--install`). |
|
|
75
|
+
| `ssss export <vault>` | Package a vault into a `.ucw` bundle (§16). Pure & deterministic. |
|
|
76
|
+
| `ssss validate <bundle>` | Check a bundle against the schema + portability rules. |
|
|
77
|
+
| `ssss inspect <bundle>` | Human-readable summary (manifest, inventory, params, steps). |
|
|
78
|
+
| `ssss provision <bundle>` | Plan an install: params + link integrity → envelopes (§17). |
|
|
79
|
+
| `ssss import <bundle>` | Replay a bundle/plan into a vault via the engine (idempotent). |
|
|
80
|
+
| `ssss autolink [dir]` | Generate OKF wiki-links across a vault. |
|
|
81
|
+
| `ssss conformance` | Run the canonical conformance suite (§12). |
|
|
82
|
+
| `ssss help [topic]` | Local docs: `runtime`, `portability`, `bundle`, `provisioning`, … |
|
|
83
|
+
|
|
84
|
+
Run `ssss <command> --help` for flags, or `ssss help <topic>` for concepts.
|
|
85
|
+
|
|
86
|
+
## Use as a library
|
|
87
|
+
|
|
88
|
+
```js
|
|
89
|
+
import { createEngine } from '@ssss/cli/engine';
|
|
90
|
+
import { exportBundle, validateBundle, provisionBundle, importBundle } from '@ssss/cli/bundle';
|
|
91
|
+
import { planWorkflowTrigger } from '@ssss/cli/runtime';
|
|
92
|
+
|
|
93
|
+
const bundle = exportBundle('./my-vault', { profile: 'sale', name: 'Festival in a Box' });
|
|
94
|
+
const { valid, errors } = validateBundle(bundle);
|
|
95
|
+
|
|
96
|
+
const engine = createEngine();
|
|
97
|
+
const plan = provisionBundle(bundle, { parameters: { domain: 'acme.live' }, workspaceId: 'ws-1' });
|
|
98
|
+
importBundle(plan.plan, './new-tenant', engine);
|
|
99
|
+
|
|
100
|
+
const workflowContent = `---
|
|
101
|
+
type: workflow
|
|
102
|
+
name: "Daily Digest"
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
1. Gather messages.
|
|
106
|
+
2. Summarize.
|
|
107
|
+
3. Send digest.
|
|
108
|
+
`;
|
|
109
|
+
const runtimePlan = planWorkflowTrigger({
|
|
110
|
+
workflowPath: 'workflows/daily-digest/WORKFLOW.md',
|
|
111
|
+
workflowContent,
|
|
112
|
+
workspaceId: 'ws-1',
|
|
113
|
+
trigger: { type: 'cron', id: 'daily-0800', cron: '0 8 * * *' },
|
|
114
|
+
scheduledFor: '2026-07-02T14:00:00.000Z',
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Exports: `@ssss/cli` / `@ssss/cli/engine` (Operation Contract engine),
|
|
119
|
+
`@ssss/cli/bundle` (export/provision/import), `@ssss/cli/registry`,
|
|
120
|
+
`@ssss/cli/runtime`, `@ssss/cli/frontmatter`.
|
|
121
|
+
|
|
122
|
+
## Portability — why a vault is safe to sell
|
|
123
|
+
|
|
124
|
+
| Class | Meaning | In a `sale` export? |
|
|
125
|
+
|-------|---------|---------------------|
|
|
126
|
+
| `structural` | The sellable business model (`workflow`, `rule`, `page`, …). | ✅ shipped |
|
|
127
|
+
| `resource_bound` | Needs a real resource bound at provision (`domain`, `phone_number`). | ✅ shipped (as a parameter/step) |
|
|
128
|
+
| `tenant_private` | The operator's private data (`task`, customer records). | ❌ **dropped** |
|
|
129
|
+
|
|
130
|
+
`template` and `sale` exports MUST drop every `tenant_private` file. The reference
|
|
131
|
+
bundle proves it — see `ssss help portability`.
|
|
132
|
+
|
|
133
|
+
## Conformance
|
|
134
|
+
|
|
135
|
+
A host MUST NOT claim SSSS conformance without passing the suite in
|
|
136
|
+
[`conformance/`](conformance/):
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
ssss conformance # structural + registry validation
|
|
140
|
+
ssss conformance --engine # + replay all fixtures + round-trip the reference bundle
|
|
141
|
+
npm test # == ssss conformance --engine
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Repository layout
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
docs/ssss-spec.md The normative specification (v0.6 draft).
|
|
148
|
+
docs/help/ Topic docs surfaced by `ssss help`.
|
|
149
|
+
registry/core.json 14 document + 5 contract primitives; bundle & provisioning schemas.
|
|
150
|
+
registry/extensions/ Application extension registries (e.g. festech).
|
|
151
|
+
src/engine.mjs Operation Contract engine (§6).
|
|
152
|
+
src/runtime.mjs Workflow trigger → event/task/run envelope planning (§11.8).
|
|
153
|
+
src/bundle.mjs export / validate / provision / import (§16–§17).
|
|
154
|
+
src/registry.mjs Registry-driven type + portability resolution.
|
|
155
|
+
src/frontmatter.mjs Zero-dependency YAML frontmatter.
|
|
156
|
+
scripts/ssss.mjs The `ssss` CLI dispatcher.
|
|
157
|
+
conformance/ Canonical fixtures + reference bundle.
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## License
|
|
161
|
+
|
|
162
|
+
ISC © Greg Iteen. See [LICENSE](LICENSE).
|
package/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.7.0
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# SSSS Conformance
|
|
2
|
+
|
|
3
|
+
This directory holds the **canonical conformance contract** for SSSS. It is the
|
|
4
|
+
shared test suite every implementation MUST pass to claim conformance (spec §12).
|
|
5
|
+
|
|
6
|
+
> A host MUST NOT claim SSSS conformance without passing the current fixture set.
|
|
7
|
+
|
|
8
|
+
## Files
|
|
9
|
+
|
|
10
|
+
| File | Purpose |
|
|
11
|
+
|------|---------|
|
|
12
|
+
| [`fixtures.json`](fixtures.json) | Canonical request/response fixtures for the Operation Contract (spec §6). |
|
|
13
|
+
| [`reference-bundle.ucw.json`](reference-bundle.ucw.json) | The canonical `.ucw` reference bundle (spec §16, "Festival in a Box"). A `sale`-profile export, content-hashed; round-tripped by the runner. Rebuild with `node scripts/build-reference-bundle.mjs`. |
|
|
14
|
+
| `../registry/core.json` | The 14 core document primitives + 5 contract primitives, plus the `runtime` (§11.8), `bundle` (§16), and `provisioning` (§17) schemas the standard owns. |
|
|
15
|
+
|
|
16
|
+
## Implementations under test
|
|
17
|
+
|
|
18
|
+
| Implementation | SSSS surface | Core primitives | Extensions |
|
|
19
|
+
|----------------|--------------|-----------------|------------|
|
|
20
|
+
| **festech.live** | `SsssOperationService` + `SsssLeaseService`, Postgres event log, ~4,024 vault files | all 14 ✓ | 118 app primitives |
|
|
21
|
+
| **ultrachat** | SQL `ssss_core_contract` + hardening migrations, `SsssApiClient`, ~1,110 vault files | (audit pending) | app primitives |
|
|
22
|
+
| **total-recall** | Markdown-native kernel, `validate-schema.mjs`, memory vault | memory-centric subset | memory categories |
|
|
23
|
+
|
|
24
|
+
## How to run
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx ssss conformance # structural + registry portability validation
|
|
28
|
+
npx ssss conformance --engine # also replay all fixtures + round-trip the reference bundle in-process
|
|
29
|
+
npx ssss conformance --endpoint <url> --token <pat> # run fixtures against a live host
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The runner validates that the fixture file is well-formed and that every
|
|
33
|
+
`expected_response` is internally consistent with the envelope rules. With
|
|
34
|
+
`--engine`, it replays every fixture through the reference engine (`src/engine.mjs`)
|
|
35
|
+
checks workflow runtime planning (`src/runtime.mjs`, spec §11.8), and round-trips
|
|
36
|
+
the reference bundle (validate → provision → import → re-import, spec §16/§17)
|
|
37
|
+
against a temp vault — proving idempotency and that no `tenant_private` file ever
|
|
38
|
+
lands. With `--endpoint`, it POSTs each fixture's `request` to a host's Operation
|
|
39
|
+
Contract endpoint and diffs the response.
|
|
40
|
+
|
|
41
|
+
## Core vs. extension registry
|
|
42
|
+
|
|
43
|
+
The standard owns only the **core**: the 14 document primitives and 5 contract
|
|
44
|
+
primitives in [`../registry/core.json`](../registry/core.json), plus the `runtime`
|
|
45
|
+
(§11.8), `bundle` (§16), and `provisioning` (§17) schemas. Every conformant
|
|
46
|
+
implementation maps to the same core.
|
|
47
|
+
|
|
48
|
+
Applications **extend** the core with their own primitives (festech has 118 —
|
|
49
|
+
`meeting`, `phone_number`, `inventory_item`, `language_convention`, …). Extensions:
|
|
50
|
+
|
|
51
|
+
- MUST NOT redefine or shadow a core type.
|
|
52
|
+
- Live in the application's own extension registry, not here.
|
|
53
|
+
- SHOULD follow the same schema shape as core entries (`required_fields`,
|
|
54
|
+
`append_only`, enums) so the same validator handles them.
|
|
55
|
+
|
|
56
|
+
## ⚠️ Open reconciliation items (spec ⇄ implementation drift)
|
|
57
|
+
|
|
58
|
+
These are real divergences found between the canonical spec and shipped
|
|
59
|
+
implementations. Each needs a decision (amend the spec via §15, or fix the impl)
|
|
60
|
+
before v1.0.
|
|
61
|
+
|
|
62
|
+
| # | Item | Spec says | festech impl does | Proposed resolution |
|
|
63
|
+
|---|------|-----------|-------------------|---------------------|
|
|
64
|
+
| 1 | **`delete` envelope** | §6.2 defines only `operation`, `patch`, `event`. | Implements a 4th envelope type `delete` (remove a VFS file). | ✅ **Resolved (v0.3).** §6.2 now defines `delete` as the canonical 4th envelope; the reference engine and fixture-009 cover it. |
|
|
65
|
+
| 2 | **Error codes** | §6.5 lists `401, 403, 409, 422, 500`. | Also returns `400` (invalid request / path traversal) and `404` (patch/delete target missing). | ✅ **Resolved.** §6.5 now lists `400` and `404` alongside the original five; `conformance/fixtures.json`'s `error_codes` block already documented all seven. |
|
|
66
|
+
| 3 | **Registry source of truth** | §5 defines primitives in prose. | festech keeps a 131-entry `primitive-registry.json`; ultrachat encodes the contract in SQL migrations. | ✅ **Resolved.** Canonical machine-readable core now lives in `registry/core.json` + `registry/extensions/*`; the reference engine validates against it (registry-driven, no per-type code). Apps re-derive in Track F. |
|
|
67
|
+
| 4 | **`language_convention` primitive** | Not in §5. §11.1 forbids translating control keys. | festech registers a `language_convention` primitive (multilingual authoring). | ✅ **Resolved (v0.4).** Documented in §11.7 as a `structural` presentation-overlay primitive (extension-owned). It never translates control keys — semantic-at-presentation, deterministic-at-validation. |
|
|
68
|
+
|
|
69
|
+
The point of this directory: drift like the above is invisible when each app keeps
|
|
70
|
+
its own copy of "the standard." Centralizing the fixtures + core registry here, and
|
|
71
|
+
having all three implementations run against them, is what turns "SSSS is a
|
|
72
|
+
standard" from a claim into a fact.
|