Skip to content

feat(one-shot): 264 cards × bilingual + gacha-as-full-card + arxiv-slug fix#12

Merged
PanQiWei merged 48 commits into
PanQiWei:mainfrom
pandazki:feat/one-shot-card
Apr 24, 2026
Merged

feat(one-shot): 264 cards × bilingual + gacha-as-full-card + arxiv-slug fix#12
PanQiWei merged 48 commits into
PanQiWei:mainfrom
pandazki:feat/one-shot-card

Conversation

@pandazki
Copy link
Copy Markdown
Contributor

Summary

  • 264 one-shot cards across zh + en — 134 concepts, 47 entities, 82 sources, 1 chapter per language. Design-first: each card is a dedicated A4-vertical poster, not a row in a uniform grid. zh came first (18 batches); en was ported across 18 parallel subagent runs holding JSX / SVG / CSS verbatim and translating only prose + SVG text.
  • Wiki list + gacha UX rework — detail-page seal moved right; list cards go compact (no more 4:5 A4 per row); 抽卡 modal now loads the full <OneShotCard> via iframe instead of a simplified title/desc/image.
  • Fix arxiv-id slugs (2012.05876-… etc.) — Astro's default generateId slugified dots out, so URLs 404'd. Override on both wiki and cards collections to strip only the extension.

Change footprint

  • site/src/content/cards/{zh,en}/… — 264 + 264 MDX files (poster cards)
  • site/src/components/card/OneShotCard.astromini variant hides footer + auto-height
  • site/src/components/WikiAtlas.astro — gacha iframe rewrite + compact list-card tuning
  • site/src/pages/[lang]/wiki/[kind]/[slug].astro — seal-right header tweak
  • site/src/content.config.tsgenerateId preserves dots
  • .claude/skills/one-shot-card/ — design-first skill + references + exemplars

Test plan

  • /{lang}/wiki list — compact cards, 3-per-row desktop, intrinsic heights
  • /{lang}/wiki/{kind}/{slug} detail — seal pinned top-right of title block
  • Click 抽卡 → full A4 card renders in modal; 再抽一张 redraws; 前往此页 → detail page
  • Arxiv-id slugs resolve: /zh/wiki/sources/2012.05876-neurosymbolic-ai-third-wave, /en/wiki/sources/2210.13382-emergent-world-representations-othello-gpt, etc. (8 slugs × 2 langs)
  • Sample bilingual parity: /zh/wiki/entities/judea-pearl/en/wiki/entities/judea-pearl render with matching layout, translated text
  • Dev: `npm run dev` from `site/` serves 200 across the above
  • Build: `npm run build` produces no MDX errors (in-session rendering covered all cards, but a full build is the final gate)

🤖 Generated with Claude Code

pandazki and others added 30 commits April 24, 2026 15:08
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…alize \`kind\` in cards collection

Code review feedback from T1 reviewer:
- slug redundant (derivable from entry.id, matches mm/lab/wiki pattern)
- schema collides with Astro's own schema concept
- kind singular/plural mismatch with folder names

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Second round of code-review feedback: `kind` duplicates path info
the same way the previously-removed `slug` did. Match the `wiki`
collection pattern — kind derives from entry.id at query time.
…locked)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…opic-ctx-eng/ch-02-cybernetics)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… frontmatter (layout: conflicts with Astro MDX)
…5 cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…m (15 cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e (15 cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…architecture (15 cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…es (15 cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lity-decay (15 cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…level (15 cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pandazki and others added 18 commits April 24, 2026 19:04
…s,allen-newell,andrej-karpathy (15 cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… sources/[2012.05876,2210.13382] (15 cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ective-agents] (12 cards)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ermissions] (2 cards)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…cing-thoughts] (9 cards)

9 Anthropic source cards, each with a distinct layout approach:
- effective-harnesses: dual-column agent flow (Initializer | Coder)
- emergent-introspective-awareness: rule-stack of 4 experiments
- equipping-agents-agent-skills: hero-pyramid SVG (3-layer progressive disclosure)
- harness-design-long-running-apps: metrics-table hero (Solo/Full/Simplified)
- harnessing-claudes-intelligence: band-rhythm 3 patterns + bitter-lesson punchline
- introducing-claude-opus-4-6: hero-number "1M" release announcement
- managed-agents: Brain-Hands SVG decoupling diagram
- structured-outputs: compare-matrix (OpenAI vs Anthropic)
- tracing-thoughts: 6-finding mosaic grid

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… cards)

14 cards covering OpenAI harness/Codex/structured-outputs + Karpathy
LLM foundations + Meta I-JEPA + Cartesia Mamba-3 + NVIDIA EDLM +
Google A2A + LangGraph, each with a distinct layout approach.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…rness-practice (14 cards)

14 cards on reliability science, context engineering practice, and
harness engineering: pets-vs-cattle + beyond-pass@1 / ReliabilityBench
+ context-rot / Manus / Factory compression / dont-break-the-cache +
cli-anything / swe-evo / george-zhang / schneier / memgpt / llmstxt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nnection (14 cards)

14 cards on philosophy of causation, symbolic/connectionist cognition:
6 SEP entries (Aristotle, metaphysics, regularity, counterfactual, Hume,
induction), Pearl 2010, Wikipedia (causal-model, coastline-paradox,
PSSH), Fodor-Pylyshyn 1988, Smolensky 1988, Newell-Simon 1975, Kautz 2022.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…lity+misc (14 cards)

Final batch of 14 cards closing out sources coverage:
fractal (cyclejs/Avatamsaka/Sumeru), Raymond Unix philosophy ×2,
Sutton Bitter Lesson ×2, Simon Architecture of Complexity, RANLP
trajectory-bias, MIT Tech Review MI, OthelloGPT bag-of-heuristics,
Introl world-models race, Twitter reactions, Claude Code leak.

82/82 wiki sources now have one-shot cards.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three UI fixes after reviewing the entities detail page, wiki index,
and gacha (draw-a-card) modal:

1. Detail page: swap seal from left to right column of the header;
   grid goes from 3-col to 2-col (titleblock / seal).

2. Wiki list cards: drop the 4:5 A4 aspect-ratio for `oscard--mini`,
   hide refs chips + source line in the footer. Auto-height rows
   driven by content; ~3× more density per screen.

3. Gacha modal: replace the hand-built image + title + desc layout
   with an iframe that loads `/card-fragment/{lang}/{kind}/{slug}`
   — the same path `CardModal` uses, so the draw now reveals the
   full one-shot card (bleed layout, SVG, bands, etc.).
   Card width derived from `(100vh - 160px) / 1.414` so the 1:1.414
   aspect never fights a viewport height cap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
20 English source cards as a pilot to validate the zh→en port pipeline.
Four parallel agents each handled 5 cards with a shared protocol:
keep structure/SVG/CSS verbatim; translate only frontmatter prose,
Band bodies, KV labels, and SVG <text> content.

Covered 4 layout archetypes — hero-number, metrics-table, compare-matrix,
portrait, mosaic, flow-SVG — confirming the protocol handles the full
range. 243 remaining: 62 sources + 134 concepts + 47 entities.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 parallel agents each handled ~15-16 cards covering arxiv papers +
model research (E), Anthropic family + reliability/context (F),
SEP philosophy + Wikipedia + symbolic-connectionist (G), OpenAI +
Karpathy + Unix/misc (H).

All 82 en/sources cards now exist (zh coverage fully mirrored).
Render verification: 74 return HTTP 200; 8 arxiv-id dotted slugs
(`2012.05876-...`) return 404 on the card-fragment + wiki detail
routes. This is a pre-existing Astro param-parsing issue that
affects zh too — content is valid, routing needs a separate fix.

Next: 134 concepts + 47 entities via the same protocol.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rate-limited mid-dispatch of round 3 — 24 cards landed before the
window closed. Covers first few alphabetical batches (a2a-protocol
through problem-space). All 24 render HTTP 200.

Remaining: 110 concepts + 47 entities to dispatch after rate reset.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…entities, 3 pilot concepts)

Round 3 (post rate-limit reset): 9 parallel agents × ~17 cards each.
6 concept agents covered the remaining 109 concepts; 3 entity agents
covered all 47 entities.

Complete zh→en mirror now achieved:
- en/concepts: 134 / 134
- en/entities:  47 /  47
- en/sources:   82 /  82
Total: 263 EN one-shot cards, all HTTP 200 at /card-fragment/en/{kind}/{slug}.

Translation protocol throughout: keep JSX/SVG/CSS/fonts verbatim, only
translate prose + frontmatter + SVG text nodes. Agents widened
grid columns 15-30px as needed for longer English labels. Kautz type
notation, Chinese HeroHan glyphs for non-English historical figures,
and canonical formulas preserved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Final stray one — the zh side had a single Book II preview card
(helmsman / feedback / requisite variety / second-order). Ported
so EN reaches full parity.

Coverage now: 264 zh cards ↔ 264 en cards
(134 concepts + 47 entities + 82 sources + 1 chapter).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Astro's default `generateId` on the glob loader slugifies filenames
and strips interior dots, so `2012.05876-neurosymbolic-ai-third-wave.mdx`
became id `201205876-neurosymbolic-ai-third-wave` — and requests for
`/zh/wiki/sources/2012.05876-...` or `/card-fragment/.../2012.05876-...`
404'd with "no matching static path".

Override `generateId` on both `wiki` and `cards` collections to strip
only the extension, leaving arxiv-id dots intact. All 8 affected
arxiv slugs × 2 langs × 2 routes (card-fragment + wiki) now serve 200.

No rename to `[...slug]` needed — `[slug]` accepts dots in the URL
once the emitted static path matches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@PanQiWei PanQiWei merged commit 169e936 into PanQiWei:main Apr 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants