Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8b91902
docs: add Step tree architecture design and implementation TODOs
edochi Mar 19, 2026
78366dc
docs: add incremental checklists to Step tree implementation TODOs
edochi Mar 19, 2026
7368642
refactor: add Step tree infrastructure and outcome types
edochi Mar 19, 2026
1243d1c
refactor: convert all 7 commands to Step tree architecture
edochi Mar 19, 2026
6d64c18
refactor: begin pipeline cleanup — delete delete_index, move BuildFil…
edochi Mar 19, 2026
c64118a
docs: update TODO status for Step tree implementation
edochi Mar 19, 2026
78c7a0f
refactor: inline all pipeline calls into commands, remove migration h…
edochi Mar 20, 2026
96f0974
refactor: delete src/pipeline/ directory
edochi Mar 20, 2026
b4f2c54
docs: add post-migration cleanup TODOs (0134, 0135)
edochi Mar 20, 2026
6fa9210
refactor: inline auto-update and auto-build to eliminate redundant reads
edochi Mar 20, 2026
bfd20e5
docs: add TODO-0136 (inline auto-update/auto-build) and Justfile
edochi Mar 20, 2026
e6b2458
fix(check): deduplicate NullNotAllowed violation for required+non-nul…
edochi Mar 23, 2026
fe4bf55
docs: add TODO-0137 (flatten Step tree into steps + result)
edochi Mar 23, 2026
4623b5e
refactor: flatten Step tree into CommandResult, delete CompactOutcome
edochi Mar 23, 2026
cb14a57
docs: mark TODOs 0131, 0132, 0135, 0136, 0137 as done
edochi Mar 23, 2026
5a962f8
refactor: use untagged serialization for Outcome enum
edochi Mar 23, 2026
6ade7eb
refactor: sort fields in mdvs.toml, add unit tests, unify fail helpers
edochi Mar 23, 2026
eb0440f
docs: close TODOs 0119, 0122, 0133, 0134, 0138, 0139; add 0138, 0139;…
edochi Mar 23, 2026
dc42fde
refactor: use Panel for detail rows, fix column width proportions
edochi Mar 24, 2026
81733d1
refactor: redesign init output — skip default constraints, no headers
edochi Mar 24, 2026
a7f4b09
refactor: add KeyValue table style, redesign init output
edochi Mar 28, 2026
6c1eb65
docs: update README output examples to key-value table format
edochi Mar 28, 2026
8763b4b
refactor: redesign info output, tweak KeyValue rendering
edochi Mar 28, 2026
dd0bd15
docs: add TODO-0140 (global --dry-run flag)
edochi Mar 28, 2026
e7ce7fa
refactor: redesign update output to KeyValue style
edochi Mar 28, 2026
daf77c0
refactor: redesign check output to KeyValue style
edochi Mar 29, 2026
0552f45
refactor: fill text output gaps — match JSON fields exactly
edochi Mar 29, 2026
730fbb1
refactor: redesign build output to KeyValue style
edochi Mar 29, 2026
50293e9
refactor: redesign search output to KeyValue style
edochi Mar 29, 2026
ab6b493
docs: add TODO-0141 (global --quiet flag)
edochi Mar 29, 2026
0bdfe7d
refactor: redesign clean output to KeyValue style
edochi Mar 29, 2026
b21c272
docs: add TODO-0142 (fix chunk line numbers to exclude frontmatter)
edochi Mar 29, 2026
9870ca5
fix: offset chunk line numbers by frontmatter length
edochi Mar 29, 2026
e7c383c
docs: update all book output examples to KeyValue table format
edochi Mar 29, 2026
a32a0ea
chore: add book serve target to Justfile
edochi Mar 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mdvs *args:
./target/release/mdvs {{args}}

book:
mdbook serve book/ --open
56 changes: 45 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,34 @@ mdvs scans every file, extracts frontmatter, and infers which fields belong wher

```
Initialized 5 files — 7 field(s)

"title" String 5/5 required everywhere
"draft" Boolean 2/5 only in blog/
"tags" String[] 1/5 only in blog/
"role" String 2/5 required in team/
"email" String 1/5 only in team/
"date" String 1/5 only in meetings/
"attendees" String[] 1/5 only in meetings/
┌ title ────────────┬───────────────────┐
│ type │ String │
├───────────────────┼───────────────────┤
│ files │ 5 out of 5 │
├───────────────────┼───────────────────┤
│ required │ ** │
├───────────────────┼───────────────────┤
│ allowed │ ** │
└───────────────────┴───────────────────┘
┌ draft ────────────┬───────────────────┐
│ type │ Boolean │
├───────────────────┼───────────────────┤
│ files │ 2 out of 5 │
├───────────────────┼───────────────────┤
│ required │ (none) │
├───────────────────┼───────────────────┤
│ allowed │ blog/** │
└───────────────────┴───────────────────┘
┌ role ─────────────┬───────────────────┐
│ type │ String │
├───────────────────┼───────────────────┤
│ files │ 2 out of 5 │
├───────────────────┼───────────────────┤
│ required │ team/** │
├───────────────────┼───────────────────┤
│ allowed │ team/** │
└───────────────────┴───────────────────┘
...
```

