Workflow
Workflow Overview
Section titled “Workflow Overview”The SCS workflow follows three phases that move context from initial draft to versioned, immutable bundles:
- Define Intent - Create DRAFT bundles and SCDs
- Validate Context - Ensure correctness and completeness
- Version Context - Lock bundles with semantic versions
Phase 1: Define Intent
Section titled “Phase 1: Define Intent”Create bundles and SCDs from source materials. Keep version: "DRAFT" during this phase.
Start with a Template
Section titled “Start with a Template”# Create a new project from templatescs new project my-app --type saas
# Or initialize SCS in existing projectcd /path/to/existing/projectscs init --type healthcareThis scaffolds a complete project structure:
- 10+ concern bundles (Architecture, Security, Compliance, etc.)
- 30+ SCDs covering common needs
- Pre-configured validation
Create Custom SCDs
Section titled “Create Custom SCDs”Add SCDs incrementally as you refine your context:
# Add specific SCDsscs add scd system-contextscs add scd authn-authz data-protection
# Add entire domain bundlesscs add bundle securityWork with Source Materials
Section titled “Work with Source Materials”Transpose unstructured documents into structured SCDs:
- Gather sources - Policies, architecture docs, compliance requirements
- Work with AI - Use Claude or other LLMs to help structure content
- Create YAML files - Write SCDs following the specification
- Iterate - Refine and improve
Example: Creating a Company Context SCD
Section titled “Example: Creating a Company Context SCD”id: scd:project:company-overviewversion: "DRAFT"tier: projecttype: company-context
metadata: title: "Acme Health - Company Overview" description: "High-level company context for all Acme projects" created_at: "2026-01-12T10:00:00Z" created_by: "Sarah Chen (CEO)"
content: company_name: "Acme Health Corporation" mission: "Transform patient care through AI-powered healthcare solutions" industry: "Healthcare Technology" size: "Series B, 150 employees"
key_stakeholders: - CEO (Strategy, Vision) - CTO (Architecture, Engineering) - CMO (Clinical Safety, Protocols) - CISO (Security, Compliance)
regulatory_environment: - HIPAA Privacy & Security Rules - CHAI AI Assurance Guidelines - State telehealth regulationsExample: Creating a Concern Bundle
Section titled “Example: Creating a Concern Bundle”id: bundle:acme-company-contexttype: concernversion: "DRAFT"title: "Acme Health - Company Context"description: "Company-specific context for all projects"
# Concern bundles don't import other bundlesimports: []
# List the SCDs in this concernscds: - scd:project:company-overview - scd:project:company-values - scd:project:stakeholder-map
provenance: created_by: "Sarah Chen (CEO)" created_at: "2026-01-12T10:00:00Z" rationale: "Foundational company context for all Acme projects"Validation During Intent Phase
Section titled “Validation During Intent Phase”Use loose validation to check structure while iterating:
# Validate individual SCDsscs validate context/project/company-overview.yaml
# Validate a bundle (loose mode - default during DRAFT)scs validate bundles/concerns/company-context.yamlIn DRAFT mode:
- ✅ Validates YAML structure
- ✅ Validates required bundle fields
- ✅ Validates tier organization
- ❌ Does NOT enforce strict content requirements
- ❌ Does NOT require all fields populated
This supports the spectrum from “paranoid CEO” (minimal disclosure) to “open CEO” (full transparency).
Phase 2: Validate Context
Section titled “Phase 2: Validate Context”Once your bundles are complete, run strict validation before versioning.
Run Strict Validation
Section titled “Run Strict Validation”# Strict mode - fail on warningsscs validate --bundle bundles/project-bundle.yaml --strict
# Verbose output for debuggingscs validate --bundle bundles/project-bundle.yaml --strict --verbose
# JSON output for automationscs validate --bundle bundles/project-bundle.yaml --output jsonValidation Levels
Section titled “Validation Levels”Level 1: Syntax
- Valid YAML/JSON
- Schema compliance
- Required fields present
Level 2: Semantic
- Valid identifiers
- Proper tier usage
- Type consistency
Level 3: References
- All imported bundles exist
- All referenced SCDs exist
- No circular dependencies
Level 4: Versioning
- Valid semantic versions
- No DRAFT in production bundles
- Consistent version references
Level 5: Provenance
- Created/updated timestamps
- Creator information
- Rationale documented
Level 6: Completeness (optional with --skip-completeness)
- All required concerns present
- Minimum SCD coverage
- Domain completeness
Fix Validation Errors
Section titled “Fix Validation Errors”Common errors and fixes:
Missing imports:
# Error: bundle:acme-security:1.0.0 not found# Fix: Add the bundle or update the version referenceInvalid tier:
# Error: project-tier SCD in standards bundle# Fix: Move SCD to correct bundle type or change tierCircular dependency:
# Error: bundle:A imports bundle:B which imports bundle:A# Fix: Restructure bundle hierarchyValidate Import Resolution
Section titled “Validate Import Resolution”Check that your bundle hierarchy resolves correctly:
# Test bundle import resolutionscs bundle check bundles/project-bundle.yaml
# Shows all resolved bundles and SCDsPhase 3: Version Context
Section titled “Phase 3: Version Context”Once validation passes, lock your bundles with semantic versions.
Semantic Versioning
Section titled “Semantic Versioning”SCS follows semantic versioning (semver):
- MAJOR (1.0.0 → 2.0.0) - Breaking changes, incompatible updates
- MINOR (1.0.0 → 1.1.0) - New features, backward compatible
- PATCH (1.0.0 → 1.0.1) - Bug fixes, clarifications
Version a Bundle
Section titled “Version a Bundle”# Version a single bundlescs bundle version bundles/concerns/company-context.yaml --version 1.0.0
# This:# 1. Changes version: "DRAFT" → version: "1.0.0"# 2. Runs strict validation# 3. Makes the bundle immutableGit Workflow Integration
Section titled “Git Workflow Integration”After versioning, commit and tag:
# Stage versioned bundlesgit add bundles/
# Commit with clear messagegit commit -m "Release company-context bundle v1.0.0
- Added company overview and values- Added stakeholder map- Validated and ready for production use"
# Tag the releasegit tag company-context-v1.0.0
# Push to remotegit push origin main --tagsUpdate Dependent Bundles
Section titled “Update Dependent Bundles”After versioning a concern bundle, update bundles that import it:
id: bundle:acme-health-corptype: domainversion: "DRAFT" # Still drafting the domain bundle
imports: - bundle:acme-architecture:1.0.0 - bundle:acme-security:1.0.0 - bundle:acme-company-context:1.0.0 # Updated from DRAFT - bundle:acme-clinical:1.0.0Version the Complete Hierarchy
Section titled “Version the Complete Hierarchy”Version bundles from bottom up:
- Concern bundles first (leaf nodes)
- Domain bundle second (aggregator)
- Project bundle last (top-level)
# Step 1: Version all concern bundlesscs bundle version bundles/concerns/architecture.yaml --version 1.0.0scs bundle version bundles/concerns/security.yaml --version 1.0.0scs bundle version bundles/concerns/company-context.yaml --version 1.0.0# ... (all 11 concerns)
# Step 2: Update domain bundle imports, then version itscs bundle version bundles/domain/acme-health-corp.yaml --version 1.0.0
# Step 3: Update project bundle imports, then version itscs bundle version bundles/project/prior-auth-app.yaml --version 1.0.0Complete Example
Section titled “Complete Example”Initial Setup
Section titled “Initial Setup”# Create projectscs new project medication-adherence --type healthcarecd medication-adherence
# Add custom SCDsscs add scd company-overviewscs add scd clinical-safety-rulesPhase 1: Define Intent
Section titled “Phase 1: Define Intent”# Edit your SCDsvim context/project/company-overview.yamlvim context/project/clinical-safety-rules.yaml
# Create concern bundlevim bundles/concerns/company-context.yaml
# Loose validation while iteratingscs validate bundles/concerns/company-context.yaml# ✅ Passed (structure valid)Phase 2: Validate
Section titled “Phase 2: Validate”# Strict validation before versioningscs validate --bundle bundles/project-bundle.yaml --strict# ⚠️ Warning: Missing recommended field# Fix the issue...
scs validate --bundle bundles/project-bundle.yaml --strict# ✅ All validations passedPhase 3: Version
Section titled “Phase 3: Version”# Version concern bundlesscs bundle version bundles/concerns/company-context.yaml --version 1.0.0scs bundle version bundles/concerns/architecture.yaml --version 1.0.0# ... (all concerns)
# Update and version domain bundlescs bundle version bundles/domain/acme-health-corp.yaml --version 1.0.0
# Update and version project bundlescs bundle version bundles/project-bundle.yaml --version 1.0.0
# Commit to gitgit add -Agit commit -m "Release medication-adherence v1.0.0"git tag v1.0.0git push origin main --tagsIteration and Updates
Section titled “Iteration and Updates”Making Changes to Versioned Bundles
Section titled “Making Changes to Versioned Bundles”Once a bundle is versioned (e.g., 1.0.0), it’s immutable. To make changes:
Option 1: Patch Version (bug fixes, clarifications)
# Make changes to SCDvim context/project/company-overview.yaml
# Increment patch versionscs bundle version bundles/concerns/company-context.yaml --version 1.0.1Option 2: Minor Version (new features, additions)
# Add new SCDscs add scd data-retention-policy
# Add to bundle manifestvim bundles/concerns/compliance.yaml
# Increment minor versionscs bundle version bundles/concerns/compliance.yaml --version 1.1.0Option 3: Major Version (breaking changes)
# Restructure bundle significantly# Breaking changes to SCD schemas# Major architectural shifts
# Increment major versionscs bundle version bundles/concerns/architecture.yaml --version 2.0.0Cascading Updates
Section titled “Cascading Updates”When a concern bundle updates, you may need to update bundles that import it:
# Concern updated: company-context 1.0.0 → 1.0.1# Domain bundle imports it, so:
# Update domain bundle import referencevim bundles/domain/acme-health-corp.yaml# Change: bundle:acme-company-context:1.0.0 → 1.0.1
# Version domain bundle (patch or minor)scs bundle version bundles/domain/acme-health-corp.yaml --version 1.0.1
# Update project bundle import referencevim bundles/project/prior-auth-app.yaml# Change: bundle:acme-health-corp:1.0.0 → 1.0.1
# Version project bundlescs bundle version bundles/project/prior-auth-app.yaml --version 1.0.1Best Practices
Section titled “Best Practices”1. Use DRAFT Liberally
Section titled “1. Use DRAFT Liberally”Keep bundles as DRAFT during active development. Only version when ready to lock.
2. Validate Early and Often
Section titled “2. Validate Early and Often”Run loose validation during iteration to catch structural issues early.
3. Version Bottom-Up
Section titled “3. Version Bottom-Up”Always version concern bundles before domain bundles, and domain before project.
4. Document Changes
Section titled “4. Document Changes”Use git commit messages and bundle provenance to document why versions changed.
5. Tag Releases
Section titled “5. Tag Releases”Use git tags to mark important releases: v1.0.0, architecture-v2.0.0, etc.
6. Keep Versions in Sync
Section titled “6. Keep Versions in Sync”When updating imported bundles, update all dependent bundles together.
7. Test Before Versioning
Section titled “7. Test Before Versioning”Run strict validation and test with AI agents before locking versions.
Next Steps
Section titled “Next Steps”- CLI Reference - Complete command documentation
- Examples - Real-world bundle examples
- Specification - Technical specification details
- FAQ - Common questions answered