catalog-update
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePurpose
目的
Update the code module index from AI-generated JSON. Only touches the code modules section of topics.md, not the knowledge files section.
通过AI生成的JSON更新代码模块索引。仅修改topics.md中的代码模块部分,不涉及知识文件部分。
Input
输入
JSON via stdin with schema:
json
{
"modules": [
{
"name": "module-name",
"summary": "One-line description",
"files": [
{"path": "src/file.py", "description": "What this file does"}
]
}
]
}通过标准输入(stdin)传入符合以下 schema 的JSON:
json
{
"modules": [
{
"name": "module-name",
"summary": "One-line description",
"files": [
{"path": "src/file.py", "description": "What this file does"}
]
}
]
}Required Flow
必要流程
bash
memory-hub catalog-update <<'EOF'
<modules JSON>
EOFAutomatically triggers after completion.
catalog.repairbash
memory-hub catalog-update <<'EOF'
<modules JSON>
EOF完成后自动触发。
catalog.repairOutput
输出
JSON envelope with , , and repair results.
data.modules_writtendata.modules_deleted包含、以及修复结果的JSON包。
data.modules_writtendata.modules_deletedError Handling
错误处理
- → no stdin provided
NO_INPUT - → stdin is not valid JSON
INVALID_JSON - →
INVALID_SCHEMAis not an arraymodules
- → 未提供标准输入
NO_INPUT - → 标准输入不是有效的JSON
INVALID_JSON - →
INVALID_SCHEMA不是数组modules