@elevasis/sdk 1.7.0 → 1.8.1
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 +525 -4562
- 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 +17 -0
- package/reference/claude-config/logs/scaffold-registry-reminder.log +34 -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 +2 -4
- 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 +0 -8
- package/reference/claude-config/settings.json +4 -11
- package/reference/claude-config/skills/configure/SKILL.md +0 -2
- package/reference/claude-config/skills/configure/operations/features.md +10 -11
- package/reference/claude-config/skills/deploy/SKILL.md +4 -14
- package/reference/claude-config/skills/dsp/SKILL.md +2 -2
- package/reference/claude-config/skills/elevasis/SKILL.md +24 -28
- package/reference/claude-config/skills/explore/SKILL.md +5 -5
- package/reference/claude-config/skills/project/SKILL.md +33 -1
- package/reference/claude-config/skills/save/SKILL.md +8 -22
- package/reference/claude-config/skills/setup/SKILL.md +32 -16
- 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/ui/src/hooks/README.md +1 -2
- package/reference/scaffold/operations/propagation-pipeline.md +10 -11
- package/reference/scaffold/operations/scaffold-maintenance.md +1 -4
- package/reference/scaffold/recipes/add-a-resource.md +3 -12
- package/reference/scaffold/reference/contracts.md +1 -1
- package/reference/claude-config/hooks/__tests__/pre-edit-vibe-gate.test.mjs +0 -169
- package/reference/claude-config/hooks/pre-edit-vibe-gate.mjs +0 -128
- package/reference/claude-config/rules/docs.md +0 -26
|
@@ -4,17 +4,6 @@
|
|
|
4
4
|
"command": "node .claude/scripts/statusline-command.js"
|
|
5
5
|
},
|
|
6
6
|
"hooks": {
|
|
7
|
-
"PreToolUse": [
|
|
8
|
-
{
|
|
9
|
-
"matcher": "Write|Edit|MultiEdit",
|
|
10
|
-
"hooks": [
|
|
11
|
-
{
|
|
12
|
-
"type": "command",
|
|
13
|
-
"command": "node .claude/hooks/pre-edit-vibe-gate.mjs"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
7
|
"PostToolUse": [
|
|
19
8
|
{
|
|
20
9
|
"matcher": "Write|Edit|MultiEdit",
|
|
@@ -22,6 +11,10 @@
|
|
|
22
11
|
{
|
|
23
12
|
"type": "command",
|
|
24
13
|
"command": "node .claude/hooks/post-edit-validate.mjs"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"type": "command",
|
|
17
|
+
"command": "node .claude/hooks/scaffold-registry-reminder.mjs"
|
|
25
18
|
}
|
|
26
19
|
]
|
|
27
20
|
}
|
|
@@ -22,8 +22,6 @@ Recurring, safe-to-re-run org model editor for external projects. Reads the orga
|
|
|
22
22
|
- `/configure features` -- Enable, disable, or add features; Level A (defaults) or Level B (new extension TS files)
|
|
23
23
|
- `/configure labels` -- Edit inline display labels on enum entries (statuses, stages, categories)
|
|
24
24
|
|
|
25
|
-
**Distinction from `/org-os manage`:** `/configure` edits structural organizational reality (who the org is, who it serves, what it offers). `/org-os manage` controls feature gating (what platform capabilities are enabled). Use `/configure` for org-model content; use `/org-os manage` for feature flags.
|
|
26
|
-
|
|
27
25
|
**Distinction from `/setup`:** `/setup` is for first-time bootstrap (placeholder replacement, dependency install, build verification). `/configure` is for recurring org-model updates. After first run, `/setup` delegates here.
|
|
28
26
|
|
|
29
27
|
---
|
|
@@ -7,16 +7,14 @@ items and routes visible; disabling hides them without removing the feature from
|
|
|
7
7
|
a new feature may require only a config edit (Level A) or a new extension TypeScript file
|
|
8
8
|
(Level B), depending on whether the feature already exists in the platform defaults.
|
|
9
9
|
|
|
10
|
-
This operation handles both toggling existing features and introducing custom features.
|
|
11
|
-
surface-level toggles (hiding one sub-section within an already-enabled feature), use
|
|
12
|
-
`/org-os manage` instead.
|
|
10
|
+
This operation handles both toggling existing features and introducing custom features.
|
|
13
11
|
|
|
14
12
|
## Background: Level A vs Level B
|
|
15
13
|
|
|
16
|
-
- **Level A (config-only edit):** The feature exists in the platform defaults
|
|
17
|
-
|
|
18
|
-
`foundations/config/organization-model.ts` overrides its `enabled` flag or
|
|
19
|
-
No new TypeScript files needed.
|
|
14
|
+
- **Level A (config-only edit):** The feature exists in the platform defaults (see
|
|
15
|
+
`node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` for the default feature
|
|
16
|
+
set). The adapter in `foundations/config/organization-model.ts` overrides its `enabled` flag or
|
|
17
|
+
adjusts metadata. No new TypeScript files needed.
|
|
20
18
|
|
|
21
19
|
- **Level B (new extension file):** The feature does not exist in platform defaults. A new
|
|
22
20
|
feature ID and manifest need to be declared. This requires a new TypeScript file under
|
|
@@ -25,7 +23,8 @@ surface-level toggles (hiding one sub-section within an already-enabled feature)
|
|
|
25
23
|
|
|
26
24
|
## Schema reference
|
|
27
25
|
|
|
28
|
-
Source: `
|
|
26
|
+
Source: `node_modules/@elevasis/core/organization-model` (published types) or
|
|
27
|
+
`node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` (auto-generated shapes)
|
|
29
28
|
|
|
30
29
|
```typescript
|
|
31
30
|
FeatureSchema = z.object({
|
|
@@ -42,7 +41,7 @@ FeatureSchema = z.object({
|
|
|
42
41
|
})
|
|
43
42
|
```
|
|
44
43
|
|
|
45
|
-
Platform default feature IDs (from `
|
|
44
|
+
Platform default feature IDs (from `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`):
|
|
46
45
|
`crm`, `lead-gen`, `projects`, `operations`, `monitoring`, `settings`, `seo`
|
|
47
46
|
|
|
48
47
|
Where this lands in the adapter: `foundations/config/organization-model.ts` under the `features`
|
|
@@ -56,8 +55,8 @@ merge), so the adapter must redeclare all features it wants to override.
|
|
|
56
55
|
### Step 1: Read current state
|
|
57
56
|
|
|
58
57
|
Read `foundations/config/organization-model.ts` and extract the current `features` array from the
|
|
59
|
-
adapter. Also read `
|
|
60
|
-
defaults look like.
|
|
58
|
+
adapter. Also read `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` to see
|
|
59
|
+
what the platform defaults look like.
|
|
61
60
|
|
|
62
61
|
Present a combined view:
|
|
63
62
|
|
|
@@ -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.
|
|
@@ -142,7 +132,7 @@ After a successful push, mark any linked project task as `submitted`. This is a
|
|
|
142
132
|
2. **Fire the transition** (only when a single confident task ID is resolved):
|
|
143
133
|
|
|
144
134
|
```bash
|
|
145
|
-
pnpm
|
|
135
|
+
pnpm elevasis-sdk project:task:update <task-id> --status submitted
|
|
146
136
|
```
|
|
147
137
|
|
|
148
138
|
3. **Failure handling.** If the CLI call errors, no task ID can be resolved, or the user declines, emit a single warning line and continue:
|
|
@@ -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
|
|
|
@@ -40,7 +40,7 @@ For dev vs prod targeting:
|
|
|
40
40
|
Validate all resource definitions (schemas, contracts, config):
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
pnpm
|
|
43
|
+
pnpm elevasis-sdk check
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Reports: resource count, validation errors, schema serialization warnings. Exit code 0 = pass.
|
|
@@ -49,12 +49,8 @@ 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
|
|
56
|
-
pnpm exec elevasis-sdk generate-docs
|
|
57
|
-
pnpm -C operations exec elevasis-sdk deploy [--prod]
|
|
53
|
+
pnpm elevasis-sdk deploy [--prod]
|
|
58
54
|
```
|
|
59
55
|
|
|
60
56
|
Replace `[--prod]` with `--prod` when targeting production.
|
|
@@ -72,10 +68,10 @@ Deploy replaces the previous active deployment. Resources become executable imme
|
|
|
72
68
|
**Always run before executing.** Shows resource metadata, input/output schemas, and step chain:
|
|
73
69
|
|
|
74
70
|
```bash
|
|
75
|
-
pnpm
|
|
71
|
+
pnpm elevasis-sdk describe <resourceId>
|
|
76
72
|
|
|
77
73
|
# JSON output for programmatic use
|
|
78
|
-
pnpm
|
|
74
|
+
pnpm elevasis-sdk describe <resourceId> --json
|
|
79
75
|
```
|
|
80
76
|
|
|
81
77
|
Output includes: type, name, version, status, domains, input schema (required/optional fields with types), output schema, step definitions with entry point and routing.
|
|
@@ -86,14 +82,14 @@ Run a deployed resource. **Always `describe` first to see the input schema.**
|
|
|
86
82
|
|
|
87
83
|
```bash
|
|
88
84
|
# Simple input (inline JSON)
|
|
89
|
-
pnpm
|
|
85
|
+
pnpm elevasis-sdk exec <resourceId> -i '{"key": "value"}'
|
|
90
86
|
|
|
91
87
|
# Complex input (temp file -- PREFERRED for non-trivial payloads)
|
|
92
88
|
# Write input to a temp file first, then reference it with -f
|
|
93
|
-
pnpm
|
|
89
|
+
pnpm elevasis-sdk exec <resourceId> -f .tmp-input.json
|
|
94
90
|
|
|
95
91
|
# Async execution (for long-running workflows -- polls until complete)
|
|
96
|
-
pnpm
|
|
92
|
+
pnpm elevasis-sdk exec <resourceId> -f .tmp-input.json --async
|
|
97
93
|
```
|
|
98
94
|
|
|
99
95
|
**When to use `-f` (file input):**
|
|
@@ -122,10 +118,10 @@ pnpm -C operations exec elevasis-sdk exec <resourceId> -f .tmp-input.json --asyn
|
|
|
122
118
|
View all deployed resources:
|
|
123
119
|
|
|
124
120
|
```bash
|
|
125
|
-
pnpm
|
|
121
|
+
pnpm elevasis-sdk resources
|
|
126
122
|
|
|
127
123
|
# JSON output
|
|
128
|
-
pnpm
|
|
124
|
+
pnpm elevasis-sdk resources --json
|
|
129
125
|
```
|
|
130
126
|
|
|
131
127
|
Shows: resource ID, type (workflow/agent), name, description, status.
|
|
@@ -136,19 +132,19 @@ View past executions for a resource:
|
|
|
136
132
|
|
|
137
133
|
```bash
|
|
138
134
|
# List recent executions (default: last 50)
|
|
139
|
-
pnpm
|
|
135
|
+
pnpm elevasis-sdk executions <resourceId>
|
|
140
136
|
|
|
141
137
|
# Filter by status
|
|
142
|
-
pnpm
|
|
138
|
+
pnpm elevasis-sdk executions <resourceId> --status failed --limit 10
|
|
143
139
|
|
|
144
140
|
# View specific execution (full detail with logs)
|
|
145
|
-
pnpm
|
|
141
|
+
pnpm elevasis-sdk execution <resourceId> <executionId>
|
|
146
142
|
|
|
147
143
|
# Logs only (skip metadata)
|
|
148
|
-
pnpm
|
|
144
|
+
pnpm elevasis-sdk execution <resourceId> <executionId> --logs-only
|
|
149
145
|
|
|
150
146
|
# Include input and result data
|
|
151
|
-
pnpm
|
|
147
|
+
pnpm elevasis-sdk execution <resourceId> <executionId> --input --result
|
|
152
148
|
```
|
|
153
149
|
|
|
154
150
|
**`executions` flags:** `--limit <n>` (default 50), `--status running|completed|failed`, `--json`
|
|
@@ -162,7 +158,7 @@ Execution detail shows: status, start/end times, duration, input, result, error
|
|
|
162
158
|
View deployment history:
|
|
163
159
|
|
|
164
160
|
```bash
|
|
165
|
-
pnpm
|
|
161
|
+
pnpm elevasis-sdk deployments
|
|
166
162
|
```
|
|
167
163
|
|
|
168
164
|
Shows: deployment ID, SDK version, status (active/deploying/failed/stopped), created timestamp.
|
|
@@ -173,19 +169,19 @@ Manage integration credentials (API keys, webhook secrets):
|
|
|
173
169
|
|
|
174
170
|
```bash
|
|
175
171
|
# List credentials (metadata only, secrets not exposed)
|
|
176
|
-
pnpm
|
|
172
|
+
pnpm elevasis-sdk creds list
|
|
177
173
|
|
|
178
174
|
# Create a credential
|
|
179
|
-
pnpm
|
|
175
|
+
pnpm elevasis-sdk creds create --name my-api-key --type api-key --value '{"apiKey":"sk-..."}'
|
|
180
176
|
|
|
181
177
|
# Update a credential value
|
|
182
|
-
pnpm
|
|
178
|
+
pnpm elevasis-sdk creds update my-api-key --value '{"apiKey":"new-key"}'
|
|
183
179
|
|
|
184
180
|
# Rename a credential
|
|
185
|
-
pnpm
|
|
181
|
+
pnpm elevasis-sdk creds rename old-name --to new-name
|
|
186
182
|
|
|
187
183
|
# Delete a credential
|
|
188
|
-
pnpm
|
|
184
|
+
pnpm elevasis-sdk creds delete my-api-key --force
|
|
189
185
|
```
|
|
190
186
|
|
|
191
187
|
Credential names: lowercase, digits, hyphens only (`^[a-z0-9]+(-[a-z0-9]+)*$`). Types: `api-key`, `webhook-secret`.
|
|
@@ -196,10 +192,10 @@ Rename a resource ID across all platform tables:
|
|
|
196
192
|
|
|
197
193
|
```bash
|
|
198
194
|
# Dry run (preview only)
|
|
199
|
-
pnpm
|
|
195
|
+
pnpm elevasis-sdk rename old-id --to new-id
|
|
200
196
|
|
|
201
197
|
# Apply rename
|
|
202
|
-
pnpm
|
|
198
|
+
pnpm elevasis-sdk rename old-id --to new-id --execute
|
|
203
199
|
```
|
|
204
200
|
|
|
205
201
|
Always dry-run first to see affected tables and row counts.
|
|
@@ -210,10 +206,10 @@ Mark execution errors as resolved:
|
|
|
210
206
|
|
|
211
207
|
```bash
|
|
212
208
|
# Resolve a specific error
|
|
213
|
-
pnpm
|
|
209
|
+
pnpm elevasis-sdk error resolve <errorId>
|
|
214
210
|
|
|
215
211
|
# Resolve all errors for an execution
|
|
216
|
-
pnpm
|
|
212
|
+
pnpm elevasis-sdk error resolve-execution <executionId>
|
|
217
213
|
```
|
|
218
214
|
|
|
219
215
|
## Standard Workflow
|
|
@@ -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
|
|
@@ -35,6 +35,38 @@ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
|
|
|
35
35
|
- `/project checklist <client> "<milestone>"` — View checklist for a milestone.
|
|
36
36
|
- `/project delete <client>` — Delete project (cascades milestones, tasks, notes).
|
|
37
37
|
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Ambient Vibe Integration
|
|
41
|
+
|
|
42
|
+
This skill is the landing point for three of the seven vibe intent types. Agents arriving from the ambient layer should behave identically to a direct invocation — vibe is a classifier, not a different code path.
|
|
43
|
+
|
|
44
|
+
| Vibe intent | What vibe detected | What to do here |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| **Capture** | "add a task", "remember to", "track this" | Draft the task/note, confirm with user, then `project:task:create` or `project:note:create` |
|
|
47
|
+
| **Transition** | "done", "stuck", "blocked", "finished" | Resolve current task from session context, confirm status, then `project:task:update --status <new>` |
|
|
48
|
+
| **Navigate** | "focus on", "switch to", "back to" | Resolve target via `project:resolve <query>` or `project:work <query>`, update scope, narrate new context |
|
|
49
|
+
|
|
50
|
+
**The full continuity loop** — how work flows across sessions:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
vibe (Capture) → /project task:create → task in DB
|
|
54
|
+
↓
|
|
55
|
+
work happens
|
|
56
|
+
↓
|
|
57
|
+
/save → project:task:save → prj_tasks.resume_context
|
|
58
|
+
↓
|
|
59
|
+
next session: /project work <query>
|
|
60
|
+
↓
|
|
61
|
+
project:work → resume brief (current state + next steps)
|
|
62
|
+
↓
|
|
63
|
+
agent picks up exactly where it left off
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
When a session begins with an ambiguous opening, check `project:work` before asking the user to re-explain. The resume brief is the canonical continuity payload — trust it.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
38
70
|
## Prerequisites
|
|
39
71
|
|
|
40
72
|
**Run from the project root** (the directory containing `.elevasis`). Before issuing any other commands, run:
|
|
@@ -317,7 +349,7 @@ For progress detail (milestones/tasks), follow up with `project:milestone:list`
|
|
|
317
349
|
Wraps `project:work` for fuzzy-matched resume. Used by intent-detection "resume" classification.
|
|
318
350
|
|
|
319
351
|
```bash
|
|
320
|
-
pnpm elevasis-sdk project:work <query>
|
|
352
|
+
pnpm elevasis-sdk project:work <query>
|
|
321
353
|
```
|
|
322
354
|
|
|
323
355
|
Prints the matched project/task brief with current `resume_context`. If multiple matches, show top 3 and ask which.
|
|
@@ -19,7 +19,7 @@ Auto-manage project documentation from conversation context, and fan out convers
|
|
|
19
19
|
|
|
20
20
|
Before doing anything else, determine the active project / task:
|
|
21
21
|
|
|
22
|
-
1. Look for an active task-doc frontmatter in the current conversation or the most recently edited file
|
|
22
|
+
1. Look for an active task-doc frontmatter in the current conversation or the most recently edited file. Expected frontmatter:
|
|
23
23
|
|
|
24
24
|
```yaml
|
|
25
25
|
---
|
|
@@ -56,7 +56,7 @@ Review the current conversation to identify:
|
|
|
56
56
|
|
|
57
57
|
### Step 3: Update Knowledge Docs
|
|
58
58
|
|
|
59
|
-
Scan
|
|
59
|
+
Scan for unindexed or stale knowledge docs and draft creates / updates / moves. This template does not have a `docs/` tree — look for any local knowledge files (`.claude/rules/`, `operations/src/README.md`, `foundations/`, or project-specific docs the user has created). All edits are on knowledge/architecture/feature docs -- NOT on task resume state (that flows to the DB in Step 4).
|
|
60
60
|
|
|
61
61
|
Determine what needs to happen:
|
|
62
62
|
|
|
@@ -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> \
|
|
@@ -159,7 +155,7 @@ If no signal rises to note-worthy, skip this step entirely. Do not create filler
|
|
|
159
155
|
Run this ONLY when Step 5 created a `blocker` note AND Step 1 resolved a task ID. It's the second half of the "I'm stuck" fanout: the note captures the why, this call flips the task's lifecycle state so it surfaces as blocked in portfolio views.
|
|
160
156
|
|
|
161
157
|
```bash
|
|
162
|
-
pnpm
|
|
158
|
+
pnpm elevasis-sdk project:task:update <task-uuid> --status blocked
|
|
163
159
|
```
|
|
164
160
|
|
|
165
161
|
Rules:
|
|
@@ -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.
|
|
@@ -143,29 +143,44 @@ After all replacements, re-scan the four key files from State Detection to verif
|
|
|
143
143
|
|
|
144
144
|
If the user skipped any knowledge questions, fill in what was provided and omit what wasn't -- don't leave placeholder text behind.
|
|
145
145
|
|
|
146
|
-
### Step 5:
|
|
146
|
+
### Step 5: Write Client Brief to Org Model
|
|
147
147
|
|
|
148
|
-
**Idempotency check:**
|
|
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.
|
|
149
149
|
|
|
150
|
-
If
|
|
150
|
+
If the field is empty or absent, compose the client brief from the information gathered in Step 2:
|
|
151
151
|
|
|
152
152
|
```markdown
|
|
153
|
-
---
|
|
154
|
-
title: Client Context
|
|
155
|
-
description: Company background, industry, stakeholders, and business goals
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
# Client Context
|
|
159
|
-
|
|
160
153
|
**Company:** {company name}
|
|
161
154
|
**Industry:** {industry}
|
|
162
155
|
**Description:** {what they do}
|
|
163
156
|
|
|
164
157
|
## Additional Context
|
|
165
158
|
|
|
166
|
-
{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)
|
|
167
172
|
```
|
|
168
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
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
If type-check fails, report the error and do not proceed to Step 6 until it is resolved.
|
|
183
|
+
|
|
169
184
|
### Step 6: Install and Verify
|
|
170
185
|
|
|
171
186
|
#### Step 6a: Install Dependencies
|
|
@@ -242,8 +257,8 @@ Running `/setup` more than once is safe:
|
|
|
242
257
|
|
|
243
258
|
- **Placeholder replacement** only runs when placeholders are detected (State A). It is skipped entirely in States B and C.
|
|
244
259
|
- **CLAUDE.md knowledge sections** (`{CLIENT_CONTEXT}`, `{USER_PREFERENCES}`) are checked before writing. If already replaced, the write is skipped.
|
|
245
|
-
- **`
|
|
246
|
-
- **
|
|
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.
|
|
247
262
|
|
|
248
263
|
---
|
|
249
264
|
|
|
@@ -253,7 +268,8 @@ Running `/setup` more than once is safe:
|
|
|
253
268
|
|
|
254
269
|
1. Replaces scaffold placeholders (project name, slug, description)
|
|
255
270
|
2. Fills lightweight CLAUDE.md knowledge sections (user and client basics, idempotent)
|
|
256
|
-
3.
|
|
257
|
-
4.
|
|
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
|
|
258
274
|
|
|
259
|
-
`/configure` owns all structural org-model editing (identity, 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`.
|
|
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
|
|
@@ -8,7 +8,7 @@ The hooks barrel is the published headless hook surface for the UI package.
|
|
|
8
8
|
- Scheduling hooks
|
|
9
9
|
- Monitoring, observability, and notification hooks
|
|
10
10
|
- Session and SSE hooks
|
|
11
|
-
- Operations hooks, including command-view
|
|
11
|
+
- Operations hooks, including command-view helpers
|
|
12
12
|
- Feature access, table state, and service helpers
|
|
13
13
|
- Acquisition and delivery hooks
|
|
14
14
|
|
|
@@ -21,4 +21,3 @@ The hooks barrel is the published headless hook surface for the UI package.
|
|
|
21
21
|
## Notes
|
|
22
22
|
|
|
23
23
|
- This barrel is intentionally headless. It should not pull in the visual component layer.
|
|
24
|
-
|