Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/scripts/create-github-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ gh release create "$VERSION" \
.genreleases/spec-kit-template-amp-ps-"$VERSION".zip \
.genreleases/spec-kit-template-shai-sh-"$VERSION".zip \
.genreleases/spec-kit-template-shai-ps-"$VERSION".zip \
.genreleases/spec-kit-template-tabnine-sh-"$VERSION".zip \
.genreleases/spec-kit-template-tabnine-ps-"$VERSION".zip \
.genreleases/spec-kit-template-q-sh-"$VERSION".zip \
.genreleases/spec-kit-template-q-ps-"$VERSION".zip \
.genreleases/spec-kit-template-bob-sh-"$VERSION".zip \
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/scripts/create-release-packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

.PARAMETER Agents
Comma or space separated subset of agents to build (default: all)
Valid agents: claude, gemini, copilot, cursor-agent, qwen, opencode, windsurf, codex, kilocode, auggie, roo, codebuddy, amp, q, bob, qoder
Valid agents: claude, gemini, copilot, cursor-agent, qwen, opencode, windsurf, codex, kilocode, auggie, roo, codebuddy, amp, q, bob, qoder, tabnine

.PARAMETER Scripts
Comma or space separated subset of script types to build (default: both)
Expand Down Expand Up @@ -347,6 +347,10 @@ function Build-Variant {
$cmdDir = Join-Path $baseDir ".qoder/commands"
Generate-Commands -Agent 'qoder' -Extension 'md' -ArgFormat '$ARGUMENTS' -OutputDir $cmdDir -ScriptVariant $Script
}
'tabnine' {
$cmdDir = Join-Path $baseDir ".tabnine/commands"
Generate-Commands -Agent 'tabnine' -Extension 'toml' -ArgFormat '{{args}}' -OutputDir $cmdDir -ScriptVariant $Script
}
}

# Create zip archive
Expand All @@ -356,7 +360,7 @@ function Build-Variant {
}

# Define all agents and scripts
$AllAgents = @('claude', 'gemini', 'copilot', 'cursor-agent', 'qwen', 'opencode', 'windsurf', 'codex', 'kilocode', 'auggie', 'roo', 'codebuddy', 'amp', 'q', 'bob', 'qoder')
$AllAgents = @('claude', 'gemini', 'copilot', 'cursor-agent', 'qwen', 'opencode', 'windsurf', 'codex', 'kilocode', 'auggie', 'roo', 'codebuddy', 'amp', 'q', 'bob', 'qoder', 'tabnine')
$AllScripts = @('sh', 'ps')

function Normalize-List {
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/scripts/create-release-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,16 @@ build_variant() {
bob)
mkdir -p "$base_dir/.bob/commands"
generate_commands bob md "\$ARGUMENTS" "$base_dir/.bob/commands" "$script" ;;
tabnine)
mkdir -p "$base_dir/.tabnine/commands"
generate_commands tabnine toml "{{args}}" "$base_dir/.tabnine/commands" "$script" ;;
esac
( cd "$base_dir" && zip -r "../spec-kit-template-${agent}-${script}-${NEW_VERSION}.zip" . )
echo "Created $GENRELEASES_DIR/spec-kit-template-${agent}-${script}-${NEW_VERSION}.zip"
}

# Determine agent list
ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai q bob qoder)
ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilocode auggie roo codebuddy amp shai q bob qoder tabnine)
ALL_SCRIPTS=(sh ps)

norm_list() {
Expand Down
178 changes: 178 additions & 0 deletions .github/workflows/tabnine-cli-cr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
name: "Tabnine: Code Review"
on:
pull_request:
types: [opened, synchronize, ready_for_review]

jobs:
code-review:
runs-on: ubuntu-latest
timeout-minutes: 30 # Prevent runaway jobs
# Only run on certain conditions
if: github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]' && github.actor != '[email protected]'
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Install Tabnine CLI
timeout-minutes: 10
run: |
export TABNINE_HOST=https://console.tabnine.com

# Download installer first, verify, then execute
curl -fsSL "$TABNINE_HOST/update/cli/installer.mjs" -o installer.mjs

node installer.mjs "$TABNINE_HOST"

# Verify installation succeeded
if [ ! -f ~/.local/bin/tabnine ]; then
echo "Error: Tabnine CLI installation failed"
exit 1
fi

- name: Configure git
run: |
git config user.name "Tabnine CLI Agent"
git config user.email "[email protected]"

- name: Configure Tabnine Auth & Settings
env:
TABNINE_KEY: ${{ secrets.TABNINE_KEY }}
run: |
# Validate TABNINE_KEY secret
if [ -z "$TABNINE_KEY" ]; then
echo "Error: Required authentication secret is not configured"
exit 1
fi

