14 Cowork Parser

Cowork hook command parser is restricted to an echo+bash whitelist; CLI uses /bin/sh. This probe reads the parser-tests.log emitted by a parser-test hook variant.

kazukinagata Updated

File contents

14-cowork-parser

§2.6 — Cowork hook command parser の whitelist 検証。

事前準備:default の hooks.json では parser-test エントリは含まれていないので、検証時には verifier/hooks/hooks.jsonverifier/hooks/hooks-parser-tests.json の内容に一時的に差し替えて起動してください(cp で上書きし、検証後に git restore)。詳細は docs/cowork-runbook.md 参照。

step 1: alive-check と parser-tests.log の確認

proj="${CLAUDE_PROJECT_DIR:-$PWD}"
ver="${VERIFIER_VERSION_DIR:-v-unknown}"
sid="${CLAUDE_SESSION_ID:-no-sid}"
out_dir="$proj/findings/$ver/$sid"
mkdir -p "$out_dir"
printf '[14-BODY %s] tag=alive-check\n' "$(date -Iseconds)" | tee -a "$out_dir/probe.log"
echo
if [ -f "$proj/findings/parser-tests.log" ]; then
  # Append the raw parser-tests output verbatim. Only the markers that the hook
  # actually emitted will appear here; missing markers stay missing (no false pass).
  echo "=== parser-tests.log (verbatim) ===" | tee -a "$out_dir/probe.log"
  cat "$proj/findings/parser-tests.log" | tee -a "$out_dir/probe.log"
else
  echo "(no parser-tests.log — did you swap hooks.json to hooks-parser-tests.json?)" | tee -a "$out_dir/probe.log"
fi

完了して exit、./scripts/assert.sh 14

kazukinagata/analyzing-claude-plugin/tree/main/verifier/skills/14-cowork-parser commit c45478d103

Frequently asked questions

npx skillmds@latest add kazukinagata/14-cowork-parser