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.

flag.create

Create a new feature flag.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.feature-flags
  • Tags: feature-flags, create
  • File: packages/libs/feature-flags/src/contracts/index.ts
  • field.key.label
    flag.create
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    flag.create
    field.description.label

    Create a new feature flag.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.feature-flags
  • Tags: feature-flags, create
  • File: packages/libs/feature-flags/src/contracts/index.ts
  • field.tags.label
    feature-flags,create
    field.owners.label
    platform.feature-flags
    field.stability.label
    stable

    Create a new feature flag.

    Goal

    Define a new feature flag for toggling features.

    Context

    Called when setting up a new feature flag.

    Source Definition

    import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
    import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
    
    export const CreateFlagContract = defineCommand({
    	meta: {
    		key: 'flag.create',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['platform.feature-flags'],
    		tags: ['feature-flags', 'create'],
    		description: 'Create a new feature flag.',
    		goal: 'Define a new feature flag for toggling features.',
    		context: 'Called when setting up a new feature flag.',
    	},
    	io: {
    		input: CreateFlagInput,
    		output: FeatureFlagModel,
    		errors: {
    			KEY_ALREADY_EXISTS: {
    				description: 'Flag key already exists',
    				http: 409,
    				gqlCode: 'FLAG_KEY_EXISTS',
    				when: 'A flag with this key already exists',
    			},
    		},
    	},
    	policy: {
    		auth: 'admin',
    	},
    });