bmad-index-docs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Index Docs

文档索引

Goal: Generate or update an index.md to reference all docs in a target folder.
目标: 生成或更新index.md以索引目标文件夹内的所有文档。

EXECUTION

执行步骤

Step 1: Scan Directory

步骤1:扫描目录

  • List all files and subdirectories in the target location
  • 列出目标位置的所有文件和子目录

Step 2: Group Content

步骤2:内容分组

  • Organize files by type, purpose, or subdirectory
  • 按照文件类型、用途或所属子目录对文件进行整理

Step 3: Generate Descriptions

步骤3:生成描述

  • Read each file to understand its actual purpose and create brief (3-10 word) descriptions based on the content, not just the filename
  • 读取每个文件以明确其实际用途,基于内容(而非仅文件名)生成简短(3-10字)的描述

Step 4: Create/Update Index

步骤4:创建/更新索引

  • Write or update index.md with organized file listings
  • 编写或更新index.md,写入整理好的文件列表

OUTPUT FORMAT

输出格式

markdown
undefined
markdown
undefined

Directory Index

Directory Index

Files

Files

  • filename.ext - Brief description
  • another-file.ext - Brief description
  • filename.ext - Brief description
  • another-file.ext - Brief description

Subdirectories

Subdirectories

subfolder/

subfolder/

  • file1.ext - Brief description
  • file2.ext - Brief description
  • file1.ext - Brief description
  • file2.ext - Brief description

another-folder/

another-folder/

  • file3.ext - Brief description
undefined
  • file3.ext - Brief description
undefined

HALT CONDITIONS

终止条件

  • HALT if target directory does not exist or is inaccessible
  • HALT if user does not have write permissions to create index.md
  • 如果目标目录不存在或无法访问,终止执行
  • 如果用户没有创建index.md的写入权限,终止执行

VALIDATION

验证规则

  • Use relative paths starting with ./
  • Group similar files together
  • Read file contents to generate accurate descriptions - don't guess from filenames
  • Keep descriptions concise but informative (3-10 words)
  • Sort alphabetically within groups
  • Skip hidden files (starting with .) unless specified
  • 使用以./开头的相对路径
  • 将相似文件归为一组
  • 读取文件内容生成准确描述,不要仅通过文件名猜测
  • 保持描述简洁且信息完备(3-10字)
  • 同组内文件按字母顺序排序
  • 除非另有指定,否则跳过隐藏文件(以.开头的文件)