@fanchao8609/agent_brain_sync 1.7.3 → 1.7.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/store.js +14 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanchao8609/agent_brain_sync",
3
- "version": "1.7.3",
3
+ "version": "1.7.4",
4
4
  "description": "agent-brain-sync: 跨会话 AI 编码记忆 — hook 纯触发 + CLI/MCP 读写 .brain markdown 图谱, 防并发写保护。",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/store.js CHANGED
@@ -4,7 +4,7 @@ import { promises as fs } from 'node:fs';
4
4
  import { join, resolve, dirname } from 'node:path';
5
5
  import { requireBrain, brainPath, absLogDir, BRAIN_DIR } from './index.js';
6
6
  import { requireUser, atTag, getUser } from './userconfig.js';
7
- import { addTask, upsertTask, boardText, readTodo, ensureTodo, todoTemplate, today, localStamp, setBreakpoint, moveBlocked, insertDoneGrouped, idOfTaskLine, archiveDoneInText, renderArchivePage, renderArchiveBody, DONE_KINDS, withDoneKind, doneKindOf, collapseDone } from './todo.js';
7
+ import { addTask, upsertTask, boardText, readTodo, ensureTodo, todoTemplate, today, localStamp, setBreakpoint, moveBlocked, insertDoneGrouped, idOfTaskLine, archiveDoneInText, renderArchivePage, renderArchiveBody, DONE_KINDS, withDoneKind, doneKindOf, doneDateOf, collapseDone } from './todo.js';
8
8
  import { editFile, SKIP } from './lock.js';
9
9
  import { appendWrapup, strandedFor } from './wrapup.js';
10
10
 
@@ -825,6 +825,19 @@ export async function cmdLint({ dir }) {
825
825
  `逐条补 \`--as 落地|否决|仅方案\`(新条目:abs todo done <id> --as …)`,
826
826
  );
827
827
  }
828
+ // 完成日期同理必须由工具盖:手写 [x] 时人会抄语义部分(结语)而漏掉机械部分(日期)。
829
+ // 后果不只是排版不齐 —— 无日期行归入 `### (未标日期)` 尾组,而归档靠日期判天数,
830
+ // 故这些行**永远无法被 abs todo archive 迁出**(todo.js:300 保守跳过)。
831
+ // 即:漏一个日期 = 一条永久钉住 Done 区、拖大 load 输出的行。
832
+ // 两处在同一处校验(同一份契约的两半),别只查一半给假信心。
833
+ const noDate = doneBody.filter((l) => /^\s*- \[x\]/.test(l) && !doneDateOf(l));
834
+ if (noDate.length) {
835
+ const sample = (noDate[0].match(/- \[x\] (\S+)/) || [, '?'])[1];
836
+ issues.push(
837
+ `DONE-NO-DATE: Done 区 ${noDate.length} 条缺 \`(完成 YYYY-MM-DD)\`(如 ${sample})。` +
838
+ `手写的 [x] 不会自动盖日期 —— 补上后重跑;新条目一律走 \`abs todo done <id>\`。`,
839
+ );
840
+ }
828
841
  }
829
842
 
830
843
  const n = issues.length;