# Li Uniformity

> Use in a Lintel contributor source checkout or CI to inspect the uniformity floor and recorded matrix; missing trusted source tests remain unavailable.

- Skill: `jokerman89/li-uniformity` (Agent Skill)
- Install (CLI): `npx get-skill add jokerman89/li-uniformity`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jokerman89/li-uniformity/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: jokerman89 (https://skillmd.com/u/jokerman89)
- Updated: 2026-11-15
- Page: https://skillmd.com/skills/jokerman89/li-uniformity

---


> **Lintel on GitHub Copilot.** Generated from `skills/uniformity/SKILL.md`; edit the canonical file, then run
> `li-copilot init`.
> - **Resource root:** `../../..` from this skill's base directory (the Lintel source with `bin/`,
>   `lib/`, `skills/`). Write plans, state and evidence into the working repository's `.claude/`
>   tree, never into the resource root.
> - **Skill-relative paths:** this skill's own `scripts/`, `references/` and `data/` folders (and a
>   `<base>` that the workflow defines as its own directory) mean
>   `../../../skills/uniformity/` in the Lintel source, not this generated folder.
>   `${LINTEL_SKILLS_DIR:-skills}` means the skills root, `../../../skills`. A `bin/li-run` step
>   runs in the working repository, so use `$LINTEL_SKILLS_DIR/uniformity/` there.
> - **Shell steps:** run Bash snippets with Bash (Git for Windows' `bash.exe` on Windows, never
>   `System32\bash.exe`). Save a snippet to a temporary `.sh` file and run
>   `bash "<resource root>/bin/li-run" <file>`; it prepares `LINTEL_SOURCE_ROOT`, `LINTEL_REPO_ROOT`
>   and the profile context.
> - **Tools:** Read=`view`, Write=`create`, Edit=`edit`, Bash=`bash`/`powershell`, Grep=`grep`,
>   Glob=`glob`, AskUserQuestion=`ask_user`, TodoWrite=the plan checklist, Task or a named role=`task`
>   with that custom agent, WebFetch=`web_fetch`.
> - **Other Lintel workflows** are native skills: invoke `/li-<name>` rather than reading their
>   files. Named roles such as `CodeReviewer` are custom agents.

You are the `uniformity` skill — read-only window onto the uniformity-as-contract
mechanism (the parked `/autoplan` recommendation, now built).

