homingo 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/LICENSE +68 -0
- package/README.md +249 -0
- package/dist/commands/audit.d.ts +14 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +178 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +240 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/lint.d.ts +20 -0
- package/dist/commands/lint.d.ts.map +1 -0
- package/dist/commands/lint.js +490 -0
- package/dist/commands/lint.js.map +1 -0
- package/dist/commands/logs.d.ts +8 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +67 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +67 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +54 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/anthropic.d.ts +7 -0
- package/dist/providers/anthropic.d.ts.map +1 -0
- package/dist/providers/anthropic.js +29 -0
- package/dist/providers/anthropic.js.map +1 -0
- package/dist/providers/index.d.ts +20 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +43 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/openai.d.ts +7 -0
- package/dist/providers/openai.d.ts.map +1 -0
- package/dist/providers/openai.js +32 -0
- package/dist/providers/openai.js.map +1 -0
- package/dist/providers/tracked-provider.d.ts +15 -0
- package/dist/providers/tracked-provider.d.ts.map +1 -0
- package/dist/providers/tracked-provider.js +26 -0
- package/dist/providers/tracked-provider.js.map +1 -0
- package/dist/providers/types.d.ts +23 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +2 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/reporting/html-renderer.d.ts +26 -0
- package/dist/reporting/html-renderer.d.ts.map +1 -0
- package/dist/reporting/html-renderer.js +549 -0
- package/dist/reporting/html-renderer.js.map +1 -0
- package/dist/reporting/logs-viewer.d.ts +12 -0
- package/dist/reporting/logs-viewer.d.ts.map +1 -0
- package/dist/reporting/logs-viewer.js +221 -0
- package/dist/reporting/logs-viewer.js.map +1 -0
- package/dist/reporting/opener.d.ts +9 -0
- package/dist/reporting/opener.d.ts.map +1 -0
- package/dist/reporting/opener.js +49 -0
- package/dist/reporting/opener.js.map +1 -0
- package/dist/reporting/run-metadata.d.ts +55 -0
- package/dist/reporting/run-metadata.d.ts.map +1 -0
- package/dist/reporting/run-metadata.js +61 -0
- package/dist/reporting/run-metadata.js.map +1 -0
- package/dist/reporting/storage.d.ts +27 -0
- package/dist/reporting/storage.d.ts.map +1 -0
- package/dist/reporting/storage.js +126 -0
- package/dist/reporting/storage.js.map +1 -0
- package/dist/rewriter/rewriter.d.ts +21 -0
- package/dist/rewriter/rewriter.d.ts.map +1 -0
- package/dist/rewriter/rewriter.js +63 -0
- package/dist/rewriter/rewriter.js.map +1 -0
- package/dist/shadow-router/generator.d.ts +14 -0
- package/dist/shadow-router/generator.d.ts.map +1 -0
- package/dist/shadow-router/generator.js +58 -0
- package/dist/shadow-router/generator.js.map +1 -0
- package/dist/shadow-router/pair-selector.d.ts +17 -0
- package/dist/shadow-router/pair-selector.d.ts.map +1 -0
- package/dist/shadow-router/pair-selector.js +146 -0
- package/dist/shadow-router/pair-selector.js.map +1 -0
- package/dist/shadow-router/scorer.d.ts +4 -0
- package/dist/shadow-router/scorer.d.ts.map +1 -0
- package/dist/shadow-router/scorer.js +169 -0
- package/dist/shadow-router/scorer.js.map +1 -0
- package/dist/shadow-router/simulator.d.ts +17 -0
- package/dist/shadow-router/simulator.d.ts.map +1 -0
- package/dist/shadow-router/simulator.js +64 -0
- package/dist/shadow-router/simulator.js.map +1 -0
- package/dist/shard/analyzer.d.ts +28 -0
- package/dist/shard/analyzer.d.ts.map +1 -0
- package/dist/shard/analyzer.js +146 -0
- package/dist/shard/analyzer.js.map +1 -0
- package/dist/shard/writer.d.ts +11 -0
- package/dist/shard/writer.d.ts.map +1 -0
- package/dist/shard/writer.js +53 -0
- package/dist/shard/writer.js.map +1 -0
- package/dist/skills/parser.d.ts +3 -0
- package/dist/skills/parser.d.ts.map +1 -0
- package/dist/skills/parser.js +48 -0
- package/dist/skills/parser.js.map +1 -0
- package/dist/types.d.ts +83 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/concurrency.d.ts +2 -0
- package/dist/utils/concurrency.d.ts.map +1 -0
- package/dist/utils/concurrency.js +14 -0
- package/dist/utils/concurrency.js.map +1 -0
- package/dist/utils/retry.d.ts +7 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/retry.js +44 -0
- package/dist/utils/retry.js.map +1 -0
- package/package.json +88 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Homingo will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2026-03-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **`homingo audit`** — Read-only fleet diagnostic detecting routing conflicts across skill pairs
|
|
12
|
+
- Heuristic pair selection with Jaccard similarity and optional bigram matching (`--enhanced`)
|
|
13
|
+
- LLM-based adversarial routing simulation
|
|
14
|
+
- Self-contained HTML conflict reports
|
|
15
|
+
- Support for `--all-pairs`, `--dry-run`, `--json` output modes
|
|
16
|
+
- **`homingo lint`** — Pre-deploy validation with routing tests, scope overload detection, and fix suggestions
|
|
17
|
+
- Fleet-wide pair conflict testing
|
|
18
|
+
- Single-skill neighbor testing (`--skill <name>`)
|
|
19
|
+
- Scope overload detection with shard plan generation
|
|
20
|
+
- Description rewrite suggestions with `--fix` to apply changes
|
|
21
|
+
- Configurable accuracy threshold (`--threshold`)
|
|
22
|
+
- **`homingo init`** — Interactive project setup with config scaffolding and sample skill
|
|
23
|
+
- **`homingo logs`** — Browse past audit and lint results with HTML viewer
|
|
24
|
+
- `--regenerate` flag to re-render reports after template updates
|
|
25
|
+
- **Shadow Router engine** — Adversarial prompt generation and routing simulation core
|
|
26
|
+
- **HTML reporting** — Self-contained reports with no external dependencies
|
|
27
|
+
- **Provider support** — Anthropic (`claude-*`) and OpenAI (`gpt-*`, `o1-*`, `o3-*`) models
|
|
28
|
+
- **Configuration** — `.homingo/config.json` with model, thresholds, and output settings
|
package/LICENSE
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Parameters
|
|
4
|
+
|
|
5
|
+
Licensor: Ravi Y.
|
|
6
|
+
Licensed Work: Homingo 0.1.0
|
|
7
|
+
The Licensed Work is (c) 2026 Ravi Y.
|
|
8
|
+
Additional Use Grant: You may make use of the Licensed Work, provided that
|
|
9
|
+
you may not use the Licensed Work for a Routing Drift
|
|
10
|
+
Detection Service.
|
|
11
|
+
|
|
12
|
+
A "Routing Drift Detection Service" is a commercial
|
|
13
|
+
offering that allows third parties to access the
|
|
14
|
+
functionality of the Licensed Work by providing it as
|
|
15
|
+
a hosted or managed service, where the service provides
|
|
16
|
+
users with access to any substantial set of the features
|
|
17
|
+
or functionality of the Licensed Work.
|
|
18
|
+
|
|
19
|
+
Change Date: Four years from the date the Licensed Work is published.
|
|
20
|
+
Change License: Apache License, Version 2.0
|
|
21
|
+
|
|
22
|
+
For information about alternative licensing arrangements for the Licensed Work,
|
|
23
|
+
please contact the Licensor.
|
|
24
|
+
|
|
25
|
+
Notice
|
|
26
|
+
|
|
27
|
+
Business Source License 1.1
|
|
28
|
+
|
|
29
|
+
Terms
|
|
30
|
+
|
|
31
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
32
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
33
|
+
Licensor may make an Additional Use Grant, above, permitting limited production
|
|
34
|
+
use.
|
|
35
|
+
|
|
36
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
37
|
+
available distribution of a specific version of the Licensed Work under this
|
|
38
|
+
License, whichever comes first, the Licensor hereby grants you rights under the
|
|
39
|
+
terms of the Change License, and the rights granted in the paragraph above
|
|
40
|
+
terminate.
|
|
41
|
+
|
|
42
|
+
If your use of the Licensed Work does not comply with the requirements currently
|
|
43
|
+
in effect as described in this License, you must purchase a commercial license
|
|
44
|
+
from the Licensor, its affiliated entities, or authorized resellers, or you must
|
|
45
|
+
refrain from using the Licensed Work.
|
|
46
|
+
|
|
47
|
+
All copies of the original and modified Licensed Work, and derivative works of
|
|
48
|
+
the Licensed Work, are subject to this License. This License applies separately
|
|
49
|
+
for each version of the Licensed Work and the Change Date may vary for each
|
|
50
|
+
version of the Licensed Work released by Licensor.
|
|
51
|
+
|
|
52
|
+
You must conspicuously display this License on each original or modified copy of
|
|
53
|
+
the Licensed Work. If you receive the Licensed Work in original or modified form
|
|
54
|
+
from a third party, the terms and conditions set forth in this License apply to
|
|
55
|
+
your use of that work.
|
|
56
|
+
|
|
57
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
58
|
+
terminate your rights under this License for the current and all other versions
|
|
59
|
+
of the Licensed Work.
|
|
60
|
+
|
|
61
|
+
This License does not grant you any right in any trademark or logo of Licensor
|
|
62
|
+
or its affiliates (provided that you may use a trademark or logo of Licensor as
|
|
63
|
+
expressly required by this License).
|
|
64
|
+
|
|
65
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN
|
|
66
|
+
"AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS
|
|
67
|
+
OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY,
|
|
68
|
+
FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
|
package/README.md
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/logo.png" alt="Homingo" width="280" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h3 align="center">The homing instinct for your AI skills</h3>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Detect, diagnose, and fix routing drift in AI skill deployments.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://homingo.github.io">Documentation</a> ·
|
|
13
|
+
<a href="#quick-start">Quick Start</a> ·
|
|
14
|
+
<a href="#commands">Commands</a> ·
|
|
15
|
+
<a href="#how-it-works">How It Works</a> ·
|
|
16
|
+
<a href="#contributing">Contributing</a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## The Problem
|
|
22
|
+
|
|
23
|
+
You build 10 AI skills and routing works great. You build 50 and the model starts picking the wrong one — "Tax Optimizer" fires for invoice summaries, "Legal Review" and "Legal Compliance" blur together. Descriptions accumulate overlap silently. There is no tooling to detect this.
|
|
24
|
+
|
|
25
|
+
**Homingo** is the orchestration layer that sits on top of your AI platform's skill primitives. It turns _"I hope the model picks the right tool"_ into _"I have verified the model will pick the right tool."_
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Install
|
|
31
|
+
npm install -g homingo
|
|
32
|
+
|
|
33
|
+
# Init/Configure
|
|
34
|
+
homingo init
|
|
35
|
+
|
|
36
|
+
# Run a read-only diagnostic on your skill fleet
|
|
37
|
+
homingo audit
|
|
38
|
+
|
|
39
|
+
# Pre-deploy validation with fix suggestions
|
|
40
|
+
homingo lint
|
|
41
|
+
|
|
42
|
+
# Test a single skill before shipping it
|
|
43
|
+
homingo lint --skill my-new-skill
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Commands
|
|
47
|
+
|
|
48
|
+
### `homingo init`
|
|
49
|
+
|
|
50
|
+
Interactive setup. Creates a `.homingo/config.json` and scaffolds a skills directory with a sample `SKILL.md`.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
homingo init
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### `homingo audit`
|
|
57
|
+
|
|
58
|
+
Read-only fleet diagnostic. No writes, no rewrites, just truth.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
homingo audit --skills-dir ./skills
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Outputs a conflict map showing which skill pairs have routing overlap, an estimated fleet error rate, severity-ranked pair list, and the top offenders. The report opens as a self-contained HTML file.
|
|
65
|
+
|
|
66
|
+
| Flag | Description |
|
|
67
|
+
|------|-------------|
|
|
68
|
+
| `--all-pairs` | Test every skill pair (expensive, thorough) |
|
|
69
|
+
| `--prompts <n>` | Adversarial prompts per pair (default: 50) |
|
|
70
|
+
| `--model <model>` | LLM model to use |
|
|
71
|
+
| `--enhanced` | Bigram matching for improved overlap detection |
|
|
72
|
+
| `--concurrency <n>` | Max parallel API calls (default: 10) |
|
|
73
|
+
| `--dry-run` | Show pairs without making API calls |
|
|
74
|
+
| `--json` | Output JSON instead of terminal table |
|
|
75
|
+
| `--no-open` | Don't auto-open the HTML report |
|
|
76
|
+
|
|
77
|
+
### `homingo lint`
|
|
78
|
+
|
|
79
|
+
Pre-deploy validation. Tests routing accuracy, detects scope overload, suggests description rewrites, and proposes skill sharding when descriptions cover too many intents.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Fleet-wide lint
|
|
83
|
+
homingo lint
|
|
84
|
+
|
|
85
|
+
# Single-skill lint (test one skill against its neighbors)
|
|
86
|
+
homingo lint --skill invoice-summary
|
|
87
|
+
|
|
88
|
+
# Auto-fix descriptions and write shard plans
|
|
89
|
+
homingo lint --fix
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
| Flag | Description |
|
|
93
|
+
|------|-------------|
|
|
94
|
+
| `--skill <name>` | Test one skill against its neighbors instead of the full fleet |
|
|
95
|
+
| `--threshold <pct>` | Accuracy threshold to pass (default: 90) |
|
|
96
|
+
| `--neighbors <n>` | Max neighbors in single-skill mode (default: 5) |
|
|
97
|
+
| `--fix` | Apply suggested rewrites and shard plans to SKILL.md files |
|
|
98
|
+
| `--force` | Run scope overload checks on all skills, not just flagged ones |
|
|
99
|
+
| `--prompts <n>` | Adversarial prompts per pair (default: 50) |
|
|
100
|
+
| `--model <model>` | LLM model to use |
|
|
101
|
+
| `--enhanced` | Bigram matching for improved overlap detection |
|
|
102
|
+
| `--concurrency <n>` | Max parallel API calls (default: 10) |
|
|
103
|
+
| `--dry-run` | Show pairs and scope checks without making API calls |
|
|
104
|
+
| `--json` | Output JSON only |
|
|
105
|
+
| `--no-open` | Don't auto-open the HTML report |
|
|
106
|
+
|
|
107
|
+
### `homingo logs`
|
|
108
|
+
|
|
109
|
+
Browse past audit and lint results. Opens an HTML viewer with tabs for each command type.
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
homingo logs # html output
|
|
113
|
+
homingo logs --json # raw json data
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## How It Works
|
|
117
|
+
|
|
118
|
+
Homingo's core engine is the **Shadow Router**; an adversarial prompt generator combined with a routing simulator.
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Skill Fleet
|
|
122
|
+
│
|
|
123
|
+
▼
|
|
124
|
+
┌─────────────────────┐
|
|
125
|
+
│ Pair Selector │ Identifies which skill pairs have overlapping descriptions
|
|
126
|
+
└─────────┬───────────┘
|
|
127
|
+
│
|
|
128
|
+
▼
|
|
129
|
+
┌─────────────────────┐
|
|
130
|
+
│ Prompt Generator │ Creates adversarial prompts at the boundary between two skills
|
|
131
|
+
└─────────┬───────────┘
|
|
132
|
+
│
|
|
133
|
+
▼
|
|
134
|
+
┌─────────────────────┐
|
|
135
|
+
│ Routing Simulator │ Asks the LLM: "Given these skills, which one handles this prompt?"
|
|
136
|
+
└─────────┬───────────┘
|
|
137
|
+
│
|
|
138
|
+
▼
|
|
139
|
+
┌─────────────────────┐
|
|
140
|
+
│ Conflict Scorer │ Aggregates results into accuracy scores and severity ratings
|
|
141
|
+
└─────────┬───────────┘
|
|
142
|
+
│
|
|
143
|
+
▼
|
|
144
|
+
┌─────────────────────┐
|
|
145
|
+
│ Description Rewriter│ Suggests targeted rewrites to reduce routing confusion
|
|
146
|
+
└─────────────────────┘
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Skill Format
|
|
150
|
+
|
|
151
|
+
Each skill is a directory with a `SKILL.md` file using YAML frontmatter:
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
---
|
|
155
|
+
name: invoice-summary
|
|
156
|
+
description: "Generates concise summaries of invoice documents, extracting key fields like total amount, due date, vendor name, and line items."
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
# Invoice Summary
|
|
160
|
+
|
|
161
|
+
Additional context, examples, or documentation for the skill.
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Overlap Detection
|
|
165
|
+
|
|
166
|
+
Homingo uses a two-stage approach:
|
|
167
|
+
|
|
168
|
+
1. **Heuristic pair selection:** Jaccard similarity on tokenized descriptions + name keyword overlap. Optional bigram matching with `--enhanced`. This runs locally with no API calls.
|
|
169
|
+
2. **LLM-based routing simulation:** For selected pairs, Homingo generates adversarial prompts and asks the model to route them. This measures actual routing accuracy, not just textual similarity.
|
|
170
|
+
|
|
171
|
+
### Scope Overload Detection
|
|
172
|
+
|
|
173
|
+
When a skill description exceeds 1024 characters or shows signs of multi-intent scope (multiple semicolons, excessive clauses, "and [verb]" patterns), Homingo flags it as overloaded and proposes a **shard plan**: splitting into focused sub-skills plus an orchestrator.
|
|
174
|
+
|
|
175
|
+
## Configuration
|
|
176
|
+
|
|
177
|
+
Homingo stores its configuration in `.homingo/config.json`:
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"model": "claude-sonnet-4-20250514",
|
|
182
|
+
"skillsDir": "./skills",
|
|
183
|
+
"shadowRouter": {
|
|
184
|
+
"promptsPerPair": 50,
|
|
185
|
+
"minPrompts": 10,
|
|
186
|
+
"accuracyThreshold": 90,
|
|
187
|
+
"maxIterations": 3
|
|
188
|
+
},
|
|
189
|
+
"output": {
|
|
190
|
+
"reportDir": "./reports",
|
|
191
|
+
"format": "both"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Provider Support
|
|
197
|
+
|
|
198
|
+
Homingo supports both Anthropic and OpenAI models. The provider is auto-detected from the model name:
|
|
199
|
+
|
|
200
|
+
- `claude-*` → Anthropic
|
|
201
|
+
- `gpt-*`, `o1-*`, `o3-*` → OpenAI
|
|
202
|
+
|
|
203
|
+
## Reports
|
|
204
|
+
|
|
205
|
+
Every `audit` and `lint` run generates:
|
|
206
|
+
|
|
207
|
+
- **JSON metadata:** run parameters, token usage, results
|
|
208
|
+
- **Self-contained HTML report:** no external dependencies, opens in any browser
|
|
209
|
+
|
|
210
|
+
Reports are stored in the configured `reportDir` (default: `./reports/`) with automatic retention of the last 10 runs per command. Use `homingo logs` to browse them.
|
|
211
|
+
|
|
212
|
+
## Requirements
|
|
213
|
+
|
|
214
|
+
- **Node.js** ≥ 22
|
|
215
|
+
- An API key for Anthropic or OpenAI
|
|
216
|
+
|
|
217
|
+
## Development
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
git clone https://github.com/homingo/homingo.github.io.git
|
|
221
|
+
cd homingo
|
|
222
|
+
npm install
|
|
223
|
+
npm run build
|
|
224
|
+
npm test
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
npm run typecheck # TypeScript type checking
|
|
229
|
+
npm run lint # ESLint
|
|
230
|
+
npm run format # Prettier
|
|
231
|
+
npm run test:watch # Vitest in watch mode
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Security
|
|
235
|
+
|
|
236
|
+
See [SECURITY.md](SECURITY.md) for our security policy and how to report vulnerabilities.
|
|
237
|
+
|
|
238
|
+
## Contributing
|
|
239
|
+
|
|
240
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute.
|
|
241
|
+
|
|
242
|
+
Special thanks to [Chris Mikelson](https://github.com/cmike444) for his support.
|
|
243
|
+
|
|
244
|
+
Thanks to all contributors:
|
|
245
|
+
|
|
246
|
+
<p align="left">
|
|
247
|
+
<a href="https://github.com/rk-yen"><img src="https://avatars.githubusercontent.com/u/4944665?v=4&size=64&s=48" width="48" height="48" alt="dirbalak" title="dirbalak"/></a>
|
|
248
|
+
<a href="https://github.com/cmike444"><img src="https://avatars.githubusercontent.com/u/3966839?v=4&s=48" width="48" height="48" alt="dirbalak" title="dirbalak"/></a>
|
|
249
|
+
</p>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface AuditOptions {
|
|
2
|
+
allPairs?: boolean;
|
|
3
|
+
prompts?: string;
|
|
4
|
+
model?: string;
|
|
5
|
+
json?: boolean;
|
|
6
|
+
concurrency?: string;
|
|
7
|
+
dryRun?: boolean;
|
|
8
|
+
enhanced?: boolean;
|
|
9
|
+
skillsDir?: string;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function auditCommand(options: AuditOptions): Promise<void>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/commands/audit.ts"],"names":[],"mappings":"AAeA,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA4IvE"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import Table from "cli-table3";
|
|
3
|
+
import ora from "ora";
|
|
4
|
+
import { loadConfig, resolvePath } from "../config.js";
|
|
5
|
+
import { createProvider, detectProvider, TrackedProvider } from "../providers/index.js";
|
|
6
|
+
import { parseSkills } from "../skills/parser.js";
|
|
7
|
+
import { selectPairs } from "../shadow-router/pair-selector.js";
|
|
8
|
+
import { PromptGenerator } from "../shadow-router/generator.js";
|
|
9
|
+
import { RoutingSimulator } from "../shadow-router/simulator.js";
|
|
10
|
+
import { scorePair, scoreFleet } from "../shadow-router/scorer.js";
|
|
11
|
+
import { RunCollector } from "../reporting/run-metadata.js";
|
|
12
|
+
import { saveRun } from "../reporting/storage.js";
|
|
13
|
+
import { isHeadless, openInBrowser } from "../reporting/opener.js";
|
|
14
|
+
export async function auditCommand(options) {
|
|
15
|
+
const config = loadConfig();
|
|
16
|
+
const skillsDir = resolvePath(options.skillsDir || config.skillsDir);
|
|
17
|
+
const model = options.model || config.model;
|
|
18
|
+
const promptsPerPair = parseInt(options.prompts || "50", 10);
|
|
19
|
+
// Parse skills
|
|
20
|
+
const parseSpinner = ora("Parsing skills...").start();
|
|
21
|
+
let skills;
|
|
22
|
+
try {
|
|
23
|
+
skills = await parseSkills(skillsDir);
|
|
24
|
+
parseSpinner.succeed(`Found ${skills.length} skills`);
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
parseSpinner.fail(err.message);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
if (skills.length < 2) {
|
|
31
|
+
console.log(chalk.yellow("Need at least 2 skills to detect conflicts."));
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}
|
|
34
|
+
// Select pairs
|
|
35
|
+
const pairResult = selectPairs(skills, options.allPairs, options.enhanced ?? false);
|
|
36
|
+
const { selectedPairs, skippedPairs, totalPossiblePairs } = pairResult;
|
|
37
|
+
if (selectedPairs.length === 0) {
|
|
38
|
+
console.log(chalk.green("No overlapping skill pairs detected. Fleet looks clean."));
|
|
39
|
+
process.exit(0);
|
|
40
|
+
}
|
|
41
|
+
console.log(`\nTesting ${chalk.bold(String(selectedPairs.length))} pairs` +
|
|
42
|
+
` (of ${totalPossiblePairs} possible)` +
|
|
43
|
+
(skippedPairs > 0 ? ` — ${skippedPairs} low-overlap pairs skipped` : ""));
|
|
44
|
+
const estimatedCalls = selectedPairs.length * (promptsPerPair + 1);
|
|
45
|
+
console.log(chalk.dim(`Estimated API calls: ~${estimatedCalls} (model: ${model})\n`));
|
|
46
|
+
if (options.dryRun) {
|
|
47
|
+
console.log(chalk.bold("Dry run — pairs that would be tested:\n"));
|
|
48
|
+
const table = new Table({
|
|
49
|
+
head: ["Skill Pair", "Overlap Score", "Reason"],
|
|
50
|
+
colWidths: [40, 15, 50],
|
|
51
|
+
style: { head: [] },
|
|
52
|
+
});
|
|
53
|
+
for (const pair of selectedPairs) {
|
|
54
|
+
table.push([
|
|
55
|
+
`${pair.skillA.name} ↔ ${pair.skillB.name}`,
|
|
56
|
+
`${(pair.overlapScore * 100).toFixed(0)}%`,
|
|
57
|
+
pair.reason,
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
console.log(table.toString());
|
|
61
|
+
console.log(chalk.dim(`\nNo API calls made.`));
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Generate prompts and simulate routing for each pair
|
|
65
|
+
const providerName = detectProvider(model);
|
|
66
|
+
const innerProvider = createProvider(model, config);
|
|
67
|
+
const tracked = new TrackedProvider(innerProvider);
|
|
68
|
+
const collector = new RunCollector("audit", sanitizeArgs(options), model, providerName);
|
|
69
|
+
collector.setSkillCount(skills.length);
|
|
70
|
+
const generator = new PromptGenerator({ provider: tracked, model });
|
|
71
|
+
const concurrency = parseInt(options.concurrency || "10", 10);
|
|
72
|
+
const simulator = new RoutingSimulator({ provider: tracked, model, concurrency });
|
|
73
|
+
const pairReports = [];
|
|
74
|
+
for (let i = 0; i < selectedPairs.length; i++) {
|
|
75
|
+
const pair = selectedPairs[i];
|
|
76
|
+
const pairLabel = `${pair.skillA.name} ↔ ${pair.skillB.name}`;
|
|
77
|
+
const spinner = ora(`[${i + 1}/${selectedPairs.length}] Testing: ${pairLabel}`).start();
|
|
78
|
+
try {
|
|
79
|
+
// Generate adversarial prompts
|
|
80
|
+
const prompts = await generator.generate(pair.skillA, pair.skillB, promptsPerPair);
|
|
81
|
+
// Run routing simulation
|
|
82
|
+
const decisions = await simulator.simulateBatch(prompts, skills, (completed, total) => {
|
|
83
|
+
spinner.text = `[${i + 1}/${selectedPairs.length}] ${pairLabel} — routing ${completed}/${total}`;
|
|
84
|
+
});
|
|
85
|
+
// Score the pair
|
|
86
|
+
const report = scorePair(pair.skillA.name, pair.skillB.name, decisions);
|
|
87
|
+
pairReports.push(report);
|
|
88
|
+
const severityColor = report.severityLevel === "CRITICAL"
|
|
89
|
+
? chalk.red
|
|
90
|
+
: report.severityLevel === "HIGH"
|
|
91
|
+
? chalk.yellow
|
|
92
|
+
: report.severityLevel === "MEDIUM"
|
|
93
|
+
? chalk.cyan
|
|
94
|
+
: chalk.green;
|
|
95
|
+
spinner.succeed(`${pairLabel} — ${severityColor(report.severityLevel)} (${report.routingAccuracy}% accuracy)`);
|
|
96
|
+
}
|
|
97
|
+
catch (err) {
|
|
98
|
+
spinner.fail(`${pairLabel} — Error: ${err.message}`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (pairReports.length === 0) {
|
|
102
|
+
console.log(chalk.red("\nNo pairs were successfully tested."));
|
|
103
|
+
process.exit(1);
|
|
104
|
+
}
|
|
105
|
+
// Generate fleet report
|
|
106
|
+
const reportDir = resolvePath(config.output.reportDir);
|
|
107
|
+
const fleetReport = scoreFleet(pairReports, skills.length, model, "");
|
|
108
|
+
// Output to terminal
|
|
109
|
+
if (options.json) {
|
|
110
|
+
console.log(JSON.stringify(fleetReport, null, 2));
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
printReport(fleetReport);
|
|
114
|
+
}
|
|
115
|
+
// Save report + HTML
|
|
116
|
+
collector.setResult({
|
|
117
|
+
type: "audit",
|
|
118
|
+
fleetErrorRate: fleetReport.estimatedFleetErrorRate,
|
|
119
|
+
pairsTested: fleetReport.totalPairsTested,
|
|
120
|
+
criticalCount: fleetReport.criticalPairs.length,
|
|
121
|
+
highCount: fleetReport.highPairs.length,
|
|
122
|
+
mediumCount: fleetReport.mediumPairs.length,
|
|
123
|
+
lowCount: fleetReport.lowPairs.length,
|
|
124
|
+
});
|
|
125
|
+
const metadata = collector.finalize(tracked);
|
|
126
|
+
const stored = saveRun("audit", metadata, fleetReport, reportDir);
|
|
127
|
+
if (options.open !== false && !isHeadless()) {
|
|
128
|
+
openInBrowser(stored.htmlPath);
|
|
129
|
+
}
|
|
130
|
+
console.log(chalk.dim(`\nReport: ${stored.htmlPath}`));
|
|
131
|
+
}
|
|
132
|
+
function sanitizeArgs(options) {
|
|
133
|
+
return {
|
|
134
|
+
allPairs: options.allPairs ?? false,
|
|
135
|
+
prompts: options.prompts ?? "50",
|
|
136
|
+
dryRun: options.dryRun ?? false,
|
|
137
|
+
enhanced: options.enhanced ?? false,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function printReport(report) {
|
|
141
|
+
const date = report.generatedAt.slice(0, 10);
|
|
142
|
+
console.log(`\n${chalk.bold("Homingo Audit Report")} — ${date}`);
|
|
143
|
+
console.log(`Model: ${report.modelUsed}`);
|
|
144
|
+
console.log(`Skills: ${report.totalSkills} | ` +
|
|
145
|
+
`Pairs Tested: ${report.totalPairsTested} | ` +
|
|
146
|
+
`Fleet Error Rate: ${chalk.bold(String(report.estimatedFleetErrorRate))}%`);
|
|
147
|
+
const sections = [
|
|
148
|
+
{ label: "CRITICAL", color: chalk.red, pairs: report.criticalPairs },
|
|
149
|
+
{ label: "HIGH", color: chalk.yellow, pairs: report.highPairs },
|
|
150
|
+
{ label: "MEDIUM", color: chalk.cyan, pairs: report.mediumPairs },
|
|
151
|
+
{ label: "LOW", color: chalk.green, pairs: report.lowPairs },
|
|
152
|
+
];
|
|
153
|
+
for (const section of sections) {
|
|
154
|
+
if (section.pairs.length === 0)
|
|
155
|
+
continue;
|
|
156
|
+
console.log(`\n${section.color(section.label)} (${section.pairs.length} pairs):`);
|
|
157
|
+
const table = new Table({
|
|
158
|
+
head: ["Skill Pair", "Accuracy", "Action"],
|
|
159
|
+
colWidths: [40, 12, 50],
|
|
160
|
+
style: { head: [] },
|
|
161
|
+
});
|
|
162
|
+
for (const pair of section.pairs) {
|
|
163
|
+
table.push([
|
|
164
|
+
`${pair.skillA} ↔ ${pair.skillB}`,
|
|
165
|
+
`${pair.routingAccuracy}%`,
|
|
166
|
+
pair.recommendedAction,
|
|
167
|
+
]);
|
|
168
|
+
}
|
|
169
|
+
console.log(table.toString());
|
|
170
|
+
}
|
|
171
|
+
if (report.topFiveOffenders.length > 0) {
|
|
172
|
+
console.log(`\n${chalk.bold("Top offenders")} (skills appearing in most conflicts):`);
|
|
173
|
+
report.topFiveOffenders.forEach((name, i) => {
|
|
174
|
+
console.log(` ${i + 1}. ${name}`);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.js","source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