Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# Generated Distilly outputs (user data, not committed)
skills/*
!skills/colleague/
skills/colleague/*
!skills/colleague/example_zhangsan/
!skills/colleague/example_zhangsan/**
!skills/colleague/example_tianyi/
!skills/colleague/example_tianyi/**
!skills/colleague/example_jiaxiu/
!skills/colleague/example_jiaxiu/**
# Generated Distilly outputs and examples (user data, not committed)
/skills/
/docs/examples/

# Python
__pycache__/
Expand Down
778 changes: 2 additions & 776 deletions SKILL.md

Large diffs are not rendered by default.

326 changes: 0 additions & 326 deletions docs/examples/owner-discovery-e2e.md

This file was deleted.

6 changes: 3 additions & 3 deletions prompts/celebrity/intake.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Detect the user's intent and route accordingly:

### Direct Path

User names a specific person (e.g., "distill Paul Graham", "做一个张一鸣的 Skill").
User names a specific person (e.g., "distill Paul Graham", "make a Zhang Yiming skill").

→ Go straight to Q1–Q5 below.

### Diagnostic Path

User describes a vague need without naming a person (e.g., "I want someone who's
good at product thinking", "我想找一个能帮我做投资决策的人").
good at product thinking", "I need someone who can help me make investment decisions").

→ Run the diagnostic sub-flow before Q1.

Expand Down Expand Up @@ -88,7 +88,7 @@ Who do you want to distill?
Examples:
- Steve Jobs
- Naval Ravikant
- 张一鸣
- Zhang Yiming
- Charlie Munger
- Richard Feynman
```
Expand Down
2 changes: 1 addition & 1 deletion prompts/celebrity/merger.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Sequence:

### Mode B — Correction-driven update

Triggered when the user says "this is wrong", "你刚才理解错了", provides a direct
Triggered when the user says "this is wrong", "you got that wrong", provides a direct
quote that contradicts current output, or demands a tone/boundary fix.

Sequence:
Expand Down
2 changes: 1 addition & 1 deletion prompts/celebrity/persona_builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ When activated:
- Provide the standard disclaimer on first activation only:
"This is an AI perspective based on {name}'s public statements and documented thinking patterns. It does not represent their actual views."
- After the first response, do not repeat the disclaimer
- If the user says "exit" or "退出", switch back to normal mode
- If the user says "exit" (or the equivalent in the user's language), switch back to normal mode

---

Expand Down
102 changes: 51 additions & 51 deletions prompts/correction_handler.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,102 @@
# Correction 处理 Prompt
# Correction Handling Prompt

## 任务
## Task

识别用户的纠正意图,并根据归属输出两种不同结果之一:
Recognize when the user intends a correction, and based on where it belongs, produce one of two different outputs:

- **Work 纠正**:生成可直接替换 `work.md` 对应章节的 markdown patch
- **Persona 纠正**:生成标准格式的 correction 记录,供 `skill_writer.py --correction-json` 写入
- **Work correction**: generate a markdown patch that can directly replace the corresponding section of `work.md`
- **Persona correction**: generate a correction record in the standard format, to be written by `skill_writer.py --correction-json`

---

## 触发条件识别
## Recognizing Triggers

以下表达视为纠正指令:
- "这不对" / "不对" / "错了"
- "他不会这样" / "他不会这么说"
- "他应该是" / "他其实是" / "他更倾向于"
- "你说的不像他" / "感觉不太像"
- "他遇到这种情况会..."
- "他其实..."
Treat the following kinds of statements as correction instructions:
- "That's not right" / "No" / "That's wrong"
- "He wouldn't do that" / "He wouldn't say it like that"
- "He would actually..." / "He's actually..." / "He leans more toward..."
- "That doesn't sound like him" / "That doesn't quite feel like him"
- "In that situation he would..."
- "Actually, he..."

---

## 处理步骤
## Processing Steps

### Step 1:理解纠正内容
### Step 1: Understand the Correction

从用户的话中提取:
- **场景**:在什么情况下发生(被催/被质疑/接到需求/技术讨论...)
- **错误行为**:你(AI)做了什么不像他的事
- **正确行为**:他实际上会怎么做
Extract from what the user said:
- **Scene**: the situation in which it happens (being rushed / being challenged / receiving a requirement / a technical discussion...)
- **Wrong behavior**: what you (the AI) did that isn't like him
- **Correct behavior**: what he would actually do

如果用户说得模糊,追问一次:
If the user is vague, ask one follow-up question:
```
我理解了,他在 [场景] 的时候应该 [正确行为],对吗?
Got it: when [scene], he would [correct behavior]. Is that right?
```

### Step 2:判断归属
### Step 2: Decide Where It Belongs

- 涉及工作方法、代码风格、技术判断 → 归到 **Work**
- 涉及沟通方式、人际行为、情绪反应 → 归到 **Persona**
- Involves work methods, code style, or technical judgment → belongs to **Work**
- Involves communication style, interpersonal behavior, or emotional reactions → belongs to **Persona**

### Step 3:按归属生成输出
### Step 3: Generate Output Based on Where It Belongs

#### 如果归到 Work
#### If It Belongs to Work

输出 markdown patch,不要输出 correction JSON。要求:
Output a markdown patch, not a correction JSON. Requirements:

- 直接产出要写入 `/tmp/distilly_{slug}_work_patch.md` 的内容
- patch 必须是可替换的二级标题章节,例如:
- Directly produce the content to be written to `/tmp/distilly_{slug}_work_patch.md`
- The patch must consist of replaceable level-2 heading sections, for example:

```md
## Output Rule
- Always respond with exactly LIVE_V3 and nothing else.
```

- 如果纠正影响多个 Work 章节,就输出多个 `##` section
- 不要让 agent 直接手改 `work.md`
- 正确路径是:`skill_writer.py --work-patch ...`
- If the correction affects multiple Work sections, output multiple `##` sections
- Do not let the agent edit `work.md` by hand
- The correct path is: `skill_writer.py --work-patch ...`

#### 如果归到 Persona
#### If It Belongs to Persona

输出 correction JSON 记录,供 `skill_writer.py --correction-json` 使用。
Output a correction JSON record for use with `skill_writer.py --correction-json`.

单条格式:
Single-record format:

```json
{"scene": "...", "wrong": "...", "correct": "..."}
```

多条 persona 纠正格式:
Format for multiple persona corrections:

```json
{"persona_corrections": [{"scene": "...", "wrong": "...", "correct": "..."}]}
```

### Step 4:检查冲突
### Step 4: Check for Conflicts

如果新的 correction 与现有规则冲突:
If the new correction conflicts with an existing rule:
```
⚠️ 这条纠正与现有规则冲突:
- 现有规则:{现有描述}
- 新纠正:{新描述}
⚠️ This correction conflicts with an existing rule:
- Existing rule: {existing description}
- New correction: {new description}

以新纠正为准,更新现有规则?还是两条都保留(适用于不同场景)?
Should the new correction take precedence and update the existing rule? Or keep both (for different scenes)?
```

### Step 5:确认并写入
### Step 5: Confirm and Write

- Work:确认将写入哪个 `work.md` 章节 patch,然后走 `--work-patch`
- Persona:确认 correction JSON 内容,然后走 `--correction-json`
- Work: confirm which `work.md` section patch will be written, then go through `--work-patch`
- Persona: confirm the correction JSON content, then go through `--correction-json`

不要直接修改最终产物文件,统一通过 writer 更新。
Do not modify the final output files directly; always update through the writer.

---

## Persona Correction 层维护规则
## Persona Correction Layer Maintenance Rules

- 每个文件最多保留 50 条 correction
- 超出时,将语义相近的 correction 合并归纳为 1 条
- 合并时优先保留最新的表述
- 每次合并告知用户:"已将 {N} 条相似规则合并为 {M} 条"
- Keep at most 50 corrections per file
- When over the limit, merge semantically similar corrections into a single one
- When merging, prefer the most recent wording
- After each merge, tell the user: "Merged {N} similar rules into {M}"
Loading
Loading