Skip to content

docs: redraw the context map, retire the origin ADRs, wipe self-hosting - #90

Merged
allisonmahmood merged 2 commits into
mainfrom
docs/port-cleanup
Aug 29, 2026
Merged

allisonmahmood merged 2 commits into
mainfrom
docs/port-cleanup

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

Problem

After the Effect v4 port the domain docs still described packages that no longer exist, ADR-0000/0001 still read as the repo's framing, and the repo carried the artefacts of an operator-run instance: a self-hosting guide, docker-save and server-image verifiers (the docker CI job has been red since #87 because the verifier checks the deleted JSON-driver contract), and self-host pointers in the README, skills and issue templates. Patchy Cloud is the only deployment.

Solution

  • CONTEXT-MAP.md redrawn: contexts Auth, Patches, Serving, Publishing; shared kernel core; infrastructure api, sql, content-store, analytics, limits, apps/server (wiring only); the relationships from the port spec. docs/agents/domain.md follows it.
  • ADR-0000 and ADR-0001 superseded by ADR-0002/0003/0004 with the port map (Effect v4 port map #54) as the record.
  • Self-hosting wiped: docs/SELF_HOSTING.md, scripts/validate-docker-save-artifact.{mjs,test.mjs}, scripts/verify-server-image.sh, the docker turbo task, the test:docker-save / test:server-image / docker root scripts, the CI docker job and every self-host pointer. grep -ri self-host is clean. apps/server/Dockerfile and its docker package script stay: they build the Patchy Cloud image and nothing self-hosting-specific is left in them.
  • .agents/skills/patchy-mint-token rewritten for the Patchy Cloud operator (patch vocabulary, current routes).
  • triage-labels.md and labeler.yml name the same area:server packages; AGENTS.md ## Effect drops the port-in-progress wording (RC-bump section stays).

Stacked on #89 (feat/cli-effect).

Closes #79

Built by Claude Fable 5 via Claude Code.

@github-actions github-actions Bot added area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area size:l 501-1,000 changed lines labels Aug 29, 2026

@allisonmahmood allisonmahmood left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two-axis review of feat/cli-effect...docs/port-cleanup (26be75c…5e32804), against issue 79. Extra passes on implementation method and YAGNI, as requested.

Standards

Verified against the three-dot diff. Conventional commit title is fine. The CONTEXT-MAP.md / docs/agents/domain.md redraw, ADR-0000/0001 Superseded notes, and the self-host file/CI deletions match YAGNI and “update those docs when the product changes.”

Hard (documented standards)

AGENTS.md Domain docs pointer — writing-for-agents (always-loaded pointers must stay relevant); AGENTS.md “current facts instead of abandoned intentions.” This PR rewrites ## Effect in the same always-loaded file and redraws the map to Auth / Patches / Serving / Publishing, but the pointer is unchanged:

pointing at one CONTEXT.md per context (hosting server, CLI publisher)

Hosting is now infrastructure in CONTEXT-MAP.md. Agents load the old two-context model every turn.

skills/patchy/SKILL.md (edited) + references/onboarding.md (unedited, still pointed at) — same current-facts / pruning-relevance rules. The hunk only drops the SELF_HOSTING.md link. Live copy still says there is no hosted instance and keeps the own-instance path:

- There is no hosted or official instance, and no instance to fall back on: ...
## Publishing to the user's own instance
Take this path whenever the instance is one the user or their operator runs, ...

onboarding.md still: “Pages go to a Patchy Cloud instance someone runs: the user's own server…”, “What's the address of your Patchy Cloud server?”, pages.greenfield.internal. Operator auth set is still a real branch; the framing is the abandoned self-host product.

packages/cli/CONTEXT.md — docs/agents/domain.md “use the term as defined”; current facts. The added draft/patch sentence is right. Instance is not:

There is no hosted instance and no official one

That contradicts CONTEXT-MAP.md (“Patchy Cloud is one deployment”) and the README line this PR added. CLI URL resolution still has no baked-in origin; the glossary sentence is the product claim, not the resolver.

Judgement (baseline / writing-for-agents)

  • Duplicated Code / single source of truth: AGENTS.md “Packages by capability” now says CONTEXT-MAP.md is the map, then restates the package list in always-loaded context. .github/labeler.yml comment duplicates docs/agents/triage-labels.md (change both together).
  • Sediment: ADR-0000/0001 keep full PatchPage / private-instance bodies after a retirement italic. Status Superseded is the ADR convention; domain.md still says read ADRs that touch the area.
  • Negation: README “there is no guide to running an instance of your own” after the positive sentence already landed.
  • Mysterious Name: “own-instance path” after the wipe.
  • Shotgun surgery: ~27 files — expected for a wipe, not a smell here.

No Effect-service or served-UI standards apply. render.test.ts is a fixture hostname only.

Spec

Issue 79 intent: domain docs describe the ported system; operator-run-instance artefacts are gone; Patchy Cloud is the only deployment.

Naming: Issue listed context cli; the map names it Publishing at packages/cli. Faithful — that was already the context name (issue 56); the edge is still Publishing → api.

(a) Missing or partial

Self-host wording in the skill. Spec: *“self-host wording in skills/patchy/SKILL.md and packages/cli/README.md”* and intent *“operator-run-instance artefacts should be gone; Patchy Cloud is the only deployment.”* The README dropped the SELF_HOSTING.mdlink. The skill only dropped that link. It still has “There is no hosted or official instance” and **“Publishing to the user's own instance”**.skills/patchy/references/onboarding.md` still tells agents pages go to “the user's own server.”

ADR-0001 supersession. Spec: “Retire ADR-0000 and ADR-0001 with superseded-by notes pointing at the Postgres-only, api contract and CLI contract ADRs.” ADR-0000 points at 0002/0003/0004. ADR-0001 points only at 0003 and 0004. Both cite #54.

docs/DEVELOPMENT.md was already pre-port-clean on the base (no ## Effect, no “pre-port packages” sentence). The AGENTS.md Effect rewrite and RC-bump keep match the ticket.

grep -ri self-host is clean. CONTEXT.md files exist; apps/server/CONTEXT.md is wiring-only; area:server matches in triage-labels and labeler; mint-token is operator-framed. The wipe list did not ask to delete apps/server/Dockerfile; keeping it (and the package docker script) as the Patchy Cloud image is in bounds.

(b) Scope creep

Little. Extra work is scrubbing “self-hoster” in ADR-0001’s historical body and renaming fixture hosts so the grep Done-when passes. Spec asked for superseded-by notes, not a body rewrite. examples/plan.html / render.test.ts / skills-lock.json are that same Done-when, not new product.

(c) Done, but wrong

Publishing Instance still describes a multi-operator world. Spec: the domain docs should describe the ported system. packages/cli/CONTEXT.md still says “There is no hosted instance and no official one.” That fights “Patchy Cloud is the only deployment.” Hosting packages use patch consistently; CLI draft is documented as the user word — that split is fine.

The map/ADRs/#54/labels/AGENTS.md Effect rewrite match the checklist. The miss is the model: agents are still taught to publish to someone else’s instance.

Method

Verdict: sound with caveats.

Deletion was the right tool. docs/SELF_HOSTING.md (716 lines) still taught JSON-driver, Fastify, and “your own instance.” The docker-save/image verifiers and the CI docker job were checking a contract the port deleted (red since #87). Rewriting that kit would have preserved a product the ticket retired. Net +123 −2,825: no replacement guide, no new CI, no new ADR files.

Superseding ADRs with notes, bodies intact, was the right ADR method. Issue 79 asked for that, not a rewrite. Caveat: the bodies still speak as current (“private instances,” unread PATCHY_ALLOW_ANONYMOUS_UPLOADS). An agent that skips the retired italic will read dead product. That is the cost of the method, not a reason to delete the files.

Rewriting patchy-mint-token was the right call. Minting is not self-service only: POST /api/tokens, bootstrap, and admin revoke still exist. Deleting it would have dropped a live operator loop. The rewrite itself is mostly search-replace (draft → patch, drop SELF_HOSTING.md); the mint/revoke procedure is still the old ceremony.

Publishing vs cli is better, not drift. The issue listed packages; the map already named the CLI context Publishing. Demoting Hosting to infrastructure (wiring only) matches apps/server/CONTEXT.md. Areas stay area:cli for the Publishing context — two vocabularies, aligned in triage-labels.md.

The method stopped at the string self-host. The product frame in the shipped skill, onboarding reference, and Publishing glossary was not redrawn.

YAGNI

(a) Wins. The cut is real: docs/SELF_HOSTING.md, the docker-save/image verifiers (~1,900 lines), the CI docker job, turbo docker, and test:docker-save / test:server-image. Those were the operator-run product. apps/server/Dockerfile, its docker script, and OCI labels are Patchy Cloud’s own image, not a second product — correct keep. docs/agents/domain.md dropped the per-package tree and second context list; it now points at the map.

(b) Remaining complexity. The map added two kitchen-sink arrows (#79 named three: cli→api, serving→patches, patches→content-store). “Hosting → everything” and “Auth and Patches → SQL, Analytics, Limits” are wiring catalogs. Retired ADR-0001 is sediment: inherited + split-amended + retired notes stacked on PatchPage text that still says “a private instance is untouched,” and names upstream #90 (this PR’s number). .agents/skills/patchy-mint-token/SKILL.md is still ~265 lines of mint + moderation with pages.example.com and a 100-line bash ceremony.

(c) Beauty. Map opener is sharp (“one deployment… wire contract”). Context vs infrastructure is clearer than the old flat list. Relationship prose is muddy (semicolon piles). “Agent-operated” in plan.html is a slogan.


Summary: Standards: 3 hard + 4 judgement (worst: shipped skill / onboarding still teach a multi-operator world, and the always-loaded AGENTS.md pointer still says “hosting server, CLI publisher”). Spec: 3 findings (worst: issue 79’s “self-host wording in skills/patchy/SKILL.md” was treated as a link delete, not a product-frame rewrite).

allisonmahmood added a commit that referenced this pull request Aug 29, 2026
Review follow-ups on #90: the patchy skill, its onboarding reference and
the Publishing glossary no longer describe a world of operator-run
instances; the AGENTS.md domain-docs pointer names the redrawn map and
the package list it duplicated is gone; ADR-0001 also points at
ADR-0002; the map's wiring arrows are shorter.
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review triage, addressed in faf9a0a.

Fixed

  • AGENTS.md domain-docs pointer now names the redrawn map (contexts, shared kernel, infrastructure); the "Packages by capability" package list is gone — it duplicated CONTEXT-MAP.md in always-loaded context.
  • skills/patchy/SKILL.md, references/onboarding.md and the Publishing glossary (packages/cli/CONTEXT.md Instance) reframed around one deployment: pages go to Patchy Cloud or a checkout's pnpm dev instance; "the user's own instance" is now "publishing with an operator-issued token". The CLI still bakes in no address, and the docs say so rather than claiming there is no hosted instance.
  • ADR-0001 also names ADR-0002 as a successor (the mint/me/revoke wire shapes live there).
  • README's trailing negation dropped; the two catalog arrows in the map shortened.

Not changed, with reasons

Lint, typecheck, format and tests are green on the branch; the CI docker job is gone with this PR, so the stack's only red check resolves here.

allisonmahmood added a commit that referenced this pull request Aug 29, 2026
Review follow-ups on #90: the patchy skill, its onboarding reference and
the Publishing glossary no longer describe a world of operator-run
instances; the AGENTS.md domain-docs pointer names the redrawn map and
the package list it duplicated is gone; ADR-0001 also points at
ADR-0002; the map's wiring arrows are shorter.
Base automatically changed from feat/cli-effect to main August 29, 2026 23:27
Patchy Cloud is the only deployment. CONTEXT-MAP.md now names the four
contexts, the shared kernel and the infrastructure packages the port
produced; ADR-0000 and ADR-0001 are superseded by ADR-0002/0003/0004 with
the port map (#54) as the record; the self-hosting guide, the docker-save
and server-image verifiers, the docker turbo task and CI job, and every
self-host pointer are gone. The mint-token skill is rewritten for the
Patchy Cloud operator; triage-labels.md and labeler.yml say the same
thing about area:server; AGENTS.md's Effect section drops the
port-in-progress wording.
Review follow-ups on #90: the patchy skill, its onboarding reference and
the Publishing glossary no longer describe a world of operator-run
instances; the AGENTS.md domain-docs pointer names the redrawn map and
the package list it duplicated is gone; ADR-0001 also points at
ADR-0002; the map's wiring arrows are shorter.
@github-actions github-actions Bot added the area:server Touches the server area label Aug 29, 2026
@allisonmahmood
allisonmahmood merged commit fea8b07 into main Aug 29, 2026
6 checks passed
@allisonmahmood
allisonmahmood deleted the docs/port-cleanup branch August 29, 2026 23:30
This was referenced Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area area:server Touches the server area size:l 501-1,000 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: redraw the context map, retire the origin ADRs, wipe self-hosting

1 participant