open-index/open-npm huggingface dataset:
npm package: @pickle-pee/config
Description: Configuration layering, resource loading, and skill/template management
Latest version: 1.0.4

# @pickle-pee/config

## 职责

配置与资源管理。管理配置合并顺序（默认 → 全局 → 项目 → 会话 → 命令行）、资源目录定位、技能/模板/上下文文件的加载规范。

## 导出

- 配置合并接口
- 资源定位接口
- 配置层级类型
- 技能与模板加载类型

## 依赖方向

- 依赖: 无（本项目叶子节点）
- 被依赖: `app-extensions`, `app-cli`

## 禁止事项

- 不包含运行时逻辑
- 不实现工具
- 不管理会话状态

## 内部结构

- `domain/` — 配置模型、资源路径定义
- `services/` — 配置加载与合并
- `types/` — 包级公共类型定义

## 验证

- `npx tsc --noEmit` 类型检查通过
npm package: @pickle-pee/evaluation
Description: Smoke scenarios, protocol verification, regression baselines, and subagent acceptance tests
Latest version: 1.0.4

# @pickle-pee/evaluation

## 职责

评测与验收。管理 smoke 场景、协议验证、回归基线和 subagent 交付验收测试。确保从 P1 到 P7 的每个阶段都能被端到端验证。

## 导出

- Smoke 场景定义接口
- 协议验证工具
- 回归基线类型
- Subagent 交付验收接口

## 依赖方向

- 依赖: `app-runtime`, `app-tools`
- 被依赖: `app-cli`（仅在测试/profile 模式下）

## 禁止事项

- 不包含生产运行时逻辑
- 不渲染 UI
- 不管理真实会话

## 内部结构

- `domain/` — 评测模型、验收标准定义
- `services/` — 场景执行、结果比对
- `types/` — 包级公共类型定义
- `test/smoke/` — Smoke 测试场景
- `test/regression/` — 回归测试基线

## 验证

- `npx tsc --noEmit` 类型检查通过
- `npx vitest run` 测试通过
npm package: @pickle-pee/extensions
Description: Built-in extensions, Bridge/IDE adapters, and extension point management
Latest version: 1.0.4

# @pickle-pee/extensions

## 职责

扩展系统。承载内建扩展、预留 Bridge 或 IDE 适配、暴露和管理扩展点。扩展点包括自定义工具注册、自定义 Provider 注册和自定义命令注册。

## 导出

- 扩展点注册接口
- 扩展生命周期类型
- Bridge/RPC 适配预留接口

## 依赖方向

- 依赖: `app-runtime`, `app-config`
- 被依赖: `app-cli`

## 禁止事项

- 不包含核心业务逻辑
- 不直接管理会话
- 不渲染 UI

## 内部结构

- `domain/` — 扩展模型、扩展点定义
- `services/` — 扩展加载与生命周期管理
- `adapters/` — Bridge/IDE 适配层
- `types/` — 包级公共类型定义

## 验证

- `npx tsc --noEmit` 类型检查通过
npm package: @pickle-pee/genesis-cli
Description: CLI entry point, argument parsing, and mode routing
Latest version: 1.0.4

# @pickle-pee/genesis-cli

## 安装

```bash
npm install -g @pickle-pee/genesis-cli
genesis --version
genesis
```

## 发布目标

- npm 包名：`@pickle-pee/genesis-cli`
- 全局命令：`genesis`

## 职责

CLI 入口与模式分发。负责参数解析、确定运行模式（Interactive / Print / JSON / RPC），并将请求路由到对应的 runtime 和 UI 通道。

## 导出

- `main()` — CLI 启动入口
- `parseArgs()` — 命令行参数解析
- CLI 模式类型定义

## 依赖方向

- 依赖: `app-runtime`, `app-config`, `app-ui`
- 被依赖: 无（终端入口）

## 禁止事项

- 不实现具体工具逻辑
- 不管理复杂会话状态
- 不直接渲染 UI

## 验证

- `npx tsc --noEmit` 类型检查通过
npm package: @pickle-pee/kernel
Description: Vendored Genesis kernel for agent sessions, providers, and built-in tools
Latest version: 1.0.4

# @pickle-pee/kernel

Vendored Genesis kernel for session lifecycle, provider dispatch, model/auth resolution, and built-in tools.

## Session Contract

`app-runtime` and adapter layers must depend on the exported kernel contract types:

- `KernelSessionContract`
- `KernelSessionSnapshot`
- `KernelCreateSessionOptions`

Contract source: `src/session-contract.ts`.

### Contract Guarantees

- `getSnapshot()` is the canonical way to read session identity and metadata.
- `compact()` is a kernel-owned operation; upper layers do not reimplement compaction semantics.
- `prompt()/followUp()/abort()` define the runtime interaction surface; adapters should not rely on private session internals.

### Integration Rule

- `app-runtime` treats kernel session as a typed contract and does not infer capabilities from ad-hoc object shapes.
- Any contract extension must be added in `src/session-contract.ts` and exported via `src/index.ts` before runtime consumption.
npm package: @pickle-pee/tools
Description: Tool catalog, risk classification, permission labels, and execution wrappers
Latest version: 1.0.4

# @pickle-pee/tools

## 职责

工具治理。定义工具 catalog（identity / contract / policy / executor 四段式模型）、风险分级（L0-L4）、权限策略、命令分类、文件变更队列和审计日志。

## 导出

