← 返回
未分类 中文

Project Memory Guard

Enforce project boundaries and memory writeback rules before anything enters project memory. Use before: writing notes into project memory, saving outputs/ta...
在内容写入项目内存前,强制执行项目边界和内存回写规则。适用:写入项目笔记、保存输出/...
sunbinnju-star sunbinnju-star 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 354
下载
💾 0
安装
1
版本
#latest

概述

Project Memory Guard

Validate every memory write against project and writeback rules. Prevent contamination and schema drift.

Input

Required fields:

  • raw_content — the content attempting to enter project memory
  • candidate_project_id — the project being written to
  • memory_type — type of memory: note, finding, task, summary, record, etc.
  • source — where this came from: user message, paper, tool output, etc.
  • timestamp — ISO-8601 timestamp of when the content was created
  • confidence — confidence score 0.0–1.0 for project assignment

Output Schema

decision: "accept" | "reject" | "reroute"
destination: string | null          # project_id or "inbox" or null
normalized_record: object | null    # cleaned record if accepted/rerouted
contamination_risk: "none" | "low" | "medium" | "high"
missing_fields: string[] | null
reason: string

Hard Rules

ConditionDecision
---------------------
Missing project_idreject — never enter formal project memory
Missing memory_typereject — no formal writeback
Missing timestampreject — no formal writeback
Confidence < 0.6reroute to inbox
Cross-project ambiguityreroute to inbox or cleanup mode
All fields present + high confidenceaccept

Reroute Destinations

  • inbox — unverified content waiting for manual review
  • cleanup — ambiguous content needing disambiguation
  • Specific project_id — when rerouting to a known project

Normalization

When decision is accept or reroute, normalize the record:

  • Strip identifying metadata not in schema
  • Add validated_at timestamp
  • Add guard_version = "1.0"
  • Preserve original raw_content in normalized_record.raw

Failure Handling

If uncertain about any field:

  • Do not guess project_id or memory_type
  • Set decision = "reroute" with destination = "inbox"
  • List missing_fields explicitly
  • Explain in reason

Never force acceptance when validation fails.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 07:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,165 📥 939,349
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,519 📥 577,388
it-ops-security

Skill Security Auditor Jack

sunbinnju-star
审计第三方或自定义技能的权限风险、不安全命令和集成安全性;在安装新技能或启用外部脚本前使用。
★ 0 📥 477