Skip to content

Commit 6ca3d01

Browse files
avaclaude
authored andcommitted
feat: Cursor/Codex parity + README showcase + GitHub polish
Cursor parity: .cursor/rules — Cursor Composer context file with VP2026 domain facts, component quick reference, skill invocation guide, and what's implemented vs pending. Drop into any voice-anonymization project alongside the skills. Codex parity: AGENTS.md — comprehensive Codex context (was deleted in v0.2, now restored and updated for zero-code architecture). Covers metric directions, B1 script extraction, experiment logging, project structure, and workflow commands. Copy into user's project root for Codex to pick up automatically. README rewrite — /vp-ship showcase: Full end-to-end workflow: hypothesis → spike → attack → repro-check → ship. Shows realistic terminal output at each step including EER numbers, PASS_STRONG output, deferred gate check, and PR creation. Matches the gstack "How it works" pattern — concrete, honest about what's pending. Install section now has three parallel paths: Claude Code → git clone to ~/.claude/skills/vpstack/ Codex → same clone + copy AGENTS.md to project Cursor → same clone + copy .cursor/rules to project Status table shows exactly what works (B1, all 15 skills, logging, repro-check, all three clients) vs what's pending (B2, full eval, attacker). 23/23 tests pass. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 1b0ace1 commit 6ca3d01

3 files changed

Lines changed: 318 additions & 87 deletions

File tree

