G-Gates Network Governance Hub

The G-Gates Network is the cascade-failure prevention layer for OpenClaw (CLAUDE.md §“MANDATORY: Cascade-Failure Gates (Amendment §A1, 2026-05-01)”). It defines 8 documented enforcement gates + 2 Postgres Chokepoint gates = 10 in CLAUDE.md, against a Phase 1.7 promise of 22. This hub is the single reference for all gate IDs, their triggers, violations, validator scripts, and pending gates. It also tracks the proposed G-SKILL-MUTATION-AUDIT gate (pending Henry ratification). Cross-links to all Wave 1 integration hubs as “systems governed.” Read this hub when: starting a plan, before any infra change, when auditing governance posture.

Quick reference

FieldValue
Gate IDNetwork anchor — contains all G-* gates
CLAUDE.md section§A1 “MANDATORY: Cascade-Failure Gates (Amendment §A1, 2026-05-01)” + §“MANDATORY: POSTGRES-CHOKEPOINT (Phase 1.4, 2026-05-02)“
Enforcement modemanual (per gate; cron enforcement shipping Phase 2)
Validator script/home/opsadmin/.openclaw/workspace/scripts/security-audit-funnel.js (G-SERVICE-PRE-START-DOC + G-KB-SYNC + webhook gates)
Discord alertyes:#ops (security-audit-funnel.timer fires Mondays 06:00 LA; G-FAILED-SERVICE-MTTR daily cron)
Feedback rulesfeedback_plan_index_required, feedback_memory_fold_protection, feedback_blocker_surfacing, feedback_no_plaintext_creds, feedback_service_pre_start_doc, feedback_kb_sync_with_claude_md, feedback_governance_log_freshness, feedback_failed_service_mttr, feedback_chokepoint_principle, feedback_dual_write_required
Incidents derived from89% orphan-plan rate; 9870 wrong-inbox; 374-dup-SMS; Aurora SOUL overwrite attempt; TOOLS.md 15+ plaintext keys; 23 undocumented services; Binance/EU KB miss; CHANGELOG 72d stale; cost-monitor v3 tool_calls bypass
Violable byClaude, agent, cron, external
Last known violation2026-05-03: G-KB-SYNC-WITH-CLAUDEMD (moonshot/kimi KB _audit-only, not flagged as SOURCE MISSING before plan authoring)
Amendment§A1 2026-05-01 (8 gates); §CHOKEPOINT Phase 1.4 2026-05-02 (+2)
Phase statusactive (10 of 22 promised gates shipped; 12 pending Phase 1.7)
Last audit2026-05-03

Components

  • ~/CLAUDE.md §A1 — 8 cascade-failure gates (authoritative)
  • ~/CLAUDE.md §“MANDATORY: POSTGRES-CHOKEPOINT (Phase 1.4, 2026-05-02)” — 3 Chokepoint rules, 2 additional gates (G-CHOKEPOINT, G-DUAL-WRITE)
  • /home/opsadmin/.openclaw/workspace/scripts/security-audit-funnel.js — validator for webhook + infra gates
  • /home/opsadmin/.openclaw/workspace/scripts/tool-calls-health-check.js — CHOKEPOINT-1 drift detector (5-min timer)
  • /home/opsadmin/.openclaw/workspace/FUNNEL-REGISTRY.md — webhook endpoint registry (G-SERVICE-PRE-START-DOC)
  • /home/opsadmin/.openclaw/workspace/ARCHITECTURE.md — service table (G-SERVICE-PRE-START-DOC)
  • /home/opsadmin/.openclaw/workspace/CHANGELOG.md — freshness target (G-GOVERNANCE-LOG-FRESHNESS)
  • /home/opsadmin/.openclaw/workspace/AUDIT-LOG.md — freshness target (G-GOVERNANCE-LOG-FRESHNESS)
  • /home/opsadmin/.openclaw/workspace/WORKFLOW-PATTERNS.md — freshness target (G-GOVERNANCE-LOG-FRESHNESS)
  • /home/opsadmin/.openclaw/workspace/SYSTEM-FRICTION-LOG.md — freshness target (G-GOVERNANCE-LOG-FRESHNESS)
  • /home/opsadmin/.claude/plans/openclaw-fragmentation-fix-2026-05-01.md — master plan for all gates (§A1)

Documented gates (10 of 22 promised)

G-PLAN-INDEX-REQUIRED (Gate #1)

AttributeValue
CLAUDE.md §A1 position#1
RuleWhen creating any file in ~/.claude/plans/, MUST same-session create matching project_*.md memory file in .claude/projects/-home-opsadmin/memory/ AND append one-line index entry to MEMORY.md or PLAN-INDEX.md
Stops89% orphan-plan rate (68 of 77 plans as of 2026-05-01 audit — no project_*.md, not discoverable)
Enforcement modemanual
Validatorn/a (Phase 4.5 PLAN-INDEX.md will enforce)
Discord alertpending
Feedback rulefeedback_plan_index_required
IncidentBinance/EU plan lost — no project_*.md, fell off fold, invisible at session start
Last violation2026-05-01: 68 orphan plans discovered
Phase statusactive

G-MEMORY-FOLD-PROTECTION (Gate #2)

AttributeValue
CLAUDE.md §A1 position#2
RuleMEMORY.md auto-loads only ~200 lines. Incident-derived feedback rules (tagged incident_derived: true in frontmatter) MUST live above line 150
StopsIncident recurrence: 9870 wrong-inbox, 374-dup-SMS, Aurora SOUL overwrite were ALL preventable by rules-that-existed-but-were-invisible below fold
Enforcement modememory-load
Validatorn/a
Discord alertpending
Feedback rulefeedback_memory_fold_protection
IncidentMEMORY.md three-file split (Phase D 2026-05-02) implemented to address fold problem
Last violation2026-05-01: multiple incident-derived rules below line 150
Phase statusactive

G-BLOCKER-SURFACING (Gate #3)

AttributeValue
CLAUDE.md §A1 position#3
RuleAny plan with unresolved ## Open Blockers / ## Decision Gates / ## Open Questions MUST mirror into SESSION-AUDIT.md NEXT ACTIONS or OPEN ISSUES within the same session
Stops47 hidden blockers across 32 plans silently dormant (cloudflare Q1-Q3 11 days, salesmsg-ctie Q6 5-min task gating Phases 3-9)
Enforcement modemanual
Validatorn/a
Discord alertpending
Feedback rulefeedback_blocker_surfacing
Incidentcloudflare Q1-Q3 open 11 days; salesmsg-ctie Q6 gating entire phase branch
Last violation2026-05-01: 47-blocker audit
Phase statusactive

Full detail: blockers-first

G-NO-PLAINTEXT-CREDS (Gate #4)

AttributeValue
CLAUDE.md §A1 position#4
RuleNo tracked or world-readable file in workspace/, ~/.claude/, or ~/.openclaw/ may contain plaintext credentials, tokens, secrets, or API keys. Use op://Aurora/<item>/<field> references only
StopsTOOLS.md: 15+ plaintext production secrets in rw-rw-r— file for 24+ days
Enforcement modemanual (credential-audit.sh runs pre-deploy)
Validator/home/opsadmin/.openclaw/tools/credential-audit.sh
Discord alertpending
Feedback rulefeedback_no_plaintext_creds
IncidentTOOLS.md exposure; salesmsg-gateway.service ANTHROPIC_API_KEY hardcoded in /etc/systemd/
Last violation2026-05-03 (audit found stale openrouter key reference)
Phase statusactive

Grep patterns for violation detection: xoxb-, xapp-, eyJ, sk-[A-Za-z0-9]{20,}, Bearer [A-Za-z0-9], raw passwords.

G-SERVICE-PRE-START-DOC (Gate #5)

AttributeValue
CLAUDE.md §A1 position#5
RuleA new systemd unit, PM2 process, or port-binding process MUST be added to CLAUDE.md port map AND workspace/ARCHITECTURE.md service table BEFORE first systemctl start
Stops23 undocumented live services; agents killing each other’s ports; undebuggable failures
Enforcement modemanual
Validator/home/opsadmin/.openclaw/workspace/scripts/security-audit-funnel.js --dry-run
Discord alertyes:#ops (security-audit-funnel.timer Mondays 06:00 LA)
Feedback rulefeedback_service_pre_start_doc
Incident23 undocumented services found in 2026-05-01 audit; cost-monitor Type=simple bug silent
Last violation2026-05-01: 23 undocumented live services discovered
Phase statusactive (Phase 1.5 port-registry.md will formalize)

G-KB-SYNC-WITH-CLAUDEMD (Gate #6)

AttributeValue
CLAUDE.md §A1 position#6
RuleAny new workspace/knowledge-base/<dir>/ directory requires same-change update to the “Platforms with KB docs” line in CLAUDE.md
Stops51% of KB docs invisible to Sources First protocol (Binance/EU miss is the modal case)
Enforcement modemanual
Validatorn/a
Discord alertpending
Feedback rulefeedback_kb_sync_with_claude_md
IncidentBinance/EU plan: KB dirs existed but not listed in CLAUDE.md → SOURCE MISSING not emitted
Last violation2026-05-03: moonshot/kimi KB _audit-only, not flagged as SOURCE MISSING before plan authoring
Phase statusactive

Current count: 138 dirs listed in CLAUDE.md (original 34 + 35 + 27 + 56 + 7 voice = 159… NOTE: recount needed — CLAUDE.md text says “138 tracked” but enumeration may exceed that; see sources-first KB platform list).

G-GOVERNANCE-LOG-FRESHNESS (Gate #7)

AttributeValue
CLAUDE.md §A1 position#7
RuleWORKFLOW-PATTERNS.md, SYSTEM-FRICTION-LOG.md, CHANGELOG.md, and AUDIT-LOG.md must each be touched within 14 days
StopsCHANGELOG 72d stale and WORKFLOW-PATTERNS 44d stale (as of 2026-05-01) — unenforceable governance loop
Enforcement modecron (weekly-index-audit.timer, Phase 2 — not yet shipped)
Validatorn/a (Phase 2)
Discord alertyes:#ops (when shipped — weekly-index-audit.timer will Discord-alert)
Feedback rulefeedback_governance_log_freshness
IncidentCHANGELOG 72d stale discovered 2026-05-01 audit
Last violation2026-05-01: CHANGELOG 72d, WORKFLOW-PATTERNS 44d stale
Phase statusactive (cron not yet shipped — Phase 2 of fragmentation-fix)

G-FAILED-SERVICE-MTTR (Gate #8)

AttributeValue
CLAUDE.md §A1 position#8
RuleAny service in failed state for >24h must be (a) fixed, (b) explicitly disabled, or (c) archived. Daily cron Discord-alerts if >24h
StopsSilent-failed services masking live data outages (cost-monitor Type=simple bug; discord-thread-auto-add token undefined)
Enforcement modecron (daily cron — not yet shipped; daily systemctl --user list-units --state=failed check)
Validatorsystemctl --user list-units --state=failed
Discord alertyes:#ops (when cron ships)
Feedback rulefeedback_failed_service_mttr
Incidentcost-monitor system-level Type=simple bug; discord-thread-auto-add token undefined
Last violation2026-05-03: investorlift-cookie-refresh.service failed (AWS Mac impaired); perplexity-daily-summary.service failed 16:00 UTC
Phase statusactive (cron not yet shipped — Phase 2 of fragmentation-fix)

Chokepoint gates (CLAUDE.md §Phase 1.4, 2026-05-02)

G-CHOKEPOINT (Chokepoint-1)

AttributeValue
CLAUDE.md section§“MANDATORY: POSTGRES-CHOKEPOINT” CHOKEPOINT-1
RuleEvery LLM call writes a tool_calls row before returning. Fallback: /tmp/openclaw/tool-calls-fallback.jsonl. Drain within 1h
Stopscost-monitor v3 broke because LLM calls bypassed tool_calls writes — silent cost blindspot
Enforcement modecron (tool-calls-health-check.timer every 5 min; compares Portkey call count vs tool_calls insert count; >10% delta = alert)
Validator/home/opsadmin/.openclaw/workspace/scripts/tool-calls-health-check.js
Discord alertyes:#ops (>10% delta)
Feedback rulefeedback_chokepoint_principle
Incidentcost-monitor v3 tool_calls bypass; 2026-05-02 discovery
Last violation2026-05-02: cost-monitor v3 tool_calls bypass discovered
Phase statusactive

Required JSONB keys in parameters: at minimum tier and model. Nullable fields: cost_usd, tokens_in, tokens_out, cache_read_tokens, cache_write_tokens (NULL = plan-tier flat-rate; >0 = API-tier paid).

G-DUAL-WRITE (Chokepoint-2)

AttributeValue
CLAUDE.md section§“MANDATORY: POSTGRES-CHOKEPOINT” CHOKEPOINT-2
RuleConfig changes write infra_config_changes BEFORE going live. Applies to: Portkey config, Langfuse, model routing, CCR provider list, agent routes, MCP registry, port registry, skills registry, system prompts, service configs
StopsUntracked config changes creating invisible drift
Enforcement modemanual
Validatorn/a
Discord alertpending
Feedback rulefeedback_dual_write_required
IncidentPortkey config changes applied without infra_config_changes row
Last violationunknown
Phase statusactive

Pending gates (Phase 1.7 — 12 of 22 not yet shipped)

CLAUDE.md §A1 status note (2026-05-03): “Phase 1.7 of openclaw-fragmentation-fix-2026-05-01.md promised to ship 22 gates as feedback_*.md files. Currently 10 in CLAUDE.md. Pending: ship remaining 12 as enforced gates OR formally retire from the 22 target.”

Gate ID (proposed)DescriptionStatus
G-DRIFT-LIVECron health check for tool-calls drift (Portkey vs Supabase count)Partially shipped via tool-calls-health-check.timer
G-CHOKEPOINT-CRON-HEALTHMonitor cron timer last-fire dates; alert if missed >1 cycleplanned
G-CONFIG-CHANGESEnforce infra_config_changes row for ALL config mutations (extends G-DUAL-WRITE)planned
G-SCHEMA-MIGRATIONSchema changes only via workspace/migrations/ SQL files (CHOKEPOINT-3)active (CHOKEPOINT-3)
G-AGENT-SOUL-PROTECTIONAltering any agent SOUL.md requires explicit Henry approval + skill-vs-SOUL analysisplanned (documented in CLAUDE.md §“MANDATORY: Agent Identity First”)
G-PLAN-AMENDMENT-ADDITIVEPlan amendments are additive-only (Δ pattern); no retroactive rewritesplanned
G-FUNNEL-REGISTRY-AUDITWeekly security-audit-funnel.timer check for unregistered routes, sig failurespartially active (timer shipped; cron health pending)
G-MEMORY-AUDITFleet-wide memory DB health check (vec0 + FTS5 schema, dead_letters drain)planned
G-COST-OVERRUN-ALERTAlert if daily LLM cost exceeds threshold; block if weekly threshold exceededplanned
G-SESSION-BRIDGE-REQUIREDSession must write bridge file before Stop hook firespartially active (Stop hook fires; enforcement is advisory)
G-VAULT-SYNC-FRESHNESSopenclaw-vault-sync.timer last-push must be <30 min; alert if missedplanned
G-DUAL-CHANNEL-DEDUPDedup all outbound SMS/calls across both SalesMsg + OpenPhone channelsplanned

G-SKILL-MUTATION-AUDIT (proposed — pending Henry ratification)

Proposal source: OSIL audit (2026-05-03). Wave 2 Dispatch Spec §“governance/g-gates-network” mandatory insert.

Proposed rule: Any modification to a skill’s SKILL.md, TOOLS.md, trigger conditions in CLAUDE.md §“Tool Trigger Conditions”, or skill registry entry requires: (1) diff of change, (2) impact assessment on agents that invoke the skill, (3) Henry explicit approval if skill is P0-level.

Why: Skills are increasingly being used for high-stakes operations (acquisitions-outreach, dispo-blast, hubspot-deal-ingest). A misconfigured skill trigger can fire on wrong conditions and cause unauthorized outreach or deal creation. No current gate prevents silent skill mutations from shipping.

Precedent: feedback_agent_identity_first was created after Aurora SOUL overwrite attempt. Skills are now SOUL-adjacent for P0 skills.

Status: PLANNED — pending Henry ratification. Not yet in CLAUDE.md.

Open issues

  • G-SKILL-MUTATION-AUDIT not yet ratified — forward-reference only. Raise with Henry at next session.
  • 12 of 22 Phase 1.7 gates not yet shipped; see openclaw-fragmentation-fix-2026-05-01.md Phase 1.7
  • security-audit-funnel.timer last fire: 2026-04-27 — missed multiple Mondays. G-FAILED-SERVICE-MTTR candidate. Run manually: node workspace/scripts/security-audit-funnel.js --dry-run
  • G-GOVERNANCE-LOG-FRESHNESS: weekly-index-audit.timer NOT YET SHIPPED (Phase 2 of fragmentation-fix)
  • G-FAILED-SERVICE-MTTR daily cron: NOT YET SHIPPED (Phase 2)
  • G-DRIFT-LIVE: tool-calls-health-check.timer is a 5-min cron — confirm it’s actually running: systemctl --user status tool-calls-health-check.timer

Systems governed by G-Gates

G-gates govern all Wave 1 + Wave 2 integration hubs. Specific cross-links:

Wave 1 integrations

  • 1password — G-NO-PLAINTEXT-CREDS (issuer), G-SERVICE-PRE-START-DOC
  • salesmsg — G-NO-PLAINTEXT-CREDS (ANTHROPIC_API_KEY plaintext P0), G-KB-SYNC-WITH-CLAUDEMD
  • twilio — G-KB-SYNC-WITH-CLAUDEMD, G-SERVICE-PRE-START-DOC (:18797)
  • openphone-quo — G-KB-SYNC-WITH-CLAUDEMD, G-SERVICE-PRE-START-DOC (:18792)
  • hubspot — G-KB-SYNC-WITH-CLAUDEMD, G-DUAL-WRITE (dual pipeline)
  • investorlift — G-KB-SYNC-WITH-CLAUDEMD
  • supabase — G-CHOKEPOINT (tool_calls + infra_config_changes tables), G-DUAL-WRITE
  • portkey — G-CHOKEPOINT (all LLM calls route through), G-DUAL-WRITE (model routing changes)
  • anthropic — G-CHOKEPOINT, G-KB-SYNC-WITH-CLAUDEMD
  • discord — G-GOVERNANCE-LOG-FRESHNESS (alert channel), G-FAILED-SERVICE-MTTR
  • github — G-PLAN-INDEX-REQUIRED (vault sync)
  • cloudflare — G-SERVICE-PRE-START-DOC (Tunnel), G-KB-SYNC-WITH-CLAUDEMD
  • hetzner — G-SERVICE-PRE-START-DOC (VPS services)
  • aws — G-SERVICE-PRE-START-DOC (Mac Ultra LaunchDaemons)
  • slack — G-GOVERNANCE-LOG-FRESHNESS (backup alert channel)

Wave 1 processes

Agents that touch this

  • _summary — highest-stakes; all 10 gates apply
  • _summary — G-BLOCKER-SURFACING (B-series blockers)
  • _summary — G-CHOKEPOINT (LLM calls), G-DUAL-WRITE (Supabase)
  • _summary — G-BLOCKER-SURFACING, G-DUAL-WRITE
  • _summary — G-SCHEMA-MIGRATION (planned gate)

Skills that invoke this

Plans that govern this

Feedback rules

KB / source docs

  • WEBHOOK-IP-RANGES — WAF allowlist for G-SERVICE-PRE-START-DOC
  • README — system governance conventions
  • README — Supabase table schemas for G-CHOKEPOINT

System maps

Governance enforcement cluster (this hub is the anchor):

Feedback rule inventory

RuleGateClusterEnforcementLast fire
feedback_plan_index_requiredG-PLAN-INDEX-REQUIREDgovernancemanual2026-05-01 (89% orphan)
feedback_memory_fold_protectionG-MEMORY-FOLD-PROTECTIONgovernancememory-load2026-05-01
feedback_blocker_surfacingG-BLOCKER-SURFACINGgovernancemanual2026-05-01 (47 hidden)
feedback_no_plaintext_credsG-NO-PLAINTEXT-CREDSsecuritymanual2026-05-03
feedback_service_pre_start_docG-SERVICE-PRE-START-DOCinframanual2026-05-01 (23 undoc)
feedback_kb_sync_with_claude_mdG-KB-SYNC-WITH-CLAUDEMDgovernancemanual2026-05-03
feedback_governance_log_freshnessG-GOVERNANCE-LOG-FRESHNESSgovernancecron (pending)2026-05-01 (72d stale)
feedback_failed_service_mttrG-FAILED-SERVICE-MTTRinfracron (pending)2026-05-03 (cookie-refresh)
feedback_chokepoint_principleG-CHOKEPOINTdatacron (5 min)2026-05-02 (v3 bypass)
feedback_dual_write_requiredG-DUAL-WRITEdatamanualunknown

Recent activity

  • 2026-05-03: hub created (W2-S1); G-SKILL-MUTATION-AUDIT proposed (pending Henry)
  • 2026-05-02: G-CHOKEPOINT + G-DUAL-WRITE added (CHOKEPOINT Phase 1.4)
  • 2026-05-01: §A1 amendment added 8 gates to CLAUDE.md
  • 2026-04-16: Aurora SOUL overwrite attempt caught — drove G-AGENT-SOUL-PROTECTION proposal