Repository navigation
docs(server): canonicalize cross-specialism dispatch (DecisioningPlatform + holdco skill) - #1412
Merged
Merged
Conversation
…form + holdco skill) The `ctx.platform.<specialism>` accessor item from #1387 was a documentation gap, not a missing API — the canonical patterns (class instance + `this`, or closure capture for functional adopters) already work, they just weren't explicit anywhere an adopter would look. This adds: - A `### Cross-specialism dispatch` section to the `DecisioningPlatform` interface JSDoc (renders on IDE hover of the interface). Shows both patterns with code, calls out that in-process calls bypass wire-side validation / idempotency dedup / mutating-tool annotations. - `@see` JSDoc pointers on `campaignGovernance?:` and `brandRights?:` fields — the two symbols an adopter is most likely to hover when stuck on the canonical case. - Expanded `skills/build-holdco-agent/SKILL.md § Cross-specialism dispatch` section with both patterns, same-tenant invariant, single-specialism copy warning, and explicit "no runnable Pattern B example ships; Pattern A is canonical" note. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
ctx.platform.<specialism>accessor item from #1387 was a documentation gap, not a missing API — the canonical patterns (class instance + `this`, or closure capture for functional adopters) already work, they just weren't explicit anywhere an adopter would look.Changes
`src/lib/server/decisioning/platform.ts`
`skills/build-holdco-agent/SKILL.md`
`.changeset/cross-specialism-dispatch-docs.md` — patch.
Path-1 vs Path-2
`ctx.platform` as a typed accessor (Path 2) was considered. Rejected because:
If adopter feedback later signals docs aren't enough, Path 2 remains available — this PR doesn't lock anything out.
Expert review
//-style comment inside the interface body, which doesn't render on TS hover). Fixed in this PR: lifted to interface-level `/** */`, added `@see` on the two field declarations adopters will hover.Test plan
Tracking: #1387 (item: `ctx.platform.` accessor for cross-specialism dispatch).
🤖 Generated with Claude Code