clearai-dsh 0.4.0 → 0.5.0
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/CHANGELOG.md +40 -0
- package/README.md +6 -6
- package/README.zh-CN.md +6 -6
- package/bin/clearai.mjs +29 -231
- package/cordis.patch.yml +3 -3
- package/lib/client.js +4 -3
- package/lib/domain-language.js +71 -9
- package/lib/fold.js +109 -14
- package/lib/knowledge-view.js +85 -26
- package/package.json +2 -2
- package/presets/clearai/agent.cordis.yml +5 -2
- package/presets/clearai/clearai.patch.yml +5 -2
- package/presets/clearai/plugins/clearai-kernel.js +578 -60
- package/presets/clearai/plugins/ontology.js +21 -7
- package/presets/clearai/plugins/prompts.js +18 -16
- package/presets/clearai/skills/clearai-loop/SKILL.md +12 -4
package/lib/knowledge-view.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* 面向人的新字符串一律先落在 `GLOSSARY`(内部词 → 一句 plain + 在哪看 + 下一步做什么);
|
|
19
19
|
* `client.js` 的 `LOCALE_ZH/LOCALE_EN` 与它同源登记。
|
|
20
20
|
*/
|
|
21
|
-
import { graphProjection
|
|
21
|
+
import { graphProjection } from './domain-language.js'
|
|
22
22
|
import { bilingual, tr } from './lang.js'
|
|
23
23
|
|
|
24
24
|
/** 卡文本上限。模型每一步只读这一张卡,而卡是**每回合**重算的:它必须小到能进预算。 */
|
|
@@ -192,7 +192,8 @@ export const LEVELS = ['L0', 'L1', 'L2', 'L3', 'L4']
|
|
|
192
192
|
* **说人话的三张小表**(第六阶段)。内部名不改;卡、工具结果与面板上一律写右边那一列。
|
|
193
193
|
* 模型读到什么就会照着说什么——所以卡先说人话,答复才说得出人话。
|
|
194
194
|
*/
|
|
195
|
-
|
|
195
|
+
/** 等级只说三档:L0–L2 合并成「自己检验」(旧账里的 L0 / L1 也这么读),L3 独立评估,L4 人放行。 */
|
|
196
|
+
export const LEVEL_WORD = bilingual({ L0: ['自己检验', 'self-tested'], L1: ['自己检验', 'self-tested'], L2: ['自己检验', 'self-tested'], L3: ['独立核验', 'independent check'], L4: ['人放行', 'released by a person'] })
|
|
196
197
|
export const VERDICT_WORD = bilingual({ support: ['支持', 'support'], refute: ['推翻', 'refute'], inconclusive: ['不确定', 'inconclusive'] })
|
|
197
198
|
/** 判断短名的上限(汉字);没起名时取主张开头这么宽。与内核同一个数。 */
|
|
198
199
|
export const HANDLE_LIMIT = 12
|
|
@@ -337,6 +338,15 @@ export function readingOf(hypothesis) {
|
|
|
337
338
|
/** 步骤状态的人话。 */
|
|
338
339
|
const STEP_WORD = bilingual({ open: ['待做', 'to do'], advanced: ['已交付', 'delivered'], void: ['已作废', 'voided'] })
|
|
339
340
|
|
|
341
|
+
/** 一条事实在卡上的一行:原话、边界、等级;来自别的会话的标出来。 */
|
|
342
|
+
function factLine(fact) {
|
|
343
|
+
const scope = oneLine(fact?.scope ?? '')
|
|
344
|
+
return tr(
|
|
345
|
+
` · 「${clamp(fact?.text, 100)}」${scope === '' ? '' : ` — 边界:${clamp(scope, 80)}`}${fact?.level ? ` · ${fact.level}` : ''}${fact?.foreign === true ? ' · 以前的会话' : ''}`,
|
|
346
|
+
` · "${clamp(fact?.text, 100)}"${scope === '' ? '' : ` — boundary: ${clamp(scope, 80)}`}${fact?.level ? ` · ${fact.level}` : ''}${fact?.foreign === true ? ' · earlier session' : ''}`,
|
|
347
|
+
)
|
|
348
|
+
}
|
|
349
|
+
|
|
340
350
|
/**
|
|
341
351
|
* **卡的正文**。它只读已经算好的 `view` 与 `(state, derived)`,不重算任何判据——
|
|
342
352
|
* 同一份账本永远给出同一串字节:卡里**不带时刻**——时间戳会让同一个状态的卡每分钟变一次,
|
|
@@ -358,8 +368,6 @@ function cardLines(state, derived, options, view) {
|
|
|
358
368
|
const evidence = Array.isArray(state?.evidence) ? state.evidence : []
|
|
359
369
|
const facts = Array.isArray(state?.facts) ? state.facts : []
|
|
360
370
|
const hostHealth = Array.isArray(state?.hostHealth) ? state.hostHealth : []
|
|
361
|
-
const graph = graphProjection(state)
|
|
362
|
-
const entityNodes = graph.nodes.filter((node) => node.layer === 'entity')
|
|
363
371
|
const promotedIds = new Set(facts.map((fact) => fact?.hypothesis).filter((id) => typeof id === 'string'))
|
|
364
372
|
const byId = new Map(hypotheses.map((hypothesis) => [hypothesis.id, hypothesis]))
|
|
365
373
|
const nameOf = (id) => (byId.has(id) ? tr(`「${handleOf(byId.get(id))}」`, `"${handleOf(byId.get(id))}"`) : tr('一条已不在账上的判断', 'a judgment no longer on record'))
|
|
@@ -423,16 +431,53 @@ function cardLines(state, derived, options, view) {
|
|
|
423
431
|
}
|
|
424
432
|
if (plan.steps.length > 12) push(tr(` · 还有 ${plan.steps.length - 12} 步没展开(右栏「世界树」里有全部)`, ` · ${plan.steps.length - 12} more steps not shown (all are in the World Tree on the right)`), 2)
|
|
425
433
|
const first = plan.steps.find((step) => step.status === 'open')
|
|
426
|
-
if (first !== undefined)
|
|
434
|
+
if (first !== undefined) {
|
|
435
|
+
push(tr(`- 下一步:交付第 ${first.ordinal} 步(${first.id})——只能交付第一个没做完的步`, `- Next: deliver step ${first.ordinal} (${first.id}); only the first unfinished step can be delivered`))
|
|
436
|
+
/** 预期可选,但卡上提醒:没写下来的预期,落空了也看不见。 */
|
|
437
|
+
if (typeof first.expect === 'string' && first.expect !== '') push(tr(` 预期:${clamp(first.expect, 160)}——结果对不上的地方写进 anomalies,不要解释过去`, ` Expected: ${clamp(first.expect, 160)}; whatever does not match goes in anomalies, do not explain it away`))
|
|
438
|
+
else push(tr(' 动手前写下预期(RevisePlan action="expect":预计看到什么、从哪条关系或经验来),落空才看得见', ' Before acting, write the expectation (RevisePlan action="expect": what you expect and from which relation or lesson), so a miss is visible'), 1)
|
|
439
|
+
}
|
|
427
440
|
else if (goal !== null && String(goal.status) === 'open') push(tr('- 下一步:计划的步都做完了,ClosePlan 收尾,然后 Conclude 结案或开下一阶段', '- Next: every step is done; ClosePlan, then Conclude or start the next stage'))
|
|
428
441
|
if (plan.blocked !== undefined && plan.blocked !== null) push(tr(`- 计划停下等人:${plan.blocked.reason}(连续 ${plan.blocked.attempts} 次没过,已经问人怎么办;没人答就等着)`, `- Plan stopped, waiting for a person: ${plan.blocked.reason} (failed ${plan.blocked.attempts}× in a row; a person has been asked; wait if nobody answers)`))
|
|
429
442
|
}
|
|
443
|
+
/**
|
|
444
|
+
* **未解释项**:卡上最不能省的一格。开着的逐条摆出来,直到被解释、写明理由排除、或交给人;
|
|
445
|
+
* 评估者报的标出来(那是做的人自己没看见的)。
|
|
446
|
+
*/
|
|
447
|
+
const anomalies = Array.isArray(state?.anomalies) ? state.anomalies : []
|
|
448
|
+
const openAnomalies = anomalies.filter((item) => item?.status === 'open')
|
|
449
|
+
if (openAnomalies.length > 0) {
|
|
450
|
+
push(tr(`- 未解释(${openAnomalies.length} 条开着;用 Anomaly 解释、排除或交给人,不要解释过去):`, `- Unexplained (${openAnomalies.length} open; explain, rule out or hand to a person with Anomaly; do not explain them away):`))
|
|
451
|
+
for (const item of openAnomalies.slice(0, 8)) push(tr(` · ${item.id}${item.by === 'evaluator' ? '(评估者发现)' : ''}:${clamp(item.what, 140)}${item.anchor ? ` · 在 ${clamp(item.anchor, 30)}` : ''}`, ` · ${item.id}${item.by === 'evaluator' ? ' (found by the evaluator)' : ''}: ${clamp(item.what, 140)}${item.anchor ? ` · on ${clamp(item.anchor, 30)}` : ''}`))
|
|
452
|
+
if (openAnomalies.length > 8) push(tr(` · 还有 ${openAnomalies.length - 8} 条`, ` · ${openAnomalies.length - 8} more`), 1)
|
|
453
|
+
}
|
|
454
|
+
const settledAnomalies = anomalies.length - openAnomalies.length
|
|
455
|
+
if (settledAnomalies > 0) {
|
|
456
|
+
const escalated = anomalies.filter((item) => item?.status === 'escalated').length
|
|
457
|
+
push(tr(`- 已处理的未解释:${settledAnomalies} 条${escalated > 0 ? `(${escalated} 条交给人)` : ''},结案时随交付交给评估者`, `- Unexplained items handled: ${settledAnomalies}${escalated > 0 ? ` (${escalated} handed to a person)` : ''}; they go to the evaluator with the delivery`), 2)
|
|
458
|
+
}
|
|
430
459
|
if (evidence.length > 0) {
|
|
431
460
|
const last = evidence[evidence.length - 1]
|
|
432
461
|
const who = last.evaluator === 'independent' ? LEVEL_WORD.L3 : LEVEL_WORD[last.level] ?? tr('自己判的', 'self-judged')
|
|
433
462
|
const target = last.hypothesis === null || last.hypothesis === undefined ? tr('目标判据', 'goal criteria') : nameOf(last.hypothesis)
|
|
434
463
|
push(tr(`- 最近一次结果:${target}${VERDICT_WORD[last.verdict] ?? last.verdict}(${who})`, `- Latest result: ${target} ${VERDICT_WORD[last.verdict] ?? last.verdict} (${who})`), 1)
|
|
435
464
|
}
|
|
465
|
+
/**
|
|
466
|
+
* **经验**:以前结案时核过的「下次怎么做」。只在要做决定的时候摆出来:立题前、定计划前、
|
|
467
|
+
* 下一步动手而还没写预期时。与眼下目标和下一步提到同一装置或量的排在前面。
|
|
468
|
+
*/
|
|
469
|
+
const lessonRows = Array.isArray(derived?.lessonRows) ? derived.lessonRows : []
|
|
470
|
+
const nextStep = plan === null ? null : (plan.steps.find((step) => step.status === 'open') ?? null)
|
|
471
|
+
const deciding = goal === null || String(goal.status) !== 'open' || plan === null || (nextStep !== null && (typeof nextStep.expect !== 'string' || nextStep.expect === ''))
|
|
472
|
+
if (lessonRows.length > 0 && deciding) {
|
|
473
|
+
const context = `${goal?.claim ?? ''}\n${nextStep?.do ?? ''}`.toLowerCase()
|
|
474
|
+
const score = (lesson) => (lesson.about ?? []).filter((item) => item !== '' && context.includes(String(item).toLowerCase())).length
|
|
475
|
+
const ranked = lessonRows.map((lesson, index) => ({ lesson, index, score: score(lesson) })).sort((a, b) => b.score - a.score || a.index - b.index)
|
|
476
|
+
const kindWord = { trap: tr('坑', 'trap'), check: tr('先核', 'check'), shortcut: tr('别走的捷径', 'misleading shortcut'), prior: tr('先验', 'prior') }
|
|
477
|
+
push(tr(`- 以前留下的经验(${lessonRows.length} 条;定计划、写预期前先看,用上了就在预期里写明来自哪条):`, `- Lessons left earlier (${lessonRows.length}; read before planning or writing an expectation, and name the one you use in the expectation):`), 1)
|
|
478
|
+
for (const { lesson } of ranked.slice(0, 6)) push(` · ${lesson.id} · ${kindWord[lesson.kind] ?? lesson.kind} · ${clamp(lesson.text, 160)}${lesson.boundary ? tr(`(不适用:${clamp(lesson.boundary, 80)})`, ` (does not apply: ${clamp(lesson.boundary, 80)})`) : ''}`, 1)
|
|
479
|
+
if (lessonRows.length > 6) push(tr(` · 还有 ${lessonRows.length - 6} 条(clear/knowledge/lessons/)`, ` · ${lessonRows.length - 6} more (clear/knowledge/lessons/)`), 2)
|
|
480
|
+
}
|
|
436
481
|
/** 事实行含别的会话留下的(`foreign`):攒下来的东西从这里开始被看见。 */
|
|
437
482
|
const factRows = Array.isArray(derived?.factRows) ? derived.factRows : facts
|
|
438
483
|
if (factRows.length > 0) {
|
|
@@ -447,23 +492,21 @@ function cardLines(state, derived, options, view) {
|
|
|
447
492
|
)
|
|
448
493
|
}
|
|
449
494
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
495
|
+
* **立题之前**(或上一个目标已结):以前留下的事实原话与边界直接摆出来(最多 5 条)。立题是最该看已知的时刻,
|
|
496
|
+
* 这时还没有判断可以拿来做词面命中,所以按新近给。
|
|
497
|
+
*/
|
|
498
|
+
if (goal === null || String(goal.status) !== 'open') {
|
|
499
|
+
const usable = factRows.filter((fact) => fact?.review?.decision !== 'retracted' && fact?.refuted !== true)
|
|
500
|
+
if (usable.length > 0) {
|
|
501
|
+
push(tr('- 以前留下的事实(立题前先看;要复检哪条,就在判断上写 retests,claim 照抄原话):', '- Facts left earlier (read before framing; to re-test one, put retests on a judgment with the original statement as the claim):'), 1)
|
|
502
|
+
for (const fact of usable.slice(-5).reverse()) push(factLine(fact), 1)
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* 本体提纲与计数不上卡(它从没改变过下一步):卡上只出现被判断引用到的本体项(见下面的预检)。
|
|
507
|
+
* 跨文件问题照旧报——那是要修的东西。
|
|
452
508
|
*/
|
|
453
|
-
const outline = ontologyOutline(state)
|
|
454
509
|
const ontologyProblems = Array.isArray(state?.ontologyProblems) ? state.ontologyProblems : []
|
|
455
|
-
if (outline.concepts.total > 0 || outline.entities.total > 0 || outline.relations > 0) {
|
|
456
|
-
const entityRelations = Array.isArray(state?.entityAssertions) ? state.entityAssertions.length : 0
|
|
457
|
-
push(
|
|
458
|
-
tr(
|
|
459
|
-
`- 本体(clear/ontology/):${outline.concepts.total} 个概念 · ${outline.relations} 种关系 · ${outline.entities.total} 个实体 · ${entityRelations} 条实体关系`,
|
|
460
|
-
`- Ontology (clear/ontology/): ${outline.concepts.total} concepts · ${outline.relations} relation types · ${outline.entities.total} entities · ${entityRelations} entity relations`,
|
|
461
|
-
),
|
|
462
|
-
1,
|
|
463
|
-
)
|
|
464
|
-
if (outline.concepts.lines.length > 0) push(tr(` · 概念树:${outline.concepts.lines.join(';')}${outline.concepts.more > 0 ? `;顶层还有 ${outline.concepts.more} 个` : ''}`, ` · Concept tree: ${outline.concepts.lines.join('; ')}${outline.concepts.more > 0 ? `; ${outline.concepts.more} more at the top level` : ''}`), 1)
|
|
465
|
-
if (outline.entities.lines.length > 0) push(tr(` · 实体树:${outline.entities.lines.join(';')}${outline.entities.more > 0 ? `;顶层还有 ${outline.entities.more} 个` : ''}`, ` · Entity tree: ${outline.entities.lines.join('; ')}${outline.entities.more > 0 ? `; ${outline.entities.more} more at the top level` : ''}`), 1)
|
|
466
|
-
} else if (entityNodes.length > 0) push(tr(`- 实体图上 ${entityNodes.length} 个实例`, `- ${entityNodes.length} instances on the entity graph`), 1)
|
|
467
510
|
if (ontologyProblems.length > 0) {
|
|
468
511
|
push(tr(`- 本体文件有 ${ontologyProblems.length} 处问题(有问题的节点或关系没进图):`, `- Ontology files have ${ontologyProblems.length} problems (the affected nodes or relations stay off the graph):`), 1)
|
|
469
512
|
for (const item of ontologyProblems.slice(0, 5)) push(` · ${item.path}: ${clamp(item.detail, 160)}`, 1)
|
|
@@ -474,14 +517,30 @@ function cardLines(state, derived, options, view) {
|
|
|
474
517
|
}
|
|
475
518
|
if (knowledge.mode === 'knowledge') {
|
|
476
519
|
const preflight = view.deliver.preflight
|
|
477
|
-
if (preflight !== null && (preflight.terms.length > 0 || preflight.predicates.length > 0)) {
|
|
520
|
+
if (preflight !== null && (preflight.terms.length > 0 || preflight.predicates.length > 0 || preflight.facts.length > 0)) {
|
|
521
|
+
/**
|
|
522
|
+
* **递原文,不递名单**:命中的概念给它的释义(度量就是口径),命中的事实给原话与边界。
|
|
523
|
+
* 只给名字,模型得自己去翻文件——真跑里它从不去翻,本体于是从没影响过一次判断。
|
|
524
|
+
*/
|
|
478
525
|
const more = (count) => (count > 0 ? tr(`(还有 ${count} 个)`, ` (${count} more)`) : '')
|
|
479
526
|
const named = (entry) => (entry.label === entry.id ? entry.id : `${entry.label}(${entry.id})`)
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
527
|
+
if (preflight.terms.length > 0) {
|
|
528
|
+
push(tr(`- 这些判断用到的概念(释义就是口径,算法变了先改它)${more(preflight.termsTruncated)}:`, `- Concepts these judgments use (the gloss is the definition; if how it is computed changes, update it first)${more(preflight.termsTruncated)}:`), 1)
|
|
529
|
+
for (const term of preflight.terms.slice(0, 4)) push(` · ${named(term)}:${clamp(term.gloss, 100) || tr('(没写释义)', '(no gloss)')}${term.unit ? tr(`(单位 ${term.unit})`, ` (unit ${term.unit})`) : ''}`, 1)
|
|
530
|
+
}
|
|
531
|
+
/** 带形状或核对办法的关系逐条给(预期从这里来);其余只给名字。 */
|
|
532
|
+
const SHAPE_WORD = { increasing: tr('单调升', 'increasing'), decreasing: tr('单调降', 'decreasing'), peak: tr('有峰', 'has a peak'), threshold: tr('有阈值', 'has a threshold'), coupled: tr('与别的量耦合', 'coupled with another quantity') }
|
|
533
|
+
const telling = preflight.predicates.filter((predicate) => predicate.shape || predicate.check)
|
|
534
|
+
const plain = preflight.predicates.filter((predicate) => !(predicate.shape || predicate.check))
|
|
535
|
+
if (telling.length > 0) {
|
|
536
|
+
push(tr('- 用到的关系(预期从这里来):', '- Relations in use (expectations come from these):'), 1)
|
|
537
|
+
for (const predicate of telling.slice(0, 4)) push(` · ${named(predicate)}${predicate.shape ? tr(`:${SHAPE_WORD[predicate.shape] ?? predicate.shape}`, `: ${SHAPE_WORD[predicate.shape] ?? predicate.shape}`) : ''}${predicate.gloss ? tr(`(${clamp(predicate.gloss, 80)})`, ` (${clamp(predicate.gloss, 80)})`) : ''}${predicate.check ? tr(` · 读数这样核:${clamp(predicate.check, 80)}`, ` · check readings by: ${clamp(predicate.check, 80)}`) : ''}`, 1)
|
|
538
|
+
}
|
|
539
|
+
if (plain.length > 0) push(tr(`- 用到的关系:${plain.slice(0, 6).map(named).join('、')}${more(preflight.predicatesTruncated)}`, `- Relations in use: ${plain.slice(0, 6).map(named).join(', ')}${more(preflight.predicatesTruncated)}`), 2)
|
|
540
|
+
if (preflight.facts.length > 0) {
|
|
541
|
+
push(tr(`- 和这些判断有关的已知${more(preflight.factsTruncated)}(引用前看边界;要复检就在判断上写 retests):`, `- Known facts related to these judgments${more(preflight.factsTruncated)} (check the boundary before citing; to re-test, put retests on a judgment):`), 1)
|
|
542
|
+
for (const fact of preflight.facts.slice(0, 3)) push(factLine(fact), 1)
|
|
543
|
+
}
|
|
485
544
|
} else
|
|
486
545
|
push(
|
|
487
546
|
tr(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clearai-dsh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "ClearAI: an ontology-first DSH agent preset — evidence-checked research that grows into a domain ontology.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=22",
|
|
40
|
-
"dsh": ">=0.
|
|
40
|
+
"dsh": ">=0.2.0-rc.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"zod": "^4.6.1"
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
|
|
136
136
|
# ── 认识论内核(本预设的灵魂) ───────────────────────────────────────────────
|
|
137
137
|
|
|
138
|
-
#
|
|
138
|
+
# 7 件意图工具(目标 2 + 计划 5,见 `MECHANISM_TOOLS`;领域本体没有工具,
|
|
139
139
|
# 模型用原生文件工具直接写 clear/ontology/{concepts,relations,entities}/**.json)
|
|
140
140
|
# + 一个 guard + 每回合派生的运行态卡 + 面板数据路由。
|
|
141
141
|
# 逐条对照 docs/loop-philosophy.md 的哲学,见 ./plugins/clearai-kernel.js 的文件头。
|
|
@@ -191,6 +191,9 @@
|
|
|
191
191
|
auditProvider: spawn
|
|
192
192
|
auditTimeoutMs: 240000
|
|
193
193
|
# 评估者只读:工具面只给 read/glob/grep;provider 不支持时会降级,降级事实写进台账
|
|
194
|
+
# 评估者可以复跑:内核把工作区(不含 clear/)复制到临时目录,评估者在副本里跑产物自带的脚本核数字,
|
|
195
|
+
# 工具面因此多一个 bash;原工作区只读。L3「可重跑」这才名副其实。
|
|
196
|
+
auditRerun: true
|
|
194
197
|
auditToolFilter:
|
|
195
198
|
- read
|
|
196
199
|
- glob
|
|
@@ -205,7 +208,7 @@
|
|
|
205
208
|
# 当场抛错——未知机制 / 未知工具 / 未知段 / 已关机制却仍列着它的工具,四种错法都在装配期炸,
|
|
206
209
|
# 而不是静默少装一件工具、等某一轮才发现。
|
|
207
210
|
#
|
|
208
|
-
# 这里只写**机制开关**;tools / sections 缺省 = 目录全量(
|
|
211
|
+
# 这里只写**机制开关**;tools / sections 缺省 = 目录全量(7 件意图工具、3 段提示词,全部在场)。
|
|
209
212
|
# 这些数字不靠人眼维持:`node tools/verify-truth-table.mjs` 会拿代码算出来的数核对它们。
|
|
210
213
|
# 要裁剪就把 tools 或 sections 显式写出来:
|
|
211
214
|
# tools: [Frame, CreatePlan, AdvancePlan, ...] # 名字必须都在工具目录里
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
|
|
153
153
|
# ── 认识论内核(本预设的灵魂) ───────────────────────────────────────────────
|
|
154
154
|
|
|
155
|
-
#
|
|
155
|
+
# 7 件意图工具(目标 2 + 计划 5,见 `MECHANISM_TOOLS`;领域本体没有工具,
|
|
156
156
|
# 模型用原生文件工具直接写 clear/ontology/{concepts,relations,entities}/**.json)
|
|
157
157
|
# + 一个 guard + 每回合派生的运行态卡 + 面板数据路由。
|
|
158
158
|
# 逐条对照 docs/loop-philosophy.md 的哲学,见 ./plugins/clearai-kernel.js 的文件头。
|
|
@@ -208,6 +208,9 @@
|
|
|
208
208
|
auditProvider: spawn
|
|
209
209
|
auditTimeoutMs: 240000
|
|
210
210
|
# 评估者只读:工具面只给 read/glob/grep;provider 不支持时会降级,降级事实写进台账
|
|
211
|
+
# 评估者可以复跑:内核把工作区(不含 clear/)复制到临时目录,评估者在副本里跑产物自带的脚本核数字,
|
|
212
|
+
# 工具面因此多一个 bash;原工作区只读。L3「可重跑」这才名副其实。
|
|
213
|
+
auditRerun: true
|
|
211
214
|
auditToolFilter:
|
|
212
215
|
- read
|
|
213
216
|
- glob
|
|
@@ -222,7 +225,7 @@
|
|
|
222
225
|
# 当场抛错——未知机制 / 未知工具 / 未知段 / 已关机制却仍列着它的工具,四种错法都在装配期炸,
|
|
223
226
|
# 而不是静默少装一件工具、等某一轮才发现。
|
|
224
227
|
#
|
|
225
|
-
# 这里只写**机制开关**;tools / sections 缺省 = 目录全量(
|
|
228
|
+
# 这里只写**机制开关**;tools / sections 缺省 = 目录全量(7 件意图工具、3 段提示词,全部在场)。
|
|
226
229
|
# 这些数字不靠人眼维持:`node tools/verify-truth-table.mjs` 会拿代码算出来的数核对它们。
|
|
227
230
|
# 要裁剪就把 tools 或 sections 显式写出来:
|
|
228
231
|
# tools: [Frame, CreatePlan, AdvancePlan, ...] # 名字必须都在工具目录里
|