Skip to content

Commit 4efaf04

Browse files
committed
fix: md linting
1 parent 3ba7faa commit 4efaf04

File tree

1 file changed

+79
-70
lines changed

1 file changed

+79
-70
lines changed

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

Lines changed: 79 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ 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 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
2121

2222
## Forces
2323

24-
* **AI Model Limitations**: AI models generate code based on generalized training data, not project-specific patterns, leading to generic solutions that may not fit the project's architecture
25-
* **Knowledge Gap**: New contributors using AI tools might unknowingly bypass existing architectural norms, coding standards, and established patterns
26-
* **Review Overhead**: AI-assisted PRs can significantly increase review load if not aligned with existing practices, as maintainers must spend time explaining and correcting deviations
27-
* **Productivity vs. Quality Trade-off**: While AI tools boost individual productivity, they can reduce overall team productivity if the generated code requires extensive rework
28-
* **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
29-
* **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
31-
* **Tool Integration Complexity**: Different AI tools have different ways of consuming context, making it challenging to create universal guidance
32-
* **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
24+
- **AI Model Limitations**: AI models generate code based on generalized training data, not project-specific patterns, leading to generic solutions that may not fit the project's architecture
25+
- **Knowledge Gap**: New contributors using AI tools might unknowingly bypass existing architectural norms, coding standards, and established patterns
26+
- **Review Overhead**: AI-assisted PRs can significantly increase review load if not aligned with existing practices, as maintainers must spend time explaining and correcting deviations
27+
- **Productivity vs. Quality Trade-off**: While AI tools boost individual productivity, they can reduce overall team productivity if the generated code requires extensive rework
28+
- **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
29+
- **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
31+
- **Tool Integration Complexity**: Different AI tools have different ways of consuming context, making it challenging to create universal guidance
32+
- **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

@@ -42,57 +42,64 @@ Create a `innersource-ai/` folder in the repository root containing:
4242
#### Core Documentation Files (Required)
4343

4444
`PROMPT.md`: Project-specific instructions for AI tools
45-
* Naming conventions (variables, functions, classes, files)
46-
* Logging patterns and error handling approaches
47-
* Testing strategy and preferred testing frameworks
48-
* Code formatting and style preferences
49-
* Common anti-patterns to avoid
50-
* Preferred libraries and frameworks for specific tasks
45+
46+
- Naming conventions (variables, functions, classes, files)
47+
- Logging patterns and error handling approaches
48+
- Testing strategy and preferred testing frameworks
49+
- Code formatting and style preferences
50+
- Common anti-patterns to avoid
51+
- Preferred libraries and frameworks for specific tasks
5152

5253
`ARCHITECTURE.md`: Lightweight system overview
53-
* High-level system architecture and component relationships
54-
* Data flow patterns and API design principles
55-
* Dependency management guidelines
56-
* Module organization and layering principles
57-
* Integration patterns with external systems
54+
55+
- High-level system architecture and component relationships
56+
- Data flow patterns and API design principles
57+
- Dependency management guidelines
58+
- Module organization and layering principles
59+
- Integration patterns with external systems
5860

5961
`STYLE_GUIDE.md`: Comprehensive coding guidelines
60-
* Language-specific style rules
61-
* Code organization patterns
62-
* Documentation standards
63-
* Performance considerations
64-
* Security guidelines and common vulnerabilities to avoid
62+
63+
- Language-specific style rules
64+
- Code organization patterns
65+
- Documentation standards
66+
- Performance considerations
67+
- Security guidelines and common vulnerabilities to avoid
6568

6669
#### Optional Enhancements (Implement As Needed)
6770

6871
##### Practical Examples
6972

7073
`EXAMPLES/`: Sample code files demonstrating best practices
71-
* `good-examples/`: Well-written code snippets with explanations
72-
* `bad-examples/`: Common mistakes with explanations of why they're problematic
73-
* `refactoring-examples/`: Before/after code showing proper improvements
74-
* Template files for common patterns (controllers, services, utilities)
74+
75+
- `good-examples/`: Well-written code snippets with explanations
76+
- `bad-examples/`: Common mistakes with explanations of why they're problematic
77+
- `refactoring-examples/`: Before/after code showing proper improvements
78+
- Template files for common patterns (controllers, services, utilities)
7579

7680
##### Configuration and Tooling
7781

7882
`CONFIG/`: Shared formatter and analysis configurations
79-
* `.prettierrc`, `.eslintrc`, or equivalent formatting configs
80-
* `.editorconfig` for consistent editor settings
81-
* Static analysis tool configurations
82-
* Pre-commit hook configurations
83+
84+
- `.prettierrc`, `.eslintrc`, or equivalent formatting configs
85+
- `.editorconfig` for consistent editor settings
86+
- Static analysis tool configurations
87+
- Pre-commit hook configurations
8388

8489
`INTEGRATION/`: AI tool-specific integration guides
85-
* GitHub Copilot workspace configuration
86-
* Custom GPT instructions and prompts
87-
* IDE plugin configurations
88-
* CLI tool integration examples
90+
91+
- GitHub Copilot workspace configuration
92+
- Custom GPT instructions and prompts
93+
- IDE plugin configurations
94+
- CLI tool integration examples
8995

9096
##### Advanced Features
9197

9298
`EMBEDDINGS/` (Optional): For advanced LLM integrations
93-
* Searchable knowledge base of project patterns
94-
* Vector embeddings of code examples
95-
* Semantic search capabilities for finding relevant patterns
99+
100+
- Searchable knowledge base of project patterns
101+
- Vector embeddings of code examples
102+
- Semantic search capabilities for finding relevant patterns
96103

97104
### Implementation Strategy
98105

@@ -101,33 +108,35 @@ Create a `innersource-ai/` folder in the repository root containing:
101108
### Usage Patterns
102109

103110
#### For Contributors
104-
* **Before Starting**: Review the AI context package to understand project standards
105-
* **During Development**: Reference specific files when prompting AI tools
106-
* **Code Generation**: Include relevant context snippets in AI prompts
107-
* **Validation**: Use provided examples to verify AI-generated code aligns with standards
111+
112+
- **Before Starting**: Review the AI context package to understand project standards
113+
- **During Development**: Reference specific files when prompting AI tools
114+
- **Code Generation**: Include relevant context snippets in AI prompts
115+
- **Validation**: Use provided examples to verify AI-generated code aligns with standards
108116

109117
#### For AI Tool Integration
110-
* **Direct Reference**: Copy relevant sections into AI tool prompts
111-
* **URL Integration**: Reference files via repository URLs in AI tools that support web access
112-
* **IDE Integration**: Configure AI plugins to automatically include context
113-
* **Custom Workflows**: Integrate context into CI/CD pipelines for automated validation
118+
119+
- **Direct Reference**: Copy relevant sections into AI tool prompts
120+
- **URL Integration**: Reference files via repository URLs in AI tools that support web access
121+
- **IDE Integration**: Configure AI plugins to automatically include context
122+
- **Custom Workflows**: Integrate context into CI/CD pipelines for automated validation
114123

115124
### Maintenance Strategy
116125

117-
* **Version Control**: Track changes to AI context alongside code changes
118-
* **Regular Updates**: Review and update context as project standards evolve
119-
* **Community Contribution**: Allow contributors to suggest improvements to AI context
120-
* **Metrics Tracking**: Monitor the effectiveness of AI context through code review metrics
126+
- **Version Control**: Track changes to AI context alongside code changes
127+
- **Regular Updates**: Review and update context as project standards evolve
128+
- **Community Contribution**: Allow contributors to suggest improvements to AI context
129+
- **Metrics Tracking**: Monitor the effectiveness of AI context through code review metrics
121130

122131
## Resulting Context
123132

124-
* **Improved Code Quality**: AI-assisted contributions become consistent with existing code standards and architectural patterns from the first submission
125-
* **Reduced Review Friction**: Maintainers can trust incoming PRs more readily, significantly reducing review fatigue and time-to-merge
126-
* **Enhanced Contributor Experience**: Contributors using AI produce better, more maintainable code even on their first attempts, leading to increased confidence and participation
127-
* **Scalable Collaboration**: Opens the door to scalable, AI-aware InnerSource collaboration across teams without sacrificing code quality
128-
* **Knowledge Preservation**: Project knowledge becomes more explicit and accessible, reducing dependency on tribal knowledge
129-
* **Faster Onboarding**: New contributors can leverage AI tools effectively from day one, reducing the learning curve for project-specific patterns
130-
* **Consistent Evolution**: As AI tools improve, the context package ensures that enhanced capabilities are channeled toward project-appropriate solutions
133+
- **Improved Code Quality**: AI-assisted contributions become consistent with existing code standards and architectural patterns from the first submission
134+
- **Reduced Review Friction**: Maintainers can trust incoming PRs more readily, significantly reducing review fatigue and time-to-merge
135+
- **Enhanced Contributor Experience**: Contributors using AI produce better, more maintainable code even on their first attempts, leading to increased confidence and participation
136+
- **Scalable Collaboration**: Opens the door to scalable, AI-aware InnerSource collaboration across teams without sacrificing code quality
137+
- **Knowledge Preservation**: Project knowledge becomes more explicit and accessible, reducing dependency on tribal knowledge
138+
- **Faster Onboarding**: New contributors can leverage AI tools effectively from day one, reducing the learning curve for project-specific patterns
139+
- **Consistent Evolution**: As AI tools improve, the context package ensures that enhanced capabilities are channeled toward project-appropriate solutions
131140

132141
## Rationale
133142

@@ -139,18 +148,18 @@ This solution balances the productivity benefits of AI tools with the quality re
139148

140149
## Status
141150

142-
* Structured
143-
* Drafted in August 2025
151+
- Structured
152+
- Drafted in August 2025
144153

145154
## Author
146155

147156
[Amburi Roy](https://www.linkedin.com/in/amburi/)
148157

149158
## Related Patterns
150159

151-
* [Standard Base Documentation](../2-structured/base-documentation.md) - Provides the foundation documentation that AI context builds upon
152-
* [InnerSource Portal](../2-structured/innersource-portal.md) - Could include AI context availability as searchable metadata for project discovery
153-
* [Trusted Committer](../2-structured/trusted-committer.md) - Trusted Committers are responsible for maintaining and evolving the AI context package
160+
- [Standard Base Documentation](../2-structured/base-documentation.md): Provides the foundation documentation that AI context builds upon
161+
- [InnerSource Portal](../2-structured/innersource-portal.md): Could include AI context availability as searchable metadata for project discovery
162+
- [Trusted Committer](../2-structured/trusted-committer.md): Trusted Committers are responsible for maintaining and evolving the AI context package
154163

155164
## License
156165

0 commit comments

Comments
 (0)