Skip to content

Commit 0930e21

Browse files
committed
feat: Update the pattern doc to address the review comments.
1 parent 4efaf04 commit 0930e21

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

patterns/1-initial/ai-code-generation-context.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ With the growing use of AI tools (like GitHub Copilot, ChatGPT, or custom LLMs),
1212

1313
## Context
1414

15-
- InnerSource adoption is in place across the organization
16-
- Developers are encouraged to use AI tools to improve productivity
17-
- Contributors may not be familiar or failed to prompt meticulously while generating code through AI with the target codebase's idioms, architecture, or constraints
18-
- Maintainers want to empower contributors using AI while preserving code consistency and maintainability
19-
- Multiple teams are contributing to shared repositories with varying levels of familiarity with project standards
20-
- Code review processes are becoming bottlenecked by AI-generated code that requires significant rework
15+
- InnerSource adoption is in place across the organisation.
16+
- Developers are encouraged to use AI tools to improve their productivity.
17+
- Contributors may not be familiar with or fail to meticulously prompt when generating code through AI, using the target codebase's idioms, architecture, or constraints.
18+
- Maintainers want to empower contributors using AI while preserving code consistency and maintainability.
19+
- Multiple teams are contributing to shared repositories with varying levels of familiarity with project standards.
20+
- Code review processes are becoming bottlenecked by AI-generated code that requires significant rework.
2121

2222
## Forces
2323

@@ -27,17 +27,17 @@ With the growing use of AI tools (like GitHub Copilot, ChatGPT, or custom LLMs),
2727
- **Productivity vs. Quality Trade-off**: While AI tools boost individual productivity, they can reduce overall team productivity if the generated code requires extensive rework
2828
- **Context Switching Cost**: Developers benefit from AI tools only when they have the right contextual grounding, but manually providing this context for each AI interaction is time-consuming
2929
- **Inconsistent Standards**: Different AI tools and different prompting approaches by contributors can lead to wildly inconsistent code styles and patterns
30-
- **Maintenance Burden**: Creating and maintaining comprehensive AI context requires ongoing effort from maintainers
30+
- **Maintenance Burden**: Creating and maintaining the comprehensive AI context requires ongoing effort from maintainers
3131
- **Tool Integration Complexity**: Different AI tools have different ways of consuming context, making it challenging to create universal guidance
3232
- **AI Tool Cost Constraints**: Comprehensive AI context increases processing costs (AI tools charge based on "tokens" \* units of text measurement) and usage limits, requiring strategic balance between context completeness and efficiency
3333

3434
## Solution
3535

36-
Provide an **AI Code Generation Context Package** within the repository to guide AI tools in producing contributions that align with project standards. This package serves as a comprehensive reference that contributors can easily provide to AI tools to ensure generated code follows project conventions.
36+
Provide an **AI Code Generation Context** folder within the repository to guide AI tools in producing contributions that align with project standards. This folder serves as a comprehensive reference that contributors can easily provide to AI tools, ensuring that generated code adheres to project conventions.
3737

3838
### Implementation Structure
3939

40-
Create a `innersource-ai/` folder in the repository root containing:
40+
Create an `innersource-ai/` folder in the repository root containing:
4141

4242
#### Core Documentation Files (Required)
4343

@@ -55,18 +55,18 @@ Create a `innersource-ai/` folder in the repository root containing:
5555
- High-level system architecture and component relationships
5656
- Data flow patterns and API design principles
5757
- Dependency management guidelines
58-
- Module organization and layering principles
58+
- Module organisation and layering principles
5959
- Integration patterns with external systems
6060

6161
`STYLE_GUIDE.md`: Comprehensive coding guidelines
6262

6363
- Language-specific style rules
64-
- Code organization patterns
64+
- Code organisation patterns
6565
- Documentation standards
6666
- Performance considerations
6767
- Security guidelines and common vulnerabilities to avoid
6868

69-
#### Optional Enhancements (Implement As Needed)
69+
#### Enhancements (Optional)
7070

7171
##### Practical Examples
7272

@@ -95,16 +95,16 @@ Create a `innersource-ai/` folder in the repository root containing:
9595

9696
##### Advanced Features
9797

98-
`EMBEDDINGS/` (Optional): For advanced LLM integrations
98+
`EMBEDDINGS/`: For advanced LLM integrations
9999

100100
- Searchable knowledge base of project patterns
101101
- Vector embeddings of code examples
102102
- Semantic search capabilities for finding relevant patterns
103103

104-
### Implementation Strategy
105-
106104
**Context Efficiency**: Start with core documentation files (~1000 words of context) to balance context value with AI tool costs. Expand strategically based on measured impact on review cycles and code quality.
107105

106+
**Naming Convension**: The suggested file and folder names follow industry common practices. However, codebase owners may choose alternative names that are more discoverable and relatable to their specific project or codebase. Any chosen naming convention should be clearly documented and communicated to contributors through proper documentation.
107+
108108
### Usage Patterns
109109

110110
#### For Contributors
@@ -148,7 +148,7 @@ This solution balances the productivity benefits of AI tools with the quality re
148148

149149
## Status
150150

151-
- Structured
151+
- Initial
152152
- Drafted in August 2025
153153

154154
## Author

0 commit comments

Comments
 (0)