Agentic-Insights / codebase-context-spec

Proposal for a flexible, tool-agnostic, codebase context system that helps teach AI coding tools about your codebase. Super easy to get started, just create a .context.md file in the root of your project.
MIT License
98 stars 14 forks source link

Usage of Lint may have a wrong command: ai-context-lint <directory_to_lint> should be codebase-context-lint <directory_to_lint> #5

Closed wvanheemstra closed 2 months ago

wvanheemstra commented 3 months ago

Describe the bug When I run the command ai-context-lint . I am prompted with ai-context-lint: command not found.

To Reproduce Steps to reproduce the behavior:

  1. If not already done so, install lint with $ npm install -g codebase-context-lint as per the instructions at https://github.com/Agentic-Insights/codebase-context-spec/blob/main/linters/typescript/README.md
  2. In the directory where a context.md files resides, run $ ai-context-lint .
  3. A prompt will state: ai-context-lint: command not found.
  4. The above indicates an error.

Expected behavior As the npm package that is installed is called codebase-context-lint one would expect to use that name in the command, hence $ codebase-context-lint .

If I do so, a valid linting happens:

========================================================
Codebase Context Specification (CCS) Linter (v1.2.0)
========================================================

Linting directory: .

Linting .contextdocs.md file
  - Checking for similar links in markdown content
  Error: Missing or invalid "contextdocs" array in YAML front matter.

Linting file: .context.md
  - Validating Markdown structure
  - Checking YAML frontmatter
  Warning: Unexpected top-level field 'project-name'.
  Warning: Unexpected top-level field 'main-technologies'.
  Warning: Unexpected top-level field 'ai-prompts'.
  Context coverage: 61.54% (8/13 fields)
  Warning: Unexpected field 'main-components' in 'architecture' section.
  architecture coverage: 66.67% (2/3 fields)
  development coverage: 100.00% (3/3 fields)
  business-requirements coverage: 100.00% (3/3 fields)
  quality-assurance coverage: 100.00% (3/3 fields)
  deployment coverage: 100.00% (4/4 fields)
  ✅ .context.md passed validation

Linting file: node_modules/codebase-context-lint/.context.md
  - Validating Markdown structure
  - Checking YAML frontmatter
  Warning: Unexpected top-level field 'project-type'.
  Context coverage: 100.00% (13/13 fields)
  architecture coverage: 100.00% (3/3 fields)
  development coverage: 100.00% (3/3 fields)
  business-requirements coverage: 100.00% (3/3 fields)
  quality-assurance coverage: 100.00% (3/3 fields)
  deployment coverage: 100.00% (4/4 fields)
  ✅ .context.md passed validation

Linting file: src/.context.yaml
  - Validating YAML structure
  Error parsing YAML file: TypeError: Cannot convert undefined or null to object
  ❌ .context.yaml failed validation

Linting file: src/module1/.context.md
  - Validating Markdown structure
  - Checking YAML frontmatter
  Error: Invalid markdown structure. YAML frontmatter is missing or incomplete.
  ❌ .context.md failed validation

Linting file: src/module2/.context.json
  - Validating JSON structure
  Error parsing JSON file: SyntaxError: Unexpected end of JSON input
  ❌ .context.json failed validation

Linting file: tests/.context.md
  - Validating Markdown structure
  - Checking YAML frontmatter
  Error: Invalid markdown structure. YAML frontmatter is missing or incomplete.
  ❌ .context.md failed validation

Linting completed.

Screenshots See above output instead of a screenshot.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context If I am right in my conclusions, I would recommend for the documentation to be rectified. https://github.com/Agentic-Insights/codebase-context-spec/blob/main/linters/typescript/README.md where ai-context-lint <directory_to_lint> should instead be codebase-context-lint <directory_to_lint>

killerapp commented 2 months ago

I believe you were a victim of an old page load. I updated the instructions already. I believe you loaded the instructions and I pushed the new release just afterwards that renames it. So if you load the instructions again they are correct now. Please re-open if there is still an issue.