Guidelines & architecture compliance report (read-only)
Produces a report of every guideline/architecture violation in the project (or just the
current git diff), in one of two formats. Applies no fixes and changes no source
files — this is strictly the report-generation half of guidelines-check-all /
guidelines-check-diff, split out because "show me the state" and "fix everything" are
different requests with different risk profiles (report generation is always safe to run
without asking; auto-fix rewrites files and should not be launched silently — see
guidelines-check-all/guidelines-check-diff for that workflow).
It shares the cache in <repo-root>/.guidelines-cache/ with those two skills (compact
rule list + generated check_guidelines.py/fix_guidelines.py); whichever skill runs
first builds it. This skill only ever runs the checker, never the fixer.
Token economy — follow strictly: if the cache exists, NEVER read the original
API_GUIDELINES.md/ARCHITECTURE.md. Read only GUIDELINES_COMPACT.md and the
checker's own output.
0. Decide cold vs warm
ROOT=$(git rev-parse --show-toplevel); cache dir is $ROOT/.guidelines-cache/.
If GUIDELINES_COMPACT.md, check_guidelines.py and fix_guidelines.py all exist
there → go to Warm run. Otherwise do the First run exactly as specified in
../guidelines-check-all/SKILL.md (the cache build is scope-independent; the generated
check_guidelines.py already supports --diff as that spec requires — nothing about
report-only mode changes how the cache is built).
Pick a scope and format
- Scope —
all (default) scans every file matched by SOURCE_GLOBS; diff scans
only the current git diff (check_guidelines.py --diff). Use diff when the user
says "current changes"/"this diff", all otherwise.
- Format
md (default for a human-facing request) — Markdown: a summary table
(rule ID, tag, violation count) followed by one section per violated rule listing
every `path:line` hit. Use when the report will be opened/read/committed by a
person.
xml — compact, attribute-based: <guidelines-report scope="…" generated="…">
with <rules><rule id=".." tag=".." count=".."/></rules> (summary) and
<violations><violation rule=".." file=".." line="..">message</violation></violations>
(findings), plus <ai-findings> if step 3 below ran. No checked-in XSD for this one
— the shape is simple enough to hold in your head; don't build tooling to validate it.
Use when the report is meant to be handed off to another AI/agent session to parse
programmatically.
If the request doesn't say, default to all + md.
Warm run (every time)
- Optional staleness note: if
shasum -a 256 of API_GUIDELINES.md/ARCHITECTURE.md
differs from manifest.json, warn that the docs changed and guidelines-clear would
rebuild the cache — but continue with the cache (only an explicit clear rebuilds).
python3 $ROOT/.guidelines-cache/check_guidelines.py [--diff]. This output — already
grouped per rule with counts — is the mechanical part of the report; no separate
formatting script is needed. (If the script itself crashes, repair it in place — it
is cache, editable.)
[ai]-tagged rules (from GUIDELINES_COMPACT.md) are never covered by step 2 — they
need judgment even to detect. Only spend the tokens reviewing them if the user asked
for a deep/thorough report:
- Deep: review the in-scope files (diff scope, or — for
all — only if the user
explicitly accepts a full-repo pass, since that is expensive) against each [ai]
entry; note file:line findings per rule, same shape as step 2's output.
- Not deep (default): skip the review; the report just lists how many
[ai]
rules exist and says they weren't evaluated this run.
- Write the report to
$ROOT/guidelines_report.<md|xml> combining step 2's violations
(and step 3's findings, if any) in the format chosen above. Do not edit any other
file.
- Tell the user: total violation count, top few rules by count, whether
[ai] rules
were reviewed, and the report's path. Offer to open it, but do not start editing code
from it — that is out of scope for this skill. If they then ask for fixes, hand off
to guidelines-check-all (whole project) or guidelines-check-diff (current diff
only) — both can reuse this report instead of re-running the checker, see their notes.
Notes
- Portable: copy this folder (with
guidelines-check-all, guidelines-check-diff and
guidelines-clear) into any project that has an API_GUIDELINES.md and/or
ARCHITECTURE.md; the cache is regenerated per project.
- The generated report is a point-in-time snapshot — regenerate it (re-run step 2)
rather than trying to diff/patch the old one when asked for a fresh report.
- If
guidelines-check-all/guidelines-check-diff are run afterward and find
$ROOT/guidelines_report.<md|xml> still fresh for the scope they need, they reuse its
violations instead of re-invoking the checker — see the "reuse a fresh report" note in
their SKILL.md files. Not essential, just avoids a redundant run.
1---2name: guidelines-check-report3description: Generate a standalone report of API_GUIDELINES.md/ARCHITECTURE.md violations (Markdown for a human, or custom-schema XML for another AI/agent session to parse), with no auto-fix and no code changes. Use when asked to (re)generate/produce a guidelines/architecture compliance report, not to fix anything.4---56# Guidelines & architecture compliance report (read-only)78Produces a report of every guideline/architecture violation in the project (or just the9current git diff), in one of two formats. **Applies no fixes and changes no source10files** — this is strictly the report-generation half of `guidelines-check-all` /11`guidelines-check-diff`, split out because "show me the state" and "fix everything" are12different requests with different risk profiles (report generation is always safe to run13without asking; auto-fix rewrites files and should not be launched silently — see14`guidelines-check-all`/`guidelines-check-diff` for that workflow).1516It shares the cache in `<repo-root>/.guidelines-cache/` with those two skills (compact17rule list + generated `check_guidelines.py`/`fix_guidelines.py`); whichever skill runs18first builds it. This skill only ever *runs* the checker, never the fixer.1920**Token economy — follow strictly:** if the cache exists, NEVER read the original21`API_GUIDELINES.md`/`ARCHITECTURE.md`. Read only `GUIDELINES_COMPACT.md` and the22checker's own output.2324## 0. Decide cold vs warm2526`ROOT=$(git rev-parse --show-toplevel)`; cache dir is `$ROOT/.guidelines-cache/`.27If `GUIDELINES_COMPACT.md`, `check_guidelines.py` and `fix_guidelines.py` all exist28there → go to **Warm run**. Otherwise do the **First run** exactly as specified in29`../guidelines-check-all/SKILL.md` (the cache build is scope-independent; the generated30`check_guidelines.py` already supports `--diff` as that spec requires — nothing about31report-only mode changes how the cache is built).3233## Pick a scope and format3435- **Scope** — `all` (default) scans every file matched by `SOURCE_GLOBS`; `diff` scans36 only the current git diff (`check_guidelines.py --diff`). Use `diff` when the user37 says "current changes"/"this diff", `all` otherwise.38- **Format**39 - **`md`** (default for a human-facing request) — Markdown: a summary table40 (rule ID, tag, violation count) followed by one section per violated rule listing41 every `` `path:line` `` hit. Use when the report will be opened/read/committed by a42 person.43 - **`xml`** — compact, attribute-based: `<guidelines-report scope="…" generated="…">`44 with `<rules><rule id=".." tag=".." count=".."/></rules>` (summary) and45 `<violations><violation rule=".." file=".." line="..">message</violation></violations>`46 (findings), plus `<ai-findings>` if step 3 below ran. No checked-in XSD for this one47 — the shape is simple enough to hold in your head; don't build tooling to validate it.48 Use when the report is meant to be handed off to *another* AI/agent session to parse49 programmatically.5051If the request doesn't say, default to `all` + `md`.5253## Warm run (every time)54551. Optional staleness note: if `shasum -a 256` of `API_GUIDELINES.md`/`ARCHITECTURE.md`56 differs from `manifest.json`, warn that the docs changed and `guidelines-clear` would57 rebuild the cache — but continue with the cache (only an explicit clear rebuilds).582. `python3 $ROOT/.guidelines-cache/check_guidelines.py [--diff]`. This output — already59 grouped per rule with counts — *is* the mechanical part of the report; no separate60 formatting script is needed. (If the script itself crashes, repair it in place — it61 is cache, editable.)623. `[ai]`-tagged rules (from `GUIDELINES_COMPACT.md`) are never covered by step 2 — they63 need judgment even to detect. Only spend the tokens reviewing them if the user asked64 for a **deep**/thorough report:65 - **Deep**: review the in-scope files (diff scope, or — for `all` — only if the user66 explicitly accepts a full-repo pass, since that is expensive) against each `[ai]`67 entry; note file:line findings per rule, same shape as step 2's output.68 - **Not deep** (default): skip the review; the report just lists how many `[ai]`69 rules exist and says they weren't evaluated this run.704. Write the report to `$ROOT/guidelines_report.<md|xml>` combining step 2's violations71 (and step 3's findings, if any) in the format chosen above. Do not edit any other72 file.735. Tell the user: total violation count, top few rules by count, whether `[ai]` rules74 were reviewed, and the report's path. Offer to open it, but do not start editing code75 from it — that is out of scope for this skill. If they then ask for fixes, hand off76 to `guidelines-check-all` (whole project) or `guidelines-check-diff` (current diff77 only) — both can reuse this report instead of re-running the checker, see their notes.7879## Notes8081- Portable: copy this folder (with `guidelines-check-all`, `guidelines-check-diff` and82 `guidelines-clear`) into any project that has an `API_GUIDELINES.md` and/or83 `ARCHITECTURE.md`; the cache is regenerated per project.84- The generated report is a point-in-time snapshot — regenerate it (re-run step 2)85 rather than trying to diff/patch the old one when asked for a fresh report.86- If `guidelines-check-all`/`guidelines-check-diff` are run afterward and find87 `$ROOT/guidelines_report.<md|xml>` still fresh for the scope they need, they reuse its88 violations instead of re-invoking the checker — see the "reuse a fresh report" note in89 their SKILL.md files. Not essential, just avoids a redundant run.