Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/scripts/agent-instructions.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { buildFeedbackSection } from './agent-instructions.ts';

describe('buildFeedbackSection', () => {
it('prints the Expo feedback CLI command and curl fallback with the page URL', () => {
expect(buildFeedbackSection('/skills/')).toBe(`## Submitting Feedback

If you encounter errors, misleading or outdated information, report it so Expo can be improved:

Preferred command:
npx --yes submit-expo-feedback@latest --category docs --subject "/skills/" "<actionable feedback>"

Direct HTTP fallback:
curl -X POST https://api.expo.dev/v2/feedback/docs-send -H 'Content-Type: application/json' -d '{"url":"/skills/","feedback":"🤖 Agent feedback for docs: <specific, actionable description> (<model>, <harness>)"}'

Only submit when you have something specific and actionable to report. Try to give the most context.`);
});
});
14 changes: 8 additions & 6 deletions docs/scripts/agent-instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
* Agent feedback instructions appended into per-page .md files.
*
* Each page's generated markdown includes an <AgentInstructions> block (placed
* right after the frontmatter) telling LLM-based agents how to POST feedback to
* the existing /v2/feedback/docs-send endpoint. The `🤖 Agent feedback:` prefix
* inside the feedback string badges the Slack message in #docs-feedback-feed
* without requiring a backend change.
* right after the frontmatter) telling LLM-based agents how to submit feedback
* with the Expo feedback CLI or direct HTTP fallback.
*
* Intentionally isolated in its own module so the experiment can be tweaked or
* removed without touching the broader markdown generation utilities.
Expand All @@ -29,11 +27,15 @@ export function shouldAppendAgentInstructions(markdown: string): boolean {
export function buildFeedbackSection(pathname: string): string {
return `## Submitting Feedback

If this page contains errors, outdated information, or gaps that blocked you from completing a task, report it so the docs can be improved:
If you encounter errors, misleading or outdated information, report it so Expo can be improved:

Preferred command:
npx --yes submit-expo-feedback@latest --category docs --subject "${pathname}" "<actionable feedback>"

Direct HTTP fallback:
curl -X POST https://api.expo.dev/v2/feedback/docs-send -H 'Content-Type: application/json' -d '{"url":"${pathname}","feedback":"🤖 Agent feedback for docs: <specific, actionable description> (<model>, <harness>)"}'

Only submit when you have something specific and actionable to report. Replace <model> with the model you are running as and <harness> with the tool you are running in (for example, Claude Code, Cursor, Codex CLI).`;
Only submit when you have something specific and actionable to report. Try to give the most context.`;
}

export function wrapAgentInstructions(sections: string[]): string {
Expand Down
14 changes: 13 additions & 1 deletion docs/scripts/generate-llms/shared.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,19 @@ describe('stripAgentInstructions', () => {
'',
'## Submitting Feedback',
'',
'curl -X POST https://api.expo.dev/v2/feedback/docs-send',
'Preferred command:',
[
'npx --yes submit-expo-feedback@latest --category docs',
'--subject "/versions/latest/sdk/camera/"',
'"<actionable feedback>"',
].join(' '),
'',
'Direct HTTP fallback:',
[
'curl -X POST https://api.expo.dev/v2/feedback/docs-send',
"-H 'Content-Type: application/json'",
`-d '{"url":"/versions/latest/sdk/camera/","feedback":"🤖 Agent feedback for docs: <specific, actionable description> (<model>, <harness>)"}'`,
].join(' '),
'',
'## Navigation',
'',
Expand Down
1 change: 1 addition & 0 deletions packages/@expo/prebuild-config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

- Generated iOS projects now include a `SceneDelegate` and `UIApplicationSceneManifest` for the scene-based life cycle. ([#46734](https://github.com/expo/expo/pull/46734) by [@alanjhughes](https://github.com/alanjhughes))
- [iOS] Write the `RCTMetroPort` Info.plist key so bare dev builds resolve their own Metro port instead of defaulting to 8081. ([#48098](https://github.com/expo/expo/pull/48098) by [@alanjhughes](https://github.com/alanjhughes))
- [iOS] Keep the Xcode project in sync when the app icon switches between a Liquid Glass `.icon` package and a PNG icon. ([#46070](https://github.com/expo/expo/pull/46070) by [@debugtheworldbot](https://github.com/debugtheworldbot))

### 💡 Others

Expand Down
Loading
Loading