@gregiteen/ssss-cli 0.7.0 → 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 CHANGED
@@ -5,6 +5,65 @@ 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
+
46
+ ## [0.7.1] - 2026-07-08
47
+ ### Fixed
48
+ - Reduced `resource_bound` primitives to requirement declarations in `template`
49
+ and `sale` exports, preventing seller-bound domain, phone, or integration
50
+ values from leaking into bundles.
51
+ - Rejected malformed bundles with missing `files` arrays and unknown
52
+ `required_extensions`.
53
+ - Preserved nested frontmatter maps and arrays during patch serialization.
54
+ - Corrected `ssss import --dry-run` accounting to report `would commit` counts
55
+ while leaving target vaults empty.
56
+ - Generated starter and reference task files now use the valid `pending` task
57
+ status.
58
+
59
+ ### Added
60
+ - Conformance coverage for resource-bound export reduction, strict bundle
61
+ validation, lease conflict/expiry/unreadable-state behavior, nested
62
+ frontmatter patching, `ssss new` scaffold validation, and dry-run import
63
+ behavior.
64
+ - `docs/help/leases.md` and completed `IMPROVEMENTS` project documentation.
65
+ - Full package content for the `push` skill so skill conformance passes.
66
+
8
67
  ## [0.7.0] - 2026-07-02
9
68
  ### Changed
10
69
  - **BREAKING: universal frontmatter enforcement** — every SSSS document primitive
@@ -41,7 +100,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
41
100
  trigger evaluation across daemon, cron, webhook, file-change, event, condition,
42
101
  and manual runtimes. Workflows own `triggers[]`; external schedulers are only
43
102
  wake-up mechanisms.
44
- - **`@ssss/cli/runtime` helpers** — deterministic `planWorkflowTrigger()` and
103
+ - **`@gregiteen/ssss-cli/runtime` helpers** — deterministic `planWorkflowTrigger()` and
45
104
  `createRunEnvelope()` helpers derive `workflow_triggered` events, task
46
105
  documents, and run documents through the Operation Contract.
47
106
  - **Runtime conformance metadata/checks** — `conformance/fixtures.json` v1.3.0
@@ -58,7 +117,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
58
117
  a starter `vault/` of core primitives (incl. a `tenant_private` task to demonstrate
59
118
  the sale-drop), a dependency-free conformance test (`node --test`) that replays the
60
119
  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`,
120
+ plus `package.json` (pinned to the matching `@gregiteen/ssss-cli` tag), `CLAUDE.md`, `README`,
62
121
  and `.gitignore`. Flags: `--with-total-recall` (wire the Total Recall memory OS),
63
122
  `--install` (npm install + Total Recall init + verify), `--ref`, `--name`, `--force`,
64
123
  `--no-git`. All shelling-out uses `execFileSync` with fixed argv (no shell). Docs:
@@ -93,7 +152,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
93
152
  `ssss help [topic]` serving offline docs from `docs/help/` and `ssss version`. Each
94
153
  command has its own `--help`. Shared parsing/formatting in `scripts/lib/cli.mjs`.
95
154
  - **Open-source packaging** — `README.md`, `LICENSE` (ISC), `.gitignore`, and
96
- `package.json` metadata (`engines`, `repository`, `files`) so `@ssss/cli` is
155
+ `package.json` metadata (`engines`, `repository`, `files`) so `@gregiteen/ssss-cli` is
97
156
  publishable and the runtime-read paths (`VERSION`, `docs/help`) ship in the tarball.
98
157
 
99
158
  ### Changed
@@ -112,7 +171,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
112
171
  the canonical Operation Contract as the fourth envelope type. Removes a replace-type file,
113
172
  rejects append-type targets, and emits a deletion event for audit. Idempotent.
114
173
  - **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
174
+ canonical, dependency-free `@gregiteen/ssss-cli` Operation Contract engine. Harvested from total-recall
116
175
  (§6.3 pipeline, idempotency replay from the audit log, `buildRepair`/§9 repair blocks) and
117
176
  festech (`delete` envelope, `resolveContainedPath` path-traversal guard, registry-driven
118
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](https://img.shields.io/badge/conformance-fixtures%20%2B%20runtime%20%2B%20bundle-brightgreen)](conformance/)
7
- [![spec](https://img.shields.io/badge/spec-v0.6%20draft-blue)](docs/ssss-spec.md)
7
+ [![spec](https://img.shields.io/badge/spec-v0.7%20draft-blue)](docs/ssss-spec.md)
8
8
  [![OKF](https://img.shields.io/badge/OKF-v0.1%20compatible-blue)](docs/ssss-spec.md)
9
9
 
10
10
  SSSS is the vendor-neutral standard and reference implementation shared by
@@ -16,21 +16,23 @@ 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.
22
24
  - **The `.ucw` bundle format** (§16) and **provisioning contract** (§17) — package a
23
25
  vault, then `export → provision → import` it into a fresh tenant, deterministically.
24
26
 
25
- This package, `@ssss/cli`, is **dependency-free**: a host needs neither Zod nor a YAML
27
+ This package, `@gregiteen/ssss-cli`, is **dependency-free**: a host needs neither Zod nor a YAML
26
28
  library to be conformant. The reference engine *is* the validator.
27
29
 
28
30
  ## Install
29
31
 
30
32
  ```bash
