documentation-engine 0.1.2__py3-none-any.whl
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.
- docsystem/__init__.py +22 -0
- docsystem/__main__.py +4 -0
- docsystem/catalog.py +665 -0
- docsystem/cli.py +2573 -0
- docsystem/config.py +216 -0
- docsystem/mcp_server.py +324 -0
- docsystem/metadata.py +307 -0
- docsystem/migration.py +309 -0
- docsystem/projection.py +609 -0
- docsystem/readiness.py +132 -0
- docsystem/sections.py +252 -0
- documentation_engine-0.1.2.dist-info/METADATA +417 -0
- documentation_engine-0.1.2.dist-info/RECORD +16 -0
- documentation_engine-0.1.2.dist-info/WHEEL +4 -0
- documentation_engine-0.1.2.dist-info/entry_points.txt +3 -0
- documentation_engine-0.1.2.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: documentation-engine
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Provider-neutral structured Markdown documentation engine.
|
|
5
|
+
Project-URL: Repository, https://github.com/Jafa7/DocumentationEngine
|
|
6
|
+
Project-URL: Documentation, https://github.com/Jafa7/DocumentationEngine/tree/main/docs
|
|
7
|
+
Project-URL: Issues, https://github.com/Jafa7/DocumentationEngine/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/Jafa7/DocumentationEngine/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Oleg Synelnykov (Jafa7)
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Requires-Dist: pyyaml<7,>=6
|
|
14
|
+
Provides-Extra: mcp
|
|
15
|
+
Requires-Dist: mcp<2,>=1.2; extra == 'mcp'
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# Documentation Engine
|
|
19
|
+
|
|
20
|
+
[](https://github.com/Jafa7/DocumentationEngine/actions/workflows/ci.yml)
|
|
21
|
+
|
|
22
|
+
Documentation Engine is a provider-neutral toolkit for maintaining structured
|
|
23
|
+
Markdown knowledge that remains usable by humans and AI clients as a project
|
|
24
|
+
grows.
|
|
25
|
+
|
|
26
|
+
The project is in an early extraction stage. Its first integration fixture is
|
|
27
|
+
Paradigmarium.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install documentation-engine
|
|
33
|
+
pip install "documentation-engine[mcp]"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The distribution is `documentation-engine`; the import package, `docsystem`
|
|
37
|
+
and `docsystem-mcp` console scripts, and `.docsystem.toml`/`.docsystem/`
|
|
38
|
+
project files keep their existing names. Contributors and anyone tracking
|
|
39
|
+
unreleased development should instead use a source/editable checkout — see
|
|
40
|
+
[Development setup vs. consumer install](#development-setup-vs-consumer-install)
|
|
41
|
+
below.
|
|
42
|
+
|
|
43
|
+
## Measured context reduction
|
|
44
|
+
|
|
45
|
+
The graph below shows the product's core benefit: an AI client receives the
|
|
46
|
+
complete task-relevant documentation context without reading an entire growing
|
|
47
|
+
corpus. It compares a naive full-tree read with DocumentationEngine context
|
|
48
|
+
packets for three predefined tasks over a real 6.41 MB legacy Markdown corpus
|
|
49
|
+
containing 292 documents. Lower is better.
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
The reduction is selective retrieval, not lossy compression. DocumentationEngine
|
|
54
|
+
does not paraphrase, summarize or arbitrarily truncate the selected context:
|
|
55
|
+
navigation excerpts and requested sections remain verbatim Markdown, required
|
|
56
|
+
scenario coverage is checked, and every omitted H2 remains visible. A client
|
|
57
|
+
can request any omitted section or the complete document explicitly.
|
|
58
|
+
|
|
59
|
+
| Scenario | Required documents | Required sections | Packet | Corpus read | Reduction |
|
|
60
|
+
| --- | ---: | ---: | ---: | ---: | ---: |
|
|
61
|
+
| Architecture analysis | 4 | 6 | 120.7 KB | 1.88% | 98.12% |
|
|
62
|
+
| Roadmap phase | 4 | 7 | 123.6 KB | 1.93% | 98.07% |
|
|
63
|
+
| Research continuation | 4 | 9 | 60.2 KB | 0.94% | 99.06% |
|
|
64
|
+
|
|
65
|
+
Each task passed a quality guard: every predefined required document and
|
|
66
|
+
section was present, every selected document carried an explicit coverage
|
|
67
|
+
line. The smaller packet comes from excluding unrelated documents and
|
|
68
|
+
unrequested sections, not from rewriting or degrading the selected material.
|
|
69
|
+
The baseline is deliberately specific: reading every Markdown byte, not every
|
|
70
|
+
possible manual or competing retrieval strategy. UTF-8 bytes are a
|
|
71
|
+
deterministic provider-neutral proxy for context volume, not tokenizer-specific
|
|
72
|
+
token counts or a claim about total engineering productivity.
|
|
73
|
+
|
|
74
|
+
See [the measurement methodology](docs/context-efficiency.md) for the corpus,
|
|
75
|
+
shadow-overlay, formulas, quality checks and limitations. The chart is a
|
|
76
|
+
static measured snapshot; it does not publish an unqualified forecast for
|
|
77
|
+
larger corpora.
|
|
78
|
+
|
|
79
|
+
## Connecting Documentation Engine to your project
|
|
80
|
+
|
|
81
|
+
**If you are an AI agent** asked to set this up: follow
|
|
82
|
+
[docs/setup-guide.md](docs/setup-guide.md) step by step. It contains the
|
|
83
|
+
install/adoption flow, required user questions, backup-policy setup and checks.
|
|
84
|
+
Do not improvise a local backup path or commit private planning paths.
|
|
85
|
+
|
|
86
|
+
**If you are a human**: paste this to the agent in the project you want to
|
|
87
|
+
adopt:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
Connect Documentation Engine to this project.
|
|
91
|
+
Repository: https://github.com/Jafa7/DocumentationEngine
|
|
92
|
+
Read docs/setup-guide.md in that repository and follow it exactly.
|
|
93
|
+
Ask me where local disaster-recovery backups should be stored before touching
|
|
94
|
+
ignored/private documentation or local configuration.
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Principles
|
|
98
|
+
|
|
99
|
+
- Markdown is the editable source of truth.
|
|
100
|
+
- Stable IDs survive file moves and title changes.
|
|
101
|
+
- Generated indexes are deterministic projections, never a second truth.
|
|
102
|
+
- Human navigation and machine retrieval use the same dependency model.
|
|
103
|
+
- Context selection exposes omissions instead of silently truncating meaning.
|
|
104
|
+
- Mechanical maintenance is automated; semantic decisions remain reviewable.
|
|
105
|
+
- AI integrations are adapters around a provider-neutral core.
|
|
106
|
+
|
|
107
|
+
For work that splits into a new chat, module, repository or long-running idea,
|
|
108
|
+
use the [Workstream / Idea Branching](docs/workstream-branching.md) pattern so
|
|
109
|
+
the child context carries its inherited context, boundaries and return
|
|
110
|
+
protocol.
|
|
111
|
+
|
|
112
|
+
For problems found while adopting Documentation Engine in another project, use
|
|
113
|
+
the [adopter reporting](docs/adopter-reporting.md) policy and issue templates.
|
|
114
|
+
Reports start with compact diagnostics and sanitized evidence, not private
|
|
115
|
+
document bodies or unbounded logs.
|
|
116
|
+
|
|
117
|
+
## Development setup vs. consumer install
|
|
118
|
+
|
|
119
|
+
Development work in this checkout runs the CLI as a module against `src/`,
|
|
120
|
+
either via `python -m docsystem ...` in an editable install or with
|
|
121
|
+
`PYTHONPATH=src`. Downstream consumers (such as Paradigmarium) instead depend
|
|
122
|
+
on `docsystem` as an ordinary installed package and invoke the `docsystem`
|
|
123
|
+
console script produced by the build, with no `PYTHONPATH` and no direct
|
|
124
|
+
import of this repository's sources.
|
|
125
|
+
|
|
126
|
+
`uv.lock` pins the resolved dependency graph for this checkout.
|
|
127
|
+
`uv lock --check` verifies the lockfile matches `pyproject.toml`.
|
|
128
|
+
|
|
129
|
+
Publishing the distribution is tag-triggered and documented separately in
|
|
130
|
+
[the release guide](docs/releasing.md).
|
|
131
|
+
|
|
132
|
+
`scripts/installed_cli_smoke.sh` is the reproducible check for the consumer
|
|
133
|
+
path: it builds a wheel from the current checkout, installs it into an
|
|
134
|
+
isolated venv, and runs the installed `docsystem` entry point against a fresh
|
|
135
|
+
fixture project from an unrelated working directory. It requires no API
|
|
136
|
+
credentials, does not modify this repository, and cleans up all temporary
|
|
137
|
+
files on exit.
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
./scripts/installed_cli_smoke.sh
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
When working from Windows, stage and commit this repository from inside WSL,
|
|
144
|
+
not with Windows Git over `\\wsl.localhost`. Windows-side staging can drop
|
|
145
|
+
the executable bit on shell scripts. CI expects
|
|
146
|
+
`scripts/installed_cli_smoke.sh` to remain executable (`100755`):
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
git ls-files --stage scripts/installed_cli_smoke.sh
|
|
150
|
+
test -x scripts/installed_cli_smoke.sh
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Initial CLI
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
python -m docsystem init .
|
|
157
|
+
python -m docsystem doctor .
|
|
158
|
+
python -m docsystem show-config .
|
|
159
|
+
python -m docsystem catalog .
|
|
160
|
+
python -m docsystem catalog . --explain
|
|
161
|
+
python -m docsystem catalog . --explain --json
|
|
162
|
+
python -m docsystem validate .
|
|
163
|
+
python -m docsystem validate . --verbose-adoption
|
|
164
|
+
python -m docsystem read DOC-001 .
|
|
165
|
+
python -m docsystem read DOC-001 . --list
|
|
166
|
+
python -m docsystem read DOC-001 . --anchor purpose
|
|
167
|
+
python -m docsystem dependencies DOC-001 .
|
|
168
|
+
python -m docsystem dependencies DOC-001 . --reverse
|
|
169
|
+
python -m docsystem context DOC-001 . --depth 1
|
|
170
|
+
python -m docsystem context DOC-001 . --depth 1 --json
|
|
171
|
+
python -m docsystem context DOC-001 . --outline
|
|
172
|
+
python -m docsystem context DOC-001 . --outline --json
|
|
173
|
+
python -m docsystem context DOC-001 . --assume-known DOC-001@3
|
|
174
|
+
python -m docsystem context DOC-001 . --since 0a1b2c3d4e5f
|
|
175
|
+
python -m docsystem impact DOC-001 .
|
|
176
|
+
python -m docsystem migration-report .
|
|
177
|
+
python -m docsystem migration-report . --json
|
|
178
|
+
python -m docsystem readiness .
|
|
179
|
+
python -m docsystem readiness . --json
|
|
180
|
+
python -m docsystem finish DOC-001 .
|
|
181
|
+
python -m docsystem finish DOC-001 . --json
|
|
182
|
+
python -m docsystem report draft . --project-name "My Project" --type adoption-finding --source codex
|
|
183
|
+
python -m docsystem migrate .
|
|
184
|
+
python -m docsystem migrate . --apply
|
|
185
|
+
python -m docsystem index . --write
|
|
186
|
+
python -m docsystem changes .
|
|
187
|
+
python -m docsystem changes . --json
|
|
188
|
+
python -m docsystem agent-instructions .
|
|
189
|
+
python -m docsystem agent-instructions . --json
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
`init` creates a project-local `.docsystem.toml` and the configured
|
|
193
|
+
documentation root. It does not create empty documentation hierarchies.
|
|
194
|
+
|
|
195
|
+
`catalog` lists Markdown source files under paths mapped by logical roles in
|
|
196
|
+
`[areas]`. `catalog --explain` classifies every Markdown file as included,
|
|
197
|
+
excluded or unmapped. Unmapped Markdown is a validation error rather than a
|
|
198
|
+
silent omission.
|
|
199
|
+
|
|
200
|
+
Catalog exclusions are optional, ordered POSIX globs relative to the
|
|
201
|
+
documentation root:
|
|
202
|
+
|
|
203
|
+
```toml
|
|
204
|
+
[catalog]
|
|
205
|
+
exclude = ["templates/*-template.md"]
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
The first matching pattern is reported as the exclusion reason. An area mapped
|
|
209
|
+
to `.` owns root documents and acts as a fallback when a more specific area
|
|
210
|
+
does not match. `validate` requires each included document to be linked from
|
|
211
|
+
the nearest `README.md` or `index.md`; nested indexes must themselves be linked
|
|
212
|
+
from the nearest parent index. `doctor` includes membership, navigation and
|
|
213
|
+
metadata validation.
|
|
214
|
+
|
|
215
|
+
Every cataloged Markdown document starts with YAML front matter containing a
|
|
216
|
+
stable `id` and positive `revision`. Semantic relations use stable IDs:
|
|
217
|
+
`derived_from`, `depends_on`, `related` and `supersedes` contain ID lists;
|
|
218
|
+
`validated_against` contains `ID@revision` freshness pins. Unknown fields are
|
|
219
|
+
preserved for project-specific policy. Duplicate YAML mapping keys are invalid
|
|
220
|
+
at every nesting level.
|
|
221
|
+
|
|
222
|
+
`read` resolves a whole document, navigation prefix or ATX section by stable
|
|
223
|
+
ID. `read --list` emits `anchor`, `Hn`, `start:end` and `title` as tab-separated
|
|
224
|
+
fields in document order.
|
|
225
|
+
|
|
226
|
+
A heading may declare a stable canonical anchor on the immediately preceding
|
|
227
|
+
line:
|
|
228
|
+
|
|
229
|
+
```html
|
|
230
|
+
<a id="stable-section"></a>
|
|
231
|
+
## Section title
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
`name` is also accepted, as are single quotes. The standalone tag may contain
|
|
235
|
+
only the `id` or `name` attribute. Anchor values start with a Unicode
|
|
236
|
+
alphanumeric character and then use Unicode alphanumerics or `-_.:`. The value
|
|
237
|
+
is preserved exactly. Malformed, orphaned, multiple, duplicate or colliding
|
|
238
|
+
anchors are errors rather than silently repaired.
|
|
239
|
+
|
|
240
|
+
Navigation may extend the default prefix through the furthest matching H2:
|
|
241
|
+
|
|
242
|
+
```toml
|
|
243
|
+
[navigation]
|
|
244
|
+
extend_through = ["summary", "contents"]
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
If no configured anchor exists in a document, the original prefix before the
|
|
248
|
+
first H2 is returned. A configured anchor resolving to another heading level
|
|
249
|
+
is an error.
|
|
250
|
+
|
|
251
|
+
`dependencies` reports deterministic forward or reverse semantic edges.
|
|
252
|
+
It fails without partial stdout when metadata errors make the requested graph
|
|
253
|
+
incomplete; stale revision warnings remain non-blocking.
|
|
254
|
+
|
|
255
|
+
Existing projects may opt into a migration bridge for relative path relations:
|
|
256
|
+
|
|
257
|
+
```toml
|
|
258
|
+
[relations]
|
|
259
|
+
legacy_paths = "resolve-with-warning"
|
|
260
|
+
snapshot_types = ["review", "experiment"]
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Strict stable-ID relations remain the default. In the compatibility mode,
|
|
264
|
+
resolvable paths become canonical graph edges and emit migration warnings.
|
|
265
|
+
External URLs, resources and paths outside the catalog are never document
|
|
266
|
+
relations, so they remain explicit, non-blocking boundaries in both `strict`
|
|
267
|
+
and `resolve-with-warning` mode. A relative path that *does* resolve to a
|
|
268
|
+
cataloged document is a real document relation: in `strict` mode it is a
|
|
269
|
+
blocking error until it is migrated to a stable ID or the project opts into
|
|
270
|
+
`resolve-with-warning`. `migration-report` reports both resolved mappings and
|
|
271
|
+
boundaries as a deterministic dry-run, independent of the current
|
|
272
|
+
`relations.legacy_paths` mode, without editing Markdown.
|
|
273
|
+
|
|
274
|
+
By default, `validate` and `doctor` summarize expected resolved mappings and
|
|
275
|
+
resource boundaries by count while printing stale pins and other warnings
|
|
276
|
+
individually. Pass `--verbose-adoption` to either command for every row-level
|
|
277
|
+
adoption warning. `migration-report` always remains the complete deterministic
|
|
278
|
+
inventory.
|
|
279
|
+
|
|
280
|
+
`readiness` is a read-only report for adopting an existing Markdown project.
|
|
281
|
+
It distinguishes blocking structural/configuration errors, resolvable legacy
|
|
282
|
+
relation migrations, explicit unresolved/resource boundaries, stale freshness
|
|
283
|
+
pins and projection state (absent/stale/current), and prints the single safe
|
|
284
|
+
next command. It never writes to Markdown, configuration or the projection
|
|
285
|
+
cache.
|
|
286
|
+
|
|
287
|
+
`finish` produces a compact handoff packet for returning a workstream or
|
|
288
|
+
document-focused task to its parent context. It summarizes included context,
|
|
289
|
+
omitted H2 sections, migration boundaries and stale versus historical snapshot
|
|
290
|
+
pins. `report draft` produces a privacy-safe GitHub issue body for adopter
|
|
291
|
+
runtime reports, adoption findings, core bugs or documentation pattern
|
|
292
|
+
requests; it is read-only and leaves expected/actual/requested-action fields
|
|
293
|
+
for the reporter to fill in.
|
|
294
|
+
|
|
295
|
+
`agent-instructions` prints a deterministic Markdown snippet — naming the
|
|
296
|
+
configured documentation root, language, areas and identifier namespaces plus
|
|
297
|
+
the core agent rules (pass the project root explicitly, start with
|
|
298
|
+
`readiness --json`, prefer `--json`, expand context deliberately, never run a
|
|
299
|
+
mutating command without approval, follow local backup policy) — for pasting
|
|
300
|
+
into an adopting project's `AGENTS.md`/`CLAUDE.md`. It is read-only, reads
|
|
301
|
+
only project configuration and works even when the documentation root itself
|
|
302
|
+
is missing, so the pasted snippet can never drift from
|
|
303
|
+
`docs/setup-guide.md` Step 7 by hand-copying.
|
|
304
|
+
|
|
305
|
+
`readiness`, `migration-report`, `catalog --explain`, `changes`, `context` and
|
|
306
|
+
`agent-instructions` accept `--json` and print one deterministic JSON value
|
|
307
|
+
(sorted keys, stable field names) instead of text, carrying the same
|
|
308
|
+
information the text form prints plus what it sends to stderr, so a machine
|
|
309
|
+
client never has to parse human prose. Every `--json` root is an object
|
|
310
|
+
carrying `"schema_version": 1`; the version is bumped only on a breaking
|
|
311
|
+
change to an existing field, so a consumer can detect format evolution
|
|
312
|
+
without guessing. Exit codes are unchanged by `--json`. `context --outline`
|
|
313
|
+
(with or without `--json`) prints section size maps instead of content for
|
|
314
|
+
the same selected document set, so an agent can budget tokens with a cheap
|
|
315
|
+
map before fetching.
|
|
316
|
+
|
|
317
|
+
An MCP adapter exposes the read-only commands as typed tools for any
|
|
318
|
+
MCP-capable client; see [the MCP adapter guide](docs/mcp-adapter.md). It is a
|
|
319
|
+
thin wrapper over this CLI contract and requires the optional `mcp`
|
|
320
|
+
dependency (`pip install "documentation-engine[mcp]"`). Text tools keep exact CLI stdout
|
|
321
|
+
for compatibility; packet variants add non-fatal diagnostics such as
|
|
322
|
+
projection fallback warnings.
|
|
323
|
+
|
|
324
|
+
`migrate` previews, by default, every legacy relation value that
|
|
325
|
+
`migration-report` already classifies as unambiguously resolved. Preview is
|
|
326
|
+
read-only. `migrate --apply` re-validates the same plan against a scratch copy
|
|
327
|
+
of the documentation tree and then rewrites only the exact resolved scalar in
|
|
328
|
+
`derived_from`, `depends_on`, `related` or `supersedes` for each affected
|
|
329
|
+
document — front matter formatting, comments, unknown fields, the document
|
|
330
|
+
body and unresolved boundaries are left byte-for-byte untouched. Multi-file
|
|
331
|
+
runs are all-or-nothing: if validation or a write fails, no file is left
|
|
332
|
+
partially migrated. Re-running `migrate --apply` after a successful migration
|
|
333
|
+
reports no further changes. Once every resolvable legacy relation has been
|
|
334
|
+
migrated, a project whose remaining legacy values are all boundaries (URLs and
|
|
335
|
+
resources) can drop `relations.legacy_paths = resolve-with-warning` and use
|
|
336
|
+
`strict` mode without those boundaries becoming errors.
|
|
337
|
+
|
|
338
|
+
`context` emits a deterministic Markdown packet containing navigation excerpts,
|
|
339
|
+
semantic dependencies, explicit section selections, H2 coverage, omissions,
|
|
340
|
+
stale pins and unresolved boundaries. It never silently truncates to a token
|
|
341
|
+
budget. The packet ends with a `Packet stats` section reporting how many
|
|
342
|
+
documents and explicit sections were included, how many H2 sections were
|
|
343
|
+
omitted, and the line/byte size of the packet body above it, so a client can
|
|
344
|
+
budget a follow-up `--depth` or `--include` expansion without re-measuring
|
|
345
|
+
the output. `context --json` additionally exposes each document's typed
|
|
346
|
+
`revision` and lists `"sections"`: each section's `anchor`, `title`, `level`,
|
|
347
|
+
`lines` and exact UTF-8 `bytes` size, in document order, so a client can retain
|
|
348
|
+
the revision for a later `--assume-known` call and budget without fetching
|
|
349
|
+
content first. The existing `navigation` field keeps its complete Markdown
|
|
350
|
+
prefix, including YAML front matter. `context --outline` prints the same
|
|
351
|
+
document set (`--depth` and `--include-related` still apply) with those
|
|
352
|
+
section size tables instead of navigation excerpts or content — a cheap
|
|
353
|
+
"map first, fetch second" packet.
|
|
354
|
+
`--outline` combines with `--json` for the structured form, but not with
|
|
355
|
+
`--anchor` or `--include`, which select content the outline never returns.
|
|
356
|
+
`context --assume-known ID@REV` (repeatable) lets an agent declare a document
|
|
357
|
+
it already holds: when that document lands in the packet and its current
|
|
358
|
+
revision still equals `REV`, its navigation excerpt is omitted and its coverage
|
|
359
|
+
line becomes `content omitted — declared known at revision REV (current)`,
|
|
360
|
+
while `--include ID#anchor` still forces those explicit sections. A stale
|
|
361
|
+
declaration (revision moved on) keeps full content and records a mismatch note,
|
|
362
|
+
so a declared cache never silently hides a change. `context --since GENERATION`
|
|
363
|
+
requests a delta against a retained projection generation (full hash or an
|
|
364
|
+
unambiguous prefix of at least twelve characters): unchanged documents are
|
|
365
|
+
omitted with an `unchanged since GEN12` coverage line, changed documents keep
|
|
366
|
+
navigation and gain a `### Changed section` block per changed H2 not already
|
|
367
|
+
covered by navigation (a changed H1 or `navigation.extend_through` H2 is
|
|
368
|
+
already served by the navigation excerpt), and a document absent from that
|
|
369
|
+
generation is reported as new and served in full. Removed anchors and semantic
|
|
370
|
+
metadata before/after values are reported separately, and a source change
|
|
371
|
+
outside addressable sections is explicit. A requested `--anchor` or `--include`
|
|
372
|
+
still wins over unchanged-content omission. The retained generation is
|
|
373
|
+
verified against its manifest, document and reverse shards, active
|
|
374
|
+
configuration fingerprint and reconstructed generation hash before it can
|
|
375
|
+
authorize any omission. `--since` cannot combine with `--assume-known`, and
|
|
376
|
+
neither combines with `--outline`; every rejected combination fails closed
|
|
377
|
+
with no packet. `impact` reports reverse
|
|
378
|
+
metadata dependencies and distinguishes
|
|
379
|
+
semantic, related-navigation, freshness and configured historical-snapshot
|
|
380
|
+
relations.
|
|
381
|
+
|
|
382
|
+
`index --write` derives immutable generations below `.docsystem/cache`,
|
|
383
|
+
hashed over both the derived content and a fingerprint of the projection-
|
|
384
|
+
relevant configuration, then atomically selects the current generation.
|
|
385
|
+
`index` checks freshness and `changes` reports changed documents and sections.
|
|
386
|
+
`read`, `context` and `impact` serve from the verified projection when it is
|
|
387
|
+
current: verification re-hashes every included source byte-for-byte, checks the
|
|
388
|
+
configuration fingerprint, and reconstructs the generation hash from the shards,
|
|
389
|
+
so a served read can never disagree with the Markdown truth or the active
|
|
390
|
+
configuration, while Markdown, metadata and link parsing plus graph
|
|
391
|
+
reconstruction are skipped. When the projection is absent, stale, corrupt or
|
|
392
|
+
incompatible, reads visibly fall back to direct Markdown with a stderr
|
|
393
|
+
diagnostic and identical output. Markdown remains the only editable truth.
|
|
394
|
+
|
|
395
|
+
See [the adoption guide](docs/adoption.md) for a complete profile and migration
|
|
396
|
+
sequence, [the Paradigmarium integration guide](docs/paradigmarium-integration.md)
|
|
397
|
+
for downstream consumer guidance, and [the agent contract](docs/agent-contract.md)
|
|
398
|
+
for how an AI client should safely drive this CLI.
|
|
399
|
+
Projects that keep private documentation or local configuration outside git
|
|
400
|
+
should also define a local backup command; see
|
|
401
|
+
[local state safety](docs/local-state-safety.md).
|
|
402
|
+
|
|
403
|
+
## Deliberate project-local boundaries
|
|
404
|
+
|
|
405
|
+
Registry synchronization, finish orchestration, private history/backup and
|
|
406
|
+
provider-specific adapters are not generalized by this vertical slice. They
|
|
407
|
+
remain project-local until reusable contracts are proven.
|
|
408
|
+
|
|
409
|
+
## Contributing
|
|
410
|
+
|
|
411
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for contributor setup and required
|
|
412
|
+
checks, and [SECURITY.md](SECURITY.md) to report a vulnerability.
|
|
413
|
+
|
|
414
|
+
## License
|
|
415
|
+
|
|
416
|
+
Documentation Engine is available under the [MIT License](LICENSE).
|
|
417
|
+
Copyright (c) 2026 Oleg Synelnykov (Jafa7).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
docsystem/__init__.py,sha256=-tVCbgrzp-CMx0YhvkxVa_HWYlES9mI2QjTAMfoHAwc,502
|
|
2
|
+
docsystem/__main__.py,sha256=3JaVttemrgqAGw4nYVA4p32ryWwYtyfFNdyA2JwvOHs,88
|
|
3
|
+
docsystem/catalog.py,sha256=_PgaFUwZDibUZmSKx4zdy-Yi3un3P5gpxEVay1dpC10,23665
|
|
4
|
+
docsystem/cli.py,sha256=Yrep9TRcEtvUlt6-YTgedoTaPRqmwDHIUGyb5SKDA68,93205
|
|
5
|
+
docsystem/config.py,sha256=BGtaRIMbiN8yCXpFTSEx8yTqQalYXu5gHcMXxsElKVg,7430
|
|
6
|
+
docsystem/mcp_server.py,sha256=AWRFD1kIoYRQ2BFZqXLACMJNwBnfD8fzKKHC0gdXiG4,11315
|
|
7
|
+
docsystem/metadata.py,sha256=vH9vn2Hzc4wtJsytSZmOMxNRJbJ7TusZmWyr4RquEXE,10657
|
|
8
|
+
docsystem/migration.py,sha256=Fxx_M8wV_Aa7GOtV2rODXyphJYs_V4LcBPNOduwArAw,12191
|
|
9
|
+
docsystem/projection.py,sha256=UQk_rvWfAuGw_w5NQbQi7yH6CyAlgCY0UQOsePdJGrE,24851
|
|
10
|
+
docsystem/readiness.py,sha256=yycWFOQnkATvKKfztVV2KiAI6RgsPS5TqIp0YtyjQyQ,4479
|
|
11
|
+
docsystem/sections.py,sha256=UbDdBiKNSeFmkw0025uKMb2hrSKSs7PlBRRdeYC8pCU,8665
|
|
12
|
+
documentation_engine-0.1.2.dist-info/METADATA,sha256=zrIe-UHav82YGgHhxoU6YC6S7djn5uvJAl1vWCnnWGk,20714
|
|
13
|
+
documentation_engine-0.1.2.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
14
|
+
documentation_engine-0.1.2.dist-info/entry_points.txt,sha256=wTERmwdphYq78auPcZ0O3Ek2FwdO0tKtn1BKiXwVYQs,91
|
|
15
|
+
documentation_engine-0.1.2.dist-info/licenses/LICENSE,sha256=NIjSxDLiUmU1h587FuNkjEIpR4sRfuG4KstXBtbRy4s,1080
|
|
16
|
+
documentation_engine-0.1.2.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Oleg Synelnykov (Jafa7)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|