@elevasis/sdk 1.28.1 → 1.30.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/dist/cli.cjs +1611 -595
- package/dist/index.d.ts +105 -1
- package/dist/index.js +30 -25
- package/dist/node/index.d.ts +84 -1
- package/dist/test-utils/index.d.ts +102 -1
- package/dist/test-utils/index.js +242 -23
- package/dist/worker/index.js +1 -0
- package/package.json +4 -4
- package/reference/_navigation.md +4 -4
- package/reference/_reference-manifest.json +8 -8
- package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +3 -3
- package/reference/claude-config/rules/topbar-actions.md +70 -0
- package/reference/claude-config/skills/om/SKILL.md +18 -1
- package/reference/claude-config/skills/tutorial/technical.md +5 -5
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
- package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +45 -45
- package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +52 -52
- package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +33 -33
- package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +32 -32
- package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +43 -43
- package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +40 -40
- package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +61 -61
- package/reference/claude-config/sync-notes/2026-05-23-branding-names-to-identity.md +49 -49
- package/reference/claude-config/sync-notes/2026-05-23-lead-gen-manage-access.md +31 -31
- package/reference/claude-config/sync-notes/2026-05-23-om-deployment-drift-detection.md +42 -42
- package/reference/claude-config/sync-notes/2026-05-23-om-full-model-deploy-contract.md +33 -33
- package/reference/claude-config/sync-notes/2026-05-23-ui-sdk-package-fixes.md +37 -37
- package/reference/claude-config/sync-notes/2026-05-24-platform-invite-router-core-baseline.md +28 -0
- package/reference/claude-config/sync-notes/2026-05-24-system-interface-readiness.md +43 -43
- package/reference/claude-config/sync-notes/2026-05-25-invitation-login-loader.md +26 -0
- package/reference/claude-config/sync-notes/2026-05-25-om-topbar-requests.md +33 -0
- package/reference/claude-config/sync-notes/2026-05-25-system-interface-profile-registry-and-substrate.md +35 -0
- package/reference/claude-config/sync-notes/2026-05-25-tenant-om-scaffold-cli.md +49 -0
- package/reference/claude-config/sync-notes/2026-05-25-vibe-operate-intent.md +47 -0
- package/reference/core/exports.mdx +16 -0
- package/reference/core/index.mdx +58 -0
- package/reference/examples/organization-model.ts +18 -0
- package/reference/index.mdx +36 -67
- package/reference/rules/organization-model.md +4 -1
- package/reference/rules/organization-os.md +7 -1
- package/reference/rules/ui.md +207 -207
- package/reference/rules/vibe.md +52 -18
- package/reference/scaffold/index.mdx +9 -7
- package/reference/scaffold/operations/propagation-pipeline.md +152 -152
- package/reference/scaffold/operations/scaffold-maintenance.md +14 -4
- package/reference/scaffold/reference/contracts.md +423 -338
- package/reference/scaffold/reference/glossary.md +14 -2
- package/reference/scaffold/reference/system-interface-capabilities.md +50 -0
- package/reference/{cli-management.mdx → sdk/cli-management.mdx} +159 -13
- package/reference/{cli.mdx → sdk/cli.mdx} +68 -12
- package/reference/sdk/exports.mdx +14 -0
- package/reference/sdk/index.mdx +93 -0
- package/reference/sdk/platform-tools/adapters-integration.mdx +25 -0
- package/reference/sdk/platform-tools/adapters-platform.mdx +24 -0
- package/reference/{platform-tools → sdk/platform-tools}/index.mdx +9 -30
- package/reference/{resources → sdk/resources}/patterns.mdx +29 -11
- package/reference/ui/exports.mdx +60 -0
- package/reference/ui/index.mdx +75 -0
- package/reference/platform-tools/adapters-integration.mdx +0 -300
- package/reference/platform-tools/adapters-platform.mdx +0 -552
- /package/reference/claude-config/skills/deploy/{skill.md → SKILL.md} +0 -0
- /package/reference/{concepts.mdx → sdk/concepts.mdx} +0 -0
- /package/reference/{deployment → sdk/deployment}/command-center.mdx +0 -0
- /package/reference/{deployment → sdk/deployment}/execution-reference.mdx +0 -0
- /package/reference/{deployment → sdk/deployment}/index.mdx +0 -0
- /package/reference/{framework → sdk/framework}/agent.mdx +0 -0
- /package/reference/{framework → sdk/framework}/index.mdx +0 -0
- /package/reference/{framework → sdk/framework}/interaction-guidance.mdx +0 -0
- /package/reference/{framework → sdk/framework}/memory.mdx +0 -0
- /package/reference/{framework → sdk/framework}/project-structure.mdx +0 -0
- /package/reference/{framework → sdk/framework}/resource-documentation.mdx +0 -0
- /package/reference/{framework → sdk/framework}/tutorial-system.mdx +0 -0
- /package/reference/{getting-started.mdx → sdk/getting-started.mdx} +0 -0
- /package/reference/{platform-tools → sdk/platform-tools}/type-safety.mdx +0 -0
- /package/reference/{resources → sdk/resources}/index.mdx +0 -0
- /package/reference/{resources → sdk/resources}/types.mdx +0 -0
- /package/reference/{roadmap.mdx → sdk/roadmap.mdx} +0 -0
- /package/reference/{runtime.mdx → sdk/runtime.mdx} +0 -0
- /package/reference/{templates → sdk/templates}/data-enrichment.mdx +0 -0
- /package/reference/{templates → sdk/templates}/email-sender.mdx +0 -0
- /package/reference/{templates → sdk/templates}/index.mdx +0 -0
- /package/reference/{templates → sdk/templates}/lead-scorer.mdx +0 -0
- /package/reference/{templates → sdk/templates}/pdf-generator.mdx +0 -0
- /package/reference/{templates → sdk/templates}/recurring-job.mdx +0 -0
- /package/reference/{templates → sdk/templates}/text-classifier.mdx +0 -0
- /package/reference/{templates → sdk/templates}/web-scraper.mdx +0 -0
- /package/reference/{troubleshooting.mdx → sdk/troubleshooting.mdx} +0 -0
|
@@ -1,156 +1,156 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Propagation Pipeline
|
|
3
|
-
description: Three-layer pipeline that keeps Organization OS artifacts current across the monorepo and all template-derived external projects -- source generation, registry-driven sync planning/apply, and verification.
|
|
4
|
-
---
|
|
1
|
+
---
|
|
2
|
+
title: Propagation Pipeline
|
|
3
|
+
description: Three-layer pipeline that keeps Organization OS artifacts current across the monorepo and all template-derived external projects -- source generation, registry-driven sync planning/apply, and verification.
|
|
4
|
+
---
|
|
5
5
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
6
6
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
# Propagation Pipeline
|
|
10
|
-
|
|
11
|
-
`🟢 Stable` -- These pipelines run automatically. Understand them when debugging sync issues or extending the scaffold.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Architecture
|
|
16
|
-
|
|
17
|
-
The Organization OS propagation pipeline has three layers. Each has its own scripts, triggers, and failure modes.
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
Layer 1: Source Generation (pnpm scaffold:sync)
|
|
21
|
-
Regenerates derived docs from TypeScript types and manifests
|
|
22
|
-
↓
|
|
23
|
-
Layer 2: Registry-Driven Sync Planning + Apply (/external sync)
|
|
24
|
-
Plans registry-backed writes/deletes, then applies the approved scope
|
|
25
|
-
↓
|
|
26
|
-
Layer 3: Sync Verification (pnpm sync:verify)
|
|
27
|
-
Asserts correctness across all template-derived projects after apply
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Layer 1: Source Generation
|
|
33
|
-
|
|
34
|
-
`pnpm scaffold:sync` is the meta-script that regenerates all derived documentation and validates the output. It chains three sub-scripts:
|
|
35
|
-
|
|
36
|
-
| Script | Input | Output |
|
|
37
|
-
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
38
|
-
| `generate-scaffold-contracts.js` | `packages/core/src/organization-model/types.ts`, `packages/ui/src/features/registry/types.ts`, `packages/core/src/platform/registry/types.ts` | `packages/core/src/reference/_generated/contracts.md` |
|
|
39
|
-
| `generate-scaffold-feature-registry.js` | `packages/ui/src/features/registry/manifests.ts`, `packages/ui/src/features/*/manifest.ts` | `packages/ui/src/scaffold/_generated/feature-registry.md` |
|
|
40
|
-
| `generate-reference-artifacts.js` | SDK manifest, navigation sources | `packages/sdk/reference/_reference-manifest.json`, `_navigation.md` |
|
|
41
|
-
|
|
42
|
-
After generation, `validate-reference-artifacts.js` checks that the outputs are consistent. Exit 1 if drifted.
|
|
43
|
-
|
|
44
|
-
### Trigger Points
|
|
45
|
-
|
|
46
|
-
- **`/external sync` Phase 0 (Scaffold Sync Preflight):** Runs before any writes. Generated file changes fold into the sync scope so they propagate naturally to `_template` and downstream projects.
|
|
47
|
-
- **`/sdk release` Step 1 (Shared Reference Preflight):** Runs before publish. Generated changes must be committed; validator failure is a hard blocker.
|
|
48
|
-
- **Manual:** `pnpm scaffold:sync` is idempotent and safe to run anytime.
|
|
49
|
-
- **Opt-out:** `--skip-scaffold-sync` on `/external sync` (rare).
|
|
50
|
-
|
|
51
|
-
### Design: Regenerate-on-Propagation
|
|
52
|
-
|
|
53
|
-
Drift is healed at the moment it would otherwise leak downstream. This is cheaper and more reliable than CI-only checks. The single meta-script gives one command to reason about, while the chained sub-scripts remain individually callable for debugging.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## Layer 2: Registry-Driven Sync Planning + Apply
|
|
58
|
-
|
|
59
|
-
`/external sync` now treats the scaffold registry as the execution contract rather than relying on tier prose alone.
|
|
60
|
-
The canonical ownership vocabulary is:
|
|
61
|
-
|
|
62
|
-
| Category
|
|
63
|
-
|
|
|
64
|
-
| `replace`
|
|
65
|
-
| `merge`
|
|
66
|
-
| `never-touch`
|
|
67
|
-
| `generated`
|
|
68
|
-
|
|
69
|
-
Current command helpers:
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
pnpm sync:plan -- --all # registry-backed dry-run plan
|
|
73
|
-
pnpm sync:apply -- --all # registry-backed apply pass
|
|
74
|
-
pnpm sync:verify # post-apply verification
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Per-project or scoped runs pass the project name and optional `--path` / `--source` filters through to the planner/apply script.
|
|
78
|
-
|
|
79
|
-
Delete behavior is explicit:
|
|
80
|
-
|
|
81
|
-
- managed deletes apply only to `replace` surfaces
|
|
82
|
-
- deletion is allowed only when the path appears in the manifest-backed tombstone list
|
|
83
|
-
- absence from the template alone is not enough to delete a downstream file
|
|
84
|
-
|
|
85
|
-
Generated surfaces are also explicit:
|
|
86
|
-
|
|
87
|
-
- they are planned as `generated`
|
|
88
|
-
- apply does not copy them as normal source files
|
|
89
|
-
- the relevant regen command must run, then `pnpm sync:verify` checks freshness
|
|
90
|
-
|
|
91
|
-
The external skill doc (`.claude/skills/external/SKILL.md`) remains the workflow authority, but it should be read as planner/apply/verify orchestration over the registry model above.
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Layer 3: Sync Verification
|
|
96
|
-
|
|
97
|
-
`pnpm sync:verify` runs 86+ automated checks to assert propagation correctness. The script lives at `scripts/external/verify-sync.js`.
|
|
98
|
-
|
|
99
|
-
### Per-Project Checks (auto-discovered)
|
|
100
|
-
|
|
101
|
-
| Category | What It Checks
|
|
102
|
-
| -------------- |
|
|
103
|
-
| `deps` | `@elevasis/ui`, `@elevasis/sdk`, `@elevasis/core` versions match template
|
|
104
|
-
| `tier1` | registry-backed replace surfaces match template where verification still models them as exact baselines
|
|
8
|
+
|
|
9
|
+
# Propagation Pipeline
|
|
10
|
+
|
|
11
|
+
`🟢 Stable` -- These pipelines run automatically. Understand them when debugging sync issues or extending the scaffold.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Architecture
|
|
16
|
+
|
|
17
|
+
The Organization OS propagation pipeline has three layers. Each has its own scripts, triggers, and failure modes.
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Layer 1: Source Generation (pnpm scaffold:sync)
|
|
21
|
+
Regenerates derived docs from TypeScript types and manifests
|
|
22
|
+
↓
|
|
23
|
+
Layer 2: Registry-Driven Sync Planning + Apply (/external sync)
|
|
24
|
+
Plans registry-backed writes/deletes, then applies the approved scope
|
|
25
|
+
↓
|
|
26
|
+
Layer 3: Sync Verification (pnpm sync:verify)
|
|
27
|
+
Asserts correctness across all template-derived projects after apply
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Layer 1: Source Generation
|
|
33
|
+
|
|
34
|
+
`pnpm scaffold:sync` is the meta-script that regenerates all derived documentation and validates the output. It chains three sub-scripts:
|
|
35
|
+
|
|
36
|
+
| Script | Input | Output |
|
|
37
|
+
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
38
|
+
| `generate-scaffold-contracts.js` | `packages/core/src/organization-model/types.ts`, `packages/ui/src/features/registry/types.ts`, `packages/core/src/platform/registry/types.ts` | `packages/core/src/reference/_generated/contracts.md` |
|
|
39
|
+
| `generate-scaffold-feature-registry.js` | `packages/ui/src/features/registry/manifests.ts`, `packages/ui/src/features/*/manifest.ts` | `packages/ui/src/scaffold/_generated/feature-registry.md` |
|
|
40
|
+
| `generate-reference-artifacts.js` | SDK manifest, navigation sources | `packages/sdk/reference/_reference-manifest.json`, `_navigation.md` |
|
|
41
|
+
|
|
42
|
+
After generation, `validate-reference-artifacts.js` checks that the outputs are consistent. Exit 1 if drifted.
|
|
43
|
+
|
|
44
|
+
### Trigger Points
|
|
45
|
+
|
|
46
|
+
- **`/external sync` Phase 0 (Scaffold Sync Preflight):** Runs before any writes. Generated file changes fold into the sync scope so they propagate naturally to `_template` and downstream projects.
|
|
47
|
+
- **`/sdk release` Step 1 (Shared Reference Preflight):** Runs before publish. Generated changes must be committed; validator failure is a hard blocker.
|
|
48
|
+
- **Manual:** `pnpm scaffold:sync` is idempotent and safe to run anytime.
|
|
49
|
+
- **Opt-out:** `--skip-scaffold-sync` on `/external sync` (rare).
|
|
50
|
+
|
|
51
|
+
### Design: Regenerate-on-Propagation
|
|
52
|
+
|
|
53
|
+
Drift is healed at the moment it would otherwise leak downstream. This is cheaper and more reliable than CI-only checks. The single meta-script gives one command to reason about, while the chained sub-scripts remain individually callable for debugging.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Layer 2: Registry-Driven Sync Planning + Apply
|
|
58
|
+
|
|
59
|
+
`/external sync` now treats the scaffold registry as the execution contract rather than relying on tier prose alone.
|
|
60
|
+
The canonical ownership vocabulary is:
|
|
61
|
+
|
|
62
|
+
| Category | Strategy examples | Meaning |
|
|
63
|
+
| ------------- | --------------------------------- | ------------------------------------------------------------------- |
|
|
64
|
+
| `replace` | `replace-all` | Template-managed surface; copy from template baseline |
|
|
65
|
+
| `merge` | `merge-baseline`, `merge-regions` | Merge-aware surface; preserve project customizations where required |
|
|
66
|
+
| `never-touch` | `verify-only` | Project-owned surface; planner may report drift but never writes |
|
|
67
|
+
| `generated` | `generated-freshness` | Generated surface; verify/regen instead of copying |
|
|
68
|
+
|
|
69
|
+
Current command helpers:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pnpm sync:plan -- --all # registry-backed dry-run plan
|
|
73
|
+
pnpm sync:apply -- --all # registry-backed apply pass
|
|
74
|
+
pnpm sync:verify # post-apply verification
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Per-project or scoped runs pass the project name and optional `--path` / `--source` filters through to the planner/apply script.
|
|
78
|
+
|
|
79
|
+
Delete behavior is explicit:
|
|
80
|
+
|
|
81
|
+
- managed deletes apply only to `replace` surfaces
|
|
82
|
+
- deletion is allowed only when the path appears in the manifest-backed tombstone list
|
|
83
|
+
- absence from the template alone is not enough to delete a downstream file
|
|
84
|
+
|
|
85
|
+
Generated surfaces are also explicit:
|
|
86
|
+
|
|
87
|
+
- they are planned as `generated`
|
|
88
|
+
- apply does not copy them as normal source files
|
|
89
|
+
- the relevant regen command must run, then `pnpm sync:verify` checks freshness
|
|
90
|
+
|
|
91
|
+
The external skill doc (`.claude/skills/external/SKILL.md`) remains the workflow authority, but it should be read as planner/apply/verify orchestration over the registry model above.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Layer 3: Sync Verification
|
|
96
|
+
|
|
97
|
+
`pnpm sync:verify` runs 86+ automated checks to assert propagation correctness. The script lives at `scripts/external/verify-sync.js`.
|
|
98
|
+
|
|
99
|
+
### Per-Project Checks (auto-discovered)
|
|
100
|
+
|
|
101
|
+
| Category | What It Checks |
|
|
102
|
+
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
103
|
+
| `deps` | `@elevasis/ui`, `@elevasis/sdk`, `@elevasis/core` versions match template |
|
|
104
|
+
| `tier1` | registry-backed replace surfaces match template where verification still models them as exact baselines |
|
|
105
105
|
| `org-os` | Organization model exists, exports canonical symbols, imports from `@elevasis/core/organization-model`, either calls `createFoundationOrganizationModel` or uses explicit `resolveOrganizationModel(..., { mergeDefaults: false })` canonical assembly, app-config references org model, `__root.tsx` uses `ElevasisAuthenticatedShell` / `ElevasisSystemsProvider` + `canonicalOrganizationModel`, `main.tsx` uses `createElevasisApp`, all 3 CSS subpath imports present |
|
|
106
|
-
| `placeholders` | No unresolved `__PROJECT_SLUG__`, `__PROJECT_NAME__`, `__PROJECT_DESCRIPTION__` in key config files
|
|
107
|
-
| `scripts` | `ui` and `operations` `package.json` have required npm scripts
|
|
108
|
-
| `lib` | `ui/src/lib/`, `lib/`, `test-utils/` exist with minimum file counts
|
|
109
|
-
| `tier3` | project-owned preservation boundaries such as `nav-items.ts` remain intact
|
|
110
|
-
| `conflicts` | No merge conflict markers in source files
|
|
111
|
-
| `git` | Working tree is clean
|
|
112
|
-
| `lockfile` | `pnpm-lock.yaml` and `node_modules` exist
|
|
113
|
-
|
|
114
|
-
### Monorepo-Level Checks
|
|
115
|
-
|
|
116
|
-
| Category | What It Checks |
|
|
117
|
-
| ----------- | ----------------------------------------------- |
|
|
118
|
-
| `scaffold` | `pnpm scaffold:sync` passes (artifacts current) |
|
|
119
|
-
| `artifacts` | 5 generated artifacts exist and have content |
|
|
120
|
-
|
|
121
|
-
### Usage
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
pnpm sync:verify # Post-sync assertion (exit 1 on failures)
|
|
125
|
-
pnpm sync:verify --pre # Pre-sync drift report (always exit 0)
|
|
126
|
-
pnpm sync:verify -- ZentaraHQ # Single project
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Integration Points
|
|
130
|
-
|
|
131
|
-
- **`/external sync` preflight:** Runs `pnpm sync:verify --pre` before planning so current drift is visible before any writes
|
|
132
|
-
- **`/external sync` planner/apply:** `pnpm sync:plan` previews registry-backed writes/deletes, then `pnpm sync:apply` executes the approved plan
|
|
133
|
-
- **`/external sync` post-apply:** Runs `pnpm sync:verify` to assert correctness after the planner/apply pass
|
|
134
|
-
- **Automated coverage:** tests live under `scripts/external/__tests__/` including planner/apply coverage
|
|
135
|
-
|
|
136
|
-
### Planner Interpretation Note
|
|
137
|
-
|
|
138
|
-
`pnpm sync:verify` still carries some historical `tier1` / `tier3` labels in its output, but the ownership semantics now come from the registry-backed categories used by the planner:
|
|
139
|
-
|
|
140
|
-
- `.claude/
|
|
141
|
-
- `nav-items.ts`, `operations/src/**`, `shared/src/**`, `CLAUDE.md`, and extension files are `never-touch`
|
|
142
|
-
- generated surfaces are verified for freshness, not copied
|
|
143
|
-
|
|
144
|
-
Treat the old tier labels as display shorthand inside the verifier, not as the canonical execution contract.
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Remaining Gaps (Future Work)
|
|
149
|
-
|
|
150
|
-
| Gap | Priority |
|
|
151
|
-
| ------------------------------------------------------------------------- | -------- |
|
|
152
|
-
| System manifest validation (all manifests imported in `__root.tsx`) | Medium |
|
|
153
|
-
| TypeScript verification (`check-types` per project) | Medium |
|
|
154
|
-
| Template docs surface validation (`docs/index.md`, `agent-start-here.md`) | Medium |
|
|
155
|
-
| Environment variable template validation (`.env.example` completeness) | Low |
|
|
156
|
-
| CI drift check (fail if worktree dirty after `scaffold:sync`) | Low |
|
|
106
|
+
| `placeholders` | No unresolved `__PROJECT_SLUG__`, `__PROJECT_NAME__`, `__PROJECT_DESCRIPTION__` in key config files |
|
|
107
|
+
| `scripts` | `ui` and `operations` `package.json` have required npm scripts |
|
|
108
|
+
| `lib` | `ui/src/lib/`, `lib/`, `test-utils/` exist with minimum file counts |
|
|
109
|
+
| `tier3` | project-owned preservation boundaries such as `nav-items.ts` remain intact |
|
|
110
|
+
| `conflicts` | No merge conflict markers in source files |
|
|
111
|
+
| `git` | Working tree is clean |
|
|
112
|
+
| `lockfile` | `pnpm-lock.yaml` and `node_modules` exist |
|
|
113
|
+
|
|
114
|
+
### Monorepo-Level Checks
|
|
115
|
+
|
|
116
|
+
| Category | What It Checks |
|
|
117
|
+
| ----------- | ----------------------------------------------- |
|
|
118
|
+
| `scaffold` | `pnpm scaffold:sync` passes (artifacts current) |
|
|
119
|
+
| `artifacts` | 5 generated artifacts exist and have content |
|
|
120
|
+
|
|
121
|
+
### Usage
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
pnpm sync:verify # Post-sync assertion (exit 1 on failures)
|
|
125
|
+
pnpm sync:verify --pre # Pre-sync drift report (always exit 0)
|
|
126
|
+
pnpm sync:verify -- ZentaraHQ # Single project
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Integration Points
|
|
130
|
+
|
|
131
|
+
- **`/external sync` preflight:** Runs `pnpm sync:verify --pre` before planning so current drift is visible before any writes
|
|
132
|
+
- **`/external sync` planner/apply:** `pnpm sync:plan` previews registry-backed writes/deletes, then `pnpm sync:apply` executes the approved plan
|
|
133
|
+
- **`/external sync` post-apply:** Runs `pnpm sync:verify` to assert correctness after the planner/apply pass
|
|
134
|
+
- **Automated coverage:** tests live under `scripts/external/__tests__/` including planner/apply coverage
|
|
135
|
+
|
|
136
|
+
### Planner Interpretation Note
|
|
137
|
+
|
|
138
|
+
`pnpm sync:verify` still carries some historical `tier1` / `tier3` labels in its output, but the ownership semantics now come from the registry-backed categories used by the planner:
|
|
139
|
+
|
|
140
|
+
- `.claude/skills/**`, `hooks/**`, `rules/**`, `scripts/**`, and `.claude/settings.json` are managed `replace` surfaces
|
|
141
|
+
- `nav-items.ts`, `operations/src/**`, `shared/src/**`, `CLAUDE.md`, and extension files are `never-touch`
|
|
142
|
+
- generated surfaces are verified for freshness, not copied
|
|
143
|
+
|
|
144
|
+
Treat the old tier labels as display shorthand inside the verifier, not as the canonical execution contract.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Remaining Gaps (Future Work)
|
|
149
|
+
|
|
150
|
+
| Gap | Priority |
|
|
151
|
+
| ------------------------------------------------------------------------- | -------- |
|
|
152
|
+
| System manifest validation (all manifests imported in `__root.tsx`) | Medium |
|
|
153
|
+
| TypeScript verification (`check-types` per project) | Medium |
|
|
154
|
+
| Template docs surface validation (`docs/index.md`, `agent-start-here.md`) | Medium |
|
|
155
|
+
| Environment variable template validation (`.env.example` completeness) | Low |
|
|
156
|
+
| CI drift check (fail if worktree dirty after `scaffold:sync`) | Low |
|
|
@@ -29,9 +29,10 @@ Scaffold docs are co-located with their owning package and copied into the SDK r
|
|
|
29
29
|
| --------------------------- | --------------------------------------------------------------- | --------------------------------------------- |
|
|
30
30
|
| Organization Model | `packages/core/src/organization-model/organization-model.mdx` | `scaffold/core/organization-model.mdx` |
|
|
31
31
|
| Organization Graph | `packages/core/src/organization-model/organization-graph.mdx` | `scaffold/core/organization-graph.mdx` |
|
|
32
|
-
| Glossary | `packages/core/src/reference/glossary.md` | `scaffold/reference/glossary.md` |
|
|
33
|
-
| Contracts (auto-gen) | `packages/core/src/reference/_generated/contracts.md` | `scaffold/reference/contracts.md` |
|
|
34
|
-
|
|
|
32
|
+
| Glossary | `packages/core/src/reference/glossary.md` | `scaffold/reference/glossary.md` |
|
|
33
|
+
| Contracts (auto-gen) | `packages/core/src/reference/_generated/contracts.md` | `scaffold/reference/contracts.md` |
|
|
34
|
+
| System Interface Capabilities (auto-gen) | `packages/core/src/reference/_generated/system-interface-capabilities.md` | `scaffold/reference/system-interface-capabilities.md` |
|
|
35
|
+
| UI Recipes | `packages/ui/src/scaffold/recipes.md` | `scaffold/ui/recipes.md` |
|
|
35
36
|
| System Flags & Gating | `packages/ui/src/scaffold/feature-flags-and-gating.md` | `scaffold/ui/feature-flags-and-gating.md` |
|
|
36
37
|
| Customization | `packages/ui/src/scaffold/customization.md` | `scaffold/ui/customization.md` |
|
|
37
38
|
| System Shell | `packages/ui/src/scaffold/feature-shell.mdx` | `scaffold/ui/feature-shell.mdx` |
|
|
@@ -57,7 +58,16 @@ Generated by `scripts/monorepo/generate-scaffold-contracts.js` from TypeScript s
|
|
|
57
58
|
- `packages/ui/src/features/registry/types.ts` -- System Registry
|
|
58
59
|
- `packages/core/src/platform/registry/types.ts` -- Resource Registry, Deployment Spec
|
|
59
60
|
|
|
60
|
-
Output: `packages/core/src/reference/_generated/contracts.md`
|
|
61
|
+
Output: `packages/core/src/reference/_generated/contracts.md`
|
|
62
|
+
|
|
63
|
+
### System Interface Capabilities (`system-interface-capabilities.md`)
|
|
64
|
+
|
|
65
|
+
Generated by `scripts/monorepo/generate-scaffold-contracts.js` from:
|
|
66
|
+
|
|
67
|
+
- `packages/core/src/organization-model/domains/systems.ts` -- `SYSTEM_INTERFACE_PROFILES`
|
|
68
|
+
- `packages/core/src/business/acquisition/ontology-validation.ts` -- derived-readiness validation constants and checks
|
|
69
|
+
|
|
70
|
+
Output: `packages/core/src/reference/_generated/system-interface-capabilities.md`
|
|
61
71
|
|
|
62
72
|
### System Registry (`feature-registry.md`)
|
|
63
73
|
|