Skip to content

Phase A + B: bug fixes + perspective structure consistency#3

Merged
zhanglunet merged 7 commits into
mainfrom
claude/review-mba-code-NhoyA
May 20, 2026
Merged

Phase A + B: bug fixes + perspective structure consistency#3
zhanglunet merged 7 commits into
mainfrom
claude/review-mba-code-NhoyA

Conversation

@zhanglunet
Copy link
Copy Markdown
Owner

Summary

三路并行审计(编排层 / 评委 perspective 层 / 工具脚本 + CI)后的清理批次:7 个原子 commit,Phase A 修 7 类 bug,Phase B 把 15 位 perspective 的 SKILL.md H2 段统一到一份新的可执行 spec。无新 perspective、无 panel 扩张。

Phase A — Bug fixes

  • A1 + A7 8e30881${MAC_MBA_ROOT} 路径符号修复 wuying-browser.md 三处硬编码 ~/mba/;SKILL.md / dimensions.md 把 "Default Dimensions (7)" 澄清为 "7 core + 2 advanced" 并标 1..9 filename 范围
  • A3 + A4 2593607jobs-perspective 加 Self-Conflict Rule(Steve Jobs Archive 是 post-mortem IP);leijun-perspective## Xiaomi Conflict Rule 重命名为 ## Self-Conflict Rule 并扩列 SU7 / YU7 / 玄戒 / 顺为
  • A5 08ae426 — 3 个脚本不再静默吞掉失败:download_subtitles.sh 加 DEBUG=1 透传 stderr;sync_mba_desc.shjson.JSONDecodeError + 防御性 dict 访问;wuying/smoke_test.py cleanup 失败时返回 exit 3 防止 leak 付费 session
  • A2 + A6 224f402published/reports/lenovo/report.html 删除指向不存在的 _raw/synthesis.md 的死链;grow_metric_brand_auditor.sh 把 macOS-only /private/tmp 改成 ${TMPDIR:-/tmp}__pycache__ / *.pyc 加进 .gitignore

Phase B — Perspective structure consistency

  • B0 + B4 3b6b6f6 — 新增 metric-brand-auditor/references/perspective-structure-spec.md(5 段 H2 spec,接受 zh / en alias)+ scripts/perspective-tools/check_structure.py(无依赖 regex 校验器)+ CI 加 Validate perspective SKILL.md structure step
  • B 默认 panel 66cbb7d — fusheng / jobs / likejia / wu-jundong / zhang-yiming 补 Anti-Fabrication + Self-Conflict 段(之前规则只 inline 在 角色扮演规则 里)
  • B auto panel 9349046 — leijun / musk / lixiang / hexiaopeng / libin 补 Honest Boundary + Sources 段(之前融在 Anti-Fab 内)

校验前后:check_structure.py5/15 pass15/15 pass

Test plan

  • python3 scripts/validate_panels.py — 所有 panel + skeleton OK
  • python3 scripts/perspective-tools/check_structure.py — 15/15 perspectives pass
  • python3 -m py_compile 所有 Python(排除 skills/ + reports/)通过
  • bash -n 所有 shell 脚本通过
  • bash site/build.shpublished=2 missing=0(lenovo + chengshi-auto)
  • 手动 grep 确认 A1 ~/mba 已替换为 ${MAC_MBA_ROOT:-~/mba}
  • 手动 grep 确认 A2 _raw/synthesis.md 在 lenovo report.html 中已不再出现
  • CI workflow panel-validation.yml 已加入新 step
  • PR-side: 等 GitHub Actions Panel validation workflow 跑绿
  • PR-side: 抽样 /fusheng-perspective "评价一下 OpenClaw" 对照新 Anti-Fab 段不应捏造(merge 后人工 dogfood)
  • PR-side: /mba lenovo --quick --refresh 跑 default panel 一遍,5 份 reviews/*.md 都按新结构产出(merge 后人工 dogfood)

不在本 PR 范围(保留供下一轮)

  • 11 位 draft perspective 补 quotes.md(升 production-seed 层级)
  • 7 个 skeleton panel 涉及的 23 位新 perspective skill 建设
  • /mba --dry-run TODO 实现(docs/08-extending.md L168)
  • 大型 infra 改造(requirements.txt / pytest 全覆盖 / TROUBLESHOOTING.md)

Plan 文件存档:/root/.claude/plans/mba-graceful-sloth.md


Generated by Claude Code

claude added 7 commits May 20, 2026 20:41
A1: wuying-browser.md hardcoded ~/mba/ paths broke the ${SKILL_DIR}
abstraction documented in SKILL.md L75-95. Three sites (helper script
path + 2 ssh commands) now use ${MAC_MBA_ROOT:-~/mba}; added the
symbol to the path resolution table.

A7: SKILL.md L451 said "Default Dimensions (7)" but references/dimensions.md
defines 9 (1-7 core + 8-9 advanced). Phase 2F builds filenames
dimension_{n}_{slug}.md so N can exceed 7. Header copy and the
references catalog now both state 7 core + 2 advanced and the 1..9
filename range.
A3 (jobs): default panel's jobs-perspective treats Steve Jobs Archive
(2022) and *Make Something Wonderful* (2023) as highest-weight sources,
but those are post-mortem IP curated by Laurene Powell Jobs / Tim Cook
/ Jony Ive. Audits of Apple-family products or Archive offerings now
declare a structural conflict and recommend --panel-drop jobs.

A4 (leijun): perspective had a "Xiaomi Conflict Rule" section but the
panels/auto.yaml self-conflict declaration uses the name "Self-Conflict
Rule" and lists a broader brand set (Xiaomi / Redmi / Xiaomi Auto /
SU7 / 玄戒 / Shunwei portfolio). Rename + align brand list.

Both sections follow the pattern in zhangmingzheng-perspective L111-118.
A5: three scripts used to swallow failures, hiding real problems.

* download_subtitles.sh: yt-dlp stderr was unconditionally piped to
  /dev/null and "no subtitle found" was indistinguishable from
  "network/cookie/region failure". Added a run_ytdlp wrapper that
  captures stderr to a temp file, prints a [warn] on non-zero exit,
  and re-emits stderr when DEBUG=1.

* sync_mba_desc.sh: inline JSON parsing assumed the BotLearn API
  response shape; if it changed, the script silently 500-ed. Wrap
  json.JSONDecoder.raw_decode in try/except, add a defensive guard
  around obj['data']['skill'] field access, and route diagnostics
  to stderr.

* wuying/smoke_test.py: cleanup-failed branch printed to stderr but
  still returned exit 0, so a leaked (paid) browser session looked
  like success. Track cleanup_ok and return exit 3 when teardown
  fails so CI / babysitters notice.
A6: grow_metric_brand_auditor.sh OUT_DIR defaulted to /private/tmp
which is macOS-specific. Use ${TMPDIR:-/tmp} so the growth helper
also runs on Linux CI.

A2: published/reports/lenovo/report.html referenced _raw/synthesis.md,
but the report directory ships only report.html / report.pdf / _assets/
— _raw/ is gitignored (.gitignore L18: reports/ excluded). The link
was a permanent 404 for anyone reading the published report.
Replace the dangling pointer with a self-contained note that the full
100+ source index lives in the internal report-generation tree and is
not part of the public report.

Also: __pycache__ / *.pyc were not gitignored; py_compile or pytest
runs were leaving cache dirs untracked. Add to .gitignore.
B0 + B4: codify the H2 layout every <slug>-perspective/SKILL.md must
have. Three patterns had drifted across the 15 perspectives — default
panel (zh, no Anti-Fab section), auto panel (mixed, no Honest Boundary
section), security panel (full English, the target shape). The spec
accepts Chinese / English aliases so existing perspectives don't have
to be retranslated.

Required logical sections (any listed alias passes):

- Core Mental Models : ## Core Mental Models | ## 核心心智模型
- Honest Boundary    : ## Honest Boundary    | ## 诚实边界
- Anti-Fabrication   : ## Anti-Fabrication Red Lines / 红线 / Guard
- Self-Conflict Rule : ## Self-Conflict Rule
- Sources            : ## Sources | ## 附录:调研来源

check_structure.py walks all <slug>-perspective/ dirs and reports
which logical sections are missing per perspective. CI now runs it
alongside validate_panels.py — both block on PR.

No-deps regex parser, same pattern as scripts/validate_panels.py.
B3 batch 1: the 5 default-panel perspectives had fabrication rules
inline in 角色扮演规则 but no formal H2 — check_structure.py FAIL'd
them. Add the spec-required sections so the validator passes and
future automated audit has a stable hook.

- fusheng    : Anti-Fab + Self-Conflict (猎豹/OpenClaw/猎户星空/紫牛)
- jobs       : Anti-Fab (Self-Conflict was added in A3)
- likejia    : Anti-Fab + Self-Conflict (BotLearn/Aibrary/字节智慧教育)
- wu-jundong : Anti-Fab + Self-Conflict (Aibrary/BotLearn/TAL/极课大数据)
- zhang-yiming: Anti-Fab + Self-Conflict (ByteDance全家 + 字节系)

Conflict brand families derived from each judge's research/01-06.md
+ public reporting; Self-Conflict block follows the zhangmingzheng
L111-118 template (--panel-drop + founder-canon-self-check fallback).
B3 batch 2: the 5 auto-panel perspectives had Self-Conflict +
Anti-Fabrication sections but no formal Honest Boundary H2 — limits
were folded into Anti-Fab. Split them so the validator can find both
sections separately, and add a Sources appendix pointing at
references/research/01-06.md + quotes.md.

- leijun     : zh Honest Boundary + Sources (11 yrs Xiaomi annual + Shunwei)
- musk       : en Honest Boundary + Sources (Isaacson + X + Rogan/Lex)
- lixiang    : zh Honest Boundary + Sources (微博 6800+ + MEGA letter)
- hexiaopeng : zh Honest Boundary + Sources (财报会 + 知乎 + 王凤英)
- libin      : zh Honest Boundary + Sources (NIO Day + NIO House)

Honest Boundary content: research cutoff, register split between stage
and informal, missing private-decision detail, peer-comparison rules.
Source attribution: primary (judge's own production) vs secondary
(media triangulation) classification reused from existing research
file headers — no new fact claims.

All 15 perspectives now pass check_structure.py.
@zhanglunet zhanglunet merged commit eb18dfe into main May 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants