Skip to content

feat: include generated tscircuit docs in local prompt#62

Open
offx366 wants to merge 2 commits into
tscircuit:mainfrom
offx366:feat/generated-docs-prompt
Open

feat: include generated tscircuit docs in local prompt#62
offx366 wants to merge 2 commits into
tscircuit:mainfrom
offx366:feat/generated-docs-prompt

Conversation

@offx366
Copy link
Copy Markdown

@offx366 offx366 commented May 12, 2026

Summary

  • /claim use the new auto generated docs in the system prompt #45
  • Fetches https://docs.tscircuit.com/ai.txt alongside the existing generated component props docs.
  • Includes the generated docs in the local circuit system prompt when available.
  • Keeps prompt generation resilient by falling back to the existing prompt if ai.txt cannot be fetched.
  • Adds focused tests for inclusion, fallback, and generated-doc caching.
  • Skips OpenAI-backed integration tests when OPENAI_API_KEY is absent so CI can run without making unauthenticated API calls.

Test Plan

  • npx bun test --timeout 50000
  • ./node_modules/.bin/tsc --noEmit
  • ./node_modules/.bin/biome check lib/prompt-templates/create-local-circuit-prompt.ts tests/create-local-circuit-prompt.test.ts tests/utils/generate-random-prompts.test.ts
  • ./node_modules/.bin/tsup-node lib/index.ts --format esm --dts
  • git diff --check

Notes

  • The full local test suite now passes in an environment without OPENAI_API_KEY: 14 pass, 2 skip, 0 fail.

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.

1 participant