Skip to content

Commit 3a7f7fe

Browse files
author
Rex
committed
docs(examples): expand case tasks to 12 bilingual scenarios
1 parent 0ac10a8 commit 3a7f7fe

15 files changed

Lines changed: 396 additions & 0 deletions
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Commit Diff Risk Review
2+
3+
**Goal:** review recent changes and produce a severity-ranked risk list.
4+
5+
## Run
6+
7+
1) `cd` into the repository.
8+
9+
2) Run:
10+
11+
=== "macOS/Linux"
12+
```bash
13+
loopforge agent run --workspace . --prompt "Review the most recent 5 commits and changed files in this repository. Write notes/commit-diff-risk-review.md with sections: High risk, Medium risk, Low risk. For each item include why it is risky, likely user impact, and a concrete test or check command. Keep it concise and technical."
14+
```
15+
16+
=== "Windows (PowerShell)"
17+
```powershell
18+
loopforge agent run --workspace . --prompt "Review the most recent 5 commits and changed files in this repository. Write notes/commit-diff-risk-review.md with sections: High risk, Medium risk, Low risk. For each item include why it is risky, likely user impact, and a concrete test or check command. Keep it concise and technical."
19+
```
20+
21+
## What to expect
22+
23+
- `notes/commit-diff-risk-review.md`
24+
25+
!!! tip
26+
Add "focus on behavioral regressions" if you want stricter review tone.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Config Health Check
2+
3+
**Goal:** verify config + doctor status and produce an actionable health note.
4+
5+
## Run
6+
7+
1) Execute health commands:
8+
9+
=== "macOS/Linux"
10+
```bash
11+
loopforge config validate | tee notes/config-validate.txt
12+
loopforge doctor | tee notes/doctor.txt
13+
```
14+
15+
=== "Windows (PowerShell)"
16+
```powershell
17+
loopforge config validate | Tee-Object -FilePath notes/config-validate.txt
18+
loopforge doctor | Tee-Object -FilePath notes/doctor.txt
19+
```
20+
21+
2) Generate summary note:
22+
23+
=== "macOS/Linux"
24+
```bash
25+
loopforge agent run --workspace . --prompt "Read notes/config-validate.txt and notes/doctor.txt. Write notes/config-health-check.md with: 1) current status 2) blocking errors 3) non-blocking warnings 4) exact next commands to fix top 3 issues."
26+
```
27+
28+
=== "Windows (PowerShell)"
29+
```powershell
30+
loopforge agent run --workspace . --prompt "Read notes/config-validate.txt and notes/doctor.txt. Write notes/config-health-check.md with: 1) current status 2) blocking errors 3) non-blocking warnings 4) exact next commands to fix top 3 issues."
31+
```
32+
33+
## What to expect
34+
35+
- `notes/config-validate.txt`
36+
- `notes/doctor.txt`
37+
- `notes/config-health-check.md`
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Fix One Failing Test (Minimal Change)
2+
3+
**Goal:** identify one failing test, apply the smallest safe fix, and record what changed.
4+
5+
## Run
6+
7+
1) `cd` into the repository.
8+
9+
2) Run:
10+
11+
=== "macOS/Linux"
12+
```bash
13+
loopforge agent run --workspace . --prompt "Find the primary test command for this repo (Cargo/npm/pnpm/pytest/go test, etc.), run it once, pick exactly one failing test, and fix only that failure with the smallest safe code change. Then rerun only the relevant tests to confirm the fix. Write notes/fix-one-failing-test.md with: failing symptom, root cause, files changed, verification command, and remaining risks. If no failing tests exist, write notes/fix-one-failing-test.md saying no failure was found and list what command you ran."
14+
```
15+
16+
=== "Windows (PowerShell)"
17+
```powershell
18+
loopforge agent run --workspace . --prompt "Find the primary test command for this repo (Cargo/npm/pnpm/pytest/go test, etc.), run it once, pick exactly one failing test, and fix only that failure with the smallest safe code change. Then rerun only the relevant tests to confirm the fix. Write notes/fix-one-failing-test.md with: failing symptom, root cause, files changed, verification command, and remaining risks. If no failing tests exist, write notes/fix-one-failing-test.md saying no failure was found and list what command you ran."
19+
```
20+
21+
## What to expect
22+
23+
- `notes/fix-one-failing-test.md`
24+
- One small, focused code/test change (when a real failure exists)
25+
26+
!!! tip "Keep scope tight"
27+
Add: "Do not refactor unrelated code" to avoid broad edits.

docs-site/examples/case-tasks/index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,30 @@ Pick a scenario and run it locally. Each page is designed to be **copy‑paste f
2020
Extract PDF text with `pdf` and write a concise summary.
2121
[Open](pdf-summarize.md)
2222