`draft` belongs in `blog/`. `role` belongs in `team/`. The directory structure is the schema.
Expand All @@ -123,7 +143,12 @@ mdvs check notes/
```

```
1 violation — "role" MissingRequired in team/charlie.md
Checked 7 files — 1 violation(s)
┌ role ─────────────┬───────────────────┐
│ kind │ Missing required │
├───────────────────┼───────────────────┤
│ files │ team/charlie.md │
└───────────────────┴───────────────────┘
```

`charlie.md` is missing `role` — but `new-post.md` isn't flagged. mdvs knows `role` belongs in `team/`, not in `blog/`.
Expand All @@ -135,8 +160,17 @@ mdvs search "weekly sync" notes/
```

```
1 meetings/weekly.md 0.82
2 team/alice.md 0.45
Searched "weekly sync" — 2 hits
┌ #1 ───────────────┬───────────────────┐
│ file │ meetings/weekly.md│
├───────────────────┼───────────────────┤
│ score │ 0.820 │
└───────────────────┴───────────────────┘
┌ #2 ───────────────┬───────────────────┐
│ file │ team/alice.md │
├───────────────────┼───────────────────┤
│ score │ 0.450 │
└───────────────────┴───────────────────┘
```

Filter with SQL on frontmatter fields:
Expand Down
91 changes: 56 additions & 35 deletions book/src/commands/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,36 @@ On the first build (no existing `.mdvs/`), `--force` is never needed.

### Compact (default)

Incremental build with one new file:

```
Built index — 44 files, 60 chunks

╭──────────────────────────┬─────────────────────────┬─────────────────────────╮
│ embedded │ 1 file │ 1 chunk │
│ unchanged │ 43 files │ 59 chunks │
╰──────────────────────────┴─────────────────────────┴─────────────────────────╯
```

When nothing needs embedding:
When nothing needs embedding (incremental build, all files unchanged):

```
Built index — 43 files, 59 chunks

╭──────────────────────────┬─────────────────────────┬─────────────────────────╮
│ unchanged │ 43 files │ 59 chunks │
╰──────────────────────────┴─────────────────────────┴─────────────────────────╯
┌──────────────────────────┬───────────────────────────────────────────────────┐
│ full rebuild │ false │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ files total │ 43 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ files embedded │ 0 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ files unchanged │ 43 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ files removed │ 0 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ chunks total │ 59 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ chunks embedded │ 0 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ chunks unchanged │ 59 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ chunks removed │ 0 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ new fields │ (none) │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ embedded files │ (none) │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ removed files │ (none) │
└──────────────────────────┴───────────────────────────────────────────────────┘
```

When violations are found, the build aborts:
Expand All @@ -112,29 +123,39 @@ Build aborted — 6 violation(s) found. Run `mdvs check` for details.

### Verbose (`-v`)

Verbose output adds pipeline timing lines before the result:

```
Read config: example_kb/mdvs.toml
Scan: 44 files
Validate: 44 files — no violations
Classify: 44 files (full rebuild)
Load model: "minishlab/potion-base-8M" (256d)
Embed: 44 files (60 chunks)
Write index: 44 files, 60 chunks

Built index — 44 files, 60 chunks (full rebuild)

╭─────────────────────────┬─────────────────────────┬──────────────────────────╮
│ embedded │ 44 files │ 60 chunks │
├─────────────────────────┴─────────────────────────┴──────────────────────────┤
│ - "README.md" (7 chunks) │
│ - "blog/drafts/grant-ideas.md" (2 chunks) │
│ - "blog/drafts/upcoming-talk.md" (1 chunk) │
│ ... │
│ - "scratch.md" (1 chunk) │
╰──────────────────────────────────────────────────────────────────────────────╯
Read config: example_kb/mdvs.toml (4ms)
Scan: 43 files (4ms)
Infer: 37 field(s) (0ms)
Validate: 43 files — no violations (87ms)
Classify: 43 files (full rebuild) (0ms)
Load model: minishlab/potion-base-8M (24ms)
Embed: 43 files, 59 chunks (12ms)
Write index: 43 files, 59 chunks (1ms)
Built index — 43 files, 59 chunks (full rebuild)

┌──────────────────────────┬───────────────────────────────────────────────────┐
│ full rebuild │ true │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ files total │ 43 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ files embedded │ 43 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ files unchanged │ 0 │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ ... │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ embedded files │ README.md (7 chunks) │
│ │ blog/drafts/grant-ideas.md (2 chunks) │
│ │ ... │
├──────────────────────────┼───────────────────────────────────────────────────┤
│ removed files │ (none) │
└──────────────────────────┴───────────────────────────────────────────────────┘
```

Verbose output shows each pipeline step with its result, and expands embedded files with per-file chunk counts.
The key-value table is identical in both modes — verbose only adds the step lines showing processing times. When files are embedded, the `embedded files` row lists each file with its chunk count.

## Exit codes

Expand Down
Loading
Loading