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
27 changes: 27 additions & 0 deletions .github/plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "better-harness",
"owner": {
"name": "Qoder",
"email": "dev@qoder.com"
},
"metadata": {
"description": "Better Harness plugins for AI delivery readiness.",
"version": "0.3.0"
},
"plugins": [
{
"name": "better-harness",
"description": "Build an AI-ready engineering system for safe coding-agent delivery and continuous software improvement.",
"version": "0.3.0",
"source": "./",
"author": {
"name": "Qoder",
"email": "dev@qoder.com"
},
"homepage": "https://github.com/QoderAI/better-harness",
"repository": "https://github.com/QoderAI/better-harness",
"license": "MIT",
"skills": "./skills/"
}
]
}
23 changes: 23 additions & 0 deletions .github/plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "better-harness",
"description": "Build an AI-ready engineering system for safe coding-agent delivery and continuous software improvement.",
"version": "0.3.0",
"author": {
"name": "Qoder",
"email": "dev@qoder.com",
"url": "https://qoder.com/"
},
"homepage": "https://github.com/QoderAI/better-harness",
"repository": "https://github.com/QoderAI/better-harness",
"license": "MIT",
"keywords": [
"copilot-plugin",
"better-harness",
"ai-delivery",
"continuous-improvement",
"agent-harness",
"change-confidence"
],
"category": "Coding",
"skills": "./skills/"
}
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ Pick your coding agent — you can be looking at your first report in minutes:
| **Codex Desktop** | Add the repository under **Settings > Plugins > + Add > From Marketplace**, install Better Harness, start a new task, then invoke `@better-harness`. |
| **Codex CLI** | Add the Git marketplace, run `codex plugin add better-harness@better-harness`, then invoke `$better-harness:better-harness`. |
| **Qoder Desktop / CLI** | Nothing to install when Qoder Desktop is installed — Better Harness is built in and available to both. Open your repository and use the report prompt below. |
| **GitHub Copilot CLI** | Add the repository marketplace, install `better-harness@better-harness`, start a new session, then use the report prompt below. |
| **Cursor** | Load the plugin from source — see [Installation](#installation). |

Once installed, ask Better Harness to generate the host's durable report:
Expand All @@ -159,8 +160,8 @@ Once installed, ask Better Harness to generate the host's durable report:

Better Harness scopes behavior claims to relevant Task Episodes and the
surrounding project mechanisms. Qoder produces a Canvas report; Claude Code,
Codex, and Cursor produce self-contained HTML with paired Markdown. Missing or
partial evidence remains explicit. See the
Codex, Cursor, Qwen Code, and GitHub Copilot 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 @@ -309,6 +310,30 @@ cursor-agent --plugin-dir /path/to/better-harness
Cursor session evidence is supported through workspace-matched transcripts,
metadata, and audit logs. Partial or unavailable coverage remains explicit.

### GitHub Copilot

Register this repository as a Copilot plugin marketplace, then install Better
Harness:

```bash
copilot plugin marketplace add QoderAI/better-harness
copilot plugin install better-harness@better-harness
```

Verify that the Skill loaded:

```bash
copilot plugin list
```

Prefer marketplace installs. Direct repository, URL, and local-path installs are
deprecated in Copilot CLI.

Copilot session evidence is supported through workspace-matched Copilot CLI
transcripts under `~/.copilot/session-state/`. Copilot records no per-response
token usage, and VS Code Copilot Chat has no supported durable transcript; both
remain explicit evidence boundaries.

## Develop and package from source

Development requires Node.js `>=22.20.0 <25.0.0` and npm
Expand Down
24 changes: 23 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Better Harness 开放了三个相互关联的层次,而不只是一个斜杠
| **Codex Desktop** | 在 **Settings > Plugins > + Add > From Marketplace** 中添加本仓库,安装 Better Harness,启动新任务,然后调用 `@better-harness`。 |
| **Codex CLI** | 添加 Git Marketplace,运行 `codex plugin add better-harness@better-harness`,然后调用 `$better-harness:better-harness`。 |
| **Qoder Desktop / CLI** | 安装 Qoder Desktop 后无需额外安装——Better Harness 已内置,并可在桌面端和 CLI 中使用。打开仓库并使用下方的报告提示词。 |
| **GitHub Copilot CLI** | 添加本仓库 Marketplace,安装 `better-harness@better-harness`,启动新会话,然后使用下方的报告提示词。 |
| **Cursor** | 从源码加载插件——参见[安装](#installation)。 |

安装完成后,让 Better Harness 生成当前宿主支持的持久化报告:
Expand All @@ -154,7 +155,7 @@ Better Harness 开放了三个相互关联的层次,而不只是一个斜杠
```

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

Expand Down Expand Up @@ -297,6 +298,27 @@ cursor-agent --plugin-dir /path/to/better-harness
Cursor 会话证据来自与工作区匹配的会话记录、元数据和审计日志。
覆盖范围不完整或不可用时会被明确标注。

### GitHub Copilot

将本仓库注册为 Copilot 插件 Marketplace,然后安装 Better Harness:

```bash
copilot plugin marketplace add QoderAI/better-harness
copilot plugin install better-harness@better-harness
```

验证 Skill 已加载:

```bash
copilot plugin list
```

请优先使用 Marketplace 安装。Copilot CLI 已弃用直接从仓库、URL 或本地路径安装。

Copilot 会话证据来自 `~/.copilot/session-state/` 下与工作区匹配的 Copilot CLI 会话记录。
Copilot 不记录逐次响应的 token 用量,VS Code Copilot Chat 也没有受支持的持久化会话记录;
两者均作为明确的证据边界保留。

<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 @@ -66,7 +66,7 @@ reference is `docs/adrs/directory-structure.md`.
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 five plugin metadata roots, while the Qoder runtime bundle
package ships all six plugin metadata roots, while the Qoder runtime bundle
includes only `.qoder-plugin/`.

## Template Boundaries
Expand Down
33 changes: 25 additions & 8 deletions docs/adapters/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Host Adapter Matrix

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

Host differences enter only this matrix, capability-local configured-asset
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 the Qoder, Claude Code,
Codex, Cursor, and Qwen plugin metadata roots. 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.
Codex, Cursor, Qwen, and GitHub Copilot plugin metadata roots. 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.

| Host | Positioning | Shell | Configured Assets | Session Evidence | Default Output | Rules / Prompts | Smoke |
| --- | --- | --- | --- | --- | --- | --- | --- |
Expand All @@ -23,6 +23,7 @@ repository's native marketplace manifest.
| Qoder | First-class product host | `.qoder-plugin/` | `scripts/agent-customize/providers/qoder.mjs` | `scripts/session-analysis/platforms/qoder.mjs` | `better-harness` | `.qoder/rules` + `AGENTS.md` + output templates | `better-harness harness render --mode qoder-canvas --validate` |
| Cursor | Analysis-capable source-local host | `.cursor-plugin/` | `scripts/agent-customize/providers/cursor.mjs` | `scripts/session-analysis/platforms/cursor.mjs` | self-contained HTML + Markdown | `.cursor` + `.codex` compatibility + `AGENTS.md` | `agent --plugin-dir . --mode ask --print` -> Cursor evidence bundle -> validated `html` render |
| 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 |

## Discovery And Evidence

Expand Down Expand Up @@ -55,14 +56,30 @@ repository's native marketplace manifest.
JSONL transcripts under `~/.qwen/projects/<slug>/chats/`. The `qwen-extension.json`
manifest is native Qwen install/discovery metadata included in the public npm package; it
does not own Qwen evidence collection.
- GitHub Copilot configured assets are inventoried through
`scripts/agent-customize/providers/copilot.mjs`, covering `AGENTS.md`,
`.github/copilot-instructions.md`, `.github/instructions/`, `.github/skills/`,
`.agents/skills/`, `.github/agents/`, `.github/prompts/`, `.github/hooks/`,
`.mcp.json`, `.github/mcp.json`, and the user-scope `~/.copilot` equivalents.
Installed-Plugin records come from the `installedPlugins` array in
`~/.copilot/config.json` and stay separate from marketplace catalogs and
runtime-use claims. Session evidence comes from
`scripts/session-analysis/platforms/copilot.mjs`, which reads
workspace-matching `~/.copilot/session-state/<id>/events.jsonl` bound through
each session's `workspace.yaml`. Copilot transcripts record no per-response
model token usage, and a matched session directory without `events.jsonl`
stays an explicit partial coverage boundary. `~/.copilot/session-store.db` is
documented as automatically managed and is not an evidence source. The
`.github/plugin/` shell is native Copilot install/discovery metadata included
in the public npm package; it does not own Copilot evidence collection.

## Output Modes

Canonical templates live under `templates/reporting/`.

- `qoder-canvas.md`: Qoder Canvas output contract, covering renderer-owned
`findings.json`, Canvas-only `canvas.json`, and `report.canvas.tsx`.
- `html-visual.md`: portable Claude Code/Codex/Cursor/Qwen visual output contract, covering
- `html-visual.md`: portable Claude Code/Codex/Cursor/Qwen/Copilot visual output contract, covering
`findings.json`, `report.md`, and `report.html`.
- Markdown-only output has no visual companion.

Expand Down
14 changes: 10 additions & 4 deletions docs/adrs/directory-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ Legend:
.codex-plugin/ # [active] thin Codex shell
plugin.json # thin discovery/install metadata only

.github/plugin/ # [active] thin GitHub Copilot shell
plugin.json marketplace.json # native install/discovery metadata only

qwen-extension.json # [active] thin Qwen Code shell

.agents/
skills/<skill>/ # [active] host-local only; shared logic -> root skills/
SKILL.md
Expand Down Expand Up @@ -71,7 +76,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 host adapters
platforms/<host>.mjs # Qoder/Codex/Claude/Cursor/Qwen/Copilot 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 @@ -206,9 +211,10 @@ Use the tree first. These rules resolve common collisions:
- Shared workflows go to root `skills/`; host-local wrappers or generated
mirrors go to `.agents/skills/`.
- Host plugin directories such as `.claude-plugin/`, `.qoder-plugin/`,
`.cursor-plugin/`, and `.codex-plugin/` are install/discovery shells for one
host. Existing active shells may be hand-maintained narrowly, but the Qoder
public npm package ships all five plugin metadata roots, while the Qoder
`.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
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 @@ -32,7 +32,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/`, `qwen-extension.json`, future lifecycle shells | Install/discovery metadata and pointers to canonical owners | Public npm package includes all five 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`, 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 |

## 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, or Qwen session behavior |
| Session evidence | `better-harness session-analysis` | Normalize Qoder, Codex, Claude, Cursor, Qwen, or Copilot 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
4 changes: 2 additions & 2 deletions docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ for extension surfaces, read [community.md](community.md).
| `core-change-watch` | Project, history, core-path, and current-diff evidence collection. | [scripts/core-change-watch](../scripts/core-change-watch) |
| Blast radius | The symbol-graph reach of a change, computed with tree-sitter (JS/TS, Go, Python) as a git hook. | [hooks/git-scripts/blast-radius](../hooks/git-scripts/blast-radius) |
| `dependency-governance` | Update-automation, audit, and stale-dependency signals. | [scripts/dependency-governance](../scripts/dependency-governance) |
| `session-analysis` | Normalizes Qoder, Codex, Claude, Cursor, or Qwen agent session behavior into evidence. | [scripts/session-analysis](../scripts/session-analysis) |
| `session-analysis` | Normalizes Qoder, Codex, Claude, Cursor, Qwen, or Copilot agent session behavior into evidence. | [scripts/session-analysis](../scripts/session-analysis) |
| Guardrails | Change-time enforcement: secret scanning and lifecycle hook checks. | [hooks](../hooks), [scripts/agent-guardrails](../scripts/agent-guardrails) |

## The Action Loop (Report → Change)
Expand All @@ -79,7 +79,7 @@ for extension surfaces, read [community.md](community.md).
|---|---|---|
| Skill | A repeatable agent workflow defined by `SKILL.md` frontmatter plus a concise workflow. | [community.md](community.md); report use: [report contract](../skills/better-harness/SKILL.md#report-output) |
| Host adapter | Per-host discovery and evidence-shape glue (e.g. Qoder, Codex); keeps the engine host-neutral. | [adapters/README.md](adapters/README.md) |
| Host shell | Thin host metadata (`.claude-plugin/`, `.qoder-plugin/`, `.cursor-plugin/`, `.codex-plugin/`, `qwen-extension.json`, or a future lifecycle shell) that exposes canonical behavior without owning product logic; the public npm package ships all five current metadata roots, while the Qoder runtime bundle includes only `.qoder-plugin/`. | [ARCHITECTURE.md](ARCHITECTURE.md) |
| Host shell | Thin host metadata (`.claude-plugin/`, `.qoder-plugin/`, `.cursor-plugin/`, `.codex-plugin/`, `.github/plugin/`, `qwen-extension.json`, or a future lifecycle shell) that exposes canonical behavior without owning product logic; the public npm package ships all six current metadata roots, while the Qoder runtime bundle includes only `.qoder-plugin/`. | [ARCHITECTURE.md](ARCHITECTURE.md) |
| Canonical owner | The single directory that owns a behavior's product judgment; host shells and mirrors point back to it. | [ARCHITECTURE.md](ARCHITECTURE.md) |

## "I Want To… → Use"
Expand Down
Loading