Skip to content

Commit 0ade773

Browse files
committed
feat: add agent-taught courses, Project Radar data model, and 0.0.3 contracts
- courses/ content type with the flagship Claude Code hands-on course (EN+ZH lessons, three scenario skins, task contract, starter/solution, verify.py objective evidence, REVIEW.md record) - tools/verify_courses.py course-contract verifier wired into Makefile and CI - catalog/projects/ per-project YAML (7 seeds) with ai_familiarity, bilingual generated Radar tables, radar.json export + radar-v1 schema, and --target both support in export_catalog.py - tools/radar_scan.py read-only candidate discovery (GitHub/PyPI/HN) with the no-verdict guarantee enforced by tests - content-manifest schema + builder gain the course type - course-feedback issue template; llms.txt courses and radar sections - README course banner plus contextual flypython.com footers on every guide, playbook, and example per REPO_TO_WEBSITE.md
1 parent 8bc60eb commit 0ade773

98 files changed

Lines changed: 3835 additions & 140 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Course feedback
2+
description: Report teaching drift, an unclear lesson, or a verify.py mismatch in a course folder.
3+
title: "[Course]: "
4+
labels: ["course-feedback"]
5+
body:
6+
- type: input
7+
id: course
8+
attributes:
9+
label: Course folder
10+
description: Which courses/<slug>/ folder did you take?
11+
placeholder: courses/hands-on-python-with-claude-code/
12+
validations:
13+
required: true
14+
- type: dropdown
15+
id: kind
16+
attributes:
17+
label: What went wrong?
18+
options:
19+
- The agent drifted from COURSE.md (ignored rules, scope, or lesson order)
20+
- A lesson was unclear or wrong
21+
- verify.py result did not match the lesson's checkpoint
22+
- Starter/solution/tests problem
23+
- Something else
24+
validations:
25+
required: true
26+
- type: input
27+
id: lesson
28+
attributes:
29+
label: Lesson
30+
description: Which lesson (L01–L05), if lesson-specific?
31+
validations:
32+
required: false
33+
- type: textarea
34+
id: detail
35+
attributes:
36+
label: What happened?
37+
description: Describe what the agent did or what confused you. Include the exact command and output when reporting a verify.py mismatch.
38+
validations:
39+
required: true
40+
- type: input
41+
id: environment
42+
attributes:
43+
label: Environment
44+
description: Tool and version (e.g. Claude Code 2.x), Python version, operating system.
45+
validations:
46+
required: true

.github/workflows/validate.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
- name: Validate catalog
4646
run: python tools/validate_catalog.py
4747

48-
- name: Verify public JSON export
49-
run: python tools/export_catalog.py --check
48+
- name: Verify public JSON exports
49+
run: python tools/export_catalog.py --check --target both
5050

5151
- name: Verify browsable README indexes
5252
run: python tools/render_readmes.py --check
@@ -56,3 +56,6 @@ jobs:
5656

5757
- name: Verify runnable examples
5858
run: python tools/verify_examples.py
59+
60+
- name: Verify course folders
61+
run: python tools/verify_courses.py

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ __pycache__/
4242

4343
# Generated reports
4444
reports/
45+
46+
# Course scenario output written by learners running report_tool.py
47+
courses/*/scenario/*/report.json
48+
courses/*/scenario/*/report.json.tmp

AGENTS.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,36 @@ reviewed catalog data, and stable public JSON contracts.
2727
- Governance documents (`AGENTS.md`, `CONTRIBUTING.md`, `docs/CONSUMING.md`,
2828
`docs/CURATION_POLICY.md`, `docs/REPO_TO_WEBSITE.md`, plans) are
2929
English-canonical; a `_cn` companion may exist but the English text governs.
30-
- Add first-party guides and playbooks to `content-manifest.json`; keep each
31-
locale pair aligned and verify its source checksum.
30+
- Add first-party guides, playbooks, and courses to `content-manifest.json`;
31+
keep each locale pair aligned and verify its source checksum.
32+
- Courses live one folder per course under `courses/<slug>/` and are taught by
33+
an AI coding agent from the files themselves: `COURSE.md` (metadata plus the
34+
teaching contract: audience, prerequisites, exact tool and version,
35+
lesson order, teaching-style rules, when to stop, how to use `verify.py`,
36+
and what the course does not cover), `lessons/L01.md` with `L01_cn.md`
37+
pairs (objective, exercise, checkpoint, expected evidence), `scenario/`
38+
data files for each skin, `TASK.md`/`TASK_cn.md` (task contract),
39+
`starter/` and `solution/` runnable pairs, stdlib-only `verify.py` that
40+
fails on `starter` and passes on `solution`, and `REVIEW.md` recording the
41+
maintainer run-through (date, tool, version, observed agent deviations).
42+
A course is incomplete until every lesson ships EN+ZH in the same change;
43+
`COURSE.md` must name the exact tool version it was taught with, and a tool
44+
major release triggers re-review. Never claim guaranteed learning outcomes.
3245
- Treat HTTP 403, 429, and transient 5xx responses as review-needed states, not
3346
automatic proof that a resource is broken.
3447

