@elevasis/sdk 1.6.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +527 -4564
- package/dist/index.d.ts +72 -16
- package/package.json +2 -2
- package/reference/claude-config/hooks/post-edit-validate.mjs +0 -11
- package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +188 -0
- package/reference/claude-config/logs/pre-edit-vibe-gate.log +40 -0
- package/reference/claude-config/logs/scaffold-registry-reminder.log +17 -0
- package/reference/claude-config/rules/active-change-index.md +80 -0
- package/reference/claude-config/rules/agent-start-here.md +254 -0
- package/reference/claude-config/rules/deployment.md +0 -1
- package/reference/claude-config/rules/observability.md +2 -2
- package/reference/claude-config/rules/operations.md +64 -0
- package/reference/claude-config/rules/organization-model.md +44 -0
- package/reference/claude-config/rules/organization-os.md +56 -11
- package/reference/claude-config/rules/task-tracking.md +4 -4
- package/reference/claude-config/rules/ui.md +202 -0
- package/reference/claude-config/rules/vibe.md +202 -0
- package/reference/claude-config/settings.json +4 -0
- package/reference/claude-config/skills/configure/SKILL.md +98 -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 +161 -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/deploy/SKILL.md +3 -13
- package/reference/claude-config/skills/dsp/SKILL.md +2 -2
- package/reference/claude-config/skills/elevasis/SKILL.md +0 -4
- package/reference/claude-config/skills/explore/SKILL.md +5 -5
- package/reference/claude-config/skills/project/SKILL.md +1 -1
- package/reference/claude-config/skills/save/SKILL.md +5 -19
- package/reference/claude-config/skills/setup/SKILL.md +105 -40
- package/reference/claude-config/skills/status/SKILL.md +2 -3
- package/reference/claude-config/skills/submit-request/SKILL.md +1 -1
- package/reference/deployment/command-center.mdx +0 -17
- package/reference/framework/project-structure.mdx +1 -5
- package/reference/packages/core/src/organization-model/README.md +16 -12
- package/reference/packages/ui/src/hooks/README.md +1 -2
- package/reference/scaffold/core/organization-graph.mdx +1 -0
- package/reference/scaffold/core/organization-model.mdx +84 -19
- package/reference/scaffold/operations/propagation-pipeline.md +10 -11
- package/reference/scaffold/operations/scaffold-maintenance.md +1 -4
- package/reference/scaffold/recipes/add-a-feature.md +1 -1
- package/reference/scaffold/recipes/add-a-resource.md +3 -12
- 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/glossary.md +25 -4
- package/reference/claude-config/rules/docs.md +0 -26
|
@@ -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
|
+
```
|
|
@@ -38,17 +38,6 @@ Read the current version from `package.json`, then bump it:
|
|
|
38
38
|
|
|
39
39
|
Use the Edit tool to update the `"version"` field in `package.json` directly. Do not use `npm version` or any CLI command.
|
|
40
40
|
|
|
41
|
-
### Step 1c: Regenerate Documentation
|
|
42
|
-
|
|
43
|
-
Run both doc generators in sequence (resources first so the nav index picks up `resources.md`):
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
pnpm exec elevasis-sdk generate-resources
|
|
47
|
-
pnpm exec elevasis-sdk generate-docs
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
This ensures autogenerated files (`docs/resources.md`, `docs/index.md`) reflect the current resource state before they are committed. These must run after the version bump so any version references in generated output are correct.
|
|
51
|
-
|
|
52
41
|
### Step 2: Run Tests
|
|
53
42
|
|
|
54
43
|
```bash
|
|
@@ -133,8 +122,9 @@ After a successful push, mark any linked project task as `submitted`. This is a
|
|
|
133
122
|
- The most recent in-progress task on the most-recently-touched project, via:
|
|
134
123
|
|
|
135
124
|
```bash
|
|
136
|
-
pnpm
|
|
137
|
-
pnpm
|
|
125
|
+
pnpm elevasis-sdk project:list --status active --pretty
|
|
126
|
+
pnpm elevasis-sdk project:list --status blocked --pretty
|
|
127
|
+
pnpm elevasis-sdk project:task:list --project <project-id> --status in_progress --pretty
|
|
138
128
|
```
|
|
139
129
|
|
|
140
130
|
- If the session produced an ambiguous or empty result, PROMPT the user once: "Mark a project task as submitted? (task UUID, or 'skip')". Default is skip.
|
|
@@ -13,13 +13,13 @@ Parallel agent dispatch for implementation tasks. Orchestrate, then delegate to
|
|
|
13
13
|
|
|
14
14
|
1. **Always dispatch, never self-execute** -- the purpose is to offload work to subagents
|
|
15
15
|
2. **Parallel within waves** -- all agents in a wave dispatched in a SINGLE message
|
|
16
|
-
3. **
|
|
16
|
+
3. **Orient first** -- read `.claude/rules/agent-start-here.md` before planning to understand project structure and task routing
|
|
17
17
|
|
|
18
18
|
## Process
|
|
19
19
|
|
|
20
20
|
### Step 1: Understand Context
|
|
21
21
|
|
|
22
|
-
1. Read
|
|
22
|
+
1. Read `.claude/rules/agent-start-here.md` for project structure, task-class routing, and boundary resolution
|
|
23
23
|
2. Read relevant architecture/feature docs based on the task domain
|
|
24
24
|
3. If the task touches code, explore the relevant `src/` directories
|
|
25
25
|
|
|
@@ -49,11 +49,7 @@ Reports: resource count, validation errors, schema serialization warnings. Exit
|
|
|
49
49
|
|
|
50
50
|
Bundle and deploy resources to the Elevasis platform.
|
|
51
51
|
|
|
52
|
-
Before calling the SDK deploy, run both doc generators in sequence so the uploaded docs reflect the current resource state (resources first, then nav so `docs/index.md` picks up `resources.md`):
|
|
53
|
-
|
|
54
52
|
```bash
|
|
55
|
-
pnpm exec elevasis-sdk generate-resources
|
|
56
|
-
pnpm exec elevasis-sdk generate-docs
|
|
57
53
|
pnpm -C operations exec elevasis-sdk deploy [--prod]
|
|
58
54
|
```
|
|
59
55
|
|
|
@@ -26,11 +26,11 @@ Before orienting, scan the user's query for Organization OS terminology. If any
|
|
|
26
26
|
|
|
27
27
|
**If OS-relevant:**
|
|
28
28
|
|
|
29
|
-
1. Read
|
|
29
|
+
1. Read `.claude/rules/active-change-index.md` immediately. If the target area is flagged as under active refactor, surface the watch-area warning to the user before proceeding — include the "Load:" doc paths listed in that entry so investigation does not rely on stale scaffold prose.
|
|
30
30
|
2. Build the OS context bundle to pass into Step 3:
|
|
31
|
-
- Always: `node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md`,
|
|
31
|
+
- Always: `node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md`, `.claude/rules/active-change-index.md`, `.claude/rules/agent-start-here.md`
|
|
32
32
|
- Features / Shell / Gating queries: add `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` + `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
|
|
33
|
-
- Workflow / Operations queries: add
|
|
33
|
+
- Workflow / Operations queries: add `.claude/rules/operations.md` + glob `operations/resources/**`
|
|
34
34
|
- Organization-model queries: add `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` + `foundations/config/README.md`
|
|
35
35
|
|
|
36
36
|
**OS layer → query intent map** (guides which reference docs the investigator loads first):
|
|
@@ -40,12 +40,12 @@ Before orienting, scan the user's query for Organization OS terminology. If any
|
|
|
40
40
|
| "Why doesn't my feature show up?" | Features + UI Shell Runtime | `glossary.md` (accessFeatureKey, FEATURE_KEY_ALIASES), `feature-flags-and-gating.md` |
|
|
41
41
|
| "How do I add a nav item?" | Features + Toolkit | `feature-flags-and-gating.md`, `contracts.md` |
|
|
42
42
|
| "How does admin gating work?" | Features + UI Shell Runtime | `glossary.md` (AdminGuard, requiresAdmin, ProtectedRoute), `feature-flags-and-gating.md` |
|
|
43
|
-
| "What runs when this workflow triggers?" | Platform Public API + Operations |
|
|
43
|
+
| "What runs when this workflow triggers?" | Platform Public API + Operations | `.claude/rules/operations.md`, `resources.md` |
|
|
44
44
|
| "Why does the foundations adapter fail?" | Foundations | `glossary.md` (domain vs surface, settings asymmetry), `foundations/config/README.md` |
|
|
45
45
|
|
|
46
46
|
### Step 1: Orient
|
|
47
47
|
|
|
48
|
-
1. Read
|
|
48
|
+
1. Read `.claude/rules/agent-start-here.md` for project structure, task-class routing, and boundary resolution
|
|
49
49
|
2. Determine which domain the user's question falls into
|
|
50
50
|
|
|
51
51
|
### Step 2: Load Domain Context
|
|
@@ -317,7 +317,7 @@ For progress detail (milestones/tasks), follow up with `project:milestone:list`
|
|
|
317
317
|
Wraps `project:work` for fuzzy-matched resume. Used by intent-detection "resume" classification.
|
|
318
318
|
|
|
319
319
|
```bash
|
|
320
|
-
pnpm elevasis-sdk project:work <query>
|
|
320
|
+
pnpm elevasis-sdk project:work <query>
|
|
321
321
|
```
|
|
322
322
|
|
|
323
323
|
Prints the matched project/task brief with current `resume_context`. If multiple matches, show top 3 and ask which.
|
|
@@ -88,10 +88,6 @@ No other fields. Do NOT add `resume_context`, `files_modified`, or `next_steps`
|
|
|
88
88
|
|
|
89
89
|
**Doc structure rules:**
|
|
90
90
|
|
|
91
|
-
- `docs/ui/` -- frontend features, auth, components, hooks, charts, pages
|
|
92
|
-
- `docs/operations/` -- platform workflows, agents, deployment, resource registry
|
|
93
|
-
- `docs/knowledge/` -- project knowledge, research, reference material, domain context
|
|
94
|
-
- New sections auto-detected -- any subdirectory of `docs/` becomes a section
|
|
95
91
|
- All docs are `.md` (not .mdx)
|
|
96
92
|
- Keep docs focused -- one topic per file
|
|
97
93
|
- Use markdown tables for structured data
|
|
@@ -115,11 +111,11 @@ Dispatch a `general-purpose` subagent with the plan, conversation context, and t
|
|
|
115
111
|
If Step 1 resolved a task ID, save the current state to `prj_tasks.resume_context` via the SDK CLI. This is the canonical persistence step and must run every `/save` invocation that has a task in scope:
|
|
116
112
|
|
|
117
113
|
```bash
|
|
118
|
-
pnpm
|
|
114
|
+
pnpm elevasis-sdk project:task:save <task-uuid> \
|
|
119
115
|
--current-state "<concise prose summary of where we are>" \
|
|
120
116
|
--next-steps "<concise prose of the next concrete action>" \
|
|
121
117
|
--files-modified '["path/one.ts","path/two.tsx"]' \
|
|
122
|
-
--key-docs '["
|
|
118
|
+
--key-docs '["operations/resources/foo/index.ts"]' \
|
|
123
119
|
--tools '["project:task:save","project:note:create"]'
|
|
124
120
|
```
|
|
125
121
|
|
|
@@ -138,7 +134,7 @@ The endpoint is `PATCH /api/external/tasks/<id>/resume-context` and merges (does
|
|
|
138
134
|
For each signal event identified in Step 2, create a typed `prj_note`. One CLI call per note:
|
|
139
135
|
|
|
140
136
|
```bash
|
|
141
|
-
pnpm
|
|
137
|
+
pnpm elevasis-sdk project:note:create \
|
|
142
138
|
--project <project-uuid> \
|
|
143
139
|
--task <task-uuid> # optional, omit if not scoped to a task \
|
|
144
140
|
--type <note-type> \
|
|
@@ -169,17 +165,7 @@ Rules:
|
|
|
169
165
|
- **Idempotent** -- if the task is already `blocked`, the update is a no-op. Fire it anyway; do not pre-check.
|
|
170
166
|
- **Order** -- the `blocker` note (Step 5) creates first; this transition follows. Keeps the note attached to the task even if the status update later fails.
|
|
171
167
|
|
|
172
|
-
### Step 6:
|
|
173
|
-
|
|
174
|
-
After the Step 3 subagent completes all doc file changes, regenerate `docs/index.md`:
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
pnpm exec elevasis-sdk generate-docs
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
This deterministically scans `docs/`, reads frontmatter, and rebuilds the navigation hub. Never edit `docs/index.md` manually.
|
|
181
|
-
|
|
182
|
-
### Step 7: Report
|
|
168
|
+
### Step 6: Report
|
|
183
169
|
|
|
184
170
|
Summarize:
|
|
185
171
|
|
|
@@ -194,4 +180,4 @@ Summarize:
|
|
|
194
180
|
|
|
195
181
|
- **No task in scope + user declines to provide one:** proceed with Steps 2, 3, 6, 7; skip Step 4; still allow Step 5 if a `--project` UUID is available.
|
|
196
182
|
- **`project:task:save` returns non-2xx:** surface the error in the report, do not retry silently; Step 5 and Step 6 still run.
|
|
197
|
-
-
|
|
183
|
+
- **Knowledge doc edits fail to write:** surface the error; any edits already applied are on disk and not lost.
|
|
@@ -1,35 +1,51 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup
|
|
3
|
-
description: First-time project setup — detect and replace template placeholders, install dependencies, verify build
|
|
3
|
+
description: First-time project setup — detect and replace template placeholders, install dependencies, verify build, then hand off to /configure for org-model configuration
|
|
4
4
|
argument-hint: ""
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Setup
|
|
8
8
|
|
|
9
|
-
First-time project setup for projects cloned directly from the template.
|
|
9
|
+
First-time project setup for projects cloned directly from the template. Handles placeholder replacement, dependency install, and build verification. After bootstrap, delegates org-model configuration to `/configure`.
|
|
10
10
|
|
|
11
11
|
**Usage:** `/setup`
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
---
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## State Detection (Run Before Anything Else)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Before collecting any information or running any steps, determine which state the project is in. Read these files:
|
|
18
18
|
|
|
19
19
|
- `package.json` — look for `__PROJECT_SLUG__` in the `name` field
|
|
20
|
-
- `CLAUDE.md` — look for `TEMPLATE_PROJECT_NAME`
|
|
20
|
+
- `CLAUDE.md` — look for `TEMPLATE_PROJECT_NAME` AND check whether `{CLIENT_CONTEXT}` and `{USER_PREFERENCES}` are still literal placeholder strings
|
|
21
21
|
- `ui/package.json` — look for `__PROJECT_SLUG__`
|
|
22
22
|
- `ui/index.html` — look for `__PROJECT_NAME__`
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
**State A — Virgin (placeholders present):** One or more of the above placeholder strings is found. Run the full bootstrap flow (Steps 1–7 below), then hand off to `/configure`.
|
|
25
|
+
|
|
26
|
+
**State B — Already bootstrapped, org-model at defaults:** No placeholders found, but `foundations/config/organization-model.ts` contains only the default branding override (just `branding.organizationName`, `branding.productName`, `branding.shortName` — no identity, customers, offerings, roles, goals, or techStack overrides). Print:
|
|
25
27
|
|
|
26
28
|
```
|
|
27
|
-
|
|
29
|
+
This project is already set up. The organization model has not been configured yet.
|
|
30
|
+
Running /configure to set up your organization profile...
|
|
28
31
|
```
|
|
29
32
|
|
|
30
|
-
Then
|
|
33
|
+
Then execute `/configure` (the full layered flow) and stop.
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
**State C — Fully configured:** No placeholders found AND `foundations/config/organization-model.ts` has at least one non-branding domain populated (identity, customers, offerings, roles, goals, or techStack present). Print:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
This project is already configured. To update your organization profile, run /configure.
|
|
39
|
+
To re-verify the build, run the checks below.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Offer to run the verification checks (Steps 6b–6e) if the user wants them. Do not re-ask any questions. Do not re-run placeholder replacement. Stop after verification.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Full Bootstrap Flow (State A Only)
|
|
47
|
+
|
|
48
|
+
### Step 1: Collect Project Info
|
|
33
49
|
|
|
34
50
|
Ask the user for three values:
|
|
35
51
|
|
|
@@ -49,7 +65,7 @@ Configuring project with:
|
|
|
49
65
|
Proceed? (yes/no)
|
|
50
66
|
```
|
|
51
67
|
|
|
52
|
-
### Step
|
|
68
|
+
### Step 2: Get to Know the User and Client
|
|
53
69
|
|
|
54
70
|
Transition naturally after confirming the project values: "Now let me learn a bit about you and the client so I can be more helpful going forward."
|
|
55
71
|
|
|
@@ -86,7 +102,7 @@ Client: {company}
|
|
|
86
102
|
Look good?
|
|
87
103
|
```
|
|
88
104
|
|
|
89
|
-
### Step
|
|
105
|
+
### Step 3: Replace Placeholders
|
|
90
106
|
|
|
91
107
|
Search ALL files in the project matching these extensions: `.ts`, `.tsx`, `.js`, `.mjs`, `.json`, `.md`, `.mdx`, `.html`, `.yaml`, `.yml`, `.css`, `.env.example`
|
|
92
108
|
|
|
@@ -105,21 +121,19 @@ For each matching file, replace all occurrences of:
|
|
|
105
121
|
|
|
106
122
|
Use the Read tool to read each file, then the Edit tool (with `replace_all: true`) or Write tool to apply the replacements. Read each file before writing.
|
|
107
123
|
|
|
108
|
-
After all replacements, re-scan the four key files from
|
|
124
|
+
After all replacements, re-scan the four key files from State Detection to verify zero placeholders remain. If any are still present, report them by file and fix immediately.
|
|
109
125
|
|
|
110
|
-
### Step
|
|
126
|
+
### Step 4: Populate CLAUDE.md Knowledge Sections
|
|
111
127
|
|
|
112
|
-
|
|
128
|
+
**Idempotency check (MANDATORY before writing):** Read `CLAUDE.md` and check whether `{CLIENT_CONTEXT}` and `{USER_PREFERENCES}` are still literal placeholder strings. Only write if they are still placeholders. If either section is already filled in (user or a previous run already populated it), skip that section entirely — do not overwrite.
|
|
113
129
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
**`{CLIENT_CONTEXT}`** -- replace with a single line:
|
|
130
|
+
**`{CLIENT_CONTEXT}`** -- replace with a single line (only if still a placeholder):
|
|
117
131
|
|
|
118
132
|
```markdown
|
|
119
133
|
**{company name}** — {what they do, one sentence}
|
|
120
134
|
```
|
|
121
135
|
|
|
122
|
-
**`{USER_PREFERENCES}`** -- replace with a table:
|
|
136
|
+
**`{USER_PREFERENCES}`** -- replace with a table (only if still a placeholder):
|
|
123
137
|
|
|
124
138
|
```markdown
|
|
125
139
|
| Name | Role | Technical Level | Communication |
|
|
@@ -129,28 +143,47 @@ Knowledge is split between `CLAUDE.md` (essentials loaded every turn) and `docs/
|
|
|
129
143
|
|
|
130
144
|
If the user skipped any knowledge questions, fill in what was provided and omit what wasn't -- don't leave placeholder text behind.
|
|
131
145
|
|
|
132
|
-
|
|
146
|
+
### Step 5: Write Client Brief to Org Model
|
|
133
147
|
|
|
134
|
-
|
|
148
|
+
**Idempotency check:** Read `foundations/config/organization-model.ts` and inspect `identity.clientBrief`. If the field is already a non-empty string, skip this step entirely — do not overwrite.
|
|
135
149
|
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
title: Client Context
|
|
139
|
-
description: Company background, industry, stakeholders, and business goals
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
# Client Context
|
|
150
|
+
If the field is empty or absent, compose the client brief from the information gathered in Step 2:
|
|
143
151
|
|
|
152
|
+
```markdown
|
|
144
153
|
**Company:** {company name}
|
|
145
154
|
**Industry:** {industry}
|
|
146
155
|
**Description:** {what they do}
|
|
147
156
|
|
|
148
157
|
## Additional Context
|
|
149
158
|
|
|
150
|
-
{any additional context shared
|
|
159
|
+
{any additional context shared — key stakeholders, business goals, constraints, etc. If nothing was shared, write "No additional context provided yet. Update this as the project evolves."}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Propose the composed content to the user before writing (read → propose → confirm → write — the same ceremony `/configure` uses):
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
Here's the client brief I'll write into identity.clientBrief:
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
{composed content}
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
Write this? (yes/no)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
On confirmation, use the Edit tool to replace the `clientBrief: ''` value in `foundations/config/organization-model.ts` with a template literal containing the composed markdown. Use a regular string (backtick or single-quoted multi-line) — ensure the closing quote and trailing comma are correct TypeScript.
|
|
175
|
+
|
|
176
|
+
After the edit, run:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
pnpm -C foundations check-types
|
|
151
180
|
```
|
|
152
181
|
|
|
153
|
-
|
|
182
|
+
If type-check fails, report the error and do not proceed to Step 6 until it is resolved.
|
|
183
|
+
|
|
184
|
+
### Step 6: Install and Verify
|
|
185
|
+
|
|
186
|
+
#### Step 6a: Install Dependencies
|
|
154
187
|
|
|
155
188
|
```bash
|
|
156
189
|
pnpm install
|
|
@@ -158,7 +191,7 @@ pnpm install
|
|
|
158
191
|
|
|
159
192
|
This generates the project's own `pnpm-lock.yaml`. Report success or any errors.
|
|
160
193
|
|
|
161
|
-
|
|
194
|
+
#### Step 6b–6e: Verify Build
|
|
162
195
|
|
|
163
196
|
Run all checks sequentially (stop and report on first failure, but attempt all):
|
|
164
197
|
|
|
@@ -171,7 +204,7 @@ pnpm -C operations check-types
|
|
|
171
204
|
|
|
172
205
|
For each check, record PASS or FAIL. If a check fails, read the output and report the error clearly. Do not silently skip failures.
|
|
173
206
|
|
|
174
|
-
### Step
|
|
207
|
+
### Step 7: Bootstrap Report
|
|
175
208
|
|
|
176
209
|
```
|
|
177
210
|
You're all set, {name}!
|
|
@@ -185,16 +218,23 @@ Verification:
|
|
|
185
218
|
[PASS/FAIL] Production build (ui)
|
|
186
219
|
[PASS/FAIL] Resource validation (operations)
|
|
187
220
|
[PASS/FAIL] Type-check (operations)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
If any verification step failed, add an Errors section listing each failure with its output.
|
|
224
|
+
|
|
225
|
+
### Step 8: Hand Off to /configure
|
|
226
|
+
|
|
227
|
+
After a successful bootstrap, transition to the org-model configuration flow. Print:
|
|
188
228
|
|
|
189
|
-
Next steps:
|
|
190
|
-
1. Copy root .env.example to .env and fill in ELEVASIS_PLATFORM_KEY
|
|
191
|
-
2. Copy ui/.env.example to ui/.env and fill in VITE_WORKOS_CLIENT_ID
|
|
192
|
-
3. See TODO.md for WorkOS dashboard setup and branding
|
|
193
|
-
4. pnpm -C ui dev (start dev server on port 4300)
|
|
194
|
-
5. (If client-workspace/ exists) Open it in Claude Code and run /setup
|
|
195
229
|
```
|
|
230
|
+
Bootstrap complete. Now let's set up your organization profile.
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Then execute `/configure` (the full layered flow, no argument). This is where identity, customers, offerings, roles, goals, and techStack are configured. Do not attempt to collect or write org-model data here — that ceremony belongs entirely to /configure.
|
|
196
234
|
|
|
197
|
-
If
|
|
235
|
+
If the user wants to skip org-model setup for now, they can stop here and run `/configure` later.
|
|
236
|
+
|
|
237
|
+
---
|
|
198
238
|
|
|
199
239
|
## Error Recovery
|
|
200
240
|
|
|
@@ -207,4 +247,29 @@ Remaining: <list files and placeholders>
|
|
|
207
247
|
Action: Re-applying replacements to affected files...
|
|
208
248
|
```
|
|
209
249
|
|
|
210
|
-
Fix each remaining occurrence before proceeding to Step
|
|
250
|
+
Fix each remaining occurrence before proceeding to Step 6a.
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Idempotency Guarantees
|
|
255
|
+
|
|
256
|
+
Running `/setup` more than once is safe:
|
|
257
|
+
|
|
258
|
+
- **Placeholder replacement** only runs when placeholders are detected (State A). It is skipped entirely in States B and C.
|
|
259
|
+
- **CLAUDE.md knowledge sections** (`{CLIENT_CONTEXT}`, `{USER_PREFERENCES}`) are checked before writing. If already replaced, the write is skipped.
|
|
260
|
+
- **`identity.clientBrief`** is only written when the field is empty. A non-empty field is never overwritten by `/setup`. The write uses a read → propose → confirm ceremony before touching the file.
|
|
261
|
+
- **All other org-model fields** (`foundations/config/organization-model.ts`) are never written by `/setup`. All other org-model edits go through `/configure`, which has its own diff-preview and confirm ceremony.
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Relationship to /configure
|
|
266
|
+
|
|
267
|
+
`/setup` is a thin bootstrap wrapper. It:
|
|
268
|
+
|
|
269
|
+
1. Replaces scaffold placeholders (project name, slug, description)
|
|
270
|
+
2. Fills lightweight CLAUDE.md knowledge sections (user and client basics, idempotent)
|
|
271
|
+
3. Writes the client brief into `identity.clientBrief` in the org model (confirm-before-write, idempotent)
|
|
272
|
+
4. Installs dependencies and verifies the build
|
|
273
|
+
5. Hands off to `/configure` for full org-model configuration
|
|
274
|
+
|
|
275
|
+
`/configure` owns all other structural org-model editing (identity fields beyond clientBrief, customers, offerings, roles, goals, techStack, features, labels). It is idempotent, confirm-before-overwrite, and includes a runtime validation gate. Re-run `/configure` any time organizational reality changes — no need to re-run `/setup`.
|
|
@@ -20,10 +20,9 @@ Run in parallel:
|
|
|
20
20
|
3. `pnpm test` - test results
|
|
21
21
|
4. `pnpm lint` - type check
|
|
22
22
|
|
|
23
|
-
### Step 2: Check
|
|
23
|
+
### Step 2: Check Active Work
|
|
24
24
|
|
|
25
|
-
1.
|
|
26
|
-
2. Query active project work via `pnpm -C operations exec elevasis-sdk project:list --status active,blocked --format brief` - active project/task count lives in the DB, not in `docs/in-progress/`
|
|
25
|
+
1. Query active project work via `pnpm elevasis-sdk project:list --status active --pretty` and `pnpm elevasis-sdk project:list --status blocked --pretty` - active project/task count lives in the DB
|
|
27
26
|
|
|
28
27
|
### Step 3: Report
|
|
29
28
|
|
|
@@ -154,7 +154,7 @@ Once confirmed (or `--auto`), write the assembled JSON body to a temp file then
|
|
|
154
154
|
# Write the report body to a temp file
|
|
155
155
|
# (Use the Write tool to create request-report.json at the project root)
|
|
156
156
|
|
|
157
|
-
pnpm
|
|
157
|
+
pnpm elevasis-sdk request:submit --input-file ./request-report.json --pretty
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
Delete the temp file after submission succeeds or fails.
|
|
@@ -14,7 +14,6 @@ The Command Center is the browser UI for interacting with deployed resources. Af
|
|
|
14
14
|
| -------------------------------------------------- | -------------- | ----------------------- |
|
|
15
15
|
| Browse deployed resources, view the resource graph | Command View | `/command-view` |
|
|
16
16
|
| Approve or reject pending HITL requests | Command Queue | `/queue` |
|
|
17
|
-
| Browse deployed documentation | Knowledge Base | `/knowledge-base` |
|
|
18
17
|
| Search execution history across all resources | Execution Logs | `/logs` |
|
|
19
18
|
| Create API key and OAuth credentials | Credentials | `/settings/credentials` |
|
|
20
19
|
| View deployment history and active version | Deployments | `/settings/deployments` |
|
|
@@ -147,22 +146,6 @@ const task = await approval.create({
|
|
|
147
146
|
|
|
148
147
|
---
|
|
149
148
|
|
|
150
|
-
## Knowledge Base
|
|
151
|
-
|
|
152
|
-
The Knowledge Base renders the `docs/` directory of your deployed workspace as browsable documentation.
|
|
153
|
-
|
|
154
|
-
**What you can do here:**
|
|
155
|
-
|
|
156
|
-
- Browse pages you created in `docs/*.mdx`
|
|
157
|
-
- Search across all documentation
|
|
158
|
-
- Share links to specific pages with team members
|
|
159
|
-
|
|
160
|
-
**How it connects to your code:** Every `.mdx` file in your workspace's `docs/` directory is bundled at deploy time and rendered here.
|
|
161
|
-
|
|
162
|
-
> **SDK takeaway:** Write `docs/*.mdx` pages for your team -- business process docs, schema references, usage guides. They appear here automatically after each deploy.
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
149
|
## Execution Logs
|
|
167
150
|
|
|
168
151
|
The Execution Logs page shows the history of all executions across every deployed resource.
|
|
@@ -45,7 +45,7 @@ Cross-runtime types, schemas, constants, and organization-model configuration sh
|
|
|
45
45
|
|
|
46
46
|
### `operations/elevasis.config.ts`
|
|
47
47
|
|
|
48
|
-
Project-level configuration. The scaffolded file includes commented-out options (`defaultStatus`, `dev.port`)
|
|
48
|
+
Project-level configuration. The scaffolded file includes commented-out options (`defaultStatus`, `dev.port`):
|
|
49
49
|
|
|
50
50
|
```ts
|
|
51
51
|
import type { ElevasConfig } from '@elevasis/sdk'
|
|
@@ -53,13 +53,9 @@ import type { ElevasConfig } from '@elevasis/sdk'
|
|
|
53
53
|
export default {
|
|
54
54
|
// defaultStatus: 'dev', // Default status for new resources ('dev' | 'prod')
|
|
55
55
|
// dev: { port: 5170 }, // Local API port (internal development only)
|
|
56
|
-
|
|
57
|
-
docsDir: '../docs' // Scan the template's top-level docs/ directory
|
|
58
56
|
} satisfies ElevasConfig
|
|
59
57
|
```
|
|
60
58
|
|
|
61
|
-
The `docsDir` option (relative to CWD) overrides where the CLI scans for documentation files. Use `false` to disable documentation scanning entirely.
|
|
62
|
-
|
|
63
59
|
---
|
|
64
60
|
|
|
65
61
|
## Documentation
|