|
| 1 | +# PyAutoLens AI Assistant — Strong Lensing Wiki |
| 2 | + |
| 3 | +This wiki gives a PyAutoLens AI assistant the broad scientific context of |
| 4 | +strong gravitational lensing. It follows Karpathy's "LLM Wiki" pattern: the |
| 5 | +PDFs in the surrounding `PyAutoPaper/` repo are the immutable `raw/` layer |
| 6 | +(gitignored — kept locally only), and this `lensing_wiki/` folder is the |
| 7 | +compiled, cross-linked knowledge layer the assistant reads at query time |
| 8 | +and that lives in git for collaborators. |
| 9 | + |
| 10 | +## Layout |
| 11 | + |
| 12 | +``` |
| 13 | +PyAutoPaper/ # repo root |
| 14 | +├── lensing_wiki/ # this folder — the compiled wiki (in git) |
| 15 | +│ ├── CLAUDE.md # this file — schema + usage rules |
| 16 | +│ ├── index.md # top-level navigation |
| 17 | +│ ├── log.md # append-only compilation log |
| 18 | +│ ├── concepts/ # one topic per page — the science |
| 19 | +│ ├── entities/ # specific surveys, lenses, collaborations, software |
| 20 | +│ └── sources/ # per-topic bibliography pages (one paper = one section) |
| 21 | +├── Strong_Lens/ # raw/ layer — PDFs (gitignored) |
| 22 | +├── Substructure/ |
| 23 | +├── StrongLensCluster/ |
| 24 | +├── Dark_Matter_Detection/ |
| 25 | +├── DarkMatterModels/ |
| 26 | +└── ... # other PDF folders (gitignored) |
| 27 | +``` |
| 28 | + |
| 29 | +The PDFs are the ground truth. Wiki pages are syntheses. If a wiki page and a |
| 30 | +PDF disagree, the PDF wins; the wiki page should be updated and the change |
| 31 | +noted in `log.md`. |
| 32 | + |
| 33 | +## Page types |
| 34 | + |
| 35 | +| Type | Folder | Scope | |
| 36 | +|-------------|--------------|-------------------------------------------------------| |
| 37 | +| Concept | `concepts/` | One scientific concept (e.g. mass-sheet degeneracy) | |
| 38 | +| Entity | `entities/` | One named thing (survey, lens, code, collaboration) | |
| 39 | +| Sources | `sources/` | All paper stubs for one topic, one section per paper | |
| 40 | +| Index/log | root | Navigation and provenance | |
| 41 | + |
| 42 | +## Naming |
| 43 | + |
| 44 | +- File names are lowercase kebab-case: `mass-sheet-degeneracy.md`, |
| 45 | + `slacs.md`, `time-delay-cosmography.md`. |
| 46 | +- One concept per concept page. If a page tries to cover two ideas, split it. |
| 47 | +- Source-collection pages are named by topic: `sources/dark-matter-substructure.md`. |
| 48 | + |
| 49 | +## Cross-references |
| 50 | + |
| 51 | +Use `[[page-slug]]` for wiki-internal links — for example |
| 52 | +`[[mass-sheet-degeneracy]]` or `[[slacs]]`. Slugs match the filename without |
| 53 | +`.md`. A `[[link]]` that has no target file yet is fine — it marks a future |
| 54 | +page to write. |
| 55 | + |
| 56 | +External references point at the PDF on disk using a relative path from |
| 57 | +the `PyAutoPaper/` repo root, e.g. `Strong_Lens/Suyu2016Holicow.pdf`. |
| 58 | +The PDFs themselves are kept locally (gitignored), so collaborators |
| 59 | +cloning the repo will see the wiki references but need to source the |
| 60 | +PDFs separately (most are on arXiv or the journal site). |
| 61 | + |
| 62 | +## Frontmatter |
| 63 | + |
| 64 | +Every wiki file starts with YAML frontmatter: |
| 65 | + |
| 66 | +```yaml |
| 67 | +--- |
| 68 | +title: Mass-sheet degeneracy |
| 69 | +type: concept # concept | entity | sources | meta |
| 70 | +topics: [degeneracies, cosmography] |
| 71 | +sources: # optional — papers most relevant to this page |
| 72 | + - Strong_Lens/Suyu2016Holicow.pdf |
| 73 | + - Strong_Lens/Birrer2020TDCOSMOSIVH0.pdf |
| 74 | +status: stub # stub | drafted | reviewed |
| 75 | +--- |
| 76 | +``` |
| 77 | + |
| 78 | +Sources may be `[]` for pages that synthesize general field knowledge. |
| 79 | + |
| 80 | +## Concept page structure |
| 81 | + |
| 82 | +``` |
| 83 | +# Title |
| 84 | +
|
| 85 | +## TL;DR |
| 86 | +One paragraph an assistant can quote back to a user. |
| 87 | +
|
| 88 | +## What it is |
| 89 | +The physics / definition. |
| 90 | +
|
| 91 | +## Why it matters for PyAutoLens |
| 92 | +How this concept shows up in lens-modeling decisions a PyAutoLens user makes. |
| 93 | +
|
| 94 | +## Key results from the literature |
| 95 | +Bullet list. Each bullet ends with `([[author-year-stub]])` so the LLM can |
| 96 | +follow the link to the per-paper section. |
| 97 | +
|
| 98 | +## See also |
| 99 | +- [[related-concept-1]] |
| 100 | +- [[related-concept-2]] |
| 101 | +``` |
| 102 | + |
| 103 | +## Entity page structure |
| 104 | + |
| 105 | +Same idea but the headings are "What it is / Key facts / Papers / See also". |
| 106 | +Use entity pages for: surveys (SLACS, BELLS, H0liCOW), specific lenses |
| 107 | +(Abell 1201, the Cosmic Horseshoe), software (PyAutoLens, lenstronomy), |
| 108 | +collaborations (TDCOSMO, Space Warps). |
| 109 | + |
| 110 | +## Source-collection page structure |
| 111 | + |
| 112 | +``` |
| 113 | +# Sources: <topic> |
| 114 | +
|
| 115 | +Bibliography of papers in `Papers/` covering this topic. Each paper has its |
| 116 | +own H2 section; cross-link from concept and entity pages with |
| 117 | +`[[sources-<topic>#author-year-slug]]`. |
| 118 | +
|
| 119 | +## Author Year — short tag |
| 120 | +
|
| 121 | +**File:** `Strong_Lens/Filename.pdf` |
| 122 | +**Concepts:** [[concept-1]], [[concept-2]] |
| 123 | +**Summary:** one-paragraph stub inferred from filename and field knowledge. |
| 124 | +Mark `(stub — verify against PDF)` if not yet read. |
| 125 | +``` |
| 126 | + |
| 127 | +## How the assistant should use this wiki |
| 128 | + |
| 129 | +1. On a user question, first open `index.md`. |
| 130 | +2. Follow the relevant `concepts/` or `entities/` page. |
| 131 | +3. Cite specific results by linking the `[[sources-topic#author-year]]` |
| 132 | + anchor. If a claim is needed and the source stub is unread, open the |
| 133 | + PDF at the path in the stub's `File:` line. |
| 134 | +4. When a PDF is read in full, upgrade the stub's `status:` from `stub` to |
| 135 | + `drafted`, replace the inferred summary with what the paper actually |
| 136 | + says, and add a line to `log.md`. |
| 137 | +5. Never fabricate a citation. If a result is not on a wiki page, say so |
| 138 | + and offer to read the relevant PDF. |
| 139 | + |
| 140 | +## Scope |
| 141 | + |
| 142 | +In-scope folders for the current wiki build: |
| 143 | + |
| 144 | +- `Strong_Lens/` — primary |
| 145 | +- `Substructure/` |
| 146 | +- `StrongLensCluster/` |
| 147 | +- `Dark_Matter_Detection/` |
| 148 | +- `DarkMatterModels/` |
| 149 | + |
| 150 | +Other folders (`WeakLensing/`, `Ellipticals/`, `Deep Learning/`, etc.) |
| 151 | +contain papers that touch lensing tangentially but are out of scope until |
| 152 | +explicitly added — see `log.md` for the decision. |
| 153 | + |
| 154 | +This wiki is the **lensing** sub-wiki of `PyAutoPaper/`. Future sub-wikis |
| 155 | +(e.g. `imaging_wiki/`, `cosmology_wiki/`) may sit alongside it at the |
| 156 | +repo root following the same schema. |
0 commit comments