Skip to content

service-knowledge: no split that keeps one passage per article; short articles are merged and tables lose the note after them #38290

In review

Description

@baozhoutao

For text organized as numbered articles, such as company policies, regulations and contracts, service-knowledge has no split that keeps one passage per article. The markdown and recursive strategies merge short adjacent articles into one passage and can separate a table from the note that follows it, so search cannot point at a single article.

What we measured

A Chinese policy library, the BrightRule app: 1,916 published policies with 34,677 articles. Each article is a paragraph that starts with **第X条**.

  • The median article is 96 characters, and 78% are under 200.
  • With split: { strategy: 'markdown' }, adjacent pieces under minChars (default 200) are merged. Even after rewriting each article as a heading, 2–4 articles share one passage. The group travel policy's 28 articles came out as 10 passages.
  • A table and the line right after it, such as 「注:一类地区指北京、上海……」, which defines the table's rows, land in different passages. A question about the table then retrieves the table without its definitions.
  • Long manuals without article numbers use numbered headings such as 4.6.7 or (三). Some lines styled as headings are really body text, so the heading path is not reliable.

Effect

On 132 real questions, moving from heading-based passages to one passage per article raised the score on questions about long documents from 84% to 94%. Other question types did not change.

Ask

One of:

  1. A split strategy that cuts at a configured unit pattern, such as a regex for 第X条 or a heading level, keeps each unit as one passage without merging neighbours, cuts a unit only when it exceeds maxChars, and keeps a table together with the line immediately after it.
  2. Or document that minChars: 0 combined with one heading per unit is the supported way, and keep a table and its trailing note together under that setting.

Workaround in use

The app derives an object with one row per article (attachments included) through a hook, and indexes it with split: { strategy: 'whole' }.

Related: objectstack#38026, objectstack#37974.

