Skip to content

feat: L3 auto-trigger senders — leads bypass @prefix#11

Merged
aviadr1 merged 1 commit intomainfrom
worktree-fix-auto-trigger-leads
Mar 16, 2026
Merged

feat: L3 auto-trigger senders — leads bypass @prefix#11
aviadr1 merged 1 commit intomainfrom
worktree-fix-auto-trigger-leads

Conversation

@aviadr1
Copy link
Copy Markdown

@aviadr1 aviadr1 commented Mar 16, 2026

Summary

  • Adds autoTriggerSenders to the sender allowlist config — listed sender IDs activate the agent without needing the @Andy prefix
  • Fixes recurring bug where Liraz's messages were silently dropped in non-main groups because they lacked the trigger prefix
  • Updates both trigger check paths in src/index.ts (processGroupMessages + message loop pipe)
  • Config deployed to ~/.config/nanoclaw/sender-allowlist.json with Liraz's Telegram ID (5697720897)

Kaizen Analysis

Aspect Detail
Failure type Recurring — Liraz messages ignored (happened multiple times)
Previous level L1 (CLAUDE.md instructions about Liraz) — didn't help because the pipeline drops messages before the agent sees them
This fix level L3 mechanistic — the message processing pipeline now structurally handles trusted senders
Root cause Non-main groups require @Andy prefix. Liraz doesn't use it. Messages silently return true at line 362 with no error/log

Test plan

  • TypeScript compiles cleanly
  • All 274 tests pass (including 3 new isAutoTriggerSender tests + 3 config loading tests)
  • sender-allowlist.json created with Liraz's ID
  • Deploy: npm run build + restart service, then have Liraz send a message without @Andy

🤖 Generated with Claude Code

Liraz's messages were silently dropped because non-main groups require
the @andy trigger prefix. This is a recurring issue (kaizen escalation
from L1 instructions to L3 mechanistic enforcement).

Adds autoTriggerSenders to sender-allowlist config: listed senders
bypass the trigger prefix requirement and activate the agent with any
message. Config lives in ~/.config/nanoclaw/sender-allowlist.json.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aviadr1 aviadr1 merged commit f68c6d1 into main Mar 16, 2026
1 check failed
aviadr1 added a commit that referenced this pull request Mar 16, 2026
…nts, test coverage warnings

Add mandatory verification policies (kaizen #11, #15, #17):
- CLAUDE.md: path-tracing checklist, invariant statement requirement, runtime artifact verification
- Pre-commit hook: advisory warning when source files are staged without corresponding test changes
- Global CLAUDE.md: path tracing and test invariant requirements for container agents

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aviadr1 added a commit that referenced this pull request Mar 16, 2026
…nts, test coverage warnings (#23)

Add mandatory verification policies (kaizen #11, #15, #17):
- CLAUDE.md: path-tracing checklist, invariant statement requirement, runtime artifact verification
- Pre-commit hook: advisory warning when source files are staged without corresponding test changes
- Global CLAUDE.md: path tracing and test invariant requirements for container agents

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aviadr1 added a commit that referenced this pull request Mar 20, 2026
…rence docs (kaizen #242)

Kaizen system (.claude/kaizen/):
- policies.md: enforcement policies #11-17 (recursive kaizen, hooks, MCP, security, isolation, testing, language)
- verification.md: path tracing, invariant statements, runtime artifact verification, smoke tests
- workflow.md: dev work skill chain trigger→skill routing
- skills/trim-claude-md: reusable skill for measuring and trimming CLAUDE.md (symlinked to .claude/skills/)

Reference docs (docs/):
- architecture-layers.md: layered architecture, file naming, layer rules, cases↔kaizen relationship
- harness-vertical-architecture.md: harness/vertical split, dependency placement, config contract
- merging-prs.md: merge procedure, CI monitoring, troubleshooting, post-merge auto-deploy
- ipc-messaging.md: sending Telegram messages from host via IPC files

CLAUDE.md retains: quick context, cases overview, key files, skill triggers, general dev policies #1-10,
database, development commands, git remotes, end-of-session cleanup — plus compact pointers to all
extracted content with "when to read" hints.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aviadr1 added a commit that referenced this pull request Mar 20, 2026
…rence docs (kaizen #242) (#229)

Kaizen system (.claude/kaizen/):
- policies.md: enforcement policies #11-17 (recursive kaizen, hooks, MCP, security, isolation, testing, language)
- verification.md: path tracing, invariant statements, runtime artifact verification, smoke tests
- workflow.md: dev work skill chain trigger→skill routing
- skills/trim-claude-md: reusable skill for measuring and trimming CLAUDE.md (symlinked to .claude/skills/)

Reference docs (docs/):
- architecture-layers.md: layered architecture, file naming, layer rules, cases↔kaizen relationship
- harness-vertical-architecture.md: harness/vertical split, dependency placement, config contract
- merging-prs.md: merge procedure, CI monitoring, troubleshooting, post-merge auto-deploy
- ipc-messaging.md: sending Telegram messages from host via IPC files

CLAUDE.md retains: quick context, cases overview, key files, skill triggers, general dev policies #1-10,
database, development commands, git remotes, end-of-session cleanup — plus compact pointers to all
extracted content with "when to read" hints.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aviadr1 added a commit that referenced this pull request Mar 21, 2026
…g (kaizen qwibitai#323, qwibitai#353)

- enforce-pr-kaizen.sh: add `merge` to allowed PR commands during kaizen gate
  (was blocked, preventing overnight-dent from queuing auto-merge after PR creation)
- parse-command.sh: fix is_git_command regex — wrap ${subcommand} alternation in
  parentheses to prevent `--delete-branch` matching bare `branch` via top-level |
- CLAUDE.md: document that --dangerously-skip-permissions does NOT bypass hooks
  (policy #11). Permissions and hooks are independent systems.
- docs/hooks-design.md: new technical reference — patterns, anti-patterns, gate
  design, regex traps, testing conventions, and lessons learned from incidents
- overnight-dent-run.ts: add comment documenting the permissions vs hooks distinction
- 3 new test cases for gh pr merge allowlist (39 total, all passing)
- 1032/1032 hook tests pass (full suite, no regressions)

Fixes Garsson-io/kaizen#323
Fixes Garsson-io/kaizen#353

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
aviadr1 added a commit that referenced this pull request Mar 21, 2026
…g (kaizen qwibitai#323, qwibitai#353) (#271)

- enforce-pr-kaizen.sh: add `merge` to allowed PR commands during kaizen gate
  (was blocked, preventing overnight-dent from queuing auto-merge after PR creation)
- parse-command.sh: fix is_git_command regex — wrap ${subcommand} alternation in
  parentheses to prevent `--delete-branch` matching bare `branch` via top-level |
- CLAUDE.md: document that --dangerously-skip-permissions does NOT bypass hooks
  (policy #11). Permissions and hooks are independent systems.
- docs/hooks-design.md: new technical reference — patterns, anti-patterns, gate
  design, regex traps, testing conventions, and lessons learned from incidents
- overnight-dent-run.ts: add comment documenting the permissions vs hooks distinction
- 3 new test cases for gh pr merge allowlist (39 total, all passing)
- 1032/1032 hook tests pass (full suite, no regressions)

Fixes Garsson-io/kaizen#323
Fixes Garsson-io/kaizen#353

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant