Close the wave: a listed posture is the project's own, and the new pages are written down
Before adoption: this commit came in with the history the project adopted, so no landing records it.
- The hook's session brief reads a paths territory (module ".") as "these paths", as the project's own brief and the ask page already do, instead of "the module `.`". hook.test.ts, red first by assertion. - The front page's port and the platform's cross-project test no longer say the project list wakes no project: the list reads each listed project's posture from its ledger, and the projection's posture is the fallback (a doc comment and a test title; no behaviour moved). - AGENTS.md Held by: a limit's refusal and a non-branch ref's reason in render.test.ts, every tag's row in /llms-full.txt and a code read's UnknownPath over MCP (3); the five capped code reads as MCP tools, the Agents page's snippets from agent-kit and one event line per tag (4); withStandingPosture for both hosts (6); a fork taking branches only, and the list and / showing the ledger's posture (7). - ADR 0021: a listed project's posture is read from the project at list time; a PostureChanged row, a projected event and a ledger-only badge considered. ADR 0019 gains the code reads on MCP; ADR 0004 gains that a fork takes branches only and the platform's own fork writes skip custody. GLOSSARY's Posture says it is the value standing now. - README: the Agents page, /llms-full.txt and the code reads on MCP in the features; Keep or cut rows for the Agents page and /llms-full.txt; the CLI build stamps its version (release --build --version passes it). - Left as they are, on purpose: DirectPush's repair line in the skills (the rendered reason already says a fork takes branches only, so seven goldens stay put); llms.txt does not link /agents (the index already carries its own MCP section); a paths territory still lists as "." in AskListing, the CLI asks table and llms.txt (a wire field). - Budgets: none raised. Measured on this commit: platform entry 1,684,664 of 1,900,000; sandbox 570,831 of 656,000; web entry 711,006 of 818,000, JavaScript 3,604,004 of 4,075,000. verify green (protocol 448, agent-kit 93, cli 338, web 507, project 577, platform 489, config 293). - ASSUMPTION: the dev stage lists about 40 projects (28 in the throwaway ledger, the two seeded examples and 10 test projects from before the ledger, read from the repo's files, not from Cloudflare), so its list makes about 40 ledger reads, 8 at once; no project named agents is recorded on either stage. - Nothing deployed, uploaded or pushed: dev and demo still run the W10 build until someone redeploys them.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
10 files+72 added−15 removed
- tests:+26 added−2 removed
- other:+46 added−13 removed
Provenance
- Commit
57bb629- Tree
bd006ef- Author
oscabriel <oscarhernandeziv@gmail.com>- Committer
oscabriel <oscarhernandeziv@gmail.com>- Parent
8d9ece9
10 files changed+72 added−15 removed
modified:apps/cli/src/hook/decide.ts+5 added-1 removed
225 unmodified lines226 `# Your claim: ${ask} in ${project}`,227 "",228 `**Want:** ${want}`,229 "",230+ // A paths territory (module `.`) is no module a reader would know: it231+ // reads as its paths alone, as the project's own brief does.232+ territory.module === "."233+ ? "**Territory:** these paths. Change only these:"230- `**Territory:** the module \`${territory.module}\`. Change only these paths:`,234+ : `**Territory:** the module \`${territory.module}\`. Change only these paths:`,235 ...bullets(territory.paths),236 ...(territory.publicFiles === undefined ||237 territory.publicFiles.length === 0238 ? []89 unmodified linesmodified:apps/cli/test/hook.test.ts+23 added
271 unmodified lines272 `Run \`${Brand.cli} check\` before you push.`273 );274 });275 276+ it("briefs a paths territory as its paths, not as the module `.`", () => {277+ const { territory } = Schema.decodeSync(Ask)({278+ ...askWire,279+ territory: { module: ".", paths: ["src/trim.ts", "test/trim.test.ts"] },280+ });281+282+ const { output } = decideHook("session-start", start, {283+ ...facts,284+ claim: Option.some({ ...claim, territory }),285+ });286+287+ const context = Schema.decodeUnknownSync(288+ Schema.Struct({289+ hookSpecificOutput: Schema.Struct({ additionalContext: Schema.String }),290+ })291+ )(output).hookSpecificOutput.additionalContext;292+293+ expect(context.split("\n")).toContain(294+ "**Territory:** these paths. Change only these:"295+ );296+ expect(context).not.toContain("module");297+ });298+299 it("says nothing to the agent without a claim", () => {300 expect(301 decideHook("session-start", start, { ...facts, claim: Option.none() })302 .output930 unmodified linesmodified:apps/platform/test/handlers.test.ts+3 added-2 removed
545 unmodified lines546 };547 548 describe("reads across projects", () => {549 it.effect(550- "come from the front-page projection, without waking any project",550+ "come from the front-page projection, and a project the platform never made keeps its listed posture",551 () =>552 Effect.gen(function* () {553- // No project is made: only the projection answers.553+ // No project is made: only the projection answers, so each listed554+ // posture is the projection's own fallback.555 const bob = yield* as("bob");556 557 expect(yield* bob.listProjects({})).toStrictEqual({558 projects: listed,395 unmodified linesmodified:docs/adr/0004-git-gateway-owns-custody.md+1 added
27 unmodified lines282930313227 unmodified lines- **Anonymous clones of public repos work** through the gateway, which holds the read token; Artifacts itself refuses anonymous reads.- **Cost.** A push through the gateway took a median 0.355 s against 0.340 s direct (+4.6%, ten pushes each). Ten clones at once took +69% (2.0 s against 1.2 s wall time), most likely because each new isolate mints a token before its first upstream call; the two were not timed apart.- **The fallback is not built.** There are no raw per-fork tokens and no `git-remote-<name>` helper. The push-event backstop is built: OnPush turns any move of a canonical `main` that the platform did not make into a `StrayPush` decision whose default is revert.- Later stages of the gate answer after the push returns, not in its report-status (ADR 0015).- **A fork takes branches only.** A claim fork or a working fork admits only `refs/heads/*`: custody refuses a push that creates, moves or deletes any other ref (a note, a tag, the platform's own refs) with `DirectPush`, whoever pushes, and the gate's parse stage agrees for a push the backstop sees. The platform's own fork writes, its verdict notes and the Lander's merge ref, reach storage directly and never pass custody.modified:docs/adr/0019-the-web-reads-repos-through-public-contracts.md+1 added
20 unmodified lines212223242520 unmodified lines- An ask's opening is a landing that answers no ask, so its landing names the ask it opened (`opened`, a migrate family's parent) and never `ask`, which credits, Today and the record read as an answer. The project derives `opened` from its record when it is read, so openings recorded before the field existed link their ask too, with nothing rewritten. Each read's results are kept beyond one isolate as ADR 0020 records.- The port lists tags already peeled to their commits, since an annotated tag names a tag object a commit read cannot open.- Artifacts' import brings no tags. An operator may backfill an imported repo's `refs/tags/*` from its source, through a short-lived write token minted over REST. This is the one write that skips the gateway, and it writes tags only, never `main`.- Each read is an Artifacts operation, billed past a monthly allowance and limited to 2,000 a repo every 10 s. Every walk is capped: 50,000 paths, 200 commits scanned for a path's log or for why, 300 files and 2 MiB of text in a commit's diff, and 1 MiB per file.- Five code reads are MCP tools too, for an agent with no shell or git, such as a hosted connector: `readTree`, `readFile`, `log`, `why` and `listRefs`, each capped: a log page holds at most 100 commits, and the limits above bound the rest. `showCommit` (up to 2 MiB of diff) and `listPaths` (up to 50,000 paths) are not, since nothing caps them to what a transcript holds. No code read is a CLI command: git reads code locally.added:docs/adr/0021-a-listed-projects-posture-is-read-from-the-project.md+22 added
12345678910111213141516171819202122---status: accepted---
# A listed project's posture is read from the project when it is listed
The project list, the platform's `/` and the web's `/llms.txt` show each project's posture beside its name. Those rows come from the front-page projection, which hears a project only through its outbox events, and a project's standing posture changes without any event: a first config stands at once with no ledger row, a widening needs no decision, and an accepted narrowing takes effect when its notice runs out, by the clock. So a list could say "Open" while the project's own ledger said "Open with sealed evidence".
A list now reads each listed project's posture from that project's own record at list time: the anonymous ledger read, whose `posture` is the one standing now, the same value the ledger page shows. One helper in `@repo/project`, `withStandingPosture`, lays it over the projection's rows, a few projects at once. The platform's list and `/`, and the web's offline dev world, all call it. The projection's posture column stays as the fallback, kept for a project the platform never made or one whose ledger read fails, and that failure is logged.
## Considered Options
- **Write a `PostureChanged` row for a first config or a widening.** A row needs a decision to name, it changes what the public ledger records, and a project that exists today gets one only when something next wakes it.- **Project a new outbox event into the front page.** Existing rows stay wrong until each project emits again, and a narrowing that takes effect by the clock still lags behind it.- **Show posture only on the ledger page.** The badge on the list is what a visitor sees first.
## Consequences
- Each list makes one ledger read per listed project, and the ledger is read whole for one field. A stage that lists a few dozen projects wakes each of them on every list.- Nothing is migrated or replayed: once deployed, a list shows the right posture for data already there.- The badge and the ledger are one value, so a narrowing that takes effect by the clock shows on the list at once.- Posture comes through the visibility port's own ledger, so a host without the visibility cartridge still lists every project as Open.modified:packages/project/src/front-page.ts+6 added-6 removed
1234567894567891011121334 unmodified lines/** * The `FrontPage` port: the read side of the projection every project feeds * (the write side is `Projection`, whose rows come from each project's * outbox). The front page, the project list and a person's credits read from * here without waking any project. A listed project's `posture` is the * fallback only: a list's callers read each project's posture from its own * ledger at list time (`withStandingPosture`), since its standing changes * without any event this read model hears, and keep this one for a project * whose ledger could not be read. * outbox). The front page and a person's credits read from here without * waking any project. The project list reads its rows here too, but a listed * project's `posture` is the fallback only: a list's callers read each * project's posture from its own ledger at list time (`withStandingPosture`), * since its standing changes without any event this read model hears, and * keep this one for a project whose ledger could not be read. * * Adapters: `/memory` here, seeded from data, for tests; `projection-d1` * over D1 in the Worker. */34 unmodified linesmodified:AGENTS.md+4 added-4 removed
12 unmodified lines13 | # | 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) |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); `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` and `showProposal` 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) |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); `apps/platform/test/home.test.ts` (the platform's `/` in Markdown is the web's `llms.txt`, one text from `@repo/agent-kit`); per-package `allowedUnstableApis` with `unstableApiUsage` at error |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) |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); `apps/web/test/agents.test.tsx` (every snippet on the Agents page is `@repo/agent-kit`'s text); `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`); 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`) |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); `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); `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`). 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) |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); `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); `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). 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) |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); `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); `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). 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`) |123 unmodified linesmodified:GLOSSARY.md+1 added-1 removed
173 unmodified lines174 **Commitment**:175 The salted SHA-256 root of a held-back suite, printed on every landing it judged.176 177 **Posture**:178-The label the platform computes from a project's visibility config: Open, Open with sealed evidence, Open on schedule, Open core, or Source available.178+The label the platform computes from a project's visibility config as it stands now: Open, Open with sealed evidence, Open on schedule, Open core, or Source available. A narrowing stands only once a decider accepts it and its notice runs out. Every page and list shows the posture the ledger shows.179 _Avoid_: licence (they are different things)180 181 **Ledger**:182 The public, append-only record of a project's layers, counts, commitments, releases and posture changes.37 unmodified linesmodified:README.md+6 added-1 removed
49 unmodified lines50 - **Why each line is there.** A file's why page attributes each line to the landing that put it on `main`, naming its ask, answer, people and verdict, or the ask an opening opened. Imported history reads "before adoption". Why and a file's history are kept by commit in an R2 bucket, so every isolate reads them back ([ADR 0020](docs/adr/0020-code-history-is-kept-by-immutable-ids.md)): on the dev stage's imports (changesets, click; 200 commits of history) a first view took 5.3 to 7.7 s, down from 18.6 to 39.6 s, and a view already kept answers in under a second.51 - **Asks drafted for a want.** A member proposes a want with `--draft` (or the web's propose form). The platform's agent, a Workers AI model, drafts the ask file and its failing test, runs them red first on the Checker, and puts the draft to a decider with its evidence. Nothing lands until a decider accepts, and the landing discloses the agent with `Assisted-by` ([ADR 0018](docs/adr/0018-asks-are-drafted-in-a-workflow-and-put-to-a-decider.md)).52 - **A people page.** Who decides which paths, who is vouched for or denounced, each layer's readers, writers and disclosure, and the caps, budget and claim timing, all read from the config folder at the landed commit. It has no edit control: these change by landing a change to the config folder. A project whose config has not evaluated says why (no config folder, or one that failed) and what makes it evaluate; `myr policy` prints the same as text.53 - **The platform's own front page.** The platform's `/` says what the host serves (clone URLs, MCP, agent skills, sign-in, the CLI and the web app), in HTML for a browser and as Markdown for an agent.54+- **An Agents page.** The web's `/agents` (and `/agents.md`) says how to connect an agent five ways: remote MCP (Claude Code, Cursor and VS Code), MCP over stdio, the CLI, a prompt for any agent, and the skills. Its MCP entries are the same text the plugin bundles carry.55+- **`/llms-full.txt`.** Beyond the index at `/llms.txt`: every refusal with its repair, how git meets the platform, how a landing happens, every event a watcher hears, and short guides. The index names it in its first sentence, and a project's `llms.txt` and each ask's Markdown open with a line pointing to both.56+- **The code over MCP.** An agent with no shell, such as a hosted connector, browses a project's code with five capped MCP tools: `readTree`, `readFile`, `log`, `why` and `listRefs`.57 58 The web reads code only through public contracts the platform serves ([ADR 0019](docs/adr/0019-the-web-reads-repos-through-public-contracts.md)). On the dev stage, eight open-source repos are imported and kept for previewing it: anyhow, ky, gum, click, awesome, changesets, stb and fuzzel.59 60 ## Run it93 unmodified lines154 curl -fsSL <origin>/install.sh | sh155 myr login --url <origin>156 ```157 155-`<origin>` is a stage's platform or web. The binaries never come from a code host's release page. `bun run release -- --build` builds them, and `bun run release -- --upload --stage dev-<you> --version <semver>` fills the stage's bucket. Once the npm package `@myr/cli` is published, `npm install -g @myr/cli` is the other way in.158+`<origin>` is a stage's platform or web. The binaries never come from a code host's release page. `bun run release -- --build --version <semver>` builds them, and `bun run release -- --upload --stage dev-<you> --version <semver>` fills the stage's bucket. The build stamps the version `myr --version` prints: the release passes its `--version` to the CLI's own build, `bun run --cwd apps/cli build -- --version <semver>`, and a build given none prints `0.0.0`. Once the npm package `@myr/cli` is published, `npm install -g @myr/cli` is the other way in.159 160 `myr login` signs you in through the browser (PKCE against the platform's own OAuth server and its own accounts) and names `git-credential-myr` in git's config for that host, so plain `git clone`, `git fetch` and `git push` work with no token in a URL.161 162 ### Contributors' harnesses92 unmodified lines255 | --- | --- | --- |256 | 1 | Asks drafted by the platform's agent (`propose --draft`, `ask draft`, `proposal`; a proposal without a draft still goes to a decider) | `packages/drafting/`, `packages/project/src/draft-runs.ts`, `packages/project/test/{drafting.model,draft-settle,rehearse}.test.ts`, `apps/platform/src/workflows/draft-steps.ts`, `apps/platform/src/adapters/draft-runs-workflow.ts`, `apps/platform/test/workflows/draft.test.ts`; the `ai` binding, `DRAFT_MODEL` and `DRAFT_LIMIT` lines in `apps/platform/wrangler.jsonc` (then `bun run --cwd apps/platform types`) and their decode in `apps/platform/src/platform.ts`; the web's `apps/web/src/routes/$project/proposals/`, `apps/web/src/features/{propose,proposal}/`, `apps/web/src/client/{propose,proposal}.ts` and their tests; the `draftAsk` and `showProposal` handlers in `apps/platform/src/handlers.ts` and `apps/web/src/dev/handlers.ts`, and `proposeAsk`'s `draft` branch |257 | 1 | Today full-screen at a terminal, `myr today --tui` (`myr today` goes back to the contract's projected command, which prints the same) | `apps/cli/src/tui/`, `apps/cli/test/tui/`, the `@opentui/*` lines in `apps/cli/package.json`; `today` in `wrapped`, `entries` and `Every` in `apps/cli/src/surfaces.ts`, its row in `packages/agent-kit/src/command-doc.ts` and its word in `packages/agent-kit/test/command-doc.test.ts` |258 | 1 | Agent extras: the Markdown ask page, per-project well-known skills, and `myr schema` | `apps/web/src/features/ask/markdown.ts`, `apps/web/test/ask-markdown.test.ts`; `packages/agent-kit/src/well-known.ts`, `apps/platform/src/well-known.ts`, `apps/platform/test/well-known.test.ts`, `apps/web/src/routes/[.]well-known/agent-skills/$.ts`; `apps/cli/test/schema.test.ts` and the `schema` command in `apps/cli/src/surfaces.ts` |259+| 1 | The Agents page (the plugin bundles keep their MCP entries) | `packages/agent-kit/src/agent-setup.ts`, `packages/agent-kit/test/agent-setup.test.ts`, `packages/agent-kit/test/golden/agent-setup.txt`, `apps/web/src/routes/agents.tsx`, `apps/web/src/routes/agents[.]md.ts`, `apps/web/src/features/agents/setup-page.tsx`, `apps/web/test/agents.test.tsx`; the Agents entry in `NAV` and the footer's link in `apps/web/src/features/shared/layout.tsx`, with their cases in `apps/web/test/shared.test.tsx`, and the two routes' rows in `apps/web/test/routes.test.ts`. `agents` may stay reserved in `packages/protocol/src/ids.ts` |260+| 1 | `/llms-full.txt` and the banner atop each Markdown answer | `packages/agent-kit/src/full-llms.ts`, `packages/agent-kit/test/full-llms.test.ts`, `packages/agent-kit/test/golden/full-llms.txt`, `apps/web/src/routes/llms-full[.]txt.ts` and its cases in `apps/web/test/llms.test.ts`; `refusalCatalog` in `packages/agent-kit/src/refusals.ts`; `indexBanner` and the index's link to the file in `packages/agent-kit/src/host-doc.ts` (then regenerate `packages/agent-kit/test/golden/host-doc.txt`), the banner in `apps/web/src/features/ask/markdown.ts` with its cases in `apps/web/test/ask-markdown.test.ts`, the re-exports in `apps/web/src/features/agents/llms.ts`, and its row in `apps/web/test/routes.test.ts` |261 | 1 | The pi adapter | `apps/cli/src/pi.ts`, `apps/cli/test/pi.test.ts`, its entry and its `neverBundle` line in `apps/cli/tsdown.config.ts`, the pi dev dependency in `apps/cli/package.json`, and the adapter's line in the package manifest's `pi` key in `scripts/lib/release.ts` |262 | 2 | Why each line is there, on the web (the file toolbar's Why link goes) | `packages/git/src/blame.ts`, `packages/git/src/line-diff.ts` (with `tree-diff.ts` keeping its own diff), `packages/git/test/{blame,line-diff}.test.ts`, `packages/project/src/code/why.ts`, `packages/project/test/code-why.test.ts`, `whyOf` in `packages/project/src/code.ts`, the `why` contract's handlers, `apps/web/src/routes/$project/why/`, `apps/web/src/features/why/`, `apps/web/src/client/why.ts`, `apps/web/test/why.test.tsx`, `apps/web/e2e/why.e2e.ts` |263 | 2 | Code history kept across isolates (each isolate walks why and a file's history again, as it did before; nothing else changes) | `packages/project/src/code-store/binding.ts` and its R2 cases in `packages/project/test/code-store.test.ts`; the `CODE_CACHE` bucket in `apps/platform/wrangler.jsonc` (then `bun run --cwd apps/platform types`), its decode in `apps/platform/src/platform.ts`, its `CodeStoreR2` line in `apps/platform/src/ports.ts`, its line in `apps/platform/test/fake-env.ts` and its rows in `apps/platform/test/bindings.test.ts` and `apps/web/test/env.test-d.ts`; `codeCache` in `infra/stages.ts` and its rows in `packages/config/test/bootstrap.test.ts`. Going further, `packages/project/src/code-store.ts`, `packages/project/src/code-store/`, `packages/project/src/code/history.ts`, `packages/project/test/code-history.test.ts` and the store's `CodeStore` line in `apps/platform/src/surfaces.ts` go too, which edits `nearestKept` and its callers out of `packages/project/src/code/{why,log}.ts` |264 | 2 | A README rendered as Markdown (it shows as plain text instead) | `apps/web/src/features/markdown/`, `apps/web/test/markdown.test.tsx`, `apps/web/test/markdown-resolve.test.ts`, and the `react-markdown`, `remark-gfm`, `rehype-*` and `@tailwindcss/typography` lines in `apps/web/package.json` |115 unmodified lines