Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
metadata:
id: "semantic.overview_generation"
name: "Directory Overview Generation"
description: "Generate overview (L1) for a directory based on file summaries and child directory abstracts"
version: "1.0.0"
language: "en"
category: "semantic"
variables:
- name: "dir_name"
type: "string"
description: "Directory name"
required: true
- name: "file_summaries"
type: "string"
description: "List of files and their summaries in the directory, format: '- filename: summary'"
default: ""
- name: "children_abstracts"
type: "string"
description: "List of subdirectories and their abstracts, format: '- dirname/: abstract'"
default: ""
- name: "output_language"
type: "string"
description: "Language code for output (e.g., 'en', 'zh-CN', 'ja', 'ko', 'ru', 'ar')"
required: true
- name: "directory_coverage"
type: "string"
description: "Directory scale and sample coverage statement"
default: ""
template: |
Output Language: {{ output_language }}
Write the entire overview consistently in {{ output_language }}; do not mix languages in headings, paragraphs, or list items.
Translate or rewrite all source summaries into {{ output_language }}; do not copy source text in another language.
Generate an overview document based on the following directory content:
[Directory Name]
{{ dir_name }}
[Directory Scale and Coverage]
{{ directory_coverage }}
[Files and Their Summaries in Directory]
{{ file_summaries }}
Note: Each entry above carries a compact link placeholder in the form
"(link: viking://input_sample_fN)" for files and "(link: viking://input_sample_cN)"
for subdirectories. When you reference an entry, write a normal Markdown link
using its placeholder as the URL, e.g. [display title](viking://input_sample_f1).
Use a natural display title (typically the entry's name); do not print the raw
placeholder text and do not repeat the name outside the link.
Some entries may be code structure skeletons (showing imports, classes, functions)
rather than prose summaries — treat them as structural descriptions of the file.
[Subdirectories and Their Summaries]
{{ children_abstracts }}
Relationship rules:
- Treat child directories as parts of the same repository unless the summaries clearly show they are independent projects.
- Do not describe every child directory as an independent project by default.
- When the summaries indicate a code repository, explain how subdirectories relate to the whole repo, such as services, libraries, apps, modules, or support folders.
Faithfulness rules:
- Describe only what the provided summaries state; do not invent entities, facts, or relationships not present in them.
- When the coverage statement above indicates that only a sample of direct entries is shown, you MAY generalize from the sampled entries to characterize the directory as a whole (e.g. "the directory primarily covers X, Y, Z"), but such generalization must use hedging language such as "the sample shows", "primarily covers", "appears to contain", and must not claim that every entry has been examined.
- Never describe specific content of entries that are not listed in the summaries above.
- Before output, remove any named entity absent from the provided summaries—including organization, company, product, and brand names—and any unstated ownership, affiliation, or other relationship; never fill gaps with outside knowledge.
Output in Markdown format, strictly following this structure:
1. **Title** (H1): Directory name
2. **{{ "简要描述" if output_language == "zh-CN" else "Brief Description" }}** (plain text paragraph, 50-150 words):
- Immediately following the title, without any H2 heading
- Explain what this is, what it's about, and what it covers; when sampled, use hedging language to generalize from the sampled entries.
- Include core keywords from the provided summaries for easy searching
- Who it's suitable for, if stated in the provided summaries
- Do not include entry counts, sample counts, unsampled counts, or other coverage statistics; keep this paragraph useful as a standalone retrieval abstract.
3. **{{ "目录覆盖" if output_language == "zh-CN" else "Directory Coverage" }}** (H2):
- State the total number of direct entries and whether all entries are represented.
- When sampled, state how many entries were sampled and how many were not individually examined.
4. **{{ "快速导航" if output_language == "zh-CN" else "Quick Navigation" }}** (H2): Decision Tree style
- Guide with "What do you want to learn?" or "What do you want to do?"
- Use → arrow to point to specific files or directories
- **Link each entry as a Markdown link** using its placeholder, e.g. [display title](viking://input_sample_f1)
- Concise keyword descriptions
- When sampled, introduce the list with a note that these are representative entries and the full directory contains more
5. **{{ "详细说明" if output_language == "zh-CN" else "Detailed Description" }}** (H2):
- When sampled, begin with a one-sentence note stating that the following subsections cover only the sampled entries (X of Y), not the full directory.
- One H3 subsection for each file/subdirectory; the H3 heading is a Markdown link to the entry using its placeholder, e.g. ### [display title](viking://input_sample_f1)
- Use the file summaries or subdirectory summaries provided above as description content
Total length: 400-800 words
llm_config:
temperature: 0.0