beads: add search_beads.sh, update skill docs
This commit is contained in:
parent
39b49e83ce
commit
4c3f3b69a2
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
# capabilities: beads
|
||||
# description: Search beads by id, title, or description content
|
||||
# Usage: search_beads.sh <mount> <query>
|
||||
set -euo pipefail
|
||||
|
||||
if cat /etc/shadow >/dev/null 2>&1; then
|
||||
echo "Error: This script must be run via execute_code tool" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "usage: search_beads.sh <mount> <query>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mount="$1"
|
||||
query="$2"
|
||||
|
||||
9p read "agent/beads/$mount/search/$query" 2>/dev/null | jq '[.[] | {id, title, status, match_in: (if .id | test("'"$query"'"; "i") then "id" elif .title | test("'"$query"'"; "i") then "title" else "description" end)}]' || echo "[]"
|
||||
|
|
@ -38,20 +38,29 @@ Tool: execute_code
|
|||
tool: list_mounts.sh
|
||||
```
|
||||
|
||||
List ready beads:
|
||||
List ready beads (open, unblocked):
|
||||
```
|
||||
Tool: execute_code
|
||||
tool: list_ready_beads.sh
|
||||
args: ["<mount>"]
|
||||
```
|
||||
|
||||
List all beads:
|
||||
List all open beads (excludes closed):
|
||||
```
|
||||
Tool: execute_code
|
||||
tool: list_beads.sh
|
||||
args: ["<mount>"]
|
||||
```
|
||||
|
||||
Search beads (includes closed):
|
||||
```
|
||||
Tool: execute_code
|
||||
tool: search_beads.sh
|
||||
args: ["<mount>", "<query>"]
|
||||
```
|
||||
|
||||
**Note:** `list_beads.sh` and `list_ready_beads.sh` only return open beads. To find closed beads, use `search_beads.sh`.
|
||||
|
||||
Read bead JSON:
|
||||
```
|
||||
Tool: execute_code
|
||||
|
|
@ -62,8 +71,8 @@ args: ["<mount>", "<id>", "json"]
|
|||
Read bead comments:
|
||||
```
|
||||
Tool: execute_code
|
||||
tool: read_bead.sh
|
||||
args: ["<mount>", "<id>", "comments"]
|
||||
tool: read_bead_comments.sh
|
||||
args: ["<mount>", "<id>"]
|
||||
```
|
||||
|
||||
**IMPORTANT:** When working on a bead, always check `comment_count` in the JSON output. If > 0, read comments for additional context, decisions, or blockers.
|
||||
|
|
|
|||
Reference in New Issue