dominds 1.23.0 → 1.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-control.js +4 -4
- package/dist/cli/webui.js +8 -1
- package/dist/dialog-display-state.d.ts +1 -0
- package/dist/dialog-display-state.js +36 -4
- package/dist/docs/encapsulated-taskdoc.md +11 -8
- package/dist/docs/encapsulated-taskdoc.zh.md +12 -9
- package/dist/llm/defaults.yaml +3 -0
- package/dist/llm/gen/mock.js +3 -6
- package/dist/llm/kernel-driver/flow.js +11 -13
- package/dist/llm/kernel-driver/loop.js +3 -1
- package/dist/llm/kernel-driver/reply-guidance.js +3 -7
- package/dist/llm/kernel-driver/types.d.ts +1 -0
- package/dist/minds/minds-i18n.js +2 -2
- package/dist/minds/system-prompt-parts.js +8 -8
- package/dist/persistence.js +1 -0
- package/dist/recovery/proceeding-drive.d.ts +1 -0
- package/dist/recovery/proceeding-drive.js +89 -0
- package/dist/runtime/driver-messages.js +4 -4
- package/dist/runtime/reply-prompt-copy.d.ts +5 -1
- package/dist/runtime/reply-prompt-copy.js +13 -3
- package/dist/server.d.ts +1 -0
- package/dist/server.js +68 -14
- package/dist/tools/cmd-runner.js +76 -17
- package/dist/tools/ctrl.d.ts +1 -1
- package/dist/tools/ctrl.js +29 -27
- package/dist/tools/prompts/control/en/principles.md +2 -2
- package/dist/tools/prompts/control/en/scenarios.md +25 -4
- package/dist/tools/prompts/control/en/tools.md +17 -8
- package/dist/tools/prompts/control/zh/principles.md +2 -2
- package/dist/tools/prompts/control/zh/scenarios.md +25 -4
- package/dist/tools/prompts/control/zh/tools.md +17 -8
- package/dist/utils/task-package.d.ts +1 -1
- package/dist/utils/task-package.js +3 -4
- package/dist/utils/taskdoc.js +18 -23
- package/package.json +1 -1
- package/webapp/dist/assets/{_basePickBy-CGhMqD96.js → _basePickBy-C3SVVywm.js} +3 -3
- package/webapp/dist/assets/{_basePickBy-CGhMqD96.js.map → _basePickBy-C3SVVywm.js.map} +1 -1
- package/webapp/dist/assets/{_baseUniq-XCMW7z1Y.js → _baseUniq-egNq6cCa.js} +2 -2
- package/webapp/dist/assets/{_baseUniq-XCMW7z1Y.js.map → _baseUniq-egNq6cCa.js.map} +1 -1
- package/webapp/dist/assets/{arc-B6fzk0T5.js → arc-CASAlRvm.js} +2 -2
- package/webapp/dist/assets/{arc-B6fzk0T5.js.map → arc-CASAlRvm.js.map} +1 -1
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-DmSI_GUt.js → architectureDiagram-2XIMDMQ5-B6n5FQmS.js} +7 -7
- package/webapp/dist/assets/{architectureDiagram-2XIMDMQ5-DmSI_GUt.js.map → architectureDiagram-2XIMDMQ5-B6n5FQmS.js.map} +1 -1
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-Bp0nb8IZ.js → blockDiagram-WCTKOSBZ-D2UGGjic.js} +7 -7
- package/webapp/dist/assets/{blockDiagram-WCTKOSBZ-Bp0nb8IZ.js.map → blockDiagram-WCTKOSBZ-D2UGGjic.js.map} +1 -1
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-gYpylqGb.js → c4Diagram-IC4MRINW-BOY_bQFP.js} +3 -3
- package/webapp/dist/assets/{c4Diagram-IC4MRINW-gYpylqGb.js.map → c4Diagram-IC4MRINW-BOY_bQFP.js.map} +1 -1
- package/webapp/dist/assets/{channel-BmQ3YyUn.js → channel-CZ_X09H1.js} +2 -2
- package/webapp/dist/assets/{channel-BmQ3YyUn.js.map → channel-CZ_X09H1.js.map} +1 -1
- package/webapp/dist/assets/{chunk-4BX2VUAB-B5pwFRwA.js → chunk-4BX2VUAB-BIwyAzZQ.js} +2 -2
- package/webapp/dist/assets/{chunk-4BX2VUAB-B5pwFRwA.js.map → chunk-4BX2VUAB-BIwyAzZQ.js.map} +1 -1
- package/webapp/dist/assets/{chunk-55IACEB6-CZf6oMWM.js → chunk-55IACEB6-zSjTFoCX.js} +2 -2
- package/webapp/dist/assets/{chunk-55IACEB6-CZf6oMWM.js.map → chunk-55IACEB6-zSjTFoCX.js.map} +1 -1
- package/webapp/dist/assets/{chunk-FMBD7UC4-yZWCDzVz.js → chunk-FMBD7UC4-CTpuRfdB.js} +2 -2
- package/webapp/dist/assets/{chunk-FMBD7UC4-yZWCDzVz.js.map → chunk-FMBD7UC4-CTpuRfdB.js.map} +1 -1
- package/webapp/dist/assets/{chunk-JSJVCQXG-Cg1ST73M.js → chunk-JSJVCQXG-CJ3DM4in.js} +2 -2
- package/webapp/dist/assets/{chunk-JSJVCQXG-Cg1ST73M.js.map → chunk-JSJVCQXG-CJ3DM4in.js.map} +1 -1
- package/webapp/dist/assets/{chunk-KX2RTZJC-ByGtlX9q.js → chunk-KX2RTZJC-B97EakhO.js} +2 -2
- package/webapp/dist/assets/{chunk-KX2RTZJC-ByGtlX9q.js.map → chunk-KX2RTZJC-B97EakhO.js.map} +1 -1
- package/webapp/dist/assets/{chunk-NQ4KR5QH-DoXvfhSY.js → chunk-NQ4KR5QH-5o1o5x0z.js} +4 -4
- package/webapp/dist/assets/{chunk-NQ4KR5QH-DoXvfhSY.js.map → chunk-NQ4KR5QH-5o1o5x0z.js.map} +1 -1
- package/webapp/dist/assets/{chunk-QZHKN3VN-2gX2qsHB.js → chunk-QZHKN3VN-D33FSIEb.js} +2 -2
- package/webapp/dist/assets/{chunk-QZHKN3VN-2gX2qsHB.js.map → chunk-QZHKN3VN-D33FSIEb.js.map} +1 -1
- package/webapp/dist/assets/{chunk-WL4C6EOR-L-9bPNxS.js → chunk-WL4C6EOR-C2InqFin.js} +6 -6
- package/webapp/dist/assets/{chunk-WL4C6EOR-L-9bPNxS.js.map → chunk-WL4C6EOR-C2InqFin.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-B79Oe3Df.js → classDiagram-VBA2DB6C-BfLZmK48.js} +7 -7
- package/webapp/dist/assets/{classDiagram-VBA2DB6C-B79Oe3Df.js.map → classDiagram-VBA2DB6C-BfLZmK48.js.map} +1 -1
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-B79Oe3Df.js → classDiagram-v2-RAHNMMFH-BfLZmK48.js} +7 -7
- package/webapp/dist/assets/{classDiagram-v2-RAHNMMFH-B79Oe3Df.js.map → classDiagram-v2-RAHNMMFH-BfLZmK48.js.map} +1 -1
- package/webapp/dist/assets/{clone-DvlY9Sdn.js → clone-BSCHnHfl.js} +2 -2
- package/webapp/dist/assets/{clone-DvlY9Sdn.js.map → clone-BSCHnHfl.js.map} +1 -1
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CtkGd0W6.js → cose-bilkent-S5V4N54A-CeQ1jAJJ.js} +2 -2
- package/webapp/dist/assets/{cose-bilkent-S5V4N54A-CtkGd0W6.js.map → cose-bilkent-S5V4N54A-CeQ1jAJJ.js.map} +1 -1
- package/webapp/dist/assets/{dagre-KLK3FWXG-B3W6QTXQ.js → dagre-KLK3FWXG-WUuNYzcK.js} +7 -7
- package/webapp/dist/assets/{dagre-KLK3FWXG-B3W6QTXQ.js.map → dagre-KLK3FWXG-WUuNYzcK.js.map} +1 -1
- package/webapp/dist/assets/{diagram-E7M64L7V-B6-J_E5Q.js → diagram-E7M64L7V-jOVCIExP.js} +8 -8
- package/webapp/dist/assets/{diagram-E7M64L7V-B6-J_E5Q.js.map → diagram-E7M64L7V-jOVCIExP.js.map} +1 -1
- package/webapp/dist/assets/{diagram-IFDJBPK2-C-PH_Yx3.js → diagram-IFDJBPK2-cCeQqotA.js} +7 -7
- package/webapp/dist/assets/{diagram-IFDJBPK2-C-PH_Yx3.js.map → diagram-IFDJBPK2-cCeQqotA.js.map} +1 -1
- package/webapp/dist/assets/{diagram-P4PSJMXO-CB5xXDup.js → diagram-P4PSJMXO-DjAYFRLv.js} +7 -7
- package/webapp/dist/assets/{diagram-P4PSJMXO-CB5xXDup.js.map → diagram-P4PSJMXO-DjAYFRLv.js.map} +1 -1
- package/webapp/dist/assets/{erDiagram-INFDFZHY-CuAhTGVU.js → erDiagram-INFDFZHY-Dl_6U5fV.js} +5 -5
- package/webapp/dist/assets/{erDiagram-INFDFZHY-CuAhTGVU.js.map → erDiagram-INFDFZHY-Dl_6U5fV.js.map} +1 -1
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-D3cIOfGj.js → flowDiagram-PKNHOUZH-D80nrZ3S.js} +7 -7
- package/webapp/dist/assets/{flowDiagram-PKNHOUZH-D3cIOfGj.js.map → flowDiagram-PKNHOUZH-D80nrZ3S.js.map} +1 -1
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-CSFhVYXV.js → ganttDiagram-A5KZAMGK-T3WdMrgj.js} +3 -3
- package/webapp/dist/assets/{ganttDiagram-A5KZAMGK-CSFhVYXV.js.map → ganttDiagram-A5KZAMGK-T3WdMrgj.js.map} +1 -1
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-CiEaxACG.js → gitGraphDiagram-K3NZZRJ6-ifV-jkKL.js} +8 -8
- package/webapp/dist/assets/{gitGraphDiagram-K3NZZRJ6-CiEaxACG.js.map → gitGraphDiagram-K3NZZRJ6-ifV-jkKL.js.map} +1 -1
- package/webapp/dist/assets/{graph-CYGALRuy.js → graph-D5jmnb35.js} +3 -3
- package/webapp/dist/assets/{graph-CYGALRuy.js.map → graph-D5jmnb35.js.map} +1 -1
- package/webapp/dist/assets/{index-BTazqQrV.js → index-CGbZlct2.js} +503 -142
- package/webapp/dist/assets/{index-BTazqQrV.js.map → index-CGbZlct2.js.map} +1 -1
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-CiWJjQyU.js → infoDiagram-LFFYTUFH-C340CY5x.js} +6 -6
- package/webapp/dist/assets/{infoDiagram-LFFYTUFH-CiWJjQyU.js.map → infoDiagram-LFFYTUFH-C340CY5x.js.map} +1 -1
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-MlIIUO7o.js → ishikawaDiagram-PHBUUO56-Bu4RsELK.js} +2 -2
- package/webapp/dist/assets/{ishikawaDiagram-PHBUUO56-MlIIUO7o.js.map → ishikawaDiagram-PHBUUO56-Bu4RsELK.js.map} +1 -1
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-BBqwkA3d.js → journeyDiagram-4ABVD52K-Dvv3ypKA.js} +5 -5
- package/webapp/dist/assets/{journeyDiagram-4ABVD52K-BBqwkA3d.js.map → journeyDiagram-4ABVD52K-Dvv3ypKA.js.map} +1 -1
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-BS4GzDbo.js → kanban-definition-K7BYSVSG-D_rsetjW.js} +3 -3
- package/webapp/dist/assets/{kanban-definition-K7BYSVSG-BS4GzDbo.js.map → kanban-definition-K7BYSVSG-D_rsetjW.js.map} +1 -1
- package/webapp/dist/assets/{layout-DaJO-1DW.js → layout-CLmOfwnS.js} +5 -5
- package/webapp/dist/assets/{layout-DaJO-1DW.js.map → layout-CLmOfwnS.js.map} +1 -1
- package/webapp/dist/assets/{linear-SWy2Cl7G.js → linear-DFAmViqi.js} +2 -2
- package/webapp/dist/assets/{linear-SWy2Cl7G.js.map → linear-DFAmViqi.js.map} +1 -1
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-B_gNrT3l.js → mindmap-definition-YRQLILUH-Ce3_czeS.js} +4 -4
- package/webapp/dist/assets/{mindmap-definition-YRQLILUH-B_gNrT3l.js.map → mindmap-definition-YRQLILUH-Ce3_czeS.js.map} +1 -1
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-CVh3lLBA.js → pieDiagram-SKSYHLDU-U6_un5Sc.js} +8 -8
- package/webapp/dist/assets/{pieDiagram-SKSYHLDU-CVh3lLBA.js.map → pieDiagram-SKSYHLDU-U6_un5Sc.js.map} +1 -1
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-D0zAkVD7.js → quadrantDiagram-337W2JSQ-DmVJQItS.js} +3 -3
- package/webapp/dist/assets/{quadrantDiagram-337W2JSQ-D0zAkVD7.js.map → quadrantDiagram-337W2JSQ-DmVJQItS.js.map} +1 -1
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP--CTFD60w.js → requirementDiagram-Z7DCOOCP-BkNhSY-g.js} +4 -4
- package/webapp/dist/assets/{requirementDiagram-Z7DCOOCP--CTFD60w.js.map → requirementDiagram-Z7DCOOCP-BkNhSY-g.js.map} +1 -1
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-XZnViaAX.js → sankeyDiagram-WA2Y5GQK-E3UEy5SX.js} +2 -2
- package/webapp/dist/assets/{sankeyDiagram-WA2Y5GQK-XZnViaAX.js.map → sankeyDiagram-WA2Y5GQK-E3UEy5SX.js.map} +1 -1
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-BWAMhn_x.js → sequenceDiagram-2WXFIKYE-k0w9WKAO.js} +4 -4
- package/webapp/dist/assets/{sequenceDiagram-2WXFIKYE-BWAMhn_x.js.map → sequenceDiagram-2WXFIKYE-k0w9WKAO.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-RAJIS63D--jsLD0Dg.js → stateDiagram-RAJIS63D-DRgdJrlx.js} +9 -9
- package/webapp/dist/assets/{stateDiagram-RAJIS63D--jsLD0Dg.js.map → stateDiagram-RAJIS63D-DRgdJrlx.js.map} +1 -1
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-DUG9vyI5.js → stateDiagram-v2-FVOUBMTO-edtkX9x6.js} +5 -5
- package/webapp/dist/assets/{stateDiagram-v2-FVOUBMTO-DUG9vyI5.js.map → stateDiagram-v2-FVOUBMTO-edtkX9x6.js.map} +1 -1
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-BROLp1hL.js → timeline-definition-YZTLITO2-D0zyXyNL.js} +3 -3
- package/webapp/dist/assets/{timeline-definition-YZTLITO2-BROLp1hL.js.map → timeline-definition-YZTLITO2-D0zyXyNL.js.map} +1 -1
- package/webapp/dist/assets/{treemap-KZPCXAKY-BXuIlbYo.js → treemap-KZPCXAKY-CglsYqbQ.js} +5 -5
- package/webapp/dist/assets/{treemap-KZPCXAKY-BXuIlbYo.js.map → treemap-KZPCXAKY-CglsYqbQ.js.map} +1 -1
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-BXWd8gBB.js → vennDiagram-LZ73GAT5-DsUizzvt.js} +2 -2
- package/webapp/dist/assets/{vennDiagram-LZ73GAT5-BXWd8gBB.js.map → vennDiagram-LZ73GAT5-DsUizzvt.js.map} +1 -1
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-DR5z9o6h.js → xychartDiagram-JWTSCODW-DvYQ4zKY.js} +3 -3
- package/webapp/dist/assets/{xychartDiagram-JWTSCODW-DR5z9o6h.js.map → xychartDiagram-JWTSCODW-DvYQ4zKY.js.map} +1 -1
- package/webapp/dist/index.html +1 -1
package/dist/tools/ctrl.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* - change_mind: Main Dialog only; update a `.tsk/` Taskdoc section without starting a new course
|
|
19
19
|
* - mind_more: Main Dialog only; append entries to a `.tsk/` Taskdoc section without starting a new course
|
|
20
20
|
* - never_mind: Main Dialog only; delete a `.tsk/` Taskdoc section file without starting a new course
|
|
21
|
-
* - recall_taskdoc: Read a Taskdoc section from `*.tsk/` by
|
|
21
|
+
* - recall_taskdoc: Read a Taskdoc section from `*.tsk/` by selector and optional category
|
|
22
22
|
*
|
|
23
23
|
* USAGE CONTEXT:
|
|
24
24
|
* Can both be triggered by an agent autonomously, or by human with role='user' msg,
|
|
@@ -372,8 +372,8 @@ function getCtrlMessages(language) {
|
|
|
372
372
|
invalidFormatDoMind: '参数格式不对。用法:do_mind({ selector: string, category?: string, content: string })',
|
|
373
373
|
invalidFormatChangeMind: '参数格式不对。用法:change_mind({ selector: string, category?: string, content: string, previous_content_hash: string })',
|
|
374
374
|
tooManyArgsChangeMind: '参数格式不对。用法:change_mind({ selector: string, category?: string, content: string, previous_content_hash: string })',
|
|
375
|
-
taskDocPreviousContentHashRequired: '错误:change_mind 需要 previous_content_hash
|
|
376
|
-
taskDocPreviousContentHashInvalid: '错误:previous_content_hash 格式无效。它必须是 recall_taskdoc
|
|
375
|
+
taskDocPreviousContentHashRequired: '错误:change_mind 需要 previous_content_hash。请先调用 recall_taskdoc 显式取得当前章节的 content_hash,合并原有内容后再整段替换;没有把握时用 mind_more 追加小条目。',
|
|
376
|
+
taskDocPreviousContentHashInvalid: '错误:previous_content_hash 格式无效。它必须是 recall_taskdoc 返回的 crc32:<8位十六进制> content_hash。',
|
|
377
377
|
taskDocContentHashMismatch: (relativePath, currentContentHash) => `错误:${relativePath} 的内容哈希不匹配,说明该章节已变化或你没有基于当前内容改写。\n` +
|
|
378
378
|
`当前 content_hash:${currentContentHash}\n\n` +
|
|
379
379
|
`请重新读取/回顾当前章节内容,并只在已充分合并原有内容后重试。若新内容会冲掉、删除或实质替换原有内容,必须满足其一:\n` +
|
|
@@ -384,7 +384,7 @@ function getCtrlMessages(language) {
|
|
|
384
384
|
invalidFormatNeverMind: '参数格式不对。用法:never_mind({ selector: string, category?: string })',
|
|
385
385
|
mindMoreItemsRequired: '需要提供要追加的条目(items),且每一项都必须是非空字符串。\n' +
|
|
386
386
|
'示例:mind_more({"items":["- 下一步:复核验证结果(详见 <文档路径>#<章节>)","- 阻塞:等待 API 验收口径确认"]})',
|
|
387
|
-
invalidFormatRecallTaskdoc: '参数格式不对。用法:recall_taskdoc({
|
|
387
|
+
invalidFormatRecallTaskdoc: '参数格式不对。用法:recall_taskdoc({ selector: string, category?: string })',
|
|
388
388
|
taskDocContentRequired: '需要提供差遣牒内容(content)。\n' +
|
|
389
389
|
'示例:\n' +
|
|
390
390
|
'```json\n' +
|
|
@@ -397,15 +397,14 @@ function getCtrlMessages(language) {
|
|
|
397
397
|
pathMustBeWithinWorkspace: '路径必须位于 rtws(运行时工作区)内',
|
|
398
398
|
invalidTaskDocPath: (taskDocPath) => `差遣牒路径 '${taskDocPath}' 无效。应为 *.tsk/ 目录。`,
|
|
399
399
|
selectorRequired: '需要提供选择器(selector)。',
|
|
400
|
-
categoryRequired: '需要提供章节目录(category)。',
|
|
401
400
|
invalidSelector: (selector) => `选择器 '${selector}' 无效。可用:顶层 goals | constraints | progress;bearinmind 下 contracts | acceptance | grants | runbook | decisions | risks;或任意标识符(如 ux.checklist)。`,
|
|
402
401
|
invalidCategory: (category) => `目录名 '${category}' 无效。需匹配 ^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]*)*$。`,
|
|
403
402
|
invalidCategorySelector: (selector) => `选择器 '${selector}' 无效。需匹配 ^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]*)*$。`,
|
|
404
403
|
topLevelSelectorRequiresNoCategory: (category, selector) => `选择器 '${selector}' 是顶层保留分段(goals/constraints/progress),不能与 category='${category}' 一起用。`,
|
|
405
404
|
bearInMindSelectorRequiresBearInMindCategory: (category, selector) => `选择器 '${selector}' 只能在 category='bearinmind' 下用(当前 category='${category}')。`,
|
|
406
|
-
taskDocSectionAlreadyExists: (relativePath) => `无法新增:${relativePath}
|
|
405
|
+
taskDocSectionAlreadyExists: (relativePath) => `无法新增:${relativePath} 已存在。若确有把握要改写已有章节,请先用 recall_taskdoc 取得当前 content_hash,再使用 change_mind({"selector":"<selector>","content":"...","previous_content_hash":"crc32:..."})。`,
|
|
407
406
|
taskDocSectionChangeMissing: (relativePath) => `无法修改:${relativePath} 不存在。若要新增章节,请使用 do_mind({ ... })。`,
|
|
408
|
-
taskDocSectionMissing: (relativePath) => `未找到:${relativePath}。\n\n新增章节请使用 do_mind;已有章节追加小条目用 mind_more
|
|
407
|
+
taskDocSectionMissing: (relativePath) => `未找到:${relativePath}。\n\n新增章节请使用 do_mind;已有章节追加小条目用 mind_more;改写已有章节时先用 recall_taskdoc 取得当前 content_hash,再用 change_mind 带上它:\n- do_mind({"category":"<category>","selector":"<selector>","content":"..."})\n- mind_more({"category":"<category>","selector":"<selector>","items":["..."]})\n- recall_taskdoc({"category":"<category>","selector":"<selector>"})\n- change_mind({"category":"<category>","selector":"<selector>","content":"...","previous_content_hash":"crc32:..."})`,
|
|
409
408
|
taskDocSectionDeleteMissing: (relativePath) => `无法删除:${relativePath} 不存在。请先确认要删除的差遣牒章节。`,
|
|
410
409
|
clearedCoursePrompt: (nextCourse) => (0, driver_messages_1.formatNewCourseStartPrompt)('zh', { nextCourse, source: 'clear_mind' }),
|
|
411
410
|
};
|
|
@@ -422,8 +421,8 @@ function getCtrlMessages(language) {
|
|
|
422
421
|
invalidFormatDoMind: 'Error: Invalid args. Use: do_mind({ selector: string, category?: string, content: string })',
|
|
423
422
|
invalidFormatChangeMind: 'Error: Invalid args. Use: change_mind({ selector: string, category?: string, content: string, previous_content_hash: string })',
|
|
424
423
|
tooManyArgsChangeMind: 'Error: Invalid args. Use: change_mind({ selector: string, category?: string, content: string, previous_content_hash: string })',
|
|
425
|
-
taskDocPreviousContentHashRequired: 'Error: change_mind requires previous_content_hash.
|
|
426
|
-
taskDocPreviousContentHashInvalid: 'Error: invalid previous_content_hash. It must be the
|
|
424
|
+
taskDocPreviousContentHashRequired: 'Error: change_mind requires previous_content_hash. Call recall_taskdoc first to get the current section content_hash, merge the existing content, then replace the full section. If unsure, use mind_more for small append-only updates.',
|
|
425
|
+
taskDocPreviousContentHashInvalid: 'Error: invalid previous_content_hash. It must be the crc32:<8 hex chars> content_hash returned by recall_taskdoc.',
|
|
427
426
|
taskDocContentHashMismatch: (relativePath, currentContentHash) => `Error: content hash mismatch for \`${relativePath}\`; the section changed or your replacement was not based on the current content.\n` +
|
|
428
427
|
`Current content_hash: ${currentContentHash}\n\n` +
|
|
429
428
|
`Re-read/review the current section and retry only after fully merging existing content. If the new content would overwrite, delete, or materially replace existing content, one of these must be true:\n` +
|
|
@@ -434,7 +433,7 @@ function getCtrlMessages(language) {
|
|
|
434
433
|
invalidFormatNeverMind: 'Error: Invalid args. Use: never_mind({ selector: string, category?: string })',
|
|
435
434
|
mindMoreItemsRequired: 'Error: items are required, and every item must be a non-empty string.\n' +
|
|
436
435
|
'Example: mind_more({"items":["- Next: review verification results (details: <doc-path>#<section>)","- Blocker: API acceptance criteria pending"]})',
|
|
437
|
-
invalidFormatRecallTaskdoc: 'Error: Invalid args. Use: recall_taskdoc({
|
|
436
|
+
invalidFormatRecallTaskdoc: 'Error: Invalid args. Use: recall_taskdoc({ selector: string, category?: string })',
|
|
438
437
|
taskDocContentRequired: 'Error: Taskdoc content is required (content).\n' +
|
|
439
438
|
'Copy/paste example:\n' +
|
|
440
439
|
'```json\n' +
|
|
@@ -447,15 +446,14 @@ function getCtrlMessages(language) {
|
|
|
447
446
|
pathMustBeWithinWorkspace: 'Error: Path must be within rtws (runtime workspace)',
|
|
448
447
|
invalidTaskDocPath: (taskDocPath) => `Error: Invalid Taskdoc path '${taskDocPath}'. Expected a \`*.tsk/\` directory.`,
|
|
449
448
|
selectorRequired: 'Error: selector is required.',
|
|
450
|
-
categoryRequired: 'Error: category is required.',
|
|
451
449
|
invalidSelector: (selector) => `Error: Invalid selector '${selector}'. Use: top-level goals|constraints|progress; under bearinmind: contracts|acceptance|grants|runbook|decisions|risks; or any identifier (e.g. \`ux.checklist\`).`,
|
|
452
450
|
invalidCategory: (category) => `Error: Invalid category '${category}'. Must match \`^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)*$\`.`,
|
|
453
451
|
invalidCategorySelector: (selector) => `Error: Invalid category selector '${selector}'. Must match \`^[a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)*$\`.`,
|
|
454
452
|
topLevelSelectorRequiresNoCategory: (category, selector) => `Error: Selector '${selector}' is reserved for top-level sections (goals/constraints/progress) and must not be used with category='${category}'.`,
|
|
455
453
|
bearInMindSelectorRequiresBearInMindCategory: (category, selector) => `Error: Selector '${selector}' is only valid under category='bearinmind' (got category='${category}').`,
|
|
456
|
-
taskDocSectionAlreadyExists: (relativePath) => `Cannot add: \`${relativePath}\` already exists. If you are sure you need to rewrite an existing section,
|
|
454
|
+
taskDocSectionAlreadyExists: (relativePath) => `Cannot add: \`${relativePath}\` already exists. If you are sure you need to rewrite an existing section, call \`recall_taskdoc\` for the current content_hash first, then use \`change_mind({"selector":"<selector>","content":"...","previous_content_hash":"crc32:..."})\`.`,
|
|
457
455
|
taskDocSectionChangeMissing: (relativePath) => `Cannot change: \`${relativePath}\` does not exist. To create a new section, use \`do_mind({ ... })\`.`,
|
|
458
|
-
taskDocSectionMissing: (relativePath) => `Not found: \`${relativePath}\`.\n\nUse \`do_mind\` to create a section, \`mind_more\` for small append-only updates to existing sections, and \`change_mind\` with the current content_hash to rewrite existing sections:\n- \`do_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\"})\`\n- \`mind_more({\"category\":\"<category>\",\"selector\":\"<selector>\",\"items\":[\"...\"]})\`\n- \`change_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\",\"previous_content_hash\":\"
|
|
456
|
+
taskDocSectionMissing: (relativePath) => `Not found: \`${relativePath}\`.\n\nUse \`do_mind\` to create a section, \`mind_more\` for small append-only updates to existing sections, and \`recall_taskdoc\` then \`change_mind\` with the current content_hash to rewrite existing sections:\n- \`do_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\"})\`\n- \`mind_more({\"category\":\"<category>\",\"selector\":\"<selector>\",\"items\":[\"...\"]})\`\n- \`recall_taskdoc({\"category\":\"<category>\",\"selector\":\"<selector>\"})\`\n- \`change_mind({\"category\":\"<category>\",\"selector\":\"<selector>\",\"content\":\"...\",\"previous_content_hash\":\"crc32:...\"})\``,
|
|
459
457
|
taskDocSectionDeleteMissing: (relativePath) => `Cannot delete: \`${relativePath}\` does not exist. Check the Taskdoc section target first.`,
|
|
460
458
|
clearedCoursePrompt: (nextCourse) => (0, driver_messages_1.formatNewCourseStartPrompt)('en', { nextCourse, source: 'clear_mind' }),
|
|
461
459
|
};
|
|
@@ -750,7 +748,7 @@ exports.changeMindTool = {
|
|
|
750
748
|
content: { type: 'string', description: 'New section content.' },
|
|
751
749
|
previous_content_hash: {
|
|
752
750
|
type: 'string',
|
|
753
|
-
description: 'Content hash of the current section being replaced.
|
|
751
|
+
description: 'Content hash of the current section being replaced. Call recall_taskdoc first and use the returned content_hash.',
|
|
754
752
|
},
|
|
755
753
|
},
|
|
756
754
|
},
|
|
@@ -784,7 +782,7 @@ exports.changeMindTool = {
|
|
|
784
782
|
const previousContentHash = typeof previousContentHashValue === 'string' ? previousContentHashValue.trim() : '';
|
|
785
783
|
if (!previousContentHash)
|
|
786
784
|
return (0, tool_1.toolFailure)(t.taskDocPreviousContentHashRequired);
|
|
787
|
-
if (!/^
|
|
785
|
+
if (!/^crc32:[0-9a-f]{8}$/u.test(previousContentHash)) {
|
|
788
786
|
return (0, tool_1.toolFailure)(t.taskDocPreviousContentHashInvalid);
|
|
789
787
|
}
|
|
790
788
|
// Taskdoc path is immutable for the dialog lifecycle.
|
|
@@ -1166,18 +1164,24 @@ exports.mindMoreTool = {
|
|
|
1166
1164
|
exports.recallTaskdocTool = {
|
|
1167
1165
|
type: 'func',
|
|
1168
1166
|
name: 'recall_taskdoc',
|
|
1169
|
-
description: 'Read one Taskdoc section
|
|
1167
|
+
description: 'Read one Taskdoc section and return its content_hash.',
|
|
1170
1168
|
descriptionI18n: {
|
|
1171
|
-
en: 'Read one Taskdoc section
|
|
1172
|
-
zh: '
|
|
1169
|
+
en: 'Read one Taskdoc section and return its content_hash.',
|
|
1170
|
+
zh: '读取一段差遣牒章节并返回 content_hash。',
|
|
1173
1171
|
},
|
|
1174
1172
|
parameters: {
|
|
1175
1173
|
type: 'object',
|
|
1176
1174
|
additionalProperties: false,
|
|
1177
|
-
required: ['
|
|
1175
|
+
required: ['selector'],
|
|
1178
1176
|
properties: {
|
|
1179
|
-
category: {
|
|
1180
|
-
|
|
1177
|
+
category: {
|
|
1178
|
+
type: 'string',
|
|
1179
|
+
description: 'Optional category directory within the Taskdoc. Omit for top-level goals|constraints|progress.',
|
|
1180
|
+
},
|
|
1181
|
+
selector: {
|
|
1182
|
+
type: 'string',
|
|
1183
|
+
description: 'Section selector. Top-level: goals|constraints|progress. With category: selector within that category.',
|
|
1184
|
+
},
|
|
1181
1185
|
},
|
|
1182
1186
|
},
|
|
1183
1187
|
argsValidation: 'dominds',
|
|
@@ -1185,9 +1189,10 @@ exports.recallTaskdocTool = {
|
|
|
1185
1189
|
const language = (0, work_language_1.getWorkLanguage)();
|
|
1186
1190
|
const t = getCtrlMessages(language);
|
|
1187
1191
|
const categoryValue = args['category'];
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1192
|
+
if (categoryValue !== undefined && typeof categoryValue !== 'string') {
|
|
1193
|
+
return (0, tool_1.toolFailure)(t.invalidFormatRecallTaskdoc);
|
|
1194
|
+
}
|
|
1195
|
+
const category = typeof categoryValue === 'string' ? categoryValue.trim() : undefined;
|
|
1191
1196
|
const selectorValue = args['selector'];
|
|
1192
1197
|
const selector = typeof selectorValue === 'string' ? selectorValue.trim() : '';
|
|
1193
1198
|
if (selector === '')
|
|
@@ -1228,9 +1233,6 @@ exports.recallTaskdocTool = {
|
|
|
1228
1233
|
}
|
|
1229
1234
|
}
|
|
1230
1235
|
const target = parsed.target;
|
|
1231
|
-
if (target.kind === 'top_level') {
|
|
1232
|
-
return (0, tool_1.toolFailure)(t.invalidFormatRecallTaskdoc);
|
|
1233
|
-
}
|
|
1234
1236
|
const relPath = (0, task_package_1.taskPackageRelativePathForChangeMindTarget)(target);
|
|
1235
1237
|
const sectionPath = path.resolve(fullPath, relPath);
|
|
1236
1238
|
if (!isPathWithinDirectory(sectionPath, fullPath)) {
|
|
@@ -132,7 +132,7 @@ Taskdoc is a **task contract** and the task's **team-shared source of current tr
|
|
|
132
132
|
|
|
133
133
|
- Keep concise: reminders are often 1-3 items; prefer `update_reminder` to compress/merge
|
|
134
134
|
- Separate carriers: information that must synchronize the team's current effective state, key decisions, next steps, or still-active blockers belongs in `progress`, the quasi-real-time task bulletin board; reminders keep local resume details
|
|
135
|
-
- Team-facing: keep `progress` scannable and centered on what is still effective now; do not let it degrade into a personal log, raw chronology, scratchpad, or stale history pile. Use `mind_more` for small additions and `change_mind` with the
|
|
135
|
+
- Team-facing: keep `progress` scannable and centered on what is still effective now; do not let it degrade into a personal log, raw chronology, scratchpad, or stale history pile. Use `mind_more` for small additions; when cleanup/reordering/compression is needed, call `recall_taskdoc` first and then use `change_mind` with the returned `content_hash` as `previous_content_hash`
|
|
136
136
|
- Condense when needed: `mind_more` is not the default bookkeeping move. If one topic already has several phase notes, prefer `change_mind` to merge them into the current summary; put the detailed expansion in formal rtws documentation and keep a document pointer in Taskdoc. If the replacement would overwrite existing content, proceed only with direct human confirmation or after applying a human-approved SOP/acceptance standard that considers the existing content
|
|
137
137
|
- Collapse before clearing: the Main Dialog first records undocumented discussion details the next course needs to know into the appropriate Taskdoc sections, then creates a structured continuation-package reminder; a Side Dialog must not maintain Taskdoc or draft Taskdoc update proposals, and should directly maintain sufficiently detailed continuation-package reminders. If the current course is already under system remediation, rough multi-reminder carry-over is acceptable but must be reconciled first in the new course
|
|
138
138
|
- Avoid raw-material dumps: do not paste long logs or large tool outputs into reminders
|
|
@@ -156,7 +156,7 @@ Taskdoc is a **task contract** and the task's **team-shared source of current tr
|
|
|
156
156
|
## Limitations and Notes
|
|
157
157
|
|
|
158
158
|
1. `dialog` reminders end with the dialog; `personal` reminders stay visible in all later dialogs you lead
|
|
159
|
-
2. Use `do_mind` to create missing Taskdoc sections; use `mind_more` for small Taskdoc additions; use `change_mind` for full-section replacement of existing sections after merging existing content and
|
|
159
|
+
2. Use `do_mind` to create missing Taskdoc sections; use `mind_more` for small Taskdoc additions; use `change_mind` for full-section replacement of existing sections only after merging existing content and calling `recall_taskdoc` for the current `content_hash`; use `never_mind` when a whole section file should be deleted. Do not treat `mind_more` as a chronology tool; when cleanup, stale-entry removal, or same-topic consolidation is needed, use `recall_taskdoc` then `change_mind`
|
|
160
160
|
3. `do_mind` / `mind_more` / `change_mind` / `never_mind` do not start a new course
|
|
161
161
|
4. A continuation-package reminder should keep only details still not covered by Taskdoc but easy to lose during resume; in the Main Dialog, undocumented discussion details from current dialog history that the next course needs to know should be written to the appropriate Taskdoc sections first; in a Side Dialog under caution/critical remediation, maintain sufficiently detailed continuation-package reminders only
|
|
162
162
|
5. Do not turn `personal` reminders into a long-term fact dump; move durable knowledge into `personal_memory`
|
|
@@ -130,11 +130,15 @@ mind_more({
|
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
// Full-section replacement when cleanup, reordering, same-topic consolidation, or chronology compression is needed
|
|
133
|
+
recall_taskdoc({
|
|
134
|
+
selector: 'progress',
|
|
135
|
+
});
|
|
136
|
+
|
|
133
137
|
change_mind({
|
|
134
138
|
selector: 'progress',
|
|
135
139
|
content:
|
|
136
140
|
'## Progress\n\n### Current Effective State\n- The memory-carrier boundary cleanup is complete; next we strengthen the Taskdoc bulletin-board semantics; details: <doc-path>#<section>\n\n### Decisions In Effect\n- `personal_memory` is no longer treated as a short-term junk drawer\n- `team_memory` now carries only long-lived team conventions and invariants\n\n### Next Step\n- Add stronger `progress` bulletin-board guidance in control / team_mgmt manuals\n\n### Still-Active Blockers\n- None',
|
|
137
|
-
previous_content_hash: '
|
|
141
|
+
previous_content_hash: 'crc32:...',
|
|
138
142
|
});
|
|
139
143
|
```
|
|
140
144
|
|
|
@@ -147,11 +151,15 @@ Update task objectives.
|
|
|
147
151
|
### Example
|
|
148
152
|
|
|
149
153
|
```typescript
|
|
154
|
+
recall_taskdoc({
|
|
155
|
+
selector: 'goals',
|
|
156
|
+
});
|
|
157
|
+
|
|
150
158
|
change_mind({
|
|
151
159
|
selector: 'goals',
|
|
152
160
|
content:
|
|
153
161
|
'## Goals\n\n- [ ] Create all toolset manuals\n - [x] ws_mod\n - [x] team_mgmt\n - [x] personal_memory\n - [ ] control (In Progress)\n- [ ] Write tool descriptions',
|
|
154
|
-
previous_content_hash: '
|
|
162
|
+
previous_content_hash: 'crc32:...',
|
|
155
163
|
});
|
|
156
164
|
```
|
|
157
165
|
|
|
@@ -164,11 +172,15 @@ Update task constraints.
|
|
|
164
172
|
### Example
|
|
165
173
|
|
|
166
174
|
```typescript
|
|
175
|
+
recall_taskdoc({
|
|
176
|
+
selector: 'constraints',
|
|
177
|
+
});
|
|
178
|
+
|
|
167
179
|
change_mind({
|
|
168
180
|
selector: 'constraints',
|
|
169
181
|
content:
|
|
170
182
|
'## Constraints\n\n- man function must dynamically filter toolsets based on team.yaml\n- Runtime effective: Changes to team.yaml immediately visible\n- Toolset names use underscore format\n- New constraint: Each toolset needs 5 topics × 2 languages',
|
|
171
|
-
previous_content_hash: '
|
|
183
|
+
previous_content_hash: 'crc32:...',
|
|
172
184
|
});
|
|
173
185
|
```
|
|
174
186
|
|
|
@@ -181,6 +193,11 @@ Read taskdoc chapter content.
|
|
|
181
193
|
### Example
|
|
182
194
|
|
|
183
195
|
```typescript
|
|
196
|
+
// Top-level sections are injected as content, but recall_taskdoc returns their content_hash
|
|
197
|
+
recall_taskdoc({
|
|
198
|
+
selector: 'progress',
|
|
199
|
+
});
|
|
200
|
+
|
|
184
201
|
// Read bearinmind runbook
|
|
185
202
|
recall_taskdoc({
|
|
186
203
|
category: 'bearinmind',
|
|
@@ -204,10 +221,14 @@ Maintain taskdoc integrity and consistency, and keep `progress` as a team-scanna
|
|
|
204
221
|
|
|
205
222
|
```typescript
|
|
206
223
|
// Update progress (keep goals / constraints / progress consistent)
|
|
224
|
+
recall_taskdoc({
|
|
225
|
+
selector: 'progress',
|
|
226
|
+
});
|
|
227
|
+
|
|
207
228
|
change_mind({
|
|
208
229
|
selector: 'progress',
|
|
209
230
|
content:
|
|
210
231
|
'## Progress\n\n### Current Effective State\n- The boundary wording has been propagated into handbook sources and tests; details: <doc-path>#<section>\n\n### Decisions In Effect\n- role assets / personal_memory / team_memory / Taskdoc-progress / reminders now have separated responsibilities\n\n### Next Step\n- Re-verify control manual wording, Taskdoc display text, and boundary tests\n\n### Still-Active Blockers\n- None',
|
|
211
|
-
previous_content_hash: '
|
|
232
|
+
previous_content_hash: 'crc32:...',
|
|
212
233
|
});
|
|
213
234
|
```
|
|
@@ -150,7 +150,7 @@ Create a new Taskdoc section. It fails if the target section already exists.
|
|
|
150
150
|
|
|
151
151
|
- Create-only: it does not overwrite existing content
|
|
152
152
|
- Use this for missing resident sections or new extra sections that preserve details without touching existing Taskdoc text
|
|
153
|
-
- If the target already exists and only needs small additions, use `mind_more`; if it needs a full rewrite/merge, use `change_mind` with the
|
|
153
|
+
- If the target already exists and only needs small additions, use `mind_more`; if it needs a full rewrite/merge, call `recall_taskdoc` first and then use `change_mind` with the returned `content_hash` as `previous_content_hash`
|
|
154
154
|
- Does not start a new course
|
|
155
155
|
- Changes visible to all teammates
|
|
156
156
|
|
|
@@ -163,7 +163,7 @@ Update taskdoc chapter.
|
|
|
163
163
|
- `selector` (required): Chapter selector (goals/constraints/progress)
|
|
164
164
|
- `category` (optional): Extra section directory; with `selector`, targets `<category>/<selector>.md`
|
|
165
165
|
- `content` (required): New content (full section replacement)
|
|
166
|
-
- `previous_content_hash` (required): The current section `content_hash`
|
|
166
|
+
- `previous_content_hash` (required): The current section `content_hash` returned by `recall_taskdoc`
|
|
167
167
|
|
|
168
168
|
**Returns:**
|
|
169
169
|
|
|
@@ -208,7 +208,7 @@ mind_more({
|
|
|
208
208
|
- Append-only: it does not deduplicate, rewrite, or compress old content
|
|
209
209
|
- Good for adding one or two still-effective states, decisions, next steps, or blockers to `progress`
|
|
210
210
|
- Not for appending every investigation step, long log, full plan, or acceptance record as a chronology; those details belong in formal rtws documentation, while Taskdoc keeps the summary and document pointer
|
|
211
|
-
- If stale entries must be removed, reordered, or compressed, use `change_mind` with the
|
|
211
|
+
- If stale entries must be removed, reordered, or compressed, call `recall_taskdoc` first and then use `change_mind` with the returned `content_hash` as `previous_content_hash` for a full-section replacement; if a whole section file should be deleted, use `never_mind`
|
|
212
212
|
- When one topic already has several phase notes, prefer `change_mind` to merge them into a concise current announcement instead of continuing to call `mind_more`
|
|
213
213
|
|
|
214
214
|
### 8. never_mind
|
|
@@ -223,7 +223,7 @@ Delete a Taskdoc section file.
|
|
|
223
223
|
**Characteristics:**
|
|
224
224
|
|
|
225
225
|
- Deletes only the whole section file; it does not edit content
|
|
226
|
-
- Use it only when the whole section is no longer valid. If you only need to remove stale entries or compress structure, prefer `change_mind` with the cleaned full section and
|
|
226
|
+
- Use it only when the whole section is no longer valid. If you only need to remove stale entries or compress structure, prefer `recall_taskdoc` followed by `change_mind` with the cleaned full section and returned `content_hash` as `previous_content_hash`
|
|
227
227
|
- Does not start a new course
|
|
228
228
|
|
|
229
229
|
### 9. recall_taskdoc
|
|
@@ -232,15 +232,16 @@ Read taskdoc chapter.
|
|
|
232
232
|
|
|
233
233
|
**Parameters:**
|
|
234
234
|
|
|
235
|
-
- `
|
|
236
|
-
- `
|
|
235
|
+
- `selector` (required): Chapter selector. Omit `category` for top-level sections (`goals` / `constraints` / `progress`)
|
|
236
|
+
- `category` (optional): Category directory. Use `bearinmind` for fixed bear-in-mind sections, or an extra section directory
|
|
237
237
|
|
|
238
238
|
**Returns:**
|
|
239
239
|
|
|
240
240
|
```yaml
|
|
241
241
|
status: ok|error
|
|
242
|
-
category: <category>
|
|
243
242
|
selector: <selector>
|
|
243
|
+
category: <category, when supplied>
|
|
244
|
+
content_hash: <crc32 checksum>
|
|
244
245
|
content: <chapter content>
|
|
245
246
|
retrieved_at: <retrieval timestamp>
|
|
246
247
|
```
|
|
@@ -307,17 +308,25 @@ mind_more({
|
|
|
307
308
|
### Replace Taskdoc Progress
|
|
308
309
|
|
|
309
310
|
```typescript
|
|
311
|
+
recall_taskdoc({
|
|
312
|
+
selector: 'progress',
|
|
313
|
+
});
|
|
314
|
+
|
|
310
315
|
change_mind({
|
|
311
316
|
selector: 'progress',
|
|
312
317
|
content:
|
|
313
318
|
'## Progress\n\n### Current Effective State\n- The handbook boundary split is now agreed: role assets / personal long-lived experience / Taskdoc-progress / reminders; details: <doc-path>#<section>\n\n### Decisions In Effect\n- `persona / knowhow / pitfalls` no longer absorb daily member experience\n- `personal_memory` is reserved for one member\\'s reusable long-lived experience\n\n### Next Step\n- Strengthen the bulletin-board semantics of Taskdoc `progress`\n\n### Still-Active Blockers\n- None',
|
|
314
|
-
previous_content_hash: '
|
|
319
|
+
previous_content_hash: 'crc32:...',
|
|
315
320
|
});
|
|
316
321
|
```
|
|
317
322
|
|
|
318
323
|
### Read Taskdoc Chapter
|
|
319
324
|
|
|
320
325
|
```typescript
|
|
326
|
+
recall_taskdoc({
|
|
327
|
+
selector: 'progress',
|
|
328
|
+
});
|
|
329
|
+
|
|
321
330
|
recall_taskdoc({
|
|
322
331
|
category: 'bearinmind',
|
|
323
332
|
selector: 'runbook',
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
|
|
133
133
|
- 保持简洁:默认提醒项常见 1–3 条,优先 `update_reminder` 压缩/合并
|
|
134
134
|
- 区分载体:需要向全队同步的当前有效状态、关键决策、下一步与仍成立阻塞,写入 `progress` 这一准实时任务公告牌;提醒项只留个人/当前对话恢复所需细节
|
|
135
|
-
- 面向全队:`progress` 应保持可扫读、以“当前仍有效”为准,不要退化成个人日志、流水账、临时便签或历史残影堆积;少量新增用 `mind_more
|
|
135
|
+
- 面向全队:`progress` 应保持可扫读、以“当前仍有效”为准,不要退化成个人日志、流水账、临时便签或历史残影堆积;少量新增用 `mind_more`,需要清旧/重排/压缩时先调用 `recall_taskdoc`,再用 `change_mind` 并携带返回的 `content_hash` 作为 `previous_content_hash`
|
|
136
136
|
- 按需整理:`mind_more` 不是默认记账动作。若同一主题已有多条阶段性记录,优先用 `change_mind` 合并成当前摘要;把细节放进 rtws 正式文档,并在差遣牒里保留文档定位 pointer。若会冲掉原有内容,必须有直接人类确认,或已按人类认可 SOP/验收标准充分考虑原有内容后再改写
|
|
137
137
|
- 换程前收束:主线对话先把尚未落实到文档、且下一程需要知会的讨论细节写入差遣牒合适章节,再整理结构化接续包提醒项;支线对话不要维护差遣牒,也不要整理差遣牒更新提案,直接维护足够详尽的接续包提醒项。若系统已把当前程切到吃紧/告急处置态,则先保留多条粗略提醒项过桥也可以;当前程只做落文档/保信息 + `clear_mind`(支线只做保信息 + `clear_mind`),系统真正开启新一程后第一步再收敛
|
|
138
138
|
- 拒绝原料堆积:不要把长日志/大段 tool output 直接塞进提醒项
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
## 限制与注意事项
|
|
157
157
|
|
|
158
158
|
1. `dialog` 提醒会随对话结束而结束;`personal` 提醒会在所有由你主理的后续对话里继续可见
|
|
159
|
-
2. 缺失差遣牒章节用 `do_mind` 创建;差遣牒少量新增可用 `mind_more` 追加;已有章节整段替换用 `change_mind
|
|
159
|
+
2. 缺失差遣牒章节用 `do_mind` 创建;差遣牒少量新增可用 `mind_more` 追加;已有章节整段替换用 `change_mind`,请确保合并已有内容,并先调用 `recall_taskdoc` 取得当前 `content_hash` 作为 `previous_content_hash`;确需删除整章文件时用 `never_mind`。不要把 `mind_more` 当流水账工具;需要整理、去旧、合并同主题记录时先 `recall_taskdoc` 再 `change_mind`
|
|
160
160
|
3. `do_mind` / `mind_more` / `change_mind` / `never_mind` 不开启新 course
|
|
161
161
|
4. 接续包提醒项只保留差遣牒仍未覆盖、但恢复工作容易丢的细节;主线对话应先把当前对话历史中应由下一程知会的未落文档讨论细节写入差遣牒合适章节;支线对话在吃紧/告急时只维护足够详尽的接续包提醒项
|
|
162
162
|
5. 不要把 `personal` 提醒堆成长期事实仓库;耐久知识应迁到 `personal_memory`
|
|
@@ -127,11 +127,15 @@ mind_more({
|
|
|
127
127
|
});
|
|
128
128
|
|
|
129
129
|
// 需要清理旧项、重排、同主题合并或压缩流水账时,整章替换
|
|
130
|
+
recall_taskdoc({
|
|
131
|
+
selector: 'progress',
|
|
132
|
+
});
|
|
133
|
+
|
|
130
134
|
change_mind({
|
|
131
135
|
selector: 'progress',
|
|
132
136
|
content:
|
|
133
137
|
'## Progress\n\n### 当前有效状态\n- 已完成三类记忆载体边界收口,准备补 Taskdoc 公告牌属性;细节见 <文档路径>#<章节>\n\n### 已生效决策\n- `personal_memory` 不再作为短期杂物柜\n- `team_memory` 只承接团队长期共识与不变量\n\n### 下一步\n- 在 control / team_mgmt 手册中补强 `progress` 的公告牌语义\n\n### 仍成立阻塞\n- 无',
|
|
134
|
-
previous_content_hash: '
|
|
138
|
+
previous_content_hash: 'crc32:...',
|
|
135
139
|
});
|
|
136
140
|
```
|
|
137
141
|
|
|
@@ -144,11 +148,15 @@ change_mind({
|
|
|
144
148
|
### 示例
|
|
145
149
|
|
|
146
150
|
```typescript
|
|
151
|
+
recall_taskdoc({
|
|
152
|
+
selector: 'goals',
|
|
153
|
+
});
|
|
154
|
+
|
|
147
155
|
change_mind({
|
|
148
156
|
selector: 'goals',
|
|
149
157
|
content:
|
|
150
158
|
'## Goals\n\n- [ ] 创建所有工具集手册\n - [x] ws_mod\n - [x] team_mgmt\n - [x] personal_memory\n - [ ] control (进行中)\n- [ ] 编写工具描述',
|
|
151
|
-
previous_content_hash: '
|
|
159
|
+
previous_content_hash: 'crc32:...',
|
|
152
160
|
});
|
|
153
161
|
```
|
|
154
162
|
|
|
@@ -161,11 +169,15 @@ change_mind({
|
|
|
161
169
|
### 示例
|
|
162
170
|
|
|
163
171
|
```typescript
|
|
172
|
+
recall_taskdoc({
|
|
173
|
+
selector: 'constraints',
|
|
174
|
+
});
|
|
175
|
+
|
|
164
176
|
change_mind({
|
|
165
177
|
selector: 'constraints',
|
|
166
178
|
content:
|
|
167
179
|
'## Constraints\n\n- man 函数必须根据 team.yaml 动态过滤工具集\n- 运行时生效:team.yaml 配置变更后立即可见\n- 工具集名称使用下划线格式\n- 新增约束:每个工具集需要 5 个 topic × 2 个语言',
|
|
168
|
-
previous_content_hash: '
|
|
180
|
+
previous_content_hash: 'crc32:...',
|
|
169
181
|
});
|
|
170
182
|
```
|
|
171
183
|
|
|
@@ -178,6 +190,11 @@ change_mind({
|
|
|
178
190
|
### 示例
|
|
179
191
|
|
|
180
192
|
```typescript
|
|
193
|
+
// 顶层章节正文会自动注入,但 content_hash 由 recall_taskdoc 返回
|
|
194
|
+
recall_taskdoc({
|
|
195
|
+
selector: 'progress',
|
|
196
|
+
});
|
|
197
|
+
|
|
181
198
|
// 读取 bearinmind/runbook
|
|
182
199
|
recall_taskdoc({
|
|
183
200
|
category: 'bearinmind',
|
|
@@ -201,10 +218,14 @@ recall_taskdoc({
|
|
|
201
218
|
|
|
202
219
|
```typescript
|
|
203
220
|
// 更新 progress(保持 goals / constraints / progress 一致)
|
|
221
|
+
recall_taskdoc({
|
|
222
|
+
selector: 'progress',
|
|
223
|
+
});
|
|
224
|
+
|
|
204
225
|
change_mind({
|
|
205
226
|
selector: 'progress',
|
|
206
227
|
content:
|
|
207
228
|
'## Progress\n\n### 当前有效状态\n- 边界口径已统一到手册源头与测试;细节见 <文档路径>#<章节>\n\n### 已生效决策\n- 角色级资产 / personal_memory / team_memory / Taskdoc-progress / reminders 的职责已经切开\n\n### 下一步\n- 复验 control 手册、Taskdoc 展示文案与边界测试\n\n### 仍成立阻塞\n- 无',
|
|
208
|
-
previous_content_hash: '
|
|
229
|
+
previous_content_hash: 'crc32:...',
|
|
209
230
|
});
|
|
210
231
|
```
|
|
@@ -150,7 +150,7 @@ status: ok|error
|
|
|
150
150
|
|
|
151
151
|
- 只创建,不覆盖已有内容
|
|
152
152
|
- 适合创建缺失的常驻章节,或新增额外章节来保留细节,同时不触碰已有差遣牒正文
|
|
153
|
-
- 若目标已存在且只需少量补充,用 `mind_more
|
|
153
|
+
- 若目标已存在且只需少量补充,用 `mind_more`;若需要整章改写/合并,先调用 `recall_taskdoc`,再用 `change_mind` 并带上返回的 `content_hash` 作为 `previous_content_hash`
|
|
154
154
|
- 不开启新 course
|
|
155
155
|
- 变更对所有队友可见
|
|
156
156
|
|
|
@@ -163,7 +163,7 @@ status: ok|error
|
|
|
163
163
|
- `selector`(必需):章节选择器(goals/constraints/progress)
|
|
164
164
|
- `category`(可选):额外章节目录;与 `selector` 组合定位 `<category>/<selector>.md`
|
|
165
165
|
- `content`(必需):新内容(整段替换)
|
|
166
|
-
- `previous_content_hash
|
|
166
|
+
- `previous_content_hash`(必需):`recall_taskdoc` 返回的当前章节 `content_hash`
|
|
167
167
|
|
|
168
168
|
**返回:**
|
|
169
169
|
|
|
@@ -205,7 +205,7 @@ mind_more({
|
|
|
205
205
|
- 只追加,不会自动去重、改写或压缩旧内容
|
|
206
206
|
- 适合给 `progress` 补一两条当前仍有效的状态、决策、下一步或阻塞
|
|
207
207
|
- 不适合把每一步调查过程、长日志、完整方案或验收记录当流水账追加进去;这些细节应写入 rtws 正式文档,差遣牒只写摘要和文档定位 pointer
|
|
208
|
-
-
|
|
208
|
+
- 若需要删除陈旧项、重排结构或压缩公告牌,先调用 `recall_taskdoc`,再使用带返回 `content_hash` 作为 `previous_content_hash` 的 `change_mind` 做整章替换;若要删除整个章节文件,使用 `never_mind`
|
|
209
209
|
- 当同一主题已经有多条阶段记录时,优先 `change_mind` 合并成当前仍有效的简明公告,而不是继续 `mind_more`
|
|
210
210
|
|
|
211
211
|
### 8. never_mind
|
|
@@ -220,7 +220,7 @@ mind_more({
|
|
|
220
220
|
**特点:**
|
|
221
221
|
|
|
222
222
|
- 只删除整章文件,不做内容编辑
|
|
223
|
-
-
|
|
223
|
+
- 仅用于章节整体不再成立;如果只是删除几条陈旧项或压缩结构,优先先 `recall_taskdoc`,再用带返回 `content_hash` 作为 `previous_content_hash` 的 `change_mind` 写回整理后的全文
|
|
224
224
|
- 不开启新 course
|
|
225
225
|
|
|
226
226
|
### 9. recall_taskdoc
|
|
@@ -229,15 +229,16 @@ mind_more({
|
|
|
229
229
|
|
|
230
230
|
**参数:**
|
|
231
231
|
|
|
232
|
-
- `category
|
|
233
|
-
- `
|
|
232
|
+
- `selector`(必需):章节选择器。顶层章节(`goals` / `constraints` / `progress`)省略 `category`
|
|
233
|
+
- `category`(可选):类别目录。固定 bear-in-mind 章节使用 `bearinmind`,其他额外章节使用对应目录
|
|
234
234
|
|
|
235
235
|
**返回:**
|
|
236
236
|
|
|
237
237
|
```yaml
|
|
238
238
|
status: ok|error
|
|
239
|
-
category: <类别>
|
|
240
239
|
selector: <选择器>
|
|
240
|
+
category: <传入 category 时返回>
|
|
241
|
+
content_hash: <crc32 校验值>
|
|
241
242
|
content: <章节内容>
|
|
242
243
|
retrieved_at: <读取时间戳>
|
|
243
244
|
```
|
|
@@ -300,17 +301,25 @@ mind_more({
|
|
|
300
301
|
### 整章替换差遣牒进度
|
|
301
302
|
|
|
302
303
|
```typescript
|
|
304
|
+
recall_taskdoc({
|
|
305
|
+
selector: 'progress',
|
|
306
|
+
});
|
|
307
|
+
|
|
303
308
|
change_mind({
|
|
304
309
|
selector: 'progress',
|
|
305
310
|
content:
|
|
306
311
|
'## Progress\n\n### 当前有效状态\n- 手册边界方案已确定:角色级资产 / 个人长期经验 / Taskdoc-progress / reminders 分流;细节见 <文档路径>#<章节>\n\n### 已生效决策\n- `persona / knowhow / pitfalls` 不承接成员日常经验\n- `personal_memory` 只承接成员自己的长期可复用经验\n\n### 下一步\n- 补齐 Taskdoc `progress` 的公告牌属性说明\n\n### 仍成立阻塞\n- 无',
|
|
307
|
-
previous_content_hash: '
|
|
312
|
+
previous_content_hash: 'crc32:...',
|
|
308
313
|
});
|
|
309
314
|
```
|
|
310
315
|
|
|
311
316
|
### 读取差遣牒章节
|
|
312
317
|
|
|
313
318
|
```typescript
|
|
319
|
+
recall_taskdoc({
|
|
320
|
+
selector: 'progress',
|
|
321
|
+
});
|
|
322
|
+
|
|
314
323
|
recall_taskdoc({
|
|
315
324
|
category: 'bearinmind',
|
|
316
325
|
selector: 'runbook',
|
|
@@ -107,7 +107,7 @@ export type TaskPackageChangeMindTargetParseResult = {
|
|
|
107
107
|
kind: 'err';
|
|
108
108
|
error: TaskPackageChangeMindTargetError;
|
|
109
109
|
};
|
|
110
|
-
export type TaskPackageContentHash = `
|
|
110
|
+
export type TaskPackageContentHash = `crc32:${string}`;
|
|
111
111
|
export declare function isTaskPackagePath(taskDocPath: string): boolean;
|
|
112
112
|
export declare function taskPackageSectionFromSelector(selector: string): TaskPackageSection | null;
|
|
113
113
|
export declare function bearInMindSectionFromSelector(selector: string): BearInMindSection | null;
|
|
@@ -65,9 +65,9 @@ exports.formatEffectiveTaskDocFromSections = formatEffectiveTaskDocFromSections;
|
|
|
65
65
|
exports.validateTaskPackageLayout = validateTaskPackageLayout;
|
|
66
66
|
exports.readTaskPackageForInjection = readTaskPackageForInjection;
|
|
67
67
|
exports.updateTaskPackageSection = updateTaskPackageSection;
|
|
68
|
-
const crypto_1 = require("crypto");
|
|
69
68
|
const fs = __importStar(require("fs"));
|
|
70
69
|
const path = __importStar(require("path"));
|
|
70
|
+
const zlib_1 = require("zlib");
|
|
71
71
|
const async_fifo_mutex_1 = require("../runtime/async-fifo-mutex");
|
|
72
72
|
const taskPackageIdentifierRe = /^[a-zA-Z][a-zA-Z0-9_-]*(?:\.[a-zA-Z0-9_-]+)*$/;
|
|
73
73
|
function isTaskPackageIdentifier(value) {
|
|
@@ -354,9 +354,8 @@ function withCanonicalMarkdownFileEnding(content) {
|
|
|
354
354
|
return `${stripped}\n`;
|
|
355
355
|
}
|
|
356
356
|
function computeTaskPackageContentHash(content) {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
.digest('hex')}`;
|
|
357
|
+
const checksum = (0, zlib_1.crc32)(withCanonicalMarkdownFileEnding(content)) >>> 0;
|
|
358
|
+
return `crc32:${checksum.toString(16).padStart(8, '0')}`;
|
|
360
359
|
}
|
|
361
360
|
function taskPackageRelativePathForChangeMindTarget(target) {
|
|
362
361
|
switch (target.kind) {
|