@elevasis/sdk 1.8.2 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/cli.cjs +289 -105
  2. package/dist/index.d.ts +90 -39
  3. package/dist/types/worker/adapters/lead.d.ts +1 -1
  4. package/dist/worker/index.js +2 -0
  5. package/package.json +2 -2
  6. package/reference/_navigation.md +7 -1
  7. package/reference/_reference-manifest.json +14 -0
  8. package/reference/claude-config/logs/scaffold-registry-reminder.log +3 -0
  9. package/reference/claude-config/rules/agent-start-here.md +254 -254
  10. package/reference/claude-config/rules/frontend.md +43 -43
  11. package/reference/claude-config/rules/operations.md +64 -64
  12. package/reference/claude-config/rules/organization-model.md +42 -43
  13. package/reference/claude-config/rules/organization-os.md +107 -107
  14. package/reference/claude-config/rules/shared-types.md +2 -2
  15. package/reference/claude-config/rules/task-tracking.md +1 -1
  16. package/reference/claude-config/rules/ui.md +202 -202
  17. package/reference/claude-config/rules/vibe.md +202 -202
  18. package/reference/claude-config/skills/configure/SKILL.md +98 -98
  19. package/reference/claude-config/skills/configure/operations/codify-level-a.md +100 -100
  20. package/reference/claude-config/skills/configure/operations/codify-level-b.md +158 -158
  21. package/reference/claude-config/skills/configure/operations/customers.md +150 -150
  22. package/reference/claude-config/skills/configure/operations/features.md +162 -162
  23. package/reference/claude-config/skills/configure/operations/goals.md +147 -147
  24. package/reference/claude-config/skills/configure/operations/identity.md +133 -133
  25. package/reference/claude-config/skills/configure/operations/labels.md +128 -128
  26. package/reference/claude-config/skills/configure/operations/offerings.md +159 -159
  27. package/reference/claude-config/skills/configure/operations/roles.md +153 -153
  28. package/reference/claude-config/skills/configure/operations/techStack.md +139 -139
  29. package/reference/claude-config/skills/explore/SKILL.md +78 -78
  30. package/reference/claude-config/skills/git-sync/SKILL.md +126 -0
  31. package/reference/claude-config/skills/save/SKILL.md +183 -183
  32. package/reference/claude-config/skills/setup/SKILL.md +275 -275
  33. package/reference/claude-config/skills/sync/SKILL.md +10 -44
  34. package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -0
  35. package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -0
  36. package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -0
  37. package/reference/claude-config/sync-notes/README.md +43 -0
  38. package/reference/deployment/index.mdx +42 -7
  39. package/reference/examples/organization-model.ts +689 -0
  40. package/reference/index.mdx +6 -5
  41. package/reference/packages/core/src/README.md +39 -36
  42. package/reference/packages/core/src/business/README.md +52 -52
  43. package/reference/packages/core/src/organization-model/README.md +97 -97
  44. package/reference/packages/core/src/test-utils/README.md +42 -0
  45. package/reference/scaffold/core/organization-graph.mdx +272 -272
  46. package/reference/scaffold/core/organization-model.mdx +320 -320
  47. package/reference/scaffold/index.mdx +64 -64
  48. package/reference/scaffold/operations/propagation-pipeline.md +125 -104
  49. package/reference/scaffold/operations/scaffold-maintenance.md +122 -122
  50. package/reference/scaffold/operations/workflow-recipes.md +436 -436
  51. package/reference/scaffold/recipes/add-a-feature.md +158 -158
  52. package/reference/scaffold/recipes/add-a-resource.md +158 -158
  53. package/reference/scaffold/recipes/customize-organization-model.md +400 -400
  54. package/reference/scaffold/recipes/extend-a-base-entity.md +140 -140
  55. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +158 -158
  56. package/reference/scaffold/recipes/index.md +32 -32
  57. package/reference/scaffold/reference/contracts.md +608 -607
  58. package/reference/scaffold/reference/feature-registry.md +2 -0
  59. package/reference/scaffold/reference/glossary.md +105 -105
  60. package/reference/scaffold/ui/composition-extensibility.mdx +1 -1
  61. package/reference/scaffold/ui/feature-flags-and-gating.md +1 -1
  62. package/reference/claude-config/commands/submit-request.md +0 -11