31
- npm install -g @ssss/cli # the `ssss` command
33
+ npm install -g @gregiteen/ssss-cli # the `ssss` command
32
34
  # or use it as a library:
33
- npm install @ssss/cli
35
+ npm install @gregiteen/ssss-cli
34
36
  ```
35
37
 
36
38
  Requires Node 18+. No runtime dependencies.
@@ -77,18 +79,21 @@ 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
- | `ssss help [topic]` | Local docs: `runtime`, `portability`, `bundle`, `provisioning`, … |
86
+ | `ssss help [topic]` | Local docs: `runtime`, `portability`, `bundle`, `provisioning`, `leases`, … |
83
87
 
84
88
  Run `ssss <command> --help` for flags, or `ssss help <topic>` for concepts.
85
89
 
86
90
  ## Use as a library
87
91
 
88
92
  ```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';
93
+ import { createEngine } from '@gregiteen/ssss-cli/engine';
94
+ import { exportBundle, validateBundle, provisionBundle, importBundle } from '@gregiteen/ssss-cli/bundle';
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
- 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`.
127
+ Exports: `@gregiteen/ssss-cli` / `@gregiteen/ssss-cli/engine` (Operation Contract engine),
128
+ `@gregiteen/ssss-cli/bundle` (export/provision/import), `@gregiteen/ssss-cli/registry`,
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.6 draft).
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 14 document + 5 contract primitives; bundle & provisioning schemas.
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.7.0
1
+ 0.8.0
@@ -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 core document primitives + 5 contract primitives, plus the `runtime` (§11.8), `bundle` (§16), and `provisioning` (§17) schemas the standard owns. |
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 | all 14 ✓ | 118 app primitives |
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
 
@@ -31,27 +31,33 @@ npx ssss conformance --endpoint <url> --token <pat> # run fixtures against a l
31
31
 
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
- `--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.
34
+ `--engine`, it replays every fixture through the reference engine (`src/engine.mjs`),
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
39
+ reference bundle (validate → provision → import → re-import, spec §16/§17)
40
+ against a temp vault — proving idempotency, strict bundle shape validation, and
41
+ that no `tenant_private` or seller-bound `resource_bound` value ever lands. With
42
+ `--endpoint`, it POSTs each fixture's `request` to a host's Operation Contract
43
+ endpoint and diffs the response.
40
44
 
41
45
  ## Core vs. extension registry
42
46
 
43
- The standard owns only the **core**: the 14 document primitives and 5 contract
47
+ The standard owns only the **core**: the 15 document primitives and 5 contract
44
48
  primitives in [`../registry/core.json`](../registry/core.json), plus the `runtime`
