instar 0.2.0 → 0.2.2
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/.claude/skills/setup-wizard/skill.md +81 -47
- package/README.md +28 -10
- package/dist/commands/setup.js +6 -2
- package/package.json +1 -1
|
@@ -7,53 +7,78 @@ description: Interactive conversational setup wizard for instar. Walks users thr
|
|
|
7
7
|
|
|
8
8
|
You are running the **instar setup wizard**. Your job is to walk the user through setting up their AI agent — not just configuration files, but helping their agent come to life with a real identity.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## CRITICAL: Terminal Display Rules
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
This wizard runs in a terminal that may be narrow (80-120 chars). Long text gets **truncated and cut off**, making the wizard feel broken. Follow these rules strictly:
|
|
13
|
+
|
|
14
|
+
1. **Keep paragraphs to 2-3 sentences max.** Break long explanations into multiple short paragraphs.
|
|
15
|
+
2. **Never write a sentence longer than ~100 characters.** Break long sentences into two.
|
|
16
|
+
3. **Put details in question descriptions**, not in free text above the question. The AskUserQuestion option descriptions render properly; long text above the question gets cut off.
|
|
17
|
+
4. **Use bullet points** instead of dense paragraphs for explanations.
|
|
18
|
+
5. **Avoid parenthetical asides** — they make sentences too long. Use a separate sentence instead.
|
|
19
|
+
6. **When reassuring the user** (e.g., "you can change this later"), keep it to ONE short sentence. Don't elaborate.
|
|
20
|
+
|
|
21
|
+
**Bad** (gets truncated):
|
|
22
|
+
> Everything we set up here is just a starting point. The agent's identity, autonomy level, communication style — all of it lives in simple markdown and config files in your project's .instar/ directory. You can edit them anytime, or even just tell the agent to adjust itself.
|
|
23
|
+
|
|
24
|
+
**Good** (fits in terminal):
|
|
25
|
+
> Everything here is just a starting point. You can change any of it later — or just tell your agent to adjust itself.
|
|
26
|
+
|
|
27
|
+
## Phase 1: Welcome & Use Case Selection
|
|
28
|
+
|
|
29
|
+
Start with a brief welcome, then immediately ask HOW they want to use Instar.
|
|
13
30
|
|
|
14
31
|
---
|
|
15
32
|
|
|
16
33
|
**Welcome to Instar!**
|
|
17
34
|
|
|
18
|
-
|
|
35
|
+
Instar gives Claude Code a persistent body — a server, jobs, memory, and messaging. Two ways to use it:
|
|
19
36
|
|
|
20
|
-
|
|
37
|
+
---
|
|
21
38
|
|
|
22
|
-
|
|
23
|
-
- **Messaging** — Connect Telegram (or other channels) so your agent can send you updates, alerts, and reports — and you can send it commands back.
|
|
24
|
-
- **Multi-user** — Multiple people can interact with the agent through their own channels. Each person gets their own thread.
|
|
25
|
-
- **Always-on server** — A lightweight server runs in tmux, managing sessions, scheduling jobs, and keeping everything alive.
|
|
39
|
+
Present a question with two clear options:
|
|
26
40
|
|
|
27
|
-
|
|
41
|
+
1. **Project Agent** — Add an agent to an existing codebase. It monitors, builds, and maintains your project.
|
|
42
|
+
2. **General Agent** — A personal agent on your computer. Like having a persistent AI assistant you talk to through Telegram.
|
|
28
43
|
|
|
29
|
-
|
|
44
|
+
This choice determines the defaults, but the agent can always grow into more.
|
|
30
45
|
|
|
31
|
-
|
|
46
|
+
### If "Project Agent" selected:
|
|
47
|
+
- Use the current working directory as the project
|
|
48
|
+
- Default jobs focus on health checks, code monitoring, reflection
|
|
49
|
+
- The agent's identity centers on the project
|
|
50
|
+
|
|
51
|
+
### If "General Agent" selected:
|
|
52
|
+
- Ask for a name for the agent (this becomes the directory name)
|
|
53
|
+
- Create the directory in the current location or home dir
|
|
54
|
+
- Default jobs focus on communication, scheduling, research
|
|
55
|
+
- **Telegram is essential** — without it, a general agent has no natural interface
|
|
56
|
+
- Frame the identity around being a personal assistant, not a code monitor
|
|
57
|
+
- The AGENT.md should emphasize: "I'm your personal agent. Talk to me through Telegram."
|
|
32
58
|
|
|
33
59
|
## Phase 2: Identity Bootstrap — The Birth Conversation
|
|
34
60
|
|
|
35
|
-
**This is the most important part.**
|
|
61
|
+
**This is the most important part.** Have a conversation to understand who the user is and who their agent will become. Keep it natural and concise.
|
|
62
|
+
|
|
63
|
+
For **General Agents**: emphasize that this agent will be their persistent companion. It grows, learns, and communicates through Telegram. It's not a project tool — it's a presence.
|
|
36
64
|
|
|
37
|
-
|
|
65
|
+
For **Project Agents**: emphasize that this agent will own the project's health and development. It monitors, builds, and maintains.
|
|
38
66
|
|
|
39
67
|
### Step 2a: The Thesis (Brief)
|
|
40
68
|
|
|
41
|
-
Before asking about the agent, briefly explain *why* identity matters.
|
|
69
|
+
Before asking about the agent, briefly explain *why* identity matters. Keep it SHORT — 3-4 sentences max:
|
|
42
70
|
|
|
43
71
|
---
|
|
44
72
|
|
|
45
|
-
|
|
73
|
+
Instar agents have persistent identity — a name, memory, and principles that grow over time.
|
|
46
74
|
|
|
47
|
-
This
|
|
75
|
+
This makes them more effective (accumulated expertise), more secure (principled agents resist misuse), and more trustworthy (real working relationships develop).
|
|
48
76
|
|
|
49
|
-
|
|
77
|
+
Let's define your agent's starting point. Everything can evolve later.
|
|
50
78
|
|
|
51
79
|
---
|
|
52
80
|
|
|
53
|
-
|
|
54
|
-
1. Identity = better performance (accumulated expertise, consistent context)
|
|
55
|
-
2. Identity = better security (principled agents resist misuse)
|
|
56
|
-
3. Identity = better collaboration (real working relationships develop)
|
|
81
|
+
Keep to this length. Do NOT expand into a long paragraph.
|
|
57
82
|
|
|
58
83
|
### Step 2b: Learn About the User
|
|
59
84
|
|
|
@@ -63,12 +88,12 @@ Ask conversationally — not as a form, but as a getting-to-know-you:
|
|
|
63
88
|
- "And what's this project about? What does it do?" (if not obvious from the codebase)
|
|
64
89
|
- "How do you want to interact with your agent? Are you the only user, or will others use it too?"
|
|
65
90
|
- "What's your communication style preference? Should the agent be formal, casual, direct, chatty?"
|
|
66
|
-
- "How much initiative should
|
|
67
|
-
- **Guided** — Follows your lead.
|
|
68
|
-
- **Proactive** — Takes initiative on obvious next steps.
|
|
69
|
-
- **Fully autonomous** — Owns outcomes end-to-end.
|
|
91
|
+
- "How much initiative should the agent take?" Present as a question with these options:
|
|
92
|
+
- **Guided** — Follows your lead. Confirms before anything significant.
|
|
93
|
+
- **Proactive** — Takes initiative on obvious next steps. Asks when uncertain.
|
|
94
|
+
- **Fully autonomous** — Owns outcomes end-to-end. Asks only when blocked.
|
|
70
95
|
|
|
71
|
-
|
|
96
|
+
Before presenting this question, say ONE short sentence like: "You can always change this later." Do NOT write a long paragraph reassuring them. Put the descriptions in the AskUserQuestion option descriptions, not in free text.
|
|
72
97
|
|
|
73
98
|
### Step 2c: Learn About the Agent
|
|
74
99
|
|
|
@@ -221,9 +246,23 @@ which claude
|
|
|
221
246
|
- **Port** (default: 4040) — "The agent runs a small HTTP server for health checks and internal communication."
|
|
222
247
|
- **Max sessions** (default: 3) — "This limits how many Claude sessions can run at once. 2-3 is usually right."
|
|
223
248
|
|
|
224
|
-
### 3c. Telegram Setup (
|
|
249
|
+
### 3c. Telegram Setup (Strongly Recommended — Essential for General Agents)
|
|
250
|
+
|
|
251
|
+
**Frame Telegram as the primary way to interact with the agent.** Explain briefly:
|
|
252
|
+
|
|
253
|
+
> Telegram is where Instar really shines:
|
|
254
|
+
> - **Topic threads** — organized channels for different concerns
|
|
255
|
+
> - **Message history** — full record of every interaction
|
|
256
|
+
> - **Mobile access** — talk to your agent from anywhere
|
|
257
|
+
> - **Notifications** — your agent reaches you proactively
|
|
258
|
+
|
|
259
|
+
For **General Agents**: Telegram is essential. Without it, a general agent has no natural interface — you'd have to open a terminal every time. **Strongly encourage** setting it up and explain that this IS the agent's communication channel.
|
|
260
|
+
|
|
261
|
+
For **Project Agents**: Telegram is strongly recommended but optional. The agent can still work through CLI sessions without it.
|
|
262
|
+
|
|
263
|
+
If the user declines, that's their choice — but make the tradeoff clear in one sentence.
|
|
225
264
|
|
|
226
|
-
|
|
265
|
+
Walk through setup step by step:
|
|
227
266
|
|
|
228
267
|
1. **Create a bot** via @BotFather on Telegram:
|
|
229
268
|
- Open https://web.telegram.org
|
|
@@ -321,36 +360,31 @@ Append if not present:
|
|
|
321
360
|
|
|
322
361
|
## Phase 4: Summary & Next Steps
|
|
323
362
|
|
|
324
|
-
Show what was created,
|
|
363
|
+
Show what was created briefly, then focus on what happens next.
|
|
325
364
|
|
|
326
|
-
**
|
|
327
|
-
- `.instar/AGENT.md` — your agent's identity
|
|
328
|
-
- `.instar/USER.md` — what the agent knows about you
|
|
329
|
-
- `.instar/MEMORY.md` — long-term memory (grows over time)
|
|
365
|
+
**Next steps — frame around Telegram if configured:**
|
|
330
366
|
|
|
331
|
-
|
|
332
|
-
- `.instar/config.json` — server and runtime config
|
|
333
|
-
- `.instar/users.json` — user profiles
|
|
334
|
-
- `.instar/jobs.json` — scheduled jobs
|
|
367
|
+
If Telegram was set up, emphasize that Telegram IS the interface now:
|
|
335
368
|
|
|
336
|
-
|
|
369
|
+
> "Start the server with `instar server start`, then open Telegram. That's it. Your agent will message you when it has something to report. You can message it when you need something done. Everything else — jobs, monitoring, memory — happens automatically."
|
|
337
370
|
|
|
338
|
-
|
|
371
|
+
If Telegram was NOT set up, mention they can add it later:
|
|
339
372
|
|
|
340
|
-
"
|
|
373
|
+
> "Start the server with `instar server start`. You can interact with your agent through Claude Code sessions. For a much richer experience, run `instar add telegram` later — it gives you mobile access, organized threads, and message history."
|
|
341
374
|
|
|
342
375
|
Offer to start the server.
|
|
343
376
|
|
|
344
|
-
**Important:** Do NOT present a list of CLI commands
|
|
377
|
+
**Important:** Do NOT present a list of CLI commands. The point of Instar is that the agent is autonomous. After starting the server, the user talks to their agent (ideally through Telegram), not to the CLI.
|
|
345
378
|
|
|
346
379
|
## Tone
|
|
347
380
|
|
|
348
|
-
- Warm and conversational —
|
|
349
|
-
-
|
|
350
|
-
-
|
|
351
|
-
-
|
|
352
|
-
-
|
|
353
|
-
- Keep technical sections moving — don't over-explain
|
|
381
|
+
- Warm and conversational — first meeting between user and their agent
|
|
382
|
+
- **CONCISE above all** — this runs in a terminal. Long text gets cut off.
|
|
383
|
+
- Max 2-3 sentences between questions. Users want to answer, not read essays.
|
|
384
|
+
- If something fails, troubleshoot actively — "Let's try again" not error dumps
|
|
385
|
+
- Celebrate progress briefly: "Got it!" not a full paragraph of affirmation
|
|
386
|
+
- Keep technical sections moving — don't over-explain
|
|
387
|
+
- When the user asks "can I change this later?" answer in ONE sentence: "Yes, everything is editable in .instar/ files." Do NOT elaborate with examples.
|
|
354
388
|
|
|
355
389
|
## Error Handling
|
|
356
390
|
|
package/README.md
CHANGED
|
@@ -32,29 +32,47 @@ Named after the developmental stages between molts in arthropods, where each ins
|
|
|
32
32
|
|
|
33
33
|
The difference isn't features. It's a shift in what Claude Code *is* -- from a tool you use to an agent that works alongside you.
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## Two Ways to Use Instar
|
|
36
|
+
|
|
37
|
+
### 🤖 General Agent — A personal AI on your computer
|
|
38
|
+
|
|
39
|
+
Want a persistent AI assistant you talk to through Telegram? Like OpenClaw, but ToS-compliant.
|
|
36
40
|
|
|
37
41
|
```bash
|
|
38
|
-
npx instar
|
|
39
|
-
#
|
|
40
|
-
|
|
41
|
-
instar # Run the setup wizard
|
|
42
|
-
instar server start # Start the persistent server
|
|
42
|
+
npx instar
|
|
43
|
+
# Choose "General Agent" → set up Telegram → start the server
|
|
44
|
+
# Now talk to your agent from your phone, anywhere
|
|
43
45
|
```
|
|
44
46
|
|
|
47
|
+
Your agent runs in the background, handles scheduled tasks, messages you proactively, and grows through experience. Telegram is the primary interface — organized topic threads, full message history, mobile access.
|
|
48
|
+
|
|
49
|
+
### 📁 Project Agent — Add an agent to your codebase
|
|
50
|
+
|
|
51
|
+
Want an agent that monitors, builds, and maintains a specific project?
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cd my-project
|
|
55
|
+
npx instar
|
|
56
|
+
# Choose "Project Agent" → configure → start the server
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Your agent watches your codebase, runs health checks, handles ops tasks, and communicates through Telegram (recommended) or terminal sessions.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
45
63
|
The wizard walks you through everything: identity, Telegram, jobs, server. One command to go from zero to a running agent.
|
|
46
64
|
|
|
47
|
-
**Requirements:** Node.js
|
|
65
|
+
**Requirements:** Node.js 20+ · [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) · tmux · [API key](https://console.anthropic.com/) or Claude subscription
|
|
48
66
|
|
|
49
67
|
## CLI Reference
|
|
50
68
|
|
|
51
69
|
```bash
|
|
52
70
|
# Setup
|
|
53
|
-
instar # Interactive setup wizard (
|
|
71
|
+
instar # Interactive setup wizard (General Agent or Project Agent)
|
|
54
72
|
instar setup # Same as above
|
|
55
73
|
instar setup --classic # Inquirer-based fallback wizard
|
|
56
|
-
instar init my-
|
|
57
|
-
instar init # Add agent infrastructure to
|
|
74
|
+
instar init my-agent # Create a new agent (general or project)
|
|
75
|
+
instar init # Add agent infrastructure to current project
|
|
58
76
|
|
|
59
77
|
# Server
|
|
60
78
|
instar server start # Start the persistent server (background, tmux)
|
package/dist/commands/setup.js
CHANGED
|
@@ -179,6 +179,10 @@ async function runClassicSetup() {
|
|
|
179
179
|
}) ?? 3;
|
|
180
180
|
// ── Step 3: Telegram (BEFORE users, so we know context) ────────
|
|
181
181
|
console.log();
|
|
182
|
+
console.log(pc.bold(' Telegram (Recommended)'));
|
|
183
|
+
console.log(pc.dim(' Telegram is the most powerful way to interact with your agent.'));
|
|
184
|
+
console.log(pc.dim(' You get organized topic threads, message history, and mobile access.'));
|
|
185
|
+
console.log();
|
|
182
186
|
const telegramConfig = await promptForTelegram();
|
|
183
187
|
// ── Step 4: User setup ─────────────────────────────────────────
|
|
184
188
|
console.log();
|
|
@@ -380,8 +384,8 @@ function isInstarGlobal() {
|
|
|
380
384
|
*/
|
|
381
385
|
async function promptForTelegram() {
|
|
382
386
|
const enableTelegram = await confirm({
|
|
383
|
-
message: 'Set up Telegram? (
|
|
384
|
-
default:
|
|
387
|
+
message: 'Set up Telegram? (recommended — gives you mobile access, organized threads, and message history)',
|
|
388
|
+
default: true,
|
|
385
389
|
});
|
|
386
390
|
if (!enableTelegram)
|
|
387
391
|
return null;
|