blakesims project-mapper .cursorrules file for Python (stars: 1)

<?xml version='1.0' encoding='utf-8'?>
<project-rules>
  <code-rules>
    <file-documentation>
      <file-level-docstring>
        """

        {Clear one-line statement of this file's purpose}

        Key Components:

        {ClassName}: {What this class does and why it exists}

        {function_name}(): {What this function does and why it's needed}

        File Dependencies:

        This file uses: {OtherComponent}: {Why it's used}

        This file is used by: {OtherComponent}: {Why it's needed}

        """</file-level-docstring>
    <example>
        ```python

        """

        Manages XML documentation updates for project structure.

        Key Components:

        XMLManager: Handles reading and writing of .cursorrules XML file

        update_rules(): Updates documentation while preserving existing rules

        File Dependencies:

        This file uses: ProjectScanner: To get current project structure

        This file is used by: CLI: To execute documentation updates

        """

        class XMLManager:

        ...

        ```</example>
    </file-documentation>
  <documentation-maintenance>
      <llm-instructions>
        Before modifying ANY file, you MUST:

        1. Read the current file-level docstring

        2. Decide if your changes affect the documentation

        3. Output your decision in this format:

        Documentation Decision:

        - Update Required: Yes/No

        - Reason: One clear sentence explaining why/why not

        - Changes Needed: [If Yes] What needs to be updated

        Actions Taken:

        -If "Yes" above, include the docstring edits in your file edits</llm-instructions>
    <update-triggers>
        Check if your changes involve:

        - File's main purpose changing

        - New/modified classes or functions

        - Changes to what this file uses

        - Changes to what uses this file</update-triggers>
    </documentation-maintenance>
  <workflow>
      <steps>
        1. READ current file-level docstring

        2. OUTPUT documentation decision

        3. MAKE code changes

        4. UPDATE docstring if needed</steps>
    </workflow>
  </code-rules>
<project-map>
    <structure>
      <directory name="src">
        <directory name="project_mapper">
          <file name="template_manager.py">
            <purpose>
              Template management for project-mapper.

              Key Components:

              TemplateManager: Handles template submodule setup and selection

              setup_templates(): Guides user through template setup process

              Project Dependencies:

              This file uses: git: For submodule operations

              This file is used by: CLI: For template initialization</purpose>
          </file>
        <file name="cli.py">
            <purpose>
              Command line interface for project-mapper.

              Key Components:

              main(): CLI entry point handling template setup and project scanning.

              Project Dependencies:

              This file uses:

              - TemplateManager: For template setup and selection

              - XMLManager: For documentation updates

              - PythonScanner: For Python file scanning</purpose>
          </file>
        <directory name="core">
            <file name="scanner.py">
              <purpose>
                Core scanning functionality for project documentation.</purpose>
            </file>
          <file name="xml_manager.py">
              <purpose>
                XML management for project documentation.

                Key Components:

                XMLManager: Handles reading, writing, and merging of XML templates and .cursorrules

                _merge_templates(): Merges multiple XML templates while respecting inheritance

                _load_template(): Loads and validates XML templates

                Project Dependencies:

                This file uses:

                - ElementTree: For XML parsing and manipulation

                - Path: For file path handling

                This file is used by: CLI: For template management and documentation updates</purpose>
            </file>
          </directory>
        <directory name="adapters">
            <file name="base.py">
              <purpose>
                Abstract base adapter interface for language-specific scanners.</purpose>
            </file>
          <directory name="python">
              <file name="scanner.py">
                <purpose>
                  Python-specific implementation of project scanner.</purpose>
              </file>
            </directory>
          </directory>
        <directory name="git">
            <file name="hooks.py">
              <purpose>
                Git hook management for project-mapper.</purpose>
            </file>
          </directory>
        </directory>
      </directory>
    </structure>
  <relationships>
      <flow description="Project documentation flow">
        Documentation maintained by LLM based on code analysis</flow>
    </relationships>
  </project-map>
</project-rules>
python
shell

First Time Repository

0th version of project-mapper python package for automating cursorrules updates

Python

Languages:

Python: 40.1KB
Shell: 0.2KB
Created: 1/13/2025
Updated: 1/21/2025

All Repositories (1)

0th version of project-mapper python package for automating cursorrules updates