agentleFS
lifefloatinglifefloating/gaokao-vault/AGENTS.md

gaokao-vault

AGENTS.md31 starsChanged 8 months agoApache-2.0View on GitHub

gaokao-vault — 阳光高考全量数据抓取系统,从 gaokao.chsi.com.cn 抓取 13 类高考数据,存入 PostgreSQL。

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 35,266 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All modules must use from __future__ import annotations

    line 31
  2. Very specific:

    Run make check before committing to ensure lint and type checks pass

    line 73
  3. Very specific:

    Run make test to verify no regressions

    line 74
  4. Distinctive:

    Keep Chinese comments/docstrings where domain context requires it

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Agents Instructions

Project Overview

gaokao-vault — 阳光高考全量数据抓取系统,从 gaokao.chsi.com.cn 抓取 13 类高考数据,存入 PostgreSQL。

Tech Stack

  • Python 3.10+, package manager: uv
  • Web scraping: scrapling (Spider framework + AsyncStealthySession)
  • Database: PostgreSQL + asyncpg
  • CLI: Typer
  • Validation: Pydantic / Pydantic Settings
  • Testing: pytest + hypothesis
  • Lint/Format: ruff (line-length=120)
  • Type check: ty
  • Docs: mkdocs-material

Common Commands

uv sync                          # install dependencies
uv run pre-commit install        # install pre-commit hooks
make check                       # lint + type check + deptry
make test                        # pytest with coverage
make docs                        # local docs server

Code Conventions

  • All modules must use from __future__ import annotations
  • Ruff rule sets: YTT, S, B, A, C4, T10, SIM, I, C90, E, W, F, PGH, UP, RUF, TRY
  • assert is allowed in test files (S101 exempted)
  • Config managed via pydantic-settings, env prefix: GAOKAO_DB__, GAOKAO_CRAWL__, GAOKAO_PROXY__

Project Structure

  • src/gaokao_vault/spiders/ — Data spiders, inherit BaseGaokaoSpider (scrapling Spider)
  • src/gaokao_vault/pipeline/ — Data processing: dedup (content_hash SHA-256), validation, DB insert
  • src/gaokao_vault/anti_detect/ — Anti-detection: proxy pool, UA pool, rate limiter
  • src/gaokao_vault/db/ — DB connection, migrations, SQL queries
  • src/gaokao_vault/scheduler/ — Three-phase task orchestration
  • src/gaokao_vault/models/ — Pydantic data models
  • src/gaokao_vault/storage/ — S3/MinIO storage
  • src/gaokao_vault/vision/ — OpenAI vision analysis
  • tests/ — Test directory

Spider Development

  • New spiders must inherit BaseGaokaoSpider with name, task_type, start_urls
  • Existing spiders (13 types):
    • school_spider — 院校信息
    • major_spider — 专业信息
    • score_line_spider — 分数线
    • score_segment_spider — 一分一段表
    • enrollment_plan_spider — 招生计划
    • school_major_spider — 院校专业
    • special_spider — 特殊类招生
    • charter_spider — 招生章程
    • announcement_spider — 公告
    • interpretation_spider — 政策解读
    • timeline_spider — 时间线
    • school_satisfaction_spider — 院校满意度
    • major_satisfaction_spider — 专业满意度

Database

  • Schema defined in src/gaokao_vault/db/schema.sql
  • Docker Compose for local dev: docker compose up -d db

Key Rules

  • Run make check before committing to ensure lint and type checks pass
  • Run make test to verify no regressions
  • Keep Chinese comments/docstrings where domain context requires it

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.