mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-30 07:37:38 +00:00
The 33 descriptions (~16k chars, ~19k with paths) overran Codex's skill-list budget (2% of the context window, or 8,000 chars when unknown), and a review found most bodies stale: paths from before the commons/commonsUI moves, the deleted legacy desktop app, a callback signer API that no longer exists, and example APIs that were never in the tree. Kept, rewritten and checked against the code (every path, class and command): account-state (+feeds), amy-expert, android-expert, auth-signers, compose-expert (+API style, Navigation 3 back stacks), desktop-expert (+run/package), event-store-semantics (+NIP-50 search), find-missing- translations, kotlin-coroutines (+structured concurrency, flow modeling), kotlin-multiplatform (+Gradle, composable extraction), ngit-pr, nip85-trusted-assertions, nostr-expert (+NIP lookup, generated NIP catalog), relay-client. Dropped: textbook Compose/Kotlin technique skills, kotlin-expert, kotlin-types-value-class, gradle-expert, quartz-integration (external-facing; see the Quartz docs commit), find-non-lambda-logs (audit finished; the rule is now in AGENTS.md Kotlin Style), and the /nip, /desktop-run, /extract commands. The skill list is now ~4k chars. Also drops .claude/core-skills-plan.md (stale history) and repoints SearchableEvent's KDoc to event-store-semantics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
52 lines
2.2 KiB
Python
52 lines
2.2 KiB
Python
# Regenerates references/nip-catalog.md from the quartz source tree.
|
|
import os, re, sys
|
|
HEADER = """# Quartz package catalog
|
|
|
|
Every top-level package under `quartz/src/commonMain/kotlin/com/vitorpamplona/quartz/`
|
|
and the event classes it defines, keyed by their `const val KIND`. Generated from the
|
|
tree by `scripts/nip-catalog.py`; regenerate it after adding a package or a kind
|
|
instead of editing by hand:
|
|
|
|
```bash
|
|
python3 .claude/skills/nostr-expert/scripts/nip-catalog.py \\
|
|
quartz/src/commonMain/kotlin/com/vitorpamplona/quartz \\
|
|
> .claude/skills/nostr-expert/references/nip-catalog.md
|
|
```
|
|
|
|
"No event kinds" means the package holds tags, crypto, codecs or client helpers only.
|
|
The same kind under two classes is real (tag-dispatched kinds such as 30301/38000) —
|
|
grep the class. `ls` of the package root stays the ground truth, and
|
|
`scripts/nip-lookup.sh <NN>` lists one package's files.
|
|
"""
|
|
root = sys.argv[1]
|
|
kre = re.compile(r'const val KIND\s*=\s*([0-9_]+)')
|
|
def scan(d):
|
|
out = []
|
|
for dp, dn, fn in os.walk(d):
|
|
for f in sorted(fn):
|
|
if not f.endswith('.kt'): continue
|
|
t = open(os.path.join(dp, f), encoding='utf-8').read()
|
|
for m in kre.finditer(t):
|
|
out.append((int(m.group(1).replace('_','')), f[:-3]))
|
|
return sorted(set(out))
|
|
def row(name, path):
|
|
ev = scan(path)
|
|
cells = ', '.join(f'{c} {k}' for k, c in ev) if ev else '(no event kinds: tags/utilities)'
|
|
return f'| `{name}/` | {cells} |'
|
|
dirs = sorted(d for d in os.listdir(root) if os.path.isdir(os.path.join(root, d)))
|
|
print(HEADER)
|
|
print('## Standard NIP packages (`nipXX*`)\n')
|
|
print('| Package | Event classes (kind) |\n|---|---|')
|
|
for d in dirs:
|
|
if d.startswith('nip'): print(row(d, os.path.join(root, d)))
|
|
print('\n## Non-NIP protocol families\n')
|
|
print('| Package | Event classes (kind) |\n|---|---|')
|
|
for d in dirs:
|
|
if not d.startswith('nip') and d not in ('experimental','utils'):
|
|
print(row(d, os.path.join(root, d)))
|
|
print('\n## `experimental/` (draft / unmerged NIPs)\n')
|
|
print('| Package | Event classes (kind) |\n|---|---|')
|
|
ex = os.path.join(root, 'experimental')
|
|
for d in sorted(os.listdir(ex)):
|
|
if os.path.isdir(os.path.join(ex, d)): print(row('experimental/'+d, os.path.join(ex, d)))
|