Logo Harness Node Splitter

Harness Node Splitter

Cộng đồng
AnthonyAlcaraz
harness-node-splitter

Split a workflow description into constrained harness nodes using the chapter's rule "nodes differ by tool surface, not by prompt." Given candidate operations each with a declared tool set, merge the ones whose tool surfaces overlap >= 80% (prompt variations of one role) and split the ones with distinct tool surfaces (different roles), then emit the per-node constrained context scope the harness enforces (tool surface + memory reads/writes + input/output contract). Implements the RedAI scanner-vs-validator distinction and the 80%-overlap Tip from Agentic Graph RAG Ch2. Use when turning a horizontal-workflow sketch into executable nodes. NOT for scheduling nodes into parallel phases (that is investigation-dag-planner, Ch5), NOT for deciding vertical-vs-horizontal (that is dual-graph-router), NOT for selecting which tools a query needs (that is rag-mcp-tool-selection, Ch6).

Tổng quan

Nhà phát hànhAnthonyAlcaraz
Kho mãagentic-graph-rag-skills
Tên kỹ năngharness-node-splitter
Sao
29
Bản fork
9
Tệp đi kèm
3
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được AnthonyAlcaraz công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Harness Node Splitter trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/architecture/harness-node-splitter
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills.git /tmp/agentic-graph-rag-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-graph-rag-skills/skills/architecture/harness-node-splitter .claude/skills/harness-node-splitter
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Harness Node Splitter trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Harness Node Splitter ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Harness Node Splitter không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Harness Node Splitter

Overview

The horizontal workflow graph says what the agent should do; the harness executes it. Before the harness can run anything, the workflow must be split into nodes with focused responsibilities. The chapter gives one rule that cuts through the design space:

Nodes differ by tool surface, not by prompt.

The sharpest example is security tooling. Kyle Polley's RedAI splits vulnerability discovery across two roles whose distinction is entirely tool-level. The scanner node holds a filesystem and threat-models source code (optimized for recall). The validator node holds a browser driver, an iOS simulator, a network stack, and a scripting runtime, and drives each candidate into a live environment. Swap the prompts and nothing changes — the validator can still drive the browser because it holds the tool. The role lives in the tool surface.

The chapter's Tip operationalizes this:

Before you add a node, list the tools it will call. If the list overlaps more than 80% with an existing node, you have a prompt variation of that node — merge them and vary the prompt. If the tool lists differ substantially, split.

This skill applies that rule to candidate operations and emits each node's constrained context scope — the tool surface it may invoke, the memory slices it reads/writes, and the input/output contract the schema validator holds it to (three of the harness's six surfaces). A tool-less reasoning node (like Example 2-3's classify vs analyze) is distinguished by prompt and DAG position, not tools, so tool-less nodes default to split.

When to Use

  • Turning a horizontal-workflow sketch into executable nodes
  • Auditing an existing workflow for the common failure mode: one retrieval-and-reasoning node that both queries the graph and does causal analysis, with neither pass at specialist quality
  • Deciding whether a proposed new node is a real role or a prompt variation of an existing one (the Tip as a pre-add gate)

Phrases that should invoke this skill: "split this workflow into nodes", "should this be one node or two", "nodes differ by tool surface", "merge or split these nodes", "the 80% tool-overlap rule", "constrain the node's context".

When NOT to Use

  • Scheduling nodes into parallel phases. Once nodes exist, ordering them into topological phases with parallelism is investigation-dag-planner (Ch5).
  • Deciding vertical vs horizontal. That first-hop routing is dual-graph-router; this skill runs after a request has routed to horizontal/both.
  • Selecting which tools a query needs. Filtering a large tool registry for a query is rag-mcp-tool-selection (Ch6). This skill assumes each operation's tool set is already declared.
  • Writing the node prompts. This decides the node BOUNDARIES; the prompt content per node is a separate step.

Process

StepInputActionOutputVerification
1operation rows (id, node_type, tools, reads, writes, contracts)lib.operations_from_dicts(rows)list of Operationeach op has a tool list (possibly empty) and a node_type
2two tool setslib.tool_overlap(a, b)float in [0,1]identical sets → 1.0; disjoint → 0.0; empty+empty → 0.0
3operations + thresholdlib.split_nodes(ops, threshold=0.8)SplitResult (nodes, per-pair decisions)same-surface same-type ops merge; distinct-surface ops split
4a Nodelib.node_scope(node)dict: tool_surface / memory_reads / memory_writes / input_contract / output_schema / prompt_variantsscope names only that node's tools and memory, not the whole registry
5a candidate op + existing nodeslib.audit_operation(op, nodes)dict with verdict merge/split + reasonthe Tip as a pre-add gate

Rationalizations

Agent rationalizationDocumented rebuttal
"One retrieval-and-reasoning node is simpler — it queries the graph AND does the analysis."That is the exact failure mode the chapter names: "neither pass the quality a specialist node would." The query node holds a graph-read surface; the analysis node holds none. Different surfaces → split.
"These two nodes have different prompts, so they are different nodes."Different prompts on the SAME tool surface are one node with prompt variation at the input (the Tip). The role is the tool surface, not the wording. Merge and vary the prompt.
"Two reasoning nodes both call no tools — merge them, same (empty) surface."Tool-less nodes have no tool surface to key on; their role lives in prompt + DAG position. Example 2-3 keeps classify and analyze separate for this reason. This skill scores empty+empty as 0.0 → split by default.
"Split everything — more nodes is more modular."Over-splitting fragments a single role across nodes that share a tool surface, adding coordination overhead for no leverage. If the tool lists overlap ≥ 80%, it is one role.
"Jaccard overlap is too crude for the real tool surface."Production derives the true surface from the typed tool registry (harness surface 3) and may weight by cost/risk. The merge/split CONTRACT (≥ threshold → merge) is the stable seam; swap the scorer, keep the contract.

Red Flags

  • A node with a graph-read tool AND a causal-analysis task. This is the retrieval-and-reasoning conflation. Split into a retrieval node (holds the graph-read surface) and a reasoning node (holds none).
  • Zero merges on a workflow with obvious prompt variants. Either every operation genuinely has a distinct surface, or the tool lists were declared too finely — check that "get latency" and "get CPU" both declare the same metrics tool.
  • Everything merged into one node. The tool lists were declared too coarsely (every op claims "aws"); declare the specific tool each op actually calls.
  • A merged node whose prompt variants have incompatible input contracts. Merging is safe only when the variants operate on the same input surface; a contract mismatch means these were different roles after all.
  • CLI --help exits non-zero. SKILL.md / CLI mismatch; the multi-harness invariant is broken.

Non-Negotiable Verification

  1. Run the benchmark battery.

    python cli.py benchmark

    Confirm 9 sample operations collapse to 8 nodes, get_metrics+get_cpu merge (identical tool surface), the RedAI scanner/validator pair stays split (overlap 0.0), and classify/analyze stay separate reasoning nodes.

  2. Inspect the split visually.

    python cli.py split

    Confirm the [MERGED] node fuses the two metric-query operations and lists both prompt variants, and that the two disjoint execution nodes remain apart.

  3. Run the Tip as a pre-add gate.

    python cli.py overlap --a cloudwatch_get_metric_data --b cloudwatch_get_metric_data
    python cli.py overlap --a filesystem --b browser_driver network_stack

    The first must verdict merge (1.0), the second split (0.0).

  4. JSON scope round-trips.

    python cli.py split --json | python -c "import json,sys; json.load(sys.stdin)"

    No exception means the CLI is harness-portable and each node scope serializes.

Security Posture

  • Prompt injection. Operation tasks and tool names are author-controlled workflow metadata. This skill only tokenizes tool names and compares sets; it never executes a task or invokes a tool. If operation definitions are ingested from untrusted sources, sanitize tools and task before splitting — a malicious tool name could bias a merge, but cannot execute.
  • Least privilege by construction. The whole point of the per-node scope is that a node sees only its own tool surface and its own memory slice, not the full registry or the full vertical graph. Honoring node_scope at execution time is how the harness enforces least privilege (composes with capability-authorization-gate, Ch3, and subgraph access control, Ch8).
  • Privilege escalation. No shell invocation, no eval, no dynamic import, no file writes outside the read-only bundled sample-workflow.json. Merging two nodes UNIONS their tool surfaces — review a merged node's combined surface so a merge does not silently grant a node more capability than either input had.

Source Attribution

Distilled from Agentic GraphRAG (O'Reilly, by Anthony Alcaraz and Sam Julien), Chapter 2 — Agentic Graph Architecture Foundations:

  • "The Horizontal Workflow Graph" — reasoning/execution/decision/validation node responsibilities (Example 2-3).
  • "Defining the harness" — the six harness surfaces; the per-node scope this skill emits maps to surfaces 3 (tool registry), 4 (memory interface), and 5 (schema validator).
  • "Splitting a workflow into nodes" — "nodes differ by tool surface, not by prompt"; the RedAI scanner-vs-validator worked example; the 80%-tool-overlap Tip.

This Generator-pattern skill runs after dual-graph-router routes a request to the horizontal graph and before investigation-dag-planner schedules the resulting nodes into phases.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Harness Node Splitter làm được gì?

Split a workflow description into constrained harness nodes using the chapter's rule "nodes differ by tool surface, not by prompt." Given candidate operations each with a declared tool set, merge the ones whose tool surfaces overlap >= 80% (prompt variations of one role) and split the ones with distinct tool surfaces (different roles), then emit the per-node constrained context scope the harness enforces (tool surface + memory reads/writes + input/output contract). Implements the RedAI scanner-vs-validator distinction and the 80%-overlap Tip from Agentic Graph RAG Ch2. Use when turning a ho...

Vì sao nên dùng Harness Node Splitter trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Harness Node Splitter là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Harness Node Splitter trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/architecture/harness-node-splitter. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Harness Node Splitter?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Harness Node Splitter với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Harness Node Splitter với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Harness Node Splitter có miễn phí không?

Có. Kỹ năng này được AnthonyAlcaraz phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