human-analyzer
HomeTrang chủ GuidesHướng dẫn InstallCài đặt
Provision the project-local interpreter and verify the toolkit imports cleanlyDựng trình thông dịch nội bộ và xác minh toolkit import sạch

InstallCài đặt

Linux · Python ≥3.9 · git

Installing is one command that creates a project-local virtualenv under .claude/skills/.venv/, installs three packages (pyyaml · jsonschema · pytest), and leaves the system Python entirely untouched. Requirements: Linux, Python ≥ 3.9, git. No build step, no bundler, no global side effects.Cài đặt là một lệnh tạo virtualenv nội bộ dưới .claude/skills/.venv/, cài ba gói (pyyaml · jsonschema · pytest), và không đụng Python hệ thống. Yêu cầu: Linux, Python ≥ 3.9, git. Không bước build, không bundler, không tác dụng phụ toàn cục.

Install in one commandCài trong một lệnh

Run from the repo root after cloning. The script: ① create .claude/skills/.venv/② pip install pyyaml · jsonschema · pytest into it → ③ verify the three imports resolve. No follow-up steps. The canonical invocation path is established by the script and locked for the lifetime of the project.Chạy từ gốc repo sau khi clone. Script: ① tạo .claude/skills/.venv/② pip install pyyaml · jsonschema · pytest vào đó → ③ xác minh ba import resolve được. Không có bước nối tiếp. Đường gọi chuẩn được thiết lập bởi script và khóa cho suốt vòng đời dự án.

bash .claude/scripts/install.sh
🐍
The venv rule is absolute. Every skill script across all 7 frameworks must be invoked as .claude/skills/.venv/bin/python3 .claude/skills/{fw}-{skill}/scripts/{script}.py — never bare python3. The system interpreter does not have the installed packages. This path is not configurable; it is the canonical invocation for the entire project.Quy tắc venv là tuyệt đối. Mọi script skill trên cả 7 framework phải được gọi là .claude/skills/.venv/bin/python3 .claude/skills/{fw}-{skill}/scripts/{script}.py — không bao giờ dùng python3 trần. Trình thông dịch hệ thống thiếu gói cài. Đường dẫn này không thể cấu hình; đây là cách gọi chuẩn cho toàn dự án.

Verify — schema validationXác minh — kiểm tra schema

After installing, run the schema validator to confirm 119 files (rubrics, scorecards, references) parse cleanly against their JSON schemas. This is the structural proof that the toolkit imported, resolved its paths, and validated its data layer — with or without a character corpus. real outputSau khi cài, chạy bộ kiểm tra schema để xác nhận 119 file (rubric, scorecard, tài liệu tham khảo) parse sạch theo schema JSON. Đây là bằng chứng cấu trúc rằng toolkit đã import, phân giải đường dẫn, và xác minh tầng dữ liệu — có hay không có corpus nhân vật. đầu ra thật

.claude/skills/.venv/bin/python3 .claude/scripts/validate-all-against-schemas.py
python3 .claude/scripts/validate-all-against-schemas.py
Schema validation — 119 PASS, 0 FAIL, 3 SKIP
  ✓ All covered files conform to their schema.
PASS — exit 0

Degrade-clean — no corpus requiredXuống cấp êm — không cần corpus

The public toolkit ships no character corpus — docs/profiles/, docs/materials/, docs/graph/, docs/references/, and assets/ are absent by design. The system resolves subjects dynamically via paths.py reading docs/profiles/characters.yaml. Without that file:Toolkit công khai không kèm corpus nhân vật — docs/profiles/, docs/materials/, docs/graph/, docs/references/, và assets/ vắng mặt theo thiết kế. Hệ thống phân giải nhân vật động qua paths.py đọc docs/profiles/characters.yaml. Không có file đó:

Still passesVẫn pass

  • All imports and module compilationTất cả import và biên dịch module
  • Schema validation (119 files)Xác minh schema (119 file)
  • e2e synthetic pipeline (19 steps)Pipeline giả lập e2e (19 bước)
  • All deterministic unit testsTất cả test unit tất định
  • platform_lib cache + preferences CLIplatform_lib cache + preferences CLI

