Imports:
  - Types:
      - AST
    Usages:
      - loading
    From: goga/ast

Usages:
  click: .goga/usages/cooks/click.md
  conventions: .goga/usages/conventions.md
  beautiful_yaml: .goga/usages/cooks/beautiful_yaml.md

Annotations: |
  The `conventions` practice is used for:
  - working with the codebase
  - organizing the REPL development loop
  - debugging and testing
  - organizing test infrastructure
  - understanding general development and testing principles and rules in the project
  Use the `click` practice to create CLI commands.

---

"lint(path: str = '.')":
  location: lint.py
  annotations: |
    Validates CODEMANIFEST files across the project.

    `path`: directory path for CWD context initialization

    Algorithm:
    - Set CWD to the specified `path`
    - Instantiate `AST` and load the project via the `loading` practice
    - Print all errors in the defined format
    - Print the validation summary

    Error format:
    ```
    [rule_name] <message>
      --> <path>
          ---
          <yaml_data>
    ```

    Summary format:
    ```
    goga lint
    -------------------------
    cells: <N> errors: <M>
    ```
    Where <N> is the number of validated cells, <M> is the count of detected errors.

    Requirements:
    - Output YAML data using the `beautiful_yaml` practice
    - Strict indentation: [rule_name] at column 0, --> indented 2 spaces,
      --- separator indented 6 spaces, YAML data indented 6 spaces per line
    - Render [rule_name] in red
    - Append the summary after all errors, preceded by a blank line
    - Exit with code 1 on errors, 0 otherwise

---

Author: Goga
CreatedAt: 20/05/26

Description: |
  Project-wide CODEMANIFEST validation command