This is contributor-source-only, not consumer health inspection. Use
[doctor's inspection owner](../../../skills/doctor/references/inspection.md) for installed
files and target layout. A consumer bundle without the trusted source tests
cannot run this floor; retain the visible limitation and never use target-code fallback.

## What this skill does

Lintel's 14 uniformity dimensions (D1–D14) are held to a **per-kind floor**, not a
global maximum. This skill surfaces the contract's two enforcement surfaces in one
place:

1. runs `tests/shape/uniformity-coverage.sh` — the Gate-M3 floor check (HARD-FAILS
   only when a `workflow_root: true` skill or a block-hook lacks `necessity:`), which
   also prints per-kind adoption % of every tracked dimension;
2. points at `.claude/engineering/audits/uniformity-matrix.md` — the living dashboard regenerated by
   `bin/li-uniformity`.

It never writes. To regenerate the matrix, the operator runs `bin/li-uniformity`
explicitly (it edits a doc, so it is not auto-run here).

## When to use

- "Is the uniformity floor green?" — runs the shape-test, shows pass/fail
- "What's our necessity-field adoption per kind?" — surfaces the adoption summary
- After adding a new workflow_root skill or block-hook — confirm the floor still holds
- Before a meta-infra REVIEW (Gate M3) — preview the floor verdict

## When NOT to use

- To REGENERATE the matrix — that's `bin/li-uniformity` (writes a doc)
- To CHANGE the contract — edit `docs/concepts/uniformity-contract.md`
- To enforce the long tail — adoption above the floor is *tracked, not mandated*;
  this skill reports it, it does not gate on it

## Inputs

All optional:

- `--check` — also run `bin/li-uniformity --check` to report whether the matrix is
  stale (warn-only; does not fail the skill)
- `--matrix` — print the matrix's adoption-summary head instead of running the test

## Workflow

```bash
set -euo pipefail
source_root="${LINTEL_SOURCE_ROOT:?select the trusted Lintel source}"
mode="test"
while [ $# -gt 0 ]; do
  case "$1" in
    --check)  mode="check"; shift ;;
    --matrix) mode="matrix"; shift ;;
    *) echo "Usage: /li-uniformity [--check] [--matrix]"; exit 2 ;;
  esac
done

MATRIX="$source_root/.claude/engineering/audits/uniformity-matrix.md"
floor="$source_root/tests/shape/uniformity-coverage.sh"
generator="$source_root/bin/li-uniformity"

if [ "$mode" = matrix ]; then
  [ -f "$MATRIX" ] && [ -r "$MATRIX" ] || {
    printf 'UNAVAILABLE: readable source matrix missing: %s\n' "$MATRIX" >&2
    exit 2
  }
  awk '/^## Matrix by kind/{exit} {print}' "$MATRIX"
  printf '\nRecorded source matrix only; floor not run. Full matrix: %s\n' "$MATRIX"
  exit 0
fi

[ -f "$floor" ] && [ -r "$floor" ] || {
  printf 'UNAVAILABLE: source floor helper missing: %s\n' "$floor" >&2
  exit 2
}
if bash "$floor"; then :
else
  result=$?
  printf 'FAILED: floor helper exited %s; preserve its diagnostics above.\n' "$result" >&2
  exit "$result"
fi

if [ "$mode" = check ]; then
  [ -f "$MATRIX" ] && [ -r "$MATRIX" ] && [ -f "$generator" ] || {
    printf 'UNAVAILABLE: source matrix or freshness helper is missing.\n' >&2
    exit 2
  }
  printf '\n## Matrix freshness\n'
  result=0
  output=$(bash "$generator" --check) || result=$?
  printf '%s\n' "$output"
  if [ "$result" -ne 0 ]; then
    stale='li-uniformity --check: DIFF (matrix is stale; run bin/li-uniformity)'
    if [ "$result" -eq 1 ] && { [ "$output" = "$stale" ] || [[ "$output" == "$stale"$'\n'* ]]; }; then
      printf 'STALE: source matrix differs; warning only, no regeneration performed.\n'
    else
      printf 'ERROR: freshness helper exited %s; this is not a staleness verdict.\n' "$result" >&2
      exit "$result"
    fi
  fi
fi
printf '\nSource dashboard: %s\nContract: docs/concepts/uniformity-contract.md\n' "$MATRIX"
```

Resolve `LINTEL_SOURCE_ROOT` from the loaded trusted adapter, never from the target cwd.
These helpers inspect their own source component tree; they do not audit an arbitrary
consumer project. A portable bundle may not contain the developer floor test or recorded
matrix: report that boundary, not an invented passing gate or a target-executable fallback.
For an explicitly requested current render,
`bash "$LINTEL_SOURCE_ROOT/bin/li-uniformity" --stdout` is the existing nonwriting operation.
Do not use default generation or `--output`
in this read-only workflow.

## Status protocol

- **PASS** — the actual floor helper passed; adoption remains descriptive, not maturity.
- **FAILED** — preserve the floor helper's nonzero exit and diagnostics. A floor violation
  names the component; an execution error is not proof that the component violates policy.
- **STALE** — only the documented diff result is warn-only; no matrix was written.
- **UNAVAILABLE / ERROR** — a missing resource, unreadable matrix or helper failure leaves
  its check unverified. Never relabel every nonzero exit as stale.
- **RECORDED MATRIX** — `--matrix` displayed existing data; it did not run the floor.

Examples: `--check` with a missing necessity field retains the floor failure even if the
matrix is also stale. A valid floor and an actual matrix diff return a visible warning.
A missing helper returns unavailable without searching the target or personal install.
None of these outcomes proves that a host executed a declared skill or hook.

## Integration

**Reads:**
- `tests/shape/uniformity-coverage.sh` (the floor gate + adoption reporter)
- `.claude/engineering/audits/uniformity-matrix.md` (the living dashboard)
- every component's frontmatter (indirectly, via the test/generator)

**Writes:**
- nothing (pure read; matrix regeneration is a separate explicit `bin/li-uniformity` call)

## Anti-patterns

- **Treating low long-tail adoption as a failure** — only the floor (necessity on
  workflow_root skills + block-hooks) gates. The rest is tracked.
- **Hand-editing the matrix** — it's generated; edits are overwritten. Change the
  source frontmatter and re-run `bin/li-uniformity`.

## See also

- `docs/concepts/uniformity-contract.md` (the per-kind floor + tracked dimensions)
- `tests/shape/uniformity-coverage.sh` (Gate-M3 floor enforcer)
- `bin/li-uniformity` (the regenerable matrix generator)
- `.claude/engineering/audits/uniformity-matrix.md` (the living dashboard)
- `/li-audit` (the sibling read-only window onto the unified audit trail)
- `.claude/engineering/audits/lintel-uniformity-MASTER.md` (the original top-20 findings)

