waymark-docs 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +57 -37
- package/dist/commands/find.js +16 -15
- package/dist/commands/ls.js +3 -3
- package/dist/commands/status.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Waymark are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.2.2](https://github.com/ysfaran/waymark/compare/v0.2.1...v0.2.2) (2026-09-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **cli:** align help text with documentation ([#10](https://github.com/ysfaran/waymark/issues/10)) ([dbabc14](https://github.com/ysfaran/waymark/commit/dbabc14244d775cc8a38166d11a386674e282610))
|
|
11
|
+
|
|
5
12
|
## [0.2.1](https://github.com/ysfaran/waymark/compare/v0.2.0...v0.2.1) (2026-08-13)
|
|
6
13
|
|
|
7
14
|
|
package/README.md
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
Waymark is a small, offline-first CLI that helps coding agents find the right
|
|
6
6
|
repository docs for each task. Add structured frontmatter to existing Markdown
|
|
7
7
|
or MDX files, and agents can discover only relevant paths before opening a
|
|
8
|
-
document
|
|
8
|
+
document without reading a large index or following linked navigation files
|
|
9
9
|
that load unrelated context. It is as easy to set up as file-based navigation,
|
|
10
10
|
but remains deterministic and token-efficient; unlike RAG or MCP-backed
|
|
11
|
-
retrieval, it needs no ranking, maintained index
|
|
11
|
+
retrieval, it needs no ranking, maintained index or retrieval infrastructure.
|
|
12
12
|
|
|
13
13
|

|
|
14
14
|
|
|
@@ -37,7 +37,7 @@ npm install --save-dev waymark-docs
|
|
|
37
37
|
|
|
38
38
|
## Quick start
|
|
39
39
|
|
|
40
|
-
1. **Create a Waymark configuration
|
|
40
|
+
1. **Create a Waymark configuration**
|
|
41
41
|
|
|
42
42
|
Run `init` in the repository root:
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ npm install --save-dev waymark-docs
|
|
|
45
45
|
npx waymark init
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
2. **Define searchable metadata
|
|
48
|
+
2. **Define searchable metadata**
|
|
49
49
|
|
|
50
50
|
Add the document kinds and tags that agents can search:
|
|
51
51
|
|
|
@@ -55,11 +55,11 @@ npm install --save-dev waymark-docs
|
|
|
55
55
|
convention: Read before changing code to follow required repository practices
|
|
56
56
|
|
|
57
57
|
tags:
|
|
58
|
-
architecture: System boundaries, component relationships
|
|
58
|
+
architecture: System boundaries, component relationships and dependencies
|
|
59
59
|
typescript: TypeScript-related documentation
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
3. **Register a document
|
|
62
|
+
3. **Register a document**
|
|
63
63
|
|
|
64
64
|
Add Waymark metadata to a Markdown or MDX file. For example, save this as
|
|
65
65
|
`docs/conventions/typescript.md`:
|
|
@@ -73,7 +73,7 @@ npm install --save-dev waymark-docs
|
|
|
73
73
|
# TypeScript conventions
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
4. **Validate the repository
|
|
76
|
+
4. **Validate the repository**
|
|
77
77
|
|
|
78
78
|
Check the configuration and discovered documents:
|
|
79
79
|
|
|
@@ -90,16 +90,29 @@ npm install --save-dev waymark-docs
|
|
|
90
90
|
Tags: 2
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
5. **Discover
|
|
93
|
+
5. **Discover documents**
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
For a quick check, run `npx waymark find` with relevant kind and tag filters:
|
|
96
96
|
|
|
97
97
|
```sh
|
|
98
98
|
npx waymark find --kinds convention --tags typescript --show description
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
```text
|
|
102
|
-
docs/conventions/typescript.md
|
|
102
|
+
docs/conventions/typescript.md: TypeScript conventions for this repository
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
To have agents use Waymark continuously, add this to `AGENTS.md`,
|
|
106
|
+
`CLAUDE.md` or an equivalent file:
|
|
107
|
+
|
|
108
|
+
```md
|
|
109
|
+
## Context Discovery
|
|
110
|
+
|
|
111
|
+
Before working on a non-trivial task, run `npx waymark status --show kind,tags`,
|
|
112
|
+
then use `npx waymark find` with relevant comma-separated `--kinds` and
|
|
113
|
+
`--tags` values, using `--show kind,tags,description` to inspect results.
|
|
114
|
+
Use `--query` for literal text searches and `--filter` for boolean expressions
|
|
115
|
+
over metadata when you need more detailed results.
|
|
103
116
|
```
|
|
104
117
|
|
|
105
118
|
Waymark uses `waymark.yml` by default and also recognizes `waymark.yaml`. It
|
|
@@ -124,8 +137,10 @@ Create a starter configuration in the current directory.
|
|
|
124
137
|
```text
|
|
125
138
|
Usage: waymark init [options]
|
|
126
139
|
|
|
140
|
+
Create a starter Waymark configuration
|
|
141
|
+
|
|
127
142
|
Options:
|
|
128
|
-
-h, --help
|
|
143
|
+
-h, --help display help for command
|
|
129
144
|
```
|
|
130
145
|
|
|
131
146
|
```sh
|
|
@@ -154,7 +169,7 @@ ignore:
|
|
|
154
169
|
- vendor/**
|
|
155
170
|
```
|
|
156
171
|
|
|
157
|
-
Ignore patterns are relative to the repository root and support `*`,
|
|
172
|
+
Ignore patterns are relative to the repository root and support `*`, `?` and
|
|
158
173
|
`**` wildcards. Waymark also honors `.gitignore` automatically.
|
|
159
174
|
|
|
160
175
|
`init` never overwrites an existing configuration and does not allow a nested
|
|
@@ -164,15 +179,17 @@ configuration beneath another Waymark root.
|
|
|
164
179
|
|
|
165
180
|
Validate the Waymark configuration and all discovered Waymark Documents, then
|
|
166
181
|
print the repository root and counts for registered documents, unregistered
|
|
167
|
-
documents, kinds
|
|
182
|
+
documents, kinds and tags. Invalid repositories produce diagnostics and a
|
|
168
183
|
non-zero exit code, which makes this command suitable for CI.
|
|
169
184
|
|
|
170
185
|
```text
|
|
171
186
|
Usage: waymark status [options]
|
|
172
187
|
|
|
188
|
+
Validate and summarize the Waymark repository
|
|
189
|
+
|
|
173
190
|
Options:
|
|
174
|
-
-s, --show <fields>
|
|
175
|
-
-h, --help
|
|
191
|
+
-s, --show <fields> show declared kind and tag details (kind,tags)
|
|
192
|
+
-h, --help display help for command
|
|
176
193
|
```
|
|
177
194
|
|
|
178
195
|
Validate the repository:
|
|
@@ -201,16 +218,21 @@ Find registered Waymark Documents across the repository. With no filters,
|
|
|
201
218
|
```text
|
|
202
219
|
Usage: waymark find [options]
|
|
203
220
|
|
|
221
|
+
Discover Waymark Documents
|
|
222
|
+
|
|
204
223
|
Options:
|
|
205
|
-
-k, --kinds <identifiers>
|
|
206
|
-
-t, --tags <identifiers>
|
|
207
|
-
-T, --require-tags <identifiers>
|
|
208
|
-
|
|
209
|
-
-
|
|
210
|
-
-
|
|
211
|
-
|
|
212
|
-
--
|
|
213
|
-
|
|
224
|
+
-k, --kinds <identifiers> match any kind (comma-separated, repeatable)
|
|
225
|
+
-t, --tags <identifiers> match any tag (comma-separated, repeatable)
|
|
226
|
+
-T, --require-tags <identifiers> require every tag (comma-separated,
|
|
227
|
+
repeatable)
|
|
228
|
+
-f, --filter <expression> match a boolean filter expression
|
|
229
|
+
-q, --query <text> match literal text content
|
|
230
|
+
(case-insensitive)
|
|
231
|
+
-s, --show <fields> show kind, tags and description
|
|
232
|
+
(comma-separated)
|
|
233
|
+
--json return a flat JSON array
|
|
234
|
+
--tree output documents as directory tree
|
|
235
|
+
-h, --help display help for command
|
|
214
236
|
```
|
|
215
237
|
|
|
216
238
|
Simple filter values use OR within an option. Different options combine with
|
|
@@ -232,20 +254,20 @@ npx waymark find --kinds adr --kinds convention
|
|
|
232
254
|
```
|
|
233
255
|
|
|
234
256
|
Use `--query` for a case-insensitive literal search of document bodies. It can
|
|
235
|
-
be combined with either simple or
|
|
257
|
+
be combined with either simple or boolean metadata filters:
|
|
236
258
|
|
|
237
259
|
```sh
|
|
238
260
|
npx waymark find --kinds convention --query "dependency injection"
|
|
239
261
|
```
|
|
240
262
|
|
|
241
|
-
Use `--filter` for advanced
|
|
242
|
-
`AND`, `OR
|
|
263
|
+
Use `--filter` for advanced boolean expressions over metadata with `kind:`,
|
|
264
|
+
`tag:`, `NOT`, `AND`, `OR` and parentheses:
|
|
243
265
|
|
|
244
266
|
```sh
|
|
245
267
|
npx waymark find --filter '(kind:adr OR kind:convention) AND tag:typescript AND NOT tag:architecture'
|
|
246
268
|
```
|
|
247
269
|
|
|
248
|
-
`--filter` cannot be combined with `--kinds`, `--tags
|
|
270
|
+
`--filter` cannot be combined with `--kinds`, `--tags` or `--require-tags`.
|
|
249
271
|
|
|
250
272
|
Add metadata fields to the default line-oriented output with `--show`:
|
|
251
273
|
|
|
@@ -277,13 +299,15 @@ Paths are returned relative to the repository root in deterministic order.
|
|
|
277
299
|
```text
|
|
278
300
|
Usage: waymark ls [options] [directory]
|
|
279
301
|
|
|
302
|
+
Inventory document registration in a directory
|
|
303
|
+
|
|
280
304
|
Arguments:
|
|
281
|
-
directory
|
|
305
|
+
directory directory to inspect (defaults to the current directory)
|
|
282
306
|
|
|
283
307
|
Options:
|
|
284
|
-
-R, --recursive
|
|
285
|
-
-u, --unregistered
|
|
286
|
-
-h, --help
|
|
308
|
+
-R, --recursive inspect directories recursively
|
|
309
|
+
-u, --unregistered list only unregistered documents
|
|
310
|
+
-h, --help display help for command
|
|
287
311
|
```
|
|
288
312
|
|
|
289
313
|
List registered documents directly inside `docs`:
|
|
@@ -304,17 +328,13 @@ Find Markdown and MDX files that are missing Waymark metadata:
|
|
|
304
328
|
npx waymark ls -R --unregistered docs
|
|
305
329
|
```
|
|
306
330
|
|
|
307
|
-
`ls` respects `.gitignore`, Waymark ignore patterns
|
|
331
|
+
`ls` respects `.gitignore`, Waymark ignore patterns and Git directory boundaries.
|
|
308
332
|
The selected directory must be inside the repository root.
|
|
309
333
|
|
|
310
334
|
### `waymark help`
|
|
311
335
|
|
|
312
336
|
Show the command list or detailed help for one command:
|
|
313
337
|
|
|
314
|
-
```text
|
|
315
|
-
Usage: waymark help [command]
|
|
316
|
-
```
|
|
317
|
-
|
|
318
338
|
```sh
|
|
319
339
|
npx waymark --help
|
|
320
340
|
npx waymark help find
|
package/dist/commands/find.js
CHANGED
|
@@ -5,19 +5,20 @@ import { filterDocuments, scanDocuments, } from "../documents/index.js";
|
|
|
5
5
|
export function createFindCommand() {
|
|
6
6
|
return new Command("find")
|
|
7
7
|
.description("Discover Waymark Documents")
|
|
8
|
-
.option("-k, --kinds <identifiers>", "
|
|
9
|
-
.option("-t, --tags <identifiers>", "
|
|
10
|
-
.option("-T, --require-tags <identifiers>", "
|
|
11
|
-
.option("-f, --filter <expression>", "
|
|
12
|
-
.option("-q, --query <text>", "
|
|
13
|
-
.option("-s, --show <fields>", "
|
|
14
|
-
.option("--json", "
|
|
15
|
-
.option("--tree", "
|
|
8
|
+
.option("-k, --kinds <identifiers>", "match any kind (comma-separated, repeatable)", collectOptionValue)
|
|
9
|
+
.option("-t, --tags <identifiers>", "match any tag (comma-separated, repeatable)", collectOptionValue)
|
|
10
|
+
.option("-T, --require-tags <identifiers>", "require every tag (comma-separated, repeatable)", collectOptionValue)
|
|
11
|
+
.option("-f, --filter <expression>", "match a boolean filter expression")
|
|
12
|
+
.option("-q, --query <text>", "match literal text content (case-insensitive)")
|
|
13
|
+
.option("-s, --show <fields>", "show kind, tags and description (comma-separated)")
|
|
14
|
+
.option("--json", "return a flat JSON array")
|
|
15
|
+
.option("--tree", "output documents as directory tree")
|
|
16
16
|
.action(async (options) => {
|
|
17
|
+
const kinds = options.kinds ?? [];
|
|
18
|
+
const tags = options.tags ?? [];
|
|
19
|
+
const requiredTags = options.requireTags ?? [];
|
|
17
20
|
if (options.filter !== undefined &&
|
|
18
|
-
(
|
|
19
|
-
options.tags.length > 0 ||
|
|
20
|
-
options.requireTags.length > 0)) {
|
|
21
|
+
(kinds.length > 0 || tags.length > 0 || requiredTags.length > 0)) {
|
|
21
22
|
throw new Error("--filter cannot be combined with --kinds, --tags, or --require-tags.");
|
|
22
23
|
}
|
|
23
24
|
if (options.json && options.tree) {
|
|
@@ -34,19 +35,19 @@ export function createFindCommand() {
|
|
|
34
35
|
method: "filter-groups",
|
|
35
36
|
kinds: parseIdentifierOptions({
|
|
36
37
|
optionName: "--kinds",
|
|
37
|
-
values:
|
|
38
|
+
values: kinds,
|
|
38
39
|
declarations: configuration.kinds,
|
|
39
40
|
declarationName: "kind",
|
|
40
41
|
}),
|
|
41
42
|
tags: parseIdentifierOptions({
|
|
42
43
|
optionName: "--tags",
|
|
43
|
-
values:
|
|
44
|
+
values: tags,
|
|
44
45
|
declarations: configuration.tags,
|
|
45
46
|
declarationName: "tag",
|
|
46
47
|
}),
|
|
47
48
|
requiredTags: parseIdentifierOptions({
|
|
48
49
|
optionName: "--require-tags",
|
|
49
|
-
values:
|
|
50
|
+
values: requiredTags,
|
|
50
51
|
declarations: configuration.tags,
|
|
51
52
|
declarationName: "tag",
|
|
52
53
|
}),
|
|
@@ -187,7 +188,7 @@ function createTreeDirectory() {
|
|
|
187
188
|
};
|
|
188
189
|
}
|
|
189
190
|
function collectOptionValue(value, previous) {
|
|
190
|
-
return [...previous, value];
|
|
191
|
+
return [...(previous ?? []), value];
|
|
191
192
|
}
|
|
192
193
|
function parseIdentifierOptions({ optionName, values, declarations, declarationName, }) {
|
|
193
194
|
const identifiers = new Set();
|
package/dist/commands/ls.js
CHANGED
|
@@ -6,9 +6,9 @@ import { scanDocuments } from "../documents/index.js";
|
|
|
6
6
|
export function createLsCommand() {
|
|
7
7
|
return new Command("ls")
|
|
8
8
|
.description("Inventory document registration in a directory")
|
|
9
|
-
.argument("[directory]", "
|
|
10
|
-
.option("-R, --recursive", "
|
|
11
|
-
.option("-u, --unregistered", "
|
|
9
|
+
.argument("[directory]", "directory to inspect (defaults to the current directory)")
|
|
10
|
+
.option("-R, --recursive", "inspect directories recursively")
|
|
11
|
+
.option("-u, --unregistered", "list only unregistered documents")
|
|
12
12
|
.action(async (directory, options) => {
|
|
13
13
|
const loadedConfiguration = await loadConfiguration(process.cwd());
|
|
14
14
|
if (loadedConfiguration.kind === "invalid") {
|
package/dist/commands/status.js
CHANGED
|
@@ -5,7 +5,7 @@ import { scanDocuments } from "../documents/index.js";
|
|
|
5
5
|
export function createStatusCommand() {
|
|
6
6
|
return new Command("status")
|
|
7
7
|
.description("Validate and summarize the Waymark repository")
|
|
8
|
-
.option("-s, --show <fields>", "
|
|
8
|
+
.option("-s, --show <fields>", "show declared kind and tag details (kind,tags)")
|
|
9
9
|
.action(async (options) => {
|
|
10
10
|
const shownFields = parseShownFields(options.show);
|
|
11
11
|
const loadedConfiguration = await loadConfiguration(process.cwd());
|