forgehive 0.7.8 → 0.8.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 +142 -13
- package/dist/cli.js +1218 -226
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -14,9 +14,9 @@
|
|
|
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-
|
|
19
|
-
<img src="https://img.shields.io/badge/license-
|
|
17
|
+
<img src="https://img.shields.io/badge/tests-369%20passing-success" alt="369 tests">
|
|
18
|
+
<img src="https://img.shields.io/badge/bundle-293KB-lightgrey" alt="293KB bundle">
|
|
19
|
+
<img src="https://img.shields.io/badge/license-Elastic%202.0-orange" alt="Elastic License 2.0">
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
22
|
---
|
|
@@ -37,7 +37,10 @@ Claude loses all project knowledge between sessions. forgehive solves this by wr
|
|
|
37
37
|
- **MCP Wiring** — preconfigured connectors for 10 services, API keys stored securely in `~/.forgehive/`
|
|
38
38
|
- **Security Suite** — SAST, secret scanner, CVE check, CISO reports (GDPR/SOC2/HIPAA)
|
|
39
39
|
- **CI Integration** — CI health report and GitHub Actions template generator
|
|
40
|
-
- **Codebase Map** — file/line/import table
|
|
40
|
+
- **Codebase Map** — file/line/import table + semantic graph (hotspots, cycles, dependency stats)
|
|
41
|
+
- **GitHub Integration** — sync open Issues as Stories, fetch PR context, interactive token setup
|
|
42
|
+
- **Intelligent Routing** — `fh ask "<task>"` recommends the right agent or party set with a start command
|
|
43
|
+
- **Product Workflow** — PRD → Epic → Story pipeline with roadmap generation
|
|
41
44
|
- **Team Sync** — share memory across the team via a dedicated git branch
|
|
42
45
|
- **AGENTS.md** — cross-tool standard (Cursor, Copilot, Gemini CLI, Codex, Windsurf)
|
|
43
46
|
|
|
@@ -45,9 +48,9 @@ Claude loses all project knowledge between sessions. forgehive solves this by wr
|
|
|
45
48
|
|
|
46
49
|
---
|
|
47
50
|
|
|
48
|
-
## Status: v0.
|
|
51
|
+
## Status: v0.8.0 — Stable
|
|
49
52
|
|
|
50
|
-
|
|
53
|
+
369 passing tests back the commands listed below. The v0.8 feature set has been validated end-to-end.
|
|
51
54
|
|
|
52
55
|
**Stable — use with confidence:**
|
|
53
56
|
|
|
@@ -62,7 +65,17 @@ Claude loses all project knowledge between sessions. forgehive solves this by wr
|
|
|
62
65
|
| `fh memory` — show, clean, export, snapshot | stable |
|
|
63
66
|
| MCP credential store (`fh mcp auth`) | stable |
|
|
64
67
|
| `fh ci` — CI health report + GitHub Actions template | stable |
|
|
65
|
-
| `fh map` — codebase structure map | stable |
|
|
68
|
+
| `fh map` — codebase structure map + semantic graph | stable |
|
|
69
|
+
| `fh map --semantic` — semantic graph only (hotspots, cycles) | stable |
|
|
70
|
+
| `fh github setup` — interactive token + repo configuration | stable |
|
|
71
|
+
| `fh github sync` — sync open GitHub Issues as Story cards | stable |
|
|
72
|
+
| `fh github pr <N>` — fetch PR metadata + changed files | stable |
|
|
73
|
+
| `fh ask "<task>"` — intelligent agent/party routing | stable |
|
|
74
|
+
| `fh run <freetext>` — route freetext tasks to best agent | stable |
|
|
75
|
+
| `fh product prd` — create/list/show PRDs | stable |
|
|
76
|
+
| `fh product status` — PRD → Epic → Story pipeline tree | stable |
|
|
77
|
+
| `fh product roadmap` — generate ROADMAP.md | stable |
|
|
78
|
+
| `fh epic create --prd PRD-N` — link epic to a PRD | stable |
|
|
66
79
|
| `fh onboard` — generates ONBOARDING.md | stable |
|
|
67
80
|
| `fh changelog` — semantic changelog from git | stable |
|
|
68
81
|
| `fh metrics` — developer metrics by author/type | stable |
|
|
@@ -125,7 +138,7 @@ npm link # makes 'fh' available globally
|
|
|
125
138
|
Verify the installation:
|
|
126
139
|
|
|
127
140
|
```bash
|
|
128
|
-
fh --version # should print 0.
|
|
141
|
+
fh --version # should print 0.8.0
|
|
129
142
|
fh --help # lists all available commands
|
|
130
143
|
```
|
|
131
144
|
|
|
@@ -311,10 +324,18 @@ fh ci --init # generate a GitHub Actions workflow template
|
|
|
311
324
|
### Codebase Map
|
|
312
325
|
|
|
313
326
|
```bash
|
|
314
|
-
fh map
|
|
327
|
+
fh map # full map + semantic graph (written to map.md)
|
|
328
|
+
fh map --semantic # print only the semantic graph to stdout
|
|
315
329
|
```
|
|
316
330
|
|
|
317
|
-
|
|
331
|
+
`fh map` writes a structured table of your codebase — file paths, line counts, and import relationships — to `map.md`. It also runs a full semantic analysis and appends a `## Semantic Graph` section to the file.
|
|
332
|
+
|
|
333
|
+
The **semantic graph** shows:
|
|
334
|
+
- **Hotspots** — files imported by 3+ others (sorted by import count), indicating high-impact modules
|
|
335
|
+
- **Cycles** — circular dependency chains detected via DFS
|
|
336
|
+
- **Dependency summary** — total files, edges, and average fanout
|
|
337
|
+
|
|
338
|
+
`fh map --semantic` prints only the `## Semantic Graph` block to stdout — useful for piping directly into a Claude session as focused context.
|
|
318
339
|
|
|
319
340
|
---
|
|
320
341
|
|
|
@@ -388,10 +409,45 @@ fh sync pull --remote origin --branch forgehive-memory # pull from specific bra
|
|
|
388
409
|
fh run <issue-url> # run agent on a GitHub/Linear issue URL
|
|
389
410
|
fh run <issue-url> --agent kai # use a specific agent
|
|
390
411
|
fh run <issue-url> --label ready-for-ai # filter by label
|
|
412
|
+
fh run "fix the login bug in auth.ts" # freetext → routed to best agent automatically
|
|
391
413
|
```
|
|
392
414
|
|
|
393
415
|
`fh run` launches a background agent via `claude -p`, passes the issue content as context, and returns immediately. The agent reads the issue, applies forgehive context from `.forgehive/`, and works on the task in the background. Useful for automating repetitive issues or running agents overnight. Agent output is streamed to stdout and also written to `.forgehive/runs/`.
|
|
394
416
|
|
|
417
|
+
When the argument is not a URL, `fh run` delegates to the same routing logic as `fh ask` and recommends the right agent or party set with a concrete start command.
|
|
418
|
+
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
### Intelligent Routing
|
|
422
|
+
|
|
423
|
+
```bash
|
|
424
|
+
fh ask "fix the login timeout bug"
|
|
425
|
+
fh ask "write integration tests for the payment service"
|
|
426
|
+
fh ask "design the new onboarding flow"
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
`fh ask` analyzes the task description and recommends the right agent or party set. It returns:
|
|
430
|
+
- **Which agent or party** to use (with confidence level: high / medium / low)
|
|
431
|
+
- **Why** — which keywords triggered the match
|
|
432
|
+
- **Exact command** to start — either `cd <worktree> && claude` for a single agent or `fh party run <set>` for a party
|
|
433
|
+
|
|
434
|
+
**Routing table:**
|
|
435
|
+
|
|
436
|
+
| Keywords | Routes to |
|
|
437
|
+
|---|---|
|
|
438
|
+
| security, vulnerability, auth, OWASP | Vera (security analyst) |
|
|
439
|
+
| test, coverage, spec, assertion | Sam (QA architect) |
|
|
440
|
+
| design, UI, UX, figma, wireframe | Suki (UX designer) |
|
|
441
|
+
| architecture, scalability, refactor structure | Viktor (system architect) |
|
|
442
|
+
| docs, README, onboarding, tutorial | Eli (documentation) |
|
|
443
|
+
| research, compare, analyze, investigate | Nora (research analyst) |
|
|
444
|
+
| product, roadmap, PRD, user story | Remy (product strategist) |
|
|
445
|
+
| bug, fix, crash, error, regression | Kai (senior engineer) |
|
|
446
|
+
| 3+ domains | `full` party |
|
|
447
|
+
| security + review | `security` party |
|
|
448
|
+
| architecture + QA | `refactor` party |
|
|
449
|
+
| architecture + engineering | `build` party |
|
|
450
|
+
|
|
395
451
|
---
|
|
396
452
|
|
|
397
453
|
### Memory
|
|
@@ -453,6 +509,7 @@ Epics group related stories and are stored in `.forgehive/memory/epics/`.
|
|
|
453
509
|
```bash
|
|
454
510
|
fh epic create "User Authentication" # create an epic (auto-numbered EPC-N)
|
|
455
511
|
fh epic create "User Authentication" --goal "Users can log in securely" # with a goal statement
|
|
512
|
+
fh epic create "User Authentication" --prd PRD-1 # link to a PRD at creation time
|
|
456
513
|
fh epic list # list all epics
|
|
457
514
|
fh epic show EPC-1 # show epic with linked stories and point total
|
|
458
515
|
```
|
|
@@ -461,6 +518,76 @@ Each epic card is a Markdown file at `.forgehive/memory/epics/EPC-N.md`. `fh epi
|
|
|
461
518
|
|
|
462
519
|
---
|
|
463
520
|
|
|
521
|
+
### Product Workflow
|
|
522
|
+
|
|
523
|
+
`fh product` manages the full **PRD → Epic → Story** pipeline.
|
|
524
|
+
|
|
525
|
+
#### PRDs (Product Requirements Documents)
|
|
526
|
+
|
|
527
|
+
```bash
|
|
528
|
+
fh product prd "User Authentication" # create PRD-N (auto-incremented)
|
|
529
|
+
fh product list # list all PRDs with status and date
|
|
530
|
+
fh product show PRD-1 # print full PRD content
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
PRDs are stored in `.forgehive/memory/prds/` as `YYYY-MM-DD-<slug>.md` with a standard template (Overview, Goals, Non-Goals, User Stories, Success Metrics, Open Questions).
|
|
534
|
+
|
|
535
|
+
#### Pipeline Overview
|
|
536
|
+
|
|
537
|
+
```bash
|
|
538
|
+
fh product status # tree view: PRDs → Epics → Stories
|
|
539
|
+
fh product roadmap # generate ROADMAP.md from all PRDs + Epics + Stories
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
`fh product status` prints a tree of all PRDs, linked epics, and their stories with status indicators. Epics without a PRD are shown at the bottom as orphans.
|
|
543
|
+
|
|
544
|
+
`fh product roadmap` writes a `ROADMAP.md` to the project root with a section per PRD, linked epic tables, and story counts.
|
|
545
|
+
|
|
546
|
+
**Typical product workflow:**
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
fh product prd "Onboarding Redesign"
|
|
550
|
+
fh epic create "Welcome Flow" --prd PRD-1 --goal "Users complete setup in < 5 min"
|
|
551
|
+
fh story create "As a new user I want to see a setup checklist" --epic EPC-1 --points 3
|
|
552
|
+
fh product status # see full pipeline
|
|
553
|
+
fh product roadmap # generate ROADMAP.md
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
---
|
|
557
|
+
|
|
558
|
+
### GitHub Integration
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
fh github setup # interactive: token + owner/repo; writes ~/.forgehive/credentials.json
|
|
562
|
+
fh github sync # fetch open Issues → create Story cards (idempotent)
|
|
563
|
+
fh github pr 42 # fetch PR #42 metadata + changed files → .forgehive/github-pr-42.md
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
#### Setup
|
|
567
|
+
|
|
568
|
+
`fh github setup` prompts for a GitHub personal access token (saved to `~/.forgehive/credentials.json`) and the repository in `owner/repo` format (saved to `.forgehive/github.yaml`). Run once; subsequent commands read the stored config.
|
|
569
|
+
|
|
570
|
+
#### Issue Sync
|
|
571
|
+
|
|
572
|
+
`fh github sync` fetches all open GitHub Issues (not PRs) and creates a Story card for each one. It's idempotent — issues already synced (detected by `GitHub: #N` in the story file) are skipped.
|
|
573
|
+
|
|
574
|
+
```
|
|
575
|
+
✓ Synced: #12 "Add OAuth login" → US-4
|
|
576
|
+
✓ Synced: #15 "Fix session timeout" → US-5
|
|
577
|
+
→ Skipped: #10 "Refactor auth module" (already synced)
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
#### PR Context
|
|
581
|
+
|
|
582
|
+
`fh github pr 42` fetches the PR title, body, author, and full list of changed files, writing a `.forgehive/github-pr-42.md` context file. Share this with a Review Party for structured code review:
|
|
583
|
+
|
|
584
|
+
```bash
|
|
585
|
+
fh github pr 42
|
|
586
|
+
fh party run review # Kai + Sam + Eli each see the PR context
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
---
|
|
590
|
+
|
|
464
591
|
### Velocity
|
|
465
592
|
|
|
466
593
|
```bash
|
|
@@ -637,6 +764,7 @@ my-project/
|
|
|
637
764
|
adrs/ <- architecture decision records
|
|
638
765
|
stories/ <- story cards (US-N.md)
|
|
639
766
|
epics/ <- epic cards (EPC-N.md)
|
|
767
|
+
prds/ <- Product Requirements Documents (PRD-N.md)
|
|
640
768
|
velocity.md <- sprint velocity history
|
|
641
769
|
skills/
|
|
642
770
|
generated/ <- AI-generated skills (fh skills regen)
|
|
@@ -873,9 +1001,9 @@ Global credential store (chmod 600). Managed exclusively via `fh mcp auth` comma
|
|
|
873
1001
|
|---|---|
|
|
874
1002
|
| Runtime | Node.js ≥ 18, ESM |
|
|
875
1003
|
| Language | TypeScript |
|
|
876
|
-
| Build | esbuild -> `dist/cli.js` (~
|
|
1004
|
+
| Build | esbuild -> `dist/cli.js` (~293 KB, single bundle) |
|
|
877
1005
|
| Type check | `tsc --noEmit` |
|
|
878
|
-
| Tests | `node:test` (native) + tsx ESM loader,
|
|
1006
|
+
| Tests | `node:test` (native) + tsx ESM loader, 369 tests |
|
|
879
1007
|
| Dependencies | `js-yaml` (sole runtime dependency) |
|
|
880
1008
|
|
|
881
1009
|
```bash
|
|
@@ -890,6 +1018,7 @@ npm test # node --import tsx/esm --test test/*.test.ts
|
|
|
890
1018
|
|
|
891
1019
|
| Version | What's new |
|
|
892
1020
|
|---|---|
|
|
1021
|
+
| **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`) |
|
|
893
1022
|
| **0.7.7** | User Guide (`docs/user-guide.md`) included in npm package; Documentation table in README |
|
|
894
1023
|
| **0.7.6** | YAML shape fix in `fh docs user`; frontmatter regex fix; 8 new tests for HIGH RISK paths |
|
|
895
1024
|
| **0.7.5** | `fh --version` reads from `package.json` (no longer hardcoded) |
|
|
@@ -903,4 +1032,4 @@ npm test # node --import tsx/esm --test test/*.test.ts
|
|
|
903
1032
|
|
|
904
1033
|
## License
|
|
905
1034
|
|
|
906
|
-
|
|
1035
|
+
Elastic License 2.0 (ELv2) — kostenlos selbst hosten für den eigenen Betrieb. Weiterverkauf als Managed Service nicht erlaubt.
|