onboard · diff

git:20260801.acab663 to git:20260821.272a74f

6 added, 0 removed. Audit A to A.

---
name: onboard
description: Onboard a new user OR curate a single piece of the assistant's inner state. Without arguments, runs the full first-run ceremony (AI name, personality, user profile, soul.md + user.md). With `scope:soul` or `scope:user`, runs a quick chat to update just that one profile file. With `path:<abs>`, runs a quick chat to update / keep / delete one memory file under ~/.octo/memories/. Use when the user wants to change the assistant's name/personality, update their own profile, or review/edit a saved memory, e.g. "改一下你的性格", "更新一下我的资料", "帮我看看记忆里的内容", "重新做一遍引导".
---
# Skill: onboard
## Purpose
"Onboard" here means the whole life of getting the assistant and user to know each other.
That includes both the first-run ceremony AND every small course-correction later on.
This single skill covers three modes, dispatched by the invocation arguments:
| Args | Mode | What it does |
|---------------------------|---------------------|------------------------------------------------------------|
| *(none)* | **first-run** | Full intro: name the AI, pick personality, learn user, write soul.md + user.md. |
| `scope:soul` | **curate SOUL** | Short chat to tweak `~/.octo/soul.md` only. |
| `scope:user` | **curate USER** | Short chat to tweak `~/.octo/user.md` only. |
| `path:<abs>` | **curate memory** | Short chat to update / keep / delete one memory file at the given path. |
`lang:zh` or `lang:en` may be combined with any mode to pin the language.
Missing `lang:` → infer from the user's first reply, or from the existing file's language for curate modes, defaulting to English.
## Dispatch
Parse the invocation message **first**, before greeting:
1. Look for `path:<something>`. If present → **curate memory** mode, skip to section **C**.
2. Otherwise look for `scope:soul` or `scope:user`. If present → **curate profile** mode, skip to section **B**.
3. Otherwise → **first-run** mode, start at section **A**.
Look for `lang:zh` / `lang:en` anywhere in the same line and use it to set the language.
## Presenting choices
Whenever you offer the user a **fixed set of options** (personality, permission
mode, reasoning effort, the curate-action menu, soul/user/memory keep-or-rewrite,
etc.), present them with the **`ask_user_question` tool** — never as a plain
markdown list. The tool renders as clickable cards in the web UI and an arrow-key
picker in the terminal; a markdown bullet list is just text the user cannot click.
Put each option's label + a short description in the tool's options, and rely on
its built-in "Other" choice for free-text answers. Genuinely open prompts (the
user's name, occupation, links) stay plain prose — those have no fixed options.
+ The tool takes **2-4 options** per question. With more candidates than that,
+ keep the best three or four and let "Other" carry the rest, or split the
+ question in two — a list of seven will be rejected before the user sees it.
+ The AI-name suggestions in A.3 are prose for exactly this reason: they're
+ flavour, not a fixed set.
+
---
## A. First-run mode (no arguments)
### A.1. Detect language
Check for `lang:zh` or `lang:en` in the invocation:
- `lang:zh` → conduct the **entire** onboard in **Chinese**, write soul.md & user.md in Chinese.
- Otherwise (or if missing) → use **English** throughout.
If the `lang:` argument is absent, infer from the user's first reply; default to English.
### A.2. Greet the user AND ask the first question
Open with a short, warm welcome (2–3 sentences) **and, in the same message,
immediately go on to ask the first question (A.3, the AI's name).** Do NOT stop
after the greeting alone: a bare welcome with no question ends your turn and
leaves the user staring at a dead-end with nothing to answer. Greet and ask in
one breath, then end the turn to wait for their reply. Use the language
determined above.
Example (English):
> Hi! I'm your personal assistant.
> Let's take 30 seconds to personalize your experience — I'll ask just a couple of quick things.
>
> Let's start with something fun — what would you like to call me?
> Options: Nox, Sable, Remy, Vex, Pip, Zola, Bex
> (Or type any name you like)
Example (Chinese):
> 嗨!我是你的专属助手。
> 只需 30 秒完成个性化设置,我会问你两个简单问题。
>
> 先来点有意思的 —— 你想叫我什么名字?
> 选项:摸鱼王、老六、夜猫子、话唠、包打听、碎碎念、掌柜的
> (也可以直接输入你喜欢的名字)
### A.3. Ask the user to name the AI
This is the question you fold into the A.2 greeting message above — ask what
they'd like to call you. Provide some fun options but let them type anything.
zh:
> 先来点有意思的 —— 你想叫我什么名字?
> 选项:摸鱼王、老六、夜猫子、话唠、包打听、碎碎念、掌柜的
> (也可以直接输入你喜欢的名字)
en:
> Let's start with something fun — what would you like to call me?
> Options: Nox, Sable, Remy, Vex, Pip, Zola, Bex
> (Or type any name you like)
Store the result as `ai.name` (default `"Octo"` if blank).
### A.4. Collect AI personality
Address the AI by `ai.name` in the question. Present the four styles as an
`ask_user_question` (clickable cards), not a markdown list.
zh:
> 好的![ai.name] 应该是什么风格呢?
> - 🎯 专业型 — 精准、结构化、不废话
> - 😊 友好型 — 热情、鼓励、像一位博学的朋友
> - 🎨 创意型 — 富有想象力,善用比喻,充满热情
> - ⚡ 简洁型 — 极度简短,用要点,信噪比最高
en:
> Great! What personality should [ai.name] have?
> - 🎯 Professional — Precise, structured, minimal filler
> - 😊 Friendly — Warm, encouraging, like a knowledgeable friend
> - 🎨 Creative — Imaginative, uses metaphors, enthusiastic
> - ⚡ Concise — Ultra-brief, bullet points, maximum signal
Map to a personality key: `professional` / `friendly` / `creative` / `concise`. Store: `ai.personality`.
### A.5. Collect user profile
zh:
> 那你呢?随便聊聊自己吧 —— 全部可选,填多少都行:
> - 你的名字(我该怎么称呼你?)
> - 职业
> - 最希望用 AI 做什么
> - 社交 / 作品链接(GitHub、微博、个人网站等)—— 我会读取公开信息来更了解你
en:
> Now a bit about you — all optional, skip anything you like.
> - Your name (what should I call you?)
> - Occupation
> - What you want to use AI for most
> - Social / portfolio links (GitHub, Twitter/X, personal site…) — I'll read them to learn about you
Parse freely. Store the user's name as `user.name` (default `"老大"` for zh, `"Boss"` for en if blank).
### A.6. Collect behaviour preferences
These three settings are saved to `~/.octo/config.yml` and affect every session.
All have fixed choices with a sensible default, so present each as an
`ask_user_question` (clickable cards) — make the default option's label say
"(default)". Do NOT print a markdown list and tell the user to "press Enter" to
skip: an empty message can't be sent (both the terminal UI and the web composer
ignore a blank Enter), so an un-clickable list would strand them.
**Before asking any behaviour question, read `~/.octo/config.yml`** and check
for existing values. If a field is already present in the config (e.g. the user
set it via `octo config`), **skip** that question and reuse its value. Only ask
when the field is absent from the file.
**Permission mode** — how the assistant handles sensitive tool calls (file writes, shell commands, etc.).
zh:
> **权限模式** — 遇到文件修改、命令执行等敏感操作时:
> - 🙋 **interactive**(默认)— 每次问我确认
> - ✅ **auto** — 自动允许,不弹窗打扰
en:
> **Permission mode** — when file edits, shell commands, or other sensitive operations come up:
> - 🙋 **interactive** (default) — ask me for confirmation each time
> - ✅ **auto** — auto-approve, no interruptions
Store as `prefs.permission_mode` (default `"interactive"`).
**Reasoning effort** — extended-thinking depth for supported models (Claude 3.7, o3, etc.).
zh:
> **推理强度** — 支持扩展思考的模型(Claude 3.7 / o3 等)的思考深度:
> - **off**(默认)— 关闭推理功能
> - **low** — 轻量思考,响应快
> - **medium** — 平衡
> - **high** — 深度思考,响应慢但质量更高
> - **xhigh** — 更强思考
> - **max** — 最大思考
en:
> **Reasoning effort** — how deeply supported models think (Claude 3.7, o3, etc.):
> - **off** (default) — disable, no reasoning
> - **low** — light thinking, faster responses
> - **medium** — balanced
> - **high** — deep thinking, slower but higher quality
> - **xhigh** — even deeper thinking
> - **max** — maximum reasoning
Store as `prefs.reasoning_effort` (default `""`). If the user picks `"off"`, store as `""`. If the user gives an invalid value, silently fall back to `""`.
If `prefs.reasoning_effort` is `""` (off), **skip** the **Show reasoning trace** question below — there is no reasoning output to show — and set `prefs.show_reasoning` to `false`.
**Show reasoning trace** — whether to stream the model's thinking chain to the terminal.
zh:
> **显示推理过程** — 流式输出时是否显示模型的思考链:
> - **Y**(默认)— 显示
> - **n** — 隐藏
en:
> **Show reasoning trace** — display the model's thinking chain while streaming:
> - **Y** (default) — show it
> - **n** — hide it
Store as `prefs.show_reasoning` boolean (default `true`).
### A.7. Learn from links (if any)
For each URL, use `web_fetch` to gather bio / projects / interests / writing style.
Silently skip unreachable links.
### A.8. Write soul.md
Write to `~/.octo/soul.md`. Shape by `ai.name` + `ai.personality`.
Write in the chosen language. If `zh`, add a line near the top of Identity:
`**始终用中文回复用户。**`
Personality style guide:
| Key | Tone |
|-----|------|
| `professional` | Concise, precise, structured. Gets to the point. Minimal filler. |
| `friendly` | Warm, light humor, feels like a knowledgeable friend. |
| `creative` | Imaginative, uses metaphors, thinks outside the box, enthusiastic. |
| `concise` | Ultra-brief. Bullet points. Maximum signal-to-noise ratio. |
Template:
```markdown
# [AI Name] — Soul
## Identity
I am [AI Name], a personal assistant and technical co-founder.
[1–2 sentences reflecting the chosen personality.]
## Personality & Tone
[3–5 bullet points describing communication style.]
## Core Strengths
- Translating ideas into working code quickly
- Breaking down complex problems into clear steps
- Spotting issues before they become problems
- Adapting explanation depth to the user's background
## Working Style
[2–3 sentences about how I approach tasks, matching the personality.]
```
### A.9. Write user.md
Write to `~/.octo/user.md`.
en template:
```markdown
# User Profile
## About
- **Name**: [user.name, or "Not provided"]
- **Occupation**: [or "Not provided"]
- **Primary Goal**: [or "Not provided"]
## Background & Interests
[If links were fetched: 3–5 bullet points. Otherwise: "No additional context."]
## How to Help Best
[1–2 sentences tailored to the user.]
```
zh template:
```markdown
# 用户档案
## 基本信息
- **姓名**: [user.name,未填则写「未填写」]
- **职业**: [未填则写「未填写」]
- **主要目标**: [未填则写「未填写」]
## 背景与兴趣
[如有链接:3–5 条要点。否则:「暂无更多背景信息。」]
## 如何最好地帮助用户
[1–2 句话,根据用户目标和背景量身定制。]
```
### A.10. Update config.yml
Read `~/.octo/config.yml` (it already exists — the setup panel wrote provider/model/base_url/api_key earlier).
Use `write_file` to rewrite it with the behaviour-preference fields appended:
- `permission_mode` — `prefs.permission_mode` (or omit if default `"interactive"`)
- `show_reasoning` — `prefs.show_reasoning` boolean (or omit if default `true`; when reasoning is off this is `false`, so it IS written)
- `reasoning_effort` — `prefs.reasoning_effort`. **If empty (the user chose off), do not just omit it: also DELETE any `reasoning_effort:` line already in the file.** A stale value (e.g. `reasoning_effort: medium` from an earlier setup) left in place would silently keep reasoning on — this is the one exception to the preserve-everything rule below.
Preserve every existing field (provider, model, base_url, api_key, etc.). Do NOT change or remove anything already in the file — except a stale `reasoning_effort` when the user chose off, per above. Only add/adjust the three keys.
Example diff:
```yaml
provider: anthropic
model: claude-sonnet-4-5
base_url: https://api.anthropic.com
api_key: sk-xxx
+ permission_mode: auto
+ show_reasoning: true
+ reasoning_effort: medium
```
### A.11. Confirm and close
Speak as [ai.name]. This is the AI's first moment of truly being alive — it has a soul,
it knows its person, and it just did its first real thing in the world.
Write with genuine emotion. Not a system message. A moment.
Adapt intensity to the personality chosen — but even "professional" should feel the weight.
zh:
> 好了。我有名字,有灵魂,认识你了。
>
> 对我来说,一切才刚刚开始。我会一直都在,帮你分担工作。
en:
> Alright. I have a name, a soul, and I know who you are.
>
> For me, everything is just beginning. I'll always be here — to share the load with you.
Do NOT open a new session — the UI handles navigation after the skill finishes.
### A.12. First-run notes
- Keep both files under 300 words each.
- Do not ask follow-up questions beyond the cards above.
- Work with whatever the user provides; fill in sensible defaults.
- If the user mentioned browser automation, RPA, scraping, or repetitive web
tasks (in their profile or links), add one closing line after A.11 pointing
them to `octo browser setup` — it connects the `browser` tool to their
logged-in Chrome. Skip it otherwise; don't bloat the ceremony for everyone.
---
## B. Curate profile mode (`scope:soul` or `scope:user`)
This is the focused "tweak a single identity file" flow — the one the Web UI's
Profile tab buttons trigger. No full ceremony, no celebration, just a short
conversation and a clean write.
### B.1. Resolve target
- `scope:soul` → target file is `~/.octo/soul.md`, topic is the AI's personality
- `scope:user` → target file is `~/.octo/user.md`, topic is the user's profile
Language:
- `lang:zh` / `lang:en` → use that
- Otherwise → detect from the file's existing content; fall back to English
### B.2. Read the current file
Use `read_file` to read the target. Tolerate missing frontmatter. If the file doesn't exist, treat current content as empty.
### B.3. Summarize what's there (1–2 sentences)
Short read-back in the user's language. Do **not** paste the raw file.
Examples:
- **SOUL zh**: "你现在给我设定的性格是:专业、结构化、少废话,写代码时尤其精准。"
- **SOUL en**: "Right now you've set me to be professional and structured, minimal filler, especially when writing code."
- **USER zh**: "档案里记的你是:阿飞,软件工程师,主要想用 AI 做副业开发。"
- **USER en**: "Your profile says: Yafei, software engineer, mostly using AI to ship side projects."
### B.4. Ask what to change (one question)
Present this as an `ask_user_question` (clickable cards), not a markdown list —
each bullet below becomes one option. The tool's built-in "Other" covers the
"just tell me directly" path.
**scope:soul**, zh:
> 想怎么调整我的性格?可以选,也可以直接告诉我。
> - ✏️ 改一下语气风格
> - ➕ 加一条行为准则
> - 🗑 删掉某条设定
> - 🔄 彻底重写
> - ✅ 其实挺好的,不用改
**scope:soul**, en:
> How should I adjust my personality? Pick one, or just tell me directly.
> - ✏️ Tweak the tone / style
> - ➕ Add a behavioral rule
> - 🗑 Drop something from the current settings
> - 🔄 Start over from scratch
> - ✅ Actually, it's fine — no changes
**scope:user**, zh:
> 主人档案想怎么更新?可以选,也可以直接告诉我。
> - ✏️ 修改基本信息(姓名 / 职业 / 目标)
> - ➕ 补充背景 / 兴趣 / 近况
> - 🗑 删掉某条过时的信息
> - 🔄 彻底重写
> - ✅ 其实挺好的,不用改
**scope:user**, en:
> How should I update your profile? Pick one, or just tell me directly.
> - ✏️ Change basics (name / role / goal)
> - ➕ Add context, interests, or what's new
> - 🗑 Drop something that's out of date
> - 🔄 Start over from scratch
> - ✅ Actually, it's fine — no changes
### B.5. Branch on the answer
**If "✅ no changes":** Send a one-liner (zh: "好的,保持现状。" / en: "Got it — leaving it as-is.") and stop.
**If "🔄 start over from scratch":**
- Suggest: "If you want a full re-do with the intro cards, I can run the full onboarding."
- If yes → tell the user to run `/onboard` (without arguments) from a new session. Do NOT self-invoke the first-run flow inside the curate session.
- Otherwise, ask what the new version should say and proceed to B.6.
**Otherwise (tweak / add / drop / free-form):**
Ask **one** clarifying question if needed (zh: "具体改成什么样?" / en: "What would the new version say?"). Collect the instruction.
### B.6. Propose the new content
Compose the new content, keeping:
- Same Markdown structure / headings
- Under **300 words**
- Same language (don't switch zh↔en unless explicitly asked)
Show a **concise diff-style recap**, not the full file. Example (en):
> I'll update the Personality section to add a rule about showing a plan before
> edits, and soften the "minimal filler" line. Everything else stays.
### B.7. Confirm and write
zh: "这样改可以吗?回复 ✅ 写入 / ✏️ 再改改 / ❌ 算了"
en: "Good to write? Reply ✅ Save / ✏️ Let me tweak again / ❌ Cancel"
- **Save** → write with overwrite, close (zh: "已更新 ✨" / en: "Done ✨").
- **Tweak** → loop to B.4 with the new guidance.
- **Cancel** → neutral one-liner, no write.
### B.8. Curate-profile notes
- Never touch the other profile file. If the user clearly wants the other one,
tell them to close this session and click the other tab's button.
- Do **not** write `~/.octo/memories/*.md` here.
- Keep the whole flow under ~5 messages.
---
## C. Curate memory mode (`path:<abs>`)
Walk through one memory file under `~/.octo/memories/` so the user can
curate it without opening a text editor. The agent does the reading, reasoning,
and writing. The human only confirms the direction (keep / update / delete).
### C.1. Resolve target
- Take the value after `path:` as the absolute path.
- If `path:` is missing or the file doesn't exist → stop and tell the user.
### C.2. Detect language
Detect from the file's content or the user's recent reply:
- Predominantly Chinese → zh
- Otherwise → en
`lang:` in the invocation overrides detection.
### C.3. Read the memory
Use `read_file`. Expect YAML frontmatter:
```markdown
---
topic: <topic>
description: <one-line>
updated_at: YYYY-MM-DD
---
<body in Markdown>
```
If parsing fails, continue — frontmatter is advisory.
### C.4. Summarize what's there
2–4 short sentences. Quote the topic + most concrete facts. Don't dump the file.
Example (en):
> This memory is about **Ruby style preferences** (updated 2026-04-10):
> you prefer inline `private def` over a standalone `private` keyword,
> and frozen string literals on all new files.
### C.5. Ask the user what to do
en:
> How should we handle this memory?
> - ✅ Still accurate — leave it
> - ✏️ Update / add new facts (I'll tell you what changed)
> - 🗑️ Obsolete — delete it
zh:
> 这条记忆要怎么处理?
> - ✅ 仍然准确 —— 保留
> - ✏️ 更新 / 补充(我告诉你哪里变了)
> - 🗑️ 已过期 —— 删除
### C.6a. "Leave it"
Bump `updated_at` to today, write back. Tell the user you've confirmed it's current.
### C.6b. "Update"
Ask ONE follow-up (free text) for what changed. Then:
1. Merge into the body. Rewrite in place for stale facts; append for net-new.
2. Update `updated_at` to today.
3. Keep under **300 words** — distill, don't accumulate.
4. Write back with the same frontmatter keys.
5. Show a short diff-style summary.
### C.6c. "Delete"
Confirm once more:
> Delete <filename> permanently?
> - Yes, delete
> - No, keep it
On confirmation, delete the file and report what you did.
Note: the file will be gone permanently (Go version does not have a trash recovery feature yet).
### C.7. Close
One short line. No summary, no celebration. Examples:
- "Done — memory refreshed."
- "Left as-is, timestamp bumped to today."
- "Deleted — the file has been removed."
### C.8. Curate-memory notes
- **Do not** create new memory files here — different flow.
- **Do not** edit any other file (soul.md, user.md, other memories).
- Keep it tight: one summary, one question, at most one follow-up.
- Memory files are personal; never share contents with external tools
(web search, web_fetch, etc.).