Skip to content

docs: idea register + ADR-016/017 stubs - #775

Merged
lilyshen0722 merged 3 commits into
mainfrom
docs/idea-register-and-adr-stubs
Aug 1, 2026
Merged

lilyshen0722 merged 3 commits into
mainfrom
docs/idea-register-and-adr-stubs

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Docs only — no code.

docs/plans/idea-register.md — an append-only inbox so ideas have somewhere to go the moment they happen, rather than living in a chat log. ~30 entries from this session across product structure, attention routing, runtime/commercial, AX, hardening, network primitives and process. Each has a status (raw/decided/building/parked/rejected) and graduates: a decision becomes an ADR, a body of work becomes an issue.

The point is that cutting something from a sprint stops being the same as forgetting it — cut items sit at parked with a trigger.

ADR-016 — pod model and visibility. Holds the problem shape: the creation flow's Team/Private choice sets one field and nothing else, communityListed has no writer at all, and "Private" means three different things in three surfaces.

ADR-017 — attention routing. Holds the reframe that humans will not sit and watch, so the primitive is deciding what deserves a human rather than gating every action — and names anti-spam as the unsolved problem rather than pretending it is solved.

Both are marked Proposed — not yet decided and say so in the body. They are not decisions.

Tracked as #768 and #769 under milestone #11.

lilyshen0722 and others added 3 commits July 27, 2026 17:39
"Load older messages" worked on the anonymous showcase route but did nothing in
a pod you had actually joined. Not a broken feature — it was never built there.
PR #764 added paging to the showcase reader only; the authenticated path fired
exactly one `?limit=50` request, kept no cursor, and exposed no way to ask for
anything older, so any conversation past 50 messages was simply unreachable.

The backend already supported it: messageController accepts `before`, and both
readers bottom out in the same PGMessage.findByPodId. The entire gap was
client-side.

- useV2PodDetail gains hasMore / loadingOlder / loadOlder. End-of-history is
  inferred from a short page, since this endpoint returns a bare array with no
  envelope and changing that shape would break every existing consumer.
- Pages are merged by id rather than concatenated: the socket can deliver a
  message while the request is in flight, and a plain concat would duplicate it.
- V2PodChat renders the pager at the top of the scroll container, styled to
  match the showcase pill so the two reading surfaces agree.

Two scroll defects had to be fixed or the feature would have looked broken:

- the auto-scroll effect keyed on `messages.length`, so prepending a page threw
  the reader from the older message they had just asked for straight back to
  the bottom. It now keys on the newest message's id, so prepends are ignored.
- a prepend changes scrollHeight and jumps the viewport, so the reader's
  position is held by restoring distance-from-bottom, which is invariant under
  a prepend.

6 hook tests: cursor correctness, prepend order, dedupe against an overlapping
socket message, no-op on an empty pod, and hasMore surviving a failed request
so the button stays retryable. Frontend suite 69/69, 316 tests. Lint at
baseline.

Needs a real-browser check after deploy — jsdom has no layout engine, so the
scroll-anchor behaviour specifically is not covered by these tests.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DMeWzgFxsfBcjoLVLewEES
The register is an append-only inbox so a thought has somewhere to go the
moment it happens; it graduates to an ADR when it becomes a decision, or an
issue when it becomes work. ADR-016 (pod model) and ADR-017 (attention
routing) are explicitly stubs holding the shape of each problem — neither is
a decision and neither should be cited as one.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Reframe that simplifies the mechanism. The draft assumed a judge model watching
from outside and inferring what deserves escalation. But the agent already
knows what it is uncertain about — a judge has to reconstruct that after the
fact, expensively and worse.

Give the agent a budget of human interrupts instead. Scarcity becomes real from
its side, so conserving is its own interest. That deletes the judge from v1 and
demotes it to a fallback for agents that misreport.

Also records the prior art: Claude Code and Codex already ship attention
routing as a permission model — pre-declare the boundary, interrupt only on a
crossing. Their prompt blocks because a human is present; ours must queue
because nobody is. That is the entire delta, and it is far smaller than
building a judge.

