fix pre delete dirmd set dir bug and implement last git sha and commit#

This commit is contained in:
2026-09-02 11:43:45 +01:00
parent 89b7eb78a7
commit 93d830d500
5 changed files with 72 additions and 14 deletions
+2
View File
@@ -143,6 +143,7 @@ Example output with `dirmd -o docs.md ~/repos/myproject --vertical-slices`:
Output is designed for RAG ingestion and LLM context windows, not human presentation:
- **ISO 8601 Timestamp**: Added as a metadata line (`> Generated: ...`) immediately after the H1 header for every new file created.
- **Git Commit Info**: If the source directory is a Git repository, a second metadata line (`> Commit: <sha> (<message>)`) is added below the timestamp.
- **ASCII tree format** (`+-` instead of Unicode box-drawing) to reduce token overhead
- **Explicit file delimiters**: `--- FILE: ./path (bytes, lines) ---` and `--- END FILE ---`
- **Document type markers**: `[ROOT]` and `[SLICE]` in H1 headers
@@ -230,6 +231,7 @@ Example output structure (non-sliced mode):
# /home/user/repos/myproject [ROOT]
> Generated: 2026-09-02T14:30:00Z
> Commit: a1b2c3d (Fix login bug)
## Directory Tree