| name | generate-index | ||||
|---|---|---|---|---|---|
| description | Generates or updates an OKF (v0.2) compliant index.md file for a specified directory. Useful for contextualizing workspace structure for AI agents. | ||||
| argument_pattern | ^@?([a-zA-Z0-9_-]+/?)+$ | ||||
| tags | |||||
| tools | |||||
Generate or update an index.md
file for a specified directory following the Open Knowledge Format (OKF v0.2) standard.
Target Directory: $ARG_1
(e.g., @path/to/dir
or passed path)
Direct Children Only: Scan ONLY immediate files and immediate subdirectories in$ARG_1
.DO NOT scan recursively into subdirectories.** Reserved Files**: DO NOT scan or readindex.md
orlog.md
.No Fabrication: Extract values ONLY from existing YAML frontmatter (title
,description
,type
,tags
) or file body.Description Rule: Force every description to be a single concise sentence.** Links**: Use relative paths starting from$ARG_1
(e.g.,./file.md
or./subdir/index.md
).
- Scan immediate
.md
files and immediate subdirectories under$ARG_1
. - Extract frontmatter (
type
,title
,description
) from immediate.md
files. - For immediate subdirectories, check if
./subdir/index.md
exists to get its description, or use a short summary of the folder. - Write or overwrite
$ARG_1/index.md
using the template below.
## type: Directory Index title: "[Directory Name] Index" description: "[One-sentence summary of what this directory contains]" tags: [index]
[Brief explanation of the directory's purpose based on its contents]
| File / Path | Type | Description |
|---|---|---|