Skip to content

Commit e7ec755

Browse files
cursoragentxxg1413
andcommitted
fix: list all 12 courses in llms.txt and guard its paths with a test
llms.txt listed 8 of 12 courses, pointed at a nonexistent courses/hands-on-with-openai-codex-cli/ folder, and recommended `uv run pytest`, which fails because pytest lives in the dev extra. The new course lines reuse each COURSE.md summary. The new test fails on any listed path that does not exist and on any unlisted course. Co-authored-by: P小二 <xxg1413@gmail.com>
1 parent 14565ec commit e7ec755

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

‎llms.txt‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
## Quick API and Automation Commands
66

7-
- Run full test suite with uv: `uv run pytest`
7+
- Install development dependencies: `python -m pip install -r requirements-dev.lock.txt`
8+
- Run every CI check (lint, tests, exports, examples, courses, paths): `make check`
9+
- Run the test suite only: `python -m pytest`
810
- Verify runnable examples: `python tools/verify_examples.py`
911
- Verify course folders: `python tools/verify_courses.py`
1012
- Validate and inspect resource catalog: `python tools/validate_catalog.py`
@@ -19,7 +21,11 @@
1921
- `catalog/projects/`: One reviewed YAML file per Project Radar entry (discovery candidates are produced on demand by `tools/radar_scan.py`).
2022
- `courses/`: Challenge course folders — solve the `TASK.md` contract with a coding agent and prove it with `verify.py` claim codes; `COURSE.md` still offers a guided, agent-taught mode:
2123
- `courses/hands-on-python-with-claude-code/`: Task contract, bounded change, and objective verify.py evidence with Claude Code (EN+ZH lessons, three scenario skins).
22-
- `courses/hands-on-with-openai-codex-cli/`: The same verified workflow taught with the OpenAI Codex CLI (EN+ZH lessons, reuses the flagship scenario skins).
24+
- `courses/hands-on-with-openai-codex/`: The same verified workflow taught hands-on in the Codex desktop app, where an agent thread runs the loop and you supervise diffs and approvals (EN+ZH).
25+
- `courses/hands-on-with-cursor/`: The same verified workflow taught hands-on in Cursor, where Agent mode runs the loop and you supervise diffs and project rules (EN+ZH).
26+
- `courses/hands-on-with-deepseek-harness/`: The same verified workflow taught hands-on in DeepSeek Harness, where the agent loop is composed from plugins and every step lands in an inspectable trajectory (EN+ZH).
27+
- `courses/hands-on-with-kimi-code/`: The same verified workflow taught hands-on in Kimi Code, where built-in subagents split read-only exploration, planning, and the edits you approve (EN+ZH).
28+
- `courses/hands-on-with-zcode/`: The same verified workflow taught hands-on in the ZCode desktop workspace, where Goal Mode decomposes the work and the Git state shows every change (EN+ZH).
2329
- `courses/agent-rules-single-source/`: Build a checker that proves one AGENTS.md source of truth across CLAUDE.md and .cursorrules (EN+ZH, three drift scenarios).
2430
- `courses/verifying-ai-generated-code/`: Build the release-evidence machine: run checks, parse results, refuse zero-test projects, write SHIP-RECORD.json (EN+ZH, three project skins).
2531
- `courses/mcp-server-in-python/`: Build a stateless 2026-07-28 MCP tool server in pure Python — reuses the reviewed mcp-server example core (EN+ZH).

‎tests/test_llms_txt.py‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"""llms.txt is the entry point agents read first, so a stale path or a missing
2+
course sends them to a 404 or hides a course entirely."""
3+
4+
from __future__ import annotations
5+
6+
import re
7+
from pathlib import Path
8+
9+
ROOT = Path(__file__).resolve().parents[1]
10+
LLMS = ROOT / "llms.txt"
11+
REPO_PATH = re.compile(
12+
r"`((?:catalog|courses|examples|guides|paths|playbooks|schema|templates|tools)/[^`\s]*)`"
13+
)
14+
15+
16+
def _listed_paths() -> list[str]:
17+
return REPO_PATH.findall(LLMS.read_text(encoding="utf-8"))
18+
19+
20+
def test_every_repository_path_exists() -> None:
21+
missing = [path for path in _listed_paths() if not (ROOT / path).exists()]
22+
assert not missing, f"llms.txt points at paths that do not exist: {missing}"
23+
24+
25+
def test_every_course_folder_is_listed() -> None:
26+
listed = {path.rstrip("/") for path in _listed_paths()}
27+
courses = sorted(
28+
f"courses/{course.name}"
29+
for course in (ROOT / "courses").iterdir()
30+
if (course / "COURSE.md").is_file()
31+
)
32+
unlisted = [course for course in courses if course not in listed]
33+
assert not unlisted, f"llms.txt does not list these courses: {unlisted}"

0 commit comments

Comments
 (0)