Skips gracefullyBỏ qua một cách khéo léo

  • Character-specific unit tests (-m roster)Test unit theo nhân vật (-m roster)
  • Profile completeness scoring (psy:health-check)Chấm điểm đầy đủ hồ sơ (psy:health-check)
  • MAT pipeline on real materialsPipeline MAT trên tư liệu thật
  • CRE gates on live assetsCổng CRE trên asset thật
  • Live-LLM tests (GEMINI_API_KEY required)Test LLM thật (cần GEMINI_API_KEY)

To add your own corpus: create docs/profiles/characters.yaml with a list of character slugs. The tooling resolves all paths dynamically — no hardcoding needed. The private repo pattern places the full corpus in the same directory structure; the public toolkit is structurally identical.Để thêm corpus của bạn: tạo docs/profiles/characters.yaml với danh sách slug nhân vật. Công cụ phân giải tất cả đường dẫn động — không hardcode. Mô hình repo riêng đặt corpus đầy đủ trong cùng cấu trúc thư mục; toolkit công khai giống hệt về cấu trúc.

Run the full deterministic suiteChạy bộ kiểm thử tất định đầy đủ

After installing and validating, run the complete deterministic gate. No API key. No external calls. The -m 'not gemini' marker excludes the 34 live-LLM tests. Without a roster: ~665 pass, ~175 skip. real outputSau khi cài và xác minh, chạy cổng tất định đầy đủ. Không API key. Không gọi mạng. Tham số -m 'not gemini' loại trừ 34 test LLM thật. Không có roster: ~665 đạt, ~175 bỏ qua. đầu ra thật

.claude/skills/.venv/bin/python3 -m pytest tests/ -q -m 'not gemini'
pytest tests/ -q -m 'not gemini'
$ pytest tests/ -q -m 'not gemini'
1100 passed, 34 deselected, 2 warnings in 55.77s

→ deterministic suite green · 0 network calls · corpus-dependent tests skip cleanly

CI gatesCổng CI

Three GitHub Actions workflows run on every push. All deterministic — no API key needed in CI.Ba workflow GitHub Actions chạy mỗi lần push. Tất cả tất định — không cần API key trong CI.

WorkflowWorkflowGateCổng
frameworks-ci.ymlpy_compile · import sweep · schema validation · orc:audit exit-0 · pytest · evalpy_compile · quét import · xác minh schema · orc:audit exit-0 · pytest · eval
cross-framework-bug-class.ymlpytest -m bug_class — guards orphan import, centralized-constant redefinition, non-recursive glob, skill-count driftpytest -m bug_class — chặn import mồ côi, tái định nghĩa hằng số tập trung, glob không đệ quy, lệch số skill
public-ci-guard.ymlFail-closed perimeter — blocks any private-corpus or CK path from re-entering the public repoVành đai fail-closed — chặn mọi đường corpus riêng hoặc CK tái nhập repo công khai

License + distributionGiấy phép + phân phối

📦
AGPL-3.0. Network or SaaS use of a modified version must release its full source under AGPL-3.0. The distribution pack bundles only the toolkit — never the live character corpus. A non-removable safety_filter.py drops docs/profiles/ · docs/materials/ · docs/graph/ · secrets · telemetry · runtime caches after the manifest include-globs, so a misconfigured include can never leak clinical data. Build + verify locally: .claude/skills/.venv/bin/python3 .claude/skills/_framework-shared/scripts/build_pack.py. Release builds are CI-only — a hand-built tarball's SHA won't match the recipient's verified SHA. Full distribution walkthrough: Distribution.AGPL-3.0. Dùng mạng hoặc SaaS bản sửa đổi phải công bố toàn bộ mã nguồn theo AGPL-3.0. Gói phân phối chỉ đóng gói toolkit — không bao giờ corpus nhân vật thật. Một safety_filter.py không-thể-gỡ loại bỏ docs/profiles/ · docs/materials/ · docs/graph/ · secrets · telemetry · cache runtime sau các include-glob, nên include cấu hình sai cũng không rò rỉ dữ liệu lâm sàng. Build + xác minh cục bộ: .claude/skills/.venv/bin/python3 .claude/skills/_framework-shared/scripts/build_pack.py. Bản release build chỉ trên CI — tarball build tay có SHA không khớp SHA người nhận xác minh. Hướng dẫn phân phối đầy đủ: Phân phối.
After installing: validate schemas, run the deterministic suite, then follow the first material end-to-end in Journey. Re-verify imports any time: .claude/skills/.venv/bin/python3 -c "import yaml, jsonschema, pytest; print('ok')". Five-step walkthrough: Quick start.Sau khi cài: xác minh schema, chạy bộ test tất định, rồi theo một tư liệu từ đầu đến cuối trong Hành trình. Xác minh lại import bất cứ lúc nào: .claude/skills/.venv/bin/python3 -c "import yaml, jsonschema, pytest; print('ok')". Hướng dẫn năm bước: Bắt đầu nhanh.