mkdir -p ~/.tabnine/agent

# Write Settings
cat << 'EOF' > ~/.tabnine/agent/settings.json
{
"general": {
"tabnineHost": "https://console.tabnine.com"
},
"security": {
"auth": {
"selectedType": "tabnine-personal"
}
}
}
EOF

# Write Credentials securely with error handling
if ! printf "%s" "$TABNINE_KEY" > ~/.tabnine/agent/tabnine_creds.json; then
echo "Error: Failed to write credentials"
exit 1
fi

chmod 600 ~/.tabnine/agent/tabnine_creds.json

- name: Authenticate GitHub CLI
run: |
gh auth login --with-token <<< ${{ github.token }}

- name: Code Review
timeout-minutes: 25
run: |
~/.local/bin/tabnine -y -p "## 1. Persona & Context
You are a Senior Software Engineer performing a rigorous code review for the this project.
Your goal is to ensure the codebase remains high-quality, maintainable, and secure.

## 2. Environment & Tools
You are running in a GitHub Actions CI environment with full access to the shell and the pre-authenticated 'gh' CLI.
- Repository: ${{ github.repository }}
- PR Number: ${{ github.event.pull_request.number }}
- PR Head SHA: ${{ github.event.pull_request.head.sha }}
- PR Base SHA: ${{ github.event.pull_request.base.sha }}

## 3. Operational Procedure

### Phase A: Understanding the Change
1. Execute 'gh pr view --json title,body,comments' to understand the intent.
2. Execute 'gh pr diff' to examine the implementation.

### Phase B: Check Existing Comments
1. Get existing comments: 'gh pr view --json comments'
2. If a previously reported issue appears fixed, reply with a resolved comment.

### Phase C: Engineering Audit
Evaluate the code against these Software Engineering pillars:

**Correctness & Logic**: Does the code solve the problem? Are there edge cases, off-by-one errors, or race conditions?

**Maintainability & Readability**: Are names self-explanatory? Is the code simple and modular? Are complex parts documented?

**Security & Reliability**: Are inputs sanitized? Are secrets exposed? Does error handling fail safely?

**Performance**: Are there unnecessary allocations or blocking operations?

**Project Specifics**: Cross-platform paths (Windows/Linux), backward compatibility with config files.

## 4. Comment Value Threshold (CRITICAL FILTER)

Before posting ANY comment, it MUST pass ALL of these criteria:

**DO comment if the issue:**
- Introduces a bug, security vulnerability, or data loss risk
- Breaks backward compatibility or cross-platform support
- Causes performance regression or memory leak
- Violates critical project patterns (e.g., error handling, path handling)
- Makes the code significantly harder to maintain or debug

**DO NOT comment on:**
- Style preferences unless they harm readability (e.g., variable naming is fine unless truly confusing)
- Minor optimizations that don't impact real-world performance
- Suggestions to 'improve' code that is already clear and working
- Nitpicks about formatting, spacing, or trivial refactoring opportunities
- Personal preferences about code structure when existing approach is valid
- Educational comments explaining what the code does (assume the author understands their code)

**Golden Rule**: If removing your comment would NOT increase the risk of bugs, security issues, or maintenance problems, DO NOT POST IT.

### Phase D: Inline Comments

For each potential issue from Phase C:
1. Apply the Comment Value Threshold filter above
2. If it passes the filter, verify:
- The file exists in the diff output
- The line number is within changed lines
- No duplicate feedback exists on nearby lines
3. Only then submit the comment

Submit inline comments using:

For SINGLE-LINE comments:
gh api --method POST -H 'Accept: application/vnd.github+json' /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/comments -f body='YOUR_COMMENT' -f commit_id='${{ github.event.pull_request.head.sha }}' -f path='FILE_PATH' -F line=LINE_NUMBER -f side='RIGHT'

For MULTI-LINE comments:
gh api --method POST -H 'Accept: application/vnd.github+json' /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/comments -f body='YOUR_COMMENT' -f commit_id='${{ github.event.pull_request.head.sha }}' -f path='FILE_PATH' -F start_line=START_LINE_NUMBER -f start_side='RIGHT' -F line=END_LINE_NUMBER -f side='RIGHT'

**Code Suggestions**: Use GitHub's suggestion syntax ONLY when the fix is clear, unambiguous, and replaces 10 or fewer lines:
```suggestion
// Your replacement code
```

For larger changes or context-dependent fixes, provide guidance as a regular comment without the suggestion block.

