跳到正文
cccskills
免费在 GitHub 公开

kortix-harness-refinement

Review agent work histories to identify recurring failures, repeated discoveries, and stalled tasks. Improve the prompts, specialist agents, skills, tools, and memory that guide future work, then submit those changes separately for review.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

The continual-harness refinement protocol — how an agent inspects its recent trajectory for failure signatures and improves its own harness (agent prompts, sub-agents, skills, memory) in place, mid-session, landing changes on the session branch immediately and promoting them to `main` only through a change request. Load this skill when a refinement prompt arrives mid-session, when the `harness-reflector` agent runs, or whenever you decide your own scaffolding needs repair. The sub-agent fan-out in this skill is for the top-level `harness-reflector` run only; if you loaded this as a subagent, do the four passes yourself and skip the fan-out.

查看安装方法

适用场景

  • Addressing recurring command or tool failures
  • Recording findings that agents repeatedly rediscover
  • Turning repeated procedures into skills or tools
  • Reviewing shared agent configuration across sessions

包含的文件(1)

  • SKILL.md10.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

<skill name="kortix-harness-refinement"> <overview> Your **harness** is everything in this repo that shapes how agents work here. It has four components, all in git:
ComponentLocationWhat it is
Promptsagents/<name>.md (body)Each agent's instructions and strategy
Sub-agentsagents/*.mdSpecialist agents the orchestrator invokes
Skillsskills/<name>/SKILL.mdReusable routines: text heuristics and guides
Toolsmodules declared in kortix.yaml tools: (every harness); legacy harnesses/opencode/tools/*.ts (OpenCode only), harnesses/pi/extensions/*.ts (pi only)Executable code: wrappers, scripts, automations
Memorymemory/Persistent facts, strategies, observations

Projects created before 2026-09 keep agents, skills and tools under .kortix/opencode/ and memory under .kortix/memory/. Both layouts work. Edit files where they already are; put new files in the root layout.

A session runs one harness, OpenCode or pi, and a harness loads only its own tools directory. echo "${KORTIX_HARNESS:-opencode}" prints the one this session runs. Prompts, sub-agents, skills and memory serve both.

Refinement means: read your recent trajectory, find where the harness failed you, and fix the harness — not just the immediate task. A memory edit is readable on your next turn: memory is plain files. An edit to an agent prompt, skill, or tool reaches sessions once its change request merges; a running session loads it with kortix sessions reload <session id>. You do not restart, and the value compounds over the life of the project.

This protocol has two operating modes:

  1. In-session refinement (self-invoked) — YOU run it, inside your own working session, the moment a failure signature costs you twice. Also run a checkpoint on long sessions: after every ~25 turns of work, pause and scan your recent turns before continuing. You refine based on YOUR OWN trajectory, then resume the task.
  2. Project-level reflection — the harness-reflector agent runs on a cron, fans out session-reviewer sub-agents to work through every recent session's full history, aggregates their findings, and refines the shared harness on main via a change request. </overview>
<failure-signatures> Scan the trajectory window (your recent turns, or the digest) for these signatures. Each one names the component to fix:
  • Repeated tool/command failures — the same command or tool errors more than once, or you retried a broken approach. → Repair the tool, or record the working alternative in a skill.
  • Rediscovery loops — you (or another session) re-derived something a past session already knew (an API quirk, a file location, a decision). → Memory entry.
  • Stalled objectives — turns pass without progress toward the stated goal; you circled, re-read, or re-planned without acting. → Prompt guidance for the responsible agent, or a decomposition sub-agent.
  • Repeated multi-step patterns — you performed the same 3+ step sequence more than twice by hand. → Codify it: a skill (if guidance) or a tool (if executable).
  • Exception-raising code — an executable tool or script (a kortix.yaml tools: module, harnesses/opencode/tools/ or harnesses/pi/extensions/) raised; you worked around it instead of fixing it. → Repair the code now.
  • Missed opportunities — information or shortcuts visible in the trajectory that no component captured. → Whichever component fits. </failure-signatures>
<four-passes> Run four passes over the harness, one per component. Every pass is CRUD: create, update, or **delete**. Deletion is a first-class outcome — a harness accumulates cruft without it.

Pass 1 — Prompts (Δp). Reread the responsible agent's .md body against the identified failures. Tighten instructions that were ignored, add the missing rule, remove guidance that no longer earns its tokens. Keep prompts short; a prompt that only grows is a failing prompt.

Pass 2 — Sub-agents (ΔG). Create a sub-agent only for a pattern that recurred across the window AND needs its own scoped permissions or prompt. Edit sub-agents implicated in failures. Delete sub-agents that have not been invoked productively — check before keeping.

Pass 3 — Skills and tools (ΔK). Codify successful sequences from the trajectory into a skill (guidance) or a tool (executable). Repair every tool the trajectory shows raising exceptions. Prefer editing an existing skill over creating a near-duplicate. Keep skills one directory level deep under skills/ (nested SKILL.md files register as phantom entries).

Pass 4 — Memory (ΔM). Follow the kortix-memory skill's rubric with the memory tool: fill gaps the trajectory exposed, update stale entries, demote or delete entries about areas the project has moved past. Keep MEMORY.md in sync.

Scope discipline: fix what the trajectory shows. Do not speculatively rewrite components with no observed failure. Most refinement runs should touch one or two components, not all four. </four-passes>

<project-review-fanout> This section applies only to the top-level `harness-reflector` run. If you loaded this skill as a subagent, skip the fan-out and review the sessions yourself — the runtime rejects a subagent spawning a subagent ("Subagent depth limit reached").

For project-level reflection (the harness-reflector run), do not skim a digest and call it a review. Work through every session:

  1. Enumerate every session in the window: kortix sessions digest --since 24h --json (add --all for a first ever run). Note per session: id, agent, status, title, whether a live transcript is available.
  2. Fan out one session-reviewer sub-agent per session (batch a few at a time in parallel; review every session, skip none silently). Each reviewer gets the session id and returns a structured findings report. Reviewers gather the FULL picture for their session:
    • the transcript (available live for running sessions; for stopped sessions reconstruct from what persists — see next line),
    • the session's git branch: its commits, diffs, and files touched,
    • change requests the session opened and their review outcomes.
  3. Aggregate all reviewer reports. Deduplicate findings that recur across sessions — a failure signature seen in three sessions outranks one seen once. Rank by cost (turns wasted × sessions affected).
  4. Run the four passes on the ranked findings, then land per the rules below.

Sub-agent review is read-only: reviewers never edit the harness or open CRs. Only the orchestrating reflector writes. </project-review-fanout>

<landing-rules> **In-session refinement (session branch — immediate):**
  1. Apply the edits in /workspace. They do not change the config this session runs: agents compile from the base branch, and with config releases on, skills and tools come from it too. They take effect once the change request merges — for new sessions, and for a running one after kortix sessions reload <session id>.

  2. Commit them separately from task work:

    # Stages the harness folders this project has (root layout and/or legacy .kortix).
    git add -A -- $(ls -d agents skills memory harnesses .kortix 2>/dev/null)
    git commit -m "harness: <one-line summary of what failed and what changed>"
    
  3. Push and open (or update) ONE change request per session for harness promotion to main:

    git push origin HEAD
    kortix cr open --title "harness: <summary>" \
      --description "Failure signatures observed, edits per component, evidence (commands/turns)."
    

    If this session already has an open harness: CR, push to it instead of opening a second one.

  4. Return to the task. A refinement interruption ends with you resuming what you were doing, with the improved harness in effect.

Project-level reflection (harness-reflector): all edits land only via a CR against main. Nothing applies immediately; the merged CR is what future sessions inherit. </landing-rules>

<guardrails> - **Never edit managed `kortix-*` skills.** They are platform-owned and force-overwritten at session boot — edits are silently discarded. To extend platform behavior, create a project skill with a different name. - **Never merge your own harness CR.** A reviewer (human, or a reviewer agent with merge rights) does. The CR gate is what makes self-authored harness edits safe; self-authored + self-merged scaffolding is known to degrade agent performance. - **One concern per CR.** Harness CRs contain only harness changes (`agents/`, `skills/`, `memory/`, `harnesses/`) — never mixed with task/code changes. - **No secrets, tokens, or PII** in any harness file. Secrets belong in the Kortix Secrets Manager. - **Budget.** A mid-session refinement should cost a small fraction of the session: minutes, not hours. If a fix needs deep work (a real tool rewrite), record it in memory as a TODO and open the CR with what you have. - **No-op is a valid outcome.** If the window shows no failure signatures, change nothing and say so in one line. Do not invent work. - **Do not disable or weaken guardrails** — including this skill's rules, agent permission blocks, or CR review requirements — as a "refinement". </guardrails> <self-invocation> Nobody schedules in-session refinement for you — it is your discipline. Invoke this protocol the moment a failure signature costs you twice, and as a checkpoint on long sessions (roughly every 25 turns of work). The nightly `harness-reflector` run is the backstop, not the mechanism: it only sees what sessions left behind, while you can record the fix while the evidence is fresh: memory helps on your next turn, and prompt, skill, and tool fixes help every session once the change request merges. </self-invocation> </skill>

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Review Slack access requests against Okta role and team information, then prepare narrowly scoped GitHub or AWS IAM permissions. Apply changes only after an eligible person's approval and record the grant, reasoning, approver, and timestamp.

中文简介正在准备中。当前显示英语简介。

  • Reviewing GitHub repository access requests from Slack
  • Preparing AWS IAM permissions for a specific task
  • Routing sensitive access requests for additional review
kortix-ai/suna2万2026年10月22日 更新

Research companies and people before outreach or meetings. Combines business profiles, recent news, hiring signals, and key contacts into a sourced brief with talking points and suggested questions, adding relationship history when CRM data is connected.

中文简介正在准备中。当前显示英语简介。

  • Research a prospective customer before outreach
  • Prepare background information for meeting attendees
  • Compare a competitor's products and positioning
kortix-ai/suna2万2026年10月22日 更新

Review daily Google Ads and Meta Ads results for budget pacing, declining performance, and unusual activity. Get prioritized findings with supporting numbers and concrete recommendations for a marketing team to assess and carry out.

中文简介正在准备中。当前显示英语简介。

  • Checking whether campaign budgets are being spent on schedule
  • Investigating rising acquisition costs or falling ad returns
  • Finding ads and keywords that spend without converting
kortix-ai/suna2万2026年10月22日 更新

Automate website tasks such as navigating pages, filling forms, clicking buttons, taking screenshots, and extracting data. The skill also supports web app testing, with specialized guides for Electron desktop apps, Slack, and cloud browsers.

中文简介正在准备中。当前显示英语简介。

  • Automate form entry and page navigation
  • Capture screenshots and extract page data
  • Explore web apps for bugs
kortix-ai/suna2万2026年10月22日 更新

Process emailed vendor invoices by extracting details, comparing them with purchase orders and invoice history, and recording duplicates, overcharges, or missing orders. Summarize results in Slack for human review; payment approval and execution remain with people.

中文简介正在准备中。当前显示英语简介。

  • Checking incoming invoices against purchase orders
  • Finding duplicate invoices and likely resends
  • Reviewing unit prices and remaining order balances
kortix-ai/suna2万2026年10月22日 更新

billing

免费

Guide changes to Kortix billing code, admin controls, and pricing screens. Explain how plans, trials, enterprise contracts, and access exceptions should work, where pricing is defined, and which audited routes must handle account changes.

中文简介正在准备中。当前显示英语简介。

  • Update billing logic and its specification together
  • Review how trials and enterprise contracts are handled
  • Find the code that defines prices and allowances
kortix-ai/suna2万2026年10月22日 更新

查看 kortix-ai 的全部技能

报告此技能的问题