Claude Code Interview Book Spec
This book is a single-page interactive lesson published at /books/cc/.
It is written for absolute beginners and teaches Claude Code context
management, memory, compaction, multi-agent design, and interview answers.
Source Contract
The page must cover the three user-provided WeChat links and the same-topic internal links that were reachable from them.
The first WeChat article was read directly. It covers context windows, common context-management failures, the five-layer compression pyramid, Auto-Compact, summary prompt design, continuation after compaction, and interview answer framing.
The second and third WeChat links returned WeChat verification pages during local retrieval. Their readable authorized mirrors were used instead:
https://www.eefocus.com/article/1984643.htmlhttps://www.eefocus.com/article/2009921.html
The page must also account for images in the readable source pages. The implementation reads the article-body images, excludes site chrome, advertisements, author avatars, footer QR codes, and recommendation thumbnails, and reconstructs the diagram intent instead of hotlinking the third-party assets. The audited source-image set is:
- 19 body images from
https://www.eefocus.com/article/1984643.html - 32 body images from
https://www.eefocus.com/article/2009921.html
The recursive same-topic links used for gap filling are:
https://www.eefocus.com/article/2015097.htmlhttps://www.eefocus.com/article/2013527.htmlhttps://www.eefocus.com/article/1988689.htmlhttps://www.yangyitao.com/books/harness-engineering/chapters/11-short-term-memoryhttps://zhanghandong.github.io/harness-engineering-from-cc-to-ai-coding/part3/ch09.html
The page also cross-checks public Claude Code capabilities against Anthropic documentation for subagents, memory, MCP, and slash commands.
Route Contract
src/pages/cc/index.astrorenders the primary Chinese page.src/pages/zh/cc/index.astrorenders the same Chinese page for the existing Chinese route pattern.- With the Astro
basevalue, the public URL is/books/cc/. - The spec page is available at
/books/cc/spec.htmland/books/zh/cc/spec.html.
Typography and Math Contract
This book inherits the repository-wide book style contract in
BOOK_STYLE.md: all prose, headings, controls, tables, captions, and
ordinary UI text must default to PingFang. Code blocks, inline code, terminal
snippets, and code-editor surfaces use the Cursor/LeetCode stack
Monaco, "Cascadia Code", Consolas, "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace. Mathematical symbols, token counts,
thresholds, complexity, metrics, and formulas should use LaTeX/KaTeX whenever
possible.
Coverage Contract
The page must explain these topics from first principles:
- chat, copilot, and agent differences;
- token, context window, system prompt, history, tool definition, tool use, and tool result;
- why coding agents consume context faster than ordinary chat;
- why larger windows do not remove the need for context management;
- why sliding windows, fixed-interval summaries, and vector recall are insufficient for agent histories;
- why Grep, Glob, Read, and Explore subagents are a better first-line code-retrieval strategy than default RAG for live repositories;
- the five-layer compression pyramid: disk spill, Snip, Micro-Compact, Context Collapse, and Auto-Compact;
- Auto-Compact trigger, 20K summary-output reserve, 13K automatic buffer, 3K manual buffer, circuit breaker, recursive guard, full rewrite, and restoration channels;
- summary prompt design, XML structure, nine summary sections, all user messages, and current work;
- continuation after compaction through boundary markers, summary, attachments, hook results, and transcript fallback;
- memory versus context versus summary, including project files, planning files, skills, and long-lived memory;
- Subagent, Fork Subagent, Coordinator, tool isolation, context isolation, message queues, and completion notifications;
- practical interview answers in short, medium, and follow-up forms.
Interaction Contract
The page must include interactive or visual explanations for:
- token budget pressure and compaction trigger thresholds;
- the five compression layers;
- the Auto-Compact pipeline;
- the nine-section summary prompt;
- memory types and restoration channels;
- multi-agent communication;
- source-image motif reconstruction;
- recursive-link gap-filling matrix;
- interview Q&A cards.
The original article images are not hotlinked into the published page. Their diagram intent is reconstructed as first-party interactive visuals and explanatory text.
Quality Contract
- The page must build with
npm run build. - The page must pass the repository content and dist checks.
- Published HTML must not contain local machine paths or private environment details.
- The page must be responsive on desktop and mobile.
- The page must remain readable without JavaScript, with JavaScript only enhancing the diagrams.