Skip to main content
Glama
README.md
<!-- mcp-name: io.github.greenaxis-ai/ga-energy-label -->

# `ga-energy-label` — Human-AI Co-Authorship 5-Tier Energy Label & Live HUD

**[English](./README.md) | [简体中文](./README.zh-CN.md)**

[![CI](https://github.com/greenaxis-ai/ga-energy-label/actions/workflows/ci.yml/badge.svg)](https://github.com/greenaxis-ai/ga-energy-label/actions/workflows/ci.yml) ![PoHA L1 Micro Pill](./assets/demo-micro.svg) ![Zero Dependencies](https://img.shields.io/badge/dependencies-0%20(Python%20stdlib)-brightgreen) ![License](https://img.shields.io/badge/license-Apache--2.0-blue) ![Live HUD + MCP](https://img.shields.io/badge/Claude%20Code-Live%20HUD%20%2B%20MCP-10b981)

> **Word count is dead in the LLM era.** A 250-word founder memo defining 4 hard non-goals, 3 course-corrections, and explicit human sign-off carries far more decision sovereignty than 15,000 words of AI filler.
>
> `ga-energy-label` runs **100% locally with zero third-party dependencies and zero network calls** (verified by an offline no-socket test in CI) across two distinct, clearly separated engines:
> 1. **Session Process Telemetry (`Claude Code statusLine`)**: Reads your live `.jsonl` session transcript after each turn to render `[PoHA L1] ██████████░░ 85% Human │ Lev 1:9.2 │ SOVEREIGN` underneath your prompt box (preserving `claude-hud` if already installed).
> 2. **Deliverable AI-Slop Linter & Snapshot Stamper (`MCP + Skill + CLI + Action + Browser Studio`)**: Audits `.md`, `.pptx`, `.docx`, `.txt`, or `.pdf` deliverables into **4 compact SVG sticker sizes** (`dot`, `micro`, `stamp`, `card`), pinpoints exact AI cliché lines, and computes a deterministic SHA-256 snapshot receipt.

![Tier 1 Dot-Matrix HUD](./assets/demo-dot-dark.svg)

---

## Install in Seconds (Mac / Linux / Windows)

```bash
# Run without polluting global Python (once published on PyPI):
uvx ga-energy-label ./README.md

# Or install directly from GitHub:
pip install git+https://github.com/greenaxis-ai/ga-energy-label.git

# Preview what setup will wire, then apply:
ga-energy-label setup --dry-run
ga-energy-label setup
```

`ga-energy-label setup` detects installed tools (**Claude Code `~/.claude.json`, Cursor, Codex, Gemini CLI, Kimi Code**), backs up existing configs (`.bak-*`), installs the bundled `SKILL.md`, registers the **stdio MCP Server**, and activates the **Claude Code `statusLine` HUD** (preserving `claude-hud` if present; run `ga-energy-label setup --remove-hud` anytime to restore).

Claude Code Marketplace:
```text
/plugin marketplace add greenaxis-ai/ga-energy-label
/plugin install ga-energy-label
```

---

## What You See Live & On Deliverables

### A. Real-Time Session Telemetry Inside Claude Code
```text
[Opus] │ my-project git:(main)                                      ← existing claude-hud (preserved!)
[PoHA L1] ██████████░░ 85% Human │ Lev 1:8.6 │ SOVEREIGN (6t)       ← live Human-AI Energy HUD
```

### B. 4 Built-In Sticker Sizes for Docs, Slides & Repos

| Scene | Flag | 1:1 Live Rendered Sticker |
| :--- | :--- | :--- |
| **1. Doc Footer / PR Comment (`392×56`)** *(Default)* | `--style dot` | ![Dot Dark](./assets/demo-dot-dark.svg)<br/>![Dot Light](./assets/demo-dot-light.svg) |
| **2. GitHub README / Notion Inline (`20px`)** | `--style micro` | ![Micro Pill](./assets/demo-micro.svg) |
| **3. Slide Deck / PDF Corner Plate (`236×108`)** | `--style stamp` | ![PPT Stamp](./assets/demo-stamp.svg) |
| **4. Proposal Colophon / Social Card (`336×198`)** | `--style card` | ![Swiss Card](./assets/demo-card-en.svg) |

---

## Everyday Usage Cheat Sheet

### 1. Inside AI IDEs & Chats (Cursor, Claude Code, Codex, Gemini, Kimi)
After `ga-energy-label setup`, ask your agent in plain English:
> *"Stamp an energy label on this proposal"* or *"Grade our co-authorship split on `spec.md`"*

### 2. Zero-Install Browser Sticker Studio
Open [`docs/index.html`](./docs/index.html) locally or via GitHub Pages (`https://greenaxis-ai.github.io/ga-energy-label/`). Plain text and Markdown inputs compute the **exact same scoring rules and SHA-256 `GA-EL-...` receipt** as the Python CLI, with 1-click **2× Retina PNG** export for slides.

### 3. CLI & Secure GitHub Action
```bash
# Auto-stamp a dot-matrix badge at the bottom of any Markdown file:
ga-energy-label ./README.md --stamp

# Export a light-mode corner stamp for PowerPoint / Word:
ga-energy-label ./pitch-deck.pptx --style stamp --theme light --svg ./corner-stamp.svg

# Non-wordcount Human Sovereign % vs. AI Amplification % split:
ga-energy-label coauth --human-file ./notes.md --output-file ./spec.md --svg ./hud.svg

# Fail CI if a doc drops to Tier 4 or Tier 5 (exit code 3):
ga-energy-label ./spec.md --fail-on-tier 4

# Verify deterministic snapshot receipt locally:
ga-energy-label verify --file ./spec.md --human-file ./notes.md --receipt GA-EL-L1-...
```

In `.github/workflows/energy.yml`:
```yaml
- uses: greenaxis-ai/ga-energy-label@v0.3.3
  with:
    file: docs/architecture.md
    style: dot
    fail_on_tier: "5"
```

---

## The 1–5 Energy Efficiency Scale (Non-Wordcount)

| Tier | Badge | Verdict |
| :--- | :--- | :--- |
| **L1** | `SOVEREIGN` | Crisp human thesis, explicit non-goals/redlines, measurable units & owners, minimal AI filler. |
| **L2** | `CRAFTED` | Clear human framing & domain constraints; disciplined AI structural amplification. |
| **L3** | `BALANCED` | Standard co-drafting; functional structure, needs tighter redlines or concrete anchors. |
| **L4** | `DILUTED` | Elevated LLM buzzwords, bare keyword stuffing, or weak negative boundaries. |
| **L5** | `HOLLOW` | ![Slop Demo](./assets/demo-slop-dot.svg) |

---

## Limitations & Threat Model

- **AI-Slop Linter, Not a Lie Detector**: Static deliverable grading (`grade` / `coauth`) is a heuristic linter designed to help authors strip LLM filler and sharpen boundaries—just like `ruff` or `vale` for prose. Deliberate prompt evasion can bypass lexical checks, though bare keyword stuffing without prose context is explicitly penalized.
- **Session Telemetry vs. Static Scan**: `statusLine` HUD measures real `.jsonl` turn interaction history on your machine; static file grading measures only the final text artifact.
- **Deterministic Snapshot Digest, Not Third-Party Forensics**: `GA-EL-...` is an unkeyed local SHA-256 digest proving whether a document changed *after* grading on your machine. It does not prove who typed the original file or replace cryptographic signing (e.g., C2PA / X.509) or third-party ledger attestation.
- **Zero-Dep Parsing Scope**: `.docx` and `.pptx` extraction reads OOXML text nodes with Python stdlib; `.pdf` extraction uses `pdftotext` when installed (scanned PDFs require OCR first).
- **100% Zero-Network Guarantee**: Verified in CI (`test_zero_network_no_socket_guarantee`) with `socket` disabled. Neither the CLI, MCP server, `statusLine` HUD, nor `docs/index.html` transmits session logs or documents anywhere.

---

## License, Trademark & Attribution

Open-sourced under [**Apache-2.0**](./LICENSE) (see [**NOTICE**](./NOTICE) for trademark boundaries under Section 6, and [**CLA.md**](./CLA.md)) by **Green Axis (Wuxi) Technology Co., Ltd.** (`绿轴(无锡)科技有限公司`) as part of the **PoHA (`Proof of Human-Accountable Action`)** open developer ecosystem.

TDQS

B3.3/5.0

Scored across 4 tools

Disambiguation3/5

grade_artifact and grade_coauthorship both 'grade' into tiers and could be confused, though the input (document vs. human/AI contribution split) differs. render_energy_badge overlaps with grade_artifact, which also emits SVG stickers, so an agent may wonder whether grading already renders the badge or requires a separate call.

Naming Consistency5/5

All four names follow a clean verb_noun snake_case pattern: grade_artifact, grade_coauthorship, render_energy_badge, verify_energy_receipt. No style mixing or ambiguous prefixes.

Tool Count4/5

Four tools is a little thin but appropriate for a narrow grading-and-labeling domain. Each tool maps to a distinct stage (grade, grade coauthorship, render, verify), so nothing feels gratuitous.

Completeness4/5

The lifecycle is largely covered: grading (artifact and coauthorship), badge rendering, and receipt verification. Minor gaps remain—no explicit receipt-issuance or retrieval/reporting tool, and receipt creation is only implied by grading.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues