harmony-skills-standalone 1.0.2 → 1.0.3
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/autotest-agent/SKILL.md +36 -28
- package/codesearch/SKILL.md +197 -0
- package/codesearch/codesearch-0.1.0.tgz +0 -0
- package/codesearch/references/cli-guide.md +622 -0
- package/codesearch/references/mcp-tools-guide.md +752 -0
- package/codesearch/references/requirements.txt +19 -0
- package/package.json +2 -1
package/autotest-agent/SKILL.md
CHANGED
|
@@ -1,39 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: autotest-agent
|
|
3
|
-
description:
|
|
3
|
+
description: Execute declared test cases through the checked-in AutoTestAgent batch wrapper.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# AutoTest Agent Bridge
|
|
7
7
|
|
|
8
|
-
Use
|
|
9
|
-
|
|
8
|
+
Use `scripts/run_autotest_batch.py` as the only execution entry. Do not inspect
|
|
9
|
+
platform backend source code, manually parse `.env`, or assemble an AutoTest
|
|
10
|
+
configuration file.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- Preserve the AutoTestAgent raw report under the declared node output directory.
|
|
14
|
-
- Write the declared `result` output as valid JSON containing the real command,
|
|
15
|
-
device, case totals, pass/fail counts, report paths, and blocking reason.
|
|
16
|
-
- Emit structured JSON progress lines during setup, execution, attribution, and
|
|
17
|
-
report generation.
|
|
18
|
-
- Fail when required device or application prerequisites are unavailable.
|
|
12
|
+
From the node prompt, use the declared `Platform root`, `Python executable`,
|
|
13
|
+
`Task directory`, `Progress file`, and `Result` paths to run:
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
```text
|
|
16
|
+
"<Python executable>" "<Platform root>/scripts/run_autotest_batch.py"
|
|
17
|
+
--task-dir "<Task directory>/nodes/case-exec/outputs/autotest"
|
|
18
|
+
--prompt-file "<Task directory>/nodes/case-exec/prompt.md"
|
|
19
|
+
--work-dir "<Platform root>/SubAgents/AutoTestAgent-master"
|
|
20
|
+
--progress-file "<Progress file>"
|
|
21
|
+
--result "<Result>"
|
|
22
|
+
```
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
The wrapper resolves HDC from `Platform/backend/config/runtime.yaml`, verifies
|
|
25
|
+
that the requested device is online, converts the prompt's single or batch test
|
|
26
|
+
case input to `testcases.jsonl`, injects only environment-referenced API keys
|
|
27
|
+
into the AutoTest child process, streams AutoTest output to the progress file,
|
|
28
|
+
and writes the required result JSON.
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
python "${workflow.inputs.platform_root}/scripts/run_autotest_batch.py" \
|
|
28
|
-
--task-dir "<reports-dir>" \
|
|
29
|
-
--testcases "<testcases.jsonl>" \
|
|
30
|
-
--work-dir "${workflow.inputs.platform_root}/SubAgents/AutoTestAgent-master" \
|
|
31
|
-
--category "intent-test" \
|
|
32
|
-
--progress-file "${outputs.progress}" \
|
|
33
|
-
--result "${outputs.result}"
|
|
34
|
-
```
|
|
30
|
+
Rules:
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
- Invoke the wrapper exactly once for this node, then stop. Never invoke it a second time for the same node, including after a failed test, non-zero exit, timeout, blocked setup, or missing result file.
|
|
33
|
+
- Run the wrapper immediately; do not search for another execution path.
|
|
34
|
+
- If a structured test-case file is already available, use `--test-case-file`
|
|
35
|
+
instead of `--prompt-file`.
|
|
36
|
+
- After the wrapper returns, finish the node immediately. The result JSON is
|
|
37
|
+
the final node output; report its path without modifying it.
|
|
38
|
+
- `test_status: failed` is a valid completed test result, not a command failure
|
|
39
|
+
and not a request to diagnose or repair the environment.
|
|
40
|
+
- Do not fabricate device interactions, screenshots, pass counts, or reports.
|
|
41
|
+
- Do not place an API key in a command, prompt, log, event, or result.
|
|
42
|
+
- Do not inspect reports, progress logs, source code, dependency state, `.env`,
|
|
43
|
+
or AutoTest configuration to diagnose a completed wrapper run.
|
|
44
|
+
- Do not install dependencies, edit configuration, retry, or invoke another
|
|
45
|
+
execution path after the wrapper has run.
|
|
46
|
+
- On any setup or execution failure, let the wrapper write a truthful blocked
|
|
47
|
+
or failed `result.json`; never create a success result yourself.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codesearch
|
|
3
|
+
description: >-
|
|
4
|
+
Build a code knowledge graph index for Git repositories and expose it as an MCP
|
|
5
|
+
Server for AI-driven code understanding. Use when the task involves indexing a
|
|
6
|
+
codebase, searching code by keyword or semantics, querying call/inheritance
|
|
7
|
+
relations, analyzing impact of a symbol change, executing Cypher graph queries,
|
|
8
|
+
or running a local code-search MCP service. Supports JavaScript, TypeScript,
|
|
9
|
+
Python, Java, C, C++, C#, Go, Rust, PHP, and Kotlin. Triggers on phrases like
|
|
10
|
+
code search, code index, code knowledge graph, call relation, impact analysis,
|
|
11
|
+
semantic search, BM25, Cypher query, or MCP server for code.
|
|
12
|
+
source: local
|
|
13
|
+
upstream_version: 0.1.0
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# CodeSearch
|
|
17
|
+
|
|
18
|
+
`codesearch` builds a code knowledge graph from Git repositories and exposes it
|
|
19
|
+
as an MCP Server. It provides keyword search (BM25), semantic vector retrieval,
|
|
20
|
+
Cypher graph queries, call/inheritance relation traversal, and impact analysis.
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
- **Node.js >= 22.0.0**
|
|
25
|
+
- **Python >= 3.13** — only required for semantic retrieval features
|
|
26
|
+
(`embedding-service`, `repo-embedding`, and the `semantic` MCP tool). Basic
|
|
27
|
+
indexing and MCP query work without Python.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
Install the bundled npm package into the current project:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install <skill-dir>/codesearch-0.1.0.tgz
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
For npm 11+ (which blocks install scripts by default), allow native module
|
|
38
|
+
compilation:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
echo "allow-scripts=true" >> .npmrc
|
|
42
|
+
npm install <skill-dir>/codesearch-0.1.0.tgz
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Verify:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx codesearch --version
|
|
49
|
+
npx codesearch --help
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For Python-dependent features, install Python dependencies:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install -r references/requirements.txt
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Quick start
|
|
59
|
+
|
|
60
|
+
Minimal flow — index a repo and start the MCP Server:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx codesearch analyze /path/to/repo --output-path /path/to/index
|
|
64
|
+
npx codesearch mcp --repo /path/to/index
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## CLI commands
|
|
68
|
+
|
|
69
|
+
| Command | Purpose |
|
|
70
|
+
|---------|---------|
|
|
71
|
+
| `analyze [path] --output-path <dir>` | Full analysis of a single Git repo |
|
|
72
|
+
| `analyze-dist <input> <output>` | Distributed analysis for multi-module repos |
|
|
73
|
+
| `incremental [path] [prevPath]` | Rebuild only changed modules (requires prior `analyze-dist`) |
|
|
74
|
+
| `realtime <path> <output>` | File-level real-time analysis for local dev |
|
|
75
|
+
| `mcp [--mode stdio\|http\|fusion] [--repo <dir>]` | Start MCP Server on an index |
|
|
76
|
+
| `repo-embedding <index> <url>` | Generate embeddings + Milvus Lite index |
|
|
77
|
+
| `embedding-service --mode embedding\|query` | Start Python embedding or query service |
|
|
78
|
+
| `merge <target> <src1> <src2> [...]` | Merge multiple index directories |
|
|
79
|
+
|
|
80
|
+
Key rules:
|
|
81
|
+
|
|
82
|
+
- `--repo` accepts **index directories** (containing `kuzu/` and `meta.json`),
|
|
83
|
+
not source code directories.
|
|
84
|
+
- For `analyze-dist` output, pass the `mergeRepo` subdirectory as `--repo`.
|
|
85
|
+
- `analyze`, `analyze-dist`, `incremental`, `realtime`, and `mcp` do **not**
|
|
86
|
+
require Python. Only `embedding-service` and `repo-embedding` do.
|
|
87
|
+
|
|
88
|
+
## MCP Server modes
|
|
89
|
+
|
|
90
|
+
| Mode | Use case |
|
|
91
|
+
|------|----------|
|
|
92
|
+
| `stdio` (default) | Local dev, single client (Claude Desktop, Cursor, Trae) |
|
|
93
|
+
| `http` | Long-running service, multi-client, remote deployment |
|
|
94
|
+
| `fusion` | Local + remote hybrid; merges local and cloud results |
|
|
95
|
+
|
|
96
|
+
### stdio example
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npx codesearch mcp --repo /path/to/index
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### http example
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npx codesearch mcp --mode http --host 127.0.0.1 --port 4848 --repo /path/to/index
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### fusion example
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
npx codesearch mcp --mode fusion --remote-mcp-url http://127.0.0.1:4848/mcp --repo /path/to/local-index
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## MCP tools
|
|
115
|
+
|
|
116
|
+
Standard mode (`stdio` / `http`) exposes:
|
|
117
|
+
|
|
118
|
+
| Tool | Description |
|
|
119
|
+
|------|-------------|
|
|
120
|
+
| `list_repos` | List all indexed repositories |
|
|
121
|
+
| `query` | Hybrid keyword + semantic search; results organized by execution flow |
|
|
122
|
+
| `cypher` | Execute read-only Cypher queries on the code knowledge graph |
|
|
123
|
+
| `context` | Get 360-degree context of a symbol (incoming/outgoing relations) |
|
|
124
|
+
| `impact` | Analyze upstream/downstream impact of modifying a symbol |
|
|
125
|
+
| `search_class_by_graph` | Search class definitions and inheritance |
|
|
126
|
+
| `search_func_by_graph` | Search function definitions |
|
|
127
|
+
| `search_call_relation` | Traverse caller/callee chains for a function |
|
|
128
|
+
| `search_extend_relation` | Traverse parent/child inheritance for a class |
|
|
129
|
+
| `bm25` | BM25 keyword retrieval |
|
|
130
|
+
| `semantic` | Semantic vector retrieval (requires embedding service) |
|
|
131
|
+
| `getContent` | Fetch source code content by node ID |
|
|
132
|
+
|
|
133
|
+
`fusion` mode exposes only `query` and `cypher`, merging local and remote results.
|
|
134
|
+
|
|
135
|
+
## Recommended workflow
|
|
136
|
+
|
|
137
|
+
1. `list_repos` — confirm available indexes
|
|
138
|
+
2. `query` — find relevant symbols and execution flows
|
|
139
|
+
3. `context` — deep-dive into a specific symbol
|
|
140
|
+
4. `impact` — assess risk before modifying a symbol
|
|
141
|
+
|
|
142
|
+
## MCP client configuration
|
|
143
|
+
|
|
144
|
+
### stdio
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"mcpServers": {
|
|
149
|
+
"codesearch": {
|
|
150
|
+
"command": "npx",
|
|
151
|
+
"args": ["codesearch", "mcp", "--repo", "/path/to/index"]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### http
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"mcpServers": {
|
|
162
|
+
"codesearch-http": {
|
|
163
|
+
"url": "http://127.0.0.1:4848/mcp"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Enabling semantic retrieval
|
|
170
|
+
|
|
171
|
+
1. Build base index: `npx codesearch analyze /path/to/repo --output-path /path/to/index`
|
|
172
|
+
2. Start embedding service: `npx codesearch embedding-service --mode embedding --model-path /path/to/Qwen3-Embedding-0.6B --port 5001`
|
|
173
|
+
3. Generate embeddings: `npx codesearch repo-embedding /path/to/index http://127.0.0.1:5001/embed`
|
|
174
|
+
4. Start query service: `npx codesearch embedding-service --mode query --db-path /path/to/index/embedding/milvus_lite.db --port 5000`
|
|
175
|
+
5. Update `/path/to/index/meta.json`:
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"embedding_url": "http://127.0.0.1:5001/embed",
|
|
180
|
+
"vectordb_url": "http://127.0.0.1:5000/search"
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
6. Start MCP: `npx codesearch mcp --repo /path/to/index`
|
|
185
|
+
|
|
186
|
+
If `embedding_url` or `vectordb_url` is not configured, the `semantic` tool
|
|
187
|
+
returns empty results without affecting other tools.
|
|
188
|
+
|
|
189
|
+
## Supported languages
|
|
190
|
+
|
|
191
|
+
JavaScript, TypeScript, Python, Java, C, C++, C#, Go, Rust, PHP, Kotlin.
|
|
192
|
+
|
|
193
|
+
## References
|
|
194
|
+
|
|
195
|
+
- [CLI guide](references/cli-guide.md) — full CLI command reference with examples
|
|
196
|
+
- [MCP tools guide](references/mcp-tools-guide.md) — detailed MCP tool descriptions and return examples
|
|
197
|
+
- [requirements.txt](references/requirements.txt) — Python dependencies for semantic features
|
|
Binary file
|