Public content repository for Hotspots. Stores all posts and supporting assets needed to reproduce any analysis run and report produced by the Hotspots CLI. No build code or workflows live here; automation and site deployment happen in hotspots-cloud.
This README is written for both humans and AI agents. It defines structure, conventions, and the reproducibility contract that every post must follow.
- Source of truth for public content: blog, playbooks, and case studies.
- Contains all metadata and links required to reproduce analyses exactly.
- Keeps shared, reusable assets in a predictable location.
- Accepts automated pull requests from the private
hotspots-cloudcrawler.
blog/
posts/ Markdown posts (one file per analysis)
assets/ Per‑post images (by dated slug)
data/ Machine‑readable summaries (per post)
playbooks/ (optional; mirrors blog/ subfolders)
posts/
assets/
data/
cases/ (optional; mirrors blog/ subfolders)
posts/
assets/
data/
shared/ Reusable, non‑post assets (brand/ui/diagrams/...)
README.md This document
- Post filename:
blog/posts/YYYY-MM-DD-owner-repo.md. - Per‑post assets:
blog/assets/YYYY-MM-DD-owner-repo/(e.g.,cover.png,hotspot-1.png). - Per‑post summary:
blog/data/YYYY-MM-DD-owner-repo.summary.json. - Shared assets: place under
shared/and reference via/shared/...in Markdown.
- Hotspots highlights structural and activity risk, not “bad code”.
- Findings are a prioritization aid, not a bug predictor.
- Maintainers are not being judged; these posts demonstrate the tool.
- Every analysis pins a specific commit SHA.
- Repro steps must be included in each post.
Add a one‑line footer in each post linking back to this policy.
Each post is a Markdown file with required frontmatter followed by a standard body.
---
title: "Hotspots on <Owner>/<Repo>: the 5 functions with the highest activity-weighted risk"
date: "YYYY-MM-DD"
repo: "<owner>/<repo>"
commit: "<full sha>"
language: "<primary language>"
tags: ["oss", "refactoring", "code-health"]
report_html: "https://reports.hotspots.dev/<owner>/<repo>/<sha>/index.html"
report_json: "https://reports.hotspots.dev/<owner>/<repo>/<sha>/snapshot.json"
# Recommended for reproducibility
hotspots_version: "<semver>"
analyzed_at: "<ISO8601>"
clone_depth: 50
---Every post must contain these four elements, but their order, framing, and surrounding prose should vary post to post:
- Top 5 Hotspots table — function, file, risk, CC, ND, FO columns. Always present.
- Per-function analysis — one section per table row, in descending risk order.
- Repro block — must match frontmatter SHA exactly:
git clone https://github.com/<owner>/<repo> cd <repo> git checkout <sha> hotspots analyze . --mode snapshot --explain-patterns --force - Footer — editorial policy link, one line.
Vary the intro frame — pick the angle that fits the data, never default to the same opening:
- File-concentration angle: when one file holds 3+ hotspots, open with that file as the protagonist.
- Pattern angle: when a single antipattern (e.g.
god_function) dominates across all hotspots, lead with the pattern rather than any individual function. - Velocity angle: when all top functions have very recent commit activity, open with the "actively breaking" framing.
- Contrast angle: when a tiny repo has extreme CC values, open with that size-vs-complexity contrast.
- Spread angle: when hotspots span many files with no dominant file, open with the architectural scatter.
Vary the analysis section structure — choose the form that best matches the function’s characteristics:
- Dense single paragraph with recommendation embedded at the end.
- Two paragraphs: what the data shows, then what to do about it.
- Short opening sentence (the bottom line), then supporting detail, then a bulleted recommendation with 2–3 concrete steps.
- For hub functions with very high FO: open with a dependency-graph framing.
- For entry points (main, cli, run): open with the "accumulates everything" framing.
Vary section density — not every function needs equal treatment. If hotspots 3–5 are clearly secondary, say so concisely in one tight paragraph each and give hotspots 1–2 the depth they warrant.
Vary closing structure — sometimes a Key Takeaways section, sometimes a short closing paragraph that ties findings together, sometimes nothing beyond the repro block if the analysis sections are self-contained.
Let the data dictate vocabulary — if all five functions are in one file, use "this module" not "the codebase." If the CC spread is wide (e.g. 828 vs 62), note the gap. If functions share an antipattern, group the language around that pattern rather than repeating the same framing for each.
Every post must allow a reader to reproduce results precisely.
- Pin the exact commit SHA in
commit. - Include
hotspots_version,analyzed_at, andclone_depthwhere available. - Host full outputs on R2 under:
https://reports.hotspots.dev/<owner>/<repo>/<sha>/index.htmlhttps://reports.hotspots.dev/<owner>/<repo>/<sha>/snapshot.json
- Commit a compact
summary.jsonalongside the post for indexing:
{
"owner": "<owner>",
"repo": "<repo>",
"sha": "<full sha>",
"analyzed_at": "<ISO8601>",
"hotspots_version": "<semver>",
"top": [
{ "function": "<symbol>", "file": "<path>", "risk": 9.3 }
]
}- Automated: The private
hotspots-cloudrepo runs a nightly crawler that analyzes a target repo, uploads artifacts to R2, and opens a PR here adding:blog/posts/YYYY-MM-DD-owner-repo.mdblog/data/YYYY-MM-DD-owner-repo.summary.json- Optional per‑post images under
blog/assets/YYYY-MM-DD-owner-repo/
- Manual: Maintainers can open PRs directly following the same conventions.
- Review tone and clarity; ensure the editorial policy is respected.
- Verify links (HTML and JSON on R2) resolve and match the pinned SHA.
- After merge, the public site picks up changes on the next scheduled deploy from
hotspots-cloud.
Use the frontmatter values to reproduce locally:
git clone https://github.com/<owner>/<repo>
cd <repo>
git checkout <sha>
hotspots analyze . --mode snapshot --explain-patterns --force
Compare your local output to the linked snapshot.json and index.html on R2.
- Put reusable images/graphics under
shared/(e.g.,shared/brand/,shared/ui/). - Reference from posts with
/shared/...absolute paths. - Do not duplicate identical assets under per‑post folders.
---
title: "Hotspots on <Owner>/<Repo>: the 5 functions with the highest activity-weighted risk"
date: "YYYY-MM-DD"
repo: "<owner>/<repo>"
commit: "<full sha>"
language: "<language>"
tags: ["oss", "refactoring", "code-health"]
report_html: "https://reports.hotspots.dev/<owner>/<repo>/<sha>/index.html"
report_json: "https://reports.hotspots.dev/<owner>/<repo>/<sha>/snapshot.json"
hotspots_version: "<semver>"
analyzed_at: "<ISO8601>"
clone_depth: 50
---
Intro paragraph.
| Function | File | Risk | CC | ND | FO |
|---|---|---|---|---|---|
| symbol | path | 0.0 | 0 | 0 | 0 |
Repro:
git clone https://github.com// cd git checkout hotspots analyze . --mode snapshot --explain-patterns --force
_See editorial policy in the repository README. Full report: <report_html>_
- Create filenames:
DATE=$(date -u +%F)→ slug"$DATE-<owner>-<repo>".
- Write
blog/posts/$DATE-<owner>-<repo>.mdusing the template. - Save
summary.jsontoblog/data/$DATE-<owner>-<repo>.summary.json. - If images are present, place under
blog/assets/$DATE-<owner>-<repo>/. - Run link checks for
report_htmlandreport_json. - Open a PR with title
Add analysis: <owner>/<repo> @ <short_sha>.
- Parse frontmatter; ensure required keys are present and URLs are HTTPS.
- Confirm R2 URLs resolve with HTTP 200.
- Optionally clone the target repo at
commitand runhotspots analyze . --mode snapshot --explain-patterns --force. - Compare top findings against
blog/data/*.summary.json.
- Why not commit HTML reports here? They are hosted on Cloudflare R2 for fast, static access and to keep this repo small.
- Can I change the schema? Keep frontmatter keys stable. Additive changes are fine; coordinate removals with
hotspots-cloudbefore merging. - Are secrets required? No. Never commit credentials to this public repo.
Unless stated otherwise within a post, content in this repository is © the authors. Do not add third‑party assets without confirming their license permits redistribution.