- Deleted the following obsolete files: - `CHANGES.md`, `changes-summary.md`, `CHANGES_SUMMARY.md`: Contained redundant or outdated change logs and implementation summaries. - `COMPATIBILITY.md`: Detailed compatibility behavior no longer relevant after environment detection updates. - `fix-documentation.md`: Addressed a resolved issue regarding `process.memoryUsage` errors in testing. - `DIMENSION_MISMATCH_SUMMARY.md`: Provided a legacy summary of resolved embedding dimension mismatch issues. - `demo.md`: Documented an outdated demo process for testing Brainy features. - `CONCURRENCY_IMPLEMENTATION_SUMMARY.md`: Summarized already-documented concurrency features. - `IMPLEMENTATION_SUMMARY.md`: Detailed an obsolete implementation of optional model bundling. - Purpose: - Streamline and declutter archive by removing redundant or outdated documentation. - Align repository with current feature set and documentation standards.
4.6 KiB
Documentation Organization
This document explains the new documentation structure and workflow for managing markdown files in the Brainy project.
Overview
The documentation has been reorganized from 29 scattered markdown files at the root level to a clean, organized structure with only essential files at the root and categorized documentation in the docs/ directory.
New Structure
Root Level Files (GitHub/NPM Standards)
README.md- Main project documentationCONTRIBUTING.md- Contribution guidelinesCODE_OF_CONDUCT.md- Community standardsCHANGELOG.md- Version history and release notes
Documentation Directory Structure
docs/
├── technical/ # Technical documentation and analysis
│ ├── CONCURRENCY_ANALYSIS.md
│ ├── STORAGE_CONCURRENCY_ANALYSIS.md
│ ├── THREADING.md
│ ├── STATISTICS.md
│ ├── TESTING.md
│ ├── VITEST_IMPROVEMENTS.md
│ ├── REALTIME_UPDATES.md
│ ├── METADATA_HANDLING.md
│ ├── VECTOR_DIMENSION_STANDARDIZATION.md
│ ├── USE_MODEL_LOADING_EXPLANATION.md
│ ├── STORAGE_TESTING.md
│ ├── TECHNICAL_GUIDES.md
│ ├── ENVIRONMENT_TESTING.md
│ └── SCALING_STRATEGY.md
├── development/ # Development and contributor documentation
│ ├── DEVELOPERS.md
│ ├── DOCUMENTATION_STANDARDS.md
│ ├── MARKDOWN_CONVENTIONS.md
│ ├── EXPECTED_TEST_MESSAGES.md
│ └── PRETTY_TEST_REPORTER.md
└── guides/ # User guides and migration documentation
├── cache-configuration.md
├── hnsw-field-search.md
├── json-document-search.md
├── model-management.md
├── optional-model-bundling.md
├── production-migration-guide.md
└── service-identification.md
CHANGELOG.md Management
Automated Workflow
The project now uses automated changelog management:
-
Adding Changes: Add entries to the
[Unreleased]section inCHANGELOG.md -
Version Bumping: Use npm scripts that automatically update the changelog:
npm run version:patch- Patch version bump + changelog updatenpm run version:minor- Minor version bump + changelog updatenpm run version:major- Major version bump + changelog update
-
Manual Updates: Use
npm run changelog:updateto manually update the changelog
Changelog Format
The changelog follows the Keep a Changelog standard:
- Added - New features
- Changed - Changes in existing functionality
- Deprecated - Soon-to-be removed features
- Removed - Now removed features
- Fixed - Bug fixes
- Security - Vulnerability fixes
GitHub Integration
The CHANGELOG.md is automatically used for:
- GitHub releases (via
scripts/create-github-release.js) - NPM package release notes
- Version history tracking
Benefits of New Structure
- Clean Root Directory: Only 4 essential markdown files at root level
- Better Organization: Logical categorization of documentation in docs/ subdirectories
- GitHub Compliance: Follows GitHub and NPM best practices
- Automated Maintenance: Changelog updates are automated
- Easy Navigation: Clear directory structure for different doc types
- Reduced Clutter: Temporary and outdated files have been removed
Workflow for Contributors
Adding Documentation
- Technical docs →
docs/technical/ - Development docs →
docs/development/ - User guides →
docs/guides/ - Temporary files → Should be avoided; use issues or PRs for temporary documentation
Making Changes
- Add changes to
[Unreleased]section inCHANGELOG.md - Use appropriate category (Added, Changed, Fixed, etc.)
- When ready to release, use
npm run version:patch/minor/major - The changelog will be automatically updated with version and date
Release Process
- Ensure
[Unreleased]section has all changes - Run
npm run version:patch/minor/major - Run
npm run deployto publish and create GitHub release - GitHub release will use CHANGELOG.md content
Migration Notes
- All technical documentation organized in
docs/technical/ - Development documentation organized in
docs/development/ - User guides organized in
docs/guides/ - Temporary summary files and archived content have been cleaned up
- Links in existing documentation may need updates
- New automation ensures changelog stays current
This reorganization provides a sustainable, scalable approach to documentation management that follows industry best practices and integrates seamlessly with GitHub and NPM workflows.