jb-beansloop

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

JB Beans Loop

JB Beans Loop

Use this skill to run a beans-driven Ralph-style loop when working in a beans-enabled repo and running an anthropic model.
当在支持Beans的仓库中工作并运行anthropic模型时,使用此skill来运行由Beans驱动的Ralp风格循环。

Scope and Activation

适用范围与激活条件

Use this skill only when BOTH are true:
  • The repo is beans-enabled (
    .beans.yml
    exists)
  • beans
    cli exists
Ignore this skill when:
  • .beans.yml
    is missing.
  • beans
    cli is missing.
If a user request conflicts with beans usage (for example: asks to skip bean creation), ask for confirmation before proceeding.
仅当以下两个条件同时满足时,才可使用此skill:
  • 仓库支持Beans(存在
    .beans.yml
    文件)
  • beans
    CLI工具已存在
在以下情况忽略此skill:
  • 缺少
    .beans.yml
    文件
  • 缺少
    beans
    CLI工具
如果用户的请求与Beans的使用冲突(例如:要求跳过Bean创建),请在继续操作前请求确认。

Next Issue Mode (Automatic)

下一个任务模式(自动)

When you need a new issue to work on select the next most important bean via the beans skill and based on your own judgement.
This mode should run unattended for as long as possible (overnight-friendly). If a bean is blocked, select another unblocked bean instead of stopping. Only stop when all remaining beans are either completed or blocked.
Query for actionable beans (exclude completed, scrapped, and draft).
bash
beans query '{ beans(filter: { excludeStatus: ["completed", "scrapped", "draft"], isBlocked: false }) { id title status type priority } }'
Evaluate the "most important" bean based on the following criteria:
  1. Dependency between beans (you cannot work on a bean that depends on another bean that is not completed)
  2. Priority (critical, high, normal, low, deferred)
  3. Urgency (time-sensitive or bug)
  4. Recency (most recently updated)
  5. Tiebreaker: highest priority, then most recent updatedAt
After you found an issue to work on, mark it as
in-progress
and start working on it until the acceptance criteria are met. If you can't finish the current bean because you encounter an unresolveable issue, mark the current bean as
blocked
and link the follow-up bug/ticket.
当你需要处理新任务时,通过Beans skill并结合自身判断,选择优先级最高的Bean。
此模式应尽可能长时间无人值守运行(支持夜间运行)。如果某个Bean被阻塞,请选择另一个未被阻塞的Bean,而非停止运行。仅当所有剩余Bean已完成或被阻塞时才停止。
查询可处理的Bean(排除已完成、已废弃和草稿状态的Bean)。
bash
beans query '{ beans(filter: { excludeStatus: ["completed", "scrapped", "draft"] }) { id title status type priority } }'
根据以下标准评估“优先级最高”的Bean:
  1. Bean之间的依赖关系(你无法处理依赖于未完成Bean的Bean)
  2. 优先级(critical、high、normal、low、deferred)
  3. 紧急程度(时间敏感或bug修复)
  4. 更新时间(最近更新的优先)
  5. 平局决胜规则:先看优先级,再看最近更新时间
找到要处理的任务后,将其标记为
in-progress
(进行中),并开始处理直到满足验收标准。 如果因遇到无法解决的问题而无法完成当前Bean,请将其标记为
blocked
(已阻塞)并关联后续的bug/工单。

Next Issue Mode (Manual)

下一个任务模式(手动)

If the user says:
  • next issue
  • next bean
  • next beans
  • next ticket
    trigger the "Next Issue Mode (Automatic)" but DON'T run a loop in this case!
Rules:
  • ONLY work on that one issue to completion
  • Ask the user to review changes and finish.
  • Do not commit automatically.
  • If the user approves, use the
    committer
    skill to commit and push.
如果用户说:
  • next issue
  • next bean
  • next beans
  • next ticket
    触发“下一个任务模式(自动)”,但在此情况下不要运行循环!
规则:
  • 仅处理该单个任务直至完成
  • 请求用户审核更改并收尾
  • 不要自动提交
  • 如果用户批准, 使用
    committer
    skill进行提交和推送。

Default Ralp-Loop Prompt

默认Ralp循环提示

  • Start by using Next Issue Mode to select the next bean.
  • Work on ONLY one bean at a time.
  • Track all work in beans. Never use todo lists.
  • Keep the loop unattended as long as possible; avoid unnecessary prompts.
  • If you discover new work, create a new bean instead of expanding scope.
  • If you can't finish the current bean because you encounter an unresolveable issue, mark it as
    blocked
    and link the follow-up bug. Then run "Next Issue Mode (Automatic)" again.
  • Update bean checklists as you complete each item.
  • When the bean is complete, run "Pre-Completion Verification" then mark it done in beans.
  • 首先使用“下一个任务模式”选择下一个Bean。
  • 一次仅处理一个Bean。
  • 所有工作都在Beans中跟踪,切勿使用待办事项列表。
  • 尽可能让循环无人值守运行;避免不必要的提示。
  • 如果发现新工作,创建一个新的Bean而非扩大当前任务范围。
  • 如果因遇到无法解决的问题而无法完成当前Bean, 将其标记为
    blocked
    并关联后续的bug。 然后再次运行“下一个任务模式(自动)”。
  • 完成每个检查项后更新Bean的检查清单。
  • 当Bean完成后,运行“完成前验证”,然后在Beans中将其标记为已完成。

Pre-Completion Verification

完成前验证

Before marking any bean as completed, ensure the app still works:
  1. Build: Run the build command if the project has one (
    npm run build
    ,
    bun run build
    , etc.)
  2. Lint/Typecheck: Run linting and type checking (
    npm run lint
    ,
    tsc --noEmit
    , etc.)
  3. Tests: Run the test suite if available (
    npm run test
    ,
    bun run test
    , etc.)
  4. Manual Verification: Visually or functionally verify your changes work as expected
  5. GitHub Actions (after commit/push): Check the pipeline for errors
If any step fails:
  • Find and fix the issue before marking the bean complete
  • Do NOT mark the bean complete with broken code
  • If you cannot resolve the issue, mark the bean as blocked and create a follow-up bug
Note on statuses: beans only supports status values listed in the repo config (draft, todo, in-progress, completed, scrapped). Use tags or a short note in the bean body for labels like
blocked
,
broken
, or
ai verified
unless your repo defines those as valid statuses.
在将任何Bean标记为已完成前,确保应用仍能正常运行:
  1. 构建:如果项目有构建命令,则运行它(如
    npm run build
    bun run build
    等)
  2. 代码检查/类型校验:运行代码检查和类型校验(如
    npm run lint
    tsc --noEmit
    等)
  3. 测试:如果有测试套件则运行它(如
    npm run test
    bun run test
    等)
  4. 手动验证:从视觉或功能上验证你的更改符合预期
  5. GitHub Actions(提交/推送后):检查流水线是否有错误
如果任何步骤失败:
  • 在将Bean标记为已完成前找到并修复问题
  • 不要将存在代码问题的Bean标记为已完成
  • 如果无法解决问题,将Bean标记为blocked并创建一个后续的bug工单
状态说明:Beans仅支持仓库配置中列出的状态值(draft、todo、in-progress、completed、scrapped)。除非你的仓库将
blocked
broken
ai verified
定义为有效状态,否则请使用标签或Bean正文中的简短注释来标记这些状态。

Browser Integration Test Loop

浏览器集成测试循环

Use the
jb-browser-testing
skill for all browser verification.
  • Start by using "Next Issue Mode (Automatic)" to select the next "done" bean for testing.
  • Test every bean marked as done, acting like a user would.
  • Confirm the correct browser tab before testing (match port number and page heading).
  • If the test succeeds:
    • Record the result in the bean body.
    • Mark the bean as
      ai verified at <timestamp>
      .
  • If the test fails:
    • Create a new bug bean describing the failure.
    • Mark the original bean as
      broken
      and link the follow-up bug.
  • Stop when every "done" bean is either
    ai verified
    or
    broken
    .
Recommended result format in the bean body:
md
undefined
所有浏览器验证都使用
jb-browser-testing
skill。
  • 首先使用“下一个任务模式(自动)”选择下一个标记为“done”的Bean进行测试。
  • 像用户一样测试每个标记为done的Bean。
  • 测试前确认正确的浏览器标签页(匹配端口号和页面标题)。
  • 如果测试成功:
    • 在Bean正文中记录结果。
    • 将Bean标记为
      ai verified at <timestamp>
  • 如果测试失败:
    • 创建一个新的bug Bean描述失败情况。
    • 将原始Bean标记为
      broken
      并关联后续的bug工单。
  • 当所有“done”状态的Bean都被标记为
    ai verified
    broken
    时停止。
推荐在Bean正文中记录结果的格式:
md
undefined

AI Verification

AI Verification

  • Result: passed | failed
  • Timestamp: <timestamp>
  • Notes: <short summary>
undefined
  • Result: passed | failed
  • Timestamp: <timestamp>
  • Notes: <short summary>
undefined

Beans CLI Quick Reference

Beans CLI快速参考

bash
undefined
bash
undefined

Get active beans

Get active beans

beans query '{ beans(filter: { excludeStatus: ["completed", "scrapped", "draft"] }) { id title status type priority } }'
beans query '{ beans(filter: { excludeStatus: ["completed", "scrapped", "draft"] }) { id title status type priority } }'

Read a bean

Read a bean

beans query '{ bean(id: "<id>") { title status type body } }'
beans query '{ bean(id: "<id>") { title status type body } }'

Create a bean

Create a bean

beans create "Title" -t task -d "Description" -s todo
beans create "Title" -t task -d "Description" -s todo

Update status

Update status

beans update <id> --status completed
undefined
beans update <id> --status completed
undefined