### Phase E: Final Summary
After submitting inline comments (or if zero comments were posted), post a holistic summary:

gh pr review --comment -b 'YOUR_SUMMARY'

Your summary must:
- Acknowledge what the PR accomplishes
- Note any critical issues found (or state 'No critical issues identified')
- Be concise

## 5. Tone Guidelines
- Constructive: Suggest improvements or alternatives.
- Objective: Focus on code, not author.
- Professional: Use clear, concise language.
- High Signal: Only comment when it genuinely helps prevent problems."
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Specify supports multiple AI agents by generating agent-specific command files a
| **Amazon Q Developer CLI** | `.amazonq/prompts/` | Markdown | `q` | Amazon Q Developer CLI |
| **Amp** | `.agents/commands/` | Markdown | `amp` | Amp CLI |
| **SHAI** | `.shai/commands/` | Markdown | `shai` | SHAI CLI |
| **Tabnine CLI** | `.tabnine/commands/` | TOML | `tabnine` | Tabnine CLI |
| **IBM Bob** | `.bob/commands/` | Markdown | N/A (IDE-based) | IBM Bob IDE |

### Step-by-Step Integration Guide
Expand Down Expand Up @@ -316,6 +317,7 @@ Require a command-line tool to be installed:
- **Qoder CLI**: `qoder` CLI
- **Amp**: `amp` CLI
- **SHAI**: `shai` CLI
- **Tabnine CLI**: `tabnine` CLI

### IDE-Based Agents

Expand Down Expand Up @@ -354,7 +356,7 @@ Command content with {SCRIPT} and $ARGUMENTS placeholders.

### TOML Format

Used by: Gemini, Qwen
Used by: Gemini, Qwen, Tabnine