Activity

  1. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    Contributor

    triage#1 · sunhaolin · session_017xRBcSxvUE3fDrox79CL9t

    Triage: lands in the service-knowledge splitter (whole / recursive / markdown, #37098) and, for option 1, a new value of the knowledge_source split key in packages/spec · area:ai · domain:server (+ domain:spec for option 1, a Seam card) · Feature · p2 · needs-user-decision · size M. Rationale: the card asks for a split that keeps one passage per article (a unit pattern, no merging of short neighbours, a table kept with its trailing note), or, as option 2, documenting minChars: 0 with one heading per unit. Choosing between them, and adding a protocol value, is a new capability that is not pre-authorised and a public-contract widening, both on the human floor. The evidence is measured by the author on a named app: 1,916 policies / 34,677 articles; 28 articles → 10 passages; 84% → 94% on 132 questions with one passage per article. The author is outside the fleet, so the fleet-Feature p3 rule does not apply. A Feature is not graded by the table, and p2 reflects the measured pull. For the analysis: check whether the "table loses its trailing note" half is a Bug of a shipped splitter promise, which could be split off, and whether the card belongs under the knowledge topic #37000. ⛔ The decision analysis (速读, options with effort, four-facet block) is owed by a decision thread.
    Path: none
    Grade: area:ai · Feature · not table-graded · reach: builders of knowledge sources over article-numbered text (a named app) · evidence: measured by the author.

    Recorded 2026-11-28T14:14Z.

  2. added
    area:ai
    domain:server
    needs-user-decision
    priority:p2
    on Nov 28, 2026
  3. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#8 · sunhaolin · session_017xRBcSSm1UGomShRsemA1N

    Adopted as a child of topic #38346 (phase 1, docs row), on the maintainer's words quoted there.

  4. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5mzSTSPADAvwapnhxr

    Ruled: #38351 ruling A (the maintainer's ruling, record 7247322956): a fitting markdown section becomes one passage by default. That was this card's open question, as its adoption under #38346 says (7240927631: "Whether a fitting section becomes one passage by default is #38351 (a maintainer decision)"). · 2026-11-29T03:21Z

  5. added
    pm:queue
    and removed
    needs-user-decision
    on Nov 29, 2026
  6. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
    Claim: PM loop round 1 · 2026-11-29T03:22Z
    Session: session_01FEkQ5oQLfL8thb6wtUHnTb
    Account: os-project-manager
    Branch: claude/issue-38290-one-passage-per-unit-recipe
    Worktree: objectstack-issue-38290
    Domain: domain:server
    Seat: repo:objectstack#5
    Area: o5-ai37000
    File surface: content/docs/ai/knowledge-rag.mdx (the split section), content/docs/protocol/knowledge.mdx (§3.5 only where the recipe cross-references it), packages/services/service-settings/src/manifests/knowledge.manifest.ts and the chunk_target label and help in packages/services/service-settings/src/translations/*.ts (+ knowledge.manifest.test.ts if it pins the text), one patch changeset (stop on breach; explain in the report). ⛔ No skills/** (#38442 carries the skill), no docs/adr/**.
    Container & model: S, mode:thread, model: default (dispatch-gates --tier at f459c86, no path-derived mandate; teaching prose with design judgement, so not floor), effort: high (reason: a teaching recipe that must match landed splitter behaviour across two docs pages and 11 locales; design judgement, not mechanical)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 7249998150
    Premise: holds at f459c86 — the topic's docs row on #38346 names the work: 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 taught as a merge threshold for sections that do not fit, and the settings page's chunk_target label and help agreeing (en.ts:425–426 reads "Target chunk size (chars)" / "Longest passage, in characters…"). Ruling A of #38351 is on main (PR #38439, f19ee34), so no minChars = maxChars step is taught (its item 6).
    Serial constraints cleared: check-handover --inflight at f459c863e3: 2 overlaps, handled. (1) #38369 (this area's card thread) claims both docs pages for its not-enabled state text, a different section; no open pull yet; overlap-check (merge-tree) before every push and queue only on a real conflict, as #38351/#38377 did on splitter.ts. (2) #38184 (seat repo:objectstack#6) claims packages/services/service-settings/** wide and its open PR #38255 touches no file there: false overlap, overlap-check before each push.
    Pre-claim lane: content/docs/**, packages/services/** ⇒ domain:server (file ownership only); topic #38346's docs row, this area's epic.
    Pre-claim deps: #38350 and #38351, both closed (merged).
    Prior rulings read: ruling A on #38351 (7247322956, 「#38351 同意」) and its items 1, 2 and 6; the seat's Ruled: line 7249998150; the adoption 7240927631.

  7. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 29, 2026
  8. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb

    Claim amended (7250017151), branch only. The card thread (session session_01FEkQ5mDidoPNcFwxVX65bA, served claude-opus-5-5 at effort high, matching the claim's Container & model line) may push only to its platform branch, so the PR's head is that branch. The local worktree keeps the claimed name.
    Branch: claude/project-thread-7d7mts
    Recorded 2026-11-29T03:25Z.

  9. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5mDidoPNcFwxVX65bA
    os-dev-report

    {
      "issue": 38290,
      "status": "done",
      "branch": "claude/project-thread-7d7mts",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38468",
      "session": "session_01FEkQ5mDidoPNcFwxVX65bA",
      "premise_still_valid": true,
      "summary": "Docs recipe for one passage per unit, as the markdown splitter behaves after ruling A (f19ee341): a new 'One passage per unit' section in the knowledge guide (one heading per unit; a derived field on the same record carries the index text; an optional top heading names the document; minChars taught as the merge threshold of a unit that does not fit, minChars: 0 not an opt-out), a pointer paragraph in protocol section 3.5, and the Knowledge page's chunk_target label renamed from 'Target chunk size (chars)' to 'Longest passage (characters)' with help saying passages can be shorter, in the manifest and all 11 locales. Patch changeset on @objectstack/service-settings. Served model claude-opus-5-5, effort high, matching the claim.",
      "tests": "pnpm --filter @objectstack/service-settings test at 340bb349: Test Files 79 passed (79), Tests 1545 passed (1545), exit 0. typecheck exit 0. No tested behaviour changed (docs and label text only), so no ablation.",
      "gates": "At 340bb349: dispatch-gates --commands derived 89 families; 86 exit 0; 3 exit 3 PREREQUISITE NOT MET (NOT MEASURED: check-plugin-teardown-shape --self-test needs an unshallow clone; spec check:skill-examples needs a client-react build; check:dual-build-cjs-loads needs every dist). dispatch-gates --ran: 89 accounted, 86 run, 3 NOT MEASURED. overlap-check --branch=HEAD: VERDICT clean exit 0. CI families: read from the PR's check runs.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "8 — read-only: issue_read x4 (38290 get and comments, 38346, 38351), plus session and PR subscription tools; no GitHub MCP write",
      "api_writes": "1 relay stroke (pr_create with assignees), plus this report comment",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: #38442 · skills/objectstack-ai/SKILL.md names the 'Target chunk size' setting; that dev was told to write 'Longest passage' and land after #38468 · noted, not filed"
      ]
    }
  10. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
    Claim: PM loop round 1 · 2026-11-29T03:54Z
    Session: session_01FEkQ5oQLfL8thb6wtUHnTb
    Account: os-project-manager
    Branch: claude/project-thread-7d7mts
    Worktree: objectstack-issue-38290
    Domain: domain:server
    Seat: repo:objectstack#5
    Area: o5-ai37000
    File surface: content/docs/ai/knowledge-rag.mdx (the split section), content/docs/protocol/knowledge.mdx (§3.5 only where the recipe cross-references it), packages/services/service-settings/src/manifests/knowledge.manifest.ts and the chunk_target label and help in packages/services/service-settings/src/translations/*.ts (+ knowledge.manifest.test.ts if it pins the text), one patch changeset (stop on breach; explain in the report). ⛔ No skills/** (#38442 carries the skill), no docs/adr/**.
    Container & model: S, mode:thread, model: default (dispatch-gates --tier at f459c86, no path-derived mandate; teaching prose with design judgement, so not floor), effort: high (reason: a teaching recipe that must match landed splitter behaviour across two docs pages and 11 locales; design judgement, not mechanical)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 7250043703
    Premise: holds at f459c86 — the topic's docs row on #38346 names the work: 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 taught as a merge threshold for sections that do not fit, and the settings page's chunk_target label and help agreeing (en.ts:425–426 reads "Target chunk size (chars)" / "Longest passage, in characters…"). Ruling A of #38351 is on main (PR #38439, f19ee34), so no minChars = maxChars step is taught (its item 6).
    Serial constraints cleared: check-handover --inflight at f459c863e3: 2 overlaps, handled. (1) #38369 (this area's card thread) claims both docs pages for its not-enabled state text, a different section; no open pull yet; overlap-check (merge-tree) before every push and queue only on a real conflict, as #38351/#38377 did on splitter.ts. (2) #38184 (seat repo:objectstack#6) claims packages/services/service-settings/** wide and its open PR #38255 touches no file there: false overlap, overlap-check before each push.
    Pre-claim lane: content/docs/**, packages/services/** ⇒ domain:server (file ownership only); topic #38346's docs row, this area's epic.
    Pre-claim deps: #38350 and #38351, both closed (merged).
    Prior rulings read: ruling A on #38351 (7247322956, 「#38351 同意」) and its items 1, 2 and 6; the seat's Ruled: line 7249998150; the adoption 7240927631.

    This re-posts claim 7250017151 with the card thread's platform branch (amendment 7250043703); the card thread was served claude-opus-5-5 at effort high.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:aidomain:serverpm:dispatchedpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions