Users and CI expect no-color.org semantics for accessibility and logs.
Verification and traceability
Platform spec article
Verification and traceability
Spec standingStandard
-
Any non-empty NO_COLOR strips ANSI emission.
Context
Decision
Rule Detail NO_COLORNon-empty value must force ShouldEmitAnsi()falseReference no-color.org Consequences
Capability probes and markup render paths consult the same gate.
Verification anchors
CapabilitiesTests.bd;Console/Capabilities.bd. -
COLORTERM presence selects TrueColor when color allowed.
Context
Modern terminals advertise truecolor via COLORTERM without breaking NO_COLOR.
Decision
Rule Detail Probe COLORTERMset →TrueColorwhen color not strippedFORCE_COLORMay enable emission on non-TTY stdout Consequences
EffectiveColorModel reflects env probes before SGR downgrade (see D-CORE-TERM-0003).
Verification anchors
CapabilitiesTests.bd. -
RGB downgrades through palette ladders automatically.
Context
Callers should not manually pick CSI color modes per terminal.
Decision
Rule Detail Downgrade RGB → indexed → basic is lossy API No per-sequence model selector on public helpers Consequences
Styled output remains readable on Basic16 hosts without author branches.
Verification anchors
AnsiSgrGoldenTests.bd; capability + SGR integration.
- Contracts and edge cases MUST rules for capability probing and color stripping.
- Design model Capability record, color models, and environment-driven probing.
- Examples Checking capabilities before custom styling.
- Flow and algorithm Probe and strip algorithms for terminal capabilities.
- Verification and traceability Tests and sources for capability probing.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Purpose
Section titled “Purpose”Document verification and traceability for the Console Capabilities feature: role-specific normative detail beyond the feature hub.
Canonical references
Section titled “Canonical references”- Feature hub: Console Capabilities
- Sibling articles in this bundle (design model, contracts, flow, examples, verification)
Detailed behavior
Section titled “Detailed behavior”| Artifact | Role |
|---|---|
Console/Capabilities.bd | ProbeStdout, ShouldEmitAnsi, strip logic |
Platform/Terminal.bd | ProbeColorModel, ForcePlainText, IsAtty |
CapabilitiesTests.bd | Strip vs emit behavior |
AnsiEscapeTests.bd | Conditional empty sequences when ANSI disabled |
Changes to CAP-001–CAP-005 must extend CapabilitiesTests.bd or ANSI golden tests that assert gating.
Verification
Section titled “Verification”See the verification and traceability article in this bundle and compiler/corelib/beskid_corelib/tests/corelib_tests/src/console/.
Related topics
Section titled “Related topics”- Parent feature hub and Terminal and console area