@elevasis/sdk 1.36.5 → 1.38.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 +64 -22
- package/dist/index.d.ts +105 -7
- package/dist/index.js +81 -33
- package/dist/node/index.d.ts +6 -5
- package/dist/test-utils/index.d.ts +6 -5
- package/dist/test-utils/index.js +70 -32
- package/dist/worker/index.js +7 -11
- package/package.json +4 -4
- package/reference/claude-config/Overview.md +140 -32
- package/reference/claude-config/rules/active-change-index.md +13 -2
- package/reference/claude-config/rules/agent-start-here.md +13 -2
- package/reference/claude-config/rules/deployment.md +13 -2
- package/reference/claude-config/rules/error-handling.md +13 -2
- package/reference/claude-config/rules/execution.md +13 -2
- package/reference/claude-config/rules/frontend.md +13 -2
- package/reference/claude-config/rules/observability.md +13 -2
- package/reference/claude-config/rules/operations.md +13 -2
- package/reference/claude-config/rules/organization-model.md +1 -1
- package/reference/claude-config/rules/organization-os.md +1 -1
- package/reference/claude-config/rules/package-taxonomy.md +13 -2
- package/reference/claude-config/rules/platform.md +13 -2
- package/reference/claude-config/rules/shared-types.md +13 -2
- package/reference/claude-config/rules/task-tracking.md +13 -2
- package/reference/claude-config/rules/topbar-actions.md +2 -2
- package/reference/claude-config/rules/ui.md +13 -2
- package/reference/claude-config/rules/vibe.md +13 -2
- package/reference/claude-config/settings.json +30 -34
- package/reference/claude-config/skills/deploy/SKILL.md +159 -156
- package/reference/claude-config/skills/elevasis/SKILL.md +11 -4
- package/reference/claude-config/skills/explore/SKILL.md +78 -78
- package/reference/claude-config/skills/git-sync/SKILL.md +166 -126
- package/reference/claude-config/skills/om/SKILL.md +15 -15
- package/reference/claude-config/skills/om/operations/build.md +2 -2
- package/reference/claude-config/skills/project/SKILL.md +1 -1
- package/reference/claude-config/skills/save/SKILL.md +183 -183
- package/reference/claude-config/skills/setup/SKILL.md +9 -3
- package/reference/claude-config/skills/status/SKILL.md +59 -59
- package/reference/claude-config/skills/sync/SKILL.md +47 -47
- package/reference/claude-config/skills/tutorial/SKILL.md +1 -1
- package/reference/claude-config/skills/tutorial/technical.md +11 -11
- package/reference/claude-config/sync-notes/2026-06-15-session-chat-zero-wiring.md +46 -0
- package/reference/claude-config/sync-notes/2026-06-17-agent-session-ux-features.md +34 -0
- package/reference/claude-config/sync-notes/2026-06-25-shared-page-scroll-contract-guard.md +52 -0
- package/reference/claude-config/sync-notes/2026-06-26-leadgen-overview-om-telemetry.md +47 -0
- package/reference/claude-config/sync-notes/2026-07-21-agent-scaffold-hardening.md +75 -0
- package/reference/rules/active-change-index.md +5 -5
- package/reference/rules/agent-start-here.md +34 -30
- package/reference/rules/deployment.md +21 -8
- package/reference/rules/frontend.md +4 -4
- package/reference/rules/observability.md +1 -1
- package/reference/rules/organization-model.md +1 -1
- package/reference/rules/organization-os.md +29 -29
- package/reference/rules/ui.md +205 -202
- package/reference/rules/vibe.md +5 -4
- package/reference/scaffold/operations/propagation-pipeline.md +1 -1
- package/reference/scaffold/recipes/extend-lead-gen.md +505 -332
- package/reference/scaffold/reference/contracts.md +14 -21
|
@@ -1,183 +1,183 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: save
|
|
3
|
-
description: Auto-manage project documentation and persist task resume context from conversation
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Save
|
|
7
|
-
|
|
8
|
-
Auto-manage project documentation from conversation context, and fan out conversation signals to the canonical project system (`prj_tasks.resume_context`, `prj_notes`) via the `elevasis-sdk` CLI.
|
|
9
|
-
|
|
10
|
-
## Canonical Sources of Truth
|
|
11
|
-
|
|
12
|
-
- **Task resume context (DB):** `prj_tasks.resume_context` is canonical. Agents write it via `elevasis-sdk project:task:save`. Humans edit it via the inline task editor in Command Center. **Never** stash resume context into task-doc frontmatter.
|
|
13
|
-
- **Task-doc frontmatter:** ONLY `title`, `description`, `status`. No `resume_context`, no files-modified, no next-steps arrays -- those belong in the DB.
|
|
14
|
-
- **Project notes (DB):** `prj_notes` via `elevasis-sdk project:note:create`. Typed notes (`status_update` / `issue` / `blocker` / `call_note`) are the durable record of conversation signals.
|
|
15
|
-
|
|
16
|
-
## Process
|
|
17
|
-
|
|
18
|
-
### Step 1: Resolve Project + Task Context
|
|
19
|
-
|
|
20
|
-
Before doing anything else, determine the active project / task:
|
|
21
|
-
|
|
22
|
-
1. Look for an active task-doc frontmatter in the current conversation or the most recently edited file. Expected frontmatter:
|
|
23
|
-
|
|
24
|
-
```yaml
|
|
25
|
-
---
|
|
26
|
-
title: Short title
|
|
27
|
-
description: One-line summary
|
|
28
|
-
status: planned | in-progress | blocked | complete
|
|
29
|
-
---
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
2. If the task doc references a project/task UUID anywhere in its body (link, callout, or prior save output), capture those IDs.
|
|
33
|
-
3. If no task / project context is resolvable, PROMPT the user:
|
|
34
|
-
- "Which project is this work under?" (accepts slug or UUID)
|
|
35
|
-
- "Is there an existing task I should attach this to? (task UUID, or 'new')"
|
|
36
|
-
|
|
37
|
-
Do not guess. Without a task ID, skip Step 4 (DB resume-context save) but still perform Steps 2, 3, 5, 6, 7.
|
|
38
|
-
|
|
39
|
-
### Step 2: Analyze Conversation
|
|
40
|
-
|
|
41
|
-
Review the current conversation to identify:
|
|
42
|
-
|
|
43
|
-
1. **New knowledge** -- architecture decisions, feature implementations, bug fixes, discoveries
|
|
44
|
-
2. **Changed state** -- what was in-progress that is now complete, what new work started
|
|
45
|
-
3. **Stale docs** -- information in existing docs that is now outdated
|
|
46
|
-
4. **Signal events** -- blocker hit, status update worth recording, issue uncovered, call outcome
|
|
47
|
-
5. **OS contract paths touched** -- scan files read/written/edited for any of these signals:
|
|
48
|
-
- `core/config/organization-model.ts` -> Foundations layer, Organization Model
|
|
49
|
-
- `core/types/index.ts` -> Foundations layer, Workflow Contracts
|
|
50
|
-
- `ui/src/routes/__root.tsx` -> UI Shell Runtime composition
|
|
51
|
-
- `ui/src/features/**/manifest.ts` or any file defining a `SystemModule` -> Systems layer
|
|
52
|
-
- `operations/src/index.ts` or `operations/elevasis.config.ts` -> core/Deployment (DeploymentSpec)
|
|
53
|
-
- Any file inside `ui/src/features/<feature>/` combined with manifest, nav, or sidebar changes -> Features + Toolkit layers
|
|
54
|
-
|
|
55
|
-
Record which OS layers were touched: `foundations`, `systems`, `shell-runtime`, `toolkit`, `deployment`. If none matched, OS awareness stays dormant for the rest of this run.
|
|
56
|
-
|
|
57
|
-
### Step 3: Update Knowledge Docs
|
|
58
|
-
|
|
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`, `core/`, 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
|
-
|
|
61
|
-
Determine what needs to happen:
|
|
62
|
-
|
|
63
|
-
- **Create** new docs for significant new knowledge (new features, architecture decisions)
|
|
64
|
-
- **Update** existing docs with corrections, completions, or new details
|
|
65
|
-
- **Move** docs between directories (e.g., `ui/` to `operations/` when ownership shifts)
|
|
66
|
-
- **Delete** docs that are fully obsolete (rare -- prefer updating)
|
|
67
|
-
|
|
68
|
-
**Frontmatter requirement (
|
|
69
|
-
|
|
70
|
-
```markdown
|
|
71
|
-
---
|
|
72
|
-
title: Short descriptive title
|
|
73
|
-
description: One-line summary of what this doc covers
|
|
74
|
-
---
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
In-progress task docs additionally require `status`:
|
|
78
|
-
|
|
79
|
-
```markdown
|
|
80
|
-
---
|
|
81
|
-
title: Feature Name
|
|
82
|
-
description: What this task is about
|
|
83
|
-
status: planned | in-progress | blocked | complete
|
|
84
|
-
---
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
No other fields. Do NOT add `resume_context`, `files_modified`, or `next_steps` to frontmatter -- those flow to the DB via Step 4.
|
|
88
|
-
|
|
89
|
-
**Doc structure rules:**
|
|
90
|
-
|
|
91
|
-
- All docs are `.md` (not
|
|
92
|
-
- Keep docs focused -- one topic per file
|
|
93
|
-
- Use markdown tables for structured data
|
|
94
|
-
- Include "Last Updated: YYYY-MM-DD" at the bottom of modified docs
|
|
95
|
-
|
|
96
|
-
**OS layer annotation:** If OS contract paths were touched (Step 2), include an `## Organization OS Impact` section in any newly created architecture doc:
|
|
97
|
-
|
|
98
|
-
```markdown
|
|
99
|
-
## Organization OS Impact
|
|
100
|
-
|
|
101
|
-
Touched contracts: [list files]
|
|
102
|
-
Affected layers: [list of layers]
|
|
103
|
-
Cross-reference: `node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md`
|
|
104
|
-
Downstream: template consumer adapters may need review.
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Dispatch a `general-purpose` subagent with the plan, conversation context, and these rules. The subagent must read each target file before editing.
|
|
108
|
-
|
|
109
|
-
### Step 4: Persist Task Resume Context to DB
|
|
110
|
-
|
|
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:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
pnpm elevasis-sdk project:task:save <task-uuid> \
|
|
115
|
-
--current-state "<concise prose summary of where we are>" \
|
|
116
|
-
--next-steps "<concise prose of the next concrete action>" \
|
|
117
|
-
--files-modified '["path/one.ts","path/two.tsx"]' \
|
|
118
|
-
--key-docs '["operations/src/foo/index.ts","core/config/organization-model.ts"]' \
|
|
119
|
-
--tools '["project:task:save","project:note:create"]'
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Arg rules:
|
|
123
|
-
|
|
124
|
-
- `--current-state` (required) -- terse, present-tense "what is true right now". Prefer latest state over accumulated history.
|
|
125
|
-
- `--next-steps` -- single next concrete action another agent could execute without re-deriving intent.
|
|
126
|
-
- `--files-modified` -- JSON array of uncommitted / just-changed file paths (relative to project root).
|
|
127
|
-
- `--key-docs` -- JSON array of doc paths an agent should re-read to resume.
|
|
128
|
-
- `--tools` -- JSON array of tool / CLI names used this session that are worth flagging.
|
|
129
|
-
|
|
130
|
-
The endpoint is `PATCH /api/external/tasks/<id>/resume-context` and merges (does not replace) provided fields. Omit any arg that has nothing meaningful to record.
|
|
131
|
-
|
|
132
|
-
### Step 5: Create Typed Project Notes on Signal Events
|
|
133
|
-
|
|
134
|
-
For each signal event identified in Step 2, create a typed `prj_note`. One CLI call per note:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
pnpm elevasis-sdk project:note:create \
|
|
138
|
-
--project <project-uuid> \
|
|
139
|
-
--task <task-uuid> # optional, omit if not scoped to a task \
|
|
140
|
-
--type <note-type> \
|
|
141
|
-
--content "<what happened, why it matters, any next action>"
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Note-type mapping (use the first type that matches, in this order):
|
|
145
|
-
|
|
146
|
-
- **`blocker`** -- work cannot proceed without external action (decision, credential, fix elsewhere, upstream change). Always create if detected. Trigger phrases: "I'm stuck", "blocked on", "can't proceed until", "waiting on <X>". When detected AND a task ID is in scope, ALSO fire a status transition -- see Step 5a below.
|
|
147
|
-
- **`issue`** -- bug, regression, unexpected failure, contract mismatch. Include reproduction context in `--content`.
|
|
148
|
-
- **`status_update`** -- milestone-level progress worth flagging to the human operator (phase complete, substantial deliverable landed, direction change). Keep it substantive -- `/save` runs shouldn't emit a status_update every turn.
|
|
149
|
-
- **`call_note`** -- only if the conversation is transcribing a live client / stakeholder call.
|
|
150
|
-
|
|
151
|
-
If no signal rises to note-worthy, skip this step entirely. Do not create filler notes.
|
|
152
|
-
|
|
153
|
-
### Step 5a: Blocker Signal -> Task Status Transition
|
|
154
|
-
|
|
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.
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
pnpm elevasis-sdk project:task:update <task-uuid> --status blocked
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Rules:
|
|
162
|
-
|
|
163
|
-
- **Explicit task ID only** -- use the UUID resolved in Step 1. Do not re-derive or guess. If no task is in scope, skip this step (the blocker note still ships without it).
|
|
164
|
-
- **Best-effort** -- if the CLI returns non-2xx, surface a single warning line in Step 7 ("Warning: could not transition task <id> to blocked: <reason>") and continue. Do not retry, do not block the rest of `/save`.
|
|
165
|
-
- **Idempotent** -- if the task is already `blocked`, the update is a no-op. Fire it anyway; do not pre-check.
|
|
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.
|
|
167
|
-
|
|
168
|
-
### Step 6: Report
|
|
169
|
-
|
|
170
|
-
Summarize:
|
|
171
|
-
|
|
172
|
-
- Knowledge docs created / updated / moved / deleted
|
|
173
|
-
- Task ID written to (Step 4): `resume_context.last_saved` timestamp from the CLI response
|
|
174
|
-
- Notes created (Step 5): count, types, IDs
|
|
175
|
-
- OS classification (if applicable): layers detected, contracts touched
|
|
176
|
-
- Any files skipped due to missing frontmatter (Step 3 subagent should have added it)
|
|
177
|
-
- Any follow-ups for the human operator
|
|
178
|
-
|
|
179
|
-
## Failure Modes
|
|
180
|
-
|
|
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.
|
|
182
|
-
- **`project:task:save` returns non-2xx:** surface the error in the report, do not retry silently; Step 5 and Step 6 still run.
|
|
183
|
-
- **Knowledge doc edits fail to write:** surface the error; any edits already applied are on disk and not lost.
|
|
1
|
+
---
|
|
2
|
+
name: save
|
|
3
|
+
description: Auto-manage project documentation and persist task resume context from conversation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Save
|
|
7
|
+
|
|
8
|
+
Auto-manage project documentation from conversation context, and fan out conversation signals to the canonical project system (`prj_tasks.resume_context`, `prj_notes`) via the `elevasis-sdk` CLI.
|
|
9
|
+
|
|
10
|
+
## Canonical Sources of Truth
|
|
11
|
+
|
|
12
|
+
- **Task resume context (DB):** `prj_tasks.resume_context` is canonical. Agents write it via `elevasis-sdk project:task:save`. Humans edit it via the inline task editor in Command Center. **Never** stash resume context into task-doc frontmatter.
|
|
13
|
+
- **Task-doc frontmatter:** ONLY `title`, `description`, `status`. No `resume_context`, no files-modified, no next-steps arrays -- those belong in the DB.
|
|
14
|
+
- **Project notes (DB):** `prj_notes` via `elevasis-sdk project:note:create`. Typed notes (`status_update` / `issue` / `blocker` / `call_note`) are the durable record of conversation signals.
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### Step 1: Resolve Project + Task Context
|
|
19
|
+
|
|
20
|
+
Before doing anything else, determine the active project / task:
|
|
21
|
+
|
|
22
|
+
1. Look for an active task-doc frontmatter in the current conversation or the most recently edited file. Expected frontmatter:
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
---
|
|
26
|
+
title: Short title
|
|
27
|
+
description: One-line summary
|
|
28
|
+
status: planned | in-progress | blocked | complete
|
|
29
|
+
---
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
2. If the task doc references a project/task UUID anywhere in its body (link, callout, or prior save output), capture those IDs.
|
|
33
|
+
3. If no task / project context is resolvable, PROMPT the user:
|
|
34
|
+
- "Which project is this work under?" (accepts slug or UUID)
|
|
35
|
+
- "Is there an existing task I should attach this to? (task UUID, or 'new')"
|
|
36
|
+
|
|
37
|
+
Do not guess. Without a task ID, skip Step 4 (DB resume-context save) but still perform Steps 2, 3, 5, 6, 7.
|
|
38
|
+
|
|
39
|
+
### Step 2: Analyze Conversation
|
|
40
|
+
|
|
41
|
+
Review the current conversation to identify:
|
|
42
|
+
|
|
43
|
+
1. **New knowledge** -- architecture decisions, feature implementations, bug fixes, discoveries
|
|
44
|
+
2. **Changed state** -- what was in-progress that is now complete, what new work started
|
|
45
|
+
3. **Stale docs** -- information in existing docs that is now outdated
|
|
46
|
+
4. **Signal events** -- blocker hit, status update worth recording, issue uncovered, call outcome
|
|
47
|
+
5. **OS contract paths touched** -- scan files read/written/edited for any of these signals:
|
|
48
|
+
- `core/config/organization-model.ts` -> Foundations layer, Organization Model
|
|
49
|
+
- `core/types/index.ts` -> Foundations layer, Workflow Contracts
|
|
50
|
+
- `ui/src/routes/__root.tsx` -> UI Shell Runtime composition
|
|
51
|
+
- `ui/src/features/**/manifest.ts` or any file defining a `SystemModule` -> Systems layer
|
|
52
|
+
- `operations/src/index.ts` or `operations/elevasis.config.ts` -> core/Deployment (DeploymentSpec)
|
|
53
|
+
- Any file inside `ui/src/features/<feature>/` combined with manifest, nav, or sidebar changes -> Features + Toolkit layers
|
|
54
|
+
|
|
55
|
+
Record which OS layers were touched: `foundations`, `systems`, `shell-runtime`, `toolkit`, `deployment`. If none matched, OS awareness stays dormant for the rest of this run.
|
|
56
|
+
|
|
57
|
+
### Step 3: Update Knowledge Docs
|
|
58
|
+
|
|
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`, `core/`, 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
|
+
|
|
61
|
+
Determine what needs to happen:
|
|
62
|
+
|
|
63
|
+
- **Create** new docs for significant new knowledge (new features, architecture decisions) -- place them wherever this project actually keeps such notes (a README next to the relevant code, or a project-created notes location); this template has no `docs/` tree, so do not create or assume one
|
|
64
|
+
- **Update** existing docs with corrections, completions, or new details
|
|
65
|
+
- **Move** docs between directories (e.g., `ui/` to `operations/` when ownership shifts)
|
|
66
|
+
- **Delete** docs that are fully obsolete (rare -- prefer updating)
|
|
67
|
+
|
|
68
|
+
**Frontmatter requirement (any doc this step creates or updates):**
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
---
|
|
72
|
+
title: Short descriptive title
|
|
73
|
+
description: One-line summary of what this doc covers
|
|
74
|
+
---
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
In-progress task docs additionally require `status`:
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
---
|
|
81
|
+
title: Feature Name
|
|
82
|
+
description: What this task is about
|
|
83
|
+
status: planned | in-progress | blocked | complete
|
|
84
|
+
---
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
No other fields. Do NOT add `resume_context`, `files_modified`, or `next_steps` to frontmatter -- those flow to the DB via Step 4.
|
|
88
|
+
|
|
89
|
+
**Doc structure rules:**
|
|
90
|
+
|
|
91
|
+
- All docs are `.md` (not `.mdx` -- this template has no Fumadocs/MDX pipeline)
|
|
92
|
+
- Keep docs focused -- one topic per file
|
|
93
|
+
- Use markdown tables for structured data
|
|
94
|
+
- Include "Last Updated: YYYY-MM-DD" at the bottom of modified docs
|
|
95
|
+
|
|
96
|
+
**OS layer annotation:** If OS contract paths were touched (Step 2), include an `## Organization OS Impact` section in any newly created architecture doc:
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
## Organization OS Impact
|
|
100
|
+
|
|
101
|
+
Touched contracts: [list files]
|
|
102
|
+
Affected layers: [list of layers]
|
|
103
|
+
Cross-reference: `operations/node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md`
|
|
104
|
+
Downstream: template consumer adapters may need review.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Dispatch a `general-purpose` subagent with the plan, conversation context, and these rules. The subagent must read each target file before editing.
|
|
108
|
+
|
|
109
|
+
### Step 4: Persist Task Resume Context to DB
|
|
110
|
+
|
|
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:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
pnpm elevasis-sdk project:task:save <task-uuid> \
|
|
115
|
+
--current-state "<concise prose summary of where we are>" \
|
|
116
|
+
--next-steps "<concise prose of the next concrete action>" \
|
|
117
|
+
--files-modified '["path/one.ts","path/two.tsx"]' \
|
|
118
|
+
--key-docs '["operations/src/foo/index.ts","core/config/organization-model.ts"]' \
|
|
119
|
+
--tools '["project:task:save","project:note:create"]'
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Arg rules:
|
|
123
|
+
|
|
124
|
+
- `--current-state` (required) -- terse, present-tense "what is true right now". Prefer latest state over accumulated history.
|
|
125
|
+
- `--next-steps` -- single next concrete action another agent could execute without re-deriving intent.
|
|
126
|
+
- `--files-modified` -- JSON array of uncommitted / just-changed file paths (relative to project root).
|
|
127
|
+
- `--key-docs` -- JSON array of doc paths an agent should re-read to resume.
|
|
128
|
+
- `--tools` -- JSON array of tool / CLI names used this session that are worth flagging.
|
|
129
|
+
|
|
130
|
+
The endpoint is `PATCH /api/external/tasks/<id>/resume-context` and merges (does not replace) provided fields. Omit any arg that has nothing meaningful to record.
|
|
131
|
+
|
|
132
|
+
### Step 5: Create Typed Project Notes on Signal Events
|
|
133
|
+
|
|
134
|
+
For each signal event identified in Step 2, create a typed `prj_note`. One CLI call per note:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
pnpm elevasis-sdk project:note:create \
|
|
138
|
+
--project <project-uuid> \
|
|
139
|
+
--task <task-uuid> # optional, omit if not scoped to a task \
|
|
140
|
+
--type <note-type> \
|
|
141
|
+
--content "<what happened, why it matters, any next action>"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Note-type mapping (use the first type that matches, in this order):
|
|
145
|
+
|
|
146
|
+
- **`blocker`** -- work cannot proceed without external action (decision, credential, fix elsewhere, upstream change). Always create if detected. Trigger phrases: "I'm stuck", "blocked on", "can't proceed until", "waiting on <X>". When detected AND a task ID is in scope, ALSO fire a status transition -- see Step 5a below.
|
|
147
|
+
- **`issue`** -- bug, regression, unexpected failure, contract mismatch. Include reproduction context in `--content`.
|
|
148
|
+
- **`status_update`** -- milestone-level progress worth flagging to the human operator (phase complete, substantial deliverable landed, direction change). Keep it substantive -- `/save` runs shouldn't emit a status_update every turn.
|
|
149
|
+
- **`call_note`** -- only if the conversation is transcribing a live client / stakeholder call.
|
|
150
|
+
|
|
151
|
+
If no signal rises to note-worthy, skip this step entirely. Do not create filler notes.
|
|
152
|
+
|
|
153
|
+
### Step 5a: Blocker Signal -> Task Status Transition
|
|
154
|
+
|
|
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.
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
pnpm elevasis-sdk project:task:update <task-uuid> --status blocked
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Rules:
|
|
162
|
+
|
|
163
|
+
- **Explicit task ID only** -- use the UUID resolved in Step 1. Do not re-derive or guess. If no task is in scope, skip this step (the blocker note still ships without it).
|
|
164
|
+
- **Best-effort** -- if the CLI returns non-2xx, surface a single warning line in Step 7 ("Warning: could not transition task <id> to blocked: <reason>") and continue. Do not retry, do not block the rest of `/save`.
|
|
165
|
+
- **Idempotent** -- if the task is already `blocked`, the update is a no-op. Fire it anyway; do not pre-check.
|
|
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.
|
|
167
|
+
|
|
168
|
+
### Step 6: Report
|
|
169
|
+
|
|
170
|
+
Summarize:
|
|
171
|
+
|
|
172
|
+
- Knowledge docs created / updated / moved / deleted
|
|
173
|
+
- Task ID written to (Step 4): `resume_context.last_saved` timestamp from the CLI response
|
|
174
|
+
- Notes created (Step 5): count, types, IDs
|
|
175
|
+
- OS classification (if applicable): layers detected, contracts touched
|
|
176
|
+
- Any files skipped due to missing frontmatter (Step 3 subagent should have added it)
|
|
177
|
+
- Any follow-ups for the human operator
|
|
178
|
+
|
|
179
|
+
## Failure Modes
|
|
180
|
+
|
|
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.
|
|
182
|
+
- **`project:task:save` returns non-2xx:** surface the error in the report, do not retry silently; Step 5 and Step 6 still run.
|
|
183
|
+
- **Knowledge doc edits fail to write:** surface the error; any edits already applied are on disk and not lost.
|
|
@@ -17,7 +17,7 @@ First-time project setup for projects cloned directly from the template. Handles
|
|
|
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 `
|
|
20
|
+
- `CLAUDE.md` — look for `__PROJECT_NAME__` (the title) and `__PROJECT_DESCRIPTION__` (the Project section) 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
|
|
|
@@ -106,9 +106,15 @@ Look good?
|
|
|
106
106
|
|
|
107
107
|
Search ALL files in the project matching these extensions: `.ts`, `.tsx`, `.js`, `.mjs`, `.json`, `.md`, `.mdx`, `.html`, `.yaml`, `.yml`, `.css`, `.env.example`
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
**HARD EXCLUSION -- `.claude/` is off-limits (read this before scanning any file list):**
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
Do NOT scan, read-for-replacement, or edit ANY file under `.claude/` -- this includes `.claude/skills/**` (including this very `setup/SKILL.md` file), `.claude/rules/**`, `.claude/agents/**`, `.claude/hooks/**`, `.claude/registries/**`, `.claude/sync-notes/**`, `.claude/logs/**`, `.claude/Overview.md`, and `.claude/settings.json`. These are agent scaffold, not template content -- they describe the agent's own tooling and must never have their placeholder text (e.g. `__PROJECT_NAME__`, `__DATE__`, tenant names used as worked examples) substituted. Substituting them corrupts the scaffold and breaks every future re-run of `/setup` and other skills that reference this file.
|
|
112
|
+
|
|
113
|
+
The allowlist of directories to scan is exactly: project root files (`package.json`, `CLAUDE.md`, `.env.example`), `ui/**`, `operations/**`, `core/**`. Also exclude `node_modules/`, `dist/`, `.tanstack/`, `pnpm-lock.yaml`, and `.git/` within those trees.
|
|
114
|
+
|
|
115
|
+
If you are about to open or write any file whose path starts with `.claude/`, stop -- that file is out of scope for this step, with zero exceptions.
|
|
116
|
+
|
|
117
|
+
For each matching file (from the allowlist above, outside `.claude/`), replace all occurrences of:
|
|
112
118
|
|
|
113
119
|
| Placeholder | Replace with |
|
|
114
120
|
| ------------------------------ | ----------------------- |
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: status
|
|
3
|
-
description: Quick project health check
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Status
|
|
7
|
-
|
|
8
|
-
Quick project health check.
|
|
9
|
-
|
|
10
|
-
**Usage:** `/status`
|
|
11
|
-
|
|
12
|
-
## Process
|
|
13
|
-
|
|
14
|
-
### Step 1: Gather Data
|
|
15
|
-
|
|
16
|
-
Run in parallel:
|
|
17
|
-
|
|
18
|
-
1. `git status` - working tree state
|
|
19
|
-
2. `git log --oneline -5` - recent commits
|
|
20
|
-
3. `pnpm test` - test results
|
|
21
|
-
4. `pnpm lint` - type check
|
|
22
|
-
|
|
23
|
-
### Step 2: Check Active Work
|
|
24
|
-
|
|
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
|
|
26
|
-
|
|
27
|
-
### Step 3: Report
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
Project Status
|
|
31
|
-
==============
|
|
32
|
-
|
|
33
|
-
Git
|
|
34
|
-
---
|
|
35
|
-
Branch: <branch>
|
|
36
|
-
Clean: Yes/No (N uncommitted changes)
|
|
37
|
-
Last commit: <hash> - <message> (<date>)
|
|
38
|
-
|
|
39
|
-
Tests
|
|
40
|
-
-----
|
|
41
|
-
Result: All passing / N failures
|
|
42
|
-
Details: [if failures, list them]
|
|
43
|
-
|
|
44
|
-
Types
|
|
45
|
-
-----
|
|
46
|
-
Result: Clean / N errors
|
|
47
|
-
Details: [if errors, list them]
|
|
48
|
-
|
|
49
|
-
Docs
|
|
50
|
-
----
|
|
51
|
-
Architecture: N docs
|
|
52
|
-
Features: N docs
|
|
53
|
-
|
|
54
|
-
Active Work (DB)
|
|
55
|
-
----------------
|
|
56
|
-
Projects: N active, N blocked
|
|
57
|
-
- [client 1] (status)
|
|
58
|
-
- [client 2] (status)
|
|
59
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: status
|
|
3
|
+
description: Quick project health check
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Status
|
|
7
|
+
|
|
8
|
+
Quick project health check.
|
|
9
|
+
|
|
10
|
+
**Usage:** `/status`
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
|
|
14
|
+
### Step 1: Gather Data
|
|
15
|
+
|
|
16
|
+
Run in parallel:
|
|
17
|
+
|
|
18
|
+
1. `git status` - working tree state
|
|
19
|
+
2. `git log --oneline -5` - recent commits
|
|
20
|
+
3. `pnpm test` - test results (root `test` script runs `ui`, `operations`, and `core` checks/tests)
|
|
21
|
+
4. `pnpm -C ui lint` - type check (root has no `lint` script; `lint` only exists in `ui/package.json`)
|
|
22
|
+
|
|
23
|
+
### Step 2: Check Active Work
|
|
24
|
+
|
|
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
|
|
26
|
+
|
|
27
|
+
### Step 3: Report
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Project Status
|
|
31
|
+
==============
|
|
32
|
+
|
|
33
|
+
Git
|
|
34
|
+
---
|
|
35
|
+
Branch: <branch>
|
|
36
|
+
Clean: Yes/No (N uncommitted changes)
|
|
37
|
+
Last commit: <hash> - <message> (<date>)
|
|
38
|
+
|
|
39
|
+
Tests
|
|
40
|
+
-----
|
|
41
|
+
Result: All passing / N failures
|
|
42
|
+
Details: [if failures, list them]
|
|
43
|
+
|
|
44
|
+
Types
|
|
45
|
+
-----
|
|
46
|
+
Result: Clean / N errors
|
|
47
|
+
Details: [if errors, list them]
|
|
48
|
+
|
|
49
|
+
Docs
|
|
50
|
+
----
|
|
51
|
+
Architecture: N docs
|
|
52
|
+
Features: N docs
|
|
53
|
+
|
|
54
|
+
Active Work (DB)
|
|
55
|
+
----------------
|
|
56
|
+
Projects: N active, N blocked
|
|
57
|
+
- [client 1] (status)
|
|
58
|
+
- [client 2] (status)
|
|
59
|
+
```
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sync
|
|
3
|
-
description: Fresh reinstall and cache reset after local dependency or cache drift
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Sync
|
|
7
|
-
|
|
8
|
-
Fresh reinstall and cache reset for local dependency or cache drift.
|
|
9
|
-
|
|
10
|
-
**Usage:** `/sync`
|
|
11
|
-
|
|
12
|
-
Use this when: packages feel stale, Vite cache is serving old code, or `pnpm install` didn't fully clean up after a package version bump.
|
|
13
|
-
|
|
14
|
-
For pulling template updates, surfacing new `.claude/sync-notes/` guidance, and running the baseline post-pull verification flow, use `/git-sync` instead.
|
|
15
|
-
|
|
16
|
-
## Process
|
|
17
|
-
|
|
18
|
-
### Step 1: Wipe
|
|
19
|
-
|
|
20
|
-
Remove all `node_modules` and build caches across the workspace in parallel:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
rm -rf node_modules
|
|
24
|
-
rm -rf ui/node_modules
|
|
25
|
-
rm -rf ui/node_modules/.vite
|
|
26
|
-
rm -rf operations/node_modules
|
|
27
|
-
rm -rf
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Step 2: Reinstall
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
pnpm install
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Report success or any errors.
|
|
37
|
-
|
|
38
|
-
### Step 3: Report
|
|
39
|
-
|
|
40
|
-
```text
|
|
41
|
-
Sync Complete
|
|
42
|
-
=============
|
|
43
|
-
Wiped: node_modules (root, ui, operations,
|
|
44
|
-
Install: success
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
If `pnpm install` fails, report the error and stop - do not attempt to start the dev server.
|
|
1
|
+
---
|
|
2
|
+
name: sync
|
|
3
|
+
description: Fresh reinstall and cache reset after local dependency or cache drift
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sync
|
|
7
|
+
|
|
8
|
+
Fresh reinstall and cache reset for local dependency or cache drift.
|
|
9
|
+
|
|
10
|
+
**Usage:** `/sync`
|
|
11
|
+
|
|
12
|
+
Use this when: packages feel stale, Vite cache is serving old code, or `pnpm install` didn't fully clean up after a package version bump.
|
|
13
|
+
|
|
14
|
+
For pulling template updates, surfacing new `.claude/sync-notes/` guidance, and running the baseline post-pull verification flow, use `/git-sync` instead.
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### Step 1: Wipe
|
|
19
|
+
|
|
20
|
+
Remove all `node_modules` and build caches across the workspace in parallel:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
rm -rf node_modules
|
|
24
|
+
rm -rf ui/node_modules
|
|
25
|
+
rm -rf ui/node_modules/.vite
|
|
26
|
+
rm -rf operations/node_modules
|
|
27
|
+
rm -rf core/node_modules
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Step 2: Reinstall
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm install
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Report success or any errors.
|
|
37
|
+
|
|
38
|
+
### Step 3: Report
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
Sync Complete
|
|
42
|
+
=============
|
|
43
|
+
Wiped: node_modules (root, ui, operations, core) + Vite cache
|
|
44
|
+
Install: success
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If `pnpm install` fails, report the error and stop - do not attempt to start the dev server.
|
|
@@ -35,7 +35,7 @@ Track separation is explicit:
|
|
|
35
35
|
business profile, saved progress, automations, dashboard, and reports. Do not name the technical
|
|
36
36
|
pattern in vibe-coder menus, lessons, prompts, or progress labels.
|
|
37
37
|
- The technical track may name OM spine vocabulary and can point developers at
|
|
38
|
-
`node_modules/@elevasis/sdk/reference/spine/spine-primer.md` when lessons discuss shared stage,
|
|
38
|
+
`operations/node_modules/@elevasis/sdk/reference/spine/spine-primer.md` when lessons discuss shared stage,
|
|
39
39
|
status, or catalog vocabularies.
|
|
40
40
|
|
|
41
41
|
---
|