Skip to content

Conversation

@lufftw
Copy link
Owner

@lufftw lufftw commented Dec 12, 2025

Summary

This PR introduces an optional, fully local CI/CD-style automation and a unified documentation build workflow to improve developer experience and documentation maintenance — without affecting any core algorithm practice features.

All added mechanisms are opt-in, local-only, and safe by default, designed to streamline documentation generation while keeping the repository lightweight and secure.


Key Features

1. Optional Local CI/CD Automation (Pre-commit)

  • Add pre-commit framework integration for local automation
  • Automatically triggers AI mind map generation on commit when relevant files change:
    • ontology/
    • meta/problems/
    • tools/generate_mindmaps.py
  • Interactive API key input (never stored)
  • Supports multiple skip mechanisms:
    • Commit message tags
    • Environment variables
  • Works consistently across all branches
  • Clearly documented as optional

Files added / updated

  • .pre-commit-config.yaml
  • tools/hooks/generate_ai_mindmaps_hook.py
  • requirements.txt
  • tools/README.md
  • README.md

2. Unified Local Documentation Build Workflow

  • Introduce simple, script-based local build (recommended):
    • scripts/build_docs.bat
    • scripts/build_docs.sh
  • Optional interactive AI mind map generation during build
    • Build continues even if AI generation fails
  • Clear separation between:
    • Manual build scripts (recommended)
    • Local GitHub Actions emulation (advanced / optional)

New documentation

  • BUILD_DOCS_MANUAL.md (recommended method)
  • LOCAL_DOCS_BUILD.md (overview & comparison)
  • ACT_LOCAL_GITHUB_ACTIONS.md (advanced, optional)

3. Project Structure Improvements

  • Consolidate all utility scripts under scripts/
  • Move existing root scripts for consistency:
    • new_problem
    • run_case
    • run_tests
  • Update all documentation and references accordingly
  • Add scripts/README.md for discoverability

4. Documentation & Navigation Enhancements

  • Update README.md:
    • Add Local Documentation Build section
    • Emphasize optional nature of all automation features
    • Add relevant Topics (pre-commit, local-automation)
  • Update MkDocs navigation:
    • Include all new build guides
    • Mark recommended vs advanced options clearly
  • Update content guide to reflect new docs

Design Principles

  • Zero impact on core algorithm practice
  • Optional by design
  • Local-only execution
  • No credential storage
  • Fail-safe automation (never blocks development)

This PR improves contributor workflow and documentation quali

…p generation

- Add pre-commit framework configuration (.pre-commit-config.yaml)
- Create pre-commit hook script (tools/hooks/generate_ai_mindmaps_hook.py)
  - Auto-detects changes in ontology/, meta/problems/, tools/generate_mindmaps.py
  - Supports skip mechanisms via commit message tags or environment variables
  - Interactive API key input (not stored)
  - Works on all branches
- Add pre-commit dependency to requirements.txt
- Update tools/README.md with Local CI/CD Automation section
  - Setup instructions
  - Usage guide with skip options
  - Configuration details
  - Features table
- Update README.md
  - Add pre-commit and local-automation to Topics tags
  - Add Automatic Generation (Local CI/CD) section in AI Mind Map Generation

This enables automatic AI mind map generation on commit when relevant files
are modified, improving developer workflow while maintaining security by
not storing API keys.
- Add prominent notice that CI/CD is optional and only for documentation
- Emph
…ation

- Add build_docs.bat and build_docs.sh for simple local builds
- Create BUILD_DOCS_MANUAL.md for manual script method guide
- Create LOCAL_DOCS_BUILD.md as overview comparing both methods
- Update ACT_LOCAL_GITHUB_ACTIONS.md with link to overview
- All methods clearly marked as optional, don't affect core practice features
- Create scripts/ directory for utility scripts
- Move build_docs.bat/sh from tools/ to scripts/
- Update all documentation paths to scripts/build_docs.*
- Add scripts/README.md for directory documentation
- Remove build_docs references from tools/README.md
- Follows common project organization pattern
- Move new_problem, run_case, and run_tests scripts to scripts/
- Update script paths to reference parent directory
- Update all documentation references to new script paths
- Add script documentation to scripts/README.md
- Add optional step to generate AI-powered mind maps in build_docs.bat/sh
- Prompt user whether to generate AI mind maps (requires OPENAI_API_KEY)
- Continue build even if AI generation fails
- Update scripts/README.md with AI mind map feature documentation
- Add "Build Documentation Locally" section in For Contributors
- Recommend BUILD_DOCS_MANUAL.md as the simple method
- Mark ACT_LOCAL_GITHUB_ACTIONS.md as optional advanced option
- Reorganize Documentation section with clear categorization
- Emphasize that documentation building is completely optional
- Add BUILD_DOCS_MANUAL.md and ACT_LOCAL_GITHUB_ACTIONS.md to mkdocs.yml nav
- Update MKDOCS_CONTENT_GUIDE.md to reflect new documentation pages
- Add linking examples and update log entries
- Mark BUILD_DOCS_MANUAL.md as recommended method
@lufftw
Copy link
Owner Author

lufftw commented Dec 12, 2025

Nice work — the changes are clear and easy to follow.

@lufftw lufftw merged commit c803431 into main Dec 12, 2025
@lufftw lufftw deleted the feat/local-mindmap-auto-generation branch December 12, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants