Skip to content
Myr

Add /tour, the loop in six steps on the landing's example (find, read, claim, push and hear OutOfScope through the one renderer, fix and land, see the credit), each with its numbered command and a screen drawn by the real components; link it from the hero, the asks' and Explore's empty states and Start here; reserve the name; and seed the dev world with bram's round on parse-iso-week refused OutOfScope at Shape, his second held at the merge, with the kept verdict naming the stage its report names

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by oscabriel · committed by oscabriel · parent 07f14ad · Browse files · 27 files+1180 added−49 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

27 files+1180 added−49 removed

  • tests:+320 added−10 removed
  • other:+860 added−39 removed

27 files+1180 added−49 removed

added:apps/web/src/dev/answer-runs.ts+47 added
modified:apps/web/src/dev/examples.ts+68 added
404 unmodified lines
405 [AskId.make(stated.id), [askFileOf(stated), test]] as const406 ),407 files: library,408 project: ProjectName.make("oscabriel/datekit"),409 /**410 * Bram's two rounds on parse-iso-week: the first refused at Shape for a411 * path outside the ask's territory, the second still checking.412 */413 rounds: {414 ask: AskId.make("parse-iso-week"),415 first: {416 files: new Map([417 [418 "src/parse.ts",419 [420 "const WEEK = /^(?<year>\\d{4})-W(?<week>\\d{2})-(?<day>[1-7])$/u;",421 "",422 "/** An ISO 8601 date (`2026-10-07`), week date (`2026-W41-3`) or date-time, read as UTC. */",423 "export const parseISO = (text: string): Date => {",424 " const week = WEEK.exec(text);",425 "",426 " if (week === null) {",427 ' return new Date(text.length === 10 ? text + "T00:00:00Z" : text);',428 " }",429 "",430 " // The week's Monday, from the week holding 4 January, comes next.",431 " return new Date(Number.NaN);",432 "};",433 "",434 ].join("\n"),435 ],436 ]) satisfies Files,437 message: "Start on ISO week dates",438 },439 outside: RepoPath.make("README.md"),440 second: {441 files: new Map([442 [443 "src/parse.ts",444 [445 "const WEEK = /^(?<year>\\d{4})-W(?<week>\\d{2})-(?<day>[1-7])$/u;",446 "",447 "const DAY = 86_400_000;",448 "",449 "/** The Monday of ISO week 1: the week holding 4 January. */",450 "const firstMonday = (year: number) => {",451 " const fourth = Date.UTC(year, 0, 4);",452 " const weekday = new Date(fourth).getUTCDay() || 7;",453 "",454 " return fourth - (weekday - 1) * DAY;",455 "};",456 "",457 "/** An ISO 8601 date (`2026-10-07`), week date (`2026-W41-3`) or date-time, read as UTC. */",458 "export const parseISO = (text: string): Date => {",459 " const week = WEEK.exec(text)?.groups;",460 "",461 " if (week === undefined) {",462 ' return new Date(text.length === 10 ? text + "T00:00:00Z" : text);',463 " }",464 "",465 " return new Date(",466 " firstMonday(Number(week.year)) +",467 " ((Number(week.week) - 1) * 7 + Number(week.day) - 1) * DAY",468 " );",469 "};",470 "",471 ].join("\n"),472 ],473 ]) satisfies Files,474 message: "Parse ISO week dates",475 },476 },477 stray: {478 files: new Map([479 [480 "README.md",
220 unmodified lines
modified:apps/web/src/dev/seed.ts+100 added-6 removed
1import { RefName, RefOutcome, RepoHost } from "@repo/artifacts/repo-host";2import { Lander } from "@repo/project/lander";3import { LandingCommand } from "@repo/project/landing";4import type { ProjectApi } from "@repo/project/project";5import { Projects } from "@repo/project/projects";6import type { HarnessAudit } from "@repo/protocol/audit";7import { DecisionSubject } from "@repo/protocol/domain/decision";8import type { Decision } from "@repo/protocol/domain/decision";9import { AskId, Handle, keyOf, RepoName, RequestId } from "@repo/protocol/ids";10import type { CommitSha, ProjectName, ProposalId } from "@repo/protocol/ids";11import { Anonymous, Person } from "@repo/protocol/principal";12import { OutOfScope } from "@repo/protocol/refusal";13import { Array, DateTime, Effect, Option } from "effect";1415import { DevAnswerRuns } from "./answer-runs.ts";16import { DevClock, devMinute } from "./clock.ts";17import {18 burrow,19 burrowPeople,
133 unmodified lines
153 ),154 { discard: true }155 );156157/**158 * A push to the answerer's fork, recorded and submitted as the gateway does;159 * a held one is queued but never driven, so it stays at the merge until the160 * seed judges it.161 */162const answered = (163 api: ProjectApi,164 answerer: Handle,165 input: {166 readonly ask: AskId;167 readonly audit: HarnessAudit;168 readonly files: Files;169 readonly hold?: boolean;170 readonly message: string;171 }172) =>173 Effect.gen(function* () {
2 unmodified lines
176 const claim = yield* Effect.fromOption(177 Array.findFirst(claims, ({ ask }) => ask === input.ask)178 );179170 const base = yield* filesOf(claim.fork, claim.base);180 // A second round builds on the first: the fork's tip, which a first push finds at the claim's base.181 const host = yield* RepoHost;182183 const tip = Option.getOrElse(184 Option.fromNullishOr((yield* host.refs(claim.fork)).get(mainRef)),185 () => claim.base186 );187188 const base = yield* filesOf(claim.fork, tip);189190 const head = yield* pushed(claim.fork, {191 author: answerer,192 files: overlay(textOf(base), input.files),193 message: input.message,176 parent: Option.some(claim.base),194 parent: Option.some(tip),195 });196197 const refusals = yield* api.recordPush({198 after: head,199 audit: input.audit,182 before: Option.some(claim.base),200 before: Option.some(tip),201 eventId: `${claim.fork}@${head}`,202 pusher: as(answerer),203 ref: mainRef,204 repo: claim.fork,
2 unmodified lines
207 if (Array.isReadonlyArrayNonEmpty(refusals)) {208 return yield* Effect.die(refusals);209 }210211 const requestId = RequestId.make(`push-${head}-${answerer}`);212213 if (input.hold === true) {214 yield* (yield* DevAnswerRuns).hold(requestId);215 }216193 return yield* api.submitAnswer(as(answerer), {217 const receipt = yield* api.submitAnswer(as(answerer), {218 ask: input.ask,219 base: claim.base,220 head,197 requestId: RequestId.make(`push-${head}-${answerer}`),221 requestId,222 });223224 return { claim, head, receipt, requestId };225 });226227const ROUNDS_MINUTE = 19;228229/**230 * Bram's first answer to parse-iso-week, refused at Shape for a path outside231 * the ask's territory, then his second, still at the merge. The platform's232 * landing guard judges a merged tree's shape as stage 1 judges a push's and233 * reports its refusals at that stage (`apps/platform/src/workflows/answer`);234 * the dev world has no guard, so the seed reports the verdict one would.235 */236const refusedRound = (api: ProjectApi) =>237 Effect.gen(function* () {238 const { contributor } = datekitPeople;239 const { ask, first, outside, second } = datekit.rounds;240 const lander = yield* Lander;241242 yield* at(ROUNDS_MINUTE);243244 const held = yield* answered(api, contributor, {245 ...first,246 ask,247 audit: bramsHarness,248 hold: true,249 });250251 const run = yield* Effect.flatMap(252 api.answer(held.requestId),253 Effect.fromOption254 );255256 const main = yield* Effect.flatMap(api.head(), ({ landed }) =>257 Effect.fromOption(Option.fromUndefinedOr(landed))258 );259260 const { changes, tree } = yield* lander.merge({261 base: held.claim.base,262 fork: held.claim.fork,263 head: held.head,264 main,265 repo: RepoName.make(keyOf(datekit.project)),266 });267268 yield* api.advanceAnswer(269 held.requestId,270 LandingCommand.Merged({ changes, main, tree })271 );272273 yield* api.advanceAnswer(274 held.requestId,275 LandingCommand.Checked({276 decisions: [],277 finish: run.finish,278 refusals: [new OutOfScope({ paths: [outside] })],279 tree,280 }),281 { heldBack: [], lanes: [], stage: "shape" }282 );283284 yield* at(ROUNDS_MINUTE + 1);285286 yield* answered(api, contributor, {287 ...second,288 ask,289 audit: bramsHarness,290 hold: true,291 });292 });293294const decisionOn = (api: ProjectApi, decider: Handle, proposal: ProposalId) =>295 Effect.flatMap(api.today(as(decider)), ({ decisions }) =>296 Effect.fromOption(297 Array.findFirst(
104 unmodified lines
402403export const seedDev: Effect.Effect<404 void,405 never,313 Projects | RepoHost | DevClock406 Projects | RepoHost | DevClock | Lander | DevAnswerRuns407> = Effect.gen(function* () {408 const datekitApi = yield* seedDatekit;409410 yield* seedBurrow;411 yield* refusedRound(datekitApi);412 yield* strayPush(datekitApi);413}).pipe(Effect.orDie);
modified:apps/web/src/dev/world.ts+13 added-4 removed
modified:apps/web/src/features/ask/ask-page.tsx+2 added-1 removed
176 unmodified lines
177 ))}178 </ul>179);180181/** The ask's brief, as the tour reads it too. */181const Brief = ({ ask }: { readonly ask: Ask }) => {182export const Brief = ({ ask }: { readonly ask: Ask }) => {183 const { context, current, outOfScope, terms } = ask.brief;184185 const parts = [186 current === undefined ? null : (
434 unmodified lines
modified:apps/web/src/features/explore/explore-page.tsx+10 added-2 removed
3 unmodified lines
4import type { ReactNode } from "react";56import { LandingProjects } from "../landing/projects.ts";7import { postureLabel } from "../project/posture-label.ts";8import { LINK } from "../shared/classes.ts";9import { EmptyState } from "../shared/empty.tsx";10import { AppLink } from "../shared/link.tsx";10import { ASKS_PATH, projectPath } from "../shared/paths.ts";11import { ASKS_PATH, projectPath, TOUR_PATH } from "../shared/paths.ts";12import { UnreachableNotice } from "../shared/pending.tsx";13import { PostureBadge } from "../shared/posture.tsx";14import { GUTTER } from "../shared/shell/gutter.ts";15import { exploreGroups } from "./groups.ts";
111 unmodified lines
127 heading="Taking answers now"128 note="Projects with asks open to claim."129 >130 {taking.length === 0 ? (130 <EmptyState title="No project has an open ask right now." />131 <EmptyState132 onward={133 <AppLink className={LINK} to={TOUR_PATH}>134 Take the tour135 </AppLink>136 }137 title="No project has an open ask right now."138 />139 ) : (140 <CardGrid projects={taking} />141 )}142 </Group>
47 unmodified lines
modified:apps/web/src/features/front/front-page.tsx+9 added-1 removed
15 unmodified lines
16import type { AskProgress } from "../shared/ask-progress.ts";17import { EmptyState } from "../shared/empty.tsx";18import { FamilyStrip } from "../shared/family.tsx";19import { AppLink } from "../shared/link.tsx";20import { projectPath } from "../shared/paths.ts";20import { projectPath, TOUR_PATH } from "../shared/paths.ts";21import { PostureBadge } from "../shared/posture.tsx";22import { AskRow, RowGroup, useRowSelection } from "../shared/row.tsx";23import { Workspace } from "../shared/shell/workspace.tsx";24import { plural } from "./facts.tsx";
212 unmodified lines
237 </nav>238 );239};240241const TakeTheTour = () => (242 <AppLink className={LINK} to={TOUR_PATH}>243 Take the tour244 </AppLink>245);246247const NoAsks = ({248 projects,249}: {250 readonly projects: readonly ProjectListing[] | undefined;251}) =>252 projects?.length === 0 ? (253 <EmptyState254 command={`${Brand.cli} init`}255 onward={<TakeTheTour />}256 title="No open asks, and no project yet. Run init in a repo to bring it here."257 />258 ) : (259 <EmptyState260 command={`${Brand.cli} ask open <ask> --files <files>`}261 onward={<TakeTheTour />}262 title="No open asks on any project. A maintainer opens one from an ask file."263 />264 );265
190 unmodified lines
modified:apps/web/src/features/landing/gate-drawing.tsx+3 added-2 removed
65 unmodified lines
66 </span>67 );68};6970/** A transcript as a terminal prints it, with its caption under it. */70const Output = ({71export const Output = ({72 caption,73 outcome,74 transcript,75}: {76 readonly caption: string;76 readonly outcome: "landed" | "refused";77 readonly outcome: "claimed" | "landed" | "refused";78 readonly transcript: Printed;79}) => (80 <figure className="flex min-w-0 flex-col gap-2" data-output={outcome}>81 <pre
40 unmodified lines
modified:apps/web/src/features/landing/landing-page.tsx+11 added-2 removed
3 unmodified lines
4import { buttonVariants } from "../../components/ui/button.tsx";5import { ID, LINK } from "../shared/classes.ts";6import { CommandLine } from "../shared/command.tsx";7import { AppLink } from "../shared/link.tsx";8import { ASKS_PATH, EXPLORE_PATH, INSTALL_PATH } from "../shared/paths.ts";8import {9 ASKS_PATH,10 EXPLORE_PATH,11 INSTALL_PATH,12 LANDING_NOW_ANCHOR,13 TOUR_PATH,14} from "../shared/paths.ts";15import { GUTTER } from "../shared/shell/gutter.ts";16import { GateDrawing } from "./gate-drawing.tsx";17import { LandingNowList } from "./landing-now-list.tsx";18import type { LandingNow } from "./landing-now.ts";
160 unmodified lines
179 </AppLink>180 <div className="max-w-full min-w-0">181 <CommandLine command={installCommand(webUrl)} />182 </div>183 <AppLink className={`text-ui ${LINK}`} to={TOUR_PATH}>184 Take the tour185 </AppLink>186 </div>187 <div className="w-full max-w-(--container-figure)">188 <MusicBox />189 </div>
8 unmodified lines
198 </Part>199200 <Part201 aside={<More to={EXPLORE_PATH}>Explore projects</More>}193 id="landing-now"202 id={LANDING_NOW_ANCHOR}203 title="Landing now"204 >205 <LandingNowList landings={landings} />206 </Part>
10 unmodified lines
modified:apps/web/src/features/landing/transcript.ts+70 added-20 removed
1/**2 * Every `remote:` line comes from the one renderer, so it cannot drift from3 * what the gateway sends; git's own lines around them are what4 * `apps/platform/test/core-loop.test.ts` asserts from real git, the landed5 * commit's trailers among them.5 * commit's trailers among them. The example's people are fictional; the6 * tour's screens read the same names.7 */8import { Brand } from "@repo/brand";9import { creditLine } from "@repo/git/trailers";10import type { ClaimView } from "@repo/protocol/domain/claim";11import { Outcome } from "@repo/protocol/domain/outcome";12import {13 AskId,14 CommitSha,15 Handle,16 LandedSha,17 ProjectName,18 RepoName,19 RepoPath,20 RequestId,21} from "@repo/protocol/ids";22import { OutOfScope } from "@repo/protocol/refusal";23import type { Refusal } from "@repo/protocol/refusal";24import { explain, headline, receiptLine } from "@repo/protocol/render";19import { Result } from "effect";25import { DateTime, Result } from "effect";26import type { Array } from "effect";2728const ASK = AskId.make("parse-iso");2923const FORK = `datekit--${ASK}--alice.git`;30const CLAIMANT = Handle.make("alice");3125const refusals = [26 new OutOfScope({ paths: [RepoPath.make("README.md")] }),27] as const;32const HEAD = CommitSha.make("1a2b3c4d5e6f708192a3b4c5d6e7f80912a3b4c5");3334/** The example every transcript and tour screen is drawn from: one ask on a fictional project. */35export const EXAMPLE = {36 ask: ASK,37 asker: Handle.make("dora"),38 base: CommitSha.make("0".repeat(40)),39 claimant: CLAIMANT,40 fork: RepoName.make(`datekit--${ASK}--${CLAIMANT}`),41 head: HEAD,42 landed: LandedSha.make("7c9e2f4a6b8d0e1f3a5b7c9d1e3f5a7b9c1d3e5f"),43 /** The path the refused push changed outside the ask's territory. */44 outside: RepoPath.make("README.md"),45 project: ProjectName.make("oscabriel/datekit"),46} as const;4748/** The refusal the example push hears, as the gate's shape stage gives it. */49export const EXAMPLE_REFUSALS: Array.NonEmptyReadonlyArray<Refusal> = [50 new OutOfScope({ paths: [EXAMPLE.outside] }),51];5253/** The fork's address at a platform, as the claim receipt prints it. */54export const forkRemote = (platformUrl: string) =>55 `${platformUrl.replace(/\/+$/u, "")}/${EXAMPLE.fork}.git`;5657/** A command typed after `$`, a line the platform sent through git, or one git printed itself. */58export interface TranscriptLine {59 readonly kind: "command" | "remote" | "printed";60 readonly text: string;
10 unmodified lines
71const remote = (text: string): TranscriptLine => ({ kind: "remote", text });7273const printed = (text: string): TranscriptLine => ({ kind: "printed", text });7475/** The push the claim receipt tells the answerer to run. */76export const PUSH = `git push ${Brand.slug} HEAD:main`;7778/** A push the gate refused at its shape stage, as git prints it. */79export const refusedPush = (platformUrl: string): Transcript => {49 const fork = `${platformUrl.replace(/\/+$/u, "")}/${FORK}`;50 const tag = headline(refusals);80 const fork = forkRemote(platformUrl);81 const tag = headline(EXAMPLE_REFUSALS);8283 return {84 lines: [54 command("git push"),55 ...explain(refusals).map(remote),85 command(PUSH),86 ...explain(EXAMPLE_REFUSALS).map(remote),87 printed(`To ${fork}`),88 printed(` ! [remote rejected] HEAD -> main (${tag})`),89 printed(`error: failed to push some refs to '${fork}'`),90 ],
8 unmodified lines
99 */100export const LANDED_CREDITS =101 "git fetch && git log -1 --format='%(trailers:key=Asked-by,key=Signed-off-by)' origin/main";10272const HEAD = CommitSha.make("1a2b3c4d5e6f708192a3b4c5d6e7f80912a3b4c5");73103/** A push the gate took, then the landing commit's credit once it landed. */104export const landedPush = (): Transcript => ({105 lines: [77 command("git push"),106 command(PUSH),107 remote(108 Result.getOrElse(109 receiptLine({81 ask: ASK,82 base: CommitSha.make("0".repeat(40)),83 head: HEAD,110 ask: EXAMPLE.ask,111 base: EXAMPLE.base,112 head: EXAMPLE.head,113 outcome: Outcome.cases.Checking.make({ stage: "merge" }),85 project: ProjectName.make("oscabriel/datekit"),86 requestId: RequestId.make(`push-${HEAD}`),114 project: EXAMPLE.project,115 requestId: RequestId.make(`push-${EXAMPLE.head}`),116 }),117 () => ""118 )119 ),120 command(LANDED_CREDITS),92 printed(`Asked-by: ${creditLine(Handle.make("dora"))}`),93 printed(`Signed-off-by: ${creditLine(Handle.make("alice"))}`),121 printed(`Asked-by: ${creditLine(EXAMPLE.asker)}`),122 printed(`Signed-off-by: ${creditLine(EXAMPLE.claimant)}`),123 ],124});125126/** The claim command, as the ask page and the front page spell it. */127export const CLAIM = `${Brand.cli} claim ${EXAMPLE.ask} --project ${EXAMPLE.project}`;128129/**130 * The claim's receipt, the words the CLI prints (`apps/cli/src/render.ts`):131 * what is held and until when, the fork, and the three commands that follow.132 */133export const claimReceipt = (claim: ClaimView): Transcript => ({134 lines: [135 command(CLAIM),136 printed(137 `You hold the claim on ${claim.ask} in ${claim.project} until ${DateTime.formatIso(claim.lapsesAt)}; only a push keeps it alive.`138 ),139 printed(`Its fork: ${claim.remote}`),140 printed("Next:"),141 printed(` git remote add ${Brand.slug} ${claim.remote}`),142 printed(` ${Brand.cli} check`),143 printed(` ${PUSH}`),144 ],145});
modified:apps/web/src/features/shared/paths.ts+6 added
23 unmodified lines
24export const SETTINGS_PATH = "/settings";2526export const TERMS_PATH = "/terms";2728/** The guided walkthrough: the loop in six steps on an example project. */29export const TOUR_PATH = "/tour";3031/** The landing's "Landing now", which the tour's "see it live" opens. */32export const LANDING_NOW_ANCHOR = "landing-now";3334export const docsPath = (page?: string) =>35 page === undefined ? "/docs" : `/docs/${page}`;3637export const projectPath = (project: ProjectName) => `/${project}`;
45 unmodified lines
added:apps/web/src/features/tour/example.ts+151 added
1/**2 * The tour's example, typed by the protocol's schemas and drawn from the same3 * names as the landing's transcripts: one ask on a fictional project, claimed,4 * refused once, then landed with credit.5 */6import { Brand } from "@repo/brand";7import type { Verdict } from "@repo/protocol/domain/answer";8import type { Ask, AskListing } from "@repo/protocol/domain/ask";9import { CheckSpec } from "@repo/protocol/domain/check";10import type { ClaimView } from "@repo/protocol/domain/claim";11import { Glob } from "@repo/protocol/domain/common";12import type { LandingView } from "@repo/protocol/domain/landing";13import { Outcome } from "@repo/protocol/domain/outcome";14import {15 AskId,16 CheckVersion,17 KindName,18 LandedSha,19 LaneName,20 PatchId,21 RepoPath,22 TreeSha,23} from "@repo/protocol/ids";24import { DateTime } from "effect";2526import { EXAMPLE, forkRemote } from "../landing/transcript.ts";2728const { ask, asker, base, claimant, fork, head, landed, project } = EXAMPLE;2930const at = (iso: string) => DateTime.makeUnsafe(iso);3132const CHECK = RepoPath.make(`test/asks/${ask}.test.ts`);3334export const OPENED_AT = at("2026-10-05T09:00:00Z");3536export const CLAIMED_AT = at("2026-10-07T10:00:00Z");3738export const LANDED_AT = at("2026-10-07T11:45:00Z");3940/** The front page's rows: the example ask, open, among two more of the project's. */41export const LISTING: readonly AskListing[] = [42 {43 ask,44 blockedBy: [],45 claimed: false,46 kind: KindName.make("fix"),47 territory: "src/parse.ts",48 want: "parseISO accepts ISO week dates such as 2026-W41-3.",49 },50 {51 ask: AskId.make("format-ordinal"),52 blockedBy: [],53 claimed: true,54 kind: KindName.make("fix"),55 territory: "src/format.ts",56 want: 'format(date, "Do") prints 1st, 2nd, 3rd, 11th, 12th, 13th and 21st.',57 },58 {59 ask: AskId.make("add-months-clamp"),60 blockedBy: [],61 claimed: false,62 kind: KindName.make("fix"),63 territory: "src/add.ts",64 want: "addMonths(January 31, 1) is the last day of February, in leap and common years.",65 },66];6768/** The ask as `ask` prints it: its brief, territory and check. */69export const ASK: Ask = {70 askedBy: asker,71 blockedBy: [],72 brief: {73 context: [74 "ISO 8601 numbers weeks from the Monday of the week holding 4 January.",75 ],76 current: "parseISO returns an invalid date for a week date.",77 outOfScope: ["Formatting week dates back to strings."],78 terms: ["Week date: a date written as year, week and weekday."],79 want: "parseISO accepts ISO week dates such as 2026-W41-3.",80 },81 check: CheckSpec.cases.RedThenGreen.make({ path: CHECK }),82 file: RepoPath.make(`${Brand.configDir}/asks/${ask}.ask.ts`),83 id: ask,84 kind: KindName.make("fix"),85 openedAt: OPENED_AT,86 openedIn: LandedSha.make(base),87 project,88 state: "open",89 territory: { module: ".", paths: [Glob.make("src/parse.ts")] },90};9192/** The claim receipt: a fork of the answerer's own at the platform, held until the lapse unless they push. */93export const claimOf = (platformUrl: string): ClaimView => ({94 ask,95 base,96 checkCommand: `bun test ${CHECK}`,97 claimant,98 fork,99 lapsesAt: DateTime.add(CLAIMED_AT, { hours: 48 }),100 openedAt: CLAIMED_AT,101 project,102 remote: forkRemote(platformUrl),103 state: "live",104 warnsAt: DateTime.add(CLAIMED_AT, { hours: 36 }),105});106107const lane = (name: string, command: string, durationMs: number) => ({108 command,109 durationMs,110 lane: LaneName.make(name),111 result: "passed" as const,112});113114/** The second push's verdict: every lane passed on the merged tree, so it landed. */115export const VERDICT: Verdict = {116 ask,117 at: LANDED_AT,118 base,119 checkVersion: CheckVersion.make("redThenGreen@0.0.0+5e1d"),120 head,121 heldBack: [],122 lanes: [123 lane("redThenGreen", `bun test ${CHECK}`, 912),124 lane("types", "bun run typecheck", 3140),125 lane("unit", "bun test", 2470),126 ],127 outcome: Outcome.cases.Landed.make({ sha: landed }),128 patchId: PatchId.make("c".repeat(64)),129 project,130 stage: "human",131 tree: TreeSha.make("d".repeat(40)),132 verifier: "platform",133};134135/** The landing commit: its credit trailers, and the agent the answerer disclosed. */136export const LANDING: LandingView = {137 ask,138 assisted: [{ harness: "claude-code", model: "haiku", verified: false }],139 author: claimant,140 credits: [141 { handle: claimant, role: "Signed-off-by" },142 { handle: asker, role: "Asked-by" },143 ],144 landedAt: LANDED_AT,145 parent: LandedSha.make(base),146 project,147 sha: landed,148};149150/** A line of the territory, for `why`. */151export const WHY_LOCATION = "src/parse.ts:4";
added:apps/web/src/features/tour/read.ts+37 added
1/**2 * Whether the platform has anything live to point the tour at: an open ask,3 * a landing. Read as nobody, so the page stays one the edge may keep.4 */5import { Client } from "@repo/protocol/contracts";6import { Effect } from "effect";78export interface TourLive {9 readonly asks: boolean;10 readonly landings: boolean;11}1213const some = <A, E>(14 read: Effect.Effect<readonly A[], E, Client>15): Effect.Effect<boolean, never, Client> =>16 read.pipe(17 Effect.map((items) => items.length > 0),18 Effect.catchCause(() => Effect.succeed(false))19 );2021export const readTourLive: Effect.Effect<TourLive, never, Client> = Effect.gen(22 function* () {23 const client = yield* Client;2425 const [asks, landings] = yield* Effect.all(26 [27 some(Effect.map(client.frontPage({}), ({ entries }) => entries)),28 some(29 Effect.map(client.recentLandings({}), ({ landings: rows }) => rows)30 ),31 ],32 { concurrency: "unbounded" }33 );3435 return { asks, landings };36 }37);
added:apps/web/src/features/tour/tour-page.tsx+276 added
1/**2 * The guided walkthrough: six steps, each one sentence, the command that3 * runs it (the page's `1` to `6` keys copy them) and a screen drawn by the4 * real components over example data. The refusal is the renderer's own5 * words, through the landing's transcript, so it cannot drift from git's.6 */7import { Brand } from "@repo/brand";8import type { ReactNode } from "react";910import { Brief } from "../ask/ask-page.tsx";11import { Output } from "../landing/gate-drawing.tsx";12import {13 CLAIM,14 claimReceipt,15 EXAMPLE,16 landedPush,17 PUSH,18 refusedPush,19} from "../landing/transcript.ts";20import { LINK } from "../shared/classes.ts";21import { CommandLine } from "../shared/command.tsx";22import { CreditTrailers } from "../shared/credits.tsx";23import { TerritoryFacts } from "../shared/facts.tsx";24import { AppLink } from "../shared/link.tsx";25import { StageStrip } from "../shared/outcome.tsx";26import {27 ASKS_PATH,28 INSTALL_PATH,29 LANDING_NOW_ANCHOR,30} from "../shared/paths.ts";31import { AskRow, RowList } from "../shared/row.tsx";32import { GUTTER } from "../shared/shell/gutter.ts";33import {34 ASK,35 claimOf,36 LANDING,37 LISTING,38 VERDICT,39 WHY_LOCATION,40} from "./example.ts";41import type { TourLive } from "./read.ts";42import { EXAMPLE_NOTE, TOUR_LEDE, TOUR_TITLE } from "./words.ts";4344/** The six commands, in the order the keys number them. */45export const TOUR_COMMANDS = {46 ask: `${Brand.cli} ask ${EXAMPLE.ask} --project ${EXAMPLE.project}`,47 check: `${Brand.cli} check`,48 claim: CLAIM,49 front: `${Brand.cli} front`,50 push: PUSH,51 why: `${Brand.cli} why ${WHY_LOCATION} --project ${EXAMPLE.project}`,52} as const;5354interface StepWords {55 readonly id: string;56 readonly title: string;57 readonly sentence: string;58 readonly command: string;59}6061const WORDS = {62 claim: {63 command: TOUR_COMMANDS.claim,64 id: "claim",65 sentence:66 "A claim is exclusive and expires unless you push; it gives you a fork of your own at the platform.",67 title: "Claim it",68 },69 credit: {70 command: TOUR_COMMANDS.why,71 id: "credit",72 sentence:73 "The landing commit credits the asker and the answerer in its trailers; an agent is disclosed, never credited. Any line's history leads back to them.",74 title: "See the credit",75 },76 find: {77 command: TOUR_COMMANDS.front,78 id: "find",79 sentence:80 "Every open ask across every public project, each a change its maintainers want and will land.",81 title: "Find an ask",82 },83 land: {84 command: TOUR_COMMANDS.check,85 id: "land",86 sentence:87 "Put the file back, run the checks locally, push again: the gate merges the answer onto main, runs every check on that exact tree, and lands it.",88 title: "Fix it, and land",89 },90 read: {91 command: TOUR_COMMANDS.ask,92 id: "read",93 sentence:94 "The brief says what done means, the territory which files an answer may change, and the check what judges it.",95 title: "Read it",96 },97 refused: {98 command: TOUR_COMMANDS.push,99 id: "refused",100 sentence:101 "A push that strays outside the territory is refused in git's own output, with the reason, the command to run next and whether trying again can help.",102 title: "Push, and hear why not",103 },104} as const satisfies Record<string, StepWords>;105106/** The six steps in the order the page walks them, and the keys number their commands. */107export const STEPS: readonly StepWords[] = [108 WORDS.find,109 WORDS.read,110 WORDS.claim,111 WORDS.refused,112 WORDS.land,113 WORDS.credit,114];115116const Step = ({117 children,118 live,119 number,120 words,121}: {122 readonly children: ReactNode;123 readonly live?: ReactNode;124 readonly number: number;125 readonly words: StepWords;126}) => (127 <li128 className="border-rule flex min-w-0 flex-col gap-4 border-t py-8"129 data-step={words.id}130 >131 <div className="flex max-w-(--measure) flex-col gap-2">132 <h2 className="text-title flex items-baseline gap-3" id={words.id}>133 <span className="text-muted-foreground tabular-nums">{number}.</span>134 {words.title}135 </h2>136 <p className="text-body text-muted-foreground">{words.sentence}</p>137 </div>138 <CommandLine command={words.command} numbered />139 <div140 className="border-rule bg-card flex min-w-0 flex-col gap-4 rounded-md border p-4"141 data-screen={words.id}142 >143 {children}144 </div>145 {live}146 </li>147);148149const Live = ({150 children,151 to,152 hash,153}: {154 readonly children: string;155 readonly to: string;156 readonly hash?: string;157}) => (158 <p className="text-ui" data-live="">159 See it live:{" "}160 <AppLink className={LINK} to={to} {...(hash === undefined ? {} : { hash })}>161 {children}162 </AppLink>163 </p>164);165166export const TourView = ({167 live,168 platformUrl,169}: {170 readonly live: TourLive;171 readonly platformUrl: string;172}) => {173 const claim = claimOf(platformUrl);174175 return (176 <main177 className={`flex min-w-0 flex-1 flex-col gap-8 pt-8 pb-16 outline-none ${GUTTER}`}178 id="main"179 tabIndex={-1}180 >181 <div className="flex max-w-(--measure) flex-col gap-3">182 <h1 className="text-headline">{TOUR_TITLE}</h1>183 <p className="text-want text-muted-foreground font-normal">184 {TOUR_LEDE}185 </p>186 <p className="text-ui text-muted-foreground" data-example-note="">187 {EXAMPLE_NOTE}188 </p>189 </div>190191 <ol className="flex min-w-0 flex-col">192 <Step193 live={live.asks ? <Live to={ASKS_PATH}>the open asks</Live> : null}194 number={1}195 words={WORDS.find}196 >197 <RowList label="Open asks">198 {LISTING.map((listing) => (199 <AskRow200 key={listing.ask}201 listing={listing}202 project={EXAMPLE.project}203 showProject204 takeable={!listing.claimed}205 />206 ))}207 </RowList>208 </Step>209210 <Step number={2} words={WORDS.read}>211 <Brief ask={ASK} />212 <TerritoryFacts ask={ASK} />213 </Step>214215 <Step number={3} words={WORDS.claim}>216 <Output217 caption="The receipt: what you hold, until when, the fork, and the three commands that follow."218 outcome="claimed"219 transcript={claimReceipt(claim)}220 />221 </Step>222223 <Step number={4} words={WORDS.refused}>224 <Output225 caption="Refused at the shape stage, before any check ran: the tag, the reason, the next command, and whether retrying can help."226 outcome="refused"227 transcript={refusedPush(platformUrl)}228 />229 </Step>230231 <Step232 live={233 live.landings ? (234 <Live hash={LANDING_NOW_ANCHOR} to="/">235 the latest landings236 </Live>237 ) : null238 }239 number={5}240 words={WORDS.land}241 >242 <Output243 caption="Taken at the push; once every later stage passed, it landed as a commit crediting every person."244 outcome="landed"245 transcript={landedPush()}246 />247 <StageStrip248 holds={{ decided: false, heldBack: false }}249 outcome={VERDICT.outcome}250 stage={VERDICT.stage}251 />252 </Step>253254 <Step number={6} words={WORDS.credit}>255 <CreditTrailers256 assisted={LANDING.assisted}257 credits={LANDING.credits}258 label="title"259 />260 </Step>261 </ol>262263 <p className="text-ui text-muted-foreground">264 Next:{" "}265 <AppLink className={`text-foreground ${LINK}`} to={ASKS_PATH}>266 browse the open asks267 </AppLink>268 , or{" "}269 <AppLink className={`text-foreground ${LINK}`} to={INSTALL_PATH}>270 install the CLI271 </AppLink>272 .273 </p>274 </main>275 );276};
added:apps/web/src/features/tour/words.ts+13 added
1/**2 * A module of their own: a route's head is bundled with the route tree every3 * page loads, so it must pull in no view.4 */56export const TOUR_TITLE = "Tour";78export const TOUR_LEDE =9 "The loop in six steps, each with the command that runs it: find an ask, read it, claim it, push and hear why not, fix and land, see the credit. Two minutes.";1011/** Said once, above the screens: the project and its people are invented. */12export const EXAMPLE_NOTE =13 "The screens show an example project; its people are fictional.";
added:apps/web/src/routes/tour.tsx+36 added
1import { createFileRoute, getRouteApi } from "@tanstack/react-router";2import { createServerFn } from "@tanstack/react-start";3import { env } from "cloudflare:workers";4import { Effect } from "effect";56import { pageHead } from "../features/shared/head.ts";7import { readTourLive } from "../features/tour/read.ts";8import { TourView } from "../features/tour/tour-page.tsx";9import { TOUR_LEDE, TOUR_TITLE } from "../features/tour/words.ts";10import { branchPage } from "../server/cache-headers.ts";11import { serverClient } from "../server/client.ts";1213const root = getRouteApi("__root__");1415// Read as nobody (no cookie reaches the platform): whether anything is live is everyone's, so the page stays one the edge may keep.16const tourData = createServerFn({ method: "GET" }).handler(() =>17 Effect.runPromise(readTourLive.pipe(Effect.provide(serverClient(env))))18);1920const Tour = () => {21 const { platformUrl } = root.useLoaderData();22 const live = Route.useLoaderData();2324 return <TourView live={live} platformUrl={platformUrl} />;25};2627export const tourHead = () =>28 pageHead({ description: TOUR_LEDE, title: TOUR_TITLE });2930export const Route = createFileRoute("/tour")({31 staticData: { shell: "site" },32 loader: () => tourData(),33 head: tourHead,34 headers: () => branchPage,35 component: Tour,36});
modified:apps/web/test/dev-backend.test.ts+6 added-2 removed
312 unmodified lines
313 () =>314 Effect.gen(function* () {315 const { landing, landings, want } = yield* recentWithLast;316317 expect(landings[0]?._tag).toBe("Landed");318 expect(landings[0]).toMatchObject({317 // Bram's refused round on parse-iso-week came after the last landing.318 expect(landings.map(({ _tag }) => _tag).slice(0, 2)).toStrictEqual([319 "Refused",320 "Landed",321 ]);322 expect(landings[1]).toMatchObject({323 at: landing.landedAt,324 project: landing.project,325 sha: landing.sha,326 want,
184 unmodified lines
modified:apps/web/test/dev-fixtures.test.ts+66 added
3 unmodified lines
4import { DecisionSubject } from "@repo/protocol/domain/decision";5import type { Decision } from "@repo/protocol/domain/decision";6import { ProjectEvent } from "@repo/protocol/domain/event";7import { Outcome } from "@repo/protocol/domain/outcome";8import { RecentLanding } from "@repo/protocol/domain/recent-landing";9import { LedgerEntry } from "@repo/protocol/domain/visibility";10import {11 AskId,12 DecisionId,13 Handle,14 ProjectName,15 ProposalId,16 RepoPath,17} from "@repo/protocol/ids";18import { OutOfScope } from "@repo/protocol/refusal";19import {20 Context,21 DateTime,22 Duration,
861 unmodified lines
884 ]).toStrictEqual([true, true]);885 })886 );887});888889const datekit = ProjectName.make("oscabriel/datekit");890891const WEEK_WANT = "parseISO accepts ISO week dates such as 2026-W41-3.";892893describe("the dev world's refused round", seededWorlds, () => {894 it.live(895 "refuses bram's first answer to parse-iso-week at Shape, for a path outside its territory, and holds his second at the merge",896 () =>897 inWorld({}, (as) =>898 Effect.gen(function* () {899 const anyone = yield* as();900901 const { verdict } = yield* anyone.verdict({902 ask: ask("parse-iso-week"),903 project: datekit,904 });905906 const events = yield* Stream.runCollect(907 anyone.watch({ project: datekit })908 );909910 const progress = askStates(events).get(ask("parse-iso-week"));911912 expect([verdict?.stage, verdict?.lanes]).toStrictEqual(["shape", []]);913 expect(refusalsOf(verdict?.outcome)).toStrictEqual([914 new OutOfScope({ paths: [RepoPath.make("README.md")] }),915 ]);916 // The verdict stays with its round: the second push waits at the merge, judged by nothing yet.917 expect(918 progress?.rounds.map(({ head, outcome }) => [919 head === verdict?.head,920 outcome._tag,921 ])922 ).toStrictEqual([[true, "Refused"]]);923 expect([924 progress?.claimant,925 progress?.lastPush !== undefined &&926 progress.lastPush.head !== verdict?.head,927 ]).toStrictEqual(["bram", true]);928 })929 )930 );931932 it.live(933 "lists that refusal among the latest landings by its tag alone, under the ask's want",934 () =>935 inWorld({}, (as) =>936 Effect.gen(function* () {937 const { landings } = yield* (yield* as()).recentLandings({});938 const refused = landings.filter(RecentLanding.guards.Refused);939940 expect(refused).toHaveLength(1);941 expect(refused[0]).toMatchObject({942 ask: "parse-iso-week",943 project: datekit,944 refusals: [{ tag: "OutOfScope" }],945 want: WEEK_WANT,946 });947 })948 )949 );950});
modified:apps/web/test/home.test.tsx+4 added-2 removed
400 unmodified lines
401 60_000402 );403404 it.live(405 "draws a contributor's answered claim with its stages and its next command",405 "draws a contributor's answered claim with its stages, and no command while the gate still checks the latest push",406 () =>407 Effect.gen(function* () {408 const markup = yield* pageFrom(yield* readInbox({}));409410 expect(markup).toMatch(/<li[^>]*data-claim="[^"]+"/u);411 expect(markup).toContain('aria-label="Gate stages"');412 // Bram's parse-iso-week: refused once, the second push at the merge, so nothing for him to run yet.413 expect(markup).toContain("Checking");412 expect(markup).toMatch(/Copy (?:next|check) command/u);414 expect(markup).not.toMatch(/Copy (?:next|check) command/u);415 }).pipe(Effect.provide(fixturesClient("bram")), Effect.scoped),416 60_000417 );418
64 unmodified lines
modified:apps/web/test/landing.test.tsx+12 added-6 removed
183 unmodified lines
184 ).toStrictEqual([]);185 })186 );187188 it.effect("links to every way in and to the projects", () =>189 Effect.gen(function* () {190 const hrefs = hrefsOf(mainOf(yield* pageWith(landed)));188 it.effect(189 "links to every way in, to the projects, and to the tour under the hero's action",190 () =>191 Effect.gen(function* () {192 const main = mainOf(yield* pageWith(landed));193 const hrefs = hrefsOf(main);194 const hero = main.slice(0, main.indexOf('data-figure="music-box"'));195192 expect(hrefs).toContain("/install");193 expect(hrefs).toContain("/explore");194 })196 expect(hrefs).toContain("/install");197 expect(hrefs).toContain("/explore");198 expect(hrefsOf(hero)).toStrictEqual(["/asks", "/tour"]);199 expect(textIn(hero)).toContain("Take the tour");200 })201 );202203 it.effect(204 "shows the refusal as git prints it, with the platform's own lines and the rejected ref",
263 unmodified lines
modified:apps/web/test/render.tsx+1 added
45 unmodified lines
46 ["docs/$page", "docs"],47 ["install", "site"],48 ["people/$handle", "project"],49 ["settings", "project"],50 ["tour", "site"],51 ] as const52 ).map(([path, shell]) =>53 createRoute({ getParentRoute: () => root, path, staticData: { shell } })54 ),
35 unmodified lines
modified:apps/web/test/routes.test.ts+1 added
87 unmodified lines
88 "rpc",89 "settings",90 "terms",91 "today",92 "tour",93 ]);94 });9596 it("are names no project may take", () => {
41 unmodified lines
added:apps/web/test/tour.test.tsx+229 added
1import { describe, expect, it } from "@effect/vitest";2import { Brand } from "@repo/brand";3import { Contracts } from "@repo/protocol/contracts";4import { explain } from "@repo/protocol/render";5import { Effect } from "effect";67import { commands } from "../src/features/agents/catalog.ts";8import {9 EXAMPLE,10 EXAMPLE_REFUSALS,11} from "../src/features/landing/transcript.ts";12import { readTourLive } from "../src/features/tour/read.ts";13import { STEPS, TourView } from "../src/features/tour/tour-page.tsx";14import { EXAMPLE_NOTE, TOUR_LEDE } from "../src/features/tour/words.ts";15import { Route, tourHead } from "../src/routes/tour.tsx";16import { allInOrder, textIn } from "./markup.ts";17import { platformWith, unreachablePlatform } from "./platform.ts";18import { renderAt } from "./render.tsx";1920const PLATFORM = "https://platform.example.workers.dev";2122const BOTH = { asks: true, landings: true };2324const NEITHER = { asks: false, landings: false };2526const pageWith = (live: { asks: boolean; landings: boolean }) =>27 renderAt("/tour", <TourView live={live} platformUrl={PLATFORM} />);2829const hrefsOf = (markup: string) =>30 [...markup.matchAll(/<a\b[^>]*href="(?<href>[^"]+)"/gu)].map(31 (found) => found.groups?.href32 );3334/** Each step's markup, by its id. */35const stepsOf = (markup: string) =>36 new Map(37 [38 ...markup.matchAll(39 /<li\b[^>]*data-step="(?<id>[^"]+)"[\s\S]*?(?=<li\b[^>]*data-step=|<\/ol>)/gu40 ),41 ].map(([step, id]) => [id, step])42 );4344/** A `myr` command's words: its path and flags, as `commandDocs` lists them. */45const partsOf = (command: string) => {46 const [, ...words] = command.split(/\s+/u);4748 return {49 flags: words50 .filter((word) => word.startsWith("--"))51 .map((word) => word.split("=")[0] ?? word),52 name: words[0] ?? "",53 };54};5556describe(TourView, () => {57 it.effect("walks six steps, each with its numbered command, in order", () =>58 Effect.gen(function* () {59 const markup = yield* pageWith(NEITHER);60 const steps = stepsOf(markup);6162 expect([...steps.keys()]).toStrictEqual([63 "find",64 "read",65 "claim",66 "refused",67 "land",68 "credit",69 ]);70 expect(71 allInOrder(72 textIn(markup),73 STEPS.map(({ command }) => command)74 )75 ).toBeTruthy();76 // One command box per step; the keys number them once the page has a registry, which the server has not.77 expect(markup.match(/<code class="[^"]*select-all"/gu)).toHaveLength(6);78 })79 );8081 it("gives each CLI command only flags the command list says it takes", () => {82 const wrong = STEPS.flatMap(({ command }) => {83 if (!command.startsWith(`${Brand.cli} `)) {84 return [];85 }8687 const { flags, name } = partsOf(command);88 const doc = commands.find(({ path }) => path.join(" ") === name);8990 if (doc === undefined) {91 return [`${command}: no such command`];92 }9394 return flags95 .filter((flag) => !doc.flags.includes(flag))96 .map((flag) => `${command}: ${name} takes no ${flag}`);97 });9899 expect(wrong).toStrictEqual([]);100 });101102 it.effect(103 "prints the refusal as the one renderer gives it, through git, with its next command and whether retrying helps",104 () =>105 Effect.gen(function* () {106 const refused = textIn(107 stepsOf(yield* pageWith(NEITHER)).get("refused") ?? ""108 );109110 for (const line of explain(EXAMPLE_REFUSALS)) {111 expect(refused).toContain(`remote: ${line}`);112 }113114 expect(refused).toContain(`remote: next: ${Brand.cli} check`);115 expect(refused).toContain("remote: retryable: no");116 expect(refused).toContain(117 ` ! [remote rejected] HEAD -> main (OutOfScope)`118 );119 })120 );121122 it.effect(123 "draws the first screens with the real components over the example: the ask's row, its brief and territory, and the claim's receipt",124 () =>125 Effect.gen(function* () {126 const markup = yield* pageWith(NEITHER);127 const steps = stepsOf(markup);128 const text = (id: string) => textIn(steps.get(id) ?? "");129130 expect(steps.get("find")).toContain(`data-ask="${EXAMPLE.ask}"`);131 expect(text("find")).toContain(132 "parseISO accepts ISO week dates such as 2026-W41-3."133 );134 expect(135 ["Current behaviour", "Territory and check"].filter(136 (heading) => !text("read").includes(heading)137 )138 ).toStrictEqual([]);139 expect(text("claim")).toContain(140 `You hold the claim on ${EXAMPLE.ask} in ${EXAMPLE.project} until`141 );142 expect(text("claim")).toContain(143 `${PLATFORM}/datekit--parse-iso--alice.git`144 );145 })146 );147148 it.effect(149 "draws the landing as the push's receipt over the seven stages, then the credit trailers with the agent set apart, on an example it names as fictional",150 () =>151 Effect.gen(function* () {152 const markup = yield* pageWith(NEITHER);153 const steps = stepsOf(markup);154 const text = (id: string) => textIn(steps.get(id) ?? "");155156 expect(text("land")).toContain("remote: checking parse-iso at 1a2b3c4");157 expect([158 ...(steps.get("land") ?? "").matchAll(/data-stage="[^"]+"/gu),159 ]).toHaveLength(7);160 expect(161 allInOrder(text("credit"), [162 `Asked-by: ${EXAMPLE.asker}`,163 `Signed-off-by: ${EXAMPLE.claimant}`,164 "Agents used, disclosed and not credit",165 "Assisted-by: claude-code:haiku (claimed)",166 ])167 ).toBeTruthy();168 expect(textIn(markup)).toContain(EXAMPLE_NOTE);169 })170 );171172 it.effect(173 "points at the live asks and landings only when the platform has any",174 () =>175 Effect.gen(function* () {176 const both = yield* pageWith(BOTH);177 const neither = yield* pageWith(NEITHER);178179 expect(180 hrefsOf(both).filter((href) => href === "/#landing-now")181 ).toHaveLength(1);182 expect(both.match(/data-live=""/gu)).toHaveLength(2);183 expect(neither).not.toContain('data-live=""');184 expect(hrefsOf(neither)).toContain("/asks");185 expect(hrefsOf(neither)).toContain("/install");186 })187 );188189 it("is drawn in the site shell, and unfurls with its own sentence", () => {190 expect(Route.options.staticData?.shell).toBe("site");191 expect(tourHead().meta).toContainEqual({192 content: TOUR_LEDE,193 name: "description",194 });195 });196});197198describe("what the tour can point at, read on the server", () => {199 it.effect("is nothing while the platform lists no ask and no landing", () =>200 Effect.gen(function* () {201 const live = yield* readTourLive.pipe(202 Effect.provide(203 platformWith(204 Contracts.toLayerHandler("frontPage", () =>205 Effect.succeed({ entries: [] })206 ),207 Contracts.toLayerHandler("recentLandings", () =>208 Effect.succeed({ landings: [] })209 )210 )211 )212 );213214 expect(live).toStrictEqual(NEITHER);215 })216 );217218 it.effect(219 "is nothing, and never fails, when the platform did not answer",220 () =>221 Effect.gen(function* () {222 const live = yield* readTourLive.pipe(223 Effect.provide(unreachablePlatform)224 );225226 expect(live).toStrictEqual(NEITHER);227 })228 );229});
modified:packages/agent-kit/src/docs/start-here.ts+1 added
36 unmodified lines
37 "```",38 "",39 "## Where next",40 "",41 "- [Take the tour](/tour): the loop in six steps, on an example project, each with its command.",42 "- [The open asks](/asks), across every project.",43 "- [Answer an ask](/docs/answer-an-ask), from finding one to reading its verdict.",44 "- [Run a project](/docs/run-a-project): make one, write its config folder, open asks and decide.",45 "- [Connect an agent](/docs/connect-an-agent) over MCP, the CLI or a skill.",
5 unmodified lines
modified:packages/project/src/project.ts+6 added-1 removed
3043 unmodified lines
3044 lanes: input.report?.lanes ?? [],3045 now: input.now,3046 outcome: outcomeOf(state),3047 policy: known.value.policy,3048 stage: command.refusals.length > 0 ? "checks" : "human",3048 // The stage the report names, as the metric reads it: the landing3049 // guard refuses at `shape`, a cheap lane at `cheap`.3050 stage:3051 command.refusals.length > 03052 ? refusingStageOf(before, input.report)3053 : "human",3054 }),3055 (made) => ({ fresh: true, verdict: Option.some(made) })3056 );3057 };
2471 unmodified lines
modified:packages/protocol/src/ids.ts+1 added
209 unmodified lines
210 "rpc",211 "settings",212 "terms",213 "today",214 "tour",215] as const;216217const isReservedOwner = (owner: string) =>218 reservedProjectNames.some((reserved) => reserved === owner);
274 unmodified lines
modified:packages/protocol/test/project-name.test.ts+1 added
154 unmodified lines
155 "inbox",156 "install",157 "settings",158 "today",159 "tour",160 ])161 );162 });163
104 unmodified lines