.cursor/rules

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# vpstack — Cursor Rules
2+
3+
You are helping with VP2026 voice-privacy research. Read docs/domain.md for
4+
the full domain reference. This file gives you the essentials.
5+
6+
## Critical domain facts
7+
8+
- EER: HIGHER = more private. 50% = random attacker = perfect anonymization (the goal).
9+
- WER: LOWER = better utility.
10+
- Linkability: LOWER = harder to link speaker identities.
11+
- ALWAYS report semi-informed attacker EER — it's the official VP2026 ranking metric.
12+
- DO NOT use VP2020/VP2022/VP2024 numbers. Run baselines on your VP2026 data.
13+
14+
## Running B1 McAdams baseline
15+
16+
The B1 script lives in skills/vp-baseline-compare/SKILL.md as an inline template.
17+
Extract it and run:
18+
19+
```bash
20+
# Write the script (see vp-baseline-compare/SKILL.md Step 4 for the full template)
21+
python3 /tmp/vp_b1_run.py --data_path /path/to/audio --seed 42
22+
# pip install soundfile scipy numpy (if needed)
23+
```
24+
25+
## Running skills in Cursor
26+
27+
Skills (skills/*/SKILL.md) are step-by-step workflows. In Cursor:
28+
1. Open the relevant SKILL.md in the sidebar
29+
2. Follow the steps in Composer — run bash commands inline, write files to ~/.vpstack/
30+
3. Reference docs/domain.md for component tradeoffs and known issues
31+
32+
## Experiment logging
33+
34+
Write to ~/.vpstack/projects/{slug}/experiments/{exp_id}/summary.json
35+
Get slug: run `~/.claude/skills/vpstack/bin/vpstack-slug` in terminal.
36+
37+
## What's implemented vs pending
38+
39+
- B1 McAdams anonymization: WORKING (see Step 4 in vp-baseline-compare/SKILL.md)
40+
- B2 neural pipeline: PENDING v0.3
41+
- ASV attacker: requires official VP2026 challenge attacker script (not bundled)
42+
- Full EER/WER eval: PENDING v0.3
43+
44+
## Component quick reference
45+
46+
- HuBERT layers 1-4: speaker-leaning (avoid for content encoder)
47+
- HuBERT layer 6: standard B2 default
48+
- HuBERT layers 7-9: phonetic content peak (best disentanglement)
49+
- ECAPA-TDNN: speaker embeddings; farthest-point selection = stronger anonymization
50+
- HiFi-GAN: use LibriTTS-finetuned weights, not v1 universal (wrong sample rate)
51+
- McAdams alpha=0.8: canonical B1; alpha<0.6 = artifacts; alpha>0.95 = no anonymization
52+
53+
## Rules
54+
55+
- No VP2024 GPLv3 code
56+
- No bundled model weights
57+
- All metrics must be VP2026-specific (run your own baselines)

AGENTS.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# AGENTS.md — Context for Codex and other AI agents
2+
3+
vpstack is a voice-privacy research toolkit for the VoicePrivacy 2026 challenge.
4+
Read this before writing any code or running any commands in this project.
5+
6+
---
7+
8+
## What this repo is
9+
10+
vpstack gives AI coding agents domain knowledge for VP2026 voice anonymization research.
11+
No MCP server. No Python code in the repo. Skills are markdown files that tell Claude
12+
(or you) what bash commands to run. You are the execution engine.
13+
14+
**If you're helping in a *user's* voice-anonymization project** (not this repo),
15+
copy `docs/domain.md` and `docs/claude-md-template.md` into that project for context.
16+
17+
---
18+
19+
## Critical domain facts — read before doing anything
20+
21+
**Metrics (never get these backwards):**
22+
- EER (Equal Error Rate): **HIGHER = more private**. 50% = random = perfect anonymization.
23+
- WER (Word Error Rate): **LOWER = more useful**. 0% = perfect transcription.
24+
- Linkability (ZEBRA Cllr): **LOWER = harder to link speakers**.
25+
- Always report **semi-informed** attacker condition — that's the VP2026 ranking metric.
26+
27+
**Baselines — run on YOUR VP2026 data, never use hardcoded numbers from older years:**
28+
- B1 (McAdams): signal-processing, CPU, fast. Weak anonymization. The floor to beat.
29+
- B2 (HuBERT + ECAPA-TDNN + HiFi-GAN): neural, GPU. Strong. The real target. NOT yet implemented in vpstack.
30+
31+
**B1 McAdams script:** The skill `vp-baseline-compare` contains a self-contained Python
32+
script that Claude writes to `/tmp/vp_b1_run.py`. You can extract and run it directly:
33+
```bash
34+
# Extract and run B1 on your data
35+
python3 /tmp/vp_b1_run.py --data_path /path/to/your/audio --seed 42
36+
# Requires: pip install soundfile scipy numpy
37+
```
38+
39+
---
40+
41+
## Running VP2026 skills as Codex
42+
43+
Skills are in `skills/*/SKILL.md`. Each is a step-by-step workflow.
44+
To execute a skill as Codex:
45+
46+
1. Read the SKILL.md file
47+
2. Follow the steps — run bash commands, write files, ask the user questions
48+
3. Write experiment state to `~/.vpstack/projects/{slug}/`
49+
50+
Get your project slug:
51+
```bash
52+
~/.claude/skills/vpstack/bin/vpstack-slug
53+
# or: python3 -c "import hashlib,os,subprocess; t=subprocess.check_output(['git','rev-parse','--show-toplevel']).decode().strip(); print(f'{os.path.basename(t)}-{hashlib.sha256(t.encode()).hexdigest()[:8]}')"
54+
```
55+
56+
Log an experiment (Write tool or direct file write):
57+
```bash
58+
mkdir -p ~/.vpstack/projects/$SLUG/experiments/$EXP_ID
59+
cat > ~/.vpstack/projects/$SLUG/experiments/$EXP_ID/summary.json << 'EOF'
60+
{
61+
"id": "your-exp-id",
62+
"date": "2026-04-29T00:00:00Z",
63+
"config_hash": "abc123",
64+
"metrics": {"eer": 38.2, "wer": 8.1},
65+
"method": "B1-alpha0.8",
66+
"hypothesis": "your hypothesis text"
67+
}
68+
EOF
69+
```
70+
71+
---
72+
73+
## Workflow for a typical VP2026 experiment
74+
75+
```bash
76+
# 1. Formalize hypothesis (read skills/vp-hypothesis/SKILL.md, follow steps)
77+
# 2. Run B1 anonymization
78+
python3 /tmp/vp_b1_run.py --data_path /path/to/data --seed 42
79+
80+
# 3. Run attacker (requires VP2026 challenge attacker script)
81+
python3 run_attacker.py \
82+
--anonymized_path /path/to/anon \
83+
--enrollment_path /path/to/enrollment \
84+
--trial_list /path/to/trials.txt \
85+
--attacker_condition semi_informed \
86+
--output_format json --seed 42
87+
88+
# 4. Reproducibility check (read skills/vp-repro-check/SKILL.md)
89+
grep -E "^seed: [0-9]+" your_config.yaml || echo "FAIL: seed missing"
90+
grep -E "^(data|splits):" your_config.yaml || echo "FAIL: no splits"
91+
grep -E "TODO|FILL_ME" your_config.yaml && echo "FAIL: placeholder hparams"
92+
93+
# 5. Log result (write summary.json as above)
94+
```
95+
96+
---
97+
98+
## Project structure
99+
100+
```
101+
skills/ 15 SKILL.md workflows — follow these step by step
102+
bin/ Bash scripts (slug, detect, skill-init, telemetry)
103+
docs/domain.md Full VP2026 domain reference (metrics, components, known issues)
104+
docs/claude-md-template.md Copy into user's project CLAUDE.md
105+
tests/ Activation + telemetry tests (bash-based)
106+
```
107+
108+
---
109+
110+
## Rules
111+
112+
1. **Never import VP2024 GitHub code** — it's GPLv3. Implement from the Eval Plan PDF.
113+
2. **Never bundle pretrained weights** — fetch from HuggingFace at runtime.
114+
3. **VP2026 metrics only** — do not use VP2020/VP2022 numbers as references.
115+
4. **No Python code in this repo** — skills are markdown, bin/ is bash.

0 commit comments

Comments
 (0)