Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/conversation/the-loop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ Claude Code 不一样:你说一个需求,它可能连续执行十几步操

这背后的机制叫做 **Agentic Loop**(智能体循环),核心实现在 `src/query.ts` 的 `queryLoop()` 异步生成器函数(第 241 行)。它是一个 `while(true)` 无限循环,每次迭代代表一次"思考→行动→观察"周期。

<Frame caption="Agentic Loop 循环示意">
<img src="/docs/images/agentic-loop.png" alt="Agentic Loop 循环图" />
</Frame>
> 图示:[`Agentic Loop 循环图(PNG)`](/docs/images/agentic-loop.png)

## 循环的完整结构

Expand Down
8 changes: 2 additions & 6 deletions docs/introduction/architecture-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ keywords: ["Claude Code 架构", "五层架构", "QueryEngine", "Agentic Loop",

Claude Code 从上到下分为五个层次,每一层职责清晰、边界分明:

<Frame caption="Claude Code 五层架构">
<img src="/docs/images/architecture-layers.png" alt="Claude Code 五层架构图" />
</Frame>
> 图示:[`Claude Code 五层架构图(PNG)`](/docs/images/architecture-layers.png)

| 层次 | 职责 | 入口源码 | 关键词 |
|------|------|---------|--------|
Expand All @@ -24,9 +22,7 @@ Claude Code 从上到下分为五个层次,每一层职责清晰、边界分

## 一条主数据流的源码追踪

<Frame caption="核心数据流">
<img src="/docs/images/data-flow.png" alt="Claude Code 核心数据流" />
</Frame>
> 图示:[`Claude Code 核心数据流图(PNG)`](/docs/images/data-flow.png)

整个系统的运转可以浓缩为一条核心数据流,以下是每一步对应的源码路径:

Expand Down
12 changes: 3 additions & 9 deletions docs/research/project-capability-atlas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ keywords: ["Claude Code", "reverse engineering", "能力图谱", "skills", "MCP"

## 核心图谱区

<Frame caption="项目能力全景图">
<img src="/docs/images/research/capability-overview.svg" alt="Claude Code 能力全景图" />
</Frame>
> 图示:[`Claude Code 能力全景图(SVG)`](/docs/images/research/capability-overview.svg)

```mermaid
flowchart LR
Expand All @@ -50,9 +48,7 @@ flowchart LR

## 模块地图区

<Frame caption="能力矩阵">
<img src="/docs/images/research/capability-matrix.svg" alt="Claude Code 能力矩阵图" />
</Frame>
> 图示:[`Claude Code 能力矩阵图(SVG)`](/docs/images/research/capability-matrix.svg)

```mermaid
flowchart TD
Expand Down Expand Up @@ -103,9 +99,7 @@ flowchart TD

## 社区核验区

<Frame caption="社区观点核验图">
<img src="/docs/images/research/community-verdicts.svg" alt="Claude Code 社区观点核验图" />
</Frame>
> 图示:[`Claude Code 社区观点核验图(SVG)`](/docs/images/research/community-verdicts.svg)

| 社区共识 | Verdict | 当前仓库里的证据 |
|---|---|---|
Expand Down
40 changes: 40 additions & 0 deletions scripts/docs-static-compat.test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { describe, expect, it } from 'bun:test';
import { readdir, readFile } from 'node:fs/promises';
import { join } from 'node:path';

async function listMdxFiles(dir) {
const entries = await readdir(dir, { withFileTypes: true });
const files = [];

for (const entry of entries) {
const entryPath = join(dir, entry.name);

if (entry.isDirectory()) {
files.push(...(await listMdxFiles(entryPath)));
continue;
}

if (entry.name.endsWith('.mdx')) {
files.push(entryPath);
}
}

return files;
}

describe('docs static export compatibility', () => {
it('avoids Mintlify Frame embeds that break on GitHub Pages refresh', async () => {
const files = await listMdxFiles(join(process.cwd(), 'docs'));
const offenders = [];

for (const file of files) {
const content = await readFile(file, 'utf8');

if (content.includes('<Frame')) {
offenders.push(file);
}
}

expect(offenders).toEqual([]);
});
});
Loading