Midtrans-Middleware/.trae/rules/bmad-task-core-index-docs.md

2.6 KiB

Index Docs Task Rule

This rule defines the Index Docs task workflow.

Task Definition

When this task is triggered, execute the following workflow:

MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER DO NOT skip steps or change the sequence HALT immediately when halt-conditions are met Each action xml tag within step xml tag is a REQUIRED action to complete that step Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution

List all files and subdirectories in the target location
<step n="2" title="Group Content">
  <i>Organize files by type, purpose, or subdirectory</i>
</step>

<step n="3" title="Generate Descriptions">
  <i>Read each file to understand its actual purpose and create brief (3-10 word) descriptions based on the content, not just the
    filename</i>
</step>

<step n="4" title="Create/Update Index">
  <i>Write or update index.md with organized file listings</i>
</step>
# Directory Index
  ## Files

  - **[filename.ext](./filename.ext)** - Brief description
  - **[another-file.ext](./another-file.ext)** - Brief description

  ## Subdirectories

  ### subfolder/

  - **[file1.ext](./subfolder/file1.ext)** - Brief description
  - **[file2.ext](./subfolder/file2.ext)** - Brief description

  ### another-folder/

  - **[file3.ext](./another-folder/file3.ext)** - Brief description
</example>
HALT if target directory does not exist or is inaccessible HALT if user does not have write permissions to create index.md 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

Usage

Reference this task with @task-index-docs to execute the defined workflow.

Module

Part of the BMAD CORE module.