100x is a skill by a former Cursor engineer that turns prompts into formally verified, production-ready code
Say on its own line when the judge is the model that built the run
Dead Internet5343c0f2a10e
diff --git a/lib/report.mjs b/lib/report.mjsindex 8141af2..7c31bb3 100644--- a/lib/report.mjs+++ b/lib/report.mjs@@ -28,6 +28,8 @@ const lastWord = (review) => (review.rounds.lastReady === null ? 'the judge didconst roundsDone = (review) => `${review.rounds.held} of ${review.rounds.planned} done, on ${listed([...new Set(review.rounds.lenses)])}${review.rounds.usual ? ` (this project's setting is lower than the usual ${review.rounds.usual})` : ''}`;const roundsText = (review) => (review?.rounds ? `${roundsDone(review)}${review.rounds.lastReady === null ? ', with no last word from the judge' : `, and the last word was ${lastWord(review)}`}` : null);const roundsLine = (review) => (roundsText(review) ? `Judge rounds: ${roundsText(review)}` : null);+// A judge that is the builder says so on a line of its own in the chat, where the owner meets it before the good news.+const judgedBy = (review) => (review.solo || review.sameAsBuilder ? [`Judged by: the same model that built it${review.solo ? '. A solo run, so no other model looked' : ''}`] : []);// In the chat the three things the judge looked at get a line of their own, so the line with the count and the last word stays short.const roundsChat = (review) => {if (!review?.rounds) return [];@@ -189,8 +191,9 @@ export function chatSummary(entry) {[...mustNotBreakList(entry).map(checkLine),entry.review.status === 'reviewed'- ? `Review (${reviewer(entry.review)}): ${reviewCounts(entry.review)}`+ ? `Review (${entry.review.model}): ${reviewCounts(entry.review)}`: `Review: UNREVIEWED, ${bare(entry.review.note)}`,+ ...(entry.review.status === 'reviewed' ? judgedBy(entry.review) : []),...roundsChat(entry.review),m ? `Screen sizes: ${m.totals.broken} broken, ${m.totals.weak} weak, ${plural(m.viewports, 'size')} and ${plural(m.examined, 'element')} checked` : `Screen sizes: ${entry.matrixSkipped ? `skipped, ${bare(entry.matrixSkipped)}` : 'not run'}`,...(entry.asks.total ? [`Asks: ${entry.asks.closed} of ${entry.asks.total} closed`] : []),diff --git a/test/finish.test.mjs b/test/finish.test.mjsindex 6119fe2..f8e5892 100644--- a/test/finish.test.mjs+++ b/test/finish.test.mjs@@ -119,7 +119,7 @@ test('a judge that is the model that built the run is named in the warning, theconst done = finish(box);assert.equal(done.code, 0, done.err + done.out);assert.match(done.out, /warn\s+the judge \(muse-wonder-1\.0\) is the same model as the builder in your settings/);- assert.match(done.out, /Review \(muse-wonder-1\.0, the same model that built it\):/);+ assert.match(done.out, /Review \(muse-wonder-1\.0\): [^\n]*\nJudged by: the same model that built it\n/);assert.match(fs.readFileSync(path.join(box.project, '.100x', 'REPORT.md'), 'utf8'), /Review \(muse-wonder-1\.0, the same model that built it\)/);const page = cli(['morning', '--all'], { env: box.env });assert.equal(page.code, 0, page.err + page.out);diff --git a/test/rounds.test.mjs b/test/rounds.test.mjsindex 189255d..179fca2 100644--- a/test/rounds.test.mjs+++ b/test/rounds.test.mjs@@ -119,7 +119,7 @@ test('finish waits for the planned rounds, and a clock with no room for anotherconst warned = run(box, 'finish');assert.equal(warned.code, 0, warned.err + warned.out);assert.match(warned.out, /warn\s+the judge held 1 of 3 rounds\. The clock had no room for round 2/);- assert.match(warned.out, /Judge rounds: 1 of 3 done, .*\nLooked at: the code and how it behaves,/);+ assert.match(warned.out, /Judge rounds: 1 of 3 done, .*\nLooked at: the code and how it behaves\n/);box.cleanup();});diff --git a/test/solo.test.mjs b/test/solo.test.mjsindex 50e3dbb..f2dfb80 100644--- a/test/solo.test.mjs+++ b/test/solo.test.mjs@@ -303,7 +303,7 @@ test('finish closes a solo run whose challenges, rounds and loops hold up, and tassert.equal(entry.review.sameAsBuilder, true, 'the judge is the builder by definition, whatever the settings say');const report = fs.readFileSync(dot(box, 'REPORT.md'), 'utf8');assert.match(report, /claude-sonnet-5-5, the same model that built it\. A solo run, so no other model looked/);- assert.match(done.out, /Review \(claude-sonnet-5-5, the same model that built it\. A solo run, so no other model looked\)/);+ assert.match(done.out, /Review \(claude-sonnet-5-5\): [^\n]*\nJudged by: the same model that built it\. A solo run, so no other model looked\n/);const trust = trustLine(entry);assert.equal(trust.tone, 'warn', 'the card is not painted as a run a judge cleared');assert.match(trust.text, /A solo run: the model that built it judged it and no other model looked/);diff --git a/verify/final-message.check.mjs b/verify/final-message.check.mjsindex ba39356..6593403 100644--- a/verify/final-message.check.mjs+++ b/verify/final-message.check.mjs@@ -55,6 +55,8 @@ function entryOf(s) {? {status: 'reviewed',model: 'model-x',+ sameAsBuilder: s.judge !== 'other',+ solo: s.judge === 'solo',flags: 3,fixed: 2,rounds: s.rounds === 'none' ? undefined : { held: 2, planned: 3, lenses: ['the code and how it behaves'], lastReady: LAST_READY[s.rounds], why: s.rounds === 'notready' && s.reasons ? REASONS.slice(0, s.reasons) : undefined },@@ -87,7 +89,7 @@ function parse(text) {if (index === 0) label = 'headline';else if (index === 1) label = 'why';else if (/^\d+\) /.test(line) || /^and \d+ more in the report$/.test(line)) { /* stays with the label above */ } else {- const found = line.match(/^(Look first|Why not ready to ship|The moment|Run|Try first|Must not break|Review|Judge rounds|Looked at|Screen sizes|Asks|Work|Report|Next likely asks)\b/);+ const found = line.match(/^(Look first|Why not ready to ship|The moment|Run|Try first|Must not break|Review|Judged by|Judge rounds|Looked at|Screen sizes|Asks|Work|Report|Next likely asks)\b/);label = found ? found[1] : `unknown:${line}`;}owner.push(label);@@ -96,7 +98,7 @@ function parse(text) {}const linesOf = (text, wanted) => { const { lines, owner } = parse(text); return lines.filter((_, i) => owner[i] === wanted); };const countOf = (text, wanted) => { const { lines, owner } = parse(text); return lines.filter((line, i) => owner[i] === wanted && !/^\d+\) /.test(line) && !/^and \d+ more/.test(line) && line !== '').length; };-const ORDER = ['headline', 'why', 'Look first', 'Why not ready to ship', 'The moment', 'Run', 'Try first', 'Must not break', 'Review', 'Judge rounds', 'Looked at', 'Screen sizes', 'Asks', 'Work', 'Report', 'Next likely asks'];+const ORDER = ['headline', 'why', 'Look first', 'Why not ready to ship', 'The moment', 'Run', 'Try first', 'Must not break', 'Review', 'Judged by', 'Judge rounds', 'Looked at', 'Screen sizes', 'Asks', 'Work', 'Report', 'Next likely asks'];// What the data says should be there, written from the data and not from the code.const wanted = (s) => {@@ -111,6 +113,7 @@ const wanted = (s) => {'Try first': 1,'Must not break': s.checks,Review: 1,+ 'Judged by': reviewed && s.judge !== 'other' ? 1 : 0,'Judge rounds': reviewed && s.rounds !== 'none' ? 1 : 0,'Looked at': reviewed && s.rounds !== 'none' ? 1 : 0,'Screen sizes': 1,@@ -125,6 +128,7 @@ const wanted = (s) => {// A run is these fields. A review that is not there has no rounds, and only a judge that said no has reasons.const VALUES = {verdict: ['ship', 'fine', 'dud'],+ judge: ['other', 'same', 'solo'],review: ['reviewed', 'unreviewed'],rounds: ['none', 'ready', 'notready', 'silent'],reasons: [0, 1, 4],@@ -137,19 +141,22 @@ const VALUES = {url: [0, 1],};const valid = (s) => (s.review === 'reviewed' || s.rounds === 'none') && (s.rounds === 'notready' || s.reasons === 0);-// The verdict only fills the first line, and nothing else reads it. It is tried with every other piece at its start value, which keeps the model at a few thousand states.+// The verdict fills the first line and the judge adds one line, and nothing else reads either. Each is tried with every other piece at its start value, which keeps the model at a few thousand states.+const ISOLATED = ['verdict', 'judge'];const START = { review: 'reviewed', rounds: 'ready', reasons: 0, checks: 1, matrix: 'ok', asks: 1, work: 0, nextAsks: 2, steps: 3, url: 1 };const atStart = (s) => Object.entries(START).every(([field, value]) => s[field] === value);+const allowed = (s, field) => (ISOLATED.includes(field) ? atStart(s) && ISOLATED.filter((other) => other !== field).every((other) => s[other] === VALUES[other][0]) : ISOLATED.every((other) => s[other] === VALUES[other][0]));const setField = (state, [field, value]) => {const next = { ...state, [field]: value };if (!valid(next)) throw new Error(`${field} = ${value} is not a run the message can be asked about`);- if (field === 'verdict' ? !atStart(state) : state.verdict !== 'ship') throw new Error('the verdict is tried on its own, and the other pieces on a run that is ready to ship');+ if (!allowed(state, field)) throw new Error('the verdict and the judge are tried on their own, and the other pieces on a run that is ready to ship and judged by another model');return next;};// The parts of the message each field may change. Everything else has to read as it did.const FAMILY = {verdict: ['headline'],- review: ['Review', 'Look first', 'Judge rounds', 'Looked at', 'Why not ready to ship'],+ judge: ['Judged by'],+ review: ['Review', 'Judged by', 'Look first', 'Judge rounds', 'Looked at', 'Why not ready to ship'],rounds: ['Look first', 'Judge rounds', 'Looked at', 'Why not ready to ship'],reasons: ['Why not ready to ship'],checks: ['Must not break', 'Look first'],@@ -165,17 +172,17 @@ const model = {name: 'the final message, every mix of optional data',assumptions: ['one run at a time, the values listed for each field and the data below stand for every run (3 verdicts, review or none, 4 round outcomes, 0, 1 or 4 reasons, 0 to 2 checks, 4 screen size outcomes, asks, work, 0, 2 or 5 next asks, 1 or 3 steps, a url or none)',- 'the verdict is tried with every other piece at its start value, because only line 1 reads it',+ 'the verdict and the judge are each tried with every other piece at its start value, because only line 1 reads the verdict and only one line reads the judge','the text of each value is fixed: a longer title, reason or step is not tried here, because finish refuses them above a length before the message is built','only the layout of the message is checked here. The words of each line are the words the report and the tests already pin',],- init: () => ({ verdict: 'ship', review: 'reviewed', rounds: 'ready', reasons: 0, checks: 1, matrix: 'ok', asks: 1, work: 0, nextAsks: 2, steps: 3, url: 1 }),+ init: () => ({ verdict: 'ship', judge: 'other', review: 'reviewed', rounds: 'ready', reasons: 0, checks: 1, matrix: 'ok', asks: 1, work: 0, nextAsks: 2, steps: 3, url: 1 }),terminal: () => true,actions: [{name: 'set',params: () => Object.entries(VALUES).flatMap(([field, values]) => values.map((value) => [field, value])),- pre: (s, [field, value]) => valid({ ...s, [field]: value }) && s[field] !== value && (field === 'verdict' ? atStart(s) : s.verdict === 'ship'),+ pre: (s, [field, value]) => valid({ ...s, [field]: value }) && s[field] !== value && allowed(s, field),apply: setField,post: (before, after, [field]) => {const a = parse(summaryOf(before));@@ -264,6 +271,7 @@ const model = {must.push('Judge rounds: 2 of 3 done', 'Looked at: the code and how it behaves');must.push({ ready: 'the last word was ready to ship', notready: 'the last word was NOT ready to ship', silent: 'with no last word from the judge' }[s.rounds]);}+ if (s.review === 'reviewed' && s.judge !== 'other') must.push(s.judge === 'solo' ? 'Judged by: the same model that built it. A solo run, so no other model looked' : 'Judged by: the same model that built it');if (s.asks) must.push('Asks: 2 of 3 closed');if (s.work) must.push('Work: 2 h of 3 h asked for, 4 rounds');if (s.matrix === 'skipped') must.push('Screen sizes: skipped, a command line tool has no screen');