takomi 2.1.13 → 2.1.15

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.
Files changed (39) hide show
  1. package/.pi/agents/architect.md +73 -73
  2. package/.pi/agents/coder.md +70 -70
  3. package/.pi/agents/designer.md +72 -72
  4. package/.pi/agents/orchestrator.md +122 -122
  5. package/.pi/agents/reviewer.md +71 -71
  6. package/.pi/extensions/oauth-router/provider.ts +3 -1
  7. package/.pi/extensions/takomi-context-manager/config.ts +48 -48
  8. package/.pi/extensions/takomi-context-manager/context-router.ts +57 -57
  9. package/.pi/extensions/takomi-context-manager/diagnostics-tools.ts +28 -28
  10. package/.pi/extensions/takomi-context-manager/diagnostics.ts +55 -55
  11. package/.pi/extensions/takomi-context-manager/extension-conflicts.ts +56 -56
  12. package/.pi/extensions/takomi-context-manager/index.ts +56 -56
  13. package/.pi/extensions/takomi-context-manager/model-policy-gate.ts +228 -206
  14. package/.pi/extensions/takomi-context-manager/policy-registry.ts +97 -97
  15. package/.pi/extensions/takomi-context-manager/policy-tools.ts +35 -35
  16. package/.pi/extensions/takomi-context-manager/prerequisite-gates.ts +39 -39
  17. package/.pi/extensions/takomi-context-manager/prompt-rewriter.ts +100 -100
  18. package/.pi/extensions/takomi-context-manager/skill-registry.ts +87 -87
  19. package/.pi/extensions/takomi-context-manager/skill-tools.ts +80 -80
  20. package/.pi/extensions/takomi-context-manager/state.ts +68 -68
  21. package/.pi/extensions/takomi-context-manager/types.ts +77 -77
  22. package/.pi/extensions/takomi-runtime/command-text.ts +10 -2
  23. package/.pi/extensions/takomi-runtime/commands.ts +78 -5
  24. package/.pi/extensions/takomi-runtime/routing-policy.ts +187 -145
  25. package/.pi/extensions/takomi-subagents/native-render.ts +41 -41
  26. package/.pi/extensions/takomi-subagents/pi-subagents-internal.ts +35 -32
  27. package/.pi/extensions/takomi-subagents/run-types.ts +25 -25
  28. package/.pi/prompts/build-prompt.md +259 -259
  29. package/.pi/prompts/design-prompt.md +95 -95
  30. package/.pi/prompts/genesis-prompt.md +140 -140
  31. package/.pi/prompts/prime-prompt.md +110 -110
  32. package/.pi/themes/takomi-aurora.json +88 -88
  33. package/README.md +2 -4
  34. package/assets/.agent/skills/21st-dev-components/SKILL.md +244 -244
  35. package/assets/.agent/skills/anti-gravity/SKILL.md +112 -0
  36. package/assets/.agent/skills/gemini/SKILL.md +14 -223
  37. package/assets/.agent/skills/git-commit-generation/SKILL.md +195 -0
  38. package/package.json +1 -1
  39. package/src/pi-takomi-core/validation.ts +135 -135
@@ -1,223 +1,14 @@
1
- ---
2
- name: gemini
3
- description: Use when the user asks to run Gemini CLI for code review, plan review, or big context (>200k) processing. Ideal for comprehensive analysis requiring large context windows. Uses Gemini 3 Pro by default for state-of-the-art reasoning and coding.
4
- ---
5
-
6
- # Gemini Skill Guide
7
-
8
- ## When to Use Gemini
9
- - WHEN ASKED TO BE ACTIVATED
10
- - **Code Review**: Comprehensive code reviews across multiple files
11
- - **Plan Review**: Analyzing architectural plans, technical specifications, or project roadmaps
12
- - **Big Context Processing**: Tasks requiring >200k tokens of context (entire codebases, documentation sets)
13
- - **Multi-file Analysis**: Understanding relationships and patterns across many files
14
-
15
- ## ⚠️ Critical: Background/Non-Interactive Mode Warning
16
-
17
- **NEVER use `--approval-mode default` in background or non-interactive shells** (like Claude Code tool calls). It will hang indefinitely waiting for approval prompts that cannot be provided.
18
-
19
- **For automated/background reviews:**
20
- - ✅ Use `--approval-mode yolo` for fully automated execution
21
- - ✅ OR wrap with timeout: `timeout 300 gemini ...`
22
- - ❌ NEVER use `--approval-mode default` without interactive terminal
23
-
24
- **Symptoms of hung Gemini:**
25
- - Process running 20+ minutes with 0% CPU usage
26
- - No network activity
27
- - Process state shows 'S' (sleeping)
28
-
29
- **Fix hung process:**
30
- ```bash
31
- # Check if hung
32
- ps aux | grep gemini | grep -v grep
33
-
34
- # Kill if necessary
35
- pkill -9 -f "gemini.*gemini-3-pro-preview"
36
- ```
37
-
38
- ## Running a Task
39
-
40
- 1. Ask the user (via `AskUserQuestion`) which model to use in a **single prompt**. Available models:
41
- - `gemini-3-pro-preview` ⭐ (flagship model, best for coding & complex reasoning, 35% better at software engineering than 2.5 Pro)
42
- - `gemini-3-flash` (sub-second latency, distilled from 3 Pro, best for speed-critical tasks)
43
- - `gemini-2.5-pro` (legacy option, strong all-around performance)
44
- - `gemini-2.5-flash` (legacy option, cost-efficient with thinking capabilities)
45
- - `gemini-2.5-flash-lite` (legacy option, fastest processing)
46
-
47
- 2. Select the approval mode based on the task:
48
- - `default`: Prompt for approval (⚠️ ONLY for interactive terminal sessions)
49
- - `auto_edit`: Auto-approve edit tools only (for code reviews with suggestions)
50
- - `yolo`: Auto-approve all tools (✅ REQUIRED for background/automated tasks)
51
-
52
- 3. Assemble the command with appropriate options:
53
- - `-m, --model <MODEL>` - Model selection
54
- - `--approval-mode <default|auto_edit|yolo>` - Control tool approval
55
- - `-y, --yolo` - Alternative to `--approval-mode yolo`
56
- - `-i, --prompt-interactive "prompt"` - Execute prompt and continue interactively
57
- - `--include-directories <DIR>` - Additional directories to include in workspace
58
- - `-s, --sandbox` - Run in sandbox mode for isolation
59
-
60
- 4. **For background/automated tasks, ALWAYS use `--approval-mode yolo`** or add timeout wrapper. NEVER use `default` in non-interactive shells.
61
-
62
- 5. Run the command and capture the output. For background/automated mode:
63
- ```bash
64
- # Recommended: Use yolo for background tasks
65
- gemini -m gemini-3-pro-preview --approval-mode yolo "Review this codebase for security issues"
66
-
67
- # Or with timeout (5 min limit)
68
- timeout 300 gemini -m gemini-3-pro-preview --approval-mode yolo "Review this codebase"
69
- ```
70
-
71
- 6. For interactive sessions with an initial prompt:
72
- ```bash
73
- gemini -m gemini-3-pro-preview -i "Review the authentication system" --approval-mode auto_edit
74
- ```
75
-
76
- 7. **After Gemini completes**, inform the user: "The Gemini analysis is complete. You can start a new Gemini session for follow-up analysis or continue exploring the findings."
77
-
78
- ### Quick Reference
79
-
80
- | Use case | Approval mode | Key flags |
81
- | --- | --- | --- |
82
- | Background code review | `yolo` ✅ | `-m gemini-3-pro-preview --approval-mode yolo` |
83
- | Background analysis | `yolo` ✅ | `-m gemini-3-pro-preview --approval-mode yolo` |
84
- | Background with timeout | `yolo` ✅ | `timeout 300 gemini -m gemini-3-pro-preview --approval-mode yolo` |
85
- | Interactive code review | `default` | `-m gemini-3-pro-preview --approval-mode default` (interactive terminal only) |
86
- | Code review with auto-edits | `auto_edit` | `-m gemini-3-pro-preview --approval-mode auto_edit` |
87
- | Automated refactoring | `yolo` | `-m gemini-3-pro-preview --approval-mode yolo` |
88
- | Speed-critical background | `yolo` ✅ | `-m gemini-3-flash --approval-mode yolo` |
89
- | Cost-optimized background | `yolo` ✅ | `-m gemini-2.5-flash --approval-mode yolo` |
90
- | Multi-directory analysis | `yolo` (if background) | `--include-directories <DIR1> --include-directories <DIR2>` |
91
- | Interactive with prompt | `auto_edit` or `default` | `-i "prompt" --approval-mode <mode>` |
92
-
93
- ### Model Selection Guide
94
-
95
- | Model | Best for | Context window | Key features |
96
- | --- | --- | --- | --- |
97
- | `gemini-3-pro-preview` ⭐ | **Flagship model**: Complex reasoning, coding, agentic tasks | 1M input / 64k output | Vibe coding, 76.2% SWE-bench, $2-4/M input |
98
- | `gemini-3-flash` | Sub-second latency, speed-critical applications | 1M input / 64k output | Distilled from 3 Pro, TPU-optimized |
99
- | `gemini-2.5-pro` | Legacy: Strong all-around performance | 1M input / 65k output | Thinking mode, mature stability |
100
- | `gemini-2.5-flash` | Legacy: Cost-efficient, high-volume tasks | 1M input / 65k output | Best price ($0.15/M), thinking mode |
101
- | `gemini-2.5-flash-lite` | Legacy: Fastest processing, high throughput | 1M input / 65k output | Maximum speed, minimal latency |
102
-
103
- **Gemini 3 Advantages**: 35% higher accuracy in software engineering, state-of-the-art on SWE-bench (76.2%), GPQA Diamond (91.9%), and WebDev Arena (1487 Elo). Knowledge cutoff: January 2025.
104
-
105
- **Coming Soon**: `gemini-3-deep-think` for ultra-complex reasoning with enhanced thinking capabilities.
106
-
107
- ## Common Use Cases
108
-
109
- ### Code Review (Background/Automated)
110
- ```bash
111
- # For background execution (Claude Code, CI/CD, etc.)
112
- gemini -m gemini-3-pro-preview --approval-mode yolo \
113
- "Perform a comprehensive code review focusing on:
114
- 1. Security vulnerabilities
115
- 2. Performance issues
116
- 3. Code quality and maintainability
117
- 4. Best practices violations"
118
-
119
- # With timeout safety (5 minutes)
120
- timeout 300 gemini -m gemini-3-pro-preview --approval-mode yolo \
121
- "Perform a comprehensive code review..."
122
- ```
123
-
124
- ### Plan Review (Background/Automated)
125
- ```bash
126
- # For background execution
127
- gemini -m gemini-3-pro-preview --approval-mode yolo \
128
- "Review this architectural plan for:
129
- 1. Scalability concerns
130
- 2. Missing components
131
- 3. Integration challenges
132
- 4. Alternative approaches"
133
- ```
134
-
135
- ### Big Context Analysis (Background/Automated)
136
- ```bash
137
- # For background execution
138
- gemini -m gemini-3-pro-preview --approval-mode yolo \
139
- "Analyze the entire codebase to understand:
140
- 1. Overall architecture
141
- 2. Key patterns and conventions
142
- 3. Potential technical debt
143
- 4. Refactoring opportunities"
144
- ```
145
-
146
- ### Interactive Code Review (Terminal Only)
147
- ```bash
148
- # ONLY use default mode in interactive terminal
149
- gemini -m gemini-3-pro-preview --approval-mode default \
150
- "Review the authentication flow for security issues"
151
- ```
152
-
153
- ## Following Up
154
-
155
- - Gemini CLI sessions are typically one-shot or interactive. Unlike Codex, there's no built-in resume functionality.
156
- - For follow-up analysis, start a new Gemini session with context from previous findings.
157
- - When proposing follow-up actions, restate the chosen model and approval mode.
158
- - Use `AskUserQuestion` after each Gemini command to confirm next steps or gather clarifications.
159
-
160
- ## Error Handling
161
-
162
- - Stop and report failures whenever `gemini --version` or a Gemini command exits non-zero.
163
- - Request direction before retrying failed commands.
164
- - Before using high-impact flags (`--approval-mode yolo`, `-y`, `--sandbox`), ask the user for permission using `AskUserQuestion` unless already granted.
165
- - When output includes warnings or partial results, summarize them and ask how to adjust using `AskUserQuestion`.
166
-
167
- ## Troubleshooting Hung Gemini Processes
168
-
169
- ### Detection
170
- ```bash
171
- # Check for hung processes
172
- ps aux | grep -E "gemini.*gemini-3" | grep -v grep
173
-
174
- # Look for these symptoms:
175
- # - Process running 20+ minutes
176
- # - CPU usage at 0%
177
- # - Process state 'S' (sleeping)
178
- # - No network connections
179
- ```
180
-
181
- ### Diagnosis
182
- ```bash
183
- # Get detailed process info
184
- ps -o pid,etime,pcpu,stat,command -p <PID>
185
-
186
- # Check network activity
187
- lsof -p <PID> 2>/dev/null | grep -E "(TCP|ESTABLISHED)" | wc -l
188
- # If result is 0, process is hung
189
- ```
190
-
191
- ### Resolution
192
- ```bash
193
- # Kill hung Gemini processes
194
- pkill -9 -f "gemini.*gemini-3-pro-preview"
195
-
196
- # Or kill specific PID
197
- kill -9 <PID>
198
-
199
- # Verify cleanup
200
- ps aux | grep gemini | grep -v grep
201
- ```
202
-
203
- ### Prevention
204
- - **ALWAYS use `--approval-mode yolo` for background/automated tasks**
205
- - Add timeout wrapper for safety: `timeout 300 gemini ...`
206
- - Never use `--approval-mode default` in non-interactive shells
207
- - Monitor first run with `ps` to ensure process completes
208
-
209
- ## Tips for Large Context Processing
210
-
211
- 1. **Be specific**: Provide clear, structured prompts for what to analyze
212
- 2. **Use include-directories**: Explicitly specify all relevant directories
213
- 3. **Choose the right model**:
214
- - Use `gemini-3-pro-preview` for complex reasoning, coding tasks, and maximum analysis quality (recommended default)
215
- - Use `gemini-3-flash` for speed-critical tasks requiring sub-second response times
216
- - Use `gemini-2.5-flash` for cost-optimized high-volume processing
217
- 4. **Leverage Gemini 3's strengths**: 35% better at software engineering tasks, exceptional at agentic workflows and vibe coding
218
- 5. **Break down complex tasks**: Even with large context, structured analysis is more effective
219
- 6. **Save findings**: Ask Gemini to output structured reports that can be saved for reference
220
-
221
- ## CLI Version
222
-
223
- Requires Gemini CLI v0.16.0 or later for Gemini 3 model support. Check version: `gemini --version`
1
+ ---
2
+ name: gemini
3
+ description: Deprecated legacy skill retained for compatibility only. Use `anti-gravity` instead.
4
+ ---
5
+
6
+ # Deprecated: Gemini Skill
7
+
8
+ This skill is deprecated.
9
+
10
+ ## Replacement
11
+ Use `assets/.agent/skills/anti-gravity/SKILL.md` for all Gemini-like CLI workflows via `agy`.
12
+
13
+ ## Historical Note
14
+ The old Gemini CLI workflow has been superseded by Anti-Gravity. Future guidance should reference Anti-Gravity only.
@@ -0,0 +1,195 @@
1
+ ---
2
+ name: git-commit-generation
3
+ description: "Automatically generate meaningful git commit messages based on staged changes."
4
+ ---
5
+
6
+ # Generate Commit Messages
7
+
8
+ > [!NOTE]
9
+ > This skill is based on the **Kilo Code** Git Commit Generation feature.
10
+ > **Attribution**: Originally from the [Kilo Code Repository](https://github.com/Kilo-Org/kilocode/blob/main/packages/kilo-docs/pages/code-with-ai/features/git-commit-generation.md).
11
+
12
+ Generate descriptive commit messages automatically based on your staged git changes. Kilo Code analyzes your staged files and creates conventional commit messages that follow best practices.
13
+
14
+ {% callout type="info" %}
15
+ This feature only analyzes **staged changes**. Make sure to stage your files using `git add` or via `VS Code` interface before generating commit messages.
16
+ {% /callout %}
17
+
18
+ ## How It Works
19
+
20
+ The git commit message generator:
21
+
22
+ - Analyzes only your **staged changes** (not unstaged or untracked files)
23
+ - Uses AI to understand the context and purpose of your changes
24
+ - Creates descriptive commit messages that explain what was changed and why following the [Conventional Commits](https://www.conventionalcommits.org/) (by default, customizable)
25
+
26
+ ## Using the Feature
27
+
28
+ ### Generating a Commit Message
29
+
30
+ 1. Stage your changes using `git add` or the VS Code git interface
31
+ 2. In the VS Code Source Control panel, look for the `Kilo Code` logo next to the commit message field)
32
+ 3. Click the logo to generate a commit message
33
+
34
+ The generated message will appear in the commit message field, ready for you to review and modify if needed.
35
+
36
+ {% image src="/docs/img/git-commit-generation/git-commit-1.png" alt="Generated commit message example" width="600" /%}
37
+
38
+ ### Conventional Commit Format
39
+
40
+ By default, generated messages follow the Conventional Commits specification:
41
+
42
+ ```
43
+ <type>(<scope>): <description>
44
+
45
+ <body>
46
+ ```
47
+
48
+ Common types include:
49
+
50
+ - `feat`: New features
51
+ - `fix`: Bug fixes
52
+ - `docs`: Documentation changes
53
+ - `style`: Code style changes (formatting, etc.)
54
+ - `refactor`: Code refactoring
55
+ - `test`: Adding or updating tests
56
+ - `chore`: Maintenance tasks
57
+
58
+ ## Configuration
59
+
60
+ {% tabs %}
61
+ {% tab label="VSCode" %}
62
+
63
+ The extension provides the same **SCM button** in the VS Code Source Control panel. Clicking it generates a commit message using the CLI backend's commit message generation API.
64
+
65
+ Configuration is handled through the extension's settings or the shared `kilo.jsonc` config file.
66
+
67
+ Customize the commit prompt from **Settings > Commit Message**. Kilo saves this prompt to the current project's config so each repository can follow its own commit conventions without changing your global settings.
68
+
69
+ You can also set it directly in the project config:
70
+
71
+ ```json
72
+ {
73
+ "commit_message": {
74
+ "prompt": "Write concise conventional commits with the package scope when possible."
75
+ }
76
+ }
77
+ ```
78
+
79
+ {% callout type="info" %}
80
+ Git commit message generation is a **VS Code extension feature**. It is not available in the CLI/TUI.
81
+ {% /callout %}
82
+
83
+ {% /tab %}
84
+ {% tab label="VSCode (Legacy)" %}
85
+
86
+ ### Customizing the Commit Template
87
+
88
+ You can customize how commit messages are generated by modifying the prompt template:
89
+
90
+ 1. Open Settings by clicking the gear icon {% codicon name="gear" /%} → `Prompts`
91
+ 2. Find the "Commit Message Generation" section
92
+ 3. Edit the `Prompt` template to match your project's conventions
93
+
94
+ {% image src="/docs/img/git-commit-generation/git-commit-2.png" alt="Commit message generation settings" width="600" /%}
95
+
96
+ The default template creates conventional commit messages, but you can modify it to:
97
+
98
+ - Use different commit message formats
99
+ - Include specific information relevant to your project
100
+ - Follow your team's commit message conventions
101
+ - Add custom instructions for the AI
102
+
103
+ ### API Configuration
104
+
105
+ You can configure which API profile to use for commit message generation:
106
+
107
+ 1. In the `Prompts` settings, scroll to "API Configuration"
108
+ 2. Select a specific profile or use the currently selected one
109
+
110
+ {% callout type="tip" %}
111
+ Consider creating a dedicated [API configuration profile](/docs/ai-providers) with a faster, more cost-effective model specifically for commit message generation.
112
+ {% /callout %}
113
+
114
+ {% /tab %}
115
+ {% /tabs %}
116
+
117
+ ## Best Practices
118
+
119
+ ### Staging Strategy
120
+
121
+ - Stage related changes together for more coherent commit messages
122
+ - Avoid staging unrelated changes in a single commit
123
+ - Use `git add -p` for partial file staging when needed
124
+
125
+ ### Message Review
126
+
127
+ - Always review generated messages before committing
128
+ - Edit messages to add context the AI might have missed
129
+ - Ensure the message accurately describes the changes
130
+
131
+ ### Custom Templates
132
+
133
+ - Tailor the prompt template to your project's needs
134
+ - Include project-specific terminology or conventions
135
+ - Add instructions for handling specific types of changes
136
+
137
+ ## Example Generated Messages
138
+
139
+ Here are examples of messages the feature might generate:
140
+
141
+ ```
142
+ feat(auth): add OAuth2 integration with Google
143
+
144
+ Implement Google OAuth2 authentication flow including:
145
+ - OAuth2 client configuration
146
+ - User profile retrieval
147
+ - Token refresh mechanism
148
+ ```
149
+
150
+ ```
151
+ fix(api): resolve race condition in user data fetching
152
+
153
+ Add proper error handling and retry logic to prevent
154
+ concurrent requests from causing data inconsistency
155
+ ```
156
+
157
+ ```
158
+ docs(readme): update installation instructions
159
+
160
+ Add missing dependency requirements and clarify
161
+ setup steps for new contributors
162
+ ```
163
+
164
+ ## Troubleshooting
165
+
166
+ ### No Staged Changes
167
+
168
+ If the button doesn't appear or generation fails, ensure you have staged changes:
169
+
170
+ ```bash
171
+ git add <files>
172
+ # or stage all changes
173
+ git add .
174
+ ```
175
+
176
+ ### Poor Message Quality
177
+
178
+ If generated messages aren't helpful:
179
+
180
+ - Review your staging strategy - don't stage unrelated changes together
181
+ - Customize the prompt template with more specific instructions
182
+ - Try a different AI model through API configuration
183
+
184
+ ### Integration Issues
185
+
186
+ The feature integrates with VS Code's built-in git functionality. If you encounter issues:
187
+
188
+ - Ensure your repository is properly initialized
189
+ - Check that VS Code can access your git repository
190
+ - Verify git is installed and accessible from VS Code
191
+
192
+ ## Related Features
193
+
194
+ - [API Configuration Profiles](/docs/ai-providers) - Use different models for commit generation
195
+ - [Settings Management](/docs/getting-started/settings) - Manage all your Kilo Code preferences
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "takomi",
3
- "version": "2.1.13",
3
+ "version": "2.1.15",
4
4
  "description": "🎯 Stop wrestling with AI. Start building with purpose. The artisan's toolkit for agent workflows, Codex skills, and original Takomi capabilities like 21st.dev integration.",
5
5
  "type": "module",
6
6
  "bin": {