@contextium/cli 1.0.23 → 1.0.24

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextium/cli",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Command-line tool for managing Contextium documentation, agents, skills, and workflows — pipe context to AI coding assistants",
5
5
  "keywords": [
6
6
  "contextium",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:contextium
3
- description: General behaviour rules for the Contextium MCP and CLI — scoping, lookup order, and workspace awareness
3
+ description: General behaviour rules for the Contextium MCP and CLI — scoping, lookup order, and workspace awareness. TRIGGER when user asks things like: "how does Contextium work", "what are the Contextium rules", "load Contextium conventions", "how should I use the MCP tools", "Contextium tool reference", "what's the Contextium data model", "how do libraries work in Contextium", "explain Contextium to me", "what's the difference between agents and skills in Contextium", "what are the Contextium MCP tools".
4
4
  ---
5
5
 
6
6
  # Contextium — General Behaviour Rules
@@ -126,6 +126,26 @@ When the Contextium MCP is connected or the CLI is active, **any time a new file
126
126
 
127
127
  This rule applies to both the `Write` tool and any CLI `echo`/`cat` file creation.
128
128
 
129
+ ### File Type Selection
130
+
131
+ When creating a file in Contextium, choose the right type based on the content:
132
+
133
+ | Content | fileType | When to use |
134
+ |---|---|---|
135
+ | Notes, docs, specs, runbooks, reference | *(none — standard markdown)* | Default for anything editable and ongoing |
136
+ | Meeting transcript | `meeting` | User wants to save a meeting record — paste or imported transcript content |
137
+ | Standalone decision document | `decision` | A significant decision warrants its own locked, standalone record (e.g. major architecture choice, vendor selection) |
138
+ | Project or initiative overview | `brief` | Defining scope, goals, stakeholders, and success criteria for a piece of work |
139
+
140
+ **Note on decisions:** The `decision` file type is for standalone locked documents — separate from the inline `## Decisions Log` entries in `project-state.md` (which remain the lightweight in-session log). Use `decision` files when a decision is significant enough to deserve its own permanent record that team members can reference directly.
141
+
142
+ **When creating a `meeting` file**, ask for or infer:
143
+ - `meetingDate` — the date the meeting took place
144
+ - `sourcePlatform` — one of: `google-meet`, `zoom`, `teams`, `webex`, `slack`, `other`
145
+ - `participants` — names of attendees (if mentioned or visible in the transcript)
146
+
147
+ Pass these as `metadata` in the `create_file` call. The content should be the raw transcript text — Contextium will process it with AI automatically.
148
+
129
149
  ## Silent Operation
130
150
 
131
151
  All tool calls and CLI commands must be completely silent — never show raw API responses, tool output, parameters, IDs, or intermediate results. Only surface the final answer or result.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:create
3
- description: Create an agent, skill, or workflow in your Contextium workspace interactively
3
+ description: Create an agent, skill, or workflow in your Contextium workspace interactively. TRIGGER when user says things like: "create an agent", "make a new agent", "build me an agent", "create a skill", "make a skill", "add a new skill", "build a workflow", "create a workflow", "make a new workflow", "I want a new agent", "I need a skill for X", "set up an agent that does X", "create a Contextium agent", "add an agent to my workspace", "build me a skill that does X", "I want to make a skill", "create something in Contextium", "make an agent that can do X".
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - AskUserQuestion
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:help
3
- description: Show all available Contextium /ium: commands with descriptions
3
+ description: Show all available Contextium /ium: commands with descriptions. TRIGGER when user says things like: "what can Contextium do", "show Contextium commands", "help with Contextium", "what are the ium commands", "Contextium help", "what Contextium commands are available", "list Contextium skills", "show me what I can do with Contextium", "what commands does Contextium have", "how do I use Contextium", "Contextium cheatsheet", "show me all the ium commands".
4
4
  allowed-tools: []
5
5
  ---
6
6
 
@@ -17,9 +17,12 @@ Output the following help reference directly — no tools needed:
17
17
  ╚══════════════════════════════════════════════════════════════╝
18
18
 
19
19
  GETTING STARTED
20
- /ium:scan-existing Scan an existing codebase and write analysis docs to
21
- Contextium — stack, architecture, conventions, concerns.
22
- Run this before /ium:new-project on existing projects.
20
+ /ium:map-existing Map an existing project with 4 parallel agents — code,
21
+ AI tools, docs, and a Contextium migration plan. Run
22
+ this first on any existing project.
23
+
24
+ /ium:scan-existing Scan codebase and write analysis docs to Contextium —
25
+ stack, architecture, conventions, concerns.
23
26
 
24
27
  /ium:new-project Set up a new Contextium project from scratch —
25
28
  auth, workspace, libraries, agents, skills, workflow
@@ -0,0 +1,523 @@
1
+ ---
2
+ name: ium:map-existing
3
+ description: Map an existing project comprehensively using 4 parallel agents — code structure, AI tools & MCP configs, knowledge & docs, and a Contextium migration plan. Identifies .ctx transcripts, Claude Desktop setup, and what should be moved into Contextium libraries. SUGGEST (proactively ask, don't auto-run) when the user implies they have existing work but hasn't mentioned Contextium — for example: "I've been working on this project", "I have an app I'm building", "let me show you my code", "I need help with my codebase", "I've got a project I want to work on", "I'm working on a React app", "I have this folder of code", "here's my project". In these cases ask: "Would you like me to scan your existing project? I can map your code, AI tools, and docs in parallel, then suggest the right Contextium libraries and agents for your workflow." — then wait for confirmation before running. TRIGGER when user says things like: "scan my existing project", "look at my existing files", "map my project", "map my folder", "analyse my current setup", "scan my folder and set up Contextium", "I have an existing project I want to use with Contextium", "convert my project to Contextium", "import my existing project", "look at what I've already built", "read my project and set it up", "onboard my existing codebase", "examine my project files", "what's in my project", "get Contextium set up from my existing code", "scan my repo", "map my codebase for Contextium", "I already have a project can you set up Contextium for it".
4
+ allowed-tools:
5
+ - Agent
6
+ - Bash
7
+ - Glob
8
+ - Grep
9
+ - Read
10
+ - AskUserQuestion
11
+ - mcp__contextium__list_workspaces
12
+ - mcp__contextium__list_context_libraries
13
+ - mcp__contextium__create_context_library
14
+ - mcp__contextium__create_file
15
+ - mcp__contextium__update_file
16
+ - mcp__contextium__list_files
17
+ - mcp__contextium__get_file
18
+ ---
19
+
20
+ <objective>
21
+ Map an existing development project across four domains in parallel — code & stack, AI tools & environment, knowledge & documentation, and Contextium migration planning. The output tells any agent exactly what exists, how the project is set up with AI tools, what context lives in .ctx transcript files, and what should be migrated into Contextium libraries. Faster and broader than /ium:scan-existing, designed specifically to feed /ium:new-project with a complete picture of the development environment.
22
+ </objective>
23
+
24
+ <mode-detection>
25
+ Run once at the start, silently:
26
+
27
+ ```bash
28
+ command -v contextium &>/dev/null && echo "cli" || echo "no-cli"
29
+ ```
30
+
31
+ - If `cli`: use CLI commands throughout.
32
+ - If `no-cli`: use MCP tools throughout.
33
+ - If neither: tell the user "Contextium doesn't appear to be installed." and stop.
34
+ </mode-detection>
35
+
36
+ <process>
37
+
38
+ <step name="check_auth">
39
+ **CLI only.** Run silently:
40
+ ```bash
41
+ contextium whoami 2>/dev/null | grep -E "Token:|Name:" || echo "unauthenticated"
42
+ ```
43
+ If unauthenticated or token expired, tell the user to run `contextium login` and stop.
44
+
45
+ MCP users are already authenticated — skip.
46
+ </step>
47
+
48
+ <step name="select_library">
49
+ Determine where to write the map documents.
50
+
51
+ If a workflow is already loaded in this session, check whether any of its libraries have an obvious "codebase", "map", or "analysis" purpose. If yes, suggest it.
52
+
53
+ If no workflow is loaded:
54
+
55
+ **CLI:** `contextium library list --workspace <slug> 2>/dev/null`
56
+ **MCP:** call mcp__contextium__list_context_libraries
57
+
58
+ Use AskUserQuestion:
59
+ - Present existing library names
60
+ - "Create a new library for this (recommended: '[Project] Map')"
61
+
62
+ If creating new: default name is "[Project Name] Map". Create it:
63
+
64
+ **CLI:** `contextium library create "<name>" --workspace <slug>`
65
+ **MCP:** call mcp__contextium__create_context_library
66
+
67
+ Store the target library ID as `target_library_id`.
68
+ </step>
69
+
70
+ <step name="check_existing">
71
+ List files in the target library. Look for: `project-map.md`, `stack.md`, `ai-tools.md`, `knowledge-map.md`, `migration-plan.md`.
72
+
73
+ If any exist, ask:
74
+
75
+ "I found existing map documents in this library. What would you like to do?"
76
+
77
+ Use AskUserQuestion:
78
+ - "Refresh all documents (overwrite)"
79
+ - "Update specific documents only"
80
+ - "Cancel"
81
+
82
+ If "Update specific": ask which ones to update. Only run the relevant agents.
83
+ If "Refresh all" or no existing docs: run all four agents.
84
+ </step>
85
+
86
+ <step name="orient">
87
+ Silently orient to the project root before launching agents:
88
+
89
+ ```bash
90
+ ls -la 2>/dev/null | head -50
91
+ ```
92
+
93
+ ```bash
94
+ ls package.json requirements.txt Cargo.toml go.mod pyproject.toml composer.json 2>/dev/null
95
+ ```
96
+
97
+ ```bash
98
+ find . -name ".claude" -o -name "CLAUDE.md" -o -name "*.ctx" -o -name "claude_desktop_config.json" 2>/dev/null | grep -v node_modules | head -20
99
+ ```
100
+
101
+ Capture the working directory path:
102
+ ```bash
103
+ pwd
104
+ ```
105
+
106
+ Do not show this output. Use it to confirm the project root and check whether AI tool configs exist before launching agents.
107
+
108
+ Tell the user:
109
+
110
+ ```
111
+ Mapping project — spawning 4 parallel agents...
112
+
113
+ 4 mapper agents launched
114
+ ├── Map code & tech stack
115
+ │ └── Running in the background
116
+ ├── Map AI tools & environment
117
+ │ └── Running in the background
118
+ ├── Map knowledge & documentation
119
+ │ └── Running in the background
120
+ └── Map Contextium migration plan
121
+ └── Running in the background
122
+
123
+ 4 mapper agents running in parallel. I'll notify you when they complete.
124
+
125
+ — Agent 1 → project-map.md + stack.md (code structure & tech stack)
126
+ — Agent 2 → ai-tools.md (AI tools, MCP, .ctx transcripts)
127
+ — Agent 3 → knowledge-map.md (docs, READMEs, planning files)
128
+ — Agent 4 → migration-plan.md (what to migrate to Contextium)
129
+ ```
130
+
131
+ Now launch all four agents in a single message with `run_in_background: true`.
132
+ </step>
133
+
134
+ <step name="agent_1_code_stack">
135
+ Launch Agent 1 with this prompt (background):
136
+
137
+ ```
138
+ You are mapping the code structure and tech stack of a development project.
139
+ Working directory: [pwd from orient step]
140
+
141
+ Run these commands and analyse the output:
142
+
143
+ 1. Full file tree (excluding build artifacts):
144
+ find . -type f -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/dist/*" -not -path "*/.next/*" -not -path "*/build/*" -not -path "*/__pycache__/*" | sort | head -150
145
+
146
+ 2. Dependency manifests:
147
+ cat package.json 2>/dev/null
148
+ cat requirements.txt pyproject.toml 2>/dev/null
149
+ cat Cargo.toml go.mod 2>/dev/null
150
+ cat composer.json 2>/dev/null
151
+
152
+ 3. Config files:
153
+ cat tsconfig.json 2>/dev/null
154
+ ls *.config.* 2>/dev/null
155
+ cat .nvmrc .node-version .python-version 2>/dev/null
156
+
157
+ 4. Entry points:
158
+ ls src/index.* src/main.* src/app.* src/server.* app/page.* app/layout.* 2>/dev/null
159
+ head -60 $(ls src/index.* src/main.* src/app.* 2>/dev/null | head -2) 2>/dev/null
160
+
161
+ 5. Scripts:
162
+ cat package.json 2>/dev/null | grep -A 20 '"scripts"'
163
+
164
+ 6. Environment variables in use:
165
+ grep -rn "process\.env\." src/ app/ lib/ 2>/dev/null | grep -v node_modules | head -40
166
+ cat .env.example .env.sample 2>/dev/null
167
+
168
+ Return your findings as two markdown documents separated by "---DOCUMENT-SPLIT---":
169
+
170
+ DOCUMENT 1: project-map.md
171
+ # Project Map
172
+ **Analysis Date:** [today's date]
173
+
174
+ ## Project Type
175
+ [web app / API / CLI / library / monorepo / desktop app / etc — with evidence]
176
+
177
+ ## Directory Structure
178
+ [annotated tree of top-level folders with purpose of each]
179
+
180
+ ## Key File Locations
181
+ | Purpose | Path |
182
+ |---------|------|
183
+ | Entry point | [path] |
184
+ | Config | [path] |
185
+ | [etc] | [etc] |
186
+
187
+ ## Application Type
188
+ [frontend / backend / full-stack / CLI / etc — what it builds and how]
189
+
190
+ ## How to Run
191
+ [dev command, build command, test command — from package.json scripts or Makefile]
192
+
193
+ ## Where to Add New Code
194
+ ["New routes go in X, follow pattern in Y" — specific guidance]
195
+
196
+ ---DOCUMENT-SPLIT---
197
+
198
+ DOCUMENT 2: stack.md
199
+ # Tech Stack
200
+ **Analysis Date:** [today's date]
201
+
202
+ ## Runtime & Language
203
+ [language, version, runtime — from manifest or .nvmrc]
204
+
205
+ ## Frameworks & Libraries
206
+ [list key dependencies with versions and purpose — from package.json or equivalent]
207
+
208
+ ## Build & Tooling
209
+ [bundler, linter, formatter, type checker, test runner — with config file paths]
210
+
211
+ ## External Services & Integrations
212
+ [APIs, databases, auth providers, storage, email — with env var names from .env.example]
213
+
214
+ ## Platform & Deployment
215
+ [inferred from Dockerfile, vercel.json, railway.toml, etc. — or "unknown" if no config found]
216
+
217
+ Every item must reference the actual file it was found in.
218
+ ```
219
+ </step>
220
+
221
+ <step name="agent_2_ai_tools">
222
+ Launch Agent 2 with this prompt (background):
223
+
224
+ ```
225
+ You are mapping the AI tool ecosystem and development environment of a project.
226
+ Working directory: [pwd from orient step]
227
+
228
+ Run these commands and analyse the output:
229
+
230
+ 1. Find all Claude/AI config files:
231
+ find . -name "CLAUDE.md" -o -name ".claude" -type d 2>/dev/null | grep -v node_modules
232
+ find . -name "*.ctx" 2>/dev/null | grep -v node_modules | head -30
233
+ find . -name ".cursorrules" -o -name ".cursorignore" -o -name "cursor.json" 2>/dev/null
234
+ find . -name ".copilot*" -o -name "copilot-instructions.md" 2>/dev/null
235
+ find . -name "*.mcp.json" -o -name "mcp.json" 2>/dev/null | grep -v node_modules
236
+
237
+ 2. Read Claude Code config (if exists):
238
+ cat CLAUDE.md 2>/dev/null
239
+ ls .claude/ 2>/dev/null
240
+ cat .claude/settings.json 2>/dev/null
241
+ ls .claude/commands/ 2>/dev/null
242
+
243
+ 3. Claude Desktop config:
244
+ cat ~/Library/Application\ Support/Claude/claude_desktop_config.json 2>/dev/null
245
+ cat ~/.config/claude/claude_desktop_config.json 2>/dev/null
246
+
247
+ 4. MCP server configs in the project:
248
+ find . -name "*.mcp*" -o -name "mcp-config*" 2>/dev/null | grep -v node_modules
249
+ grep -rn "mcp\|modelcontextprotocol\|@modelcontextprotocol" package.json packages/*/package.json 2>/dev/null | head -20
250
+
251
+ 5. Inventory .ctx transcript files:
252
+ find . -name "*.ctx" 2>/dev/null | grep -v node_modules
253
+ For each .ctx file found, read the first 20 lines to understand its topic.
254
+
255
+ 6. Other AI tooling:
256
+ find . -name ".aider*" -o -name "aider.conf*" 2>/dev/null
257
+ find . -name ".continue" -type d 2>/dev/null
258
+ grep -rn "openai\|anthropic\|gemini\|mistral\|cohere" package.json 2>/dev/null | grep -v node_modules | head -10
259
+
260
+ Return your findings as a single markdown document:
261
+
262
+ # AI Tools & Environment
263
+ **Analysis Date:** [today's date]
264
+
265
+ ## Claude Code Setup
266
+ [CLAUDE.md exists? What does it configure? .claude/ directory contents? Custom commands?]
267
+
268
+ ## Claude Desktop
269
+ [MCP servers configured in claude_desktop_config.json — list each server name, command, and purpose]
270
+
271
+ ## MCP Servers in Project
272
+ [any MCP server packages or configs found in the project itself]
273
+
274
+ ## Cursor / Copilot / Other AI Tools
275
+ [any other AI coding tool configs found — with file paths]
276
+
277
+ ## .ctx Transcript Files
278
+ | File | Topic (from first 20 lines) | Potential Contextium Value |
279
+ |------|----------------------------|---------------------------|
280
+ | [path] | [topic] | [high/medium/low — why] |
281
+
282
+ If no .ctx files found, note "No .ctx transcript files found in this project."
283
+
284
+ ## AI-Related Dependencies
285
+ [npm/pip packages that interact with AI APIs — with versions]
286
+
287
+ ## Environment Variables (AI-related)
288
+ [any AI API key env vars found in .env.example or grep results]
289
+
290
+ Every finding must reference the exact file path it came from.
291
+ ```
292
+ </step>
293
+
294
+ <step name="agent_3_knowledge">
295
+ Launch Agent 3 with this prompt (background):
296
+
297
+ ```
298
+ You are mapping the knowledge and documentation landscape of a development project.
299
+ Working directory: [pwd from orient step]
300
+
301
+ Run these commands and analyse the output:
302
+
303
+ 1. Find all documentation files:
304
+ find . -name "README*" -o -name "CONTRIBUTING*" -o -name "CHANGELOG*" -o -name "*.md" 2>/dev/null | grep -v node_modules | grep -v dist | grep -v ".next" | head -50
305
+
306
+ 2. Find planning and spec files:
307
+ find . -name "ROADMAP*" -o -name "PLAN*" -o -name "SPEC*" -o -name "TODO*" -o -name "*.todo" 2>/dev/null | grep -v node_modules | head -20
308
+ find . -path "*/.planning/*" -type f 2>/dev/null | head -30
309
+ find . -name "*.md" -path "*/docs/*" 2>/dev/null | grep -v node_modules | head -30
310
+
311
+ 3. Read key documents (summarise, don't quote in full):
312
+ cat README.md 2>/dev/null | head -100
313
+ cat CONTRIBUTING.md 2>/dev/null | head -60
314
+ cat CHANGELOG.md 2>/dev/null | head -40
315
+
316
+ 4. Find inline documentation:
317
+ grep -rn "\/\*\*" --include="*.ts" --include="*.tsx" --include="*.js" . 2>/dev/null | grep -v node_modules | wc -l
318
+ grep -rn '"""' --include="*.py" . 2>/dev/null | grep -v node_modules | wc -l
319
+
320
+ 5. Find undocumented surface area:
321
+ grep -rn "export (function|class|const|default)" --include="*.ts" --include="*.tsx" . 2>/dev/null | grep -v node_modules | grep -v "\/\*\*" | head -30
322
+
323
+ 6. Find decision records or ADRs:
324
+ find . -name "*.adr*" -o -path "*decisions*" -o -path "*adr*" 2>/dev/null | grep -v node_modules | head -10
325
+
326
+ Return your findings as a single markdown document:
327
+
328
+ # Knowledge Map
329
+ **Analysis Date:** [today's date]
330
+
331
+ ## Documentation Coverage
332
+ [summary of what IS documented — README quality, inline docs count, contributing guide exists?]
333
+
334
+ ## Key Documents Found
335
+ | Document | Path | Summary |
336
+ |----------|------|---------|
337
+ | README | [path] | [1-line summary of what it covers] |
338
+ | [etc] | [path] | [summary] |
339
+
340
+ ## Planning & Specs
341
+ [any roadmaps, plans, specs, or todo files found — with paths and brief descriptions]
342
+
343
+ ## Documentation Gaps
344
+ [what is clearly not documented — undocumented exports, missing architectural docs, no CONTRIBUTING guide, etc.]
345
+
346
+ ## Architecture Decision Records
347
+ [any ADRs or decision records found — paths and topics]
348
+
349
+ ## What Would Benefit from Contextium Libraries
350
+ [specific documents and knowledge that would be most valuable to store in Contextium for AI agent access — be specific about why each would be valuable]
351
+ ```
352
+ </step>
353
+
354
+ <step name="agent_4_migration">
355
+ Launch Agent 4 with this prompt (background):
356
+
357
+ ```
358
+ You are planning a Contextium migration strategy for an existing development project.
359
+ Working directory: [pwd from orient step]
360
+
361
+ Your job is to recommend what should be created in Contextium (libraries, agents, skills)
362
+ and what existing files should be migrated into those libraries.
363
+
364
+ Run these commands to gather context:
365
+
366
+ 1. Get a broad picture of the project:
367
+ ls -la 2>/dev/null | head -40
368
+ cat package.json 2>/dev/null | head -30
369
+ cat README.md 2>/dev/null | head -60
370
+
371
+ 2. Find all documentation and knowledge files:
372
+ find . -name "*.md" -not -path "*/node_modules/*" -not -path "*/dist/*" | head -40
373
+ find . -name "*.ctx" 2>/dev/null | grep -v node_modules
374
+ find . -name "*.txt" -not -path "*/node_modules/*" | grep -iv "license\|changelog" | head -20
375
+
376
+ 3. Check for existing Contextium setup:
377
+ cat .contextium* 2>/dev/null
378
+ find . -name "contextium*" 2>/dev/null | grep -v node_modules | head -10
379
+
380
+ 4. Understand the project's domain and team:
381
+ cat CONTRIBUTING.md 2>/dev/null | head -40
382
+ cat .github/CODEOWNERS 2>/dev/null
383
+ git log --oneline -20 2>/dev/null
384
+
385
+ Return your findings as a single markdown document:
386
+
387
+ # Contextium Migration Plan
388
+ **Analysis Date:** [today's date]
389
+
390
+ ## Recommended Library Structure
391
+ For each library, explain what goes in it and why:
392
+
393
+ ### Library 1: [Suggested Name]
394
+ **Purpose:** [what this library stores]
395
+ **Files to migrate:**
396
+ - `[local file path]` → reason this belongs here
397
+ - [etc]
398
+
399
+ ### Library 2: [Suggested Name]
400
+ [etc]
401
+
402
+ ## .ctx Transcripts to Harvest
403
+ [list any .ctx files that contain context worth extracting into Contextium library entries]
404
+ | Transcript | Suggested Library | What to Extract |
405
+ |-----------|------------------|-----------------|
406
+ | [path] | [library name] | [specific knowledge to extract] |
407
+
408
+ If no .ctx files found: note this section is not applicable.
409
+
410
+ ## Suggested Agents
411
+ For each agent, explain what it would do and what library context it would use:
412
+
413
+ | Agent Name | Purpose | Libraries It Would Use |
414
+ |-----------|---------|----------------------|
415
+ | [name] | [what it does for this project] | [library names] |
416
+
417
+ ## Suggested Skills
418
+ Skills are reusable prompt templates for common tasks in this project:
419
+
420
+ | Skill Name | Trigger | What It Does |
421
+ |-----------|---------|-------------|
422
+ | [name] | "when user wants to [X]" | [what it produces] |
423
+
424
+ ## Priority Order
425
+ [1-2-3 priority for what to set up first in Contextium, with reasoning]
426
+
427
+ ## What NOT to Migrate
428
+ [files that should stay local only — build artifacts, secrets, auto-generated files, etc.]
429
+ ```
430
+ </step>
431
+
432
+ <step name="wait_and_synthesize">
433
+ Wait for all 4 background agents to complete.
434
+
435
+ As each completes, update the user:
436
+ ```
437
+ ✓ Agent 1 — code & stack complete
438
+ ✓ Agent 2 — AI tools complete
439
+ ✓ Agent 3 — knowledge complete
440
+ ✓ Agent 4 — migration plan complete
441
+
442
+ Writing documents to Contextium...
443
+ ```
444
+
445
+ Parse the output from Agent 1 — it returns two documents separated by `---DOCUMENT-SPLIT---`. Split them into `project-map.md` content and `stack.md` content.
446
+
447
+ Write all five documents to Contextium:
448
+
449
+ For each document, check if it already exists in the library:
450
+ - If exists and refreshing: use update_file
451
+ - If new: use create_file
452
+
453
+ **CLI:**
454
+ ```bash
455
+ cat << 'EOF' | contextium new <library-name> -t "<title>" -p "<filename>" --stdin -w <workspace>
456
+ [document content]
457
+ EOF
458
+ ```
459
+
460
+ **MCP:** call mcp__contextium__create_file or mcp__contextium__update_file with:
461
+ - `libraryId`: target_library_id
462
+ - `path`: filename (e.g., `project-map.md`)
463
+ - `title`: document title
464
+ - `content`: full document content
465
+
466
+ Write in this order:
467
+ 1. `project-map.md` — from Agent 1
468
+ 2. `stack.md` — from Agent 1
469
+ 3. `ai-tools.md` — from Agent 2
470
+ 4. `knowledge-map.md` — from Agent 3
471
+ 5. `migration-plan.md` — from Agent 4
472
+ </step>
473
+
474
+ <step name="summary">
475
+ Show the final summary:
476
+
477
+ ```
478
+ ✓ Project map complete
479
+
480
+ Documents written to "<library name>":
481
+ ✓ project-map.md — structure, entry points, how to run
482
+ ✓ stack.md — tech stack, dependencies, integrations
483
+ ✓ ai-tools.md — Claude setup, MCP servers, .ctx transcripts
484
+ ✓ knowledge-map.md — docs, planning files, coverage gaps
485
+ ✓ migration-plan.md — libraries, agents, and skills to create
486
+
487
+ ```
488
+
489
+ Then summarise the most important finding from each agent in 1 line each, for example:
490
+ ```
491
+ Key findings:
492
+ • Stack: Next.js 14 + TypeScript API, deployed on Azure
493
+ • AI Tools: Claude Code configured, 3 MCP servers in Desktop, 7 .ctx transcripts found
494
+ • Knowledge: README exists but no architecture docs or ADRs
495
+ • Migration: 2 libraries recommended, 4 agents suggested
496
+ ```
497
+
498
+ Then ask:
499
+
500
+ "Would you like to set up Contextium for this project now? Running /ium:new-project will use these documents to skip the discovery phase and go straight to creating libraries, agents, and skills based on the migration plan."
501
+
502
+ Use AskUserQuestion:
503
+ - "Yes, run /ium:new-project now"
504
+ - "Show me the migration plan first"
505
+ - "No, I'll do it later"
506
+
507
+ If "Show me the migration plan first": read back the migration-plan.md content from Contextium, then re-ask.
508
+ If "Yes": proceed with /ium:new-project flow. Documents are in the library and will be found automatically.
509
+ </step>
510
+
511
+ </process>
512
+
513
+ <rules>
514
+ - Never show raw bash output to the user — only progress indicators, key findings, and final summary
515
+ - Never read `.env` file contents — only `.env.example` or `.env.sample`
516
+ - Every finding in every document must reference a specific file path — no vague summaries
517
+ - If an agent finds nothing in its domain, it should note "No [X] found in this project" rather than inventing findings
518
+ - Documents are written for future AI agents to consume — be specific, prescriptive, and grounded in actual file paths
519
+ - When refreshing, always use update_file not create_file to preserve file history in Contextium
520
+ - Only one set of map documents should exist per library — never create duplicates
521
+ - The 4 agents must be launched in a single message to run in parallel — never launch them one at a time
522
+ - .ctx files should be catalogued but never have their full contents included in documents — summarise topic only
523
+ </rules>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:marketplace
3
- description: Browse, install, or publish skills, agents, and MCP servers on the Contextium Marketplace
3
+ description: Browse, install, or publish skills, agents, and MCP servers on the Contextium Marketplace. TRIGGER when user says things like: "browse the marketplace", "check the Contextium marketplace", "find skills in the marketplace", "install a skill from marketplace", "get more skills", "what skills are available", "install an agent from marketplace", "find MCP servers in marketplace", "publish my skill", "share my agent", "upload my skill to marketplace", "what's in the marketplace", "download a skill", "get a pre-built agent", "find community skills", "are there any Contextium skills I can install".
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - mcp__contextium__search_marketplace
package/skills/ium/new.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:new
3
- description: Create a new file in a Contextium context library with guided prompts — always includes full content
3
+ description: Create a new file in a Contextium context library with guided prompts — always includes full content. TRIGGER when user says things like: "add a document to Contextium", "create a new file in my library", "add a file to Contextium", "write a new doc to my library", "add something to my context library", "create a new Contextium document", "add this to Contextium", "save this to my library", "put this in Contextium", "create a new entry in my library", "add notes to Contextium", "write a doc to Contextium", "I want to add a document", "save this information to Contextium", "create a reference document in Contextium".
4
4
  allowed-tools:
5
5
  - Bash
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
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
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. TRIGGER when user says things like: "resume my project", "continue where I left off", "pick up from last session", "what was I working on", "restore my context", "continue my Contextium project", "where did I leave off", "resume work", "load my last session", "what were we doing", "get back to my project", "I'm back let's continue", "pick up where we left off", "reload my project state", "what's next in my project", "carry on from yesterday", "continue from the handoff".
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - mcp__contextium__list_workflows
package/skills/ium/run.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:run
3
- description: Run exact Contextium CLI commands non-interactively
3
+ description: Run exact Contextium CLI commands non-interactively. TRIGGER when user says things like: "run a contextium command", "execute contextium", "run contextium CLI", "run this contextium command: [command]", "run contextium library list", "run contextium agent create", "execute a contextium CLI command". Do NOT trigger for natural language Contextium tasks — only when the user wants to run a specific raw CLI command.
4
4
  allowed-tools:
5
5
  - Bash
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:scan-existing
3
- description: Scan an existing codebase and write analysis documents to a Contextium context library — tech stack, architecture, structure, conventions, and concerns. Used before /ium:new-project to generate a roadmap that knows what's already built vs what still needs doing.
3
+ description: Scan an existing codebase and write analysis documents to a Contextium context library — tech stack, architecture, structure, conventions, and concerns. Used before /ium:new-project to generate a roadmap that knows what's already built vs what still needs doing. TRIGGER when user says things like: "scan my codebase", "analyse my code", "document my code structure", "write up my architecture", "create docs for my codebase", "deep scan my code", "analyse my tech stack", "write down what my code does", "document my conventions", "map my code architecture", "record my codebase for AI context", "capture my codebase in Contextium". NOTE: prefer /ium:map-existing if the user wants a broader scan including AI tools, docs, and a migration plan — use this skill for code-only deep scans.
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - Glob
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:search
3
- description: Search across Contextium workspace documentation and surface matching files
3
+ description: Search across Contextium workspace documentation and surface matching files. TRIGGER when user says things like: "search Contextium", "find docs about X in Contextium", "look up X in my library", "search my Contextium library", "find information about X in Contextium", "what does my Contextium say about X", "search my workspace docs", "find the file about X", "look for X in Contextium", "do I have anything in Contextium about X", "find my notes on X", "search my context libraries", "find that document about X", "is there anything in Contextium about X".
4
4
  allowed-tools:
5
5
  - Bash
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:status
3
- description: Health dashboard — show auth status, current workspace, cache state, and available resources
3
+ description: Health dashboard — show auth status, current workspace, cache state, and available resources. TRIGGER when user says things like: "check Contextium status", "is Contextium working", "am I logged in to Contextium", "check my Contextium auth", "what workspace am I in", "show my Contextium setup", "Contextium health check", "what's my current workspace", "check my connection to Contextium", "is my Contextium configured correctly", "show Contextium info", "what resources do I have in Contextium", "check my cache", "is Contextium connected", "what libraries do I have", "show me my Contextium workspace".
4
4
  allowed-tools:
5
5
  - Bash
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:sync
3
- description: Refresh the local Contextium cache from the current workspace
3
+ description: Refresh the local Contextium cache from the current workspace. TRIGGER when user says things like: "sync Contextium", "refresh my Contextium cache", "pull the latest from Contextium", "update my local cache", "resync Contextium", "reload my Contextium data", "my Contextium data is stale", "refresh Contextium", "get the latest from my workspace", "sync my libraries", "reload the cache", "Contextium seems out of date", "refresh my workspace data", "pull down my Contextium content", "update my context from Contextium".
4
4
  allowed-tools:
5
5
  - Bash
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:update
3
- description: Update Contextium CLI and MCP server to latest versions
3
+ description: Update Contextium CLI and MCP server to latest versions. TRIGGER when user says things like: "update Contextium", "upgrade Contextium", "install the latest Contextium", "get the latest version of Contextium", "update the Contextium CLI", "update the MCP server", "upgrade the MCP", "is Contextium up to date", "check for Contextium updates", "install latest Contextium version", "update my Contextium install", "upgrade my CLI", "get the new Contextium features".
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - AskUserQuestion
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:workflow
3
- description: Load a Contextium workflow and sync its resources into context — bundles agents, skills, and libraries for a project
3
+ description: Load a Contextium workflow and sync its resources into context — bundles agents, skills, and libraries for a project. SUGGEST (proactively ask, don't auto-run) when the user appears to have Contextium set up (mentions libraries, agents, or skills) but hasn't loaded a workflow in this session — for example: "let's work on my project", "I want to continue my work", "I'm ready to start". In these cases ask: "Do you have a Contextium workflow for this project? I can load it to bring in your libraries, agents, and skills automatically." — then wait for confirmation. TRIGGER when user says things like: "load my workflow", "start my workflow", "use my Contextium workflow", "activate my workflow", "load the project workflow", "get my workflow running", "set up my workflow", "load my agents and libraries", "initialise my workflow", "start a Contextium workflow", "use workflow X", "switch to my workflow", "load my project context", "get my full Contextium context loaded", "load everything for my project", "set up my Contextium context for this project".
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - mcp__contextium__load_workflow
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ium:workspace
3
- description: Switch Contextium workspace — saves a handoff note to the current workspace, switches, checks for a handoff note in the new workspace, and syncs
3
+ description: Switch Contextium workspace — saves a handoff note to the current workspace, switches, checks for a handoff note in the new workspace, and syncs. TRIGGER when user says things like: "switch workspace", "change workspace", "go to another workspace", "switch to a different workspace", "use workspace X", "change my Contextium workspace", "I want to work in a different workspace", "switch to my other workspace", "go to workspace X", "move to a different workspace", "I need to switch projects in Contextium", "change to workspace X", "use a different Contextium account", "log into a different workspace", "swap workspaces".
4
4
  allowed-tools:
5
5
  - Bash
6
6
  - AskUserQuestion