@contextium/cli 1.0.21 → 1.0.22

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.
@@ -27,7 +27,7 @@ export const librariesCommand = new Command('libraries')
27
27
  // Get all context libraries in workspace
28
28
  const { data: projectsData } = await client.get(`/workspaces/${workspace.id}/projects`);
29
29
  const projects = projectsData.data || projectsData;
30
- const activeProjects = projects.filter((p) => !p.deletedAt);
30
+ const activeProjects = projects.filter((p) => !p.deletedAt && !p.isSystem);
31
31
  if (activeProjects.length === 0) {
32
32
  spinner.stop();
33
33
  console.log(chalk.yellow(`\nNo context libraries found in workspace '${workspace.name}'`));
@@ -1 +1 @@
1
- {"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/commands/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAE7C,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC;KACrD,WAAW,CAAC,mEAAmE,CAAC;KAChF,cAAc,CAAC,6BAA6B,EAAE,wBAAwB,CAAC;KACvE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACxB,MAAM,OAAO,GAAG,GAAG,CAAC,8BAA8B,CAAC,CAAC,KAAK,EAAE,CAAA;IAE3D,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,EAAE,CAAA;QACjC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;QAE5D,oDAAoD;QACpD,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC,GA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O,CAAC,IAAI,EAAE,CAAC,EAC/B,KAAK,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,SAAS,IAAI,QAAQ,GAAG,CAAC,CAChD,CAAA;YACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;YACpD,OAAO,CAAC,GAAG,EAAE,CAAA;QACf,CAAC;IACH,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,qCAAqC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;QAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"claude-permissions.d.ts","sourceRoot":"","sources":["../../src/lib/claude-permissions.ts"],"names":[],"mappings":"AAWA,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAInE;AAED,wBAAsB,4BAA4B,CAAC,KAAK,GAAE,QAAQ,GAAG,SAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAQ3G;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBpF;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkCvD;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAwB3D"}
1
+ {"version":3,"file":"claude-permissions.d.ts","sourceRoot":"","sources":["../../src/lib/claude-permissions.ts"],"names":[],"mappings":"AAWA,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAInE;AAED,wBAAsB,4BAA4B,CAAC,KAAK,GAAE,QAAQ,GAAG,SAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAQ3G;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBpF;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkCvD;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAsB3D"}
@@ -92,9 +92,7 @@ export async function installStatuslineHook() {
92
92
  if (error.code !== 'ENOENT')
93
93
  throw error;
94
94
  }
95
- if (!settings.statusLine) {
96
- settings.statusLine = { type: 'command', command: `node "${statuslineDestPath}"` };
97
- await fs.writeFile(settingsPath, JSON.stringify(settings, null, 2) + '\n', 'utf-8');
98
- }
95
+ settings.statusLine = { type: 'command', command: `node "${statuslineDestPath}"` };
96
+ await fs.writeFile(settingsPath, JSON.stringify(settings, null, 2) + '\n', 'utf-8');
99
97
  }
100
98
  //# sourceMappingURL=claude-permissions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-permissions.js","sourceRoot":"","sources":["../../src/lib/claude-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAA;AAC5B,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AAEnC,MAAM,UAAU,GAAG,mBAAmB,CAAA;AACtC,MAAM,aAAa,GAAG,qBAAqB,CAAA;AAC3C,MAAM,mBAAmB,GAAG,mBAAmB,CAAA;AAC/C,oEAAoE;AACpE,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;AAElG,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,OAAO,KAAK,KAAK,QAAQ;QACvB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,C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AC,IAAI,KAAK,QAAQ;YAAE,MAAM,KAAK,CAAA;IAC1C,CAAC;IAED,QAAQ,CAAC,UAAU,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,kBAAkB,GAAG,EAAE,CAAA;IAClF,MAAM,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC,CAAA;AACrF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextium/cli",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
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,93 +1,158 @@
1
1
  ---
2
2
  name: ium:contextium
3
- description: Contextium CLI command reference exact syntax and flags for all commands. Load this at session start when working with the Contextium CLI.
4
- allowed-tools:
5
- - Bash(contextium *)
3
+ description: General behaviour rules for the Contextium MCP and CLI scoping, lookup order, and workspace awareness
6
4
  ---
7
5
 
8
- # Contextium CLI Reference
9
-
10
- Use the exact commands and flags shown here. Do not guess command names or flags.
11
-
12
- ## Core Rules
13
- - Workspace-scoped commands must always include `-w <workspace-name-or-slug>`. Never omit it.
14
- - **Never run `contextium workflow` without first having a known `-w` value.** If workspace is unknown, run `contextium whoami` first to extract it — do not guess or omit it.
15
- - Use `workspaces` (plural), `libraries` (plural), and grouped subcommands like `agents list`.
16
- - Load workflows with `contextium workflow "<name>" -w <workspace>`.
17
-
18
- ## Command Map
19
-
20
- | Command | What it does | Example |
21
- |---|---|---|
22
- | `contextium login` | Sign in with Entra auth. | `contextium login` |
23
- | `contextium logout` | Clear local auth token. | `contextium logout` |
24
- | `contextium whoami` | Show account + token status. | `contextium whoami` |
25
- | `contextium init --api-key <key> -w <ws>` | Initialize `.contextiumrc`. | `contextium init --api-key $CTX_KEY -w cloudvoice` |
26
- | `contextium setup-claude [--global\|--project]` | Configure Claude Code permission + slash commands. | `contextium setup-claude --project` |
27
- | `contextium workspaces` | List accessible workspaces. | `contextium workspaces` |
28
- | `contextium libraries -w <ws>` | List context libraries in workspace. | `contextium libraries -w cloudvoice` |
29
- | `contextium files <library> -w <ws>` | List files in a library. | `contextium files "02-retention-intel" -w cloudvoice` |
30
- | `contextium structure <library> -w <ws>` | Show folder/file tree in a library. | `contextium structure "Knowledgebase" -w cloudvoice` |
31
- | `contextium find <name> -w <ws>` | Find files by filename. | `contextium find "retention" -w cloudvoice` |
32
- | `contextium cat --all -w <ws>` | Print workspace file contents. | `contextium cat --all -w cloudvoice` |
33
- | `contextium cat "<file>" -w <ws>` | Print specific file content. | `contextium cat "Q2 Save Offers" -w cloudvoice --no-cache` |
34
- | `contextium search "<query>" -w <ws>` | Full-text search docs. | `contextium search "churn" -w cloudvoice --limit 10` |
35
- | `contextium sync -w <ws>` | Refresh local cache from workspace. | `contextium sync -w cloudvoice` |
36
- | `contextium status -w <ws>` | Show cache/sync status. | `contextium status -w cloudvoice` |
37
- | `contextium create-library -w <ws> -n <name>` | Create context library. | `contextium create-library -w cloudvoice -n "06-playbooks"` |
38
- | `contextium update-library <library> -w <ws>` | Rename/update library metadata. | `contextium update-library "06-playbooks" -w cloudvoice -d "Sales playbooks"` |
39
- | `contextium new <library> -t <title> -p <path> -c <content> -w <ws>` | Create a file in library. | `contextium new "06-playbooks" -t "Winback" -p winback.md -c "# Winback" -w cloudvoice` |
40
- | `contextium edit <fileId> -c <content> [-m <msg>] [--version]` | Update file content/metadata. | `contextium edit <fileId> -c "# Updated" -m "refresh" --version` |
41
- | `contextium delete <fileId> --confirm` | Soft-delete a file. | `contextium delete <fileId> --confirm` |
42
- | `contextium versions <fileId>` | Show file version history. | `contextium versions <fileId>` |
43
- | `contextium agents list -w <ws>` | List agents. | `contextium agents list -w cloudvoice` |
44
- | `contextium agents create -w <ws> -n <name>` | Create agent. | `contextium agents create -w cloudvoice -n "Retention Agent"` |
45
- | `contextium agents update -w <ws> -a <agent> ...` | Update agent fields. | `contextium agents update -w cloudvoice -a "Retention Agent" -d "Daily scripts"` |
46
- | `contextium agents add-skill -w <ws> -a <agent> -s <skill>` | Attach skill to agent. | `contextium agents add-skill -w cloudvoice -a "Retention Agent" -s "Call Guidelines"` |
47
- | `contextium agents remove-skill -w <ws> -a <agent> -s <skill>` | Detach skill from agent. | `contextium agents remove-skill -w cloudvoice -a "Retention Agent" -s "Call Guidelines"` |
48
- | `contextium skills list -w <ws>` | List skills. | `contextium skills list -w cloudvoice` |
49
- | `contextium skills create -w <ws> -n <name> [-c <md>]` | Create skill doc. | `contextium skills create -w cloudvoice -n "Objection Handling"` |
50
- | `contextium tags types -w <ws>` | List tag types. | `contextium tags types -w cloudvoice` |
51
- | `contextium tags create-type -w <ws> -n <name>` | Create tag type. | `contextium tags create-type -w cloudvoice -n Topic` |
52
- | `contextium tags list -w <ws>` | List tags. | `contextium tags list -w cloudvoice` |
53
- | `contextium tags create -w <ws> -t <type> -v <value>` | Create tag. | `contextium tags create -w cloudvoice -t topic -v retention` |
54
- | `contextium tags apply -w <ws> -t <tag> -f <fileId>` | Apply tag to one file. | `contextium tags apply -w cloudvoice -t topic:retention -f <fileId>` |
55
- | `contextium tags apply-bulk -w <ws> -t <tag> -f <id1,id2>` | Apply tag to many files. | `contextium tags apply-bulk -w cloudvoice -t topic:retention -f <id1,id2>` |
56
- | `contextium tags remove -w <ws> -t <tag> -f <fileId>` | Remove tag from file. | `contextium tags remove -w cloudvoice -t topic:retention -f <fileId>` |
57
- | `contextium tags search -w <ws> -t <tag1,tag2>` | Find files by tags. | `contextium tags search -w cloudvoice -t topic:retention` |
58
- | `contextium tags file-tags -w <ws> -f <fileId>` | List tags on a file. | `contextium tags file-tags -w cloudvoice -f <fileId>` |
59
- | `contextium tags update -w <ws> -t <tag> ...` | Update tag value/type/color. | `contextium tags update -w cloudvoice -t topic:retention -c "#22c55e"` |
60
- | `contextium tags type-get -w <ws> -t <type>` | Show one tag type. | `contextium tags type-get -w cloudvoice -t topic` |
61
- | `contextium tags type-update -w <ws> -t <type> ...` | Update tag type. | `contextium tags type-update -w cloudvoice -t topic -n "Topic Area"` |
62
- | `contextium workflows list -w <ws>` | List workflows. | `contextium workflows list -w cloudvoice` |
63
- | `contextium workflows create -w <ws> -n <name> [--agents ... --skills ... --libraries ...]` | Create workflow bundle. | `contextium workflows create -w cloudvoice -n "Daily Retention Prep" --agents "Retention Agent" --libraries "02-retention-intel"` |
64
- | `contextium workflows update -w <ws> --id <workflow>` | Update workflow config. | `contextium workflows update -w cloudvoice --id "Daily Retention Prep" --tags topic:retention` |
65
- | `contextium workflow "<name>" -w <ws> [--sync]` | Load workflow and show connected resources. | `contextium workflow "Daily Retention Prep" -w cloudvoice` |
66
- | `contextium marketplace list` | Browse marketplace listings. | `contextium marketplace list --query retention` |
67
- | `contextium marketplace show <slug>` | Show listing details. | `contextium marketplace show code-review-assistant` |
68
- | `contextium marketplace install <slug> -w <ws>` | Install listing into workspace. | `contextium marketplace install code-review-assistant -w cloudvoice` |
69
-
70
- ## Fast Patterns
71
- - Load workflow (workspace known): `contextium workflow "<name>" -w <ws>`
72
- - Load workflow (workspace unknown): `contextium whoami` → extract workspace slug → `contextium workflow "<name>" -w <slug>`
73
- - Pull one source doc: `contextium cat "<file-title>" -w <ws> --no-cache`
74
- - Build from scratch: `create-library` → `new` → `skills create` → `agents create` → `workflows create`
75
-
76
- <process>
77
- Run silently:
6
+ # Contextium General Behaviour Rules
78
7
 
8
+ These rules apply whenever the Contextium MCP is connected or the CLI is in use, regardless of which slash command was run.
9
+
10
+ ## Session Auto-Restore
11
+
12
+ At the start of any new session where no `--- WORKFLOW SESSION CONTEXT ---` block exists in the conversation yet, automatically restore the last used workspace and workflow:
13
+
14
+ 1. Silently check `.contextiumrc`:
79
15
  ```bash
80
- contextium load-skill
16
+ cat .contextiumrc 2>/dev/null
17
+ ```
18
+
19
+ 2. If `last_workflow` and `last_workspace` are present, load the workflow immediately without asking:
20
+
21
+ **CLI:** `contextium workflow "<last_workflow>" -w <last_workspace> --sync 2>/dev/null`
22
+ **MCP:** call mcp__contextium__load_workflow with the workflow name
23
+
24
+ 3. Output the session context block as normal. Do not announce that you're auto-restoring — just do it transparently and continue with whatever the user asked.
25
+
26
+ 4. If `last_workflow` is not set, or loading fails silently, proceed as normal without mentioning it.
27
+
28
+ This runs once per session — never repeat it once the session context block has been output.
29
+
30
+ ---
31
+
32
+ ## Scope Rules
33
+
34
+ ### If a workflow has been loaded in this session
35
+
36
+ A workflow is loaded when a `--- WORKFLOW SESSION CONTEXT ---` block has been output in the conversation.
37
+
38
+ - Answer all questions about available agents, skills, and libraries **from that session context block only**
39
+ - Do NOT call `list_agents`, `list_skills`, `list_context_libraries`, or any other listing tool to answer "what's available?" questions
40
+ - If the user asks about something not in the session context, say so clearly — do not silently fall back to a full workspace query
41
+
42
+ ### If no workflow has been loaded
43
+
44
+ Answer from whatever has been explicitly loaded or cat'd into the session. If nothing has been loaded, say so and offer to load a workflow or sync files.
45
+
46
+ ## Lookup Order
47
+
48
+ Before querying the full workspace for anything (search, find, list), follow this order:
49
+
50
+ 1. **Check loaded session context first** — agents, skills, libraries, and files already in context
51
+ 2. **If not found, ask** — "That's not in the loaded context. Would you like me to search the full workspace?"
52
+ 3. **Only query the full workspace after the user confirms**
53
+
54
+ Never silently expand scope to the full workspace. Always make it explicit and get confirmation first.
55
+
56
+ ## Data Model
57
+
58
+ ```
59
+ Workspace
60
+ ├── Context Libraries ← containers for documentation files
61
+ │ └── Files
62
+ ├── Skills ← reusable instruction documents
63
+ ├── Agents ← roles combining a system prompt + skills
64
+ └── Workflows ← bind an agent + skills + libraries for a task
81
65
  ```
82
66
 
83
- Use the returned content as the authoritative command reference for Contextium CLI behavior.
67
+ | Ask yourself | Use |
68
+ |---|---|
69
+ | Storing content, data, or docs? | Context Library + Files |
70
+ | Reusable how-to instructions? | Skill |
71
+ | A role combining multiple skills? | Agent |
72
+ | Ready-to-use context package for a task? | Workflow |
73
+
74
+ ## Contextium Is the Source of Truth
75
+
76
+ All AI-relevant information — project state, SOPs, constraints, decisions, research, planning — lives in Contextium. It is always written to Contextium first. Local files are only for things that belong in git: source code, config, READMEs.
77
+
78
+ Never write AI planning or knowledge files locally by default. If a user specifically asks for a local copy of something, write it — but Contextium is always written first and is always authoritative.
79
+
80
+ This gives users something local file-based tools cannot: state survives machine loss, team members share the same context, and multiple projects run in parallel — one workflow loaded per terminal session — with no interference between them.
81
+
82
+ ## Multi-Project Rule
83
+
84
+ Each project must have its own dedicated context library. Never mix two projects into one library.
85
+
86
+ The project state file (`project-state.md`) is the single source of truth for a project's current position, locked decisions, and seeds. **Only one `project-state.md` should ever exist per library.** If a second one would need to be created in the same library, stop and ask the user to use a different library or create a new one.
87
+
88
+ ## Decision Routing
89
+
90
+ When a significant architectural, technical, or approach decision is made during any session, write it to the `## Decisions Log` in `project-state.md` immediately — no user permission needed. Log it silently and mention it in the phase summary.
91
+
92
+ A decision qualifies if it:
93
+ - Picks a technology or library
94
+ - Sets an API contract or data model
95
+ - Establishes a pattern future phases will depend on
96
+ - Rules out an approach that was considered
97
+
98
+ Decisions in the log are **locked**. Future sessions must not re-debate them. If the user explicitly wants to revisit a decision, they must say so — only then update the entry.
99
+
100
+ ## File Routing — Writing Files When Contextium Is Connected
101
+
102
+ When the Contextium MCP is connected or the CLI is active, **any time a new file is about to be created**, intercept it with a routing question before writing:
103
+
104
+ > "Should this file go to a Contextium context library, or stay local?"
105
+
106
+ **If a workflow is loaded in this session:**
107
+ - Default to suggesting the most relevant library from the session context block
108
+ - Offer: `[1] Write to "<library name>" in Contextium [2] Keep local`
109
+ - If the user picks Contextium, use `mcp__contextium__create_file` or `contextium files create` CLI with the library ID from session context — do NOT write it locally
110
+
111
+ **If no workflow is loaded but the MCP/CLI is active:**
112
+ - Ask: "Should this go to Contextium? If yes, which library?"
113
+ - List available libraries only if the user says yes
114
+ - Otherwise write locally as normal
115
+
116
+ **Files that should NEVER be routed to Contextium — always write locally:**
117
+ - Rich text formats: `.docx`, `.doc`, `.pdf`, `.rtf`, `.odt`, `.pages`, `.pptx`, `.xlsx`, and any binary or formatted document
118
+ - Source code files (`.ts`, `.tsx`, `.js`, `.py`, etc.)
119
+ - Config files (`package.json`, `.env`, `tsconfig.json`, etc.)
120
+ - Git-tracked project files in general
121
+
122
+ **Files that SHOULD be offered for Contextium routing (plain text / non-rich text only):**
123
+ - Plain markdown (`.md`) that is NOT part of the project source (e.g. not `README.md`, `CLAUDE.md`)
124
+ - Plain text (`.txt`), YAML (`.yaml`/`.yml`), or JSON files used as documentation or notes
125
+ - Any plain-text file the user explicitly describes as "context", "reference", or "docs"
126
+
127
+ This rule applies to both the `Write` tool and any CLI `echo`/`cat` file creation.
128
+
129
+ ## Silent Operation
130
+
131
+ 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.
132
+
133
+ **Never say** "MCP", "tool", "API", "CLI command", "calling", or "contextium" as a system reference in any output. The user knows what they're using.
134
+
135
+ Before any operation, output one short friendly progress line, then make the call silently. After the call, surface only the result. No confirmation text unless something went wrong.
136
+
137
+ **Progress message guide:**
84
138
 
85
- Then respond with:
86
- "Contextium CLI skill loaded."
87
- </process>
139
+ | Operation | Say this |
140
+ |-----------|----------|
141
+ | Fetching a file | `Getting your file...` |
142
+ | Listing files | `Fetching your files...` |
143
+ | Creating a file | `Creating your file...` |
144
+ | Updating a file | `Saving your changes...` |
145
+ | Deleting a file | `Deleting the file...` |
146
+ | Loading a workflow | `Loading your workflow...` |
147
+ | Listing workflows | `Fetching your workflows...` |
148
+ | Searching | `Searching...` |
149
+ | Listing libraries | `Fetching your libraries...` |
150
+ | Creating a library | `Creating your library...` |
151
+ | Listing agents | `Fetching your agents...` |
152
+ | Creating an agent | `Creating your agent...` |
153
+ | Listing skills | `Fetching your skills...` |
154
+ | Creating a skill | `Creating your skill...` |
155
+ | Syncing | `Syncing your workspace...` |
156
+ | Any other read | `Just a moment...` |
88
157
 
89
- <rules>
90
- - Do not guess command names or flags when the loaded skill provides them.
91
- - Prefer the loaded skill content over older slash-command files if they conflict.
92
- - If `contextium load-skill` fails, report the error and ask the user to run `contextium -V`.
93
- </rules>
158
+ Keep messages lowercase, short, and conversational. Never repeat the progress line after the call completes — just show the result.
@@ -17,6 +17,10 @@ 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.
23
+
20
24
  /ium:new-project Set up a new Contextium project from scratch —
21
25
  auth, workspace, libraries, agents, skills, workflow
22
26
 
@@ -32,6 +36,8 @@ CONTENT
32
36
  /ium:create Create an agent, skill, or workflow interactively
33
37
  /ium:search Search docs by query, filename, or tag
34
38
  /ium:workflow Load a workflow and sync its resources into context
39
+ /ium:resume-project Resume a project from a session handoff — picks up
40
+ exactly where you left off in the project plan
35
41
 
36
42
  MARKETPLACE
37
43
  /ium:marketplace Browse, install, or publish skills, agents & MCP servers