Test your package through the eyes of a newbie agent — a fresh AI agent reads only your docs/skills and tries to use your package.
Project description
newb
A fresh AI agent reads only your docs and tries to use your package. If it succeeds, your docs work.
How it works
┌──────────────────────┐ ┌────────────────────────────────────┐ ┌──────────────────────┐
│ Your package │ │ Fresh agent │ │ Report │
│ │ newb │ │ asks │ │
│ ./docs/ or │ spins │ docker / local / apptainer │ 4 + N │ what_for │
│ ./_skills/<pkg>/ │ up │ isolated HOME (no ~/.claude) │ ────→ │ problems_solved │
│ tests_newb.yaml │ │ sees ONLY your docs │ reads │ quick_start │
│ (optional) │ │ no internet to your real session │ back │ when_not_to_use │
└──────────────────────┘ └────────────────────────────────────┘ │ tests[] (pass/fail)│
│ ▲ └──────────────────────┘
└───────────── stages skills ───────────┘
(read-only mount)
The agent has no prior context — it sees only what you ship. If it answers
the 4 canonical questions correctly and your tests_newb.yaml graders
pass, your docs work for the realistic case of a brand-new user (or AI).
Install
pip install newb
Use
newb ./docs # any dir of .md files
newb https://github.com/user/repo.git # git URL — auto-clones
newb ./docs --format markdown >> README.md
newb ./docs --runtime local --claude-code-credential ~/.claude/.credentials.json # subscription
Asks a fresh Claude agent four canonical questions (what for / problems
solved / quick start / when not to use), plus any author-defined tests in
tests_newb.yaml. Output: JSON (for CI) or markdown.
Author tests (tests_newb.yaml)
- name: redirects_parallel
prompt: How do I run things in parallel?
expect_contains: ["does not"]
judge: "Must redirect to an alternative tool, not hallucinate."
Each test combines optional substring grading and an optional LLM judge.
Runtime
--runtime |
what |
|---|---|
docker |
default — clean container, no host leakage |
local |
host subprocess with isolated HOME |
apptainer |
HPC (planned) |
Auth (--runtime=local)
Two options. Each cascades CLI flag → env var → unset. When both
resolve, --claude-code-credential wins (subscription quota → $0
marginal cost).
| Option | CLI flag | Env var (newb-namespaced) | Cost |
|---|---|---|---|
| Claude Code subscription | --claude-code-credential PATH |
NEWB_CLAUDE_CODE_CREDENTIAL |
$0 marginal |
| Anthropic API key | --api-key TOKEN |
NEWB_ANTHROPIC_API_KEY |
per-call $ |
# Recommended: subscription quota
export NEWB_CLAUDE_CODE_CREDENTIAL=~/.claude/.credentials.json
newb ./docs --runtime local
Isolation — soft fence, not a sandbox
--runtime local invokes claude --bare, which gives soft isolation:
- ❌ no
~/.claude/.credentials*reads (auth strictly via env var) - ❌ no CLAUDE.md auto-discovery, no plugin/skill auto-load, no keychain
- ❌ no hooks, no LSP, no auto-memory, no background prefetches
- ✅ explicit
--add-dir <skills>grants read access to the staged dir
But: the agent's Read tool is NOT sandboxed. If a prompt asks the
agent to read /home/<you>/.claude/skills/something/, it can — --bare
doesn't deny filesystem access, it just disables auto-discovery. Soft
fence against accidental contamination from autoloaded context, not a
security boundary.
For hard isolation (multi-turn, "agent tries to use the package",
adversarial prompts), use --runtime docker (real container, only
<skills> mounted) once it's wired through.
Library
import newb
report = newb("./docs")
print(newb.render_markdown(report))
Requirements
dockeron PATH (orclaudeCLI if--runtime local)- For
--runtime local: either$NEWB_CLAUDE_CODE_CREDENTIAL(subscription) or$NEWB_ANTHROPIC_API_KEY(per-call) - Python 3.10+
License
AGPL-3.0-only.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file newb-0.5.4.tar.gz.
File metadata
- Download URL: newb-0.5.4.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97198d326f49fa0471d08895d3dc9703b81fad663ca3d955d6eee3b87b3832e0
|
|
| MD5 |
6e86da1da8ca24ca5b73ca5708d14f50
|
|
| BLAKE2b-256 |
d5f9d72bf07d614343e06171d4ee571491e73807e79875efde377ef5da706445
|
File details
Details for the file newb-0.5.4-py3-none-any.whl.
File metadata
- Download URL: newb-0.5.4-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10a21e00a8ce814972da1735e78e238edb391d599c34c6eb8e91d849bc9a9fb0
|
|
| MD5 |
0e52652eb47c801fcb13715c0b85b592
|
|
| BLAKE2b-256 |
78e090a12db7d811835476bd5250a7ebe3ed5b76822b8a81680a11f061c8db53
|