Internal
Parser Pipeline
The parser reads a documents folder, recognizes document type by filename, and builds the reader document collection.
Main flow
The parser lives in lib/documentation-file.ts. It:
- resolves the documents folder from
NEENJA_DOCUMENTS_DIRorNEENJA_DOCUMENTS_PATH, otherwise${projectRoot}/.neenja - scans the folder for recognized filenames
- parses
documentation.mdwith the concept parser - parses
project-plan.mdwith the technical plan-section parser - parses
task-tree.yamlwith the YAML task-tree parser - applies public/private filtering only to documentation concepts
- groups documentation concepts by category, technical plan sections by area, and tasks by area
- derives task graph edges, root task IDs, child IDs, reverse dependency IDs, status summaries, and progress
- builds a
DocumentCollectionfor routing, navbar switching, search, and rendering
Project plan parsing
The project-plan parser treats ## Plan: as the section boundary and ### as the detail-block boundary inside a section. It reads only ID, Area, and optional Summary as section metadata, so technical plans can use normal Markdown for lists, compact notes, examples, and longer implementation detail.
Summary is extracted into PlanSection.summary, while all non-metadata section text stays in Markdown content. Content before the first ### heading becomes section intro Markdown. Each ### detail block keeps its body as free-form Markdown.
Legacy path
NEENJA_DOCUMENTATION_PATH and CLI --file are supported for a single documentation file. When used, the reader builds a one-document collection with only the documentation document. If no folder documentation file exists, the reader can still fall back to the legacy root file ./neenja.knowledge.md.
Visibility defaults
NEENJA_DOCS_VISIBILITY=privatemeans documentation keeps both public and private concepts, and the collection can include project-plan and task-tree documents.NEENJA_DOCS_VISIBILITY=publicmeans only public documentation concepts survive the final document model. Project-plan and task-tree documents are omitted before parsing.- When no explicit visibility flag is provided, dev mode defaults to the full set and production mode defaults to the public subset.