Skip to content

Commit 70341c7

Browse files
committed
Add multi-level documentation export
1 parent a9cee96 commit 70341c7

8 files changed

Lines changed: 642 additions & 37 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ knowcode context "GraphBuilder.build_from_directory" --max-tokens 4000
130130
```
131131

132132
### `export`
133-
Export the knowledge store as Markdown documentation.
133+
Export the knowledge store as multi-level Markdown documentation. The export
134+
includes an index, architecture overview, per-module pages, and a manifest with
135+
entity content hashes for freshness checks.
134136

135137
```bash
136138
knowcode export [--store <path>] [--output <dir>]
@@ -479,7 +481,7 @@ See [reference_architecture.md](file:///Users/deepg/Desktop/KnowCode/docs/archit
479481
- ✅ Add layer contract tests and harden retrieval evals (parser, store roundtrip, golden-query smoke baseline - see [docs/retrieval-evals.md](docs/retrieval-evals.md))
480482

481483
**Future releases:**
482-
- v2.4: Multi-level documentation synthesis
484+
- v2.4: Multi-level documentation synthesis (in progress: architecture/module/function export + freshness manifest)
483485
- v3.0: Deep analysis (data flow, intent extraction, confidence scoring)
484486
- v4.0: Enterprise features (RBAC, scalability, team sharing)
485487

docs/architecture/reference_architecture.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,9 @@ Generate **explainable, navigable, abstraction-aware documentation** directly fr
422422
* Consistency with actual code
423423
* Traceability back to source
424424
* Keep docs incrementally up-to-date
425+
* **[PARTIAL]** Deterministic Markdown export now emits an index, architecture
426+
overview, per-module pages, function/class narratives, and a documentation
427+
manifest keyed by entity content hashes.
425428
* **[HARDENED]** Multiple output formats: Markdown, HTML, IDE tooltips, OpenAPI, AsyncAPI
426429
* **[HARDENED]** Audience targeting: new engineers, domain experts, API consumers
427430
* **[HARDENED]** Auto-generate "what changed since version X" summaries
@@ -999,8 +1002,8 @@ Commands fail fast with: *"Install knowcode[server] to use `knowcode server`"*.
9991002
> - *"Which files change together most often?"*
10001003
10011004
### **Phase 4: Documentation Synthesis (PARTIAL)**
1002-
13. **[x] Markdown Export (MVP)**: CLI `export` produces an index-style Markdown doc (see `docs_test/index.md`).
1003-
14. **[ ] Multi-Level Doc Synthesis (Layer 7)**: Architecture/module/function narratives, change summaries, and freshness tracking.
1005+
13. **[x] Markdown Export (MVP)**: CLI `export` produces Markdown documentation from the knowledge store.
1006+
14. **[~] Multi-Level Doc Synthesis (Layer 7)**: CLI `export` now emits architecture/module/function documentation plus a freshness manifest keyed by entity content hashes. Remaining work: change summaries, stale-doc detection, and richer audience-aware narratives.
10041007

10051008
> **Questions you can now answer:**
10061009
> - *"Can I get a written overview of this codebase I can share with a new team member?"*
@@ -1088,8 +1091,8 @@ Commands fail fast with: *"Install knowcode[server] to use `knowcode server`"*.
10881091
12. **[x] Coverage Signals (Layer 5)**: Cobertura ingestion with coverage report entities and covers/executed_by relationships.
10891092

10901093
### **Phase 4: Documentation Synthesis (PARTIAL)**
1091-
13. **[x] Markdown Export (MVP)**: CLI `export` produces an index-style Markdown doc.
1092-
14. **[ ] Multi-Level Doc Synthesis (Layer 7)**: Architecture/module/function narratives, change summaries, and freshness tracking.
1094+
13. **[x] Markdown Export (MVP)**: CLI `export` produces Markdown documentation from the knowledge store.
1095+
14. **[~] Multi-Level Doc Synthesis (Layer 7)**: CLI `export` now emits architecture/module/function documentation plus a freshness manifest keyed by entity content hashes. Remaining work: change summaries, stale-doc detection, and richer audience-aware narratives.
10931096

10941097
### **Phase 4.5: Architectural Hardening (COMPLETED)**
10951098
15. **[x] Dependency Modularisation (AD-1)**: Optional extras (`server`, `search`, `llm`, `watch`, `all`) with lightweight core install.

docs/diagrams/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The command-line interface exposes thirteen commands:
4141
| `query` | Lexical query: callers, callees, dependencies, or search |
4242
| `context` | Generate a task-aware context bundle for an entity |
4343
| `semantic-search` | Natural-language search over embeddings |
44-
| `export` | Export the knowledge graph as Markdown documentation |
44+
| `export` | Export multi-level Markdown documentation from the knowledge graph |
4545
| `stats` | Print entity and relationship counts |
4646
| `doctor` | Check whether the local KnowCode setup is ready |
4747
| `server` | Start the FastAPI REST server (optionally with `--watch`) |

docs/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ knowcode context "GraphBuilder.build_from_directory" --max-tokens 4000
116116
```
117117

118118
### `export`
119-
Export the knowledge store as Markdown documentation.
119+
Export the knowledge store as multi-level Markdown documentation. The export
120+
includes an index, architecture overview, per-module pages, and a manifest with
121+
entity content hashes for freshness checks.
120122

121123
```bash
122124
knowcode export [--store <path>] [--output <dir>]
@@ -367,7 +369,7 @@ See [reference_architecture.md](file:///Users/deepg/Desktop/KnowCode/docs/archit
367369
- ✅ Add layer contract tests and harden retrieval evals (parser, store roundtrip, golden-query smoke baseline — see [docs/retrieval-evals.md](retrieval-evals.md))
368370

369371
**Future releases:**
370-
- v2.4: Multi-level documentation synthesis
372+
- v2.4: Multi-level documentation synthesis (in progress: architecture/module/function export + freshness manifest)
371373
- v3.0: Deep analysis (data flow, intent extraction, confidence scoring)
372374
- v4.0: Enterprise features (RBAC, scalability, team sharing)
373375

0 commit comments

Comments
 (0)