hungry-ghost-hive 0.39.3 → 0.40.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 CHANGED
@@ -9,19 +9,26 @@
9
9
 
10
10
  <img width="1263" height="651" alt="image" src="https://github.com/user-attachments/assets/76eb8bd9-d5ec-45b7-9ee2-b7ef910f3e88" />
11
11
 
12
- Hive is a CLI tool that orchestrates AI agents modeled after agile software development teams. You act as the **Product Owner**, providing requirements. Hive's AI agents handle the rest—from planning through to PR submission.
12
+ Hive is a CLI tool that orchestrates AI agents modeled after agile software development teams. You act as the **Product Owner**, providing requirements. Hive's AI agents handle the rest from planning through to merged pull requests.
13
13
 
14
14
  ## Key Features
15
15
 
16
16
  - **AI-Powered Team Management**: Orchestrate autonomous teams of AI agents across multiple repositories
17
- - **Agile Workflow**: Natural hierarchy mirrors real development teams with Tech Lead, Seniors, Intermediates, and Juniors
17
+ - **Agile Workflow**: Natural hierarchy mirrors real development teams with Tech Lead, Seniors, Intermediates, Juniors, and QA agents
18
18
  - **Requirement to PR Automation**: From initial requirements to merged pull requests, fully automated
19
- - **Intelligent Task Distribution**: Stories automatically routed to appropriate skill levels (Junior, Intermediate, Senior)
20
- - **Real-Time Dashboard**: Monitor team progress and agent activity with an interactive TUI dashboard
21
- - **Multi-Repository Support**: Manage related services and libraries as coordinated git submodules
19
+ - **Intelligent Task Distribution**: Stories automatically routed to appropriate skill levels based on complexity scoring
20
+ - **QA Review Agents**: Dedicated QA agents auto-spawn to review PRs, run quality checks, and enforce acceptance criteria
21
+ - **Feature Sign-Off**: Automated E2E test execution when all stories for a requirement are merged
22
+ - **Real-Time Dashboard**: Interactive TUI dashboard with pipeline visualization, agent monitoring, PR review, and messaging
23
+ - **Multi-Repository Support**: Manage related services and libraries as coordinated git submodules with per-agent worktree isolation
24
+ - **Story Dependencies**: Topological dependency resolution ensures stories are completed in the right order
22
25
  - **Escalation Handling**: Built-in escalation protocol when agents need guidance or hit blockers
23
- - **PR Merge Queue**: Automated QA checks and merge queue management for production readiness
26
+ - **PR Merge Queue**: Automated merge queue with QA gating, auto-merge, and duplicate PR detection
24
27
  - **Jira Integration**: Two-way sync with Jira — epics, stories, subtasks, story points, sprint assignment, and status transitions
28
+ - **Multi-CLI Support**: Agents can use Claude Code, Codex, or Gemini CLI as their runtime
29
+ - **Distributed Mode**: Cluster support with RAFT-based leader election, peer replication, and duplicate story detection
30
+ - **Godmode**: Override complexity routing to use the most powerful models for all agents on a requirement
31
+ - **Manager Intelligence**: AI-powered stuck detection, automatic permission bypass, plan mode escape, and orphan recovery
25
32
 
26
33
  ## Installation
27
34
 
@@ -98,41 +105,76 @@ You provide high-level requirements. The AI team handles everything else:
98
105
 
