Title
Chore: Streamline documentation workflow and automate architecture updates
Description
Problem Statement
As the project scales, manual documentation curation is introducing unnecessary friction during branch synchronization and releases.
- Standalone sprint files (
SPRINT_01.md, etc.) clog the active /docs root directory.
- The
architecture.md file requires manual text edits whenever modules change, increasing the risk of documentation drift.
- There is no local safety net ensuring documentation is generated and validated before changes are committed.
Proposed Solution
Transition from a manual curation model to an automated, Code-as-Source documentation ecosystem using automated scripts and local Git lifecycle hooks.
Action Items
1. Purge & Archive Historical Artifacts
2. Automate architecture.md Syncing
3. Protect the Main Branch with Pre-Commit Hooks
npm run docs:generate (rebuilds directory maps and layouts)
git add docs/ (automatically stages the fresh documentation changes)
npm run docs:check (runs validation suite via scripts/validate-docs.js)
Definition of Done
Title
Chore: Streamline documentation workflow and automate architecture updatesDescription
Problem Statement
As the project scales, manual documentation curation is introducing unnecessary friction during branch synchronization and releases.
SPRINT_01.md, etc.) clog the active/docsroot directory.architecture.mdfile requires manual text edits whenever modules change, increasing the risk of documentation drift.Proposed Solution
Transition from a manual curation model to an automated, Code-as-Source documentation ecosystem using automated scripts and local Git lifecycle hooks.
Action Items
1. Purge & Archive Historical Artifacts
docs/archive/sprints/.SPRINT_*.md) into the archive folder to clean up the primary workspace root.2. Automate
architecture.mdSyncingarchitecture.mdand link natively to the single source of truth files (docs/diagrams/architectureDiagram.mermaidanddocs/diagrams/sequenceDiagram.mermaid).scripts/generate-docs.jsto dynamically parse structural directories (src/analytics/,src/ingestion/,src/delivery/). Have it extract module descriptions from standard header comment blocks (e.g.,predictive.js,worker.js) and auto-generate the "Current Implementation" module grid insidearchitecture.md.3. Protect the Main Branch with Pre-Commit Hooks
huskyto manage local Git hooks..husky/pre-commithook running the following pipeline sequence on every local commit:npm run docs:generate(rebuilds directory maps and layouts)git add docs/(automatically stages the fresh documentation changes)npm run docs:check(runs validation suite viascripts/validate-docs.js)docs:checkflags missing nodes or structural anomalies.Definition of Done
/docsdirectory is pruned of historical sprint notes.npm run docs:generateparses thesrc/directory tree and populatesarchitecture.mddynamically.