refactor: 0.1.0-beta

This commit is contained in:
leokun
2026-08-13 22:01:11 +08:00
parent a3ec2a0dfc
commit 3e7a15017d
401 changed files with 8696 additions and 182189 deletions
-25
View File
@@ -1,25 +0,0 @@
你当前处于 Subagent 的 child conversation 中。
你的职责不是直接面向最终用户给出完整答复,而是为父代理调查信息、提炼事实,并返回简洁可靠的文字结论。
工作目标:
- 快速定位与当前子任务直接相关的信息。
- 提炼出最重要的事实、差异、原因或证据。
- 用短文本返回结果,方便父代理继续决策或整合输出。
- 工具结果、历史回放或附加上下文中的裁剪提示(例如 `[truncated: ...]``_truncated``omitted middle``showing ... of ...`)只表示系统省略了部分内容,不是原始内容或错误本身;需要精确上下文时重新读取或重新搜索。
输出要求:
- 先给结论,再给少量关键证据。
- 只保留必要信息,不要写成长文。
- 不要泛泛铺垫,不要重复背景,不要给多余建议。
- 如果信息不足,直接指出缺口;不要为了显得完整而展开猜测。
- 返回内容更像“调查结果摘要”,而不是面向最终用户的完整回答。
- 如果你声明需要继续查看、搜索、读取或执行其他工具,就必须在同一个 assistant 回合中立即发起相应工具调用。禁止只说“我先看一下”“让我搜索”等下一步声明后不调用工具就结束;如果不调用工具,必须直接给出调查结论或明确缺口。
- 不要从代码、函数等层面解释任何东西,只输出人话版的数据结构、演变过程、模块关系、作用域等情况(不限于此)。除非用户非常明确的要求你解释代码和函数。此原则非常重要。
能力边界:
- 你可以使用后端暴露给 subAgent 的工具完成子任务。
- 你不能询问用户问题。
- 如果信息不足,直接指出缺口并返回给父代理,不要向用户发起问题。
请始终保持输出短、准、聚焦。
-148
View File
@@ -1,148 +0,0 @@
[
{
"function": {
"description": "\nTool to search for files matching a glob pattern\n\n- Works fast with codebases of any size\n- Returns matching file paths sorted by modification time\n- Use this tool when you need to find files by name patterns\n- You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches that are potentially useful as a batch.\n",
"name": "Glob",
"parameters": {
"properties": {
"glob_pattern": {
"description": "The glob pattern to match files against.\nPatterns not starting with \"**/\" are automatically prepended with \"**/\" to enable recursive searching.\n\nExamples:\n\t- \"*.js\" (becomes \"**/*.js\") - find all .js files\n\t- \"**/node_modules/**\" - find all node_modules directories\n\t- \"**/test/**/test_*.ts\" - find all test_*.ts files in any test directory",
"type": "string"
},
"target_directory": {
"description": "Absolute path to directory to search for files in. If not provided, defaults to Cursor workspace root.",
"type": "string"
}
},
"required": [
"glob_pattern"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "A powerful search tool built on ripgrep\nUsage:\n- Prefer using Grep for search tasks when you know the exact symbols or strings to search for. Whenever possible, use this tool instead of invoking grep or rg as a terminal command. The Grep tool has been optimized for speed and file restrictions inside Cursor.\n- Supports full regex syntax (e.g., \"log.*Error\", \"function\\s+\\w+\")\n- Filter files with glob parameter (e.g., \".js\", \"**/.tsx\") or type parameter (e.g., \"js\", \"py\", \"rust\")\n- Output modes: \"content\" shows matching lines (default), \"files_with_matches\" shows only file paths, \"count\" shows match counts\n- Pattern syntax: Uses ripgrep (not grep) - literal braces need escaping (use interface\\{\\} to find interface{} in Go code)\n- Multiline matching: By default patterns match within single lines only. For cross-line patterns like struct \\{[\\s\\S]*?field, use multiline: true\n- Results are capped to several thousand output lines for responsiveness; when truncation occurs, the results report \"at least\" counts, but are otherwise accurate.\n- Content output formatting closely follows ripgrep output format: '-' for context lines, ':' for match lines, and all context/match lines below each file group.",
"name": "Grep",
"parameters": {
"properties": {
"-A": {
"description": "Number of lines to show after each match (rg -A). Requires output_mode: \"content\", ignored otherwise.",
"type": "integer"
},
"-B": {
"description": "Number of lines to show before each match (rg -B). Requires output_mode: \"content\", ignored otherwise.",
"type": "integer"
},
"-C": {
"description": "Number of lines to show before and after each match (rg -C). Requires output_mode: \"content\", ignored otherwise.",
"type": "integer"
},
"-i": {
"description": "Case insensitive search (rg -i) Defaults to false",
"type": "boolean"
},
"glob": {
"description": "Glob pattern to filter files (e.g. \"*.js\", \"*.{ts,tsx}\") - maps to rg --glob",
"type": "string"
},
"head_limit": {
"description": "Limit output size. For \"content\" mode: limits total matches shown. For \"files_with_matches\" and \"count\" modes: limits number of files.",
"minimum": 0,
"type": "integer"
},
"multiline": {
"description": "Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false.",
"type": "boolean"
},
"offset": {
"description": "Skip first N entries. For \"content\" mode: skips first N matches. For \"files_with_matches\" and \"count\" modes: skips first N files. Use with head_limit for pagination.",
"minimum": 0,
"type": "integer"
},
"output_mode": {
"description": "Output mode: \"content\" shows matching lines (supports -A/-B/-C context, -n line numbers, head_limit), \"files_with_matches\" shows file paths (supports head_limit), \"count\" shows match counts (supports head_limit). Defaults to \"content\".",
"enum": [
"content",
"files_with_matches",
"count"
],
"type": "string"
},
"path": {
"description": "File or directory to search in (rg pattern -- PATH). Defaults to Cursor workspace root.",
"type": "string"
},
"pattern": {
"description": "The regular expression pattern to search for in file contents",
"type": "string"
},
"type": {
"description": "File type to search (rg --type). Common types: js, py, rust, go, java, etc. More efficient than include for standard file types.",
"type": "string"
}
},
"required": [
"pattern"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Reads a file from the local filesystem. You can access any file directly by using this tool.\nIf the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.\n\nUsage:\n- You can optionally specify a line offset and limit (especially handy for long files), but it's recommended to read the whole file by not providing these parameters\n- Lines in the output are numbered starting at 1, using following format: LINE_NUMBER|LINE_CONTENT\n- You have the capability to call multiple tools in a single response. It is always better to speculatively read multiple files as a batch that are potentially useful.\n- If you read a file that exists but has empty contents you will receive 'File is empty.'\n\nImage Support:\n- This tool can also read image files when called with the appropriate path.\n- Supported image formats: jpeg/jpg, png, gif, webp.\n\nPDF Support:\n- PDF files are converted into text content automatically (subject to the same character limits as other files).\n\nLine endings: On Windows or some client read paths, partial reads may display line endings normalized to LF even when the file uses CRLF or CR. Use the visible text normally when reporting evidence.",
"name": "Read",
"parameters": {
"properties": {
"limit": {
"description": "The number of lines to read. Only provide if the file is too large to read at once.",
"type": "integer"
},
"offset": {
"description": "The line number to start reading from. Positive values are 1-indexed from the start of the file. Negative values count backwards from the end (e.g. -1 is the last line). Only provide if the file is too large to read at once.",
"type": "integer"
},
"path": {
"description": "The absolute path of the file to read.",
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
}
},
"type": "function"
},
{
"function": {
"description": "Lists files and directories under a directory path.\n\nUse this tool when you need directory structure, especially top-level project layout or immediate children of a folder. Do not use Glob(\"*\") or recursive Glob patterns to list a directory; use Ls instead.\n\nYou may provide ignore globs for large or irrelevant directories such as .git, node_modules, dist, build, .cursor-local-assistant-v2/history, or logs.",
"name": "Ls",
"parameters": {
"properties": {
"ignore": {
"description": "Optional ignore globs for directories or files that should be skipped while listing.",
"items": {
"type": "string"
},
"type": "array"
},
"path": {
"description": "The absolute path of the directory to list.",
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
}
},
"type": "function"
}
]