Skip to content

feat: use generated AI docs in local circuit prompt#84

Open
LYL-8bit wants to merge 1 commit into
tscircuit:mainfrom
LYL-8bit:use-ai-docs-super-context
Open

feat: use generated AI docs in local circuit prompt#84
LYL-8bit wants to merge 1 commit into
tscircuit:mainfrom
LYL-8bit:use-ai-docs-super-context

Conversation

@LYL-8bit
Copy link
Copy Markdown

Summary

  • Switches the local circuit prompt from the older generated component props markdown to the auto-updating tscircuit AI docs super context at https://docs.tscircuit.com/ai.txt
  • Adds explicit prompt guidance that the fetched docs are auto-generated and should be preferred over stale hand-written notes
  • Keeps existing footprint/rules context intact

Validation

  • ./node_modules/.bin/tsc --noEmit
  • Verified https://docs.tscircuit.com/ai.txt returns HTTP 200 and the Repomix-generated docs payload

Closes #45

@LYL-8bit
Copy link
Copy Markdown
Author

CI note: the type-check workflow is green. The Bun Test workflow is failing because the fork/PR run has no OPENAI_API_KEY available (generateRandomPrompts gets OpenAI 401, and the coder integration test returns no generated VFS source). I only changed the local prompt template docs source, and verified locally with ./node_modules/.bin/tsc --noEmit.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a85688371f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The following context is fetched from ${TSCIRCUIT_AI_DOCS_URL}. It is auto-generated and kept up to date by the tscircuit docs site. Prefer this documentation over stale hand-written component notes when deciding which props, components, and patterns are supported.

${cleanedPropsDoc}
${cleanedTscircuitAiDocs}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bound AI docs payload before injecting into system prompt

This change replaces a narrowly scoped component-props doc with ai.txt, then injects the entire fetched payload into the system prompt without any size cap or section filtering. ai.txt is a repomix-style aggregate of many docs files, so prompt size can grow to the point that benchmark runs either fail with context-length errors or lose most of the response budget to background context instead of the user task. Please truncate and/or select only the component/props sections before interpolation.

Useful? React with 👍 / 👎.

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

Labels

None yet

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