Skip to content

Skills optimization flight — skills/objectstack-formula: DIET (≈ −1,265 tok, −21%) — 21% of the file on previous vs record, cron/template surfaces the frontmatter routes away (0 corpus usages), and the one decision the package exists for (formula fields are virtual: where/orderBy on one = 400) taught nowhere #14316

Description

@os-litant

Member card of the skills catalog optimization program #14292 (maintainer mandate 2026-09-02, verbatim: 「审核所有的 skills,进行全面的优化。」). Filed by the skills lane seat (session session_01LraLgQVGq8egUwfYZpbYt1). Read-only audit at objectstack origin/main a59f78d. The auditor's harness refused to write a findings file; the full findings are recorded in this card and in the audit-record comment the dev posts at claim time (copy of the seat's audit message, provided in the dispatch brief).

Audit summary

SKILL.md 551 lines / 6,002 tok (headroom 0) + generated _index.md 302; no rules/, no evals/ (the only domain package without one). Heaviest sections: §5 previous vs record :286-375 = 1,241 tok (20.7%); stdlib :153-216 = 913; template surfaces + quickref = 511; cron surfaces + quickref = 228. Real usage: P\`` 37 · cel`85 ·F`0 ·cron`0 ·tmpl`0; top-5 tasks: seed dynamic dates (76, well covered), field conditional rules (63, roots incomplete), validation predicates (10, well covered), flow/trigger conditions (5, scope taught WRONG), date-macro filter tokens (21, zero mention).type: 'formula' fields: 0 live usages (the only hits are a removal test). Stdlib: 35 documented = 35 implemented (CEL_STDLIB_FUNCTIONS`), pinned one direction only. Verdict DIET (net −1,265 = −21.1%; structure sound).

Top findings

id span proposal Δ
FRM-F-06 / A-01 :432-445,:446-481,:482-497,:498-513 cron + template surfaces: frontmatter :9 says "Do not use for cron"; 0 corpus usages of cron\``/cronExpression/tmpl``/any formatter → ONE schema-pointing row each (live surfaces: never delete the last mention), delete the quickrefs −435
FRM-D-05 :328-330,:342-348,:350-358,:370-372 REWRITE-AS-CONSTRUCT — :350-358 restates table row :311 at 165 tok; the rest is cost narration −310
FRM-D-04 :317-326 DELETE pre-17 logger.warn history; rule complete at :313-317 −144
FRM-B-06 :38-45 MERGE-INTO :535-547; ADR-0032 stated 3× and :536 cross-refs itself −119
FRM-F-01 :414 (gap) ADD — a formula field has no column; where/orderBy/searchableFields on one = 400 INVALID_FIELD (17.engine-find-formula-filter-refused.ts:20-45; examples/app-todo/test/derived-flag-removal.test.ts) +90
FRM-B-05 :514-526 MERGE-INTO :269-285 −81
FRM-D-01 / B-07 :27-31 DELETE "Strategic context" −74
FRM-D-07 :84-88 DELETE "you do not learn three languages" −72
FRM-D-02 :90-95 DELETE M9.7 roadmap −69
FRM-B-03 :364-368 MERGE-INTO :117-144has()-on-declared-field rule stated twice −68
FRM-F-03 :415-416 (gap) ADD — form-view visibleWhen is client-side only and faults OPEN (view.zod.ts:2353; form-predicate-root-policy.ts:14-19); the package teaches the opposite globally at :41-42, :313 +60
FRM-D-03 / G-03 :527-534 DELETE "Open questions"; CelExprSchema exists nowhere in the repo −55
FRM-G-05 :421,:472,:508-510 DELETE visibleOn/visibility row + dedupe titleFormat notes −44
FRM-B-02 :548-551 pointer at node_modules/@objectstack/formula/ which ships dist only (:154-155 itself calls it unreadable) −48
FRM-F-02 + F-04 :100-113, :382 ADD roots parent (field.zod.ts:800-801; 4 usages in invoice.object.ts) and data (form-predicate-root-policy.ts:181-189); flow conditions bind bare identifiers (service-automation/src/engine.ts:7150-7156; 5 showcase flows) — the translation table implicitly forbids it +60

Also: FRM-A-02 (+18: say this is the companion package four hosts load alongside) · FRM-B-01 (+30: link references/_index.md — the only domain package that does not) · FRM-B-04 ("no js dialect" 3×, −36) · FRM-D-09 (:64-71 transcribes expression.zod.ts:75-90, −41) · FRM-E-01 (mark one "Mandatory pattern" block os:check, +45) · FRM-E-03 (:241 teaches * 100.0, a workaround stdlib.ts:246-275 closed) · FRM-F-07 (:429-430 forbids CEL in view filters without naming the date-macro alternative → pointer to objectstack-query) · FRM-G-01 (objectstack build 5× vs os build 5× — siblings use os) · FRM-G-02 (frontmatter 17.x while the body says 7.6, M9.5, M9.7, M9.8) · FRM-G-04 (:105 "single quotes (always)" vs the corpus writing "…" inside P\`` 10+ times). Incidental: skills/README.md:100"LegacyOLD/NEWevaluate tonull since M9.5" is stale — current truth is a build failure (validate.ts:342-352`) — "follow-up for skills/README.md".

Flight scope

IMPLEMENT (same-file, shrink-only): every row above; the three funded additions (F-01 paid by D-01 + D-03; F-03 paid by A-01's deleted quickrefs; F-02 + F-04 paid by D-05); FRM-A-02, B-01, E-01, E-03, F-07, G-01, G-02, G-04.

ANCHOR RULINGS: this package is the CEL anchor; host packages (automation :41-43,:943-946; data :1111-1118) restate the stdlib beside pointers here — record under "follow-up for objectstack-automation / objectstack-data" (⛔ do not edit them). Date-macro filter tokens → objectstack-query (pointer only).

DEFER: FRM-H-01 (a new evals/README.md needs a ceiling row → #14296 item 2 / a later ruling); FRM-C-05 (generator SKILL_MAP maps date-macros.zod.ts here, contradicting :36-37 → out-of-scope card for the spec lane); FRM-D-06 (moving the 10,000-row limit to a host package → follow-up); FRM-I-01 ceiling re-lock (Phase 3 style, not this PR).

Flight constraints (binding)

  • ONE draft PR, first line Fixes #<this card>; governed ⇒ stays draft; review requests are the seat's step.
  • Token ratchet: SKILL.md may not grow; additions paid by deletions in the same file; ⛔ re-wrap is not payment; ⛔ no ceiling raise; ⛔ no new files; ⛔ do not touch the ratchet script.
  • ⛔ Never edit another package's files or skills/README.md prose; follow-ups in the PR body. Generated files untouched.
  • Live surface with zero measured usage ⇒ one row pointing at its schema; retired/tombstoned ⇒ delete. A false claim matching a spec .describe() string ⇒ spec-side twin card.
  • Gates: node scripts/check-skills-token-ratchet.mjs, pnpm --filter @objectstack/spec check:skill-examples, pnpm check:skill-compatibility, pnpm check:skill-identifier-liveness, pnpm --filter @objectstack/spec check:skill-docs, plus node scripts/pm/dispatch-gates.mjs --commands skills/objectstack-formula/SKILL.md; record the head sha. Note: packages/formula pins the stdlib catalog ↔ skill in cel-stdlib-drift.test.ts and skill-catalog-sync.test.ts — run them.
  • PR body: per-item 落点 | before | after keyed by finding id; token delta; needs:contract-review on both carriers (F-01, F-03, F-04 are contract-semantics claims).

Refs: #14292 · #14296 · #13658.

Activity

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

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationdomain:skillspriority:p1High: required for production / M2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions