Context and Problem Statement
SpecKitty already uses SPEC_KITTY_ENABLE_SAAS_SYNC as the rollout boundary for SaaS-synced functionality. Introducing tracker commands outside this boundary creates policy drift, user confusion, and inconsistent behavior between installations.
The tracker integration introduces new CLI commands (spec-kitty tracker ...) and sync orchestration paths. Without strict gating, users with SaaS sync disabled could still discover partially functional tracker behavior.
Decision Drivers
- Preserve existing feature-flag contract for SaaS-dependent capabilities.
- Avoid fragmented UX where command help exposes disabled products.
- Ensure deterministic behavior in environments where SaaS sync is intentionally off.
- Minimize operational/support burden from accidental partial enablement.
Considered Options
- Always register tracker commands and show runtime warnings.
- Gate only mutating commands, keep read-only commands visible.
- Register tracker command group only when SaaS sync flag is enabled (chosen).
Decision Outcome
Chosen option: register tracker commands only when SPEC_KITTY_ENABLE_SAAS_SYNC is enabled, and hard-fail through legacy/direct paths with existing disabled-message semantics.
Required Behavior
trackercommand group is not registered when flag is disabled.- Any direct/legacy invocation path uses the same disabled response pattern as sync/auth command guards.
- No background tracker sync hooks run when flag is disabled.
Consequences
Positive
- Feature rollout remains consistent with established policy.
- Help surface accurately reflects usable command set.
- Lower risk of unsupported local states.
Negative
- Teams wanting tracker-only local mode must enable SaaS sync flag in v1.
- Additional guard-path tests are required.
Neutral
- Future decoupling from SaaS flag remains possible but is explicitly deferred.
Confirmation
This decision is validated when:
spec-kitty --helpexcludes tracker commands when flag is off.spec-kitty --helpincludes tracker commands when flag is on.- Direct invocation while disabled returns standard disabled guidance.
Pros and Cons of the Options
Option 1: Always register + runtime warnings
Pros:
- Easier command discoverability during development.
Cons:
- Violates established gate model.
- Increases accidental usage/support overhead.
Option 2: Partially gate command set
Pros:
- Offers limited read-only visibility.
Cons:
- Blurry policy boundary.
- Inconsistent user expectations.
Option 3: Full command registration gating (Chosen)
Pros:
- Clear binary rollout behavior.
- Aligns with existing sync/auth guard patterns.
Cons:
- Defers tracker-only mode experimentation.
More Information
- CLI command registration:
src/specify_cli/cli/commands/__init__.py - Tracker command module:
src/specify_cli/cli/commands/tracker.py - Flag guard helper:
src/specify_cli/tracker/feature_flags.py