sdr-grader
A deterministic, rule-based linter for Adobe Customer Journey Analytics
(CJA) and Adobe Analytics (AA) implementations. It consumes JSON snapshots
from cja_auto_sdr and
aa_auto_sdr, evaluates them
against a versioned YAML rubric, and produces a self-contained HTML report
card plus machine-readable JSON.
File and directory grading make no network requests or Adobe API calls: the
same input and rubric always produce the same grade. The convenience modes
--dataview and --rsid are different: they launch a child generator, and
that child calls Adobe APIs before the local grader runs.
What it grades
sdr-grader ships strict and pragmatic rubric packs. Both cover schema
hygiene, naming consistency, segment complexity, calculated metric
maintainability, attribution coverage, and governance posture. strict uses
tight, master-cert-grade thresholds; pragmatic uses the same rule IDs with
looser thresholds and severities.
Bundled pack 2.0 has 27 rule IDs. Its scores are not comparable with pack
1.0, so re-baseline CI thresholds, trends, and leaderboards after upgrading.
Every default rule grades data carried by the snapshot. Optional registered
checks can use operator-supplied JSON; see Supplementary inputs.
How it grades
- Adapt the platform snapshot into a normalized implementation.
- Run rules from the selected rubric pack.
- Score each weighted category from fired and available severity.
- Assign a letter using the pack's descending grade-scale bands.
The scoring implementation is pinned with this release at
src/sdr_grader/core/grade_calc.py.
First local grade
This auth-free quickstart works from any writable directory after installing Python 3.11 or newer. It grades a tagged synthetic fixture, so you can confirm the installation before using production data or configuring Adobe credentials.
Install the released grader with uv (or use pipx or another isolated Python
tool installer):
uv tool install sdr-grader
sdr-grader --version
Download the v1.2.3 synthetic CJA snapshot.
macOS and Linux:
curl -fL -o cja_snapshot_clean.json https://raw.githubusercontent.com/brian-a-au/sdr-grader/v1.2.3/tests/fixtures/cja_snapshot_clean.json
Windows PowerShell:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/brian-a-au/sdr-grader/v1.2.3/tests/fixtures/cja_snapshot_clean.json" -OutFile "cja_snapshot_clean.json"
Grade it with the installed command on macOS, Linux, or Windows:
sdr-grader cja_snapshot_clean.json --output grade.html --json grade.json --quiet
Open the local HTML report:
open grade.html # macOS
xdg-open grade.html # Linux
Start-Process .\grade.html # Windows PowerShell
Live snapshots have two separate optional prerequisites:
- CJA: install
cja_auto_sdrusing its Installation instructions, then configure its Adobe credentials. Generate with--include-all-inventory; without the complete CJA inventory, calculated-metric and segment inputs are empty and those rules stay silent. - AA: install
aa_auto_sdrusing its Installation instructions, then configure its Adobe credentials. AA includes both inventories by default.
The upstream CJA
Component Inventory Overview
documents the complete set of --include-* switches.
Using sdr-grader
The following are installed-user workflows. Generate live snapshots only after installing and authenticating the appropriate prerequisite above:
# CJA: include the complete component inventory.
cja_auto_sdr dv_prod_web --include-all-inventory --format json --output snapshot.json
# AA: inventory is included by default.
aa_auto_sdr prod_us --format json --output snapshot.json
# Either platform is auto-detected from the resulting JSON.
sdr-grader snapshot.json --output grade.html --json grade.json
For an installed streaming workflow on macOS, Linux, or Windows shells with pipe support:
cja_auto_sdr dv_prod_web --include-all-inventory --format json --output - | sdr-grader - --output grade.html
aa_auto_sdr prod_us --format json --output - | sdr-grader - --output grade.html
Input modes
| Mode | Invocation | Network behavior |
|---|---|---|
| File | sdr-grader path/to/snapshot.json |
Local only. |
| Directory | sdr-grader path/to/snapshots/ |
Local only; selects the newest snapshot. |
| Historical | sdr-grader path/to/snapshots/ --at 2026-04-01 |
Local only; selects the closest snapshot not after the date. |
| Trend | sdr-grader path/to/snapshots/ --trend |
Local only; grades dated snapshots chronologically. |
| CJA child generator | sdr-grader --dataview dv_prod_web |
cja_auto_sdr calls Adobe APIs; complete inventory is requested automatically. |
| AA child generator | sdr-grader --rsid prod_us |
aa_auto_sdr calls Adobe APIs. |
| Stdin | … | sdr-grader - |
The grader is local; the producer determines whether the pipeline uses a network. |
One run grades one platform. Keep CJA and AA snapshots in separate directories. Directory history uses only same-platform, same-instance siblings; trend mode rejects mixed-platform or mixed-instance input rather than combining it.
Supplementary inputs
Forked rubrics can read optional JSON from Implementation.supplementary_data.
Attach it with repeatable --extra-input KEY=PATH flags; a rule whose key is
absent stays silent. The tagged
supplementary-input contract
defines keys, paths, and failure behavior.
Output
- HTML report card at
--output PATH(defaultgrade-{report-id}.html) is a single self-contained file with no external CSS or JavaScript. - JSON output at
--json PATHuses schema1and contains stable instance, adapter, rubric, and grader identity plus the complete report model. See the tagged JSON output contract.
HTML color packs
Generated HTML supports exactly four built-in color packs, in this public
order: default, ADBE, OMTR, BLUE. Select one for a normal report or a
trend report with the case-sensitive --color-pack option:
sdr-grader snapshot.json --color-pack ADBE --output grade.html
sdr-grader snapshots/ --trend --color-pack BLUE --output trend.html
The same choice is available to renderer API callers:
from sdr_grader.render import render
from sdr_grader.trend import render_trend
grade_html = render(report, color_pack="OMTR")
trend_html = render_trend(trend, color_pack="BLUE")
--pack and --color-pack are independent. --pack selects the scoring
rubric (strict or pragmatic); --color-pack selects only the presentation
palette for generated HTML. It does not enter the report model or separately
written JSON, and does not change findings, scoring, grades, or exit codes.
The named palettes use source swatches as design inspiration only. They are not official brand assets, contain no logos, and do not imply affiliation, sponsorship, endorsement, or approval by any company. Reviewed text and essential-graphic color pairs are tested at WCAG contrast thresholds, but color is not the only severity cue: reports retain severity text and bordered structure. Print-specific foreground, background, and border roles are also tested. Every palette remains embedded in the same self-contained HTML, so reports continue to work offline without external CSS or JavaScript.
Rendered examples for this release:
| Clean (A) | Messy (F) | |
|---|---|---|
| CJA | CJA clean | CJA messy |
| AA | AA clean | AA messy |
Troubleshooting
Missing generators, Adobe authentication, incomplete inventories, platform detection, directory mixing, compatibility warnings, output paths, and privacy are covered in the tagged troubleshooting guide.
Before sharing an HTML or JSON report, follow the current report-sharing privacy matrix.
Integrating sdr-grader
- CI integration — use
--fail-belowsafely in automation. - Trend reports — filename conventions and flag interactions.
- Internal leaderboards — build a distribution reference from collected JSON outputs.
- Supplementary inputs — attach repeatable
--extra-input KEY=PATHdata. - Claude Code skill — query a grade without rerunning the grader.
Extending sdr-grader
Start with the tagged customization guide, then choose the narrowest extension surface:
- Project configuration — suppressions in
.sdr-grader.yaml. - Rubric format — fork or create a YAML pack.
- Check-function guide — add rule logic.
- Adapter guide — add a platform in a source checkout.
Maintaining sdr-grader
These are source-checkout workflows. Run them from the repository root after cloning the v1.2.3 source tree:
uv sync
uv run pytest
uv run ruff check
uv run python scripts/build_cja_fixtures.py
uv run python scripts/generate_examples.py
uv run python scripts/generate_grade_examples.py
uv run python scripts/generate_trend_example.py
Maintainer references:
- Platform coverage — CJA/AA compatibility evidence and known gaps.
- Calibration corpus — private compatibility and calibration admission.
- Threshold calibration — admitted-cohort status.
- Rubric audit — rule premises against Adobe documentation.
- Release checklist — publication, recovery, and announcement gates.
Community
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sdr_grader-1.2.3.tar.gz.
File metadata
- Download URL: sdr_grader-1.2.3.tar.gz
- Upload date:
- Size: 276.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa004044902f2a24c4327b7001a09d4a2aa8a603eff85c920c550659443de80c
|
|
| MD5 |
6db9dae63ddd1f22daf537736913038b
|
|
| BLAKE2b-256 |
82f0b5e6e43845c2f66ca88b0d49430604e717ff35922fb298e94ffc71df33ad
|
Provenance
The following attestation bundles were made for sdr_grader-1.2.3.tar.gz:
Publisher:
release.yml on brian-a-au/sdr-grader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sdr_grader-1.2.3.tar.gz -
Subject digest:
aa004044902f2a24c4327b7001a09d4a2aa8a603eff85c920c550659443de80c - Sigstore transparency entry: 2402390856
- Sigstore integration time:
-
Permalink:
brian-a-au/sdr-grader@e3e82dca03ac831da6aa4825e4c1bf087f8ea0b7 -
Branch / Tag:
refs/tags/v1.2.3 - Owner: https://github.com/brian-a-au
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e3e82dca03ac831da6aa4825e4c1bf087f8ea0b7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sdr_grader-1.2.3-py3-none-any.whl.
File metadata
- Download URL: sdr_grader-1.2.3-py3-none-any.whl
- Upload date:
- Size: 137.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29def223ea89eb11f5cf138085ee2b3019d86a9d203707ed30f78a8775a85d9d
|
|
| MD5 |
83699f51efaba86ccaebfae263ec3953
|
|
| BLAKE2b-256 |
c97473d74cbb6d263dc97db36ee9393eff0b869d50c0e17cd69cec32df2a814e
|
Provenance
The following attestation bundles were made for sdr_grader-1.2.3-py3-none-any.whl:
Publisher:
release.yml on brian-a-au/sdr-grader
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sdr_grader-1.2.3-py3-none-any.whl -
Subject digest:
29def223ea89eb11f5cf138085ee2b3019d86a9d203707ed30f78a8775a85d9d - Sigstore transparency entry: 2402390953
- Sigstore integration time:
-
Permalink:
brian-a-au/sdr-grader@e3e82dca03ac831da6aa4825e4c1bf087f8ea0b7 -
Branch / Tag:
refs/tags/v1.2.3 - Owner: https://github.com/brian-a-au
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e3e82dca03ac831da6aa4825e4c1bf087f8ea0b7 -
Trigger Event:
push
-
Statement type: