-
Notifications
You must be signed in to change notification settings - Fork 6
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.
In a high-velocity development team utilizing AI, untracked out-of-band communication causes severe context fragmentation. The Hush Protocol resolves this by:
-
Structuring intent: Transforming a casual message ("hey can you look at PR 42?") into a strictly typed signal (
needs_review). - Contextual coupling: Attaching the exact issue, user, and relevant links directly to the communication object.
-
Automated surfacing: Injecting active flags directly into the
memory://briefingpayload so incoming agents instantly know what needs attention at initialization. - Agent autonomy: Allowing AI agents to both raise and resolve flags securely and autonomously.
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
You control the protocol through two high-level deterministic operations.
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.bobor@bob). -
link(optional, string): An accompanying reference URL. -
project_number,issue_number(optional, integer): Bind explicitly to GitHub context.
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").
To keep automation and agents informed without draining computational search budgets, two static resources are exposed:
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.
Vocabulary Reference. A static readout of exactly which flags are legally allowed based on the server's vocabulary configuration.
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"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.