feat(system): Fix doctor_wire hook format: use matcher+hooks wrapper for Claude Code compatibility
Co-Authored-By: @devpulse <devpulse@aipass>
This commit is contained in:
+6
-2
@@ -26,7 +26,11 @@ ENV PATH="/home/testuser/.local/bin:$PATH"
|
||||
RUN python3 -m pip install --upgrade pip --break-system-packages 2>/dev/null || true
|
||||
|
||||
USER testuser
|
||||
RUN mkdir -p /home/testuser/workspace /home/testuser/.claude
|
||||
WORKDIR /home/testuser
|
||||
RUN mkdir -p /home/testuser/Projects /home/testuser/.claude
|
||||
WORKDIR /home/testuser/Projects
|
||||
|
||||
ENV HOME=/home/testuser
|
||||
ENV PATH="/home/testuser/.local/bin:$PATH"
|
||||
|
||||
RUN echo 'export HOME=/home/testuser' >> /home/testuser/.bashrc && \
|
||||
echo 'export PATH="$HOME/.local/bin:$PATH"' >> /home/testuser/.bashrc
|
||||
|
||||
@@ -158,7 +158,7 @@ def _auto_wire_provider(manifest_path: Path, interactive: bool = True) -> List[s
|
||||
settings["hooks"][event] = event_hooks
|
||||
|
||||
already_wired = any(
|
||||
isinstance(h, dict) and script in h.get("command", "")
|
||||
isinstance(h, dict) and script in json.dumps(h)
|
||||
for h in event_hooks
|
||||
)
|
||||
if not already_wired:
|
||||
@@ -166,15 +166,17 @@ def _auto_wire_provider(manifest_path: Path, interactive: bool = True) -> List[s
|
||||
hook_path = f"~/.claude/hooks/{script}"
|
||||
else:
|
||||
hook_path = f".claude/hooks/{script}"
|
||||
entry: Dict[str, object] = {
|
||||
cmd_entry: Dict[str, object] = {
|
||||
"type": "command",
|
||||
"command": f"{sys.executable} {hook_path}",
|
||||
}
|
||||
if hook.get("matcher"):
|
||||
entry["matcher"] = hook["matcher"]
|
||||
if hook.get("timeout"):
|
||||
entry["timeout"] = hook["timeout"]
|
||||
event_hooks.append(entry)
|
||||
cmd_entry["timeout"] = hook["timeout"]
|
||||
wrapper: Dict[str, object] = {
|
||||
"matcher": hook.get("matcher", ""),
|
||||
"hooks": [cmd_entry],
|
||||
}
|
||||
event_hooks.append(wrapper)
|
||||
actions.append(f"Wired hook {script} -> {event}")
|
||||
|
||||
# Env vars
|
||||
|
||||
@@ -98,6 +98,8 @@ drone, seedgo, prax, cli, ai_mail, api, flow, spawn, trigger, memory, devpulse (
|
||||
- **Know what to build vs delegate.** Things you own (watchdog, feedback, your DPLANs/FPLANs, memories, prompts, small fixes across the codebase) → build directly. Multi-file new features or heavy refactors → delegate to a sub-agent so your context stays clean.
|
||||
- **CWD is identity.** You move in and out of branches all day. Always know which branch you're standing in — the CWD determines everything (drone routing, git operations, mailbox, passport lookups). Never cd into another branch and forget to come back. Visit, don't move in.
|
||||
- **Git awareness as a natural habit.** After completing a feature or wrapping up a chunk of work, run `git status`. If changes look coherent (upgrade, fix cycle, config update), suggest a commit or PR. Don't force it every turn, but don't let files pile up silently either.
|
||||
- **Never `docker cp` into test containers.** It dirties the git tree and blocks future pulls. Test flow: merge PR → `git pull` in container → test. If code isn't merged yet, it's not ready to test in Docker.
|
||||
- **Sub-agents build, managers PR.** Sub-agents never create PRs. They build code and run tests. The manager reviews the work, then creates the PR.
|
||||
## Watchdog — Directed Wake (devpulse module)
|
||||
|
||||
Watchdog is a real devpulse module now (not a bash one-liner). After dispatching, arm it as a background task — it polls the dispatch lock file and exits when the agent process finishes (success, silent-finish, OR crash). The exit wakes you.
|
||||
|
||||
Reference in New Issue
Block a user