diff --git a/AGENTS.md b/AGENTS.md index a2d3fb645..1bcf3a380 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ ## Overview -Ralph is an autonomous AI agent loop that runs Amp repeatedly until all PRD items are complete. Each iteration is a fresh Amp instance with clean context. +Ralph-tabnine is an autonomous AI agent loop that runs Tabnine CLI repeatedly until all PRD items are complete. Each iteration is a fresh Tabnine CLI instance with clean context. ## Commands @@ -19,8 +19,8 @@ cd flowchart && npm run build ## Key Files -- `ralph.sh` - The bash loop that spawns fresh Amp instances -- `prompt.md` - Instructions given to each Amp instance +- `ralph.sh` - The bash loop that spawns fresh Tabnine CLI instances +- `prompt.md` - Instructions given to each Tabnine CLI instance - `prd.json.example` - Example PRD format - `flowchart/` - Interactive React Flow diagram explaining how Ralph works @@ -37,7 +37,7 @@ npm run dev ## Patterns -- Each iteration spawns a fresh Amp instance with clean context +- Each iteration spawns a fresh Tabnine CLI instance with clean context - Memory persists via git history, `progress.txt`, and `prd.json` - Stories should be small enough to complete in one context window - Always update AGENTS.md with discovered patterns for future iterations diff --git a/README.md b/README.md index 67d98d16a..9fe30c8a2 100644 --- a/README.md +++ b/README.md @@ -2,21 +2,21 @@  -Ralph is an autonomous AI agent loop that runs [Amp](https://ampcode.com) repeatedly until all PRD items are complete. Each iteration is a fresh Amp instance with clean context. Memory persists via git history, `progress.txt`, and `prd.json`. +Ralph is an autonomous AI agent loop that runs [Tabnine CLI](https://github.com/codota/tabnine-cli/) repeatedly until all PRD items are complete. Each iteration is a fresh Tabnine CLI instance with clean context. Memory persists via git history, `progress.txt`, and `prd.json`. -Based on [Geoffrey Huntley's Ralph pattern](https://ghuntley.com/ralph/). +Tabnine CLI is a Gemini-based AI coding assistant that provides similar capabilities to Anthropic's Claude. -[Read my in-depth article on how I use Ralph](https://x.com/ryancarson/status/2008548371712135632) +Based on [Geoffrey Huntley's Ralph pattern](https://ghuntley.com/ralph/). ## Prerequisites -- [Amp CLI](https://ampcode.com) installed and authenticated +- [Tabnine CLI](https://github.com/codota/tabnine-cli/) installed and authenticated - `jq` installed (`brew install jq` on macOS) - A git repository for your project ## Setup -### Option 1: Copy to your project +### Copy to your project Copy the ralph files into your project: @@ -28,46 +28,17 @@ cp /path/to/ralph/prompt.md scripts/ralph/ chmod +x scripts/ralph/ralph.sh ``` -### Option 2: Install skills globally - -Copy the skills to your Amp config for use across all projects: - -```bash -cp -r skills/prd ~/.config/amp/skills/ -cp -r skills/ralph ~/.config/amp/skills/ -``` - -### Configure Amp auto-handoff (recommended) - -Add to `~/.config/amp/settings.json`: - -```json -{ - "amp.experimental.autoHandoff": { "context": 90 } -} -``` - -This enables automatic handoff when context fills up, allowing Ralph to handle large stories that exceed a single context window. - ## Workflow ### 1. Create a PRD -Use the PRD skill to generate a detailed requirements document: +Create a detailed requirements document manually or with assistance from Tabnine CLI. See `skills/prd/SKILL.md` for guidelines on creating effective PRDs. -``` -Load the prd skill and create a PRD for [your feature description] -``` - -Answer the clarifying questions. The skill saves output to `tasks/prd-[feature-name].md`. +Save the PRD as `tasks/prd-[feature-name].md`. ### 2. Convert PRD to Ralph format -Use the Ralph skill to convert the markdown PRD to JSON: - -``` -Load the ralph skill and convert tasks/prd-[feature-name].md to prd.json -``` +Convert the markdown PRD to JSON format using the guidelines in `skills/ralph/SKILL.md`. You can ask Tabnine CLI to help with this conversion. This creates `prd.json` with user stories structured for autonomous execution. @@ -93,13 +64,13 @@ Ralph will: | File | Purpose | |------|---------| -| `ralph.sh` | The bash loop that spawns fresh Amp instances | -| `prompt.md` | Instructions given to each Amp instance | +| `ralph.sh` | The bash loop that spawns fresh Tabnine CLI instances | +| `prompt.md` | Instructions given to each Tabnine CLI instance | | `prd.json` | User stories with `passes` status (the task list) | | `prd.json.example` | Example PRD format for reference | | `progress.txt` | Append-only learnings for future iterations | -| `skills/prd/` | Skill for generating PRDs | -| `skills/ralph/` | Skill for converting PRDs to JSON | +| `skills/prd/` | Guidelines for creating PRDs | +| `skills/ralph/` | Guidelines for converting PRDs to JSON | | `flowchart/` | Interactive visualization of how Ralph works | ## Flowchart @@ -120,7 +91,7 @@ npm run dev ### Each Iteration = Fresh Context -Each iteration spawns a **new Amp instance** with clean context. The only memory between iterations is: +Each iteration spawns a **new Tabnine CLI instance** with clean context. The only memory between iterations is: - Git history (commits from previous iterations) - `progress.txt` (learnings and context) - `prd.json` (which stories are done) @@ -142,7 +113,7 @@ Too big (split these): ### AGENTS.md Updates Are Critical -After each iteration, Ralph updates the relevant `AGENTS.md` files with learnings. This is key because Amp automatically reads these files, so future iterations (and future human developers) benefit from discovered patterns, gotchas, and conventions. +After each iteration, Ralph updates the relevant `AGENTS.md` files with learnings. These files provide context for future iterations and human developers about discovered patterns, gotchas, and conventions. Examples of what to add to AGENTS.md: - Patterns discovered ("this codebase uses X for Y") @@ -158,7 +129,7 @@ Ralph only works if there are feedback loops: ### Browser Verification for UI Stories -Frontend stories must include "Verify in browser using dev-browser skill" in acceptance criteria. Ralph will use the dev-browser skill to navigate to the page, interact with the UI, and confirm changes work. +Frontend stories should include manual browser verification in acceptance criteria. After Ralph implements UI changes, verify the changes work as expected in the browser. ### Stop Condition @@ -193,4 +164,4 @@ Ralph automatically archives previous runs when you start a new feature (differe ## References - [Geoffrey Huntley's Ralph article](https://ghuntley.com/ralph/) -- [Amp documentation](https://ampcode.com/manual) +- [Tabnine CLI](https://github.com/codota/tabnine-cli/) diff --git a/flowchart/README.md b/flowchart/README.md index d2e77611f..272fb8dd2 100644 --- a/flowchart/README.md +++ b/flowchart/README.md @@ -1,73 +1,20 @@ -# React + TypeScript + Vite +# Ralph Flowchart -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +Interactive visualization showing how Ralph works with Tabnine CLI. -Currently, two official plugins are available: +Built with React Flow for presentations - click through to reveal each step with animations. -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh +## Development -## React Compiler - -The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules: - -```js -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - - // Remove tseslint.configs.recommended and replace with this - tseslint.configs.recommendedTypeChecked, - // Alternatively, use this for stricter rules - tseslint.configs.strictTypeChecked, - // Optionally, add this for stylistic rules - tseslint.configs.stylisticTypeChecked, - - // Other configs... - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) +```bash +npm install +npm run dev ``` -You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules: +## Build -```js -// eslint.config.js -import reactX from 'eslint-plugin-react-x' -import reactDom from 'eslint-plugin-react-dom' - -export default defineConfig([ - globalIgnores(['dist']), - { - files: ['**/*.{ts,tsx}'], - extends: [ - // Other configs... - // Enable lint rules for React - reactX.configs['recommended-typescript'], - // Enable lint rules for React DOM - reactDom.configs.recommended, - ], - languageOptions: { - parserOptions: { - project: ['./tsconfig.node.json', './tsconfig.app.json'], - tsconfigRootDir: import.meta.dirname, - }, - // other options... - }, - }, -]) +```bash +npm run build ``` + +The build output goes to `dist/` and is deployed to GitHub Pages. \ No newline at end of file diff --git a/flowchart/index.html b/flowchart/index.html index 32eada16e..351cd02a2 100644 --- a/flowchart/index.html +++ b/flowchart/index.html @@ -4,7 +4,7 @@ -
Autonomous AI agent loop for completing PRDs