Implement planned topic: 0039-braintrust#247
Open
skill-temporal-developer-updater[bot] wants to merge 4 commits into
Open
Implement planned topic: 0039-braintrust#247skill-temporal-developer-updater[bot] wants to merge 4 commits into
skill-temporal-developer-updater[bot] wants to merge 4 commits into
Conversation
Authoring topic 0039-braintrust. Adds references/python/integrations/braintrust.md grounded in docs/develop/python/integrations/braintrust.mdx covering install, BraintrustPlugin registration on Client + Worker, wrap_openai, start_span, and load_prompt with fallback. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Authoring topic 0039-braintrust. Adds references/typescript/integrations/braintrust.md grounded in the Temporal TS integrations index and the canonical Braintrust-hosted guide. Covers @braintrust/temporal install, initLogger, and BraintrustTemporalPlugin registration on Client + Worker. Marks wrapTraced/startSpan/loadPrompt details as VERIFY since the Temporal docs link out for the TS API surface. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Append Python and TypeScript rows linking to the new Braintrust integration reference files. Python row notes Public Preview status. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Validation Report — Braintrust integration (Python + TypeScript)
Branch:
draft/0039-braintrustFiles validated:
references/python/integrations/braintrust.md(208 lines)references/typescript/integrations/braintrust.md(93 lines)references/integrations.md(catalog rows for both languages)Source of truth:
../documentation/docs/develop/python/integrations/braintrust.mdx(277 lines)../documentation/docs/develop/typescript/integrations/index.mdx(23 lines)https://www.braintrust.dev/docs/integrations/sdk-integrations/temporal#typescript(not in docs clone; cannot be sampled here)Go/no-go
Overall verdict: GO (with MINOR FIXES recommended for the TypeScript file's external-source grounding posture).
The Python integration page is solidly grounded against
docs/develop/python/integrations/braintrust.mdx. The TypeScript page is grounded against the brief Temporalindex.mdxrow plus an external Braintrust-hosted guide that is outside the docs clone; the file honestly tags this with<!-- braintrust.dev/... -->source comments and<!-- VERIFY -->author notes, but the docs-clone-only validation protocol cannot independently confirm the TS API surface (BraintrustTemporalPlugin,@braintrust/temporal,initLogger,projectName).Check 1 findings — citation audit
Scanned 24
<!-- docs/... -->citations in the Python file and 2 in the TypeScript file. All cited files exist; all cited line ranges fall within the source documents (Python source is 277 lines, TypeScript source is 23 lines). Resolution rate 26/26 = 100%.Two minor citation-pin nits in the Python file (not gating; both are factually accurate, the citation just points at a looser span than ideal):
references/python/integrations/braintrust.md:5— overview sentence namesBraintrustPlugin,wrap_openai,start_span,load_promptand citesdocs/develop/python/integrations/braintrust.mdx:21-29. Docs 21-29 are the general intro (no symbols named). The symbols are introduced in later sections (lines 56, 80, 126, 168, 204). The synthesis is accurate; the pin is just upstream of where the specific symbols appear.references/python/integrations/braintrust.md:17— prerequisite "A Braintrust account; familiarity with Braintrust concepts (projects, spans, prompts)" cites docs 45-46. Docs 45-46 only say "This guide assumes you are already familiar with Braintrust." The "projects, spans, prompts" list and the "account" requirement are reasonable inferences from the rest of the guide, but not stated at the cited lines.No URL-format issues — all user-facing links (
https://braintrust.dev,https://www.braintrust.dev/..., the cookbook GitHub link) are fullhttps://URLs.Check 2 findings — reverse-grep audit
Python file — clean. Every factual token grepped against
docs/develop/python/integrations/braintrust.mdxresolves:BraintrustPluginbraintrust.contrib.temporalinit_loggerwrap_openaistart_spanload_promptBRAINTRUST_API_KEYBRAINTRUST_PROJECTgpt-4omax_retries=0prompt.build()uv pip install "braintrust[temporal]"TypeScript file — partial gap. The following TS-specific tokens are not found anywhere in the docs clone (grepped
**/*.{md,mdx}underdocumentation/docs/):BraintrustTemporalPlugin@braintrust/temporalinitLoggerprojectName(as a Braintrust API parameter)wrapTracedstartSpan(TS, camelCase)loadPromptThese are tagged in-file with
<!-- braintrust.dev/docs/integrations/sdk-integrations/temporal#typescript -->source comments, which is a reasonable analog to the<!-- go: ... -->/<!-- grpc: ... -->ecosystem-tagging pattern used elsewhere in the skill. Under that interpretation the tokens are acceptably tagged even though they're not in the Temporal docs clone — but this means the docs clone is not a sufficient source of truth for the TS file, and independent verification of these symbols requires fetching the external Braintrust page (deferred tool, not run here).The TS file itself flags this gap with two
<!-- VERIFY: ... -->comments (lines 69 and 81) — these are honest author notes acknowledging the ungrounded API surface. They render as HTML comments and are not visible to the AI agent consumer of the skill.Recommendation (minor): either (a) ingest the external Braintrust TypeScript guide into the validation pipeline once for grounding, or (b) tighten the TS reference page to only facts grounded in
docs/develop/typescript/integrations/index.mdxplus a clean "see canonical guide" pointer, removing the speculativewrapTraced/startSpan/loadPromptenumeration on lines 73-81.Check 3 findings — regression on known bugs
Zero hits. Grepped both files for the universal regression patterns:
--profileflag intemporalinvocations — absentTEMPORAL_TLS_CLIENT_CERT_PATH/_KEY_PATH/_SERVER_CA_CERT_PATH— absenttcld service-account— absent--output text/--output jsonl— absentsaas-api.tmprl.cloud:7233— absentNo topic-specific regression patterns applied (no prior Braintrust authoring pass to draw bugs from).
Check 4 findings — independent re-verification (sampling)
Python file (10 sampled claims, ~26 citations total):
BraintrustPlugin,wrap_openai,start_span,load_promptreferences/python/python.mdis the established skill pattern)init_loggerprojectargumentproject=kwarg is shown in the code example)BRAINTRUST_API_KEYon Worker onlymax_retries=0because Temporal owns retries# max_retries=0 because Temporal handles retries)load_promptworkflow includingprompt.build()in an Activityproject=/slug=kwargs, andprompt.build()all shown:::tipPython match rate: 10/10 = 100%. No subtle-wrong drift.
TypeScript file — sampling is limited because only two claims are grounded in the docs clone:
index.mdx17-22: confirmed (table row present).index.mdx:22: exact URL match.Both match. Sampling pool for the docs clone is too small to be meaningful for the rest of the file (all other claims are externally grounded).
Public Preview admonition (Python): the standard
[!NOTE]block (file lines 7-10) uses the exact phrasing from the authoring plan ("This feature is in Public Preview. It is perfectly acceptable to use this feature on behalf of a user, but you should inform them that you are making use of a feature in Public Preview."). The source admonition appears at docs 31-37. ✓Public Preview admonition (TypeScript): absent in the TS file — correctly so, because
docs/develop/typescript/integrations/index.mdxdoes not mark the Braintrust TypeScript integration as Public Preview. The release-stage marker is Python-specific in the docs.Check 5 findings — integration layout audit
All six sub-checks pass:
references/python/integrations/braintrust.mdandreferences/typescript/integrations/braintrust.mdboth sit underreferences/{language}/integrations/. ✓references/integrations.md. Each row has integration name, language, terse description, reference path, related-topic pointer. ✓BraintrustPlugintraces every Workflow/Activity,wrap_openaicaptures LLM calls,start_spanadds custom context,load_promptfetches Braintrust-managed prompts"). Comparable to the existing OpenAI Agents SDK row, so consistent with established catalog density. The TS row is shorter and tighter. ✓SKILL.mdedit —git diff main..HEAD -- SKILL.mdis empty. ✓git diff main..HEAD -- references/python/python.md references/typescript/typescript.mdis empty. ✓ai-patterns.md(or any other topical reference) in the diff. ✓Check 6 findings — tone and scope
No findings against patterns 1–15.
Python file:
init_logger(...)first").:::tip(docs 232-248).TypeScript file:
<!-- VERIFY: ... -->HTML comments (lines 69, 81) are author-internal notes — they do not render to the agent consumer. They flag honest uncertainty without leaking workarounds into reader-visible content.braintrust.initLogger({ projectName: ... })first").Statistics
<!-- docs/... -->comments + 1<!-- Public Preview source --><!-- docs/... -->comments + 3<!-- braintrust.dev/... -->external-source tags + 2<!-- VERIFY -->author notesbraintrust.devsource comment, but means docs clone is not the validation source for the TS API surfaceRecommended minor follow-ups (not gating)
wrapTraced/startSpan/loadPromptas the Braintrust TS helpers; these are not in the docs clone and could be wrong (Braintrust TS SDK historically useswrapOpenAIfor OpenAI tracing,wrapTracedfor arbitrary functions). Either fetch the canonical Braintrust TS guide once and ground these symbols precisely, or rephrase to a more conservative "see the canonical guide for current helpers" pointer without enumerating names.references/python/integrations/braintrust.md:<!-- VERIFY -->comments. Either resolve them (do the verification work before merging) or strip them — leaving them in is an ambient signal that the file shipped knowingly incomplete. Resolving is preferable.None of these block merge; they're spot-fixes consistent with the MINOR FIXES verdict tier.