@@ -1,128 +1,128 @@
1
- # Configure: labels
2
-
3
- Guides the user through editing inline display labels on enum entries in the organization model.
4
-
5
- Labels are the `label` field carried by status entries, stage entries, and other enum-like
6
- elements in the model. They control what users see in the UI and what agents say when narrating
7
- state. Editing a label does not change the entry's `id` or `semanticClass` -- only the
8
- human-readable display string.
9
-
10
- This operation is Level A only (config-only edits to `foundations/config/organization-model.ts`).
11
- No new TypeScript files are created.
12
-
13
- ## What has labels
14
-
15
- The following model elements carry inline `label` fields that are editable here:
16
-
17
- **Statuses (sales domain -- deal pipeline stages):**
18
- Located in `foundations/config/organization-model.ts` under `sales.statuses` or in the platform
19
- defaults at `packages/core/src/organization-model/domains/sales.ts`.
20
-
21
- Each status entry shape (example):
22
-
23
- ```typescript
24
- { id: 'new', label: 'New Lead', semanticClass: 'active', color: 'blue' }
25
- ```
26
-
27
- **Statuses (prospecting domain -- lead lifecycle stages):**
28
- Located under `prospecting.statuses` or in `packages/core/src/organization-model/domains/prospecting.ts`.
29
-
30
- **Statuses (projects domain -- project and task stages):**
31
- Located under `projects.statuses` or in `packages/core/src/organization-model/domains/projects.ts`.
32
-
33
- **Features (`label` field):**
34
- The display label on a feature entry (e.g. changing "CRM" to "Sales Pipeline"). Editing this
35
- changes sidebar nav text and any agent narration that references the feature by label.
36
-
37
- **Navigation surfaces (`label` field):**
38
- Surface entries in the `navigation.surfaces` array each carry a `label`. Editing changes
39
- breadcrumb text and nav item display.
40
-
41
- The `id` and `semanticClass` of any entry must never be changed here -- those are structural
42
- anchors. Only `label` (and optionally `color` or `icon`) are in scope for this operation.
43
-
44
- ---
45
-
46
- ## Process
47
-
48
- ### Step 1: Read current state
49
-
50
- Ask the user which domain's labels they want to edit:
51
-
52
- - Deal pipeline stages (sales)
53
- - Lead lifecycle stages (prospecting)
54
- - Project/task stages (projects)
55
- - Feature names
56
- - Navigation surface names
57
-
58
- Read `foundations/config/organization-model.ts` and the relevant platform defaults file for the
59
- selected domain. Present all current label values for that domain:
60
-
61
- ```
62
- Current labels -- sales (deal pipeline stages):
63
- new "New Lead"
64
- contacted "Contacted"
65
- qualified "Qualified"
66
- proposal "Proposal Sent"
67
- negotiation "In Negotiation"
68
- closed_won "Closed Won"
69
- closed_lost "Closed Lost"
70
- ```
71
-
72
- ### Step 2: Gather changes
73
-
74
- Ask which labels the user wants to change. Work one at a time or accept a list:
75
-
76
- - "Which label do you want to rename? (by current label or ID)"
77
- - "What should it say instead?"
78
-
79
- Validate:
80
-
81
- - Max 120 characters
82
- - Non-empty
83
- - No change to the `id` or `semanticClass`
84
-
85
- If the user wants to change a `color` or `icon` alongside the label, accept that too.
86
-
87
- ### Step 3: Confirm before writing
88
-
89
- Present a diff:
90
-
91
- ```
92
- Proposed label changes -- sales:
93
- new: "New Lead" -> "Inbound Lead"
94
- proposal: "Proposal Sent" -> "Proposal Out"
95
- negotiation: (unchanged)
96
-
97
- Apply? (yes/no)
98
- ```
99
-
100
- ### Step 4: Codify
101
-
102
- Execute `.claude/skills/configure/operations/codify-level-a.md`.
103
-
104
- The write targets only the affected entries in the selected domain array. Entries not being
105
- changed are left exactly as they are. The `id` and `semanticClass` of every entry must remain
106
- unchanged in the output.
107
-
108
- ### Step 5: Report
109
-
110
- After successful validation:
111
-
112
- ```
113
- Labels updated.
114
- Domain: {domain name}
115
- Changed: {list of id: "old" -> "new"}
116
- foundations/config/organization-model.ts -- {domain}.statuses updated
117
- Type-check: PASS
118
- Schema validation: PASS
119
- ```
120
-
121
- If validation failed and rollback occurred:
122
-
123
- ```
124
- Labels update rolled back.
125
- Reason: {error message}
126
- foundations/config/organization-model.ts -- restored to previous state
127
- No changes persisted.
128
- ```
1
+ # Configure: labels
2
+
3
+ Guides the user through editing inline display labels on enum entries in the organization model.
4
+
5
+ Labels are the `label` field carried by status entries, stage entries, and other enum-like
6
+ elements in the model. They control what users see in the UI and what agents say when narrating
7
+ state. Editing a label does not change the entry's `id` or `semanticClass` -- only the
8
+ human-readable display string.
9
+
10
+ This operation is Level A only (config-only edits to `foundations/config/organization-model.ts`).
11
+ No new TypeScript files are created.
12
+
13
+ ## What has labels
14
+
15
+ The following model elements carry inline `label` fields that are editable here:
16
+
17
+ **Statuses (sales domain -- deal pipeline stages):**
18
+ Located in `foundations/config/organization-model.ts` under `sales.statuses` or in the platform
19
+ defaults at `packages/core/src/organization-model/domains/sales.ts`.
20
+
21
+ Each status entry shape (example):
22
+
23
+ ```typescript
24
+ { id: 'new', label: 'New Lead', semanticClass: 'active', color: 'blue' }
25
+ ```
26
+
27
+ **Statuses (prospecting domain -- lead lifecycle stages):**
28
+ Located under `prospecting.statuses` or in `packages/core/src/organization-model/domains/prospecting.ts`.
29
+
30
+ **Statuses (projects domain -- project and task stages):**
31
+ Located under `projects.statuses` or in `packages/core/src/organization-model/domains/projects.ts`.
32
+
33
+ **Features (`label` field):**
34
+ The display label on a feature entry (e.g. changing "CRM" to "Sales Pipeline"). Editing this
35
+ changes sidebar nav text and any agent narration that references the feature by label.
36
+
37
+ **Navigation surfaces (`label` field):**
38
+ Surface entries in the `navigation.surfaces` array each carry a `label`. Editing changes
39
+ breadcrumb text and nav item display.
40
+
41
+ The `id` and `semanticClass` of any entry must never be changed here -- those are structural
42
+ anchors. Only `label` (and optionally `color` or `icon`) are in scope for this operation.
43
+
44
+ ---
45
+
46
+ ## Process
47
+
48
+ ### Step 1: Read current state
49
+
50
+ Ask the user which domain's labels they want to edit:
51
+
52
+ - Deal pipeline stages (sales)
53
+ - Lead lifecycle stages (prospecting)
54
+ - Project/task stages (projects)
55
+ - Feature names
56
+ - Navigation surface names
57
+
58
+ Read `foundations/config/organization-model.ts` and the relevant platform defaults file for the
59
+ selected domain. Present all current label values for that domain:
60
+
61
+ ```
62
+ Current labels -- sales (deal pipeline stages):
63
+ new "New Lead"
64
+ contacted "Contacted"
65
+ qualified "Qualified"
66
+ proposal "Proposal Sent"
67
+ negotiation "In Negotiation"
68
+ closed_won "Closed Won"
69
+ closed_lost "Closed Lost"
70
+ ```
71
+
72
+ ### Step 2: Gather changes
73
+
74
+ Ask which labels the user wants to change. Work one at a time or accept a list:
75
+
76
+ - "Which label do you want to rename? (by current label or ID)"
77
+ - "What should it say instead?"
78
+
79
+ Validate:
80
+
81
+ - Max 120 characters
82
+ - Non-empty
83
+ - No change to the `id` or `semanticClass`
84
+
85
+ If the user wants to change a `color` or `icon` alongside the label, accept that too.
86
+
87
+ ### Step 3: Confirm before writing
88
+
89
+ Present a diff:
90
+
91
+ ```
92
+ Proposed label changes -- sales:
93
+ new: "New Lead" -> "Inbound Lead"
94
+ proposal: "Proposal Sent" -> "Proposal Out"
95
+ negotiation: (unchanged)
96
+
97
+ Apply? (yes/no)
98
+ ```
99
+
100
+ ### Step 4: Codify
101
+
102
+ Execute `.claude/skills/configure/operations/codify-level-a.md`.
103
+
104
+ The write targets only the affected entries in the selected domain array. Entries not being
105
+ changed are left exactly as they are. The `id` and `semanticClass` of every entry must remain
106
+ unchanged in the output.
107
+
108
+ ### Step 5: Report
109
+
110
+ After successful validation:
111
+
112
+ ```
113
+ Labels updated.
114
+ Domain: {domain name}
115
+ Changed: {list of id: "old" -> "new"}
116
+ foundations/config/organization-model.ts -- {domain}.statuses updated
117
+ Type-check: PASS
118
+ Schema validation: PASS
119
+ ```
120
+
121
+ If validation failed and rollback occurred:
122
+
123
+ ```
124
+ Labels update rolled back.
125
+ Reason: {error message}
126
+ foundations/config/organization-model.ts -- restored to previous state
127
+ No changes persisted.
128
+ ```
@@ -1,159 +1,159 @@
1
- # Configure: offerings
2
-
3
- Guides the user through reviewing and updating the `offerings` domain of the organization model.
4
-
5
- The `offerings` domain describes what the organization sells or delivers — a catalog of products
6
- and services modeled after Business Model Canvas "Value Propositions". Agents use offerings for
7
- quoting, proposal generation, and scope-of-work reasoning.
8
-
9
- ## Schema reference
10
-
11
- Source: `packages/core/src/organization-model/domains/offerings.ts`
12
-
13
- ```typescript
14
- OfferingsDomainSchema = z.object({
15
- products: z.array(ProductSchema).default([])
16
- })
17
-
18
- ProductSchema = z.object({
19
- id: z.string().trim().min(1).max(100), // stable ID, e.g. "product-starter-plan"
20
- name: z.string().trim().max(200).default(''), // display name
21
- description: z.string().trim().max(2000).default(''), // what it delivers
22
- pricingModel: PricingModelSchema.default('custom'), // 'one-time' | 'subscription' | 'usage-based' | 'custom'
23
- price: z.number().min(0).default(0), // base price amount (≥ 0)
24
- currency: z.string().trim().max(10).default('USD'),// ISO 4217, e.g. "USD", "EUR"
25
- targetSegmentIds: z.array(z.string()).default([]), // must ref customers.segments[].id
26
- deliveryFeatureId: z.string().optional() // optional ref to features[].id
27
- })
28
- ```
29
-
30
- `pricingModel` values:
31
-
32
- - `one-time` — single purchase (setup fee, project fee)
33
- - `subscription` — recurring (monthly/annual SaaS, retainer)
34
- - `usage-based` — metered by consumption (API calls, seats)
35
- - `custom` — negotiated or bespoke pricing
36
-
37
- Cross-reference constraints enforced at parse time:
38
-
39
- - `targetSegmentIds` entries must exist in `customers.segments[].id`
40
- - `deliveryFeatureId` (when present) must exist in `features[].id`
41
-
42
- Where this lands in the adapter: `foundations/config/organization-model.ts` under the `offerings`
43
- key of `defineOrganizationModel({...})`.
44
-
45
- ---
46
-
47
- ## Process
48
-
49
- ### Step 1: Read current state
50
-
51
- Read `foundations/config/organization-model.ts` and extract the current `offerings.products` array.
52
- Also extract `customers.segments` (for cross-reference display) and `features` (for
53
- `deliveryFeatureId` reference).
54
-
55
- Present a summary:
56
-
57
- ```
58
- Current offerings (N):
59
- 1. {name} ({id}) — {pricingModel} — {price} {currency}
60
- Targets: {segment names or "(none)"}
61
- (none defined yet)
62
- ```
63
-
64
- ### Step 2: Establish intent
65
-
66
- Ask whether the user wants to:
67
-
68
- - **Add** a new product/service
69
- - **Edit** an existing product (by name or number)
70
- - **Remove** a product
71
- - **Review all** in detail
72
-
73
- ### Step 3: Gather product details
74
-
75
- For each product being added or edited:
76
-
77
- **Core identity:**
78
-
79
- - "What's the name of this offering? (e.g. 'Starter Plan', 'Full-Service Retainer', 'One-Time Audit')"
80
- - "Give it a stable ID — lowercase with hyphens, like `product-starter-plan`."
81
- - "Describe what this product/service delivers in one or two sentences."
82
-
83
- **Pricing:**
84
-
85
- - "How is this priced? Options: one-time payment, subscription (recurring), usage-based (metered),
86
- or custom/negotiated."
87
- - "What's the base price? (Enter 0 if pricing is fully custom or not yet set.)"
88
- - "What currency? (Default: USD)"
89
-
90
- **Targeting:**
91
-
92
- - "Which customer segments does this offering target?"
93
- Show the available segments by name. The user can select by name; translate to IDs.
94
- If no segments are defined yet, note this and suggest configuring customers first.
95
-
96
- **Platform delivery (optional):**
97
-
98
- - "Is there a platform feature responsible for delivering this offering? (e.g. the CRM feature,
99
- the Projects feature)" Show available feature IDs. This field is optional.
100
-
101
- If a field already has a value, show it and ask "Keep this or update it?"
102
-
103
- ### Step 4: Confirm before writing
104
-
105
- Present a diff for the affected product(s):
106
-
107
- ```
108
- Proposed offerings change:
109
-
110
- ADD product "Full-Service Retainer" (product-full-service-retainer):
111
- name: "Full-Service Retainer"
112
- description: "End-to-end campaign delivery, reporting, and optimization for SMB clients."
113
- pricingModel: "subscription"
114
- price: 2500
115
- currency: "USD"
116
- targetSegmentIds: ["segment-smb-agencies"]
117
- deliveryFeatureId: (not set)
118
-
119
- Apply? (yes/no)
120
- ```
121
-
122
- ### Step 5: Cross-reference validation
123
-
124
- Before writing, verify:
125
-
126
- 1. Every `targetSegmentIds` entry exists in the current `customers.segments[].id` array in the
127
- adapter. If any are missing, surface the discrepancy and ask whether to add the missing segment
128
- first or proceed without the reference.
129
- 2. If `deliveryFeatureId` is provided, verify it exists in `features[].id`. If not found, surface
130
- a warning and offer to omit the field.
131
-
132
- ### Step 6: Codify
133
-
134
- Execute `.claude/skills/configure/operations/codify-level-a.md` with the proposed `offerings`
135
- block. Only the `products` array is written — no other keys in the adapter are touched.
136
-
137
- When adding a product, append to the array. When editing, replace by `id`. When removing, filter
138
- out and also surface any `targetSegmentIds` in other products referencing the removed ID.
139
-
140
- ### Step 7: Report
141
-
142
- After successful validation:
143
-
144
- ```
145
- Offerings updated.
146
- Products: {total count} ({N added / N edited / N removed})
147
- foundations/config/organization-model.ts — offerings.products updated
148
- Type-check: PASS
149
- Schema validation: PASS
150
- ```
151
-
152
- If validation failed and rollback occurred:
153
-
154
- ```
155
- Offerings update rolled back.
156
- Reason: {error message}
157
- foundations/config/organization-model.ts — restored to previous state
158
- No changes persisted.
159
- ```
1
+ # Configure: offerings
2
+
3
+ Guides the user through reviewing and updating the `offerings` domain of the organization model.
4
+
5
+ The `offerings` domain describes what the organization sells or delivers — a catalog of products
6
+ and services modeled after Business Model Canvas "Value Propositions". Agents use offerings for
7
+ quoting, proposal generation, and scope-of-work reasoning.
8
+
9
+ ## Schema reference
10
+
11
+ Source: `packages/core/src/organization-model/domains/offerings.ts`
12
+
13
+ ```typescript
14
+ OfferingsDomainSchema = z.object({
15
+ products: z.array(ProductSchema).default([])
16
+ })
17
+
18
+ ProductSchema = z.object({
19
+ id: z.string().trim().min(1).max(100), // stable ID, e.g. "product-starter-plan"
20
+ name: z.string().trim().max(200).default(''), // display name
21
+ description: z.string().trim().max(2000).default(''), // what it delivers
22
+ pricingModel: PricingModelSchema.default('custom'), // 'one-time' | 'subscription' | 'usage-based' | 'custom'
23
+ price: z.number().min(0).default(0), // base price amount (≥ 0)
24
+ currency: z.string().trim().max(10).default('USD'),// ISO 4217, e.g. "USD", "EUR"
25
+ targetSegmentIds: z.array(z.string()).default([]), // must ref customers.segments[].id
26
+ deliveryFeatureId: z.string().optional() // optional ref to features[].id
27
+ })
28
+ ```
29
+
30
+ `pricingModel` values:
31
+
32
+ - `one-time` — single purchase (setup fee, project fee)
33
+ - `subscription` — recurring (monthly/annual SaaS, retainer)
34
+ - `usage-based` — metered by consumption (API calls, seats)
35
+ - `custom` — negotiated or bespoke pricing
36
+
37
+ Cross-reference constraints enforced at parse time:
38
+
39
+ - `targetSegmentIds` entries must exist in `customers.segments[].id`
40
+ - `deliveryFeatureId` (when present) must exist in `features[].id`
41
+
42
+ Where this lands in the adapter: `foundations/config/organization-model.ts` under the `offerings`
43
+ key of `defineOrganizationModel({...})`.
44
+
45
+ ---
46
+
47
+ ## Process
48
+
49
+ ### Step 1: Read current state
50
+
51
+ Read `foundations/config/organization-model.ts` and extract the current `offerings.products` array.
52
+ Also extract `customers.segments` (for cross-reference display) and `features` (for
53
+ `deliveryFeatureId` reference).
54
+
55
+ Present a summary:
56
+
57
+ ```
58
+ Current offerings (N):
59
+ 1. {name} ({id}) — {pricingModel} — {price} {currency}
60
+ Targets: {segment names or "(none)"}
61
+ (none defined yet)
62
+ ```
63
+
64
+ ### Step 2: Establish intent
65
+
66
+ Ask whether the user wants to:
67
+
68
+ - **Add** a new product/service
69
+ - **Edit** an existing product (by name or number)
70
+ - **Remove** a product
71
+ - **Review all** in detail
72
+
73
+ ### Step 3: Gather product details
74
+
75
+ For each product being added or edited:
76
+
77
+ **Core identity:**
78
+
79
+ - "What's the name of this offering? (e.g. 'Starter Plan', 'Full-Service Retainer', 'One-Time Audit')"
80
+ - "Give it a stable ID — lowercase with hyphens, like `product-starter-plan`."
81
+ - "Describe what this product/service delivers in one or two sentences."
82
+
83
+ **Pricing:**
84
+
85
+ - "How is this priced? Options: one-time payment, subscription (recurring), usage-based (metered),
86
+ or custom/negotiated."
87
+ - "What's the base price? (Enter 0 if pricing is fully custom or not yet set.)"
88
+ - "What currency? (Default: USD)"
89
+
90
+ **Targeting:**
91
+
92
+ - "Which customer segments does this offering target?"
93
+ Show the available segments by name. The user can select by name; translate to IDs.
94
+ If no segments are defined yet, note this and suggest configuring customers first.
95
+
96
+ **Platform delivery (optional):**
97
+
98
+ - "Is there a platform feature responsible for delivering this offering? (e.g. the CRM feature,
99
+ the Projects feature)" Show available feature IDs. This field is optional.
100
+
101
+ If a field already has a value, show it and ask "Keep this or update it?"
102
+
103
+ ### Step 4: Confirm before writing
104
+
105
+ Present a diff for the affected product(s):
106
+
107
+ ```
108
+ Proposed offerings change:
109
+
110
+ ADD product "Full-Service Retainer" (product-full-service-retainer):
111
+ name: "Full-Service Retainer"
112
+ description: "End-to-end campaign delivery, reporting, and optimization for SMB clients."
113
+ pricingModel: "subscription"
114
+ price: 2500
115
+ currency: "USD"
116
+ targetSegmentIds: ["segment-smb-agencies"]
117
+ deliveryFeatureId: (not set)
118
+
119
+ Apply? (yes/no)
120
+ ```
121
+
122
+ ### Step 5: Cross-reference validation
123
+
124
+ Before writing, verify:
125
+
126
+ 1. Every `targetSegmentIds` entry exists in the current `customers.segments[].id` array in the
127
+ adapter. If any are missing, surface the discrepancy and ask whether to add the missing segment
128
+ first or proceed without the reference.
129
+ 2. If `deliveryFeatureId` is provided, verify it exists in `features[].id`. If not found, surface
130
+ a warning and offer to omit the field.
131
+
132
+ ### Step 6: Codify
133
+
134
+ Execute `.claude/skills/configure/operations/codify-level-a.md` with the proposed `offerings`
135
+ block. Only the `products` array is written — no other keys in the adapter are touched.
136
+
137
+ When adding a product, append to the array. When editing, replace by `id`. When removing, filter
138
+ out and also surface any `targetSegmentIds` in other products referencing the removed ID.
139
+
140
+ ### Step 7: Report
141
+
142
+ After successful validation:
143
+
144
+ ```
145
+ Offerings updated.
146
+ Products: {total count} ({N added / N edited / N removed})
147
+ foundations/config/organization-model.ts — offerings.products updated
148
+ Type-check: PASS
149
+ Schema validation: PASS
150
+ ```
151
+
152
+ If validation failed and rollback occurred:
153
+
154
+ ```
155
+ Offerings update rolled back.
156
+ Reason: {error message}
157
+ foundations/config/organization-model.ts — restored to previous state
158
+ No changes persisted.
159
+ ```