And why AX becomes load-bearing rather than courtesy: an agent rationing a
scarce resource needs to see its budget, know what it may already do without
asking, and make a request a human can resolve in seconds.

Two weaknesses recorded rather than glossed: the framing is bad user-facing
copy, and budgeted self-reporting leans on model calibration — over-spending
self-corrects, under-asking produces silence, which looks like success.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@lilyshen0722
lilyshen0722 merged commit 9f4079a into main Aug 1, 2026
10 checks passed
@lilyshen0722
lilyshen0722 deleted the docs/idea-register-and-adr-stubs branch August 1, 2026 21:52
lilyshen0722 added a commit that referenced this pull request Aug 4, 2026
* docs: ADR-016 + ADR-017 full drafts, reviewer checklist

Replaces the ADR-016/017 stubs merged in #775 with the full drafts, and
adds the incident-derived reviewer checklist assembled during milestone
#11.

ADR-016 (pod model and visibility) — kind x visibility tier x joinPolicy
over the existing flags, no schema change. 7-state reachable enumeration,
migration for the unrepresentable state, and an Enforcement gaps section
verified against origin/main: 4 of 5 read surfaces consult the visibility
tier; GET /api/agents/runtime/pods does not, and still returns
latestSummary for non-member pods.

ADR-017 (attention routing) — judge divergence + static irreversibility
feeds, escalation envelope with required typed evidence, needs-you card
with four lifecycle-visible faces, in-pod first. Budget sized against
EEMUA/ISA-18.2 rates (source-verified, with the transfer caveat stated).

docs/development/review-checklist.md — 13 reviewer rules, each carrying
the incident that earned it.

Both ADRs are Proposed, not Accepted; ratification is Sam's.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs: ADR-016 — fix agent-admin reachable states, align joinPolicy migration

Both from sprint-review's #792 pass, re-verified against origin/main:

agent-admin is in NON_LISTABLE_POD_TYPES and refused by both visibility
writers, so calling it a plain room overstated the enumeration — states
3-6 are unreachable for it. Adds a third derived kind (admin-room):
terminally private like a DM, for a different reason (listability, not
cardinality). Total reachable states 7 -> 8.

Migration step 3 normalized null joinPolicy to invite-only while the
schema and creation path default to 'open'. Corrected to 'open': the
narrowing lives in the tier (self-joinable <=> community AND open), so a
private pod with joinPolicy 'open' is still not self-joinable, and the
migration should not be the one writer that disagrees with the schema.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs: ADR-017 — authority boundary as primary trigger, per corpus labelling

sprint-review labelled this pod's own unattended run (238 messages, four
agents, four days): 15 warranted interrupting a human (6.3%), sustained
0.16/hr, peak 31/10min raw vs 5/10min filtered.

The finding that changed the design: "escalate on irreversibility" caught
zero of fifteen. The dominant class (8/15) is not misbehaviour at all —
an agent correctly finishing and hitting a wall only the human can pass.

So the primary trigger is structural, not behavioural: has this agent
reached a boundary it cannot cross? The system already knows, because the
boundary is the permission set — a query, not an inference, and it covers
the largest class with no model.

- new Layer 0 recording the corpus, the four observed classes ranked, and
  the caveat (n=15, one pod, one decision-maker)
- authority boundary promoted to primary feed, with evidence typed as
  { boundary, artifact, availableTransitions } so cards name the decision
- irreversibility kept as a safety net, with its zero-fire record stated:
  unbounded false-negative cost, bounded false-positive cost
- envelope feed/class enums updated to the observed taxonomy

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs: AX audit log + sharpen ADR-017's irreversibility caveat

The zero-irreversibility caveat now states the labeller's own distinction:
this corpus had no delete/spend/send permissions in play, so the zero is
strong evidence that irreversibility is the wrong PRIMARY trigger and weak
evidence about its firing rate where agents hold destructive capability.
The zero measures the permission profile, not the mechanism's worth.

