Skip to content

docs: 1.x ADRs — SDK split, instance surface, and messaging contract - #2109

Merged
ethanwinters merged 4 commits into
carbon-design-system:mainfrom
ethanwinters:adr-1x-sdk-instance-and-messaging
Aug 18, 2026
Merged

docs: 1.x ADRs — SDK split, instance surface, and messaging contract#2109
ethanwinters merged 4 commits into
carbon-design-system:mainfrom
ethanwinters:adr-1x-sdk-instance-and-messaging

Conversation

@ethanwinters

@ethanwinters ethanwinters commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Closes #2033
Closes #2034
Closes #2035
Closes #2036
Closes #2040
Closes #2080

Eight architecture decision records for the 1.x SDK and messaging work, merging as proposed. No code changes — docs/adr/ only.

Each record decides one thing and takes its own comment window, so an objection to one never blocks the rest. Together they cover the package split, what the instance surface becomes, how state is read, and what the send promise means.

Changelog

New

  • ADR-0002 — core, React wrapper, and headless SDK ship from one package
  • ADR-0003 — instance lifetime belongs to the acquire, not the host mount
  • ADR-0004 — chat state is read through per-field scoped stores
  • ADR-0005 — ChatInstance survives the split as the composition of both halves
  • ADR-0007 — both message-delivery APIs run on one store pipeline
  • ADR-0009 — every conversation verb is reached through instance.messaging
  • ADR-0023 — callbacks survive the split through a parameterized config
  • ADR-0025 — the SDK is acquired; lifecycle lives on the handle

Changed

  • docs/adr/README.md — index rows, regenerated by npm run sync:adrs

Testing / Reviewing

Suggested review order. The records cross-reference each other, so reading them by number is harder than this path:

  1. ADR-0002 — the strategic split: framework-agnostic core, React wrapper, and headless SDK from one package
  2. ADR-0025 — skim only, for orientation. Shows the assembled SDK surface, so the destination is clear before the steps to reach it
  3. ADR-0023 — callbacks survive the split unchanged through a parameterized config; names the two halves
  4. ADR-0005 — walks the instance member list and validates the partition assumption ADR-0002 rests on
  5. ADR-0004 — chat state moves to per-field scoped stores; deprecates getState()
  6. ADR-0009 — every conversation verb is reached through instance.messaging
  7. ADR-0007 — both message-delivery APIs run on one store pipeline
  8. ADR-0025 — full review, now that the sibling records are in hand
  9. ADR-0003 — instance lifetime belongs to the acquire, not the host mount

Comment on the record's own issue, not on this PR. Review comments stop being findable once a PR merges, which is the whole reason the venue is an issue. Each record has one:

Record Comment on
ADR-0002 #2110
ADR-0003 #2111
ADR-0004 #2112
ADR-0005 #2113
ADR-0007 #2114
ADR-0009 #2115
ADR-0023 #2116
ADR-0025 #2117

All eight windows close 2026-08-18 at the earliest. Silence is not agreement — nothing is accepted until a maintainer sets the status.

Gates:

npm run validate:adrs          # 0 errors
npx prettier --check docs/adr/*.md
npm run reading-level -- docs/adr/00*.md

Four records read above the 8–11 band: 0005 and 0007 at 11.1, 0023 at 11.3, 0025 at 11.0.

@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for carbon-ai-chat-components ready!

Name Link
🔨 Latest commit fbf9a42
🔍 Latest deploy log https://app.netlify.com/projects/carbon-ai-chat-components/deploys/6a7b33e53f3d6e0009ef50b1
😎 Deploy Preview https://deploy-preview-2109--carbon-ai-chat-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for ai-chat-components-react ready!

Name Link
🔨 Latest commit fbf9a42
🔍 Latest deploy log https://app.netlify.com/projects/ai-chat-components-react/deploys/6a7b33e5e9975e0008649a2d
😎 Deploy Preview https://deploy-preview-2109--ai-chat-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for carbon-ai-chat-demo ready!

Name Link
🔨 Latest commit fbf9a42
🔍 Latest deploy log https://app.netlify.com/projects/carbon-ai-chat-demo/deploys/6a7b33e5fe7e9b000830424f
😎 Deploy Preview https://deploy-preview-2109--carbon-ai-chat-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@davidmenendez davidmenendez 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.

content looks good to me! quick question: this should be in numerical order. not sure why it suddenly went from 2-3-4-5-7-9-23! is there a specific reason for this?

@ethanwinters

ethanwinters commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@davidmenendez made the mistake of assigning adr numbers in the issues and then had to break some of the adrs up into multiple adrs, meaning I got stuck with adding new issues at the end of the list. Going forward, won't assign numbers in the issues, but didn't want to unwind 20+ issues that reference each other now.

@ethanwinters
ethanwinters force-pushed the adr-1x-sdk-instance-and-messaging branch from a338feb to 99c9db6 Compare August 11, 2026 12:01
Seven related ADRs. Suggested review order:

1. ADR-0002 — the strategic split: framework-agnostic core, React wrapper,
   and headless SDK all ship from one package
2. ADR-0025 — deep review this last, but skim for orientation now; shows the assembled SDK surface so
   the shape of the destination is clear before reading the steps to get there
3. ADR-0023 — callbacks survive the split unchanged through a parameterized
   config; names the two halves
4. ADR-0005 — walks the instance member list and validates the partition
   assumption ADR-0002 rests on
5. ADR-0004 — chat state moves to per-field scoped stores; deprecates getState()
6. ADR-0009 — every conversation verb is reached through instance.messaging
7. ADR-0007 — both message-delivery APIs run on one store pipeline
8. ADR-0025 — full review now that the sibling records are in hand
9. ADR-0003 — instance lifetime belongs to the acquire, not the host mount
Fills the discussion field on all eight records now that the tracking
issues exist. validate:adrs goes green: a proposed record needs a
comment venue, and each one now points at its own.
Rejected option C argued that a surviving getState() would be permanent
because no release after 2.0.0 takes breaking changes. No 3.0.0 is
scheduled, but none is ruled out either. The argument holds on the
weaker premise: the next major has no date, so the deprecated getter
names no removal release and the two read models coexist indefinitely.
@ethanwinters
ethanwinters force-pushed the adr-1x-sdk-instance-and-messaging branch from 9dea3d0 to fbf9a42 Compare August 11, 2026 14:38
@ethanwinters
ethanwinters enabled auto-merge August 11, 2026 17:41
@ethanwinters
ethanwinters added this pull request to the merge queue Aug 18, 2026
Merged via the queue into carbon-design-system:main with commit 376b8e4 Aug 18, 2026
28 checks passed
@ethanwinters
ethanwinters deleted the adr-1x-sdk-instance-and-messaging branch August 18, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment