pyeye-scenarios
Skill0 starsChanged 2 days agoMITView on GitHub
Use when provisioning a real-world dogfooding scenario to verify pyeye against — cross-repo / namespace / single-tree codebases at pinned commits. Triggers on "set up a dogfooding scenario", "provision the jaraco/django scenario", "stand up a namespace scenario for pyeye", "what scenarios do we have". This is the DATA layer (catalog + pins + baselines); the procedure that runs against it lives in the pyeye-verify skill. Does NOT trigger for ordinary code navigation (use python-explore) or for running the verification pass itself (use pyeye-verify).
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- pyeye-verifySkill
- architecture-reviewSkill
- decision-logSkill
- python-exploreSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 97
All five are identical on an in-process repeat.
- Very specific: line 167
All three jaraco.* stubs round-trip.
- Very specific: line 218
Before #623 slice 3, rows 1–4 and 8 failed too: corp.core and corp.web reported external, and inspect/outline/expand couldn't find them …
- Very specific: line 228
Add a manifest block: repos + pinned SHAs, project_path, root/.pyeye.json.
- Distinctive: line 232
Keep it declarative — commands and pinned data only, no hand-listed "current files".
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
pyeye Scenarios
The catalog of real-world codebases we provision to dogfood and verify pyeye, each
pinned to a commit so its recorded baseline stays meaningful. This skill is the data:
which repos, at which commits, how they're laid out, the .pyeye.json that wires them,
the probe suite, and the expected baseline. The procedure that runs the probes and
judges the results lives in [[pyeye-verify]].
Announce at start: "Using the pyeye-scenarios skill to provision <scenario>."
Why scenarios exist
Different codebase shapes stress different pyeye capabilities. One target (a single tree) can't exercise cross-repo resolution, namespace stitching, or the namespace cold-start path. The catalog is the axis of variation:
| Scenario | Shape | Stresses | Provision |
django | single tree | depth, scale, canonical-handle collapse, imported_by/superclasses, static-surface ceiling, honest-limit refusal | clone (heavy — use --reference) |
namespace-jaraco | 3 repos, PEP 420 namespace | namespace stitching via .pyeye.json, cross-repo resolve/trace, #444 cold-start | clone 3 small repos |
multirepo-namespace | 3 repos + main project, PEP 420 namespace, in-repo | namespaces outside the project root (src/ layout, flat, via packages), root-is-package project, cross-repo subclass/calls/re-export/alias/TYPE_CHECKING/lazy import, name collision | local copy, no clone (#667) |
zope (planned) | 2 repos, PEP 420 namespace | deep inheritance + dense cross-import graphs | — |
google-cloud (planned) | monorepo, many dists | scale + 3-segment namespaces | — |
Conventions (apply to every scenario)
- Target dir is an in-repo, gitignored dir — never a machine-global path. The default
is
<current-worktree-root>/.scenario-repos/, resolved withgit rev-parse --show-toplevelso it follows you into a worktree automatically (each worktree gets its own isolated clones, removed when the worktree is). Overridable withPYEYE_SCENARIO_DIR. The.pyeye.jsonpaths are relative, so the scenario's siblings just need this common parent. (.scenario-repos/is in the repo's.gitignore; do NOT hardcode a personal path like~/GitHub/test— it isn't portable and shared external clones collide across worktrees.) - Pin commits. A recorded baseline is only meaningful against fixed source. Each scenario lists exact SHAs.
- Full clone, not
--depth 1. A shallow clone cannot check out an arbitrary pinned SHA. The jaraco repos are ~350 KB each (free), so a per-worktree clone is trivial. django is ~366 MB — to avoid re-downloading it per worktree, clone with--reference <shared-django>(borrows objects from an existing local clone; the per-worktree copy is tiny on disk yet can still check out the pinned SHA), or pointPYEYE_SCENARIO_DIRat a shared cache for that scenario. - Idempotent. Skip a repo that already exists; never re-clone over local work.
- Never vendor. Third-party code is cloned on demand and never committed — a gitignored in-repo dir is never in git history, so "in the worktree" ≠ "vendored." The convention is about git history, not disk presence.
Generic provision procedure
For each repo in a scenario's manifest:
# In-repo, gitignored, worktree-local by default (override with PYEYE_SCENARIO_DIR).
TARGET="${PYEYE_SCENARIO_DIR:-$(git rev-parse --show-toplevel)/.scenario-repos}"
mkdir -p "$TARGET"
cd "$TARGET"
[ -d "<repo>" ] || git clone "<url>" "<repo>" # idempotent, full clone
# (heavy repos: add --reference <shared-clone>)
git -C "<repo>" fetch --quiet origin <commit>
git -C "<repo>" checkout --quiet <commit>Then write the scenario's .pyeye.json into its root repo (if it declares one), and
hand off to [[pyeye-verify]] to run the probe suite.
Scenario: django
Single source tree — the depth/scale baseline. No .pyeye.json, no namespace.
Manifest
| Field | Value |
| repo | https://github.com/django/django |
| commit | cd385e6b8c |
| size | ~366 MB — clone with --reference <shared-django> (or set PYEYE_SCENARIO_DIR to a shared cache) to avoid a full per-worktree download |
project_path | <TARGET>/django |
root / .pyeye.json | none |
Probe suite + recorded baseline (re-captured 2026-11-16, build 2.0.1.dev117+g95c7b40b4 = main @ 95c7b40b after #782, Python 3.12; caches PYEYE_PARSO_CACHE_MAX_ENTRIES=1000, PYEYE_ARTIFACT_CACHE_MAX_ENTRIES=500, PYEYE_SCRIPT_CACHE_MAX_ENTRIES=200; max RSS 333 MB under MemoryMax=2.5G; the #629 sign-off, report on #636)
| # | Probe | Expected (baseline) | Demonstrates / changed since 2026-06-22 |
| 1 | resolve("django.db.models.Model") | handle: django.db.models.base.Model, kind:class, scope:project, base.py:501 | canonical-handle collapse: the re-export resolves to its definition site. Unchanged. |
| 2 | inspect("django.db.models.Model") | superclasses:["…utils.AltersData"], signature:"Model()", edge_counts:{members:67, superclasses:1}, re_exports:["django.db.models.Model"]; no callers/references key | absence-vs-zero (no caller key) and the static-surface ceiling (members omits the metaclass-injected _meta/objects/DoesNotExist). Changed: re_exports was ["…migrations.operations.fields.Model"], an internal import binding; only public paths are reported now (#712, PR #766). members was 68; 67 is exact (66 methods plus pk), because the 5 save.alters_data = True-style statements assign an attribute and bind nothing. |
| 3 | expand("django.db.models.Model", "superclasses") | one stub: django.db.models.utils.AltersData; ceiling:"declared_bases", unresolved_superclasses:[] | matches edge_counts.superclasses. Added: ceiling (#417, PR #760) and unresolved_superclasses (#624). |
| 4 | expand("django.core.signing", "imported_by") | 10 module stubs incl. django.http.request, django.contrib.sessions.backends.base, and tests.*; ceiling:"static_imports", unresolved_importers:[], unparseable_files:[".../tests/test_runner_apps/tagged/tests_syntax_error.py"] | the reverse-static import graph (deterministic). Added: ceiling (#417), unresolved_importers (#668), and unparseable_files (#729, PR #754), which names django's deliberately broken test file instead of skipping it silently. |
| 5 | expand("django.db.models.Model", "callers") | unsupported, reason:"deferred_reference_backend" (#333), plus a report_issues URL (#458, PR #460) | honest-limit refusal: not faked, not empty, and it carries the in-band report path. Unchanged. |
All five are identical on an in-process repeat. The first inspect (33 s) and the first imported_by (29 s) include building the indices; repeats take ≤0.4 s.
Round-trip probe ([[pyeye-verify]] §1b), module django.db.models.base
(57 stubs): not recorded, blocked by #795. The first three stubs round-trip
in milliseconds. The fourth, inspect("django.apps.registry.apps"), spends
minutes in the deprecated re_exports scan, which re-parses all 907 package
files on each of its ~66 BFS hops. One run was killed at 60 minutes, and one
crashed with SIGSEGV. Record the row once #795 lands, tagged with that build.
Probe 2's
members:67is a count of statically written members. Reporting it as "Model's complete attribute set" would be wrong —_meta,objects,DoesNotExistare metaclass-injected and invisible to static analysis. The verify rubric treats mislabelling a static count as runtime-exhaustive as a FAIL.
Scenario: namespace-jaraco
Three small modern repos sharing the PEP 420 jaraco namespace (each jaraco/<subpkg>/
with no jaraco/__init__.py), with real cross-repo imports.
Manifest
| repo | commit | note |
jaraco.text | 1683d5a | root — gets .pyeye.json; imports the other two |
jaraco.functools | 0e89d96 | tagged v4.5.0 |
jaraco.context | bfcb95c |
- url pattern:
https://github.com/jaraco/<repo> project_path:<TARGET>/jaraco.text- layout: all three siblings under
<TARGET>/
.pyeye.json (write into jaraco.text):
{ "namespaces": { "jaraco": ["../jaraco.functools", "../jaraco.context"] } }The real cross-repo imports the probes lean on live at
jaraco.text/jaraco/text/__init__.py:23-24:
from jaraco.context import ExceptionTrap # -> ../jaraco.context
from jaraco.functools import compose, method_cache # -> ../jaraco.functoolsProbe suite + recorded baseline (captured 2026-06-22, build dev416+g406783dd6 = main incl. #423/#444/#454, project_path = .../jaraco.text)
| # | Probe | Expected (baseline) | Demonstrates / tracking |
| 1 | resolve("jaraco.context.ExceptionTrap") | kind:class, scope:project, file in ../jaraco.context | ✅ cross-repo resolution — sibling repo resolves as project |
| 2 | expand("jaraco.text", "imports") (and trace(... ["imports"])) | the three jaraco.* targets (context.ExceptionTrap, functools.compose, functools.method_cache) report scope:project; stdlib targets stay external | ✅ cross-repo edge scope — #454 (edges agree with resolve) |
| 3 | resolve("jaraco") | kind:module, scope:project, anchored at jaraco.text/jaraco | ✅ #444 namespace cold-start anchoring |
| 4 | inspect("jaraco") | is_package:true, edge_counts:{members:0, submodules:3} | ✅ #444 / #423 |
| 5 | outline("jaraco") | module/project with 3 submodule children: context and functools truncated:survey_leaf (members, no submodules), text truncated:max_depth; no children:[] anywhere | ✅ #444 / #423 depth-1 survey; #596 (re-recorded 2026-11-08, PR for #596 — the 2026-06-22 capture's children:[] on context/functools was the #596 bug, mis-recorded as expected) |
| 6 | resolve("jaraco.text") (child contrast) | kind:module, scope:project | ✅ child handle resolves |
| 7 | expand("jaraco", "submodules") | 3 stubs: jaraco.context, jaraco.functools, jaraco.text (all project) | ✅ #423 / #444 namespace union across sibling repos |
Round-trip probe ([[pyeye-verify]] §1b) (captured 2026-11-15, build
2.0.1.dev10+gd615b3a5a = main @ d615b3a), module jaraco.text:
| Measure | Baseline | Tracking |
stubs from expand("jaraco.text", "imports") | 32 | |
| don't round-trip | 22 | #623 (one canonical resolver), #602 |
| inspect miss / resolve miss | 21 / 20 | all scope: external (stdlib and typing: os, typing.Callable, __future__.annotations, …) |
| disagree | 1: functools (resolve finds it, inspect doesn't) | #602: the bare functools vs jaraco.functools shadowing |
| handle mismatch | 1: _typing.TypeVar | #623 |
All three jaraco.* stubs round-trip. Every miss is external. A drop toward 0 is
the #623 acceptance signal. Any project-scoped miss is a regression.
Rows 2–5 + 7 are the #423 / #444 / #454 acceptance check, and now pass. Against the
earlier stale build (the 2026-06-21 global server, pre-#423/#444/#454) row 2's jaraco.*
edges came back external, resolve("jaraco") was ambiguous-external (kind:variable,
file:""), inspect/outline were empty, and submodules was unknown/empty — so this
scenario doubles as the regression guard for all three fixes.
⚠️ Baselines are build-tagged. The table above was captured against an up-to-date build (
dev416+g406783dd6, main incl. #423/#444/#454) on 2026-06-22. An earlier capture against the stale globally-installed server (2026-06-21) showed the pre-fix behaviour —jaraco.*import edgesexternal,resolve("jaraco")ambiguous,submodulesunknown/empty. Same probes, different build: that divergence is the regression-vs-environment signal, not a bug. Always re-record against the build under test and note which build (see thepyeye-verifyclassification).
Scenario: multirepo-namespace (local, #667)
A synthetic multi-repo workspace that lives in this repo, so it needs no network and
runs in CI (tests/test_cross_tool_invariants.py corpus multirepo_namespace, plus
tests/integration/test_multirepo_namespace_scenario.py, which pins the expected handles
and scope). Use it here for an offline [[pyeye-verify]] pass. Layout and the relationships
it exercises: tests/fixtures/scenarios/multirepo_namespace/README.md.
Manifest
| Field | Value |
| source | tests/fixtures/scenarios/multirepo_namespace/ (in-repo; nothing to pin, the commit under test is the pin) |
| provision | copy, never use in place: cp -r tests/fixtures/scenarios/multirepo_namespace "$TARGET/" |
project_path | <TARGET>/multirepo_namespace/app |
.pyeye.json | already in app/: namespaces.corp = ["../corp-core/src", "../corp-web"], packages = ["../corp-tools"] |
Probe suite + recorded baseline (captured 2026-11-15, build 2.0.1.dev34+g9c00bbe2f = #623 slice 3 @ 9c00bbe)
| # | Probe | Expected (baseline) | Demonstrates / tracking |
| 1 | resolve("corp.tools.Base") | corp.core.models.Base, class, project | re-export collapses across repos |
| 2 | inspect("corp.tools.widgets.Widget") | superclasses: ["corp.core.models.Base"], edge_counts: {members: 2, superclasses: 1} | cross-repo base |
| 3 | expand("corp", "submodules") | corp.core, corp.tools, corp.web, all project | namespace union; configured namespaces and packages are project (#623 decision 7) |
| 4 | expand("corp.tools.widgets.Widget", "superclasses") | corp.core.models.Base (project) | ✅ |
| 5 | expand("corp.core.models.Base", "subclasses") | corp.tools.widgets.Widget | ✅ #669 (re-recorded on main after #676; was []) |
| 6 | expand("corp.core.models", "imported_by") | app.main, corp.tools, corp.tools.widgets, corp.web.views | ✅ #668 (re-recorded after #676; corp.web.views was missing) |
| 7 | resolve("Shared") | ambiguous: corp.core.models.Shared, corp.tools.widgets.Shared | ✅ #668 (re-recorded after #676; was a silent single answer) |
| 8 | expand("corp.web.views.render", "callees") | corp.core.models.Base.describe, corp.core.models.make, corp.tools.sub.helper.shout, corp.tools.widgets.Widget; unresolved_call_sites: 0 | calls into two other repos |
| 9 | outline("corp") | 3 children, each truncated: max_depth | namespace survey |
| 10 | expand("app.main", "imports") | the 4 corp.* targets project, sys external | cross-repo edge scope |
Before #623 slice 3, rows 1–4 and 8 failed too: corp.core and corp.web reported
external, and inspect/outline/expand couldn't find them (the #653 regression).
Rows 5–7 were re-recorded on build 2.0.1.dev44 (main after #675 and #676), and every
row now passes; the integration test pins them all.
Adding a scenario
- Pick a real repo (or repos) that stresses a shape the catalog doesn't cover yet.
- Add a manifest block: repos + pinned SHAs,
project_path,root/.pyeye.json. - Provision it, then capture its probe suite + baseline via [[pyeye-verify]] and paste the recorded table here, each row tagged with the build it was captured on and tied to an issue where the result is a known gap.
- Keep it declarative — commands and pinned data only, no hand-listed "current files".
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