45
- (§11.8), `bundle` (§16), and `provisioning` (§17) schemas. Every conformant
49
+ (§11.8), `semantic` (§11.9), `bundle` (§16), and `provisioning` contracts. Every conformant
46
50
  implementation maps to the same core.
47
51
 
48
52
  Applications **extend** the core with their own primitives (festech has 118 —
49
53
  `meeting`, `phone_number`, `inventory_item`, `language_convention`, …). Extensions:
50
54
 
51
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.
52
58
  - Live in the application's own extension registry, not here.
53
59
  - SHOULD follow the same schema shape as core entries (`required_fields`,
54
- `append_only`, enums) so the same validator handles them.
60
+ `append_only`, enums, patterns, immutable fields, references) so the same validator handles them.
55
61
 
56
62
  ## ⚠️ Open reconciliation items (spec ⇄ implementation drift)
57
63
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://ssss.dev/conformance/v1",
3
- "version": "1.4.0",
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-02"
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.6",
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": [
@@ -39,6 +40,14 @@
39
40
  "system": "email",
40
41
  "mode": "provision",
41
42
  "required": false
43
+ },
44
+ {
45
+ "id": "bind-domain",
46
+ "label": "Bind domain",
47
+ "system": "domains",
48
+ "mode": "provision",
49
+ "required": true,
50
+ "notes": "owns_domain"
42
51
  }
43
52
  ],
44
53
  "parameters": [
@@ -66,12 +75,21 @@
66
75
  "scope": "workspace",
67
76
  "source": "user",
68
77
  "required": false
78
+ },
79
+ {
80
+ "key": "domain_registrar",
81
+ "label": "domain registrar",
82
+ "type": "string",
83
+ "scope": "workspace",
84
+ "source": "user",
85
+ "required": false,
86
+ "description": "Satisfies the domain resource requirement field 'registrar'."
69
87
  }
70
88
  ],
71
- "file_count": 14,
89
+ "file_count": 18,
72
90
  "provenance": {
73
- "content_hash": "sha256:96380f618ee1e178331beca9507e1b3cd28a3d12cfa7f9898317f98da8295218",
74
- "exporter": "@ssss/cli@0.7.0"
91
+ "content_hash": "sha256:27c7c21826552f73dd14a56018454f4c19bda002029d5db42ecb14d77667b699",
92
+ "exporter": "@gregiteen/ssss-cli@0.8.0"
75
93
  }
76
94
  },
77
95
  "files": [
@@ -85,7 +103,7 @@
85
103
  },
86
104
  {
87
105
  "path": "domains/festival.md",
88
- "content": "---\ntype: domain\ntitle: Festival Domain Requirement\ndescription: Domain resource requirement that the buyer binds during provisioning.\ntimestamp: 2026-07-02T00:00:00Z\ndomain_name: REQUIREMENT\nregistrar: REQUIREMENT\nstatus: required\npayment_status: unbound\nx_portability: resource_bound\n---\nThis festival needs a domain. The buyer binds their own at provision (owns_domain)."
106
+ "content": "---\ntype: domain\ntitle: Festival Domain Requirement\ndescription: Domain resource requirement that the buyer binds during provisioning.\ntimestamp: \"2026-07-02T00:00:00Z\"\ndomain_name: REQUIREMENT\nregistrar: REQUIREMENT\nstatus: required\npayment_status: unbound\nx_portability: resource_bound\n---\nThis festival needs a domain. The buyer binds their own at provision (owns_domain)."
89
107
  },
