@elevasis/sdk 1.5.5 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +296 -98
- package/dist/index.d.ts +7 -4
- package/package.json +2 -2
- package/reference/_navigation.md +2 -1
- package/reference/_reference-manifest.json +16 -2
- package/reference/claude-config/commands/submit-request.md +11 -0
- package/reference/claude-config/hooks/__tests__/pre-edit-vibe-gate.test.mjs +169 -0
- package/reference/claude-config/hooks/pre-edit-vibe-gate.mjs +128 -0
- package/reference/claude-config/logs/pre-edit-vibe-gate.log +23 -0
- package/reference/claude-config/rules/organization-os.md +55 -8
- package/reference/claude-config/rules/vibe.md +210 -0
- package/reference/claude-config/settings.json +11 -0
- package/reference/claude-config/skills/configure/SKILL.md +100 -0
- package/reference/claude-config/skills/configure/operations/codify-level-a.md +100 -0
- package/reference/claude-config/skills/configure/operations/codify-level-b.md +158 -0
- package/reference/claude-config/skills/configure/operations/customers.md +150 -0
- package/reference/claude-config/skills/configure/operations/features.md +163 -0
- package/reference/claude-config/skills/configure/operations/goals.md +147 -0
- package/reference/claude-config/skills/configure/operations/identity.md +133 -0
- package/reference/claude-config/skills/configure/operations/labels.md +128 -0
- package/reference/claude-config/skills/configure/operations/offerings.md +159 -0
- package/reference/claude-config/skills/configure/operations/roles.md +153 -0
- package/reference/claude-config/skills/configure/operations/techStack.md +139 -0
- package/reference/claude-config/skills/project/SKILL.md +96 -39
- package/reference/claude-config/skills/setup/SKILL.md +81 -32
- package/reference/claude-config/skills/{submit-issue → submit-request}/SKILL.md +41 -26
- package/reference/packages/core/src/organization-model/README.md +16 -12
- package/reference/scaffold/core/organization-graph.mdx +1 -0
- package/reference/scaffold/core/organization-model.mdx +84 -19
- package/reference/scaffold/recipes/add-a-feature.md +1 -1
- package/reference/scaffold/recipes/customize-organization-model.md +5 -5
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +3 -3
- package/reference/scaffold/reference/contracts.md +115 -7
- package/reference/scaffold/reference/feature-registry.md +1 -1
- package/reference/scaffold/reference/glossary.md +25 -4
- package/reference/claude-config/commands/submit-issue.md +0 -11
|
@@ -0,0 +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
|
+
```
|
|
@@ -0,0 +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
|
+
```
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Configure: roles
|
|
2
|
+
|
|
3
|
+
Guides the user through reviewing and updating the `roles` domain of the organization model.
|
|
4
|
+
|
|
5
|
+
The `roles` domain describes who does what inside the organization — a role chart inspired by the
|
|
6
|
+
EOS Accountability Chart but using plain-language field names throughout. Agents use this domain
|
|
7
|
+
for HITL routing, escalation logic, and approval-rights reasoning.
|
|
8
|
+
|
|
9
|
+
Field names are developer-facing; user-facing prompts should say "role", "responsibilities",
|
|
10
|
+
"reports to", and "held by". Do not say "seat", "accountability", or "EOS".
|
|
11
|
+
|
|
12
|
+
## Schema reference
|
|
13
|
+
|
|
14
|
+
Source: `packages/core/src/organization-model/domains/roles.ts`
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
RolesDomainSchema = z.object({
|
|
18
|
+
roles: z.array(RoleSchema).default([])
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
RoleSchema = z.object({
|
|
22
|
+
id: z.string().trim().min(1).max(100), // stable ID, e.g. "role-ceo"
|
|
23
|
+
title: z.string().trim().min(1).max(200), // display title, e.g. "CEO"
|
|
24
|
+
responsibilities: z.array(z.string().trim().max(500)).default([]),// what this role owns
|
|
25
|
+
reportsToId: z.string().trim().min(1).max(100).optional(), // must ref another roles[].id
|
|
26
|
+
heldBy: z.string().trim().max(200).optional() // name or email, free-form
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Cross-reference constraint: `reportsToId` (when present) must resolve to another `roles[].id` in
|
|
31
|
+
the same collection. Enforced at parse time by `OrganizationModelSchema.superRefine()`. Cycle
|
|
32
|
+
detection is not enforced (known limitation).
|
|
33
|
+
|
|
34
|
+
Absence of `reportsToId` indicates a top-level role (no reporting line).
|
|
35
|
+
|
|
36
|
+
Where this lands in the adapter: `foundations/config/organization-model.ts` under the `roles`
|
|
37
|
+
key of `defineOrganizationModel({...})`.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Process
|
|
42
|
+
|
|
43
|
+
### Step 1: Read current state
|
|
44
|
+
|
|
45
|
+
Read `foundations/config/organization-model.ts` and extract the current `roles.roles` array.
|
|
46
|
+
Present it as a role chart summary:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
Current roles (N):
|
|
50
|
+
{title} ({id})
|
|
51
|
+
Held by: {heldBy or "(unassigned)"}
|
|
52
|
+
Reports to: {reportsToId resolved to title, or "(top-level)"}
|
|
53
|
+
Responsibilities: {count or "(none listed)"}
|
|
54
|
+
(none defined yet)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If the array is empty, note that an empty roles chart means no HITL routing or escalation rules
|
|
58
|
+
are available yet.
|
|
59
|
+
|
|
60
|
+
### Step 2: Establish intent
|
|
61
|
+
|
|
62
|
+
Ask whether the user wants to:
|
|
63
|
+
|
|
64
|
+
- **Add** a new role
|
|
65
|
+
- **Edit** an existing role (by title or number)
|
|
66
|
+
- **Remove** a role
|
|
67
|
+
- **Review all** in detail (show full responsibilities lists)
|
|
68
|
+
|
|
69
|
+
### Step 3: Gather role details
|
|
70
|
+
|
|
71
|
+
For each role being added or edited:
|
|
72
|
+
|
|
73
|
+
**Core identity:**
|
|
74
|
+
|
|
75
|
+
- "What's the title of this role? (e.g. 'CEO', 'Head of Client Success', 'Operations Lead')"
|
|
76
|
+
- "Give it a stable ID — lowercase with hyphens, like `role-ceo` or `role-head-of-client-success`."
|
|
77
|
+
|
|
78
|
+
**Reporting line:**
|
|
79
|
+
|
|
80
|
+
- "Does this role report to another role? If so, which one?"
|
|
81
|
+
Show the existing roles by title. Translate selection to ID. If none, it becomes a top-level role.
|
|
82
|
+
|
|
83
|
+
**Responsibilities:**
|
|
84
|
+
|
|
85
|
+
- "What are the main things this role is accountable for? List them one at a time — I'll capture
|
|
86
|
+
each as a separate responsibility."
|
|
87
|
+
|
|
88
|
+
**Who holds it (optional):**
|
|
89
|
+
|
|
90
|
+
- "Who currently holds this role? A name or email address works — or leave it blank if it's
|
|
91
|
+
unassigned."
|
|
92
|
+
|
|
93
|
+
If a field already has a value, show it and ask "Keep this or update it?"
|
|
94
|
+
|
|
95
|
+
### Step 4: Confirm before writing
|
|
96
|
+
|
|
97
|
+
Present a diff for the affected role(s):
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
Proposed roles change:
|
|
101
|
+
|
|
102
|
+
ADD role "CEO" (role-ceo):
|
|
103
|
+
title: "CEO"
|
|
104
|
+
responsibilities: ["Set company direction", "Final approval on deals >$10K", "Manage investor relations"]
|
|
105
|
+
reportsToId: (none — top-level)
|
|
106
|
+
heldBy: "Alice Johnson"
|
|
107
|
+
|
|
108
|
+
ADD role "Head of Client Success" (role-head-of-client-success):
|
|
109
|
+
title: "Head of Client Success"
|
|
110
|
+
responsibilities: ["Own client health scores", "Lead QBRs", "Handle escalations"]
|
|
111
|
+
reportsToId: "role-ceo"
|
|
112
|
+
heldBy: (unassigned)
|
|
113
|
+
|
|
114
|
+
Apply? (yes/no)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Step 5: Cross-reference validation
|
|
118
|
+
|
|
119
|
+
Before writing, verify:
|
|
120
|
+
|
|
121
|
+
1. Every `reportsToId` in the proposed changes resolves to an ID that will exist after the write
|
|
122
|
+
(either already present in the array or being added in this batch).
|
|
123
|
+
2. If a role being removed has other roles that `reportsToId` to it, surface those orphaned
|
|
124
|
+
references and ask whether to clear the reporting lines before proceeding.
|
|
125
|
+
|
|
126
|
+
### Step 6: Codify
|
|
127
|
+
|
|
128
|
+
Execute `.claude/skills/configure/operations/codify-level-a.md` with the proposed `roles` block.
|
|
129
|
+
Only the `roles` array is written — no other keys in the adapter are touched.
|
|
130
|
+
|
|
131
|
+
When adding, append in declaration order (top-level roles first, then reporting roles). When
|
|
132
|
+
editing, replace by `id`. When removing, filter out.
|
|
133
|
+
|
|
134
|
+
### Step 7: Report
|
|
135
|
+
|
|
136
|
+
After successful validation:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
Roles updated.
|
|
140
|
+
Roles: {total count} ({N added / N edited / N removed})
|
|
141
|
+
foundations/config/organization-model.ts — roles.roles updated
|
|
142
|
+
Type-check: PASS
|
|
143
|
+
Schema validation: PASS
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
If validation failed and rollback occurred:
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
Roles update rolled back.
|
|
150
|
+
Reason: {error message}
|
|
151
|
+
foundations/config/organization-model.ts — restored to previous state
|
|
152
|
+
No changes persisted.
|
|
153
|
+
```
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Configure: techStack
|
|
2
|
+
|
|
3
|
+
Guides the user through reviewing and updating the tech stack metadata on resource mapping entries
|
|
4
|
+
in the organization model.
|
|
5
|
+
|
|
6
|
+
Tech stack information lives as an optional `techStack` extension field on each `ResourceMapping`
|
|
7
|
+
entry -- not as a standalone top-level domain. This keeps all integration metadata co-located with
|
|
8
|
+
the resource mapping that represents it, while adding fields that agents need for cross-integration
|
|
9
|
+
automation and system-of-record resolution.
|
|
10
|
+
|
|
11
|
+
## Schema reference
|
|
12
|
+
|
|
13
|
+
Source: `packages/core/src/organization-model/domains/shared.ts`
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
TechStackEntrySchema = z.object({
|
|
17
|
+
platform: z.string().trim().min(1).max(200),
|
|
18
|
+
purpose: z.string().trim().min(1).max(500),
|
|
19
|
+
credentialStatus: z.enum(['configured', 'pending', 'expired', 'missing']),
|
|
20
|
+
isSystemOfRecord: z.boolean().default(false)
|
|
21
|
+
})
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`credentialStatus` values:
|
|
25
|
+
|
|
26
|
+
- `configured` -- credential present and valid
|
|
27
|
+
- `pending` -- not yet set up
|
|
28
|
+
- `expired` -- credential existed but has lapsed
|
|
29
|
+
- `missing` -- expected but not present
|
|
30
|
+
|
|
31
|
+
`isSystemOfRecord: true` means this integration is the authoritative data source for its domain
|
|
32
|
+
(e.g. HubSpot is the system of record for contacts).
|
|
33
|
+
|
|
34
|
+
`techStack` is an optional field on `ResourceMappingSchema`. It is added to individual resource
|
|
35
|
+
mapping entries whose `resourceType` is `'integration'` or `'external'`.
|
|
36
|
+
|
|
37
|
+
Where this lands in the adapter: `foundations/config/organization-model.ts` inside the
|
|
38
|
+
`resourceMappings` array of `defineOrganizationModel({...})`. The `techStack` field is set on the
|
|
39
|
+
matching `ResourceMapping` object.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Process
|
|
44
|
+
|
|
45
|
+
### Step 1: Read current state
|
|
46
|
+
|
|
47
|
+
Read `foundations/config/organization-model.ts` and extract the `resourceMappings` array. Filter
|
|
48
|
+
to entries that either already have a `techStack` field or have `resourceType: 'integration'` or
|
|
49
|
+
`'external'`. Present as a summary:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Resource mappings with integration context (N):
|
|
53
|
+
{label} ({id}) -- resourceType: {type}
|
|
54
|
+
techStack: {platform} | {credentialStatus} | SoR: {yes/no}
|
|
55
|
+
(no techStack yet)
|
|
56
|
+
|
|
57
|
+
Other resource mappings (M total, K without techStack):
|
|
58
|
+
{list by label}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
If there are no resource mappings at all, note that the user should add resource mappings through
|
|
62
|
+
the SDK deployment process before configuring tech stack metadata here.
|
|
63
|
+
|
|
64
|
+
### Step 2: Establish intent
|
|
65
|
+
|
|
66
|
+
Ask whether the user wants to:
|
|
67
|
+
|
|
68
|
+
- **Add or update** tech stack metadata on an existing resource mapping
|
|
69
|
+
- **Update credential status** on an existing tech stack entry
|
|
70
|
+
- **Mark or unmark** an integration as the system of record
|
|
71
|
+
- **Review all** integration health
|
|
72
|
+
|
|
73
|
+
For adding or updating, the user selects a resource mapping from the list.
|
|
74
|
+
|
|
75
|
+
### Step 3: Gather tech stack details
|
|
76
|
+
|
|
77
|
+
For each resource mapping being updated:
|
|
78
|
+
|
|
79
|
+
**If no `techStack` field yet:**
|
|
80
|
+
|
|
81
|
+
- "What external platform does this resource mapping represent? (e.g. 'HubSpot', 'Stripe',
|
|
82
|
+
'Notion', 'Apify')"
|
|
83
|
+
- "What is this integration used for? (free-form description)"
|
|
84
|
+
- "What is the current credential status? Options: configured, pending, expired, missing."
|
|
85
|
+
- "Is this the system of record for its domain? (e.g. HubSpot is SoR for contacts)"
|
|
86
|
+
|
|
87
|
+
**If `techStack` already exists:**
|
|
88
|
+
|
|
89
|
+
Show the current values and ask which fields to update.
|
|
90
|
+
|
|
91
|
+
Credential status shortcut: if the user only wants to mark a credential as configured or expired,
|
|
92
|
+
skip directly to that field.
|
|
93
|
+
|
|
94
|
+
### Step 4: Confirm before writing
|
|
95
|
+
|
|
96
|
+
Present a diff scoped to the affected resource mapping entry:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Proposed techStack change:
|
|
100
|
+
|
|
101
|
+
UPDATE resourceMapping "HubSpot CRM Integration" (rm-hubspot):
|
|
102
|
+
techStack:
|
|
103
|
+
platform: "HubSpot"
|
|
104
|
+
purpose: "CRM for contacts, companies, and deal pipeline"
|
|
105
|
+
credentialStatus: "pending" -> "configured"
|
|
106
|
+
isSystemOfRecord: false -> true
|
|
107
|
+
|
|
108
|
+
Apply? (yes/no)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Step 5: Codify
|
|
112
|
+
|
|
113
|
+
Execute `.claude/skills/configure/operations/codify-level-a.md` with the proposed change to the
|
|
114
|
+
`resourceMappings` array. Only the targeted entry (matched by `id`) is modified -- all other
|
|
115
|
+
entries are left unchanged.
|
|
116
|
+
|
|
117
|
+
The write edits the `techStack` field on the matching `ResourceMapping` object inside the
|
|
118
|
+
`defineOrganizationModel({...})` call.
|
|
119
|
+
|
|
120
|
+
### Step 6: Report
|
|
121
|
+
|
|
122
|
+
After successful validation:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Tech stack updated.
|
|
126
|
+
Integrations: {total with techStack} ({N updated})
|
|
127
|
+
foundations/config/organization-model.ts -- resourceMappings updated
|
|
128
|
+
Type-check: PASS
|
|
129
|
+
Schema validation: PASS
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
If validation failed and rollback occurred:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Tech stack update rolled back.
|
|
136
|
+
Reason: {error message}
|
|
137
|
+
foundations/config/organization-model.ts -- restored to previous state
|
|
138
|
+
No changes persisted.
|
|
139
|
+
```
|