- **类型**: `ToolDefinition`, `ToolContract`, `ToolPolicy`, `ToolIdentity`, `ToolCategory`, `RiskLevel`, `ToolResultStatus`, `PermissionContext`, `PermissionDecision`, `CommandClass`, `CommandPolicy`, `AuditEntry`, `MutationTarget`, `McpServerDescriptor`, `McpToolEntry` 等
- **工厂**: `createToolCatalog()`, `createPermissionEngine()`, `createMutationQueue()`, `createAuditLog()`
- **工具函数**: `classifyRisk()`, `isDestructiveCommand()`, `classifyCommand()`, `createCommandPolicy()`

## 依赖方向

- 依赖: `app-runtime`
- 被依赖: `app-evaluation`, `app-cli`

## 禁止事项

- 不直接执行工具（编排由 runtime 负责）
- 不包含 UI 逻辑
- 不管理会话状态

## 内部结构

- `types/` — 包级公共类型定义（四段式模型、权限、命令、审计、变更、MCP）
- `catalog/` — 工具注册表（ToolCatalog）
- `policy/` — 权限引擎（PermissionEngine）、风险分级（classifyRisk）、命令分类（classifyCommand）
- `mutation-queue/` — 文件变更队列（MutationQueue）
- `audit/` — 审计日志（AuditLog）
- `domain/` — 领域类型 barrel
- `services/` — 服务工厂 barrel

## 验证

- `npx tsc --noEmit` 类型检查通过
- `npx vitest run` 全部测试通过
npm package: @pickle-pee/tui-core
Description: Terminal rendering core: capability detection, screen frames, and terminal mode lifecycle
Latest version: 1.0.4

# @pickle-pee/tui-core

Terminal rendering core for Genesis CLI.

This package is the foundation for the next-generation interactive workbench.
It owns terminal capability detection, mode lifecycle, screen frame modeling,
and frame diff primitives.

Current scope:

- Detect terminal host families and capability defaults
- Centralize terminal mode enter/exit sequences
- Define screen frame and cursor primitives
- Provide a minimal line-based frame diff model

Non-goals:

- Session/runtime orchestration
- Slash command semantics
- Product-specific layout or copy
- CLI argument parsing
npm package: @pickle-pee/ui
Description: TUI components, text formatters, and JSON/RPC event format mapping
Latest version: 1.0.4

# @pickle-pee/ui

## 职责

体验层。提供交互式 TUI 组件、文本输出格式器和 JSON/RPC 事件格式映射。将 runtime 的标准化事件转换为用户可感知的输出。

## 导出

- TUI 组件接口
- 文本格式化器接口
- JSON/RPC 事件映射器
- 输出模式类型

## 依赖方向

- 依赖: `app-runtime`
- 被依赖: `app-cli`

## 禁止事项

- 不包含业务逻辑
- 不实现工具
- 不管理会话状态
- 不泄漏 TUI 专属字段到 JSON/RPC 契约

## 内部结构

- `domain/` — 输出模型、交互状态
- `services/` — 格式化、事件映射
- `adapters/` — 连接上游 `pi-tui` 的适配层
- `types/` — 包级公共类型定义

## 验证

- `npx tsc --noEmit` 类型检查通过
npm package: @pickled-dev/cli
Description: Stay fresh in AI 🥒
Latest version: 0.4.0

# @pickled-dev/cli

> Stay fresh in AI 🥒

Test how well AI responds to questions about your developer tool. Define scenarios, run checks, and see your freshness score.

## Installation

```bash
bun add -g @pickled-dev/cli
```

## Usage

### 1. Initialize config

```bash
pickled init
```

Creates a `pickled.yml` file:

```yaml
tool:
  name: "your-tool"
  description: "What your tool does"

scenarios:
  - name: "Installation"
    prompt: "How do I install this tool?"

  - name: "Getting started"
    prompt: "How do I set up this tool for my project?"

  - name: "Basic usage"
    prompt: "Show me a basic example of using this tool"
```

### 2. Edit your config

Update `pickled.yml` with your actual tool info and scenarios developers might ask about.

### 3. Run check

```bash
pickled check
```

## Commands

### `pickled init [path]`

Create a starter `pickled.yml` config file.

### `pickled check [path]`

Run freshness checks and report results.

| Option                | Description            |
| --------------------- | ---------------------- |
| `--json`              | Output as JSON         |
| `-o, --output <file>` | Save report to file    |
| `-v, --verbose`       | Show detailed progress |
| `-t, --threshold <n>` | Min score % to pass    |

## Example Output

```
🥒 Freshness Check
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Tool: zod

  [default] ✓ "Installation" - Well preserved (92%)
  [default] ✓ "Basic parsing" - Fresh (85%)
  [default] ⚠ "Error handling" - Going stale (65%)
      Missing: safeParse details

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Freshness Score: 81% 🥒🥒🥒🥒░

🥒 Looking fresh! Your docs are doing well.
```

## Freshness Scores

| Score | Status | Meaning |
|-------|--------|---------|
| 90%+ | Well preserved | AI nails it |
| 70-89% | Fresh | Good, minor gaps |
| 50-69% | Going stale | Needs attention |
| <50% | Gone sour | Major documentation gaps |

## Config Reference

```yaml
tool:
  name: "tool-name"       # Required: your tool's name
  description: "desc"     # Required: what it does

scenarios:                # Required: scenarios to check
  - name: "Scenario name" # Display name
    prompt: "The question" # What to ask AI
    target: target-name   # Optional: specific target

targets:                  # Optional: named targets
  claude-sonnet:
    category: cli
    provider: claude-code
    model: claude-sonnet-4-20250514

threshold: 80             # Optional: min score % to pass
```

## CI/CD Integration

```yaml
# GitHub Actions
- name: Check AI freshness
  run: pickled check --threshold 80
```

Fail the build if AI can't answer questions about your tool correctly.

## Local Development

```bash
# From the monorepo root
bun install
bun run dev:cli -- init
bun run dev:cli -- check
```