Green-Software-Foundation / Green-Software-Foundation/reference-implementations

tools/community/sustainability-score, a repo/PR-level Sustainability Score reference implementation

Offen
#8 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
9
Forks
1
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**What it implements**
An SCI-grounded (SCI = (E × I + M) / R, per the GSF SCI specification) scoring tool that evaluates a codebase's sustainability posture and produces a single, versioned, trackable score plus a prioritized recommendations report. It treats static-analysis signals (code complexity, dependency weight, Docker image composition, CI/CD pipeline design, IaC configuration) as labeled-confidence proxies for the SCI E term, never presented as audited carbon accounting, following the same estimate-with-disclosed-confidence posture the SCI spec itself recommends.

**What form it takes**
A GitHub Action / CLI tool that can run in two modes: (1) a one-time full-repo scan producing a baseline score, and (2) a PR-triggered delta scan that comments the sustainability-score change caused by that diff (the same workflow shape as existing coverage/security bots). Deterministic static analyzers do the measurable-fact extraction; an LLM pass (a documented, versioned system prompt) reasons over the structured findings to write the human-readable report and recommendations. The LLM never invents or re-derives numbers itself.

**Workload/use case**
General-purpose application repositories (language-agnostic core, initial reference implementation targets JS/TS + Python as the two most common ecosystems) that use Docker, a CI/CD pipeline (GitHub Actions initially), and optionally IaC (Terraform/Helm). Not scoped to a specific cloud provider for v1; cloud-billing integration is called out below as an explicit future phase, not part of this proposal.

**Scope statement**
In scope for v1: static repo scan, weighted rubric across five pillars (code/algorithmic efficiency, containerization, CI/CD, cloud/infra config as declared in code, SRE/ops signals such as health checks and rollback config), single numeric score plus confidence-tagged findings, and a Markdown report with PR-comment delta. Out of scope for v1: live cloud billing/telemetry integration and live grid carbon-intensity API calls (both flagged as data gaps in v1 output, not silently defaulted), and any claim of audited/precise carbon-emissions accounting.

**How it relates to existing entries**
Complements rather than duplicates tools/gsf/green-code-skill: that project is a design/review-time pattern advisor with no scoring or reporting output (explicitly out of scope per its own README); this project is the scoring/reporting layer that could sit downstream of it, potentially consuming its pattern catalog as one input source. Distinct from the archived Green-Software-Foundation/carbon-ci project, which attempted a narrower static-analysis-only version of PR carbon scoring; this proposal extends that idea to also cover containerization, CI/CD design, and SRE/ops practices in one unified score, and documents the estimate-confidence methodology carbon-ci did not fully specify before archival.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Prüfung der SCI-Spezifikation sowie der bestehenden green-code-skill- und archivierten carbon-ci-Einträge, die im Vorschlag genannt werden. Der vorgeschlagene Einstiegspunkt ist eine neue GitHub Action/CLI mit full-repository- und PR-delta-Modi; als abgeschlossen gilt die Arbeit, wenn das definierte v1-Rubrik, der mit einem Konfidenz-Tag versehene Score und der Markdown-Bericht implementiert sind, ohne Cloud-Abrechnung oder Live-Integrationen zur Netzintensität.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, github-actions, helm, javascript, python, terraform, typescript
Bereich
ci-cd, cli, cloud, devops, devtools
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.