Skip to content

Commit b6b84c5

Browse files
committed
docs(skills): the data skill picks an object's colour by business family and teaches showOnCreate; automation routes a stepped single-object form to a named wizard form
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxba91GQhJ1mvAZFftiw
1 parent 115d387 commit b6b84c5

5 files changed

Lines changed: 32 additions & 20 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): the data skill picks an object's colour by business family and teaches `showOnCreate`; the automation skill routes a stepped single-object form to a named wizard form an action opens
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`skills/objectstack-data` told authors to give every object a colour and avoid repeats in one app. With nine palette names any app past nine objects must repeat one, and the platform's own objects are coloured by business family instead. The `color` row now says to group an app's objects into a few business families with one palette name each, gives the platform's families as the worked example (people `blue`, security `purple`, approvals and work `orange`, messaging `pink`, integrations `teal`, reference data and finance `green`, audit and settings `amber`), keeps `red` for an object that is an alert, and leaves an object nobody opens without one. The quick-start object example declares a `color`.
11+
12+
The data skill's field rules now teach `showOnCreate: false` (a field left off every create surface, refused beside `required: true`), and its Relationships rule no longer points at the `subforms` overrides the UI skill dropped. `skills/objectstack-automation` routes a stepped form over one object that never branches to a named form view (`type: 'wizard'`) that a `type: 'form'` action opens. New text is paid for by cuts in the same files. No metadata shape changes.

‎skills/objectstack-automation/SKILL.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ Also vendor-integration callbacks and **assignment rules**.
3636
| Type | When to Use |
3737
|:-----|:------------|
3838
| `autolaunched` | Runs without user interaction — triggered by events, APIs, or other flows |
39-
| `screen` | Interactive — presents UI screens |
39+
| `screen` | Presents UI screens |
4040
| `schedule` | Runs on a cron/interval cadence declared on the **start node's `config.schedule`** — or a **per-record date sweep** via `config.timeRelative` |
41-
| `record_change` | Fires automatically on record create/update/delete. `autolaunched` + the same `record-*` binding behaves identically; `record_change` also opts into the trigger-readiness lint |
41+
| `record_change` | Fires on record create/update/delete. `autolaunched` + the same `record-*` binding behaves identically; `record_change` also opts into the trigger-readiness lint |
4242
| `api` | Inbound **webhook** (*Inbound webhook triggers*); a flow only ever started explicitly is `autolaunched` |
4343

44-
**A stepped form over one object that never branches** is no flow: an **objectstack-ui** form view, `type: 'wizard'`.
44+
**A stepped form over one object that never branches** is no flow: an **objectstack-ui** named form view (`type: 'wizard'`) a `type: 'form'` action opens.
4545

4646
**A flow an installed package ships** is read-only. To change what it does, save
4747
a same-named flow in the base's paired `.custom` package declaring

