diff --git a/.fleet/goals/sdk-examples.md b/.fleet/goals/sdk-examples.md new file mode 100644 index 0000000..4b96e0c --- /dev/null +++ b/.fleet/goals/sdk-examples.md @@ -0,0 +1,61 @@ +--- +milestone: "3" +--- + +## Add Practical Jules TypeScript SDK Examples + +Add practical examples of using the Jules TypeScript SDK to the Jules TypeScript SDK documentation. + + +## File Structure + +This repository is a monorepo, the Jules TypeScript SDK is located in the `packages/core` directory. The examples are stored in the `packages/core/examples` directory. The examples should be organized into subdirectories based on the feature or integration they demonstrate. + +``` +packages/core/examples/ +├── basic-session/ +│ ├── README.md +│ └── index.ts +├── advanced-session/ +│ ├── README.md +│ └── index.ts +├── agent/ +│ ├── README.md +│ └── index.ts +├── webhook/ +│ ├── README.md +│ └── index.ts +└── github-actions/ + ├── README.md + └── index.ts +``` + +## Prioritization +1. Isolated and well documented use of the core Jules SDK API exposed from the `import { jules } from '@google/jules-sdk'`. Demonstrate the APIs for sessions, activities, sources, their configurations, and use cases such as pagination, streaming, and error handling. +1. Demonstrate how to use the SDK to create and manage AI agents and workflows. +1. Integrations with major frameworks such as but not limited to Next.js, AI SDK, Hono, Express, Cloudflare Workers. +1. Event driven workflows through common event sources such as but not limited to webhooks, file system events, cron jobs, and database triggers. +1. Creating a custom MCP server that helps a coding agent create a highly detailed plan that provides instructions such as reference implementation, build and test commands, and other verification checks that is used as the prompt to create a new Jules session. +1. Using a service's webhook to trigger a Jules session. +1. Using the Jules SDK with GitHub Actions to automate workflows from event based triggers and scheduled events. +1. Using Jules with common context sources such as but not limited to Google Docs and Google Sheets. Thinking of creative and practical cases such as using Jules to: + - Create sessions from multiple rows tracked in a Google Sheet + - Create a session from the contents of a Google Doc + - Update a Google Sheet based on the results of a session +1. Using Jules with Stitch to integrate Stitch's AI generated designs into a website. +1. Using Jules' session GitPatch to review and analyze the code generated by Jules against the context of the GitHub repository code. +1. Using Jules' session GitPatch to determine if the code generated by Jules stuck to the original prompt's goals and the code adhered to the repository's coding standards and best practices. +1. Using Jules' session and activity GitPatch data to analyze how to improve or automate the code in the GitHub repository. +1. Using Jules on a scheduled GitHub Action cron job to analyze the repository for Agent Skills that can created to improve automation of common or complex tasks in the repository: https://agentskills.io/specification.md +1. Using Jules' GitPatch data download and patch the code locally in a new branch on the user's machine. +1. Using the Jules SDK to create custom MCP servers. +1. Using the Jules SDK to create customn CLI tools. + +## Steps + +1. Inventory the current examples in the `packages/core/examples` directory and identify gaps in the examples based on the prioritization below. +2. Identify the gaps in the examples based on the prioritization section. +3. Create a new example for each gap identified in the previous step. +4. Verify that the sample builds and runs as expected using the build tools provided by the framework (e.g. `bun run build`, `bun run test`, `npm run build`, `npm run test`, `next build`, `next dev`, `tsc`, etc.). +5. Update the documentation in `packages/core/examples//README.md` to document the example and how to run it. +6. Add a link to the new example in the `packages/core/README.md` file in the examples section. diff --git a/package-lock.json b/package-lock.json index f0afa90..8d5bd78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6177,7 +6177,7 @@ }, "packages/fleet": { "name": "@google/jules-fleet", - "version": "0.0.1-experimental.25", + "version": "0.0.1-experimental.30", "license": "Apache-2.0", "dependencies": { "@clack/prompts": "^1.0.1", diff --git a/packages/fleet/package.json b/packages/fleet/package.json index 37cb3b2..3aad56e 100644 --- a/packages/fleet/package.json +++ b/packages/fleet/package.json @@ -1,6 +1,6 @@ { "name": "@google/jules-fleet", - "version": "0.0.1-experimental.30", + "version": "0.0.1-experimental.31", "type": "module", "description": "Fleet orchestration tools for Jules — analyze, dispatch, merge, init, configure", "repository": {