memory-write

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Purpose

用途

Write knowledge content to a bucket file and automatically update the topics.md knowledge index.
将知识内容写入存储桶文件,并自动更新topics.md知识索引。

Input

输入

  • bucket
    : pm | architect | dev | qa
  • file
    : filename within the bucket
  • --topic
    : topic name for topics.md index
  • --summary
    : one-line description for topics.md
  • --anchor
    (optional): anchor tag for topics.md reference
  • --mode
    (optional):
    append
    (default) or
    overwrite
  • Content via stdin
  • bucket
    : pm | architect | dev | qa
  • file
    : 存储桶内的文件名
  • --topic
    : topics.md索引的主题名称
  • --summary
    : topics.md的单行描述
  • --anchor
    (可选): topics.md引用的锚点标签
  • --mode
    (可选):
    append
    (默认) 或
    overwrite
  • 通过标准输入提供内容

Required Flow

必要流程

bash
memory-hub write <bucket> <file> \
  --topic <name> --summary "<description>" \
  [--anchor <anchor>] [--mode append|overwrite] <<'EOF'
<markdown content>
EOF
bash
memory-hub write <bucket> <file> \
  --topic <name> --summary "<description>" \
  [--anchor <anchor>] [--mode append|overwrite] <<'EOF'
<markdown content>
EOF

Output

输出

JSON envelope with
data.bytes_written
and write metadata.
包含
data.bytes_written
和写入元数据的JSON信封。

Error Handling

错误处理

  • INVALID_BUCKET
    → invalid bucket name
  • NO_INPUT
    → no stdin content provided
  • EMPTY_CONTENT
    → stdin content is empty
  • INVALID_BUCKET
    → 无效的存储桶名称
  • NO_INPUT
    → 未提供标准输入内容
  • EMPTY_CONTENT
    → 标准输入内容为空