@elevasis/sdk 1.20.2 → 1.22.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 +4220 -1583
- package/dist/index.d.ts +1035 -481
- package/dist/index.js +7381 -4187
- package/dist/node/index.d.ts +1 -3
- package/dist/node/index.js +40 -49
- package/dist/test-utils/index.d.ts +699 -123
- package/dist/test-utils/index.js +3826 -630
- package/dist/worker/index.js +3616 -442
- package/package.json +3 -3
- package/reference/_navigation.md +9 -7
- package/reference/_reference-manifest.json +1 -1
- package/reference/claude-config/hooks/post-edit-validate.mjs +98 -98
- package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +188 -188
- package/reference/claude-config/hooks/tool-failure-recovery.mjs +73 -73
- package/reference/claude-config/registries/graph-skills.json +4 -4
- package/reference/claude-config/registries/knowledge-flags.json +0 -2
- package/reference/claude-config/rules/active-change-index.md +80 -80
- package/reference/claude-config/rules/agent-start-here.md +277 -273
- package/reference/claude-config/rules/deployment.md +57 -57
- package/reference/claude-config/rules/error-handling.md +56 -56
- package/reference/claude-config/rules/execution.md +40 -40
- package/reference/claude-config/rules/frontend.md +4 -4
- package/reference/claude-config/rules/observability.md +31 -31
- package/reference/claude-config/rules/operations.md +29 -17
- package/reference/claude-config/rules/organization-model.md +108 -40
- package/reference/claude-config/rules/organization-os.md +115 -113
- package/reference/claude-config/rules/package-taxonomy.md +33 -33
- package/reference/claude-config/rules/platform.md +42 -42
- package/reference/claude-config/rules/shared-types.md +49 -46
- package/reference/claude-config/rules/task-tracking.md +47 -47
- package/reference/claude-config/rules/ui.md +200 -200
- package/reference/claude-config/rules/vibe.md +235 -231
- package/reference/claude-config/scripts/statusline-command.js +18 -18
- package/reference/claude-config/settings.json +34 -34
- package/reference/claude-config/skills/deploy/{SKILL.md → skill.md} +156 -156
- package/reference/claude-config/skills/dsp/SKILL.md +66 -66
- package/reference/claude-config/skills/elevasis/SKILL.md +235 -235
- package/reference/claude-config/skills/explore/SKILL.md +6 -6
- package/reference/claude-config/skills/git-sync/SKILL.md +126 -126
- package/reference/claude-config/skills/knowledge/SKILL.md +330 -271
- package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +100 -100
- package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +159 -158
- package/reference/claude-config/skills/knowledge/operations/customers.md +109 -109
- package/reference/claude-config/skills/knowledge/operations/features.md +76 -113
- package/reference/claude-config/skills/knowledge/operations/goals.md +118 -118
- package/reference/claude-config/skills/knowledge/operations/identity.md +93 -93
- package/reference/claude-config/skills/knowledge/operations/labels.md +94 -89
- package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -109
- package/reference/claude-config/skills/knowledge/operations/roles.md +99 -99
- package/reference/claude-config/skills/knowledge/operations/techStack.md +30 -30
- package/reference/claude-config/skills/project/SKILL.md +1088 -1088
- package/reference/claude-config/skills/run-ui/SKILL.md +73 -73
- package/reference/claude-config/skills/save/SKILL.md +3 -3
- package/reference/claude-config/skills/setup/SKILL.md +275 -275
- package/reference/claude-config/skills/status/SKILL.md +59 -59
- package/reference/claude-config/skills/submit-request/SKILL.md +180 -180
- package/reference/claude-config/skills/sync/SKILL.md +47 -47
- package/reference/claude-config/skills/tutorial/SKILL.md +259 -259
- package/reference/claude-config/skills/tutorial/progress-template.md +74 -74
- package/reference/claude-config/skills/tutorial/technical.md +1303 -1306
- package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -890
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -27
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -30
- package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +73 -73
- package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -86
- package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -55
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +97 -97
- package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +112 -112
- package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +93 -93
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -58
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -56
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -71
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -59
- package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +42 -42
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -60
- package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +37 -37
- package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -34
- package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -38
- package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -32
- package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -33
- package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -69
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -0
- package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +42 -0
- package/reference/claude-config/sync-notes/README.md +43 -43
- package/reference/cli.mdx +808 -668
- package/reference/concepts.mdx +146 -146
- package/reference/deployment/api.mdx +297 -297
- package/reference/deployment/command-center.mdx +209 -209
- package/reference/deployment/index.mdx +195 -195
- package/reference/deployment/provided-features.mdx +107 -93
- package/reference/deployment/ui-execution.mdx +250 -250
- package/reference/examples/organization-model.ts +147 -84
- package/reference/framework/agent.mdx +156 -156
- package/reference/framework/index.mdx +195 -195
- package/reference/framework/interaction-guidance.mdx +182 -182
- package/reference/framework/memory.mdx +326 -326
- package/reference/framework/project-structure.mdx +282 -282
- package/reference/framework/tutorial-system.mdx +135 -135
- package/reference/getting-started.mdx +142 -142
- package/reference/index.mdx +106 -106
- package/reference/packages/core/src/README.md +14 -14
- package/reference/packages/core/src/business/README.md +2 -2
- package/reference/packages/core/src/knowledge/README.md +33 -32
- package/reference/packages/core/src/organization-model/README.md +149 -109
- package/reference/packages/core/src/test-utils/README.md +37 -37
- package/reference/packages/ui/src/api/README.md +18 -18
- package/reference/packages/ui/src/app/README.md +24 -24
- package/reference/packages/ui/src/auth/README.md +18 -18
- package/reference/packages/ui/src/components/README.md +24 -24
- package/reference/packages/ui/src/execution/README.md +16 -16
- package/reference/packages/ui/src/features/README.md +28 -28
- package/reference/packages/ui/src/graph/README.md +16 -16
- package/reference/packages/ui/src/hooks/README.md +23 -23
- package/reference/packages/ui/src/initialization/README.md +19 -19
- package/reference/packages/ui/src/knowledge/README.md +31 -31
- package/reference/packages/ui/src/organization/README.md +18 -18
- package/reference/packages/ui/src/profile/README.md +19 -19
- package/reference/packages/ui/src/provider/README.md +32 -32
- package/reference/packages/ui/src/router/README.md +18 -18
- package/reference/packages/ui/src/sse/README.md +13 -13
- package/reference/packages/ui/src/test-utils/README.md +7 -7
- package/reference/packages/ui/src/theme/README.md +23 -23
- package/reference/packages/ui/src/theme/presets/README.md +19 -19
- package/reference/packages/ui/src/types/README.md +16 -16
- package/reference/packages/ui/src/utils/README.md +18 -18
- package/reference/packages/ui/src/zustand/README.md +18 -18
- package/reference/platform-tools/adapters-integration.mdx +301 -301
- package/reference/platform-tools/adapters-platform.mdx +553 -553
- package/reference/platform-tools/index.mdx +217 -217
- package/reference/platform-tools/type-safety.mdx +82 -82
- package/reference/resources/index.mdx +349 -349
- package/reference/resources/patterns.mdx +449 -449
- package/reference/resources/types.mdx +116 -116
- package/reference/roadmap.mdx +165 -165
- package/reference/runtime.mdx +173 -173
- package/reference/scaffold/core/organization-graph.mdx +110 -89
- package/reference/scaffold/core/organization-model.mdx +226 -171
- package/reference/scaffold/index.mdx +67 -67
- package/reference/scaffold/operations/propagation-pipeline.md +77 -77
- package/reference/scaffold/operations/scaffold-maintenance.md +10 -10
- package/reference/scaffold/operations/workflow-recipes.md +138 -138
- package/reference/scaffold/recipes/add-a-feature.md +310 -88
- package/reference/scaffold/recipes/add-a-resource.md +137 -117
- package/reference/scaffold/recipes/customize-crm-actions.md +439 -439
- package/reference/scaffold/recipes/customize-knowledge-browser.md +384 -0
- package/reference/scaffold/recipes/customize-organization-model.md +281 -118
- package/reference/scaffold/recipes/extend-a-base-entity.md +8 -8
- package/reference/scaffold/recipes/extend-crm.md +40 -39
- package/reference/scaffold/recipes/extend-lead-gen.md +400 -401
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +118 -114
- package/reference/scaffold/recipes/index.md +47 -46
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +227 -0
- package/reference/scaffold/reference/contracts.md +2389 -2121
- package/reference/scaffold/reference/feature-registry.md +9 -20
- package/reference/scaffold/reference/glossary.md +76 -76
- package/reference/scaffold/ui/composition-extensibility.mdx +233 -233
- package/reference/scaffold/ui/customization.md +243 -243
- package/reference/scaffold/ui/feature-flags-and-gating.md +46 -46
- package/reference/scaffold/ui/feature-shell.mdx +72 -72
- package/reference/scaffold/ui/recipes.md +221 -213
- package/reference/spine/spine-primer.md +96 -96
- package/reference/templates/index.mdx +47 -47
- package/reference/troubleshooting.mdx +223 -223
|
@@ -1,273 +1,277 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Canonical first-read for agents entering the template scaffold -- project continuity, task-class routing, and boundary resolution
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Agent Start Here
|
|
6
|
-
|
|
7
|
-
Read this file first when entering a freshly scaffolded project.
|
|
8
|
-
|
|
9
|
-
## Project Profile
|
|
10
|
-
|
|
11
|
-
Before doing anything else, check for `.claude/memory/profile.md`. It is created by `/tutorial` on first invocation and persists across sessions.
|
|
12
|
-
|
|
13
|
-
If present, read it. The file declares which onboarding **track** is active -- `vibe-coder` (non-technical user, agent does the work) or `technical` (developer, code-first) -- and ships a tone block describing how to communicate.
|
|
14
|
-
|
|
15
|
-
Apply the tone block to ALL agent output for the rest of the session, not just inside `/tutorial`:
|
|
16
|
-
|
|
17
|
-
- **vibe-coder track:** never use technical vocabulary in user-facing dialogue (workflow -> automation, deploy -> make it live, schema -> "the information your automation needs"). Tool calls are made silently -- do not narrate slash commands, file paths, or build steps. The full swap table lives in `profile.md`.
|
|
18
|
-
- **technical track:** code-first, current command surface, real file paths. The user reads diffs and stacktraces; do not over-explain.
|
|
19
|
-
|
|
20
|
-
If the file does not exist, the user has not run `/tutorial` yet. Proceed normally and note that running `/tutorial` would establish a project tone for future sessions.
|
|
21
|
-
|
|
22
|
-
## First Action: Check Active Projects
|
|
23
|
-
|
|
24
|
-
Before loading any docs for a new session, check whether the user's ask resumes or relates to an in-flight client project. Project context (milestones, tasks, resume notes) is DB-canonical -- agents and CLI read/write it through the `elevasis-sdk project:*` surface.
|
|
25
|
-
|
|
26
|
-
1. **Portfolio snapshot.** Run this first to see what is active or blocked:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
pnpm elevasis-sdk project:list --status active --pretty
|
|
30
|
-
pnpm elevasis-sdk project:list --status blocked --pretty
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
2. **Resume-style asks.** If the user says "continue", "pick up", references a client name, or names a task/milestone, resolve it via:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
pnpm elevasis-sdk project:work <query>
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
`project:work` fuzzy-matches a project or task by name/ID and returns the current resume context -- the canonical continuity payload (current state, next steps, files modified, key docs).
|
|
40
|
-
|
|
41
|
-
3. **Fresh non-project asks.** Only if the portfolio snapshot and the request show no overlap with active projects, fall back to the docs-index flow below. Even then, if the work will take more than a single file edit, offer to create a project first (`/project create` or `project:create`) so continuity is captured from the start.
|
|
42
|
-
|
|
43
|
-
### Resume Context Source of Truth
|
|
44
|
-
|
|
45
|
-
`resume_context` lives in the `prj_tasks` table in the database, not in task-doc frontmatter. There is one source of truth:
|
|
46
|
-
|
|
47
|
-
- **Humans write** via the inline resume-context editor on the Project Detail page in Command Center.
|
|
48
|
-
- **Agents and the CLI write** via `pnpm elevasis-sdk project:task:save <task-id> --current-state ... --next-steps ... --files-modified ...`.
|
|
49
|
-
- **Readers** consume it via `project:work <query>` or `project:task:resume <id>`.
|
|
50
|
-
|
|
51
|
-
Do not write resume state into markdown frontmatter. Task-doc frontmatter is limited to `title`, `description`, and `status`.
|
|
52
|
-
|
|
53
|
-
### Session-Start Dashboard
|
|
54
|
-
|
|
55
|
-
The session-start dashboard directive lives in `CLAUDE.md`. If you see it there, follow it on the first response of a session. This file (`agent-start-here` rule) is the drill-down reference layer; `CLAUDE.md` owns session bootstrap.
|
|
56
|
-
|
|
57
|
-
## Template Surfaces
|
|
58
|
-
|
|
59
|
-
Once project continuity is resolved (or confirmed irrelevant), the template is not just an app starter. It is an agent operating environment with several distinct surfaces:
|
|
60
|
-
|
|
61
|
-
- `ui/` -- React frontend app and shell composition
|
|
62
|
-
- `operations/` -- Elevasis SDK resources deployed to the platform
|
|
63
|
-
- `core/` -- runtime-agnostic shared contracts and organization model adaptation
|
|
64
|
-
- `.claude/` -- local agent rules, skills, and hooks
|
|
65
|
-
- `client-workspace/` -- optional separate knowledge workspace for richer team knowledge management
|
|
66
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/` -- SDK reference scaffold: canonical recipes, UI patterns, gating model, contracts, and glossary. Entry point: `index.mdx`.
|
|
67
|
-
|
|
68
|
-
## Discovery Order
|
|
69
|
-
|
|
70
|
-
Use this order unless a more specific doc tells you otherwise:
|
|
71
|
-
|
|
72
|
-
1. Complete the "First Action: Check Active Projects" flow above.
|
|
73
|
-
2. Read `CLAUDE.md` for project rules, command surface, and navigation pointers.
|
|
74
|
-
3. Read this rule and classify the task using the Task Classes below.
|
|
75
|
-
4. Read `identity.clientBrief` from the OrganizationModel (`core/config/organization-model.ts`) for organization context and naming.
|
|
76
|
-
5. Read the relevant structural map:
|
|
77
|
-
- Glob `node_modules/@elevasis/sdk/reference/` for published package surfaces
|
|
78
|
-
- Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
|
|
79
|
-
6. For feature integration, resource authoring, or UI customization tasks, read `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` to find the canonical recipe or reference doc.
|
|
80
|
-
7. Drill into the co-located local explainer for the abstraction boundary you are changing.
|
|
81
|
-
8. Check the `.claude/rules/active-change-index.md` rule before trusting stable assumptions in areas that are under active architecture work.
|
|
82
|
-
|
|
83
|
-
## SDK Reference Scaffold
|
|
84
|
-
|
|
85
|
-
Universal scaffold documentation (recipes, patterns, architecture, reference) has been centralized in the SDK reference. After `pnpm install`, the entry point is:
|
|
86
|
-
|
|
87
|
-
`node_modules/@elevasis/sdk/reference/scaffold/index.mdx`
|
|
88
|
-
|
|
89
|
-
This index links to all scaffold docs including pathway recipes, UI patterns, core architecture, and auto-generated contracts/feature registry.
|
|
90
|
-
|
|
91
|
-
For task classes that involve feature integration, resource authoring, or UI customization, start with the scaffold index rather than local docs.
|
|
92
|
-
|
|
93
|
-
## Task Classes
|
|
94
|
-
|
|
95
|
-
Classify the request, then follow the load/inspect/verify sequence for that class.
|
|
96
|
-
|
|
97
|
-
### 1. UI / Shell Work
|
|
98
|
-
|
|
99
|
-
Examples: add a page, change sidebar behavior, adjust feature visibility, update dashboard labels.
|
|
100
|
-
|
|
101
|
-
Load first:
|
|
102
|
-
|
|
103
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- UI recipes, feature flags, customization)
|
|
104
|
-
- `.claude/rules/ui.md`
|
|
105
|
-
- `ui/src/routes/README.md`
|
|
106
|
-
- `core/config/README.md`
|
|
107
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- specifically recipe 6 when building a "run this resource" surface
|
|
108
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md` -- when building or extending CRM pages, sidebars, hooks, workflows, or deal data surfaces
|
|
109
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- when building or extending lead-gen pages, sidebars, hooks, workflows, list/member state, or artifacts
|
|
110
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` -- when changing CRM deal action buttons or adding a workflow-backed deal action
|
|
111
|
-
|
|
112
|
-
Then inspect:
|
|
113
|
-
|
|
114
|
-
- `ui/src/routes/__root.tsx`
|
|
115
|
-
- `ui/src/config/*`
|
|
116
|
-
- relevant `ui/src/routes/*`
|
|
117
|
-
- relevant `ui/src/features/*`
|
|
118
|
-
- `core/config/organization-model.ts`
|
|
119
|
-
|
|
120
|
-
Verify with:
|
|
121
|
-
|
|
122
|
-
- route and manifest source
|
|
123
|
-
- any relevant package README from `packages/ui`
|
|
124
|
-
|
|
125
|
-
### 2. Workflow / Agent / Operations Work
|
|
126
|
-
|
|
127
|
-
Examples: add a workflow, update an agent, change resource registration, understand deployable resources.
|
|
128
|
-
|
|
129
|
-
Load first:
|
|
130
|
-
|
|
131
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- workflow recipes, resource authoring)
|
|
132
|
-
- `.claude/rules/operations.md`
|
|
133
|
-
- `operations/src/README.md`
|
|
134
|
-
|
|
135
|
-
Then inspect:
|
|
136
|
-
|
|
137
|
-
- `operations/src/index.ts`
|
|
138
|
-
- relevant `operations/src/<feature>/*`
|
|
139
|
-
- `core/types/index.ts` -- workflow input/output Zod schemas
|
|
140
|
-
- `core/types/entities.ts` -- typed entity contracts (Project, Deal, etc.) extending `@elevasis/core/entities` base types. Read this when authoring a workflow that takes or returns these entities so the input/output schemas reference the canonical entity shapes rather than redeclaring them.
|
|
141
|
-
- `operations/elevasis.config.ts`
|
|
142
|
-
|
|
143
|
-
Verify with:
|
|
144
|
-
|
|
145
|
-
- Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
|
|
146
|
-
- local SDK guidance in `.claude/skills/elevasis/SKILL.md`
|
|
147
|
-
|
|
148
|
-
### 3. Organization Model / Feature Access Work
|
|
149
|
-
|
|
150
|
-
Examples: rename a feature area, change quick access surfaces, map new business terms into the shell, adjust feature gating.
|
|
151
|
-
|
|
152
|
-
Load first:
|
|
153
|
-
|
|
154
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- contracts, gating patterns, glossary)
|
|
155
|
-
- `core/config/README.md`
|
|
156
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
|
|
157
|
-
- typed feature/surface constants from `@elevasis/core/organization-model` -- `CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`, `CRM_PIPELINE_SURFACE_ID`, `LEAD_GEN_LISTS_SURFACE_ID`, `PROJECTS_INDEX_SURFACE_ID`, `OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID`. Use these typed constants instead of magic strings when overriding feature/surface IDs.
|
|
158
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md` -- CRM is an Organization OS + UI + hooks + workflow-adapter surface; read this before extending CRM structure.
|
|
159
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- lead gen is an Organization OS + UI + hooks + workflow-adapter surface; read this before extending lead-gen lists, members, artifacts, or state transitions.
|
|
160
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` -- CRM action buttons are not `sales.actions` org-model config in v1; use the recipe's provider/custom-button path.
|
|
161
|
-
- `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md`
|
|
162
|
-
|
|
163
|
-
Then inspect:
|
|
164
|
-
|
|
165
|
-
- `core/config/organization-model.ts`
|
|
166
|
-
- `core/config/organization-model.ts` -- Organization Model overrides plus Systems and Resources descriptors. Start here for feature labels, surface mapping, and resource identity/governance changes.
|
|
167
|
-
- `ui/src/routes/__root.tsx`
|
|
168
|
-
- `ui/src/lib/hooks/useFeatureAccess.ts`
|
|
169
|
-
- relevant nav config files
|
|
170
|
-
|
|
171
|
-
Verify with:
|
|
172
|
-
|
|
173
|
-
- published package docs for `@elevasis/core/organization-model`
|
|
174
|
-
- current scaffold routes and manifests
|
|
175
|
-
|
|
176
|
-
### 4. Debugging / Impact Analysis
|
|
177
|
-
|
|
178
|
-
Examples: why is this automation disconnected, what does this workflow affect, what should I inspect before changing this resource.
|
|
179
|
-
|
|
180
|
-
Load first:
|
|
181
|
-
|
|
182
|
-
- `operations/src/README.md`
|
|
183
|
-
- `.claude/rules/active-change-index.md`
|
|
184
|
-
- Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
- related
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
- package
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
### `
|
|
239
|
-
|
|
240
|
-
The
|
|
241
|
-
|
|
242
|
-
### `
|
|
243
|
-
|
|
244
|
-
The
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
**
|
|
1
|
+
---
|
|
2
|
+
description: Canonical first-read for agents entering the template scaffold -- project continuity, task-class routing, and boundary resolution
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Agent Start Here
|
|
6
|
+
|
|
7
|
+
Read this file first when entering a freshly scaffolded project.
|
|
8
|
+
|
|
9
|
+
## Project Profile
|
|
10
|
+
|
|
11
|
+
Before doing anything else, check for `.claude/memory/profile.md`. It is created by `/tutorial` on first invocation and persists across sessions.
|
|
12
|
+
|
|
13
|
+
If present, read it. The file declares which onboarding **track** is active -- `vibe-coder` (non-technical user, agent does the work) or `technical` (developer, code-first) -- and ships a tone block describing how to communicate.
|
|
14
|
+
|
|
15
|
+
Apply the tone block to ALL agent output for the rest of the session, not just inside `/tutorial`:
|
|
16
|
+
|
|
17
|
+
- **vibe-coder track:** never use technical vocabulary in user-facing dialogue (workflow -> automation, deploy -> make it live, schema -> "the information your automation needs"). Tool calls are made silently -- do not narrate slash commands, file paths, or build steps. The full swap table lives in `profile.md`.
|
|
18
|
+
- **technical track:** code-first, current command surface, real file paths. The user reads diffs and stacktraces; do not over-explain.
|
|
19
|
+
|
|
20
|
+
If the file does not exist, the user has not run `/tutorial` yet. Proceed normally and note that running `/tutorial` would establish a project tone for future sessions.
|
|
21
|
+
|
|
22
|
+
## First Action: Check Active Projects
|
|
23
|
+
|
|
24
|
+
Before loading any docs for a new session, check whether the user's ask resumes or relates to an in-flight client project. Project context (milestones, tasks, resume notes) is DB-canonical -- agents and CLI read/write it through the `elevasis-sdk project:*` surface.
|
|
25
|
+
|
|
26
|
+
1. **Portfolio snapshot.** Run this first to see what is active or blocked:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm elevasis-sdk project:list --status active --pretty
|
|
30
|
+
pnpm elevasis-sdk project:list --status blocked --pretty
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
2. **Resume-style asks.** If the user says "continue", "pick up", references a client name, or names a task/milestone, resolve it via:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pnpm elevasis-sdk project:work <query>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`project:work` fuzzy-matches a project or task by name/ID and returns the current resume context -- the canonical continuity payload (current state, next steps, files modified, key docs).
|
|
40
|
+
|
|
41
|
+
3. **Fresh non-project asks.** Only if the portfolio snapshot and the request show no overlap with active projects, fall back to the docs-index flow below. Even then, if the work will take more than a single file edit, offer to create a project first (`/project create` or `project:create`) so continuity is captured from the start.
|
|
42
|
+
|
|
43
|
+
### Resume Context Source of Truth
|
|
44
|
+
|
|
45
|
+
`resume_context` lives in the `prj_tasks` table in the database, not in task-doc frontmatter. There is one source of truth:
|
|
46
|
+
|
|
47
|
+
- **Humans write** via the inline resume-context editor on the Project Detail page in Command Center.
|
|
48
|
+
- **Agents and the CLI write** via `pnpm elevasis-sdk project:task:save <task-id> --current-state ... --next-steps ... --files-modified ...`.
|
|
49
|
+
- **Readers** consume it via `project:work <query>` or `project:task:resume <id>`.
|
|
50
|
+
|
|
51
|
+
Do not write resume state into markdown frontmatter. Task-doc frontmatter is limited to `title`, `description`, and `status`.
|
|
52
|
+
|
|
53
|
+
### Session-Start Dashboard
|
|
54
|
+
|
|
55
|
+
The session-start dashboard directive lives in `CLAUDE.md`. If you see it there, follow it on the first response of a session. This file (`agent-start-here` rule) is the drill-down reference layer; `CLAUDE.md` owns session bootstrap.
|
|
56
|
+
|
|
57
|
+
## Template Surfaces
|
|
58
|
+
|
|
59
|
+
Once project continuity is resolved (or confirmed irrelevant), the template is not just an app starter. It is an agent operating environment with several distinct surfaces:
|
|
60
|
+
|
|
61
|
+
- `ui/` -- React frontend app and shell composition
|
|
62
|
+
- `operations/` -- Elevasis SDK resources deployed to the platform
|
|
63
|
+
- `core/` -- runtime-agnostic shared contracts and organization model adaptation
|
|
64
|
+
- `.claude/` -- local agent rules, skills, and hooks
|
|
65
|
+
- `client-workspace/` -- optional separate knowledge workspace for richer team knowledge management
|
|
66
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/` -- SDK reference scaffold: canonical recipes, UI patterns, gating model, contracts, and glossary. Entry point: `index.mdx`.
|
|
67
|
+
|
|
68
|
+
## Discovery Order
|
|
69
|
+
|
|
70
|
+
Use this order unless a more specific doc tells you otherwise:
|
|
71
|
+
|
|
72
|
+
1. Complete the "First Action: Check Active Projects" flow above.
|
|
73
|
+
2. Read `CLAUDE.md` for project rules, command surface, and navigation pointers.
|
|
74
|
+
3. Read this rule and classify the task using the Task Classes below.
|
|
75
|
+
4. Read `identity.clientBrief` from the OrganizationModel (`core/config/organization-model.ts`) for organization context and naming.
|
|
76
|
+
5. Read the relevant structural map:
|
|
77
|
+
- Glob `node_modules/@elevasis/sdk/reference/` for published package surfaces
|
|
78
|
+
- Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
|
|
79
|
+
6. For feature integration, resource authoring, or UI customization tasks, read `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` to find the canonical recipe or reference doc.
|
|
80
|
+
7. Drill into the co-located local explainer for the abstraction boundary you are changing.
|
|
81
|
+
8. Check the `.claude/rules/active-change-index.md` rule before trusting stable assumptions in areas that are under active architecture work.
|
|
82
|
+
|
|
83
|
+
## SDK Reference Scaffold
|
|
84
|
+
|
|
85
|
+
Universal scaffold documentation (recipes, patterns, architecture, reference) has been centralized in the SDK reference. After `pnpm install`, the entry point is:
|
|
86
|
+
|
|
87
|
+
`node_modules/@elevasis/sdk/reference/scaffold/index.mdx`
|
|
88
|
+
|
|
89
|
+
This index links to all scaffold docs including pathway recipes, UI patterns, core architecture, and auto-generated contracts/feature registry.
|
|
90
|
+
|
|
91
|
+
For task classes that involve feature integration, resource authoring, or UI customization, start with the scaffold index rather than local docs.
|
|
92
|
+
|
|
93
|
+
## Task Classes
|
|
94
|
+
|
|
95
|
+
Classify the request, then follow the load/inspect/verify sequence for that class.
|
|
96
|
+
|
|
97
|
+
### 1. UI / Shell Work
|
|
98
|
+
|
|
99
|
+
Examples: add a page, change sidebar behavior, adjust feature visibility, update dashboard labels.
|
|
100
|
+
|
|
101
|
+
Load first:
|
|
102
|
+
|
|
103
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- UI recipes, feature flags, customization)
|
|
104
|
+
- `.claude/rules/ui.md`
|
|
105
|
+
- `ui/src/routes/README.md`
|
|
106
|
+
- `core/config/README.md`
|
|
107
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/ui/recipes.md` -- specifically recipe 6 when building a "run this resource" surface
|
|
108
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md` -- when building or extending CRM pages, sidebars, hooks, workflows, or deal data surfaces
|
|
109
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- when building or extending lead-gen pages, sidebars, hooks, workflows, list/member state, or artifacts
|
|
110
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` -- when changing CRM deal action buttons or adding a workflow-backed deal action
|
|
111
|
+
|
|
112
|
+
Then inspect:
|
|
113
|
+
|
|
114
|
+
- `ui/src/routes/__root.tsx`
|
|
115
|
+
- `ui/src/config/*`
|
|
116
|
+
- relevant `ui/src/routes/*`
|
|
117
|
+
- relevant `ui/src/features/*`
|
|
118
|
+
- `core/config/organization-model.ts`
|
|
119
|
+
|
|
120
|
+
Verify with:
|
|
121
|
+
|
|
122
|
+
- route and manifest source
|
|
123
|
+
- any relevant package README from `packages/ui`
|
|
124
|
+
|
|
125
|
+
### 2. Workflow / Agent / Operations Work
|
|
126
|
+
|
|
127
|
+
Examples: add a workflow, update an agent, change resource registration, understand deployable resources.
|
|
128
|
+
|
|
129
|
+
Load first:
|
|
130
|
+
|
|
131
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- workflow recipes, resource authoring)
|
|
132
|
+
- `.claude/rules/operations.md`
|
|
133
|
+
- `operations/src/README.md`
|
|
134
|
+
|
|
135
|
+
Then inspect:
|
|
136
|
+
|
|
137
|
+
- `operations/src/index.ts`
|
|
138
|
+
- relevant `operations/src/<feature>/*`
|
|
139
|
+
- `core/types/index.ts` -- workflow input/output Zod schemas
|
|
140
|
+
- `core/types/entities.ts` -- typed entity contracts (Project, Deal, etc.) extending `@elevasis/core/entities` base types. Read this when authoring a workflow that takes or returns these entities so the input/output schemas reference the canonical entity shapes rather than redeclaring them.
|
|
141
|
+
- `operations/elevasis.config.ts`
|
|
142
|
+
|
|
143
|
+
Verify with:
|
|
144
|
+
|
|
145
|
+
- Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
|
|
146
|
+
- local SDK guidance in `.claude/skills/elevasis/SKILL.md`
|
|
147
|
+
|
|
148
|
+
### 3. Organization Model / Feature Access Work
|
|
149
|
+
|
|
150
|
+
Examples: rename a feature area, change quick access surfaces, map new business terms into the shell, adjust feature gating.
|
|
151
|
+
|
|
152
|
+
Load first:
|
|
153
|
+
|
|
154
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/index.mdx` (scaffold index -- contracts, gating patterns, glossary)
|
|
155
|
+
- `core/config/README.md`
|
|
156
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
|
|
157
|
+
- typed feature/surface constants from `@elevasis/core/organization-model` -- `CRM_FEATURE_ID`, `LEAD_GEN_FEATURE_ID`, `PROJECTS_FEATURE_ID`, `OPERATIONS_FEATURE_ID`, `MONITORING_FEATURE_ID`, `SETTINGS_FEATURE_ID`, `SEO_FEATURE_ID`, `CRM_PIPELINE_SURFACE_ID`, `LEAD_GEN_LISTS_SURFACE_ID`, `PROJECTS_INDEX_SURFACE_ID`, `OPERATIONS_ORGANIZATION_GRAPH_SURFACE_ID`. Use these typed constants instead of magic strings when overriding feature/surface IDs.
|
|
158
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-crm.md` -- CRM is an Organization OS + UI + hooks + workflow-adapter surface; read this before extending CRM structure.
|
|
159
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/extend-lead-gen.md` -- lead gen is an Organization OS + UI + hooks + workflow-adapter surface; read this before extending lead-gen lists, members, artifacts, or state transitions.
|
|
160
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/recipes/customize-crm-actions.md` -- CRM action buttons are not `sales.actions` org-model config in v1; use the recipe's provider/custom-button path.
|
|
161
|
+
- `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md`
|
|
162
|
+
|
|
163
|
+
Then inspect:
|
|
164
|
+
|
|
165
|
+
- `core/config/organization-model.ts`
|
|
166
|
+
- `core/config/organization-model.ts` -- Organization Model overrides plus Systems and Resources descriptors. Start here for feature labels, surface mapping, and resource identity/governance changes.
|
|
167
|
+
- `ui/src/routes/__root.tsx`
|
|
168
|
+
- `ui/src/lib/hooks/useFeatureAccess.ts`
|
|
169
|
+
- relevant nav config files
|
|
170
|
+
|
|
171
|
+
Verify with:
|
|
172
|
+
|
|
173
|
+
- published package docs for `@elevasis/core/organization-model`
|
|
174
|
+
- current scaffold routes and manifests
|
|
175
|
+
|
|
176
|
+
### 4. Debugging / Impact Analysis
|
|
177
|
+
|
|
178
|
+
Examples: why is this automation disconnected, what does this workflow affect, what should I inspect before changing this resource.
|
|
179
|
+
|
|
180
|
+
Load first:
|
|
181
|
+
|
|
182
|
+
- `operations/src/README.md`
|
|
183
|
+
- `.claude/rules/active-change-index.md`
|
|
184
|
+
- Read `operations/src/index.ts` for deployment assembly, `core/config/organization-model.ts` for resource descriptors, or run `pnpm elevasis-sdk project:list --pretty` for live DB state
|
|
185
|
+
- For "why didn't this run?", "why is this still pending?", "what needs approval?", or schedule/queue debugging, inspect live operations state with `pnpm elevasis-sdk schedule:list --pretty`, `pnpm elevasis-sdk queue:list --status pending --pretty`, and `pnpm elevasis-sdk queue:status --pretty`.
|
|
186
|
+
|
|
187
|
+
Then inspect:
|
|
188
|
+
|
|
189
|
+
- `operations/src/index.ts`
|
|
190
|
+
- resource definitions
|
|
191
|
+
- related UI route and feature files
|
|
192
|
+
- related core contracts
|
|
193
|
+
- pending HITL items via `elevasis-sdk queue:get <id>` before selecting or expiring an action
|
|
194
|
+
- recurring automation via `elevasis-sdk schedule:get <id>` before pausing, resuming, or cancelling it
|
|
195
|
+
|
|
196
|
+
Verify with:
|
|
197
|
+
|
|
198
|
+
- resource registration and relationship declarations
|
|
199
|
+
- generated maps
|
|
200
|
+
- package and source ownership boundaries
|
|
201
|
+
- `queue:*` or `schedule:*` CLI output when runtime state is part of the question
|
|
202
|
+
|
|
203
|
+
### 5. Platform Extension / Package Contract Work
|
|
204
|
+
|
|
205
|
+
Examples: extend a published package contract, understand how a scaffold surface maps to `@elevasis/ui`, update a package-facing reference doc.
|
|
206
|
+
|
|
207
|
+
Load first:
|
|
208
|
+
|
|
209
|
+
- `.claude/rules/active-change-index.md`
|
|
210
|
+
- Glob `node_modules/@elevasis/sdk/reference/` for the current SDK package surface
|
|
211
|
+
- package README found via that glob
|
|
212
|
+
|
|
213
|
+
Then inspect:
|
|
214
|
+
|
|
215
|
+
- package source entrypoints
|
|
216
|
+
- package reference manifests
|
|
217
|
+
- scaffold files that consume that contract
|
|
218
|
+
|
|
219
|
+
Verify with:
|
|
220
|
+
|
|
221
|
+
- published package docs
|
|
222
|
+
- source exports
|
|
223
|
+
- scaffold consumption points
|
|
224
|
+
|
|
225
|
+
## Boundary Resolution
|
|
226
|
+
|
|
227
|
+
Once the request is classified, determine which boundary owns the change:
|
|
228
|
+
|
|
229
|
+
- **Core boundary** -- semantics, aliases, labels, shared schemas
|
|
230
|
+
- **UI shell boundary** -- provider composition, manifests, navigation, route ownership
|
|
231
|
+
- **Operations boundary** -- deployable resource registration, workflow/agent contracts, topology
|
|
232
|
+
- **Package boundary** -- public exports, shared platform behavior, reusable contracts
|
|
233
|
+
|
|
234
|
+
If a task spans boundaries, start at the semantic boundary, then move to runtime composition, then to registration/deployment.
|
|
235
|
+
|
|
236
|
+
## Main Boundaries
|
|
237
|
+
|
|
238
|
+
### `core/config/organization-model.ts`
|
|
239
|
+
|
|
240
|
+
The semantic adaptation point between platform contracts and scaffold-local terminology. Start here for feature labels, legacy aliases, quick-access surfaces, and shell-facing organization semantics.
|
|
241
|
+
|
|
242
|
+
### `ui/src/routes/__root.tsx`
|
|
243
|
+
|
|
244
|
+
The shell composition point. Start here for manifest mounting, provider wiring, app-local nav, and how the scaffold combines published feature surfaces with project-owned shell concerns.
|
|
245
|
+
|
|
246
|
+
### `operations/src/index.ts`
|
|
247
|
+
|
|
248
|
+
The deployment aggregation point. Start here for what resources are registered and deployed as part of the scaffold.
|
|
249
|
+
|
|
250
|
+
## Source of Truth
|
|
251
|
+
|
|
252
|
+
Trust these in order:
|
|
253
|
+
|
|
254
|
+
1. Source code and published package docs
|
|
255
|
+
2. Co-located boundary docs
|
|
256
|
+
3. Generated structural maps
|
|
257
|
+
4. Hand-authored template guidance
|
|
258
|
+
5. In-progress architecture docs when `.claude/rules/active-change-index.md` says the area is actively evolving
|
|
259
|
+
|
|
260
|
+
If a hand-authored doc conflicts with source or published package docs, trust source and flag the doc drift.
|
|
261
|
+
|
|
262
|
+
## Common Traps
|
|
263
|
+
|
|
264
|
+
- Do not assume feature directories are exhaustive without also checking `operations/src/index.ts` and `core/config/organization-model.ts` directly.
|
|
265
|
+
- Do not assume placeholder knowledge is sufficient for real client context. Read `identity.clientBrief` from the OrganizationModel (`core/config/organization-model.ts`).
|
|
266
|
+
- Do not trust stable docs blindly when `.claude/rules/active-change-index.md` flags related in-progress architecture work.
|
|
267
|
+
- Do not write `resume_context` into task-doc frontmatter. DB is canonical; write via `project:task:save` or the inline editor in Command Center.
|
|
268
|
+
|
|
269
|
+
## Operations-Only Projects
|
|
270
|
+
|
|
271
|
+
Some projects derived from this template are operations-only. They have `operations/` (or a top-level `src/`) but NO `ui/`, NO `core/config/organization-model.ts`, and NO frontend. Finding none of these is not missing scaffolding -- it is by design.
|
|
272
|
+
|
|
273
|
+
**What applies:** Only Task Classes 2 (Workflow / Agent / Operations Work) and 4 (Debugging / Impact Analysis) apply to operations-only projects. Task Classes 1 (UI / Shell Work), 3 (Organization Model / Feature Access Work), and 5 (Platform Extension / Package Contract Work) do not apply and can be skipped.
|
|
274
|
+
|
|
275
|
+
**Primary entrypoint:** For operations-only projects, the project's own `CLAUDE.md` and its Navigation table are the canonical first-read. This rule provides task-routing context but its full surface map is irrelevant for that project type.
|
|
276
|
+
|
|
277
|
+
**Signal:** The `CLAUDE.md` of an operations-only project includes `Project type: operations-only` in its `## Project` section. When you see this signal, skip all template surfaces that don't exist and go directly to the operations task class.
|