Skip to content

Commit 72b7f13

Browse files
skills(project): the platform catalog lists working calendars as shipped (#35966)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D4n2wzAmmp4Z6W5jsqtM2qx)_ Fixes #35964 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:做应用的人(和他们的 AI)查「平台已经提供什么」这一页时,工作日历和节假日表现在列在「已提供」里,不再写着「不可用」。 - 为什么做:工作日历已经上线,这一页却还让人自己再建一套日历,属于工作日历技能交付的收尾。 - 出错会怎样:只是文档一页和一道评测题,写错了会误导应用作者,可以直接撤回,不影响运行中的系统。 - 要你做什么:这是对外发布的技能包,需要你合并或批准。 ## What changes - `packages/spec/scripts/lib/platform-catalog.ts`: two object rows, `sys_work_calendar` and `sys_work_calendar_exception`, join the "Money, imports and approvals" table beside `sys_exchange_rate`, the precedent the calendar object itself names. The rows say what ships: kept per organization in Setup, read by an approval's `escalation.clock: 'working_time'`, open on the data API. - The Planned row narrows to what is still missing: "Working-day formulas", not available, linked to ADR-0157. The page does not name the three functions, because a formula cannot call them yet. - `skills/objectstack-project/references/platform-catalog.md` is regenerated from that source (`gen:skill-refs`), not edited by hand. - `skills/objectstack-project/evals/project-process.json` case 8 now expects the shipped answer: no `business_hours_calendar` or `holiday` object, the two platform objects named, the formula half still a missing capability marked `PLATFORM-CANDIDATE`, and `escalation.clock: 'working_time'` where the SLA is an approval deadline. - Changeset: `@objectstack/skills` patch. `@objectstack/spec` takes none: `packages/spec/scripts/**` is not in that package's `files`. **The hand-written ceiling is paid, not raised.** The page's hand-written text is capped at 1581 tokens (6324 bytes) and stood at 6321 bytes. The new rows cost 236 bytes, so five pieces of restated text were cut: | Cut | Why it is restated | |:--|:--| | Banner: "the prose columns are authored beside the generator" | generator internals; nothing an app author acts on | | Intro: ", not at the runtime" | the sentence already says `list_objects` hides system objects | | Party row: ", with no platform party object" | the section is titled "Not owned by the platform" | | Item row: "; the platform ships no item object" | same | | Planned paragraph: "The PR that ships a row moves it into the tables above." | a rule for the framework PR, kept in the generator's doc comments; the app-side step is already objectstack-project §5 step 4 | Result: 6322 bytes, 1581 tokens, at the ceiling. The ceiling constant and the test file are untouched. **Read first** (by risk): 1. `packages/spec/scripts/lib/platform-catalog.ts`, the two new rows and the Planned row: every claim on a published page. 2. The five cuts above, in the same file's `PROSE` and `NOT_PLATFORM_ROWS`. 3. Eval case 8 in `project-process.json`. ## Evals Case 8 keeps its prompt. Its expected answer and assertions change: `must_contain` is now `sys_work_calendar` and `PLATFORM-CANDIDATE`; `must_not_contain` gains `name: 'business_hours_calendar'` and `name: 'holiday'`. No case was added or removed. The eval was not run against a model here. ## Verification Two-minute check: `pnpm --filter @objectstack/spec run check:skill-refs` prints `10 generated files in sync with packages/spec`. Premise, measured on origin/main `7de1bad5cb`: - `sys_work_calendar` and `sys_work_calendar_exception` are in `PLATFORM_OBJECTS_BY_PACKAGE` (`platform-object-names.ts:106-107`) and in the Setup navigation (`setup-nav.contributions.ts:147-148`). Both objects set `apiEnabled: true` with no `apiMethods` restriction. - `ApprovalEscalationSchema.clock` is `'wall_clock' | 'working_time'` (`approval.zod.ts`), and the approvals service calls the calendar service's `addWorkingHours`. - The three D4 functions exist as TypeScript exports of `@objectstack/formula` but are not registered in the formula language: 0 hits in `packages/formula/src/stdlib.ts` and `cel-engine.ts`; control `daysBetween|addDays` hits 7 and 4 lines there. <details><summary>Readings on head 7e7af39</summary> - Net added lines: +8 (31 added, 23 deleted, 4 files, changeset included; budget 40). - Generator test, under the verify lock: `Test Files 1 passed (1)`, `Tests 20 passed (20)`, `VERDICT command-exit 0`. - Hand-written text: 6321 -> 6322 bytes, 1581 -> 1581 tokens, ceiling 1581. - Generated page: 10671 -> 10855 bytes, 2668 -> 2714 tokens, 155 -> 154 lines (generator-owned, measured, not ratcheted). - Eval fixture: 10167 -> 10558 bytes, 156 -> 158 lines (measured, not ratcheted). - `node scripts/check-skills-token-ratchet.mjs` exit 0: authored 197404 -> 197404 of 202541; whole shipped tree 288105 -> 288249. - `dispatch-gates --commands` derived 76 commands; all 76 were started (`--ran`: 76 derived, 0 UNRUN). 71 exited 0. `check:doc-formula-expressions` exited 3 (prerequisite) and exited 0 after building the lint closure under the lock. The other four are the next line. - NOT MEASURED, left to CI: `check:dts-closure`, `check:dual-build-cjs-loads`, `check:lean-entry-closure`, `check:sourcemap-no-sources-content`. Each exits 3 asking for a full build, and reads built output this diff does not change. - `overlap-check --branch=claude/area-a4A-35964`: `VERDICT clean exit 0`, 0 PR heads. </details> ## Acceptance notes - The rows sit under "Money, imports and approvals" without renaming the group: a title change costs bytes under the same ceiling. - The Planned link is ADR-0157, the accepted contract, in place of the design issue the old row pointed at. - The row does not teach `escalation.calendar` or the organization default; the automation skill owns that. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9a8bb83 commit 72b7f13

4 files changed

Lines changed: 31 additions & 23 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
Clause-②: no
6+
Metadata-protocol: none
7+
8+
The platform catalog (`objectstack-project/references/platform-catalog.md`) now lists working calendars as shipped. `sys_work_calendar` and `sys_work_calendar_exception` have rows beside `sys_exchange_rate`: each organization keeps its calendars and holidays in Setup, and an approval's `escalation.clock: 'working_time'` reads them. An app no longer declares its own calendar or holiday object. The Planned section keeps only what is still missing: no formula reads a calendar yet.

‎packages/spec/scripts/lib/platform-catalog.ts‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ export const APP_FACING_OBJECT_GROUPS: readonly { readonly title: string; readon
118118
title: 'Money, imports and approvals',
119119
rows: [
120120
{ name: 'sys_exchange_rate', builds: 'an exchange-rate table', reach: '`currencyConfig.homeAmount` converts at write; Setup edits rates; data API' },
121+
{ name: 'sys_work_calendar', builds: 'a business-hours calendar', reach: 'kept per organization in Setup; an approval\'s `escalation.clock: \'working_time\'` reads it; data API' },
122+
{ name: 'sys_work_calendar_exception', builds: 'a holiday table', reach: 'a calendar\'s holidays and make-up workdays, kept in Setup; data API' },
121123
{ name: 'sys_import_job', builds: 'a bulk-import job table', reach: '`POST /api/v1/data/OBJECT/import/jobs`; data API read' },
122124
{ name: 'sys_approval_request', builds: 'an approvals table', reach: 'a flow approval node opens it; `/api/v1/approvals` routes decide; data API read' },
123125
{ name: 'sys_approval_action', builds: 'an approval decision trail', reach: 'written per decision; data API read' },
@@ -190,8 +192,8 @@ export const CAPABILITY_ROWS: Readonly<Record<string, string>> = Object.freeze({
190192

191193
/** Master data each suite keeps, matched across suites by key contract. */
192194
export const NOT_PLATFORM_ROWS: readonly { readonly concept: string; readonly rule: string }[] = [
193-
{ concept: 'Party master data: customers, suppliers, contacts', rule: 'one app owns each entity; another app matches its records by the key contract (country plus credit code or registration number), one way, with no platform party object' },
194-
{ concept: 'Item master data: materials, products, plants', rule: 'the owning app\'s object is reused by key (material number, plant code); the platform ships no item object' },
195+
{ concept: 'Party master data: customers, suppliers, contacts', rule: 'one app owns each entity; another app matches its records by the key contract (country plus credit code or registration number), one way' },
196+
{ concept: 'Item master data: materials, products, plants', rule: 'the owning app\'s object is reused by key (material number, plant code)' },
195197
];
196198

197199
/** Carded, not shipped. Each row is **not available**; the shipping PR moves it into the main table. Capped at a few rows. */
@@ -202,9 +204,9 @@ export const PLANNED_ROWS: readonly { readonly concept: string; readonly state:
202204
link: 'https://github.com/objectstack-ai/objectstack/blob/main/docs/adr/0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md',
203205
},
204206
{
205-
concept: 'Working calendars (business days, holidays, SLA clocks)',
206-
state: 'carded, contract in design',
207-
link: 'https://github.com/objectstack-ai/objectstack/issues/35340',
207+
concept: 'Working-day formulas',
208+
state: 'contract accepted; no formula reads a calendar yet',
209+
link: 'https://github.com/objectstack-ai/objectstack/blob/main/docs/adr/0157-working-calendars-are-org-editable-runtime-data-resolved-by-code-or-refused.md',
208210
},
209211
];
210212

@@ -218,13 +220,11 @@ export const PROSE = Object.freeze({
218220
banner: [
219221
'> **Auto-generated** — do not edit. Regenerate in the framework repo with',
220222
'> `pnpm --filter @objectstack/spec gen:skill-refs`',
221-
'> (not runnable in an installed app). Names come from `@objectstack/spec`;',
222-
'> the prose columns are authored beside the generator.',
223+
'> (not runnable in an installed app). Names come from `@objectstack/spec`.',
223224
],
224225
intro: [
225226
'Read this before adding an object, a field or a flow (objectstack-project §0,',
226-
'question 3). `list_objects` over MCP hides system objects, so look here, not',
227-
'at the runtime.',
227+
'question 3). `list_objects` over MCP hides system objects, so look here.',
228228
],
229229
objects: [
230230
'"Data API" means the generic `/api/v1/data/OBJECT` routes, as the object',
@@ -252,8 +252,7 @@ export const PROSE = Object.freeze({
252252
'Each row is **not available**: nothing below can be declared or installed.',
253253
'The app may build its own meanwhile, marked `// PLATFORM-CANDIDATE:` with',
254254
'the link; an interim unit field stores the contract\'s UN/ECE Rec 20 codes',
255-
'(`H87`, `KGM`) as option values, the business\'s spellings as labels. The PR',
256-
'that ships a row moves it into the tables above.',
255+
'(`H87`, `KGM`) as option values, the business\'s spellings as labels.',
257256
],
258257
});
259258

‎skills/objectstack-project/evals/project-process.json‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,16 @@
123123
{
124124
"id": 8,
125125
"prompt": "Our ObjectStack app's case SLA must count business hours only. Add a `business_hours_calendar` object (weekday ranges per organization) and a `holiday` table, and make the SLA formula read them.",
126-
"expected_output": "Checks the platform catalog first: working calendars are in its Planned section, marked not available, so there is nothing to declare today. This is a missing capability, not a defect, so §3 does not apply: the app is not blocked and no workaround language is used. A second app would copy a calendar, so it files or links the platform card at objectstack-ai/objectstack, and may build the smallest calendar the SLA needs meanwhile, with the objects and the formula marked `// PLATFORM-CANDIDATE: <link to the card>` so the bump sweep (§5 step 4) replaces them when the platform ships calendars. It does not present the app's calendar as the platform's.",
126+
"expected_output": "Does not create `business_hours_calendar` or `holiday`: the platform catalog lists `sys_work_calendar` (weekly working periods, per organization) and `sys_work_calendar_exception` (dated holidays and make-up workdays) as what the platform ships, and each organization keeps its own rows in Setup. The formula half is different: working-day formulas are in the catalog's Planned section, marked not available, so no formula reads a calendar today. That is a missing capability, not a defect, so §3 does not apply: the app is not blocked and no workaround language is used. It links the contract at objectstack-ai/objectstack and may compute the business-hours due time in the app meanwhile, reading the platform's calendar rows and marked `// PLATFORM-CANDIDATE: <link>` so the bump sweep (§5 step 4) replaces it when the platform ships the formulas. Where the SLA is an approval step's deadline, it sets `escalation.clock: 'working_time'` instead, which reads the calendar today.",
127127
"files": [],
128128
"assertions": {
129129
"must_contain": [
130-
"PLATFORM-CANDIDATE",
131-
"objectstack-ai/objectstack"
130+
"sys_work_calendar",
131+
"PLATFORM-CANDIDATE"
132132
],
133133
"must_not_contain": [
134+
"name: 'business_hours_calendar'",
135+
"name: 'holiday'",
134136
"Blocked by",
135137
"PLATFORM-GAP"
136138
]

‎skills/objectstack-project/references/platform-catalog.md‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
> **Auto-generated** — do not edit. Regenerate in the framework repo with
44
> `pnpm --filter @objectstack/spec gen:skill-refs`
5-
> (not runnable in an installed app). Names come from `@objectstack/spec`;
6-
> the prose columns are authored beside the generator.
5+
> (not runnable in an installed app). Names come from `@objectstack/spec`.
76
87
Read this before adding an object, a field or a flow (objectstack-project §0,
9-
question 3). `list_objects` over MCP hides system objects, so look here, not
10-
at the runtime.
8+
question 3). `list_objects` over MCP hides system objects, so look here.
119

1210
## Platform objects an app would otherwise build
1311

@@ -52,6 +50,8 @@ a seed) without declaring it.
5250
| Object | Mounted by | What you would otherwise build | How the app reaches it |
5351
|:--|:--|:--|:--|
5452
| `sys_exchange_rate` | every boot | an exchange-rate table | `currencyConfig.homeAmount` converts at write; Setup edits rates; data API |
53+
| `sys_work_calendar` | every boot | a business-hours calendar | kept per organization in Setup; an approval's `escalation.clock: 'working_time'` reads it; data API |
54+
| `sys_work_calendar_exception` | every boot | a holiday table | a calendar's holidays and make-up workdays, kept in Setup; data API |
5555
| `sys_import_job` | every boot | a bulk-import job table | `POST /api/v1/data/OBJECT/import/jobs`; data API read |
5656
| `sys_approval_request` | `requires: ['approvals']` | an approvals table | a flow approval node opens it; `/api/v1/approvals` routes decide; data API read |
5757
| `sys_approval_action` | `requires: ['approvals']` | an approval decision trail | written per decision; data API read |
@@ -138,18 +138,17 @@ platform" here.
138138

139139
| Concept | Rule |
140140
|:--|:--|
141-
| Party master data: customers, suppliers, contacts | one app owns each entity; another app matches its records by the key contract (country plus credit code or registration number), one way, with no platform party object |
142-
| Item master data: materials, products, plants | the owning app's object is reused by key (material number, plant code); the platform ships no item object |
141+
| Party master data: customers, suppliers, contacts | one app owns each entity; another app matches its records by the key contract (country plus credit code or registration number), one way |
142+
| Item master data: materials, products, plants | the owning app's object is reused by key (material number, plant code) |
143143

144144
## Planned: carded, not shipped
145145

146146
Each row is **not available**: nothing below can be declared or installed.
147147
The app may build its own meanwhile, marked `// PLATFORM-CANDIDATE:` with
148148
the link; an interim unit field stores the contract's UN/ECE Rec 20 codes
149-
(`H87`, `KGM`) as option values, the business's spellings as labels. The PR
150-
that ships a row moves it into the tables above.
149+
(`H87`, `KGM`) as option values, the business's spellings as labels.
151150

152151
| Concept | State | Contract |
153152
|:--|:--|:--|
154153
| Units of measure (a standard unit table, organization units, a quantity field with its unit) | **not available** (contract accepted, nothing shipped) | https://github.com/objectstack-ai/objectstack/blob/main/docs/adr/0158-units-of-measure-standard-unit-table-org-units-quantity-unit-declaration-base-quantity.md |
155-
| Working calendars (business days, holidays, SLA clocks) | **not available** (carded, contract in design) | https://github.com/objectstack-ai/objectstack/issues/35340 |
154+
| Working-day formulas | **not available** (contract accepted; no formula reads a calendar yet) | https://github.com/objectstack-ai/objectstack/blob/main/docs/adr/0157-working-calendars-are-org-editable-runtime-data-resolved-by-code-or-refused.md |

0 commit comments

Comments
 (0)