Skip to content

Harness engineering beginner tutorial, from 0 to 1

Refine README screenshots and lecture 01 diagrams

sanbuphyc491d171f54e
diff --git a/README-CN.md b/README-CN.md
index cb5c4ee..2814887 100644
--- a/README-CN.md
+++ b/README-CN.md
@@ -15,21 +15,17 @@ Learn Harness Engineering 是一门专注于 AI 编程智能体工程化落地
## 页面截图
-### 中文
+中文首页
-<p>
- <img src="./docs/public/screenshots/readme/zh-home.png" alt="中文首页预览" width="32%" />
- <img src="./docs/public/screenshots/readme/zh-lecture-01.png" alt="中文讲义预览" width="32%" />
- <img src="./docs/public/screenshots/readme/zh-resources.png" alt="中文资料库预览" width="32%" />
-</p>
+![中文首页预览](./docs/public/screenshots/readme/zh-home.png)
-### English
+中文讲义页
-<p>
- <img src="./docs/public/screenshots/readme/en-home.png" alt="English homepage preview" width="32%" />
- <img src="./docs/public/screenshots/readme/en-lecture-01.png" alt="English lecture preview" width="32%" />
- <img src="./docs/public/screenshots/readme/en-resources.png" alt="English resources preview" width="32%" />
-</p>
+![中文讲义预览](./docs/public/screenshots/readme/zh-lecture-01.png)
+
+中文资料库
+
+![中文资料库预览](./docs/public/screenshots/readme/zh-resources.png)
## PDF 构建与 Release 流水线
diff --git a/README.md b/README.md
index 55d85eb..fa95f15 100644
--- a/README.md
+++ b/README.md
@@ -15,21 +15,17 @@ Learn Harness Engineering is a course dedicated to the engineering of AI coding
## Visual Preview
-### English
+English home page
-<p>
- <img src="./docs/public/screenshots/readme/en-home.png" alt="English homepage preview" width="32%" />
- <img src="./docs/public/screenshots/readme/en-lecture-01.png" alt="English lecture preview" width="32%" />
- <img src="./docs/public/screenshots/readme/en-resources.png" alt="English resources preview" width="32%" />
-</p>
+![English homepage preview](./docs/public/screenshots/readme/en-home.png)
-### 中文
+English lecture page
-<p>
- <img src="./docs/public/screenshots/readme/zh-home.png" alt="中文首页预览" width="32%" />
- <img src="./docs/public/screenshots/readme/zh-lecture-01.png" alt="中文讲义预览" width="32%" />
- <img src="./docs/public/screenshots/readme/zh-resources.png" alt="中文资料库预览" width="32%" />
-</p>
+![English lecture preview](./docs/public/screenshots/readme/en-lecture-01.png)
+
+English resource library
+
+![English resources preview](./docs/public/screenshots/readme/en-resources.png)
## PDF Coursebooks
diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css
index ebbd146..367d183 100644
--- a/docs/.vitepress/theme/style.css
+++ b/docs/.vitepress/theme/style.css
@@ -538,18 +538,17 @@
margin: 20px 0;
display: flex;
justify-content: center;
- overflow-x: auto;
+ overflow-x: visible;
overflow-y: visible;
- -webkit-overflow-scrolling: touch;
cursor: zoom-in;
position: relative;
}
.vp-doc .mermaid svg {
display: block;
- width: clamp(780px, 100%, 1040px) !important;
- max-width: none !important;
- min-width: 780px;
+ width: 100% !important;
+ max-width: 100% !important;
+ min-width: 0;
height: auto !important;
margin: 0 auto;
}
@@ -557,7 +556,7 @@
.vp-doc .mermaid .label,
.vp-doc .mermaid .nodeLabel,
.vp-doc .mermaid .edgeLabel {
- font-size: 18px !important;
+ font-size: 16px !important;
}
.vp-doc .mermaid::after {
@@ -601,14 +600,15 @@ html:lang(zh-CN) .vp-doc .mermaid::after {
}
.vp-doc .mermaid svg {
- width: clamp(640px, 100%, 920px) !important;
- min-width: 640px;
+ width: 100% !important;
+ max-width: 100% !important;
+ min-width: 0;
}
.vp-doc .mermaid .label,
.vp-doc .mermaid .nodeLabel,
.vp-doc .mermaid .edgeLabel {
- font-size: 16px !important;
+ font-size: 14px !important;
}
.vp-doc .mermaid::after {
diff --git a/docs/en/lectures/lecture-01-why-capable-agents-still-fail/index.md b/docs/en/lectures/lecture-01-why-capable-agents-still-fail/index.md
index 65e2f61..7808e67 100644
--- a/docs/en/lectures/lecture-01-why-capable-agents-still-fail/index.md
+++ b/docs/en/lectures/lecture-01-why-capable-agents-still-fail/index.md
@@ -24,20 +24,26 @@ This isn't because the model isn't smart enough. It's because the working enviro
```mermaid
flowchart TB
- Spec["Task not specific<br/>'add search' can mean many things"] --> Fail["Result:<br/>agent writes code<br/>but work is unreliable"]
- Context["Project rules missing<br/>agent cannot see them"] --> Fail
- Env["Environment broken<br/>deps or commands fail"] --> Fail
- Verify["No tests or check commands"] --> Fail
- State["No progress file<br/>next session starts blind"] --> Fail
- Fail --> Fix["Fix the broken layer,<br/>then rerun"]
+ Start["Start the task"] --> Q1{"Is the task specific?"}
+ Q1 -->|No| Bad["Result:<br/>lots of code<br/>still unstable"]
+ Q1 -->|Yes| Q2{"Are the rules in the repo?"}
+ Q2 -->|No| Bad
+ Q2 -->|Yes| Q3{"Does the environment run?"}
+ Q3 -->|No| Bad
+ Q3 -->|Yes| Q4{"Are there check commands?"}
+ Q4 -->|No| Bad
+ Q4 -->|Yes| Q5{"Is progress recorded?"}
+ Q5 -->|No| Bad
+ Q5 -->|Yes| Good["More likely to finish cleanly"]
```
```mermaid
-flowchart LR
- Same["Same prompt<br/>same model"] --> Bare["Bare run<br/>20 min / $9<br/>core features broken"]
- Same --> Full["Add planning, checks, and evaluation<br/>6 hr / $200<br/>playable app"]
- Bare --> Lesson["Only the harness changed"]
- Full --> Lesson
+flowchart TB
+ Same["Same task<br/>same model"]
+ Same --> Bare["Just one prompt<br/>20 min / $9"]
+ Same --> Full["Rules and checks first<br/>6 hr / $200"]
+ Bare --> Bad["Core features broken"]
+ Full --> Good["Playable app"]
```
## Why This Happens
diff --git a/docs/zh/lectures/lecture-01-why-capable-agents-still-fail/index.md b/docs/zh/lectures/lecture-01-why-capable-agents-still-fail/index.md
index e9f815b..96bc6bc 100644
--- a/docs/zh/lectures/lecture-01-why-capable-agents-still-fail/index.md
+++ b/docs/zh/lectures/lecture-01-why-capable-agents-still-fail/index.md
@@ -24,20 +24,26 @@
```mermaid
flowchart TB
- Spec["任务没写清楚<br/>比如“加搜索”含义很多"] --> Fail["结果:<br/>agent 写了很多代码<br/>但做事还是不稳定"]
- Context["项目规则没写进仓库<br/>agent 看不到"] --> Fail
- Env["环境没配好<br/>依赖或命令跑不起来"] --> Fail
- Verify["没有测试或检查命令"] --> Fail
- State["没有进度文件<br/>下一会话两眼一抹黑"] --> Fail
- Fail --> Fix["把出错那一层补上<br/>再重新跑"]
+ Start["开始做任务"] --> Q1{"任务写清了吗?"}
+ Q1 -->|否| Bad["结果:<br/>写了很多代码<br/>但还是不稳"]
+ Q1 -->|是| Q2{"规则写进仓库了吗?"}
+ Q2 -->|否| Bad
+ Q2 -->|是| Q3{"环境跑得起来吗?"}
+ Q3 -->|否| Bad
+ Q3 -->|是| Q4{"有检查命令吗?"}
+ Q4 -->|否| Bad
+ Q4 -->|是| Q5{"有进度记录吗?"}
+ Q5 -->|否| Bad
+ Q5 -->|是| Good["更容易稳定完成"]
```
```mermaid
-flowchart LR
- Same["同一个任务<br/>同一个模型"] --> Bare["裸跑<br/>20 分钟 / $9<br/>核心功能失效"]
- Same --> Full["加上规划、检查和评估<br/>6 小时 / $200<br/>应用可以正常使用"]
- Bare --> Lesson["变的只有 harness"]
- Full --> Lesson
+flowchart TB
+ Same["同一个任务<br/>同一个模型"]
+ Same --> Bare["只给一句话<br/>20 分钟 / $9"]
+ Same --> Full["先定规则和检查<br/>6 小时 / $200"]
+ Bare --> Bad["核心功能失效"]
+ Full --> Good["应用可用"]
```
## 为什么会这样