# Purpose of GLOSSARY.md in cangjie-skill: How It Functions as a Shared Dictionary

> Discover the purpose of GLOSSARY.md in cangjie-skill. Learn how this central term dictionary ensures consistent terminology across the entire repository and documentation.

- Repository: [kangarooking/cangjie-skill](https://github.com/kangarooking/cangjie-skill)
- Tags: how-to-guide
- Published: 2026-07-21

---

**GLOSSARY.md serves as the central 术语词典 (term dictionary) for the entire `kangarooking/cangjie-skill` repository, consolidating terminology from every skill into a single root-level reference that guarantees consistency across all documentation.**

In the `kangarooking/cangjie-skill` project, terminology management is handled through a formalized pipeline during **Stage 3 (Zettelkasten)**. The [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) file lives at the repository root and functions as the single shared dictionary that every skill file and generated artifact can reference without duplication.

## What Is GLOSSARY.md?

[`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) is the repository-wide glossary produced during **Stage 3 (Zettelkasten)**. According to the methodology defined in [`methodology/05-stage3-zettelkasten.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/05-stage3-zettelkasten.md), the `glossary-extractor` gathers candidate entries from each skill's draft at [`candidates/glossary.md`](https://github.com/kangarooking/cangjie-skill/blob/main/candidates/glossary.md) and merges them into one consolidated file placed at the project root.

The design goal, as stated in the source methodology, is that [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) should be "所有 skill 共享的术语词典,应在产出根目录可见" — a shared term dictionary visible at the output root. Because it sits at the top level, the glossary is automatically included in every build artifact and requires no navigation into sub-folders to access.

## Three Core Functions of the Shared Dictionary

The purpose of [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) spans three distinct responsibilities that turn it from a static list into an active infrastructure component.

### Single Source of Truth

Every individual skill (`*/SKILL.md`) can point to the same canonical definition rather than repeating explanations. This eliminates drift between skill files and guarantees that concepts like **蚂蚁 (Ant)** or **并发模型 (concurrency model)** carry identical meaning wherever they appear.

### Reader-Facing Reference

When users browse the generated documentation outputs — including [`INDEX.md`](https://github.com/kangarooking/cangjie-skill/blob/main/INDEX.md) and [`DIGEST.md`](https://github.com/kangarooking/cangjie-skill/blob/main/DIGEST.md) — [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) provides quick look-ups for key concepts. Centralizing definitions in one place reduces cognitive load and prevents the confusion caused by scattered or conflicting explanations.

### Automation Hook

The `glossary-extractor` parses [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) to build a term index that is linked from [`INDEX.md`](https://github.com/kangarooking/cangjie-skill/blob/main/INDEX.md) and referenced in the final [`DIGEST.md`](https://github.com/kangarooking/cangjie-skill/blob/main/DIGEST.md). As implemented in `templates/INDEX.md.template`, the build pipeline automatically wires glossary entries into the skill map, ensuring the dictionary stays synchronized with the overall documentation structure.

## How to Contribute Terms and Link Them

The shared dictionary is both manually curated and machine assembled. Contributors define terms in per-skill drafts, and the extractor promotes them to the root file.

### Adding a New Term

Terms follow a structured markdown format inside [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md). Here is an example entry:

```markdown

## 螞蟻 (Ant)

- **Definition:** A small insect that epitomizes collective work; used in the project to illustrate parallel processing.
- **First introduced:** Stage 3 (Zettelkasten)
- **Related skills:** [Distributed Computing](../distributed-computing/SKILL.md)

```

### Linking to a Term from a Skill File

Individual skills reference the shared dictionary using relative paths and anchor links. This keeps skill files concise while preserving full definitional depth:

```markdown
在讨论并发模型时，请参阅术语词典中的 **[螞蟻](../GLOSSARY.md#螞蟻-ant)** 章节获取完整定义。

```

These patterns demonstrate how [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) is edited and referenced throughout the `kangarooking/cangjie-skill` codebase.

## Key Files Behind the Dictionary

Several files govern the creation, consumption, and presentation of [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md):

- **[`methodology/05-stage3-zettelkasten.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/05-stage3-zettelkasten.md)** — Defines the transformation logic that turns per-skill glossaries ([`candidates/glossary.md`](https://github.com/kangarooking/cangjie-skill/blob/main/candidates/glossary.md)) into the shared root dictionary.
- **[`extractors/glossary-extractor.md`](https://github.com/kangarooking/cangjie-skill/blob/main/extractors/glossary-extractor.md)** — Documents the extraction logic that reads candidate terms and writes the consolidated [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md).
- **`templates/INDEX.md.template`** — Generates the navigation link from the skill map back to [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md).
- **[`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md)** — Lists [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) as a Stage 3 deliverable described as the "全书共享术语词典".
- **[`README.md`](https://github.com/kangarooking/cangjie-skill/blob/main/README.md)** — Describes the overall multi-skill output and identifies [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) as the authoritative term dictionary.

## Summary

- **[`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md)** is the root-level shared dictionary for the `kangarooking/cangjie-skill` repository, created during Stage 3 (Zettelkasten).
- It acts as a **single source of truth** for terminology across all skill files.
- It serves as a **reader-facing reference** embedded in generated docs like [`INDEX.md`](https://github.com/kangarooking/cangjie-skill/blob/main/INDEX.md) and [`DIGEST.md`](https://github.com/kangarooking/cangjie-skill/blob/main/DIGEST.md).
- It functions as an **automation hook** parsed by the `glossary-extractor` to build navigable term indexes.
- The methodology in [`methodology/05-stage3-zettelkasten.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/05-stage3-zettelkasten.md) mandates that this file remain visible at the output root so every skill can share it.

## Frequently Asked Questions

### What is the purpose of GLOSSARY.md in cangjie-skill?

The purpose of [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md) is to serve as the central 术语词典 (term dictionary) that consolidates candidate glossary entries from every skill's draft into one root-level file. It ensures consistent terminology across all `*/SKILL.md` files and provides quick definitions for readers browsing generated documentation.

### How does GLOSSARY.md become a shared dictionary?

During Stage 3 (Zettelkasten), the `glossary-extractor` gathers entries from each skill's [`candidates/glossary.md`](https://github.com/kangarooking/cangjie-skill/blob/main/candidates/glossary.md) and merges them into the repository root's [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md). Because it resides at the output root, every skill and build artifact can reference the same definitions without maintaining local copies.

### Which files generate or link to GLOSSARY.md?

The extraction logic is defined in [`methodology/05-stage3-zettelkasten.md`](https://github.com/kangarooking/cangjie-skill/blob/main/methodology/05-stage3-zettelkasten.md) and implemented via [`extractors/glossary-extractor.md`](https://github.com/kangarooking/cangjie-skill/blob/main/extractors/glossary-extractor.md). The generated navigation link appears through `templates/INDEX.md.template`, and the file is listed as a deliverable in the main [`SKILL.md`](https://github.com/kangarooking/cangjie-skill/blob/main/SKILL.md).

### How do I reference a term from GLOSSARY.md in a skill file?

Use a relative markdown link with an anchor pointing to the term's heading inside [`GLOSSARY.md`](https://github.com/kangarooking/cangjie-skill/blob/main/GLOSSARY.md). For example, `[螞蟻](../GLOSSARY.md#螞蟻-ant)` creates a direct reference that keeps the skill file concise while linking readers to the full canonical definition.