commitshow 0.2.11 → 0.3.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/dist/lib/render.js +50 -37
- package/package.json +1 -1
package/dist/lib/render.js
CHANGED
|
@@ -138,10 +138,40 @@ export function renderAudit(view) {
|
|
|
138
138
|
const slug = p.github_url?.replace(/^https?:\/\//, '') ?? '';
|
|
139
139
|
lines.push(' ' + c.bold(c.cream(name)) + ' ' + c.muted(slug));
|
|
140
140
|
lines.push('');
|
|
141
|
+
// ── 3 strengths + 2 concerns box · errors-first reorder (2026-04-30) ──
|
|
142
|
+
// CONCERNS render before STRENGTHS · the value prop is "what your AI
|
|
143
|
+
// missed", so they lead. Score follows as the receipt below.
|
|
144
|
+
const strengths = asStringArray(snapshot?.rich_analysis?.scout_brief?.strengths, 3);
|
|
145
|
+
const concerns = asStringArray(snapshot?.rich_analysis?.scout_brief?.weaknesses, 2);
|
|
146
|
+
if (strengths.length > 0 || concerns.length > 0) {
|
|
147
|
+
const bulletWidth = CONTENT_W - 2;
|
|
148
|
+
lines.push(' ' + boxTop());
|
|
149
|
+
// Heading row inside the box · "What this build missed" lead.
|
|
150
|
+
if (concerns.length > 0) {
|
|
151
|
+
const heading = 'What this build missed';
|
|
152
|
+
lines.push(' ' + boxRow(heading.length, c.bold(c.scarlet(heading))));
|
|
153
|
+
}
|
|
154
|
+
for (const s of concerns) {
|
|
155
|
+
const txt = truncate(s, bulletWidth);
|
|
156
|
+
lines.push(' ' + boxRow(2 + txt.length, c.scarlet('↓ ') + c.cream(txt)));
|
|
157
|
+
}
|
|
158
|
+
if (strengths.length > 0) {
|
|
159
|
+
if (concerns.length > 0)
|
|
160
|
+
lines.push(' ' + boxBlank());
|
|
161
|
+
const heading = 'What it got right';
|
|
162
|
+
lines.push(' ' + boxRow(heading.length, c.bold(c.teal(heading))));
|
|
163
|
+
}
|
|
164
|
+
for (const s of strengths) {
|
|
165
|
+
const txt = truncate(s, bulletWidth);
|
|
166
|
+
lines.push(' ' + boxRow(2 + txt.length, c.teal('↑ ') + c.cream(txt)));
|
|
167
|
+
}
|
|
168
|
+
lines.push(' ' + boxBottom());
|
|
169
|
+
lines.push('');
|
|
170
|
+
}
|
|
141
171
|
// Hero score · big-digit ASCII for X-share screenshots.
|
|
142
|
-
//
|
|
143
|
-
// the
|
|
144
|
-
//
|
|
172
|
+
// Now positioned AFTER concerns/strengths · the score is the receipt
|
|
173
|
+
// for the findings above, not the lead. Always brand gold for cohesive
|
|
174
|
+
// wordmark + score brand mark.
|
|
145
175
|
const bigRows = bigText(String(total));
|
|
146
176
|
const bigWidth = bigRows[0].length;
|
|
147
177
|
const leftPad = Math.floor((58 - bigWidth) / 2);
|
|
@@ -189,27 +219,7 @@ export function renderAudit(view) {
|
|
|
189
219
|
lines.push(' ' + ` Comm. ${pad(`${p.score_community}/20`, 7)} ${scoreBar(p.score_community, 20)}`);
|
|
190
220
|
}
|
|
191
221
|
lines.push('');
|
|
192
|
-
//
|
|
193
|
-
// Web surfaces the full 5+3; the CLI keeps it tight for terminal screenshots.
|
|
194
|
-
const strengths = asStringArray(snapshot?.rich_analysis?.scout_brief?.strengths, 3);
|
|
195
|
-
const concerns = asStringArray(snapshot?.rich_analysis?.scout_brief?.weaknesses, 2);
|
|
196
|
-
if (strengths.length > 0 || concerns.length > 0) {
|
|
197
|
-
// strengths/concerns each render as `↑ ` (2 visible) + truncated line.
|
|
198
|
-
// Total visible-line budget inside the box is CONTENT_W chars; reserve
|
|
199
|
-
// 2 for the arrow + space, leaving CONTENT_W - 2 for the bullet text.
|
|
200
|
-
const bulletWidth = CONTENT_W - 2;
|
|
201
|
-
lines.push(' ' + boxTop());
|
|
202
|
-
for (const s of strengths) {
|
|
203
|
-
const txt = truncate(s, bulletWidth);
|
|
204
|
-
lines.push(' ' + boxRow(2 + txt.length, c.teal('↑ ') + c.cream(txt)));
|
|
205
|
-
}
|
|
206
|
-
for (const s of concerns) {
|
|
207
|
-
const txt = truncate(s, bulletWidth);
|
|
208
|
-
lines.push(' ' + boxRow(2 + txt.length, c.scarlet('↓ ') + c.cream(txt)));
|
|
209
|
-
}
|
|
210
|
-
lines.push(' ' + boxBottom());
|
|
211
|
-
lines.push('');
|
|
212
|
-
}
|
|
222
|
+
// (concerns/strengths block moved above the score · errors-first 2026-04-30)
|
|
213
223
|
// ─── Vibe Coder Checklist · 7-category framework ───
|
|
214
224
|
// Render only the categories that produced an actionable status (fail /
|
|
215
225
|
// warn / pass when meaningful). N/A categories are dropped to keep the
|
|
@@ -398,6 +408,21 @@ export function renderMarkdown(view) {
|
|
|
398
408
|
if (p.github_url)
|
|
399
409
|
lines.push(`_${p.github_url}_`);
|
|
400
410
|
lines.push('');
|
|
411
|
+
// errors-first markdown order (2026-04-30) · concerns + strengths
|
|
412
|
+
// BEFORE the score so the AI agent reading audit.md picks up the
|
|
413
|
+
// actionable items in its first pass.
|
|
414
|
+
if (concerns.length > 0) {
|
|
415
|
+
lines.push(`## What this build missed`);
|
|
416
|
+
for (const s of concerns)
|
|
417
|
+
lines.push(`- ${s}`);
|
|
418
|
+
lines.push('');
|
|
419
|
+
}
|
|
420
|
+
if (strengths.length > 0) {
|
|
421
|
+
lines.push(`## What it got right`);
|
|
422
|
+
for (const s of strengths)
|
|
423
|
+
lines.push(`- ${s}`);
|
|
424
|
+
lines.push('');
|
|
425
|
+
}
|
|
401
426
|
lines.push(`## Score · ${p.score_total} / 100`);
|
|
402
427
|
lines.push('');
|
|
403
428
|
lines.push(`- Audit: ${p.score_auto}/50`);
|
|
@@ -410,20 +435,8 @@ export function renderMarkdown(view) {
|
|
|
410
435
|
lines.push(`- Ranked #${standing.rank} of ${standing.total_in_season} — projected **${standing.projected_tier ?? '—'}** (top ${Math.round(standing.percentile)}%)`);
|
|
411
436
|
}
|
|
412
437
|
lines.push('');
|
|
413
|
-
if (strengths.length > 0) {
|
|
414
|
-
lines.push(`## Strengths`);
|
|
415
|
-
for (const s of strengths)
|
|
416
|
-
lines.push(`- ${s}`);
|
|
417
|
-
lines.push('');
|
|
418
|
-
}
|
|
419
|
-
if (concerns.length > 0) {
|
|
420
|
-
lines.push(`## Concerns`);
|
|
421
|
-
for (const s of concerns)
|
|
422
|
-
lines.push(`- ${s}`);
|
|
423
|
-
lines.push('');
|
|
424
|
-
}
|
|
425
438
|
lines.push(`---`);
|
|
426
|
-
lines.push(`
|
|
439
|
+
lines.push(`Audited on commit.show · https://commit.show/projects/${p.id}`);
|
|
427
440
|
lines.push('');
|
|
428
441
|
return lines.join('\n');
|
|
429
442
|
}
|