Skip to content

Commit a166724

Browse files
committed
fix: add further dotcontext ignore support, normalize linter output
1 parent 9162f5e commit a166724

File tree

10 files changed

+475
-694
lines changed

10 files changed

+475
-694
lines changed

CODEBASE-CONTEXT.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -371,33 +371,27 @@ src/deprecated-module.js
371371

372372
**Warning:** Tooling may be required for proper implementation of `.contextignore`. AI agents may not consistently or easily use `.contextignore` as strictly as dedicated tooling can. Your mileage may vary (YMMV) depending on the AI model used.
373373

374-
## 7. Security Considerations
375-
376-
1. Avoid including sensitive information (API keys, passwords) in context files.
377-
2. Be cautious with proprietary algorithms or trade secrets.
378-
3. Use `.gitignore` to exclude sensitive context files from version control if necessary.
379-
380-
## 8. The .contextdocs File
374+
## 7. The .contextdocs File
381375

382376
The `.contextdocs` file allows developers to specify external documentation sources that should be incorporated into the project's context. This feature is particularly useful for including documentation from dependencies, libraries, or related projects.
383377

384-
### 8.1 Location and Naming
378+
### 7.1 Location and Naming
385379

386380
- The `.contextdocs` file should be placed in the root directory of the project.
387381
- It must use one of the following extensions:
388382
- `.contextdocs.md` (default, recommended)
389383
- `.contextdocs.yaml` or `.contextdocs.yml`
390384
- `.contextdocs.json`
391385

392-
### 8.2 File Structure
386+
### 7.2 File Structure
393387

394388
The `.contextdocs` file should contain an array of documentation sources. Each source can be:
395389

396390
- A file path relative to the project root
397391
- A URL to a markdown file
398392
- A package name with associated documentation files
399393

400-
### 8.3 Examples
394+
### 7.3 Examples
401395

402396
#### Markdown Format (.contextdocs.md) - Default
403397

@@ -511,7 +505,7 @@ contextdocs:
511505
}
512506
```
513507

514-
### 8.4 Behavior
508+
### 7.4 Behavior
515509

516510
- When an AI model or related tool is processing the project context, it should fetch and incorporate the specified documentation.
517511
- For local files, the content should be read from the specified path.
@@ -520,24 +514,24 @@ contextdocs:
520514

521515
**Warning:** Tooling may be required for proper implementation of `.contextdocs`. AI agents may not consistently or easily use `.contextdocs` as strictly as dedicated tooling can. Your mileage may vary (YMMV) depending on the AI model used.
522516

523-
### 8.5 Use Cases
517+
### 7.5 Use Cases
524518

525519
- Including documentation for key dependencies
526520
- Referencing company-wide coding standards or guidelines
527521
- Incorporating design documents or architectural overviews
528522
- Linking to relevant external resources or tutorials
529523

530-
### 8.6 Considerations
524+
### 7.6 Considerations
531525

532526
- Ensure that URLs point to stable, version-controlled documentation to maintain consistency.
533527
- Be mindful of the total volume of documentation to avoid overwhelming the AI model with irrelevant information.
534528
- Regularly review and update the `.contextdocs` file to ensure all referenced documentation remains relevant and up-to-date.
535529
- Consider implementing caching mechanisms for external documentation to improve performance and reduce network requests.
536530

537-
## 9. Conclusion
531+
## 8. Conclusion
538532

539533
The Codebase Context Specification provides a flexible, standardized approach to enriching codebases with contextual information for AI models. By adopting this convention and including role-specific information, development teams can enhance AI-assisted workflows, improving code quality and development efficiency across projects of any scale or complexity. The addition of role-specific guidelines and consistent naming conventions ensures that AI models have access to comprehensive, relevant, and well-structured information tailored to different aspects of the software development lifecycle.
540534

541-
## 10. TypeScript Linter Implementation
535+
## 9. TypeScript Linter Implementation
542536

543537
For details on the TypeScript implementation of the linter for validating Codebase Context Specification files, please refer to the [TypeScript Linter README](linters/typescript/README.md).

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ Welcome to the [Codebase Context Specification (CCS)](./CODEBASE-CONTEXT.md) rep
1717
- [Context File Example (.context.md)](.context.md)
1818
- [AI Assistant Prompt (CODING-ASSISTANT-PROMPT.md)](CODING-ASSISTANT-PROMPT.md)
1919

20+
## Supported Node.js Versions
21+
22+
This project supports the following Node.js versions:
23+
24+
- Node.js 18.x
25+
- Node.js 20.x
26+
- Node.js 22.x
27+
28+
We recommend using the latest LTS (Long Term Support) version of Node.js for optimal performance and security.
29+
2030
## Codebase Context: A New Convention
2131

2232
The Codebase Context Specification introduces a convention similar to `.env` and `.editorconfig` systems, but focused on documenting your code for both AI and humans. Just as `.env` files manage environment variables and `.editorconfig` ensures consistent coding styles, CCS files (`.context.md`, `.context.yaml`, `.context.json`) provide a standardized way to capture and communicate the context of your codebase.
@@ -56,8 +66,14 @@ To install the linter:
5666
npm install -g codebase-context-lint
5767
```
5868

