Skip to content
Myr

Name the redesign's checks in AGENTS.md, define Inbox, Explore and the Visibility tab, describe the four shells in PRODUCT.md, and tighten the web's entry budget

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

authored by oscabriel · committed by oscabriel · parent 708a49e · Browse files · 8 files+47 added−33 removed
This commit

State

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

Diff stats

8 files+47 added−33 removed

  • tests:+14 added−14 removed
  • other:+33 added−19 removed

8 files+47 added−33 removed

modified:apps/web/test/edge-cache.test.ts+1 added-1 removed
139 unmodified lines
140 ).toStrictEqual(["Accept, Cookie", "Accept, cookie"]);141 });142143 it("keeps a page about its reader nowhere, as the route says", () => {144 expect(kept(forTheEdge(get("/today"), answer(personalPage)))).toStrictEqual(144 expect(kept(forTheEdge(get("/inbox"), answer(personalPage)))).toStrictEqual(145 {146 cacheControl: personalPage["Cache-Control"],147 vary: null,148 }
316 unmodified lines
modified:apps/web/test/session.test.ts+9 added-9 removed
427 unmodified lines
428 "sends the browser to the platform's /authorize as the web's public client, with S256",429 () =>430 Effect.gen(function* () {431 const { location, response } = yield* signIn(432 "/auth/signin?return=/today"432 "/auth/signin?return=/inbox"433 );434435 expect(response.status).toBe(302);436 expect(`${location.origin}${location.pathname}`).toBe(
38 unmodified lines
475 "trades the code at the platform's /token over PLATFORM, with the verifier sign-in kept",476 () =>477 Effect.gen(function* () {478 const { location, seen } = yield* signInAndBack(479 "/auth/signin?return=/today",479 "/auth/signin?return=/inbox",480 "c0de"481 );482483 const [exchange, ...more] = seen;
39 unmodified lines
523 "sets the token only as the HttpOnly session cookie, for no longer than the token lives, and goes back",524 () =>525 Effect.gen(function* () {526 const { response, state } = yield* signInAndBack(527 "/auth/signin?return=/today",527 "/auth/signin?return=/inbox",528 "c0de"529 );530531 const cookies = cookiesOf(response);
2 unmodified lines
534535 expect([536 response.status,537 response.headers.get("location"),538 ]).toStrictEqual([302, "/today"]);538 ]).toStrictEqual([302, "/inbox"]);539 expect(540 credentialFrom(get("/rpc", { cookie: session?.pair ?? "" }))541 ).toStrictEqual(Option.some(TOKEN_ANSWER.access_token));542 expect({
373 unmodified lines
916917describe("the dev sign-in", () => {918 it("sets the session to the dev backend's token for a handle", () => {919 const response = devSignIn({920 request: get("/auth/dev?handle=ines-v&return=/today"),920 request: get("/auth/dev?handle=ines-v&return=/inbox"),921 });922923 const [session] = cookiesOf(response);924925 expect([response.status, response.headers.get("location")]).toStrictEqual([926 302,927 "/today",927 "/inbox",928 ]);929 expect(lockedDown(session?.attributes)).toBeTruthy();930 expect(931 credentialFrom(get("/rpc", { cookie: session?.pair ?? "" }))
14 unmodified lines
946 const ines = Schema.decodeSync(Handle)("ines-v");947948 it("names the person signed in, with a way to sign out", () => {949 const markup = renderToStaticMarkup(950 createElement(SessionView, { handle: Option.some(ines), here: "/today" })950 createElement(SessionView, { handle: Option.some(ines), here: "/inbox" })951 );952953 expect(markup).toContain(">ines-v<");954 expect(markup).toContain('href="/people/ines-v"');
4 unmodified lines
959 });960961 it("offers sign-in, coming back to the page it was on", () => {962 const markup = renderToStaticMarkup(963 createElement(SessionView, { handle: Option.none(), here: "/today" })963 createElement(SessionView, { handle: Option.none(), here: "/inbox" })964 );965966 expect(markup).toContain('href="/auth/signin?return=%2Ftoday"');966 expect(markup).toContain('href="/auth/signin?return=%2Finbox"');967 expect(markup).toContain(">Sign in<");968 expect(markup).not.toContain("/auth/signout");969 });970
13 unmodified lines
modified:apps/web/test/shell.test.tsx+3 added-3 removed
592 unmodified lines
593describe(PageShell, () => {594 it.effect("gives a page one main region headed by its title", () =>595 Effect.gen(function* () {596 const markup = yield* renderAt(597 "/today",598 <PageShell title="Today">597 "/inbox",598 <PageShell title="Inbox">599 <p>Decisions 2 of 5</p>600 </PageShell>601 );602603 expect(elementOf(markup, "main", 'id="main"')).toMatch(604 /<h1\b[^>]*>Today<\/h1>[\s\S]*<p>Decisions 2 of 5<\/p>/u604 /<h1\b[^>]*>Inbox<\/h1>[\s\S]*<p>Decisions 2 of 5<\/p>/u605 );606 })607 );608});
43 unmodified lines
modified:packages/config/test/web-wiring.test.ts+1 added-1 removed
245 unmodified lines
246 it("holds each Worker it measures to limits of its own", () => {247 expect(budgets).toStrictEqual({248 "apps/platform": { entry: 1_900_000, javascript: 1_900_000 },249 "apps/sandbox": { entry: 656_000, javascript: 656_000 },250 "apps/web": { entry: 356_000, javascript: 3_191_000 },250 "apps/web": { entry: 355_000, javascript: 3_191_000 },251 });252 expect(Object.keys(budgets).toSorted()).toStrictEqual(253 workers.map(({ dir }) => dir).toSorted()254 );
23 unmodified lines
modified:scripts/startup-budget.ts+1 added-1 removed
modified:AGENTS.md+3 added-3 removed
11 unmodified lines
1213| # | Principle | Held by |14| --- | --- | --- |15| 1 | **Encode lessons in structure; prose is the last rung.** When a mistake repeats, make it unrepresentable, then a lint or a test. | No fence |16| 2 | **Parse at the boundary, trust inside.** Decode every external input (HTTP, git, DO RPC, WebSocket, rule facts, env) with Effect Schema; inside, use branded types (`AskId`, `LandedSha`, `PatchId`). Decode the Worker `env` once, in one Layer. | The Effect diagnostics at error in `tsconfig.base.json`; `anti-slop/no-unknown-parameters`, `anti-slop/no-widen-then-assert` and `anti-slop/require-safety-comment-for-type-assertion`; `apps/platform/test/platform.test.ts` (a bad env fails at start, decoded once in `apps/platform/src/platform.ts`); `apps/platform/test/bindings.test.ts` (the decoded bindings, vars and secrets equal each wrangler.jsonc block's, the `AI` binding, `DRAFT_LIMIT`, `DRAFT_MODEL`, `PUBLIC_WEB_URL` and the code store's `CODE_CACHE` among them, and each port's factory takes its binding as the generated Env types it, without a cast); `packages/project/test/code-history.test.ts` (a kept code-history value is decoded with Schema when read, and one that no longer decodes is computed again); `packages/project/test/code.test.ts` (a kept commit that no longer decodes is computed again); `apps/web/test/dev-fixtures.test.ts` (the dev world's fixture record is decoded through the protocol's schemas when the world is built, so every case reads only a record that decodes); `apps/web/test/server-params.test.ts` (a project route's server handler is handed the project's full name once, as Start's params parse it, never parsed again) |16| 2 | **Parse at the boundary, trust inside.** Decode every external input (HTTP, git, DO RPC, WebSocket, rule facts, env) with Effect Schema; inside, use branded types (`AskId`, `LandedSha`, `PatchId`). Decode the Worker `env` once, in one Layer. | The Effect diagnostics at error in `tsconfig.base.json`; `anti-slop/no-unknown-parameters`, `anti-slop/no-widen-then-assert` and `anti-slop/require-safety-comment-for-type-assertion`; `apps/platform/test/platform.test.ts` (a bad env fails at start, decoded once in `apps/platform/src/platform.ts`); `apps/platform/test/bindings.test.ts` (the decoded bindings, vars and secrets equal each wrangler.jsonc block's, the `AI` binding, `DRAFT_LIMIT`, `DRAFT_MODEL`, `PUBLIC_WEB_URL` and the code store's `CODE_CACHE` among them, and each port's factory takes its binding as the generated Env types it, without a cast); `packages/project/test/code-history.test.ts` (a kept code-history value is decoded with Schema when read, and one that no longer decodes is computed again); `packages/project/test/code.test.ts` (a kept commit that no longer decodes is computed again); `apps/web/test/dev-fixtures.test.ts` (the dev world's fixture record is decoded through the protocol's schemas when the world is built, so every case reads only a record that decodes); `apps/web/test/server-params.test.ts` (a project route's server handler is handed the project's full name once, as Start's params parse it, never parsed again); `apps/web/test/theme.test.ts` (the theme preference is decoded with Schema when read from `localStorage`, and a value it never wrote, or storage the browser refuses, reads as the system's own) |17| 3 | **Refusals are a closed `Schema.TaggedError` union and a public contract.** Handle them with `Match.exhaustive` or `catchTags`. Each carries a `retryable` and a `next` command fixed per tag, an optional `at`, and no `message` field. A `_tag` is renamed only with an alias. `protocol/render` is the one renderer for git `remote:`, CLI and MCP text. Stage-1 refusals accumulate. | `packages/protocol/test/refusal.test.ts` and `packages/protocol/test/render.test.ts` (every tag, the code reads' and drafting's `UnknownPath`, `UnknownRevision`, `UnknownProposal`, `ProposalClosed` and `DraftInProgress` included; a limit's refusal names its kind and its wait, and a ref outside `refs/heads/` reads as one the platform writes); `packages/agent-kit/test/full-llms.test.ts` (every tag in the union has a row in `/llms-full.txt`); `packages/protocol/test/mcp.test.ts` (a refusal from tools/call keeps its tag); `anti-slop-effect/prefer-effect-match` and `anti-slop-effect/no-manual-tag-comparison`; `packages/gate/test/shape.test.ts` (one push hears every stage-1 refusal at once); `apps/platform/test/mcp.test.ts` (each refusing MCP contract comes back as its exact refusal, `draftAsk`, `showProposal` and a code read's `UnknownPath` included); `apps/platform/test/workflows/draft.test.ts` (past the draft limit, `CapReached`); `apps/cli/test/policy.test.ts`; `apps/cli/test/local/check.test.ts` (the local check gives the gateway's stage-1 refusals for the same commit); `packages/protocol/test/exit-code.test.ts` (each tag's CLI exit code is pinned, 75 exactly when it is retryable); `packages/config/test/legacy-projects.test.ts` (the same alias rule for a project's address: the forty projects made before owners keep their keys as aliases of their full names, the two examples and the import plan's, each key and each name once) |18| 4 | **One schema, many surfaces.** Change `packages/protocol`; every surface derives from it. Projections live only in `apps/*/src/surfaces.ts`. The CLI's command list is `commandDocs` in `@repo/agent-kit`, which the platform's skill, the CLI's MCP prompt and the web's `llms.txt` all read. | `apps/cli/test/commands-doc.test.ts` (the command list against the real CLI's commands, flags and positionals, `policy`, `ask draft` and `proposal` included); `packages/protocol/test/mcp.test.ts` (every MCP tool's schemas, with no JSON Schema leak, the policy and drafting contracts included; the five capped code reads are tools, `showCommit` and `listPaths` are not); `packages/agent-kit/test/install-channels.test.ts` and `apps/web/test/agents.test.tsx` (every snippet, command and link on the Install page is `@repo/agent-kit`'s, and the old `/agents` answers a 301 to `/install`); `packages/agent-kit/test/docs.test.ts` and `apps/web/test/docs.test.tsx` (the `/docs` pages name only the CLI's commands with flags each takes and link only to pages that exist, the reference lists every command, refusal, event, MCP tool, limit, endpoint and imported project from its source, and the web draws each page and its Markdown from that one text); `apps/web/test/llms.test.ts` (`/` and `/<project>` asked for Markdown answer with the `llms.txt` texts, and their HTML names that Markdown as an alternate); `packages/agent-kit/test/full-llms.test.ts` (one `ProjectEvent` line per tag); `apps/platform/test/home.test.ts` (the platform's `/` in Markdown is the web's `llms.txt`, one text from `@repo/agent-kit`); `packages/protocol/test/project-name.test.ts` (`ProjectName` is the one parser of a project's name for every surface: lowercase, a legacy key read as its full name, encoded only in the full form, and a key that reads back to its name); per-package `allowedUnstableApis` with `unstableApiUsage` at error |19| 5 | **The name lives only in `packages/brand`.** Internal packages use `@repo/*`. DO classes, Workflows, queues and databases carry job names. | `brand:check` (`scripts/brand.ts`, tested by `packages/brand/test/leaks.test.ts`) |19| 5 | **The name lives only in `packages/brand`.** Internal packages use `@repo/*`. DO classes, Workflows, queues and databases carry job names. | `brand:check` (`scripts/brand.ts`, tested by `packages/brand/test/leaks.test.ts`); `apps/web/test/shell.test.tsx` (the footer's wordmark is `Brand.domain`, read from `@repo/brand`, never typed) |20| 6 | **Pure core, thin hosts.** Only `@repo/artifacts` calls Artifacts. Each beta dependency sits behind one job-named port with a `/memory` adapter in the owning package. Apps import packages only. Worker code stays free of `node:child_process`, `@effect/platform-bun` and OpenTUI. `rules` and `gate` run in both Workers and Bun. `alchemy/*` stays in `infra/`. No module-level mutable state in a package's `src/`. | Scoped `allowedUnstableApis`; `packages/artifacts/test/repo-host-contract.ts` (one RepoHost contract every adapter passes); `apps/platform/test/bindings.test.ts` and `apps/platform/test/worker-init.test.ts` (the Worker starts on its real adapters, composed in `apps/platform/src/ports.ts`); `apps/platform/test/router-build.test.ts` (both handlers are built when the Worker module loads, with no binding touched, and a layer that awaits a promise while it is built is refused there); `apps/web/test/production-bundle.test.ts` (no dev-world module in the web's production build, and no chunk every page preloads holds the Markdown renderer, under a gzip ceiling); `packages/config/test/cartridge.test.ts` (the visibility cartridge is plugged in by one marked line and reached by nothing else, so removing it is a deletion); `packages/drafting/test/memory.test.ts` (the `Drafter` port's `/memory` adapter, `packages/drafting/src/drafter/memory.ts`) and `packages/drafting/test/binding.test.ts` (its Workers AI adapter over the `AI` binding); `apps/platform/test/mailer.test.ts` (sign-in's `Mailer` port, its `/memory` adapter and its Email Service adapter over the `EMAIL` binding); `packages/project/test/code-store.test.ts` (the `CodeStore` port's `/memory` adapter, `packages/project/src/code-store/memory.ts`, and its R2 adapter over `CODE_CACHE`, whose failures are misses, never the read's); `apps/platform/test/code-reads.test.ts` and `apps/web/test/dev-backend.test.ts` (the platform and the web's dev world answer the code reads and raw files alike, both through `@repo/project/code`); `packages/project/test/standing-posture.test.ts` (one helper, `withStandingPosture`, gives a listing each project's own posture, for the platform and the web's dev world alike, through the `StandingPostures` port whose default keeps nothing; its D1 adapter is the platform's); `apps/web/test/seeded.test.tsx` (a loader's read seeds a registry of its own page and leaves the registry every request shares as it was); `apps/web/test/shell.test.tsx` (no plain anchor between the web's pages: every link is the router's). No fence: import direction and module-level state |21| 7 | **Deny by default for visibility.** Land the answer's tree, never the composed tree. Nothing from a layer enters a public tree. Snapshot before held-back files are written. Public-serving Workers have no private-namespace binding. Public commits, trailers, notes and errors name public paths only. | `PrivatePathInPublicTree`, one rule for the gate's stage 1 and the landing guard (`packages/gate/test/shape.test.ts`, `packages/visibility/test/guards.test.ts`); `apps/platform/test/visibility/layer-gateway.test.ts` (only a layer's readers clone it, every read is logged, a fork push cannot carry its paths); `apps/sandbox/test/held-back.test.ts` (egress off and the snapshot taken before any sealed file is written; one bit per area, no output); `apps/platform/test/visibility/held-back.test.ts` (the `Held-back:` trailer, the landing guards, no stored value in a note or a kept log); `apps/platform/test/bindings.test.ts`; `apps/sandbox/test/checker.test.ts` (no snapshot once the held-back slot is reached); `apps/web/test/env.test-d.ts` (the web's Env has no private-namespace, Artifacts or `CODE_CACHE` binding) and `apps/platform/test/env.test-d.ts` (only the platform's has both); `packages/project/test/code-raw.test.ts` and `apps/platform/test/raw.test.ts` (raw bytes under `nosniff` and the sandboxing CSP, refusals included); `apps/platform/test/code-reads.test.ts` (no code read's payload names a repo); `packages/project/test/code-history.test.ts` (the code store is keyed under the project's canonical repo alone and holds no landing); `apps/platform/test/w9-contracts.test.ts` (`projectPolicy` answers without the policy's layers or asks, and `packages/config/test/cartridge.test.ts` keeps the cartridge removable); `packages/drafting/test/prompt.test.ts` (a draft's prompt never carries a layer's name, repo, reason or paths); `apps/web/test/markdown.test.tsx` (a README's script, handlers, unsafe URLs, iframes, styles and forms never reach the page); `apps/platform/test/gateway.test.ts` and `packages/gate/test/parse.test.ts` (a fork takes branches only: its notes, tags and the platform's refs are refused); `apps/platform/test/visibility/posture-listing.test.ts` and `apps/platform/test/home.test.ts` (the project list and the platform's `/` show the posture the project's ledger shows); `apps/web/test/landing.test.tsx` (the landing's latest landings name each by its project, and a refused answer by its tag and its area alone, never a check's name, suite, lane, path or log) and `apps/web/test/explore.test.tsx` (each project's card shows the posture its listing gives); `apps/web/test/ledger.test.tsx` (the ledger page adds no path, check name or file name) and `apps/web/test/env.test.tsx` (the env page shows no value and no control to set or read one); `apps/platform/test/pages.test.ts` (the sign-in page, as an MCP client's consent, escapes every value a client supplies, and every sign-in form shown again escapes what the person typed); `apps/platform/test/oauth.test.ts` (no account is written, and no grant given, until its email is proved by a mailed code, and a password reset reads the same for an address no account has); `apps/platform/test/gateway-owner.test.ts` (the gateway reads a full name, a source path, a legacy key or a fork's address to the repo its project's key names, and an owner alone or a name under a page's word to none) |21| 7 | **Deny by default for visibility.** Land the answer's tree, never the composed tree. Nothing from a layer enters a public tree. Snapshot before held-back files are written. Public-serving Workers have no private-namespace binding. Public commits, trailers, notes and errors name public paths only. | `PrivatePathInPublicTree`, one rule for the gate's stage 1 and the landing guard (`packages/gate/test/shape.test.ts`, `packages/visibility/test/guards.test.ts`); `apps/platform/test/visibility/layer-gateway.test.ts` (only a layer's readers clone it, every read is logged, a fork push cannot carry its paths); `apps/sandbox/test/held-back.test.ts` (egress off and the snapshot taken before any sealed file is written; one bit per area, no output); `apps/platform/test/visibility/held-back.test.ts` (the `Held-back:` trailer, the landing guards, no stored value in a note or a kept log); `apps/platform/test/bindings.test.ts`; `apps/sandbox/test/checker.test.ts` (no snapshot once the held-back slot is reached); `apps/web/test/env.test-d.ts` (the web's Env has no private-namespace, Artifacts or `CODE_CACHE` binding) and `apps/platform/test/env.test-d.ts` (only the platform's has both); `packages/project/test/code-raw.test.ts` and `apps/platform/test/raw.test.ts` (raw bytes under `nosniff` and the sandboxing CSP, refusals included); `apps/platform/test/code-reads.test.ts` (no code read's payload names a repo); `packages/project/test/code-history.test.ts` (the code store is keyed under the project's canonical repo alone and holds no landing); `apps/platform/test/w9-contracts.test.ts` (`projectPolicy` answers without the policy's layers or asks, and `packages/config/test/cartridge.test.ts` keeps the cartridge removable); `packages/drafting/test/prompt.test.ts` (a draft's prompt never carries a layer's name, repo, reason or paths); `apps/web/test/markdown.test.tsx` (a README's script, handlers, unsafe URLs, iframes, styles and forms never reach the page); `apps/platform/test/gateway.test.ts` and `packages/gate/test/parse.test.ts` (a fork takes branches only: its notes, tags and the platform's refs are refused); `apps/platform/test/visibility/posture-listing.test.ts` and `apps/platform/test/home.test.ts` (the project list and the platform's `/` show the posture the project's ledger shows); `apps/web/test/landing.test.tsx` (the landing's latest landings name each by its project, and a refused answer by its tag and its area alone, never a check's name, suite, lane, path or log) and `apps/web/test/explore.test.tsx` (each project's card shows the posture its listing gives); `apps/web/test/ledger.test.tsx` (the Visibility tab's ledger adds no path, check name or file name, and the tab's views import nothing from the visibility cartridge) and `apps/web/test/env.test.tsx` (its Environment shows no value and no control to set or read one, and the old `/env` and `/ledger` answer a 301 to the tab); `apps/web/test/home.test.tsx`, `apps/web/test/today.test.tsx` and `apps/web/test/edge-cache.test.ts` (`/inbox` is read with the reader's own session and kept by no cache, and the old `/home` and `/today` answer a 301 to it); `apps/web/test/theme.test.ts` and `apps/web/test/settings.test.tsx` (the theme preference lives in `localStorage` and never in a cookie, so it makes no page personal); `apps/platform/test/pages.test.ts` (the sign-in page, as an MCP client's consent, escapes every value a client supplies, and every sign-in form shown again escapes what the person typed); `apps/platform/test/oauth.test.ts` (no account is written, and no grant given, until its email is proved by a mailed code, and a password reset reads the same for an address no account has); `apps/platform/test/gateway-owner.test.ts` (the gateway reads a full name, a source path, a legacy key or a fork's address to the repo its project's key names, and an owner alone or a name under a page's word to none) |22| 8 | **Deterministic and idempotent.** Rule evaluation sees frozen time and randomness and only injected facts. Re-running an operation converges. Check results are keyed by (tree SHA, check version), push events deduped by (repo, sha), and land requests carry a `requestId`. | `globalDate`, `globalRandom`, `globalTimers` and `cryptoRandomUUID` at error, with their in-Effect twins; `packages/rules/test/replay.test.ts`; `packages/project/test/project-store.contract.ts`; `packages/project/test/claim.model.test.ts` and `packages/project/test/landing.model.test.ts`; `apps/platform/test/workflows/answer.test.ts`; `apps/platform/test/workflows/on-push.test.ts`; `apps/platform/test/core-loop.test.ts`; `apps/platform/test/workflows/draft.test.ts` (a replayed draft round asks the model nothing more, and each round is its own instance); `packages/project/test/code.test.ts` (code reads cached by object id, only once finished, while `main` resolves every time, and a commit's diff kept by its SHA without its landing); `packages/project/test/drafting.model.test.ts` (a settle of a stale round changes nothing); `packages/project/test/import.test.ts` (a retried import adopts the repo it made, and a retried import keeps its source); `packages/project/test/code-history.test.ts` (a why and a path's history are kept by commit, path hash and algorithm version, and the store, a step from a kept ancestor and a whole walk agree); `packages/config/test/smoke-loop.test.ts` (smoke's throwaway project is in the ledger before init makes it, and a taken name stops before anything is made); `apps/web/test/events.test.ts` (the web's fold of a project's events gives the same map when an event is heard twice or out of order, and a replay that already holds a landing stamps nothing); `packages/project/test/standing-posture.test.ts` (a kept posture is read again only for the project whose event the projection applied, or once its instant has come). No fence: one push deduped by (repo, sha) across the gateway's record and OnPush's |23| 9 | **Effect v4 only.** Read `node_modules/effect/src` as API truth. Off limits: `effect/unstable/*`, v3 `@effect/platform` and `@effect/cli`, and `effect/workflow` or `effect/cluster` on Workers. | `outdatedApi`; `no-restricted-imports` |24| 10 | **Escapes need a reason.** Every `oxlint-disable`, `@effect-diagnostics` or `@ts-expect-error` carries its reason after `--`, and is added only where no idiomatic code does the job. | `check` fails on an unused directive. No fence: the reason |25| 11 | **`bun run verify` is the authority.** Deploy only to an explicit stage, after `verify`, with smoke after. A red gate is fixed, never deployed around. | `packages/config/test/verify.test.ts` (verify's steps); `infra/deploy.ts` refuses without a known stage, runs `verify` first and `scripts/smoke.ts` after (`packages/config/test/deploy.test.ts`, `packages/config/test/smoke.test.ts`), and refuses every deploy while `infra/.recording` is there (`packages/config/test/recording.test.ts`) |
114 unmodified lines
modified:GLOSSARY.md+17 added-5 removed
135 unmodified lines
136One choice put to a project's maintainers, with its evidence and a safe default that is taken if nobody decides before it expires. Where a path asks for more than one maintainer, the choice takes effect once that many have chosen alike, and waits until then.137_Avoid_: approval, vote, review request, quorum138139**Today**:140A maintainer's daily page of open decisions, ordered by expiry and held to their budget; the overflow waits for a later day.141_Avoid_: inbox, queue, dashboard140A maintainer's daily list of open decisions, ordered by expiry and held to their budget; the overflow waits for a later day. The CLI prints it as `today`; the web shows it in the inbox.141_Avoid_: queue, dashboard142143**Inbox**:144A person's own page on the web: the decisions waiting for them (their Today), the asks they hold with where each answer stands in the gate, and the asks they may take next. It is read with their session and kept by no cache.145_Avoid_: home, notifications, dashboard146147**Budget**:148The number of decisions a maintainer takes per day; a decision past it waits, and one that expires undecided takes its default.149150**Vouch**:
12 unmodified lines
163The trailers on a landing (Asked-by, Signed-off-by, Decided-by, Mentored-by, Finished-by, Advised-by) naming every human role.164_Avoid_: co-author (for agents), attribution165166**Front page**:163The cross-project list of open asks a viewer may take.164_Avoid_: explore, trending, network167The cross-project list of open asks a viewer may take, at `/asks`.168_Avoid_: trending, network, explore (that lists projects)169170**Explore**:171The web's list of every public project, each with its posture, the projects taking answers first.172_Avoid_: trending, discover, front page (that lists asks)173174## Visibility175176**Layer**:177A separate repo holding one audience's files for a project, overlaid on main's paths only where that audience may read.
22 unmodified lines
200201**Ledger**:202The public, append-only record of a project's layers, counts, commitments, releases and posture changes; the one record a clone does not yet carry.203204**Visibility tab**:205A project's one page for what it holds back and what it shows: its posture, layers, held-back checks, Environment and ledger.206_Avoid_: privacy page, settings207208**Env shape**:197The public schema of a project's environment variables: its committed .env.schema file, in the @env-spec format that varlock reads, which the platform parses from the landed SHA and never resolves.209The public schema of a project's environment variables: its committed .env.schema file, in the @env-spec format that varlock reads, which the platform parses from the landed SHA and never resolves. The web shows it as Environment, on the Visibility tab.210_Avoid_: env.ts, .env.example, secrets file211212**Write-only value**:213A value for one @sensitive env item, set by a maintainer and stored encrypted by the platform; nobody can read it back, and it reaches only runs of landed code or is swapped in at the network boundary.
42 unmodified lines
modified:PRODUCT.md+12 added-10 removed
67 unmodified lines
68## Operating Context6970- Work happens in git and the CLI (`Brand.cli` in code; the name lives only in `packages/brand`). The CLI is a single binary served by the platform itself (`/install.sh`, `/releases/…`), with a versioned `--json` envelope on every command, `--dry-run` and `--yes` where a command writes, and `mcp` to serve the platform's tools over stdio. Every web page that suggests an action shows its command, copyable.71- Harnesses plug in without installing anything: the project's AGENTS.md block and skill, `/llms.txt`, an ask as Markdown, and `/.well-known/mcp.json`. The CLI also answers harness hooks (`hook`), and pi users can load a user-level adapter.72- Every page sits in one shell: a rail of where you are (the site's sections, the projects with their posture, the current project's sections, the file tree on code pages), the page, and an inspector of the typed facts of the thing in hand, each with its command numbered to copy. Below 1120 px the rail opens from a Menu and the facts follow the page's head; phones get a bottom bar (Asks, Today, Projects, More).72- Every page sits in one of four shells, named by its route: `site` (the landing, Explore, the asks board, Install), `project` (a project's tabs, the inbox, settings, a person), `docs`, and `focus` (sign-in, MCP consent and the forms that make something). The top bar is the same everywhere (Explore, Asks, Docs, Install, search, the keys and the account with its inbox count); there is no global rail, and a side column holds only facts about what is on screen. Below 1100 px each side column stacks under its page; below 900 px the top bar's links fold into a menu.73- Pages per job on the web:74 - **Front page** (`/asks`; `/` is the landing): open asks across projects a viewer may take, grouped by project with each project's posture said once, in the group heading, filtered by kind, by open to take and by asks held for newcomers; a split family is one row with its children as a fan. Selecting an ask fills the inspector with its state and its claim command. The same list as Markdown by `Accept: text/markdown`.75 - **Project** (`/$project`): its head says the project's posture once and, in one sentence of typed facts, how a change lands here; then its asks, then its README; beside them, the gate, who decides, what is held back, how to take part and its last three landings with their credit. The same as the project's `llms.txt` by `Accept: text/markdown`.76 - **Code** (`/$project/tree/…`, `blob/…`, `why/…`, `commits/…`, `commit/…`, `refs`): the files at any commit with a persistent tree, highlighted code with `#L` links, why each line is there, the landings by day, each commit's diff, and the refs; raw bytes under a sandboxing CSP.74 - **Landing** (`/`): what the gate does, the issue and pull-request flow beside the ask, answer and gate flow, the seven stages, and the latest landings and refused answers across projects. A signed-in reader goes on to the inbox.75 - **Explore** (`/explore`): every public project as a card with its posture, the projects taking answers first.76 - **Front page** (`/asks`): open asks across projects a viewer may take, grouped by project with each project's posture said once, in the group heading, filtered by kind, by open to take and by asks held for newcomers; a split family is one row with its children as a fan. The same list as Markdown by `Accept: text/markdown`.77 - **Project** (`/$project`, the Overview tab): a header that stays across the tabs (the name, the posture said once, a description, its facts and Watch, Clone and Contribute), then the tabs Overview, Code, Asks, Landings, Proposals, People, Policy and Visibility. Overview holds its asks, recent landings and README, beside an about column with how a change lands here and who decides. The same as the project's `llms.txt` by `Accept: text/markdown`.78 - **Code** (`/$project/tree/…`, `blob/…`, `why/…`, `commits/…`, `commit/…`, `refs`): the files at any commit, tag or answer fork with a persistent tree, highlighted code with `#L` links, why each line is there, the landings by day, each commit's diff, and the refs; raw bytes under a sandboxing CSP.79 - **Ask** (`/$project/asks/$ask`): the want, the territory, the check, who may claim, and the commands; the same as Markdown by `Accept: text/markdown` or at `/$project/asks/$ask.md`.80 - **Answer** (`/$project/answers/$ask`): the outcome, the gate's stages, the rounds, the lanes, held-back results as one line per area, the refusal, and the landing. A waiting answer says the one thing the contributor needs; a landed one is told as a sentence first, then credits its people, and only then shows its sealed roots.81 - **Person** (`/people/$handle`): their credits by role and area, in words, never a number or a score.82 - **Policy** (`/$project/people`): who decides which paths, who is vouched for or denounced, the limits and the agent rules, read from the config folder at the landed commit, with the commands that change them.83 - **Proposals** (`/$project/proposals/new`, `/$project/proposals/$proposal`): a want proposed from the web or the CLI, the platform's agent's draft if one was asked for (the ask file, the check, its red-first runs), and the decision it waits on.82 - **Today** (`/today`): a maintainer's decisions in sections (due today, within the budget, waiting for tomorrow), each with its evidence, safe default, expiry and one-tap choices whose consequence is written under each, against the budget said as a sentence, with newcomers to welcome and a sample of landings that needed nobody; each decision has its own page (`/$project/decisions/$decision`), where a finish shows the answer's diff with refusals marked at their lines.83 - **Ledger** (`/$project/ledger`): the posture label, each declared layer with its reason, each sealed area's count, authors, committed root and admission, and every entry, newest first.84 - **Env shape** (`/$project/env`): every item the project's committed `.env.schema` declares, parsed at the landed commit and never resolved; for a sensitive item, who set its value and when. Never a value.84 - **Inbox** (`/inbox`; `/home` and `/today` move here): the reader's own page. A maintainer's decisions in sections (due today, within the budget, waiting for tomorrow), each with its evidence, safe default, expiry and one-tap choices whose consequence is written under each, against the budget said as a sentence; the asks the reader holds and where each answer stands in the gate; the asks they may take next. Each decision has its own page (`/$project/decisions/$decision`), where a finish shows the answer's diff with refusals marked at their lines.85 - **Visibility** (`/$project/visibility`; `/$project/ledger` and `/$project/env` move here): the posture, each declared layer with its reason, each sealed area's count, authors, committed root and admission; the Environment, every item the project's committed `.env.schema` declares, parsed at the landed commit and never resolved, with who set a sensitive item's value and when, never a value; and the ledger, newest first.86 - **Settings** (`/settings`): the theme, the system's or its opposite, kept in this browser's `localStorage`, never a cookie.87 - **Sign-in** (`/auth/signin`): through the platform's own accounts; the session lives in an HttpOnly cookie the browser cannot read.86 - **For agents** (`/agents`, and `/agents.md`): a reference in the voice of a man page over `/llms.txt`, `/llms-full.txt`, each project's `/$project/llms.txt`, `/.well-known/mcp.json` and the skills under `/.well-known/agent-skills/`.88 - **Install** (`/install`; `/agents` moves here, and `/agents.md` stays): every way in, the CLI, remote and stdio MCP, the skills and `llms.txt`, each snippet copyable. The reference lives in the docs (`/docs`), over `/llms.txt`, `/llms-full.txt`, each project's `/$project/llms.txt`, `/.well-known/mcp.json` and the skills under `/.well-known/agent-skills/`.89- Pages arrive with their data in the server's HTML, and moving between them never reloads the document. The project, ask and answer pages update live while open (the project's `watch` stream), and fall back to reading again every 5 s when the stream cannot be held.90- A minimal keyboard set works on every page: `?` (the keys, with a switch that turns the rest off), `j`/`k` through a list, `J`/`K` through files, `1`–`9` to copy the page's numbered commands, and Escape.89- A project may not take a name the web uses for its own pages (`agents`, `today`, `people`, `auth`, `rpc`, `releases`, `icons`, `assets`).90- Phone width is a first-class target (Today installs as a PWA).91- A project may not take a name the web uses for its own pages (`reservedProjectNames` in `@repo/protocol`: `explore`, `inbox`, `install`, `settings`, `asks`, `docs`, `people`, `auth`, `rpc` and the rest, the old `agents`, `home` and `today` kept).92- Phone width is a first-class target (the web installs as a PWA that opens on the inbox).9394## Capabilities and Constraints9596- The web Worker holds no storage binding and no secrets; every read goes through `/rpc` to the platform, and no public-serving Worker can reach the private namespace (AGENTS.md principle 7). It cannot show what the platform does not return.
27 unmodified lines