‎skills/objectstack-data/SKILL.md‎

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ metadata:
3636
- **[Relationships](./rules/relationships.md)** — lookup vs master_detail, junction patterns, delete behaviors
3737
- **[Validation Rules](./rules/validation.md)** — All validation types, script inversion, severity levels
3838
- **[Index Strategy](./rules/indexing.md)** — btree/gin/gist/fulltext, composite indexes, partial indexes
39-
- **[Data Lifecycle & Retention](./rules/lifecycle.md)** — `lifecycle` classes (record/audit/telemetry/transient/event), retention/TTL/rotation/archive policies (distinct from lifecycle *hooks* below); plus the **save notice** a hook hands the saver (`ctx.notice`)
39+
- **[Data Lifecycle & Retention](./rules/lifecycle.md)** — `lifecycle` classes, retention/TTL/rotation/archive policies (not *hooks*); plus the **save notice** a hook hands the saver (`ctx.notice`)
4040
- **[Lifecycle Hooks](./references/data-hooks.md)** — the lifecycle events, the sandboxed `body` (ctx + capability contract; the inline `handler` is deprecated), registration, canonical patterns
4141
- **[Datasources & Federation](./rules/datasources.md)** — `defineDatasource`, external/federated objects (`remoteName`/`columnMap`), auto-connect gating, credentials; ❌ no `field.columnName` on external objects
4242
- **[Security & Access Control](./rules/security.md)** — permission sets, assignment rows, RLS policies, `secret` / `requiredPermissions`, `tenancy`, platform-global posture
@@ -92,14 +92,14 @@ all (Relationship Patterns below).
9292
| `label` | Auto from `name` | Human-readable singular label |
9393
| `pluralLabel` | — | Plural form; author it alongside `label` |
9494
| `icon` | — | Icon for nav, list headers and lookup pickers; give every object one |
95-
| `color` | `gray` | Tile colour, one of `gray` `blue` `teal` `green` `amber` `orange` `red` `pink` `purple` (no hex); the console draws `icon` white on it. Give every object one; avoid repeats in one app |
95+
| `color` | `gray` | Tile colour behind the white `icon`: `gray` `blue` `teal` `green` `amber` `orange` `red` `pink` `purple` (no hex). Group the app's objects into a few business families, one name each, as the platform's own objects do: people `blue`, security `purple`, approvals and work `orange`, messaging `pink`, integrations `teal`, reference data and finance `green`, audit and settings `amber`. `red` only for an alert object; one nobody opens gets none |
9696
| `highlightFields` | derived | Ordered field keys used as a record's compact face: the columns a **related list** renders on the parent's detail page, and what a lookup picker shows. Declare it on the CHILD object (see [Relationships](./rules/relationships.md)) |
97-
| `namespace` | — | **Not a schema key** — an unknown key is refused, so authoring it is a build error. Embed the prefix directly in `name` instead |
97+
| `namespace` | — | **Not a schema key**: refused as unknown. Embed the prefix in `name` |
9898
| `datasource` | `'default'` | Target datasource ID for virtualized data |
9999
| `nameField` | derived (e.g. `'name'`/`'title'`) | **Canonical** record-title field — the stored field used as the record's display name. Use a single text/email field; a composite title to import, sort or search by is a stored computed field (a non-`formula` field with an `expression`); a text formula is display-only |
100-
| `displayNameField` | — | **Deprecated** alias for `nameField` (still honored as a fallback) |
101-
| `titleFormat` | — | **Refused (ADR-0079)**: a save and `os validate` refuse it (`title-format-retired`). Move it to `nameField`; a composite title follows the `nameField` row |
102-
| `enable` | — | Capability flags (trackHistory, searchable, apiEnabled, etc.) |
100+
| `displayNameField` | — | **Deprecated** alias for `nameField`, still read |
101+
| `titleFormat` | — | **Refused** by a save and `os validate` (`title-format-retired`): use `nameField` |
102+
| `enable` | — | Capability flags (next section) |
103103
| `fieldGroups` | — | Ordered list of logical field groups for forms/detail pages (see [Field Groups](./references/examples-objects.md#field-groups-mvp)) |
104104
| `lifecycle` | `record` semantics (permanent) | Data retention/rotation/archival contract. **Required for append-only, high-write-rate objects** (see [Data Lifecycle & Retention](./rules/lifecycle.md)) |
105105

@@ -174,8 +174,7 @@ one-off backfill. See [Lifecycle Hooks](./references/data-hooks.md).
174174

175175
Put conditional UI/data-entry rules on the **field definition** when the rule
176176
belongs to the data model and should apply everywhere the field is edited:
177-
default forms, Studio-authored forms, inline master-detail grids, public forms,
178-
and API-backed writes.
177+
New and Edit, named and public forms, inline master-detail grids, API writes.
179178

180179
<!-- os:check -->
181180
```typescript
@@ -206,6 +205,8 @@ export const Invoice = ObjectSchema.create({
206205
```
207206

208207
- Use `visibleWhen` to hide irrelevant fields in ObjectUI forms.
208+
- `showOnCreate: false` keeps a field off every create surface; edit, the
209+
record page and lists keep it. Refused beside `required: true`.
209210
- Use `readonlyWhen` for state-locked fields; the ObjectQL write path ignores
210211
incoming changes when the predicate is `TRUE` (for everyone; per permission
211212
set → field permission `when`, rules/security.md).
@@ -217,8 +218,8 @@ export const Invoice = ObjectSchema.create({
217218
and DO write it. Keep the field `readonly` when automation maintains it; the
218219
flow side: [objectstack-automation → Failure routing & `runAs`](../objectstack-automation/SKILL.md#failure-routing--runas).
219220
- Use `requiredWhen` for conditional requiredness; the ObjectQL validator
220-
enforces it on submit. The `conditionalRequired` alias was REMOVED in
221-
protocol 17 — emitting it is a parse error.
221+
enforces it on submit. The removed `conditionalRequired` alias is a parse
222+
error.
222223
- **Choose by intent — invariant or transition gate.** A fact true of *every
223224
stored record* is an invariant: a `validations[]` `script` rule. A row that
224225
violates it is refused on any edit until repaired. A *transition* condition
@@ -276,9 +277,8 @@ lowercase option values — examples: [rules/naming.md](./rules/naming.md).
276277

277278
### Field Type Selection
278279

279-
Three to get right here (the rest: [rules/field-types.md](./rules/field-types.md)): credentials are `secret` (**encrypted-at-rest**, ADR-0100) —
280-
never `password`, which on a generic object is **plaintext at rest**; `user` is the person
281-
picker; `formula` takes CEL in `expression` (a `{ dialect: 'cel', source }` envelope —
280+
Two to get right here (the rest: [rules/field-types.md](./rules/field-types.md)): credentials are `secret` (**encrypted-at-rest**, ADR-0100) —
281+
never `password`, which on a generic object is **plaintext at rest**; `formula` takes CEL in `expression` (a `{ dialect: 'cel', source }` envelope —
282282
`F\`...\`` in TypeScript; see **objectstack-formula**).
283283

284284
- A yes/no flag (`is_*`, `has_*`, "done?", "active?") is `{ type: 'boolean', defaultValue: false }`.
@@ -309,8 +309,7 @@ picker; `formula` takes CEL in `expression` (a `{ dialect: 'cel', source }` enve
309309
| Approval, review, routing, audit trail | not objects: an approval is a flow node (**objectstack-automation**) and its trail is platform history; model only the people it references (approver, reviewer), as `user` fields beside the owner |
310310
| Record owner | the platform's `owner_id` (`ownership: 'user'`, the default), also when the request says assignee, 负责人 or 处理人 — never a hand-added owner field, a second owner that owner-scoped visibility and "My records" views never read. A handler the request names apart from the owner is a `user` field that grants no access, with a label no other visible field carries, injected ones included: `owner_id` (Owner, 负责人), `created_by` (创建人), `updated_by` (更新人), `created_at` (创建时间), `updated_at` (更新时间). `ownership: 'none'` only for a shared catalog or a pure junction table |
311311

312-
> **`multiple: true` lookup ≠ junction object.** Its value is an **array of ids**:
313-
> reference elements positionally (`{record.tags.0}` in flow values).
312+
> A `multiple: true` lookup's ids are referenced positionally (`{record.tags.0}` in flow values).
314313
315314
### Validation Patterns
316315

@@ -341,7 +340,7 @@ indexes: [
341340
]
342341
```
343342

344-
See [rules/indexing.md](./rules/indexing.md) for composite indexes, unique scope
343+
See [rules/indexing.md](./rules/indexing.md) for unique scope
345344
(on a declared index bare `unique: true` is refused), the retired `type` / `partial`, and partial / gin / gist indexes at the
346345
database layer.
347346

‎skills/objectstack-data/references/examples-objects.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export default ObjectSchema.create({
6060
pluralLabel: 'Support Cases',
6161
description: 'A customer-reported issue tracked to resolution.',
6262
icon: 'life-buoy',
63+
color: 'orange',
6364
sharingModel: 'private', // required in practice
6465
highlightFields: ['subject', 'status', 'priority'],
6566
enable: {

‎skills/objectstack-data/rules/relationships.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Name only true line-item / composition children (invoice lines, order items,
275275
expense lines); leave associations (comments, attachments, activity, audit) as
276276
tabs.
277277

278-
The rendering side, `subforms` overrides included: objectstack-ui → Master-Detail Forms.
278+
The rendering side: objectstack-ui → Master-Detail Forms.
279279

280280
#### Inline-edit form factor (`grid` vs `form`)
281281

0 commit comments

Comments
 (0)