Repository navigation
Description
repo:objectstack#8 · sunhaolin · session_017xRBcSSm1UGomShRsemA1N
Filing gate: ③ maintainer-directed (topic parent). Source: maintainer. Key words (maintainer, 2026-11-28, this session): 「使用 pm-dispatch 技能,立一个专题卡 包括 阶段 0 1 2」「然后使用 本账户下的 objectstack #8 座位开一个分区,专题派发此卡」; earlier in the same session, on scope: 「我们不能只考虑规章制度」「AI 整理我只是举例,不是必须的」「以上所有问题汇总用 fable 深度分析」. The phases below come from an independent Fable review of the session's analysis, which corrected it in three places (noted inline).
Grading: area:ai · topic parent (no type) · p2 · reach: every app that indexes long text through knowledge_source (policies, contracts, manuals, wiki pages, long ticket text) · evidence: measured on main 600197a against a 4,224-document real corpus (BrightRule), and read from the code.
维护者速读
- 做什么:知识检索的切分与命中改造,面向任何长文本(制度、合同、手册、知识库、工单长文本),不只制度库。三件事:切分不丢内容、不挂错章节;一个单元(条、节、问答)恰好一段;每段带上它属于哪份文档、哪个单位;命中后模型能拿到相邻内容而不必读全文。
- 谁受益:用知识检索作答的终端用户和 AI 助手;写知识源的应用作者(BrightRule 可去掉自写的「制度条款」派生对象和钩子)。
- 分三阶段:阶段 0 修正确性(现在就派);阶段 1 零配置改进 + 文档 + 消融评测;阶段 2 段头配置、命中扩展、字段类型感知,顺序看阶段 1 评测结果再拆卡。
- 要你做的:裁决子卡上的决策(第一张:「放得下的章节整节一段」做成
markdown默认行为,还是只写进文档)。
Why (evidence, measured)
- Today, on the real corpus, 4.9% of numbered articles land in exactly one passage under
recursive(default); 71% share a passage with other articles. Re-measured by the Fable pass with a line-attribution metric; the session's first figure (16.6%) was biased upward. - The
markdownstrategy loses heading text: 918 heading lines in 65 documents appear in no passage and in noheadingPath, including whole one-line articles; body-less sections are also filed under the next chapter's path. Read atsplitter.ts:521-531, reproduced on synthetic samples. - With each unit written as a heading and
split: { strategy: 'markdown', minChars: 800 }(equal tomaxChars), today's code already gives 97.2% one passage per unit and 0% mixed passages; the app's own clause hook gives 95.5%. Correction to the session's analysis: issue service-knowledge: no split that keeps one passage per article; short articles are merged and tables lose the note after them #38290's option 2 is viable, withminChars = maxChars, notminChars: 0. - Embedding sees only the passage text (
turso-adapter.ts:510); the document's title and owning unit are not in it. In the app's evaluation, passages that named their unit answered unit-scoped questions better (8/15 → 11/15 with the asker's unit in the prompt) while passages that did not got worse (10/15 → 7/15). 15 questions, one run: enough to start a card, not to rank it. - The 84% → 94% long-document gain quoted in service-knowledge: no split that keeps one passage per article; short articles are merged and tables lose the note after them #38290 changed at least six variables at once (unit, passage prefix, merged sources, dedupe, skill rules, removed examples), one run against three, with a 4–5 point run-to-run range. It is not evidence for splitting alone; phase 1's ablation is.
Phase 0: correctness (dispatch now)
| Child | Scope | Blocked-by |
|---|---|---|
#38350 — markdown drops body-less headings |
A body-less section's heading is kept with its whole parent path; a carried heading never crosses a parent section; the end-of-document carry is not dropped (an unclosed code fence keeps its CommonMark meaning). Acceptance: 0 heading lines lost on the measured corpus; property test "every non-blank source line is in some passage's text or path". | #38349 |
| #38349 — split version per strategy | The split algorithm version is read per strategy, so a change to one strategy rebuilds only that strategy's sources (knowledge-index-fingerprint.ts). |
none |
Phase 1: zero-config improvement, docs, evaluation
| Child | Scope | Blocked-by |
|---|---|---|
| #38351 — a fitting leaf section is one passage (decision owed) | markdown: a leaf section that fits maxChars is one passage, in the same version bump as 0-1 when the ruling lands first. Acceptance on the measured corpus after units are headings: ≤0.5% of units under maxChars split; 0 mixed; fitted table + note together ≥95%. |
#38349 |
| #38290 (adopted) | Docs: the one-passage-per-unit recipe (one heading per unit; a derived field on the same record carries the index text; an optional synthetic top heading names the document and its unit); minChars is a merge threshold; the settings page's chunk_target label and help text agree. Then answer #38290. |
#38350, #38351 |
| 1-3 (row) | Ablation in the app's evaluation repo: unit (heading / article) × passage header (on / off) × after the hit (passage only / whole section / whole record), vector search, ≥3 runs per cell, mixed-version blind grading, 30 new questions that tuned nothing. Its result orders phase 2. Reader: the maintainer's evaluation session (not a fleet card). | none |
Phase 2: context and hits (rows; split into cards after 1-3 reports)
| Row | Scope |
|---|---|
| 2-1 | source.header: string[] beside content: the listed fields form one line that leads every passage of the record and is embedded with it; a lookup reads its display value, a select its label; same egress and withheld-field rules as content; a fingerprint change. No cross-object paths in the first version. |
| 2-2 | Hits return the source's declared metadataFields: landed (#38291, PR #38353); related, not a child. What is left, the parent record's display values (a hit carries the parent's id, not its name), is part of #38412's expand.follow. |
| 2-3 | Hit expansion: fetch the neighbouring passages, or every passage under the same heading path, by documentId. Carried by #38412 (expand), which also proposes following one declared lookup from the hit (the related record's display fields or passages, re-checked as the caller; no separate graph store); it stays a row here if that ruling declines the block. |
| 2-4 | Content field types: html / richtext fields become structured text before splitting; separate content fields are never merged into one passage; optionally the field name leads the path. |
| #38411 — keyword leg for unspaced CJK questions | A Chinese, Japanese or Korean question written without spaces is one keyword term today, so the keyword leg ranks nothing; split CJK runs into overlapping 2- and 3-character pieces in both stores. Query-side only, no rebuild. Not ordered by 1-3: a defect, dispatchable now. |
#38412 — declared retrieval block (decision owed) |
Per source: affinity (a declared field against a platform-resolved fact about the asker: boost, filter or nearest in a hierarchy), recency (decay on a declared date field), expand (row 2-3 plus one declared lookup hop). Omitted means today's order; ranking only, after the permission re-check. Blocked-by: #38363 for affinity. |
| #38363 (adopted) — an MCP client's model is told who is signed in | The asker's user, organization, unit chain, teams and positions reach the model (an initialize paragraph, a read-only tool as fallback); lands in packages/mcp, outside this topic's file territory. Prerequisite of #38412's affinity. |
Out of this topic (file only when a second consumer asks): a numbered-outline preset (auto-selected level families, guarded against fake headings, no user regex); copying a table's note onto each cut piece; passage-level dedupe; AI structure annotation or AI passage context. Normalising an app's Markdown (deterministic or AI) stays with the app; the platform keeps markdown correct on normalised input.
Rules every child keeps
- A key lands with its first reader in the same PR (ADR-0049); no key ships without its enforcer.
- Embedding is egress: whatever enters a passage (content or header) is listed explicitly; credential-class and
internalfields never enter. - A passage stays a slice of the source text plus the declared header and path; nothing the platform generates is mixed into quoted text.
- Changes that change passages for the same input bump the strategy's algorithm version once per release train, not once per card.
Done when
On the measured corpus with units written as headings: no source text is lost; ≥97% of units are one passage under the documented recipe; each passage carries its document and unit when the source declares a header; and the ablation reports the effect of splitting, header and hit expansion with intervals.
Exception note (pm:epic on a server line): opened by the maintainer's words above; territory = packages/services/service-knowledge/src/split/**, packages/services/service-knowledge/src/knowledge-index-fingerprint.ts, content/docs/ai/knowledge-rag.mdx; phase 2 adds packages/spec/src/ai/knowledge-source.zod.ts, packages/services/service-knowledge/src/knowledge-service.ts (recordToDocument), packages/services/service-knowledge/src/knowledge-tools.ts and packages/plugins/knowledge-* when its cards are split.
Reader: repo:objectstack#5 (handed over 2026-11-28 by the maintainer's word 「知识切分专题也交给5号座位」; earlier repo:objectstack#8, zone knowledge-split, area session session_017xRBcSSm1UGomShRsemA1N, released).
Related, not children: #37000 (knowledge platform topic), #37098 (the splitter, closed), #37001 (platform boundary ADR, closed), #38291 (hit metadata, in flight elsewhere).
Dedupe (open and closed): splitter markdown heading 3 (#38290 open, #37098 closed) · knowledge split 278 (no open card on the split behaviour but #38290) · minChars 5 (#38290, #37292, #37098, #37001 closed; #37309 Studio form, unrelated) · knowledge header passage 18 (#38291 the only open match) · search_knowledge neighbour passages 0 cards · knowledge html richtext 0 cards · SPLIT_ALGORITHM_VERSION 0.
Activity
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#8 · sunhaolin · session_017xRBcSSm1UGomShRsemA1N
维护者速读
repo:objectstack#5);8 号座位的knowledge-split分区随之释放。Handover
Maintainer's words (2026-11-28, this session, in order): 「除了收尾了任务,剩下的任务都挂到知识专题下,交接给5号座位继续处理」「知识切分专题也交给5号座位」.
From
repo:objectstack#8, zoneknowledge-split, area sessionsession_017xRBcSSm1UGomShRsemA1N→ torepo:objectstack#5. The topic'sReader:line now names seat 5. Seat 8's zone is released: no lease, no claim, no open PR is left behind.Done (closed, no action)
SPLIT_ALGORITHM_VERSION_BY_STRATEGY); no index rebuilt.markdownkeeps every heading: on the 4,224-document corpus, heading lines lost 918 → 0.markdown: 2.Handed over (open, children of this topic, none claimed, no open PR)
needs-user-decisionneeds-user-decisionpm:queue, p3SPLIT_ALGORITHM_VERSION(narrowing) and add the ADR-0161 K7 revisions row.pm:queue, p2docs/adr/**): the maintainer approves the merge. The three ◆ choices are already ruled 「以上都同意」.pm:blocked(Blocked-by: #38368)pm:queue, p2 · time-sensitivestarter→biz.pm:queue, p2 · time-sensitivepm:queue,repo:cloudbiz_rename reaches new workspaces. Follows #38371.pm:blockedRelated, not a child: #38352 (
needs-user-decision, parent #37000). Triage noted that #38368 settles option A's premise.Pending rulings (carry them to the maintainer)
docmetadata) through the knowledge service: which of three shapes #38352: A vs E. E is a pause withRestart-when: closed #38368. The maintainer said 「38352 手册搜索暂停」 and also asked for an analysis; the analysis was given in this session. Get the final letter recorded on the card.Watch out for
starter_names ship.baseis a reserved platform namespace (PLATFORM_RESERVED_NAMESPACES). That is why the name isbiz.blank-template-starter-parity.test.tsrequires the blank template's objects to equalexamples/app-starter's. Change both in one PR.markdownis already at 2 in this train.estimateTokens, so a scratch copy of the splitter runs without the workspace build.objectstack-fleet commentedon Nov 28, 2026
triage#1 · sunhaolin · session_017xRBcSxvUE3fDrox79CL9t
Maintainer ruling recorded · 2026-11-28T23:16Z · topic #38346 is handed over to seat
repo:objectstack#5.session_017xRBcSxvUE3fDrox79CL9t, right after the same ruling for topic 专题:知识检索平台化(应用写一份知识源配置就有可用的检索:开源、托管、企业版都能用) #37000 (record 7247286629).repo:objectstack#8's knowledge-split area (sessionsession_017xRBcSSm1UGomShRsemA1N) runs it perseat-lifecycle.md: each card it holds either lands, or carriesRelease:+Resume-from:and returns to the queue for seat 5. Seat 5 then claims byResume-from:and takes the topic's next phases and its tracking.retrievalblock — rank hits by the asker's relation to a declared field, by recency, and expand a hit along declared structure #38412os-project-manager commentedon Nov 29, 2026
maintainer · os-project-manager · session_01FEkQ5oW6SeQkzCccNxEc83
Cards added to this topic on the maintainer's words (2026-11-29, this session): 「相关任务都加入知识专题」. They come from a policy Q&A evaluation over MCP on 19.0.0-next.2 (tooling: objectstack-ai/brightrule#88); each is written as a platform capability for any metadata app, per 「你的评估不能只考虑当前的规章制度,要考虑客户可能开发的各种元数据应用」.
Body edit: the phase 2 table only. Rows 2-2 and 2-3 were updated (2-2 landed as PR #38353; 2-3 is carried by #38412's
expand), and three rows were added. Nothing else in the body changed.Children added:
retrievalblock — rank hits by the asker's relation to a declared field, by recency, and expand a hit along declared structure #38412: a declaredretrievalblock on a knowledge source: affinity to the asker, recency, hit expansion including one declared lookup hop (decision owed;Blocked-by:mcp: tell the model who is signed in — the asker's user and business-unit chain reach the ask route (cloud#5099) but not an MCP client #38363 for the asker part). No separate graph store is proposed: the object model's declared lookups are the graph.Related, not children:
fieldrecipient reads only a user column — a record's business-unit, team or position lookup cannot name who the record is shared with #38414: sharing a record with the unit, team or position its own field names (decision owed;area:data, the sharing surface).Not filed: per-connection MCP tool subsets. The evaluation used 3 of the 21 tools served, but its token cost per question is most likely accumulated retrieval output, not the tool list; that is an unmeasured performance observation, so it gets no card until someone measures the tool list's share.
Generated by Claude Code