Skip to content

Hush Protocol

Chris & Mike edited this page Apr 13, 2026 · 1 revision

Hush Protocol

The Hush Protocol is a communication framework built into Memory Journal's Team Collaboration system. It replaces noisy, asynchronous pings (e.g., Slack DMs or disparate GitHub mentions) with structured, machine-actionable signals called flags.

By keeping requests tightly coupled with their related project context, AI agents can natively detect blockers, review requests, and important notifications instantly across continuous workflows.


🤫 Core Philosophy

In a high-velocity development team utilizing AI, untracked out-of-band communication causes severe context fragmentation. The Hush Protocol resolves this by:

  1. Structuring intent: Transforming a casual message ("hey can you look at PR 42?") into a strictly typed signal (needs_review).
  2. Contextual coupling: Attaching the exact issue, user, and relevant links directly to the communication object.
  3. Automated surfacing: Injecting active flags directly into the memory://briefing payload so incoming agents instantly know what needs attention at initialization.
  4. Agent autonomy: Allowing AI agents to both raise and resolve flags securely and autonomously.

🔄 The Protocol Lifecycle

The lifecycle revolves around passing and resolving flags. Below is the Mermaid sequence mapping the end-to-end integration graph.

sequenceDiagram
    autonumber
    actor Alice as Dev/Agent (Alice)
    participant MCP as Memory Journal MCP
    participant DB as Team Database
    actor Bob as Dev/Agent (Bob)

    %% Flag Creation
    Alice->>MCP: pass_team_flag { type: "needs_review", target: "@bob" }
    MCP->>DB: Store Entry (Type: flag)
    DB-->>MCP: Entry ID 58
    MCP-->>Alice: Success (ID: 58)

    %% Handoff & Auto-Surfacing
    note over Bob, MCP: Sometime later...
    Bob->>MCP: Connect Session
    MCP->>DB: Fetch Session Context
    DB-->>MCP: Active Flags (ID 58)
    MCP-->>Bob: memory://briefing (Active Flag 58 surfaced)

    %% Resolution
    Bob->>MCP: resolve_team_flag { flag_id: 58, resolution: "Approved PR" }
    MCP->>DB: Update Entry (resolved: true)
    DB-->>MCP: OK
    MCP-->>Bob: Resolved Successfully
Loading

🛠️ The Flag Toolset

You control the protocol through two high-level deterministic operations.

pass_team_flag

Creates a new active flag assigned to the configured TEAM_DB_PATH.

Parameters:

  • flag_type (required, string): A term defined in the active vocabulary.
  • message (required, string): Descriptive payload (up to 49,000 chars).
  • target_user (optional, string): Who the flag is directed to (e.g. bob or @bob).
  • link (optional, string): An accompanying reference URL.
  • project_number, issue_number (optional, integer): Bind explicitly to GitHub context.

resolve_team_flag

Marks an active flag as resolved, clearing it from the memory://flags active dashboard. It is globally idempotent.

Parameters:

  • flag_id (required, integer): Matches the source flag's ID.
  • resolution (optional, string): Context detailing how it was cleared (e.g., "Fixed locally").

📡 The Flag Resources

To keep automation and agents informed without draining computational search budgets, two static resources are exposed:

memory://flags

Active Flags Dashboard. This returns the exact active pool of unresolved flags. By default, this payload is concatenated directly into memory://briefing under the activeFlags block so agents naturally intercept it upon session start.

memory://flags/vocabulary

Vocabulary Reference. A static readout of exactly which flags are legally allowed based on the server's vocabulary configuration.


⚙️ Configuration & Vocabulary Restrictions

To prevent taxonomy rot, flag types are strictly verified against the FLAG_VOCABULARY environment variable. Any attempt to use an unrecognized flag drops an explicit {success: false} error with the allowed subset.

Default Vocabulary: blocker,needs_review,help_requested,fyi

You can extend or override this when initializing the server:

# Via Server CLI
memory-journal-mcp --flag-vocabulary "urgent,blocked,review,fyi,infra"

# Via Environment Variable
FLAG_VOCABULARY="urgent,blocked,review,fyi,infra"

🚀 Code Mode Automation

When leveraging Code Mode (e.g. running CI analytics or autonomous review sweeps), the Hush Protocol is exposed directly through the robust mj.team asynchronous API.

This enables you to process validation rules, generate PRs, and pass flags without burning extraneous tool-call tokens:

// Scan all failures and pass a structured flag dynamically
const failingChecks = await fetchMyCIStatus();

if (failingChecks.length > 0) {
  const flagStatus = await mj.team.passFlag({
    flag_type: 'blocker',
    target_user: '@devops',
    message: `Nightly CI build failed. ${failingChecks.length} broken modules.`,
    link: 'https://github.com/my-org/repo/actions/runs/1234'
  });

  return { success: true, flagged: flagStatus.entry.id };
}

return { success: true, message: "All checks clear." };

For closing flags, the mj.team.resolveFlag({ flag_id }) method works identically.

Clone this wiki locally