add .dirmd and other metadata
This commit is contained in:
@@ -138,6 +138,26 @@ Example output with `dirmd -o docs.md ~/repos/myproject --vertical-slices`:
|
||||
├── cmd.md ← slice: tree + contents of cmd/
|
||||
└── internal.md ← slice: tree + contents of internal/
|
||||
|
||||
## Instructions File (`.dirmd`)
|
||||
|
||||
If a file named `.dirmd` exists in the root of the input directory, you can include its contents as metadata in the generated output by passing the `--instructions` flag.
|
||||
|
||||
This is useful for injecting specific context, constraints, or instructions for LLMs processing the snapshot.
|
||||
|
||||
- **File Name**: `.dirmd`
|
||||
- **Location**: Root of the input directory.
|
||||
- **Format**: Plain text or Markdown.
|
||||
- **Output**: Rendered as a quoted block (`> Instructions: ...`) immediately after the timestamp and commit info.
|
||||
- **Opt-in**: The file is **ignored** unless `--instructions` is explicitly passed.
|
||||
|
||||
Example `.dirmd`:
|
||||
|
||||
```text
|
||||
Focus on the `internal/` package for business logic.
|
||||
Ignore `cmd/` unless explicitly asked.
|
||||
Prioritize Go files over Python.
|
||||
```
|
||||
|
||||
## LLM-Optimized Output
|
||||
|
||||
Output is designed for RAG ingestion and LLM context windows, not human presentation:
|
||||
|
||||
Reference in New Issue
Block a user