3548
## Change workflow
3649

3750
- Work on a feature branch and preserve unrelated contributor changes.
3851
- Run the repository validation workflow before committing.
39-
- Regenerate `catalog.json` after source changes and verify it with
40-
`python tools/export_catalog.py --check`.
41-
- Regenerate both README catalog indexes and verify them with
42-
`python tools/render_readmes.py --check`.
52+
- Regenerate `catalog.json` and `radar.json` after source changes and verify
53+
them with `python tools/export_catalog.py --check --target both`.
54+
- Regenerate both README catalog indexes and the Project Radar table, then
55+
verify them with `python tools/render_readmes.py --check`.
4356
- Regenerate `content-manifest.json` and verify it with
4457
`python tools/build_content_manifest.py --check`.
45-
- Verify every runnable example with `python tools/verify_examples.py`.
58+
- Verify every runnable example with `python tools/verify_examples.py` and
59+
every course folder with `python tools/verify_courses.py`.
4660
- Website consumers must pin a full repository commit and verify the catalog
4761
checksum. Do not make production builds depend on a moving branch.
4862
- Keep external-link checks read-only, rate-limited, retryable, and blocked from

CHANGELOG.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,38 @@ This file records notable catalog-contract and maintenance changes.
66

77
### Added
88

9+
- A `courses/` content type: agent-taught folders with COURSE.md teaching
10+
contracts, bilingual lesson pairs, scenario skins, task contracts, runnable
11+
starter/solution pairs, and objective `verify.py` completion evidence.
12+
- First flagship course "Hands-on Python with Claude Code" (EN+ZH, five
13+
lessons, three scenario skins, REVIEW.md run-through record).
14+
- `tools/verify_courses.py` enforcing the course folder contract, wired into
15+
the Makefile and the validation workflow.
16+
- Project Radar per-project YAML records (`catalog/projects/*.yml`) with
17+
lifecycle status, maintenance evidence, and `ai_familiarity` grading.
18+
- Deterministic `radar.json` export with `schema/radar-v1.schema.json` and
19+
`--check` support in `tools/export_catalog.py` (`--target both`).
20+
- Bilingual generated Radar tables in `catalog/projects/README.md` and
21+
`README_cn.md`.
22+
- `tools/radar_scan.py`: read-only, rate-limited discovery of Radar review
23+
candidates from GitHub Search, the PyPI feed, and Hacker News — candidates
24+
only, never descriptions or status.
25+
- A `course-feedback` issue template for teaching drift and verify mismatches.
26+
- `content-manifest.json` and its schema now carry `course` documents.
27+
- Courses and Radar sections in `llms.txt`.
28+
29+
### Changed
30+
31+
- README/README_cn gained a course banner, a courses row, and contextual
32+
flypython.com footers on every guide, playbook, and example (first-party
33+
continuation links per `docs/REPO_TO_WEBSITE.md`).
34+
- The validation workflow now verifies the radar export and every course
35+
folder in addition to the existing gates.
36+
- Bilingual guide-URL tests now allow first-party flypython.com footer links
37+
alongside reviewed catalog URLs.
38+
39+
### Added (0.0.2 and earlier)
40+
941
- A complete bilingual Python AI-coding workflow covering task contracts,
1042
repository inspection, reproducible environments, bounded changes, tests,
1143
runtime verification, side-effect review, and evidence-based delivery.
@@ -32,7 +64,7 @@ This file records notable catalog-contract and maintenance changes.
3264
state, and source checksums for pinned website consumers.
3365
- A human-review contribution queue for current Python Project Radar entries.
3466

35-
### Changed
67+
### Changed (0.0.2 and earlier)
3668