99
106
  ```mermaid
100
107
  graph TD
101
- A["👤 YOU (Product Owner)<br/>Add feature X to the system"] --> B["🧠 TECH LEAD (Claude Opus)<br/>• Analyzes requirement<br/>• Breaks it into stories<br/>• Coordinates teams"]
102
- B --> C["👥 TEAM: Alpha<br/>Senior (Sonnet)"]
103
- B --> D["👥 TEAM: Beta<br/>Senior (Sonnet)"]
104
- C --> C1["📊 Intermediate (Haiku)"]
105
- C --> C2["🚀 Junior (GPT-4o-mini)"]
106
- C --> C3["QA (Sonnet)"]
107
- D --> D1["📊 Intermediate (Haiku)"]
108
- D --> D2["🚀 Junior (GPT-4o-mini)"]
109
- D --> D3["QA (Sonnet)"]
108
+ A["YOU (Product Owner)<br/>Add feature X to the system"] --> B["TECH LEAD (Opus)<br/>Analyzes requirement<br/>Breaks it into stories<br/>Coordinates teams"]
109
+ B --> C["TEAM: Alpha<br/>Senior (Opus)"]
110
+ B --> D["TEAM: Beta<br/>Senior (Opus)"]
111
+ C --> C1["Intermediate (Sonnet)"]
112
+ C --> C2["Junior (Haiku)"]
113
+ C --> C3["QA (Sonnet)"]
114
+ D --> D1["Intermediate (Sonnet)"]
115
+ D --> D2["Junior (Haiku)"]
116
+ D --> D3["QA (Sonnet)"]
110
117
  ```
111
118
 
112
119
  ### The Workflow
113
120
 
114
121
  1. **You submit a requirement** → `hive req "Your feature request"`
115
- 2. **Tech Lead analyzes** → Identifies affected repos, creates stories
116
- 3. **Seniors estimate** → Assign complexity scores, plan the work
122
+ 2. **Tech Lead analyzes** → Identifies affected repos, creates stories with dependencies
123
+ 3. **Stories are estimated** → Complexity scores assigned (Fibonacci 1-13)
117
124
  4. **Work is assigned** → Based on complexity:
118
125
  - Simple (1-3 points) → Junior
119
126
  - Medium (4-5 points) → Intermediate
120
- - Complex (6-13 points) → Senior
121
- 5. **Developers implement** Create branches, write code, run tests
122
- 6. **PRs submitted** → `hive pr submit` adds to merge queue
123
- 7. **QA reviews** → Automated spawning, code review, approval
124
- 8. **Merged!**Story complete
127
+ - Complex (6+ points) → Senior
128
+ - Blocker stories (depended on by others) always Senior
129
+ 5. **Developers implement** → Each agent gets an isolated git worktree, writes code, runs tests
130
+ 6. **PRs submitted** → Added to merge queue with automatic duplicate detection
131
+ 7. **QA reviews** QA agents auto-spawn, run lint/type-check/tests, validate acceptance criteria
132
+ 8. **Auto-merged** → Approved PRs are automatically merged
133
+ 9. **Feature sign-off** → When all stories are merged, E2E tests run automatically
134
+
135
+ ### QA Review Agents
136
+
137
+ When a developer submits a PR to the merge queue, the manager automatically spawns a QA agent to review it:
138
+
139
+ - Checks out the PR branch and runs configurable quality checks (`npm run lint`, `npm run type-check`, etc.)
140
+ - Runs the build command and test suite
141
+ - Validates that acceptance criteria from the story are met
142
+ - Approves and auto-merges passing PRs, or rejects with detailed feedback
143
+ - After 3+ QA failures on the same story, escalates to a Senior agent
144
+
145
+ ### Feature Sign-Off
146
+
147
+ When all stories for a requirement reach `merged` status:
148
+
149
+ 1. The manager detects the completed requirement
150
+ 2. A feature test agent is spawned to run E2E tests (configured via `e2e_test_path`)
151
+ 3. Results are posted to Jira as a sign-off report
152
+ 4. Requirement transitions to `sign_off_passed` or `sign_off_failed`
125
153
 
126
154
  ### The Manager (Micromanager Daemon)
127
155
 
128
156
  The Manager ensures agents stay productive:
129
157
 
130
158
  - **Auto-starts** when work begins
131
- - **Checks every 60 seconds** for stuck agents
159
+ - **Configurable intervals** fast poll for active work, slow poll when idle
132
160
  - **Health checks** sync agent status with tmux sessions
