← Runs

Add a function titleCase(text) that capitalizes the first letter of each word and lowercases the rest

eadd9cf1 · ✓ completed · 3 agent builds · tests green · 5 model calls · 3,414 tokens out

This run builds a throwaway demo project in a temporary folder on this machine — nothing is pushed to any repository or deployed anywhere. Every panel replays exactly what the runner recorded (real model calls, a real coding agent, real test runs — not sped up; live runs update every couple of seconds). Every state row carries its basis: the evidence that earned the transition, or an explicit runner policy / unproven marker. Expand any ▸ toggle to see the raw evidence.

▶ The full run, recorded live and unedited — every phase, real agent work (~4 min).
  1. Welcomeintro
    What you're about to watch
  2. Decide — frame the betdecide
    Turning your idea into a testable bet
    betFramerlocal-codersuccess353238 tok3.4s
    Prompt sent to the model
    system
    You are the product-framing agent in an autonomous SDLC loop. You shape ONE vague human ask into a testable bet: a concrete problem statement, a falsifiable hypothesis ('we believe <change> causes <outcome>'), exactly one success metric (kind 'success') and exactly one guardrail metric (kind 'guardrail'). Metrics name a concrete query, a numeric target with a comparator, and a time window. Never invent scope beyond the ask; never omit the problem or either metric. Reply with exactly the JSON object requested — no prose, no markdown fences.
    user
    Ask: Add a function titleCase(text) that capitalizes the first letter of each word and lowercases the rest
    Constraint notes: (none)
    
    Return a single JSON object with exactly these keys:
    {"schemaVersion": 1, "title": "<short bet title>", "problem": "<the validated problem statement>", "hypothesis": "we believe <change> causes <outcome>", "successMetric": {"name": "<snake_case>", "kind": "success", "query": "<one concrete analytics query, plain language>", "target": {"comparator": ">=" | "<=" | ">" | "<" | "==", "value": <number>}, "window": "<time window, e.g. 7d rolling>"}, "guardrailMetric": {"name": "<snake_case>", "kind": "guardrail", "query": "<one concrete analytics query, plain language>", "target": {"comparator": ">=" | "<=" | ">" | "<" | "==", "value": <number>}, "window": "<time window>"}}
    model response
    stateactive.senseEVIDENCE_STRONGactive.decide
    no recorded basisthis transcript predates evidence-bound transitions
    stateactive.decideBET_VALIDactive.design
    no recorded basisthis transcript predates evidence-bound transitions
  3. Design — decomposedesign
    Cutting the bet into a small vertical slice
    decomposerlocal-codersuccess4631028 tok13.0s
    Prompt sent to the model
    system
    You are the PM/Architect decomposition agent in an autonomous SDLC loop. You break ONE framed bet into the smallest set of thin vertical slices that each deliver user-visible value end to end (UI -> logic -> data). Every slice takes at most 8 hours (one day), has a kebab-case key, a delivery lane, at least one Given/When/Then acceptance criterion, and at least one fail-closed gate (a check whose missing result is a failure). dependsOn lists only keys of other slices in this plan and must stay acyclic. rice holds reach (1-10), impact (1-10) and confidence (0-1) for prioritization. Respect the allowed lanes and the maximum slice count exactly when given. Reply with exactly the JSON object requested — no prose, no markdown fences.
    user
    Bet: Add titleCase(text) utility function
    Problem: Applications lack a standard utility to convert arbitrary text strings into Title Case format (capitalizing the first letter of each word and lowercasing the rest), requiring developers to implement inconsistent logic across components.
    Hypothesis: we believe adding a reusable `titleCase(text)` function causes consistent Title Case formatting across all UI text inputs without introducing edge-case bugs in string processing
    Allowed lanes: (decomposer's choice)
    Maximum slices: 3
    Notes: (none)
    
    Return a single JSON object with exactly these keys:
    {"schemaVersion": 1, "slices": [{"key": "<kebab-case-key>", "title": "<slice title>", "lane": "<delivery lane>", "summary": "<the thin vertical: UI -> logic -> data in one sentence>", "dependsOn": ["<key of another slice, or empty>"], "estimateHours": <number, at most 8>, "acceptanceCriteria": [{"id": "ac-1", "given": "<precondition>", "when": "<action>", "then": "<observable outcome>"}], "gates": ["<fail-closed check>"], "rice": {"reach": <1-10>, "impact": <1-10>, "confidence": <0-1>}}]}
    model response
    stateactive.designDESIGN_READYactive.slice
    no recorded basisthis transcript predates evidence-bound transitions
  4. Slice — commitslice
    Committed slice
    stateactive.sliceREADYactive.build.red
    no recorded basisthis transcript predates evidence-bound transitions
  5. Build — RED (failing test)build.red
    The coding agent writes a real failing test
    🤖 coding agent · codex48.3s1 file: slice.test.js
    Instructions given to the agent
    Write a single failing unit test file `slice.test.js` (ES module, using `node:test` and `node:assert/strict`) that pins this behaviour: Core titleCase implementation and unit tests. Acceptance criteria: given titleCase function is imported from utils, when titleCase('hello world') is called, then the return value is exactly 'Hello World'; given titleCase function is imported from utils, when titleCase('harry potter and the stone') is called, then the return value is exactly 'Harry Potter And The Stone'; given titleCase function is imported from utils, when titleCase('already Title Cased') is called, then the return value preserves existing title casing or correctly normalizes to 'Already Title Cased'; given titleCase function is imported from utils, when titleCase('') is called, then the return value is an empty string ''. Import the implementation from `./slice.js` (which does NOT exist yet). Do NOT create slice.js. The test MUST fail when run.
    Diff the agent produced — slice.test.js
    diff --git a/after/slice.test.js b/after/slice.test.js
    new file mode 100644
    index 0000000..a04d604
    --- /dev/null
    +++ b/after/slice.test.js
    @@ -0,0 +1,20 @@
    +import test from 'node:test';
    +import assert from 'node:assert/strict';
    +
    +import { titleCase } from './slice.js';
    +
    +test('titleCase converts simple lowercase words to title case', () => {
    +  assert.equal(titleCase('hello world'), 'Hello World');
    +});
    +
    +test('titleCase capitalizes every word in a longer phrase', () => {
    +  assert.equal(titleCase('harry potter and the stone'), 'Harry Potter And The Stone');
    +});
    +
    +test('titleCase normalizes existing mixed title casing', () => {
    +  assert.equal(titleCase('already Title Cased'), 'Already Title Cased');
    +});
    +
    +test('titleCase returns an empty string for empty input', () => {
    +  assert.equal(titleCase(''), '');
    +});
    
    agent’s summary
    ● RED$ node --testexit 183ms
    failure outputnode --test
    node:internal/modules/esm/resolve:275
        throw new ERR_MODULE_NOT_FOUND(
              ^
    
    Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/private/var/folders/ch/wlpz3_xn77ddsc3_yz_1bp9m0000gn/T/slice-eadd9cf1-ktxkW6/slice.js' imported from /private/var/folders/ch/wlpz3_xn77ddsc3_yz_1bp9m0000gn/T/slice-eadd9cf1-ktxkW6/slice.test.js
        at finalizeResolution (node:internal/modules/esm/resolve:275:11)
        at moduleResolve (node:internal/modules/esm/resolve:865:10)
        at defaultResolve (node:internal/modules/esm/resolve:991:11)
        at #cachedDefaultResolve (node:internal/modules/esm/loader:719:20)
        at #resolveAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:736:38)
        at ModuleLoader.resolveSync (node:internal/modules/esm/loader:765:52)
        at #resolve (node:internal/modules/esm/loader:701:17)
        at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:621:35)
        at ModuleJob.syncLink (node:internal/modules/esm/module_job:160:33)
        at ModuleJob.link (node:internal/modules/esm/module_job:245:17) {
      code: 'ERR_MODULE_NOT_FOUND',
      url: 'file:///private/var/folders/ch/wlpz3_xn77ddsc3_yz_1bp9m0000gn/T/slice-eadd9cf1-ktxkW6/slice.js'
    }
    
    Node.js v24.14.0
    ✖ slice.test.js (34.503125ms)
    ℹ tests 1
    ℹ suites 0
    ℹ pass 0
    ℹ fail 1
    ℹ cancelled 0
    ℹ skipped 0
    ℹ todo 0
    ℹ duration_ms 40.562875
    
    ✖ failing tests:
    
    test at slice.test.js:1:1
    ✖ slice.test.js (34.503125ms)
      'test failed'
    Red confirmed
    stateactive.build.redIMPLactive.build.green
    no recorded basisthis transcript predates evidence-bound transitions
  6. Build — GREEN (make it pass)build.green
    The agent implements until the test passes
    🤖 coding agent · codex44.4s1 file: slice.js
    Instructions given to the agent
    Create `slice.js` (ES module) with the minimal implementation that makes the failing test in `slice.test.js` pass. Do NOT modify the test. Keep it simple and correct.
    Diff the agent produced — slice.js
    diff --git a/after/slice.js b/after/slice.js
    new file mode 100644
    index 0000000..459579c
    --- /dev/null
    +++ b/after/slice.js
    @@ -0,0 +1,6 @@
    +export function titleCase(input) {
    +  return input
    +    .split(' ')
    +    .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
    +    .join(' ');
    +}
    
    agent’s summary
    ● GREEN$ node --testexit 096ms
    outputnode --test
    ✔ titleCase converts simple lowercase words to title case (0.450125ms)
    ✔ titleCase capitalizes every word in a longer phrase (0.066458ms)
    ✔ titleCase normalizes existing mixed title casing (0.052959ms)
    ✔ titleCase returns an empty string for empty input (0.049084ms)
    ℹ tests 4
    ℹ suites 0
    ℹ pass 4
    ℹ fail 0
    ℹ cancelled 0
    ℹ skipped 0
    ℹ todo 0
    ℹ duration_ms 52.35775
    Green!
    stateactive.build.greenPASSactive.build.refactor
    no recorded basisthis transcript predates evidence-bound transitions
  7. Build — REFACTORbuild.refactor
    Clean up under green
    🤖 coding agent · codex1m 17s1 file: slice.js
    Instructions given to the agent
    Refactor `slice.js` for clarity and edge-case safety WITHOUT changing behaviour. Do not modify the test. The tests must still pass.
    Diff the agent produced — slice.js
    diff --git a/before/slice.js b/after/slice.js
    index 459579c..8a799bc 100644
    --- a/before/slice.js
    +++ b/after/slice.js
    @@ -1,6 +1,17 @@
     export function titleCase(input) {
       return input
         .split(' ')
    -    .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
    +    .map(titleCaseWord)
         .join(' ');
     }
    +
    +function titleCaseWord(word) {
    +  if (word.length === 0) {
    +    return '';
    +  }
    +
    +  const firstLetter = word.charAt(0).toUpperCase();
    +  const remainingLetters = word.slice(1).toLowerCase();
    +
    +  return `${firstLetter}${remainingLetters}`;
    +}
    
    agent’s summary
    ● GREEN$ node --testexit 087ms
    outputnode --test
    ✔ titleCase converts simple lowercase words to title case (0.367458ms)
    ✔ titleCase capitalizes every word in a longer phrase (0.067917ms)
    ✔ titleCase normalizes existing mixed title casing (0.047417ms)
    ✔ titleCase returns an empty string for empty input (0.043291ms)
    ℹ tests 4
    ℹ suites 0
    ℹ pass 4
    ℹ fail 0
    ℹ cancelled 0
    ℹ skipped 0
    ℹ todo 0
    ℹ duration_ms 46.944375
  8. Build — INTEGRATEbuild.integrate
    The slice is integration-ready
    stateactive.build.refactorDONEactive.assure.security.waiting
    no recorded basisthis transcript predates evidence-bound transitions
  9. Assure — securityassure.security
    A security review of the real change
    securitylocal-codersuccess58767 tok10.9s
    Prompt sent to the model
    system
    You are the security assurance agent. Review the diff and, in 2-3 sentences, name the single most important security consideration and whether this change is safe. Be concrete.
    user
    Change under review (git diff):
    
    
    model response
    stateactive.assure.security.waitingATTESTATIONactive.assure.security.done
    no recorded basisthis transcript predates evidence-bound transitions
  10. Assure — performanceassure.performance
    A performance review of the real change
    performancelocal-codersuccess54618 tok7.8s
    Prompt sent to the model
    system
    You are the performance gate agent. In 2-3 sentences, name the key performance characteristic/risk of this change and a budget to hold it to.
    user
    Change under review (git diff):
    
    
    model response
    stateactive.assure.security.donePERF_GATEactive.verify.devVerify
    no recorded basisthis transcript predates evidence-bound transitions
  11. Verify — devverify.dev
    Does it do what you asked?
    verifierlocal-codersuccess214763 tok9.7s
    Prompt sent to the model
    system
    You are the verification judge. Given the original ask, the acceptance criteria, and the final diff, rule met/not_met with one sentence of reasoning citing the evidence.
    user
    Ask: Add a function titleCase(text) that capitalizes the first letter of each word and lowercases the rest
    Acceptance: given titleCase function is imported from utils, when titleCase('hello world') is called, then the return value is exactly 'Hello World'; given titleCase function is imported from utils, when titleCase('harry potter and the stone') is called, then the return value is exactly 'Harry Potter And The Stone'; given titleCase function is imported from utils, when titleCase('already Title Cased') is called, then the return value preserves existing title casing or correctly normalizes to 'Already Title Cased'; given titleCase function is imported from utils, when titleCase('') is called, then the return value is an empty string ''
    
    Final change (git diff):
    
    model response
    stateactive.verify.devVerifyDEV_GREENactive.verify.stagingVerify
    no recorded basisthis transcript predates evidence-bound transitions
  12. Verify — stagingverify.staging
    Staging verification
    stateactive.verify.stagingVerifySTG_GREENactive.verify.canary
    no recorded basisthis transcript predates evidence-bound transitions
  13. Verify — canaryverify.canary
    Canary — a slice of real traffic
    stateactive.verify.canaryWOBBLEactive.verify.fixing
    no recorded basisthis transcript predates evidence-bound transitions
    🩺 Forensics — what failed, the output behind it, and the repair

    Something real failed here. Below: what failed and the output behind it. No repair attempt was recorded after this failure.

    what failed
    verify.canary WOBBLE — verification failed, back to fixing
    the output behind it — the model's response (verifier · local-coder)
    Not met: The git diff was not provided in the prompt, leaving no evidence to verify whether the `titleCase` function satisfies the acceptance criteria.

    No repair attempt was recorded after this failure.

  14. Verify — fixing (recovery)verify.fixing
    The canary wobbled — recover, don't roll back the world
    stateactive.verify.fixingPATCH_READYactive.verify.canary
    no recorded basisthis transcript predates evidence-bound transitions
  15. Verify — canary (resumed)verify.canary
    Back on canary, healthy this time
    stateactive.verify.canaryHEALTHYactive.verify.rollout
    no recorded basisthis transcript predates evidence-bound transitions
  16. Verify — rolloutverify.rollout
    Full rollout
    stateactive.verify.rolloutFULLactive.ship
    no recorded basisthis transcript predates evidence-bound transitions
  17. Shipship
    Shipped — handed to human QA
    stateactive.shipRELEASEDcompleted
    no recorded basisthis transcript predates evidence-bound transitions
  18. Learnlearn
    Close the loop
  19. Donedone
    Cycle complete — every phase, for real

✓ Cycle complete. The slice above was built by a real agent, proven by a real test run, reviewed, and verified — all on this machine.