3769
- Defined this repository as the canonical Python product-engineering content,
3870
catalog-data, and review layer behind flypython.com, rather than a second
@@ -44,7 +76,7 @@ This file records notable catalog-contract and maintenance changes.
4476
- Reduced the required local toolchain to Python 3.12 and locked Python
4577
dependencies.
4678

47-
### Removed
79+
### Removed (0.0.2 and earlier)
4880

4981
- Removed Jekyll, Ruby, page templates, styles, scripts, social assets, CNAME,
5082
robots configuration, and site-rendering tests.

Makefile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
.PHONY: help check export render manifest test verify lint typecheck all
1+
.PHONY: help check export render manifest test verify courses lint typecheck all
22

33
PYTHON ?= python3
44

55
help:
66
@echo "FlyPython Development Workflow:"
7-
@echo " make check - Run all catalog, export, readme, manifest, and example checks"
8-
@echo " make export - Regenerate catalog.json"
9-
@echo " make render - Regenerate README and README_cn catalog indexes"
7+
@echo " make check - Run all catalog, radar, export, readme, manifest, example, and course checks"
8+
@echo " make export - Regenerate catalog.json and radar.json"
9+
@echo " make render - Regenerate README and README_cn catalog indexes plus the Radar table"
1010
@echo " make manifest - Regenerate content-manifest.json"
1111
@echo " make test - Run pytest test suite"
1212
@echo " make verify - Verify all runnable examples"
13+
@echo " make courses - Verify all course folders"
1314
@echo " make all - Regenerate all exports and run all checks and tests"
1415

1516
check:
1617
$(PYTHON) tools/validate_catalog.py
17-
$(PYTHON) tools/export_catalog.py --check
18+
$(PYTHON) tools/export_catalog.py --check --target both
1819
$(PYTHON) tools/render_readmes.py --check
1920
$(PYTHON) tools/build_content_manifest.py --check
2021
$(PYTHON) tools/verify_examples.py
22+
$(PYTHON) tools/verify_courses.py
2123

2224
export:
23-
$(PYTHON) tools/export_catalog.py
25+
$(PYTHON) tools/export_catalog.py --target both
2426

2527
render:
2628
$(PYTHON) tools/render_readmes.py
@@ -34,4 +36,7 @@ test:
3436
verify:
3537
$(PYTHON) tools/verify_examples.py
3638

