forgehive 0.9.0 → 1.0.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.md +166 -11
- package/dist/cli.js +1249 -397
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
<p align="center">
|
|
15
15
|
<img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen" alt="Node.js ≥ 18">
|
|
16
16
|
<img src="https://img.shields.io/badge/typescript-5.8-blue" alt="TypeScript">
|
|
17
|
-
<img src="https://img.shields.io/badge/tests-
|
|
18
|
-
<img src="https://img.shields.io/badge/bundle-
|
|
17
|
+
<img src="https://img.shields.io/badge/tests-493%20passing-success" alt="493 tests">
|
|
18
|
+
<img src="https://img.shields.io/badge/bundle-302.3KB-lightgrey" alt="302.3KB bundle">
|
|
19
19
|
<img src="https://img.shields.io/badge/license-Elastic%202.0-orange" alt="Elastic License 2.0">
|
|
20
20
|
</p>
|
|
21
21
|
|
|
@@ -33,7 +33,10 @@ Claude loses all project knowledge between sessions. forgehive solves this by wr
|
|
|
33
33
|
- **Persistent Memory** — context and session notes survive every restart
|
|
34
34
|
- **Story & Epic Tracking** — lightweight agile backlog inside `.forgehive/memory/`
|
|
35
35
|
- **Velocity Tracking** — sprint velocity history, rolling average, and capacity hints
|
|
36
|
-
- **Party Mode** — specialized agent sets
|
|
36
|
+
- **Party Mode** — specialized agent sets; build/design use worktrees, review/security use real independent subagents
|
|
37
|
+
- **Autonomous Loop** — `fh auto` runs a story through plan → implement → test → PR with minimal human intervention
|
|
38
|
+
- **Outcome Tracking** — unified JSONL log of all runs; per-agent performance aggregates feed `fh next`
|
|
39
|
+
- **Intelligence Layer** — `fh next` detects your lifecycle phase and recommends the single most valuable action
|
|
37
40
|
- **MCP Wiring** — preconfigured connectors for 10 services, API keys stored securely in `~/.forgehive/`
|
|
38
41
|
- **Security Suite** — SAST, secret scanner, CVE check, CISO reports (GDPR/SOC2/HIPAA)
|
|
39
42
|
- **CI Integration** — CI health report and GitHub Actions template generator
|
|
@@ -48,9 +51,9 @@ Claude loses all project knowledge between sessions. forgehive solves this by wr
|
|
|
48
51
|
|
|
49
52
|
---
|
|
50
53
|
|
|
51
|
-
## Status:
|
|
54
|
+
## Status: v1.0.0 — Stable
|
|
52
55
|
|
|
53
|
-
|
|
56
|
+
493 passing tests back the commands listed below. The v1.0 feature set has been validated end-to-end.
|
|
54
57
|
|
|
55
58
|
**Stable — use with confidence:**
|
|
56
59
|
|
|
@@ -76,6 +79,14 @@ Claude loses all project knowledge between sessions. forgehive solves this by wr
|
|
|
76
79
|
| `fh product status` — PRD → Epic → Story pipeline tree | stable |
|
|
77
80
|
| `fh product roadmap` — generate ROADMAP.md | stable |
|
|
78
81
|
| `fh epic create --prd PRD-N` — link epic to a PRD | stable |
|
|
82
|
+
| `fh status` — daily driver dashboard (sprint · code health · watch events · next) | stable |
|
|
83
|
+
| `fh watch --smart` — file watcher with test runner + agent routing | stable |
|
|
84
|
+
| `fh auto` — autonomous development loop (plan → implement → test → PR) | stable |
|
|
85
|
+
| `fh auto --auto` — fully automated mode (skips gate-1 and gate-2 checkpoints) | stable |
|
|
86
|
+
| `fh auto resume / status / list` — run management | stable |
|
|
87
|
+
| `fh outcomes` — unified outcome store (auto + party runs, per-agent aggregates) | stable |
|
|
88
|
+
| `fh next` — intelligence layer (phase detection + next-step recommendation) | stable |
|
|
89
|
+
| Smart Party Mode — review/security parties use real subagents (independent opinions) | stable |
|
|
79
90
|
| `fh onboard` — generates ONBOARDING.md | stable |
|
|
80
91
|
| `fh changelog` — semantic changelog from git | stable |
|
|
81
92
|
| `fh metrics` — developer metrics by author/type | stable |
|
|
@@ -138,7 +149,7 @@ npm link # makes 'fh' available globally
|
|
|
138
149
|
Verify the installation:
|
|
139
150
|
|
|
140
151
|
```bash
|
|
141
|
-
fh --version # should print 0.
|
|
152
|
+
fh --version # should print 1.0.0
|
|
142
153
|
fh --help # lists all available commands
|
|
143
154
|
```
|
|
144
155
|
|
|
@@ -193,7 +204,7 @@ fh security report gdpr # generates a CISO-ready compliance report
|
|
|
193
204
|
| `fh init` | Set up forgehive in the current project. Use --force to re-initialize an existing setup |
|
|
194
205
|
| `fh confirm` | Confirm `capabilities.yaml` — activates context for Claude |
|
|
195
206
|
| `fh rollback` | Remove `.forgehive/` and the CLAUDE.md block cleanly |
|
|
196
|
-
| `fh status` |
|
|
207
|
+
| `fh status` | Daily driver dashboard — sprint, code health, watch events |
|
|
197
208
|
|
|
198
209
|
> Running `fh init` on a project that already has `.forgehive/` prints a warning and exits. Use `fh init --force` to re-initialize (overwrites `capabilities.yaml` and scans again). To update only the scan, use `fh scan --update`.
|
|
199
210
|
|
|
@@ -216,7 +227,7 @@ The scan stores a hash of the project state. `fh scan --check` compares the curr
|
|
|
216
227
|
|
|
217
228
|
| Command | Description |
|
|
218
229
|
|---|---|
|
|
219
|
-
| `fh status` |
|
|
230
|
+
| `fh status` | Daily driver dashboard — sprint progress, code health, and last 5 watch events |
|
|
220
231
|
| `fh cost` | Show Claude session costs from `~/.claude/` (all time) |
|
|
221
232
|
| `fh cost today` | Costs for today only |
|
|
222
233
|
| `fh cost week` | Costs for the current week |
|
|
@@ -228,6 +239,137 @@ The scan stores a hash of the project state. `fh scan --check` compares the curr
|
|
|
228
239
|
|
|
229
240
|
---
|
|
230
241
|
|
|
242
|
+
### Daily Driver Dashboard
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
fh status
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Opens the **Daily Driver Dashboard** — a three-section overview designed for the start of every session:
|
|
249
|
+
|
|
250
|
+
**Sprint** — lists all `in-sprint` stories and `active` epics from `.forgehive/memory/`.
|
|
251
|
+
|
|
252
|
+
**Code Health** — working-tree cleanliness (git status), days since last security scan (`.forgehive/security-last-scan.txt`), and number of open GitHub PRs (`.forgehive/github-pr-cache.json`).
|
|
253
|
+
|
|
254
|
+
**Watch Events** — the last 5 events from `.forgehive/watch-events.jsonl` (test runs, failures, agent prompts logged by `fh watch --smart`).
|
|
255
|
+
|
|
256
|
+
`fh status` is automatically called by Claude at session start when the forgehive CLAUDE.md block is present.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
### Smart File Watcher
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
fh watch --smart
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Watches `src/` and `test/` directories. On every save:
|
|
267
|
+
|
|
268
|
+
1. Runs your project's test command (detected from `capabilities.yaml`)
|
|
269
|
+
2. On failure: classifies the error type and prompts to start the right agent:
|
|
270
|
+
- Security/vulnerability/CVE keywords → **Vera** (security analyst)
|
|
271
|
+
- Type/interface/logic errors → **Kai** (senior engineer)
|
|
272
|
+
- Test/assertion/coverage failures → **Sam** (QA architect)
|
|
273
|
+
3. Appends a structured event to `.forgehive/watch-events.jsonl` (visible in `fh status`)
|
|
274
|
+
|
|
275
|
+
The event log rotates automatically at 500 entries (~25 KB).
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
fh watch # standard watch mode (no routing)
|
|
279
|
+
fh watch --smart # watch + test runner + agent routing
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
### Autonomous Development Loop
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
fh auto US-3 # plan + implement + test + open PR for story US-3
|
|
288
|
+
fh auto --auto US-3 # same, but skip both human checkpoints
|
|
289
|
+
fh auto "fix the login timeout" # freetext — creates a story card, then runs
|
|
290
|
+
fh auto resume <run-id> # resume a paused or interrupted run
|
|
291
|
+
fh auto status # show all active runs with current phase
|
|
292
|
+
fh auto list # list all runs (active + completed)
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
`fh auto` runs a story through an 8-phase state machine and exits at each checkpoint for human review. The phases:
|
|
296
|
+
|
|
297
|
+
| Phase | What happens |
|
|
298
|
+
|---|---|
|
|
299
|
+
| `analyzing` | Reads the story card and project context |
|
|
300
|
+
| `planning` | Generates an implementation plan (saved to `runs/<id>/plan.md`) |
|
|
301
|
+
| `gate-1` | **Human checkpoint** — review the plan before implementation starts |
|
|
302
|
+
| `implementing` | Claude implements the plan on a new branch (`feat/US-N`) |
|
|
303
|
+
| `testing` | Runs the test suite; records `testsPassed` in `outcomes.jsonl` |
|
|
304
|
+
| `escalating` | Tests failed — Claude attempts a fix (up to 3 attempts) |
|
|
305
|
+
| `gate-2` | **Human checkpoint** — review the diff before PR is opened |
|
|
306
|
+
| `gate-stuck` | All 3 attempts failed — **always escalates to human, never skippable** |
|
|
307
|
+
| `pr-creating` | Opens a PR via `gh pr create` |
|
|
308
|
+
| `done` | Run complete; outcome recorded |
|
|
309
|
+
|
|
310
|
+
With `--auto`, `gate-1` and `gate-2` are skipped automatically. `gate-stuck` is never skipped regardless of flags. Run state is persisted to `.forgehive/runs/<run-id>/state.yaml` — runs survive session restarts and can be resumed with `fh auto resume`.
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
### Outcome Tracking
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
fh outcomes # summary table: last 10 runs, per-agent averages
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
`fh outcomes` shows a summary of all runs logged to `.forgehive/outcomes.jsonl`. Both `fh auto` runs and review/security party runs write to this store.
|
|
321
|
+
|
|
322
|
+
**Auto run signals:** `testsPassed`, `attempts` (up to 3), `prMerged` (updated lazily on next status check)
|
|
323
|
+
|
|
324
|
+
**Party run signals:** `findingsCount`, `blockingCount` (Kai), `testGaps` (Sam), `docGaps` (Eli)
|
|
325
|
+
|
|
326
|
+
**Rating:** After each review party, ForgeHive asks `[1-5 oder Enter zum Überspringen]`. The rating is stored in the run's outcome entry and feeds `fh next` recommendations.
|
|
327
|
+
|
|
328
|
+
The store rotates automatically at 500 entries (keeps last 400) — same pattern as `watch-events.jsonl`.
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
### Intelligence Layer
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
fh next # show current phase and primary recommendation
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
`fh next` tells you exactly what to do next — which lifecycle phase you're in and the single most valuable action. It also appears as a compact Section 4 in `fh status`.
|
|
339
|
+
|
|
340
|
+
**Phase detection (8 rules, priority order):**
|
|
341
|
+
|
|
342
|
+
| Phase | Condition |
|
|
343
|
+
|---|---|
|
|
344
|
+
| `health-check` | Security scan age > 7 days |
|
|
345
|
+
| `implementing` | Stories in-sprint + active `fh auto` run or no open PRs |
|
|
346
|
+
| `review` | Stories in-sprint + open PRs with no recent review party |
|
|
347
|
+
| `closing-sprint` | Done stories not yet in velocity record |
|
|
348
|
+
| `planning` | Stories in backlog, none in-sprint |
|
|
349
|
+
| `kickoff` | No stories at all |
|
|
350
|
+
| `solutioning` | Epics exist with no linked stories |
|
|
351
|
+
|
|
352
|
+
**Recommendations include outcome refinement** when ≥ 3 historical data points exist for an agent + task type:
|
|
353
|
+
|
|
354
|
+
```
|
|
355
|
+
Phase: Implementation
|
|
356
|
+
|
|
357
|
+
2 Stories in Sprint:
|
|
358
|
+
US-3: Add rate limiting to auth endpoints
|
|
359
|
+
US-5: Fix session timeout bug
|
|
360
|
+
|
|
361
|
+
Empfehlung:
|
|
362
|
+
→ fh auto US-3
|
|
363
|
+
Kai löst deine Bug-Fixes im Schnitt 8 Min (40% schneller als Ø)
|
|
364
|
+
|
|
365
|
+
Auch fällig:
|
|
366
|
+
→ fh security scan (letzter Scan vor 9 Tagen)
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
At most one secondary recommendation is ever shown — highest priority wins when multiple hygiene items apply.
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
231
373
|
### Security Suite
|
|
232
374
|
|
|
233
375
|
The security suite consists of five commands:
|
|
@@ -633,7 +775,18 @@ fh party cleanup # remove finished worktrees
|
|
|
633
775
|
fh party --model-map "viktor:claude-opus-4-7,kai:claude-sonnet-4-6,sam:claude-haiku-4-5"
|
|
634
776
|
```
|
|
635
777
|
|
|
636
|
-
**
|
|
778
|
+
**Party execution modes:**
|
|
779
|
+
|
|
780
|
+
| Set | Mode | Reason |
|
|
781
|
+
|---|---|---|
|
|
782
|
+
| `build` (Viktor + Kai + Sam) | Worktrees | Write code in parallel — filesystem isolation required |
|
|
783
|
+
| `design` (Suki + Viktor) | Worktrees | Design artifacts + code — isolation required |
|
|
784
|
+
| `review` (Kai + Sam + Eli) | Subagents | Review only — real independent opinions matter more than isolation |
|
|
785
|
+
| `security` (Vera + Sam) | Subagents | Security review + test gap analysis — no code writing |
|
|
786
|
+
|
|
787
|
+
**How worktree isolation works:** `fh party run` creates one git worktree per agent under `.forgehive/worktrees/<agent-name>/`. Each agent works in its own branch and filesystem copy. Worktrees are cleaned up with `fh party cleanup` or automatically when the session ends cleanly.
|
|
788
|
+
|
|
789
|
+
**How subagent parties work:** Review and security parties spawn independent `claude -p` subprocesses with focused context (diff only — no full project history). Each agent responds independently and cannot see the other agents' output. ForgeHive synthesizes the three reviews into a final verdict.
|
|
637
790
|
|
|
638
791
|
---
|
|
639
792
|
|
|
@@ -1001,9 +1154,9 @@ Global credential store (chmod 600). Managed exclusively via `fh mcp auth` comma
|
|
|
1001
1154
|
|---|---|
|
|
1002
1155
|
| Runtime | Node.js ≥ 18, ESM |
|
|
1003
1156
|
| Language | TypeScript |
|
|
1004
|
-
| Build | esbuild -> `dist/cli.js` (~
|
|
1157
|
+
| Build | esbuild -> `dist/cli.js` (~302.3 KB, single bundle) |
|
|
1005
1158
|
| Type check | `tsc --noEmit` |
|
|
1006
|
-
| Tests | `node:test` (native) + tsx ESM loader,
|
|
1159
|
+
| Tests | `node:test` (native) + tsx ESM loader, 398 tests |
|
|
1007
1160
|
| Dependencies | `js-yaml` (sole runtime dependency) |
|
|
1008
1161
|
|
|
1009
1162
|
```bash
|
|
@@ -1018,6 +1171,8 @@ npm test # node --import tsx/esm --test test/*.test.ts
|
|
|
1018
1171
|
|
|
1019
1172
|
| Version | What's new |
|
|
1020
1173
|
|---|---|
|
|
1174
|
+
| **1.0.0** | Autonomous Loop (`fh auto`), Outcome Tracking (`fh outcomes`), Smart Party Mode (subagent-based review/security), Intelligence Layer (`fh next`) |
|
|
1175
|
+
| **0.9.0** | Daily Driver: `fh status` dashboard (sprint · code health · watch events), `fh watch --smart` (test runner + agent routing), session-start auto-status |
|
|
1021
1176
|
| **0.8.0** | GitHub Integration (`fh github setup/sync/pr`), Semantic Repo-Map (`fh map --semantic`), Intelligent Routing (`fh ask`), Product Workflow (`fh product prd/status/roadmap`) |
|
|
1022
1177
|
| **0.7.7** | User Guide (`docs/user-guide.md`) included in npm package; Documentation table in README |
|
|
1023
1178
|
| **0.7.6** | YAML shape fix in `fh docs user`; frontmatter regex fix; 8 new tests for HIGH RISK paths |
|