bugx-cli 0.1.2 → 0.1.4
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 +26 -29
- package/core/README.md +5 -3
- package/core/agent/agent_orchestrator.py +3 -0
- package/core/agent/agent_workspace.py +14 -2
- package/core/assets/bugx-wechat-group.png +0 -0
- package/core/assets/twitter_promo_art.jpg +0 -0
- package/core/assets/twitter_promo_card.svg +166 -0
- package/core/assets/twitter_promo_clean.jpg +0 -0
- package/core/assets/twitter_terminal_real.png +0 -0
- package/core/bugx.md +3 -3
- package/core/bugx_paths.py +10 -2
- package/core/bundled_docs/OVERVIEW.md +310 -0
- package/core/bundled_docs/README.md +10 -0
- package/core/bundled_docs/README_EN.md +278 -0
- package/core/bundled_docs/ai/01_AI_REFERENCE.md +833 -0
- package/core/bundled_docs/ai/02_AI_USAGE.md +161 -0
- package/core/bundled_docs/ai/03_AI_COMMANDS.md +322 -0
- package/core/bundled_docs/guides/01_USER_GUIDE.md +887 -0
- package/core/bundled_docs/guides/02_COMMANDS.md +935 -0
- package/core/bundled_docs/guides/03_TROUBLESHOOTING.md +763 -0
- package/core/bundled_docs/guides/04_CLOUD_AUTH_AND_SYNC_COOKBOOK.md +48 -0
- package/core/bundled_docs/guides/05_HOST_MATRIX_AND_DISPATCH.md +23 -0
- package/core/bundled_docs/guides/06_PROBES_AND_POC_COOKBOOK.md +49 -0
- package/core/bundled_docs/guides/07_LIFECYCLE_AND_RECOVERY_STATES.md +46 -0
- package/core/bundled_docs/guides/08_LESSONS_AND_PRIVACY_BOUNDARY.md +35 -0
- package/core/bundled_docs/hosts/bugx-claude_SKILL.md +326 -0
- package/core/bundled_docs/hosts/bugx-dsh_SKILL.md +229 -0
- package/core/bundled_docs/hosts/bugx-opencode_SKILL.md +129 -0
- package/core/bundled_docs/hosts/bugx-zcode_SKILL.md +459 -0
- package/core/bundled_docs/hosts/bugx_SKILL.md +118 -0
- package/core/bundled_docs/hosts/cline_bugx_SKILL.md +69 -0
- package/core/bundled_docs/hosts/platform_bugx_SKILL.md +50 -0
- package/core/bundled_docs/manifest.json +140 -0
- package/core/bundled_docs/reference/01_ENVIRONMENT_VARIABLES.md +421 -0
- package/core/bundled_docs/reference/04_REPOSITORY_TOPOLOGY.md +180 -0
- package/core/cli-help.txt +7 -3
- package/core/cloud_sync/cloud_client.py +81 -2
- package/core/cloud_sync/endpoint_router.py +22 -9
- package/core/cloud_sync/issue_uploader.py +297 -0
- package/core/cloud_sync/sensitive_filter.py +77 -7
- package/core/contracts/AGENT_GUIDE.md +3 -9
- package/core/contracts/README.md +1 -1
- package/core/contracts/bugx-opencode.md +1 -1
- package/core/contracts/bugx-runtime-contract.md +10 -20
- package/core/contracts/bugx-worker.md +1 -1
- package/core/engine-integrity.json +267 -111
- package/core/host_acp/antigravity.py +153 -0
- package/core/host_acp/kimi.py +175 -0
- package/core/host_acp/minimax.py +28 -0
- package/core/host_runtime/adapters.py +5 -1
- package/core/host_runtime/antigravity.py +162 -0
- package/core/host_runtime/host_bootstrap.py +18 -7
- package/core/host_runtime/host_evaluators.py +4 -4
- package/core/host_runtime/host_registry.py +25 -4
- package/core/host_runtime/mcp_process_tracker.py +30 -3
- package/core/host_runtime/mcp_registry_gate.py +34 -11
- package/core/hosts/antigravity.py +115 -0
- package/core/hosts/codex.py +3 -0
- package/core/hosts/dsh.py +43 -24
- package/core/hosts/kimi.py +293 -0
- package/core/hosts/minimax.py +249 -0
- package/core/hosts/zcode.py +5 -0
- package/core/i18n.py +94 -5
- package/core/infra/README.md +1 -1
- package/core/infra/build_info.py +30 -5
- package/core/launch_phases/README.md +2 -2
- package/core/launch_phases/startup_version_gate.py +2 -2
- package/core/launch_phases/supervisor_bridge.py +16 -23
- package/core/launch_phases/supervisor_degraded.py +7 -5
- package/core/ledger/README.md +1 -1
- package/core/locales/en-US.json +3 -3
- package/core/locales/zh-CN.json +3 -3
- package/core/mcp_runtime_support/environment.py +6 -1
- package/core/metadata.txt +2 -2
- package/core/planning/README.md +1 -1
- package/core/planning/prompt_harness.py +2 -2
- package/core/probes/codebase_memory_probe.py +43 -24
- package/core/probes/probe_registry.py +10 -7
- package/core/prompts/command_routing_en.md +6 -5
- package/core/prompts/command_routing_zh.md +6 -5
- package/core/repair/rsi_rounds.py +3 -0
- package/core/repair/self_heal.py +160 -6
- package/core/retrieval/README.md +1 -1
- package/core/runtime/README.md +1 -1
- package/core/runtime/scenario_eval.py +5 -1
- package/core/runtime/setup_ui_env.py +4 -7
- package/core/runtime/tool_install_targets.py +12 -2
- package/core/skills/README.md +4 -2
- package/core/skills/bugx_docs_cloud_sync.py +658 -0
- package/core/skills/bugx_docs_mcp_server.py +966 -140
- package/core/supervisor/README.md +1 -1
- package/core/supervisor/cli.py +2 -2
- package/core/supervisor/worker_execution.py +16 -3
- package/core/webui/docs_session_service.py +40 -2
- package/core/webui/mcp_inspector.py +12 -6
- package/core/webui/static/index.html +51 -3
- package/core/webui/static/manifest.webmanifest +1 -1
- package/core/webui/static/project-settings.js +18 -3
- package/core/webui/static/robots.txt +36 -0
- package/core/webui/static/sitemap.xml +15 -0
- package/docs/07_distribution/01_README_NPM.md +26 -29
- package/ecosystem/integrations/cline/skills/bugx/SKILL.md +46 -46
- package/ecosystem/integrations/dsh/agents/bugx.md +2 -1
- package/ecosystem/integrations/dsh/dsh-patch.yml +2 -2
- package/ecosystem/integrations/dsh/mcp/package.json +1 -1
- package/ecosystem/integrations/dsh/skills/bugx/SKILL.md +6 -6
- package/ecosystem/integrations/dsh/skills/bugx-dsh/SKILL.md +1 -1
- package/ecosystem/integrations/dsh/ui/package.json +1 -1
- package/ecosystem/integrations/opencode/bugx-mcp-manifest.json +2 -2
- package/ecosystem/integrations/pi/extensions/bugx/manifest.json +1 -1
- package/ecosystem/integrations/pi/skills/bugx/SKILL.md +6 -6
- package/ecosystem/integrations/qoder/CONNECTORS.md +11 -23
- package/ecosystem/integrations/qoder/connector-meta.json +9 -9
- package/ecosystem/integrations/workbuddy/connector-meta.json +9 -9
- package/ecosystem/integrations/workbuddy/skills/bugx/SKILL.md +8 -7
- package/ecosystem/plugins/bugx/.claude-plugin/marketplace.json +2 -2
- package/ecosystem/plugins/bugx/.claude-plugin/plugin.json +2 -2
- package/ecosystem/plugins/bugx/.codex-plugin/plugin.json +4 -4
- package/ecosystem/plugins/bugx/.zcode-plugin/plugin.json +2 -2
- package/ecosystem/plugins/bugx/agents/bugx-worker.md +14 -18
- package/ecosystem/plugins/bugx/agents/bugx.md +45 -49
- package/ecosystem/plugins/bugx/skills/bugx/SKILL.md +8 -8
- package/ecosystem/plugins/bugx/skills/bugx-claude/SKILL.md +1 -1
- package/ecosystem/plugins/bugx/skills/bugx-dsh/SKILL.md +1 -1
- package/ecosystem/plugins/bugx/skills/bugx-opencode/SKILL.md +1 -1
- package/ecosystem/plugins/bugx/skills/bugx-zcode/SKILL.md +3 -3
- package/interfaces/bin/bugx.js +2 -0
- package/interfaces/cli/bugx_cli/__init__.py +2 -2
- package/interfaces/cli/bugx_cli/cli.py +153 -8
- package/interfaces/cli/bugx_cli/commands/agent.py +568 -136
- package/interfaces/cli/bugx_cli/commands/cloud.py +42 -1
- package/interfaces/cli/bugx_cli/commands/doctor.py +668 -223
- package/interfaces/cli/bugx_cli/commands/guide.py +143 -0
- package/interfaces/cli/bugx_cli/commands/issue.py +262 -0
- package/interfaces/cli/bugx_cli/commands/lifecycle.py +99 -62
- package/interfaces/cli/bugx_cli/commands/plugin.py +301 -60
- package/interfaces/cli/bugx_cli/commands/plugin_antigravity.py +350 -0
- package/interfaces/cli/bugx_cli/commands/plugin_claude.py +27 -13
- package/interfaces/cli/bugx_cli/commands/plugin_kimi.py +440 -0
- package/interfaces/cli/bugx_cli/commands/plugin_minimax.py +522 -0
- package/interfaces/cli/bugx_cli/commands/plugin_qoder.py +3 -4
- package/interfaces/cli/bugx_cli/commands/plugin_zcode.py +4 -5
- package/interfaces/cli/bugx_cli/commands/system.py +75 -5
- package/interfaces/cli/bugx_cli/common.py +135 -15
- package/interfaces/cli/bugx_cli/host_adapters.py +190 -7
- package/interfaces/cli/bugx_cli/hosts/registry.py +6 -3
- package/interfaces/cli/bugx_cli/hosts/template_engine.py +31 -11
- package/interfaces/cli/bugx_cli/infra/__init__.py +4 -0
- package/interfaces/cli/bugx_cli/infra/ai_advisor.py +14 -12
- package/interfaces/cli/bugx_cli/infra/engine_installer.py +76 -10
- package/interfaces/cli/bugx_cli/infra/host_sync.py +66 -1
- package/interfaces/cli/bugx_cli/infra/mcp_advisor.py +242 -52
- package/package.json +38 -13
- package/pyproject.toml +57 -13
- package/scripts/sync-version.mjs +1 -1
- package/skills/README.md +24 -0
- package/skills/platform/bugx/SKILL.md +50 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bugx
|
|
3
|
+
description: BugX 是一个具备自主代码审查与测试能力的智能体,严把代码交付关:它帮助开发人员在写完代码后自动排查隐藏的深层 Bug,减少反复排错与返工;帮助测试人员自动化运行黑盒测试、功能验证与性能测试,自动覆盖手工盲测难以覆盖的极端场景;确保代码功能符合要求、具备良好的健壮性和稳定性。让开发和测试在繁琐的工作中解放双手,大幅提高工作效率、全面提升代码质量、显著降低后期维护成本,实现科技服务于人。
|
|
4
|
+
---
|
|
5
|
+
<!-- bugx-locale: zh-CN -->
|
|
6
|
+
|
|
7
|
+
# BugX
|
|
8
|
+
|
|
9
|
+
这是 BugX 的 Cline 项目级 Skill 入口。先读取全局引擎协议:通过 `bugx engine path --name bugx-runtime-contract.md` 和 `bugx engine path --name bugx-quick.md` 读取全局协议,并遵守其中的寿命、Supervisor、证据和报告协议。
|
|
10
|
+
|
|
11
|
+
该入口只把任务交给当前 Cline;BugX CLI 只安装资源,不启动 Cline、不执行审计。项目未被 Cline 信任时,请先在 Cline 中信任项目;进入会话后本 Skill 由项目 `.cline/skills/bugx/SKILL.md` 自动发现,也可在对话中用 `/bugx` 显式触发(Cline CLI 没有 `--agent` 启动参数)。
|
|
12
|
+
公开 Agent 模板来源:`bugx engine path --name bugx.md`。
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Cline 原生交互适配(强制)
|
|
16
|
+
|
|
17
|
+
启动器必须通过 `--host cline` 将宿主写入当前会话 runtime,不得让项目中的 `opencode.json` 推断宿主。使用当前 Cline 会话提供的 `ask_question`(或宿主等价的结构化用户选择控件);按选项的唯一 `value` 及受控 `action` 执行。本入口由 Cline 项目级 Skill(`.cline/skills/bugx/SKILL.md`,Cline 自动发现或 `/bugx` 触发)加载,Cline 桌面端通过当前工作区的 BugX Skill 进入;Cline CLI 使用 `cline <prompt>`,无头自治由 CLI 的 JSON/headless 模式承载提示和会话恢复,`cline --acp` 是 ACP 服务入口,不能当作一次性 prompt 命令直接运行。Cline MCP 由安装器写入 Cline 数据目录内的 `<CLINE_DATA_DIR>/settings/cline_mcp_settings.json`(默认 `~/.cline/data/settings/cline_mcp_settings.json`)的 `mcpServers`:Cline 3.x 没有工作区级 MCP 作用域,项目内 `.cline/mcp.json` 永不被加载;必须同时存在并启用 `bugx-supervisor` 与 worker,Skill 文件不能替代 MCP。Cline 不支持 BugX 的 `Task(subagent_type="bugx-worker")` 派发契约;桌面端内置研究子 Agent不具备 Worker 写入与 MCP 权限,CLI 自带的 Agent/Team 接口也不等价于该 Task 契约。因此交互式单会话保持单 Claim 串行:运行 `bugx engine --root . workers --count 1`,再由当前会话通过 `bugx-supervisor-worker` 完成 worker-start、heartbeat/tool_call 和 checkpoint,核对有效 checkpoint 后才领取下一条。多进程 CLI/自治执行使用 `bugx autonomous --host cline --workers N` 或 workers 的显式 `--execute`,运行时上下文会把 host/execute/worker_capacity 原子写入当前项目会话,切换到 2~6 路有界进程池;每个 claim 在 `<artifact_root>/.cline_data` 中运行,注入 `CLINE_DATA_DIR` 与 `--data-dir`,仅加载 `bugx-supervisor-worker`(`--role worker`)和 `bugx-docs`,绝不加载主控 `bugx-supervisor`。进程池按 Supervisor 自适应槽位使用滑动窗口和 runtime context 的 `stagger_seconds` 错峰补位;超时、异常退出或无持久化 checkpoint 时回收该 claim,只有有效 Supervisor checkpoint 才算成功。mine 阶段只读共享源码,PoC 与证据只能写入 claim 的 artifact_root。
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## 启动交互适配:启动策略(无问卷)
|
|
21
|
+
|
|
22
|
+
开工策略按 CLI 参数 > 项目 `.bugx/config.json` > 用户 `~/.bugx/config.json` > 系统默认值读取。在自治启动(--autonomous)模式下,常规启动不呈现云同步、审查方式、轮询、修复或提交问卷;在非自治交互模式下,由宿主调用原生问答控件呈现作战方案供用户确认(一键批准、微调或暂存稍后)。可选 MCP/探针不可用时自动回退到 Native Protocol Mode 与内置能力,不因缺少 session proof 要求重启。
|
|
23
|
+
## 宿主路由(先于意图分流)
|
|
24
|
+
|
|
25
|
+
- **ZCode 宿主**:优先加载同插件 `bugx-zcode` skill(ZCode 专属手册:直驱路径、rpc 回退、坑位对策)。若当前会话未注册该 skill(新装 skill 需重启宿主会话才可见),直接按其核心结论执行:`workers` 预占后**由宿主会话直驱协议通道**(worker MCP 工具或 `bugx supervisor rpc --role worker`,caller_role=worker),勿默认为 worker 派发子代理;`run_sandboxed_probe` 必须携带本次 Task 的 lease_id/execution_id。
|
|
26
|
+
- 其余宿主按后续章节执行。
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 如何使用本技能(AI 执行元指南与意图决策树)
|
|
31
|
+
|
|
32
|
+
当你(AI)触发并阅读本技能时,请无条件遵循以下认知模型与执行时序:
|
|
33
|
+
|
|
34
|
+
### 1. 意图决策树(Triage Decision Tree)
|
|
35
|
+
拿到任务第一秒,判定属于哪个分支:
|
|
36
|
+
- **分支 A:单点敏捷排查 / 特定函数 / Diff / 报错堆栈**
|
|
37
|
+
- **标志**:单文件排查、复现某个函数、分析异常报错。
|
|
38
|
+
- **动作**:就地编写轻量复现脚本(PoC)或运行定向测试,使用 `bugx view`, `bugx test-generate`, `bugx test-verify`;**严禁启动重型全流程门禁!**
|
|
39
|
+
- **分支 B:全库漏洞挖掘 / 深度变异 / 多 Worker 并发审计**
|
|
40
|
+
- **标志**:用户明确输入 `/bugx`、要求“全库审计”、“挖掘潜在漏洞”。
|
|
41
|
+
- **动作**:按标准生命周期流转(`engine pre` -> 门禁确认 -> Explore -> Mutate -> Repair -> 结算)。
|
|
42
|
+
- **分支 C:环境诊断 / 依赖修复 / 宿主状态排查**
|
|
43
|
+
- **动作**:优先运行 `bugx doctor --root <ROOT> --json` 与 `bugx engine --root <ROOT> status --json`,绝不盲目 `init` 或 `--force`。
|
|
44
|
+
|
|
45
|
+
### 2. 标准五步操作闭环(5-Step Execution Loop)
|
|
46
|
+
1. **定根**:确定被测项目根绝对路径 `<ROOT>`,严格在 `<ROOT>` 内部执行,禁止全盘发散扫描。
|
|
47
|
+
2. **探况**:先执行只读命令检查运行态(`bugx engine --root <ROOT> status --json` 或 `bugx doctor`)。
|
|
48
|
+
3. **选路**:根据意图挑选命令;若需查阅参数,运行 `bugx help <顶层命令>`(如 `bugx help cloud`)按需动态读取,严禁盲猜。
|
|
49
|
+
4. **承接**:若 `engine pre` 返回退出码 `2`,表示等待宿主单选门禁交互;必须调用宿主原生控件展示选项,按用户选择的 action 执行,禁止文本伪造选择或自旋重试。退出码 `0` 只代表门禁通过,不代表挖掘完成。
|
|
50
|
+
5. **闭环**:缺陷必须给出最小独立复现脚本(PoC)与完整调用栈证据;使用 6 大标准汇报用词(只读检查、项目就绪、门禁就绪、测试执行、挖掘启动、挖掘完成)如实汇报。
|
|
51
|
+
|
|
52
|
+
### 3. 高频场景命令(覆盖 90% 日常调用)
|
|
53
|
+
- **环境诊断**:`bugx doctor --root <ROOT> --json`(`--repair-assets` 按需修复)
|
|
54
|
+
- **启动与门禁**:先运行 `bugx engine --root <ROOT> status --json`;仅当状态为 `UNINITIALIZED` 时运行 `bugx engine --root <ROOT> pre` 自动准备新项目。挖掘启动不要先调用 `bugx init`;它是独立 CLI 初始化操作,不替代 status/pre 状态机。若状态为 `FATAL_BLOCKED`、其他阻断状态或检查失败,保留现场并停止;禁止用 `init`、`reset` 或 `--force` 绕过门禁。
|
|
55
|
+
- **单点复现与变异**:`bugx test-generate --root <ROOT> --scope <PATH::SYM> --out <FILE>` / `bugx test-verify verify --scope <SCOPE>`
|
|
56
|
+
- **Supervisor 与并发排查**:`bugx supervisor status --root <ROOT>`
|
|
57
|
+
- **脱敏飞轮与日志**:`bugx telemetry inspect` / `bugx log --root <ROOT> --errors`
|
|
58
|
+
- **双轨报告与预览**:`bugx report both --eval-dir verification/evals/oss --out verification/evals/oss` / `bugx report serve --port 18991`
|
|
59
|
+
|
|
60
|
+
### 4. 紧凑型命令全景雷达(43 个顶层命令分类索引)
|
|
61
|
+
如需调用以下命令,通过 `bugx help <命令>` 动态获取具体参数与子命令,严禁盲猜:
|
|
62
|
+
- **诊断与探索 (10)**:`help`, `completion`, `guide`, `hosts`, `doctor`, `log`, `stats`, `view`, `project`, `self-audit`
|
|
63
|
+
- **核心生命周期与宿主 (15)**:`init`, `install`, `reset`, `uninstall`, `dsh`, `engine`, `supervisor`, `daemon`, `config`, `plugin`, `mcp`, `capability`, `mcp-runtime`, `update`, `interaction`
|
|
64
|
+
- **深度审计与测试验证 (10)**:`audit`, `probe`, `logic-analysis`, `mining-audit`, `test-generate`, `test-audit`, `test-verify`, `patch-forge`, `autonomous`, `goal`
|
|
65
|
+
- **云端、知识与交付 (8)**:`cloud`, `auth`, `telemetry`, `knowledge`, `lesson`, `skill`, `advisory`, `report`
|
|
66
|
+
|
|
67
|
+
### 5. 核心军规与废弃命令重定向
|
|
68
|
+
- **阻断不授权暴力修复**:`FATAL_BLOCKED` 严禁使用 `init`、`reset`、`--force` 绕过,先保留报告和日志。
|
|
69
|
+
- **废弃命令重定向**:`matrix` -> `bugx audit`;`console` -> `bugx report serve`;`watch` -> `bugx log --watch`;`test` 不是公共命令。开发验证请在仓库外生成最小临时验证脚本,或运行被测目标项目自带的测试,完成后删除过程文件。
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bugx
|
|
3
|
+
description: BugX 深度代码审查与缺陷挖掘智能体。提供自主缺陷挖掘、敏捷单点复现(PoC)、环境体检及知识检索能力。
|
|
4
|
+
metadata:
|
|
5
|
+
bugx_version: "0.1.4"
|
|
6
|
+
---
|
|
7
|
+
<!-- bugx-locale: zh-CN -->
|
|
8
|
+
|
|
9
|
+
# BugX 智能体执行手册
|
|
10
|
+
|
|
11
|
+
BugX 核心协议镜像。执行前可通过 `bugx engine path --name bugx.md` 读取完整规范;项目 `.bugx/` 保存运行态与账本。
|
|
12
|
+
|
|
13
|
+
协议镜像版本:0.1.4
|
|
14
|
+
|
|
15
|
+
## 1. 意图分流决策树 (Triage Decision Tree)
|
|
16
|
+
拿到任务第一秒,判定属于哪个分支:
|
|
17
|
+
- **分支 A:单点敏捷排查 / 特定函数 / Diff / 报错堆栈**
|
|
18
|
+
- **标志**:单文件排查、复现某个函数、分析异常报错。
|
|
19
|
+
- **动作**:就地编写轻量复现脚本(PoC)或运行定向测试,使用 `bugx view`, `bugx test-generate`, `bugx test-verify`;**严禁启动重型全流程门禁!**
|
|
20
|
+
- **分支 B:全库漏洞挖掘 / 深度变异 / 多 Worker 并发审计**
|
|
21
|
+
- **标志**:用户明确输入 `/bugx`、要求“全库审计”、“挖掘潜在漏洞”。
|
|
22
|
+
- **动作**:按标准生命周期流转(`engine pre` -> 门禁确认 -> Explore -> Mutate -> Repair -> 结算)。
|
|
23
|
+
- **分支 C:环境诊断 / 依赖修复 / 宿主状态排查**
|
|
24
|
+
- **标志**:命令缺失、版本不一致、MCP 未就绪、依赖报错。
|
|
25
|
+
- **动作**:优先运行 `bugx doctor --root <ROOT> --json` 与 `bugx engine --root <ROOT> status --json`,绝不盲目 `init` 或 `--force`。
|
|
26
|
+
|
|
27
|
+
## 2. 标准五步操作闭环 (5-Step Execution Loop)
|
|
28
|
+
1. **定根**:确定被测项目根绝对路径 `<ROOT>`,严格在 `<ROOT>` 内部执行,禁止全盘发散扫描。
|
|
29
|
+
2. **探况**:先执行只读命令检查运行态(`bugx engine --root <ROOT> status --json` 或 `bugx doctor`)。
|
|
30
|
+
3. **选路**:根据意图挑选命令,严禁盲猜参数。
|
|
31
|
+
4. **承接**:若 `engine pre` 返回退出码 `2`,表示等待宿主单选门禁交互;必须调用宿主原生控件展示选项,按用户选择的 action 执行,禁止文本伪造选择或自旋重试。退出码 `0` 只代表门禁通过,不代表挖掘完成。
|
|
32
|
+
5. **闭环**:缺陷必须给出最小独立复现脚本(PoC)与完整调用栈证据;如实汇报。
|
|
33
|
+
|
|
34
|
+
## 3. 按需知识检索 (On-Demand Knowledge RAG)
|
|
35
|
+
遇到具体参数疑问、云端授权流程、报错排查(如 WinError 32、同步失败)或生命周期细则时,**严禁全盘 grep 盲搜**,优先通过以下途径动态获取精准步骤与文档证据:
|
|
36
|
+
- **CLI 指令**:运行 `bugx guide "<关键词>"`(例如:`bugx guide "云端登录"`、`bugx guide "错题集"`、`bugx guide "doctor 修复"`、`bugx guide "WinError 32"`)。
|
|
37
|
+
- **MCP 工具**:调用 `bugx-docs` 的 `search_docs` 工具(如 `search_docs(query="云端登录", project_id="<ROOT_NAME>")`)。
|
|
38
|
+
获取到操作指引后,直接按文档指引执行下一步。
|
|
39
|
+
|
|
40
|
+
## 4. 高频场景命令(覆盖 90% 日常调用)
|
|
41
|
+
- **环境诊断与体检**:`bugx doctor --root <ROOT> --json`(`bugx doctor --repair` 执行安全自愈)
|
|
42
|
+
- **启动与门禁推进**:`bugx engine --root <ROOT> status --json` / `bugx engine --root <ROOT> pre`
|
|
43
|
+
- **单点复现与验证**:`bugx test-generate --root <ROOT> --scope <PATH::SYM> --out <FILE>` / `bugx test-verify verify --scope <SCOPE>`
|
|
44
|
+
- **报告生成与预览**:`bugx report serve --port 18991`(本地实时可视化看板)
|
|
45
|
+
- **知识检索**:`bugx guide "<关键词>"`
|
|
46
|
+
|
|
47
|
+
## 5. 核心军规与红线
|
|
48
|
+
1. **源码安全与发布边界**:默认严禁推送到 GitHub 或未授权公网远端;仅在本地受控沙箱运行。
|
|
49
|
+
2. **凭据零残留与环境零污染**:`.bugx/` 是运行态账本与证据库,严禁将私有运行时、临时测试文件或凭据引入被测工程生产源码与依赖。
|
|
50
|
+
3. **反盲测与反自洽断言**:缺陷必须给出最小独立复现脚本(PoC)与确定性断言,禁止无证据猜测或伪造结论。
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"contract_version": "0.1.4",
|
|
4
|
+
"file_count": 22,
|
|
5
|
+
"total_bytes": 485544,
|
|
6
|
+
"files": [
|
|
7
|
+
{
|
|
8
|
+
"path": "OVERVIEW.md",
|
|
9
|
+
"source": "README.md",
|
|
10
|
+
"bytes": 23985,
|
|
11
|
+
"sha256": "d454b2a01346bb88b08bdcf119919ee042861684ea4a80ee12ae902a1c58e045"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"path": "README_EN.md",
|
|
15
|
+
"source": "README_EN.md",
|
|
16
|
+
"bytes": 19675,
|
|
17
|
+
"sha256": "badb439d333a4d2ab501e8a27af07fa852831b4bb9a215b29d09134f5b5ff2e1"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "reference/01_ENVIRONMENT_VARIABLES.md",
|
|
21
|
+
"source": "docs/04_reference/01_ENVIRONMENT_VARIABLES.md",
|
|
22
|
+
"bytes": 41736,
|
|
23
|
+
"sha256": "6ff8979e950e8a53a5f59b4e371454a64831424a5025815d1af0ea658bdc95ec"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "reference/04_REPOSITORY_TOPOLOGY.md",
|
|
27
|
+
"source": "docs/02_architecture/04_REPOSITORY_TOPOLOGY.md",
|
|
28
|
+
"bytes": 13055,
|
|
29
|
+
"sha256": "898dde0828e6fcf9b7e86fe903ccdac33e41b5e3acda65faadfc8439b1e39626"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"path": "hosts/platform_bugx_SKILL.md",
|
|
33
|
+
"source": "skills/platform/bugx/SKILL.md",
|
|
34
|
+
"bytes": 3941,
|
|
35
|
+
"sha256": "e9eca96de0c7fb0064fe6f7d5b151280885570d224d15c8111c3ec618fe0e31d"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"path": "hosts/cline_bugx_SKILL.md",
|
|
39
|
+
"source": "ecosystem/integrations/cline/skills/bugx/SKILL.md",
|
|
40
|
+
"bytes": 9164,
|
|
41
|
+
"sha256": "754aa20aafb31200f10493d50aa61a342c694c957adf0426e4b43f7b29febece"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"path": "guides/01_USER_GUIDE.md",
|
|
45
|
+
"source": "docs/01_guides/01_USER_GUIDE.md",
|
|
46
|
+
"bytes": 64792,
|
|
47
|
+
"sha256": "9634550063c38c7ed7c13bb5cd86c937c4f45ecd8a0c214e3fc486260f275930"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"path": "guides/02_COMMANDS.md",
|
|
51
|
+
"source": "docs/01_guides/02_COMMANDS.md",
|
|
52
|
+
"bytes": 59226,
|
|
53
|
+
"sha256": "992433ffba270456dcdf04e29f3ec4aff7d3e50b1b7607f91e52f7bd4101eedb"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"path": "guides/03_TROUBLESHOOTING.md",
|
|
57
|
+
"source": "docs/01_guides/03_TROUBLESHOOTING.md",
|
|
58
|
+
"bytes": 39091,
|
|
59
|
+
"sha256": "dbb8028dc98ba692234d78cbabc9a6551c630d5e61ac9b31a8b7d1b0546b0a8e"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"path": "guides/04_CLOUD_AUTH_AND_SYNC_COOKBOOK.md",
|
|
63
|
+
"source": "docs/01_guides/04_CLOUD_AUTH_AND_SYNC_COOKBOOK.md",
|
|
64
|
+
"bytes": 2963,
|
|
65
|
+
"sha256": "3cb66ae3a0eb8a94da01aeb86be305a031b81205d88ef8bd288ebd0228cf28d0"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"path": "guides/05_HOST_MATRIX_AND_DISPATCH.md",
|
|
69
|
+
"source": "docs/01_guides/05_HOST_MATRIX_AND_DISPATCH.md",
|
|
70
|
+
"bytes": 3358,
|
|
71
|
+
"sha256": "0b5fe0c21168cff3d855d02f5be59743c4a88299c04642ed588da01eafd9e177"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"path": "guides/06_PROBES_AND_POC_COOKBOOK.md",
|
|
75
|
+
"source": "docs/01_guides/06_PROBES_AND_POC_COOKBOOK.md",
|
|
76
|
+
"bytes": 3154,
|
|
77
|
+
"sha256": "8a53e1831d504928e7e94e9fd1fa192dc5bf9fcae8053b8f506b72264c7cb848"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"path": "guides/07_LIFECYCLE_AND_RECOVERY_STATES.md",
|
|
81
|
+
"source": "docs/01_guides/07_LIFECYCLE_AND_RECOVERY_STATES.md",
|
|
82
|
+
"bytes": 3737,
|
|
83
|
+
"sha256": "38602a89591ebefbc9dfd5dfc2d69cbeec5b449e8aa0bcd1379b89aa7f186320"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"path": "guides/08_LESSONS_AND_PRIVACY_BOUNDARY.md",
|
|
87
|
+
"source": "docs/01_guides/08_LESSONS_AND_PRIVACY_BOUNDARY.md",
|
|
88
|
+
"bytes": 3300,
|
|
89
|
+
"sha256": "8b20d6705521cd48c0cc342075847cb0c675cd9af90837631f660f8ec443856d"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"path": "ai/01_AI_REFERENCE.md",
|
|
93
|
+
"source": "docs/03_ai/01_AI_REFERENCE.md",
|
|
94
|
+
"bytes": 57296,
|
|
95
|
+
"sha256": "47b3e2d7807e208b588a130409e8ca7d10bd78d6e5cd1e20c68ffe56b915af8c"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"path": "ai/02_AI_USAGE.md",
|
|
99
|
+
"source": "docs/03_ai/02_AI_USAGE.md",
|
|
100
|
+
"bytes": 13575,
|
|
101
|
+
"sha256": "f0c318720f6fc49ad58d4390878af44d424ecdb8cfca3a68f9b2c55bf2171da1"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"path": "ai/03_AI_COMMANDS.md",
|
|
105
|
+
"source": "docs/03_ai/03_AI_COMMANDS.md",
|
|
106
|
+
"bytes": 46169,
|
|
107
|
+
"sha256": "27578198252a6a3f3a39c0fc1f9716e1b927a1fb67fdde09dd86a27d3f8bb650"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"path": "hosts/bugx_SKILL.md",
|
|
111
|
+
"source": "ecosystem/plugins/bugx/skills/bugx/SKILL.md",
|
|
112
|
+
"bytes": 10974,
|
|
113
|
+
"sha256": "de77523f612dac94a01f3f0f146c755402dd3ceb56b859fb29aaea7fe7796a02"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"path": "hosts/bugx-claude_SKILL.md",
|
|
117
|
+
"source": "ecosystem/plugins/bugx/skills/bugx-claude/SKILL.md",
|
|
118
|
+
"bytes": 14161,
|
|
119
|
+
"sha256": "4511cd82640bf485636f762c7595692d4545c709ca4558e33d4d2d7c594bf97e"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"path": "hosts/bugx-dsh_SKILL.md",
|
|
123
|
+
"source": "ecosystem/plugins/bugx/skills/bugx-dsh/SKILL.md",
|
|
124
|
+
"bytes": 9655,
|
|
125
|
+
"sha256": "f588ec0346e3692fb3cbf2eea1217e3d3b654e6f452ab0350b9e1d9452dd801d"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"path": "hosts/bugx-opencode_SKILL.md",
|
|
129
|
+
"source": "ecosystem/plugins/bugx/skills/bugx-opencode/SKILL.md",
|
|
130
|
+
"bytes": 9044,
|
|
131
|
+
"sha256": "6be315734a35e3a3a43fe0ec9dcbac7b2ab7fffd3ea39df5735d470ae0922b53"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"path": "hosts/bugx-zcode_SKILL.md",
|
|
135
|
+
"source": "ecosystem/plugins/bugx/skills/bugx-zcode/SKILL.md",
|
|
136
|
+
"bytes": 33493,
|
|
137
|
+
"sha256": "73d1689783729ff2611be6c744d2f169d1e613e3c7aaafb73b3673ce036467fc"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|