-
Notifications
You must be signed in to change notification settings - Fork 493
Feature/tool configurations #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1c00274
9782e9a
0dd4e62
af261da
718e16e
08e7e01
9132b06
2489bae
5618cd2
9cf23a1
9de310b
bc64683
51209de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Git Worktrees Skill | ||
|
|
||
| # IDENTIFIER: automaker-worktree-skill | ||
|
|
||
| ## Description | ||
|
|
||
| This skill enables the agent to manage isolated development environments using Git Worktrees, which is the preferred way to work in the Automaker repository. | ||
|
|
||
| ## Instructions | ||
|
|
||
| - Always use `git worktree list` before creating new ones to avoid path conflicts. | ||
| - Prefer naming worktrees with the prefix `../automaker-worktree-`. | ||
| - Ensure you are in the root of the repository before running worktree commands. | ||
| - Use the `git-worktree` workflow for step-by-step execution. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| description: How to manage git worktrees in Automaker (IDENTIFIER: automaker-worktree-workflow) | ||
| --- | ||
|
|
||
| # Git Worktree Workflow | ||
|
|
||
| This workflow describes how to safely use git worktrees for feature development in Automaker. | ||
|
|
||
| 1. **Check existing worktrees**: | ||
|
|
||
| ```bash | ||
| git worktree list | ||
| ``` | ||
|
|
||
| 2. **Create a new worktree for a feature**: | ||
|
|
||
| ```bash | ||
| git worktree add ../automaker-worktree-<name> -b feature/<name> | ||
| ``` | ||
|
|
||
| 3. **Navigate to the worktree**: | ||
| - `cd ../automaker-worktree-<name>` | ||
|
|
||
| 4. **Remove worktree after completion**: | ||
|
|
||
| ```bash | ||
| git worktree remove ../automaker-worktree-<name> | ||
| git branch -d feature/<name> | ||
| ``` | ||
|
|
||
| 5. **Verify current setup**: | ||
| git status | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Qodo PR Agent | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, ready_for_review] | ||
| issue_comment: | ||
| types: [created, edited] | ||
|
|
||
| permissions: | ||
| pull-requests: write | ||
| issues: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| pr_agent: | ||
| runs-on: ubuntu-latest | ||
| name: Run PR Agent | ||
| if: ${{ github.event.sender.type != 'Bot' }} | ||
| steps: | ||
| - id: pr-agent | ||
| uses: Codium-ai/pr-agent@main | ||
|
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Latest release tag: v0.31 — docker/GitHub Actions tag codiumai/pr-agent:0.31-github_action (release listed "06 Nov 09:25"). [1] Sources: 🌐 Web query:
💡 Result: Latest published release for the repository (qodo-ai / formerly codium-ai) is v0.31 — Docker/GitHub Action image tag codiumai/pr-agent:0.31 (including codiumai/pr-agent:0.31-github_action). [1] If you need this tag inside a GitHub Actions workflow, you can:
Sources: 🌐 Web query:
💡 Result: v0.31 commit SHA: d36ad31. [1] (github.com) [2] (sourceforge.net) Citations:
🌐 Web query:
💡 Result: The GitHub Action for PR-Agent is provided in the qodo-ai/pr-agent repository — use it in workflows with Sources:
Update action reference and pin to a specific release. The action uses outdated organization reference 🔒 Suggested change- uses: Codium-ai/pr-agent@main
+ uses: qodo-ai/pr-agent@v0.31or pin to commit: - uses: Codium-ai/pr-agent@main
+ uses: qodo-ai/pr-agent@d36ad31🤖 Prompt for AI Agents |
||
| env: | ||
| OPENAI_KEY: ${{ secrets.OPENAI_KEY }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Qodo configuration for Automaker | ||
| # IDENTIFIER: automaker-qodo-config | ||
|
|
||
| [pr_test] | ||
| testing_framework = "vitest" | ||
|
|
||
| [pr_reviewer] | ||
| require_score_review = true | ||
| enable_review_labels_security = true | ||
| enable_review_labels_effort = true | ||
| num_code_suggestions = 4 | ||
| inline_code_comments = true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Qodo configuration for Automaker | ||
| # IDENTIFIER: automaker-qodo-config | ||
|
|
||
| [pr_test] | ||
| testing_framework = "vitest" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| export const spritesConfig = { | ||
| SPRITES_TOKEN: process.env.SPRITES_TOKEN, | ||
| SPRITES_API_BASE: process.env.SPRITES_API_BASE || 'https://api.sprites.dev/v1', | ||
| GITHUB_TOKEN: process.env.GITHUB_TOKEN, | ||
| LINEAR_API_KEY: process.env.LINEAR_API_KEY, | ||
| CLAUDE_OAUTH_TOKEN: process.env.CLAUDE_OAUTH_TOKEN, | ||
| DEFAULT_REPO_URL: process.env.DEFAULT_REPO_URL, | ||
| DEFAULT_BRANCH: process.env.DEFAULT_BRANCH || 'main', | ||
| GIT_USER_NAME: process.env.GIT_USER_NAME || 'Automaker Agent', | ||
| GIT_USER_EMAIL: process.env.GIT_USER_EMAIL || 'agent@automaker.dev', | ||
| OTEL_RECEIVER_PORT: parseInt(process.env.OTEL_RECEIVER_PORT || '4317'), | ||
| OTEL_RECEIVER_HOST: process.env.OTEL_RECEIVER_HOST || '0.0.0.0', | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -215,6 +215,19 @@ export function getModelForUseCase( | |
| default: CLAUDE_MODEL_MAP['opus'], | ||
| }; | ||
|
|
||
| // Fallback to OpenAI if Anthropic key is missing but OpenAI key is present | ||
| if (!process.env.ANTHROPIC_API_KEY && process.env.OPENAI_API_KEY) { | ||
| // Override defaults with OpenAI equivalents | ||
| defaultModels.spec = 'codex-gpt-4o'; | ||
| defaultModels.features = 'codex-gpt-4o'; | ||
| defaultModels.suggestions = 'codex-gpt-4o'; | ||
| defaultModels.chat = 'codex-gpt-4o'; | ||
| defaultModels.auto = 'codex-gpt-4o'; | ||
| defaultModels.default = 'codex-gpt-4o'; | ||
|
|
||
| logger.info(`Using OpenAI (codex-gpt-4o) for ${useCase} due to missing Anthropic key`); | ||
| } | ||
|
Comment on lines
+218
to
+229
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -type f -name "*model-resolver*" | head -20Repository: AutoMaker-Org/automaker Length of output: 118 🏁 Script executed: fd -t f "model-resolver" --type fRepository: AutoMaker-Org/automaker Length of output: 116 🏁 Script executed: find . -type d -name "*model-resolver*"Repository: AutoMaker-Org/automaker Length of output: 88 🏁 Script executed: git ls-files | grep -i "model.*resolver"Repository: AutoMaker-Org/automaker Length of output: 362 🏁 Script executed: cat -n libs/model-resolver/src/resolver.tsRepository: AutoMaker-Org/automaker Length of output: 8596 🏁 Script executed: cat -n libs/model-resolver/tests/resolver.test.tsRepository: AutoMaker-Org/automaker Length of output: 22884 🏁 Script executed: rg "PROVIDER_PREFIXES" -A 5 libs/types/src/Repository: AutoMaker-Org/automaker Length of output: 4587 🏁 Script executed: cat -n apps/server/src/lib/sdk-options.ts | head -250Repository: AutoMaker-Org/automaker Length of output: 9758 🏁 Script executed: cat -n libs/model-resolver/src/index.tsRepository: AutoMaker-Org/automaker Length of output: 618 🏁 Script executed: rg "codex-gpt-4o" --type tsRepository: AutoMaker-Org/automaker Length of output: 899 🏁 Script executed: rg "CODEX_MODEL_MAP" -A 20 libs/types/src/Repository: AutoMaker-Org/automaker Length of output: 14604 🏁 Script executed: rg "class.*Provider|function.*Provider" --type ts apps/server/src/ | grep -i codex | head -20Repository: AutoMaker-Org/automaker Length of output: 160 🏁 Script executed: cat -n apps/server/src/routes/features/routes/generate-title.ts | head -100Repository: AutoMaker-Org/automaker Length of output: 4131 🏁 Script executed: cat -n apps/server/src/providers/codex-provider.ts | head -150Repository: AutoMaker-Org/automaker Length of output: 6623 🏁 Script executed: rg "gpt-4o|codex-gpt-4o" --type ts libs/Repository: AutoMaker-Org/automaker Length of output: 1031 🏁 Script executed: rg "validateBareModelId|validateModel" --type ts apps/server/src/providers/ -A 5Repository: AutoMaker-Org/automaker Length of output: 2827 🏁 Script executed: rg "gpt-4o" --type ts libs/types/src/model.tsRepository: AutoMaker-Org/automaker Length of output: 49 🏁 Script executed: cat -n libs/types/src/model.ts | grep -A 50 "CODEX_MODEL_MAP"Repository: AutoMaker-Org/automaker Length of output: 3153 🏁 Script executed: rg "validateBareModelId" -A 15 libs/types/src/Repository: AutoMaker-Org/automaker Length of output: 2243 🏁 Script executed: rg "stripProviderPrefix|getModelProvider" -B 2 -A 10 libs/types/src/provider-utils.ts | head -60Repository: AutoMaker-Org/automaker Length of output: 1364 Replace hardcoded
- defaultModels.spec = 'codex-gpt-4o';
- defaultModels.features = 'codex-gpt-4o';
- defaultModels.suggestions = 'codex-gpt-4o';
- defaultModels.chat = 'codex-gpt-4o';
- defaultModels.auto = 'codex-gpt-4o';
- defaultModels.default = 'codex-gpt-4o';
+ defaultModels.spec = CODEX_MODEL_MAP.gpt52Codex;
+ defaultModels.features = CODEX_MODEL_MAP.gpt52Codex;
+ defaultModels.suggestions = CODEX_MODEL_MAP.gpt52Codex;
+ defaultModels.chat = CODEX_MODEL_MAP.gpt52Codex;
+ defaultModels.auto = CODEX_MODEL_MAP.gpt52Codex;
+ defaultModels.default = CODEX_MODEL_MAP.gpt52Codex;Apply the same fix to 🤖 Prompt for AI Agents |
||
|
|
||
| return resolveModelString(defaultModels[useCase] || DEFAULT_MODELS.claude); | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,12 +60,23 @@ export function createGenerateTitleHandler( | |
| const prompts = await getPromptCustomization(settingsService, '[GenerateTitle]'); | ||
| const systemPrompt = prompts.titleGeneration.systemPrompt; | ||
|
|
||
| let model = CLAUDE_MODEL_MAP.haiku; | ||
|
|
||
| // Fallback to OpenAI if Anthropic key is missing but OpenAI key is present | ||
| if (!process.env.ANTHROPIC_API_KEY && process.env.OPENAI_API_KEY) { | ||
| // Use gpt-4o which is comparable/better than haiku | ||
| model = 'codex-gpt-4o'; | ||
| logger.info( | ||
| 'Using OpenAI (codex-gpt-4o) for title generation due to missing Anthropic key' | ||
| ); | ||
| } | ||
|
Comment on lines
+65
to
+72
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cd apps/server/src/routes/features/routes && cat -n generate-title.tsRepository: AutoMaker-Org/automaker Length of output: 190 🌐 Web query:
💡 Result: Short answer:
Sources: Fix invalid model identifier The model string 🤖 Prompt for AI Agents |
||
|
|
||
| const userPrompt = `Generate a concise title for this feature:\n\n${trimmedDescription}`; | ||
|
|
||
| // Use simpleQuery - provider abstraction handles all the streaming/extraction | ||
| const result = await simpleQuery({ | ||
| prompt: `${systemPrompt}\n\n${userPrompt}`, | ||
| model: CLAUDE_MODEL_MAP.haiku, | ||
| model, | ||
| cwd: process.cwd(), | ||
| maxTurns: 1, | ||
| allowedTools: [], | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -149,6 +149,37 @@ export class CodexModelCacheService { | |
| try { | ||
| // Check if app-server is available | ||
| const isAvailable = await this.appServerService.isAvailable(); | ||
|
|
||
| // FALLBACK: If CLI is not available but we have an OpenAI API Key (e.g. in CI or limited env), | ||
| // provide default models so the UI doesn't block. | ||
| if (!isAvailable && process.env.OPENAI_API_KEY) { | ||
| logger.info('[doRefresh] CLI unavailable but OPENAI_API_KEY found. Using fallback models.'); | ||
| const fallbackModels: CodexModel[] = [ | ||
| { | ||
| id: 'codex-gpt-4o', | ||
| label: 'GPT-4o (Fallback)', | ||
| description: 'Fallback model using direct OpenAI API', | ||
| hasThinking: false, | ||
| supportsVision: true, | ||
| tier: 'premium', | ||
| isDefault: true, | ||
| }, | ||
| { | ||
| id: 'codex-gpt-4o-mini', | ||
| label: 'GPT-4o Mini (Fallback)', | ||
| description: 'Fast fallback model using direct OpenAI API', | ||
| hasThinking: false, | ||
| supportsVision: true, | ||
| tier: 'basic', | ||
| isDefault: false, | ||
| }, | ||
| ]; | ||
|
|
||
| // Save to cache so subsequent requests are fast | ||
| await this.saveToCache(fallbackModels); | ||
| return fallbackModels; | ||
| } | ||
|
Comment on lines
+152
to
+181
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid caching fallback for the full TTL. With the current logic, once fallback models are cached, 💡 Suggested change (shorter TTL for fallback)- await this.saveToCache(fallbackModels);
+ await this.saveToCache(fallbackModels, 5 * 60 * 1000); // 5 min TTL for fallback
return fallbackModels;- private async saveToCache(models: CodexModel[]): Promise<void> {
+ private async saveToCache(models: CodexModel[], ttlOverride?: number): Promise<void> {
const cache: CodexModelCache = {
models,
cachedAt: Date.now(),
- ttl: this.ttl,
+ ttl: ttlOverride ?? this.ttl,
};🤖 Prompt for AI Agents |
||
|
|
||
| if (!isAvailable) { | ||
| return []; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap the command in a code block for consistency.
The
git statuscommand should be formatted in a code block like all other commands in this workflow document.✏️ Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents