Skip to content

docs: the rules stop asserting things that are no longer true - #1853

Merged
tato123 merged 1 commit into
mainfrom
docs/consumer-trees-are-not-awaiting-a-repo-move
Aug 12, 2026
Merged

docs: the rules stop asserting things that are no longer true#1853
tato123 merged 1 commit into
mainfrom
docs/consumer-trees-are-not-awaiting-a-repo-move

Conversation

@tato123

@tato123 tato123 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Three claims that a session reads as current fact and acts on. CLAUDE.md and the rule files load as instruction rather than as claims to verify — nothing prompts a session to check them, which makes a stale line there worse than a stale line in a doc. All three were caught by acting on them and hitting the wall.

1. The move

packages/ and examples/ were slated to move to tatolab/streamlib-packages (#1672). That ticket predates the Python-forward pivot, which superseded the intent — it closed having served its purpose, and the trees stay.

file said
CLAUDE.md:99 "These directories are moving to tatolab/streamlib-packages (#1672)"
docs/plan/OPERATING-MODEL.md:296 "Land #1672 — consumers out; kills the build coupling"
.claude/scripts/ship-change-removed-gate.sh:43 "moving out-of-repo (#1672)"
.claude/scripts/tests/ship-change-removed-gate.test.sh:190 same

I sequenced the consumer port behind that move before finding out it wasn't coming.

2. The reference

CLAUDE.md called the consumer trees reference material for parity — "how processors are actually written, which API surfaces real code exercises." True before the pivot, the opposite of true now: each is written against the deleted identity grammar, the deleted schema layer, streamlib.yaml manifests, and the package-as-distributable shape the wheel replaced.

A session reading packages/camera to learn how a processor is declared learns the model #1839 / #1840 / #1851 just finished deleting. What survives is logic, not form — you'd read packages/h264 to see how H.264 was wired to the RHI, never to see how to declare a processor.

3. The polyglot rule — deleted whole

Every bullet in .claude/rules/polyglot.md was dead or already owned elsewhere:

bullet disposition
hosting a processor in-interpreter is STOP-WORK placement.md owns it
Python is the sole focus runtime ARCHITECTURE.md §Language SDKs & parity
helper-process Vulkan is import-side only rhi.md's last bullet, verbatim
a schema edit runs cargo xtask generate-schemas the subcommand does not exist

The fourth is the one that would bite: generate-schemas died with the schema layer, so a session obeying the rule gets an error and has to work out why. Its five inbound links (subprocess-rhi-parity.md, adapter-authoring.md ×2, adapter-runtime-integration.md ×2) all cited it for the import-side carve-out and now point at rhi.md, where that constraint actually lives — four of them already listed rhi.md on the adjacent line.

polyglot-ipc-expert carried the same dead recipe. Replaced with what the tree does: the escalate wire types are hand-written serde structs in subprocess_escalate_wire_types/, the helper builds the same documents as plain Python dicts, so serde's encoding is the agreement between the halves, and escalate_wire_encoding_tests.rs holds the round-trip vectors. No codegen, no schema file.

Nothing is replaced with a new prediction.

Test plan

  • bash .claude/scripts/tests/ship-change-removed-gate.test.sh — 37/37 pass.
  • grep -rn "rules/polyglot" across the repo — no dangling references.
  • grep -rn "xtask generate-schemas" outside docs/plan/changes/archive/ — none.
  • Repo-wide sweep for streamlib-packages / out-of-repo / moving out across CLAUDE.md, .claude/ and docs/ — none.

Docs, rules and shell comments only — no code, no gate behaviour change.

Notes for owner

1. .claude/rules/flow.md says a session never edits the rules it is itself using. polyglot.md was loaded in this session (it is path-scoped to the wheel and ipc-types). Deleting it was your explicit instruction, so recording the exception rather than pretending the rule didn't apply.

2. Pre-existing rot I did not rewrite. docs/architecture/adapter-authoring.md:483+ describes making adapters reachable from "Python and Deno subprocesses" via streamlib-python-native / streamlib-deno-native cdylibs. Those cdylibs and the Deno SDK were deleted by #1715 — adapters are statically linked into the wheel now. I removed the dead link but left the passage: a correct rewrite needs the current adapter-distribution story, which is more than a link fix.

3. packages/escalate/schemas/*.yaml and packages/core/schemas/*.yaml have no reader. 9 YAML files describing the deleted schema layer. Left alone — packages/ edits are deny-ruled and their disposition isn't ruled yet.

4. The polyglot-ipc-expert agent keeps its name. Its subject — helper-process IPC, escalate ops, the parent↔helper bridge, iceoryx2 — is entirely live; only the word is stale. Renaming an agent is its own PR under flow.md.

5. One adjacent CLAUDE.md line untouched. It still says a broken consumer "is upgrade backlog for a later consumer-upgrade session run inside that consumer," which presumes an in-place fix. For packages/camera and packages/display it isn't — media-builtins already supersedes them and the wheel ships them as rt.add(CameraSource). Their disposition is deletion. Left alone because the per-package dispositions aren't ruled.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified that examples and consumer packages are reference material only and should not guide new implementations.
    • Updated rollout guidance and renumbered the remaining steps.
    • Removed outdated issue and migration references from related guidance and test comments.
    • Updated integration guidance to reflect current runtime and interoperability practices.
    • Removed obsolete guidance links and documented the current approach for cross-language message handling.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@tato123, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7afb6521-6052-4ea5-9642-d2a09bfd6525

📥 Commits

Reviewing files that changed from the base of the PR and between cae2e51 and 5cbe05e.

📒 Files selected for processing (1)
  • docs/architecture/adapter-authoring.md
📝 Walkthrough

Walkthrough

The change updates consumer-directory policy, removes an issue-based rollout step, removes the polyglot rules document, and aligns agent and architecture guidance with hand-written serde wire types and RHI references.

Changes

Operating Guidance Cleanup

Layer / File(s) Summary
Consumer policy and rollout
.claude/scripts/ship-change-removed-gate.sh, .claude/scripts/tests/ship-change-removed-gate.test.sh, CLAUDE.md, docs/plan/OPERATING-MODEL.md
Updated consumer exclusion comments and guidance. Removed the separate Land #1672`` rollout step and renumbered the remaining steps.
Polyglot IPC guidance
.claude/rules/polyglot.md, .claude/agents/polyglot-ipc-expert.md, .claude/agents/linux-media-expert.md
Removed the polyglot rules file. Updated IPC instructions to use hand-written Rust serde types, mirrored Python dictionaries, encoding vectors, and paired tests.
Architecture reference updates
docs/architecture/adapter-authoring.md, docs/architecture/adapter-runtime-integration.md, docs/architecture/subprocess-rhi-parity.md
Removed obsolete polyglot-rule references. Redirected import-side guidance to the RHI rule where applicable.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the removal of outdated documentation rules and references.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/consumer-trees-are-not-awaiting-a-repo-move

Comment @coderabbitai help to get the list of available commands.

@tato123
tato123 force-pushed the docs/consumer-trees-are-not-awaiting-a-repo-move branch from 60eacd6 to 6eaeeca Compare August 12, 2026 16:53
@tato123 tato123 changed the title docs: the consumer trees are not waiting on a repo move docs: the consumer trees are not waiting on a repo move, and are not the reference Aug 12, 2026
@tato123
tato123 force-pushed the docs/consumer-trees-are-not-awaiting-a-repo-move branch from 6eaeeca to cae2e51 Compare August 12, 2026 17:29
@tato123 tato123 changed the title docs: the consumer trees are not waiting on a repo move, and are not the reference docs: the rules stop asserting things that are no longer true Aug 12, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture/adapter-authoring.md`:
- Line 485: Update the adapter coverage requirements in the documentation
section containing “subprocesses” to reflect the current policy: new adapters
use helper processes in Python only, do not use Deno or polyglot subprocess
machinery, and use hand-written serialization without schemas or
packages/escalate/schemas/. Remove stale references to polyglot.md and
related-document guidance while preserving the surrounding coverage guidance.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b6c38621-97d4-40e4-bce2-b6ca74f192e6

📥 Commits

Reviewing files that changed from the base of the PR and between 6eaeeca and cae2e51.

📒 Files selected for processing (6)
  • .claude/agents/linux-media-expert.md
  • .claude/agents/polyglot-ipc-expert.md
  • .claude/rules/polyglot.md
  • docs/architecture/adapter-authoring.md
  • docs/architecture/adapter-runtime-integration.md
  • docs/architecture/subprocess-rhi-parity.md
💤 Files with no reviewable changes (2)
  • .claude/rules/polyglot.md
  • docs/architecture/subprocess-rhi-parity.md

Comment thread docs/architecture/adapter-authoring.md Outdated
Three claims a session reads as current fact and acts on. CLAUDE.md and the
rule files load as instruction rather than as claims to verify, so nothing
prompts a session to check them — a stale line there is worse than a stale
line in a doc.

**The move.** `packages/` and `examples/` were slated to move to
`tatolab/streamlib-packages` (#1672). That ticket predates the Python-forward
pivot, which superseded the intent — the owner closed it having done what they
wanted from it, and the trees stay. Four places still said otherwise, and I
sequenced the consumer port behind a move that is not coming.

**The reference.** CLAUDE.md called the consumer trees reference material for
parity — "how processors are actually written". True before the pivot, the
opposite of true now: each is written against the deleted identity grammar, the
deleted schema layer, `streamlib.yaml` manifests and the package-as-distributable
shape the wheel replaced. What survives in them is logic, not form — how a codec
was wired to the RHI, not how to declare a processor. The bullet now says that.

**The polyglot rule.** Deleted whole. Every bullet was dead or duplicated:
hosting-is-STOP-WORK is `placement.md`'s, Python-is-the-sole-runtime is
ARCHITECTURE's §Language SDKs & parity, and the helper-process Vulkan carve-out
is already `rhi.md`'s last bullet verbatim. The fourth — "a schema edit is
followed by `cargo xtask generate-schemas`" — names a subcommand that does not
exist; it died with the schema layer, so a session obeying the rule gets an
error and has to work out why. Its five inbound links repoint to `rhi.md`,
which is where the surviving constraint lives.

`polyglot-ipc-expert` carried the same dead recipe. Replaced with what the tree
actually does: the escalate wire types are hand-written serde structs in
`subprocess_escalate_wire_types/`, the helper builds the same documents as plain
Python dicts, so serde's encoding *is* the agreement, and
`escalate_wire_encoding_tests.rs` holds the vectors. No codegen, no schema file.

Nothing is replaced with a new prediction.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tato123

tato123 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator Author

Acted on the adapter-authoring.md finding — it was correct, and sharper than I gave it credit for in the PR notes.

The ## Polyglot coverage section is now removed, with a marker per .claude/rules/docs-policy.md ("outright deletion is allowed when content is provably wrong — leave a one-line marker saying what was removed and why"). Every artifact it named is deleted:

named state
streamlib-python-native / streamlib-deno-native cdylibs deleted with the plugin ABI (#1715)
sdk/streamlib-python/python/streamlib/adapters/ path does not exist — it is streamlib-python-wheel now, with no adapter mirror
packages/escalate/schemas/ deleted by #1854
"both Python AND Deno together (per polyglot.md)" Deno SDK deleted; polyglot.md deleted by this PR

That last row is why this belonged in this PR rather than a follow-up: line 502 read "per polyglot.md" without the rules/ prefix, so my sweep for rules/polyglot missed it and this PR was creating a dangling reference.

Not fixed, and deliberately: the rot is wider than that section. adapter-authoring.md carries 16 cdylib references across ## The single-pattern principle, ## Authoring checklist, ## Crate skeleton, ## Cross-process producer composition, ## Trip-wires and the Metal walkthrough — all written against the deleted plugin-ABI model. Rewriting those needs the current adapter-distribution story stated properly, which is a change of its own rather than a link fix, and unlike the section above none of it is made worse by this PR.

@tato123
tato123 force-pushed the docs/consumer-trees-are-not-awaiting-a-repo-move branch from cae2e51 to 5cbe05e Compare August 12, 2026 17:46
@tato123
tato123 merged commit 40b5bb1 into main Aug 12, 2026
15 checks passed
@tato123
tato123 deleted the docs/consumer-trees-are-not-awaiting-a-repo-move branch August 12, 2026 17:49
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