documentation-engine 0.3.0__tar.gz → 0.4.0__tar.gz

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.
Files changed (129) hide show
  1. documentation_engine-0.4.0/.github/workflows/ci.yml +142 -0
  2. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/CHANGELOG.md +41 -1
  3. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/PKG-INFO +20 -2
  4. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/README.md +19 -1
  5. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/README.md +2 -0
  6. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/agent-contract.md +24 -0
  7. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/architecture.md +17 -0
  8. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/client-integration.md +18 -10
  9. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/mcp-adapter.md +3 -0
  10. documentation_engine-0.4.0/docs/provider-snapshots.md +175 -0
  11. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/setup-guide.md +37 -4
  12. documentation_engine-0.4.0/examples/provider-snapshots/.docsystem.toml +30 -0
  13. documentation_engine-0.4.0/examples/provider-snapshots/docs/README.md +8 -0
  14. documentation_engine-0.4.0/examples/provider-snapshots/docs/service-contract.md +17 -0
  15. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/scripts/installed_cli_smoke.sh +46 -0
  16. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/__init__.py +1 -1
  17. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/cli.py +174 -0
  18. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/config.py +31 -0
  19. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/federated_projection.py +2 -0
  20. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/projection.py +261 -5
  21. documentation_engine-0.4.0/src/docsystem/provider.py +449 -0
  22. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/sections.py +16 -5
  23. documentation_engine-0.4.0/tests/test_cli_platform.py +122 -0
  24. documentation_engine-0.4.0/tests/test_provider.py +614 -0
  25. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_release_workflows.py +21 -0
  26. documentation_engine-0.3.0/.github/workflows/ci.yml +0 -65
  27. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/.github/ISSUE_TEMPLATE/adoption-finding.yml +0 -0
  28. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  29. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/.github/ISSUE_TEMPLATE/core-bug.yml +0 -0
  30. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/.github/ISSUE_TEMPLATE/docs-pattern-request.yml +0 -0
  31. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/.github/ISSUE_TEMPLATE/runtime-report.yml +0 -0
  32. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  33. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/.github/copilot-instructions.md +0 -0
  34. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/.github/workflows/release.yml +0 -0
  35. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/.gitignore +0 -0
  36. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/AGENTS.md +0 -0
  37. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/CLAUDE.md +0 -0
  38. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/CONTRIBUTING.md +0 -0
  39. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/LICENSE +0 -0
  40. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/SECURITY.md +0 -0
  41. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/adopter-reporting.md +0 -0
  42. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/adoption.md +0 -0
  43. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/assets/context-reduction.svg +0 -0
  44. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/context-delivery.md +0 -0
  45. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/context-efficiency.md +0 -0
  46. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/delivery-traceability.md +0 -0
  47. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/document-profiles.md +0 -0
  48. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/execution-admission.md +0 -0
  49. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/execution-handoff.md +0 -0
  50. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/federation.md +0 -0
  51. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/graph-health.md +0 -0
  52. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/idea-intake.md +0 -0
  53. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/knowledge-promotion.md +0 -0
  54. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/local-state-safety.md +0 -0
  55. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/metadata-inventory.md +0 -0
  56. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/program-plans.md +0 -0
  57. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/releasing.md +0 -0
  58. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/workspace-sources.md +0 -0
  59. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/workstream-branching.md +0 -0
  60. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/workstream-evidence.md +0 -0
  61. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/docs/workstream-lifecycle.md +0 -0
  62. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/execution-admission-request.json +0 -0
  63. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/execution-result.json +0 -0
  64. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/generic-adopter/.docsystem.toml +0 -0
  65. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/generic-adopter/README.md +0 -0
  66. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/generic-adopter/plan/README.md +0 -0
  67. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/generic-adopter/plan/design.md +0 -0
  68. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/generic-adopter/plan/review.md +0 -0
  69. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/generic-adopter/plan/templates/document-template.md +0 -0
  70. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/idea-intake-request.json +0 -0
  71. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/workstream-branch-template.md +0 -0
  72. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/examples/workstream-record.json +0 -0
  73. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/pyproject.toml +0 -0
  74. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/__main__.py +0 -0
  75. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/admission.py +0 -0
  76. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/catalog.py +0 -0
  77. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/change_plan.py +0 -0
  78. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/delivery.py +0 -0
  79. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/execution.py +0 -0
  80. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/federation.py +0 -0
  81. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/graph.py +0 -0
  82. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/health.py +0 -0
  83. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/intake.py +0 -0
  84. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/inventory.py +0 -0
  85. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/journal.py +0 -0
  86. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/lifecycle.py +0 -0
  87. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/maintenance.py +0 -0
  88. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/mcp_server.py +0 -0
  89. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/metadata.py +0 -0
  90. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/migration.py +0 -0
  91. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/profiles.py +0 -0
  92. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/program_plan.py +0 -0
  93. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/promotion.py +0 -0
  94. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/readiness.py +0 -0
  95. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/shared_finish.py +0 -0
  96. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/workspace.py +0 -0
  97. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/src/docsystem/workstream.py +0 -0
  98. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_admission.py +0 -0
  99. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_catalog.py +0 -0
  100. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_change_plan.py +0 -0
  101. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_change_plan_cli.py +0 -0
  102. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_cli.py +0 -0
  103. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_config.py +0 -0
  104. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_context_cli.py +0 -0
  105. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_delivery.py +0 -0
  106. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_execution_handoff.py +0 -0
  107. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_federated_projection.py +0 -0
  108. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_federated_write.py +0 -0
  109. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_federation.py +0 -0
  110. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_graph.py +0 -0
  111. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_health.py +0 -0
  112. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_intake.py +0 -0
  113. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_inventory.py +0 -0
  114. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_journal.py +0 -0
  115. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_lifecycle.py +0 -0
  116. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_maintenance.py +0 -0
  117. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_mcp_adapter.py +0 -0
  118. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_metadata.py +0 -0
  119. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_migration.py +0 -0
  120. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_profiles.py +0 -0
  121. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_program_plan.py +0 -0
  122. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_promotion.py +0 -0
  123. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_readiness.py +0 -0
  124. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_references_cli.py +0 -0
  125. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_sections.py +0 -0
  126. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_vertical.py +0 -0
  127. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_workspace.py +0 -0
  128. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/tests/test_workstream.py +0 -0
  129. {documentation_engine-0.3.0 → documentation_engine-0.4.0}/uv.lock +0 -0
