{"id":46102569,"url":"https://github.com/specmatic/priospot","last_synced_at":"2026-03-01T20:03:34.870Z","repository":{"id":341162726,"uuid":"1169157282","full_name":"specmatic/priospot","owner":"specmatic","description":"PrioSpot (Prioritize Hotspots) is a language-agnostic hotspot engine that computes C3 (churn + complexity + coverage) and generates interactive SVG treemap reports to help you visualize and prioritize hotspots in your code.","archived":false,"fork":false,"pushed_at":"2026-02-28T11:41:39.000Z","size":459,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-28T14:37:39.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/specmatic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-28T09:02:16.000Z","updated_at":"2026-02-28T11:41:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/specmatic/priospot","commit_stats":null,"previous_names":["specmatic/priospot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/specmatic/priospot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/specmatic%2Fpriospot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/specmatic%2Fpriospot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/specmatic%2Fpriospot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/specmatic%2Fpriospot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/specmatic","download_url":"https://codeload.github.com/specmatic/priospot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/specmatic%2Fpriospot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29978588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-01T20:03:34.290Z","updated_at":"2026-03-01T20:03:34.866Z","avatar_url":"https://github.com/specmatic.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PrioSpot\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.specmatic.priospot/cli?label=Maven%20Central)](https://search.maven.org/artifact/io.specmatic.priospot/cli)\n[![Docker Hub](https://img.shields.io/docker/v/specmatic/priospot?label=Docker%20Hub\u0026sort=semver)](https://hub.docker.com/r/specmatic/priospot)\n[![Docker Pulls](https://img.shields.io/docker/pulls/specmatic/priospot?label=Docker%20Pulls)](https://hub.docker.com/r/specmatic/priospot)\n[![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/io.specmatic.priospot?label=Gradle%20Plugin)](https://plugins.gradle.org/plugin/io.specmatic.priospot)\n[![GitHub Release](https://img.shields.io/github/v/release/specmatic/priospot?label=GitHub%20Release)](https://github.com/specmatic/priospot/releases)\n[![License](https://img.shields.io/github/license/specmatic/priospot)](https://github.com/specmatic/priospot/blob/main/LICENSE)\n\nPrioSpot (Prioritize Hotspots) is a language-agnostic hotspot engine that computes C3 (churn + complexity + coverage) and generates interactive SVG treemap reports to help you visualize and prioritize hotspots in your code.\n\n## Why This Matters\n\nMost teams don't prioritize Tech-debt. If at all they do, they prioritize work by intuition, noisy bug reports, or whoever shouts loudest. That misses hidden risk.\n\nPrioSpot helps you answer:\n- Which files are most likely to hurt us next?\n- Where should we spend refactoring/testing effort first?\n- Which hotspots are risky because of low coverage, high complexity, and frequent churn together?\n\nWhy this is useful:\n- Focuses engineering effort on high-risk code paths instead of broad, low-impact cleanup\n- Makes refactoring prioritization objective and repeatable\n- Gives a shared visual language for product, QA, and engineering discussions\n- Works across large multi-module repositories with one consolidated view\n\n![PrioSpot Treemap Example](assets/priospot-interactive-treemap.svg)\n\n## Requirements\n- JDK 17+\n- Gradle 8.10+ (or use wrapper)\n\n## Quickstart (Gradle plugin)\n\n```kotlin\nplugins {\n    kotlin(\"jvm\") version \"2.0.21\"\n    id(\"io.specmatic.priospot\") version \"1.0.0\"\n}\n\npriospot {\n    projectName.set(\"sample-kotlin-service\")\n    projectVersion.set(\"1.2.0\")\n    churnDays.set(30)\n    outputDir.set(layout.buildDirectory.dir(\"reports/priospot\"))\n}\n```\n\nRun:\n\n```bash\n./gradlew priospot\n```\n\nNotes:\n- If `sourceRoots`, `coverageReports`, or `complexityReports` are not configured, the Gradle plugin auto-discovers submodule defaults where present:\n  - `src/main/kotlin`, `src/test/kotlin`\n  - `build/reports/kover/report.xml`\n  - `build/reports/detekt/detekt.xml`\n- Missing configured coverage/complexity report files are treated as warnings; unmatched files use defaults:\n  - coverage defaults to `0/1` for non-test sources\n  - coverage defaults to `1/1` for `src/test/**` sources\n  - complexity is derived from Kotlin source when report entries are missing; if source-derived complexity is unavailable, defaults to `MAX-CCN=1000`\n\nOptional explicit override (when defaults do not fit your build):\n\n```kotlin\npriospot {\n    sourceRoots.set(listOf(\"src/main/kotlin\", \"src/test/kotlin\"))\n    coverageReports.set(listOf(\"build/reports/kover/report.xml\"))\n    complexityReports.set(listOf(\"build/reports/detekt/detekt.xml\"))\n    coverageTask.set(\"koverXmlReport\")\n    complexityTask.set(\"detekt\")\n}\n```\n\n## JaCoCo Integration (Gradle)\n\nPrioSpot accepts JaCoCo XML reports. If you use the JaCoCo plugin, point PrioSpot to the JaCoCo XML output and (optionally) make `priospot` depend on `jacocoTestReport`.\n\n```kotlin\nplugins {\n    kotlin(\"jvm\") version \"2.0.21\"\n    jacoco\n    id(\"io.specmatic.priospot\") version \"1.0.0\"\n}\n\ntasks.jacocoTestReport {\n    reports {\n        xml.required.set(true)\n        html.required.set(false)\n        csv.required.set(false)\n    }\n}\n\npriospot {\n    projectName.set(\"sample-kotlin-service\")\n    sourceRoots.set(listOf(\"src/main/kotlin\", \"src/test/kotlin\"))\n    coverageReports.set(listOf(\"build/reports/jacoco/test/jacocoTestReport.xml\"))\n    complexityReports.set(listOf(\"build/reports/detekt/detekt.xml\"))\n    coverageTask.set(\"jacocoTestReport\")\n    complexityTask.set(\"detekt\")\n}\n```\n\nRun:\n\n```bash\n./gradlew test jacocoTestReport priospot\n```\n\nNotes:\n- Auto-discovery currently defaults to Kover (`build/reports/kover/report.xml`), so JaCoCo users should set `coverageReports` explicitly.\n- In multi-module builds, provide all JaCoCo XML report paths via `coverageReports`.\n\nExpected outputs in `build/reports/priospot`:\n\n- `priospot.json`\n- `priospot-interactive-treemap.svg`\n- `coverage-interactive-treemap.svg`\n- `complexity-interactive-treemap.svg`\n- `churn-interactive-treemap.svg`\n\n## Quick Start (Jar and Docker)\n\nDownload the CLI from either:\n- Maven Central: https://search.maven.org/artifact/io.specmatic.priospot/cli\n- GitHub Releases: https://github.com/specmatic/priospot/releases\n\n### Use the CLI Jar\n\nFrom Maven Central:\n\n```bash\njava -jar priospot.jar --help\n```\n\n### Use the Docker Image\n\nA Docker image is also published with releases. Use the image/tag from the release notes and run it by mounting your repository:\n\n```bash\ndocker run --rm \\\n  -v \"$PWD:/usr/src/app\" \\\n  specmatic/priospot \\\n  analyze \\\n  --project-name sample \\\n  --source-roots src/main/kotlin \\\n  --coverage-report build/reports/kover/report.xml \\\n  --complexity-report build/reports/detekt/detekt.xml \\\n  --output-json build/reports/priospot/priospot.json\n```\n\n## Config File Keys\n\nSupported keys (for host integrations):\n\n- `projectName`\n- `projectVersion`\n- `baseNamespace` (optional)\n- `sourceRoots`\n- `coverageReports`\n- `complexityReports`\n- `churnDays`\n- `churnLog` (optional)\n- `outputDir`\n- `emitCompatibilityXml` (default false)\n- `deterministicTimestamp` (optional)\n- `coverageTask` (optional)\n- `complexityTask` (optional)\n- `defaultCoverageNumerator` (optional, default `0.0`)\n- `defaultCoverageDenominator` (optional, default `1.0`)\n- `defaultMaxCcn` (optional, default `1000`)\n\n## Treemap UX\n\n- File box area is proportional to file `NCSS`\n- No in-box labels by default (better density at scale); names are shown on hover tooltips\n- Click highlights selected file, full parent package chain, and module boundary\n- Right panel shows selected file path, primary metric, and all file metrics\n- Checkbox in right panel toggles `Show test classes`; when unchecked, treemap re-renders using only non-test files (`src/test/**` excluded)\n- Bottom-right legend explains colors for each report type (`priospot`, `coverage`, `complexity`, `churn`)\n\n## Sample Treemaps (Good vs Problem Areas)\n\nUse the fast sample project outputs:\n- `assets/priospot-interactive-treemap.svg`\n- `assets/coverage-interactive-treemap.svg`\n- `assets/complexity-interactive-treemap.svg`\n- `assets/churn-interactive-treemap.svg`\n\nWhat \"problem\" looks like:\n- Large box (high NCSS) + red/black in PrioSpot\n- Red in coverage treemap (low coverage)\n- Darker red in complexity/churn treemaps (hard-to-change + frequently changing)\n\nWhat \"good\" looks like:\n- Large box that stays green/yellow in PrioSpot\n- Healthy coverage color for critical large files\n- Lower complexity and churn for foundational modules\n\nHow to interpret quickly:\n- Start with `priospot-interactive-treemap.svg`\n- Click the largest red/black file\n- Check details panel metrics\n- Cross-check same file in `coverage`, `complexity`, and `churn` treemaps\n- Prioritize files that are large + low coverage + high complexity + high churn\n\n## Non-Gradle Integration Example\n\nNode wrapper script:\n\n```bash\nnode examples/node-wrapper/run-priospot.mjs analyze --help\n```\n\n## Schema\n\nCanonical schema is available at:\n\n- `schema/priospot.schema.json`\n\n## Development\n\nThis section is for contributors and maintainers working on PrioSpot internals.\n\n### Modules\n\n- `model`: canonical `priospot.json` and `coverage.json` domain model\n- `ingest-source`: source file inventory\n- `ingest-churn`: git/baseline churn parser and indicators\n- `ingest-coverage`: coverage normalization and merge\n- `ingest-complexity`: complexity adapters and merge\n- `compute-c3`: exact C3 formula implementation\n- `report-svg`: interactive treemap SVG generator\n- `engine`: orchestration pipeline and outputs\n- `gradle-plugin`: host integration exposing a `priospot` task\n- `cli`: optional `priospot` CLI (`analyze`, `report`)\n- `compat-xml`: optional compatibility `panopticode.xml` exporter\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspecmatic%2Fpriospot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspecmatic%2Fpriospot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspecmatic%2Fpriospot/lists"}