@rosh100yx/outlier 0.4.4 → 0.4.10
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 +24 -21
- package/bin/outlier.js +127 -31
- package/package.json +1 -1
- package/src/cli.ts +76 -28
package/README.md
CHANGED
|
@@ -16,28 +16,10 @@
|
|
|
16
16
|
<code>npm install -g @rosh100yx/outlier</code><br/>
|
|
17
17
|
<code>outlier status</code>
|
|
18
18
|
</p>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
## The Compounding Value of Outlier (Why This Matters)
|
|
22
|
-
Software engineering is undergoing a catastrophic shift in skill acquisition. If you only look at today, AI saves you 30 minutes of writing regex. But if you look at the **compounding horizon of the next 5-10 years**, the value exchange flips.
|
|
23
|
-
|
|
24
|
-
<div align="center">
|
|
25
|
-
<img src="https://raw.githubusercontent.com/rosh100yx/outlier/main/assets/metr-long-tasks.png" alt="METR Graph" width="800" />
|
|
26
|
-
<p><i>Source: METR (Measuring AI Ability to Complete Long Tasks)</i></p>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
### What Do We Lose and Gain?
|
|
30
|
-
- **Today (The 5-minute task):** You use AI to scaffold a component. You **gain** velocity. You **lose** syntax recall.
|
|
31
|
-
- **Tomorrow (The 5-hour task):** Models like Claude Opus 4.5 will autonomously resolve multi-file architectural tickets (as proven by the METR graph). You **gain** massive scale and leverage. You **lose** granular intimacy with your own system architecture. You transition from a *Creator* to a *Reviewer*.
|
|
32
|
-
- **The Next 5-10 Years:** Unchecked AI reliance leads to **Deskilling**. When an agent introduces a fatal state bug in a 1M+ LOC codebase, the human reviewers will lack the muscle memory and "systems thinking" required to debug it.
|
|
33
19
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
We measure the exact cost of AI for humans—not just in API tokens, but in cognitive load and lost mastery.
|
|
38
|
-
|
|
39
|
-
<div align="center">
|
|
40
|
-
<img src="https://raw.githubusercontent.com/rosh100yx/outlier/main/assets/codecore.gif" alt="Codecore Aesthetic" width="300" />
|
|
20
|
+
<br/>
|
|
21
|
+
<img src="https://raw.githubusercontent.com/rosh100yx/outlier/main/assets/cli-demo.png" alt="Outlier CLI Demo" width="800" />
|
|
22
|
+
<br/>
|
|
41
23
|
</div>
|
|
42
24
|
|
|
43
25
|
## How It Works
|
|
@@ -131,5 +113,26 @@ This tool is the technical implementation of an ongoing academic thesis on the t
|
|
|
131
113
|
|
|
132
114
|
See our [Contributing Guide](CONTRIBUTING.md) to get started. Great first issues include adding new regional grid factors to `data/grid-factors.json` or writing custom CI/CD pipeline integrations.
|
|
133
115
|
|
|
116
|
+
## The Compounding Horizon of AI Deskilling
|
|
117
|
+
|
|
118
|
+
When you use an AI agent to skip the boring stuff today, it feels amazing. You get your time back. But what happens over the next 5 to 10 years?
|
|
119
|
+
|
|
120
|
+
<div align="center">
|
|
121
|
+
<img src="https://raw.githubusercontent.com/rosh100yx/outlier/main/assets/metr-long-tasks.png" alt="METR Graph" width="350" />
|
|
122
|
+
<p><i>Source: METR (Measuring AI Ability to Complete Long Tasks)</i></p>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
### What Does This Mean For Developers?
|
|
126
|
+
- **Today (The 5-minute task):** You gain speed. You lose the muscle memory of writing low-level code.
|
|
127
|
+
- **Tomorrow (The 5-hour task):** Agents will solve complex tickets across multiple files. You gain massive scale. You lose the deep, intimate understanding of your own system's architecture.
|
|
128
|
+
- **Next 5-10 Years (The 1M+ LOC Crisis):** When an agent introduces a critical bug in a massive codebase, human reviewers will lack the deeply ingrained "systems thinking" required to debug it.
|
|
129
|
+
|
|
130
|
+
### Why This Project Exists
|
|
131
|
+
`outlier` is the technical circuit breaker that forces developers to stay sharp. We measure the exact cost of AI for humans—not just in API tokens burnt, but in cognitive load and lost mastery.
|
|
132
|
+
|
|
133
|
+
<div align="center">
|
|
134
|
+
<img src="https://raw.githubusercontent.com/rosh100yx/outlier/main/assets/codecore.gif" alt="Codecore Aesthetic" width="300" />
|
|
135
|
+
</div>
|
|
136
|
+
|
|
134
137
|
## License
|
|
135
138
|
MIT License
|
package/bin/outlier.js
CHANGED
|
@@ -161,6 +161,63 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
161
161
|
module.exports.createColors = createColors;
|
|
162
162
|
});
|
|
163
163
|
|
|
164
|
+
// package.json
|
|
165
|
+
var require_package = __commonJS((exports, module) => {
|
|
166
|
+
module.exports = {
|
|
167
|
+
name: "@rosh100yx/outlier",
|
|
168
|
+
version: "0.4.10",
|
|
169
|
+
description: "AI Code Governance & Capability Auditing for the Terminal. Measures AI reliance, context waste, and enforces local CI/CD policies.",
|
|
170
|
+
bin: {
|
|
171
|
+
outlier: "bin/outlier.js"
|
|
172
|
+
},
|
|
173
|
+
files: [
|
|
174
|
+
"bin/outlier.js",
|
|
175
|
+
"bin/postinstall.js",
|
|
176
|
+
"src",
|
|
177
|
+
"data"
|
|
178
|
+
],
|
|
179
|
+
scripts: {
|
|
180
|
+
build: "bun build ./src/cli.ts --target=node --outfile bin/outlier.js",
|
|
181
|
+
test: "bun test",
|
|
182
|
+
start: "bun run src/cli.ts",
|
|
183
|
+
postinstall: "node bin/postinstall.js"
|
|
184
|
+
},
|
|
185
|
+
type: "module",
|
|
186
|
+
private: false,
|
|
187
|
+
author: "Roshan Abraham",
|
|
188
|
+
license: "MIT",
|
|
189
|
+
repository: {
|
|
190
|
+
type: "git",
|
|
191
|
+
url: "https://github.com/rosh100yx/outlier.git"
|
|
192
|
+
},
|
|
193
|
+
keywords: [
|
|
194
|
+
"ai",
|
|
195
|
+
"governance",
|
|
196
|
+
"carbon",
|
|
197
|
+
"compliance",
|
|
198
|
+
"ai-safety",
|
|
199
|
+
"policy-engine",
|
|
200
|
+
"zero-trust",
|
|
201
|
+
"carbon-footprint",
|
|
202
|
+
"global-south",
|
|
203
|
+
"observability",
|
|
204
|
+
"telemetry",
|
|
205
|
+
"authorship",
|
|
206
|
+
"cli"
|
|
207
|
+
],
|
|
208
|
+
devDependencies: {
|
|
209
|
+
"@types/bun": "latest"
|
|
210
|
+
},
|
|
211
|
+
peerDependencies: {
|
|
212
|
+
typescript: "^5"
|
|
213
|
+
},
|
|
214
|
+
dependencies: {
|
|
215
|
+
"@clack/prompts": "^1.6.0",
|
|
216
|
+
picocolors: "^1.1.1"
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
|
|
164
221
|
// node_modules/@clack/core/dist/index.mjs
|
|
165
222
|
import { styleText } from "node:util";
|
|
166
223
|
import { stdout, stdin } from "node:process";
|
|
@@ -1932,7 +1989,8 @@ The results will assign you a "vibe" and evaluate if you are at risk of deskilli
|
|
|
1932
1989
|
async function main() {
|
|
1933
1990
|
console.clear();
|
|
1934
1991
|
console.log(import_picocolors.default.cyan(ASCII_LOGO));
|
|
1935
|
-
|
|
1992
|
+
const pkg = require_package();
|
|
1993
|
+
console.log(import_picocolors.default.dim(` Outlier v${pkg.version} · AI Code Reliance & Telemetry Engine
|
|
1936
1994
|
`));
|
|
1937
1995
|
let action = process.argv[2];
|
|
1938
1996
|
if (action === "--help" || action === "-h" || action === "help") {
|
|
@@ -2114,6 +2172,74 @@ ${costIcon}${import_picocolors.default.dim("[3] Tokenomics & Cost")} ${import_pi
|
|
|
2114
2172
|
waste: ${import_picocolors.default.yellow(`⚠ ${cachePct}% of tokens are redundant context reads`)}
|
|
2115
2173
|
carbon: ${import_picocolors.default.green(`✓ ${co2Str} (Est. ${regionStr} Grid)`)}
|
|
2116
2174
|
${import_picocolors.default.bold("Governance:")} ${ruleFailures > 0 ? import_picocolors.default.red(`${failIcon} ${ruleFailures + 1} policy failures`) : import_picocolors.default.green(`${passIcon} All clear`)}`, `${import_picocolors.default.bold("[outlier]")} ${5 - (ruleFailures + 1)}/5 policies • ${authWarning || import_picocolors.default.green(`${passIcon} safe surface`)} • ${co2Str}`);
|
|
2175
|
+
const timestamp = new Date().toISOString().split("T")[0];
|
|
2176
|
+
const isDanger = gitStats && gitStats.ratio > 0.7;
|
|
2177
|
+
const verdictZone = isDanger ? import_picocolors.default.red("DANGER ZONE") : import_picocolors.default.green("SAFE / SOVEREIGN");
|
|
2178
|
+
const verdictText = isDanger ? `You are transitioning from 'Creator' to 'Reviewer'.
|
|
2179
|
+
At this trajectory, you risk losing architectural
|
|
2180
|
+
muscle memory on this codebase within 6 months.` : `You are maintaining strong architectural intimacy.
|
|
2181
|
+
Your human judgement remains the primary driver
|
|
2182
|
+
of logic in this system.`;
|
|
2183
|
+
const isInefficient = parseFloat(cachePct) > 40;
|
|
2184
|
+
const cacheVerdict = isInefficient ? import_picocolors.default.yellow("INEFFICIENT") : import_picocolors.default.green("EFFICIENT");
|
|
2185
|
+
const cacheText = isInefficient ? `You are burning paid API tokens and excess compute
|
|
2186
|
+
on files the agent isn't even touching.` : `Your token usage and human judgment are tightly
|
|
2187
|
+
coupled. High signal-to-noise ratio.`;
|
|
2188
|
+
const policyStatus = ruleFailures > 0 ? import_picocolors.default.red("BLOCKED \uD83D\uDED1 (Threshold Exceeded)") : import_picocolors.default.green("PASS ✅ (Within Threshold)");
|
|
2189
|
+
const policyAction = ruleFailures > 0 ? "Triggering Mandatory Mentoring Scenario." : "No intervention required.";
|
|
2190
|
+
const totalTokensStr = carbon ? (carbon.totalTokens / 1000).toFixed(1) + "k" : "0";
|
|
2191
|
+
const humanSov = gitStats ? ((1 - gitStats.ratio) * 100).toFixed(1) + "%" : "100%";
|
|
2192
|
+
const authorshipStr = authPct + (isDanger ? import_picocolors.default.red(" (High Reliance)") : import_picocolors.default.green(" (Healthy)"));
|
|
2193
|
+
const getProgressBar = (pct, length = 10) => {
|
|
2194
|
+
const filled = Math.max(0, Math.min(length, Math.round(pct / 100 * length)));
|
|
2195
|
+
return "▰".repeat(filled) + "▱".repeat(length - filled);
|
|
2196
|
+
};
|
|
2197
|
+
const aiPctVal = gitStats ? gitStats.ratio * 100 : 0;
|
|
2198
|
+
const aiBar = import_picocolors.default.yellow(getProgressBar(aiPctVal));
|
|
2199
|
+
const humanBar = import_picocolors.default.cyan(getProgressBar(100 - aiPctVal));
|
|
2200
|
+
const cacheBar = import_picocolors.default.magenta(getProgressBar(parseFloat(cachePct) || 0));
|
|
2201
|
+
if (!isStrict) {
|
|
2202
|
+
const dateStr = new Date().toLocaleDateString("en-US", { month: "short", day: "2-digit", year: "numeric" }).toUpperCase();
|
|
2203
|
+
const timeStr = new Date().toLocaleTimeString("en-US", { hour12: false });
|
|
2204
|
+
const repoName = process.cwd().split("/").pop() || "Unknown";
|
|
2205
|
+
console.log(`
|
|
2206
|
+
${import_picocolors.default.dim("┌────────────────────────────────────────────────────────")}
|
|
2207
|
+
${import_picocolors.default.dim("│")} ${import_picocolors.default.cyan("█▀█ █░█ ▀█▀ █░░ █ █▀▀ █▀█")} ${import_picocolors.default.bold(":: THERMAL AUDIT RECEIPT")}
|
|
2208
|
+
${import_picocolors.default.dim("│")} ${import_picocolors.default.cyan("█▄█ █▄█ ░█░ █▄▄ █ ██▄ █▀▄")} ${import_picocolors.default.dim(`:: TIMESTAMP: ${dateStr}`)}
|
|
2209
|
+
${import_picocolors.default.dim("├────────────────────────────────────────────────────────")}
|
|
2210
|
+
${import_picocolors.default.dim("│")} ${import_picocolors.default.bold(import_picocolors.default.bgBlue(" [ COGNITIVE BUDGET ] "))}
|
|
2211
|
+
${import_picocolors.default.dim("│")} AI Authorship ................. ${aiBar} ${authorshipStr}
|
|
2212
|
+
${import_picocolors.default.dim("│")} Human Sovereignty ................. ${humanBar} ${humanSov}
|
|
2213
|
+
${import_picocolors.default.dim("│")}
|
|
2214
|
+
${import_picocolors.default.dim("│")} ↳ Verdict: ${verdictZone}
|
|
2215
|
+
${import_picocolors.default.dim("│")} ${verdictText.split(`
|
|
2216
|
+
`).join(`
|
|
2217
|
+
` + import_picocolors.default.dim("│") + " ")}
|
|
2218
|
+
${import_picocolors.default.dim("├────────────────────────────────────────────────────────")}
|
|
2219
|
+
${import_picocolors.default.dim("│")} ${import_picocolors.default.bold(import_picocolors.default.bgMagenta(" [ FINANCIAL & COMPUTE TOLL ] "))}
|
|
2220
|
+
${import_picocolors.default.dim("│")} Tokens Burnt ................. ${totalTokensStr} vs Human Judgment
|
|
2221
|
+
${import_picocolors.default.dim("│")} Cache Bloat ................. ${cacheBar} ${cachePct}% (Unmodified context)
|
|
2222
|
+
${import_picocolors.default.dim("│")} Regional Grid ................. ${regionStr}
|
|
2223
|
+
${import_picocolors.default.dim("│")}
|
|
2224
|
+
${import_picocolors.default.dim("│")} ↳ Verdict: ${cacheVerdict}
|
|
2225
|
+
${import_picocolors.default.dim("│")} ${cacheText.split(`
|
|
2226
|
+
`).join(`
|
|
2227
|
+
` + import_picocolors.default.dim("│") + " ")}
|
|
2228
|
+
${import_picocolors.default.dim("├────────────────────────────────────────────────────────")}
|
|
2229
|
+
${import_picocolors.default.dim("│")} ${import_picocolors.default.bold(import_picocolors.default.bgYellow(import_picocolors.default.black(" [ POLICY ENFORCEMENT ] ")))}
|
|
2230
|
+
${import_picocolors.default.dim("│")} Status .................................. ${policyStatus}
|
|
2231
|
+
${import_picocolors.default.dim("│")} Action .................................. ${policyAction}
|
|
2232
|
+
${import_picocolors.default.dim("├────────────────────────────────────────────────────────")}
|
|
2233
|
+
${import_picocolors.default.dim("│")}
|
|
2234
|
+
${import_picocolors.default.dim("│")} ${import_picocolors.default.italic(import_picocolors.default.dim("patterns emerge in the commit history,"))}
|
|
2235
|
+
${import_picocolors.default.dim("│")} ${import_picocolors.default.italic(import_picocolors.default.dim("code becomes commoditized by algorithms."))}
|
|
2236
|
+
${import_picocolors.default.dim("│")} ${import_picocolors.default.italic(import_picocolors.default.dim("human mastery is the only true moat."))}
|
|
2237
|
+
${import_picocolors.default.dim("│")}
|
|
2238
|
+
${import_picocolors.default.dim("│")} ${import_picocolors.default.bold(import_picocolors.default.cyan("***STAY VIGILANT***"))}
|
|
2239
|
+
${import_picocolors.default.dim("└────────────────────────────────────────────────────────")}`);
|
|
2240
|
+
} else {
|
|
2241
|
+
note(`status: ${authPct} AI Reliance | ${cachePct}% Cache Bloat | ${co2Str}`, `${import_picocolors.default.bold("[outlier]")} CI/CD Audit`);
|
|
2242
|
+
}
|
|
2117
2243
|
} catch (e) {
|
|
2118
2244
|
s.stop("Audit failed");
|
|
2119
2245
|
console.error(import_picocolors.default.red(e.message));
|
|
@@ -2303,36 +2429,6 @@ Read the full academic foundation at: ${import_picocolors.default.underline("htt
|
|
|
2303
2429
|
`);
|
|
2304
2430
|
}
|
|
2305
2431
|
outro("Local telemetry run completed. No data left your machine.");
|
|
2306
|
-
if (action === "status" || action === "authorship" || action === "carbon") {
|
|
2307
|
-
const d = new Date;
|
|
2308
|
-
const dateStr = d.toLocaleDateString("en-US", { month: "short", day: "2-digit", year: "numeric" }).toUpperCase();
|
|
2309
|
-
const timeStr = d.toLocaleTimeString("en-US", { hour12: false });
|
|
2310
|
-
let repoName = process.cwd().split("/").pop() || "Unknown";
|
|
2311
|
-
console.log(`
|
|
2312
|
-
${import_picocolors.default.dim("-------------------------")} ${import_picocolors.default.bold("AUDIT RECEIPT")} ${import_picocolors.default.dim("-------------------------")}`);
|
|
2313
|
-
console.log(`
|
|
2314
|
-
Project ${import_picocolors.default.bold(repoName.padEnd(16).substring(0, 16))}`);
|
|
2315
|
-
console.log(` Timestamp ${import_picocolors.default.dim(`${dateStr} ${timeStr}`)}
|
|
2316
|
-
`);
|
|
2317
|
-
console.log(` 01x Authorship Policy ${process.argv.includes("--strict") ? "Strict Mode" : "Vibe Check"}`);
|
|
2318
|
-
console.log(` 02x AI Reliance Risk ${action === "carbon" ? "N/A" : "Assessed"}`);
|
|
2319
|
-
console.log(` 03x Cache Bloat Tokens ${action === "authorship" ? "N/A" : "Audited"}`);
|
|
2320
|
-
console.log(` 04x Regional Grid Check ${action === "authorship" ? "N/A" : "Completed"}
|
|
2321
|
-
`);
|
|
2322
|
-
console.log(import_picocolors.default.dim(" **********************************************************"));
|
|
2323
|
-
console.log(`
|
|
2324
|
-
${import_picocolors.default.italic("patterns emerge in the commit history,")}`);
|
|
2325
|
-
console.log(` ${import_picocolors.default.italic("code becomes commoditized by algorithms.")}`);
|
|
2326
|
-
console.log(` ${import_picocolors.default.italic("human mastery is the only true moat.")}
|
|
2327
|
-
`);
|
|
2328
|
-
console.log(import_picocolors.default.dim(` **********************************************************
|
|
2329
|
-
`));
|
|
2330
|
-
console.log(" Outlier Governance Engine");
|
|
2331
|
-
console.log(import_picocolors.default.bold(`
|
|
2332
|
-
***AUDIT COMPLETE***`));
|
|
2333
|
-
console.log(import_picocolors.default.bold(` ***STAY VIGILANT***
|
|
2334
|
-
`));
|
|
2335
|
-
}
|
|
2336
2432
|
console.log(import_picocolors.default.dim(`└ Share your audit: https://x.com/intent/tweet?text=${encodeURIComponent(`I just audited my codebase for AI reliance and deskilling risk. What does your repo score?
|
|
2337
2433
|
|
|
2338
2434
|
\uD83D\uDCCF #Outlier`)}`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rosh100yx/outlier",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.10",
|
|
4
4
|
"description": "AI Code Governance & Capability Auditing for the Terminal. Measures AI reliance, context waste, and enforces local CI/CD policies.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"outlier": "bin/outlier.js"
|
package/src/cli.ts
CHANGED
|
@@ -79,7 +79,8 @@ The results will assign you a "vibe" and evaluate if you are at risk of deskilli
|
|
|
79
79
|
async function main() {
|
|
80
80
|
console.clear();
|
|
81
81
|
console.log(pc.cyan(ASCII_LOGO));
|
|
82
|
-
|
|
82
|
+
const pkg = require('../package.json');
|
|
83
|
+
console.log(pc.dim(` Outlier v${pkg.version} · AI Code Reliance & Telemetry Engine\n`));
|
|
83
84
|
|
|
84
85
|
let action = process.argv[2] as any;
|
|
85
86
|
|
|
@@ -286,6 +287,79 @@ ${costIcon}${pc.dim('[3] Tokenomics & Cost')} ${pc.magenta('▰▰▰▰▰▰
|
|
|
286
287
|
${pc.bold('Governance:')} ${ruleFailures > 0 ? pc.red(`${failIcon} ${ruleFailures + 1} policy failures`) : pc.green(`${passIcon} All clear`)}`,
|
|
287
288
|
`${pc.bold('[outlier]')} ${5 - (ruleFailures+1)}/5 policies • ${authWarning || pc.green(`${passIcon} safe surface`)} • ${co2Str}`
|
|
288
289
|
);
|
|
290
|
+
|
|
291
|
+
const timestamp = new Date().toISOString().split('T')[0];
|
|
292
|
+
const isDanger = gitStats && gitStats.ratio > 0.7;
|
|
293
|
+
const verdictZone = isDanger ? pc.red('DANGER ZONE') : pc.green('SAFE / SOVEREIGN');
|
|
294
|
+
const verdictText = isDanger
|
|
295
|
+
? `You are transitioning from 'Creator' to 'Reviewer'.\n At this trajectory, you risk losing architectural \n muscle memory on this codebase within 6 months.`
|
|
296
|
+
: `You are maintaining strong architectural intimacy.\n Your human judgement remains the primary driver\n of logic in this system.`;
|
|
297
|
+
|
|
298
|
+
const isInefficient = parseFloat(cachePct) > 40;
|
|
299
|
+
const cacheVerdict = isInefficient ? pc.yellow('INEFFICIENT') : pc.green('EFFICIENT');
|
|
300
|
+
const cacheText = isInefficient
|
|
301
|
+
? `You are burning paid API tokens and excess compute\n on files the agent isn't even touching.`
|
|
302
|
+
: `Your token usage and human judgment are tightly\n coupled. High signal-to-noise ratio.`;
|
|
303
|
+
|
|
304
|
+
const policyStatus = ruleFailures > 0 ? pc.red('BLOCKED 🛑 (Threshold Exceeded)') : pc.green('PASS ✅ (Within Threshold)');
|
|
305
|
+
const policyAction = ruleFailures > 0 ? 'Triggering Mandatory Mentoring Scenario.' : 'No intervention required.';
|
|
306
|
+
|
|
307
|
+
const totalTokensStr = carbon ? (carbon.totalTokens / 1000).toFixed(1) + 'k' : '0';
|
|
308
|
+
const humanSov = gitStats ? ((1 - gitStats.ratio) * 100).toFixed(1) + '%' : '100%';
|
|
309
|
+
const authorshipStr = authPct + (isDanger ? pc.red(' (High Reliance)') : pc.green(' (Healthy)'));
|
|
310
|
+
|
|
311
|
+
const getProgressBar = (pct: number, length = 10) => {
|
|
312
|
+
const filled = Math.max(0, Math.min(length, Math.round((pct / 100) * length)));
|
|
313
|
+
return '▰'.repeat(filled) + '▱'.repeat(length - filled);
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
const aiPctVal = gitStats ? gitStats.ratio * 100 : 0;
|
|
317
|
+
const aiBar = pc.yellow(getProgressBar(aiPctVal));
|
|
318
|
+
const humanBar = pc.cyan(getProgressBar(100 - aiPctVal));
|
|
319
|
+
const cacheBar = pc.magenta(getProgressBar(parseFloat(cachePct) || 0));
|
|
320
|
+
|
|
321
|
+
if (!isStrict) {
|
|
322
|
+
const dateStr = new Date().toLocaleDateString('en-US', { month: 'short', day: '2-digit', year: 'numeric' }).toUpperCase();
|
|
323
|
+
const timeStr = new Date().toLocaleTimeString('en-US', { hour12: false });
|
|
324
|
+
const repoName = process.cwd().split('/').pop() || 'Unknown';
|
|
325
|
+
|
|
326
|
+
console.log(`
|
|
327
|
+
${pc.dim('┌────────────────────────────────────────────────────────')}
|
|
328
|
+
${pc.dim('│')} ${pc.cyan('█▀█ █░█ ▀█▀ █░░ █ █▀▀ █▀█')} ${pc.bold(':: THERMAL AUDIT RECEIPT')}
|
|
329
|
+
${pc.dim('│')} ${pc.cyan('█▄█ █▄█ ░█░ █▄▄ █ ██▄ █▀▄')} ${pc.dim(`:: TIMESTAMP: ${dateStr}`)}
|
|
330
|
+
${pc.dim('├────────────────────────────────────────────────────────')}
|
|
331
|
+
${pc.dim('│')} ${pc.bold(pc.bgBlue(' [ COGNITIVE BUDGET ] '))}
|
|
332
|
+
${pc.dim('│')} AI Authorship ................. ${aiBar} ${authorshipStr}
|
|
333
|
+
${pc.dim('│')} Human Sovereignty ................. ${humanBar} ${humanSov}
|
|
334
|
+
${pc.dim('│')}
|
|
335
|
+
${pc.dim('│')} ↳ Verdict: ${verdictZone}
|
|
336
|
+
${pc.dim('│')} ${verdictText.split('\n').join('\n ' + pc.dim('│') + ' ')}
|
|
337
|
+
${pc.dim('├────────────────────────────────────────────────────────')}
|
|
338
|
+
${pc.dim('│')} ${pc.bold(pc.bgMagenta(' [ FINANCIAL & COMPUTE TOLL ] '))}
|
|
339
|
+
${pc.dim('│')} Tokens Burnt ................. ${totalTokensStr} vs Human Judgment
|
|
340
|
+
${pc.dim('│')} Cache Bloat ................. ${cacheBar} ${cachePct}% (Unmodified context)
|
|
341
|
+
${pc.dim('│')} Regional Grid ................. ${regionStr}
|
|
342
|
+
${pc.dim('│')}
|
|
343
|
+
${pc.dim('│')} ↳ Verdict: ${cacheVerdict}
|
|
344
|
+
${pc.dim('│')} ${cacheText.split('\n').join('\n ' + pc.dim('│') + ' ')}
|
|
345
|
+
${pc.dim('├────────────────────────────────────────────────────────')}
|
|
346
|
+
${pc.dim('│')} ${pc.bold(pc.bgYellow(pc.black(' [ POLICY ENFORCEMENT ] ')))}
|
|
347
|
+
${pc.dim('│')} Status .................................. ${policyStatus}
|
|
348
|
+
${pc.dim('│')} Action .................................. ${policyAction}
|
|
349
|
+
${pc.dim('├────────────────────────────────────────────────────────')}
|
|
350
|
+
${pc.dim('│')}
|
|
351
|
+
${pc.dim('│')} ${pc.italic(pc.dim('patterns emerge in the commit history,'))}
|
|
352
|
+
${pc.dim('│')} ${pc.italic(pc.dim('code becomes commoditized by algorithms.'))}
|
|
353
|
+
${pc.dim('│')} ${pc.italic(pc.dim('human mastery is the only true moat.'))}
|
|
354
|
+
${pc.dim('│')}
|
|
355
|
+
${pc.dim('│')} ${pc.bold(pc.cyan('***STAY VIGILANT***'))}
|
|
356
|
+
${pc.dim('└────────────────────────────────────────────────────────')}`);
|
|
357
|
+
} else {
|
|
358
|
+
note(
|
|
359
|
+
`status: ${authPct} AI Reliance | ${cachePct}% Cache Bloat | ${co2Str}`,
|
|
360
|
+
`${pc.bold('[outlier]')} CI/CD Audit`
|
|
361
|
+
);
|
|
362
|
+
}
|
|
289
363
|
} catch (e: any) {
|
|
290
364
|
s.stop('Audit failed');
|
|
291
365
|
console.error(pc.red(e.message));
|
|
@@ -484,33 +558,7 @@ Artifact: ${pc.cyan(reportPath)}`,
|
|
|
484
558
|
|
|
485
559
|
outro('Local telemetry run completed. No data left your machine.');
|
|
486
560
|
|
|
487
|
-
//
|
|
488
|
-
if (action === 'status' || action === 'authorship' || action === 'carbon') {
|
|
489
|
-
const d = new Date();
|
|
490
|
-
const dateStr = d.toLocaleDateString('en-US', { month: 'short', day: '2-digit', year: 'numeric' }).toUpperCase();
|
|
491
|
-
const timeStr = d.toLocaleTimeString('en-US', { hour12: false });
|
|
492
|
-
|
|
493
|
-
let repoName = process.cwd().split('/').pop() || 'Unknown';
|
|
494
|
-
|
|
495
|
-
console.log(`\n${pc.dim('-------------------------')} ${pc.bold('AUDIT RECEIPT')} ${pc.dim('-------------------------')}`);
|
|
496
|
-
console.log(`\n Project ${pc.bold(repoName.padEnd(16).substring(0,16))}`);
|
|
497
|
-
console.log(` Timestamp ${pc.dim(`${dateStr} ${timeStr}`)}\n`);
|
|
498
|
-
|
|
499
|
-
console.log(` 01x Authorship Policy ${process.argv.includes('--strict') ? 'Strict Mode' : 'Vibe Check'}`);
|
|
500
|
-
console.log(` 02x AI Reliance Risk ${action === 'carbon' ? 'N/A' : 'Assessed'}`);
|
|
501
|
-
console.log(` 03x Cache Bloat Tokens ${action === 'authorship' ? 'N/A' : 'Audited'}`);
|
|
502
|
-
console.log(` 04x Regional Grid Check ${action === 'authorship' ? 'N/A' : 'Completed'}\n`);
|
|
503
|
-
|
|
504
|
-
console.log(pc.dim(' **********************************************************'));
|
|
505
|
-
console.log(`\n ${pc.italic('patterns emerge in the commit history,')}`);
|
|
506
|
-
console.log(` ${pc.italic('code becomes commoditized by algorithms.')}`);
|
|
507
|
-
console.log(` ${pc.italic('human mastery is the only true moat.')}\n`);
|
|
508
|
-
console.log(pc.dim(' **********************************************************\n'));
|
|
509
|
-
|
|
510
|
-
console.log(' Outlier Governance Engine');
|
|
511
|
-
console.log(pc.bold('\n ***AUDIT COMPLETE***'));
|
|
512
|
-
console.log(pc.bold(' ***STAY VIGILANT***\n'));
|
|
513
|
-
}
|
|
561
|
+
// (Old artifact storytelling block removed to unify receipt UX)
|
|
514
562
|
|
|
515
563
|
console.log(
|
|
516
564
|
pc.dim(
|