23+
- :material-stethoscope: **Config health check**
24+
Run `config validate` + `doctor`, then produce an actionable fix note.
25+
[Open](config-health-check.md)
26+
27+
- :material-test-tube: **Fix one failing test**
28+
Pick one failing test and repair it with minimal safe changes.
29+
[Open](fix-one-failing-test.md)
30+
31+
- :material-clipboard-check: **Release readiness audit**
32+
Preflight version/changelog/workflow readiness before tagging.
33+
[Open](release-readiness-audit.md)
34+
35+
- :material-alert-outline: **Commit diff risk review**
36+
Review recent changes and produce a severity-ranked risk list.
37+
[Open](commit-diff-risk-review.md)
38+
39+
- :material-source-branch: **Provider routing plan**
40+
Draft local/team/CI routing profiles with cost-latency-quality tradeoffs.
41+
[Open](provider-routing-plan.md)
42+
43+
- :material-radar: **Regression test gap map**
44+
Identify risky areas lacking regression coverage and propose top tests.
45+
[Open](regression-test-gap.md)
46+
2347
- :material-rocket-launch: **10 copy/paste tasks**
2448
A ready-to-run set for onboarding, coding, review, docs, and release prep.
2549
[Open](ten-copy-paste-tasks.md)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Provider Routing Plan (Local / Team / CI)
2+
3+
**Goal:** draft a practical provider-routing plan for different operating modes.
4+
5+
## Run
6+
7+
1) `cd` into the repository.
8+
9+
2) Run:
10+
11+
=== "macOS/Linux"
12+
```bash
13+
loopforge agent run --workspace . --prompt "Read docs that describe providers and routing (for example docs-site/how-to/providers.md and docs-site/reference/config.md). Write notes/provider-routing-plan.md with 3 profiles: Local dev (cheap), Team default (balanced), CI/release checks (stable). For each profile provide provider/model choices, fallback strategy, and expected tradeoffs (cost/latency/quality)."
14+
```
15+
16+
=== "Windows (PowerShell)"
17+
```powershell
18+
loopforge agent run --workspace . --prompt "Read docs that describe providers and routing (for example docs-site/how-to/providers.md and docs-site/reference/config.md). Write notes/provider-routing-plan.md with 3 profiles: Local dev (cheap), Team default (balanced), CI/release checks (stable). For each profile provide provider/model choices, fallback strategy, and expected tradeoffs (cost/latency/quality)."
19+
```
20+
21+
## What to expect
22+
23+
- `notes/provider-routing-plan.md`
24+
25+
!!! note
26+
This task drafts a plan first. Apply config changes only after review.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Regression Test Gap Map
2+
3+
**Goal:** find risky areas that lack regression tests and propose targeted test cases.
4+
5+
## Run
6+
7+
1) `cd` into the repository.
8+
9+
2) Run:
10+
11+
=== "macOS/Linux"
12+
```bash
13+
loopforge agent run --workspace . --prompt "Inspect src/ (or equivalent code folders), existing test folders, and recent changes. Write notes/regression-test-gap.md with: 1) critical behaviors that could regress 2) current test coverage signals 3) top 5 missing regression tests (with test names and what each asserts) 4) the first test you would implement now and why."
14+
```
15+
16+
=== "Windows (PowerShell)"
17+
```powershell
18+
loopforge agent run --workspace . --prompt "Inspect src/ (or equivalent code folders), existing test folders, and recent changes. Write notes/regression-test-gap.md with: 1) critical behaviors that could regress 2) current test coverage signals 3) top 5 missing regression tests (with test names and what each asserts) 4) the first test you would implement now and why."
19+
```
20+
21+
## What to expect
22+
23+
- `notes/regression-test-gap.md`
24+
25+
!!! tip
26+
Ask for "prioritize user-facing failures" to keep the list actionable.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Release Readiness Audit
2+
3+
**Goal:** generate a release checklist with concrete blockers before tagging.
4+
5+
## Run
6+
7+
1) `cd` into the target repository.
8+
9+
2) Run:
10+
11+
=== "macOS/Linux"
12+
```bash
13+
loopforge agent run --workspace . --prompt "Audit release readiness for this repo. Inspect Cargo.toml (or package metadata), CHANGELOG.md, release workflows in .github/workflows, and scripts/package_release.py (if present). Write notes/release-readiness-audit.md with sections: 1) Version/tag consistency 2) Changelog readiness 3) CI/release workflow readiness 4) Packaging artifact naming checks 5) Blockers (P0/P1) 6) Recommended next release command sequence. Keep it practical and command-oriented."
14+
```
15+
16+
=== "Windows (PowerShell)"
17+
```powershell
18+
loopforge agent run --workspace . --prompt "Audit release readiness for this repo. Inspect Cargo.toml (or package metadata), CHANGELOG.md, release workflows in .github/workflows, and scripts/package_release.py (if present). Write notes/release-readiness-audit.md with sections: 1) Version/tag consistency 2) Changelog readiness 3) CI/release workflow readiness 4) Packaging artifact naming checks 5) Blockers (P0/P1) 6) Recommended next release command sequence. Keep it practical and command-oriented."
19+
```
20+
21+
## What to expect
22+
23+
- `notes/release-readiness-audit.md`
24+
25+
!!! note
26+
This task is for preflight analysis. It should not create tags or publish releases.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 最近提交风险评审
2+
3+
**目标:** 对近期改动做按严重级别排序的风险评审。
4+
5+
## 运行
6+
7+
1)`cd` 到目标仓库。
8+
9+
2) 执行:
10+
11+
=== "macOS/Linux"
12+
```bash
13+
loopforge agent run --workspace . --prompt "审查这个仓库最近 5 个提交和变更文件。写 notes/commit-diff-risk-review.md,按 High/Medium/Low 三个等级列风险。每条都要包含:风险原因、可能用户影响、一个可执行的测试或检查命令。内容要简洁、技术导向。"
14+
```
15+
16+
=== "Windows (PowerShell)"
17+
```powershell
18+
loopforge agent run --workspace . --prompt "审查这个仓库最近 5 个提交和变更文件。写 notes/commit-diff-risk-review.md,按 High/Medium/Low 三个等级列风险。每条都要包含:风险原因、可能用户影响、一个可执行的测试或检查命令。内容要简洁、技术导向。"
19+
```
20+
21+
## 预期产物
22+
23+
- `notes/commit-diff-risk-review.md`
24+
25+
!!! tip
26+
如果你想更偏 code review,可以加一句:"重点关注行为回归"。
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# 配置健康检查
2+
3+
**目标:** 验证配置和 doctor 状态,并生成可执行的修复建议。
4+
5+
## 运行
6+
7+
1) 先执行健康检查命令:
8+
9+
=== "macOS/Linux"
10+
```bash
11+
loopforge config validate | tee notes/config-validate.txt
12+
loopforge doctor | tee notes/doctor.txt
13+
```
14+
15+
=== "Windows (PowerShell)"
16+
```powershell
17+
loopforge config validate | Tee-Object -FilePath notes/config-validate.txt
18+
loopforge doctor | Tee-Object -FilePath notes/doctor.txt
19+
```
20+
21+
2) 让 Agent 产出总结:
22+
23+
=== "macOS/Linux"
24+
```bash
25+
loopforge agent run --workspace . --prompt "读取 notes/config-validate.txt 和 notes/doctor.txt。写 notes/config-health-check.md,包含:1) 当前状态 2) 阻塞错误 3) 非阻塞告警 4) 修复前三个问题的具体命令。"
26+
```
27+
28+
=== "Windows (PowerShell)"
29+
```powershell
30+
loopforge agent run --workspace . --prompt "读取 notes/config-validate.txt 和 notes/doctor.txt。写 notes/config-health-check.md,包含:1) 当前状态 2) 阻塞错误 3) 非阻塞告警 4) 修复前三个问题的具体命令。"
31+
```
32+
33+
## 预期产物
34+
35+
- `notes/config-validate.txt`
36+
- `notes/doctor.txt`
37+
- `notes/config-health-check.md`
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# 修复一个失败测试(最小改动)
2+
3+
**目标:** 找出一个失败测试,用最小安全改动修复,并记录修复过程。
4+
5+
## 运行
6+
7+
1)`cd` 到目标仓库。
8+
9+
2) 执行:
10+
11+
=== "macOS/Linux"
12+
```bash
13+
loopforge agent run --workspace . --prompt "识别这个仓库的主测试命令(如 Cargo/npm/pnpm/pytest/go test),先跑一遍测试,只选择一个失败用例进行修复,并保持改动最小。然后只重跑相关测试确认修复。最后写 notes/fix-one-failing-test.md,包含:失败现象、根因、修改文件、验证命令、剩余风险。如果没有失败测试,也要写 notes/fix-one-failing-test.md 说明未发现失败并给出你执行的命令。"
14+
```
15+
16+
=== "Windows (PowerShell)"
17+
```powershell
18+
loopforge agent run --workspace . --prompt "识别这个仓库的主测试命令(如 Cargo/npm/pnpm/pytest/go test),先跑一遍测试,只选择一个失败用例进行修复,并保持改动最小。然后只重跑相关测试确认修复。最后写 notes/fix-one-failing-test.md,包含:失败现象、根因、修改文件、验证命令、剩余风险。如果没有失败测试,也要写 notes/fix-one-failing-test.md 说明未发现失败并给出你执行的命令。"
19+
```
20+
21+
## 预期产物
22+
23+
- `notes/fix-one-failing-test.md`
24+
- 一处小而聚焦的代码/测试改动(当确实存在失败测试时)
25+
26+
!!! tip "控制范围"
27+
可以在 prompt 里补一句:"不要重构无关代码"。

0 commit comments

Comments
 (0)