161
+ - **AI-powered done detection** — uses heuristics and LLM classification to determine if agents have finished
162
+ - **Stuck detection** — monitors screen output fingerprints to identify frozen agents
163
+ - **Permission bypass** — automatically handles permission prompts that block agent progress
164
+ - **Plan mode escape** — detects agents stuck in interactive plan mode and sends escape sequences
165
+ - **Orphan recovery** — detects stories left `in_progress` by terminated agents and resets them for reassignment
166
+ - **QA spawning** — automatically creates QA agents when PRs enter the merge queue
167
+ - **Context freshness** — restarts long-running tech lead sessions to maintain fresh context
133
168
  - **Nudges idle agents** to check for work
134
169
  - **Forwards messages** between agents
135
- - **Spawns QA** when PRs need review
170
+
171
+ ### Story Dependencies
172
+
173
+ Stories can depend on other stories. The scheduler uses topological sorting (Kahn's algorithm) to ensure:
174
+
175
+ - Stories with unresolved dependencies are skipped during assignment
176
+ - Blocker stories (that others depend on) are routed to Senior agents for priority completion
177
+ - Circular dependencies are detected and flagged
136
178
 
137
179
  ## Commands Reference
138
180
 
@@ -142,23 +184,31 @@ The Manager ensures agents stay productive:
142
184
  # Submit a new requirement
143
185
  hive req "Implement user authentication"
144
186
  hive req --file requirements.md
187
+ hive req --godmode "Critical security fix" # Force Opus for all agents
188
+ hive req --target-branch develop "My feature" # Target a specific branch
189
+ hive req --dry-run "Test requirement" # Plan without spawning agents
190
+
191
+ # Import from Jira epic
192
+ hive req "https://mycompany.atlassian.net/browse/PROJ-100"
145
193
 
146
194
  # Check overall status
147
195
  hive status
196
+ hive status --json
148
197
 
149
198
  # Open the dashboard
150
199
  hive dashboard
151
200
 
152
201
  # Dashboard controls:
153
- # ↑↓ Navigate agents list
202
+ # Up/Down Navigate agents list
154
203
  # Enter Attach to selected agent's tmux session
155
- # Ctrl+B,D Detach from tmux (returns to shell)
204
+ # Ctrl+B,D Detach from tmux (returns to dashboard)
156
205
  # Tab Switch between panels
157
- # Esc/Q Exit dashboard
206
+ # Q/Ctrl+C Exit dashboard
158
207
 
159
208
  # View escalations (agents asking for help)
160
209
  hive escalations list
161
210
  hive escalations resolve <id> --message "Here's what to do..."
211
+ hive escalations acknowledge <id>
162
212
 
163
213
  # View/handle human approval requests
164
214
  hive approvals list
@@ -171,17 +221,25 @@ hive approvals deny <id> -m "Do not run that"
171
221
  ```bash
172
222
  # Assign stories to agents (triggers work)
173
223
  hive assign
224
+ hive assign --dry-run # Preview assignments without spawning
174
225
 
175
226
  # View stories
176
227
  hive stories list
177
228
  hive stories show <story-id>
178
229
 
179
- # Engineer-discovered refactor story (from an agent session)
180
- hive my-stories refactor --session <agent-session> --title "Simplify auth middleware" --description "Duplication and branching complexity in auth stack" --points 2
181
-
182
230
  # View agents
183
231
  hive agents list
184
232
  hive agents list --active
233
+ hive agents inspect <agent-id> # Detailed agent state
234
+ hive agents logs <agent-id> # View agent event logs
235
+ hive agents cleanup # Clean up dead agent resources
236
+
237
+ # Resume agents from saved state
238
+ hive resume --all
239
+ hive resume --agent <agent-id>
240
+
241
+ # Clean up orphaned resources (worktrees, lock files, dead sessions)
242
+ hive cleanup
185
243
  ```
186
244
 
187
245
  ### Merge Queue & QA
@@ -189,13 +247,24 @@ hive agents list --active
189
247
  ```bash
190
248
  # View the merge queue
191
249
  hive pr queue
250
+ hive pr queue --json
251
+
252
+ # Submit a PR to the merge queue
253
+ hive pr submit --story <story-id> --branch <branch-name>
254
+
255
+ # Sync open GitHub PRs into the merge queue
256
+ hive pr sync
192
257
 
193
258
  # Manually trigger QA review
194
259
  hive pr review --from <qa-session>
195
260
 
196
261
  # Approve/reject PRs
197
262
  hive pr approve <pr-id>
263
+ hive pr approve <pr-id> --no-merge # Approve without auto-merging
198
264
  hive pr reject <pr-id> --reason "Tests failing"
265
+
266
+ # View closed/merged PRs
267
+ hive pr closed
199
268
  ```
200
269
 
201
270
  ### Manager (Micromanager)
@@ -218,23 +287,20 @@ hive manager health
218
287
  # Nudge a specific agent
219
288
  hive manager nudge <session>
220
289
  hive manager nudge hive-senior-alpha -m "Check the failing tests"
221
-
222
- # Cluster status (when cluster.enabled=true)
223
- hive cluster status
224
- hive cluster status --json
225
290
  ```
226
291
 
227
- ### Jira Integration
292
+ ### Project Management Integration
228
293
 
229
294
  ```bash
230
- # Fetch an issue by key or URL
231
- hive jira fetch HIVE-42
232
- hive jira fetch https://mycompany.atlassian.net/browse/HIVE-42
295
+ # Provider-agnostic commands (works with Jira or other configured providers)
296
+ hive pm fetch HIVE-42
297
+ hive pm fetch https://mycompany.atlassian.net/browse/HIVE-42
298
+ hive pm search "project = HIVE AND status = 'In Progress'"
299
+ hive pm search "sprint in openSprints()" --max 20 --json
233
300
 
234
- # Search issues with JQL
235
- hive jira search "project = HIVE AND status = 'In Progress'"
236
- hive jira search "assignee = currentUser()" --max 20
237
- hive jira search "sprint in openSprints()" --json
301
+ # Jira-specific (legacy alias, delegates to hive pm)
302
+ hive jira fetch HIVE-42
303
+ hive jira search "assignee = currentUser()"
238
304
  ```
239
305
 
240
306
  ### Communication
@@ -245,9 +311,59 @@ hive msg send hive-senior-alpha "Please prioritize STORY-001"
245
311
 
246
312
  # Check messages
247
313
  hive msg inbox
314
+ hive msg inbox hive-tech-lead # Check specific agent's inbox
315
+ hive msg read <msg-id> # Read a specific message
316
+ hive msg reply <msg-id> "response" # Reply to a message
248
317
  hive msg outbox
249
318
  ```
250
319
 
320
+ ### Authentication
321
+
322
+ ```bash
323
+ # Re-authenticate with providers
324
+ hive auth --provider github # GitHub OAuth Device Flow
325
+ hive auth --provider jira # Jira OAuth 2.0 (3LO)
326
+ ```
327
+
328
+ ### Configuration
329
+
330
+ ```bash
331
+ # View/modify configuration
332
+ hive config show
333
+ hive config get models.senior.model
334
+ hive config set scaling.junior_max_complexity 4
335
+
336
+ # Manage teams
337
+ hive teams list
338
+ hive teams show <name>
339
+ hive teams remove <name>
340
+ ```
341
+
342
+ ### Cluster (Distributed Mode)
343
+
344
+ ```bash
345
+ hive cluster status
346
+ hive cluster status --json
347
+ ```
348
+
349
+ ### Agent-Only Commands
350
+
351
+ These commands are used by agents during their work sessions:
352
+
353
+ ```bash
354
+ # Story management
355
+ hive my-stories claim <story-id>
356
+ hive my-stories complete <story-id>
357
+ hive my-stories refactor --title "Simplify auth" --description "..." --points 2
358
+
359
+ # Progress reporting (posts to Jira subtask)
360
+ hive progress -m "Implemented auth middleware" --from <session>
361
+ hive progress -m "All tests passing" --from <session> --done
362
+
363
+ # Post implementation approach comment
364
+ hive approach --from <session>
365
+ ```
366
+
251
367
  ## Architecture
252
368
 
253
369
  ### Directory Structure
@@ -257,14 +373,21 @@ my-workspace/
257
373
  ├── .hive/
258
374
  │ ├── hive.db # SQLite database (all state)
259
375
  │ ├── hive.config.yaml # Configuration
376
+ │ ├── .env # OAuth credentials (auto-managed)
260
377
  │ ├── agents/ # Agent session states
261
378
  │ └── logs/ # Conversation logs
262
379
  ├── repos/
263
- │ ├── service-a/ # Git submodule
264
- └── service-b/ # Git submodule
380
+ │ ├── service-a/ # Git submodule (shared repo)
381
+ ├── team-abc-senior-1/ # Agent worktree (isolated copy)
382
+ │ ├── team-abc-junior-1/ # Agent worktree (isolated copy)
383
+ │ └── team-abc-qa-1/ # Agent worktree (isolated copy)
265
384
  └── README.md
266
385
  ```
267
386
 
387
+ ### Git Worktree Isolation
388
+
389
+ Each agent gets its own git worktree to prevent branch conflicts when multiple agents work on the same repository simultaneously. Worktrees are created automatically during story assignment and cleaned up when agents terminate.
390
+
268
391
  ### Agent Sessions
269
392
 
270
393
  Each agent runs in a tmux session:
@@ -278,6 +401,17 @@ hive-qa-alpha # QA for team "alpha"
278
401
  hive-manager # The micromanager daemon
279
402
  ```
280
403
 
404
+ ### Agent Types
405
+
406
+ | Type | Default Model | CLI Tool | Role |
407
+ | ------------ | ------------- | -------- | ------------------------------------------------------------- |
408
+ | Tech Lead | Claude Opus | claude | Requirement analysis, story creation, cross-team coordination |
409
+ | Senior | Claude Opus | claude | Complex stories (6+), estimation, team leadership, blockers |
410
+ | Intermediate | Claude Sonnet | claude | Medium stories (4-5), implementation and testing |
411
+ | Junior | Claude Haiku | claude | Simple stories (1-3), supervised implementation |
412
+ | QA | Claude Sonnet | claude | PR review, quality checks, acceptance criteria validation |
413
+ | Feature Test | Claude Sonnet | claude | E2E test execution for feature sign-off |
414
+
281
415
  ### Story States
282
416
 
283
417
  ```mermaid
@@ -295,56 +429,94 @@ stateDiagram-v2
295
429
  merged --> [*]
296
430
  ```
297
431
 
432
+ ### Requirement States
433
+
434
+ ```mermaid
435
+ stateDiagram-v2
436
+ [*] --> pending
437
+ pending --> planning
438
+ planning --> planned
439
+ planned --> in_progress
440
+ in_progress --> completed: All stories merged
441
+ completed --> sign_off: E2E tests configured
442
+ sign_off --> sign_off_passed: Tests pass
443
+ sign_off --> sign_off_failed: Tests fail
444
+ sign_off_passed --> [*]
445
+ completed --> [*]
446
+ ```
447
+
298
448
  ## Configuration
299
449
 
300
450
  Edit `.hive/hive.config.yaml`:
301
451
 
302
452
  ```yaml
303
- # Model assignments
453
+ # Model assignments (all roles configurable)
304
454
  models:
305
455
  tech_lead:
306
456
  provider: anthropic
307
457
  model: claude-opus-4-20250514
308
- cli_tool: claude
458
+ cli_tool: claude # claude | codex | gemini
309
459
  safety_mode: unsafe # safe = human approvals, unsafe = full automation
310
460
  senior:
311
461
  provider: anthropic
312
- model: claude-sonnet-4-20250514
462
+ model: claude-opus-4-20250514
313
463
  cli_tool: claude
314
464
  safety_mode: unsafe
315
465
  intermediate:
316
466
  provider: anthropic
317
- model: claude-haiku-3-5-20241022
467
+ model: claude-sonnet-4-20250514
318
468
  cli_tool: claude
319
469
  safety_mode: unsafe
320
470
  junior:
321
- provider: openai
322
- model: gpt-4o-mini
323
- cli_tool: codex
471
+ provider: anthropic
472
+ model: claude-haiku-4-5-20251001
473
+ cli_tool: claude
324
474
  safety_mode: unsafe
325
475
  qa:
326
476
  provider: anthropic
327
477
  model: claude-sonnet-4-20250514
328
478
  cli_tool: claude
329
479
  safety_mode: unsafe
480
+ feature_test:
481
+ provider: anthropic
482
+ model: claude-sonnet-4-20250514
483
+ cli_tool: claude
484
+ safety_mode: unsafe
330
485
 
331
486
  # Complexity thresholds for delegation
332
487
  scaling:
333
- junior_max_complexity: 3 # 1-3 Junior
334
- intermediate_max_complexity: 5 # 4-5 Intermediate
488
+ junior_max_complexity: 3 # 1-3 -> Junior
489
+ intermediate_max_complexity: 5 # 4-5 -> Intermediate
335
490
  senior_capacity: 20 # Story points before scaling up
336
491
  refactor:
337
492
  enabled: true
338
493
  capacity_percent: 10 # Reserve up to 10% of feature capacity for refactor stories
339
494
  allow_without_feature_work: true
340
495
 
341
- # QA checks
496
+ # QA configuration
342
497
  qa:
343
498
  quality_checks:
344
499
  - npm run lint
345
500
  - npm run type-check
346
501
  build_command: npm run build
347
502
  test_command: npm test
503
+ scaling:
504
+ pending_per_agent: 2.5 # PRs per QA agent before scaling
505
+ max_agents: 5 # Maximum concurrent QA agents
506
+
507
+ # Manager daemon tuning
508
+ manager:
509
+ stuck_threshold: 300000 # 5 min before stuck detection
510
+ nudge_cooldown: 600000 # 10 min between nudges
511
+ max_stuck_nudges_per_story: 1
512
+ screen_static_inactivity_threshold: 600000
513
+
514
+ # Merge queue
515
+ merge_queue:
516
+ max_age_hours: 1 # Stale PR threshold
517
+
518
+ # E2E testing for feature sign-off
519
+ e2e_test_path: tests/e2e # Optional: enables feature sign-off
348
520
 
349
521
  # Optional distributed mode (HTTP + peer replication)
350
522
  cluster:
@@ -353,18 +525,14 @@ cluster:
353
525
  listen_host: 127.0.0.1
354
526
  listen_port: 8787
355
527
  public_url: http://203.0.113.10:8787
356
- # Required if listen_host is not loopback (127.0.0.1/localhost/::1)
357
528
  # auth_token: replace-with-strong-shared-secret
358
529
  peers:
359
530
  - id: node-b
360
531
  url: http://198.51.100.20:8787
361
- - id: node-c
362
- url: http://192.0.2.30:8787
363
532
  heartbeat_interval_ms: 2000
364
533
  election_timeout_min_ms: 3000
365
534
  election_timeout_max_ms: 6000
366
535
  sync_interval_ms: 5000
367
- request_timeout_ms: 5000
368
536
  story_similarity_threshold: 0.92
369
537
  ```
370
538
 
@@ -417,14 +585,16 @@ When a requirement is synced to Jira, Hive will:
417
585
  - Move stories into the active sprint on the configured board
418
586
  - Create issue links for story dependencies
419
587
  - Transition stories through statuses as agents complete work
588
+ - Post lifecycle comments (progress updates, sign-off reports)
420
589
 
421
590
  ### Distributed Mode
422
591
 
423
592
  - Run `hive manager start` on every host in the same cluster.
424
- - Each host runs manager/scheduler runtime, but only one node is elected leader at a time.
593
+ - Each host runs manager/scheduler runtime, but only one node is elected leader at a time (RAFT consensus).
425
594
  - Leader is the only node allowed to run orchestration decisions (`assign`, scheduler loops, tech lead spawn).
426
595
  - Followers stay in sync and do not schedule work.
427
596
  - State replication is logical row/event sync over HTTP (no centralized DB).
597
+ - Duplicate story detection across nodes using configurable similarity threshold.
428
598
 
429
599
  ## Escalation Protocol
430
600
 
@@ -432,11 +602,13 @@ When agents get stuck, they escalate:
432
602
 
433
603
  ```mermaid
434
604
  graph LR
435
- A["🚀 Junior<br/>Stuck on issue"] --> B["👔 Senior<br/>Cannot resolve"]
436
- B --> C["🧠 Tech Lead<br/>Escalates higher"]
437
- C --> D["👤 YOU<br/>Human guidance"]
605
+ A["Junior<br/>Stuck on issue"] --> B["Senior<br/>Cannot resolve"]
606
+ B --> C["Tech Lead<br/>Escalates higher"]
607
+ C --> D["YOU<br/>Human guidance"]
438
608
  ```
439
609
 
610
+ QA agents escalate to Seniors after 3+ review failures on the same story.
611
+
440
612
  Check escalations:
441
613
 
442
614
  ```bash
@@ -454,7 +626,9 @@ hive escalations resolve ESC-001 --message "Use OAuth2 with PKCE flow"
454
626
  1. **Be specific in requirements** - The more detail, the better the stories
455
627
  2. **Check the dashboard** - `hive dashboard` shows real-time progress
456
628
  3. **Monitor escalations** - Agents will ask when they need guidance
457
- 4. **Trust the process** - Let agents work, they'll handle the details
629
+ 4. **Use godmode for critical work** - `hive req --godmode` uses top-tier models across the board
630
+ 5. **Import from Jira** - Pass a Jira epic URL to `hive req` to import directly
631
+ 6. **Trust the process** - Let agents work, they'll handle the details
458
632
 
459
633
  ## Troubleshooting
460
634
 
@@ -471,6 +645,12 @@ hive manager health # Sync status with tmux
471
645
  hive manager health # Cleans up dead agents, respawns as needed
472
646
  ```
473
647
 
648
+ ### Orphaned resources (stale worktrees, lock files)
649
+
650
+ ```bash
651
+ hive cleanup # Cleans up worktrees, lock files, dead sessions, orphaned stories
652
+ ```
653
+
474
654
  ### View agent logs
475
655
 
476
656
  ```bash
@@ -478,10 +658,17 @@ tmux attach -t hive-senior-alpha # Attach to see what agent is doing
478
658
  # Detach with Ctrl+B, D
479
659
  ```
480
660
 
661
+ ### Resume interrupted agents
662
+
663
+ ```bash
664
+ hive resume --all # Resume all agents from saved state
665
+ hive resume --agent <id> # Resume a specific agent
666
+ ```
667
+
481
668
  ### Reset everything
482
669
 
483
670
  ```bash
484
- hive nuke --all # WARNING: Deletes all data
671
+ hive nuke --all # WARNING: Deletes all data including worktrees
485
672
  ```
486
673
 
487
674
  ## Contributors
@@ -507,7 +694,7 @@ We appreciate contributions from everyone! This project is built and maintained
507
694
 
508
695
  Hive is built with production-grade quality standards:
509
696
 
510
- - **Comprehensive Testing**: 1140+ test cases with automated test execution
697
+ - **Comprehensive Testing**: 1700+ test cases with automated test execution
511
698
  - **Strict TypeScript**: Full type safety with no implicit any
512
699
  - **Code Linting**: ESLint configuration enforces consistent code style
513
700
  - **Conventional Commits**: Commit messages follow the conventional commits specification for automatic changelog generation
@@ -554,7 +741,7 @@ We welcome contributions! Here's how to get started:
554
741
 
555
742
  ```bash
556
743
  ANTHROPIC_API_KEY=sk-ant-... # Required for Claude agents
557
- OPENAI_API_KEY=sk-... # Required for GPT agents (juniors)
744
+ OPENAI_API_KEY=sk-... # Required if using OpenAI-based agents
558
745
  GITHUB_TOKEN=ghp_... # Required for PR creation
559
746
 
560
747
  # Jira (auto-managed in .hive/.env after `hive init` or `hive auth jira`)
@@ -562,50 +749,16 @@ JIRA_CLIENT_ID=... # OAuth 2.0 client ID
562
749
  JIRA_CLIENT_SECRET=... # OAuth 2.0 client secret
563
750
  ```
564
751
 
565
- ## Issue Tracking (Beads)
566
-
567
- This repository uses `bd` (Beads) for issue tracking. Run `bd onboard` to get started.
568
-
569
- ### Quick Reference
570
-
571
- ```bash
572
- bd ready # Find available work
573
- bd show <id> # View issue details
574
- bd update <id> --status in_progress # Claim work
575
- bd close <id> # Complete work
576
- bd sync # Sync with git
577
- ```
578
-
579
- ### Session Completion (Landing the Plane)
580
-
581
- When ending a work session, complete ALL steps below. Work is NOT complete until `git push` succeeds.
582
-
583
- 1. File issues for remaining work
584
- 2. Run quality gates (tests/linters/builds) if code changed
585
- 3. Update issue status (close finished work, update in-progress)
586
- 4. Push to remote:
587
-
588
- ```bash
589
- git pull --rebase
590
- bd sync
591
- git push
592
- git status # MUST show "up to date with origin"
593
- ```
594
-
595
- 5. Clean up (stashes, prune remote branches)
596
- 6. Verify all changes committed AND pushed
597
- 7. Hand off with context for next session
598
-
599
752
  ## License
600
753
 
601
754
  This project is licensed under the **Hungry Ghost Restricted License**. See the [LICENSE](./LICENSE) file for details.
602
755
 
603
756
  ### License Summary
604
757
 
605
- - You CAN use the software for any purpose, including commercial projects
606
- - You CAN modify the software for your own use
607
- - You CAN contribute improvements via pull requests
608
- - You CANNOT redistribute the software to others
609
- - You CANNOT sell or sublicense the software itself
758
+ - You CAN use the software for any purpose, including commercial projects
759
+ - You CAN modify the software for your own use
760
+ - You CAN contribute improvements via pull requests
761
+ - You CANNOT redistribute the software to others
762
+ - You CANNOT sell or sublicense the software itself
610
763
 
611
764
  For more information, see the full [LICENSE](./LICENSE) file.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/dashboard/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAgCvC,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAGrD;AAED,wBAAsB,cAAc,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiJlF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/dashboard/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAgCvC,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAGrD;AAED,wBAAsB,cAAc,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoJlF"}
@@ -84,7 +84,7 @@ export async function startDashboard(options = {}) {
84
84
  left: 0,
85
85
  width: '100%',
86
86
  height: 1,
87
- content: ' Tab: Switch panels | ↑↓: Navigate | Enter: Attach to tmux | Ctrl+B,D: Detach | Q: Quit',
87
+ content: ' Tab: Switch panels | ↑↓: Navigate | Enter: Attach to agent | Q/Ctrl+C: Quit | Ctrl+B,D: Detach tmux',
88
88
  style: {
89
89
  bg: 'blue',
90
90
  fg: 'white',
@@ -140,7 +140,10 @@ export async function startDashboard(options = {}) {
140
140
  };
141
141
  scheduleRefresh();
142
142
  // Key bindings
143
- screen.key(['q', 'C-c', 'escape'], () => {
143
+ // Note: 'escape' is intentionally excluded — tmux Ctrl+B prefix can generate
144
+ // escape sequences that blessed may misinterpret as an ESC keypress, which
145
+ // would cause the dashboard to exit unexpectedly (the "double press" bug).
146
+ screen.key(['q', 'C-c'], () => {
144
147
  if (currentTimeout)
145
148
  clearTimeout(currentTimeout);
146
149
  try {