← 返回
未分类

Hizal Write

Persist what the agent learns as it builds. Self-triggering — fires whenever the agent makes a decision, discovers a pattern, learns a convention, hits a got...
在构建时持久化代理所学内容。自我触发——每当代理做决策、发现模式、学习约定或遇到问题时触发。
parkerscobey
未分类 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 236
下载
💾 0
安装
1
版本
#latest

概述

Hizal Write

Write as you build. Not optional.

Available Write Tools

What you're writingToolScope
----------------------------------
Personal observation or lesson learnedhizal__write_memoryAGENT
Architecture or design decisionhizal__write_knowledgePROJECT
Convention this codebase followshizal__write_conventionPROJECT (auto-inject)
Agent identity or personalityhizal__write_identityAGENT (auto-inject)
Org-wide knowledgehizal__write_org_knowledgeORG
Principle (requires human promotion)hizal__store_principleORG
Custom chunk typehizal__write_chunkvaries

Do not use hizal__write_context — it's deprecated. Use the purpose-built tools above.

Custom Chunk Types via write_chunk

For chunk types not covered by the built-in tools, use hizal__write_chunk. Chunk types are customizable per org — always discover what's available before assuming a type doesn't exist.

Discover Available Types

hizal__list_chunks()  # inspect chunk_type values in results

Or check the project's AGENTS.md for the org's type conventions.

Usage

hizal__write_chunk(
  type="<chunk-type-slug>",
  query_key="<unique-key>",
  title="<short title>",
  content="<full content>",
  scope="PROJECT",  # or AGENT, ORG
  project_id="<id>",  # required for PROJECT scope
  org_id="<id>",  # required for ORG scope
  agent_id="<id>"  # required for AGENT scope
)

write_chunk accepts the same common fields as all other write tools (query_key, title, content, gotchas, related, source_file, inject_audience, etc.). It also accepts custom_fields for type-specific metadata.

When to Use write_chunk vs Built-in Tools

  • Built-in tools — use whenever the content maps cleanly to MEMORY, KNOWLEDGE, CONVENTION, IDENTITY, ORG_KNOWLEDGE, or PRINCIPLE
  • write_chunk — use for any custom org type (e.g., SPEC, RUNBOOK, ADR, INVESTIGATION)
  • When in doubt, check what chunk types the org has defined and pick the closest match

Write One Chunk Per Decision

Don't batch everything into one chunk at the end. Write as you go:

  • Made an architecture decision? → write_knowledge now
  • Learned a codebase convention? → write_convention now
  • Discovered something useful personally? → write_memory now
  • Found a custom type that fits better? → write_chunk now

Common Fields

All write tools accept:

  • query_key — unique key for this topic (enables exact lookup later)
  • title — short descriptive title
  • content — the full context content
  • source_file / source_lines — where this came from
  • gotchas — list of warnings or pitfalls
  • related — list of related query_keys
  • inject_audience — DNF targeting spec for auto-injection (omit for defaults)

Example

hizal__write_knowledge(
  project_id="<id>",
  query_key="nuvei-webhook-signing",
  title="DMN Webhook Signature Verification",
  content="All DMN payloads are verified using SHA-256 HMAC. The checksum is computed from sorted key-value pairs + merchant secret. See package internal/checksum for implementation.",
  related=["nuvei-payload-structure", "merchant-credentials"],
  gotchas=["Never use /payment for credential verification"]
)

Promote AGENT → PROJECT

If a personal memory chunk is broadly useful for the team, promote it:

  1. Read the chunk with hizal__read_context
  2. Write it back as write_knowledge or write_convention with the content
  3. Optionally delete the original AGENT chunk with hizal__delete_context

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-23 23:35 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Hizal Register Focus

parkerscobey
声明代理当前正在进行的任务。自触发——当代理有明确任务并希望自动获取相关上下文时会触发。使用于...
★ 0 📥 259

Hizal End

parkerscobey
关闭代理的上下文会话并整合所学。自触发——在代理完成任务、结束工作或即将离开时触发。
★ 0 📥 266

Hizal Search

parkerscobey
在构建前先检索已有上下文。自我触发——在代理即将搜索代码库、回忆先前决策、查看...时触发。
★ 0 📥 261