← ClaudeAtlas

bts-comment-applylisted

Incorporate inline BTS review comments embedded in a recipe's docs. Reads `.bts/local/recipes/{id}/pending-comments.json` (written by `bts comment apply`), runs meta-analysis (conflicts, cascades, verify-contradictions, ambiguity), applies edits per-doc in parallel, and shows a git diff for approval before finalizing.
imtemp-dev/claude-bts · ★ 0 · Code & Development · score 66
Install: claude install-skill imtemp-dev/claude-bts
# Comment-apply Incorporate BTS review comments for recipe: $ARGUMENTS This skill is the second half of the comment workflow. The first half (`bts comment apply <id>`) parses inline `> [!BTS-COMMENT]`, `> [!BTS-BLOCK]`, `> [!BTS-Q]` callouts and writes a structured handoff to `.bts/local/recipes/{id}/pending-comments.json`. This skill reads that handoff, edits the recipe docs, then calls `bts comment apply --finalize` to update the manifest. ## Pre-flight ```bash bts recipe status ``` Resolve `{id}`: - If `$ARGUMENTS` is set, use it. - Else use the active recipe ID from the status output. - If neither, ask the user. Then load the handoff: ```bash cat .bts/local/recipes/{id}/pending-comments.json ``` If the file does not exist, tell the user to run `bts comment apply {id}` first and stop. ## Safety snapshot Before any edits, snapshot the recipe directory so a partial-apply crash can be rolled back cleanly. Capture the stash REF (not just rely on `stash@{0}`) so a later pop targets *our* stash, not whatever stash the user already had on top. ```bash STASH_MSG="bts-comment-apply {id} $(date +%s)" git stash push --include-untracked -m "$STASH_MSG" -- .bts/specs/recipes/{id} >/dev/null 2>&1 # Locate the stash by message — empty if nothing was pushed STASH_REF=$(git stash list | grep -F "$STASH_MSG" | head -1 | cut -d: -f1) echo "$STASH_REF" > .bts/local/recipes/{id}/comment-apply.stash-ref ``` `STASH_REF` is empty in two cases: - The push had nothing to save (working t