Prompt file imported from gagan987123/Movie-search (
.windsurf/workflows/get_doc.md). Copyright stays with the author.
Workflow: Auto-generate Markdown Documentation Structure
MAIN_POINTS- dont explain any things just execute . It should complte for all files in project.STRICTLY Do step by step skip the .json files
STEP 1. Mirror the Folder Structure
- Recursively traverse your project directory.
- For every folder, create the same folder in a new
docs_foldernamedirectory.
STEP 2. Create .md Files for Each Source File
-
For each file (e.g.,
.js,.ts, etc.):- In
docs_foldername/, create a.mdfile at the same relative path. - Example:
Backend/controller/tvController.js→docs_foldername/Backend/controller/tvController.md
- In
STEP 3. Generate Documentation for every files ( Do documentation for every files dont stop in between)
Create comprehensive documentation structure(STRICTLY): use proper formting like headings ,underlines and emojis etc
- Function name and file location with line numbers
- Detailed description of functionality
- Input parameters with types
- Behavior explanation
- Response codes and formats
- Error handling
- mermaid diagrams represting the workflow based on
-> dont use special char is it might not support so us alphabats and if their is any function class need to mention use "Call_Fun_Fun-name",and for db model use erDiagrams
example formet is choose most relevent
-> ```mermaid %%{init: {"themeVariables": {"fontSize": "15px"}, "flowchart": {"diagramPadding": 8, "nodeSpacing": 20, "rankSpacing": 10}} }%%
flowchart TD
A[Start test function] --> B{Check req body call}
B -- "4" --> C[Call_Fun_register]
B -- "5" --> D[Call_Fun_login]
B -- "1" --> E[Call_Fun_getPosts]
B -- else --> F[Return 400 Invalid call]
C --> G[End]
D --> G
E --> G
F --> G
G[End or catch error]
G --> H{Error?}
H -- Yes --> I[Return 500 Something went wrong]
H -- No --> J[Function ends]
```mermaid
erDiagram
USER {
string username
string email
string password
string image
string[] searchHistory
string[] fav
string[] watched
string[] watchedEpisodes
string[] watchlist
string[] liked
string[] disliked
date timestamps
}
%%{init: {"themeVariables": {"fontSize": "15px"}, "flowchart": {"diagramPadding": 8, "nodeSpacing": 20, "rankSpacing": 10}} }%%
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop HealthCheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
%%{init: {"themeVariables": {"fontSize": "15px"}, "flowchart": {"diagramPadding": 8, "nodeSpacing": 20, "rankSpacing": 10}} }%%
classDiagram
Class01 <|-- AveryLongClass : Cool
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
STEP 4. Add Documentation with Special Markers
-In each .md file:
- For each function, use
<!-- DOC-START functionName --> ... <!-- DOC-END functionName -->for documentation sections. - Example:
documentation
step 5 : complete this for every files and function dont ask anything and please delete placeholder.txt or .keep if have created for your ref .
This workflow will help you automate a documentation structure that mirrors your codebase, with .md files and special markers for easy parsing and consistency.