39+
courses:
40+
$(PYTHON) tools/verify_courses.py
41+
3742
all: export render manifest test check

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
[English](README.md) · [中文](README_cn.md) · [🌐 Online Portal](https://flypython.com)
88

9+
> **New — agent-taught courses with objective verification.** Download a
10+
> folder from [`courses/`](courses/), open it in your coding agent, and say
11+
> *"start lesson 1"*. Every course ends with a `verify.py` command that
12+
> proves what you built. Continue the same journey on
13+
> [flypython.com](https://flypython.com/).
14+
915
FlyPython is a practical, bilingual repository for writing good Python and
1016
turning it into products people can rely on. It combines AI-coding methods,
1117
task playbooks, runnable examples, reusable templates, and reviewed primary
@@ -35,6 +41,7 @@ to a coding agent (Cursor, Windsurf, Claude Code, Copilot) and make the starter
3541

3642
| Goal | Start here | What you will produce |
3743
| --- | --- | --- |
44+
| Learn hands-on with your coding agent | [Agent-taught courses](courses/) | A verified project: task contract → bounded change → `verify.py` evidence |
3845
| Write and change Python safely | [AI Coding workflow](guides/ai-coding/workflow.md) | A bounded change with explicit context and evidence |
3946
| Turn Python into a reliable product | [Product quality guide](guides/python-engineering/product-quality.md) | A tested, observable, reversible product path |
4047
| Finish a recurring engineering task | [Playbooks](playbooks/README.md) | A bug fix, API change, integration, dependency upgrade, or release |

README_cn.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
[English](README.md) · [中文](README_cn.md) · [🌐 官方在线门户](https://flypython.com)
88

9+
> **新——由 Agent 授课、带客观验证的实战课程。**[`courses/`](courses/) 下载一个
10+
> 文件夹,在你的编码 Agent 中打开,说一句*“开始第 1 课”*。每门课程都以一条
11+
> `verify.py` 命令收尾,证明你确实做出了什么。同一旅程可继续在
12+
> [flypython.com](https://flypython.com/) 上进行。
13+
914
FlyPython 是一个面向实践的双语仓库,帮助你写好 Python,并把代码变成用户可以依赖的
1015
产品。这里同时提供 AI Coding 方法、任务 Playbook、可运行示例、复用模板,以及 API、
1116
自动化、Agent、Skill 和 MCP 的一手资料。
@@ -33,6 +38,7 @@ python examples/product-slug/verify.py solution
3338

3439
| 目标 | 从这里开始 | 最终产出 |
3540
| --- | --- | --- |
41+
| 跟随编码 Agent 动手实战 | [Agent 授课课程](courses/) | 一个通过验证的项目:任务契约 → 边界修改 → `verify.py` 证据 |
3642
| 安全地编写和修改 Python | [AI Coding 工作方法](guides/ai-coding/workflow_cn.md) | 上下文明确、有证据的边界修改 |
3743
| 把 Python 变成可靠产品 | [产品质量指南](guides/python-engineering/product-quality_cn.md) | 可测试、可观测、可回退的产品路径 |
3844
| 完成反复出现的工程任务 | [Playbook](playbooks/README_cn.md) | Bug 修复、API 修改、外部集成、依赖升级或发布 |

catalog/projects/README.md

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,45 @@
11
# Python Project Radar
22

33
FlyPython recommends current Python projects only after a maintainer reviews
4-
the projects source, maintenance state, license, documentation, release
4+
the project's source, maintenance state, license, documentation, release
55
history, and practical user value. This directory is intentionally not seeded
66
with unverified or AI-generated recommendations.
77

8+
Each reviewed project is one YAML file in this directory (`<id>.yml`). The
9+
table below is generated from those files by `tools/render_readmes.py`; edit
10+
the YAML, never the table. `radar.json` (repository root) is the
11+
machine-readable export for consumers who pin a repository commit.
12+
13+
`ai_familiarity` records whether mainstream model training data covers the
14+
project and its current API — see `docs/CURATION_POLICY.md` for the grading
15+
rules.
16+
817
## Reviewed Projects Radar
918

10-
| Project | Category | Status | Primary Rationale & Evidence | Risk / Safety Note | Review Date |
11-
| --- | --- | --- | --- | --- | --- |
12-
| [uv](https://github.com/astral-sh/uv) | Tooling & Packaging | `stable` | Extremely fast Cargo/Rust-based package and project manager. Replaces pip, pip-tools, venv, and pyenv with lockfile determinism. | Actively maintained by Astral; requires trusting binary wheels. | 2026-09-02 |
13-
| [ruff](https://github.com/astral-sh/ruff) | Code Quality | `stable` | 10-100x faster linter and formatter. Unifies Flake8, Black, isort, and pyupgrade rules into a single config. | Drop-in Black compatibility; syntax parse differences are rare. | 2026-09-02 |
14-
| [fastapi](https://github.com/fastapi/fastapi) | Web & APIs | `stable` | Production-standard ASGI framework with automatic OpenAPI docs, Pydantic validation, and dependency injection. | Ensure background tasks handle errors properly; use async endpoints responsibly. | 2026-09-02 |
15-
| [pydantic-ai](https://github.com/pydantic/pydantic-ai) | AI Agents | `rising` | Model-agnostic agent framework prioritizing type-safe structured outputs, dependency injection, and testability. | Rapidly evolving API surface; pin minor versions. | 2026-09-02 |
16-
| [instructor](https://github.com/jxnl/instructor) | AI Tools | `stable` | Production standard for extracting structured JSON from LLMs using Pydantic models with retry validation. | Requires API keys for target LLM providers. | 2026-09-02 |
17-
| [polars](https://github.com/pola-rs/polars) | Data & Pipelines | `stable` | High-performance DataFrame library built in Rust on Apache Arrow with lazy query optimization. | API differs from pandas; memory layout is columnar. | 2026-09-02 |
18-
| [marimo](https://github.com/marimo-team/marimo) | Interactive Notebooks | `rising` | Reactive, pure-Python notebook stored as standard executable `.py` files with deterministic state execution. | Requires modern browser environment; replaces Jupyter workflow. | 2026-09-02 |
19+
<!-- radar-index:start -->
20+
<!-- Generated by tools/render_readmes.py; edit catalog/projects/*.yml instead. -->
21+
| Project | Category | Status | AI familiarity | Why it matters | When not to use / Risk | Reviewed |
22+
| --- | --- | --- | --- | --- | --- | --- |
23+
| [fastapi](https://github.com/fastapi/fastapi)<br><sub>fastapi/fastapi · MIT</sub> | Web &amp; APIs | `stable` | AI: high | Production-standard ASGI framework with automatic OpenAPI docs, Pydantic validation, and dependency injection. | For non-HTTP services, or teams standardized on Django's bundled ORM/admin stack.&lt;br&gt;**Risk:** Ensure background tasks handle errors properly and use async endpoints responsibly; blocking calls inside async routes degrade the whole service. | 2026-09-02 |
24+
| [instructor](https://github.com/jxnl/instructor)<br><sub>jxnl/instructor · MIT</sub> | AI Tools | `stable` | AI: medium | Production standard for extracting structured JSON from LLMs using Pydantic models with retry validation. | When your provider already enforces structured outputs natively and you need nothing beyond it.&lt;br&gt;**Risk:** Requires API keys for the target LLM providers; retry loops add latency and token cost. | 2026-09-02 |
25+
| [marimo](https://github.com/marimo-team/marimo)<br><sub>marimo-team/marimo · Apache-2.0</sub> | Interactive Notebooks | `rising` | AI: low | Reactive, pure-Python notebook stored as standard executable .py files with deterministic state execution. | When your workflow depends on Jupyter-only extensions, or kernel-state debugging is central to your process.&lt;br&gt;**Risk:** Requires a modern browser environment and replaces the Jupyter workflow rather than extending it. | 2026-09-02 |
26+
| [polars](https://github.com/pola-rs/polars)<br><sub>pola-rs/polars · MIT</sub> | Data &amp; Pipelines | `stable` | AI: medium | High-performance DataFrame library built in Rust on Apache Arrow with lazy query optimization. | When your pipeline leans on the pandas ecosystem (accessors, narrow libraries) or you need index-heavy semantics.&lt;br&gt;**Risk:** API differs from pandas and memory layout is columnar; budget migration time rather than assuming drop-in parity. | 2026-09-02 |
27+
| [pydantic-ai](https://github.com/pydantic/pydantic-ai)<br><sub>pydantic/pydantic-ai · MIT</sub> | AI Agents | `rising` | AI: low | Model-agnostic agent framework prioritizing type-safe structured outputs, dependency injection, and testability. | When you need a stable long-lived API surface today, or heavy multi-agent orchestration features.&lt;br&gt;**Risk:** Rapidly evolving API surface; pin minor versions and re-run your evals on every upgrade. | 2026-09-02 |
28+
| [ruff](https://github.com/astral-sh/ruff)<br><sub>astral-sh/ruff · MIT</sub> | Code Quality | `stable` | AI: high | 10-100x faster linter and formatter that unifies Flake8, Black, isort, and pyupgrade rules in a single configuration. | When a project depends on plugin ecosystems (e.g. Flake8 plugins) that have no Ruff equivalent yet.&lt;br&gt;**Risk:** Drop-in Black compatibility; rare syntax-parsing differences surface on unusual code bases. | 2026-09-02 |
29+
| [uv](https://github.com/astral-sh/uv)<br><sub>astral-sh/uv · MIT OR Apache-2.0</sub> | Tooling &amp; Packaging | `stable` | AI: medium | Extremely fast Rust-based package and project manager that replaces pip, pip-tools, venv, and pyenv with lockfile determinism. | When you must pin an existing pip-tools or Poetry workflow, or in air-gapped environments without wheel mirrors.&lt;br&gt;**Risk:** Actively maintained by Astral; relies on prebuilt binary wheels, so supply-chain review applies on upgrade. | 2026-09-02 |
30+
<!-- radar-index:end -->
31+
32+
## Machine-readable data
33+
34+
- `radar.json` — deterministic export of every reviewed project (pinned by
35+
website consumers together with `catalog.json`).
36+
- `candidates.json` — output of `tools/radar_scan.py`; raw discovery
37+
candidates with **no descriptions and no status** until a human reviews
38+
them.
1939

2040
## Submission & Lifecycle States
2141

2242
Use the [project proposal form](../../.github/ISSUE_TEMPLATE/project-proposal.yml)
2343
to suggest a project. An accepted record will use one of these lifecycle states:
24-
`new`, `rising`, `stable`, `major-update`, `experimental`, or `archived`. New
44+
`new`, `rising`, `stable`, `major-update`, `experimental`, or `archived`. "New"
2545
describes a recent reviewed discovery, not an unverified quality claim.

0 commit comments

Comments
 (0)