1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- tools.docs.pkg_info — Core Entity schema.
---
--- Data-only module. Defines the PkgInfo entity and its pure
--- constructors. All downstream modules (extract / projections / lint)
--- produce or consume this schema.
---
--- Single-AST doctrine (see alc_shapes/README.md §Core concept):
--- `shape.input` / `shape.result` are alc_shapes schemas directly —
--- no parallel TypeExpr AST. Projections (`tools.docs.projections`)
--- walk the schema via `rawget` and `alc_shapes.fields()`.
---
--- PkgInfo layout
---
--- {
--- identity = { name, version, category, description, source_path },
--- narrative = {
--- title = <string>, -- docstring 1st line
--- summary = <string>, -- abstract paragraph (joined)
--- sections = { Section, ... },
--- },
--- shape = {
--- input = <alc_shapes schema>|nil, -- typically T.shape(...)
--- result = <alc_shapes schema>|nil, -- T.shape / T.ref / ...
--- },
--- }
---
--- Section = { level = 2|3, heading = <string>,
--- anchor = <string>, body_md = <string> }
local M =
return M