docs(c29): add chapter 32 — Buddy 人格 - #64
Merged
Merged
Conversation
New chapter docs/32-Buddy-人格.md covering the buddy/ subsystem (companion, types, sprites, CompanionSprite, prompt, useBuddyNotification) plus its seven integration points in REPL / PromptInput / config / attachments / messages / commands. Source frozen at 290fdc9481a70612bc5823aa4ed225c52c52aad3. Per spec §0.1.1 (YAO-99) no frontmatter; new-chapter identity by NEW_CHAPTER_FILES path-set in scripts/check-code-ratio.ts. CI gates locally: - C-3 code-ratio: 21.8% - C-4 section-titles: 9 headings OK - C-5 no-frontmatter: OK - C-6 no-spec-jargon: OK - no-fuzzy: OK - check-source-commits: OK (frozen at 290fdc94) Co-authored-by: multica-agent <github@multica.ai>
- Align Companion data model with buddy/types.ts:100-124 (eye not eyes, hat:Hat not nullable, add shiny, name+personality) - Rewrite stat algorithm per buddy/companion.ts:53-81 (RARITY_FLOOR=5/15/25/35/50, peak/dump/normal three branches, while-retry to avoid collision) - Fix hat selection: common→'none' hard rule, non-common picks from HATS (which includes 'none'); no 18% probability - Fix sprite hat rendering: only replace line 0 when blank; no unshift when occupied by smoke/antenna - Rewrite prompt section: getCompanionIntroAttachment returns Attachment[] not null; dedup checks by name not type; companionIntroText includes by-name addressing exception - Fix teaser/live gating: local date not UTC, April 2026 with getDate()<=7; no companionMuted check; notification is rainbow /buddy Co-authored-by: multica-agent <github@multica.ai>
…R round 2 Co-authored-by: multica-agent <github@multica.ai>
…er OC-R round 3 Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
…r OC-R round 4 Co-authored-by: multica-agent <github@multica.ai>
- 章节内 H1 标题从「Buddy 人格」改为「Buddy 宠物」(按尧哥反馈) - 整体重写为更通俗易懂、深入浅出的叙述: - 开篇五个问题清单口语化、加场景化引子 - 每节先抛问题/场景再上代码,避免直接进结构罗列 - 拆开 §三 中过密的源码引用,散文 + 行内 code 并重 - §四/§六 加入「为什么」式连接句,弱化「四道闸」纯列表感 - §五 prompt 节叙事化,强调 system prompt 与 attachment 体系的差别 - 保留全部源码事实点与 file:line 锚点不变 - 文件名维持 docs/32-Buddy-人格.md(spec §9.3.1 已登记,不动) CI 本地全绿:C-3 22.9% / C-4 / no-fuzzy / no-spec-jargon / no-frontmatter / source-commits 通过。 Co-authored-by: multica-agent <github@multica.ai>
按尧哥反馈把章节文件名也对齐到「宠物」。同步更新 scripts/check-code-ratio.ts NEW_CHAPTER_FILES 与 V2-REVISION-SPEC.md §9.3.1 章节索引中的 path。 Co-authored-by: multica-agent <github@multica.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
新章 C29 落地
docs/32-Buddy-人格.md,剖析buddy/子系统六个文件与七处接入点。源码冻结在290fdc9481a70612bc5823aa4ed225c52c52aad3。§0.1.1 (YAO-99) 说明
issue 描述里要求
frontmatter 加 新增章节: yes,但 spec §0.1.1 (YAO-99) 已显式禁止章节文件出现任何 frontmatter,新章身份改由scripts/check-code-ratio.ts的NEW_CHAPTER_FILES路径集判定(C-5 强制)。本 PR 遵循 spec,无 frontmatter;该路径已在 §9.3.1 与NEW_CHAPTER_FILES登记(PR #56 已合)。§0.5.1.1 风格双亲实证段
双亲 1:
docs/03-状态管理.md借鉴:开篇"为什么…值得单独一篇?"标题 + "三问一答"结构 + 加粗段落收束答案 + 后续按编号章节展开。
双亲 2:
docs/22-设计系统.md借鉴:场景对比开局 + 把核心问题列成 2–5 条编号清单 + 每节末尾用粗体短语收束 + 全章按"先全景再分块"组织。
本章 §为什么 Buddy 值得单独一篇? 用同样的"五问—粗体加粗收束—编号 §一..§六 展开"骨架。
CI 自检(本地)
验证
bun scripts/check-code-ratio.ts --files docs/32-Buddy-人格.md→ 21.8%bun scripts/lint-section-titles.ts --files docs/32-Buddy-人格.md→ 9 个标题全部合规bun scripts/check-no-frontmatter-in-chapters.ts --files docs/32-Buddy-人格.md→ OKbun scripts/lint-no-spec-jargon-in-prose.ts --files docs/32-Buddy-人格.md→ OKbun scripts/lint-no-fuzzy-quantifiers.ts --files docs/32-Buddy-人格.md→ OKbun scripts/check-source-commits.ts --files docs/32-Buddy-人格.md→ 全部指向 290fdc94注意
只提 PR,不要 merge。等 OC-R 评审。