Skip to main content
Glama

tailtest-cline

你负责构建,我们负责覆盖。同时支持 8 种以上的编辑器。

tailtest-cline 是一个 Cline 插件,每当代理编辑源文件时,它都会自动生成并运行测试。它与其它 tailtest 变体使用相同的 R1-R15 规则层。对抗性测试模式 (V13) 从第一天起就已发布。

Cline 支持范围: VS Code、Cursor、JetBrains IDE、Antigravity、Zed、Neovim、VSCodium、Windsurf 以及 Cline CLI。一个插件,支持八种以上编辑器。

完整文档请见 tailtest.com/docs/cline

与其他变体有何不同

Cline 没有钩子(如 Claude Code 的 PostToolUse、Cursor 的 afterFileEdit、Codex 的 Stop)。相反,tailtest-cline 使用了三个 Cline 原生原语:

  • .clinerules/ 承载规则层(R1-R14 + R15 对抗模式)

  • tailtest-mcp 服务器(本仓库)为代理提供结构化工具:tailtest_setup、tailtest_scenario_plan、tailtest_classify_failures、tailtest_pick_template、tailtest_ping

  • 内存库 (tailtestContext.md) 在 Cline 会话中保存每个项目的配置文件

确定性策略(深度层级、R15 对抗计数、框架模板、文件路径)存在于 MCP 服务器代码中,而不是规则文本中。代理在需要脚手架时会调用这些工具,而不是在长时间的会话中依赖规则记忆。

Related MCP server: Qlane MCP

安装

三种安装路径:

1. Cline MCP 市场(推荐;一键安装)

在 IDE 中打开 Cline 的扩展面板。搜索 tailtest。点击安装。Cline 会自动克隆、安装依赖项并在 cline_mcp_settings.json 中注册服务器。

2. 直接通过 GitHub 安装

将 https://github.com/avansaber/tailtest-cline 粘贴到 Cline 的 MCP 服务器安装对话框中。Cline 会执行相同的克隆 + 安装 + 注册流程。

3. 手动编辑 cline_mcp_settings.json

{
  "mcpServers": {
    "tailtest": {
      "command": "python",
      "args": ["-m", "src.server"],
      "cwd": "/path/to/tailtest-cline/mcp_server",
      "alwaysAllow": [
        "tailtest_ping",
        "tailtest_scenario_plan",
        "tailtest_classify_failures",
        "tailtest_pick_template"
      ]
    }
  }
}

首次运行

安装后,在 Cline 聊天中输入:"set up tailtest in this project"。

Cline 会调用 tailtest_setup。该工具会检测语言/框架/运行器,写入 .clinerules/,写入 .clinerules/workflows/,初始化 memory-bank/tailtestContext.md,并初始化 .tailtest/config.json + .tailtest/session.json。幂等性:现有文件会被保留。

重要提示: Cline 不会在对话中途自动重新加载 .clinerules。请开始新的对话(或重新加载窗口)以激活。

两种操作模式

手动模式(默认)

你需要显式调用测试周期:

  • /tailtest-test <file> -- 在特定文件上运行周期

  • /tailtest hunt <file> -- 在特定文件上进行一次性对抗性测试

  • 或者使用自然语言(“测试我刚刚编辑的文件”)

每一步(文件写入、终端命令、MCP 调用)都会提示确认。对于初次使用的用户,这是更安全的默认设置。

自动模式(可选)

为以下操作启用 Cline 自动批准:编辑文件(工作区)、执行安全命令、使用 MCP 服务器。然后运行 /tailtest-mode auto 并重新加载。每次编辑后,tailtest 都会自动触发测试周期。

计划/执行模式(Cline 原生 UX 奖励)

Cline 的“计划/执行”切换映射到 tailtest 的 SCENARIO PLAN(场景计划)约定:计划模式生成 SCENARIO PLAN(只读);审查并修改;执行模式写入测试文件、运行它并应用 R12 分类。推荐用于高风险文件。

配置

.tailtest/config.json:

{
  "depth": "standard",
  "mode": "manual"
}

深度选项:

  • simple -- 2-3 个快乐路径场景

  • standard -- 5-8 个场景,包括 2 个以上的对抗性探测(默认)

  • thorough -- 10-15 个场景,包括 4 个以上的对抗性探测

  • adversarial -- 8-12 个偏向于破坏的场景

查看 tailtest.com/docs/config 获取所有选项,查看 tailtest.com/docs/adversarial 获取对抗模式详情。

其他 tailtest 变体

相同的 R1-R15 规则层,相同的对抗性测试模式,不同的宿主集成。本仓库是 Cline 变体。

查看 tailtest.com/demo/cline 获取此变体的实时演练,或查看 tailtest.com/comparison 获取所有四种变体的功能矩阵。

许可证

MIT。

Available Tools

5 tools
tailtest_classify_failuresA

Parse runner output (pytest, jest, etc.) into structured failure records and apply heuristic R12 classification. Returns failures with type (real_bug / environment / test_bug / unknown), reason, test name, file, line, error type, message, and a summary count per R12 category. The agent verifies or overrides the heuristic when context warrants.

Inputs: runner_output (required), runner.

tailtest_pick_templateA

Return the full framework R2 template for a given source file: language baseline scenarios, framework baseline scenarios, framework-specific test pattern (e.g., NestJS Test.createTestingModule, Spring @WebMvcTest, Flask test_client), and test file path pattern. Returns just language baseline when no framework matches.

Inputs: file_path (required), project_root.

tailtest_pingA

Health check. Returns server version and confirms the MCP server is reachable.

Inputs: no named parameters.

tailtest_scenario_planA

Return structured scaffolding the agent uses to write its SCENARIO PLAN: language, framework, depth, R15 adversarial count requirement, language and framework baseline scenarios, test file path, and prose instructions. The agent uses this scaffolding to compose the actual SCENARIO PLAN scenario lines.

Inputs: file_path (required), project_root.

tailtest_setupA

Bootstrap entry point for tailtest in a Cline project. Detects language / framework / runner, writes the .clinerules/ rule pack, writes .clinerules/workflows/ slash workflows, seeds Memory Bank with tailtestContext.md (a 7th file alongside the 6 core ones; existing files are not overwritten), and initialises .tailtest/config.json + session.json. Returns a structured report including the user-facing 'reload required' warning (Cline does not auto-reload .clinerules mid-conversation).

Inputs: project_root, mode.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool serves a distinct purpose: setup, health check, template selection, scenario planning, and failure classification. There is no overlap or ambiguity between them.

    Naming Consistency5/5

    All tools follow a consistent snake_case pattern with the prefix 'tailtest_' and a verb_noun structure (e.g., tailtest_classify_failures, tailtest_pick_template). No deviations.

    Tool Count5/5

    With 5 tools, the server is tightly scoped to test analysis and scaffolding. Each tool earns its place without being too few or too many for the domain.

    Completeness4/5

    The tools cover setup, health, template selection, scenario planning, and failure classification. While not a full test framework, it appears complete for its intended planning/analysis purpose. Minor gap: no tool for running tests or generating code.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      OpenTester is a testing execution engine designed for AI coding tools (Claude Code, Cursor, OpenCode, etc.). It provides a unified DSL format and MCP interface, enabling Agents to generate, execute, and manage test cases, achieving an automated "code-test-fix" workflow.
      29
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Integrates Qlane test management into AI coding editors, enabling agents to view projects, test targets, and test case counts, and plan tests for local diffs.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Provides coding agents with visibility into test health through tools for flaky test detection, test quality linting, and LLM evaluation harness, enabling them to triage failures, review test quality, and check prompt changes for regressions.
      9
      Apache 2.0