# yaojingang/yao-open-prompts architecture

> Architecture diagram of the GitHub repository yaojingang/yao-open-prompts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yaojingang/yao-open-prompts
- Repository: https://github.com/yaojingang/yao-open-prompts

## Overview

1. **Repository purpose**
   - This is a curated, documentation-first repository of AI prompts rather than an application with a runtime service.
   - The primary artifact is a library of Markdown prompt files organized by use case and language.

2. **Core content layer: `prompts/`**
   - `prompts/` is the main Chinese prompt corpus.
   - It is organized by numbered scenario groups such as AI methods, work, learning, content, marketing, coding, and thinking.
   - Each prompt is a standalone Markdown document intended to be copied directly into an LLM workflow.

3. **Parallel English mirror: `prompts-en/`**
   - `prompts-en/` is an English-language mirror of the same taxonomy.
   - The README states the English set follows the same paths and structure as `prompts/`, which makes the repository effectively bilingual and path-aligned.
   - This mirror is important architecturally because it implies content generation/synchronization tooling rather than independent manual curation only.

4. **Prompt file schema and content boundary**
   - Prompt files use a consistent frontmatter schema: title, category, subcategory, source_section, author, version, created, status, and tags.
   - The body is intentionally constrained to the reusable prompt content, keeping tutorials, screenshots, and long explanations outside the prompt payload.
   - This separation is the key boundary between “executable prompt text” and supporting documentation.

5. **Taxonomy and navigation layer**
   - `CATALOG.md` is the full index over the repository and acts as the main navigation surface.
   - Category counts in the README show the repository is organized around usage scenarios, not model families or technical domains.
   - `README.md` and `README.en.md` are the top-level entry points; `prompts/README.md` and `prompts-en/README.md` are the language-specific hubs.

6. **Derived documentation layer: `docs/`**
   - `docs/` contains a static site entry point (`index.html`) and `.nojekyll`, indicating GitHub Pages-style static publishing.
   - The docs site is a rendered navigation layer for browsing the prompt collection, not a separate application backend.
   - It likely consumes the catalog and prompt structure as source material for a website-friendly view.

7. **Automation and repository maintenance: `scripts/`**
   - `scripts/check_repo.py` is the quality gate for validating repository consistency.
   - `scripts/generate_catalog.py` rebuilds the central index from the prompt files.
   - `scripts/generate_english_readmes.py` suggests automated synchronization of English navigation/docs.
   - `scripts/generate_webpage.py` produces the static web navigation artifact in `docs/`.

8. **Source-to-derived data flow**
   - The source of truth is the Markdown prompt corpus plus its frontmatter metadata.
   - Scripts transform that source into derived outputs: catalog, language readmes, and the web page.
   - This means architecture is “content repository with generated indexes,” not “manually maintained documentation only.”

9. **Reference and policy layer: `references/` and `maintenance/`**
   - `references/` stores supporting knowledge, external resources, and related concept notes that should not be mixed into prompt bodies.
   - `maintenance/` contains operational checklists for review and release discipline.
   - These folders separate editorial governance from prompt content, which helps keep the main corpus clean and reusable.

10. **Template layer: `templates/`**
   - `templates/prompt-file-template.md` defines the canonical structure for new prompt files.
   - This is the structural contract for contributors and is what keeps the corpus uniform enough for automated indexing.

11. **Editorial and release workflow**
   - The README describes a process of adding prompts, versioning them in place, updating `CHANGELOG.md`, regenerating indexes, and running repository checks.
   - That establishes a controlled content lifecycle: authoring → validation → regeneration → publication.
   - The release checklist in `maintenance/` formalizes this as a repeatable publishing process.

12. **Major logical subsystem boundaries**
   - **Content corpus:** `prompts/` and `prompts-en/`
   - **Metadata/indexing:** `CATALOG.md`, README files, frontmatter
   - **Derived publication:** `docs/`
   - **Automation:** `scripts/`
   - **Governance/supporting material:** `references/`, `maintenance/`, `templates/`

13. **Technologies and runtime implications**
   - The repository is primarily Markdown-based, with lightweight Python tooling for validation and generation.
   - There is no evidence of a server-side application, database, or API runtime.
   - The architectural center is therefore static content management and build-time generation, suitable for GitHub-based publishing.

14. **How to diagram it**
   - Show the prompt Markdown files as the authoritative source.
   - Show scripts consuming those files to generate catalog/readme/web docs.
   - Show `references/` and `maintenance/` as supporting governance inputs, not part of the prompt execution path.
   - Show the published static site in `docs/` as the user-facing browsing surface, while the prompt files remain the copyable operational payload.

Main entry points: [`prompts`](https://github.com/yaojingang/yao-open-prompts/tree/main/prompts) (Chinese prompts), [`prompts-en`](https://github.com/yaojingang/yao-open-prompts/tree/main/prompts-en) (English prompts), [`scripts/check_repo.py`](https://github.com/yaojingang/yao-open-prompts/blob/main/scripts/check_repo.py) (Repo check), [`templates/prompt-file-template.md`](https://github.com/yaojingang/yao-open-prompts/blob/main/templates/prompt-file-template.md) (Prompt schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Prompt corpus"]
  node_prompts_zh["Chinese prompts<br/>markdown corpus"]
  node_prompts_en["English prompts<br/>mirrored corpus"]
  node_frontmatter["Prompt schema<br/>metadata contract"]
end

subgraph group_nav["Navigation and publishing"]
  node_readme_zh["README<br/>repo entry<br/>[README.md]"]
  node_readme_en["README EN<br/>repo entry<br/>[README.en.md]"]
  node_catalog["Catalog<br/>global index<br/>[CATALOG.md]"]
  node_prompts_readme["Prompts hub<br/>Chinese hub<br/>[README.md]"]
  node_prompts_en_readme["English hub<br/>[README.md]"]
  node_docs_site["Docs site<br/>static publish<br/>[index.html]"]
end

subgraph group_automation["Build scripts"]
  node_scripts_check["Repo check<br/>validation script<br/>[check_repo.py]"]
  node_scripts_catalog["Catalog builder<br/>index generator"]
  node_scripts_en_readmes["EN sync<br/>docs generator"]
  node_scripts_webpage["Web builder<br/>site generator"]
end

subgraph group_support["Support material"]
  node_template["Prompt template<br/>starter template"]
  node_references["References<br/>support docs"]
  node_maintenance["Maintenance<br/>governance docs"]
  node_changelog["Changelog<br/>release log<br/>[CHANGELOG.md]"]
  node_contributing["Contributing<br/>policy guide<br/>[CONTRIBUTING.md]"]
end

node_readme_zh -->|"introduces"| node_prompts_zh
node_readme_en -->|"introduces"| node_prompts_en
node_prompts_readme -->|"navigates"| node_prompts_zh
node_prompts_en_readme -->|"navigates"| node_prompts_en
node_frontmatter -->|"defines"| node_prompts_zh
node_frontmatter -->|"defines"| node_prompts_en
node_prompts_zh -->|"indexed by"| node_catalog
node_prompts_en -->|"indexed by"| node_catalog
node_scripts_catalog -->|"builds"| node_catalog
node_scripts_en_readmes -->|"generates"| node_prompts_en_readme
node_scripts_webpage -->|"builds"| node_docs_site
node_scripts_check -->|"validates"| node_prompts_zh
node_scripts_check -->|"validates"| node_prompts_en
node_scripts_check -->|"checks"| node_frontmatter
node_scripts_catalog -->|"reads"| node_prompts_zh
node_scripts_catalog -->|"reads"| node_prompts_en
node_scripts_en_readmes -->|"mirrors"| node_prompts_zh
node_scripts_webpage -->|"consumes"| node_catalog
node_references -.->|"supports"| node_prompts_zh
node_maintenance -.->|"governs"| node_changelog
node_maintenance -.->|"requires"| node_scripts_check
node_template -->|"standardizes"| node_frontmatter
node_contributing -.->|"guides"| node_template

click node_readme_zh "https://github.com/yaojingang/yao-open-prompts/blob/main/README.md"
click node_readme_en "https://github.com/yaojingang/yao-open-prompts/blob/main/README.en.md"
click node_catalog "https://github.com/yaojingang/yao-open-prompts/blob/main/CATALOG.md"
click node_prompts_readme "https://github.com/yaojingang/yao-open-prompts/blob/main/prompts/README.md"
click node_prompts_en_readme "https://github.com/yaojingang/yao-open-prompts/blob/main/prompts-en/README.md"
click node_docs_site "https://github.com/yaojingang/yao-open-prompts/blob/main/docs/index.html"
click node_prompts_zh "https://github.com/yaojingang/yao-open-prompts/tree/main/prompts"
click node_prompts_en "https://github.com/yaojingang/yao-open-prompts/tree/main/prompts-en"
click node_frontmatter "https://github.com/yaojingang/yao-open-prompts/blob/main/templates/prompt-file-template.md"
click node_scripts_check "https://github.com/yaojingang/yao-open-prompts/blob/main/scripts/check_repo.py"
click node_scripts_catalog "https://github.com/yaojingang/yao-open-prompts/blob/main/scripts/generate_catalog.py"
click node_scripts_en_readmes "https://github.com/yaojingang/yao-open-prompts/blob/main/scripts/generate_english_readmes.py"
click node_scripts_webpage "https://github.com/yaojingang/yao-open-prompts/blob/main/scripts/generate_webpage.py"
click node_template "https://github.com/yaojingang/yao-open-prompts/blob/main/templates/prompt-file-template.md"
click node_references "https://github.com/yaojingang/yao-open-prompts/tree/main/references"
click node_maintenance "https://github.com/yaojingang/yao-open-prompts/tree/main/maintenance"
click node_changelog "https://github.com/yaojingang/yao-open-prompts/blob/main/CHANGELOG.md"
click node_contributing "https://github.com/yaojingang/yao-open-prompts/blob/main/CONTRIBUTING.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_prompts_zh,node_prompts_en,node_frontmatter toneBlue
class node_readme_zh,node_readme_en,node_catalog,node_prompts_readme,node_prompts_en_readme,node_docs_site toneAmber
class node_scripts_check,node_scripts_catalog,node_scripts_en_readmes,node_scripts_webpage toneMint
class node_template,node_references,node_maintenance,node_changelog,node_contributing toneRose
```

## Components

### Prompt corpus

Authoritative Markdown prompt collections in Chinese and English.

- [Chinese prompts](https://github.com/yaojingang/yao-open-prompts/tree/main/prompts): markdown corpus · Authoritative Chinese prompt files organized by scenario taxonomy. · `prompts`
- [English prompts](https://github.com/yaojingang/yao-open-prompts/tree/main/prompts-en): mirrored corpus · English-language mirror aligned to the Chinese prompt paths and structure. · `prompts-en`
- [Prompt schema](https://github.com/yaojingang/yao-open-prompts/blob/main/templates/prompt-file-template.md): metadata contract · Shared frontmatter fields that make prompts indexable and consistent. · `templates/prompt-file-template.md`

### Navigation and publishing

Top-level indexes and the static browsing surface.

- [README](https://github.com/yaojingang/yao-open-prompts/blob/main/README.md): repo entry · Primary Chinese repository overview and contributor guidance. · `README.md`
- [README EN](https://github.com/yaojingang/yao-open-prompts/blob/main/README.en.md): repo entry · English repository overview and mirrored navigation entry. · `README.en.md`
- [Catalog](https://github.com/yaojingang/yao-open-prompts/blob/main/CATALOG.md): global index · Full repository index over the prompt collection. · `CATALOG.md`
- [Prompts hub](https://github.com/yaojingang/yao-open-prompts/blob/main/prompts/README.md): Chinese hub · Entry point for the Chinese prompt taxonomy. · `prompts/README.md`
- [English hub](https://github.com/yaojingang/yao-open-prompts/blob/main/prompts-en/README.md): English hub · Entry point for the English prompt taxonomy mirror. · `prompts-en/README.md`
- [Docs site](https://github.com/yaojingang/yao-open-prompts/blob/main/docs/index.html): static publish · GitHub Pages-style static navigation site. · `docs/index.html`

### Build scripts

Validation and generation utilities that derive indexes and published artifacts.

- [Repo check](https://github.com/yaojingang/yao-open-prompts/blob/main/scripts/check_repo.py): validation script · Validates repository consistency and content structure. · `scripts/check_repo.py`
- [Catalog builder](https://github.com/yaojingang/yao-open-prompts/blob/main/scripts/generate_catalog.py): index generator · Regenerates the central catalog from prompt files. · `scripts/generate_catalog.py`
- [EN sync](https://github.com/yaojingang/yao-open-prompts/blob/main/scripts/generate_english_readmes.py): docs generator · Generates or synchronizes English readme navigation files. · `scripts/generate_english_readmes.py`
- [Web builder](https://github.com/yaojingang/yao-open-prompts/blob/main/scripts/generate_webpage.py): site generator · Produces the static web navigation artifact in docs/ · `scripts/generate_webpage.py`

### Support material

Templates, references, and operational governance documents.

- [Prompt template](https://github.com/yaojingang/yao-open-prompts/blob/main/templates/prompt-file-template.md): starter template · Canonical structure for new prompt files. · `templates/prompt-file-template.md`
- [References](https://github.com/yaojingang/yao-open-prompts/tree/main/references): support docs · Background notes and external resources kept separate from prompts. · `references`
- [Maintenance](https://github.com/yaojingang/yao-open-prompts/tree/main/maintenance): governance docs · Review and release checklists for prompt curation. · `maintenance`
- [Changelog](https://github.com/yaojingang/yao-open-prompts/blob/main/CHANGELOG.md): release log · History of prompt updates and repository releases. · `CHANGELOG.md`
- [Contributing](https://github.com/yaojingang/yao-open-prompts/blob/main/CONTRIBUTING.md): policy guide · Contributor guidance for adding and maintaining prompts. · `CONTRIBUTING.md`

## Connections

- README → Chinese prompts: introduces · Chinese README points readers to the main corpus.
- README EN → English prompts: introduces · English README points readers to the mirrored corpus.
- Prompts hub → Chinese prompts: navigates · Language hub organizes the Chinese prompt collection.
- English hub → English prompts: navigates · Language hub organizes the English mirrored collection.
- Prompt schema → Chinese prompts: defines · Template establishes the common metadata contract for prompt files.
- Prompt schema → English prompts: defines · Template also constrains the mirrored English prompt files.
- Chinese prompts → Catalog: indexed by · Prompt corpus is the source for the global catalog.
- English prompts → Catalog: indexed by · Mirrored corpus also participates in the repository index.
- Catalog builder → Catalog: builds · Catalog generator rebuilds the central index.
- EN sync → English hub: generates · English sync script produces language navigation files.
- Web builder → Docs site: builds · Web generator produces the published static browsing surface.
- Repo check → Chinese prompts: validates · Repository check enforces corpus consistency.
- Repo check → English prompts: validates · Repository check also covers the mirrored corpus.
- Repo check → Prompt schema: checks · Validation depends on the expected prompt schema.
- Catalog builder → Chinese prompts: reads · Catalog generation consumes the Chinese source files.
- Catalog builder → English prompts: reads · Catalog generation consumes the English mirror as well.
- EN sync → Chinese prompts: mirrors · English docs are synchronized from the source taxonomy.
- Web builder → Catalog: consumes · Static site generation uses the catalog as navigation source.
- References → Chinese prompts: supports · Reference material informs prompt writing without becoming prompt payload.
- Maintenance → Changelog: governs · Release process links review workflow to version history.
- Maintenance → Repo check: requires · Operational checklists rely on validation before release.
- Prompt template → Prompt schema: standardizes · Template encodes the canonical file structure.
- Contributing → Prompt template: guides · Contributor instructions point to the canonical prompt template.
