@fanchao8609/agent_brain_sync 1.7.2 → 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.
- package/package.json +1 -1
- package/skill/SKILL.md +6 -0
- package/src/store.js +14 -1
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -158,6 +158,12 @@ monorepo 若多个子包各自独立交付,可各建一份 `.brain/`。`abs st
|
|
|
158
158
|
- 还没做完 → `abs todo note <id> --note "接到哪/改到哪个文件"` 补断点(别空手续接)。
|
|
159
159
|
滞留没清完就不算接上了状态——这是「任务做完没进 Done」的根治动作。
|
|
160
160
|
3. **读命中页**:按关键词在 index 定位 → 读对应 concepts/entities 全文。
|
|
161
|
+
> ⚠️ **绝不通读 `.brain/`**。它是一个不断长大的知识图谱,当前仓库 29 页就约 11 万 token
|
|
162
|
+
> (单页最大 16KB)—— 全读会把窗口直接塞满。正确姿势:
|
|
163
|
+
> - 要状态 → `abs load`|要主题 → `abs query <词>`(只回命中几页)
|
|
164
|
+
> - 要某页 → 只读那一页;页太长则只取相关小节
|
|
165
|
+
> - 需要汇总多页/多命令时,用 context-mode 的 `ctx_execute` 类工具在沙箱里处理后
|
|
166
|
+
> **只打印结论**,别把原始文件内容拉进上下文。
|
|
161
167
|
4. **续 todo**:默认续 todo 分支 → 把顶部未完成项当当前任务开做。
|
|
162
168
|
5. **登记新任务**:有明确新任务而 todo 没有 → `abs todo add <id> --note 做什么` 登记
|
|
163
169
|
再动工。不登记,会话一切断就丢。
|
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;
|