gemiterm 2.0.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/README.md +32 -9
- package/package.json +13 -4
- package/src/cli/command-registry.ts +66 -62
- package/src/cli/commands/install-skills-command.ts +35 -0
- package/src/cli/index.ts +19 -44
- package/src/infrastructure/cli-parser.ts +77 -0
- package/src/services/skills-cli-driver.ts +58 -0
- package/src/services/skills-service.ts +52 -0
- package/.env +0 -2
- package/.github/workflows/manual-release.yml +0 -34
- package/.github/workflows/release.yml +0 -198
- package/.github/workflows/test.yml +0 -29
- package/.opencode/commands/opsx-apply.md +0 -152
- package/.opencode/commands/opsx-archive.md +0 -157
- package/.opencode/commands/opsx-explore.md +0 -169
- package/.opencode/commands/opsx-propose.md +0 -104
- package/.opencode/commands/opsx-sync.md +0 -140
- package/.opencode/commands/search-intelligently.md +0 -9
- package/.opencode/opencode.json +0 -20
- package/.opencode/skills/intellisearch/.version +0 -1
- package/.opencode/skills/intellisearch/SKILL.md +0 -84
- package/.opencode/skills/intellisearch/references/brave-search.md +0 -67
- package/.opencode/skills/intellisearch/references/ddg-search.md +0 -79
- package/.opencode/skills/intellisearch/references/deepwiki-tools.md +0 -246
- package/.opencode/skills/intellisearch/references/examples.md +0 -97
- package/.opencode/skills/intellisearch/references/gh-cli.md +0 -143
- package/.opencode/skills/intellisearch/references/google-search.md +0 -40
- package/.opencode/skills/intellisearch/references/search-workflow.md +0 -143
- package/.opencode/skills/intellisearch/references/workflow.md +0 -115
- package/.opencode/skills/openspec-apply-change/SKILL.md +0 -159
- package/.opencode/skills/openspec-archive-change/SKILL.md +0 -117
- package/.opencode/skills/openspec-explore/SKILL.md +0 -287
- package/.opencode/skills/openspec-propose/SKILL.md +0 -111
- package/.opencode/skills/openspec-sync-specs/SKILL.md +0 -147
- package/.serena/project.yml +0 -133
- package/AGENTS.md +0 -136
- package/CHANGELOG.md +0 -3
- package/bun.lock +0 -105
- package/docs/INSTALL.md +0 -185
- package/docs/PLAYWRIGHT_CLI_API.md +0 -306
- package/docs/python-release-for-reference.md +0 -175
- package/examples/sample_json_export.json +0 -32
- package/examples/sample_markdown_export.md +0 -221
- package/examples/usage_examples.sh +0 -222
- package/install.ps1 +0 -264
- package/install.sh +0 -275
- package/openspec/MAESTRO_MIGRATION.md +0 -180
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/design.md +0 -194
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/proposal.md +0 -52
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/specs/multi-profile-conversations/spec.md +0 -133
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/tasks.md +0 -95
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/design.md +0 -28
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/proposal.md +0 -22
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/specs/interactive-prompt-loop/spec.md +0 -35
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/tasks.md +0 -28
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/design.md +0 -323
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/proposal.md +0 -122
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/specs/no-capability-changes/spec.md +0 -29
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/tasks.md +0 -172
- package/openspec/changes/archive/2026-06-09-v2-install-migration/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-06-09-v2-install-migration/design.md +0 -241
- package/openspec/changes/archive/2026-06-09-v2-install-migration/proposal.md +0 -41
- package/openspec/changes/archive/2026-06-09-v2-install-migration/specs/v2-installer/spec.md +0 -205
- package/openspec/changes/archive/2026-06-09-v2-install-migration/tasks.md +0 -97
- package/openspec/changes/commander-cli-parser/.openspec.yaml +0 -2
- package/openspec/changes/commander-cli-parser/design.md +0 -107
- package/openspec/changes/commander-cli-parser/proposal.md +0 -31
- package/openspec/changes/commander-cli-parser/specs/cli/spec.md +0 -48
- package/openspec/changes/commander-cli-parser/tasks.md +0 -33
- package/openspec/changes/cross-platform-build-and-ci/.openspec.yaml +0 -2
- package/openspec/changes/cross-platform-build-and-ci/design.md +0 -213
- package/openspec/changes/cross-platform-build-and-ci/proposal.md +0 -50
- package/openspec/changes/cross-platform-build-and-ci/specs/path-and-file-mediation/spec.md +0 -335
- package/openspec/changes/cross-platform-build-and-ci/specs/release-pipeline/spec.md +0 -95
- package/openspec/changes/cross-platform-build-and-ci/tasks.md +0 -164
- package/openspec/config.yaml +0 -20
- package/openspec/specs/auth/spec.md +0 -394
- package/openspec/specs/cli/spec.md +0 -108
- package/openspec/specs/commands/spec.md +0 -409
- package/openspec/specs/configuration/spec.md +0 -130
- package/openspec/specs/conversations/spec.md +0 -139
- package/openspec/specs/domain-model/spec.md +0 -128
- package/openspec/specs/formatters/spec.md +0 -158
- package/openspec/specs/install-browser/spec.md +0 -146
- package/openspec/specs/interactive-prompt-loop/spec.md +0 -41
- package/openspec/specs/logger/spec.md +0 -71
- package/openspec/specs/mediator/spec.md +0 -72
- package/openspec/specs/multi-profile-conversations/spec.md +0 -145
- package/openspec/specs/path-utils/spec.md +0 -101
- package/openspec/specs/profiles/spec.md +0 -94
- package/openspec/specs/storage/spec.md +0 -198
- package/openspec/specs/testing/spec.md +0 -237
- package/openspec/specs/v2-installer/spec.md +0 -205
- package/openspec/specs/validators/spec.md +0 -65
- package/scripts/build.ts +0 -88
- package/scripts/clean-build.ps1 +0 -4
- package/scripts/clean-build.sh +0 -5
- package/scripts/install-browser.ps1 +0 -5
- package/scripts/install-browser.sh +0 -6
- package/scripts/lint-path-mediation.ps1 +0 -65
- package/scripts/lint-path-mediation.sh +0 -40
- package/tests/cli/auth-command.test.ts +0 -220
- package/tests/cli/command-registry.test.ts +0 -67
- package/tests/cli/continue-command.test.ts +0 -100
- package/tests/cli/delete-command.test.ts +0 -128
- package/tests/cli/export-all-command.test.ts +0 -375
- package/tests/cli/install-browser-command.test.ts +0 -48
- package/tests/cli/list-command.test.ts +0 -179
- package/tests/cli/new-command.test.ts +0 -139
- package/tests/cli/status-command.test.ts +0 -106
- package/tests/core/query-handlers.test.ts +0 -187
- package/tests/fixtures/auth-fixtures.ts +0 -98
- package/tests/fixtures/chat-fixtures.ts +0 -87
- package/tests/infrastructure/cli-table.test.ts +0 -107
- package/tests/infrastructure/formatters.test.ts +0 -202
- package/tests/infrastructure/io.test.ts +0 -197
- package/tests/infrastructure/logger.test.ts +0 -74
- package/tests/infrastructure/storage.test.ts +0 -335
- package/tests/infrastructure/validators.test.ts +0 -67
- package/tests/integration/commands/auth.test.ts +0 -186
- package/tests/integration/commands/continue.test.ts +0 -130
- package/tests/integration/commands/delete.test.ts +0 -140
- package/tests/integration/commands/export.test.ts +0 -266
- package/tests/integration/commands/fetch.test.ts +0 -238
- package/tests/integration/commands/list.test.ts +0 -281
- package/tests/integration/commands/profile.test.ts +0 -258
- package/tests/integration/commands/status.test.ts +0 -223
- package/tests/integration/installer-script-shape.test.ts +0 -67
- package/tests/parity/compare-outputs.ts +0 -359
- package/tests/parity/test-commands-parity.ps1 +0 -82
- package/tests/parity/test-commands-parity.sh +0 -61
- package/tests/services/auth-service.test.ts +0 -315
- package/tests/services/cookie-monitor.test.ts +0 -229
- package/tests/services/cookie-storage-service.test.ts +0 -230
- package/tests/services/gemini-client-wrapper.test.ts +0 -688
- package/tests/services/install-browser-service.test.ts +0 -83
- package/tests/services/playwright-cli-driver.test.ts +0 -468
- package/tests/services/profile-auth-manager.test.ts +0 -334
- package/tests/services/profile-service.test.ts +0 -224
- package/tests/setup.ts +0 -95
- package/tests/smoke/smoke.test.ts +0 -52
- package/tests/unit/config.test.ts +0 -159
- package/tests/unit/errors.test.ts +0 -119
- package/tests/unit/formatters.test.ts +0 -316
- package/tests/unit/mediator.test.ts +0 -152
- package/tests/unit/path-utils.test.ts +0 -289
- package/tsconfig.json +0 -16
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
# DeepWiki Tools Reference
|
|
2
|
-
|
|
3
|
-
Complete reference for DeepWiki MCP server tools for repository documentation Q&A.
|
|
4
|
-
|
|
5
|
-
## MCP Configuration Requirement
|
|
6
|
-
|
|
7
|
-
DeepWiki MCP tools require configuration in `.opencode/opencode.json`:
|
|
8
|
-
|
|
9
|
-
```json
|
|
10
|
-
{
|
|
11
|
-
"mcp": {
|
|
12
|
-
"deepwiki": {
|
|
13
|
-
"type": "remote",
|
|
14
|
-
"url": "https://mcp.deepwiki.com/mcp",
|
|
15
|
-
"enabled": true
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
<critical_rules priority="highest">
|
|
22
|
-
<rule>Validate repo name against blocked list before calling</rule>
|
|
23
|
-
<rule>Use string for single repo: `repoName="owner/repo"`</rule>
|
|
24
|
-
<rule>Use array for multiple repos: `repoName=["owner1/repo1", "owner2/repo2"]` (2+ items)</rule>
|
|
25
|
-
<rule>NEVER use single-item array: `repoName=["owner/repo"]` (causes failure)</rule>
|
|
26
|
-
<rule>If deepwiki tools aren't available, use direct HTTP calls via `curl`. See Fallback section below.</rule>
|
|
27
|
-
<rule>"OpenCode" never refers to the archived and deprecated "opencode-ai/opencode" github repo. "OpenCode" always refers to "anomalyco/opencode" owned by "anomalyco" in github.</rule>
|
|
28
|
-
</critical_rules>
|
|
29
|
-
|
|
30
|
-
## Fallback: Missing DeepWiki MCP
|
|
31
|
-
|
|
32
|
-
When MCP tools are not configured, use direct HTTP calls via curl:
|
|
33
|
-
|
|
34
|
-
### ask_question
|
|
35
|
-
|
|
36
|
-
<bash_command name="ask_question">
|
|
37
|
-
```bash
|
|
38
|
-
curl -s -X POST https://mcp.deepwiki.com/mcp \
|
|
39
|
-
-H "Content-Type: application/json" \
|
|
40
|
-
-H "Accept: application/json, text/event-stream" \
|
|
41
|
-
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "ask_question", "arguments": {"repoName": "OWNER/REPO", "question": "YOUR_QUESTION"}}}' | grep -oP '(?<="text":")[^"]*' | sed 's/\\n/\n/g'
|
|
42
|
-
```
|
|
43
|
-
</bash_command>
|
|
44
|
-
|
|
45
|
-
### read_wiki_structure
|
|
46
|
-
|
|
47
|
-
<bash_command name="read_wiki_structure">
|
|
48
|
-
```bash
|
|
49
|
-
curl -s -X POST https://mcp.deepwiki.com/mcp \
|
|
50
|
-
-H "Content-Type: application/json" \
|
|
51
|
-
-H "Accept: application/json, text/event-stream" \
|
|
52
|
-
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "read_wiki_structure", "arguments": {"repoName": "OWNER/REPO"}}}' | grep -oP '(?<="text":")[^"]*' | sed 's/\\n/\n/g'
|
|
53
|
-
```
|
|
54
|
-
</bash_command>
|
|
55
|
-
|
|
56
|
-
### read_wiki_contents
|
|
57
|
-
|
|
58
|
-
<bash_command name="read_wiki_contents">
|
|
59
|
-
```bash
|
|
60
|
-
curl -s -X POST https://mcp.deepwiki.com/mcp \
|
|
61
|
-
-H "Content-Type: application/json" \
|
|
62
|
-
-H "Accept: application/json, text/event-stream" \
|
|
63
|
-
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "read_wiki_contents", "arguments": {"repoName": "OWNER/REPO"}}}' | grep -oP '(?<="text":")[^"]*' | sed 's/\\n/\n/g'
|
|
64
|
-
```
|
|
65
|
-
</bash_command>
|
|
66
|
-
|
|
67
|
-
### Critical Notes for Fallback Execution
|
|
68
|
-
|
|
69
|
-
<fallback_notes>
|
|
70
|
-
- **Argument Key**: Always use `repoName` (not `repo`)
|
|
71
|
-
- **Headers**: The `Accept` header must include `text/event-stream` or the server will reject the request
|
|
72
|
-
- **Output Parsing**: The `grep` and `sed` suffix is useful to extract clean text from the JSON-RPC stream but may sometimes need to be omitted.
|
|
73
|
-
</fallback_notes>
|
|
74
|
-
|
|
75
|
-
## Repository Name Validation
|
|
76
|
-
|
|
77
|
-
Before calling DeepWiki, validate that the repository name is legitimate and not a GitHub website path.
|
|
78
|
-
|
|
79
|
-
### Blocked First Segments
|
|
80
|
-
|
|
81
|
-
<blocked_owners>
|
|
82
|
-
Reject any `owner/repo` where the owner (first segment) matches these:
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
about, accelerator, apps, archiveprogram, blog, careers, changelog,
|
|
86
|
-
collections, community, contact, customer-stories, docs, enterprise,
|
|
87
|
-
events, explore, features, gist, github, github-apps, issues, login,
|
|
88
|
-
maintainers, marketplace, mcp, notifications, oauth-apps, orgs,
|
|
89
|
-
organizations, password_reset, press, pricing, pull_requests, pulls,
|
|
90
|
-
resources, security, securitylab, sessions, settings, site-policy,
|
|
91
|
-
skills, solutions, sponsors, support, team, topics, trending,
|
|
92
|
-
trust-center, whitepapers, why-github
|
|
93
|
-
```
|
|
94
|
-
</blocked_owners>
|
|
95
|
-
|
|
96
|
-
### Validation Rules
|
|
97
|
-
|
|
98
|
-
| Check | Rule | Example |
|
|
99
|
-
|-------|------|---------|
|
|
100
|
-
| Owner format | Alphanumeric, `-`, `_` only | `npm`, `node-js` ✅ |
|
|
101
|
-
| Repo format | Alphanumeric, `-`, `_`, `.` only | `node-semver`, `lib.js` ✅ |
|
|
102
|
-
| Not blocked | Owner not in blocked list | `npm/node-semver` ✅ |
|
|
103
|
-
| Blocked path | Owner in blocked list | `features/spark` ❌ |
|
|
104
|
-
|
|
105
|
-
### Examples
|
|
106
|
-
|
|
107
|
-
| Input | Verdict | Reason |
|
|
108
|
-
|-------|---------|--------|
|
|
109
|
-
| `npm/node-semver` | ✅ Valid | `npm` not blocked |
|
|
110
|
-
| `graphology/graphology` | ✅ Valid | `graphology` not blocked |
|
|
111
|
-
| `features/spark` | ❌ Invalid | `features` is GitHub product page |
|
|
112
|
-
| `topics/database` | ❌ Invalid | `topics` is GitHub topic page |
|
|
113
|
-
| `enterprise/startups` | ❌ Invalid | `enterprise` is GitHub marketing |
|
|
114
|
-
| `resources/articles` | ❌ Invalid | `resources` is GitHub content |
|
|
115
|
-
| `github/explore` | ❌ Invalid | `github` is org page, not repo |
|
|
116
|
-
| `site-policy/terms` | ❌ Invalid | `site-policy` is GitHub legal |
|
|
117
|
-
| `orgs/community` | ❌ Invalid | `orgs` is GitHub navigation |
|
|
118
|
-
|
|
119
|
-
## Available Tools
|
|
120
|
-
|
|
121
|
-
### deepWiki_read_wiki_structure
|
|
122
|
-
|
|
123
|
-
<tool name="deepWiki_read_wiki_structure">
|
|
124
|
-
<params>
|
|
125
|
-
- `repoName` (required): Repository in `owner/repo` format
|
|
126
|
-
</params>
|
|
127
|
-
<returns>List of available documentation sections and topics</returns>
|
|
128
|
-
<use_when>Exploring what documentation is available before asking specific questions</use_when>
|
|
129
|
-
</tool>
|
|
130
|
-
|
|
131
|
-
### deepWiki_read_wiki_contents
|
|
132
|
-
|
|
133
|
-
<tool name="deepWiki_read_wiki_contents">
|
|
134
|
-
<params>
|
|
135
|
-
- `repoName` (required): Repository in `owner/repo` format
|
|
136
|
-
</params>
|
|
137
|
-
<returns>Complete documentation content</returns>
|
|
138
|
-
<use_when>You need comprehensive documentation overview or when `ask_question` doesn't provide enough detail</use_when>
|
|
139
|
-
</tool>
|
|
140
|
-
|
|
141
|
-
### deepWiki_ask_question
|
|
142
|
-
|
|
143
|
-
<tool name="deepWiki_ask_question">
|
|
144
|
-
<params>
|
|
145
|
-
- `repoName` (required): Repository in `owner/repo` format
|
|
146
|
-
- **Single repo**: Use string: `"owner/repo"`
|
|
147
|
-
- **Multiple repos**: Use array: `["owner1/repo1", "owner2/repo2"]`
|
|
148
|
-
- **Critical**: Do not pass single-item array like `["owner/repo"]` for one repo
|
|
149
|
-
- `question` (required): Specific question about the repository
|
|
150
|
-
</params>
|
|
151
|
-
<returns>Targeted answer based on repository documentation</returns>
|
|
152
|
-
<use_when>You have a specific question and want a direct answer</use_when>
|
|
153
|
-
</tool>
|
|
154
|
-
|
|
155
|
-
<format_rules>
|
|
156
|
-
- Single repository: `repoName="anomalyco/opencode"`
|
|
157
|
-
- Multiple repositories: `repoName=["anomalyco/opencode", "vercel/next.js"]`
|
|
158
|
-
- ❌ Wrong: `repoName=["anomalyco/opencode"]` (single-item array causes search failure)
|
|
159
|
-
</format_rules>
|
|
160
|
-
|
|
161
|
-
## When to Use DeepWiki
|
|
162
|
-
|
|
163
|
-
<use_cases>
|
|
164
|
-
- Query is about a **specific GitHub repository**
|
|
165
|
-
- You need **authoritative code answers** (from official docs)
|
|
166
|
-
- The question involves **implementation details** of a library/framework
|
|
167
|
-
- You want **installation/setup instructions** for a specific tool
|
|
168
|
-
- The query is about **API usage patterns** for a known package
|
|
169
|
-
</use_cases>
|
|
170
|
-
|
|
171
|
-
## repoName Format
|
|
172
|
-
|
|
173
|
-
Always use `owner/repo` format:
|
|
174
|
-
|
|
175
|
-
| Repository | Correct | Incorrect |
|
|
176
|
-
|------------|---------|-----------|
|
|
177
|
-
| React | `facebook/react` | `react`, `React` |
|
|
178
|
-
| Next.js | `vercel/next.js` | `nextjs`, `next` |
|
|
179
|
-
| TypeScript | `microsoft/TypeScript` | `typescript`, `ts` |
|
|
180
|
-
| Vue | `vuejs/core` | `vue`, `Vue.js` |
|
|
181
|
-
|
|
182
|
-
## Example Workflows
|
|
183
|
-
|
|
184
|
-
### Getting Started with a Library
|
|
185
|
-
|
|
186
|
-
```json
|
|
187
|
-
// Step 1: Check documentation structure
|
|
188
|
-
{
|
|
189
|
-
"tool": "deepwiki:deepWiki_read_wiki_structure",
|
|
190
|
-
"params": {
|
|
191
|
-
"repoName": "vercel/next.js"
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// Step 2: Ask specific question
|
|
196
|
-
{
|
|
197
|
-
"tool": "deepwiki:deepWiki_ask_question",
|
|
198
|
-
"params": {
|
|
199
|
-
"repoName": "vercel/next.js",
|
|
200
|
-
"question": "How do I create a dynamic route with parameters?"
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### Troubleshooting
|
|
206
|
-
|
|
207
|
-
```json
|
|
208
|
-
{
|
|
209
|
-
"tool": "deepwiki:deepWiki_ask_question",
|
|
210
|
-
"params": {
|
|
211
|
-
"repoName": "facebook/react",
|
|
212
|
-
"question": "Why am I getting the 'rules of hooks' warning?"
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### Installation Questions
|
|
218
|
-
|
|
219
|
-
```json
|
|
220
|
-
{
|
|
221
|
-
"tool": "deepwiki:deepWiki_ask_question",
|
|
222
|
-
"params": {
|
|
223
|
-
"repoName": "tailwindlabs/tailwindcss",
|
|
224
|
-
"question": "How do I install and configure Tailwind with Vite?"
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## Best Practices
|
|
230
|
-
|
|
231
|
-
<best_practices>
|
|
232
|
-
1. **Validate repo name** against blocked list before calling
|
|
233
|
-
2. **Use `ask_question`** for specific queries (most efficient)
|
|
234
|
-
3. **Use `read_wiki_contents`** only when you need the full documentation
|
|
235
|
-
4. **Check `read_wiki_structure`** first when exploring unfamiliar repos
|
|
236
|
-
5. **Use string for single repo, array for multiple repos** in `repoName` parameter
|
|
237
|
-
</best_practices>
|
|
238
|
-
|
|
239
|
-
## Limitations
|
|
240
|
-
|
|
241
|
-
<limitations>
|
|
242
|
-
- Only works for **public GitHub repositories**
|
|
243
|
-
- Documentation must be **indexed by DeepWiki**
|
|
244
|
-
- Very new or obscure repos may not be available
|
|
245
|
-
- Cannot access private repositories
|
|
246
|
-
</limitations>
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
# Few-Shot Examples
|
|
2
|
-
|
|
3
|
-
Real-world patterns for IntelliSearch skill execution.
|
|
4
|
-
|
|
5
|
-
## Example 1: Library Discovery
|
|
6
|
-
|
|
7
|
-
**Query:** "Find a TypeScript library for semantic versioning validation"
|
|
8
|
-
|
|
9
|
-
<execution>
|
|
10
|
-
<step name="search" tool="gh search repos">
|
|
11
|
-
CMD: `gh search repos "semver validation typescript" --language=typescript --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10`
|
|
12
|
-
RESULT: [npm/node-semver: 4.5K★, mattfarina/semver: 892★, ...]
|
|
13
|
-
</step>
|
|
14
|
-
|
|
15
|
-
<step name="filter" action="Top 3 by stars">
|
|
16
|
-
SELECTED: [npm/node-semver, mattfarina/semver, ieee802js/node-semver]
|
|
17
|
-
</step>
|
|
18
|
-
|
|
19
|
-
<step name="query" tool="DeepWiki_ask_question">
|
|
20
|
-
PAYLOAD: {
|
|
21
|
-
repoName: ["npm/node-semver", "mattfarina/semver", "ieee802js/node-semver"],
|
|
22
|
-
question: "Which is best for TypeScript semver validation?"
|
|
23
|
-
}
|
|
24
|
-
</step>
|
|
25
|
-
|
|
26
|
-
<step name="synthesize">
|
|
27
|
-
OUTPUT: npm/node-semver recommended (most stars, active maintenance, TypeScript typings included)
|
|
28
|
-
</step>
|
|
29
|
-
</execution>
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Example 2: Framework Comparison
|
|
34
|
-
|
|
35
|
-
**Query:** "Compare React state management libraries: Zustand vs Jotai vs Valtio"
|
|
36
|
-
|
|
37
|
-
<execution>
|
|
38
|
-
<step name="search" tool="gh search repos (parallel)">
|
|
39
|
-
CMDS:
|
|
40
|
-
- `gh search repos "zustand" --json fullName,stargazersCount,createdAt,updatedAt --limit 5`
|
|
41
|
-
- `gh search repos "jotai" --json fullName,stargazersCount,createdAt,updatedAt --limit 5`
|
|
42
|
-
- `gh search repos "valtio" --json fullName,stargazersCount,createdAt,updatedAt --limit 5`
|
|
43
|
-
RESULT: [pmndrs/zustand: 47K★, pmndrs/jotai: 18K★, pmndrs/valtio: 7K★]
|
|
44
|
-
</step>
|
|
45
|
-
|
|
46
|
-
<step name="filter" action="Exact matches only">
|
|
47
|
-
SELECTED: [pmndrs/zustand, pmndrs/jotai, pmndrs/valtio]
|
|
48
|
-
</step>
|
|
49
|
-
|
|
50
|
-
<step name="query" tool="DeepWiki_ask_question">
|
|
51
|
-
PAYLOAD: {
|
|
52
|
-
repoName: ["pmndrs/zustand", "pmndrs/jotai", "pmndrs/valtio"],
|
|
53
|
-
question: "Compare these React state management libraries: API design, performance, bundle size, learning curve"
|
|
54
|
-
}
|
|
55
|
-
</step>
|
|
56
|
-
|
|
57
|
-
<step name="synthesize">
|
|
58
|
-
OUTPUT: Zustand (simplest API, largest), Jotai (atomic, smallest), Valtio (proxy-based, mutable patterns)
|
|
59
|
-
</step>
|
|
60
|
-
</execution>
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Example 3: Fallback Chain
|
|
65
|
-
|
|
66
|
-
**Query:** "Is there a browser-based WebGL physics engine?"
|
|
67
|
-
|
|
68
|
-
<execution>
|
|
69
|
-
<step name="search" tool="gh search repos" status="failed">
|
|
70
|
-
CMD: `gh search repos "webgl physics engine browser" --language=javascript --limit 10`
|
|
71
|
-
ERROR: gh CLI not authenticated
|
|
72
|
-
</step>
|
|
73
|
-
|
|
74
|
-
<step name="fallback" tool="google_search">
|
|
75
|
-
PAYLOAD: {query: "webgl physics engine javascript npm github"}
|
|
76
|
-
RESULT: Snippets mentioning cannon-es, ammo.js, Oimo.js
|
|
77
|
-
</step>
|
|
78
|
-
|
|
79
|
-
<step name="extract" action="owner/repo patterns">
|
|
80
|
-
EXTRACTED: [pmndrs/cannon-es, kripken/ammo.js, lo-th/Oimo.js]
|
|
81
|
-
</step>
|
|
82
|
-
|
|
83
|
-
<step name="filter" action="Top 3 by relevance">
|
|
84
|
-
SELECTED: [pmndrs/cannon-es, kripken/ammo.js, lo-th/Oimo.js]
|
|
85
|
-
</step>
|
|
86
|
-
|
|
87
|
-
<step name="query" tool="DeepWiki_ask_question">
|
|
88
|
-
PAYLOAD: {
|
|
89
|
-
repoName: ["pmndrs/cannon-es", "kripken/ammo.js", "lo-th/Oimo.js"],
|
|
90
|
-
question: "Which is best for browser WebGL physics with Three.js integration?"
|
|
91
|
-
}
|
|
92
|
-
</step>
|
|
93
|
-
|
|
94
|
-
<step name="synthesize">
|
|
95
|
-
OUTPUT: cannon-es recommended (ES modules, maintained fork of cannon.js, Three.js examples available)
|
|
96
|
-
</step>
|
|
97
|
-
</execution>
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
# GitHub CLI Search
|
|
2
|
-
|
|
3
|
-
Using `gh` CLI for direct GitHub repository search.
|
|
4
|
-
|
|
5
|
-
<detection>
|
|
6
|
-
```bash
|
|
7
|
-
gh auth status
|
|
8
|
-
```
|
|
9
|
-
- Exit code 0: gh is available and authenticated
|
|
10
|
-
- Exit code non-zero: gh not available or not authenticated
|
|
11
|
-
</detection>
|
|
12
|
-
|
|
13
|
-
## Search Command
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
gh search repos [query] [flags]
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Query Strategy
|
|
20
|
-
|
|
21
|
-
<approach>
|
|
22
|
-
1. **Topics + Language** (preferred when topics identifiable)
|
|
23
|
-
2. **Keywords only** (fallback)
|
|
24
|
-
</approach>
|
|
25
|
-
|
|
26
|
-
<topic_detection>
|
|
27
|
-
Infer topics from user query context:
|
|
28
|
-
- Framework names → topics (react, vue, express)
|
|
29
|
-
- Library names → topics (lodash, axios, moment)
|
|
30
|
-
- Concepts → topics (semver, validation, authentication)
|
|
31
|
-
</topic_detection>
|
|
32
|
-
|
|
33
|
-
<language_inference>
|
|
34
|
-
Extract programming language from:
|
|
35
|
-
- Explicit mention: "in TypeScript", "Python library"
|
|
36
|
-
- File extensions: ".ts", ".py", ".go"
|
|
37
|
-
- Context: "npm package" → JavaScript/TypeScript
|
|
38
|
-
</language_inference>
|
|
39
|
-
|
|
40
|
-
## Examples
|
|
41
|
-
|
|
42
|
-
<examples>
|
|
43
|
-
<example category="topic_language">
|
|
44
|
-
```bash
|
|
45
|
-
# Query: "semver validation in TypeScript"
|
|
46
|
-
gh search repos --topic=semver,validation --language=typescript --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
47
|
-
```
|
|
48
|
-
</example>
|
|
49
|
-
|
|
50
|
-
<example category="keyword">
|
|
51
|
-
```bash
|
|
52
|
-
# Query: "cli shell terminal"
|
|
53
|
-
gh search repos cli shell terminal --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
54
|
-
```
|
|
55
|
-
</example>
|
|
56
|
-
|
|
57
|
-
<example category="combined">
|
|
58
|
-
```bash
|
|
59
|
-
# Topics with additional keywords
|
|
60
|
-
gh search repos "release automation" --topic=semver,versioning --language=typescript --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
61
|
-
```
|
|
62
|
-
</example>
|
|
63
|
-
</examples>
|
|
64
|
-
|
|
65
|
-
## Output Format
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
--json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
<example_output>
|
|
72
|
-
```json
|
|
73
|
-
[
|
|
74
|
-
{"createdAt":"2020-03-17T21:23:36Z","description":"SEMVER validation Github Action","fullName":"rubenesp87/semver-validation-action","stargazersCount":8,"updatedAt":"2024-03-29T19:31:00Z"},
|
|
75
|
-
{"createdAt":"2024-10-07T16:18:55Z","description":"An example to prove semverValidate Helm function","fullName":"lucabaggi/helm-semver-validation","stargazersCount":0,"updatedAt":"2024-10-07T16:24:06Z"}
|
|
76
|
-
]
|
|
77
|
-
```
|
|
78
|
-
</example_output>
|
|
79
|
-
|
|
80
|
-
## Result Processing
|
|
81
|
-
|
|
82
|
-
<process>
|
|
83
|
-
1. Get top 10 results from gh
|
|
84
|
-
2. Sort by `stargazersCount` descending
|
|
85
|
-
3. Return top 5 for DeepWiki queries
|
|
86
|
-
</process>
|
|
87
|
-
|
|
88
|
-
## Common Flags
|
|
89
|
-
|
|
90
|
-
| Flag | Purpose | Example |
|
|
91
|
-
|------|---------|---------|
|
|
92
|
-
| `--topic` | Filter by topics | `--topic=react,hooks` |
|
|
93
|
-
| `--language` | Filter by language | `--language=typescript` |
|
|
94
|
-
| `--owner` | Filter by owner | `--owner=facebook` |
|
|
95
|
-
| `--stars` | Min stars | `--stars=">100"` |
|
|
96
|
-
| `--sort` | Sort field | `--sort=stars` |
|
|
97
|
-
| `--order` | Sort order | `--order=desc` |
|
|
98
|
-
| `--limit` | Max results | `--limit=10` |
|
|
99
|
-
| `--json` | Output format | `--json fullName,stargazersCount` |
|
|
100
|
-
| `--archived` | Exclude archived | `--archived=false` |
|
|
101
|
-
|
|
102
|
-
## JSON Available Fields
|
|
103
|
-
- createdAt
|
|
104
|
-
- defaultBranch
|
|
105
|
-
- description
|
|
106
|
-
- forksCount
|
|
107
|
-
- fullName
|
|
108
|
-
- hasDownloads
|
|
109
|
-
- hasIssues
|
|
110
|
-
- hasPages
|
|
111
|
-
- hasProjects
|
|
112
|
-
- hasWiki
|
|
113
|
-
- homepage
|
|
114
|
-
- id
|
|
115
|
-
- isArchived
|
|
116
|
-
- isDisabled
|
|
117
|
-
- isFork
|
|
118
|
-
- isPrivate
|
|
119
|
-
- language
|
|
120
|
-
- license
|
|
121
|
-
- name
|
|
122
|
-
- openIssuesCount
|
|
123
|
-
- owner
|
|
124
|
-
- pushedAt
|
|
125
|
-
- size
|
|
126
|
-
- stargazersCount
|
|
127
|
-
- updatedAt
|
|
128
|
-
- url
|
|
129
|
-
- visibility
|
|
130
|
-
- watchersCount
|
|
131
|
-
|
|
132
|
-
## Error Handling
|
|
133
|
-
|
|
134
|
-
```yaml
|
|
135
|
-
IF gh auth status fails:
|
|
136
|
-
→ Fall back to search_tool or fetch_tool
|
|
137
|
-
IF gh search repos fails:
|
|
138
|
-
→ Fall back to search_tool or fetch_tool
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
## Permission Opt-Out
|
|
142
|
-
|
|
143
|
-
Users can deny `gh` tool permission in OpenCode to opt out of this search method. The skill will automatically fall back to web search tools.
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Google Search Operators
|
|
2
|
-
|
|
3
|
-
Source: https://support.google.com/websearch/answer/2466433?hl=en
|
|
4
|
-
|
|
5
|
-
## Essential Operators
|
|
6
|
-
|
|
7
|
-
| Operator | Syntax | Example | Purpose |
|
|
8
|
-
|----------|--------|---------|---------|
|
|
9
|
-
| Exact match | `"phrase"` | `"tallest building"` | Exact phrase match |
|
|
10
|
-
| Site search | `site:domain.com` | `site:youtube.com cat videos` | Search specific domain |
|
|
11
|
-
| Exclude | `-word` | `jaguar speed -car` | Exclude word from results |
|
|
12
|
-
|
|
13
|
-
## Usage Notes
|
|
14
|
-
|
|
15
|
-
<important>
|
|
16
|
-
- No spaces between operator and search term: `site:nytimes.com` works, `site: nytimes.com` does not
|
|
17
|
-
- Operators can be combined: `"typescript" tutorial -paid`
|
|
18
|
-
- Quotes are useful for exact phrases like `"order of the phoenix"`
|
|
19
|
-
</important>
|
|
20
|
-
|
|
21
|
-
## Common Patterns for Technical Search
|
|
22
|
-
|
|
23
|
-
<patterns>
|
|
24
|
-
```bash
|
|
25
|
-
# Find libraries
|
|
26
|
-
typescript validation library npm
|
|
27
|
-
|
|
28
|
-
# Exact phrase
|
|
29
|
-
"semantic versioning" nodejs package
|
|
30
|
-
|
|
31
|
-
# Exclude results
|
|
32
|
-
graph database python -javascript
|
|
33
|
-
|
|
34
|
-
# Combined
|
|
35
|
-
semver typescript validation -test
|
|
36
|
-
|
|
37
|
-
# Package search
|
|
38
|
-
npm package semver compare
|
|
39
|
-
```
|
|
40
|
-
</patterns>
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
# Search Workflow
|
|
2
|
-
|
|
3
|
-
Tool detection and search strategy for finding GitHub repositories.
|
|
4
|
-
|
|
5
|
-
<critical_rules priority="highest">
|
|
6
|
-
<rule>NEVER use `site:github.com` with search tools - returns full URLs that get misparsed</rule>
|
|
7
|
-
<rule>Only fetch EXTERNAL search engines, NEVER github.com URLs</rule>
|
|
8
|
-
<rule>Cycle through engines on failure: Brave → DuckDuckGo → Google</rule>
|
|
9
|
-
</critical_rules>
|
|
10
|
-
|
|
11
|
-
## Tool Priority
|
|
12
|
-
|
|
13
|
-
```yaml
|
|
14
|
-
detection:
|
|
15
|
-
IF gh auth status succeeds:
|
|
16
|
-
→ Use gh search repos (PREFERRED - direct API)
|
|
17
|
-
ELSE IF search_tool exists:
|
|
18
|
-
→ Use search tool with keywords (NOT site:github.com)
|
|
19
|
-
ELSE IF fetch_tool exists:
|
|
20
|
-
→ Use URI-based search with engine cycling
|
|
21
|
-
ELSE:
|
|
22
|
-
→ Report: "No search capability available"
|
|
23
|
-
→ fallback to internal knowledge
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## GitHub CLI (Preferred)
|
|
27
|
-
|
|
28
|
-
<detection>
|
|
29
|
-
```bash
|
|
30
|
-
gh auth status # Exit 0 = available
|
|
31
|
-
```
|
|
32
|
-
</detection>
|
|
33
|
-
|
|
34
|
-
<search_patterns priority="try_in_order">
|
|
35
|
-
```bash
|
|
36
|
-
# 1. Full query with topics and language
|
|
37
|
-
gh search repos "{query}" --topic={topics} --language={lang} --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
38
|
-
|
|
39
|
-
# 2. Query with language only
|
|
40
|
-
gh search repos "{query}" --language={lang} --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
41
|
-
|
|
42
|
-
# 3. Topic-based search (no query string)
|
|
43
|
-
gh search repos --topic={topics} --language={lang} --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
44
|
-
|
|
45
|
-
# 4. Broader keyword search
|
|
46
|
-
gh search repos "{query}" --json fullName,stargazersCount,createdAt,updatedAt,description --limit 10
|
|
47
|
-
```
|
|
48
|
-
</search_patterns>
|
|
49
|
-
|
|
50
|
-
<process>
|
|
51
|
-
1. Infer topics from query (framework/library names → topics)
|
|
52
|
-
2. Infer language if mentioned
|
|
53
|
-
3. Sort by stargazersCount, return top 5
|
|
54
|
-
4. Skip to DeepWiki query
|
|
55
|
-
</process>
|
|
56
|
-
|
|
57
|
-
See @gh-cli.md for detailed syntax.
|
|
58
|
-
|
|
59
|
-
## Search Tool (Fallback #1)
|
|
60
|
-
|
|
61
|
-
<constraint>DO NOT use `site:github.com` - it returns full GitHub URLs that get misparsed as repos.</constraint>
|
|
62
|
-
|
|
63
|
-
<query_format>
|
|
64
|
-
```json
|
|
65
|
-
{ "query": "{technology} {feature} {language} library package" }
|
|
66
|
-
```
|
|
67
|
-
</query_format>
|
|
68
|
-
|
|
69
|
-
<example>
|
|
70
|
-
```json
|
|
71
|
-
{ "query": "typescript semver validation library npm package" }
|
|
72
|
-
```
|
|
73
|
-
</example>
|
|
74
|
-
|
|
75
|
-
<result_processing>
|
|
76
|
-
- Look for package names in snippets
|
|
77
|
-
- Find `github.com/owner/repo` references in descriptions
|
|
78
|
-
- Ignore navigation/ads
|
|
79
|
-
</result_processing>
|
|
80
|
-
|
|
81
|
-
## URI-Based Search (Fallback #2)
|
|
82
|
-
|
|
83
|
-
When only fetch tools available, cycle through engines:
|
|
84
|
-
|
|
85
|
-
| Priority | Engine | URL |
|
|
86
|
-
|----------|--------|-----|
|
|
87
|
-
| 1 | Brave | `https://search.brave.com/search?q={terms}` |
|
|
88
|
-
| 2 | DuckDuckGo | `https://duckduckgo.com/?q={terms}` |
|
|
89
|
-
| 3 | Google | `https://www.google.com/search?q={terms}` |
|
|
90
|
-
|
|
91
|
-
<error_handling>
|
|
92
|
-
```yaml
|
|
93
|
-
FOR each engine IN [brave, duckduckgo, google]:
|
|
94
|
-
result = fetch(engine_url)
|
|
95
|
-
IF success AND has_search_results:
|
|
96
|
-
RETURN result
|
|
97
|
-
CONTINUE
|
|
98
|
-
RETURN error: all engines failed
|
|
99
|
-
```
|
|
100
|
-
</error_handling>
|
|
101
|
-
|
|
102
|
-
<failure_causes>
|
|
103
|
-
- JavaScript redirects (Google)
|
|
104
|
-
- Captchas (DuckDuckGo)
|
|
105
|
-
- HTML parsing issues
|
|
106
|
-
</failure_causes>
|
|
107
|
-
|
|
108
|
-
<example>
|
|
109
|
-
```json
|
|
110
|
-
{
|
|
111
|
-
"url": "https://search.brave.com/search?q=typescript%20semver%20validation%20library",
|
|
112
|
-
"format": "markdown",
|
|
113
|
-
"timeout": 10
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
</example>
|
|
117
|
-
|
|
118
|
-
## Query Construction
|
|
119
|
-
|
|
120
|
-
<keyword_based>
|
|
121
|
-
```
|
|
122
|
-
{technology} {feature} {language} library package
|
|
123
|
-
```
|
|
124
|
-
</keyword_based>
|
|
125
|
-
|
|
126
|
-
<examples>
|
|
127
|
-
- `react hooks typescript library`
|
|
128
|
-
- `semver validation nodejs package`
|
|
129
|
-
- `graph database python library`
|
|
130
|
-
</examples>
|
|
131
|
-
|
|
132
|
-
<result_extraction>
|
|
133
|
-
- Look for `github.com/owner/repo` in snippet descriptions
|
|
134
|
-
- Find package names that map to known repos
|
|
135
|
-
- Follow links in documentation references
|
|
136
|
-
</result_extraction>
|
|
137
|
-
|
|
138
|
-
## References
|
|
139
|
-
|
|
140
|
-
- @gh-cli.md - GitHub CLI syntax
|
|
141
|
-
- @google-search.md - Google operators
|
|
142
|
-
- @brave-search.md - Brave operators
|
|
143
|
-
- @ddg-search.md - DuckDuckGo operators
|