commitshow 0.1.6 → 0.1.8
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/dist/index.js +1 -1
- package/dist/lib/render.js +50 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { status } from './commands/status.js';
|
|
|
5
5
|
import { login } from './commands/login.js';
|
|
6
6
|
import { whoami } from './commands/whoami.js';
|
|
7
7
|
import { c } from './lib/colors.js';
|
|
8
|
-
const VERSION = '0.1.
|
|
8
|
+
const VERSION = '0.1.8';
|
|
9
9
|
const USAGE = `
|
|
10
10
|
${c.bold(c.gold('commit.show'))} ${c.dim(`v${VERSION}`)} ${c.muted('—')} ${c.cream('audit any vibe-coded project from your terminal.')}
|
|
11
11
|
${c.muted('the')} ${c.gold('walk-on')} ${c.muted('lane: drop in, get scored, leave · no signup, no audition, no league entry.')}
|
package/dist/lib/render.js
CHANGED
|
@@ -101,7 +101,19 @@ function asStringArray(raw, take) {
|
|
|
101
101
|
}
|
|
102
102
|
export function renderAudit(view) {
|
|
103
103
|
const { project: p, snapshot, standing } = view;
|
|
104
|
-
|
|
104
|
+
// Walk-on vs league. Walk-on = preview status (anonymous CLI · not in
|
|
105
|
+
// a season). For walk-ons, Scout (0/30) and Community (low/20) are
|
|
106
|
+
// structurally absent — not evaluated zeros — so we surface the
|
|
107
|
+
// Audit-only score normalized to /100 instead of summing pillars.
|
|
108
|
+
//
|
|
109
|
+
// Denominator = 45 (not 50): the +5 "Build Brief integrity" slot inside
|
|
110
|
+
// the Audit pillar is structurally inaccessible to walk-ons (the creator
|
|
111
|
+
// never reached the /submit form). Including it as 0/5 punishes them
|
|
112
|
+
// for a flow they never saw. /45 is the honest base.
|
|
113
|
+
const WALK_ON_AUDIT_MAX = 45;
|
|
114
|
+
const isWalkOn = p.status === 'preview';
|
|
115
|
+
const walkOnTotal = Math.min(100, Math.round(((p.score_auto ?? 0) / WALK_ON_AUDIT_MAX) * 100));
|
|
116
|
+
const total = isWalkOn ? walkOnTotal : (p.score_total ?? 0);
|
|
105
117
|
// Header
|
|
106
118
|
const lines = [];
|
|
107
119
|
lines.push(boxTop());
|
|
@@ -125,20 +137,39 @@ export function renderAudit(view) {
|
|
|
125
137
|
lines.push(' ' + ' '.repeat(leftPad) + c.goldDeep(row));
|
|
126
138
|
}
|
|
127
139
|
// Caption · small "/ 100 · band" · band tinted so the signal lives there.
|
|
140
|
+
// Walk-on track gets an extra middle segment so the score is read in the
|
|
141
|
+
// right context (88 walk-on ≠ 88 league).
|
|
128
142
|
const band = total >= 75 ? 'strong' : total >= 50 ? 'mid' : 'weak';
|
|
129
143
|
const bandTone = scoreTone(total);
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
144
|
+
const captionVisible = isWalkOn
|
|
145
|
+
? `/ 100 · walk-on · ${band}`
|
|
146
|
+
: `/ 100 · ${band}`;
|
|
147
|
+
const capPad = Math.floor((58 - captionVisible.length) / 2);
|
|
148
|
+
if (isWalkOn) {
|
|
149
|
+
lines.push(' ' + ' '.repeat(capPad)
|
|
150
|
+
+ c.muted('/ 100 · ') + c.gold('walk-on') + c.muted(' · ') + bandTone(band));
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
lines.push(' ' + ' '.repeat(capPad) + c.muted('/ 100 · ') + bandTone(band));
|
|
154
|
+
}
|
|
134
155
|
lines.push('');
|
|
135
|
-
//
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
156
|
+
// Axis bars · league shows all three; walk-on shows Audit only and
|
|
157
|
+
// surfaces Scout + Community as locked-with-unlock-hint rows.
|
|
158
|
+
// Walk-on Audit denominator is 45 (Brief slot excluded) so the math is
|
|
159
|
+
// visibly consistent with the big-digit normalization above.
|
|
160
|
+
const lockedBar = '─ audition unlocks ─'; // exactly 20 cells · matches scoreBar width
|
|
161
|
+
const auditDen = isWalkOn ? WALK_ON_AUDIT_MAX : 50;
|
|
162
|
+
const auditScoreClamp = Math.min(p.score_auto ?? 0, auditDen);
|
|
163
|
+
const auditLine = ` Audit ${pad(`${auditScoreClamp}/${auditDen}`, 7)} ${scoreBar(auditScoreClamp, auditDen)}`;
|
|
139
164
|
lines.push(' ' + auditLine);
|
|
140
|
-
|
|
141
|
-
|
|
165
|
+
if (isWalkOn) {
|
|
166
|
+
lines.push(' ' + ` Scout ${pad('—/30', 7)} ` + c.muted(lockedBar));
|
|
167
|
+
lines.push(' ' + ` Comm. ${pad('—/20', 7)} ` + c.muted(lockedBar));
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
lines.push(' ' + ` Scout ${pad(`${p.score_forecast}/30`, 7)} ${scoreBar(p.score_forecast, 30)}`);
|
|
171
|
+
lines.push(' ' + ` Comm. ${pad(`${p.score_community}/20`, 7)} ${scoreBar(p.score_community, 20)}`);
|
|
172
|
+
}
|
|
142
173
|
lines.push('');
|
|
143
174
|
// 3 strengths + 2 concerns from scout_brief · §15-C.2 content contract.
|
|
144
175
|
// Web surfaces the full 5+3; the CLI keeps it tight for terminal screenshots.
|
|
@@ -283,6 +314,11 @@ function asObjectArray(raw, take) {
|
|
|
283
314
|
}
|
|
284
315
|
export function toAgentShape(view) {
|
|
285
316
|
const { project: p, snapshot, standing } = view;
|
|
317
|
+
// /45 base — Brief Integrity slot (5pts) is inaccessible to walk-ons.
|
|
318
|
+
// See renderAudit for the same constant.
|
|
319
|
+
const WALK_ON_AUDIT_MAX = 45;
|
|
320
|
+
const isWalkOn = p.status === 'preview';
|
|
321
|
+
const walkOnTotal = isWalkOn ? Math.min(100, Math.round(((p.score_auto ?? 0) / WALK_ON_AUDIT_MAX) * 100)) : null;
|
|
286
322
|
return {
|
|
287
323
|
schema_version: '1',
|
|
288
324
|
generated_at: new Date().toISOString(),
|
|
@@ -296,6 +332,7 @@ export function toAgentShape(view) {
|
|
|
296
332
|
url: `https://commit.show/projects/${p.id}`,
|
|
297
333
|
},
|
|
298
334
|
score: {
|
|
335
|
+
track: isWalkOn ? 'walk_on' : 'league',
|
|
299
336
|
total: p.score_total,
|
|
300
337
|
total_max: 100,
|
|
301
338
|
audit: p.score_auto,
|
|
@@ -306,6 +343,8 @@ export function toAgentShape(view) {
|
|
|
306
343
|
community_max: 20,
|
|
307
344
|
delta_since_last: snapshot?.score_total_delta ?? null,
|
|
308
345
|
band: bandFor(p.score_total),
|
|
346
|
+
walk_on_total: walkOnTotal,
|
|
347
|
+
walk_on_band: walkOnTotal != null ? bandFor(walkOnTotal) : null,
|
|
309
348
|
},
|
|
310
349
|
standing: standing
|
|
311
350
|
? {
|