Version: 1.1 | Ratified: 2026-05-23 | Last Amended: 2026-05-23
This constitution governs all contributions to gui-cs/cli. It is the highest-authority engineering document in this repository.
Terminal.Gui.Cli is a .NET class library for exposing Terminal.Gui capabilities through scriptable CLI surfaces.
- Package ID:
Terminal.Gui.Cli - Namespace:
Terminal.Gui.Cli - TFM:
net10.0
Until implementation begins, this repository remains scaffold-first and should not accrue speculative production features.
Every PR must comply with all rules below.
Initialization and shutdown of Terminal.Gui runtime lifecycle APIs must be centralized in CliHost. No command, helper, or utility type may call lifecycle entrypoints directly.
Any change to public API surface must include corresponding updates in specs/ in the same PR.
Command discovery must be explicit and deterministic. Reflection scanning for command registration or dispatch is prohibited.
Runtime reflection-based JSON serialization is disallowed. JSON paths must use source-generated System.Text.Json contexts.
Test projects run in parallel by default. Tests must not mutate process-global state unless explicitly isolated with collection-level opt-outs.
Command implementations return exit codes/results through framework abstractions and must not terminate the process directly.
For versioned machine-readable contracts, v1 schemas are append-only. Existing fields/semantics are not removed or redefined.
Warnings are treated as errors. Builds and CI must remain warning-free.
Public API is documented in specs/library-spec.md. Two narrow file-layout exceptions are intentional: CommandResult and CommandResult<T> live together in CommandResult.cs, and ICliCommand<TValue> lives in ICliCommandGeneric.cs. Do not use angle brackets in filenames; the Generic suffix is the established convention for this single generic-interface companion file.
Terminal.Gui.Cli.Tests— unit testsTerminal.Gui.Cli.IntegrationTests— integration testsTerminal.Gui.Cli.SmokeTests— smoke-level validation
Constitution changes require a pull request that updates this file and explains the rationale and migration impact.