@aladac/hu 0.1.0-a1
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/.tool-versions +1 -0
- package/CLAUDE.md +122 -0
- package/HOOKS-DATA-INTEGRATION.md +457 -0
- package/SAMPLE.md +378 -0
- package/TODO.md +25 -0
- package/biome.json +51 -0
- package/commands/bootstrap.md +13 -0
- package/commands/c.md +1 -0
- package/commands/check-name.md +62 -0
- package/commands/disk.md +141 -0
- package/commands/docs/archive.md +27 -0
- package/commands/docs/check-internal.md +53 -0
- package/commands/docs/cleanup.md +65 -0
- package/commands/docs/consolidate.md +72 -0
- package/commands/docs/get.md +101 -0
- package/commands/docs/list.md +61 -0
- package/commands/docs/sync.md +64 -0
- package/commands/docs/update.md +49 -0
- package/commands/plans/clear.md +23 -0
- package/commands/plans/create.md +71 -0
- package/commands/plans/list.md +21 -0
- package/commands/plans/sync.md +38 -0
- package/commands/reinstall.md +20 -0
- package/commands/replicate.md +303 -0
- package/commands/warp.md +0 -0
- package/doc/README.md +35 -0
- package/doc/claude-code/capabilities.md +202 -0
- package/doc/claude-code/directory-structure.md +246 -0
- package/doc/claude-code/hooks.md +348 -0
- package/doc/claude-code/overview.md +109 -0
- package/doc/claude-code/plugins.md +273 -0
- package/doc/claude-code/sdk-protocols.md +202 -0
- package/document-manifest.toml +29 -0
- package/justfile +39 -0
- package/package.json +33 -0
- package/plans/compiled-watching-feather.md +217 -0
- package/plans/crispy-crafting-pnueli.md +103 -0
- package/plans/greedy-booping-coral.md +146 -0
- package/plans/imperative-sleeping-flamingo.md +192 -0
- package/plans/jaunty-sprouting-marble.md +171 -0
- package/plans/jiggly-discovering-lake.md +68 -0
- package/plans/magical-nibbling-spark.md +144 -0
- package/plans/mellow-kindling-acorn.md +110 -0
- package/plans/recursive-questing-engelbart.md +65 -0
- package/plans/serialized-roaming-kernighan.md +227 -0
- package/plans/structured-wondering-wirth.md +230 -0
- package/plans/vectorized-dreaming-iverson.md +191 -0
- package/plans/velvety-enchanting-ocean.md +92 -0
- package/plans/wiggly-sparking-pixel.md +48 -0
- package/plans/zippy-shimmying-fox.md +188 -0
- package/plugins/installed_plugins.json +4 -0
- package/sample-hooks.json +298 -0
- package/settings.json +24 -0
- package/settings.local.json +7 -0
- package/src/commands/bump.ts +130 -0
- package/src/commands/disk.ts +419 -0
- package/src/commands/docs.ts +729 -0
- package/src/commands/plans.ts +259 -0
- package/src/commands/utils.ts +299 -0
- package/src/index.ts +26 -0
- package/src/lib/colors.ts +87 -0
- package/src/lib/exec.ts +25 -0
- package/src/lib/fs.ts +119 -0
- package/src/lib/html.ts +205 -0
- package/src/lib/spinner.ts +42 -0
- package/src/types/index.ts +61 -0
- package/tests/lib/colors.test.ts +69 -0
- package/tests/lib/fs.test.ts +65 -0
- package/tsconfig.json +20 -0
- package/vitest.config.ts +15 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Plan: Remove Multi-Model/Ensemble Feature from Extraction
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
Remove the multi-model ensemble feature from the extraction system. Testing showed single `minicpm-v:8b` outperforms all ensemble combinations. The `--model` flag remains for selecting which single model to use.
|
|
5
|
+
|
|
6
|
+
## Files to Modify
|
|
7
|
+
|
|
8
|
+
### 1. `src/prompts/extract/extractor.py`
|
|
9
|
+
|
|
10
|
+
**Remove:**
|
|
11
|
+
- `MODEL_PRESETS` dict (lines 20-26)
|
|
12
|
+
- `SYNTHESIS_PROMPT` constant (lines 28-48)
|
|
13
|
+
- `synthesis_model` parameter from `Extractor.__init__`
|
|
14
|
+
- `models`, `num_models`, `preset` parameters from `Extractor.__init__`
|
|
15
|
+
- `self._models` instance variable logic for multi-model
|
|
16
|
+
- `_synthesize()` method (lines 290-328)
|
|
17
|
+
- Multi-model loop/synthesis branches in extraction methods
|
|
18
|
+
|
|
19
|
+
**Keep:**
|
|
20
|
+
- `ModelResult` dataclass (used for error tracking even with single model)
|
|
21
|
+
- `model_results` field in `ExtractionResult`/`SceneResult` (simplify to single result)
|
|
22
|
+
- `_get_models_to_use()` - simplify to return single model
|
|
23
|
+
- Single model extraction logic
|
|
24
|
+
|
|
25
|
+
**Simplify `Extractor.__init__`:**
|
|
26
|
+
```python
|
|
27
|
+
def __init__(
|
|
28
|
+
self,
|
|
29
|
+
host: Optional[str] = None,
|
|
30
|
+
backend: Optional[str] = None,
|
|
31
|
+
model: Optional[str] = None, # Single model selection
|
|
32
|
+
nsfw: bool = True,
|
|
33
|
+
):
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Simplify extraction methods pattern:**
|
|
37
|
+
```python
|
|
38
|
+
def extract_character(self, image_path: Path) -> ExtractionResult:
|
|
39
|
+
model = self._get_model_to_use() # Returns single model
|
|
40
|
+
try:
|
|
41
|
+
content = self.client.generate(model=model, prompt=prompt, image_path=image_path)
|
|
42
|
+
return ExtractionResult(content=content, model=model, ...)
|
|
43
|
+
except ClientError as e:
|
|
44
|
+
return ExtractionResult(content="", model=model, error=str(e), ...)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 2. `src/prompts/extract/cli.py`
|
|
48
|
+
|
|
49
|
+
**Remove:**
|
|
50
|
+
- `parse_models_option()` function (lines 29-44)
|
|
51
|
+
- `--models, -M` option from all commands
|
|
52
|
+
- `models_list`, `num_models`, `preset` variables throughout
|
|
53
|
+
- Multi-model display logic (`if result.model_results and len(...) > 1`)
|
|
54
|
+
- `extract presets` command (lines 851-870)
|
|
55
|
+
- Import of `MODEL_PRESETS`
|
|
56
|
+
|
|
57
|
+
**Keep:**
|
|
58
|
+
- `--model, -m` option for single model selection
|
|
59
|
+
- All other CLI functionality
|
|
60
|
+
|
|
61
|
+
**Affected commands:**
|
|
62
|
+
- `extract character` - remove `--models` option
|
|
63
|
+
- `extract style` - remove `--models` option
|
|
64
|
+
- `extract scene` - remove `--models` option
|
|
65
|
+
- `extract all` - remove `--models` option
|
|
66
|
+
|
|
67
|
+
### 3. `scripts/multi_extract.py`
|
|
68
|
+
|
|
69
|
+
**Delete entire file** - standalone multi-model script no longer needed.
|
|
70
|
+
|
|
71
|
+
## Verification
|
|
72
|
+
|
|
73
|
+
After changes:
|
|
74
|
+
```bash
|
|
75
|
+
# Should work
|
|
76
|
+
uv run prompts extract character image.png
|
|
77
|
+
uv run prompts extract character image.png --model minicpm-v:8b
|
|
78
|
+
uv run prompts extract style image.png
|
|
79
|
+
uv run prompts extract scene comic.png
|
|
80
|
+
|
|
81
|
+
# Should error (removed)
|
|
82
|
+
uv run prompts extract character image.png --models 2
|
|
83
|
+
uv run prompts extract character image.png --models thorough
|
|
84
|
+
uv run prompts extract presets
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Order of Changes
|
|
88
|
+
|
|
89
|
+
1. Remove `scripts/multi_extract.py`
|
|
90
|
+
2. Simplify `extractor.py` - remove synthesis, multi-model logic
|
|
91
|
+
3. Simplify `cli.py` - remove `--models` options and `presets` command
|
|
92
|
+
4. Test with `uv run prompts extract character <image> --model minicpm-v:8b`
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Plan: CMS Cache Modernization
|
|
2
|
+
|
|
3
|
+
## Deliverables
|
|
4
|
+
|
|
5
|
+
Created two files in `/Users/chi/Projects/jam/`:
|
|
6
|
+
|
|
7
|
+
### DRAFT.md - Analysis Document
|
|
8
|
+
Documents all caching issues found in CMS, Fuse-Hotel, and Neon:
|
|
9
|
+
- 3 Critical issues (missing TTL, blocking KEYS, silent lock failures)
|
|
10
|
+
- 4 High priority issues (TTL mismatch, scattered config, stampede risk, no invalidation)
|
|
11
|
+
- 5 Medium priority issues (naming, headers, cascade, sync blocking, mixed systems)
|
|
12
|
+
- 4 Architecture recommendations
|
|
13
|
+
|
|
14
|
+
### PLAN.md - Implementation Plan
|
|
15
|
+
6-phase migration strategy for humans:
|
|
16
|
+
|
|
17
|
+
**Phase 1: Foundation**
|
|
18
|
+
- Create `Cache::Config` with centralized TTLs
|
|
19
|
+
- Create `Cache::V2::Base` with proper error handling
|
|
20
|
+
- Add feature flags for rollout control
|
|
21
|
+
|
|
22
|
+
**Phase 2: Dual-Write**
|
|
23
|
+
- Write to both old and new cache
|
|
24
|
+
- No changes to read path
|
|
25
|
+
- Populate new cache in production
|
|
26
|
+
|
|
27
|
+
**Phase 3: Verification**
|
|
28
|
+
- Compare old vs new cache values on reads
|
|
29
|
+
- Log/alert on mismatches
|
|
30
|
+
- Fix issues until 0 mismatches for 48h
|
|
31
|
+
|
|
32
|
+
**Phase 4: Shadow Read**
|
|
33
|
+
- Read from new cache, fallback to old
|
|
34
|
+
- Monitor hit rates and latency
|
|
35
|
+
- Run for 1 week minimum
|
|
36
|
+
|
|
37
|
+
**Phase 5: Migration**
|
|
38
|
+
- Gradual rollout: 10% → 25% → 50% → 100%
|
|
39
|
+
- Stop legacy writes
|
|
40
|
+
- Remove legacy code after 2 weeks stable
|
|
41
|
+
|
|
42
|
+
**Phase 6: Enhancements**
|
|
43
|
+
- Cache warming
|
|
44
|
+
- Cache headers for frontend
|
|
45
|
+
- Cascade invalidation
|
|
46
|
+
- Observability dashboard
|
|
47
|
+
|
|
48
|
+
Includes rollback procedures and success criteria for each phase.
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# Plan: Comics Mode for Image Extraction
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Add `--comics` flag to extract command that produces structured comic page analysis:
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
## Scene Title
|
|
9
|
+
|
|
10
|
+
### Panel 1
|
|
11
|
+
Person A and Person B do something:
|
|
12
|
+
- [Person A] You are so cool!
|
|
13
|
+
- [Person B] Thank you, but you suck big-time...
|
|
14
|
+
|
|
15
|
+
### Panel 2
|
|
16
|
+
Changed location [...]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Existing Building Blocks
|
|
20
|
+
|
|
21
|
+
| Component | File | Function |
|
|
22
|
+
|-----------|------|----------|
|
|
23
|
+
| Panel detection | `extractor.py` | `detect_panels()` |
|
|
24
|
+
| Scene extraction | `extractor.py` | `extract_scene()` |
|
|
25
|
+
| Character extraction | `extractor.py` | `extract_all_characters()` |
|
|
26
|
+
| Dialogue OCR | `extractor.py` | `extract_dialogue()` |
|
|
27
|
+
| Prompts | `prompts.py` | `SCENE_PROMPT_*`, `DIALOGUE_PROMPT` |
|
|
28
|
+
|
|
29
|
+
## Implementation
|
|
30
|
+
|
|
31
|
+
### 1. New Prompt in `prompts.py`
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
COMICS_PROMPT_NSFW = """Analyze this comic page panel by panel.
|
|
35
|
+
|
|
36
|
+
For each panel, provide:
|
|
37
|
+
1. PANEL NUMBER
|
|
38
|
+
2. CHARACTERS visible (brief description if new)
|
|
39
|
+
3. ACTION - what's happening
|
|
40
|
+
4. DIALOGUE - exact text with speaker attribution [Speaker Name]
|
|
41
|
+
5. SFX - sound effects if any
|
|
42
|
+
|
|
43
|
+
Format:
|
|
44
|
+
### Panel 1
|
|
45
|
+
**Characters:** Character A (blonde woman), Character B (dark-haired man)
|
|
46
|
+
**Action:** Character A confronts Character B in a bedroom
|
|
47
|
+
**Dialogue:**
|
|
48
|
+
- [Character A] "You're late again!"
|
|
49
|
+
- [Character B] "I can explain..."
|
|
50
|
+
**SFX:** *SLAM*
|
|
51
|
+
|
|
52
|
+
### Panel 2
|
|
53
|
+
...
|
|
54
|
+
|
|
55
|
+
Be thorough with dialogue OCR. Include all visible text."""
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 2. New Method in `extractor.py`
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
@dataclass
|
|
62
|
+
class ComicsResult:
|
|
63
|
+
"""Result from comics extraction."""
|
|
64
|
+
image_path: Path
|
|
65
|
+
panel_count: int
|
|
66
|
+
layout: str
|
|
67
|
+
panels: list[dict] # [{panel_num, characters, action, dialogue, sfx}]
|
|
68
|
+
raw_response: str
|
|
69
|
+
|
|
70
|
+
def to_markdown(self) -> str:
|
|
71
|
+
"""Format as readable comic script."""
|
|
72
|
+
lines = [f"## {self.image_path.stem}\n"]
|
|
73
|
+
for panel in self.panels:
|
|
74
|
+
lines.append(f"### Panel {panel['panel_num']}\n")
|
|
75
|
+
lines.append(f"{panel['action']}\n")
|
|
76
|
+
for line in panel['dialogue']:
|
|
77
|
+
lines.append(f"- {line}")
|
|
78
|
+
if panel.get('sfx'):
|
|
79
|
+
lines.append(f"*{panel['sfx']}*\n")
|
|
80
|
+
return "\n".join(lines)
|
|
81
|
+
|
|
82
|
+
def extract_comics(self, image_path: Path) -> ComicsResult:
|
|
83
|
+
"""Extract full comic page analysis."""
|
|
84
|
+
prompt = get_comics_prompt(self.nsfw)
|
|
85
|
+
response = self.client.generate(self.model, prompt, image_path)
|
|
86
|
+
panels = self._parse_comics_response(response)
|
|
87
|
+
return ComicsResult(
|
|
88
|
+
image_path=image_path,
|
|
89
|
+
panel_count=len(panels),
|
|
90
|
+
layout="",
|
|
91
|
+
panels=panels,
|
|
92
|
+
raw_response=response
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
def _parse_comics_response(self, response: str) -> list[dict]:
|
|
96
|
+
"""Parse structured panel response into list of panel dicts."""
|
|
97
|
+
# Parse ### Panel N sections
|
|
98
|
+
# Extract Characters, Action, Dialogue, SFX from each
|
|
99
|
+
...
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 3. New CLI Option in `cli.py`
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
@extract.command("character")
|
|
106
|
+
@click.option("--comics", is_flag=True, help="Comics mode: panel-by-panel with dialogue")
|
|
107
|
+
def extract_character(path, comics, ...):
|
|
108
|
+
if comics:
|
|
109
|
+
return _extract_comics(path, output, ...)
|
|
110
|
+
# ... existing logic
|
|
111
|
+
|
|
112
|
+
def _extract_comics(path, output, model, host, backend, nsfw):
|
|
113
|
+
"""Extract comic page with panels and dialogue."""
|
|
114
|
+
extractor = Extractor(host=host, backend=backend, model=model, nsfw=nsfw)
|
|
115
|
+
result = extractor.extract_comics(path)
|
|
116
|
+
|
|
117
|
+
# Save as comics/comics_{stem}.md
|
|
118
|
+
output_path = output / "comics" / f"comics_{path.stem}.md"
|
|
119
|
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
120
|
+
output_path.write_text(result.to_markdown())
|
|
121
|
+
click.echo(f"Saved to: {output_path}")
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Files to Modify
|
|
125
|
+
|
|
126
|
+
1. **`src/prompts/extract/prompts.py`**
|
|
127
|
+
- Add `COMICS_PROMPT_NSFW` and `COMICS_PROMPT_SFW`
|
|
128
|
+
- Add `get_comics_prompt(nsfw: bool)` function
|
|
129
|
+
|
|
130
|
+
2. **`src/prompts/extract/extractor.py`**
|
|
131
|
+
- Add `ComicsResult` dataclass
|
|
132
|
+
- Add `extract_comics()` method
|
|
133
|
+
- Add `_parse_comics_response()` helper
|
|
134
|
+
- Add `save_comics_result()` function
|
|
135
|
+
|
|
136
|
+
3. **`src/prompts/extract/cli.py`**
|
|
137
|
+
- Add `--comics` flag to `extract_character` command
|
|
138
|
+
- Add `_extract_comics()` and `_batch_extract_comics()` handlers
|
|
139
|
+
|
|
140
|
+
## Output Structure
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
output/
|
|
144
|
+
└── comics/
|
|
145
|
+
├── comics_page_001.md
|
|
146
|
+
├── comics_page_002.md
|
|
147
|
+
└── _index.json # optional metadata
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Example Output
|
|
151
|
+
|
|
152
|
+
```markdown
|
|
153
|
+
## page_001
|
|
154
|
+
|
|
155
|
+
### Panel 1
|
|
156
|
+
|
|
157
|
+
Sarah enters the bedroom to find Jake waiting:
|
|
158
|
+
|
|
159
|
+
- [Sarah] "You're finally here..."
|
|
160
|
+
- [Jake] "I've been waiting all day for you."
|
|
161
|
+
|
|
162
|
+
### Panel 2
|
|
163
|
+
|
|
164
|
+
Close-up as they embrace:
|
|
165
|
+
|
|
166
|
+
- [Sarah] "I missed you so much!"
|
|
167
|
+
|
|
168
|
+
*SFX: rustle*
|
|
169
|
+
|
|
170
|
+
### Panel 3
|
|
171
|
+
|
|
172
|
+
Scene shifts to the bed:
|
|
173
|
+
|
|
174
|
+
- [Jake] "Let me show you how much I missed you..."
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Verification
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Test single comic page
|
|
181
|
+
uv run prompts extract character comic.png --comics -o output/
|
|
182
|
+
|
|
183
|
+
# Test batch
|
|
184
|
+
uv run prompts extract character comics_dir/ --comics -o output/
|
|
185
|
+
|
|
186
|
+
# Check output
|
|
187
|
+
cat output/comics/comics_comic.md
|
|
188
|
+
```
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PreToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Bash",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "honbu hooks pre-tool-use bash",
|
|
10
|
+
"timeout": 10
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"matcher": "Edit|Write",
|
|
16
|
+
"hooks": [
|
|
17
|
+
{
|
|
18
|
+
"type": "command",
|
|
19
|
+
"command": "honbu hooks pre-tool-use file-modify",
|
|
20
|
+
"timeout": 10
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"matcher": "Read",
|
|
26
|
+
"hooks": [
|
|
27
|
+
{
|
|
28
|
+
"type": "command",
|
|
29
|
+
"command": "honbu hooks pre-tool-use file-read",
|
|
30
|
+
"timeout": 5
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"matcher": "Glob|Grep",
|
|
36
|
+
"hooks": [
|
|
37
|
+
{
|
|
38
|
+
"type": "command",
|
|
39
|
+
"command": "honbu hooks pre-tool-use search",
|
|
40
|
+
"timeout": 5
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"matcher": "Task",
|
|
46
|
+
"hooks": [
|
|
47
|
+
{
|
|
48
|
+
"type": "command",
|
|
49
|
+
"command": "honbu hooks pre-tool-use subagent",
|
|
50
|
+
"timeout": 10
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"matcher": "WebFetch|WebSearch",
|
|
56
|
+
"hooks": [
|
|
57
|
+
{
|
|
58
|
+
"type": "command",
|
|
59
|
+
"command": "honbu hooks pre-tool-use web",
|
|
60
|
+
"timeout": 5
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"matcher": "Notebook.*",
|
|
66
|
+
"hooks": [
|
|
67
|
+
{
|
|
68
|
+
"type": "command",
|
|
69
|
+
"command": "honbu hooks pre-tool-use notebook",
|
|
70
|
+
"timeout": 10
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"PostToolUse": [
|
|
76
|
+
{
|
|
77
|
+
"matcher": "Bash",
|
|
78
|
+
"hooks": [
|
|
79
|
+
{
|
|
80
|
+
"type": "command",
|
|
81
|
+
"command": "honbu hooks post-tool-use bash",
|
|
82
|
+
"timeout": 30
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"matcher": "Edit|Write",
|
|
88
|
+
"hooks": [
|
|
89
|
+
{
|
|
90
|
+
"type": "command",
|
|
91
|
+
"command": "honbu hooks post-tool-use file-modify",
|
|
92
|
+
"timeout": 30
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"matcher": "Task",
|
|
98
|
+
"hooks": [
|
|
99
|
+
{
|
|
100
|
+
"type": "command",
|
|
101
|
+
"command": "honbu hooks post-tool-use subagent",
|
|
102
|
+
"timeout": 10
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"PermissionRequest": [
|
|
108
|
+
{
|
|
109
|
+
"matcher": "Bash",
|
|
110
|
+
"hooks": [
|
|
111
|
+
{
|
|
112
|
+
"type": "command",
|
|
113
|
+
"command": "honbu hooks permission-request bash",
|
|
114
|
+
"timeout": 5
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"matcher": "Edit|Write",
|
|
120
|
+
"hooks": [
|
|
121
|
+
{
|
|
122
|
+
"type": "command",
|
|
123
|
+
"command": "honbu hooks permission-request file-modify",
|
|
124
|
+
"timeout": 5
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"UserPromptSubmit": [
|
|
130
|
+
{
|
|
131
|
+
"hooks": [
|
|
132
|
+
{
|
|
133
|
+
"type": "command",
|
|
134
|
+
"command": "honbu hooks user-prompt-submit",
|
|
135
|
+
"timeout": 10
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"Notification": [
|
|
141
|
+
{
|
|
142
|
+
"matcher": "permission_prompt",
|
|
143
|
+
"hooks": [
|
|
144
|
+
{
|
|
145
|
+
"type": "command",
|
|
146
|
+
"command": "honbu hooks notification permission",
|
|
147
|
+
"timeout": 5
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"matcher": "idle_prompt",
|
|
153
|
+
"hooks": [
|
|
154
|
+
{
|
|
155
|
+
"type": "command",
|
|
156
|
+
"command": "honbu hooks notification idle",
|
|
157
|
+
"timeout": 5
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"matcher": "auth_success",
|
|
163
|
+
"hooks": [
|
|
164
|
+
{
|
|
165
|
+
"type": "command",
|
|
166
|
+
"command": "honbu hooks notification auth",
|
|
167
|
+
"timeout": 5
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"matcher": "elicitation_dialog",
|
|
173
|
+
"hooks": [
|
|
174
|
+
{
|
|
175
|
+
"type": "command",
|
|
176
|
+
"command": "honbu hooks notification elicitation",
|
|
177
|
+
"timeout": 5
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"Stop": [
|
|
183
|
+
{
|
|
184
|
+
"hooks": [
|
|
185
|
+
{
|
|
186
|
+
"type": "command",
|
|
187
|
+
"command": "honbu hooks stop",
|
|
188
|
+
"timeout": 10
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"hooks": [
|
|
194
|
+
{
|
|
195
|
+
"type": "prompt",
|
|
196
|
+
"prompt": "Evaluate if Claude should stop. Context: $ARGUMENTS. Return {\"ok\": true} to stop or {\"ok\": false, \"reason\": \"explanation\"} to continue.",
|
|
197
|
+
"timeout": 30
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"SubagentStop": [
|
|
203
|
+
{
|
|
204
|
+
"hooks": [
|
|
205
|
+
{
|
|
206
|
+
"type": "command",
|
|
207
|
+
"command": "honbu hooks subagent-stop",
|
|
208
|
+
"timeout": 10
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"hooks": [
|
|
214
|
+
{
|
|
215
|
+
"type": "prompt",
|
|
216
|
+
"prompt": "Evaluate if this subagent completed its task. Input: $ARGUMENTS. Return {\"ok\": true} to allow stopping or {\"ok\": false, \"reason\": \"explanation\"} to continue.",
|
|
217
|
+
"timeout": 30
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"PreCompact": [
|
|
223
|
+
{
|
|
224
|
+
"matcher": "manual",
|
|
225
|
+
"hooks": [
|
|
226
|
+
{
|
|
227
|
+
"type": "command",
|
|
228
|
+
"command": "honbu hooks pre-compact manual",
|
|
229
|
+
"timeout": 10
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"matcher": "auto",
|
|
235
|
+
"hooks": [
|
|
236
|
+
{
|
|
237
|
+
"type": "command",
|
|
238
|
+
"command": "honbu hooks pre-compact auto",
|
|
239
|
+
"timeout": 10
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"SessionStart": [
|
|
245
|
+
{
|
|
246
|
+
"matcher": "startup",
|
|
247
|
+
"hooks": [
|
|
248
|
+
{
|
|
249
|
+
"type": "command",
|
|
250
|
+
"command": "honbu hooks session-start startup",
|
|
251
|
+
"timeout": 30
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"matcher": "resume",
|
|
257
|
+
"hooks": [
|
|
258
|
+
{
|
|
259
|
+
"type": "command",
|
|
260
|
+
"command": "honbu hooks session-start resume",
|
|
261
|
+
"timeout": 30
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"matcher": "clear",
|
|
267
|
+
"hooks": [
|
|
268
|
+
{
|
|
269
|
+
"type": "command",
|
|
270
|
+
"command": "honbu hooks session-start clear",
|
|
271
|
+
"timeout": 10
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"matcher": "compact",
|
|
277
|
+
"hooks": [
|
|
278
|
+
{
|
|
279
|
+
"type": "command",
|
|
280
|
+
"command": "honbu hooks session-start compact",
|
|
281
|
+
"timeout": 10
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"SessionEnd": [
|
|
287
|
+
{
|
|
288
|
+
"hooks": [
|
|
289
|
+
{
|
|
290
|
+
"type": "command",
|
|
291
|
+
"command": "honbu hooks session-end",
|
|
292
|
+
"timeout": 30
|
|
293
|
+
}
|
|
294
|
+
]
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
}
|
package/settings.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"WebFetch(domain:raw.githubusercontent.com)",
|
|
5
|
+
"WebFetch(domain:api.github.com)",
|
|
6
|
+
"WebFetch(domain:pypi.org)",
|
|
7
|
+
"WebFetch(domain:www.thoughtasylum.com)",
|
|
8
|
+
"WebFetch(domain:docs.anthropic.com)",
|
|
9
|
+
"WebFetch(domain:zed.dev)",
|
|
10
|
+
"WebFetch(domain:www.npmjs.com)",
|
|
11
|
+
"WebFetch(domain:crates.io)",
|
|
12
|
+
"WebFetch(domain:docs.claude.com)",
|
|
13
|
+
"Read(//Users/chi/Projects/reference/**)",
|
|
14
|
+
"Glob(//Users/chi/Projects/reference/**)",
|
|
15
|
+
"Grep(//Users/chi/Projects/reference/**)",
|
|
16
|
+
"mcp__plugin_ccpp_mcp__*",
|
|
17
|
+
"WebSearch",
|
|
18
|
+
"Bash"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"enabledPlugins": {
|
|
22
|
+
"ccpp@personality": true
|
|
23
|
+
}
|
|
24
|
+
}
|