Skip to main content

Module derivation

Module derivation 

Source
Expand description

Derivation engine for extracting values from multiple sources.

The derivation engine extracts values from:

  • Branch name - Current git branch (e.g., sprint/2026-Q1-W4/PROJ-123)
  • File path - Spec file path (e.g., .chant/specs/teams/platform/...)
  • Environment variables - Shell environment (e.g., $TEAM_NAME)
  • Git user - Git user.name or user.email from config

For each source, the engine applies regex patterns to extract the first capture group. If a pattern doesn’t match, the engine returns None for that field (graceful failure).

Structs§

DerivationContext
Context containing all available data sources for derivation
DerivationEngine
Engine for deriving field values from configured sources

Enums§

ValidationResult
Result of validating a derived value

Functions§

build_context
Build a DerivationContext populated with current environment data.