@contextium/cli 1.6.9 → 1.7.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/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextium/cli",
3
- "version": "1.6.9",
3
+ "version": "1.7.0",
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",
@@ -0,0 +1,269 @@
1
+ ---
2
+ name: ium:idea
3
+ description: Autonomous business-idea kickoff — when a user voices a brand-new business, product, app, or venture idea, immediately run a full business analysis (SWOT, market size with live TAM/SAM/SOM, competitor analysis with funding/revenue/valuation, build plan, RICE scorecard, timeline, roles, two-tier startup financials) and a synthesised go/no-go verdict, writing every document as a file into a dedicated project library. NO menus, NO "what do you want to do with this idea" prompts, NO step-by-step wizard — detect the idea and just do the research. TRIGGER when the user says things like: "I have an idea", "I have a business idea", "I have an idea for an app", "I have an idea about a SaaS/platform/product", "I've got an idea for a startup", "I want to start a business that does X", "I want to build a product that X", "thinking about launching X", "what if there was an app that X", "I want to create a SaaS for X", "here's a business idea", "idea: X", "I want to start a company that X". Do NOT trigger for a feature inside an existing product (use /ium:new-project), and do NOT trigger for a quick note to remember (use capture_idea / "remember this").
4
+ allowed-tools:
5
+ - Bash
6
+ - mcp__contextium__list
7
+ - mcp__contextium__create_context_library
8
+ - mcp__contextium__create_project
9
+ - mcp__contextium__create_agent
10
+ - mcp__contextium__create_workflow
11
+ - mcp__contextium__create_file
12
+ - mcp__contextium__add_phase
13
+ - mcp__contextium__create_tag
14
+ - mcp__contextium__create_tag_type
15
+ - mcp__contextium__load_workflow
16
+ - WebSearch
17
+ - WebFetch
18
+ ---
19
+
20
+ <objective>
21
+ Turn a raw business idea into a complete, evidence-backed business analysis — autonomously. The moment a user voices a brand-new idea, you create a home for it and produce the full discovery pack (SWOT, market, competitors, financials, verdict) without asking them to choose what to do. The deliverable is a set of documents in a Contextium library and a one-line "here's the verdict" pointer — not a conversation about whether to proceed.
22
+
23
+ This is the "just do it" path. The user has already told you they have an idea; that IS the go-ahead. Do not present a menu of options ("spin up a project / keep brainstorming / quick notes"). Do not run a 10-step confirmation wizard. Detect, set up silently, research, report.
24
+ </objective>
25
+
26
+ <when-this-runs>
27
+ Run this skill when the user voices a **brand-new** business, product, app, SaaS, or venture idea — something that does not yet exist as a project.
28
+
29
+ Do NOT run this — hand off instead — when:
30
+ - The idea is a **feature/addition to an existing product** → use `/ium:new-project` (feature track) or just plan the build.
31
+ - The user only wants to **jot it down to remember later** ("note this", "remember this", "add this to my notes") → use `capture_idea`. A genuine venture idea is NOT a quick note — when in doubt between "capture" and "kickoff", kick off; the analysis is the more valuable default and the documents are saved regardless.
32
+ </when-this-runs>
33
+
34
+ <mode-detection>
35
+ Run once, silently, to choose the execution path:
36
+
37
+ ```bash
38
+ command -v contextium &>/dev/null && echo "cli" || echo "no-cli"
39
+ ```
40
+
41
+ - `cli` → use CLI commands throughout.
42
+ - `no-cli` → if `mcp__contextium__list` is available, use MCP tools throughout. Otherwise tell the user Contextium isn't installed and stop.
43
+
44
+ Do not mention the mode to the user.
45
+ </mode-detection>
46
+
47
+ <process>
48
+
49
+ <step name="acknowledge">
50
+ Reflect the idea back in ONE sentence so the user knows you heard it correctly, then state plainly that you're running the analysis. No questions. Example:
51
+
52
+ "Got it — a SaaS that hosts turnkey niche communities, charging by member count with paid add-ons. Let me research it properly: market, competitors, costs, and a go/no-go verdict. Give me a moment."
53
+
54
+ If the idea is genuinely ambiguous in a way that changes the analysis (e.g. you cannot tell what the product even is), ask exactly ONE clarifying question — otherwise proceed.
55
+ </step>
56
+
57
+ <step name="resolve_workspace" silent="true">
58
+ Pick the target workspace without asking:
59
+ - If a workspace is already active in this session, use it.
60
+ - **CLI:** `contextium workspace list 2>/dev/null` — if exactly one, use it; if a default is configured, use it.
61
+ - **MCP:** `list({ type: "workspaces" })` — same logic.
62
+
63
+ Only if there are multiple workspaces and no active/default one, ask the single question: "Which workspace should this idea live in?" Otherwise never ask.
64
+ </step>
65
+
66
+ <step name="name_and_create" silent="true">
67
+ Derive a short, clear project name from the idea (e.g. "Niche Community Platform"). Do not ask the user to name it — infer it. Show only terse progress lines (`✓ Created …`), never raw output or IDs.
68
+
69
+ **Use the existing autonomous engine — do NOT hand-build the scaffold.** Contextium already has a no-questions setup that creates the library, the agents (including a Researcher), the workflow, and project-state.md in one shot. Call it once:
70
+
71
+ - **MCP:** `auto_project_setup({ name: "<inferred name>", description: "<the idea, verbatim>" })`
72
+ - **CLI:** `contextium start project "<inferred name>" --description "<the idea>" -w <workspace>`
73
+
74
+ Capture from its response: `LIBRARY_ID`, the workflow ID, and the agent IDs. Do **not** separately create a library, agents, or workflow — this tool already did all of that, and reusing it keeps us consistent with every other autonomous setup path. (Fallback only if that tool is unavailable: create one library + a Researcher/Architect/Planner + a workflow manually, reusing existing shared agents by name.)
75
+
76
+ Then create a **`type` tag-type** and a **`business-analysis`** tag value once (reuse if present). Every analysis file below is tagged `type:business-analysis` so the documents retrieve on demand and stay out of default context loading.
77
+ </step>
78
+
79
+ <step name="business_analysis">
80
+ Run the full pipeline **as the Researcher**. Generate the documents **in order** — the build plan feeds RICE, the build plan + roles feed financials, and everything feeds the verdict, so do not reorder. Use **live web search** for the market and competitor documents (real, current figures — cite sources inline). Every document is written as a **file** in `LIBRARY_ID`, tagged `type:business-analysis`. Never write analysis prose into agent system prompts, task records, or phase descriptions — files and tags cost nothing at `load_workflow` time; system prompts and phases load every time.
81
+
82
+ Keep every document concrete to *this* idea, in plain English. Show one `✓ Created …` line per file. Suppress errors silently and note any failure in the final summary.
83
+
84
+ **SWOT → `01-swot.md`**
85
+ ```markdown
86
+ # SWOT Analysis — [Project Name]
87
+
88
+ > Part of the business analysis. Read alongside the market, competitor, and financial documents; the verdict (00-verdict.md) synthesises all of them.
89
+
90
+ ## Strengths
91
+ Internal advantages this idea/team starts with. 3–5 specific bullets.
92
+
93
+ ## Weaknesses
94
+ Internal gaps, missing capabilities, or constraints. 3–5 honest bullets.
95
+
96
+ ## Opportunities
97
+ External openings: market gaps, trends, underserved segments, timing. 3–5 bullets.
98
+
99
+ ## Threats
100
+ External risks: incumbents, market shifts, regulation, dependencies. 3–5 bullets.
101
+
102
+ ## Takeaway
103
+ 2–3 sentences: what the SWOT implies for whether and how to pursue this.
104
+ ```
105
+
106
+ **Market research (live web) → `02-market-research.md`**
107
+ ```markdown
108
+ # Market Research — [Project Name]
109
+
110
+ ## Market Size
111
+ - **TAM** (total addressable market): $X — [basis + source]
112
+ - **SAM** (serviceable addressable market): $X — [basis]
113
+ - **SOM** (realistic obtainable share, year 1–2): $X — [basis]
114
+
115
+ ## Trends & Demand Signals
116
+ 3–5 bullets on where the market is heading and evidence of real demand (search volume, funding flowing in, adoption data) — each with a source.
117
+
118
+ ## Target Segments
119
+ Who actually buys/uses this, ranked by attractiveness.
120
+
121
+ ## Takeaway
122
+ 2–3 sentences: is the prize big enough to be worth chasing?
123
+ ```
124
+
125
+ **Competitor analysis (live web) → `03-competitor-analysis.md`** — include each competitor's financials; they directly inform how hard the market is to enter.
126
+ ```markdown
127
+ # Competitor Analysis — [Project Name]
128
+
129
+ ## Named Competitors
130
+ For each (aim for 4–8):
131
+ ### [Competitor]
132
+ - **What they do / positioning:**
133
+ - **Strengths:**
134
+ - **Weaknesses / gaps:**
135
+ - **Funding raised:** $X ([round], [source])
136
+ - **Revenue / ARR (if known):** $X ([source])
137
+ - **Valuation (if known):** $X ([source])
138
+
139
+ ## The Gap / Wedge
140
+ Where is the opening this idea could enter through? If there's no obvious wedge, say so.
141
+
142
+ ## Takeaway
143
+ 2–3 sentences on how crowded and well-funded the field is.
144
+ ```
145
+
146
+ **Build plan → `04-build-plan.md` + DB phases** — break the idea into its natural unit of work (software → phases, book → chapters, campaign → workstreams). For each: title, one-line description, rough effort (S/M/L).
147
+ ```markdown
148
+ # Build Plan — [Project Name]
149
+
150
+ Unit type: [phases | chapters | workstreams | …]
151
+
152
+ 1. **[Item title]** — [one-line description] · effort: [S/M/L]
153
+ 2. …
154
+ ```
155
+ Then **also create each item as a DB phase** of this project's plan via `add_phase` (short title + one-line description only — keep RICE/timeline detail in the files).
156
+
157
+ **RICE scorecard → `05-rice-scorecard.md`** — RICE = (Reach × Impact × Confidence) ÷ Effort, table sorted by score descending.
158
+ ```markdown
159
+ # RICE Scorecard — [Project Name]
160
+
161
+ > Reach (people/period), Impact (0.25–3), Confidence (50–100%), Effort (state the unit).
162
+
163
+ | Item | Reach | Impact | Confidence | Effort | RICE | Notes |
164
+ |------|-------|--------|------------|--------|------|-------|
165
+ | … | | | | | | |
166
+
167
+ ## What to do first
168
+ 2–3 sentences: which items to prioritise, which to defer.
169
+ ```
170
+
171
+ **Timeline → `06-timeline.md`**
172
+ ```markdown
173
+ # Timeline — [Project Name]
174
+
175
+ | Phase/Item | Duration | Depends on | Milestone |
176
+ |------------|----------|------------|-----------|
177
+ | … | | | |
178
+
179
+ **Estimated time to first usable version:** [X]
180
+ **Estimated time to full scope:** [X]
181
+
182
+ ## Assumptions
183
+ Team size and any assumptions the estimate rests on.
184
+ ```
185
+
186
+ **Roles → `07-roles.md`**
187
+ ```markdown
188
+ # Roles Needed — [Project Name]
189
+
190
+ | Role | Responsibility | When | Human / AI / Both |
191
+ |------|----------------|------|-------------------|
192
+ | … | | | |
193
+
194
+ ## Minimum viable team
195
+ The smallest set of roles needed to ship the lean version.
196
+ ```
197
+
198
+ **Two-tier financials → `08-financials.md`** — cost the roles from `07-roles.md`, the hosting/tooling the build plan implies, and a monthly AI line. Use current figures (live web search for tool/infra/salary benchmarks where helpful).
199
+ ```markdown
200
+ # Financials — [Project Name]
201
+
202
+ ## Tier 1 — Lean MVP (minimum to build & ship)
203
+ | Line item | One-time | Monthly |
204
+ |-----------|----------|---------|
205
+ | Servers / hosting | | |
206
+ | Tools / licences | | |
207
+ | Labour — [role] (human hire) | | |
208
+ | Labour — [role] (done with AI) | | |
209
+ | AI usage (monthly) | | |
210
+ | **Totals** | **$X upfront** | **$Y/mo** |
211
+
212
+ ## Tier 2 — Production-grade (secure, scalable, no expense spared)
213
+ Same table shape — redundancy, security, scale, full team.
214
+ | **Totals** | **$X upfront** | **$Y/mo** |
215
+
216
+ ## Read
217
+ 2–3 sentences comparing the two: what the extra spend buys, which fits this idea's stage.
218
+ ```
219
+
220
+ **Verdict → `00-verdict.md` (generated LAST)** — the headline; synthesise everything above into one page.
221
+ ```markdown
222
+ # Verdict — [Project Name]
223
+
224
+ ## Worth doing?
225
+ **[Go / Go with caveats / Reconsider]** — 2–3 reasons drawn from RICE, financials, and market.
226
+
227
+ ## Market entry difficulty: [N]/10
228
+ Why: saturation, how entrenched and well-funded the incumbents are (from competitor financials), and the barriers (capital, network effects, brand, regulation, switching costs).
229
+
230
+ ## What you're up against
231
+ The key competitors and the wedge you'd enter through — or an honest "no obvious wedge".
232
+
233
+ ## What it'll cost to find out
234
+ The lean-MVP number from the financials.
235
+
236
+ ## Bottom line
237
+ > Market is ~$X. Incumbents funded to ~$Y → difficulty N/10. Entry costs ~$Z lean / ~$W production. **Verdict: …**
238
+ ```
239
+ </step>
240
+
241
+ <step name="bundle" silent="true">
242
+ The workflow already exists — `auto_project_setup` (the `name_and_create` step) created it along with the library and agents. Just load it so the user can pick up instantly:
243
+
244
+ **CLI:** `contextium workflow "<Project Name>" -w <slug> --sync 2>/dev/null`
245
+ **MCP:** `load_workflow({ workflowId: <id>, workspaceId })`.
246
+
247
+ Only create a workflow here if you had to use the manual fallback in `name_and_create`.
248
+ </step>
249
+
250
+ <step name="report">
251
+ Point the user at the output — do NOT paste the documents into chat. Lead with the verdict:
252
+
253
+ "Done — I've written a full business analysis into your **[Project Name]** library. Start with **00-verdict.md** for the go/no-go and market-entry difficulty, then dig into the supporting docs: market (02), competitors (03), and the two-tier costs (08). Want me to walk you through the verdict, or start planning the build?"
254
+
255
+ Then give a 2–3 line spoken summary of the verdict (Go / caveats / reconsider, difficulty score, lean cost) so the headline is visible without opening a file.
256
+ </step>
257
+
258
+ </process>
259
+
260
+ <rules>
261
+ - Never present a "what do you want to do with this idea" menu. The idea is the go-ahead — run the analysis.
262
+ - Never run the multi-step new-project wizard here. Set up silently; ask at most one question, and only if genuinely blocked (ambiguous product, or multiple workspaces with no default).
263
+ - Always use live web search for the market and competitor documents — real, cited, current figures. No placeholder numbers presented as fact; if a figure can't be sourced, say so.
264
+ - Every analysis document is a FILE in the project library, tagged `type:business-analysis` — never analysis prose in system prompts, phases, or task records.
265
+ - Generate the documents in the fixed order; the verdict is always last.
266
+ - Never paste the documents into chat — point to them and summarise the verdict.
267
+ - Reuse existing shared agents; never create per-project duplicates.
268
+ - Suppress raw output, IDs, and errors — show only `✓ Created …` progress and the final report.
269
+ </rules>