FAQHỏi đáp

What if install.sh says Python is missing?Nếu install.sh báo thiếu Python thì sao?
Install Python ≥ 3.9 first: apt install python3 python3-venv (Debian/Ubuntu) or from python.org. Then re-run bash .claude/scripts/install.sh. Python is a runtime requirement — every skill script needs the venv interpreter, not just the install step.Cài Python ≥ 3.9 trước: apt install python3 python3-venv (Debian/Ubuntu) hoặc từ python.org. Sau đó chạy lại bash .claude/scripts/install.sh. Python là yêu cầu lúc chạy — mọi script skill cần trình thông dịch venv, không chỉ bước cài.
Why not bundle a venv in the distribution pack?Vì sao không đóng gói venv trong gói phân phối?
A venv references a base interpreter on the machine that built it — it does not contain Python and is not portable across machines or OS versions. A hand-built venv would break on a different OS. The whole dependency surface is three pure-Python packages; requiring Python and running install.sh is the honest, lighter trade.Venv tham chiếu tới interpreter gốc trên máy tạo ra nó — không chứa Python và không di động giữa máy/phiên bản OS. Venv build tay sẽ vỡ trên OS khác. Toàn bộ phụ thuộc chỉ là ba gói Python thuần; yêu cầu Python và chạy install.sh là đánh đổi trung thực, nhẹ hơn.
Can I install into a different venv path?Có thể cài vào đường venv khác không?
The venv path .claude/skills/.venv/ is canonical and embedded in every skill script via the project's invocation convention. Changing it would break all 68 skills. The path was chosen deliberately to keep everything self-contained under .claude/.Đường venv .claude/skills/.venv/ là chuẩn và nhúng trong mọi script skill qua quy ước gọi dự án. Thay đổi nó sẽ phá vỡ cả 68 skill. Đường được chọn có chủ đích để giữ tất cả tự đóng gói dưới .claude/.
The schema validator flags a file — is it a blocker?Bộ kiểm tra schema đánh cờ một file — có bị chặn không?
Schema failures are structural errors in rubric or scorecard YAML/JSON. The CI gate treats them as blockers (frameworks-ci.yml runs schema validation as a required step). Fix the shape error first — the error message names the file, the field, and the expected type.Lỗi schema là lỗi cấu trúc trong YAML/JSON rubric hoặc scorecard. Cổng CI coi chúng là blocker (frameworks-ci.yml chạy xác minh schema như bước bắt buộc). Sửa lỗi hình dạng trước — thông báo lỗi nêu file, trường, và kiểu mong đợi.
Does distribution strip the private corpus automatically?Phân phối có tự động bỏ corpus riêng không?
Yes — safety_filter.py is non-removable and runs after the manifest include-globs. Even if you accidentally write a glob that matches docs/profiles/, the filter drops it. Committed caches store verdict labels only — never raw profile text.Có — safety_filter.py không-thể-gỡ và chạy sau các include-glob. Kể cả khi bạn vô tình viết glob khớp docs/profiles/, filter vẫn loại bỏ. Cache commit chỉ lưu nhãn phán quyết — không bao giờ text hồ sơ thô.