@@ -0,0 +1,142 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ env:
12
+ TMPDIR: /tmp
13
+ TMP: /tmp
14
+ TEMP: /tmp
15
+
16
+ jobs:
17
+ check:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v7
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v7
24
+ with:
25
+ python-version: "3.12"
26
+
27
+ - name: Run pytest
28
+ run: uv run pytest
29
+
30
+ - name: Run ruff
31
+ run: uv run ruff check .
32
+
33
+ - name: Verify lockfile is current
34
+ run: uv lock --check
35
+
36
+ - name: Installed CLI smoke test
37
+ run: ./scripts/installed_cli_smoke.sh
38
+
39
+ # The smoke test builds and installs a wheel only. The release workflow
40
+ # uploads a wheel *and* an sdist, and an index rejects a distribution
41
+ # whose metadata or long description does not render. Check both
42
+ # artifacts here rather than during an irreversible upload.
43
+ - name: Build and check both distributions
44
+ run: |
45
+ dist_dir="$(mktemp -d)/dist"
46
+ uv build --out-dir "$dist_dir"
47
+ version="$(uv run python -c 'import docsystem; print(docsystem.__version__)')"
48
+ test -f "$dist_dir/documentation_engine-${version}-py3-none-any.whl"
49
+ test -f "$dist_dir/documentation_engine-${version}.tar.gz"
50
+ uvx --from 'twine>=6,<7' twine check --strict "$dist_dir"/*
51
+
52
+ # Dogfooding: walk the documented adoption sequence end-to-end against
53
+ # the public example profile, on a scratch copy so the fixture stays
54
+ # byte-identical in the repository.
55
+ - name: Example profile adoption walkthrough
56
+ run: |
57
+ profile="$(mktemp -d)/profile"
58
+ cp -r examples/generic-adopter "$profile"
59
+ uv run python -m docsystem readiness "$profile" --json
60
+ uv run python -m docsystem migrate "$profile" --apply
61
+ uv run python -m docsystem index "$profile" --write
62
+ uv run python -m docsystem readiness "$profile" --json
63
+ uv run python -m docsystem context DOC-002 "$profile" --depth 1
64
+ uv run python -m docsystem context DOC-002 "$profile" --depth 1 --json
65
+ uv run python -m docsystem changes "$profile" --json
66
+
67
+ windows:
68
+ runs-on: windows-latest
69
+ env:
70
+ PYTHONUTF8: "0"
71
+ steps:
72
+ - uses: actions/checkout@v7
73
+
74
+ - name: Install uv
75
+ uses: astral-sh/setup-uv@v7
76
+ with:
77
+ python-version: "3.12"
78
+
79
+ - name: Run Windows CLI tests without Python UTF-8 mode
80
+ shell: pwsh
81
+ run: |
82
+ $env:TMPDIR = $env:RUNNER_TEMP
83
+ $env:TMP = $env:RUNNER_TEMP
84
+ $env:TEMP = $env:RUNNER_TEMP
85
+ uv run pytest tests/test_cli.py tests/test_cli_platform.py `
86
+ tests/test_context_cli.py tests/test_mcp_adapter.py tests/test_readiness.py
87
+
88
+ - name: Installed CLI UTF-8 PowerShell smoke
89
+ shell: pwsh
90
+ run: |
91
+ $env:TMPDIR = $env:RUNNER_TEMP
92
+ $env:TMP = $env:RUNNER_TEMP
93
+ $env:TEMP = $env:RUNNER_TEMP
94
+ Remove-Item Env:PYTHONIOENCODING -ErrorAction SilentlyContinue
95
+ $dist = Join-Path $env:RUNNER_TEMP "docsystem-dist"
96
+ $venv = Join-Path $env:RUNNER_TEMP "docsystem-venv"
97
+ $project = Join-Path $env:RUNNER_TEMP "docsystem-unicode-project"
98
+ $output = Join-Path $env:RUNNER_TEMP "context.json"
99
+ $errors = Join-Path $env:RUNNER_TEMP "diagnostics.txt"
100
+
101
+ uv build --wheel --out-dir $dist
102
+ $wheel = Get-ChildItem $dist -Filter "documentation_engine-*.whl" -File
103
+ if ($wheel.Count -ne 1) { throw "expected exactly one wheel" }
104
+ uv venv $venv --python 3.12
105
+ $python = Join-Path $venv "Scripts/python.exe"
106
+ $docsystem = Join-Path $venv "Scripts/docsystem.exe"
107
+ uv pip install --python $python $wheel.FullName
108
+
109
+ $expectedVersion = (& $python -c "import docsystem; print(docsystem.__version__)").Trim()
110
+ $reportedVersion = (& $docsystem --version).Trim()
111
+ if ($reportedVersion -ne "docsystem $expectedVersion") {
112
+ throw "unexpected version output: $reportedVersion"
113
+ }
114
+
115
+ & $docsystem init $project
116
+ $architecture = Join-Path $project "plan/architecture"
117
+ New-Item -ItemType Directory -Path $architecture -Force | Out-Null
118
+ @"
119
+ ---
120
+ id: DOC-001
121
+ revision: 1
122
+ ---
123
+ # Привет
124
+ ## Резюме
125
+ Исходный текст остаётся доступен полностью.
126
+ "@ | Set-Content -Encoding utf8 (Join-Path $architecture "README.md")
127
+
128
+ & $docsystem context DOC-001 $project --json |
129
+ Set-Content -Encoding utf8 $output
130
+ if ($LASTEXITCODE -ne 0) { throw "context failed with $LASTEXITCODE" }
131
+ $payload = Get-Content -Raw -Encoding utf8 $output | ConvertFrom-Json
132
+ if ($payload.documents[0].navigation -notmatch "Привет") {
133
+ throw "context JSON lost Cyrillic source text"
134
+ }
135
+
136
+ & $docsystem read DOC-001 $project --anchor "отсутствует" 2> $errors
137
+ if ($LASTEXITCODE -ne 1) { throw "unknown anchor returned $LASTEXITCODE" }
138
+ $global:LASTEXITCODE = 0
139
+ $diagnostic = Get-Content -Raw -Encoding utf8 $errors
140
+ if ($diagnostic -notmatch "отсутствует") {
141
+ throw "stderr diagnostic was not UTF-8"
142
+ }
@@ -4,6 +4,44 @@ All notable changes to Documentation Engine are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.4.0] - 2026-08-09
8
+
9
+ ### Highlights
10
+
11
+ - External consumers can reconcile exact retained documentation generations
12
+ through a provider-neutral, privacy-safe contract without importing package
13
+ internals or reading generated projection files directly.
14
+ - Pinned comparison distinguishes content changes, relocation and genuine
15
+ entity absence while failing closed for unavailable, corrupt, unsupported or
16
+ incomplete provider evidence.
17
+
18
+ ### Added
19
+
20
+ - Opt-in, provider-neutral `provider snapshot` and `provider compare` commands
21
+ export bounded body-free observations from explicitly pinned immutable
22
+ generations and classify exact stable entities as relocated, changed,
23
+ missing or added.
24
+ - Projection schema 5 binds provider identity, visibility, advertised
25
+ capabilities, catalog completeness, coverage, document line counts and
26
+ explicit/generated anchor kind into the generation hash. Older generations
27
+ fail provider export as unsupported instead of receiving retroactive claims.
28
+
29
+ ## [0.3.1] - 2026-07-19
30
+
31
+ ### Fixed
32
+
33
+ - CLI stdout and stderr now use UTF-8 independently of the host locale, so
34
+ redirected or piped Cyrillic and other Unicode Markdown works on Windows
35
+ without requiring `PYTHONUTF8=1`.
36
+ - Windows CI now runs focused CLI/context/MCP regressions with Python UTF-8
37
+ mode disabled and verifies an installed wheel through a PowerShell JSON pipe
38
+ and a Unicode stderr diagnostic.
39
+
40
+ ### Added
41
+
42
+ - `docsystem --version` reports the installed Documentation Engine version
43
+ without requiring a project or subcommand.
44
+
7
45
  ## [0.3.0] - 2026-07-15
8
46
 
9
47
  ### Highlights
@@ -181,7 +219,9 @@ documentation-engine` starts working only after the first successful release.
181
219
  - Measured context-reduction methodology and a reproducible consumer-install
182
220
  smoke test.
183
221
 
184
- [Unreleased]: https://github.com/Jafa7/DocumentationEngine/compare/v0.3.0...HEAD
222
+ [Unreleased]: https://github.com/Jafa7/DocumentationEngine/compare/v0.4.0...HEAD
223
+ [0.4.0]: https://github.com/Jafa7/DocumentationEngine/compare/v0.3.1...v0.4.0
224
+ [0.3.1]: https://github.com/Jafa7/DocumentationEngine/compare/v0.3.0...v0.3.1
185
225
  [0.3.0]: https://github.com/Jafa7/DocumentationEngine/compare/v0.2.0...v0.3.0
186
226
  [0.2.0]: https://github.com/Jafa7/DocumentationEngine/compare/v0.1.2...v0.2.0
187
227
  [0.1.2]: https://github.com/Jafa7/DocumentationEngine/compare/v0.1.1...v0.1.2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: documentation-engine
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Provider-neutral structured Markdown documentation engine.
5
5
  Project-URL: Repository, https://github.com/Jafa7/DocumentationEngine
6
6
  Project-URL: Documentation, https://github.com/Jafa7/DocumentationEngine/tree/main/docs
@@ -130,12 +130,14 @@ unrelated globally installed `docsystem` executable.
130
130
  For a published-package installation:
131
131
 
132
132
  ```bash
133
+ docsystem --version
133
134
  docsystem --help
134
135
  ```
135
136
 
136
137
  For a contributor checkout:
137
138
 
138
139
  ```bash
140
+ uv run python -m docsystem --version
139
141
  uv run python -m docsystem --help
140
142
  ```
141
143
 
@@ -159,7 +161,8 @@ disposable projection. It does not require MCP.
159
161
  [docs/setup-guide.md](docs/setup-guide.md) step by step. It contains the
160
162
  connection/adoption flow, required user questions, backup-policy setup and
161
163
  checks.
162
- Do not improvise a local backup path or commit private planning paths.
164
+ Do not improvise a private documentation root or local backup path, and do not
165
+ commit private planning paths.
163
166
 
164
167
  **If you are a human using an AI agent**, paste this in the project you want to
165
168
  connect:
@@ -168,6 +171,11 @@ connect:
168
171
  Connect Documentation Engine to this project.
169
172
  Repository: https://github.com/Jafa7/DocumentationEngine
170
173
  Read docs/setup-guide.md in that repository and follow it exactly.
174
+ Ask me for the exact private-documentation location before creating or moving
175
+ documents. Recommend a dedicated external project directory, but do not invent
176
+ or create a shared workspace path. If private documents already exist inside
177
+ the project, copy and verify them first and leave the original untouched until
178
+ I explicitly authorize its removal.
171
179
  Ask me where local disaster-recovery backups should be stored before touching
172
180
  ignored/private documentation or local configuration.
173
181
  ```
@@ -217,6 +225,7 @@ task rather than one mandatory process:
217
225
  | --- | --- | --- |
218
226
  | Core retrieval | Discover, read and inspect context/impact | Default for routine work |
219
227
  | Adoption | Connect or migrate an existing Markdown corpus | Setup and compatibility work |
228
+ | Provider reconciliation | Export or compare explicitly pinned, body-free generations | External consumers that retain stable documentation evidence |
220
229
  | Governed delivery | Roadmaps, admission, handoff and lifecycle evidence | Multi-stage, delegated or risk-bearing work |
221
230
  | Bounded mutation | Journaled managed-block synchronization and recovery | Explicitly approved mechanical writes |
222
231
  | Multi-source | Workspace selection and federation | Deliberate cross-project documentation queries |
@@ -334,6 +343,8 @@ docsystem migrate . --apply
334
343
  docsystem index . --write
335
344
  docsystem changes .
336
345
  docsystem changes . --json
346
+ docsystem provider snapshot GENERATION . --json
347
+ docsystem provider compare BEFORE AFTER . --json
337
348
  docsystem agent-instructions .
338
349
  docsystem agent-instructions . --json
339
350
  docsystem workspace list . --workspace /path/to/workspace
@@ -784,6 +795,13 @@ relations.
784
795
  hashed over both the derived content and a fingerprint of the projection-
785
796
  relevant configuration, then atomically selects the current generation.
786
797
  `index` checks freshness and `changes` reports changed documents and sections.
798
+ Projects that expose immutable documentation evidence to another consumer may
799
+ opt into `[provider]` identity and use `provider snapshot` or `provider compare`
800
+ with explicit retained generation hashes. These commands never select the
801
+ current pointer implicitly, never return Markdown bodies or absolute paths, and
802
+ distinguish unavailable/corrupt provider state from a genuinely missing
803
+ entity. See [pinned provider snapshots](docs/provider-snapshots.md) for the
804
+ versioned JSON, relocation and bounded-pagination contract.
787
805
  `read`, `context` and `impact` serve from the verified projection when it is
788
806
  current: verification re-hashes every included source byte-for-byte, checks the
789
807
  configuration fingerprint, and reconstructs the generation hash from the shards,
@@ -113,12 +113,14 @@ unrelated globally installed `docsystem` executable.
113
113
  For a published-package installation:
114
114
 
115
115
  ```bash
116
+ docsystem --version
116
117
  docsystem --help
117
118
  ```
118
119
 
119
120
  For a contributor checkout:
120
121
 
121
122
  ```bash
123
+ uv run python -m docsystem --version
122
124
  uv run python -m docsystem --help
123
125
  ```
124
126
 
@@ -142,7 +144,8 @@ disposable projection. It does not require MCP.
142
144
  [docs/setup-guide.md](docs/setup-guide.md) step by step. It contains the
143
145
  connection/adoption flow, required user questions, backup-policy setup and
144
146
  checks.
145
- Do not improvise a local backup path or commit private planning paths.
147
+ Do not improvise a private documentation root or local backup path, and do not
148
+ commit private planning paths.
146
149
 
147
150
  **If you are a human using an AI agent**, paste this in the project you want to
148
151
  connect:
@@ -151,6 +154,11 @@ connect:
151
154
  Connect Documentation Engine to this project.
152
155
  Repository: https://github.com/Jafa7/DocumentationEngine
153
156
  Read docs/setup-guide.md in that repository and follow it exactly.
157
+ Ask me for the exact private-documentation location before creating or moving
158
+ documents. Recommend a dedicated external project directory, but do not invent
159
+ or create a shared workspace path. If private documents already exist inside
160
+ the project, copy and verify them first and leave the original untouched until
161
+ I explicitly authorize its removal.
154
162
  Ask me where local disaster-recovery backups should be stored before touching
155
163
  ignored/private documentation or local configuration.
156
164
  ```
@@ -200,6 +208,7 @@ task rather than one mandatory process:
200
208
  | --- | --- | --- |
201
209
  | Core retrieval | Discover, read and inspect context/impact | Default for routine work |
202
210
  | Adoption | Connect or migrate an existing Markdown corpus | Setup and compatibility work |
211
+ | Provider reconciliation | Export or compare explicitly pinned, body-free generations | External consumers that retain stable documentation evidence |
203
212
  | Governed delivery | Roadmaps, admission, handoff and lifecycle evidence | Multi-stage, delegated or risk-bearing work |
204
213
  | Bounded mutation | Journaled managed-block synchronization and recovery | Explicitly approved mechanical writes |
205
214
  | Multi-source | Workspace selection and federation | Deliberate cross-project documentation queries |
@@ -317,6 +326,8 @@ docsystem migrate . --apply
317
326
  docsystem index . --write
318
327
  docsystem changes .
319
328
  docsystem changes . --json
329
+ docsystem provider snapshot GENERATION . --json
330
+ docsystem provider compare BEFORE AFTER . --json
320
331
  docsystem agent-instructions .
321
332
  docsystem agent-instructions . --json
322
333
  docsystem workspace list . --workspace /path/to/workspace
@@ -767,6 +778,13 @@ relations.
767
778
  hashed over both the derived content and a fingerprint of the projection-
768
779
  relevant configuration, then atomically selects the current generation.
769
780
  `index` checks freshness and `changes` reports changed documents and sections.
781
+ Projects that expose immutable documentation evidence to another consumer may
782
+ opt into `[provider]` identity and use `provider snapshot` or `provider compare`
783
+ with explicit retained generation hashes. These commands never select the
784
+ current pointer implicitly, never return Markdown bodies or absolute paths, and
785
+ distinguish unavailable/corrupt provider state from a genuinely missing
786
+ entity. See [pinned provider snapshots](docs/provider-snapshots.md) for the
787
+ versioned JSON, relocation and bounded-pagination contract.
770
788
  `read`, `context` and `impact` serve from the verified projection when it is
771
789
  current: verification re-hashes every included source byte-for-byte, checks the
772
790
  configuration fingerprint, and reconstructs the generation hash from the shards,
@@ -31,6 +31,8 @@ link to that owner rather than repeat commands or policy.
31
31
  recommendation, prerequisites and exact source-contract scope.
32
32
  - [Compact context delivery](context-delivery.md) — lossless range
33
33
  deduplication, inclusion reasons and diagnostics drill-down.
34
+ - [Pinned provider snapshots](provider-snapshots.md) — privacy-safe,
35
+ body-free export and comparison of explicit immutable generations.
34
36
  - [Bounded workstream evidence](workstream-evidence.md) — versioned completion
35
37
  criteria, corrective lineage and fail-closed finish evidence.
36
38
  - [Deterministic idea intake](idea-intake.md) — place an agent-interpreted idea
@@ -84,6 +84,15 @@ Those files are still source-of-truth operational state. An agent must not
84
84
  use a clean git status as evidence that broad filesystem operations are safe:
85
85
  ignored files can be destroyed while git remains clean.
86
86
 
87
+ Before creating or moving private documentation, the agent must ask the user
88
+ in English for the exact storage path and whether an existing in-repository
89
+ documentation tree must be copied and verified. Recommend a dedicated external
90
+ project directory, but do not infer or create a shared workspace path. Never
91
+ remove the original tree without a separate explicit authorization. Use the
92
+ canonical questions and neutral placeholder from
93
+ [the setup guide](setup-guide.md#step-0-gather-facts) rather than inventing a
94
+ machine-specific example.
95
+
87
96
  Before recursive copy, move, delete or sync commands; generated migrations;
88
97
  bulk rewrites; cross-OS shell snippets; or any task that touches ignored
89
98
  local-only documentation, the agent must run the project's local backup
@@ -191,6 +200,12 @@ wiring and must never be committed or printed in a report.
191
200
 
192
201
  ## Prefer `--json` over parsing text
193
202
 
203
+ The CLI writes stdout and stderr as strict UTF-8 regardless of the host locale,
204
+ including redirected Windows streams. Callers should decode both streams as
205
+ UTF-8 and must not require `PYTHONUTF8` or locale-specific code pages. JSON
206
+ keeps original Unicode characters rather than ASCII-escaping authored text;
207
+ plain-text reads return the same UTF-8 Markdown content.
208
+
194
209
  `readiness`, `migration-report`, `catalog --explain`, `changes` and
195
210
  `context` accept `--json` and print one deterministic JSON value instead of
196
211
  tab-separated or prose text. An agent should use `--json` wherever it needs
@@ -579,6 +594,15 @@ context the delta deliberately left out. `--since` and
579
594
  every rejected combination fails closed with no packet, so an agent never acts
580
595
  on a partially applied request.
581
596
 
597
+ When a separate consumer needs durable cross-process reconciliation rather
598
+ than a task packet, use `provider snapshot` or `provider compare` with explicit
599
+ retained generation hashes. Do not read `.docsystem/cache` directly and do not
600
+ interpret provider unavailability, corruption or incomplete coverage as a
601
+ missing document/section. Provider responses intentionally contain no Markdown
602
+ bodies; fetch authored content through `read` or `context` only when the task
603
+ requires it. The canonical contract is
604
+ [pinned provider snapshots](provider-snapshots.md).
605
+
582
606
  ## Report product issues without leaking adopter context
583
607
 
584
608
  When an agent finds a DocumentationEngine problem while working inside another
@@ -11,6 +11,7 @@ The core owns deterministic documentation retrieval mechanics:
11
11
  - inspectable context packets with explicit coverage and omissions;
12
12
  - impact and changed-section analysis;
13
13
  - versioned, sharded machine projections and diagnostics.
14
+ - body-free export and comparison of explicitly pinned provider generations.
14
15
 
15
16
  The package also ships optional extensions over that same core:
16
17
 
@@ -58,6 +59,7 @@ The capability groups are progressive, not an execution checklist:
58
59
  | --- | --- | --- |
59
60
  | Core discovery and retrieval | `readiness`, `catalog`, `validate`, `read`, `context`, `dependencies`, `references`, `impact`, `change-plan` | Default path for understanding and changing documentation-backed work |
60
61
  | Adoption and derived state | `migration-report`, `migrate`, `profile-check`, `index`, `changes`, `report` | Connecting an existing corpus, checking policy or refreshing disposable projections |
62
+ | Provider reconciliation | `provider snapshot`, `provider compare` | An external consumer needs exact body-free observations from one or two pinned generations |
61
63
  | Governed delivery | `roadmap`, `intake`, `admission`, `execution-handoff`, `execution-result`, `workstream`, `lifecycle`, `finish`, `promotion` | Genuinely multi-stage, delegated or risk-bearing work that requires bounded evidence |
62
64
  | Bounded mutation | `maintenance`, `maintenance-recover` | Explicitly approved mechanical synchronization with journal and recovery guarantees |
63
65
  | Multi-source operation | `workspace`, `federation` | A task that deliberately spans independently owned documentation sources |
@@ -94,6 +96,7 @@ Project policy may configure:
94
96
  - review policy;
95
97
  - graph-health advisory thresholds and required metadata fields;
96
98
  - projection retention;
99
+ - stable provider identity and exported visibility classification;
97
100
  - legacy path-relation migration and historical snapshot document types;
98
101
  - provider adapters.
99
102
 
@@ -179,6 +182,20 @@ direct Markdown with a visible diagnostic rather than serving mixed state.
179
182
  Coordinating multiple writers is a caller/orchestrator responsibility, not
180
183
  core engine behavior.
181
184
 
185
+ Provider reconciliation uses the same immutable generations but a different
186
+ verification mode from live reads. A provider generation binds stable provider
187
+ identity, visibility, supported capabilities, catalog completeness, coverage,
188
+ scope and body-free export boundaries into the manifest root. `provider
189
+ snapshot` and `provider compare` fully verify explicitly selected retained
190
+ generations without comparing them with live Markdown or using `current.json`;
191
+ historical drift is the evidence being requested. The provider model exposes
192
+ only IDs, canonical anchors, hashes, root-relative paths and line hints. Its
193
+ schema, deterministic cursor and byte/page bounds are independent from the
194
+ internal projection schema. See [pinned provider snapshots](provider-snapshots.md).
195
+ Portable comparison of complete exported snapshot artifacts is deliberately
196
+ deferred. Losing a retained operand requires an explicit full rebaseline; it
197
+ does not authorize heuristic reconstruction or an entity-absence conclusion.
198
+
182
199
  Retained generation manifests also drive two token-economy `context` modes
183
200
  that omit content only when omission is provably safe, never as a silent
184
201
  budget cut. `--assume-known ID@REV` is a client-declared cache: an agent
@@ -35,14 +35,16 @@ adoption-oriented, read-only commands:
35
35
  - `docsystem catalog PROJECT --explain --json`
36
36
  - `docsystem changes PROJECT --json`
37
37
  - `docsystem context DOCUMENT_ID PROJECT --json`
38
+ - `docsystem provider snapshot GENERATION PROJECT --json`
39
+ - `docsystem provider compare BEFORE AFTER PROJECT --json`
38
40
 
39
- Each prints one deterministic JSON object to stdout (sorted keys, stable
40
- field names) carrying the same diagnostics that the text form prints as
41
- human `ERROR`/`WARNING` lines on stderr. In `--json` mode those human
42
- stderr diagnostics may be suppressed since the JSON payload already carries
43
- the same information in structured form, so a wrapper does not need to read
44
- stderr to make a decision. Exit codes are unchanged by `--json`: `0` on
45
- success or a ready project, `1` otherwise.
41
+ Each successful command prints one deterministic JSON object to stdout (sorted
42
+ keys and stable field names). For the adoption/context commands, structured
43
+ diagnostics may replace duplicate human `ERROR`/`WARNING` lines. Provider
44
+ snapshot/compare instead fail closed with a stable error code on stderr and no
45
+ stdout, because an unavailable generation must never resemble an entity result.
46
+ Exit codes are unchanged by `--json`: `0` on success or a ready project, `1`
47
+ otherwise.
46
48
 
47
49
  Every `--json` root is an object with a `"schema_version": 1` field; it is
48
50
  bumped only on a breaking change to an existing field, while new fields may
@@ -101,9 +103,15 @@ hash before comparison. `--since` and
101
103
  `--assume-known` are mutually exclusive, and neither combines with
102
104
  `--outline`; a rejected combination exits `1` with no stdout.
103
105
 
104
- A wrapper that speaks MCP can skip the CLI entirely and use
105
- [the MCP adapter](mcp-adapter.md), which exposes these same read-only
106
- commands as typed tools over the identical JSON contract.
106
+ A wrapper that speaks MCP can use [the MCP adapter](mcp-adapter.md) for its
107
+ document, context, graph and governance tools over the same core contracts.
108
+
109
+ Provider snapshot/compare responses use their own versioned, body-free schema
110
+ and bounded cursor contract. They require explicit retained generations and
111
+ never infer either operand from current Markdown or `current.json`. These two
112
+ commands are currently CLI-only. A wrapper must distinguish
113
+ provider/generation failures on stderr from `missing` inside a successful
114
+ comparison; see [pinned provider snapshots](provider-snapshots.md).
107
115
 
108
116
  `docsystem readiness PROJECT --json` is the entry point for an adoption
109
117
  sequence: its `next_command` field names the single safe next command for
@@ -60,6 +60,9 @@ The adapter is deliberately a wrapper, not a second implementation:
60
60
  `maintenance-recover`) intentionally have no tools and stay
61
61
  with the human or calling system, matching
62
62
  [the agent contract](agent-contract.md);
63
+ - pinned `provider snapshot` and `provider compare` are currently CLI-only.
64
+ An MCP wrapper may be added later only as a thin transport over the same
65
+ bounded, body-free contract; clients must not inspect projection files;
63
66
  - a non-zero CLI exit becomes a tool error carrying the CLI's stderr
64
67
  diagnostics, so a client never mistakes a failure for data. The one
65
68
  exception is `readiness`, whose "not ready" state is a legitimate answer: