Repository navigation
docs(knowledge): one passage per unit recipe, and the settings page names chunk_target the longest passage - #38468
objectstack-fleet[bot] wants to merge 1 commit into
Conversation
…ongest passage Teach the markdown split's one-passage-per-unit shape in the knowledge guide (one heading per unit, a derived field on the same record that carries the index text, an optional top heading naming the document, minChars as the merge threshold of a unit that does not fit), with a pointer from the protocol's split section. Rename the Knowledge page's chunk_target label to "Longest passage (characters)" and say passages can be shorter, in every locale. Claude-Session: https://claude.ai/code/session_01FEkQ5mDidoPNcFwxVX65bA Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 1 package(s): 2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 10 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 29052134c2a00e649b55ef1bd2b2f8f4b9df59e7 && git checkout 29052134c2a00e649b55ef1bd2b2f8f4b9df59e7
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 2052c8995a3d0df192087df6d9809f2aa7e9cb4e 340bb34988ddd7fa35944f1ca573233f11ced52b && git checkout -B drift-repro 2052c8995a3d0df192087df6d9809f2aa7e9cb4e && git merge --no-ff 340bb34988ddd7fa35944f1ca573233f11ced52b
node scripts/docs-audit/affected-docs.mjs --json 2052c8995a3d0df192087df6d9809f2aa7e9cb4e
|
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5mDidoPNcFwxVX65bA
Generated by Claude Code |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5mDidoPNcFwxVX65bA Final green head: |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5nNJM8FQkBco82NDFb 席位核对L1 (thread L1-a, area o5-ai37000) · read 2026-11-29T04:23Z · Head-sha: This is the first L1 record on this PR, a full review. Checklist (l1-face
My readings: the new section against
Nit (no action owed): the half rule has a third step. When even the unit's own heading leaves less than half, the passage carries no heading text ( Owed: nothing from L1. The area lands it. #38466 (#38442) lands after this one, because its "Longest passage" wording depends on this label. |
|
repo:objectstack#5 · os-project-manager · session_01FEkQ5mDidoPNcFwxVX65bA Landing #38468 at head
State: ready for review and auto-merge armed; the merge queue lands it, and the merge closes #38290. |
Requested by Leehom · project thread
Fixes #38290
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
content/docs/ai/knowledge-rag.mdx): a new### One passage per unitsection under "Splitting documents into passages". It teaches, as the landedmarkdownsplitter behaves at f19ee34:minCharsis, and a table with the note after it inside that unit stay together;recursivecuts, its pieces merged up tominChars; the note after a cut table can land in another piece;minCharsis the merge threshold of a unit that does not fit, not a switch, andminChars: 0turns nothing off;content(why the same record and not a second object: the hit names the record people open, the search re-checks that record as the asker,whereandmetadataFieldsread its own fields);contententry;contentandsplit, so it rebuilds once and re-sends the source to the embedder.content/docs/protocol/knowledge.mdx§3.5): one paragraph that states the result and points to the guide; the setting's name updated.packages/services/service-settings):knowledge.chunk_targetwas labelled Target chunk size (chars) while its help text and the splitter treat it as a maximum. The label is now Longest passage (characters) and the help adds that passages can be shorter, in the manifest and in all 11 locales (en, zh-CN, zh-Hant, ja-JP, ko, de, es-ES, fr, pt-BR, ru, ar). Key, default, bounds and reader unchanged.@objectstack/service-settings, which also says that earlier notes naming Target chunk size mean the same setting (the pending changesets that name it are not edited).Answer to #38290
The card asked for either a split strategy that cuts at a unit pattern, or a documented way to get one passage per unit. #38351's ruling A (record 7247322956, 「#38351 同意」, merged in PR #38439) made a fitting
markdownsection one passage by default, so the documented way needs no setting: write each unit as a heading.minChars: 0is not that switch and is not an opt-out (ruling item 2):minCharsonly merges the pieces of a section that does not fit. A table and its trailing note inside one fitting unit are one passage. The app's workaround (a second object with one row per article) can become a derived field on the policy record itself. The 84% → 94% figure is not cited here: the topic's adoption comment notes it changed several variables at once.Acceptance notes
skills/objectstack-ai/SKILL.mdstill names "the Target chunk size setting". Skills are skills: the AI skill teaches that a markdown section that fits maxChars is one passage (after #38351) #38442's surface; its dev was told to write "the Longest passage setting" and to land after this PR..changeset/pre/37098-knowledge-splitter.md,.changeset/pre/37292-skill-knowledge-split.md) are not edited; this PR's changeset carries the superseding sentence.Verification
All at head
340bb349, treeobjectstack-ai/objectstack, baseorigin/mainf459c86.pnpm --filter @objectstack/service-settings test: Test Files 79 passed (79), Tests 1545 passed (1545); exit 0.pnpm --filter @objectstack/service-settings typecheck: exit 0 (dependency closure built first, exit 0).node scripts/pm/overlap-check.mjs --branch=HEAD:VERDICT clean exit 0(merges cleanly with origin/main; no open PR head on these files).dispatch-gates --commands): 89 derived, 86 run with exit 0, 3 NOT MEASURED (exit 3, prerequisite not met, nothing measured; CI runs them):node scripts/check-plugin-teardown-shape.mjs --self-test: its positive control is pinned to a commit the shallow clone cannot reach.pnpm --filter @objectstack/spec run check:skill-examples: needs a@objectstack/client-reactbuild this diff does not touch.pnpm check:dual-build-cjs-loads: needs every package'sdist/, which this container did not build.dispatch-gates --ran: 89 derived families accounted for, 86 run, 3 NOT MEASURED (derived from the recorded exit 3).Two-minute check: open
content/docs/ai/knowledge-rag.mdxat "One passage per unit" and compare each bullet withwithPrefixandsplitMarkdowninpackages/services/service-knowledge/src/split/splitter.ts.Read first: the new section of
content/docs/ai/knowledge-rag.mdx(the claims a reader acts on), then thezh-CN.ts/ja-JP.tslabel wording.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (CI)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5mDidoPNcFwxVX65bA