Skip to content

Commit a035495

Browse files
os-zhuangclaude
andcommitted
docs(skills): drop the removed capabilities-descriptor reference from the feature-flags example
The platform skill's os:check example imported ObjectStackCapabilities to type a system.features array — the descriptor this PR removes (and which no endpoint ever served). The example now shows only the live part (FeatureFlag.create compile-checked values) and the prose points capability discovery at GET /api/v1/discovery. Caught by check:skill-examples — my repo-wide grep excluded *.md and missed TS blocks inside skill docs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 641a047 commit a035495

1 file changed

Lines changed: 13 additions & 19 deletions

File tree

skills/objectstack-platform/SKILL.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,16 +1051,15 @@ const metrics = kernel.getPluginMetrics();
10511051
## Feature Flags
10521052

10531053
Feature flags are a **protocol shape, not a config key**. `FeatureFlagSchema` (from
1054-
`@objectstack/spec/kernel`) defines the flag document; in the protocol it appears only on
1055-
the runtime capabilities descriptor (`ObjectStackCapabilities.system.features`) that a
1056-
platform serves for introspection. There is **no `featureFlags:` / `features:` key on
1057-
`defineStack`** — strict parsing silently strips unknown keys, so such config would be a
1058-
no-op.
1054+
`@objectstack/spec/kernel`) defines the flag document. There is **no `featureFlags:` /
1055+
`features:` key on `defineStack`** — strict parsing silently strips unknown keys, so such
1056+
config would be a no-op. (The static `ObjectStackCapabilities.system.features` descriptor
1057+
that once carried flags was removed with the dead capabilities-descriptor cluster — no
1058+
endpoint ever served it; runtime capability discovery is `GET /api/v1/discovery`.)
10591059

10601060
<!-- os:check -->
10611061
```typescript
10621062
import { FeatureFlag } from '@objectstack/spec/kernel';
1063-
import type { ObjectStackCapabilities } from '@objectstack/spec';
10641063

10651064
// FeatureFlag.create() gives you a compile-checked flag value:
10661065
const aiCopilot = FeatureFlag.create({
@@ -1072,19 +1071,14 @@ const aiCopilot = FeatureFlag.create({
10721071
environment: 'prod', // 'dev' | 'staging' | 'prod' | 'all' (default 'all')
10731072
});
10741073

1075-
// Where flags live in the protocol — the runtime capabilities descriptor:
1076-
type SystemFeatures = NonNullable<ObjectStackCapabilities['system']['features']>;
1077-
const features: SystemFeatures = [
1078-
aiCopilot,
1079-
{
1080-
name: 'beta_kanban_view',
1081-
label: 'Kanban View',
1082-
enabled: true,
1083-
strategy: 'group',
1084-
conditions: { groups: ['beta_testers'] },
1085-
environment: 'all',
1086-
},
1087-
];
1074+
const betaKanban = FeatureFlag.create({
1075+
name: 'beta_kanban_view',
1076+
label: 'Kanban View',
1077+
enabled: true,
1078+
strategy: 'group',
1079+
conditions: { groups: ['beta_testers'] },
1080+
environment: 'all',
1081+
});
10881082
```
10891083

10901084
Strategies: `boolean` | `percentage` | `user_list` | `group` | `custom`

0 commit comments

Comments
 (0)