No slash command · from skill-intake
Verifies structural fidelity of Notion page content before/after rendering by comparing JSON structure against a canonical snapshot. Uses granularity scoring with char bounds, required fields, and viz slots to produce a pass/warn/fail verdict.
Ships in skill-intake. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
runtime_root_policy: host-skill-path を適用する。CLAUDE_PLUGIN_ROOT をplugin rootとして使用する。SKILL.md のabsolute pathから、plugin manifestを持つ祖先を上方探索して論理 PLUGIN_ROOT を解決する。cwd からplugin rootを推測せず、literal placeholderをshellへ渡さない。各shell invocation内で解決済みabsolute pathを PLUGIN_ROOT に設定する。prompts/ 配下はこのowner Skill契約を継承する。intake-final-context.json を Notion へ描画する前後に、info-collector-agent (Notion page_id=35195d6503b781788e31f59b4e05e705) と同等の構造粒度・再現性が保たれているかを機械検証する fidelity ガード。Notion API を叩かず、references/canonical-page-snapshot.json との JSON 構造比較のみで公開前 (pre-publish) / 公開後 (post-publish 差分) の双方を判定する。
intake-final-context.json + references/canonical-page-snapshot.json (派生元として references/section_canonical_map.json を参照)output/<hint>/fidelity-report.json … sections[].present/granularity_score/missing_slots/excess_slots と overall_score, verdict ∈ {pass, warn, fail}output/<hint>/fidelity-report.md (R3 delta-report, 人間可読)verdict=pass のときのみ呼び出し元 (render_notion_page.py) が公開を許可する。fail は exit 2、warn は exit 1、pass は exit 0。fail でも JSON/MD は必ず書き出す (fail-fast ≠ silent-fail)。run-skill-intake に、スキーマ存在検査は intake.schema.json に、Notion API 経由公開は run-notion-intake-publish / render_notion_page.py に委譲する。required_fields / char_bounds / viz_slots は aggregator 配下を一次正本とし、本スキルは 派生スナップショット (references/canonical-page-snapshot.json) を保持する (DRY)。手で snapshot を書かない。verdict=fail で exit 2、呼び出し元は即停止すること。scripts/*.py (Python 3, jsonschema/jinja2 許容) で決定論実行。references/ に分割し、when_to_read で誘導 (Progressive Disclosure)。references/granularity-rubric.md、verdict 閾値 (pass≥0.85 / warn≥0.70 / fail<0.70) は references/fidelity-check-rules.md。mandatory=false は missing でも減点しない (warn 列にのみ記録)。intake-final-context.json が canonical-page-snapshot.json と同等粒度を保ち、output/<hint>/fidelity-report.json (verdict ∈ {pass, warn, fail}, overall_score, section 別 missing/excess) と fidelity-report.md (delta-report) が生成され、公開直前 (pre-publish) フックおよび公開後 (post-publish) 差分検証で verdict=pass のみ呼び出し元へ通過させた状態になっている。
Notion 公開パイプラインは API 経由で行われるため、intake-final-context.json と canonical ページの section 粒度がずれると、後段の人間レビューで「再現性が無い」「情報が欠落した」と判明し戻り工数が発生する。Notion API 認証を伴わずに JSON 構造比較のみで決定論的に判定することで、公開前のフェイルファスト停止と、公開後の差分検知 (canonical 更新時の追従漏れ検出) を低コストで両立させる。固定手順では canonical 更新タイミング・char_bounds の計測対象差異・viz_slots の mandatory 区分など実行時文脈で揺れるため、未達観点を都度埋める。
section_canonical_map.json (v2 以降) が変更された場合、scripts/extract-canonical-snapshot.py を再走させ references/canonical-page-snapshot.json が最新派生に更新されている (手書き禁止)scripts/validate-notion-fidelity.py <intake-final-context.json> が exit 0/1/2 のいずれかで完了し、output/<hint>/fidelity-report.json が生成されている (fail でも JSON/MD 出力必須)fidelity-report.json が sections[].present / granularity_score / missing_slots / excess_slots と overall_score, verdict を保持し、schemas/output.schema.json 準拠であるscripts/validate-notion-fidelity.py 内 section_text_length() で計測した本文相当文字数を使用 (json.dumps 長ではない)mandatory=true のみで減点判定、mandatory=false 欠落は warn 列に記録のみreferences/fidelity-check-rules.md の閾値 (pass≥0.85 / warn≥0.70 / fail<0.70) と一致し、pass のみ呼び出し元 (render_notion_page.py) が公開許可verdict=fail で exit 2、warn で exit 1、pass で exit 0 が返り、fail/warn でも fidelity-report.md (R3 delta-report) が人間可読で書き出されているscripts/extract-granularity-score.py で overall_score (0-100) を取得し CI メトリクスに記録 (optional だが canonical 更新追従漏れ検知の根拠となる)prompts/R1.md / R2.md / R3.md) と整合した出力になっているreferences/fidelity-check-rules.md と references/granularity-rubric.md の評価観点に従い、未達観点をゲートとみなして都度埋める。本スキル固有の差分:
granularity_score を算出し、overall_score 未達なら不足 section の R3 delta-report を根拠に context.json 側を埋めて再走する。verdict=fail (exit 2) で呼び出し元を即停止。warn (exit 1) は呼び出し元判断に委ねるが、fidelity-report.md の改善示唆を必ず提示する。section_canonical_map.json が更新されたら必ず extract-canonical-snapshot.py を再走 (template-change audit-trigger)。snapshot 手書き禁止。run-notion-intake-publish 側に委譲。# canonical snapshot 再生成 (template-change trigger 時のみ)
python3 ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-plugins/skill-intake}}/skills/assign-notion-fidelity-evaluator/scripts/extract-canonical-snapshot.py \
--source plugins/skill-intake/references/section_canonical_map.json \
--out plugins/skill-intake/skills/assign-notion-fidelity-evaluator/references/canonical-page-snapshot.json
# fidelity check (公開直前フック)
python3 ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-plugins/skill-intake}}/skills/assign-notion-fidelity-evaluator/scripts/validate-notion-fidelity.py <intake-final-context.json>
# exit 0 = pass / 1 = warn / 2 = fail
# 粒度スコア単体取得 (CI メトリクス用)
python3 ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-plugins/skill-intake}}/skills/assign-notion-fidelity-evaluator/scripts/extract-granularity-score.py <intake-final-context.json>
section_canonical_map.json (v2) が変わったら本スキルの extract-canonical-snapshot.py を再走させる。手で snapshot を書かない。scripts/validate-notion-fidelity.py 内の section_text_length() を使用)。mandatory=false は missing でも減点しない (warn 列にのみ記録)。run-notion-intake-publish 側へ。本スキルは構造比較のみ。intake.schema.json に委譲。本スキルは粒度差分のみ。| 用途 | パス | when_to_read |
|---|---|---|
| 責務別 prompt (R1: canonical-snapshot-extraction) | prompts/R1.md | aggregator の section_canonical_map.json から派生スナップショットを生成する手順を確認するとき |
| 責務別 prompt (R2: fidelity-check) | prompts/R2.md | context と canonical の section 粒度比較・verdict 判定ロジックを確認するとき |
| 責務別 prompt (R3: delta-report) | prompts/R3.md | missing/excess/granularity_warnings を Markdown と exit code に変換するとき |
| 正本構造マップ | references/canonical-page-snapshot.json | 各 section の required_fields / char_bounds / viz_slots を参照するとき |
| スコア算出ルール | references/granularity-rubric.md | 0-100 score の重み付け (char_bounds 30% / required 40% / viz 30%) を確認するとき |
| verdict 閾値 | references/fidelity-check-rules.md | pass/warn/fail の境界とエスカレーション規約を確認するとき |
| 量産規約 | references/abstraction-contract.md | canonical_page_id / canonical_snapshot_path / fidelity_threshold_pass / fidelity_threshold_warn 等のテンプレ変数を差し替えるとき |
| Progressive Disclosure 地図 | references/resource-map.yaml | references 全体の読み順を確認するとき |
| 機械可読フロー定義 | workflow-manifest.json | Step/Gate/Phase の entryHook/exitHook/dependsOn を確認するとき |
| 出力スキーマ | schemas/output.schema.json | fidelity-report.json の必須キーを確認するとき |
run-skill-intake — canonical SoT (references/section_canonical_map.json) の所有者run-notion-intake-publish — 本スキルを公開直前フックとして呼ぶ sibling (API 経由公開を担当)prompts/R1.md (opens in a new tab)prompts/R2.md (opens in a new tab)prompts/R3.md (opens in a new tab)references/abstraction-contract.md (opens in a new tab)references/canonical-page-snapshot.json (opens in a new tab)references/fidelity-check-rules.md (opens in a new tab)references/granularity-rubric.md (opens in a new tab)references/resource-map.yaml (opens in a new tab)schemas/output.schema.json (opens in a new tab)schemas/result.json (opens in a new tab)scripts/extract-canonical-snapshot.py (opens in a new tab)scripts/extract-granularity-score.py (opens in a new tab)scripts/validate-notion-fidelity.py (opens in a new tab)workflow-manifest.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub daishiman/harness-dev --plugin skill-intake12 skills in this plugin
/run-intake-finalizeintake 全 JSON を統合したいとき、intake.md と intake.json を Jinja2 で render して quality_gate と cross_check を通したいときに使う。/run-intake-interviewユーザーが言語化できない「何を入力し、何をどう出力してほしいか」を深掘って intent_contract と 5 軸ヒアリングシートを再現性高く埋めたいとき、run-skill-intake から phase 4 として呼ばれて sheet.md/sheet.json/interview.json を生成したいときに使う。/run-intake-kickoffintake セッション起動直後にパターン・深度・痛点 3 軸を確定したいとき、run-skill-intake から phase 1 として呼ばれて kickoff.json を生成したいときに使う。/run-intake-next-actionharness-creator / plugin-dev-planner への引き渡しモードを判定したいとき、summary.json から A/B/C/D/E/P のいずれかを決定論的に確定したいときに使う。/run-intake-option-catalog外部連携カタログを参照して候補を選択肢化したいとき、purpose.json を基に options.json を生成したいときに使う。/run-intake-revise既存 intake に追加要望を Claude Code チャット内で対話聞き取りしたいとき、Gate R 承認後に Notion ページを PATCH 上書きしたいときに使う。Other plugins' skills for the same job