Skip to content

feat(prompt): include auto-generated tscircuit docs in createLocalCircuitPrompt#68

Open
dukunline-cyber wants to merge 1 commit into
tscircuit:mainfrom
dukunline-cyber:feat/45-include-generated-docs
Open

feat(prompt): include auto-generated tscircuit docs in createLocalCircuitPrompt#68
dukunline-cyber wants to merge 1 commit into
tscircuit:mainfrom
dukunline-cyber:feat/45-include-generated-docs

Conversation

@dukunline-cyber
Copy link
Copy Markdown

@dukunline-cyber dukunline-cyber commented May 16, 2026

/claim #45

Closes #45.

Summary

Wires the auto-generated tscircuit docs feed (https://docs.tscircuit.com/ai.txt) into createLocalCircuitPrompt so the local circuit benchmark prompt stays in sync with the published docs surface area.

Changes

  • Fetch https://docs.tscircuit.com/ai.txt via the existing fetchFileContent helper.
  • Wrap the fetch in try/catch and fall back to an empty string. If the docs feed is unreachable (offline, 5xx, network blip) the prompt still builds, just without the auto-docs section. This keeps benchmark runs deterministic and resilient.
  • Inject a ## Auto-generated tscircuit docs section near the top of the prompt template, just above the existing ## tscircuit API overview section. The section is omitted entirely if the fetch returned nothing, so we never emit an empty header.

Diff size

16 lines added, 1 changed. Single file: lib/prompt-templates/create-local-circuit-prompt.ts.

Verification

  • The fetch reuses the same helper already used for COMPONENT_TYPES.md, so behavior on success/failure is consistent with existing code.
  • Empty fallback path tested mentally: autoGeneratedDocs = "" -> autoGeneratedDocsSection = "" -> template renders identically to before.

…cuitPrompt

Closes tscircuit#45. Fetches https://docs.tscircuit.com/ai.txt and embeds it as a new top-level section in the local circuit prompt. Wrapped in try/catch with empty-string fallback so a fetch failure (offline, 5xx) does not break prompt generation.
@dukunline-cyber
Copy link
Copy Markdown
Author

/claim #45

@dukunline-cyber
Copy link
Copy Markdown
Author

Hi, friendly ping — is there anything I should update on this PR? Let me know if you need changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use the new auto generated docs in the system prompt

1 participant