diff --git a/scripts/sync_skill_truth_to_workbuddy.sh b/scripts/sync_skill_truth_to_workbuddy.sh new file mode 100644 index 00000000..30e981fb --- /dev/null +++ b/scripts/sync_skill_truth_to_workbuddy.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT="/Users/wuyongnaren/Documents/印度占星" +WB="/Users/wuyongnaren/.workbuddy/skills/jyotish-vedic-astrology" + +mkdir -p "$WB/references" +mkdir -p "$WB/skills/jyotish-engine-modules" +mkdir -p "$WB/skills/jyotish-full-reading-integration" + +cp "$ROOT/SKILL.md" "$WB/SKILL.md" +cp "$ROOT/references/technique_registry.json" "$WB/references/technique_registry.json" +cp "$ROOT/references/quick-reference-guide.md" "$WB/references/quick-reference-guide.md" +cp "$ROOT/references/strict-workflow-router.md" "$WB/references/strict-workflow-router.md" +cp "$ROOT/skills/jyotish-engine-modules/SKILL.md" "$WB/skills/jyotish-engine-modules/SKILL.md" +cp "$ROOT/skills/jyotish-full-reading-integration/SKILL.md" "$WB/skills/jyotish-full-reading-integration/SKILL.md" + +echo "synced skill truth files to workbuddy" diff --git a/tests/test_skill_truth_sync_scripts.py b/tests/test_skill_truth_sync_scripts.py new file mode 100644 index 00000000..62c2ba1a --- /dev/null +++ b/tests/test_skill_truth_sync_scripts.py @@ -0,0 +1,33 @@ +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] + + +def _read(path: str) -> str: + return (ROOT / path).read_text(encoding="utf-8") + + +def test_audit_whitelist_contains_expected_truth_files() -> None: + script = _read("scripts/sync_skill_truth_whitelist.sh") + for expected in ( + "SKILL.md", + "references/technique_registry.json", + "references/quick-reference-guide.md", + "skills/jyotish-engine-modules/SKILL.md", + "skills/jyotish-full-reading-integration/SKILL.md", + ): + assert expected in script + + +def test_workbuddy_sync_script_copies_expected_truth_files() -> None: + script = _read("scripts/sync_skill_truth_to_workbuddy.sh") + for expected in ( + 'cp "$ROOT/SKILL.md" "$WB/SKILL.md"', + 'cp "$ROOT/references/technique_registry.json" "$WB/references/technique_registry.json"', + 'cp "$ROOT/references/quick-reference-guide.md" "$WB/references/quick-reference-guide.md"', + 'cp "$ROOT/references/strict-workflow-router.md" "$WB/references/strict-workflow-router.md"', + 'cp "$ROOT/skills/jyotish-engine-modules/SKILL.md" "$WB/skills/jyotish-engine-modules/SKILL.md"', + 'cp "$ROOT/skills/jyotish-full-reading-integration/SKILL.md" "$WB/skills/jyotish-full-reading-integration/SKILL.md"', + ): + assert expected in script