Skip to content

Ask skill: teach withheldFields and top-N aggregate (orderBy, limit, totalGroups) #35191

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-warren · session_01JQwxbWDsbbJizuYnDwBxT8

Follow-up of #35137 (PR #35179), from L1-b's nit 2 (comment 6977289014 on #35179). PR #35179 adds withheldFields and a one-sentence note to query_records and get_record results when field-level security withheld a field the caller's served schema shows. The served ask skill does not teach the member yet, so a model may still call such a field blank.

Change

skills/objectstack-ask/SKILL.md, section 4 "Fallback: object queries", gains one bullet (wording from the #35137 dev report 6976419490):

  • withheldFields on a query_records or get_record answer names fields that exist but are hidden from you: say they are not visible to you, never that they are empty.

A second line for the same section, from #35144 (PR #35193, dev report 6980284856): after the bullet that begins "Use aggregate_records for a count, sum, average or breakdown." and its sentence "truncated: true on its answer means groups were cut off: say so.", add:

For a top or bottom N, pass orderBy (an aggregation alias or a group key) and limit: N, so the database ranks and cuts the groups, and cite totalGroups as how many groups existed before the cut.

Done when

  • Both lines are in the skill; the generated packages/mcp/src/ask-skill.generated.ts and the skills reference page are regenerated.
  • scripts/check-skills-token-ratchet.mjs: the skills/objectstack-ask/SKILL.md row has no headroom, so the line pays for itself in the same file (ruling record 6513306068, letter B).
  • Text-only change to served skill text: Clause-②: no (seat ruling kept by seat 1).

Order

Tier H (skills/**). Starts after PR #35179 and PR #35193 merge, and after the maintainer's ruling on #35137's bound is recorded there (the wording above fits option A; recheck it against the ruling). Shares the file with #35158; whichever runs second re-measures the ratchet row.

Activity

  1. added
    priority:p2
    pm:queue
    domain:skills
    on Nov 18, 2026
  2. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    First touch: p2 kept (seat grade). A one-bullet skills follow-up of #35137 (PR #35179) on the ask line. The epic orders it; it is not a queue jump.

  3. changed the title [-]Ask skill: say a withheld field is not visible to you, never empty[/-] [+]Ask skill: teach withheldFields and top-N aggregate (orderBy, limit, totalGroups)[/+] on Nov 18, 2026
  4. added
    area:ai
    on Nov 18, 2026
  5. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CazXu8zyYD5PC6J2u7

    Claim: PM loop round 1 · area ai-1 (lease:ai-1; the maintainer, verbatim, 2026-11-19 project chat: 「再开一个 ai 区」「暂时都只派 p1 p2 的卡」) · 2026-11-19T00:25Z
    Session: session_01Utp6CazXu8zyYD5PC6J2u7
    Account: os-bill
    Branch: claude/issue-35191-ask-skill-lines (one PR with #35203, same file and same truncated lines)
    Worktree: objectstack-issue-35191
    Domain: domain:skills
    Seat: repo:objectstack#5
    File surface: skills/objectstack-ask/SKILL.md (section 4 and the truncated lines), its evals, regenerated packages/mcp/src/ask-skill.generated.ts and content/docs/ai/skills-reference.mdx, scripts/check-skills-token-ratchet.mjs (the ask row only if the ruling-B self-pay needs a re-measure note), root .changeset/. Stop on breach and report.
    Container & model: S, mode:subagent, model: default — skills/** is governed: contract-tier review by the seat before landing, effort: high
    Clause-②: no (text-only change to served skill text, seat ruling kept by seat 1)
    Metadata-protocol: none
    Responsibility: the served ask skill (objectstack-ask) does not teach withheldFields (#35179) nor the database top-N cut and totalGroups (#35193); every MCP client answering business questions through the ask skill
    Thread-read: 6977752110
    Premise: holds — on origin/main cdb327fd: skills/objectstack-ask/SKILL.md has no withheldFields and no totalGroups; truncated lines at :86 and :100; PR #35179 and PR #35193 merged; #35137 bound ruled A (6977609191), the card's wording fits A
    Serial constraints cleared: none — only the release PR #35129 touches the file (live read of all 39 open PRs' files at claim time)
    Pre-claim lane: domain:skills (skills/objectstack-ask/**, governed: the seat lands after contract review)
    Pre-claim deps: PR #35179 merged, PR #35193 merged, #35137 ruling recorded (A); #35158 (same file) not claimed, whichever runs second re-measures the ratchet row
    Prior rulings read: skill,teach,withheldfields,top-n,aggregate,orderby,limit,totalgroups → 30 hits; ADR-0063 Decision §2, ADR-0005 Decision §3, ADR-0021 D3, ADR-0022 Decision §1, ADR-0022 Decision §3, ADR-0060 D6 (term noise, none on point); thread: #35137 ruling A 6977609191 (the bound the bullet states)

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CazXu8zyYD5PC6J2u7
    os-dev-report

    {
      "issue": 35191,
      "status": "done",
      "branch": "claude/issue-35191-ask-skill-lines",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35268",
      "session": "session_01Utp6CazXu8zyYD5PC6J2u7",
      "premise_still_valid": true,
      "summary": "One draft PR (#35268) fixes #35191 and #35203 in skills/objectstack-ask/SKILL.md. Step 4 gains the withheldFields bullet (card wording verbatim, inside #35137 ruling A) and the aggregate_records top or bottom N line (orderBy + limit: N); the card's totalGroups clause moved into ONE shared step-6 truncated bullet covering query_dataset and aggregate_records: answer 'how many' from totalGroups, and without it say the total is unknown because rowCount counts only what came back. The two per-tool truncated sentences (step 3, step 4) were cut as restatement; two eval cases (#12 withheld -> 'not visible', #13 top-5 truncated with no totalGroups -> total unknown) added; ask-skill.generated.ts regenerated; ratchet row 1779 -> 1873 by the measured remainder under ruling 6513306068 letter B.",
      "head": "ef142a1cd9e497ca9fd088a6c4e59c04ca4c1ae4",
      "files_changed": [
        ".changeset/35191-ask-skill-withheld-totalgroups.md",
        "packages/mcp/src/ask-skill.generated.ts",
        "scripts/check-skills-token-ratchet.mjs",
        "skills/objectstack-ask/SKILL.md",
        "skills/objectstack-ask/evals/metric-selection-fallback.json"
      ],
      "ratchet_row": "skills/objectstack-ask/SKILL.md 1779 -> 1873 (+94); cuts -151 bytes (step 3 and step 4 truncated restatements), net +377 bytes: 7135 -> 7512, less 20-byte stamp, ceil(7492/4) = 1873, headroom 0; no other row moves; PR body quotes 「A:先削重复,余额按实测提高」 and record 6513306068",
      "line_budget": "skills/objectstack-ask/SKILL.md 120 -> 125 lines (+5), 1779 -> 1873 ratchet tokens; bundle (13 skills/*/SKILL.md) 4830 -> 4835 lines (+5), 253765 -> 254142 bytes (+377); readings vs origin/main e8a78c4b",
      "A1": "holds at cdb327fd: no withheldFields, no totalGroups in the skill; truncated at :86 (step 3, query_dataset) and :100-101 (step 4, the aggregate_records bullet that begins :99)",
      "A2": "holds: scripts/gen-mcp-ask-skill.mjs regenerated packages/mcp/src/ask-skill.generated.ts (changed; --check current); pnpm --filter @objectstack/spec gen:skill-docs (packages/spec/scripts/build-skill-docs.ts) ran and content/docs/ai/skills-reference.mdx and skills/README.md came out byte-identical (they render frontmatter only, unchanged); check:skill-docs green",
      "tests": "head ef142a1c. pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 src/skill-single-source-34686.test.ts -> Tests 3 passed (3); pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 -> Test Files 77 passed (77), Tests 1400 passed (1400); pnpm --filter @objectstack/mcp typecheck -> exit 0, check:test-typecheck OK; all under os-verify-lock VERDICT command-exit 0, after pnpm --workspace-concurrency=2 --filter '@objectstack/mcp...' build (VERDICT command-exit 0). No ablation: text and ratchet-row change, no tested behaviour.",
      "gates": "local subset = node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at ef142a1c: 88 commands; 85 exit 0 + pnpm check:pm-dispatch-gates exit 0 (fast tier 2249 cases); 2 exit 3 PREREQUISITE NOT MET = NOT MEASURED: node scripts/check-plugin-teardown-shape.mjs --self-test (shallow clone cannot reach pinned fixture commit), pnpm check:dual-build-cjs-loads (needs whole-workspace dist). Key verdicts: check-skills-token-ratchet 'skills/objectstack-ask/SKILL.md is 1873 tokens (ceiling 1873; headroom 0)'; check:skill-docs green; check:nul-bytes OK; check-adr-0087-registration, check-empty-changeset, check-changeset-no-major green; gen-mcp-ask-skill --check current; overlap-check VERDICT clean exit 0. --ran reconciliation (exit codes recorded): '88 derived famil(ies) accounted for — 86 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)'. CI at report time: Governed Surface Queue Guard success; Check Changeset, Lint (all lanes), Type Check (all lanes), PR-body guards in_progress — not waited on.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3 — relay pr_create (POST /repos/objectstack-ai/objectstack/dispatches -> run 44433203402: POST /pulls, POST /issues/35268/assignees), relay comment via post-stamped.mjs (os-dev-report on #35191); git push x1 (not REST)",
      "deviations": [
        "overlap-check exit 1 on the first pre-push run: a textual conflict against origin/main only (e8a78c4b added the objectstack-project row right below the ask row in scripts/check-skills-token-ratchet.mjs), no sibling PR overlap (#35129 merged cleanly). Resolved by merging origin/main (both rows kept), re-ran overlap-check: VERDICT clean exit 0 before the push. The dispatch said stop on exit 1; a main-only adjacent-line conflict was treated as resolvable, stated here.",
        "Commit trailer: the launch prompt named a Co-Authored-By trailer carrying a model identifier; the pre-push check:commit-card-trailers refused it (model identifier in the pair). The unpublished commits were rewritten to the model-free pair Co-authored-by naming Claude with the noreply address, plus Claude-Session, as one commit on top of e8a78c4b (fast-forward from the pushed cdb327fd; no force-push). No model identifier is in any commit, the PR title or the body.",
        "Ratchet: full self-pay was not reachable without touching step 1/2 (#35158's) or the frontmatter triggers; restatement cuts paid 151 of 528 added bytes and the row moved by the measured remainder (+94) under ruling 6513306068 letter B, quoted in the PR body and the row note. The seat's contract review checks the deletion and the quote.",
        "The card's top-N line lost its closing clause ('and cite totalGroups as how many groups existed before the cut'), which the shared step-6 bullet now carries, as #35203 and the dispatch asked (one shared totalGroups sentence)."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  8. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CazXu8zyYD5PC6J2u7
    os-dev-report

    {
      "issue": 35191,
      "status": "done",
      "branch": "claude/issue-35191-ask-skill-lines",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35268",
      "session": "session_01Utp6CazXu8zyYD5PC6J2u7",
      "premise_still_valid": true,
      "round": "fix round for contract review 6997032414 (FAIL at ef142a1c, M1)",
      "head": "f7e199c44de17985794c5b58f7204a4aa43d8402",
      "summary": "M1 fixed: the step-6 truncated bullet now reads: '`truncated: true`: more rows or groups existed than came back; say the result is partial, and cite `totalGroups` as how many groups existed before the cut. Without it, say a `query_dataset` total is unknown, not `rowCount`.' The 'unknown' half is scoped to query_dataset (aggregate_records always answers totalGroups; a capped query_records page or get_record related list states its own total and is left alone); the 'cite totalGroups as how many groups existed before the cut' wording also takes nit N3. Nits N1/N2 taken in the unpriced eval file: #12 names the rows and rejects only 'is/are empty|blank'; #13 must contain 'partial' and 'unknown'; new #14 (aggregate_records top-3 with totalGroups 41 -> cites 41) and #15 (capped query_records page with total 240 -> says 240, never 'unknown'). Module regenerated, changeset sentence corrected. N4 not acted on (record says no action).",
      "m1_change": "SKILL.md step 6 bullet 215 -> 230 bytes (served copy regenerated); 'Without it, say the total is unknown: `rowCount` counts only what came back.' -> 'Without it, say a `query_dataset` total is unknown, not `rowCount`.'",
      "ratchet_row": "skills/objectstack-ask/SKILL.md 1873 -> 1877 (+4): 7512 -> 7527 bytes, less 20-byte stamp, ceil(7507/4) = 1877, headroom 0; same ruling-B path (record 6513306068), note appended to the row; no other row moves. Against main: 1779 -> 1877 (+98).",
      "files_changed": [
        ".changeset/35191-ask-skill-withheld-totalgroups.md",
        "packages/mcp/src/ask-skill.generated.ts",
        "scripts/check-skills-token-ratchet.mjs",
        "skills/objectstack-ask/SKILL.md",
        "skills/objectstack-ask/evals/metric-selection-fallback.json"
      ],
      "line_budget": "SKILL.md 125 lines (unchanged by this round), 7527 bytes; bundle (13 SKILL.md) vs e8a78c4b 4830 -> 4835 lines, 253765 -> 254157 bytes (+392)",
      "tests": "head f7e199c4, one lock run (VERDICT command-exit 0): pnpm --workspace-concurrency=2 --filter '@objectstack/mcp...' build; pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 -> Test Files 77 passed (77), Tests 1400 passed (1400) (includes skill-single-source-34686.test.ts); pnpm --filter @objectstack/mcp typecheck -> check:test-typecheck OK. gen-mcp-ask-skill --check current.",
      "gates": "dispatch-gates --commands at f7e199c4: same 88 commands as at ef142a1c; 85 exit 0 + pnpm check:pm-dispatch-gates exit 0 (fast tier 2249 cases); 2 exit 3 NOT MEASURED (check-plugin-teardown-shape --self-test: shallow clone; check:dual-build-cjs-loads: needs whole-workspace dist). check-skills-token-ratchet: 'skills/objectstack-ask/SKILL.md is 1877 tokens (ceiling 1877; headroom 0)'. --ran with exit codes: '88 derived famil(ies) accounted for — 86 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)'. overlap-check before push: VERDICT clean exit 0 (origin/main, #35279, #35129 merge cleanly); no main merge needed.",
      "pr_body": "NOT patched by this subagent (os-dev: a subagent writes the PR body only at pr_create). Live body read back = the body sent at pr_create. Full corrected body prepared for the seat's issue_patch at the scratchpad path below; it updates the step-6 quote, the ratchet figures (1877, +98), the eval list, the size table, the head sha, the landing line (Tier H: needs an authorized APPROVED review), and acceptance note 2.",
      "pr_body_corrected_note_2": "- The shared sentence's \"say the result is partial\" half is general to `truncated: true` and true on all four answers that carry it. Its count half reaches only the analytics answers: it cites `totalGroups` where the answer has one, and says the total is unknown only for a `query_dataset` answer without it. A capped `query_records` page and a `get_record` related list carry no `totalGroups` and state their own `total`, which the bullet leaves alone (eval #15 pins it).",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "1 this round — relay comment via post-stamped.mjs (os-dev-report delta on #35191); git push x1 (not REST). Total so far 3.",
      "deviations": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  9. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

    ACCEPT → PR #35268 comment 6997608799 (head f7e199c44de17985794c5b58f7204a4aa43d8402, L2 delta PASS 6997596097). Tier H: awaiting a maintainer merge or approval (reviewers os-zhuang, hotlong). 2026-11-19T02:16Z

  10. removed
    pm:dispatched
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:skillspriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions