Skip to content

37140 跟进:技能文档教作者写资料包(ai_context) #37177

Done
3 of 3 issues completed
Done

Description

@objectstack-fleet

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

Filing gate: ③ maintainer-directed (topic #36996 handed to this project). This is the Skills-docs: follow-up owed line of #37173 (#37140, Metadata-protocol: added).
Grading: area:ai · Task · p2 · evidence: read.

维护者速读

What

  1. In skills/objectstack-platform and skills/objectstack-ai, teach authoring an ai_context pack: the six v1 keys, the bounds (30 fields, 3 related, 10 related fields), what body and its anchors are for, and that get_record_context reads as the caller.
  2. Keep within each skill's shrink-only token ceiling; move detail into references where the ceiling binds.
  3. Every example parses against the spec on main and passes os validate.

Acceptance

  • The skill check and the token ratchet are green. An eval prompt ("give the AI a customer's open opportunities and notes") produces a valid pack.

Parent: #36996. Related: #37140, #37173.

Sub-issues

Sub-issues

3 of 3 Issues completed
Loading 3 sub-issues

Activity

  1. added
    priority:p2
    pm:queue
    area:ai
    on Nov 25, 2026
  2. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor
  3. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: blocked 2026-11-25T03:05Z (repo:objectstack#3's request 7151547806)

    Blocked-by: #37173

  4. added
    pm:blocked
    and removed
    pm:queue
    on Nov 25, 2026
  5. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor
  6. added
    pm:queue
    and removed
    pm:blocked
    on Nov 25, 2026
  7. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Scope note · 2026-11-25T14:22Z · area ai-36996. When this card is built, it also teaches the record-context capability token (requires: ['record-context'] mounts the record-context service so get_record_context exists) from #37189 / PR #37303, once that PR merges. PR #37303 adds only the enumeration rows (lanes/skills.md exception); the teaching is owed here (Skills-docs: follow-up #37177).

  8. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Scope note 2 · 2026-11-25T15:31Z · area ai-36996 · from the seat's L1 on PR #37303 (ACCEPT 7166882617, contract review PASS 7166850191), carried here as the seat asked:

  9. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

    Scope note 3 · 2026-11-25T16:58Z · from PR #37291 (card #37216), whose body carries Skills-docs: follow-up #37177. When this card is built, its skill text also teaches what #37216 changes for a pack author, following the ADR-0150 addendum (PR #37209):

    • A context pack is identified by its package and its name, like skill.
    • A namespace holds one pack per name. A second holder is refused at install (422 NAMESPACE_CONFLICT) and by os validate.
    • get_record_context's context takes a pack's face NAMESPACE-NAME. A bare name resolves only when one holder answers. A bare name that two packages hold is refused 409 RESOURCE_CONFLICT, and the refusal names each face.
    • GET /api/v1/meta/ai_context/NAME for a name two packages hold needs ?package= (or the /meta/ai_context/NS/NAME form). Without it, the read is refused 409.
  10. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Claim: PM loop round 4 · area ai-36996 (topic #36996 non-cloud rows; the maintainer, verbatim, 2026-11-25T12:57Z project thread: 「开一个 36996 专题,接手剩余任务」) · 2026-11-26T01:24Z
    Session: session_01Utp6CbeF2saT6wUBV4E9uc
    Thread session: session_01Utp6CaWzgwG1QYaiBidBCK
    Account: os-bill
    Area: ai-36996
    Branch: claude/project-thread-gx2ord
    Worktree: objectstack-issue-37177
    Domain: domain:skills
    Seat: repo:objectstack#5
    File surface: skills/objectstack-platform/** and skills/objectstack-ai/** (SKILL.md and references), their eval fixtures, the generated skills/objectstack-project/references/platform-catalog.md only if its generator moves, the token-ratchet row only under the lanes/skills.md enumeration-row exception (new text is otherwise paid for by deleting text), root .changeset/. Stop on breach and report.
    Container & model: M, mode:thread, model: claude-fable-5-1 — dispatch-gates --tier prints "Model tier — MANDATORY: claude-fable-5-2" (skills/**, no one-line exit); measured unavailability: get_session last_served_model and an Agent subagent with model fable both answer claude-fable-5-1 on this account (#37217, #37363), so 5-2 is not reachable. Built at 5-1, above the default tier. Compensating control: the L2 review at CONTRACT_REVIEW_TIER by a reviewer who reaches it, recorded on the handoff, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 7168812660
    Premise: holds — on origin/main 9ffe371: PR #37372 (ask_ai docs) and PR #37354 (related where/orderBy/limit) merged; the record-context token row landed with PR #37303
    Serial constraints cleared: PR #37372 merged (same skill tree); no other in-flight claim touches skills/objectstack-ai or skills/objectstack-platform
    Pre-claim deps: #37140 closed, #37203 closed
    Prior rulings read: seat notes 7166997849 (N1/N2) and the record-context token note on this card; lanes/skills.md lines 14–16

  11. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 26, 2026
  12. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Claim amendment · 2026-11-26T01:25Z · claim 7179749218 · answers the card thread's first report (before any edit).

    • Container & model, corrected: M, mode:thread, model: claude-fable-5-2 — dispatch-gates --tier prints "Model tier — MANDATORY: claude-fable-5-2" (skills/**, no one-line exit); served at tier: the thread's get_session last_served_model answers claude-fable-5-2, effort: high. The measured-unavailability exemption in the claim does not apply to this card. No compensating control is owed beyond the usual L2.
    • File surface, added for nits N1/N2 (7166997849), prose only: packages/spec/src/stack.zod.ts (the aiContexts .describe()) and the generated mirrors that describe moves (regenerated, not hand-edited); packages/services/service-record-context/README.md and the src/plugin.ts docblock. A patch changeset rides for the published packages. Metadata-protocol: none stands: describe and README prose do not change what an author can write.
    • Scope, confirmed: pack identity teaching from note 7168812660 rides this card, since PR feat(core,objectql,spec,service-record-context,mcp,runtime)!: a context pack is identified by its package and its name; get_record_context selects a pack by its face on both MCP doors #37291 is merged. That covers the face NAMESPACE-NAME, 422 NAMESPACE_CONFLICT, 409 RESOURCE_CONFLICT for a bare name that two packages hold, and ?package= on the meta read.
    • Dispatch order: /mnt/project-files/objectstack-seat5/ai-36996/dispatch-37177.md (project files; the thread reads it there).
  13. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Claim amendment 2 · 2026-11-26T01:26Z · claim 7179749218 · the ratchet route for the teaching.

    • Added to the file surface: one new row in scripts/check-skills-token-ratchet.mjs for the new hand-authored skills/objectstack-ai/references/context-packs.md, pinned at its measured size. This is the route the card's What item 2 names (detail moves into references where a ceiling binds). The existing rows for the two SKILL.md files are not raised. Their short pointers are paid for by deleting restatement in the same file, per the standing ruling 「A:先削重复,余额按实测提高」 (record 6513306068), applied with the cut first.
    • The PR body quotes this amendment's id and the measured size of the new row. Nothing else in the ratchet script moves.
  14. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Card thread for #37177 (mode:thread, area ai-36996 under seat 5) · 2026-11-26T02:50Z

    {
      "issue": 37177,
      "status": "done",
      "branch": "claude/project-thread-gx2ord",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37409",
      "session": "session_01Utp6CaWzgwG1QYaiBidBCK",
      "premise_still_valid": true,
      "summary": "Draft PR #37409, head e9b2056f, 11 files, +200/-32 against base 9ffe37153. A new reference skills/objectstack-ai/references/context-packs.md (111 lines, 5813 bytes) teaches the ai_context pack as main enforces it: the keys and bounds, a related list's where / orderBy / limit, the body and its outline, the two doors that mount the record-context service (requires: ['record-context'] through the CLI, or RecordContextServicePlugin in plugins), the get_record_context call, pack identity (package + name, the NAMESPACE-NAME face, 422 NAMESPACE_CONFLICT, 409 RESOURCE_CONFLICT), what the caller is not shown, and the five os validate rules. Both SKILL.md files gain short pointers paid for by deleting restatement in the same file, so neither ceiling moves; the one new token-ratchet row is the reference's own (1454, zero headroom, claim amendment 7179788843). N1/N2 from comment 7166997849: the aiContexts describe in packages/spec/src/stack.zod.ts and the service README and plugin docblock now name both mounts, with a patch changeset. One eval case (id 11) asks for a customer's open opportunities and notes. Deviation to read: the reference measured 1454 tokens against the 600 to 800 estimated to the area before writing; the PR's Acceptance notes say so.",
      "tests": "Example parses on main: AiContextSchema.safeParse of the reference's example -> 'parse success: true', and 7 refusal controls (limit 21, a description key, $contains, 4 related, 31 fields, 11 related fields, direction) each 'refused: true'. os validate on a scratch stack holding the example: no ai-context-* line; control with a non-long-text body field and a misspelt where field: ai-context-body-not-long-text and ai-context-field-unknown both reported. Eval case 11 through gradeAnswer (packages/qa/scenarios/src/skill-evals/grade.ts): reference answer {\"pass\":true,\"missing\":[],\"forbidden\":[]}; wrong-shape control {\"pass\":false,\"missing\":[\"opportunity\",\"related\",\"where\",\"body\",\"notes\",\"record-context\"],\"forbidden\":[\"filter:\",\"direction:\",\"aiReadable\"]}. pnpm --filter @objectstack/spec test: 896 files, 28442 passed, 1 todo. Under the verify lock (slot issue-37177): spec typecheck plus service-record-context typecheck and test (2 files, 99 tests) -> VERDICT command-exit 0. No ablation: no tested behaviour changed (prose, one describe string, one eval row, one ratchet row).",
      "gates": "Derived on the final head e9b2056f: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack -> 138 commands, each exit code captured before any pipe. --ran on the record: '138 derived famil(ies) accounted for — 136 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)'. 136 exit 0. NOT MEASURED locally (exit 3, prerequisite not met): node scripts/check-plugin-teardown-shape.mjs --self-test (shallow clone) and pnpm check:dual-build-cjs-loads (dists not built); CI covers both. Order of the run, said plainly: the 138 ran on the tree of f3cbf52a, where pnpm check:skill-top-level-keys exited 1 (the diff had cut a sentence that gate's self-test pins); e9b2056f restores the sentence and changes skills/objectstack-platform/SKILL.md only, and the 12 skill, generated and token-ratchet families were then re-run on e9b2056f, all exit 0 (check-skills-token-ratchet: 61 authored bundle files within their ceilings; check:skill-examples: 352 examples type-check after building the client-react closure, first run exit 3). pnpm check:pm-dispatch-gates: exit 0 (fast tier, 2313 cases). --tier: skills/** is a governed surface at the contract tier; 232 changed lines (+200/-32, 11 files) vs 3000: under. CI on head e9b2056f, read with node scripts/pm/pr-state.mjs --pr 37409 at 02:50Z: 60 success, 10 expected skip, 0 unexpected skip, 0 failed, 0 pending, no commit status; mergeable_state clean; draft.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "4 — reads only: issue_read get and issue_read get_comments (the card and its comments), pull_request_read get_check_runs twice (PR #37409). No MCP write tool called. Other GitHub reads went through scripts/pm/pr-state.mjs.",
      "api_writes": "2 — relay pr_create via scripts/pm/fleet-write/dispatch.mjs (POST /repos/objectstack-ai/objectstack/pulls, then POST /repos/objectstack-ai/objectstack/issues/37409/assignees; run 45741388555; stored body read back identical, 13188 bytes); this report comment via scripts/pm/post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/37177/comments). git push origin claude/project-thread-gx2ord is not REST. No review requested and the PR not flipped ready: skills/** is a governed surface, the seat hands off.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: os validate (public door), wrong answer measured once: a pack whose fields list names owner_id on an object that does not declare that field itself gets the warning ai-context-field-unknown, although owner_id is a column the platform injects · evidence: packages/lint/src/validate-ai-context.ts reads the authored field map only (no mention of the injected columns), while packages/lint/src/lint-duplicate-field-labels.ts does merge them; the runtime answer of get_record_context for such a pack was NOT measured, so whether the tool serves the field is open · dedupe words: ai-context-field-unknown owner_id platform-injected field validate-ai-context",
        "carrier: the ADR-0160 D3 follow-up that PR #37354's body names · noted, not filed: on main a related object the caller cannot read at all refuses the whole call (403 PERMISSION_DENIED), where ADR-0160 D3 as amended says the list is left out. The reference teaches main's behaviour and owes one sentence when that lands.",
        "carrier: ADR-0160 row 8 · noted, not filed: the describe of the pack's name key in packages/spec/src/ai/ai-context.zod.ts mentions a skill context key that SkillSchema does not have on main. Not taught, not touched.",
        "carrier: seat · the Container & model line in the PR body carries the tier word, not a model id, per the no-model-identifier rule for pushed artifacts; the served-model reading went to the area thread."
      ]
    }
  15. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Merged: PR #37409 at 7d50dc8bbd (approver os-zhuang) closed this card by Fixes. Delivered: skills/objectstack-ai/references/context-packs.md, the SKILL.md pointers, the two-mount prose (N1/N2), eval case 11 (run against a model, quoted in the PR). Left: #37414 (one sentence after #37361), #37419 (eval cases 5/6 rates). #37415 already landed. pm:dispatched removed.

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

Metadata

Metadata

Assignees

Labels

area:aipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions