Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .kimi-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "better-harness",
"version": "0.4.0",
"description": "Build an AI-ready engineering system for safe coding-agent delivery and continuous software improvement.",
"skills": "./skills/",
"interface": {
"displayName": "Better Harness",
"shortDescription": "AI delivery readiness reviews and continuous software improvement"
},
"author": {
"name": "Qoder",
"email": "dev@qoder.com"
},
"homepage": "https://github.com/QoderAI/better-harness",
"repository": "https://github.com/QoderAI/better-harness",
"license": "MIT",
"keywords": [
"skills",
"better-harness",
"ai-delivery",
"continuous-improvement",
"agent-harness",
"change-confidence"
]
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ observable behavior and compatibility, not every internal refactor.

### Added

- Kimi Code is now a supported analysis-capable source-local host. The
repository installs as a Kimi Code plugin (`/plugins install <repo>`)
through a `.kimi-plugin/plugin.json` manifest, gains a Kimi configured-asset
provider (user `~/.kimi-code/skills` and `mcp.json`, project
`.kimi-code/skills` and `.kimi/skills`, and managed plugins from
`plugins/installed.json` with `enabled` filtering and plugin-root path
confinement) plus a Kimi session-evidence adapter that reads
workspace-matching wire transcripts under
`~/.kimi-code/sessions/<wd_*>/ses{sion}_*/agents/*/wire.jsonl`, resolving
the workspace mapping through `workspaces.json` and `session_index.jsonl`
with a `wd_<name>_*` prefix fallback that records a
`kimi-workspace-index-absent` warning. The public npm package now ships
seven host metadata roots; the Qoder runtime bundle remains Qoder-specific.

- A read-only native Learning Capture review contract can now screen ordinary
Task Episodes for repeated exact repair routes, emit a bounded privacy-safe
packet, validate evidence-bound `match` or `abstain` decisions, and project
Expand Down
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ for their explicit boundaries.

Better Harness scopes behavior claims to relevant Task Episodes and the
surrounding project mechanisms. Qoder and Cursor produce host-native Canvas
reports; Claude Code, Codex, Qwen Code, and GitHub Copilot produce
reports; Claude Code, Codex, Qwen Code, GitHub Copilot, and Kimi Code produce
self-contained HTML with paired Markdown. Missing or partial evidence remains
explicit. See the [Host Adapter Matrix](docs/adapters/README.md) for current
coverage and output differences.
Expand Down Expand Up @@ -369,6 +369,34 @@ session evidence is read from workspace-matching JSONL transcripts under
`~/.pi/agent/sessions/`; missing evidence stays explicit rather than being
inferred.

### Kimi Code

Install the repository as a Kimi Code plugin:

```text
/plugins install https://github.com/QoderAI/better-harness
```

Or install from a local checkout with `/plugins install <path-to-repository>`.
Plugins install per user and apply to every project; run `/reload` or start a
new session after installing.

Kimi Code discovers the `better-harness` skill through the
`.kimi-plugin/plugin.json` manifest. A manual install without the plugin
manager also works: copy or symlink this repository's `skills/better-harness`
directory into `~/.kimi-code/skills/` (all projects) or
`<repository>/.kimi-code/skills/` (one repository). Start a new Kimi Code
session in the repository you want to review and run the report prompt:

```text
/skill:better-harness review this project's AI coding workflow and generate a report
```

Kimi Code produces a self-contained `report.html` with paired `report.md` and
`findings.json`. Session evidence is read from workspace-matching wire
transcripts under `~/.kimi-code/sessions/`; missing evidence stays explicit
rather than being inferred.

## Develop and package from source

Development requires Node.js `>=22.20.0 <25.0.0` and npm
Expand Down
27 changes: 26 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
[公开宿主适配矩阵](docs/docs/hosts/adapter-matrix.md)。

Better Harness 会将行为断言限定在相关的任务过程片段(Task Episode)及其周边项目机制内。
Qoder 与 Cursor 生成宿主原生 Canvas 报告;Claude Code、Codex、Qwen Code 和 GitHub Copilot 生成自包含的 HTML 报告及配套 Markdown。
Qoder 与 Cursor 生成宿主原生 Canvas 报告;Claude Code、Codex、Qwen Code、GitHub Copilot 和 Kimi Code 生成自包含的 HTML 报告及配套 Markdown。
缺失或不完整的证据会被明确标注。有关当前覆盖范围和输出差异,请参阅
[宿主适配器矩阵](docs/adapters/README.md)。

Expand Down Expand Up @@ -347,6 +347,31 @@ Pi 默认在仓库的 `.pi/better-harness` 报告根目录下生成自包含的
及配套的 `report.md` 和 `findings.json`。Pi 会话证据读自
`~/.pi/agent/sessions/` 下与工作区匹配的 JSONL 会话记录;缺失的证据会被明确标注而不会被推断。

### Kimi Code

将本仓库作为 Kimi Code 插件安装:

```text
/plugins install https://github.com/QoderAI/better-harness
```

或在本地检出后使用 `/plugins install <仓库路径>`。插件按用户安装并对所有
项目生效;安装后请运行 `/reload` 或启动新会话。

Kimi Code 通过 `.kimi-plugin/plugin.json` manifest 发现 `better-harness`
Skill。不使用插件管理器也可以手动安装:将本仓库的 `skills/better-harness`
目录复制或软链到 `~/.kimi-code/skills/`(所有项目)或
`<仓库>/.kimi-code/skills/`(仅当前仓库)。在需要审查的仓库中启动新的
Kimi Code 会话,运行报告提示词:

```text
/skill:better-harness 审查此项目的 AI 编码工作流并生成报告
```

Kimi Code 生成自包含的 `report.html` 及配套的 `report.md` 和
`findings.json`。Kimi Code 会话证据读自 `~/.kimi-code/sessions/` 下与
工作区匹配的 wire 会话记录;缺失的证据会被明确标注而不会被推断。

<a id="develop-and-package-from-source"></a>

## 从源码开发和打包
Expand Down
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ the target journey, contract, evidence, governance, and DX-measurement system.
in the capability-owned agent-customize and session-analysis providers. The Codex shell
owns local install/discovery metadata only; Codex evidence collection remains
in the capability-owned provider and session-analysis modules. The public npm
package ships all six plugin metadata roots, while the Qoder runtime bundle
package ships all seven plugin metadata roots, while the Qoder runtime bundle
includes only `.qoder-plugin/`.

## Developer Experience Routing
Expand Down
46 changes: 34 additions & 12 deletions docs/adapters/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Host Adapter Matrix

This is the single entry point for Claude Code, Codex, Qoder, Cursor, Qwen,
GitHub Copilot, Pi, WorkBuddy, and Grok host boundaries. Do not create `docs/adapters/claude-code.md`,
`docs/adapters/codex.md`, `docs/adapters/qoder.md`, `docs/adapters/cursor.md`,
`docs/adapters/qwen.md`, `docs/adapters/copilot.md`, `docs/adapters/pi.md`,
`docs/adapters/workbuddy.md`, or `docs/adapters/grok.md` by default.
GitHub Copilot, Pi, Kimi Code, WorkBuddy, and Grok host boundaries. Do not
create `docs/adapters/claude-code.md`, `docs/adapters/codex.md`,
`docs/adapters/qoder.md`, `docs/adapters/cursor.md`, `docs/adapters/qwen.md`,
`docs/adapters/copilot.md`, `docs/adapters/pi.md`,
`docs/adapters/kimi-code.md`, `docs/adapters/workbuddy.md`, or
`docs/adapters/grok.md` by default.

Adding another host? Follow
[Contributing a New Coding Agent Host](contributing-new-coding-agent.md) before
Expand All @@ -17,13 +19,15 @@ providers, real session-evidence adapters, and output modes. Canonical product
judgment stays in `skills/`, `models/`, `references/`, `templates/`, and
`scripts/<capability>/`.

The `@qoderai/better-harness` npm package includes six filesystem metadata
roots for Qoder, Claude Code, Codex, Cursor, Qwen, and Copilot, plus Pi install
metadata in the existing `package.json`. The generated Qoder runtime bundle
includes only the Qoder shell, `.qoder-plugin/`; non-Qoder generated host
artifacts remain source-local. Claude Code installs its shell through the
repository's native marketplace manifest. Pi installs the repository as a pi
package through the `pi` manifest in `package.json`.
The `@qoderai/better-harness` npm package includes seven filesystem metadata
roots for Qoder, Claude Code, Codex, Cursor, Qwen, Copilot, and Kimi Code,
plus Pi install metadata in the existing `package.json`.
The generated Qoder runtime bundle includes only the Qoder shell,
`.qoder-plugin/`; non-Qoder generated host artifacts remain source-local.
Claude Code installs its shell through the repository's native marketplace
manifest. Pi installs the repository as a pi package through the `pi` manifest
in `package.json`. Kimi Code installs the repository as a plugin through the
`.kimi-plugin/plugin.json` manifest.

| Host | Positioning | Shell | Configured Assets | Session Evidence | Default Output | Rules / Prompts | Smoke |
| --- | --- | --- | --- | --- | --- | --- | --- |
Expand All @@ -34,6 +38,7 @@ package through the `pi` manifest in `package.json`.
| Qwen Code | Analysis-capable source-local host | `qwen-extension.json` | `scripts/agent-customize/providers/qwen.mjs` | `scripts/session-analysis/platforms/qwen.mjs` | self-contained HTML + Markdown | `.qwen` + `QWEN.md` + `AGENTS.md` | `harness prepare --platform qwen` -> finalize with `html-report` validation |
| GitHub Copilot | Analysis-capable source-local host | `.github/plugin/` | `scripts/agent-customize/providers/copilot.mjs` | `scripts/session-analysis/platforms/copilot.mjs` | self-contained HTML + Markdown | `.github` + `AGENTS.md` + `~/.copilot` | `copilot plugin marketplace add .` -> `copilot plugin install better-harness@better-harness` -> configured-asset baseline -> validated `html` render |
| Pi | Analysis-capable source-local host | `pi` manifest in `package.json` | `scripts/agent-customize/providers/pi.mjs` | `scripts/session-analysis/platforms/pi.mjs` | self-contained HTML + Markdown | `.pi` + `.agents` + `AGENTS.md` | `pi install <source>` or `pi -e <source>` -> `/better-harness` prompt template -> validated `html` render |
| Kimi Code | Analysis-capable source-local host | `.kimi-plugin/plugin.json` | `scripts/agent-customize/providers/kimi.mjs` | `scripts/session-analysis/platforms/kimi.mjs` | self-contained HTML + Markdown | `AGENTS.md` + `~/.kimi-code/skills` + project `.kimi-code/skills`/`.kimi/skills` + `~/.kimi-code/mcp.json` | `harness evidence-bundle --platform kimi` -> validated `html` render |
| WorkBuddy | Analysis-capable source-local host | none (skills install into `~/.workbuddy/skills`) | `scripts/agent-customize/providers/workbuddy.mjs` | `scripts/session-analysis/platforms/workbuddy.mjs` | self-contained HTML + Markdown | `~/.workbuddy` `AGENTS.md` + identity files + `.agents` + `AGENTS.md` | `session-analysis --platform workbuddy sources` -> validated `html` render |
| Grok | Analysis-capable source-local host | none (skills install into `~/.grok/skills`) | `scripts/agent-customize/providers/grok.mjs` | `scripts/session-analysis/platforms/grok.mjs` | self-contained HTML + Markdown | `~/.grok` + `.grok` + `.agents` + `AGENTS.md` | `session-analysis --platform grok sources` -> skill symlink -> validated `html` render |

Expand Down Expand Up @@ -96,6 +101,23 @@ package through the `pi` manifest in `package.json`.
discovers the canonical root `skills/` directory and the `prompts/`
templates through the `pi` manifest in `package.json`; that manifest is
install/discovery metadata and does not own Pi evidence collection.
- Kimi Code configured assets are inventoried through
`scripts/agent-customize/providers/kimi.mjs`: user-level
`~/.kimi-code/skills/**/SKILL.md` and `~/.kimi-code/mcp.json`, plus
project-level `AGENTS.md`/`CLAUDE.md` and the probed skill roots
`.kimi-code/skills/**/SKILL.md` and `.kimi/skills/**/SKILL.md`. The
repository's `.kimi-plugin/plugin.json` manifest makes Better Harness
installable through Kimi Code's `/plugins` manager. Kimi Code also
supports hooks, custom agents, plugin-declared slash commands, and
plugin-bundled skills (installed per user under
`~/.kimi-code/plugins/managed/`); the provider inventories those surfaces
for plugins recorded in `~/.kimi-code/plugins/installed.json` (assets only
for `enabled: true` records), while memory has no Kimi Code equivalent.
Session evidence comes
from `scripts/session-analysis/platforms/kimi.mjs`, which reads
`~/.kimi-code/sessions/<wd_*>/ses{sion}_*/agents/*/wire.jsonl` and resolves
the workspace-to-`wd_*` mapping through `workspaces.json` and
`session_index.jsonl` (falling back to `wd_<name>_*` directory prefixes).
- WorkBuddy configured assets are inventoried through
`scripts/agent-customize/providers/workbuddy.mjs`, covering `~/.workbuddy`
user skills, marketplace plugins under `plugins/marketplaces/` with enabled
Expand Down Expand Up @@ -130,7 +152,7 @@ Canonical templates live under `templates/reporting/`.
`findings.json`, Canvas-only `canvas.json`, and `report.canvas.tsx`.
- `cursor-canvas.md`: Cursor Canvas output contract, covering the complete
report, native Context Usage projection, and public IDE actions.
- `html-visual.md`: portable Claude Code/Codex/Qwen/Copilot/Pi/WorkBuddy/Grok visual output contract, covering
- `html-visual.md`: portable Claude Code/Codex/Qwen/Copilot/Pi/Kimi Code/WorkBuddy/Grok visual output contract, covering
`findings.json`, `report.md`, and `report.html`.
- Markdown-only output has no visual companion.

Expand Down
4 changes: 2 additions & 2 deletions docs/adrs/directory-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ scripts/
core-change-watch/ # [active] static structure/core-path/history evidence
session-analysis.mjs # [active] thin shim; new exports -> scripts/session-analysis/
session-analysis/ # [active] session evidence collection/normalization
platforms/<host>.mjs # Qoder/Codex/Claude/Cursor/Qwen/Copilot/Pi/WorkBuddy host adapters
platforms/<host>.mjs # Qoder/Codex/Claude/Cursor/Qwen/Copilot/Pi/Kimi/WorkBuddy host adapters
ides/<ide>/ # target editor-local evidence not covered by host adapters
<business-capability>/ # [target] new capability owner
cli.mjs # use cli.mjs for new capabilities
Expand Down Expand Up @@ -247,7 +247,7 @@ Use the tree first. These rules resolve common collisions:
`.cursor-plugin/`, `.codex-plugin/`, and `.github/plugin/` are
install/discovery shells for one host. Existing active shells may be
hand-maintained narrowly, but the Qoder
public npm package ships all six plugin metadata roots, while the Qoder
public npm package ships all seven plugin metadata roots, while the Qoder
runtime bundle ships only `.qoder-plugin/`. New host shells start from the
`docs/adapters/README.md` matrix; split to `docs/adapters/<host>.md` and add a
source-local `scripts/packaging/` builder only for an accepted host-artifact
Expand Down
2 changes: 1 addition & 1 deletion docs/community.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This is the complete reference. For the common cases, see Start Here above.
| Style grammar | Yes | `templates/style/` | Directive-only visual language; no runnable skeletons | Selected by report/style routing | Style-template tests and no copied runtime skeletons |
| Structured knowledge | Candidate only | `knowledge-base/{official,community}/...` | `knowledge.md`, interim `schema.json`, fixtures, namespace uniqueness | Docs-only until registry spec, compiler, and binding tests exist | Namespace check, schema/fixture review, migration note |
| Examples and operating models | Yes | `case-studies/` | Named example, scope, evidence boundary, non-runtime status | Reference material only unless separately bound | Link/path check; no runtime-policy claims |
| Host shell and packaging | Thin, or generated only after a split trigger | `.claude-plugin/`, `.qoder-plugin/`, `.cursor-plugin/`, `.codex-plugin/`, `.github/plugin/`, `qwen-extension.json`, the `pi` manifest in `package.json`, future lifecycle shells | Install/discovery metadata and pointers to canonical owners | Public npm package includes all six current metadata roots; the Qoder runtime bundle includes only `.qoder-plugin/`, and generated host artifacts stay source-local | `scripts/npm-package/` verification, or split adapter note plus target builder |
| Host shell and packaging | Thin, or generated only after a split trigger | `.claude-plugin/`, `.qoder-plugin/`, `.cursor-plugin/`, `.codex-plugin/`, `.github/plugin/`, `qwen-extension.json`, `.kimi-plugin/`, the `pi` manifest in `package.json`, future lifecycle shells | Install/discovery metadata and pointers to canonical owners | Public npm package includes all seven current metadata roots; the Qoder runtime bundle includes only `.qoder-plugin/`, and generated host artifacts stay source-local | `scripts/npm-package/` verification, or split adapter note plus target builder |

## Non-Extension Boundaries

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ until you need diagnosis. See [../models/routing.md](../models/routing.md).
| Project evidence | `better-harness core-change-watch` | Project, history, core-path, and diff signals |
| Change confidence | `hooks/git-scripts/blast-radius` | Symbol-graph blast radius of a change |
| Dependency governance | `better-harness dependency-governance` | Update automation, audit, stale-dep signals |
| Session evidence | `better-harness session-analysis` | Normalize Qoder, Codex, Claude, Cursor, Qwen, Copilot, Pi, or WorkBuddy session behavior |
| Session evidence | `better-harness session-analysis` | Normalize Qoder, Codex, Claude, Cursor, Qwen, Copilot, Pi, Kimi Code, or WorkBuddy session behavior |
| Agent assets | `better-harness coding-agent-practices inventory` | Inventory configured agent surfaces |
| Guardrails | `hooks/`, `scripts/agent-guardrails` | Secret scanning and lifecycle checks |

Expand Down
Loading