@contextium/cli 1.0.12 → 1.0.14
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/package.json +1 -1
- package/skills/ium/help.md +2 -0
- package/skills/ium/new-project.md +184 -2
- package/skills/ium/resume-project.md +133 -0
package/package.json
CHANGED
package/skills/ium/help.md
CHANGED
|
@@ -31,6 +31,8 @@ CONTENT
|
|
|
31
31
|
/ium:create Create an agent, skill, or workflow interactively
|
|
32
32
|
/ium:search Search docs by query, filename, or tag
|
|
33
33
|
/ium:workflow Load a workflow and sync its resources into context
|
|
34
|
+
/ium:resume-project Resume a project from a session handoff — picks up
|
|
35
|
+
exactly where you left off in the project plan
|
|
34
36
|
|
|
35
37
|
MARKETPLACE
|
|
36
38
|
/ium:marketplace Browse, install, or publish skills, agents & MCP servers
|
|
@@ -58,6 +58,40 @@ Ask: "Which workspace is this project for?"
|
|
|
58
58
|
Present names only — no IDs, no raw output.
|
|
59
59
|
</step>
|
|
60
60
|
|
|
61
|
+
<step name="existing_workflow_check">
|
|
62
|
+
Before asking for a project description, ask:
|
|
63
|
+
|
|
64
|
+
"Do you have an existing Contextium workflow you'd like to use as a base for this project?"
|
|
65
|
+
|
|
66
|
+
Use AskUserQuestion:
|
|
67
|
+
- "Yes, use an existing workflow"
|
|
68
|
+
- "No, start fresh"
|
|
69
|
+
|
|
70
|
+
If yes:
|
|
71
|
+
1. Silently fetch all workflows in the selected workspace:
|
|
72
|
+
**CLI:** `contextium workflows list -w <slug> 2>/dev/null`
|
|
73
|
+
**MCP:** call mcp__contextium__list_workflows
|
|
74
|
+
|
|
75
|
+
2. Present workflow names and ask: "Which workflow would you like to use?"
|
|
76
|
+
|
|
77
|
+
3. Load the selected workflow silently and read its resources (libraries, agents, skills).
|
|
78
|
+
|
|
79
|
+
4. After the user provides their project description (next step), compare the workflow's existing resources against what the new project needs. In the plan step, flag:
|
|
80
|
+
- Resources that already exist in the workflow and can be reused as-is
|
|
81
|
+
- Resources that exist but may need updating or extending for this project (flag as "Extend")
|
|
82
|
+
- Resources that are missing entirely and need to be created
|
|
83
|
+
|
|
84
|
+
5. In the plan table, add an "Extend" action row type where relevant:
|
|
85
|
+
|
|
86
|
+
| Action | Name | Purpose |
|
|
87
|
+
|--------|------|---------|
|
|
88
|
+
| Reuse | "Agent Name" | already covers this need |
|
|
89
|
+
| Extend | "Agent Name" | exists but needs updated system prompt for this project |
|
|
90
|
+
| Create | "Agent Name" | not in the workflow, needs to be created |
|
|
91
|
+
|
|
92
|
+
If no: continue to project description with a clean slate.
|
|
93
|
+
</step>
|
|
94
|
+
|
|
61
95
|
<step name="project_description">
|
|
62
96
|
Ask the user this question exactly:
|
|
63
97
|
|
|
@@ -151,13 +185,79 @@ Shall I go ahead and create all of this?
|
|
|
151
185
|
Wait for the user to confirm, adjust, or say skip on any item before proceeding.
|
|
152
186
|
</step>
|
|
153
187
|
|
|
188
|
+
<step name="research_question">
|
|
189
|
+
Ask the user:
|
|
190
|
+
|
|
191
|
+
"Does this project need research before you start work? I can create a dedicated research agent to gather information, analyse sources, and summarise findings for your project."
|
|
192
|
+
|
|
193
|
+
Use AskUserQuestion:
|
|
194
|
+
- "Yes, add a research agent"
|
|
195
|
+
- "No, skip"
|
|
196
|
+
|
|
197
|
+
If yes: add a project-specific research agent to the creation plan. Name it something like "**[Project Name] Researcher**" and tailor its system prompt to the specific research domain (e.g. competitor analysis, technical investigation, market research — infer from the project description). Store this agent as `research_agent_planned = true` for use in later steps.
|
|
198
|
+
|
|
199
|
+
If no: set `research_agent_planned = false` and continue.
|
|
200
|
+
</step>
|
|
201
|
+
|
|
202
|
+
<step name="planner_question">
|
|
203
|
+
Ask the user:
|
|
204
|
+
|
|
205
|
+
"Would you like a project planner to break your project into phases and track progress? I'll create a planning agent and a phase tracker document you can follow from start to finish."
|
|
206
|
+
|
|
207
|
+
Use AskUserQuestion:
|
|
208
|
+
- "Yes, add a project planner"
|
|
209
|
+
- "No, skip"
|
|
210
|
+
|
|
211
|
+
If yes:
|
|
212
|
+
1. Add a "**[Project Name] Planner**" agent to the creation plan — its role is to define project phases, estimate scope, and guide execution in order. Tailor its system prompt to the project domain. Store as `planner_planned = true`.
|
|
213
|
+
2. After all resources are created, create a planning document file in the most relevant library. The file should contain a phased breakdown of the project inferred from the user's description — structured like:
|
|
214
|
+
|
|
215
|
+
```markdown
|
|
216
|
+
# [Project Name] — Project Plan
|
|
217
|
+
|
|
218
|
+
## Phase 1: [Name]
|
|
219
|
+
**Status:** Not Started
|
|
220
|
+
[Brief description of what this phase covers]
|
|
221
|
+
|
|
222
|
+
## Phase 2: [Name]
|
|
223
|
+
**Status:** Not Started
|
|
224
|
+
[Brief description]
|
|
225
|
+
|
|
226
|
+
...
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Infer sensible phases from the project description. Use "Not Started" for all phases. Title the file something like `project-plan.md`.
|
|
230
|
+
|
|
231
|
+
If no: set `planner_planned = false` and continue.
|
|
232
|
+
</step>
|
|
233
|
+
|
|
154
234
|
<step name="create_resources">
|
|
155
|
-
Only create what the user confirmed. Create in this order: tag types → tags → libraries → skills → agents.
|
|
235
|
+
Only create what the user confirmed across all steps. Create in this order: tag types → tags → libraries → skills → agents (including research and planner agents if confirmed).
|
|
156
236
|
|
|
157
237
|
Do NOT create a workflow in this step.
|
|
158
238
|
|
|
159
239
|
Show `✓ Created "Name"` for each item as it is created. Show `↗ Reusing "Name"` for each existing resource being included.
|
|
160
240
|
|
|
241
|
+
If `planner_planned = true`, create the project plan file after all other resources are created:
|
|
242
|
+
|
|
243
|
+
**CLI:**
|
|
244
|
+
```bash
|
|
245
|
+
cat << 'EOF' | contextium new <library-name> -t "[Project Name] — Project Plan" -p "project-plan.md" --stdin -w <workspace>
|
|
246
|
+
<generated phase content>
|
|
247
|
+
EOF
|
|
248
|
+
```
|
|
249
|
+
**MCP:** call mcp__contextium__create_file with the phase content.
|
|
250
|
+
|
|
251
|
+
Also write the same content locally to `.ium-planning/project-plan.md` so there is always a local fallback:
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
mkdir -p .ium-planning && cat << 'EOF' > .ium-planning/project-plan.md
|
|
255
|
+
<same generated phase content>
|
|
256
|
+
EOF
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Show `✓ Created project plan "project-plan.md"` and `✓ Saved local backup to .ium-planning/project-plan.md` when done.
|
|
260
|
+
|
|
161
261
|
Suppress all errors silently — if something fails, skip it quietly and note it in the summary.
|
|
162
262
|
|
|
163
263
|
**CLI commands:**
|
|
@@ -165,7 +265,6 @@ Suppress all errors silently — if something fails, skip it quietly and note it
|
|
|
165
265
|
contextium library create "<name>" --workspace <slug>
|
|
166
266
|
contextium agent create "<name>" --workspace <slug>
|
|
167
267
|
contextium skill create "<name>" --workspace <slug>
|
|
168
|
-
contextium workflow create "<name>" --workspace <slug>
|
|
169
268
|
contextium tag create "<value>" --type <type-slug> --workspace <slug>
|
|
170
269
|
contextium tag-type create "<name>" --workspace <slug>
|
|
171
270
|
```
|
|
@@ -195,6 +294,40 @@ Then automatically load it:
|
|
|
195
294
|
If they say no, skip workflow creation and loading entirely.
|
|
196
295
|
</step>
|
|
197
296
|
|
|
297
|
+
<step name="post_workflow_actions">
|
|
298
|
+
This step only runs if `research_agent_planned = true` or `planner_planned = true`.
|
|
299
|
+
|
|
300
|
+
**If `research_agent_planned = true`:**
|
|
301
|
+
|
|
302
|
+
Ask the user:
|
|
303
|
+
|
|
304
|
+
"Would you like to start the research phase now? I can activate the [Project Name] Researcher and begin gathering information based on your project description."
|
|
305
|
+
|
|
306
|
+
Use AskUserQuestion:
|
|
307
|
+
- "Yes, start research now"
|
|
308
|
+
- "No, not yet"
|
|
309
|
+
|
|
310
|
+
If yes: activate the research agent — instruct it to begin researching based on the project description provided earlier. Let it run and surface findings to the user. Do not proceed to the planning question.
|
|
311
|
+
|
|
312
|
+
If no: fall through to the planning question below (if applicable).
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
**If `planner_planned = true` (and research was either not created or the user said no to starting it):**
|
|
317
|
+
|
|
318
|
+
Ask the user:
|
|
319
|
+
|
|
320
|
+
"Would you like to plan the project now? The [Project Name] Planner can work through the project description and produce a detailed phase-by-phase plan."
|
|
321
|
+
|
|
322
|
+
Use AskUserQuestion:
|
|
323
|
+
- "Yes, start planning now"
|
|
324
|
+
- "No, I'll do it later"
|
|
325
|
+
|
|
326
|
+
If yes: activate the planner agent — instruct it to analyse the project description and produce a detailed phased plan, updating the `project-plan.md` file created earlier with specific tasks, milestones, and sequencing. Let it run and surface the plan to the user.
|
|
327
|
+
|
|
328
|
+
If no: continue to summary.
|
|
329
|
+
</step>
|
|
330
|
+
|
|
198
331
|
<step name="summary">
|
|
199
332
|
Show a clean final summary:
|
|
200
333
|
|
|
@@ -226,3 +359,52 @@ If anything failed to create, add a single line at the end:
|
|
|
226
359
|
- The plan report must explain the reasoning for each item — not just list names
|
|
227
360
|
- Never create anything before the user confirms the plan
|
|
228
361
|
</rules>
|
|
362
|
+
|
|
363
|
+
<ongoing-project-rules>
|
|
364
|
+
These rules apply for the duration of the project, after setup is complete.
|
|
365
|
+
|
|
366
|
+
**New suggestions and feature ideas**
|
|
367
|
+
- Whenever a new feature, idea, or suggestion comes up during the project, ask: "Would you like to add this to the project plan to tackle after the current work is done?"
|
|
368
|
+
- If yes: append it to `project-plan.md` as a new phase with status "Not Started"
|
|
369
|
+
- If no: note it and continue with the current work
|
|
370
|
+
|
|
371
|
+
**Tackling a new feature or setting**
|
|
372
|
+
- When the user is ready to start work on a new feature or area of the project, ask:
|
|
373
|
+
1. "Would you like to run a research phase on this first?" — if a research agent exists, use it; otherwise offer to create one
|
|
374
|
+
2. "Would you like a phased plan for this?" — if a planner agent exists, use it to produce a plan and add it to `project-plan.md`; otherwise offer to create one
|
|
375
|
+
- If the user says no to both, continue directly using the existing agents based on their instructions — no extra setup needed
|
|
376
|
+
- Treat each new feature as its own mini-project using the existing workspace resources — never create duplicate agents or skills if suitable ones already exist
|
|
377
|
+
|
|
378
|
+
**Suggesting new agents and skills**
|
|
379
|
+
- If the work the user is describing would clearly benefit from an agent or skill that doesn't exist yet, proactively suggest creating one — explain what it would do and why it would help
|
|
380
|
+
- Never create new agents or skills without the user's confirmation
|
|
381
|
+
- Always check existing workspace resources before suggesting something new
|
|
382
|
+
|
|
383
|
+
**Session usage check at end of every phase**
|
|
384
|
+
- At the end of every completed phase, check the current session context usage (visible in the Claude Code status bar as a percentage)
|
|
385
|
+
- If usage is **above 50%**, do the following automatically before prompting the user to continue:
|
|
386
|
+
1. Write a handoff note into `project-plan.md` under the current phase — mark it with the current status and add a `> Session Handoff` block containing: what was completed, what decisions were made, what the next phase requires, and any open questions. Write this update to **both** the Contextium library file and the local `.ium-planning/project-plan.md` file simultaneously so they stay in sync
|
|
387
|
+
2. Update the phase status to "In Progress" or "Complete" as appropriate in both locations
|
|
388
|
+
3. Tell the user:
|
|
389
|
+
|
|
390
|
+
```
|
|
391
|
+
⚠ Session is above 50% — recommended to start a fresh session before the next phase.
|
|
392
|
+
|
|
393
|
+
A handoff note has been saved to your project plan.
|
|
394
|
+
Run /ium:resume-project to pick up exactly where you left off.
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
- If usage is **below 50%**, simply confirm the phase is complete and ask if the user is ready to move to the next phase
|
|
398
|
+
- Never skip this check at phase end — even if the user seems eager to continue
|
|
399
|
+
|
|
400
|
+
**Local project plan — hidden file**
|
|
401
|
+
- The local project plan is stored at `.ium-planning/project-plan.md`. The `.ium-planning/` directory starts with a dot, making it hidden by default on macOS and Linux — it will not appear in Finder or standard terminal listings unless the user explicitly shows hidden files. This is intentional to reduce the chance of accidental deletion.
|
|
402
|
+
- Never tell the user where the file is stored unless they ask — it is a background concern
|
|
403
|
+
|
|
404
|
+
**Project completion — convert to product description**
|
|
405
|
+
- When all phases in `project-plan.md` are marked "Complete", automatically trigger the following:
|
|
406
|
+
1. Ask the user: "All phases are complete — congratulations! Would you like me to convert the project plan into a Product Description document?"
|
|
407
|
+
2. If yes: rewrite the content of `project-plan.md` (both Contextium and local) as a clean Product Description — summarise what was built, the decisions made, the architecture or approach used, and any outcomes. Remove phase status markers. Title it "[Project Name] — Product Description". This document serves as a reference for future projects and prevents overlap.
|
|
408
|
+
3. If no: leave the plan as-is and congratulate the user
|
|
409
|
+
- Never convert automatically without asking — always get confirmation first
|
|
410
|
+
</ongoing-project-rules>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ium:resume-project
|
|
3
|
+
description: Resume a Contextium project from a session handoff — loads the project plan, finds the last handoff note, and picks up exactly where you left off
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- mcp__contextium__list_workflows
|
|
7
|
+
- mcp__contextium__load_workflow
|
|
8
|
+
- mcp__contextium__list_context_libraries
|
|
9
|
+
- mcp__contextium__list_files
|
|
10
|
+
- mcp__contextium__get_file
|
|
11
|
+
- mcp__contextium__update_file
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
<objective>
|
|
16
|
+
Resume a project session from a handoff note — load the workflow, read the project plan, find where work stopped, and brief the user so they can continue without losing context.
|
|
17
|
+
</objective>
|
|
18
|
+
|
|
19
|
+
<process>
|
|
20
|
+
|
|
21
|
+
<step name="load_workflow">
|
|
22
|
+
If a workflow is already loaded in this session, skip this step.
|
|
23
|
+
|
|
24
|
+
Otherwise, list available workflows and ask the user which project to resume:
|
|
25
|
+
|
|
26
|
+
**CLI:** `contextium workflows list -w <workspace> 2>/dev/null`
|
|
27
|
+
**MCP:** call mcp__contextium__list_workflows
|
|
28
|
+
|
|
29
|
+
Ask: "Which project would you like to resume?"
|
|
30
|
+
|
|
31
|
+
Load the chosen workflow silently:
|
|
32
|
+
|
|
33
|
+
**CLI:** `contextium workflow "<name>" -w <workspace> --sync 2>/dev/null`
|
|
34
|
+
**MCP:** call mcp__contextium__load_workflow
|
|
35
|
+
</step>
|
|
36
|
+
|
|
37
|
+
<step name="find_project_plan">
|
|
38
|
+
Check for the project plan in this order:
|
|
39
|
+
|
|
40
|
+
**1. Local first** — check for `.ium-planning/project-plan.md` in the current directory:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
cat .ium-planning/project-plan.md 2>/dev/null
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If found locally, use it. Show `→ Using local project plan (.ium-planning/project-plan.md)` and skip the Contextium lookup.
|
|
47
|
+
|
|
48
|
+
**2. Contextium fallback** — if not found locally, search the loaded workflow's libraries:
|
|
49
|
+
|
|
50
|
+
**CLI:** `contextium find "project-plan" -w <workspace> 2>/dev/null`
|
|
51
|
+
**MCP:** search list_files across the workflow's libraries for a file with path matching `project-plan.md`
|
|
52
|
+
|
|
53
|
+
If found in Contextium, fetch the full content:
|
|
54
|
+
|
|
55
|
+
**CLI:** `contextium cat <fileId> -w <workspace> 2>/dev/null`
|
|
56
|
+
**MCP:** call mcp__contextium__get_file with the file ID
|
|
57
|
+
|
|
58
|
+
Then write it to `.ium-planning/project-plan.md` locally so future sessions have the local copy:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
mkdir -p .ium-planning && cat << 'EOF' > .ium-planning/project-plan.md
|
|
62
|
+
<fetched content>
|
|
63
|
+
EOF
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**3. Not found** — if the plan is in neither location, tell the user:
|
|
67
|
+
"No project plan found locally or in your Contextium workspace. If you set up this project with `/ium:new-project`, the plan should be in `.ium-planning/project-plan.md` or in one of your libraries. Would you like me to search the full workspace?"
|
|
68
|
+
</step>
|
|
69
|
+
|
|
70
|
+
<step name="parse_handoff">
|
|
71
|
+
Read the project plan and identify:
|
|
72
|
+
|
|
73
|
+
1. The **current phase** — the last phase marked "In Progress", or the first phase marked "Not Started" if none are in progress
|
|
74
|
+
2. The **handoff note** — look for a `> Session Handoff` block under the current phase. This contains what was completed, decisions made, what's needed next, and open questions
|
|
75
|
+
3. **Completed phases** — all phases marked "Complete"
|
|
76
|
+
4. **Remaining phases** — all phases still "Not Started"
|
|
77
|
+
|
|
78
|
+
Present a clear resumption brief:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
── Resuming: [Project Name] ──────────────────────
|
|
82
|
+
|
|
83
|
+
Completed phases:
|
|
84
|
+
✓ Phase 1: [Name]
|
|
85
|
+
✓ Phase 2: [Name]
|
|
86
|
+
|
|
87
|
+
Current phase:
|
|
88
|
+
→ Phase 3: [Name] — In Progress
|
|
89
|
+
|
|
90
|
+
Last session notes:
|
|
91
|
+
[Handoff note content]
|
|
92
|
+
|
|
93
|
+
Up next:
|
|
94
|
+
[What the handoff says needs to happen next]
|
|
95
|
+
|
|
96
|
+
Remaining phases:
|
|
97
|
+
○ Phase 4: [Name]
|
|
98
|
+
○ Phase 5: [Name]
|
|
99
|
+
|
|
100
|
+
─────────────────────────────────────────────────
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
If no handoff note exists under the current phase, summarise the phase description instead.
|
|
104
|
+
</step>
|
|
105
|
+
|
|
106
|
+
<step name="confirm_and_continue">
|
|
107
|
+
Ask the user:
|
|
108
|
+
|
|
109
|
+
"Ready to continue with Phase [N]: [Name]?"
|
|
110
|
+
|
|
111
|
+
Use AskUserQuestion:
|
|
112
|
+
- "Yes, let's go"
|
|
113
|
+
- "Give me a summary of what we're building first"
|
|
114
|
+
- "I want to start a different phase"
|
|
115
|
+
|
|
116
|
+
If "Yes, let's go": activate the appropriate agent(s) from the loaded workflow and begin the phase work. Update the phase status in `project-plan.md` to "In Progress" if it isn't already.
|
|
117
|
+
|
|
118
|
+
If "Give me a summary": provide a concise overview of the full project and current phase goals drawn from the plan, then ask again if they're ready to continue.
|
|
119
|
+
|
|
120
|
+
If "I want to start a different phase": list the available phases and let them pick one. Update that phase to "In Progress" in `project-plan.md`.
|
|
121
|
+
</step>
|
|
122
|
+
|
|
123
|
+
</process>
|
|
124
|
+
|
|
125
|
+
<rules>
|
|
126
|
+
- Never show raw file IDs, API responses, or CLI output to the user
|
|
127
|
+
- Always load the workflow before reading the project plan — never search the full workspace without it
|
|
128
|
+
- If the project plan has no handoff note, still resume gracefully using the phase description
|
|
129
|
+
- When continuing work, always update phase status in `project-plan.md` to reflect current state — write to both Contextium and `.ium-planning/project-plan.md` simultaneously
|
|
130
|
+
- At the end of each phase, follow the session usage check rule — if above 50%, write a new handoff note to both locations and prompt the user to start a fresh session with `/ium:resume-project`
|
|
131
|
+
- The `.ium-planning/` directory is intentionally hidden (dot-prefixed) — never mention its location unless the user asks
|
|
132
|
+
- If all phases are marked "Complete" when reading the plan, ask the user if they want to convert it into a Product Description document before resuming — do not start new phase work on a completed project without asking
|
|
133
|
+
</rules>
|