@graypark/loophaus 3.4.0 → 3.5.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/README.ko.md +81 -17
- package/README.md +69 -15
- package/dist/.claude-plugin/plugin.json +11 -0
- package/dist/LICENSE +21 -0
- package/dist/README.ko.md +422 -0
- package/dist/README.md +336 -0
- package/dist/bin/install.d.ts +3 -0
- package/dist/bin/install.d.ts.map +1 -0
- package/{bin/install.mjs → dist/bin/install.js} +3 -5
- package/dist/bin/install.js.map +1 -0
- package/dist/bin/loophaus.d.ts +3 -0
- package/dist/bin/loophaus.d.ts.map +1 -0
- package/dist/bin/loophaus.js +654 -0
- package/dist/bin/loophaus.js.map +1 -0
- package/dist/bin/uninstall.d.ts +8 -0
- package/dist/bin/uninstall.d.ts.map +1 -0
- package/dist/bin/uninstall.js +209 -0
- package/dist/bin/uninstall.js.map +1 -0
- package/dist/codex/commands/cancel-ralph.md +30 -0
- package/dist/codex/commands/ralph-loop.md +73 -0
- package/dist/commands/cancel-ralph.md +23 -0
- package/dist/commands/help.md +96 -0
- package/dist/commands/loop-plan.md +257 -0
- package/dist/commands/loop-pulse.md +38 -0
- package/dist/commands/loop-stop.md +29 -0
- package/dist/commands/loop.md +17 -0
- package/dist/commands/ralph-loop.md +18 -0
- package/dist/core/cost-tracker.d.ts +33 -0
- package/dist/core/cost-tracker.d.ts.map +1 -0
- package/dist/core/cost-tracker.js +41 -0
- package/dist/core/cost-tracker.js.map +1 -0
- package/dist/core/engine.d.ts +4 -0
- package/dist/core/engine.d.ts.map +1 -0
- package/dist/core/engine.js +109 -0
- package/dist/core/engine.js.map +1 -0
- package/dist/core/event-logger.d.ts +5 -0
- package/dist/core/event-logger.d.ts.map +1 -0
- package/dist/core/event-logger.js +48 -0
- package/dist/core/event-logger.js.map +1 -0
- package/dist/core/events.d.ts +34 -0
- package/dist/core/events.d.ts.map +1 -0
- package/dist/core/events.js +44 -0
- package/dist/core/events.js.map +1 -0
- package/dist/core/io-helpers.d.ts +3 -0
- package/dist/core/io-helpers.d.ts.map +1 -0
- package/dist/core/io-helpers.js +65 -0
- package/dist/core/io-helpers.js.map +1 -0
- package/dist/core/loop-registry.d.ts +10 -0
- package/dist/core/loop-registry.d.ts.map +1 -0
- package/dist/core/loop-registry.js +37 -0
- package/dist/core/loop-registry.js.map +1 -0
- package/dist/core/merge-strategy.d.ts +7 -0
- package/dist/core/merge-strategy.d.ts.map +1 -0
- package/dist/core/merge-strategy.js +82 -0
- package/dist/core/merge-strategy.js.map +1 -0
- package/dist/core/parallel-runner.d.ts +32 -0
- package/dist/core/parallel-runner.d.ts.map +1 -0
- package/dist/core/parallel-runner.js +88 -0
- package/dist/core/parallel-runner.js.map +1 -0
- package/dist/core/policy.d.ts +22 -0
- package/dist/core/policy.d.ts.map +1 -0
- package/dist/core/policy.js +54 -0
- package/dist/core/policy.js.map +1 -0
- package/dist/core/quality-scorer.d.ts +40 -0
- package/dist/core/quality-scorer.d.ts.map +1 -0
- package/dist/core/quality-scorer.js +128 -0
- package/dist/core/quality-scorer.js.map +1 -0
- package/dist/core/refine-loop.d.ts +16 -0
- package/dist/core/refine-loop.d.ts.map +1 -0
- package/dist/core/refine-loop.js +26 -0
- package/dist/core/refine-loop.js.map +1 -0
- package/dist/core/session.d.ts +27 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +67 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/trace-analyzer.d.ts +28 -0
- package/dist/core/trace-analyzer.d.ts.map +1 -0
- package/dist/core/trace-analyzer.js +46 -0
- package/dist/core/trace-analyzer.js.map +1 -0
- package/dist/core/types.d.ts +99 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/validate.d.ts +7 -0
- package/dist/core/validate.d.ts.map +1 -0
- package/dist/core/validate.js +55 -0
- package/dist/core/validate.js.map +1 -0
- package/dist/core/worktree.d.ts +13 -0
- package/dist/core/worktree.d.ts.map +1 -0
- package/dist/core/worktree.js +108 -0
- package/dist/core/worktree.js.map +1 -0
- package/dist/hooks/hooks.json +15 -0
- package/dist/hooks/stop-hook.mjs +111 -0
- package/dist/lib/paths.d.ts +18 -0
- package/dist/lib/paths.d.ts.map +1 -0
- package/dist/lib/paths.js +74 -0
- package/dist/lib/paths.js.map +1 -0
- package/dist/lib/stop-hook-core.d.ts +19 -0
- package/dist/lib/stop-hook-core.d.ts.map +1 -0
- package/dist/lib/stop-hook-core.js +36 -0
- package/dist/lib/stop-hook-core.js.map +1 -0
- package/dist/package.json +61 -0
- package/dist/platforms/claude-code/adapter.mjs +20 -0
- package/dist/platforms/claude-code/installer.d.mts +3 -0
- package/dist/platforms/claude-code/installer.mjs +173 -0
- package/dist/platforms/codex-cli/adapter.mjs +20 -0
- package/dist/platforms/codex-cli/installer.d.mts +2 -0
- package/dist/platforms/codex-cli/installer.mjs +247 -0
- package/dist/platforms/kiro-cli/adapter.mjs +21 -0
- package/dist/platforms/kiro-cli/installer.d.mts +3 -0
- package/dist/platforms/kiro-cli/installer.mjs +257 -0
- package/dist/scripts/setup-ralph-loop.sh +145 -0
- package/dist/skills/ralph-claude-cancel/SKILL.md +23 -0
- package/dist/skills/ralph-claude-interview/SKILL.md +184 -0
- package/dist/skills/ralph-claude-loop/SKILL.md +101 -0
- package/dist/skills/ralph-claude-orchestrator/SKILL.md +129 -0
- package/dist/skills/ralph-interview/SKILL.md +275 -0
- package/dist/skills/ralph-orchestrator/SKILL.md +254 -0
- package/dist/store/state-store.d.ts +17 -0
- package/dist/store/state-store.d.ts.map +1 -0
- package/dist/store/state-store.js +108 -0
- package/dist/store/state-store.js.map +1 -0
- package/hooks/stop-hook.mjs +6 -6
- package/package.json +11 -7
- package/platforms/claude-code/installer.d.mts +3 -0
- package/platforms/claude-code/installer.mjs +2 -2
- package/platforms/codex-cli/installer.d.mts +2 -0
- package/platforms/codex-cli/installer.mjs +1 -1
- package/platforms/kiro-cli/installer.d.mts +3 -0
- package/bin/loophaus.mjs +0 -521
- package/bin/uninstall.mjs +0 -255
- package/core/cost-tracker.mjs +0 -44
- package/core/engine.mjs +0 -123
- package/core/event-logger.mjs +0 -37
- package/core/events.mjs +0 -48
- package/core/io-helpers.mjs +0 -33
- package/core/loop-registry.mjs +0 -37
- package/core/loop.schema.json +0 -29
- package/core/merge-strategy.mjs +0 -72
- package/core/parallel-runner.mjs +0 -94
- package/core/policy.mjs +0 -58
- package/core/quality-scorer.mjs +0 -136
- package/core/refine-loop.mjs +0 -29
- package/core/session.mjs +0 -66
- package/core/state.schema.json +0 -24
- package/core/trace-analyzer.mjs +0 -51
- package/core/validate.mjs +0 -54
- package/core/worktree.mjs +0 -97
- package/lib/paths.mjs +0 -99
- package/lib/stop-hook-core.mjs +0 -42
- package/store/state-store.mjs +0 -106
package/dist/README.md
ADDED
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
[English](README.md) | [한국어](README.ko.md)
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/vcz-Gray/loophaus/main/assets/loophaus-banner.svg" alt="loophaus" width="600" />
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@graypark/loophaus"><img src="https://img.shields.io/npm/v/@graypark/loophaus.svg?style=flat-square&color=blue" alt="npm version" /></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/@graypark/loophaus"><img src="https://img.shields.io/npm/dm/@graypark/loophaus.svg?style=flat-square&color=green" alt="npm downloads" /></a>
|
|
10
|
+
<a href="https://github.com/vcz-Gray/loophaus/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="license" /></a>
|
|
11
|
+
<img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg?style=flat-square" alt="node version" />
|
|
12
|
+
<img src="https://img.shields.io/badge/platform-Claude%20Code%20%7C%20Codex%20CLI%20%7C%20Kiro%20CLI-purple.svg?style=flat-square" alt="platform" />
|
|
13
|
+
<img src="https://img.shields.io/badge/tests-90%20passing-brightgreen.svg?style=flat-square" alt="tests" />
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<h3 align="center">Control plane for coding agents — iterative dev loops across Claude Code, Codex CLI, and Kiro CLI.</h3>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<sub>Based on <a href="https://ghuntley.com/ralph/">Geoffrey Huntley's Ralph Wiggum technique</a></sub>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Why loophaus?
|
|
25
|
+
|
|
26
|
+
AI coding agents struggle with fundamental problems that get worse over long sessions:
|
|
27
|
+
|
|
28
|
+
| Problem | What happens |
|
|
29
|
+
|---------|-------------|
|
|
30
|
+
| **Context rot** | Long conversations accumulate noise, the agent gets confused |
|
|
31
|
+
| **No checkpoints** | All-or-nothing execution — can't resume after interruption |
|
|
32
|
+
| **Lost learnings** | Previous iterations' insights overwritten by new context |
|
|
33
|
+
| **Completion ambiguity** | Agent says "done" but tests still fail |
|
|
34
|
+
| **Platform lock-in** | Techniques that work in one agent don't transfer to others |
|
|
35
|
+
|
|
36
|
+
loophaus solves this:
|
|
37
|
+
|
|
38
|
+
- **Fresh context per iteration** — Each cycle reads PRD + progress from disk, zero degradation
|
|
39
|
+
- **Git-enforced safety** — Atomic commits per story, rollback at any point
|
|
40
|
+
- **Append-only learnings** — `progress.txt` accumulates knowledge across iterations
|
|
41
|
+
- **Test-verified completion** — Agent can only exit when `<promise>COMPLETE</promise>` is genuinely true
|
|
42
|
+
- **Universal stop hook** — One Node.js hook works across Claude Code, Codex CLI, and Kiro CLI
|
|
43
|
+
|
|
44
|
+
## How it works
|
|
45
|
+
|
|
46
|
+
An AI agent works on a task in a continuous loop. Each iteration starts with fresh context — reading the PRD and progress files to decide what to do next. The agent implements one story, commits, updates progress, and exits. The stop hook intercepts the exit and re-injects the prompt. Repeat until all stories pass.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
┌──────────────────────┐
|
|
50
|
+
│ /loop-plan │
|
|
51
|
+
│ Describe your task │
|
|
52
|
+
└──────────┬───────────┘
|
|
53
|
+
│
|
|
54
|
+
┌──────────▼───────────┐
|
|
55
|
+
│ Generate prd.json │
|
|
56
|
+
│ + progress.txt │
|
|
57
|
+
└──────────┬───────────┘
|
|
58
|
+
│
|
|
59
|
+
┌────────────────▼────────────────┐
|
|
60
|
+
│ /loop │
|
|
61
|
+
│ │
|
|
62
|
+
│ 1. Read prd.json + progress │
|
|
63
|
+
│ 2. Pick next story (passes=false)│
|
|
64
|
+
│ 3. Implement + verify │
|
|
65
|
+
│ 4. Evaluate (score 0-100) │
|
|
66
|
+
│ 5. Refine loop (keep/discard) │
|
|
67
|
+
│ 6. Commit + update progress │
|
|
68
|
+
│ 7. Exit attempt │
|
|
69
|
+
│ │ │
|
|
70
|
+
│ Stop Hook intercepts │
|
|
71
|
+
│ Re-injects prompt │
|
|
72
|
+
│ │ │
|
|
73
|
+
│ Back to step 1 ──────────────┘
|
|
74
|
+
│ │
|
|
75
|
+
│ All stories pass? │
|
|
76
|
+
│ → <promise>COMPLETE</promise> │
|
|
77
|
+
│ │
|
|
78
|
+
│ /loop-pulse → check status │
|
|
79
|
+
│ /loop-stop → cancel anytime │
|
|
80
|
+
└─────────────────────────────────┘
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Quick Start
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install -g @graypark/loophaus
|
|
87
|
+
loophaus install
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
> **Note:** `npx @graypark/loophaus install` may fail on some npm versions due to a bin resolution cache bug. Use the global install above for reliable setup.
|
|
91
|
+
|
|
92
|
+
The installer auto-detects your host (Claude Code, Codex CLI, or Kiro CLI) and sets up everything — stop hook, commands, and skills.
|
|
93
|
+
|
|
94
|
+
Then in your AI coding session:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
/loop-plan Add user authentication with JWT, bcrypt, and login UI
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
That's it. The interview generates a PRD, activates the loop, and starts implementing story by story.
|
|
101
|
+
|
|
102
|
+
## Commands
|
|
103
|
+
|
|
104
|
+
| Command | Description |
|
|
105
|
+
|---------|-------------|
|
|
106
|
+
| `/loop-plan` | Interactive interview — asks targeted questions, generates PRD, activates loop |
|
|
107
|
+
| `/loop` | Start iterative dev loop directly (when you already have a PRD or custom prompt) |
|
|
108
|
+
| `/loop-stop` | Stop the active loop immediately |
|
|
109
|
+
| `/loop-pulse` | Check current loop status, iteration count, and progress |
|
|
110
|
+
|
|
111
|
+
## Platform Support
|
|
112
|
+
|
|
113
|
+
| | Claude Code | Codex CLI | Kiro CLI |
|
|
114
|
+
|---|---|---|---|
|
|
115
|
+
| **Stop Hook** | Node.js | Node.js | Node.js |
|
|
116
|
+
| **Install target** | Plugin cache | `hooks.json` | `agents/` + `steering/` |
|
|
117
|
+
| **Commands** | `/reload-plugins` | native | steering manual mode |
|
|
118
|
+
| **Multi-agent** | Agent tool | subprocesses | steering agents |
|
|
119
|
+
|
|
120
|
+
All three platforms share the same core engine (`core/engine.mjs`) and state store (`store/state-store.mjs`). Platform-specific adapters handle the differences.
|
|
121
|
+
|
|
122
|
+
## Installation
|
|
123
|
+
|
|
124
|
+
### Global install (recommended)
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npm install -g @graypark/loophaus
|
|
128
|
+
loophaus install
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Via npx
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npx @graypark/loophaus install
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
> `npx` may fail on some npm versions due to a bin resolution cache bug. If it does, use the global install above.
|
|
138
|
+
|
|
139
|
+
### Specify host
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
loophaus install --host claude-code
|
|
143
|
+
loophaus install --host codex-cli
|
|
144
|
+
loophaus install --host kiro-cli
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Flags
|
|
148
|
+
|
|
149
|
+
| Flag | Description |
|
|
150
|
+
|------|-------------|
|
|
151
|
+
| `--force` | Overwrite existing installation |
|
|
152
|
+
| `--dry-run` | Preview changes without writing files |
|
|
153
|
+
| `--local` | Install to project directory instead of global (Codex CLI only) |
|
|
154
|
+
|
|
155
|
+
## CLI
|
|
156
|
+
|
|
157
|
+
loophaus ships a standalone CLI for management tasks:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
loophaus install # Install to detected host
|
|
161
|
+
loophaus status # Show current loop state and active host
|
|
162
|
+
loophaus stats # Iteration history and completion metrics
|
|
163
|
+
loophaus quality # Run quality scoring on current stories
|
|
164
|
+
loophaus uninstall # Clean removal from all hosts
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Quality Loop (v3.4.0+)
|
|
168
|
+
|
|
169
|
+
loophaus v3.4.0 introduces the **Quality Loop** — inspired by [karpathy/autoresearch](https://github.com/karpathy/autoresearch)'s experiment→measure→keep/discard pattern.
|
|
170
|
+
|
|
171
|
+
Instead of simply marking a story as "done" when tests pass, `/loop-plan` now **measures quality** (0-100) and **iteratively refines** until the score meets the threshold.
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
Phase 4: Implement
|
|
175
|
+
↓
|
|
176
|
+
Phase 5: Evaluate (score 0-100)
|
|
177
|
+
↓ ↑
|
|
178
|
+
Phase 6: Refine Loop
|
|
179
|
+
score improved? → keep (commit)
|
|
180
|
+
score declined? → discard (git reset)
|
|
181
|
+
max attempts reached? → move on
|
|
182
|
+
↓
|
|
183
|
+
Phase 7: Report (with quality scores)
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
| autoresearch | loophaus |
|
|
187
|
+
|-------------|----------|
|
|
188
|
+
| `val_bpb` | quality score (weighted: tests, typecheck, lint, verify, diff, custom) |
|
|
189
|
+
| `results.tsv` | `.loophaus/results.tsv` |
|
|
190
|
+
| keep → advance | score improved → commit |
|
|
191
|
+
| discard → revert | score declined → `git reset --hard` |
|
|
192
|
+
| NEVER STOP | max 3 attempts per story (configurable) |
|
|
193
|
+
|
|
194
|
+
### Configuration
|
|
195
|
+
|
|
196
|
+
```json
|
|
197
|
+
{
|
|
198
|
+
"qualityThreshold": 80,
|
|
199
|
+
"maxRefineAttempts": 3,
|
|
200
|
+
"qualityConfig": {
|
|
201
|
+
"weights": { "tests": 30, "typecheck": 25, "lint": 15, "verify": 15, "diff": 10, "custom": 5 }
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### CLI
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
loophaus quality # Score all stories
|
|
210
|
+
loophaus quality --story US-001 # Score a specific story
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Architecture
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
loophaus/
|
|
217
|
+
├── bin/
|
|
218
|
+
│ ├── loophaus.mjs # CLI entry point
|
|
219
|
+
│ ├── install.mjs # Cross-platform installer
|
|
220
|
+
│ └── uninstall.mjs # Clean uninstaller
|
|
221
|
+
├── core/
|
|
222
|
+
│ ├── engine.mjs # Core loop engine (shared)
|
|
223
|
+
│ ├── event-logger.mjs # Iteration event tracking
|
|
224
|
+
│ ├── quality-scorer.mjs # Quality scoring (score, evaluate, log)
|
|
225
|
+
│ ├── refine-loop.mjs # Keep/discard refinement logic
|
|
226
|
+
│ └── loop.schema.json # PRD validation schema
|
|
227
|
+
├── store/
|
|
228
|
+
│ └── state-store.mjs # Loop state persistence
|
|
229
|
+
├── platforms/
|
|
230
|
+
│ ├── claude-code/
|
|
231
|
+
│ │ ├── adapter.mjs # Claude Code platform adapter
|
|
232
|
+
│ │ └── installer.mjs # Plugin cache installer
|
|
233
|
+
│ ├── codex-cli/
|
|
234
|
+
│ │ ├── adapter.mjs # Codex CLI platform adapter
|
|
235
|
+
│ │ └── installer.mjs # hooks.json installer
|
|
236
|
+
│ └── kiro-cli/
|
|
237
|
+
│ ├── adapter.mjs # Kiro CLI platform adapter
|
|
238
|
+
│ └── installer.mjs # agents/ + steering/ installer
|
|
239
|
+
├── hooks/
|
|
240
|
+
│ ├── stop-hook.mjs # Universal stop hook (Node.js)
|
|
241
|
+
│ └── hooks.json # Hook configuration template
|
|
242
|
+
├── commands/
|
|
243
|
+
│ ├── loop-plan.md # /loop-plan command definition
|
|
244
|
+
│ ├── loop.md # /loop command definition
|
|
245
|
+
│ ├── loop-stop.md # /loop-stop command definition
|
|
246
|
+
│ ├── loop-pulse.md # /loop-pulse command definition
|
|
247
|
+
│ └── help.md # /help command definition
|
|
248
|
+
├── skills/
|
|
249
|
+
│ ├── ralph-interview/ # Interactive PRD generator
|
|
250
|
+
│ ├── ralph-orchestrator/ # Multi-agent patterns
|
|
251
|
+
│ ├── ralph-claude-interview/ # Claude Code interview + Skill tool
|
|
252
|
+
│ ├── ralph-claude-loop/ # Claude Code PRD-driven loop
|
|
253
|
+
│ ├── ralph-claude-cancel/ # Claude Code cancel
|
|
254
|
+
│ └── ralph-claude-orchestrator/# Claude Code Agent tool patterns
|
|
255
|
+
├── lib/
|
|
256
|
+
│ ├── paths.mjs # Cross-platform path resolution
|
|
257
|
+
│ ├── state.mjs # Legacy state management
|
|
258
|
+
│ └── stop-hook-core.mjs # Testable hook logic
|
|
259
|
+
├── .claude-plugin/
|
|
260
|
+
│ └── plugin.json # Claude Code marketplace manifest
|
|
261
|
+
└── tests/ # 90 test cases (vitest)
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## PRD Format
|
|
265
|
+
|
|
266
|
+
loophaus uses a `prd.json` format compatible with the ralph-skills ecosystem:
|
|
267
|
+
|
|
268
|
+
```json
|
|
269
|
+
{
|
|
270
|
+
"project": "MyApp",
|
|
271
|
+
"branchName": "loop/auth-system",
|
|
272
|
+
"description": "JWT authentication with login UI",
|
|
273
|
+
"userStories": [
|
|
274
|
+
{
|
|
275
|
+
"id": "US-001",
|
|
276
|
+
"title": "Add users table with password hash",
|
|
277
|
+
"description": "As a developer, I need user storage for auth",
|
|
278
|
+
"acceptanceCriteria": [
|
|
279
|
+
"Users table with email, password_hash columns",
|
|
280
|
+
"Migration runs successfully",
|
|
281
|
+
"Typecheck passes"
|
|
282
|
+
],
|
|
283
|
+
"priority": 1,
|
|
284
|
+
"passes": false,
|
|
285
|
+
"notes": ""
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
Each story is sized to complete in one iteration (one context window). Dependencies are ordered by priority. The loop engine picks the next story where `passes` is `false` and works on it until verification succeeds.
|
|
292
|
+
|
|
293
|
+
## Migrating from ralph-codex
|
|
294
|
+
|
|
295
|
+
`@graypark/ralph-codex` has been deprecated in favor of `@graypark/loophaus`. The migration is straightforward:
|
|
296
|
+
|
|
297
|
+
1. **Install loophaus** — it replaces ralph-codex entirely:
|
|
298
|
+
```bash
|
|
299
|
+
npx @graypark/loophaus install --force
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
2. **State files auto-migrate** — Existing `prd.json` and `progress.txt` files are fully compatible. No changes needed.
|
|
303
|
+
|
|
304
|
+
3. **Command mapping:**
|
|
305
|
+
|
|
306
|
+
| ralph-codex | loophaus |
|
|
307
|
+
|-------------|----------|
|
|
308
|
+
| `/ralph-interview` | `/loop-plan` |
|
|
309
|
+
| `/ralph-loop` | `/loop` |
|
|
310
|
+
| `/cancel-ralph` | `/loop-stop` |
|
|
311
|
+
| (none) | `/loop-pulse` |
|
|
312
|
+
|
|
313
|
+
4. **Uninstall the old package** (optional):
|
|
314
|
+
```bash
|
|
315
|
+
npx @graypark/ralph-codex uninstall
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
## Development
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
git clone https://github.com/vcz-Gray/loophaus.git
|
|
322
|
+
cd loophaus
|
|
323
|
+
npm install
|
|
324
|
+
npm test # 90 test cases
|
|
325
|
+
npx vitest # watch mode
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
## License
|
|
329
|
+
|
|
330
|
+
MIT
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
<p align="center">
|
|
335
|
+
Built for <a href="https://docs.anthropic.com/en/docs/claude-code">Claude Code</a>, <a href="https://github.com/openai/codex">Codex CLI</a>, and <a href="https://kiro.dev">Kiro CLI</a>
|
|
336
|
+
</p>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../bin/install.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Backward-compat wrapper — delegates to bin/loophaus.
|
|
3
|
-
|
|
2
|
+
// Backward-compat wrapper — delegates to bin/loophaus.ts
|
|
4
3
|
import { resolve, dirname } from "node:path";
|
|
5
4
|
import { fileURLToPath } from "node:url";
|
|
6
|
-
|
|
7
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
-
const loophausCli = resolve(dirname(__filename), "loophaus.
|
|
9
|
-
|
|
6
|
+
const loophausCli = resolve(dirname(__filename), "loophaus.js");
|
|
10
7
|
await import(loophausCli);
|
|
8
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../bin/install.ts"],"names":[],"mappings":";AACA,yDAAyD;AAEzD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,WAAW,GAAW,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,CAAC;AAExE,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loophaus.d.ts","sourceRoot":"","sources":["../../bin/loophaus.ts"],"names":[],"mappings":""}
|