You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: patterns/1-initial/ai-code-generation-context.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,24 +12,24 @@ With the growing use of AI tools (like GitHub Copilot, ChatGPT, or custom LLMs),
12
12
13
13
## Context
14
14
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.
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.
21
21
22
22
## Forces
23
23
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 the 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 the 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
33
33
34
34
## Solution
35
35
@@ -75,7 +75,7 @@ Create an `innersource-ai/` folder in the repository root containing:
75
75
*`good-examples/`: Well-written code snippets with explanations
76
76
*`bad-examples/`: Common mistakes with explanations of why they're problematic
0 commit comments