@rosh100yx/outlier 0.4.24 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -4
- package/bin/outlier.js +529 -123
- package/bin/postinstall.js +18 -17
- package/data/grid-factors.json +16 -3
- package/package.json +1 -1
- package/src/capabilities.ts +98 -58
- package/src/carbon.ts +80 -20
- package/src/cli.ts +181 -34
- package/src/emissions.ts +69 -0
- package/src/sources.ts +110 -0
package/README.md
CHANGED
|
@@ -50,9 +50,27 @@
|
|
|
50
50
|
└───────────┘
|
|
51
51
|
```
|
|
52
52
|
**Step 1:** Developer delegates code generation to an AI agent (Claude Code, Cursor).
|
|
53
|
-
**Step 2:**
|
|
54
|
-
**Step 3:**
|
|
55
|
-
**Step 4:**
|
|
53
|
+
**Step 2:** `outlier` reads the local trace — git history + AI logs — already on the machine.
|
|
54
|
+
**Step 3:** It reports who wrote the code, what it cost, and your authorship limit.
|
|
55
|
+
**Step 4:** Optionally, a local git hook *warns* (never silently blocks) when AI authorship exceeds your limit, so you review before you merge.
|
|
56
|
+
|
|
57
|
+
### What it reads (and what it doesn't)
|
|
58
|
+
|
|
59
|
+
`outlier` is local-first. It reads, from your own machine, only:
|
|
60
|
+
|
|
61
|
+
- **`git log`** of the current repo — to count commits carrying a `Co-Authored-By` trailer (the AI-authorship share).
|
|
62
|
+
- **Your Claude Code session transcripts** at `~/.claude/projects/<this-repo>/*.jsonl` — to sum token usage for the cost / cache / carbon estimate. (Falls back to `~/.claude/tokenomics-log.jsonl` if present.)
|
|
63
|
+
|
|
64
|
+
It does **not** send anything anywhere — no API calls, no telemetry, no account. Your code and prompts never leave the machine. The only network action in the whole tool is *you* choosing to open a share link or a feedback issue.
|
|
65
|
+
|
|
66
|
+
### How accurate is it?
|
|
67
|
+
|
|
68
|
+
We are deliberately honest about this:
|
|
69
|
+
|
|
70
|
+
- **Authorship** is an exact count of trailer-tagged commits, but it is a *proxy* for real human-vs-AI effort, and it **under-counts** when your agent doesn't write the `Co-Authored-By` trailer. A surprisingly low number usually means missing trailers, not that you wrote everything.
|
|
71
|
+
- **Tokens** are exact when the transcripts are present; otherwise the cost/carbon section reads zero.
|
|
72
|
+
- **Cost ($)** is exact when the log carries a cost field, otherwise a *rough* blended token estimate (labelled as such).
|
|
73
|
+
- **Carbon** is a rough estimate (inference energy varies ~4–20× in the literature) and the per-region figure is a *counterfactual* — cloud inference runs on the provider's grid, not yours. Treat it as an order-of-magnitude signal, not an audit.
|
|
56
74
|
|
|
57
75
|
## What Outlier Adds
|
|
58
76
|
`outlier` builds a coordination layer on top of native agent workflows.
|
|
@@ -70,8 +88,25 @@
|
|
|
70
88
|
| `npx @rosh100yx/outlier` | Run the full AI reliance & capability audit |
|
|
71
89
|
| `npx @rosh100yx/outlier authorship` | Scan git history for AI co-authorship ratio |
|
|
72
90
|
| `npx @rosh100yx/outlier carbon` | Scan local logs for context waste & token costs |
|
|
73
|
-
| `npx @rosh100yx/outlier capabilities` |
|
|
91
|
+
| `npx @rosh100yx/outlier capabilities` | Map what your agents can reach + blast radius |
|
|
74
92
|
| `npx @rosh100yx/outlier policy` | Configure Personal, Team, or Enterprise guardrails in CI |
|
|
93
|
+
| `npx @rosh100yx/outlier --json` | Machine-readable audit for agents, CI, and swarms |
|
|
94
|
+
|
|
95
|
+
### For agents, CI & swarms (`--json`)
|
|
96
|
+
|
|
97
|
+
`outlier --json` emits a clean, ANSI-free JSON audit and nothing else — so an agent (or a supervisor in a swarm) can read its own authorship, cost, carbon, and **blast radius** before it acts, and CI can gate on it. Local-first: it still never leaves the machine.
|
|
98
|
+
|
|
99
|
+
```jsonc
|
|
100
|
+
{
|
|
101
|
+
"tool": "outlier",
|
|
102
|
+
"authorship": { "aiPercent": 7.4, "provenance": "proxy" },
|
|
103
|
+
"cost": { "totalTokens": 137700000, "estUsd": 63.76, "provenance": "measured" },
|
|
104
|
+
"carbon": { "co2Kg": 0.10, "region": "Global Average", "provenance": "estimated" },
|
|
105
|
+
"reach": { "blastRadius": "HIGH", "toolCount": 13, "writeOrDeployCount": 5,
|
|
106
|
+
"reasons": ["can deploy to production", "can push to your remote repos"] },
|
|
107
|
+
"policy": { "aiCapPercent": 70, "status": "within" }
|
|
108
|
+
}
|
|
109
|
+
```
|
|
75
110
|
|
|
76
111
|
### The UX Flow
|
|
77
112
|
If you run `npx @rosh100yx/outlier` directly, you'll instantly get your Thermal Receipt and a simple list of follow-up commands:
|