Enhance beads issue prompts with skill hints, key files, and structured context. Prepares issues for workers ahead of time.
/plugin marketplace add GGPrompts/TabzChrome/plugin install conductor@tabz-chromeAnalyze beads issues and craft skill-aware enhanced prompts. Stores prepared prompts in issue notes for workers to use directly.
skills/engineering-prompts/scripts/lookahead-enhancer.sh in background during bd-swarm for automatic enhancementFor each ready issue:
1. Get issue details (title, description, labels)
2. Match skills using match-skills.sh
3. Find key files via quick grep
4. Build structured prompt
5. Store in issue notes as prepared.prompt
ISSUE_JSON=$(bd show "$ISSUE_ID" --json)
TITLE=$(echo "$ISSUE_JSON" | jq -r '.[0].title // ""')
DESC=$(echo "$ISSUE_JSON" | jq -r '.[0].description // ""')
LABELS=$(echo "$ISSUE_JSON" | jq -r '.[0].labels[]?' | tr '\n' ' ')
Use the central skill matching script (single source of truth):
MATCH_SCRIPT="${CLAUDE_PLUGIN_ROOT:-./plugins/conductor}/scripts/match-skills.sh"
# Returns keyword phrases that trigger skill-eval hook
SKILL_KEYWORDS=$($MATCH_SCRIPT --verify "$TITLE $DESC $LABELS" 2>/dev/null | tr '\n' ' ')
Key mappings (see match-skills.sh for complete list):
Do a fast search (max 30 seconds):
KEY_FILES=""
for keyword in $(echo "$TITLE $DESC" | tr ' ' '\n' | grep -E '^[a-z]{4,}$' | head -5); do
FOUND=$(find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.md" -o -name "*.json" \) \
-not -path "*/node_modules/*" 2>/dev/null | xargs grep -l "$keyword" 2>/dev/null | head -3)
[ -n "$FOUND" ] && KEY_FILES="$KEY_FILES $FOUND"
done
KEY_FILES=$(echo "$KEY_FILES" | tr ' ' '\n' | sort -u | head -10 | tr '\n' ',' | sed 's/,$//')
Rules:
Structure the prompt for worker consumption. See ../skills/engineering-prompts/references/worker-prompt-guidelines.md for detailed best practices.
Fix beads issue ISSUE-ID: "Title"
## Context
[Description from bd show - the WHY and implementation hints]
## Relevant Skills
[Skill keywords that trigger skill-eval hook]
## Key Files
[Comma-separated list of relevant files]
## When Done
Run: /conductor:worker-done ISSUE-ID
Persist the prepared data to issue notes:
NOTES="prepared.skills: $SKILL_KEYWORDS
prepared.files: $KEY_FILES
prepared.prompt: |
$(echo "$PREPARED_PROMPT" | sed 's/^/ /')"
bd update "$ISSUE_ID" --notes "$NOTES"
Workers read prepared.prompt directly from notes - no exploration needed.
Each enhanced issue has in its notes:
| Field | Purpose |
|---|---|
prepared.skills | Keyword phrases for skill activation |
prepared.files | Key files to read first |
prepared.prompt | Full prompt ready for worker |
| Aspect | Target |
|---|---|
| Time per issue | < 60 seconds |
| File search depth | Max 5 keywords |
| Files per issue | Max 10 |
| Total enhancement | < 10 minutes for 20 issues |
If enhancement is slow, skip file search - workers can explore.
| Resource | Purpose |
|---|---|
skills/engineering-prompts/references/worker-prompt-guidelines.md | Prompt quality principles |
references/anthropic-prompting-guide.md | Full Claude 4.x prompting guide |
scripts/match-skills.sh | Central skill matching (single source of truth) |
skills/engineering-prompts/scripts/lookahead-enhancer.sh | Batch enhancement during swarm |
/conductor:bd-swarm | Main workflow that uses prepared prompts |