跳到正文
cccskills
免费在 GitHub 公开

testing-peoplereadme-cli

Set up and end-to-end test the peoplereadme CLI (init, validate, schema changes). Use when verifying changes to src/peoplereadme/, schemas/persona.schema.json, or persona package scaffolding.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md2.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Testing the peoplereadme CLI

Setup

  • Python 3.12+ and uv are required. uv sync --dev from the repo root installs everything (typer, pydantic, jsonschema, pytest, ruff) and the peoplereadme entrypoint.
  • Test in a clean clone (e.g. git clone -b <branch> <repo> /tmp/prtest) so init runs don't dirty the working repo — init mutates manifest.json and creates personas/{id}/.
  • All testing is shell-only; no browser/recording needed.

Core commands

  • Lint: uv run ruff check src tests
  • Unit tests: uv run pytest -q
  • Schema validation of all personas: uv run peoplereadme validate (validates personas/*/persona.json against schemas/persona.schema.json; legacy packages without persona.json are skipped)
  • Version: uv run peoplereadme --version

End-to-end checks worth repeating

  1. uv run peoplereadme init <id> --class other → expect exit 0 and "Schema validation passed."; verify skeleton dirs (context/ data/ prompts/ evals/rubrics/ evals/fidelity/ evidence/ traces/ compiled/ exports/), evidence/sources.lock, traces/splits.json, a persona.json with class=other, no consent, no voice in allowed_exports, non-affiliation header in README, and exactly one new manifest.json entry.
  2. --class self → consent object present, voice in allowed_exports, evidence/.gitignore ignoring *.jsonl.
  3. Adversarial: set "class": "fan-fiction" in a persona.json and run validate <id> — must exit 1 citing the enum. If it passes, schema enforcement is broken.
  4. Regression: after any schema change, uv run pytest tests/test_schema.py -q proves the Riley package still validates unchanged; also git status should show no changes under personas/riley-walz/.

Known quirks

  • Duplicate init <id> errors with a raw typer traceback (FileExistsError) rather than a clean message — this might be improved later; nonzero exit and no duplicate manifest entry are the assertions that matter.
  • validate run outside a repo root fails with "Not inside a peoplereadmes repo"; run from the repo root (it walks upward looking for manifest.json + schemas/persona.schema.json).

Devin Secrets Needed

  • None for CLI/schema testing (all local, no network). Later pipeline stages (compile/eval) will need LLM provider keys via env (e.g. OPENAI_API_KEY or similar litellm-compatible keys).

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

How to test the peoplereadme CLI end-to-end, including the fidelity harness (eval/calibrate) with a synthetic persona fixture and live LLM calls.

中文简介正在准备中。当前显示原文说明。

muratcankoylan/peoplereadmes132026年7月16日 更新

查看 muratcankoylan 的全部技能

报告此技能的问题