feat(style): pounamu/ochre semantic palette for CLI output (#83)#140
Merged
Conversation
…#83) Introduces src/style.rs with a two-colour semantic palette (pounamu green for structural text, ochre for passage/warn/error) applied foreground-only with WCAG-aware truecolor escapes. Gating: NO_COLOR (env) > TTY-detect > CLICOLOR_FORCE > plain. The hook-protocol path (guardrails --match-stdin) and all --json outputs remain ANSI-free even under CLICOLOR_FORCE=1, so machine consumers are unaffected. Structural pounamu was lightened from RGB(31,77,63) to RGB(61,130,104) for dark-terminal readability (~5.0:1 vs black, WCAG AA pass). 536/536 tests pass; zero new dependencies. Closes #83. Part of parent #64. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
009855c to
a498050
Compare
Deploying arai with
|
| Latest commit: |
a498050
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1e004d90.arai-dh0.pages.dev |
| Branch Preview URL: | https://feat-83-cli-palette.arai-dh0.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a semantic two-colour palette to Arai's CLI output (closes #83,
part of parent #64).
src/style.rs— new module; single source of truth for all ANSItruecolor construction. Five public helpers:
structural(),passage(),error(),warn(),should_colorize(). Palette: pounamuRGB(61,130,104) for structural text; ochre RGB(184,118,58) for
passage moments, warnings, and errors. Foreground-only unconditionally —
no background escapes anywhere.
Gating hierarchy (highest priority wins):
NO_COLORpresent →strip all; non-TTY stdout and no
CLICOLOR_FORCE→ strip all;CLICOLOR_FORCE=1→ force on; interactive TTY → on.NO_COLORdominates
CLICOLOR_FORCE.Machine-consumer carve-out: the hook-protocol path
(
guardrails --match-stdin) and every--jsonflag output remainANSI-free even when
CLICOLOR_FORCE=1is set.src/hooks.rsis notmodified and does not import the style module — the carve-out is
structural, not conditional.
AC9 legibility decision: structural pounamu was lightened from
the original RGB(31,77,63) (#1f4d3f) to RGB(61,130,104) (#3d8268)
following a user-directed readability review. WCAG 2.1 contrast
(verifier-computed): ~5.0:1 on black (passes WCAG AA >=4.5:1);
~4.2:1 on white (below WCAG AA-normal 4.5:1, above AA-large 3:1).
The old value was ~2.3:1 on black (failing AA). The white-terminal
gap (~4.2:1 vs 4.5:1) is a known caveat; AC9 calls for human visual
inspection rather than a specific numeric threshold, and the new
value is visibly improved on both common terminal backgrounds.
Zero new dependencies: Cargo.toml is unchanged from
origin/main.No colour crate, no terminal crate, no temp-dir crate.
Test coverage
Full gate:
cargo fmt --checkclean,cargo clippy0 new warnings,cargo test536/536.Provenance
Built via the Taniwha dispatch cycle (design v5 → contract → leaf → verifier),
with a user-directed AC9 legibility correction (corrective leaf + verifier)
when the dispatcher's WCAG check flagged the original pounamu as too dark on
dark terminals. Full audit trail under
.taniwha/kupu/in this branch.🤖 Generated with Claude Code