treedocs 0.3.0

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.
@@ -0,0 +1,337 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://dandylyons.github.io/treedocs/schemas/0.2.0/treedocs.schema.json",
4
+ "title": "treedocs.yaml",
5
+ "description": "Schema for the YAML repository documentation state maintained by treedocs.",
6
+ "markdownDescription": "Schema for `treedocs.yaml`, the repository documentation state maintained by the `treedocs` CLI. Schema `0.2.0` reserves underscore-prefixed metadata keys inside `tree`: `_doc`, `_link`, `_description`, and `_references`.",
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": ["schema_version", "project", "signature", "tree"],
10
+ "defaultSnippets": [
11
+ {
12
+ "label": "treedocs.yaml",
13
+ "description": "Create a minimal treedocs.yaml document.",
14
+ "body": {
15
+ "schema_version": "0.2.0",
16
+ "project": {
17
+ "name": "${1:project-name}",
18
+ "version": "0.0.0",
19
+ "last_updated": "${2:YYYY-MM-DD}"
20
+ },
21
+ "signature": "sha256:${3:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}",
22
+ "tree": {}
23
+ }
24
+ }
25
+ ],
26
+ "properties": {
27
+ "schema_version": {
28
+ "title": "Schema Version",
29
+ "type": "string",
30
+ "enum": ["0.2.0"],
31
+ "default": "0.2.0",
32
+ "description": "The treedocs.yaml file-format schema version. This is distinct from project.version.",
33
+ "markdownDescription": "The `treedocs.yaml` file-format schema version. Use `0.2.0` for files using `_description` and `_references`. This is distinct from `project.version`.",
34
+ "examples": ["0.2.0"]
35
+ },
36
+ "project": {
37
+ "$ref": "#/$defs/project"
38
+ },
39
+ "overrides": {
40
+ "$ref": "#/$defs/overrides"
41
+ },
42
+ "signature": {
43
+ "title": "Filesystem Signature",
44
+ "type": "string",
45
+ "pattern": "^sha256:[A-Fa-f0-9]{64}$",
46
+ "description": "Deterministic SHA-256 structural hash of the scanned tree. treedocs updates this value during init, sync, and update.",
47
+ "markdownDescription": "Deterministic SHA-256 structural hash of the scanned tree. The CLI updates this during `treedocs init`, `treedocs sync`, and `treedocs update`.",
48
+ "examples": ["sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]
49
+ },
50
+ "tree": {
51
+ "title": "Documentation Tree",
52
+ "type": "object",
53
+ "description": "Nested filesystem mirror keyed by repository-relative path components or relative path strings.",
54
+ "markdownDescription": "Nested filesystem mirror keyed by repository-relative path components or relative path strings. Inside tree entries, underscore-prefixed keys are reserved treedocs metadata; normal keys represent filesystem entries.",
55
+ "default": {},
56
+ "examples": [
57
+ {
58
+ "README.md": "Project overview",
59
+ "Sources": {
60
+ "_doc": "Source files",
61
+ "main.swift": "CLI entry point"
62
+ }
63
+ }
64
+ ],
65
+ "additionalProperties": {
66
+ "$ref": "#/$defs/treeEntry"
67
+ }
68
+ }
69
+ },
70
+ "$defs": {
71
+ "project": {
72
+ "title": "Project Metadata",
73
+ "type": "object",
74
+ "description": "Repository metadata stored in treedocs.yaml.",
75
+ "markdownDescription": "Repository metadata stored in `treedocs.yaml`. `project.version` describes the documented project, not the treedocs schema version.",
76
+ "required": ["name", "version", "last_updated"],
77
+ "properties": {
78
+ "name": {
79
+ "title": "Project Name",
80
+ "type": "string",
81
+ "minLength": 1,
82
+ "description": "Human-readable project name.",
83
+ "examples": ["treedocs"]
84
+ },
85
+ "version": {
86
+ "title": "Project Version",
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "description": "Version of the documented project. This is not the treedocs.yaml schema version.",
90
+ "examples": ["0.2.0", "1.0.0"]
91
+ },
92
+ "last_updated": {
93
+ "title": "Last Updated",
94
+ "type": "string",
95
+ "format": "date",
96
+ "description": "Date this treedocs state was initialized or last intentionally refreshed, formatted as YYYY-MM-DD.",
97
+ "examples": ["2026-06-22"]
98
+ }
99
+ },
100
+ "additionalProperties": {
101
+ "type": "string",
102
+ "description": "Additional project metadata preserved by treedocs. Values must be strings."
103
+ }
104
+ },
105
+ "overrides": {
106
+ "title": "Configuration Overrides",
107
+ "type": "object",
108
+ "description": "Project-local configuration overrides stored in treedocs.yaml.",
109
+ "markdownDescription": "Project-local configuration overrides. These override built-in defaults and external `.treedocs/config.yaml` settings when the CLI loads this state file.",
110
+ "additionalProperties": false,
111
+ "properties": {
112
+ "exclude": {
113
+ "title": "Exclude Patterns",
114
+ "type": "array",
115
+ "description": "Ignore patterns applied while scanning the repository.",
116
+ "markdownDescription": "Ignore patterns applied while scanning. Patterns are merged with standard excludes, `.gitignore`, and `.treedocs/.treedocs_ignore`.",
117
+ "items": {
118
+ "type": "string",
119
+ "examples": ["Generated", "*.xcuserstate", "build/"]
120
+ },
121
+ "default": []
122
+ },
123
+ "use_gitignore": {
124
+ "title": "Use .gitignore",
125
+ "type": "boolean",
126
+ "description": "Whether scanner ignore behavior includes patterns from .gitignore.",
127
+ "default": true
128
+ },
129
+ "max_description_length": {
130
+ "title": "Maximum Description Length",
131
+ "type": "integer",
132
+ "minimum": 0,
133
+ "description": "Maximum rendered description length before truncation. Use 0 to disable truncation.",
134
+ "default": 120
135
+ },
136
+ "indent_size": {
137
+ "title": "Indent Size",
138
+ "type": "integer",
139
+ "minimum": 0,
140
+ "description": "Reserved indentation setting parsed and preserved by the CLI.",
141
+ "default": 2
142
+ },
143
+ "align_columns": {
144
+ "title": "Align Columns",
145
+ "type": "boolean",
146
+ "description": "Whether renderers should align description columns when supported.",
147
+ "default": false
148
+ },
149
+ "check_severity": {
150
+ "title": "Check Severity",
151
+ "type": "string",
152
+ "enum": ["error", "warn"],
153
+ "enumDescriptions": [
154
+ "treedocs check exits non-zero when it finds issues.",
155
+ "treedocs check reports issues without failing the process."
156
+ ],
157
+ "description": "Controls whether treedocs check issues fail or warn.",
158
+ "default": "error"
159
+ },
160
+ "auto_init_empty": {
161
+ "title": "Auto Init Empty Repositories",
162
+ "type": "boolean",
163
+ "description": "Reserved setting parsed and preserved by the CLI.",
164
+ "default": false
165
+ },
166
+ "theme": {
167
+ "title": "Theme",
168
+ "type": "string",
169
+ "description": "Reserved renderer theme name parsed and preserved by the CLI.",
170
+ "examples": ["light", "dark"]
171
+ },
172
+ "icons": {
173
+ "title": "Icons",
174
+ "type": "boolean",
175
+ "description": "Reserved renderer icon setting parsed and preserved by the CLI.",
176
+ "default": false
177
+ },
178
+ "ai_provider": {
179
+ "title": "AI Provider",
180
+ "type": "string",
181
+ "description": "Reserved AI provider identifier parsed and preserved by the CLI.",
182
+ "examples": ["openai", "anthropic"]
183
+ },
184
+ "ai_model": {
185
+ "title": "AI Model",
186
+ "type": "string",
187
+ "description": "Reserved AI model identifier parsed and preserved by the CLI.",
188
+ "examples": ["gpt-5.5", "claude-sonnet-4-5"]
189
+ }
190
+ }
191
+ },
192
+ "entryDocumentation": {
193
+ "title": "Entry Documentation",
194
+ "description": "Documentation can be a compact description string or an object with _description and _references metadata.",
195
+ "markdownDescription": "Documentation can be a compact description string or an object with `_description` and `_references` metadata. Use object form when references are needed.",
196
+ "oneOf": [
197
+ {
198
+ "title": "Compact Description",
199
+ "type": "string",
200
+ "description": "Simple human-readable description for a file or directory.",
201
+ "examples": ["Project overview", "Source files"]
202
+ },
203
+ {
204
+ "title": "Structured Documentation",
205
+ "type": "object",
206
+ "additionalProperties": false,
207
+ "defaultSnippets": [
208
+ {
209
+ "label": "description with references",
210
+ "body": {
211
+ "_description": "${1:Description}",
212
+ "_references": ["${2:DOCS/Reference.md}"]
213
+ }
214
+ }
215
+ ],
216
+ "properties": {
217
+ "_description": {
218
+ "$ref": "#/$defs/description"
219
+ },
220
+ "_references": {
221
+ "$ref": "#/$defs/references"
222
+ }
223
+ }
224
+ }
225
+ ]
226
+ },
227
+ "description": {
228
+ "title": "Description",
229
+ "type": "string",
230
+ "description": "Human-readable documentation for a tree entry.",
231
+ "markdownDescription": "Human-readable documentation for a tree entry. Empty strings mean the description is still missing; `_` may be used as an intentional blank sentinel.",
232
+ "examples": ["Project overview", "CLI commands", "_"]
233
+ },
234
+ "references": {
235
+ "title": "References",
236
+ "type": "array",
237
+ "description": "Supplementary documentation references for a tree entry.",
238
+ "markdownDescription": "Supplementary documentation references. Each item can be a repository-local path, an HTTPS URL, or a Markdown link to either.",
239
+ "items": {
240
+ "$ref": "#/$defs/reference"
241
+ },
242
+ "examples": [["DOCS/Architecture.md", "https://example.com/reference"]]
243
+ },
244
+ "reference": {
245
+ "title": "Reference",
246
+ "description": "Supplementary documentation reference: a local path, an HTTPS URL, or a markdown link to either.",
247
+ "oneOf": [
248
+ {
249
+ "title": "Local Path Reference",
250
+ "type": "string",
251
+ "description": "Repository-local path reference.",
252
+ "pattern": "^(?!\\[)(?![A-Za-z][A-Za-z0-9+.-]*:)(?=.*\\S)[^\\n]+$",
253
+ "examples": ["DOCS/Architecture.md", "README.md"]
254
+ },
255
+ {
256
+ "title": "HTTPS Reference",
257
+ "type": "string",
258
+ "description": "HTTPS URL reference.",
259
+ "pattern": "^https://\\S+$",
260
+ "examples": ["https://example.com/reference"]
261
+ },
262
+ {
263
+ "title": "Markdown Link Reference",
264
+ "type": "string",
265
+ "description": "Markdown link whose target is a local path or HTTPS URL.",
266
+ "pattern": "^\\[[^\\]\\n]+\\]\\((?:https://\\S+|(?!(?:[A-Za-z][A-Za-z0-9+.-]*:))(?=.*\\S)[^)\\n]+)\\)$",
267
+ "examples": ["[Architecture](DOCS/Architecture.md)", "[External reference](https://example.com/reference)"]
268
+ }
269
+ ]
270
+ },
271
+ "treeEntry": {
272
+ "title": "Tree Entry",
273
+ "description": "A documented file or directory path. Strings are simple descriptions; objects may contain underscore-prefixed metadata, links, and nested children.",
274
+ "markdownDescription": "A documented file or directory path. Strings are simple descriptions. Objects may contain reserved metadata keys (`_doc`, `_link`, `_description`, `_references`) and normal child keys for filesystem entries. In schema `0.2.0`, `description` and `references` are normal child names, not metadata.",
275
+ "oneOf": [
276
+ {
277
+ "title": "Compact File Description",
278
+ "type": "string",
279
+ "description": "Simple description for a leaf file entry.",
280
+ "examples": ["Project overview", "Package manifest"]
281
+ },
282
+ {
283
+ "title": "Structured File or Directory Entry",
284
+ "type": "object",
285
+ "defaultSnippets": [
286
+ {
287
+ "label": "documented file with references",
288
+ "body": {
289
+ "_description": "${1:Description}",
290
+ "_references": ["${2:DOCS/Reference.md}"]
291
+ }
292
+ },
293
+ {
294
+ "label": "documented directory",
295
+ "body": {
296
+ "_doc": "${1:Directory description}",
297
+ "${2:child.md}": "${3:Child description}"
298
+ }
299
+ },
300
+ {
301
+ "label": "linked entry",
302
+ "body": {
303
+ "_description": "${1:Alias description}",
304
+ "_link": "${2:target/path}"
305
+ }
306
+ }
307
+ ],
308
+ "properties": {
309
+ "_description": {
310
+ "$ref": "#/$defs/description"
311
+ },
312
+ "_references": {
313
+ "$ref": "#/$defs/references"
314
+ },
315
+ "_doc": {
316
+ "title": "Directory Documentation",
317
+ "description": "Documentation for this directory entry.",
318
+ "markdownDescription": "Documentation for this directory entry. Use compact string form for only a description, or object form with `_description` and `_references` when references are needed.",
319
+ "$ref": "#/$defs/entryDocumentation"
320
+ },
321
+ "_link": {
322
+ "title": "Link Target",
323
+ "type": "string",
324
+ "minLength": 1,
325
+ "description": "Alias target for this entry. Use a documented tree path, relative path, or external URL.",
326
+ "markdownDescription": "Alias target for this entry. The CLI resolves internal `_link` targets against documented tree paths and reports broken or cyclic links.",
327
+ "examples": ["Sources/treedocs", "../README.md", "https://example.com"]
328
+ }
329
+ },
330
+ "additionalProperties": {
331
+ "$ref": "#/$defs/treeEntry"
332
+ }
333
+ }
334
+ ]
335
+ }
336
+ }
337
+ }