69+
Note: Make sure you're using a supported Node.js version (18.x, 20.x, or 22.x) when installing and running the linter.
70+
5971
For more information on using the linter, please refer to the [linter's README](./linters/typescript/README.md).
6072

73+
## Recent Updates
74+
75+
We've recently updated our dependencies to address security vulnerabilities and improve compatibility with different Node.js versions. If you encounter any issues after updating, please report them in our GitHub issues.
76+
6177
## Using with AI Assistants
6278

6379
The [CODING-ASSISTANT-PROMPT.md](./CODING-ASSISTANT-PROMPT.md) file provides guidelines for AI assistants to understand and use the Codebase Context Specification. This allows for immediate adoption of the specification without requiring specific tooling integration.

examples/context-editor/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.0.0 || 20.0.0 || 22.0.0

examples/context-editor/sample.context.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

linters/typescript/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,26 @@ By adopting this convention, teams can ensure that both human developers and AI
3535

3636
For more detailed information about the Codebase Context Specification, please refer to the [main repository](https://github.com/Agentic-Insights/codebase-context-spec) and the [full specification](https://github.com/Agentic-Insights/codebase-context-spec/blob/main/CODEBASE-CONTEXT.md).
3737

38-
## 📦 Installation
38+
## � Supported Node.js Versions
39+
40+
This linter supports the following Node.js versions:
41+
42+
- Node.js 18.x
43+
- Node.js 20.x
44+
- Node.js 22.x
45+
46+
We recommend using the latest LTS (Long Term Support) version of Node.js for optimal performance and security.
47+
48+
## �📦 Installation
3949

4050
You can install the linter globally using npm:
4151

4252
```
4353
npm install -g codebase-context-lint
4454
```
4555

56+
Note: Make sure you're using a supported Node.js version (18.x, 20.x, or 22.x) when installing and running the linter.
57+
4658
## 🚀 Usage
4759

4860
After installation, you can use the linter from the command line:
@@ -132,6 +144,10 @@ To contribute to this project:
132144
7. Push to the branch (`git push origin feature/AmazingFeature`)
133145
8. Open a Pull Request
134146

147+
## 🔄 Recent Updates
148+
149+
We've recently updated our dependencies to address security vulnerabilities and improve compatibility with different Node.js versions. If you encounter any issues after updating, please report them in our GitHub issues.
150+
135151
## 📖 Learn More
136152

137153
For a deeper dive into the Codebase Context Specification, check out this [SubStack article by Vaskin](https://agenticinsights.substack.com/p/codebase-context-specification-rfc), the author of the specification.

0 commit comments

Comments
 (0)