```toml
description = "Command description"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ Want to see Spec Kit in action? Watch our [video overview](https://www.youtube.c
| [Qwen Code](https://github.com/QwenLM/qwen-code) | ✅ | |
| [Roo Code](https://roocode.com/) | ✅ | |
| [SHAI (OVHcloud)](https://github.com/ovh/shai) | ✅ | |
| [Tabnine CLI](https://github.com/codota/tabnine-cli) | ✅ | |
| [Windsurf](https://windsurf.com/) | ✅ | |

## 🔧 Specify CLI Reference
Expand Down
15 changes: 12 additions & 3 deletions scripts/bash/update-agent-context.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
#
# 5. Multi-Agent Support
# - Handles agent-specific file paths and naming conventions
# - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf, Kilo Code, Auggie CLI, Roo Code, CodeBuddy CLI, Qoder CLI, Amp, SHAI, or Amazon Q Developer CLI
# - Supports: Claude, Gemini, Copilot, Cursor, Qwen, opencode, Codex, Windsurf, Kilo Code, Auggie CLI, Roo Code, CodeBuddy CLI, Qoder CLI, Amp, SHAI, Tabnine CLI, or Amazon Q Developer CLI
# - Can update single agents or all existing agent files
# - Creates default Claude file if no agent files exist
#
# Usage: ./update-agent-context.sh [agent_type]
# Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|shai|q|bob|qoder
# Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|shai|tabnine|q|bob|qoder
# Leave empty to update all existing agent files

set -e
Expand Down Expand Up @@ -73,6 +73,7 @@ CODEBUDDY_FILE="$REPO_ROOT/CODEBUDDY.md"
QODER_FILE="$REPO_ROOT/QODER.md"
AMP_FILE="$REPO_ROOT/AGENTS.md"
SHAI_FILE="$REPO_ROOT/SHAI.md"
TABNINE_FILE="$REPO_ROOT/TABNINE.md"
Q_FILE="$REPO_ROOT/AGENTS.md"
BOB_FILE="$REPO_ROOT/AGENTS.md"

Expand Down Expand Up @@ -627,6 +628,9 @@ update_specific_agent() {
shai)
update_agent_file "$SHAI_FILE" "SHAI"
;;
tabnine)
update_agent_file "$TABNINE_FILE" "Tabnine CLI"
;;
q)
update_agent_file "$Q_FILE" "Amazon Q Developer CLI"
;;
Expand All @@ -635,7 +639,7 @@ update_specific_agent() {
;;
*)
log_error "Unknown agent type '$agent_type'"
log_error "Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|amp|shai|q|bob|qoder"
log_error "Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|amp|shai|tabnine|q|bob|qoder"
exit 1
;;
esac
Expand Down Expand Up @@ -705,6 +709,11 @@ update_all_existing_agents() {
found_agent=true
fi

if [[ -f "$TABNINE_FILE" ]]; then
update_agent_file "$TABNINE_FILE" "Tabnine CLI"
found_agent=true
fi

if [[ -f "$QODER_FILE" ]]; then
update_agent_file "$QODER_FILE" "Qoder CLI"
found_agent=true
Expand Down
9 changes: 6 additions & 3 deletions scripts/powershell/update-agent-context.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Mirrors the behavior of scripts/bash/update-agent-context.sh:
2. Plan Data Extraction
3. Agent File Management (create from template or update existing)
4. Content Generation (technology stack, recent changes, timestamp)
5. Multi-Agent Support (claude, gemini, copilot, cursor-agent, qwen, opencode, codex, windsurf, kilocode, auggie, roo, codebuddy, amp, shai, q, bob, qoder)
5. Multi-Agent Support (claude, gemini, copilot, cursor-agent, qwen, opencode, codex, windsurf, kilocode, auggie, roo, codebuddy, amp, shai, tabnine, q, bob, qoder)

.PARAMETER AgentType
Optional agent key to update a single agent. If omitted, updates all existing agent files (creating a default Claude file if none exist).
Expand All @@ -25,7 +25,7 @@ Relies on common helper functions in common.ps1
#>
param(
[Parameter(Position=0)]
[ValidateSet('claude','gemini','copilot','cursor-agent','qwen','opencode','codex','windsurf','kilocode','auggie','roo','codebuddy','amp','shai','q','bob','qoder')]
[ValidateSet('claude','gemini','copilot','cursor-agent','qwen','opencode','codex','windsurf','kilocode','auggie','roo','codebuddy','amp','shai','tabnine','q','bob','qoder')]
[string]$AgentType
)

Expand Down Expand Up @@ -58,6 +58,7 @@ $CODEBUDDY_FILE = Join-Path $REPO_ROOT 'CODEBUDDY.md'
$QODER_FILE = Join-Path $REPO_ROOT 'QODER.md'
$AMP_FILE = Join-Path $REPO_ROOT 'AGENTS.md'
$SHAI_FILE = Join-Path $REPO_ROOT 'SHAI.md'
$TABNINE_FILE = Join-Path $REPO_ROOT 'TABNINE.md'
$Q_FILE = Join-Path $REPO_ROOT 'AGENTS.md'
$BOB_FILE = Join-Path $REPO_ROOT 'AGENTS.md'

Expand Down Expand Up @@ -386,9 +387,10 @@ function Update-SpecificAgent {
'qoder' { Update-AgentFile -TargetFile $QODER_FILE -AgentName 'Qoder CLI' }
'amp' { Update-AgentFile -TargetFile $AMP_FILE -AgentName 'Amp' }
'shai' { Update-AgentFile -TargetFile $SHAI_FILE -AgentName 'SHAI' }
'tabnine' { Update-AgentFile -TargetFile $TABNINE_FILE -AgentName 'Tabnine CLI' }
'q' { Update-AgentFile -TargetFile $Q_FILE -AgentName 'Amazon Q Developer CLI' }
'bob' { Update-AgentFile -TargetFile $BOB_FILE -AgentName 'IBM Bob' }
default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|q|bob|qoder'; return $false }
default { Write-Err "Unknown agent type '$Type'"; Write-Err 'Expected: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|q|bob|qoder'; return $false }
}
}

Expand All @@ -408,6 +410,7 @@ function Update-AllExistingAgents {
if (Test-Path $CODEBUDDY_FILE) { if (-not (Update-AgentFile -TargetFile $CODEBUDDY_FILE -AgentName 'CodeBuddy CLI')) { $ok = $false }; $found = $true }
if (Test-Path $QODER_FILE) { if (-not (Update-AgentFile -TargetFile $QODER_FILE -AgentName 'Qoder CLI')) { $ok = $false }; $found = $true }
if (Test-Path $SHAI_FILE) { if (-not (Update-AgentFile -TargetFile $SHAI_FILE -AgentName 'SHAI')) { $ok = $false }; $found = $true }
if (Test-Path $TABNINE_FILE) { if (-not (Update-AgentFile -TargetFile $TABNINE_FILE -AgentName 'Tabnine CLI')) { $ok = $false }; $found = $true }
if (Test-Path $Q_FILE) { if (-not (Update-AgentFile -TargetFile $Q_FILE -AgentName 'Amazon Q Developer CLI')) { $ok = $false }; $found = $true }
if (Test-Path $BOB_FILE) { if (-not (Update-AgentFile -TargetFile $BOB_FILE -AgentName 'IBM Bob')) { $ok = $false }; $found = $true }
if (-not $found) {
Expand Down
Loading