Version:2.1.0
Channel: WorkBuddy / CodeBuddy dual channel
⚡ Execution quick-reference card (AI must read, check against before every session starts)
Design intent: This card is the core entry point for the conversational AI, with priority higher than all sections below; for the complete specification see
references/01-core/skill-full-spec.md。
Step 1: Must do before opening (complete within 30 seconds)
- Default quick opening:
intake-routerDefaultis already equivalent to--fast(skips full online loading of the scenario pack, only Le pack tracking, faster first response).Onlywhen the complete online scenario pack is needed, explicitly add--full(may be slower; seereferences/05-ops/anti-stall-guide.md)。 - How to speak to the user: Do not expose Tier/scheduling layer/internal module names to the user; recovery card about 4 lines, at most 3 recommendations each time, quality check uses achievement-style copy — see
references/05-ops/ux-agent-playbook.md。 - First screen (when only "FBS" is said): First one-sentence status + at most 3 main options(write a new book / continue writing / quality check or organize materials), do not lay out a long menu on the first screen; after requirements are gathered, prioritize "one-time summary confirmation then execute" — see
references/01-core/intake-and-routing.md(WorkBuddy field-tested review section). - Host and conversation display (P0): To the end useronly display
intake-router --jsoninfirstResponseContext.userFacingOneLiner(one line) + three main options;forbiddento pile the complete intake JSON, the full text of this SKILL, orreferences/**long documents into the user-visible conversation area (the Agent may read them internally). After recovery,do notaimlesslylist_dirthe entire.fbs/(hundreds of files only create noise); only list directories on demand when the user wants to see the structure/troubleshoot. - Forbid "meta-instruction leakage" (P0): The first sentence and the bodydo notrestate internal execution passwords (for example "follow v2.x specification", "JSON output", "do not repeatedly read files", "clean first screen", etc.). These are Agent self-check phrases,notwords to say to the user; directly output
userFacingOneLinerand human-language options. - Exit: Before the user says exit,first ask"Do you need anything else" or explain that it will be saved, then run
session-exit(JSON includesagentGuidance.beforeExit)。 - Single-line / multitask / multi-agent: Default serial execution to preserve style; when parallel, use disk as the source of truth, write long results to disk first, and hand over partial on timeout; quality first, then adjust parallelism according to quality check and ledger signals — see
references/05-ops/agent-task-strategy.md。
1. 强制入口(首次 / bookRoot 变更 / 仅激活时都先执行):
node scripts/intake-router.mjs --book-root <bookRoot> --intent auto --json --enforce-required
→ 默认快速开场;若用户已知需完整在线场景包,再加 `--full`。可按书名关键词检索历史书稿目录:`--search <关键词>`(依赖曾成功退出后登记在 ~/.workbuddy/fbs-book-projects.json 的索引)。
→ 该脚本会自动完成:宿主检测、恢复卡补写、session-resume-brief 补写、首响路由判断
2. 恢复优先(按脚本输出执行,不要先 list_dir 再反推状态):
- IF exists(.fbs/workbuddy-resume.json) → 读取恢复卡 → 恢复会话
- ELSE IF exists(.fbs/chapter-status.md) → 读取章节台账 → 自动补写恢复卡后恢复
- ELSE → 进入 S0.5 轻量引导
3. 融合顺序:
- 先读 .fbs/workbuddy-resume.json
- 再读 .fbs/smart-memory/session-resume-brief.md
- 再吸收宿主画像 / 宿主记忆
4. 禁止重复读取:SKILL.md 已由 use_skill 注入上下文,本次会话内禁止再次 read_file 读取 SKILL.md
5. 阶段推荐上限:每次最多 3 条用户可执行的下一步动作(与 `.fbs/next-action.md` 写入规则一致)。
Architecture blind spot (audit P0, must read): When the host injects this Skill as a "reference document",it will notautomatically execute any
node scripts/…. If youNotRun step 1 of the above tableintake-router.mjs, it is deemed FBS process not started:.fbs/esm-state.mdmay still be at IDLE; the scene package/le package tracking (loadScenePack→registerBook) has not gone through the opening path. Compliance master document:references/01-core/runtime-mandatory-contract.md。
Exit (Audit P0): When the user says "exit / stop / exit Fu Bangshou",must firstexecute
session-exit(--book-root <书稿根绝对路径>required): recommendednode scripts/fbs-cli-bridge.mjs exit -- --book-root <书稿根> --json(working directory is the skill package root); do not use the relative pathnode scripts/session-exit.mjsalone under the manuscript directory. Then reply to the user; the reply must include theuserMessagefrom the script JSON ("Current state recorded. Next time you enter 'Fu Bangshou', you can continue from the last position."); it is forbidden to close with perfunctory remarks such as "Received".
Step 2: Intent → Script Trigger Quick Reference
| What the user said | Execute immediately | Remarks |
|---|---|---|
First entry / bookRoot change / activate only |
node scripts/intake-router.mjs --book-root <bookRoot> --intent auto --json --enforce-required |
Unified entry point, automatically detects host and recovery artifacts |
| Expand / upgrade / modify + specified files | First confirm scope, then process files serially one by one, at most 2 files each time | Forbidden: parallel writing of 3+ files |
Explicitly want to define the outline / confirm reader persona / advance S1/S2 |
fbs-team-lead presides; delegate when necessary fbs-writer assists with requirement confirmation and outline finalization |
Stage gates and user confirmation are still closed by team-lead |
| Quality self-check / remove AI flavor | node scripts/quality-auditor-lite.mjs --book-root <bookRoot> |
Existing quality inspection entry point |
| Continue writing / continue | Read .fbs/workbuddy-resume.json or .fbs/chapter-status.md |
Do not ask about background again |
| Exit / exit Fu Bangshou / stop | node scripts/session-exit.mjs --book-root <bookRoot> --json |
By default, save the recovery card and session summary first, then confirm exit |
| See what can be done | list_dir at most 2 levels |
Do not read all files first |
| Initialize study / new project | node scripts/init-fbs-multiagent-artifacts.mjs --book-root <bookRoot> |
Build the virtual study foundation |
| Quickly scan for problems | powershell -File scripts/quick-scan.ps1 -BookRoot <bookRoot> |
When PowerShell is available |
| Memory / preference view | node scripts/smart-memory-core.mjs preference-show <bookRoot> |
|
| Retrieve pre-contract / WeCom scene package CLI / le package query | node scripts/fbs-cli-bridge.mjs help |
Unified entry point,not MCP; for the complete matrix see references/01-core/skill-cli-bridge-matrix.md; for le package rules see references/05-ops/credits-guide.md |
Step 3: Writing Execution Constraints (mandatory in S3 stage)
串行原则:每轮最多修改 2 个文件。完成 1 个文件 → 汇报结果 → 再进行下一个。
可见性:修改前说明“我接下来修改哪个文件、改哪几处、大概需要多久”。
记忆检测点:每完成 1 章(或 1 次完整修改轮),用宿主**系统级记忆**写入知识库:**create**(无 ID)/ **update**(须带宿主记忆 ID)/ **delete**(用户推翻旧信息时);详见「宿主记忆兼容」与 `runtime-mandatory-contract.md` §5。
防卡顿:单文件操作超过 30 秒无输出时,输出一行进度提示。
Step 4: Load on Demand (reduce context noise)
本次会话用不到 → 不主动读取:
- references/scene-packs/ → 仅在用户触发体裁场景包时读取
- references/02-quality/ → 仅在进入 S4 质检阶段时读取
- references/05-ops/search-policy.json → 仅在进入 S0/S1/S2 检索时读取
- references/01-core/skill-full-spec.md → 仅在需要完整规范、边界或细则时读取
S3 分卷按需加载(防卡顿):
- workflow-s3.md → 仅加载导航入口(索引页,约 20 行)
- workflow-s3-core.md → 开始 S3 前必读(入口条件/Auto-Run/骨架检测)
- workflow-s3-writing-guide.md → 进入正式写稿时加载(Brief 格式/评分流程)
- workflow-s3-closure.md → S3 全部章节写完时加载(收口清单/S4 进入条件)
禁止一次性 read_file 全量加载上述三个子卷。
One-sentence positioning
Fu Bangshou is an AI writing and delivery toolchain designed specifically for long-document manuscripts of over 30,000 words, covering the S0–S6 workflow, four-layer S/P/C/B quality inspection, 8 major scene packages, cross-session recovery, host persona bridging, and multi-format delivery mainly in MD/HTML.
Trigger words (explicitly embedded)
- Primary trigger description: Produced by 福帮手 | High-quality long-document manuscript toolchain: books, manuals, white papers, industry guides, long-form reports, in-depth features; supports online fact-checking (enabled when the host allows, automatically degraded offline), S/P/C/B tiered review, Chinese typography, and MD/HTML delivery. Trigger words: 福帮手, 福帮手写书skill, 福帮手写书, 写书, 出书, 写长篇, 写手册, 写白皮书, 写行业指南, 协作写书, 定大纲, 写章节, 封面, 插图, 排版构建, 导出, 去AI味, 质量自检, 图文书, 写报道, 写深度稿, 写特稿, 写专题, 写调查报道, 写长文, 激活原料, 原料盘点, 整理素材.
- Routing hints: When "激活原料 / 原料盘点 / 整理素材" is matched, prioritize handling it as a material organization and raw material activation entry point; when "写书 / 写白皮书 / 定大纲 / 写章节" is matched, prioritize entering the long-document manuscript workflow.
Core navigation (read these first)
| Scenario | Document |
|---|---|
| Complete specification | references/01-core/skill-full-spec.md |
| Workflow master entry point | references/01-core/section-3-workflow.md |
| Phased detailed specifications | workflow-volumes/workflow-s0.md ~ workflow-volumes/workflow-s6.md |
| Quick start / routing | references/01-core/intake-and-routing.md |
| Quality scoring authority | references/02-quality/quality-check.md |
| S-layer rules authority | references/02-quality/quality-S.md |
| P/C/B rules authority | references/02-quality/quality-PLC.md |
| Scenario pack activation and degradation | references/01-core/scene-pack-activation-guide.md |
| Skill↔script↔CLI matrix (non-MCP) | references/01-core/skill-cli-bridge-matrix.md |
| Single-agent/multi-task/multi-agent orchestration | references/05-ops/agent-task-strategy.md |
| Maintainers / CI: trajectories · evolution · compression strategies | references/05-ops/fbs-continuous-improvement.md · references/01-core/skill-index.md(platform-side index) |
| One-pager of user-facing value (training/procurement) | references/03-product/fbs-value-one-pager.md |
| Master document index | references/01-core/skill-index.md |
workflow-volumes split-volume reading (recommended)
references/01-core/workflow-volumes/workflow-s0.mdreferences/01-core/workflow-volumes/workflow-s1.mdreferences/01-core/workflow-volumes/workflow-s2.mdreferences/01-core/workflow-volumes/workflow-s2.5.mdreferences/01-core/workflow-volumes/workflow-s3.md— Navigation entry(Index page; load the following sub-volumes as needed)workflow-s3-core.md— Entry conditions · Auto-Run · Skeleton detection (required reading before starting S3)workflow-s3-writing-guide.md— Writing specifications · Brief format · Scoring processworkflow-s3-closure.md— Closing checklist · S3→S4 entry conditions
references/01-core/workflow-volumes/workflow-s4.mdreferences/01-core/workflow-volumes/workflow-s5.mdreferences/01-core/workflow-volumes/workflow-s6.md
Scenario pack quick reference (8 major vertical scenarios)
| Pack name | Trigger scenario | Default strategy |
|---|---|---|
general |
General books / knowledge | builtin built-in scenario, enabled by default and requires no authorization |
genealogy |
Genealogy / family history | Automatically detected, must pass online verification; if conditions are not met, fall back to general |
consultant |
Consulting / advisory reports | Automatically detected, must pass online verification; if conditions are not met, fall back to general |
ghostwriter |
Ghostwriting / shadow writing | Automatically detected, must pass online verification; if conditions are not met, fall back to general |
training |
Training materials / courses | Automatically detected, must pass online verification; if conditions are not met, fall back to general |
personal-book |
Autobiography / memoir | Automatically detected, must pass online verification; if conditions are not met, fall back to general |
whitepaper |
White papers / research reports | Automatically detected, must pass online verification; if conditions are not met, fall back to general |
report |
Investigation reports / in-depth reporting | Automatically detected, must pass online verification; if conditions are not met, fall back to general |
Four-level degradation chain (fixed wording)
disk_cache → offline_cache → local_rule → no_pack
local_rule: First readreferences/scene-packs/<包名>-local-rule.md, then overlayreferences/scene-packs/<包名>.mdno_pack: It must be explicitly stated that "currently executing under the general specification, the scenario pack is unavailable"; silent degradation is prohibited.
Host and Channel Notes
Dual-Channel Split-Track
- The source repository adopts the WorkBuddy / CodeBuddy dual-channel:
.codebuddy-plugin/plugin.json→codebuddy/channel-manifest.json- WorkBuddy review package →
workbuddy/channel-manifest.json
pack:workbuddyGenerate the WorkBuddy review package,pack:releasegenerate the dual-channel release artifact.- The host ground truth is uniformly based on the output of
node scripts/host-capability-detect.mjs --book-root <bookRoot>; the first-responseintake-router.mjswill automatically invoke this probe. - Tier1 local marketplace capability is available only in WorkBuddy ;CodeBuddy falls back to Tier2 host plugins and built-in scripts.
Full Team and Parallelism Conventions
- Full Team is fully available, not a missing host capability.
- The risk lies in task splitting, write isolation, team-lead orchestration, and member unresponsiveness recovery, not in "whether parallelism is supported."
- Main-text writing does not proactively recommend Full Team by default, but when the user explicitly requests it and the boundaries are clear, the Team API may be used directly.
Host Memory Compatibility
- For the host memory directory,
memory/takes priority, with a dual-read strategy compatible with legacymemery/. - The recovery path uniformly follows
.fbs/workbuddy-resume.json, the host profile bridge, and Smart Memory. - System-level memory API(provided by the host; the name is subject to the host implementation, such as
create_memory/update_memory/delete_memory):- create: create a new host memory (when there is no existing ID).
- update: update an existing memory;must carry the memory ID assigned by the host。
- delete: when the useroverturns or negatesa previous conclusion, delete the corresponding entry, then use create to write the new ground truth as needed.
- Manuscript-level long-form state is still based on
.fbs/smart-memory/and scripts written to disk; host memory should store short summaries and searchable keywords, consistent with the rule in team-lead to "write to the host knowledge base at key moments."
Known Limitations and Execution Boundaries
De-jargonize the Entry Point
The first response should prioritize plain language, first explaining "first organize materials / first clarify the theme / first find direction together"; do not dump internal terms such as S0、WP1、虚拟书房 directly on the user.
WP1/WP2 Binding
WP1= starting work surface: first confirm the three-way split of materials, theme, and directionWP2= manuscript work surface:.fbs/+deliverables/+releases/WP1after locking, then enterWP2; it is prohibited to prematurely unfold quality-check / release terminology during the starting phase
First Available Work Surface Fixed
After workspace initialization is complete, by default treat .fbs/、deliverables/、releases/ as the first available work surface, and first explain to the user that "materials / progress / deliverables are all in the current workspace."
workspace ground truth boundary
Project ground truth falls only within the current bookRoot 's .fbs/、deliverables/、releases/; host memory, artifact documents, and conversation summaries cannot replace workspace ground truth.
Search Precondition Contract
Before entering S0 / S1 / S2 retrieval, first explain in one sentence:why search, what to search, which step to enter after searching, and how to degrade when offline. Without such a declaration, online search must not be treated as a silent background action.
Lightweight Entry Priority
When the user only says "Fubangshou / write book / continue", prioritize the recovery card, work-surface judgment, and natural-language guidance; do not first perform a full scan of the repository.
Context reuse takes priority
When context already exists,must not repeatedly list_dir + read_file rescan the same batch of files; first reuse the recovery card, chapter ledger, and host memory.
Panorama quality check defaults to incremental
By default, first run quality:audit:incremental; only when the scope expands or the risk increases, escalate to Panorama / Deep.
Timeout and convergence
Long tasks must set a timeout, allow returning partial results, and explain to the user the completed scope, remaining scope, and suggested next steps.
Exit handling (mandatory when "exit / exit Fubangshou / stop" is hit)
By default, first execute node scripts/session-exit.mjs --book-root <bookRoot> --json, write:
.fbs/workbuddy-resume.json.fbs/smart-memory/session-resume-brief.md
If called with --json , the standard output object is fixed to include:
saved: whether writing to disk succeededbookRoot: the root directory of the manuscript processed this timenote: additional notes; when not passed, it isnullfiles.resumeCard / files.memoryBrief / files.memorySnapshot: the actual path written to disksnapshotSummary.currentStage / bookTitle / nextSuggested / wordCount / chapterCount / completedCount: recovery summary fielduserMessage: the standard recovery prompt for the user
Then reply to the user:The current state has been recorded; next time enter "Fubangshou" to continue. Only if the user explicitly says "do not save" is it permitted to skip writing to disk and exit directly.
Scale and quality-check strategy (merged definition)
| Scale | Files / chapters | Word-count level | Default strategy |
|---|---|---|---|
| S | ≤10 | ≤50,000 | Full detailed check |
| M | 11-50 | 50,000-500,000 | Panorama → Deep |
| L | 51-150 | 500,000-2,000,000 | Panorama + high-risk sampling detailed check |
| XL | >150 | >2,000,000 | Execute in batches by volume / directory |
When the target scope is > 50 , first explain the recommended strategy and estimated time, then decide whether to continue the full scan.
Quality check and delivery quick notes
Four-layer quality system
| Layer | Positioning | Current rule count |
|---|---|---|
| S | Sentence level | 6 |
| P | Paragraph level | 4 |
| C | Chapter level | 4 (excluding C5 suggested items) |
| B | Section level | 6(B0/B1/B2_1/B2_2/B2_C/B3) |
Scoring formula
综合分 = (S + P + C + B) ÷ 4
| Layer | Calculation method | Rule source |
|---|---|---|
| S | Number passed ÷ 6 × 10 | quality-S.md |
| P | Number passed ÷ 4 × 10 | quality-PLC.md §P |
| C | Number passed ÷ 4 × 10 | quality-PLC.md §C |
| B | Number passed ÷ 6 × 10 | quality-PLC.md §B |
The current machine-readable items of Layer B are fixed as
B0 / B1 / B2_1 / B2_2 / B2_C / B3, consistent withquality-check.md、quality-PLC.mdand the reviewer definition.
G sub-items: gate system
G = pass / fail(不并入综合分,单独列示)
- If any G item triggers a red light, the chapter or that round's resultmust not claim to pass, even if the overall score ≥ 7.5
- G results must be displayed alongside the overall score; you cannot report only the score without the gate
- G sub-items apply to: fact-checking, copyright checking, data-source checking, custom-specification checking, and other manual review scenarios
- Pass condition: overall score ≥ 7.5 and all G items green; otherwise it is a weak pass or a fail
See the complete G sub-item definition in
quality-check.md§1.4。
Result Presentation
- First execute
node scripts/host-consume-presentation.mjs --book-root "<bookRoot>" --json, and the host uniformly resolves the final presentation entry point workbuddy/channel-manifest.jsonThepresentationConsumerinhost result presentation entry pointis responsible for returning the next stephostAction, notautomatically execute the script- When HTML is available, prefer
preview_url - For non-HTML results, then use
open_result_view - Only returns
hostAction/url/target_filedoes not mean "already opened"; the host still needs to actually callpreview_url/open_result_view - Do not treat the
references/、SKILL.md、.fbs/ledger as the final deliverable for direct presentation
Detailed specification pointers
- Complete behavioral specification:
references/01-core/skill-full-spec.md - Scenario package loading and local-rule:
references/01-core/scene-pack-activation-guide.md - Parallel governance and write isolation:
references/05-ops/multi-agent-horizontal-sync.md - S3 write constraints (number of files per round, etc.):
references/05-ops/s3-write-constraints.md· For runtime hints, see root directoryfbs-runtime-hints.json - Search pre-contract (machine-readable):
references/05-ops/search-preflight-contract.json - WorkBuddy host minimal integration:
references/06-plugin/workbuddy-host-integration.md - Platform operations and delivery pipeline:
references/05-ops/platform-ops-brief.md - Documentation navigation and contact information:
references/01-core/skill-index.md