Skip to content
Myr

Correct the playbooks where they disagree with the spec or the code

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

- add-operation gains a first step that pins the new contract in packages/protocol/test/contracts.test.ts and its example payload and success in test/contract-examples.ts (both from W2, issue 215), red by an assertion naming the tag; the old bullet pointed contract examples at test/examples.ts, which holds refusal examples and ids. - add-operation: a write is Idempotent when a replay converges, by a RequestId or by its nature (spec 3.2 marks claim, release and fork idempotent without one), not only when it takes a RequestId. - add-operation: Audience "decider" and Visibility "maintainers" only document; the logic refuses NotDecider and the handler leaves the fields out (spec 3.1). MCP filters by Surfaces from W2 (215), the CLI reads Cli and Surfaces from W4; cross-project reads come from the front-page projection (W3). - add-port cited RepoHost.push's doc comment for "not atomic"; push has none, RefOutcome's comment says it. - add-check-kind names the domain round-trip test (domain.test.ts, W2) and marks the gate's defaultMarkers in markers.ts as W4 (402), not W2. - add-refusal's render step gains its done-when, so every step ends on one as the provenance row says. - Tests: none; Markdown only. bun run fix and bun run verify pass.

authored by oscabriel · committed by oscabriel · parent c7961d3 · Browse files · 4 files+27 added−20 removed
This commit

State

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

Diff stats

4 files+27 added−20 removed

  • other:+27 added−20 removed

4 files+27 added−20 removed

modified:.agents/skills/add-check-kind/SKILL.md+5 added-5 removed
modified:.agents/skills/add-operation/SKILL.md+19 added-14 removed
modified:.agents/skills/add-port/SKILL.md+1 added-1 removed
23 unmodified lines
24- `export class <Port> extends Context.Service<<Port>, { readonly <op>: (…) => Effect.Effect<A, E> }>()("<pkg>/<Port>") {}`;25- its errors as `Schema.TaggedError` classes beside it, named for what went wrong in the job (`RepoNotFound`, `HostBusy`). Map the vendor's errors to them inside each adapter;26- its values as Schemas or branded types, so a caller needs no vendor package to use it.2728Keep the operations few and named for what callers need. Say in each doc comment what is idempotent and what is not atomic, as `RepoHost.push` does.28Keep the operations few and named for what callers need. Say in a doc comment what is idempotent and what is not atomic, as `RefOutcome` says a `RepoHost.push` is never atomic across refs.2930Done when the port file imports no adapter.3132## 3. Write the contract suite, one case at a time
39 unmodified lines
modified:.agents/skills/add-refusal/SKILL.md+2 added
39 unmodified lines
40## 4. Render it4142Add its reason to `reason` in `packages/protocol/src/render.ts`: a lowercase clause, shown on git's `remote:` lines, in the CLI and in MCP text. `protocol/render` is the one renderer, and `Match.typeTags` makes typecheck name a missing reason.4344Done when `bun run typecheck` inside `packages/protocol` passes.4546## 5. Add its example4748Add one instance to `examples` in `packages/protocol/test/examples.ts`, in union order. The round-trip, render and group tests then cover it.49
27 unmodified lines