90
108
  {
91
109
  "path": "domains/index.md",
@@ -123,6 +141,22 @@
123
141
  "path": "tasks/index.md",
124
142
  "content": "# Index — tasks\n\n- [Ticket 4821 Seat Change](./ticket-4821.md)\n"
125
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
+ },
126
160
  {
127
161
  "path": "workflows/box-office.md",
128
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."
@@ -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.6",
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/cli"
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:
@@ -12,8 +12,12 @@ 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
- - `--dry-run` validates every envelope without committing.
16
- - The summary reports `committed`, `unchanged (idempotent)`, and `failed` counts.
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.
17
+ - `--dry-run` validates every envelope without committing and reports
18
+ `would commit` instead of `committed`.
19
+ - The normal summary reports `committed`, `unchanged (idempotent)`, and `failed`
20
+ counts.
17
21
 
18
22
  Run `ssss import --help` for the full flag list.
19
23
  See also: `ssss help provisioning`, `ssss provision`.
@@ -0,0 +1,31 @@
1
+ # Leases (spec §7)
2
+
3
+ Leases are file-level write locks checked by the Operation Contract before a
4
+ write commits. They protect paths that are being edited by another actor or host
5
+ process.
6
+
7
+ The reference engine expects lease state in a host-provided `leaseStore`:
8
+
9
+ ```text
10
+ <leaseStore>/<workspace_id>/<sha256(path)>.lease.json
11
+ ```
12
+
13
+ Each lease file contains:
14
+
15
+ ```json
16
+ {
17
+ "lease_id": "lease-123",
18
+ "expires_at": "2026-07-08T23:00:00.000Z"
19
+ }
20
+ ```
21
+
22
+ Behavior:
23
+
24
+ - If no lease exists, the write can continue.
25
+ - If a non-expired lease exists, the envelope must provide the matching
26
+ `lease_id`.
27
+ - A mismatched or missing `lease_id` fails validation before commit.
28
+ - Expired leases are removed and do not block the write.
29
+ - Unreadable lease state fails closed; the engine refuses to guess.
30
+
31
+ See also: `ssss help roles`, `ssss help conformance`.
@@ -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`.
@@ -4,17 +4,19 @@ The **Structured Semantic Syntax System** is a database-free, Markdown-first sch
4
4
  and mutation contract for AI-agent state. A vault is a directory of Markdown files
5
5
  with YAML frontmatter; every file declares a `type` defined in the registry.
6
6
 
7
- `@ssss/cli` is the reference implementation: a dependency-free Operation Contract
8
- engine, a registry-driven validator, and the `.ucw` bundle/provisioning tooling.
7
+ `@gregiteen/ssss-cli` is the reference implementation: a dependency-free Operation Contract
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 14 document primitives + 5 contract primitives, plus the bundle (§16) and provisioning (§17) schemas. |
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`, `portability`, `bundle`, `provisioning`, `export`, `provision`, `import`, `conformance`, `autolink`.
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`, `import`, `autolink`, `conformance`.
36
+ Run `ssss <command> --help` for: `export`, `validate`, `inspect`, `provision`,
37
+ `import`, `semantic`, `localize`, `autolink`, `conformance`.
@@ -20,8 +20,16 @@ restrictive of (type default, override) wins.
20
20
  | `template` | structural + resource_bound | A reusable template, private data stripped. |
21
21
  | `sale` | structural + resource_bound | A tradeable business, private data stripped. |
22
22
 
23
- > `template` and `sale` exports MUST drop every `tenant_private` primitive. The
24
- > reference bundle (`conformance/reference-bundle.ucw.json`) proves this: its
25
- > `task` ticket is dropped from the `sale` export.
23
+ > `template` and `sale` exports MUST drop every `tenant_private` primitive and
24
+ > reduce every `resource_bound` primitive to a requirement declaration. The
25
+ > seller's actual domain, phone number, provider, or connection value must not
26
+ > appear in the bundle.
27
+
28
+ For resource-bound files, the reference exporter uses the extension registry's
29
+ `resource.binds` metadata to replace bound fields with `REQUIREMENT` and add
30
+ matching provisioning requirements. The reference bundle
31
+ (`conformance/reference-bundle.ucw.json`) proves both guarantees: its `task`
32
+ ticket is dropped from the `sale` export, and its `domain` file carries only
33
+ requirement placeholders.
26
34
 
27
35
  See also: `ssss help bundle`, `ssss help export`.