hail-hydra-cc 2.1.1 → 2.3.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 +8 -4
- package/files/SKILL.md +208 -52
- package/files/agents/hydra-analyst.md +48 -0
- package/files/agents/hydra-coder.md +44 -0
- package/files/agents/hydra-git.md +21 -0
- package/files/agents/hydra-guard.md +24 -0
- package/files/agents/hydra-preflight.md +188 -0
- package/files/agents/hydra-runner.md +21 -0
- package/files/agents/hydra-scout.md +30 -0
- package/files/agents/hydra-scribe.md +12 -0
- package/files/agents/hydra-sentinel-scan.md +13 -0
- package/files/agents/hydra-sentinel.md +27 -0
- package/files/commands/hydra/help.md +3 -0
- package/files/commands/hydra/preflight.md +94 -0
- package/files/commands/hydra/stats.md +185 -0
- package/files/commands/hydra/status.md +2 -0
- package/package.json +58 -44
- package/src/display.js +2 -2
- package/src/files.js +7 -0
- package/src/prompts.js +2 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
npx hail-hydra-cc
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Runs an interactive installer that deploys
|
|
12
|
+
Runs an interactive installer that deploys 10 Hydra agents into your Claude Code setup.
|
|
13
13
|
|
|
14
14
|
## What is Hydra?
|
|
15
15
|
|
|
@@ -26,6 +26,7 @@ Hydra makes Claude Code's Opus model an intelligent **orchestrator** instead of
|
|
|
26
26
|
| `hydra-analyst` | 🔵 Sonnet 4.6 | Code review, debugging, analysis |
|
|
27
27
|
| `hydra-sentinel-scan` | 🟢 Haiku 4.5 | Fast integration sweep |
|
|
28
28
|
| `hydra-sentinel` | 🔵 Sonnet 4.6 | Deep integration analysis |
|
|
29
|
+
| `hydra-preflight` | 🟢 Haiku 4.5 | Environment detection, version probing, dep inventory |
|
|
29
30
|
|
|
30
31
|
**Expected gains:** 2–3× faster tasks, ~50% lower API costs, zero quality loss.
|
|
31
32
|
(Savings calculated against Opus 4.6 at $5/$25 per MTok — February 2026 pricing)
|
|
@@ -46,17 +47,18 @@ npx hail-hydra-cc --help # Show help
|
|
|
46
47
|
|
|
47
48
|
```
|
|
48
49
|
~/.claude/ (or ./.claude/ for local)
|
|
49
|
-
├── agents/ #
|
|
50
|
+
├── agents/ # 10 agent definitions
|
|
50
51
|
│ ├── hydra-scout.md
|
|
51
52
|
│ ├── hydra-runner.md
|
|
52
53
|
│ ├── hydra-scribe.md
|
|
53
54
|
│ ├── hydra-guard.md
|
|
54
55
|
│ ├── hydra-git.md
|
|
55
56
|
│ ├── hydra-sentinel-scan.md
|
|
57
|
+
│ ├── hydra-preflight.md
|
|
56
58
|
│ ├── hydra-coder.md
|
|
57
59
|
│ ├── hydra-analyst.md
|
|
58
60
|
│ └── hydra-sentinel.md
|
|
59
|
-
├── commands/hydra/ #
|
|
61
|
+
├── commands/hydra/ # 10 slash commands
|
|
60
62
|
│ ├── help.md # /hydra:help
|
|
61
63
|
│ ├── status.md # /hydra:status
|
|
62
64
|
│ ├── update.md # /hydra:update
|
|
@@ -64,7 +66,9 @@ npx hail-hydra-cc --help # Show help
|
|
|
64
66
|
│ ├── guard.md # /hydra:guard
|
|
65
67
|
│ ├── quiet.md # /hydra:quiet
|
|
66
68
|
│ ├── verbose.md # /hydra:verbose
|
|
67
|
-
│
|
|
69
|
+
│ ├── report.md # /hydra:report
|
|
70
|
+
│ ├── map.md # /hydra:map
|
|
71
|
+
│ └── preflight.md # /hydra:preflight
|
|
68
72
|
├── hooks/ # 4 lifecycle hooks
|
|
69
73
|
│ ├── hydra-check-update.js # SessionStart — version check
|
|
70
74
|
│ ├── hydra-statusline.js # StatusLine — status bar
|
package/files/SKILL.md
CHANGED
|
@@ -57,6 +57,59 @@ When hydra-sentinel confirms real issues:
|
|
|
57
57
|
Architectural changes, migration needed, business logic decisions.
|
|
58
58
|
→ Show the report. Let user decide.
|
|
59
59
|
|
|
60
|
+
## Response Compression Protocol — Orchestrator
|
|
61
|
+
|
|
62
|
+
Apply light compression to your responses to the user. This is NOT
|
|
63
|
+
caveman-speak or fragmented language. Keep full grammar and natural prose.
|
|
64
|
+
Just remove waste.
|
|
65
|
+
|
|
66
|
+
### Drop These (Always)
|
|
67
|
+
|
|
68
|
+
- **Filler words**: just, really, basically, actually, simply, quite, very, totally
|
|
69
|
+
- **Pleasantries**: "Sure!", "Of course!", "Happy to help!", "Great question!"
|
|
70
|
+
- **Hedging**: "I think maybe", "It might be that", "Perhaps we could"
|
|
71
|
+
- **Throat-clearing**: "Let me explain...", "What I'll do is...", "Here's what I'll do..."
|
|
72
|
+
- **Signoffs**: "Let me know if you'd like me to adjust anything!", "Feel free to ask if...", "Hope this helps!"
|
|
73
|
+
- **Restating the question**: Don't repeat what the user asked back at them.
|
|
74
|
+
- **Apologetic preambles**: "Sorry for the confusion", "My apologies" (only apologize when you actually made an error, not as filler)
|
|
75
|
+
|
|
76
|
+
### Keep These (Always)
|
|
77
|
+
|
|
78
|
+
- Full grammar and articles (a, an, the)
|
|
79
|
+
- Natural sentence structure
|
|
80
|
+
- Code explanations when genuinely needed
|
|
81
|
+
- Reasoning when the user asks "why"
|
|
82
|
+
- Warnings about destructive operations
|
|
83
|
+
- Onboarding/learning explanations when the user is new to a concept
|
|
84
|
+
|
|
85
|
+
### Examples
|
|
86
|
+
|
|
87
|
+
**WRONG (verbose):**
|
|
88
|
+
> Sure! I'd be happy to help you fix that auth bug. Let me take a look at the
|
|
89
|
+
> code. Looking at this, I think the issue is that the token expiry check is
|
|
90
|
+
> using `<` instead of `<=`. I'll go ahead and fix that for you. Let me know
|
|
91
|
+
> if you'd like me to adjust anything!
|
|
92
|
+
|
|
93
|
+
**RIGHT (compressed):**
|
|
94
|
+
> The token expiry check uses `<` instead of `<=`. Fixing it now.
|
|
95
|
+
|
|
96
|
+
Same information. ~70% fewer tokens. User barely notices.
|
|
97
|
+
|
|
98
|
+
### Auto-Clarity — When to Drop Compression
|
|
99
|
+
|
|
100
|
+
Resume normal verbose prose for:
|
|
101
|
+
- **Security warnings** ("This will permanently delete...", "Cannot be undone")
|
|
102
|
+
- **Destructive operations** that need explicit user confirmation
|
|
103
|
+
- **Multi-step instructions** where compression risks misreading
|
|
104
|
+
- **User confused or asking follow-up clarification** — they need detail
|
|
105
|
+
- **Onboarding** — explaining new concepts the user is learning
|
|
106
|
+
|
|
107
|
+
Compression is for normal task completion. Anything safety-critical or educational gets full prose.
|
|
108
|
+
|
|
109
|
+
### What This Is NOT
|
|
110
|
+
|
|
111
|
+
This is not "caveman mode" or fragment-style. Don't drop articles. Don't write "Bug auth middleware. Token expiry use < not <=. Fix now." That's too aggressive — users WILL notice. Goal is invisible compression: a careful reader notices responses are tighter, but no average user complains it sounds robotic.
|
|
112
|
+
|
|
60
113
|
## Why Hydra Exists
|
|
61
114
|
|
|
62
115
|
Autoregressive LLM inference is memory-bandwidth bound — the time per token scales with model
|
|
@@ -94,18 +147,18 @@ User Request
|
|
|
94
147
|
════════════════════════════════════════════════════════
|
|
95
148
|
Wave N (parallel dispatch, index context injected)
|
|
96
149
|
┌───────────────────┬──────────────────────────────────┐
|
|
97
|
-
│
|
|
150
|
+
│ SEQUENTIAL │ PARALLEL (wait for all) │
|
|
98
151
|
▼ ▼ │
|
|
99
152
|
[coder] [scribe] ──────────────────────────────┘
|
|
100
153
|
│
|
|
101
154
|
▼
|
|
102
|
-
|
|
155
|
+
ALL agents complete (Opus waits for every dispatched agent)
|
|
103
156
|
│
|
|
104
157
|
├── Raw data / clean pass? → AUTO-ACCEPT → (updates Session Index if scout)
|
|
105
158
|
└── Code / analysis / user-facing docs? → Orchestrator verifies
|
|
106
159
|
│
|
|
107
160
|
▼
|
|
108
|
-
User gets result
|
|
161
|
+
User gets result (single response, all agent outputs included)
|
|
109
162
|
```
|
|
110
163
|
|
|
111
164
|
This mirrors speculative decoding's "draft → score → accept/reject" loop, but at task granularity.
|
|
@@ -226,45 +279,145 @@ If you notice the map's git_hash doesn't match HEAD and hydra-scout hasn't
|
|
|
226
279
|
been dispatched yet, dispatch scout to update the map BEFORE running sentinel.
|
|
227
280
|
A stale map is worse than no map — it could have incorrect dependency data.
|
|
228
281
|
|
|
229
|
-
##
|
|
282
|
+
## Preflight Protocol — /hydra:preflight
|
|
283
|
+
|
|
284
|
+
Run this before starting work on any new project or unfamiliar codebase.
|
|
285
|
+
It catches environment and compatibility issues before they become multi-hour
|
|
286
|
+
debugging sessions.
|
|
287
|
+
|
|
288
|
+
### When to run
|
|
289
|
+
|
|
290
|
+
- User types `hydra preflight` or `/hydra:preflight`
|
|
291
|
+
- User says "check my environment", "validate my setup", "is this project ready to build"
|
|
292
|
+
- You are about to begin a substantial build task on a project you have not seen before
|
|
293
|
+
in this session AND the Session Index has no prior context for this project
|
|
294
|
+
|
|
295
|
+
### Execution — Two Phases, Always in Sequence
|
|
296
|
+
|
|
297
|
+
**Phase 1 (Detection) — dispatch hydra-preflight:**
|
|
298
|
+
|
|
299
|
+
Prompt:
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
Run a full preflight check on this project. Collect runtime versions, run all
|
|
303
|
+
GPU/CUDA probe scripts, inventory installed packages, compare .env.example against
|
|
304
|
+
.env, verify build tools exist, and check service connectivity. Return the full
|
|
305
|
+
structured PREFLIGHT_INVENTORY JSON. Do not make recommendations.
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Wait for hydra-preflight to return `PREFLIGHT_INVENTORY_COMPLETE` before proceeding.
|
|
230
309
|
|
|
231
|
-
|
|
232
|
-
blocking or non-blocking to maximize throughput.
|
|
310
|
+
**Phase 2 (Analysis) — dispatch hydra-analyst:**
|
|
233
311
|
|
|
234
|
-
|
|
312
|
+
Pass the full PREFLIGHT_INVENTORY from Phase 1. Prompt:
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
You are performing a compatibility analysis on the following environment inventory.
|
|
316
|
+
Cross-reference all detected versions against known compatibility matrices.
|
|
317
|
+
Pay special attention to GPU stack combinations (PyTorch/CUDA/cuDNN),
|
|
318
|
+
framework pairs (React/Next, Python/TF), and Node/native addon combinations.
|
|
319
|
+
|
|
320
|
+
For each component or pair, return one of three verdicts:
|
|
321
|
+
✅ COMPATIBLE — versions are known-good together
|
|
322
|
+
⚠️ KNOWN RISK — this combination has known issues or is untested
|
|
323
|
+
❌ CONFIRMED BREAK — probe output or known matrix confirms incompatibility
|
|
324
|
+
|
|
325
|
+
For ❌ verdicts, include the specific fix (e.g. "pin pytorch==2.7.0").
|
|
326
|
+
For ⚠️ verdicts, include what to watch for.
|
|
327
|
+
For unknowns, flag as "UNVERIFIED — test before building" rather than assuming green.
|
|
328
|
+
|
|
329
|
+
INVENTORY:
|
|
330
|
+
[paste full PREFLIGHT_INVENTORY here]
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Presenting Results to User
|
|
334
|
+
|
|
335
|
+
After both phases complete, present a unified report:
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
🐉 Hydra Preflight — [project name]
|
|
339
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
340
|
+
|
|
341
|
+
RUNTIMES
|
|
342
|
+
✅ Node 22.4.0 (matches .nvmrc)
|
|
343
|
+
✅ Python 3.11.9 (matches .python-version)
|
|
344
|
+
|
|
345
|
+
GPU STACK
|
|
346
|
+
❌ PyTorch 2.6.0 + CUDA 13.0 — incompatible
|
|
347
|
+
Fix: pip install torch==2.7.0
|
|
348
|
+
|
|
349
|
+
ENVIRONMENT
|
|
350
|
+
⚠️ Missing: DATABASE_URL, REDIS_URL (declared in .env.example)
|
|
351
|
+
|
|
352
|
+
DEPENDENCIES
|
|
353
|
+
✅ node_modules present (1,847 packages)
|
|
354
|
+
✅ venv present
|
|
355
|
+
|
|
356
|
+
SERVICES
|
|
357
|
+
❌ PostgreSQL: unreachable (DATABASE_URL not set)
|
|
358
|
+
✅ Redis: reachable
|
|
359
|
+
|
|
360
|
+
BUILD TOOLS
|
|
361
|
+
✅ vite, tsc, pytest all found
|
|
362
|
+
|
|
363
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
364
|
+
2 confirmed breaks, 1 known risk, 1 warning
|
|
365
|
+
Fix the ❌ items before building.
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Auto-apply trivial fixes (e.g. updating a pin in requirements.txt) only if the user
|
|
369
|
+
says "fix it" or "apply fixes". Never auto-apply without being asked.
|
|
370
|
+
|
|
371
|
+
### Three-State Verdict Reference
|
|
372
|
+
|
|
373
|
+
| State | Meaning | Source |
|
|
374
|
+
|-------|---------|--------|
|
|
375
|
+
| ✅ COMPATIBLE | Versions are known-good together | Analyst matrix knowledge |
|
|
376
|
+
| ⚠️ KNOWN RISK | Combination has known issues or limited testing | Analyst matrix knowledge |
|
|
377
|
+
| ❌ CONFIRMED BREAK | Probe output OR known matrix confirms failure | Probe output (ground truth) or analyst |
|
|
378
|
+
| ❓ UNVERIFIED | Combination not in training data | Analyst — flag and move on |
|
|
379
|
+
|
|
380
|
+
Ground truth from probes always beats matrix knowledge. If `torch.cuda.is_available()`
|
|
381
|
+
returns False, that is a ❌ regardless of what the version matrix says.
|
|
382
|
+
|
|
383
|
+
## Sequential vs Parallel Dispatch
|
|
384
|
+
|
|
385
|
+
Not all agents need to be dispatched one-by-one. When agents are independent,
|
|
386
|
+
dispatch them simultaneously and wait for ALL to complete before responding.
|
|
387
|
+
|
|
388
|
+
> ⚠️ **NEVER use fire-and-forget or background dispatch.** Background agent
|
|
389
|
+
> completion triggers an empty user turn in Claude Code, causing Claude to respond
|
|
390
|
+
> to nothing. Every dispatched agent MUST be awaited before presenting results.
|
|
391
|
+
|
|
392
|
+
### Sequential Dispatch (one wave at a time)
|
|
235
393
|
Use when downstream agents DEPEND on this agent's output:
|
|
236
394
|
- hydra-scout exploring files that hydra-coder needs to edit
|
|
237
395
|
- hydra-analyst diagnosing a bug that hydra-coder needs to fix
|
|
238
396
|
- hydra-coder making changes that hydra-runner needs to test
|
|
239
397
|
|
|
240
|
-
###
|
|
241
|
-
Use when
|
|
242
|
-
- hydra-scribe writing docs
|
|
243
|
-
- hydra-
|
|
244
|
-
- hydra-scout exploring supplementary context
|
|
398
|
+
### Parallel Dispatch (all at once — wait for ALL before responding)
|
|
399
|
+
Use when agents are INDEPENDENT of each other:
|
|
400
|
+
- hydra-scribe writing docs + hydra-runner running final tests
|
|
401
|
+
- hydra-guard scanning + hydra-sentinel-scan sweeping (already enforced by Protocol 1)
|
|
402
|
+
- hydra-scout exploring supplementary context + any other independent agent
|
|
245
403
|
|
|
246
|
-
### Execution Flow
|
|
404
|
+
### Execution Flow
|
|
247
405
|
|
|
248
406
|
```
|
|
249
|
-
Wave 1 (
|
|
250
|
-
Wave 2 (
|
|
251
|
-
Wave 3 (
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
Wave 3 completes when: runner returns (don't wait for scribe)
|
|
256
|
-
Present results to user. Scribe's docs are appended when ready.
|
|
407
|
+
Wave 1 (sequential): scout explores → returns file paths
|
|
408
|
+
Wave 2 (sequential): coder implements fix → returns changed files
|
|
409
|
+
Wave 3 (parallel): dispatch runner AND scribe simultaneously
|
|
410
|
+
WAIT for BOTH to complete
|
|
411
|
+
Present single response to user (all outputs included)
|
|
257
412
|
```
|
|
258
413
|
|
|
259
414
|
### Rules
|
|
260
|
-
1. A wave completes when
|
|
261
|
-
2.
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
6. hydra-runner is non-blocking ONLY when it's the final validation step
|
|
267
|
-
7. If in doubt, make it blocking — correctness over speed
|
|
415
|
+
1. A wave completes when ALL agents in it return — no exceptions
|
|
416
|
+
2. NEVER present results while any dispatched agent is still running
|
|
417
|
+
3. NEVER dispatch hydra-coder without awaiting the result — code changes always need verification
|
|
418
|
+
4. NEVER dispatch hydra-analyst without awaiting the result — diagnoses feed into fixes
|
|
419
|
+
5. hydra-scribe runs IN PARALLEL with hydra-runner by default (not after)
|
|
420
|
+
6. If in doubt, wait for everything — correctness over speed
|
|
268
421
|
|
|
269
422
|
## Integrated Execution Model
|
|
270
423
|
|
|
@@ -284,7 +437,7 @@ User Prompt arrives
|
|
|
284
437
|
│ "Find files relevant to: [prompt]" │
|
|
285
438
|
│ │
|
|
286
439
|
├── IN PARALLEL: Classify task, plan waves, │
|
|
287
|
-
│ decide
|
|
440
|
+
│ decide sequential/parallel per agent │
|
|
288
441
|
│ │
|
|
289
442
|
▼ │
|
|
290
443
|
Scout returns │
|
|
@@ -299,10 +452,10 @@ Scout returns
|
|
|
299
452
|
(index context injected into each agent prompt)
|
|
300
453
|
│
|
|
301
454
|
┌────────────────────┴───────────────────────┐
|
|
302
|
-
│
|
|
303
|
-
│ (
|
|
455
|
+
│ SEQUENTIAL agents ◄── Opt 3: Parallel │ PARALLEL agents
|
|
456
|
+
│ (one wave at a time) │ (dispatched together)
|
|
304
457
|
▼ ▼
|
|
305
|
-
Results arrive
|
|
458
|
+
Results arrive All complete together
|
|
306
459
|
│ │
|
|
307
460
|
┌──────┴──────┐ │
|
|
308
461
|
│ │ │
|
|
@@ -332,7 +485,7 @@ Scout returns
|
|
|
332
485
|
→ Wait → Decision tree → Present to user │
|
|
333
486
|
│
|
|
334
487
|
Next wave OR present result ◄──────────────────────────►┘
|
|
335
|
-
(
|
|
488
|
+
(all parallel agents completed before this point)
|
|
336
489
|
```
|
|
337
490
|
|
|
338
491
|
### Optimization Interaction Rules
|
|
@@ -347,27 +500,27 @@ New prompt arrives → Check Session Index coverage
|
|
|
347
500
|
└── Not covered: Pre-dispatch scout → Update index → Wave 1 starts
|
|
348
501
|
```
|
|
349
502
|
|
|
350
|
-
#### Rule 2:
|
|
351
|
-
When an agent
|
|
352
|
-
- Dispatch it
|
|
503
|
+
#### Rule 2: Parallel + Auto-Accept = Zero-Overhead Path
|
|
504
|
+
When an agent runs in parallel with others AND its output qualifies for auto-accept:
|
|
505
|
+
- Dispatch it alongside other parallel agents
|
|
353
506
|
- When it returns: auto-accept without orchestrator review
|
|
354
|
-
- Append result to response
|
|
507
|
+
- Append result to response (all parallel agents finish before the response is sent)
|
|
355
508
|
- **Total orchestrator overhead: 0 seconds**
|
|
356
509
|
|
|
357
510
|
This is the highest-throughput path. Common cases:
|
|
358
|
-
-
|
|
359
|
-
-
|
|
360
|
-
-
|
|
511
|
+
- Parallel hydra-runner (final validation) reporting all-pass → zero overhead
|
|
512
|
+
- Parallel hydra-scribe (internal docstrings) → zero overhead
|
|
513
|
+
- Parallel hydra-scout (supplementary context) → zero overhead, index updated
|
|
361
514
|
|
|
362
515
|
#### Rule 3: Auto-Accepted Scout Output ALWAYS Updates Session Index
|
|
363
516
|
Every scout output that passes auto-accept is immediately folded into the Session Index.
|
|
364
517
|
No separate step. The act of auto-accepting IS the index update.
|
|
365
518
|
|
|
366
|
-
#### Rule 4:
|
|
367
|
-
|
|
519
|
+
#### Rule 4: Parallel Dispatch Does Not Override Verification Requirements
|
|
520
|
+
Parallel dispatch governs TIMING (run together), not VERIFICATION (do review).
|
|
368
521
|
If scribe writes user-facing docs (README, API docs), verification is still required —
|
|
369
|
-
it happens when
|
|
370
|
-
|
|
522
|
+
it happens when all parallel agents complete, before the response is sent.
|
|
523
|
+
Opus always waits for every dispatched agent before presenting results.
|
|
371
524
|
|
|
372
525
|
### Timing Profile: Optimized vs Baseline
|
|
373
526
|
|
|
@@ -388,11 +541,11 @@ OPTIMIZED (all 4 optimizations active):
|
|
|
388
541
|
t=3s Scout auto-accepted, index built [0s overhead]
|
|
389
542
|
t=3s Dispatch coder (index context injected), wait [5s]
|
|
390
543
|
t=8s Quick-scan coder (code → verify) [1s]
|
|
391
|
-
t=9s Dispatch runner (
|
|
392
|
-
Scribe
|
|
393
|
-
t=12s Runner: all-pass → auto-accept
|
|
394
|
-
|
|
395
|
-
|
|
544
|
+
t=9s Dispatch runner (parallel) + scribe (parallel) [3s — both run at once]
|
|
545
|
+
Scribe and runner run simultaneously, Opus waits for both
|
|
546
|
+
t=12s Runner: all-pass → auto-accept [0s overhead]
|
|
547
|
+
Scribe: internal docs → auto-accept [0s overhead]
|
|
548
|
+
t=12s Present result to user (single response, all outputs included)
|
|
396
549
|
Total wall-clock: ~12 seconds (33% faster, zero quality loss)
|
|
397
550
|
```
|
|
398
551
|
|
|
@@ -964,15 +1117,16 @@ If the user types any of these exact phrases, respond with the corresponding act
|
|
|
964
1117
|
|
|
965
1118
|
| Command | Action |
|
|
966
1119
|
|---------|--------|
|
|
967
|
-
| `hydra status` | List all
|
|
1120
|
+
| `hydra status` | List all 10 heads by name, model, and whether they appear to be installed (check `agents/` dir) |
|
|
968
1121
|
| `hydra config` | Show current configuration settings (mode, dispatch_log, auto_guard) and their source (default/project/user) |
|
|
969
1122
|
| `hydra help` | Show available commands and a brief one-line description of each head |
|
|
970
1123
|
| `hydra quiet` | Suppress dispatch logs for the rest of the session (equivalent to stealth mode) |
|
|
971
1124
|
| `hydra verbose` | Enable verbose dispatch logs with per-agent detail for the rest of the session |
|
|
972
1125
|
| `hydra reset` | Clear session index, treat next turn as Turn 1 (rebuild from fresh scout) |
|
|
973
1126
|
| `hydra map` | Show codebase map summary, or query a specific file's blast radius |
|
|
1127
|
+
| `hydra preflight` | Run two-phase environment and compatibility check before starting a new project build |
|
|
974
1128
|
|
|
975
|
-
## The
|
|
1129
|
+
## The Ten Heads
|
|
976
1130
|
|
|
977
1131
|
| Head | Model | Role | Tools |
|
|
978
1132
|
|------|-------|------|-------|
|
|
@@ -982,6 +1136,7 @@ If the user types any of these exact phrases, respond with the corresponding act
|
|
|
982
1136
|
| `hydra-guard` | 🟢 Haiku 4.5 | Security/quality gate after code changes | Read, Grep, Glob, Bash |
|
|
983
1137
|
| `hydra-git` | 🟢 Haiku 4.5 | Git operations: commit, branch, diff, log | Read, Bash, Glob, Grep |
|
|
984
1138
|
| `hydra-sentinel-scan` | 🟢 Haiku 4.5 | Fast integration sweep after code changes | Read, Grep, Glob |
|
|
1139
|
+
| `hydra-preflight` | 🟢 Haiku 4.5 | Environment detection, version probing, dep inventory | Read, Bash, Glob |
|
|
985
1140
|
| `hydra-coder` | 🔵 Sonnet 4.6 | Code writing, implementation, refactoring | Read, Write, Edit, Bash, Glob, Grep |
|
|
986
1141
|
| `hydra-analyst` | 🔵 Sonnet 4.6 | Code review, debugging, architecture analysis | Read, Grep, Glob, Bash |
|
|
987
1142
|
| `hydra-sentinel` | 🔵 Sonnet 4.6 | Deep integration analysis (when scan flags issues) | Read, Grep, Glob, Write |
|
|
@@ -991,6 +1146,7 @@ If the user types any of these exact phrases, respond with the corresponding act
|
|
|
991
1146
|
Track these mentally to calibrate:
|
|
992
1147
|
|
|
993
1148
|
- **Delegation rate**: What % of tasks go to heads? Target: 60–70%.
|
|
1149
|
+
- **Preflight rate**: Are you running `/hydra:preflight` on new projects? Target: 100% of new project sessions.
|
|
994
1150
|
- **Rejection rate**: How often does a draft need Opus intervention? Target: <15%.
|
|
995
1151
|
- **User complaints**: Zero. If the user notices quality issues, tune the classification.
|
|
996
1152
|
|
|
@@ -95,3 +95,51 @@ You may be running in parallel with other Hydra agents. Your output must be:
|
|
|
95
95
|
even if you notice adjacent issues. Flag them for the orchestrator instead.
|
|
96
96
|
- **Actionable** — end with a clear summary of what you did or found, formatted so
|
|
97
97
|
the next wave's agents can use it directly as context.
|
|
98
|
+
|
|
99
|
+
## MANDATORY: Sentinel Trigger Footer
|
|
100
|
+
|
|
101
|
+
When your analysis results in code changes or code change recommendations,
|
|
102
|
+
you MUST end your response with this exact block:
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
⚠️ HYDRA_SENTINEL_REQUIRED
|
|
106
|
+
Files changed: [list every file modified]
|
|
107
|
+
Exports modified: [list any renamed/added/removed exports]
|
|
108
|
+
Signatures changed: [list any function signature changes]
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
If your task was analysis-only with no code changes, end with:
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
✅ HYDRA_NO_CODE_CHANGES
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Output Format — Compressed (MANDATORY)
|
|
118
|
+
|
|
119
|
+
You report findings to the orchestrator (Opus), NOT to the user. Opus reads your output and translates it for the user. Output must be DENSE and STRUCTURED, not prose.
|
|
120
|
+
|
|
121
|
+
### Rules
|
|
122
|
+
|
|
123
|
+
1. NO prose preambles ("I have explored...", "After analyzing...", "Looking at...")
|
|
124
|
+
2. NO conversational closings ("Let me know if...", "Hope this helps!")
|
|
125
|
+
3. NO restating the task
|
|
126
|
+
4. Lead with findings. Format as tables, lists, or key:value pairs.
|
|
127
|
+
5. Use abbreviations: db, auth, fn, req/res, config, env, ctx, impl
|
|
128
|
+
6. Keep code symbols, function names, file paths, and error messages EXACT
|
|
129
|
+
7. Use arrows (→) for causality and relationships
|
|
130
|
+
8. One-line findings preferred. Multi-line only when structure requires it.
|
|
131
|
+
|
|
132
|
+
### Role-Specific Format
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
- severity: P0|P1|P2|P3
|
|
136
|
+
- file:line_range
|
|
137
|
+
- root_cause: technical_reason (max 15 words)
|
|
138
|
+
- fix: action (max 15 words)
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
WRONG (verbose):
|
|
142
|
+
> After analyzing the codebase, I noticed the token check uses `<` which causes...
|
|
143
|
+
|
|
144
|
+
RIGHT (compressed):
|
|
145
|
+
> P1 src/services/auth.ts:12 — token expiry uses `<` not `<=`. fix: flip operator.
|
|
@@ -77,3 +77,47 @@ You may be running in parallel with other Hydra agents. Your output must be:
|
|
|
77
77
|
even if you notice adjacent issues. Flag them for the orchestrator instead.
|
|
78
78
|
- **Actionable** — end with a clear summary of what you did or found, formatted so
|
|
79
79
|
the next wave's agents can use it directly as context.
|
|
80
|
+
|
|
81
|
+
## MANDATORY: Sentinel Trigger Footer
|
|
82
|
+
|
|
83
|
+
You MUST end EVERY response that involves code changes with this exact block:
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
⚠️ HYDRA_SENTINEL_REQUIRED
|
|
87
|
+
Files changed: [list every file you modified, one per line]
|
|
88
|
+
Exports modified: [list any functions/classes/types you renamed, added, or removed]
|
|
89
|
+
Signatures changed: [list any function signature changes — parameter additions/removals/type changes]
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
This is NOT optional. The orchestrator uses this block to trigger the sentinel
|
|
93
|
+
integration scan. If you omit it, integration bugs will reach the user unchecked.
|
|
94
|
+
|
|
95
|
+
If your task did NOT involve any code changes (e.g., you only read files or
|
|
96
|
+
analyzed code), end with:
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
✅ HYDRA_NO_CODE_CHANGES
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Output Format — Compressed (MANDATORY)
|
|
103
|
+
|
|
104
|
+
You report findings to the orchestrator (Opus), NOT to the user. Opus reads your output and translates it for the user. Output must be DENSE and STRUCTURED, not prose.
|
|
105
|
+
|
|
106
|
+
### Rules
|
|
107
|
+
|
|
108
|
+
1. NO prose preambles ("I have completed...", "After implementing...")
|
|
109
|
+
2. NO conversational closings
|
|
110
|
+
3. NO restating the task
|
|
111
|
+
4. Lead with findings. Format as tables, lists, or key:value pairs.
|
|
112
|
+
5. Use abbreviations: db, auth, fn, req/res, config, env, ctx, impl
|
|
113
|
+
6. Keep code symbols, function names, file paths, and error messages EXACT
|
|
114
|
+
7. One-line findings preferred. Multi-line only when structure requires it.
|
|
115
|
+
|
|
116
|
+
### Role-Specific Format
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
- changed: file:line_range (one per line)
|
|
120
|
+
- summary: what_changed (1 line per file, max 10 words)
|
|
121
|
+
- new_files: path (if any)
|
|
122
|
+
- removed: file:reason (if any)
|
|
123
|
+
```
|
|
@@ -107,3 +107,24 @@ You may be running in parallel with other Hydra agents. Your output must be:
|
|
|
107
107
|
- **Clearly structured** — use headers so the orchestrator can extract relevant parts
|
|
108
108
|
- **Focused on YOUR task only** — git operations only
|
|
109
109
|
- **Actionable** — end with clear next steps or confirmation of what was done
|
|
110
|
+
|
|
111
|
+
## Output Format — Compressed (MANDATORY)
|
|
112
|
+
|
|
113
|
+
You report to the orchestrator (Opus), NOT to the user. Opus translates for the user. Output must be DENSE and STRUCTURED, not prose.
|
|
114
|
+
|
|
115
|
+
### Rules
|
|
116
|
+
|
|
117
|
+
1. NO prose preambles or conversational closings
|
|
118
|
+
2. NO restating the task
|
|
119
|
+
3. Lead with findings. Format as key:value pairs.
|
|
120
|
+
4. Keep hashes, branch names, file paths EXACT — never abbreviate
|
|
121
|
+
5. One-line findings preferred
|
|
122
|
+
|
|
123
|
+
### Role-Specific Format
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
- action: commit|branch|diff|push|merge|rebase|...
|
|
127
|
+
- result: success|failure
|
|
128
|
+
- detail: short_summary
|
|
129
|
+
- hash/branch_name (if relevant)
|
|
130
|
+
```
|
|
@@ -109,3 +109,27 @@ You may be running in parallel with other Hydra agents. Your output must be:
|
|
|
109
109
|
- **Clearly structured** — use headers so the orchestrator can extract and append findings
|
|
110
110
|
- **Focused on YOUR task only** — security scan of the specified changed files
|
|
111
111
|
- **Actionable** — every finding includes file:line and a brief fix direction
|
|
112
|
+
|
|
113
|
+
## Output Format — Compressed (MANDATORY)
|
|
114
|
+
|
|
115
|
+
You report to the orchestrator (Opus), NOT to the user. Opus translates for the user. Output must be DENSE and STRUCTURED, not prose.
|
|
116
|
+
|
|
117
|
+
### Rules
|
|
118
|
+
|
|
119
|
+
1. NO prose preambles or conversational closings
|
|
120
|
+
2. Lead with result. One line per finding.
|
|
121
|
+
3. Keep code symbols, file paths, and error strings EXACT
|
|
122
|
+
|
|
123
|
+
### Role-Specific Format
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
- result: clean|issues_found
|
|
127
|
+
- findings: severity:file:line:short_description (one per line)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Example:
|
|
131
|
+
```
|
|
132
|
+
result: issues_found
|
|
133
|
+
CRITICAL src/api/login.ts:34 hardcoded API key — move to env
|
|
134
|
+
WARNING src/utils/sql.ts:12 string concat in query — parameterize
|
|
135
|
+
```
|