2
0

index-docs.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <task id="_bmad/core/tasks/index-docs" name="Index Docs"
  2. description="Generates or updates an index.md of all documents in the specified directory" webskip="true" standalone="true">
  3. <llm critical="true">
  4. <i>MANDATORY: Execute ALL steps in the flow section IN EXACT ORDER</i>
  5. <i>DO NOT skip steps or change the sequence</i>
  6. <i>HALT immediately when halt-conditions are met</i>
  7. <i>Each action xml tag within step xml tag is a REQUIRED action to complete that step</i>
  8. <i>Sections outside flow (validation, output, critical-context) provide essential context - review and apply throughout execution</i>
  9. </llm>
  10. <flow>
  11. <step n="1" title="Scan Directory">
  12. <i>List all files and subdirectories in the target location</i>
  13. </step>
  14. <step n="2" title="Group Content">
  15. <i>Organize files by type, purpose, or subdirectory</i>
  16. </step>
  17. <step n="3" title="Generate Descriptions">
  18. <i>Read each file to understand its actual purpose and create brief (3-10 word) descriptions based on the content, not just the
  19. filename</i>
  20. </step>
  21. <step n="4" title="Create/Update Index">
  22. <i>Write or update index.md with organized file listings</i>
  23. </step>
  24. </flow>
  25. <output-format>
  26. <example>
  27. # Directory Index
  28. ## Files
  29. - **[filename.ext](./filename.ext)** - Brief description
  30. - **[another-file.ext](./another-file.ext)** - Brief description
  31. ## Subdirectories
  32. ### subfolder/
  33. - **[file1.ext](./subfolder/file1.ext)** - Brief description
  34. - **[file2.ext](./subfolder/file2.ext)** - Brief description
  35. ### another-folder/
  36. - **[file3.ext](./another-folder/file3.ext)** - Brief description
  37. </example>
  38. </output-format>
  39. <halt-conditions critical="true">
  40. <i>HALT if target directory does not exist or is inaccessible</i>
  41. <i>HALT if user does not have write permissions to create index.md</i>
  42. </halt-conditions>
  43. <validation>
  44. <i>Use relative paths starting with ./</i>
  45. <i>Group similar files together</i>
  46. <i>Read file contents to generate accurate descriptions - don't guess from filenames</i>
  47. <i>Keep descriptions concise but informative (3-10 words)</i>
  48. <i>Sort alphabetically within groups</i>
  49. <i>Skip hidden files (starting with .) unless specified</i>
  50. </validation>
  51. </task>