|
1 | 1 | ---
|
2 | 2 | module-name: Codebase Context Specification
|
3 |
| -related-modules: |
4 |
| - - ./linters/typescript: A TypeScript litner to provide a codified implementation of the spec in it's most basic form. |
5 |
| - - ./examples/context-editor: A sample editor to make it easy for folks to get started |
6 | 3 | version: 1.0.0
|
7 |
| -description: README.md, meet SYSTEM PROMPT - In this session, we'll explore how CCS provides a structured yet flexible approach to documenting high-level architecture, design decisions, and project-specific conventions. Learn how this convention not only clarifies relationships within the code for human developers but also optimizes the codebase for AI model consumption, leading to more accurate suggestions and enhanced development efficiency. |
8 |
| -diagrams: |
9 |
| - - img/codebase-diagram.mermaid |
| 4 | +description: A specification for providing explicit context information about a codebase |
| 5 | +related-modules: [] |
| 6 | +project-type: Specification |
10 | 7 | technologies:
|
11 |
| - - Node.js |
12 |
| - - React |
13 |
| - - MongoDB |
| 8 | + - Markdown |
| 9 | + - YAML |
| 10 | + - JSON |
14 | 11 | conventions:
|
15 |
| - - Use consistent naming conventions within each file type |
16 |
| - - Each function should have a single responsibility |
| 12 | + - Follow Markdown best practices |
| 13 | + - Use YAML for structured data |
| 14 | + - Consistent naming conventions |
17 | 15 | directives:
|
18 |
| - - Focus on performance optimizations |
19 |
| - - Suggest ways to improve error handling |
| 16 | + - Maintain backward compatibility |
| 17 | + - Keep documentation up-to-date |
| 18 | +diagrams: |
| 19 | + - context-hierarchy.png |
20 | 20 | architecture:
|
21 |
| - style: Microservices |
| 21 | + style: Documentation-driven |
22 | 22 | components:
|
23 |
| - - Auth Service |
24 |
| - - User Service |
25 |
| - - Data Processing Service |
26 |
| - data-flow: |
27 |
| - - Client -> API Gateway -> Services -> Database |
| 23 | + - Specification document |
| 24 | + - Linters |
| 25 | + - Examples |
| 26 | + data-flow: |
| 27 | + - Codebase -> .context.md files -> Linters -> Validation results |
28 | 28 | development:
|
29 | 29 | setup-steps:
|
30 |
| - - Install Node.js v14+ |
31 |
| - - Run `npm install` in each service directory |
32 |
| - - Set up MongoDB instance |
| 30 | + - Clone the repository |
| 31 | + - Review the specification documents |
| 32 | + - Install linter dependencies |
33 | 33 | build-command: npm run build
|
34 | 34 | test-command: npm test
|
35 | 35 | business-requirements:
|
36 | 36 | key-features:
|
37 |
| - - User authentication |
38 |
| - - Real-time data processing |
39 |
| - - Mobile-responsive UI |
40 |
| - target-audience: Small to medium-sized businesses |
| 37 | + - Provide a standardized format for codebase context |
| 38 | + - Enable AI-assisted development with explicit context |
| 39 | + - Support multiple programming languages and frameworks |
| 40 | + target-audience: Developers and AI assistants |
41 | 41 | success-metrics:
|
42 |
| - - User adoption rate |
43 |
| - - System response time |
44 |
| - - Data processing accuracy |
| 42 | + - Adoption rate among developers |
| 43 | + - Improved AI-assisted development accuracy |
45 | 44 | quality-assurance:
|
46 | 45 | testing-frameworks:
|
47 | 46 | - Jest
|
48 |
| - - Cypress |
49 |
| - coverage-threshold: 80% |
| 47 | + - Pytest |
| 48 | + coverage-threshold: "90%" |
50 | 49 | performance-benchmarks:
|
51 |
| - - API response time < 200ms |
52 |
| - - Database query time < 100ms |
| 50 | + - Linting speed for large codebases |
| 51 | + - Memory usage during linting |
53 | 52 | deployment:
|
54 |
| - platform: AWS |
| 53 | + platform: GitHub |
55 | 54 | cicd-pipeline: GitHub Actions
|
56 |
| - staging-environment: dev.myawesomeproject.com |
57 |
| - production-environment: myawesomeproject.com |
58 |
| - |
| 55 | + staging-environment: GitHub Pages (Documentation) |
| 56 | + production-environment: npm registry (Linter package) |
59 | 57 | ---
|
60 | 58 |
|
61 | 59 | # Codebase Context Specification
|
62 | 60 |
|
63 |
| -This project defines and implements the Codebase Context Specification, a standardized approach to providing context for AI-assisted development. The specification aims to enhance the effectiveness of AI models in understanding and working with codebases. |
| 61 | +This is the root directory for the Codebase Context Specification project. The specification defines a standardized way to provide explicit context information about a codebase, enabling more effective AI-assisted development. |
64 | 62 |
|
65 | 63 | ## Project Structure
|
66 | 64 |
|
67 |
| -- Root directory: Contains specification files, main documentation, and linter subdirectories |
68 |
| -- `linters/`: Contains language-specific linter implementations |
69 |
| - - `typescript/`: TypeScript linter implementation |
70 |
| - - `python/`: Python linter implementation (placeholder) |
| 65 | +- `CODEBASE-CONTEXT.md`: The main specification document |
| 66 | +- `examples/`: Directory containing example implementations |
| 67 | +- `linters/`: Directory containing linter implementations for various languages |
| 68 | +- `README.md`: Project overview and quick start guide |
71 | 69 |
|
72 |
| -## Key Components |
| 70 | +## Getting Started |
73 | 71 |
|
74 |
| -1. Specification: Defined in (CODEBASE-CONTEXT.md) |
75 |
| -2. Linter Implementations: |
76 |
| - - TypeScript: `linters/typescript/src/context_linter.ts` |
77 |
| - - Python: (To be implemented) |
78 |
| -3. Documentation: |
79 |
| - - Main README: README.md |
80 |
| - - Linter-specific README: `linters/typescript/README.md` |
| 72 | +To get started with the Codebase Context Specification: |
81 | 73 |
|
82 |
| -## Development Guidelines |
| 74 | +1. Review the `CODEBASE-CONTEXT.md` file for the full specification |
| 75 | +2. Check out the `examples/` directory for implementation examples |
| 76 | +3. Use the linters in the `linters/` directory to validate your .context.md files |
83 | 77 |
|
84 |
| -- Follow the specification outlined in CODEBASE-CONTEXT.md |
85 |
| -- Ensure all new features have corresponding tests |
86 |
| -- Keep the linter implementations for different languages consistent in functionality |
87 |
| -- Update examples and documentation when making significant changes to the specification |
| 78 | +## Development |
88 | 79 |
|
89 |
| -## Getting Started |
| 80 | +To contribute to the Codebase Context Specification: |
| 81 | + |
| 82 | +1. Fork the repository |
| 83 | +2. Create a new branch for your changes |
| 84 | +3. Make your changes and ensure all tests pass |
| 85 | +4. Submit a pull request with a clear description of your changes |
| 86 | + |
| 87 | +## Quality Assurance |
| 88 | + |
| 89 | +We maintain high-quality standards through: |
| 90 | + |
| 91 | +- Automated linting of .context.md files using Jest and Pytest |
| 92 | +- Manual review of all changes to the specification |
| 93 | +- Maintaining a test coverage threshold of 90% |
| 94 | +- Performance benchmarking for linting speed and memory usage |
| 95 | + |
| 96 | +## Deployment |
| 97 | + |
| 98 | +The Codebase Context Specification is versioned and released through GitHub. We use the following environments: |
| 99 | + |
| 100 | +- GitHub for version control and collaboration |
| 101 | +- GitHub Actions for continuous integration and deployment |
| 102 | +- GitHub Pages for hosting documentation (staging) |
| 103 | +- npm registry for distributing the linter package (production) |
90 | 104 |
|
91 |
| -Refer to the main README.md file for an overview of the project and its components. For language-specific linter setup and usage, see the README files in the respective linter directories. |
| 105 | +Each release goes through the following process: |
92 | 106 |
|
93 |
| -## Contributing |
| 107 | +1. Development and testing on feature branches |
| 108 | +2. Merging to the main branch after review |
| 109 | +3. Running automated tests and linting |
| 110 | +4. Manual review of changes |
| 111 | +5. Deployment to staging (documentation update) |
| 112 | +6. Final approval and deployment to production (npm package release) |
94 | 113 |
|
95 |
| -We welcome contributions! Please see the main README.md file for guidelines on how to contribute to this project. When contributing to specific linters, refer to their individual documentation for language-specific contribution guidelines. |
| 114 | +For more detailed information, please refer to the individual documents and subdirectories. |
0 commit comments