memory-write
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePurpose
用途
Write knowledge content to a bucket file and automatically update the topics.md knowledge index.
将知识内容写入存储桶文件,并自动更新topics.md知识索引。
Input
输入
- : pm | architect | dev | qa
bucket - : filename within the bucket
file - : topic name for topics.md index
--topic - : one-line description for topics.md
--summary - (optional): anchor tag for topics.md reference
--anchor - (optional):
--mode(default) orappendoverwrite - Content via stdin
- : pm | architect | dev | qa
bucket - : 存储桶内的文件名
file - : topics.md索引的主题名称
--topic - : topics.md的单行描述
--summary - (可选): topics.md引用的锚点标签
--anchor - (可选):
--mode(默认) 或appendoverwrite - 通过标准输入提供内容
Required Flow
必要流程
bash
memory-hub write <bucket> <file> \
--topic <name> --summary "<description>" \
[--anchor <anchor>] [--mode append|overwrite] <<'EOF'
<markdown content>
EOFbash
memory-hub write <bucket> <file> \
--topic <name> --summary "<description>" \
[--anchor <anchor>] [--mode append|overwrite] <<'EOF'
<markdown content>
EOFOutput
输出
JSON envelope with and write metadata.
data.bytes_written包含和写入元数据的JSON信封。
data.bytes_writtenError Handling
错误处理
- → invalid bucket name
INVALID_BUCKET - → no stdin content provided
NO_INPUT - → stdin content is empty
EMPTY_CONTENT
- → 无效的存储桶名称
INVALID_BUCKET - → 未提供标准输入内容
NO_INPUT - → 标准输入内容为空
EMPTY_CONTENT