@elevasis/sdk 1.8.2 → 1.8.3
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 +1 -1
- package/dist/index.d.ts +88 -39
- package/dist/types/worker/adapters/lead.d.ts +1 -1
- package/dist/worker/index.js +2 -0
- package/package.json +2 -2
- package/reference/_navigation.md +7 -1
- package/reference/_reference-manifest.json +14 -0
- package/reference/claude-config/logs/scaffold-registry-reminder.log +3 -0
- package/reference/claude-config/rules/agent-start-here.md +254 -254
- package/reference/claude-config/rules/frontend.md +43 -43
- package/reference/claude-config/rules/operations.md +64 -64
- package/reference/claude-config/rules/organization-model.md +42 -43
- package/reference/claude-config/rules/organization-os.md +107 -107
- package/reference/claude-config/rules/shared-types.md +2 -2
- package/reference/claude-config/rules/task-tracking.md +1 -1
- package/reference/claude-config/rules/ui.md +202 -202
- package/reference/claude-config/rules/vibe.md +202 -202
- package/reference/claude-config/skills/configure/SKILL.md +98 -98
- package/reference/claude-config/skills/configure/operations/codify-level-a.md +100 -100
- package/reference/claude-config/skills/configure/operations/codify-level-b.md +158 -158
- package/reference/claude-config/skills/configure/operations/customers.md +150 -150
- package/reference/claude-config/skills/configure/operations/features.md +162 -162
- package/reference/claude-config/skills/configure/operations/goals.md +147 -147
- package/reference/claude-config/skills/configure/operations/identity.md +133 -133
- package/reference/claude-config/skills/configure/operations/labels.md +128 -128
- package/reference/claude-config/skills/configure/operations/offerings.md +159 -159
- package/reference/claude-config/skills/configure/operations/roles.md +153 -153
- package/reference/claude-config/skills/configure/operations/techStack.md +139 -139
- package/reference/claude-config/skills/explore/SKILL.md +78 -78
- package/reference/claude-config/skills/git-sync/SKILL.md +126 -0
- package/reference/claude-config/skills/save/SKILL.md +183 -183
- package/reference/claude-config/skills/setup/SKILL.md +275 -275
- package/reference/claude-config/skills/sync/SKILL.md +10 -44
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -0
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -0
- package/reference/claude-config/sync-notes/README.md +43 -0
- package/reference/packages/core/src/README.md +39 -36
- package/reference/packages/core/src/business/README.md +52 -52
- package/reference/packages/core/src/organization-model/README.md +97 -97
- package/reference/packages/core/src/test-utils/README.md +42 -0
- package/reference/scaffold/core/organization-graph.mdx +272 -272
- package/reference/scaffold/core/organization-model.mdx +320 -320
- package/reference/scaffold/index.mdx +64 -64
- package/reference/scaffold/operations/propagation-pipeline.md +125 -104
- package/reference/scaffold/operations/scaffold-maintenance.md +122 -122
- package/reference/scaffold/operations/workflow-recipes.md +436 -436
- package/reference/scaffold/recipes/add-a-feature.md +158 -158
- package/reference/scaffold/recipes/add-a-resource.md +158 -158
- package/reference/scaffold/recipes/customize-organization-model.md +400 -400
- package/reference/scaffold/recipes/extend-a-base-entity.md +140 -140
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +158 -158
- package/reference/scaffold/recipes/index.md +32 -32
- package/reference/scaffold/reference/contracts.md +608 -607
- package/reference/scaffold/reference/feature-registry.md +2 -0
- package/reference/scaffold/reference/glossary.md +105 -105
- package/reference/scaffold/ui/composition-extensibility.mdx +1 -1
- package/reference/scaffold/ui/feature-flags-and-gating.md +1 -1
|
@@ -1,153 +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
|
-
```
|
|
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
|
+
```
|
|
@@ -1,139 +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
|
-
```
|
|
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
|
+
```
|