@allenpan2026/harshjudge 0.4.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/.claude-plugin/marketplace.json +17 -0
- package/.claude-plugin/plugin.json +11 -0
- package/LICENSE +21 -0
- package/README.md +224 -0
- package/dist/cli.js +1869 -0
- package/dist/cli.js.map +1 -0
- package/dist/dashboard-worker.js +896 -0
- package/dist/dashboard-worker.js.map +1 -0
- package/package.json +64 -0
- package/skills/harshjudge/SKILL.md +152 -0
- package/skills/harshjudge/assets/prd.md +36 -0
- package/skills/harshjudge/references/create.md +258 -0
- package/skills/harshjudge/references/iterate.md +152 -0
- package/skills/harshjudge/references/run-playwright.md +41 -0
- package/skills/harshjudge/references/run-step-agent.md +65 -0
- package/skills/harshjudge/references/run.md +129 -0
- package/skills/harshjudge/references/setup.md +129 -0
- package/skills/harshjudge/references/status.md +134 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "harshjudge-marketplace",
|
|
3
|
+
"description": "HarshJudge plugin marketplace",
|
|
4
|
+
"plugins": [
|
|
5
|
+
{
|
|
6
|
+
"name": "harshjudge",
|
|
7
|
+
"version": "0.4.0",
|
|
8
|
+
"description": "AI-native E2E testing orchestration for Claude Code",
|
|
9
|
+
"repository": "https://github.com/HuskyDanny/HarshJudge",
|
|
10
|
+
"source": {
|
|
11
|
+
"type": "github",
|
|
12
|
+
"repo": "HuskyDanny/HarshJudge",
|
|
13
|
+
"path": "/"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "harshjudge",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "AI-native E2E testing orchestration for Claude Code",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Allen Pan"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://github.com/HuskyDanny/HarshJudge",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": ["testing", "e2e", "ai", "claude-code"]
|
|
11
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Anthropic, PBC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# HarshJudge
|
|
2
|
+
|
|
3
|
+
AI-native E2E testing orchestration for Claude Code. Create, run, and manage end-to-end test scenarios with visual evidence capture — powered by a CLI tool and Claude Code skills.
|
|
4
|
+
|
|
5
|
+
**Key design:** file-system-as-database (local-first, git-friendly, no cloud dependencies).
|
|
6
|
+
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Claude Code Skill → Bash → CLI → FileSystem
|
|
11
|
+
(workflow) (storage)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
| Component | Description |
|
|
15
|
+
|-----------|-------------|
|
|
16
|
+
| **Skill** | Structured workflows that guide Claude through test creation, execution, and iteration |
|
|
17
|
+
| **CLI** | Commands for managing scenarios, runs, evidence, and dashboard lifecycle |
|
|
18
|
+
| **Dashboard** | React-based 3-column UI for browsing results with real-time file watching |
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Install globally
|
|
24
|
+
npm install -g @allenpan2026/harshjudge
|
|
25
|
+
|
|
26
|
+
# Or run without installing
|
|
27
|
+
npx @allenpan2026/harshjudge --help
|
|
28
|
+
|
|
29
|
+
# Initialize HarshJudge in your project
|
|
30
|
+
harshjudge init my-app
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Prerequisites
|
|
34
|
+
|
|
35
|
+
- **Node.js**: 18+ LTS
|
|
36
|
+
- **Claude Code**: Latest version
|
|
37
|
+
- **Playwright MCP Server**: For browser automation (screenshots, navigation, clicks)
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
### Global Install (Recommended)
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g @allenpan2026/harshjudge
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Or use with npx (no install required)
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx @allenpan2026/harshjudge --help
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## CLI Commands
|
|
54
|
+
|
|
55
|
+
| Command | Purpose |
|
|
56
|
+
|---------|---------|
|
|
57
|
+
| `harshjudge init <name>` | Initialize `.harshJudge/` directory structure |
|
|
58
|
+
| `harshjudge create <slug>` | Create test scenarios with structured step files |
|
|
59
|
+
| `harshjudge star <slug>` | Mark/unmark scenarios as favorites |
|
|
60
|
+
| `harshjudge start <slug>` | Begin a new test execution run |
|
|
61
|
+
| `harshjudge evidence <runId>` | Capture screenshots, logs, DB snapshots |
|
|
62
|
+
| `harshjudge complete-step <runId>` | Mark individual step as pass/fail/skipped |
|
|
63
|
+
| `harshjudge complete-run <runId>` | Finalize run and update scenario statistics |
|
|
64
|
+
| `harshjudge status [slug]` | Query project-wide or per-scenario status |
|
|
65
|
+
| `harshjudge discover tree [path]` | Browse `.harshJudge/` directory structure |
|
|
66
|
+
| `harshjudge discover search <pattern>` | Search file content within `.harshJudge/` |
|
|
67
|
+
| `harshjudge dashboard open` | Start the dashboard UI server |
|
|
68
|
+
| `harshjudge dashboard close` | Stop the dashboard server |
|
|
69
|
+
| `harshjudge dashboard status` | Check if dashboard is running |
|
|
70
|
+
|
|
71
|
+
## Usage with Claude Code
|
|
72
|
+
|
|
73
|
+
### 1. Install the Skill
|
|
74
|
+
|
|
75
|
+
Copy the `skills/harshjudge/` directory to your project:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
cp -r skills/harshjudge/ .claude/skills/harshjudge/
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 2. Initialize Project
|
|
82
|
+
|
|
83
|
+
Ask Claude: *"Initialize HarshJudge in this project"*
|
|
84
|
+
|
|
85
|
+
This runs `harshjudge init` and creates the `.harshJudge/` structure with a config file, PRD template, and scenarios directory.
|
|
86
|
+
|
|
87
|
+
### 3. Create Test Scenarios
|
|
88
|
+
|
|
89
|
+
Use the HarshJudge skill: `/harshjudge`
|
|
90
|
+
|
|
91
|
+
Claude guides you through defining scenarios with steps. Each step includes:
|
|
92
|
+
- **Title** and description
|
|
93
|
+
- **Actions** to perform
|
|
94
|
+
- **Expected outcome** to verify
|
|
95
|
+
|
|
96
|
+
### 4. Run Tests
|
|
97
|
+
|
|
98
|
+
Claude orchestrates test execution using Playwright MCP for browser automation:
|
|
99
|
+
- Screenshots before/after every action
|
|
100
|
+
- Console and network logs
|
|
101
|
+
- Database snapshots (if configured)
|
|
102
|
+
- Each step tracked individually with pass/fail status
|
|
103
|
+
|
|
104
|
+
### 5. View Results
|
|
105
|
+
|
|
106
|
+
Use `harshjudge dashboard open` to launch the visual dashboard (default port 7002):
|
|
107
|
+
- **3-column layout**: Projects → Scenarios → Detail
|
|
108
|
+
- **Real-time updates** via file watching
|
|
109
|
+
- **Evidence viewers**: screenshot timeline, log viewer, DB snapshots
|
|
110
|
+
- **Statistics**: pass rate, run history, average duration
|
|
111
|
+
|
|
112
|
+
## Data Structure
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
your-project/
|
|
116
|
+
└── .harshJudge/
|
|
117
|
+
├── config.yaml # Project configuration
|
|
118
|
+
├── prd.md # Product requirements
|
|
119
|
+
├── .gitignore # Excludes large evidence files
|
|
120
|
+
└── scenarios/
|
|
121
|
+
└── login-flow/ # Example scenario
|
|
122
|
+
├── meta.yaml # Metadata + run statistics
|
|
123
|
+
├── steps/ # Individual step definitions
|
|
124
|
+
│ ├── 01-navigate.md
|
|
125
|
+
│ ├── 02-fill-form.md
|
|
126
|
+
│ └── 03-verify.md
|
|
127
|
+
└── runs/
|
|
128
|
+
└── {runId}/
|
|
129
|
+
├── result.json # Run outcome
|
|
130
|
+
├── step-01/
|
|
131
|
+
│ └── evidence/
|
|
132
|
+
│ ├── screenshot-before.png
|
|
133
|
+
│ ├── screenshot-before.meta.json
|
|
134
|
+
│ ├── screenshot-after.png
|
|
135
|
+
│ └── screenshot-after.meta.json
|
|
136
|
+
├── step-02/evidence/...
|
|
137
|
+
└── step-03/evidence/...
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Verification
|
|
141
|
+
|
|
142
|
+
After installation, verify your setup:
|
|
143
|
+
|
|
144
|
+
1. **Check CLI is available** — `harshjudge --help` should list all commands
|
|
145
|
+
2. **Initialize project** — `harshjudge init my-app` in your project root
|
|
146
|
+
3. **Check status** — `harshjudge status`
|
|
147
|
+
|
|
148
|
+
## Troubleshooting
|
|
149
|
+
|
|
150
|
+
### "command not found: harshjudge"
|
|
151
|
+
1. Ensure global npm bin is in PATH: `npm bin -g`
|
|
152
|
+
2. Or use `npx @allenpan2026/harshjudge <command>`
|
|
153
|
+
|
|
154
|
+
### "Dashboard won't start"
|
|
155
|
+
```bash
|
|
156
|
+
# Check if port is in use
|
|
157
|
+
lsof -i :7002
|
|
158
|
+
|
|
159
|
+
# Use a different port
|
|
160
|
+
harshjudge dashboard open --port 7003
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### "Project not initialized"
|
|
164
|
+
```bash
|
|
165
|
+
harshjudge init <project-name>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Getting Help
|
|
169
|
+
|
|
170
|
+
- File issues at [GitHub Issues](https://github.com/HuskyDanny/HarshJudge/issues)
|
|
171
|
+
|
|
172
|
+
## Development
|
|
173
|
+
|
|
174
|
+
### Project Structure
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
HarshJudge/
|
|
178
|
+
├── src/
|
|
179
|
+
│ ├── cli.ts # CLI entry point
|
|
180
|
+
│ ├── commands/ # Command implementations (init, create, run, etc.)
|
|
181
|
+
│ ├── handlers/ # Core business logic handlers
|
|
182
|
+
│ ├── services/ # FileSystemService, DashboardManager
|
|
183
|
+
│ ├── types/ # TypeScript type definitions
|
|
184
|
+
│ └── utils/ # Utility helpers
|
|
185
|
+
├── skills/
|
|
186
|
+
│ └── harshjudge/ # Claude Code skill (5 workflow guides)
|
|
187
|
+
├── docs/ # Architecture docs, PRD, user stories
|
|
188
|
+
├── tests/ # Vitest test suite
|
|
189
|
+
└── examples/ # Demo projects
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Tech Stack
|
|
193
|
+
|
|
194
|
+
| Layer | Technology |
|
|
195
|
+
|-------|-----------|
|
|
196
|
+
| **Build** | tsup + pnpm |
|
|
197
|
+
| **Language** | TypeScript 5.3+, Node.js 18+ |
|
|
198
|
+
| **Validation** | Zod schemas |
|
|
199
|
+
| **Frontend** | React 18 + Tailwind CSS |
|
|
200
|
+
| **Testing** | Vitest |
|
|
201
|
+
|
|
202
|
+
### Commands
|
|
203
|
+
|
|
204
|
+
| Command | Description |
|
|
205
|
+
|---------|-------------|
|
|
206
|
+
| `pnpm install` | Install all dependencies |
|
|
207
|
+
| `pnpm build` | Build CLI and dashboard |
|
|
208
|
+
| `pnpm test` | Run all tests |
|
|
209
|
+
| `pnpm typecheck` | TypeScript type checking |
|
|
210
|
+
|
|
211
|
+
### Publishing
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# 1. Bump version in package.json
|
|
215
|
+
# 2. Build
|
|
216
|
+
pnpm build
|
|
217
|
+
|
|
218
|
+
# 3. Publish
|
|
219
|
+
npm publish --access public
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## License
|
|
223
|
+
|
|
224
|
+
MIT License - See [LICENSE](LICENSE) for details.
|