@juspay/yama 1.6.0 โ 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mcp-config.example.json +26 -0
- package/CHANGELOG.md +46 -0
- package/README.md +311 -685
- package/dist/cli/v2.cli.d.ts +13 -0
- package/dist/cli/v2.cli.js +359 -0
- package/dist/index.d.ts +12 -13
- package/dist/index.js +18 -19
- package/dist/v2/config/ConfigLoader.d.ts +50 -0
- package/dist/v2/config/ConfigLoader.js +205 -0
- package/dist/v2/config/DefaultConfig.d.ts +9 -0
- package/dist/v2/config/DefaultConfig.js +187 -0
- package/dist/v2/core/LearningOrchestrator.d.ts +65 -0
- package/dist/v2/core/LearningOrchestrator.js +499 -0
- package/dist/v2/core/MCPServerManager.d.ts +22 -0
- package/dist/v2/core/MCPServerManager.js +100 -0
- package/dist/v2/core/SessionManager.d.ts +72 -0
- package/dist/v2/core/SessionManager.js +200 -0
- package/dist/v2/core/YamaV2Orchestrator.d.ts +112 -0
- package/dist/v2/core/YamaV2Orchestrator.js +549 -0
- package/dist/v2/learning/FeedbackExtractor.d.ts +46 -0
- package/dist/v2/learning/FeedbackExtractor.js +237 -0
- package/dist/v2/learning/KnowledgeBaseManager.d.ts +91 -0
- package/dist/v2/learning/KnowledgeBaseManager.js +475 -0
- package/dist/v2/learning/types.d.ts +121 -0
- package/dist/v2/learning/types.js +15 -0
- package/dist/v2/prompts/EnhancementSystemPrompt.d.ts +8 -0
- package/dist/v2/prompts/EnhancementSystemPrompt.js +216 -0
- package/dist/v2/prompts/LangfusePromptManager.d.ts +48 -0
- package/dist/v2/prompts/LangfusePromptManager.js +144 -0
- package/dist/v2/prompts/LearningSystemPrompt.d.ts +11 -0
- package/dist/v2/prompts/LearningSystemPrompt.js +180 -0
- package/dist/v2/prompts/PromptBuilder.d.ts +45 -0
- package/dist/v2/prompts/PromptBuilder.js +257 -0
- package/dist/v2/prompts/ReviewSystemPrompt.d.ts +8 -0
- package/dist/v2/prompts/ReviewSystemPrompt.js +270 -0
- package/dist/v2/types/config.types.d.ts +141 -0
- package/dist/v2/types/config.types.js +5 -0
- package/dist/v2/types/mcp.types.d.ts +191 -0
- package/dist/v2/types/mcp.types.js +6 -0
- package/dist/v2/types/v2.types.d.ts +182 -0
- package/dist/v2/types/v2.types.js +42 -0
- package/dist/v2/utils/ObservabilityConfig.d.ts +22 -0
- package/dist/v2/utils/ObservabilityConfig.js +48 -0
- package/package.json +16 -10
- package/yama.config.example.yaml +259 -204
- package/dist/cli/index.d.ts +0 -12
- package/dist/cli/index.js +0 -538
- package/dist/core/ContextGatherer.d.ts +0 -110
- package/dist/core/ContextGatherer.js +0 -470
- package/dist/core/Guardian.d.ts +0 -81
- package/dist/core/Guardian.js +0 -480
- package/dist/core/providers/BitbucketProvider.d.ts +0 -105
- package/dist/core/providers/BitbucketProvider.js +0 -489
- package/dist/features/CodeReviewer.d.ts +0 -173
- package/dist/features/CodeReviewer.js +0 -1707
- package/dist/features/DescriptionEnhancer.d.ts +0 -70
- package/dist/features/DescriptionEnhancer.js +0 -511
- package/dist/features/MultiInstanceProcessor.d.ts +0 -74
- package/dist/features/MultiInstanceProcessor.js +0 -360
- package/dist/types/index.d.ts +0 -624
- package/dist/types/index.js +0 -104
- package/dist/utils/Cache.d.ts +0 -103
- package/dist/utils/Cache.js +0 -444
- package/dist/utils/ConfigManager.d.ts +0 -88
- package/dist/utils/ConfigManager.js +0 -602
- package/dist/utils/ContentSimilarityService.d.ts +0 -74
- package/dist/utils/ContentSimilarityService.js +0 -215
- package/dist/utils/ExactDuplicateRemover.d.ts +0 -77
- package/dist/utils/ExactDuplicateRemover.js +0 -361
- package/dist/utils/Logger.d.ts +0 -31
- package/dist/utils/Logger.js +0 -214
- package/dist/utils/MemoryBankManager.d.ts +0 -73
- package/dist/utils/MemoryBankManager.js +0 -310
- package/dist/utils/ParallelProcessing.d.ts +0 -140
- package/dist/utils/ParallelProcessing.js +0 -333
- package/dist/utils/ProviderLimits.d.ts +0 -58
- package/dist/utils/ProviderLimits.js +0 -143
- package/dist/utils/RetryManager.d.ts +0 -78
- package/dist/utils/RetryManager.js +0 -205
package/yama.config.example.yaml
CHANGED
|
@@ -1,215 +1,270 @@
|
|
|
1
1
|
# Yama Configuration Example
|
|
2
|
-
#
|
|
2
|
+
# Copy this file to yama.config.yaml and customize for your project
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
version: 2
|
|
5
|
+
configType: "yama-v2"
|
|
6
|
+
|
|
7
|
+
# ============================================================================
|
|
8
|
+
# Display & Streaming Configuration
|
|
9
|
+
# ============================================================================
|
|
5
10
|
display:
|
|
6
|
-
showBanner: true # Show
|
|
7
|
-
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
# Feature Configuration
|
|
28
|
-
features:
|
|
29
|
-
# Code Review Configuration
|
|
30
|
-
codeReview:
|
|
31
|
-
enabled: true
|
|
32
|
-
postSummaryComment: true # Post summary comment at the end of review (default: true)
|
|
33
|
-
severityLevels: ["CRITICAL", "MAJOR", "MINOR", "SUGGESTION"]
|
|
34
|
-
categories:
|
|
35
|
-
[
|
|
36
|
-
"security",
|
|
37
|
-
"performance",
|
|
38
|
-
"maintainability",
|
|
39
|
-
"functionality",
|
|
40
|
-
"error_handling",
|
|
41
|
-
]
|
|
42
|
-
excludePatterns:
|
|
43
|
-
- "*.lock"
|
|
44
|
-
- "*.svg"
|
|
45
|
-
- "*.png"
|
|
46
|
-
- "*.jpg"
|
|
47
|
-
- "*.gif"
|
|
48
|
-
- "*.min.js"
|
|
49
|
-
- "*.min.css"
|
|
50
|
-
- "dist/**"
|
|
51
|
-
- "build/**"
|
|
52
|
-
- "vendor/**"
|
|
53
|
-
contextLines: 3 # Lines of context around changes
|
|
54
|
-
focusAreas:
|
|
55
|
-
- "Security vulnerabilities"
|
|
56
|
-
- "Performance bottlenecks"
|
|
57
|
-
- "Error handling"
|
|
58
|
-
- "Code quality"
|
|
59
|
-
|
|
60
|
-
# NEW: Batch Processing Configuration
|
|
61
|
-
batchProcessing:
|
|
62
|
-
enabled: true # Enable batch processing for large PRs
|
|
63
|
-
maxFilesPerBatch: 3 # Maximum files to process in each batch
|
|
64
|
-
prioritizeSecurityFiles: true # Process security-sensitive files first
|
|
65
|
-
parallelBatches: false # Keep for backward compatibility
|
|
66
|
-
batchDelayMs: 1000 # Delay between batches in milliseconds
|
|
67
|
-
singleRequestThreshold: 5 # Use single request for PRs with โค5 files
|
|
68
|
-
|
|
69
|
-
# NEW: Parallel Processing Configuration
|
|
70
|
-
parallel:
|
|
71
|
-
enabled: true # Enable parallel processing by default
|
|
72
|
-
maxConcurrentBatches: 3 # Maximum concurrent batches
|
|
73
|
-
rateLimitStrategy: "fixed" # Options: fixed, adaptive
|
|
74
|
-
tokenBudgetDistribution: "equal" # Options: equal, weighted
|
|
75
|
-
failureHandling: "continue" # Options: continue, stop-all
|
|
76
|
-
|
|
77
|
-
# Multi-Instance Processing Configuration
|
|
78
|
-
multiInstance:
|
|
79
|
-
enabled: true # Enable multi-instance review
|
|
80
|
-
instanceCount: 2 # Number of instances to run in parallel
|
|
81
|
-
instances:
|
|
82
|
-
- name: "primary"
|
|
83
|
-
provider: "vertex"
|
|
84
|
-
model: "gemini-2.5-pro"
|
|
85
|
-
temperature: 0.3
|
|
86
|
-
weight: 1.0
|
|
87
|
-
- name: "secondary"
|
|
88
|
-
provider: "vertex"
|
|
89
|
-
model: "gemini-2.5-pro"
|
|
90
|
-
temperature: 0.1
|
|
91
|
-
weight: 1.0
|
|
92
|
-
deduplication:
|
|
93
|
-
enabled: true
|
|
94
|
-
similarityThreshold: 40 # Similarity percentage threshold (0-100)
|
|
95
|
-
maxCommentsToPost: 30
|
|
96
|
-
prioritizeBy: "severity"
|
|
97
|
-
|
|
98
|
-
# NEW: Semantic Comment Deduplication Configuration
|
|
99
|
-
semanticDeduplication:
|
|
100
|
-
enabled: true # Enable AI-powered semantic similarity analysis
|
|
101
|
-
similarityThreshold: 70 # Similarity percentage threshold (0-100)
|
|
102
|
-
batchSize: 15 # Number of violations to process per batch
|
|
103
|
-
timeout: "5m" # Timeout for similarity analysis
|
|
104
|
-
fallbackOnError: true # Return all violations if AI analysis fails
|
|
105
|
-
logMatches: true # Log detailed similarity match information
|
|
106
|
-
|
|
107
|
-
# Description Enhancement Configuration
|
|
108
|
-
descriptionEnhancement:
|
|
109
|
-
enabled: true
|
|
110
|
-
preserveContent: true # Always preserve existing content
|
|
111
|
-
autoFormat: true
|
|
112
|
-
|
|
113
|
-
requiredSections:
|
|
114
|
-
- key: "changelog"
|
|
115
|
-
name: "Changelog (Modules Modified)"
|
|
116
|
-
required: true
|
|
117
|
-
- key: "testcases"
|
|
118
|
-
name: "Test Cases (What to be tested)"
|
|
119
|
-
required: true
|
|
120
|
-
- key: "config_changes"
|
|
121
|
-
name: "CAC Config Or Service Config Changes"
|
|
122
|
-
required: true
|
|
123
|
-
|
|
124
|
-
# Customize AI behavior:
|
|
125
|
-
systemPrompt: |
|
|
126
|
-
You are a Senior Staff Engineer writing comprehensive technical documentation.
|
|
127
|
-
Focus on architectural decisions, trade-offs, and long-term maintainability.
|
|
128
|
-
|
|
129
|
-
# Customize formatting:
|
|
130
|
-
enhancementInstructions: |
|
|
131
|
-
Keep descriptions under 300 words. Use bullet points, not paragraphs.
|
|
132
|
-
No emojis. Professional tone only. Include numbers and metrics.
|
|
133
|
-
|
|
134
|
-
# NEW: Diff Strategy Configuration
|
|
135
|
-
diffStrategy:
|
|
11
|
+
showBanner: true # Show Yama banner on startup
|
|
12
|
+
streamingMode: false # Enable real-time streaming of AI decisions
|
|
13
|
+
verboseToolCalls: false # Log every MCP tool call
|
|
14
|
+
showAIThinking: false # Display AI reasoning process
|
|
15
|
+
|
|
16
|
+
# ============================================================================
|
|
17
|
+
# AI Configuration
|
|
18
|
+
# ============================================================================
|
|
19
|
+
ai:
|
|
20
|
+
provider: "auto" # auto | google-ai | anthropic | openai | bedrock
|
|
21
|
+
model: "gemini-2.5-pro" # or claude-3-7-sonnet-20250219-v1:0, gpt-4, etc.
|
|
22
|
+
temperature: 0.2 # Lower = more deterministic (0.0-1.0)
|
|
23
|
+
maxTokens: 128000 # Maximum tokens per AI call
|
|
24
|
+
enableAnalytics: true # Track token usage and costs
|
|
25
|
+
enableEvaluation: false # Enable quality evaluation (slower)
|
|
26
|
+
timeout: "15m" # Maximum time for review
|
|
27
|
+
retryAttempts: 3 # Number of retries on failure
|
|
28
|
+
|
|
29
|
+
# Conversation memory for maintaining review state
|
|
30
|
+
conversationMemory:
|
|
136
31
|
enabled: true
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
#
|
|
156
|
-
|
|
32
|
+
store: "memory" # memory | redis
|
|
33
|
+
maxSessions: 50
|
|
34
|
+
maxTurnsPerSession: 300 # Long reviews need many turns
|
|
35
|
+
enableSummarization: false # Don't summarize mid-review
|
|
36
|
+
|
|
37
|
+
# ============================================================================
|
|
38
|
+
# MCP Servers Configuration
|
|
39
|
+
# ============================================================================
|
|
40
|
+
# Bitbucket MCP is always enabled (hardcoded)
|
|
41
|
+
# Jira MCP can be enabled/disabled here
|
|
42
|
+
# Use blockedTools to prevent AI from using specific MCP tools
|
|
43
|
+
mcpServers:
|
|
44
|
+
bitbucket:
|
|
45
|
+
# Optional: Block specific Bitbucket tools from AI access
|
|
46
|
+
# This prevents the AI from performing certain actions
|
|
47
|
+
blockedTools: []
|
|
48
|
+
# Example blocked tools (uncomment to use):
|
|
49
|
+
# - merge_pull_request # Prevent AI from merging PRs
|
|
50
|
+
# - delete_branch # Prevent AI from deleting branches
|
|
51
|
+
# - approve_pull_request # Prevent AI from auto-approving PRs
|
|
52
|
+
|
|
53
|
+
jira:
|
|
54
|
+
enabled: true # Set to false to disable Jira integration
|
|
55
|
+
# Optional: Block specific Jira tools from AI access
|
|
56
|
+
blockedTools: []
|
|
57
|
+
# Example blocked tools (uncomment to use):
|
|
58
|
+
# - jira_create_issue # Prevent AI from creating Jira issues
|
|
59
|
+
# - jira_delete_issue # Prevent AI from deleting issues
|
|
60
|
+
# - jira_update_issue # Prevent AI from modifying issues
|
|
61
|
+
|
|
62
|
+
# ============================================================================
|
|
63
|
+
# Review Configuration
|
|
64
|
+
# ============================================================================
|
|
65
|
+
review:
|
|
157
66
|
enabled: true
|
|
158
|
-
ttl: "30m" # Time to live for cache entries
|
|
159
|
-
maxSize: "100MB"
|
|
160
|
-
storage: "memory" # Options: memory, redis, file
|
|
161
67
|
|
|
162
|
-
#
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
68
|
+
# High-level workflow instructions (combined with base system prompt)
|
|
69
|
+
workflowInstructions: |
|
|
70
|
+
Follow the autonomous review workflow:
|
|
71
|
+
1. Read PR details and find Jira ticket
|
|
72
|
+
2. Read project standards from memory-bank
|
|
73
|
+
3. Analyze files one-by-one
|
|
74
|
+
4. Search code for context as needed
|
|
75
|
+
5. Comment on issues immediately
|
|
76
|
+
6. Make final decision based on blocking criteria
|
|
77
|
+
|
|
78
|
+
# Analysis focus areas (in priority order)
|
|
79
|
+
focusAreas:
|
|
80
|
+
- name: "Security Analysis"
|
|
81
|
+
priority: "CRITICAL"
|
|
82
|
+
description: |
|
|
83
|
+
- SQL/NoSQL injection vulnerabilities
|
|
84
|
+
- Cross-Site Scripting (XSS)
|
|
85
|
+
- Authentication/Authorization flaws
|
|
86
|
+
- Hardcoded secrets, API keys, passwords
|
|
87
|
+
- Input validation and sanitization
|
|
88
|
+
- Data exposure and privacy violations
|
|
89
|
+
|
|
90
|
+
- name: "Performance Review"
|
|
91
|
+
priority: "MAJOR"
|
|
92
|
+
description: |
|
|
93
|
+
- N+1 database query patterns
|
|
94
|
+
- Memory leaks and resource management
|
|
95
|
+
- Algorithm complexity issues
|
|
96
|
+
- Missing caching opportunities
|
|
97
|
+
- Blocking I/O in async contexts
|
|
98
|
+
|
|
99
|
+
- name: "Code Quality"
|
|
100
|
+
priority: "MAJOR"
|
|
101
|
+
description: |
|
|
102
|
+
- SOLID principle violations
|
|
103
|
+
- Poor error handling
|
|
104
|
+
- Code duplication (DRY violations)
|
|
105
|
+
- Poor naming conventions
|
|
106
|
+
- Missing edge case handling
|
|
107
|
+
|
|
108
|
+
# Blocking criteria (OPTIONAL - AI uses these to decide whether to block PR)
|
|
109
|
+
# If not provided or empty, AI will review and comment but NOT auto-block/approve PRs
|
|
110
|
+
# Uncomment and customize the examples below to enable auto-blocking:
|
|
111
|
+
blockingCriteria: []
|
|
112
|
+
# blockingCriteria:
|
|
113
|
+
# - condition: "ANY CRITICAL severity issue"
|
|
114
|
+
# action: "BLOCK"
|
|
115
|
+
# reason: "Security or data loss risk"
|
|
116
|
+
#
|
|
117
|
+
# - condition: "3 or more MAJOR severity issues"
|
|
118
|
+
# action: "BLOCK"
|
|
119
|
+
# reason: "Too many significant bugs/performance issues"
|
|
120
|
+
#
|
|
121
|
+
# - condition: "Jira requirement coverage < 70%"
|
|
122
|
+
# action: "BLOCK"
|
|
123
|
+
# reason: "Incomplete implementation of requirements"
|
|
124
|
+
|
|
125
|
+
# Files to exclude from analysis
|
|
126
|
+
excludePatterns:
|
|
127
|
+
- "*.lock"
|
|
128
|
+
- "*.svg"
|
|
129
|
+
- "*.min.js"
|
|
130
|
+
- "*.map"
|
|
131
|
+
- "package-lock.json"
|
|
132
|
+
- "pnpm-lock.yaml"
|
|
133
|
+
- "yarn.lock"
|
|
134
|
+
|
|
135
|
+
# Context settings
|
|
136
|
+
contextLines: 3 # Lines of context around each diff change
|
|
137
|
+
maxFilesPerReview: 100 # Maximum files to review
|
|
138
|
+
fileAnalysisTimeout: "2m" # Timeout per file
|
|
139
|
+
|
|
140
|
+
# Tool usage preferences
|
|
141
|
+
toolPreferences:
|
|
142
|
+
lazyLoading: true # Read files on-demand (RECOMMENDED)
|
|
143
|
+
cacheToolResults: true # Cache MCP tool responses
|
|
144
|
+
parallelToolCalls: false # Sequential for better context
|
|
145
|
+
maxToolCallsPerFile: 20 # Prevent infinite loops
|
|
146
|
+
enableCodeSearch: true # Allow search_code() usage
|
|
147
|
+
enableDirectoryListing: true # Allow list_directory_content()
|
|
148
|
+
|
|
149
|
+
# ============================================================================
|
|
150
|
+
# PR Description Enhancement
|
|
151
|
+
# ============================================================================
|
|
152
|
+
descriptionEnhancement:
|
|
153
|
+
enabled: true
|
|
154
|
+
|
|
155
|
+
instructions: |
|
|
156
|
+
Enhance the PR description using Jira requirements and diff analysis.
|
|
157
|
+
Generate comprehensive, well-structured description with all required sections.
|
|
158
|
+
|
|
159
|
+
requiredSections:
|
|
160
|
+
- key: "summary"
|
|
161
|
+
name: "๐ Summary"
|
|
162
|
+
required: true
|
|
163
|
+
description: "Clear overview of what this PR accomplishes"
|
|
164
|
+
|
|
165
|
+
- key: "changes"
|
|
166
|
+
name: "๐ง Changes Made"
|
|
167
|
+
required: true
|
|
168
|
+
description: "Specific technical changes with file references"
|
|
207
169
|
|
|
208
|
-
|
|
170
|
+
- key: "jira"
|
|
171
|
+
name: "๐ซ Jira Reference"
|
|
172
|
+
required: false
|
|
173
|
+
description: "Link to Jira ticket and requirement coverage"
|
|
174
|
+
|
|
175
|
+
- key: "testing"
|
|
176
|
+
name: "๐งช Testing Strategy"
|
|
177
|
+
required: true
|
|
178
|
+
description: "How changes were tested and validation approach"
|
|
179
|
+
|
|
180
|
+
- key: "impact"
|
|
181
|
+
name: "โก Impact & Considerations"
|
|
182
|
+
required: false
|
|
183
|
+
description: "Business impact, performance implications, breaking changes"
|
|
184
|
+
|
|
185
|
+
preserveContent: true # Don't remove existing images/links/tables
|
|
186
|
+
autoFormat: true # Clean up markdown formatting
|
|
187
|
+
|
|
188
|
+
# ============================================================================
|
|
189
|
+
# Memory Bank & Project Context
|
|
190
|
+
# ============================================================================
|
|
209
191
|
memoryBank:
|
|
210
192
|
enabled: true
|
|
211
|
-
path: "memory-bank"
|
|
212
|
-
fallbackPaths:
|
|
193
|
+
path: "memory-bank"
|
|
194
|
+
fallbackPaths:
|
|
213
195
|
- "docs/memory-bank"
|
|
214
196
|
- ".memory-bank"
|
|
215
|
-
|
|
197
|
+
|
|
198
|
+
# Standard files to read for project context
|
|
199
|
+
standardFiles:
|
|
200
|
+
- "project-overview.md"
|
|
201
|
+
- "architecture.md"
|
|
202
|
+
- "coding-standards.md"
|
|
203
|
+
- "security-guidelines.md"
|
|
204
|
+
|
|
205
|
+
# ============================================================================
|
|
206
|
+
# Knowledge Base - Reinforcement Learning from PR Feedback
|
|
207
|
+
# ============================================================================
|
|
208
|
+
# Yama learns from developer feedback on AI comments across merged PRs.
|
|
209
|
+
# Use 'yama learn -w <workspace> -r <repo> -p <pr-id>' to extract learnings.
|
|
210
|
+
knowledgeBase:
|
|
211
|
+
enabled: true
|
|
212
|
+
|
|
213
|
+
# Path to knowledge base file (relative to repo root)
|
|
214
|
+
path: ".yama/knowledge-base.md"
|
|
215
|
+
|
|
216
|
+
# Patterns to identify AI-generated comments (author name matching)
|
|
217
|
+
aiAuthorPatterns:
|
|
218
|
+
- "Yama"
|
|
219
|
+
- "yama-bot"
|
|
220
|
+
- "yama-review"
|
|
221
|
+
|
|
222
|
+
# Automatically summarize knowledge base when entry count exceeds this
|
|
223
|
+
maxEntriesBeforeSummarization: 50
|
|
224
|
+
|
|
225
|
+
# How many consolidated entries to keep after summarization
|
|
226
|
+
summaryRetentionCount: 20
|
|
227
|
+
|
|
228
|
+
# Automatically commit knowledge base changes (with --commit flag)
|
|
229
|
+
autoCommit: false
|
|
230
|
+
|
|
231
|
+
# ============================================================================
|
|
232
|
+
# Project-Specific Standards (Override in your repository)
|
|
233
|
+
# ============================================================================
|
|
234
|
+
projectStandards:
|
|
235
|
+
# Path to project-specific prompt files (relative to repo root)
|
|
236
|
+
customPromptsPath: "config/prompts/"
|
|
237
|
+
|
|
238
|
+
# Additional focus areas beyond defaults
|
|
239
|
+
additionalFocusAreas: []
|
|
240
|
+
|
|
241
|
+
# Custom blocking rules
|
|
242
|
+
customBlockingRules: []
|
|
243
|
+
|
|
244
|
+
# Severity level overrides
|
|
245
|
+
severityOverrides: {}
|
|
246
|
+
|
|
247
|
+
# ============================================================================
|
|
248
|
+
# Monitoring & Analytics
|
|
249
|
+
# ============================================================================
|
|
250
|
+
monitoring:
|
|
251
|
+
enabled: true
|
|
252
|
+
logToolCalls: true # Log every MCP tool execution
|
|
253
|
+
logAIDecisions: true # Log AI decision points
|
|
254
|
+
logTokenUsage: true # Log token usage for cost tracking
|
|
255
|
+
exportFormat: "json" # json | csv
|
|
256
|
+
exportPath: ".yama/analytics/"
|
|
257
|
+
|
|
258
|
+
# ============================================================================
|
|
259
|
+
# Performance & Cost Controls
|
|
260
|
+
# ============================================================================
|
|
261
|
+
performance:
|
|
262
|
+
maxReviewDuration: "15m" # Kill switch for long reviews
|
|
263
|
+
|
|
264
|
+
tokenBudget:
|
|
265
|
+
maxTokensPerReview: 500000 # Hard limit on tokens
|
|
266
|
+
warningThreshold: 400000 # Warn when approaching limit
|
|
267
|
+
|
|
268
|
+
costControls:
|
|
269
|
+
maxCostPerReview: 2.0 # USD limit per review
|
|
270
|
+
warningThreshold: 1.5 # Warn at $1.50
|
package/dist/cli/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Yama CLI - Enhanced command line interface
|
|
4
|
-
* Provides backward compatibility with pr-police.js and pr-describe.js
|
|
5
|
-
* Plus new unified commands for the enhanced functionality
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Main execution
|
|
9
|
-
*/
|
|
10
|
-
declare function main(): void;
|
|
11
|
-
export { main };
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|