docs(intelligence): rewrite the SDK doc to shipped truth — observe + delivery lanes, fenced design tail#445
Merged
Conversation
…delivery lanes, fenced design tail
tangletools
previously approved these changes
Jul 2, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — d95b7c7d
This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: drewstone_author · 2026-07-02T22:16:44Z
…-current-truth # Conflicts: # docs/README.md
tangletools
approved these changes
Jul 2, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ Auto-approved drewstone PR — f1d5e2c5
This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.
tangletools · auto-approval · reason: drewstone_author · 2026-07-02T22:31:13Z
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.
What
Rewrites
docs/intelligence-sdk.md(238L wishlist labeled "target interface — wrapper not fully shipped") into a ~220L reference of what the/intelligencesubpath actually exports today.withTangleIntelligencesnippet — verified verbatim againstsrc/intelligence/index.ts— with the caveat thatrepo/checks/surfacesaredoctor()-readiness inputs only, plus the $0 offline run line.CertifiedArtifactcarries held-out gate lift, never a within-run claim).createIntelligenceClientsurface: config fields,traceRun/TraceHandle,recordTrace(nested OTLP viabuildLoopOtelSpans),doctor(),flush(), endpoint env resolution, the best-effort law, and the billing-split span attributes.pullCertified(typedPullOutcome, 404-is-normal, 10s timeout),createCertifiedPromptSource(5m refresh, coalesced, keep-last-known),composeCertifiedPrompt(byte-stable fold,promptFoldTypes),withCertifiedDelivery, and the capability resolver (composeCertifiedProfile/FromWire, injectedResolveCtx, admitted binding kinds,CapabilityNotAdmittedError, fail-closed drops + drift check).effort.tspresets;isIntelligenceOff, the clamp-on-export invariant,compileEffort, and the product-vs-experiment fail-closed distinction; the stale#268 EffortPolicypointer is gone.doctor(); "What is live today" grounds each rung in the two $0 offline examples.improve();doctor()PR readiness;improvementDriver/agenticGenerator/promotionGate).Companion edits:
docs/README.mdindex row updated;intelligence-sdk.mdadded to the freshness gate's curated set inscripts/check-docs-freshness.mjs, so every backticked symbol in the prose must now resolve to a real export (the fenced tail is skipped by design).Verification
pnpm run docs:check— OK, "prose symbols in 4 curated docs" (the doc is now gated and clean); generateddocs/apibyte-identical, no drift.pnpm run lint(362 files),pnpm run typecheck+typecheck:examples— clean.pnpm tsx examples/intelligence-drop-in/intelligence-drop-in.ts— exit 0, span read back withintelligence_usd = 0.pnpm tsx examples/intelligence-recommend/intelligence-recommend.ts— exit 0, trace → 2 findings → gated candidate shipped.withTangleIntelligence(index.ts),pullCertified(delivery.ts),composeCertifiedProfile(resolver.ts), effort presets (effort.ts),defaultRedactor(redact.ts).src/hits for the four unshipped verbs re-confirmed (they exist only in this doc's fence).