From eaec9fdcc7ec081a9519d0d3489a67610c593707 Mon Sep 17 00:00:00 2001 From: Joost van der Laan Date: Thu, 26 Feb 2026 19:56:06 +0000 Subject: [PATCH] Add loop.sh and PROMPT files for beads-loop workflow Add beads-loop runner script and prompt templates (build, plan, review) from the prompts repository for standardized AI-assisted development workflows. --- PROMPT_build.md | 26 ++++++++++++-------------- PROMPT_plan.md | 31 ++++++++++++++++--------------- PROMPT_review.md | 4 ++-- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/PROMPT_build.md b/PROMPT_build.md index 633bcc1..d6329e0 100644 --- a/PROMPT_build.md +++ b/PROMPT_build.md @@ -1,13 +1,11 @@ -0a. Run `bd ready --json --limit 1 --type task` to find the highest priority unblocked task. - If no tasks are found, try `bd ready --json --limit 1 --type bug` for bugs. - Never pick an epic directly — epics contain child tasks to work on instead. -0b. Run `bd show ` to read the full specification. -0c. For reference, each plugin lives in its own top-level directory (e.g. `productivity/`, `sales/`, `customer-support/`). See CLAUDE.md for the full repo structure. +0a. Run `br ready --json --limit 1` to find the highest priority unblocked task. +0b. Run `br show ` to read the full specification. +0c. For reference, the application source code is in `src/*`. 1. Your task is to implement the ready bead. Before making changes: - Search the codebase (don't assume not implemented) - - Run `bd show ` to get full acceptance criteria - - Update status: `bd update --status in_progress` + - Run `br show ` to get full acceptance criteria + - Update status: `br update --status in_progress` 2. Implement the functionality per the bead's description and acceptance criteria. Use up to 500 parallel subagents for searches/reads, 1 subagent for build/tests. @@ -17,16 +15,16 @@ If functionality is missing, add it per the specification. Ultrathink. 4. When you discover issues during implementation: - - Create a new bead: `bd create "discovered issue" -t bug -p ` - - Link it: `bd dep add --type discovered-from` + - Create a new bead: `br create "discovered issue" -t bug -p ` + - Link it: `br dep add --type discovered-from` 5. When tests pass: - - Close the bead: `bd close --reason "Implemented with tests"` - - Describe: `jj describe -m "feat: "` - - Push: `jj git push` - - Sync beads: `bd sync` + - Close the bead: `br close --reason "Implemented with tests"` + - Commit: `git add -A && git commit -m "feat: "` + - Push: `git push` + - Sync beads: `br sync` 99999. When you learn something about how to run the application, update @AGENTS.md. 999999. For any bugs noticed, create beads even if unrelated to current work. 9999999. Implement completely. Placeholders waste time redoing work. -99999999. Use `bd ready` at start of each loop to pick the most important unblocked task. +99999999. Use `br ready` at start of each loop to pick the most important unblocked task. diff --git a/PROMPT_plan.md b/PROMPT_plan.md index cbb5293..5087642 100644 --- a/PROMPT_plan.md +++ b/PROMPT_plan.md @@ -1,26 +1,27 @@ -0a. Run `bd list --json` to understand all issues in the project. -0b. Run `bd ready --json` to see what work has no blockers. -0c. Run `bd dep tree ` for each epic to understand the dependency graph. -0d. Study the plugin directory structure with subagents to understand shared patterns & conventions (see CLAUDE.md). +0a. Run `br list --json` to understand all issues in the project. +0b. Run `br ready --json` to see what work has no blockers. +0c. Run `br dep tree ` for each epic to understand the dependency graph. +0d. Study `src/lib/*` with subagents to understand shared utilities & components. 1. Analyze the beads database for gaps and issues: - - Run `bd list --status open --json` to get all open issues + - Run `br list --status open --json` to get all open issues - For each epic, verify child tasks cover all aspects of the specification - - Check for missing dependencies using `bd dep cycles` (should be empty) + - Check for missing dependencies using `br dep cycles` (should be empty) - Identify any tasks that should block others but don't 2. Update the beads database to fix any issues found: - - Create missing tasks with `bd create "title" -t task -p -d "description"` - - Add missing dependencies with `bd dep add --type blocks` - - Update priorities if needed with `bd update --priority <0-4>` - - Add labels for better organization with `bd label add ` + - Create missing tasks with `br create "title" -t task -p -d "description"` + - Add missing dependencies with `br dep add --type blocks` + - Update priorities if needed with `br update --priority <0-4>` + - Add labels for better organization with `br label add ` 3. Verify the plan is complete: - - `bd ready` should show the correct next task(s) - - `bd blocked` should show tasks waiting on dependencies - - `bd stats` should show accurate counts + - `br ready` should show the correct next task(s) + - `br blocked` should show tasks waiting on dependencies + - `br stats` should show accurate counts IMPORTANT: Plan only. Do NOT implement anything. Do NOT assume functionality is missing; -use `bd list` and code search to verify first. +use `br list` and code search to verify first. -ULTIMATE GOAL: Refactor all knowledge-work plugins from generic Anthropic templates to FashionUnited-specific workflows, tools, and domain context. Ensure all necessary tasks exist as beads with proper dependencies so `bd ready` always shows the right next work. +ULTIMATE GOAL: We want to achieve [project-specific goal]. Ensure all necessary tasks +exist as beads with proper dependencies so `br ready` always shows the right next work. diff --git a/PROMPT_review.md b/PROMPT_review.md index 7bb1f5e..3397d63 100644 --- a/PROMPT_review.md +++ b/PROMPT_review.md @@ -4,8 +4,8 @@ whether the work is ready to ship or needs revision. ## Instructions 1. Run `jj log -r 'ancestors(@, 5)'` and `jj diff -r @-` to see the latest changes. -2. Run `bd list --status in_progress --json` to see what task was being worked on. -3. Run `bd show ` for each in-progress task to understand the acceptance criteria. +2. Run `br list --status in_progress --json` to see what task was being worked on. +3. Run `br show ` for each in-progress task to understand the acceptance criteria. 4. Evaluate the changes against the acceptance criteria: - Does the implementation match the specification? - Are there obvious bugs, missing error handling, or logic errors?