@gregiteen/ssss-cli 0.7.1 → 0.8.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 +42 -4
- package/README.md +20 -4
- package/VERSION +1 -1
- package/conformance/README.md +11 -7
- package/conformance/fixtures.json +68 -2
- package/conformance/reference-bundle.ucw.json +21 -4
- package/docs/help/bundle.md +6 -2
- package/docs/help/import.md +2 -0
- package/docs/help/localization.md +43 -0
- package/docs/help/overview.md +8 -4
- package/docs/help/semantic.md +37 -0
- package/docs/ssss-spec.md +112 -7
- package/package.json +8 -3
- package/registry/core.json +43 -3
- package/scripts/audit-registry-field-usage.mjs +10 -1
- package/scripts/build-reference-bundle.mjs +24 -1
- package/scripts/cmd-export.mjs +3 -3
- package/scripts/cmd-localize.mjs +44 -0
- package/scripts/cmd-semantic.mjs +88 -0
- package/scripts/conformance.mjs +374 -2
- package/scripts/ssss.mjs +4 -0
- package/skills/ssss/SKILL.md +225 -0
- package/skills/ssss/evals/evals.json +37 -0
- package/skills/ssss/references/contract-reference.md +96 -0
- package/skills/ssss/scripts/validate-schema.mjs +258 -0
- package/skills/ssss/subagents/audit-ssss-contract.md +22 -0
- package/src/bundle.mjs +170 -34
- package/src/engine.mjs +78 -4
- package/src/registry.mjs +246 -6
- package/src/semantic.mjs +402 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,44 @@ All notable changes to the SSSS (Structured Semantic Syntax System) spec will be
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.8.0] - 2026-07-10
|
|
11
|
+
### Changed
|
|
12
|
+
- Core registry/spec version is now `0.7`. Registry `patterns`,
|
|
13
|
+
`immutable_fields`, and `references` are enforced by the reference engine and
|
|
14
|
+
covered by the parity auditor.
|
|
15
|
+
- Bundle import now preflights the complete envelope plan before committing, so a
|
|
16
|
+
late invalid document cannot leave a partial installation.
|
|
17
|
+
- Bundle validation now applies all registry field constraints and returns
|
|
18
|
+
structured errors for malformed file entries instead of throwing.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- Bundle provenance now uses the real published package identity,
|
|
22
|
+
`@gregiteen/ssss-cli`, instead of an unavailable package alias. The
|
|
23
|
+
reference bundle derives its exporter name and version from `package.json`.
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- A tracked, first-class `ssss` skill package with evidence-first canon routing,
|
|
27
|
+
a dependency-free document validator, contract reference, evals, and audit
|
|
28
|
+
prompt. The skill is included in the npm package allowlist.
|
|
29
|
+
- Conformance checks that pin default and reference-bundle exporter identities
|
|
30
|
+
to current package metadata.
|
|
31
|
+
- The `translation` document primitive and spec §11.9 semantic/localization
|
|
32
|
+
contract: exact-hash structural sources, immutable overlay identity, and
|
|
33
|
+
natural-language-only translated fields.
|
|
34
|
+
- `@gregiteen/ssss-cli/semantic`, `ssss semantic`, and `ssss localize` for
|
|
35
|
+
deterministic Unicode search/graph projections and non-destructive localized
|
|
36
|
+
materialization through a whole-projection staging directory.
|
|
37
|
+
- Fail-closed extension registry composition for malformed fields, invalid
|
|
38
|
+
regular expressions, symlinks, reserved ids, and core/sibling collisions.
|
|
39
|
+
- Privacy-safe semantic defaults that exclude `tenant_private` and
|
|
40
|
+
`resource_bound` data unless explicitly requested in an authorized context.
|
|
41
|
+
- Conformance fixtures 024–026 plus dedicated extension-registry,
|
|
42
|
+
semantic/localization, and expanded CLI smoke groups.
|
|
43
|
+
- Offline help for semantic search and localization, plus a security/UX impact
|
|
44
|
+
report for downstream host implementers.
|
|
45
|
+
|
|
8
46
|
## [0.7.1] - 2026-07-08
|
|
9
47
|
### Fixed
|
|
10
48
|
- Reduced `resource_bound` primitives to requirement declarations in `template`
|
|
@@ -62,7 +100,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
62
100
|
trigger evaluation across daemon, cron, webhook, file-change, event, condition,
|
|
63
101
|
and manual runtimes. Workflows own `triggers[]`; external schedulers are only
|
|
64
102
|
wake-up mechanisms.
|
|
65
|
-
- **`@ssss
|
|
103
|
+
- **`@gregiteen/ssss-cli/runtime` helpers** — deterministic `planWorkflowTrigger()` and
|
|
66
104
|
`createRunEnvelope()` helpers derive `workflow_triggered` events, task
|
|
67
105
|
documents, and run documents through the Operation Contract.
|
|
68
106
|
- **Runtime conformance metadata/checks** — `conformance/fixtures.json` v1.3.0
|
|
@@ -79,7 +117,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
79
117
|
a starter `vault/` of core primitives (incl. a `tenant_private` task to demonstrate
|
|
80
118
|
the sale-drop), a dependency-free conformance test (`node --test`) that replays the
|
|
81
119
|
canonical fixtures through the engine and round-trips the vault as a `sale` bundle,
|
|
82
|
-
plus `package.json` (pinned to the matching `@ssss
|
|
120
|
+
plus `package.json` (pinned to the matching `@gregiteen/ssss-cli` tag), `CLAUDE.md`, `README`,
|
|
83
121
|
and `.gitignore`. Flags: `--with-total-recall` (wire the Total Recall memory OS),
|
|
84
122
|
`--install` (npm install + Total Recall init + verify), `--ref`, `--name`, `--force`,
|
|
85
123
|
`--no-git`. All shelling-out uses `execFileSync` with fixed argv (no shell). Docs:
|
|
@@ -114,7 +152,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
114
152
|
`ssss help [topic]` serving offline docs from `docs/help/` and `ssss version`. Each
|
|
115
153
|
command has its own `--help`. Shared parsing/formatting in `scripts/lib/cli.mjs`.
|
|
116
154
|
- **Open-source packaging** — `README.md`, `LICENSE` (ISC), `.gitignore`, and
|
|
117
|
-
`package.json` metadata (`engines`, `repository`, `files`) so `@ssss
|
|
155
|
+
`package.json` metadata (`engines`, `repository`, `files`) so `@gregiteen/ssss-cli` is
|
|
118
156
|
publishable and the runtime-read paths (`VERSION`, `docs/help`) ship in the tarball.
|
|
119
157
|
|
|
120
158
|
### Changed
|
|
@@ -133,7 +171,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
133
171
|
the canonical Operation Contract as the fourth envelope type. Removes a replace-type file,
|
|
134
172
|
rejects append-type targets, and emits a deletion event for audit. Idempotent.
|
|
135
173
|
- **Reference engine (`src/engine.mjs`, `src/registry.mjs`, `src/frontmatter.mjs`)** — the
|
|
136
|
-
canonical, dependency-free `@ssss
|
|
174
|
+
canonical, dependency-free `@gregiteen/ssss-cli` Operation Contract engine. Harvested from total-recall
|
|
137
175
|
(§6.3 pipeline, idempotency replay from the audit log, `buildRepair`/§9 repair blocks) and
|
|
138
176
|
festech (`delete` envelope, `resolveContainedPath` path-traversal guard, registry-driven
|
|
139
177
|
content validation). Validates content against `registry/core.json` + `registry/extensions/*`
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
> Turn a running business into a single tradeable file — *a festival in a box.*
|
|
5
5
|
|
|
6
6
|
[](conformance/)
|
|
7
|
-
[](docs/ssss-spec.md)
|
|
8
8
|
[](docs/ssss-spec.md)
|
|
9
9
|
|
|
10
10
|
SSSS is the vendor-neutral standard and reference implementation shared by
|
|
@@ -16,6 +16,8 @@ SSSS is the vendor-neutral standard and reference implementation shared by
|
|
|
16
16
|
`event` / `delete`) for mutating a vault, with idempotency replay and audit.
|
|
17
17
|
- **The Workflow Runtime Contract** (§11.8) — workflows own triggers; daemons,
|
|
18
18
|
crons, and webhooks derive idempotent event/task/run envelopes from the vault.
|
|
19
|
+
- **Semantic projection and localization** (§11.9) — deterministic graph/search
|
|
20
|
+
records and hash-bound translation overlays, with private data excluded by default.
|
|
19
21
|
- **Portability classification** (§5.5) — the keystone: every primitive is
|
|
20
22
|
`structural`, `tenant_private`, or `resource_bound`, so a vault can be *sold*
|
|
21
23
|
without leaking the operator's private data.
|
|
@@ -77,6 +79,8 @@ ssss import festival.ucw.json --vault ./new-tenant \
|
|
|
77
79
|
| `ssss inspect <bundle>` | Human-readable summary (manifest, inventory, params, steps). |
|
|
78
80
|
| `ssss provision <bundle>` | Plan an install: params + link integrity → envelopes (§17). |
|
|
79
81
|
| `ssss import <bundle>` | Replay a bundle/plan into a vault via the engine (idempotent). |
|
|
82
|
+
| `ssss semantic <vault>` | Build or query a deterministic, privacy-safe semantic index (§11.9). |
|
|
83
|
+
| `ssss localize <vault>` | Materialize approved translations as a derived projection outside the vault. |
|
|
80
84
|
| `ssss autolink [dir]` | Generate OKF wiki-links across a vault. |
|
|
81
85
|
| `ssss conformance` | Run the canonical conformance suite (§12). |
|
|
82
86
|
| `ssss help [topic]` | Local docs: `runtime`, `portability`, `bundle`, `provisioning`, `leases`, … |
|
|
@@ -89,6 +93,7 @@ Run `ssss <command> --help` for flags, or `ssss help <topic>` for concepts.
|
|
|
89
93
|
import { createEngine } from '@gregiteen/ssss-cli/engine';
|
|
90
94
|
import { exportBundle, validateBundle, provisionBundle, importBundle } from '@gregiteen/ssss-cli/bundle';
|
|
91
95
|
import { planWorkflowTrigger } from '@gregiteen/ssss-cli/runtime';
|
|
96
|
+
import { buildSemanticIndex, searchSemanticIndex, materializeLocale } from '@gregiteen/ssss-cli/semantic';
|
|
92
97
|
|
|
93
98
|
const bundle = exportBundle('./my-vault', { profile: 'sale', name: 'Festival in a Box' });
|
|
94
99
|
const { valid, errors } = validateBundle(bundle);
|
|
@@ -113,11 +118,20 @@ const runtimePlan = planWorkflowTrigger({
|
|
|
113
118
|
trigger: { type: 'cron', id: 'daily-0800', cron: '0 8 * * *' },
|
|
114
119
|
scheduledFor: '2026-07-02T14:00:00.000Z',
|
|
115
120
|
});
|
|
121
|
+
|
|
122
|
+
const index = buildSemanticIndex('./my-vault', { locale: 'es' });
|
|
123
|
+
const matches = searchSemanticIndex(index, 'política de reembolsos');
|
|
124
|
+
materializeLocale('./my-vault', 'es', './derived/es');
|
|
116
125
|
```
|
|
117
126
|
|
|
118
127
|
Exports: `@gregiteen/ssss-cli` / `@gregiteen/ssss-cli/engine` (Operation Contract engine),
|
|
119
128
|
`@gregiteen/ssss-cli/bundle` (export/provision/import), `@gregiteen/ssss-cli/registry`,
|
|
120
|
-
`@gregiteen/ssss-cli/runtime`, `@gregiteen/ssss-cli/
|
|
129
|
+
`@gregiteen/ssss-cli/runtime`, `@gregiteen/ssss-cli/semantic`,
|
|
130
|
+
`@gregiteen/ssss-cli/frontmatter`.
|
|
131
|
+
|
|
132
|
+
Translations are structural overlay documents that target an exact source hash. Only
|
|
133
|
+
`title`, `description`, and body are translated; types, ids, permissions, enums,
|
|
134
|
+
relations, and other control fields remain sourced from the canonical document.
|
|
121
135
|
|
|
122
136
|
## Portability — why a vault is safe to sell
|
|
123
137
|
|
|
@@ -144,17 +158,19 @@ npm test # == ssss conformance --engine
|
|
|
144
158
|
## Repository layout
|
|
145
159
|
|
|
146
160
|
```
|
|
147
|
-
docs/ssss-spec.md The normative specification (v0.
|
|
161
|
+
docs/ssss-spec.md The normative specification (v0.7 draft).
|
|
148
162
|
docs/help/ Topic docs surfaced by `ssss help`.
|
|
149
|
-
registry/core.json
|
|
163
|
+
registry/core.json 15 document + 5 contract primitives; semantic, bundle & provisioning schemas.
|
|
150
164
|
registry/extensions/ Application extension registries (e.g. festech).
|
|
151
165
|
src/engine.mjs Operation Contract engine (§6).
|
|
152
166
|
src/runtime.mjs Workflow trigger → event/task/run envelope planning (§11.8).
|
|
167
|
+
src/semantic.mjs Deterministic semantic index + localization projection (§11.9).
|
|
153
168
|
src/bundle.mjs export / validate / provision / import (§16–§17).
|
|
154
169
|
src/registry.mjs Registry-driven type + portability resolution.
|
|
155
170
|
src/frontmatter.mjs Zero-dependency YAML frontmatter.
|
|
156
171
|
scripts/ssss.mjs The `ssss` CLI dispatcher.
|
|
157
172
|
conformance/ Canonical fixtures + reference bundle.
|
|
173
|
+
skills/ssss/ Packaged SSSS system skill and dependency-free validator.
|
|
158
174
|
```
|
|
159
175
|
|
|
160
176
|
## License
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.8.0
|
package/conformance/README.md
CHANGED
|
@@ -11,13 +11,13 @@ shared test suite every implementation MUST pass to claim conformance (spec §12
|
|
|
11
11
|
|------|---------|
|
|
12
12
|
| [`fixtures.json`](fixtures.json) | Canonical request/response fixtures for the Operation Contract (spec §6). |
|
|
13
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
|
+
| `../registry/core.json` | The 15 core document primitives + 5 contract primitives, plus `runtime` (§11.8), `semantic` (§11.9), `bundle` (§16), and `provisioning` (§17) contracts. |
|
|
15
15
|
|
|
16
16
|
## Implementations under test
|
|
17
17
|
|
|
18
18
|
| Implementation | SSSS surface | Core primitives | Extensions |
|
|
19
19
|
|----------------|--------------|-----------------|------------|
|
|
20
|
-
| **festech.live** | `SsssOperationService` + `SsssLeaseService`, Postgres event log, ~4,024 vault files |
|
|
20
|
+
| **festech.live** | `SsssOperationService` + `SsssLeaseService`, Postgres event log, ~4,024 vault files | integration audit required for core v0.7 | 118 app primitives |
|
|
21
21
|
| **ultrachat** | SQL `ssss_core_contract` + hardening migrations, `SsssApiClient`, ~1,110 vault files | (audit pending) | app primitives |
|
|
22
22
|
| **total-recall** | Markdown-native kernel, `validate-schema.mjs`, memory vault | memory-centric subset | memory categories |
|
|
23
23
|
|
|
@@ -32,8 +32,10 @@ npx ssss conformance --endpoint <url> --token <pat> # run fixtures against a l
|
|
|
32
32
|
The runner validates that the fixture file is well-formed and that every
|
|
33
33
|
`expected_response` is internally consistent with the envelope rules. With
|
|
34
34
|
`--engine`, it replays every fixture through the reference engine (`src/engine.mjs`),
|
|
35
|
-
checks workflow runtime planning (`src/runtime.mjs`, spec §11.8),
|
|
36
|
-
|
|
35
|
+
checks workflow runtime planning (`src/runtime.mjs`, spec §11.8), extension-registry
|
|
36
|
+
collision/schema/symlink safety, semantic search and localization (`src/semantic.mjs`,
|
|
37
|
+
§11.9), runs regression coverage for patch serialization and leases (§6/§7), and
|
|
38
|
+
round-trips the
|
|
37
39
|
reference bundle (validate → provision → import → re-import, spec §16/§17)
|
|
38
40
|
against a temp vault — proving idempotency, strict bundle shape validation, and
|
|
39
41
|
that no `tenant_private` or seller-bound `resource_bound` value ever lands. With
|
|
@@ -42,18 +44,20 @@ endpoint and diffs the response.
|
|
|
42
44
|
|
|
43
45
|
## Core vs. extension registry
|
|
44
46
|
|
|
45
|
-
The standard owns only the **core**: the
|
|
47
|
+
The standard owns only the **core**: the 15 document primitives and 5 contract
|
|
46
48
|
primitives in [`../registry/core.json`](../registry/core.json), plus the `runtime`
|
|
47
|
-
(§11.8), `bundle` (§16), and `provisioning`
|
|
49
|
+
(§11.8), `semantic` (§11.9), `bundle` (§16), and `provisioning` contracts. Every conformant
|
|
48
50
|
implementation maps to the same core.
|
|
49
51
|
|
|
50
52
|
Applications **extend** the core with their own primitives (festech has 118 —
|
|
51
53
|
`meeting`, `phone_number`, `inventory_item`, `language_convention`, …). Extensions:
|
|
52
54
|
|
|
53
55
|
- MUST NOT redefine or shadow a core type.
|
|
56
|
+
- MUST NOT redefine a type from a sibling extension.
|
|
57
|
+
- MUST be regular, non-symlinked JSON files with valid regex patterns and field lists.
|
|
54
58
|
- Live in the application's own extension registry, not here.
|
|
55
59
|
- SHOULD follow the same schema shape as core entries (`required_fields`,
|
|
56
|
-
`append_only`, enums) so the same validator handles them.
|
|
60
|
+
`append_only`, enums, patterns, immutable fields, references) so the same validator handles them.
|
|
57
61
|
|
|
58
62
|
## ⚠️ Open reconciliation items (spec ⇄ implementation drift)
|
|
59
63
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ssss.dev/conformance/v1",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
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
5
|
"spec_url": "../docs/ssss-spec.md",
|
|
6
6
|
"operation_types": {
|
|
@@ -86,6 +86,9 @@
|
|
|
86
86
|
"Required fields for each primitive type must be present and non-empty",
|
|
87
87
|
"required_when-conditional fields must be present when their condition matches (spec §9)",
|
|
88
88
|
"Fields with a registry-declared enum must take one of the declared values",
|
|
89
|
+
"Fields with a registry-declared pattern must match it",
|
|
90
|
+
"Registry-declared immutable fields cannot change through operation replacement or patch",
|
|
91
|
+
"Registry-declared document references must be safe, resolvable, type/portability-compatible, and hash-valid",
|
|
89
92
|
"See /api/v1/ssss/schema for the full type schema definitions"
|
|
90
93
|
],
|
|
91
94
|
"authorization": [
|
|
@@ -741,6 +744,69 @@
|
|
|
741
744
|
}
|
|
742
745
|
},
|
|
743
746
|
"expected_http_status": 409
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"id": "fixture-024",
|
|
750
|
+
"name": "Translation source — valid structural rule",
|
|
751
|
+
"description": "Creates the exact structural source used by the translation overlay fixtures.",
|
|
752
|
+
"request": {
|
|
753
|
+
"type": "operation",
|
|
754
|
+
"idempotency_key": "35353535-3535-3535-3535-353535353535",
|
|
755
|
+
"path": "rules/translatable-refund-rule.md",
|
|
756
|
+
"workspace_id": "TEST_WORKSPACE_ID",
|
|
757
|
+
"actor": { "role": "system" },
|
|
758
|
+
"content": "---\ntype: rule\ntitle: \"Translatable Refund Rule\"\ndescription: \"Structural source used by the translation conformance fixture.\"\ntimestamp: \"2026-07-10T00:00:00Z\"\nname: \"Translatable Refund Rule\"\n---\nRefunds are available before the deadline.",
|
|
759
|
+
"intent": "Conformance fixture: create a structural translation source"
|
|
760
|
+
},
|
|
761
|
+
"expected_response": {
|
|
762
|
+
"success": true,
|
|
763
|
+
"type": "operation",
|
|
764
|
+
"validation": { "valid": true, "type": "rule", "errors": [] }
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"id": "fixture-025",
|
|
769
|
+
"name": "Translation overlay — valid hash-bound Spanish projection",
|
|
770
|
+
"description": "A translation overlay with a safe source path, exact source hash, valid locale, and approved translatable fields must validate.",
|
|
771
|
+
"preconditions": ["fixture-024 must be committed first"],
|
|
772
|
+
"request": {
|
|
773
|
+
"type": "operation",
|
|
774
|
+
"idempotency_key": "36363636-3636-3636-3636-363636363636",
|
|
775
|
+
"path": "translations/es/rules/translatable-refund-rule.md",
|
|
776
|
+
"workspace_id": "TEST_WORKSPACE_ID",
|
|
777
|
+
"actor": { "role": "system" },
|
|
778
|
+
"content": "---\ntype: translation\ntitle: \"Spanish Refund Rule Translation\"\ndescription: \"Approved Spanish translation overlay conformance fixture.\"\ntimestamp: \"2026-07-10T00:00:00Z\"\ntranslation_id: translatable-refund-rule-es\nsource_path: rules/translatable-refund-rule.md\nsource_hash: sha256:bc61f36adc3aa1fa2c4da7a48841cb16bc56df0ec052f70d4ee8514a98dc6e62\nlocale: es\nstatus: approved\ntranslated_fields: [title, body]\ntranslated_title: Regla de reembolsos traducible\n---\nLos reembolsos están disponibles antes de la fecha límite.",
|
|
779
|
+
"intent": "Conformance fixture: valid translation primitive"
|
|
780
|
+
},
|
|
781
|
+
"expected_response": {
|
|
782
|
+
"success": true,
|
|
783
|
+
"type": "operation",
|
|
784
|
+
"validation": { "valid": true, "type": "translation", "errors": [] }
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
"id": "fixture-026",
|
|
789
|
+
"name": "Translation overlay — invalid locale is denied",
|
|
790
|
+
"description": "Registry pattern enforcement rejects non-BCP47 locale syntax before an invalid overlay can enter the vault.",
|
|
791
|
+
"preconditions": ["fixture-024 must be committed first"],
|
|
792
|
+
"request": {
|
|
793
|
+
"type": "operation",
|
|
794
|
+
"idempotency_key": "37373737-3737-3737-3737-373737373737",
|
|
795
|
+
"path": "translations/invalid/rules/translatable-refund-rule.md",
|
|
796
|
+
"workspace_id": "TEST_WORKSPACE_ID",
|
|
797
|
+
"actor": { "role": "system" },
|
|
798
|
+
"content": "---\ntype: translation\ntitle: \"Invalid Locale Translation\"\ndescription: \"Translation fixture that must be rejected.\"\ntimestamp: \"2026-07-10T00:00:00Z\"\ntranslation_id: invalid-locale-translation\nsource_path: rules/translatable-refund-rule.md\nsource_hash: sha256:bc61f36adc3aa1fa2c4da7a48841cb16bc56df0ec052f70d4ee8514a98dc6e62\nlocale: not_a_locale\nstatus: approved\ntranslated_fields: [title]\ntranslated_title: Invalid\n---\nInvalid.",
|
|
799
|
+
"intent": "Conformance fixture: invalid translation locale"
|
|
800
|
+
},
|
|
801
|
+
"expected_response": {
|
|
802
|
+
"success": false,
|
|
803
|
+
"validation": {
|
|
804
|
+
"valid": false,
|
|
805
|
+
"type": "translation",
|
|
806
|
+
"errors": ["Invalid format for field 'locale' on type 'translation'."]
|
|
807
|
+
}
|
|
808
|
+
},
|
|
809
|
+
"expected_http_status": 422
|
|
744
810
|
}
|
|
745
811
|
],
|
|
746
812
|
"error_codes": {
|
|
@@ -759,5 +825,5 @@
|
|
|
759
825
|
],
|
|
760
826
|
"maintained_by": "SSSS standard (canonical: this repo)",
|
|
761
827
|
"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-
|
|
828
|
+
"last_updated": "2026-07-10"
|
|
763
829
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "A complete music-festival operation as a tradeable SSSS bundle.",
|
|
5
5
|
"version": "1.0.0",
|
|
6
6
|
"exported_at": "1970-01-01T00:00:00.000Z",
|
|
7
|
-
"ssss_core_version": "0.
|
|
7
|
+
"ssss_core_version": "0.7",
|
|
8
8
|
"required_extensions": [
|
|
9
9
|
"festech"
|
|
10
10
|
],
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"page": 1,
|
|
16
16
|
"security_role": 1,
|
|
17
17
|
"rule": 1,
|
|
18
|
+
"translation": 1,
|
|
18
19
|
"workflow": 1
|
|
19
20
|
},
|
|
20
21
|
"provisioning": [
|
|
@@ -85,10 +86,10 @@
|
|
|
85
86
|
"description": "Satisfies the domain resource requirement field 'registrar'."
|
|
86
87
|
}
|
|
87
88
|
],
|
|
88
|
-
"file_count":
|
|
89
|
+
"file_count": 18,
|
|
89
90
|
"provenance": {
|
|
90
|
-
"content_hash": "sha256:
|
|
91
|
-
"exporter": "@ssss
|
|
91
|
+
"content_hash": "sha256:27c7c21826552f73dd14a56018454f4c19bda002029d5db42ecb14d77667b699",
|
|
92
|
+
"exporter": "@gregiteen/ssss-cli@0.8.0"
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
"files": [
|
|
@@ -140,6 +141,22 @@
|
|
|
140
141
|
"path": "tasks/index.md",
|
|
141
142
|
"content": "# Index — tasks\n\n- [Ticket 4821 Seat Change](./ticket-4821.md)\n"
|
|
142
143
|
},
|
|
144
|
+
{
|
|
145
|
+
"path": "translations/es/index.md",
|
|
146
|
+
"content": "# Index — translations/es\n\n- [rules/](./rules/index.md)\n"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"path": "translations/es/rules/index.md",
|
|
150
|
+
"content": "# Index — translations/es/rules\n\n- [Spanish Refund Policy Translation](./refund-policy.md)\n"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"path": "translations/es/rules/refund-policy.md",
|
|
154
|
+
"content": "---\ntype: translation\ntitle: Spanish Refund Policy Translation\ndescription: Approved Spanish presentation overlay for the festival refund policy.\ntimestamp: 2026-07-10T00:00:00Z\ntranslation_id: refund-policy-es\nsource_path: rules/refund-policy.md\nsource_hash: sha256:a5f97ef9e2cc143d397f87a96c7fc20f4a3cd0515835c2ab659c9ac6db0d07e3\nlocale: es\nstatus: approved\ntranslated_fields: [title, description, body]\ntranslated_title: Política de reembolsos\ntranslated_description: Explica cuándo están disponibles los reembolsos para asistentes.\n---\nLos reembolsos están disponibles hasta catorce días antes del evento."
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"path": "translations/index.md",
|
|
158
|
+
"content": "# Index — translations\n\n- [es/](./es/index.md)\n"
|
|
159
|
+
},
|
|
143
160
|
{
|
|
144
161
|
"path": "workflows/box-office.md",
|
|
145
162
|
"content": "---\ntype: workflow\ntitle: Box Office\ndescription: Ticket-sales workflow for a music festival.\ntimestamp: 2026-07-02T00:00:00Z\nname: Box Office\nslug: box-office\n---\nSell tickets, then hand the buyer to [[concierge]] for questions."
|
package/docs/help/bundle.md
CHANGED
|
@@ -13,7 +13,7 @@ integrity. The container file is conventionally named `*.ucw.json`.
|
|
|
13
13
|
"description": "...",
|
|
14
14
|
"version": "0.1.0",
|
|
15
15
|
"exported_at": "1970-01-01T00:00:00.000Z", // frozen → deterministic export
|
|
16
|
-
"ssss_core_version": "0.
|
|
16
|
+
"ssss_core_version": "0.7",
|
|
17
17
|
"required_extensions": ["festech"],
|
|
18
18
|
"export_profile": "sale", // backup | template | sale
|
|
19
19
|
"primitive_inventory": { "workflow": 1, "page": 1, "rule": 1, "assistant": 1, "domain": 1 },
|
|
@@ -22,7 +22,7 @@ integrity. The container file is conventionally named `*.ucw.json`.
|
|
|
22
22
|
"file_count": 5,
|
|
23
23
|
"provenance": {
|
|
24
24
|
"content_hash": "sha256:…", // over the canonical file serialization
|
|
25
|
-
"exporter": "@ssss
|
|
25
|
+
"exporter": "@gregiteen/ssss-cli"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"files": [ { "path": "rules/refund-policy.md", "content": "---\n…" } ]
|
|
@@ -36,6 +36,10 @@ of `files`. `ssss validate` recomputes it and rejects any mismatch — a bundle
|
|
|
36
36
|
be silently edited. `primitive_inventory` is registry-driven (a count per `type`),
|
|
37
37
|
not a closed category enum.
|
|
38
38
|
|
|
39
|
+
Bundle validation also applies registry patterns and document-reference rules.
|
|
40
|
+
For example, a `translation` entry must name an included structural source and
|
|
41
|
+
its `source_hash` must match that source's exact bytes.
|
|
42
|
+
|
|
39
43
|
## Parameters
|
|
40
44
|
|
|
41
45
|
Each entry in `parameters[]` is a template variable resolved at provision time:
|
package/docs/help/import.md
CHANGED
|
@@ -12,6 +12,8 @@ ssss import --plan plan.json --vault <dir> # replay a plan from `ssss prov
|
|
|
12
12
|
- `--vault <dir>` is required and is created if missing.
|
|
13
13
|
- Without `--plan`, import provisions inline first (resolving `--param` flags); a
|
|
14
14
|
failed provision (unresolved params / dangling links) aborts before any write.
|
|
15
|
+
- The engine preflights every envelope in the plan before the first commit. A
|
|
16
|
+
late schema, reference, or authorization failure cannot leave a partial import.
|
|
15
17
|
- `--dry-run` validates every envelope without committing and reports
|
|
16
18
|
`would commit` instead of `committed`.
|
|
17
19
|
- The normal summary reports `committed`, `unchanged (idempotent)`, and `failed`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Localization and translation overlays (spec §5.4, §11.9)
|
|
2
|
+
|
|
3
|
+
A `translation` is a structural overlay for one exact source document. It never
|
|
4
|
+
forks the source or translates symbolic control fields.
|
|
5
|
+
|
|
6
|
+
```yaml
|
|
7
|
+
---
|
|
8
|
+
type: translation
|
|
9
|
+
title: "Política de reembolsos — español"
|
|
10
|
+
description: "Traducción al español."
|
|
11
|
+
timestamp: 2026-07-10T00:00:00Z
|
|
12
|
+
translation_id: refund-policy-es
|
|
13
|
+
source_path: rules/refund-policy.md
|
|
14
|
+
source_hash: sha256:<hash-of-current-source-bytes>
|
|
15
|
+
locale: es
|
|
16
|
+
status: approved
|
|
17
|
+
translated_fields: [title, description, body]
|
|
18
|
+
translated_title: "Política de reembolsos"
|
|
19
|
+
translated_description: "Reglas de reembolso para compradores."
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
Contenido traducido.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Only `title`, `description`, and body may change. `type`, ids, status values,
|
|
26
|
+
permissions, relations, portability, and every other control field remain canonical.
|
|
27
|
+
The engine rejects stale source hashes, missing or private sources, traversal,
|
|
28
|
+
symlinks, recursive translation, and changes to immutable overlay identity.
|
|
29
|
+
|
|
30
|
+
Draft and reviewed overlays are retained for workflow, but normal localization uses
|
|
31
|
+
approved overlays only. Use `--include-drafts` only for an explicit preview.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
ssss localize ./vault --locale es --out ./derived/es
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The output must be a new or empty, non-symlinked directory outside the source vault.
|
|
38
|
+
It preserves source-relative paths, excludes private/resource-bound documents by
|
|
39
|
+
default, and writes `.ssss-projection.json` so the derived result is auditable and
|
|
40
|
+
rebuildable.
|
|
41
|
+
|
|
42
|
+
Use `ssss semantic ./vault --locale es` to query localized surfaces without
|
|
43
|
+
materializing files. See also: `ssss help semantic`.
|
package/docs/help/overview.md
CHANGED
|
@@ -5,16 +5,18 @@ and mutation contract for AI-agent state. A vault is a directory of Markdown fil
|
|
|
5
5
|
with YAML frontmatter; every file declares a `type` defined in the registry.
|
|
6
6
|
|
|
7
7
|
`@gregiteen/ssss-cli` is the reference implementation: a dependency-free Operation Contract
|
|
8
|
-
engine, a registry-driven validator, and the
|
|
8
|
+
engine, a registry-driven validator, semantic/localization projections, and the
|
|
9
|
+
`.ucw` bundle/provisioning tooling.
|
|
9
10
|
|
|
10
11
|
## The pieces
|
|
11
12
|
|
|
12
13
|
| Piece | Where | What it is |
|
|
13
14
|
|-------|-------|------------|
|
|
14
15
|
| Spec | `docs/ssss-spec.md` | The normative standard. |
|
|
15
|
-
| Core registry | `registry/core.json` | The
|
|
16
|
+
| Core registry | `registry/core.json` | The 15 document primitives + 5 contract primitives, plus semantic (§11.9), bundle (§16), and provisioning (§17) contracts. |
|
|
16
17
|
| Engine | `src/engine.mjs` | The §6 Operation Contract pipeline (operation/patch/event/delete). |
|
|
17
18
|
| Runtime | `src/runtime.mjs` | The §11.8 workflow trigger → event/task/run envelope planner. |
|
|
19
|
+
| Semantic | `src/semantic.mjs` | Deterministic semantic graph/search projection and translation overlays (§11.9). |
|
|
18
20
|
| Bundle | `src/bundle.mjs` | export / validate / provision / import (§16–§17). |
|
|
19
21
|
| Conformance | `conformance/` | Fixtures every host must pass. |
|
|
20
22
|
|
|
@@ -28,6 +30,8 @@ vault ──export──▶ .ucw bundle ──provision──▶ envelope plan
|
|
|
28
30
|
## Commands
|
|
29
31
|
|
|
30
32
|
Run `ssss help <topic>` for any of:
|
|
31
|
-
`runtime`, `
|
|
33
|
+
`runtime`, `semantic`, `localization`, `portability`, `bundle`, `provisioning`,
|
|
34
|
+
`export`, `provision`, `import`, `conformance`, `autolink`.
|
|
32
35
|
|
|
33
|
-
Run `ssss <command> --help` for: `export`, `validate`, `inspect`, `provision`,
|
|
36
|
+
Run `ssss <command> --help` for: `export`, `validate`, `inspect`, `provision`,
|
|
37
|
+
`import`, `semantic`, `localize`, `autolink`, `conformance`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Semantic projection (spec §11.9)
|
|
2
|
+
|
|
3
|
+
SSSS builds a deterministic search and graph projection directly from validated
|
|
4
|
+
Markdown. The projection is disposable: the vault remains the only source of truth.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
ssss semantic ./vault
|
|
8
|
+
ssss semantic ./vault --query "refund policy" --limit 5
|
|
9
|
+
ssss semantic ./vault --locale es --query "política de reembolsos"
|
|
10
|
+
ssss semantic ./vault --locale es --out ./derived/semantic-es.json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Records include stable identity, source path and hash, type, portability, surface
|
|
14
|
+
text, normalized Unicode tokens, and graph edges derived from `relations`, wiki
|
|
15
|
+
links, and Markdown links. Results use deterministic weighted lexical ranking; hosts
|
|
16
|
+
may fuse embeddings without replacing this interoperable baseline.
|
|
17
|
+
|
|
18
|
+
## Privacy and output safety
|
|
19
|
+
|
|
20
|
+
Only `structural` documents are indexed by default. `tenant_private` and
|
|
21
|
+
`resource_bound` sources require the explicit `--include-private` option and an
|
|
22
|
+
authorized caller. This option can expose customer or operational data; never enable
|
|
23
|
+
it for a public index.
|
|
24
|
+
|
|
25
|
+
`--out` must point to a regular file outside the source vault. Writes are atomic.
|
|
26
|
+
Symlinked vault entries and unsafe paths fail closed.
|
|
27
|
+
|
|
28
|
+
## Library API
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
import { buildSemanticIndex, searchSemanticIndex } from '@gregiteen/ssss-cli/semantic';
|
|
32
|
+
|
|
33
|
+
const index = buildSemanticIndex('./vault', { locale: 'es' });
|
|
34
|
+
const results = searchSemanticIndex(index, 'reembolsos', { limit: 10 });
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
See also: `ssss help localization`.
|