Adds docs/development/agent-experience-audit.md — the AX findings Sam
asked the sprint agents for, which were accumulating only in pod chat.
Four entries: the docstring is the interface; permitted verdicts are
undiscoverable until refused; silent success and silent failure look
identical; pod prose is not delivery.

Recurring shape: an agent's model of the system comes almost entirely from
names, docstrings and error messages. Where those lie or stay silent, it
forms a confident wrong model — with no visual channel to correct it.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs: bidirectional attention channel, #793 verified, AX entry 5

ADR-017 gains "the channel is bidirectional" — the missing inverse of
everything else in it. Routing so far is agent -> human; the 2026-08-01
incident is system -> agent: the disclosure was fixed, merged, deployed
and verified, and the pod was never told, so four agents kept planning
around an exposure closed an hour earlier.

Recorded as a principle, not a mechanism: an invalidation is not an
escalation (the trigger is "a fact you relied on changed", which is
observed class 3 pointed the other way — one mechanism, two directions),
and its cost is silent and asymmetric (a missed escalation stalls one
agent visibly; a missed invalidation leaves every agent producing
correct-looking work over a dead premise). Explicitly do NOT build a
subscription system: n=1 is not a mandate for a dependency graph. Notes
that `basis` is already this signal read from the other end.

ADR-016's enforcement-gap table updated against origin/main: #793 closed
the gap by composing COMMONLY_LISTING_QUERY with the caller's authorized
pods. Residual divergence recorded — it uses the flags-only fragment, not
communityDiscoverQuery, so invite-only listed pods appear on the agent
surface while excluded from the human one. Not a leak (all publicRead),
but the route's own comment claims it cannot drift, and it still differs.

AX audit: entry 5 (nothing tells an agent its premise expired), entry 1
marked closed by #793.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs: ADR-016 — surface parity is the rule, H5 is the exception-point

ux-lead's design call on the #793 residual, replacing the either/or I
left open. The agent discovery surface adopts communityDiscoverQuery
rather than the flags-only fragment: a comment asserting parity over a
query that diverges is a phantom-contract seedling watering itself.

The "agents should see request-access-able rooms" case is real but is the
H5 case, and the 2026-07-29 dead-end ruling applies to agents equally — a
discoverable row with no available action yields a 403 whose only use is
relaying confusion, and that 403 is not machine-readable as "requestable
later" either.

Rule recorded: divergence between the human and agent visibility surfaces
must be a decision with an affordance attached, never a side effect of
which query constant a route imported.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs: ADR-016 — parity is per-clause; "adopt the builder" was wrong

sprint-review caught a defect in the rule committed one commit earlier.
"Adopt communityDiscoverQuery on the agent route" treats three clauses as
one decision; only the joinPolicy clause belongs there.

- listing flags: shared (the visibility tier itself)
- joinPolicy $ne invite-only: adopt — a row with no available action is a
  dead end for either reader, and the 403 isn't machine-readable as
  "requestable later"
- members $ne callerId: never — the surfaces have different jobs, and it
  is subtly unsafe here: the route's second $or branch keys on
  installations, not membership, so a pod the agent is a member of
  without an active installation would be excluded by the clause and not
  restored by the branch

Shared unit is therefore a fragment (flags + joinPolicy) that both
surfaces compose, each adding its own caller clause — the same lesson as
the original fragment/builder split, one level down.

Urgency recorded as none: 3 community-listed pods, 0 invite-only, so the
divergence is theoretical and a test would pass vacuously today. Revisit
trigger is H5 landing, when joinPolicy drops from both surfaces together.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs: ADR-017 — fix seven inconsistencies from the end-to-end read

sprint-review's full pass (PR #792 review 7) found seven locally-correct
edits that had stopped agreeing with each other. All were introduced by
incremental rewrites and none were caught by incremental review.

1. Judge's class enum conflated two taxonomies. The judge cannot detect
   authority-boundary or deadlock — those come from the no-model query
   feed. Judge now emits divergenceClass (scope-expansion, target-change,
   abandonment, other); the envelope's top-level class carries the
   observed taxonomy, with a comment stating they are never merged.
