npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

unity-harness-init

v0.1.4

Published

Install the Unity AI harness .github templates into an existing project.

Readme

Harness — AI 长期迭代开发框架

基于 Anthropic Harness 论文 的 Planner-Generator-Evaluator 架构 + GitHub Copilot CLI /fleet 原生并行,面向 Unity/C# 项目的 AI 辅助开发框架。

架构

                    ┌─────────────┐
                    │ Coordinator │ ← 进度管理、/fleet 编排
                    │  workflow_*  │   Unity Skills 快照/回滚
                    └──────┬──────┘
                           │
          ┌────────────────┼────────────────┐
          │                │                │
    ┌─────▼─────┐   ┌─────▼─────┐   ┌──────▼─────┐
    │  Planner  │   │ Developer │   │  Reviewer  │
    │           │   │           │   │            │
    │ 需求拆分   │   │ TDD 实现   │   │ 独立验收    │
    │ 架构设计   │   │ 红绿循环   │   │ 无编辑权限   │
    │ perception│   │ debug/test│   │ debug/test │
    │ asset     │   │ script    │   │ console    │
    │           │   │ scene     │   │ validation │
    └───────────┘   └───────────┘   └────────────┘
                         │
                    /fleet 并行
                    ┌────┼────┐
                    │    │    │
                 Track Track Track
                  1    2    3

完整工作流

发现阶段

| 步骤 | Agent | Prompt | 产出 | |------|-------|--------|------| | Grill | @planner | /grill-me | 决策共识(消除歧义) | | PRD | @planner | /write-a-prd | PRD 文档(GitHub Issue) | | Issues | @planner | /prd-to-issues | 垂直切片任务(GitHub Issues) |

开发阶段

| 阶段 | Agent | Prompt | 产出 | |------|-------|--------|------| | Plan | @coordinator | /plan-iteration | 任务合同 + /fleet prompt | | Implement | @developer | /fleet-implement | 代码 + 测试(TDD 红绿循环) | | Verify | @reviewer | /review | 验收报告 (docs/harness/reports/) | | Document | @coordinator | - | 更新 progress.md |

维护窗口(每 3 迭代)

| 步骤 | Agent | Prompt | 产出 | |------|-------|--------|------| | Improve Architecture | @improver | /improve-codebase-architecture | 架构 RFC(GitHub Issue) | | Improve Process | @improver | /improve | 更新 agent 指令和流程 | | Doc Clean | @doc-cleaner | /doc-clean | 文档一致性修复 |

快速开始

1. 安装 Unity Skills(必须)

按照 Unity Skills 官方文档 完成安装,然后参考 配置指南 验证连接。

2. 通过 npm CLI 安装 Harness

在目标 Unity 项目根目录运行:

npx unity-harness-init

也可以指定目录安装:

npx unity-harness-init --target /path/to/your-unity-project

常用选项:

  • --dry-run: 只展示将复制的 .github/ 文件,不实际写入
  • --force: 覆盖目标项目中已有的 .github/ 内容

3. 验证连接

import unity_skills
status = unity_skills.get_server_status()
print(status)  # 应返回 {"running": true, ...}

4. 开始使用

  • 新项目:使用 /expand 从灵感展开需求
  • 已有项目:使用 /scout 分析项目结构,然后 /expand

使用场景

从零开始新游戏

灵感 → /grill-me(压力测试设计)
     → /write-a-prd(整理为 PRD,提交 GitHub Issue)
     → /prd-to-issues(拆解为垂直切片,提交 GitHub Issues)
     → /plan-iteration(任务合同 + /fleet prompt)
     → /fleet-implement(并行 TDD 实现)
     → /review(独立验收)
     → 重复直到完成

也可以先用 brainstorming skill 探索游戏创意,再进入 grill-me 阶段。

已有项目添加功能

/scout(项目探查)
     → /grill-me(明确新功能边界和决策)
     → /write-a-prd(整理 PRD,提交 GitHub Issue)
     → /prd-to-issues(拆解垂直切片)
     → /plan-iteration → /fleet-implement → /review
     → 重复直到完成

架构改进(维护窗口)

每 3 迭代 → /improve-codebase-architecture(探索架构摩擦,创建 RFC Issue)
           → 下一个迭代中处理 RFC

文件结构

.github/
├── copilot-instructions.md          # 全局工作流入口
├── agents/
│   ├── planner.agent.md             # 需求分析
│   ├── developer.agent.md           # TDD 实现
│   ├── reviewer.agent.md            # 独立验收(无 edit)
│   └── coordinator.agent.md         # 进度协调
├── instructions/
│   ├── unity-csharp.instructions.md # C# 编码规范
│   ├── tdd.instructions.md          # TDD 红绿循环
│   ├── file-partition.instructions.md # 并行文件分区
│   ├── architecture.instructions.md # 架构决策指南
│   └── testability.instructions.md  # 可测试性指南
├── prompts/
│   ├── grill-me.prompt.md           # 需求压力测试
│   ├── prd-to-issues.prompt.md      # PRD → 垂直切片任务(GitHub Issues)
│   ├── plan-iteration.prompt.md     # 迭代规划
│   ├── fleet-implement.prompt.md    # /fleet 实现
│   ├── review.prompt.md             # 启动验收
│   └── scout.prompt.md              # 项目探查
├── skills/
│   ├── expand-requirements/         # 需求展开流程
│   ├── task-coordinator/            # 任务协调流程
│   ├── task-reviewer/               # 验收审查流程
│   ├── brainstorming/               # 游戏设计头脑风暴
│   ├── codebase-scout/              # 项目探查
│   ├── grill-me/                    # 拷问式需求压力测试
│   ├── write-a-prd/                 # 撰写产品需求文档
│   ├── prd-to-issues/               # PRD 拆解为垂直切片任务
│   ├── tdd/                         # 红绿重构开发流程
│   └── improve-codebase-architecture/ # 架构改进与 RFC 提案
├── hooks/
│   ├── post-edit-compile-check.json # 编辑后自动编译检查
│   └── session-start-checkpoint.json # Session 启动加载进度
└── templates/
    ├── requirement.md               # 需求文档模板
    ├── task-contract.md             # 任务合同模板
    ├── fleet-prompt.md              # /fleet prompt 模板
    ├── progress.md                  # 进度跟踪模板
    ├── review-report.md             # 验收报告模板
    └── unity-skills-setup.md        # Unity Skills 配置指南

package.json                         # npm 包定义
bin/unity-harness-init.js           # CLI 入口
lib/install.js                      # 安装逻辑
assets/github/                      # 发布到 npm 的 .github 模板资源

Unity Skills 集成

Unity Skills REST API 是本框架的强制依赖。各 Agent 使用的模块:

| Agent | Unity Skills 模块 | |-------|------------------| | Planner | perception, asset | | Developer | debug, test, script, scene, console, asset | | Reviewer | debug, test, console, validation | | Coordinator | workflow |

核心设计决策

  • Reviewer 无编辑权限:Anthropic 研究发现,生成者自我评估不可靠,验收必须由独立角色执行
  • 文件分区代替文件锁:/fleet 子 agent 共享文件系统无锁,通过 prompt 声明文件归属保证安全
  • 每个 track prompt 自包含:/fleet 子 agent 看不到协调者的对话历史
  • Unity Skills 强制集成:编译、测试、场景验证全部通过 REST API 执行,保证客观性

自定义

  • 修改 instructions/ 中的文件适配你的编码规范
  • 修改 templates/ 中的模板适配你的项目结构
  • skills/ 中的 reference 文件可以补充项目特有的分解模式
  • Agent 的 tools 列表可按需调整

内置 Skills

以下工作流 skill 现在会随 npm 包一起安装到目标项目的 .github/skills/ 中,可直接作为 slash command 使用:

  • /grill-me:拷问式澄清需求,输出决策摘要
  • /write-a-prd:把设计决策整理为正式 PRD
  • /prd-to-issues:把 PRD 拆成可独立推进的垂直切片任务
  • /tdd:指导开发者按红绿重构循环实现功能
  • /improve-codebase-architecture:发现架构摩擦并生成 RFC

CLI 命令

npx unity-harness-init
npx unity-harness-init --target ./MyUnityProject
npx unity-harness-init --dry-run
npx unity-harness-init --force

CLI 只负责把 npm 包内置的 .github/ 模板安装到目标项目,不会额外创建 docs/harness/ 或检查 Unity Skills 运行状态。

License

MIT