OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Evaluate a feature flag for a given context.
Goal
Determine if a feature should be enabled.
Context
Called at runtime to check feature availability.
Source Definition
import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
export const EvaluateFlagContract = defineQuery({
meta: {
key: 'flag.evaluate',
version: '1.0.0',
stability: 'stable',
owners: ['platform.feature-flags'],
tags: ['feature-flags', 'evaluate'],
description: 'Evaluate a feature flag for a given context.',
goal: 'Determine if a feature should be enabled.',
context: 'Called at runtime to check feature availability.',
},
io: {
input: EvaluateFlagInput,
output: EvaluationResultModel,
errors: {
FLAG_NOT_FOUND: {
description: 'Flag does not exist',
http: 404,
gqlCode: 'FLAG_NOT_FOUND',
when: 'Flag key is invalid',
},
},
},
policy: {
auth: 'anonymous',
},
});