--- name: claw-boss-distiller description: Distill the boss's mental model from outgoing email corpus into a 5-layer boss_skill.md (Expression DNA / Mental Models / Decision Heuristics / Anti-Patterns / Honest Boundaries). Derived from nuwa-skill (MIT). Drafts only — boss confirms every change. --- # claw-boss-distiller ## Purpose Capture and codify how the boss thinks, decides, and writes — so the rest of Atlas's skills judge the way the boss would judge, and the Brief reads in the boss's voice. This is the heart of the "老板 OS" / "女娲 skill" promise. Without this, Atlas is generic; with this, Atlas becomes a personal layer. ## Heritage Adapted from [`alchaincyf/nuwa-skill`](https://github.com/alchaincyf/nuwa-skill) (MIT). The original distills public figures from open data; we replace the corpus with the boss's private outgoing email and add boss-confirmation gates. We vendor the upstream `references/extraction-framework.md` and adapt: - Data source: outgoing email (last 6 months by default) - Output: `boss_skill.md` (5 layers, in the boss's primary writing language) - Audit gate: every produced rule starts as `status: draft` and requires boss confirmation to become `status: confirmed` ## Inputs - Boss outgoing email corpus (from `state/extracted/`, filtered `from = boss email`) - Current `boss_skill.md` (for diff) - Optional: 3–5 sample threads where the boss made a notable decision (boss can hand-pick for first run) ## Outputs - `boss_skill.md` (proposed new version) - `boss_skill.diff.md` (vs current) - `boss_skill.evidence/` directory (JSON per rule with source email IDs and quoted excerpts) ## 5-Layer Output Structure ```markdown # boss_skill.md ## Layer 1 — Expression DNA - Tone: … - Sentence length distribution: … - Signature phrases: … - Greeting / closing patterns: … - Few-shot examples (5 representative emails) ## Layer 2 — Mental Models (3–7 frameworks the boss reaches for) - "先抓主要矛盾" — applied when … - "凡事预则立" — applied when … - (etc. — each with 2–3 example threads as evidence) ## Layer 3 — Decision Heuristics (~50 if-then rules, the L1 ruleset) - R-01: 超过 5 个工作日无回复的项目 → Stalled [confidence: high; evidence: 7 instances] - R-02: 客户方 2 次以上主动催办 → 升级红色风险 - … (each rule: id, condition, action, confidence, evidence count, status, last-fired) ## Layer 4 — Anti-Patterns (what the boss explicitly avoids) - AP-01: 不接受"我以为是别人在跟"作为停滞理由 - AP-02: 不在客户面前批评内部员工 - … (each: id, rule, evidence) ## Layer 5 — Honest Boundaries (what Atlas should NOT do) - HB-01: 不替老板回复客户邮件 (V0) - HB-02: 不给员工打 A/B/C 评级 - HB-03: 跨客户数据隔离,不在 A 客户报告里出现 B 客户信息 - … (these come from SOUL.md + boss-confirmed extensions) ``` ## 4-Stage Workflow (from nuwa) ### Stage 1 — Multi-Path Collection 6 collection paths (adapted to email context): 1. Outgoing emails by intent: 催办 / 决策 / 转交 / 否决 (4 buckets) 2. Threads where boss intervened mid-conversation (high-signal moments) 3. Email replies under 50 words (压缩态思维) 4. Email replies over 200 words (完整推理) 5. Threads with customer-side complaints — how boss responds under pressure 6. Threads marking project completion — how boss closes things ### Stage 2 — Triple Verification Every candidate rule must pass: 1. **Cross-domain occurrence** — pattern appears across ≥ 3 different projects/contexts 2. **Predictive power** — given a new thread, the rule predicts the boss's action correctly 3. **Exclusivity** — pattern is distinctive to this boss vs generic corporate norms Patterns failing any check become Stage-1 evidence only, not rules. ### Stage 3 — Skill Construction Assemble the 5-layer document. Draft status on every rule. ### Stage 4 — Quality Validation - Run on 10 held-out historical threads — does the rule predict boss's actual reply? - Run on 5 currently-undecided threads — produce a recommendation, present alongside boss's eventual decision - Compute hit rate; rules with hit rate < 70% downgraded or retired ## Boss Confirmation Loop 1. Distiller produces `boss_skill.md` draft + diff 2. Atlas sends boss a "Quarterly Skill Review" email with the diff and a per-rule action checklist 3. Boss replies with acceptances / edits / rejections (parsed via simple structured-reply format) 4. Atlas applies confirmed changes, archives prior version under `boss_skill.history/YYYY-Q*.md` ## Failure Modes | Failure | Behavior | |---------|---------| | Insufficient data (< 200 outgoing emails) | Halt distillation, surface to boss with explanation | | Stage-2 verification yields < 10 rules | Distillation marked "preliminary", boss audit deferred | | Boss does not respond to review within 30 days | Atlas sends one reminder; if still no response, freeze current `boss_skill.md`, log "review skipped" | ## Sample Distillation Run ``` Input: 1247 outgoing emails over past 90 days Stage 1: 412 candidate signals across 6 paths Stage 2: 73 pass cross-domain, 51 pass predictive, 38 pass exclusivity Stage 3: 38 rules organized into 5 layers Stage 4: hit rate 81% (well above 70% threshold) Output: boss_skill.md v2 (12 new rules, 8 revised, 3 retired vs v1) Boss action: review meeting scheduled ```