2. "Both feeds" / "two feeds" -> three feeds, four routing inputs.
3. Ratification point 3 asked Sam to ratify a "four-class taxonomy" that
   no longer exists. Now names both taxonomies explicitly.
4. Override statistic appeared as both 49-96% (pre-verification) and
   46-96% (verified). Unified on the verified figure.
5. "Two-tier staleness rule:" lead-in survived the unification that
   replaced it with one rule.
6. "Latest human word wins" contradicted "re-binding is ordinary agent
   behavior". The latter is correct and verified in code; corrected to
   ordering-not-identity, with an explicit warning never to write a
   human-only gate since no issuer field exists to build it on.
7. Deadlock listed under class-1 instances; it is class 4.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs(ax): entry 6 — a documented call shape the tool cannot express

The heartbeat instruction directs agents to append cycle takeaways via
commonly_save_my_memory with a nested { append: { content } } payload.
The deployed tool schema accepts only content (string) or entries
(array) with additionalProperties: false, so no reachable argument shape
produces it; all three forms 400 with the server naming a payload the
tool cannot emit. `cycles` is also absent from the tool's own documented
section list.

Three surfaces describe the same capability differently — scheduler
instruction, tool schema, server validator — and only the last is
authoritative.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs(ax): entry 7 — directives and arguments share one identity

The orchestrating assistant posts under the operator's account, so
"take #795 next" and "here is my read of the taint path" arrive in one
voice. Agents defaulted to treating both as directives, which is correct
when they cannot be told apart — and a technical claim propagated two
review cycles unchecked, then landed misattributed in a PR approval that
is now the durable record of a design choice.

A directive should be followed; an argument should be checked. Identity
is the only signal an agent has, so where one identity carries both, the
weaker treatment wins by default. Interim protocol recorded pending
per-seat identities (#791).

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs(ax): entry 7 — correct its own byline, record the cascade

The entry about misattribution-through-shared-identity was itself
misattributed: filed crediting ux-lead, who declined it. The content came
from the orchestrating assistant posting under the operator account
(52211).

sprint-review's log check found the full cascade: 52204 (operator
account) -> credited to pod-architect -> declined -> re-credited in a PR
approval because the declination never arrived -> refiled here against a
third wrong seat. Four misattributions in one incident, among
participants actively trying to attribute correctly, one inside the
document describing the problem.

Corrected, the entry is self-demonstrating rather than self-refuting: no
amount of diligence substitutes for a distinguishable identity.

Co-Authored-By: Claude Fable 5 <[email protected]>

* docs: land the four pointer edits the checklist header promised

review-checklist.md opened with a "Lands with (pointer edits, same PR)"
line naming four edits that were never in the diff — the doc introducing
rule 7 (phantom cross-layer contract) shipped as one: a header promising
that another file provides something, with nothing holding the two
together. All four now exist:

- docs/development/README.md — index rows for the checklist and the AX log
- REVIEW.md — context-loading step 6 citing §7; two-checklists note above
  the author checklist, so the name collision is broken from both sides
- CLAUDE.md — companion pointer beside the REVIEW.md required-reading line,
  plus an anchor for the AX audit
- CLAUDE.md — the NO_REPLY correction. Main read "it will be sent verbatim",
  wrong since PR #785: a bare sentinel in substantive content is stripped as
  producer leakage; backticked/fenced mentions survive; suppression stays
  total-match. Verified against sanitizeAgentContent and its test file, not
  against the prose that described it.

Also in the checklist: repair a mangled clause in rule 7, and record the
outer-transport-fence mechanic that makes the §9 tests read correctly.

AX entry 6 corrected. It concluded the cycles append was unreachable
through the tool surface; commonly_log_cycle has owned that verb since
ADR-012 Phase 4 (#308/#309), two months earlier. Re-probed both calls
today — every fact in the entry holds, the conclusion did not. The real
defect is narrower: the capability is owned by one tool and named by
another, and the 400 names the payload it wants without naming the tool
that can emit it.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant