Repository navigation
Surface integration-backed Kody guidance - #476
Conversation
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
📝 WalkthroughWalkthroughThis PR adds integration-bootstrap guidance throughout the Kody system: documentation pages teach the pattern, MCP tool and capability descriptions surface it to users, server instructions reinforce it, test fixtures support new guide variants, and verification tests validate the guidance is present everywhere it should be. ChangesIntegration Bootstrap Guidance Pattern
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🔎 Preview deployed: https://kody-pr-476.kentcdodds.workers.dev Worker: Mocks:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/worker/src/mcp/capabilities/coding/kody-official-guide.ts (1)
114-114: 💤 Low valueConsider breaking this long line for better readability.
Line 114 is approximately 700+ characters long, which makes the code difficult to read and edit. While the content is correct and comprehensive, breaking it into multiple shorter strings would improve maintainability.
♻️ Proposed refactor
- 'Load an official Kody guide from the kody GitHub repository (markdown). Prefer this capability plus `search` results over local repo spelunking when Kody auth or integration behavior is already documented. **For third-party integrations that will power a package, package app, or workflow, use `guide: "integration_bootstrap"` first.** It covers checking saved `integration` / `secret` entities and running the cheap authenticated smoke test before building. For non-OAuth APIs backed by saved secrets, then use `guide: "secret_backed_integration"` as the default recipe. After the smoke test passes and you are ready to build a package app, use `guide: "integration_backed_app"` for the default package-app pattern. For OAuth mechanics, then use `guide: "oauth"` (standard `/connect/oauth` path). Use `generated_ui_oauth` only for custom package-app OAuth. For API keys/PATs, use `connect_secret` for secret collection. For package-native long-lived service work built on `kody.services`, use `package_service_pattern`. If you are unsure, **call this capability** with the right `guide` instead of guessing.', + 'Load an official Kody guide from the kody GitHub repository (markdown). ' + + 'Prefer this capability plus `search` results over local repo spelunking when Kody auth or integration behavior is already documented. ' + + '**For third-party integrations that will power a package, package app, or workflow, use `guide: "integration_bootstrap"` first.** ' + + 'It covers checking saved `integration` / `secret` entities and running the cheap authenticated smoke test before building. ' + + 'For non-OAuth APIs backed by saved secrets, then use `guide: "secret_backed_integration"` as the default recipe. ' + + 'After the smoke test passes and you are ready to build a package app, use `guide: "integration_backed_app"` for the default package-app pattern. ' + + 'For OAuth mechanics, then use `guide: "oauth"` (standard `/connect/oauth` path). ' + + 'Use `generated_ui_oauth` only for custom package-app OAuth. ' + + 'For API keys/PATs, use `connect_secret` for secret collection. ' + + 'For package-native long-lived service work built on `kody.services`, use `package_service_pattern`. ' + + 'If you are unsure, **call this capability** with the right `guide` instead of guessing.',🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/worker/src/mcp/capabilities/coding/kody-official-guide.ts` at line 114, The long single-line description in kody-official-guide.ts should be broken into multiple shorter string segments for readability: locate the capability description string that starts with "Load an official Kody guide from the kody GitHub repository (markdown)..." and split it into concatenated pieces (either a template literal spanning multiple lines or multiple quoted strings joined with +) so each line stays under ~120 chars, preserving the exact wording, markdown emphasis (e.g., **bold**) and punctuation, and ensure the surrounding object/array (the capability entry) still has the trailing comma and formatting unchanged (update the variable or property where this string appears accordingly).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/worker/src/mcp/capabilities/coding/kody-official-guide.ts`:
- Line 114: The long single-line description in kody-official-guide.ts should be
broken into multiple shorter string segments for readability: locate the
capability description string that starts with "Load an official Kody guide from
the kody GitHub repository (markdown)..." and split it into concatenated pieces
(either a template literal spanning multiple lines or multiple quoted strings
joined with +) so each line stays under ~120 chars, preserving the exact
wording, markdown emphasis (e.g., **bold**) and punctuation, and ensure the
surrounding object/array (the capability entry) still has the trailing comma and
formatting unchanged (update the variable or property where this string appears
accordingly).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1545a861-d792-4145-9422-f65a3db8c8b3
📒 Files selected for processing (13)
docs/guides/integration-bootstrap.mddocs/use/first-steps.mddocs/use/packages.mddocs/use/search.mdpackages/worker/src/mcp/capabilities/capability-search.workers.test.tspackages/worker/src/mcp/capabilities/coding/kody-official-guide.node.test.tspackages/worker/src/mcp/capabilities/coding/kody-official-guide.tspackages/worker/src/mcp/server-instructions.node.test.tspackages/worker/src/mcp/server-instructions.tspackages/worker/src/mcp/tools/execute.node.test.tspackages/worker/src/mcp/tools/execute.tspackages/worker/src/mcp/tools/search-handler.node.test.tspackages/worker/src/mcp/tools/search.ts
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Summary
kody_official_guideguidance and user docs around integration bootstrap, smoke tests, and package apps.Testing
npx vitest run --config vitest.node.config.ts packages/worker/src/mcp/server-instructions.node.test.ts packages/worker/src/mcp/capabilities/coding/kody-official-guide.node.test.ts packages/worker/src/mcp/tools/search-handler.node.test.ts packages/worker/src/mcp/tools/execute.node.test.ts— 4 files / 16 tests passed.npx vitest run --config vitest.workers.config.ts packages/worker/src/mcp/capabilities/capability-search.workers.test.ts— 1 file / 7 tests passed.npx vitest run --config vitest.node.config.ts packages/worker/src/mcp/capabilities/coding/kody-official-guide.node.test.ts— 1 file / 3 tests passed.npm run validate— passed before and after the follow-up commit (format, lint, typecheck, unit, Playwright E2E, MCP E2E).PR status
Summary by CodeRabbit
Documentation
Improvements