clearai-dsh 0.3.0 → 0.4.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 +147 -0
- package/README.md +28 -28
- package/README.zh-CN.md +28 -28
- package/lib/client.js +861 -2555
- package/lib/domain-language.js +552 -48
- package/lib/fold.js +351 -1015
- package/lib/host.js +47 -557
- package/lib/invariant.js +9 -12
- package/lib/knowledge-view.js +363 -226
- package/lib/lang.js +81 -0
- package/package.json +1 -1
- package/presets/clearai/agent.cordis.yml +54 -82
- package/presets/clearai/clearai.patch.yml +54 -82
- package/presets/clearai/plugins/clearai-kernel.js +1590 -5437
- package/presets/clearai/plugins/ontology.js +56 -14
- package/presets/clearai/plugins/prompts.js +73 -363
- package/presets/clearai/skills/clearai-loop/SKILL.md +73 -59
- package/presets/clearai/plugins/brain.js +0 -547
- package/presets/clearai/plugins/commands.js +0 -199
- package/presets/clearai/template/knowledge/README.md +0 -25
- package/presets/clearai/template/memory/README.md +0 -34
- package/presets/clearai/template/project.md +0 -49
- package/presets/clearai/template/skills/README.md +0 -37
- package/presets/clearai/template/skills/chart-diagram-qa/SKILL.md +0 -43
- package/presets/clearai/template/skills/citation-management/SKILL.md +0 -73
- package/presets/clearai/template/skills/citation-management/references/bibtex_formatting.md +0 -908
- package/presets/clearai/template/skills/citation-management/references/citation_validation.md +0 -794
- package/presets/clearai/template/skills/citation-management/references/google_scholar_search.md +0 -725
- package/presets/clearai/template/skills/citation-management/references/metadata_extraction.md +0 -870
- package/presets/clearai/template/skills/citation-management/references/pubmed_search.md +0 -839
- package/presets/clearai/template/skills/citation-management/scripts/doi_to_bibtex.py +0 -204
- package/presets/clearai/template/skills/citation-management/scripts/extract_metadata.py +0 -569
- package/presets/clearai/template/skills/citation-management/scripts/format_bibtex.py +0 -349
- package/presets/clearai/template/skills/citation-management/scripts/generate_schematic.py +0 -139
- package/presets/clearai/template/skills/citation-management/scripts/generate_schematic_ai.py +0 -817
- package/presets/clearai/template/skills/citation-management/scripts/search_google_scholar.py +0 -282
- package/presets/clearai/template/skills/citation-management/scripts/search_pubmed.py +0 -398
- package/presets/clearai/template/skills/citation-management/scripts/validate_citations.py +0 -497
- package/presets/clearai/template/skills/data-analysis/SKILL.md +0 -92
- package/presets/clearai/template/skills/data-analysis/checklists/readiness_check.md +0 -23
- package/presets/clearai/template/skills/data-analysis/templates/analysis_report.md.tpl +0 -63
- package/presets/clearai/template/skills/data-analysis/templates/cleaning_rules_draft.yaml.tpl +0 -32
- package/presets/clearai/template/skills/data-analysis/templates/data_dictionary.md.tpl +0 -12
- package/presets/clearai/template/skills/data-analysis/templates/domain_knowledge_template.md.tpl +0 -316
- package/presets/clearai/template/skills/data-analysis/templates/feature_candidates.json.tpl +0 -20
- package/presets/clearai/template/skills/data-analysis/templates/quality_scorecard.md.tpl +0 -30
- package/presets/clearai/template/skills/data-analysis/workflows/01-data-profiling.md +0 -42
- package/presets/clearai/template/skills/data-analysis/workflows/02-quality-audit.md +0 -36
- package/presets/clearai/template/skills/data-analysis/workflows/03-physical-correlation.md +0 -25
- package/presets/clearai/template/skills/data-analysis/workflows/04-unstructured-mining.md +0 -26
- package/presets/clearai/template/skills/data-qa-analysis/SKILL.md +0 -102
- package/presets/clearai/template/skills/data-qa-analysis/checklists/readiness_check.md +0 -62
- package/presets/clearai/template/skills/data-qa-analysis/templates/best_in_class_report.md.tpl +0 -56
- package/presets/clearai/template/skills/data-qa-analysis/templates/cleaning_rules_draft.yaml.tpl +0 -56
- package/presets/clearai/template/skills/data-qa-analysis/templates/data_dictionary.md.tpl +0 -13
- package/presets/clearai/template/skills/data-qa-analysis/templates/data_source_inventory_and_lineage.md.tpl +0 -146
- package/presets/clearai/template/skills/data-qa-analysis/templates/data_status_report.md.tpl +0 -60
- package/presets/clearai/template/skills/data-qa-analysis/templates/steady_state_rules.yaml.tpl +0 -41
- package/presets/clearai/template/skills/data-qa-analysis/templates/subsystem_registry.md.tpl +0 -101
- package/presets/clearai/template/skills/data-qa-analysis/templates/unified_execution_plan.md.tpl +0 -100
- package/presets/clearai/template/skills/data-qa-analysis/workflows/01-data-source-inventory-and-lineage.md +0 -194
- package/presets/clearai/template/skills/data-qa-analysis/workflows/02-data-alignment-and-tag-semantics.md +0 -122
- package/presets/clearai/template/skills/data-qa-analysis/workflows/03-steady-state-identification.md +0 -126
- package/presets/clearai/template/skills/data-qa-analysis/workflows/04-consumption-analysis.md +0 -152
- package/presets/clearai/template/skills/data-qa-analysis/workflows/05-best-in-class-and-optimization-space.md +0 -78
- package/presets/clearai/template/skills/domain-presearch/SKILL.md +0 -131
- package/presets/clearai/template/skills/domain-presearch/checklists/domain_checklist.md +0 -24
- package/presets/clearai/template/skills/domain-presearch/references/figure_code.md +0 -78
- package/presets/clearai/template/skills/domain-presearch/references/strategic_frameworks.md +0 -38
- package/presets/clearai/template/skills/exploration-loop/SKILL.md +0 -81
- package/presets/clearai/template/skills/exploratory-data-analysis/SKILL.md +0 -77
- package/presets/clearai/template/skills/exploratory-data-analysis/references/bioinformatics_genomics_formats.md +0 -664
- package/presets/clearai/template/skills/exploratory-data-analysis/references/chemistry_molecular_formats.md +0 -664
- package/presets/clearai/template/skills/exploratory-data-analysis/references/general_scientific_formats.md +0 -518
- package/presets/clearai/template/skills/exploratory-data-analysis/references/microscopy_imaging_formats.md +0 -620
- package/presets/clearai/template/skills/exploratory-data-analysis/references/proteomics_metabolomics_formats.md +0 -517
- package/presets/clearai/template/skills/exploratory-data-analysis/references/spectroscopy_analytical_formats.md +0 -633
- package/presets/clearai/template/skills/exploratory-data-analysis/scripts/eda_analyzer.py +0 -547
- package/presets/clearai/template/skills/hypothesis-generation/SKILL.md +0 -73
- package/presets/clearai/template/skills/hypothesis-generation/references/experimental_design_patterns.md +0 -329
- package/presets/clearai/template/skills/hypothesis-generation/references/hypothesis_quality_criteria.md +0 -198
- package/presets/clearai/template/skills/hypothesis-generation/references/literature_search_strategies.md +0 -622
- package/presets/clearai/template/skills/hypothesis-generation/scripts/generate_schematic.py +0 -139
- package/presets/clearai/template/skills/hypothesis-generation/scripts/generate_schematic_ai.py +0 -817
- package/presets/clearai/template/skills/literature-review/SKILL.md +0 -72
- package/presets/clearai/template/skills/literature-review/references/citation_styles.md +0 -166
- package/presets/clearai/template/skills/literature-review/references/database_strategies.md +0 -455
- package/presets/clearai/template/skills/literature-review/scripts/generate_pdf.py +0 -176
- package/presets/clearai/template/skills/literature-review/scripts/generate_schematic.py +0 -139
- package/presets/clearai/template/skills/literature-review/scripts/generate_schematic_ai.py +0 -817
- package/presets/clearai/template/skills/literature-review/scripts/search_databases.py +0 -303
- package/presets/clearai/template/skills/literature-review/scripts/verify_citations.py +0 -221
- package/presets/clearai/template/skills/paper-lookup/SKILL.md +0 -59
- package/presets/clearai/template/skills/paper-lookup/references/arxiv.md +0 -161
- package/presets/clearai/template/skills/paper-lookup/references/biorxiv.md +0 -118
- package/presets/clearai/template/skills/paper-lookup/references/core.md +0 -150
- package/presets/clearai/template/skills/paper-lookup/references/crossref.md +0 -181
- package/presets/clearai/template/skills/paper-lookup/references/medrxiv.md +0 -104
- package/presets/clearai/template/skills/paper-lookup/references/openalex.md +0 -174
- package/presets/clearai/template/skills/paper-lookup/references/pmc.md +0 -152
- package/presets/clearai/template/skills/paper-lookup/references/pubmed.md +0 -124
- package/presets/clearai/template/skills/paper-lookup/references/semantic-scholar.md +0 -203
- package/presets/clearai/template/skills/paper-lookup/references/unpaywall.md +0 -127
- package/presets/clearai/template/skills/process-presearch/SKILL.md +0 -196
- package/presets/clearai/template/skills/process-presearch/checklists/process_checklist.md +0 -18
- package/presets/clearai/template/skills/process-presearch/references/figure_code.md +0 -107
- package/presets/clearai/template/skills/process-presearch/references/source_attribution_example.md +0 -22
- package/presets/clearai/template/skills/process-understanding-extraction/SKILL.md +0 -69
- package/presets/clearai/template/skills/process-understanding-extraction/checklists/readiness_check.md +0 -34
- package/presets/clearai/template/skills/process-understanding-extraction/templates/docx_raw_dump_extractor.py.tpl +0 -132
- package/presets/clearai/template/skills/process-understanding-extraction/templates/entity_map_unit_topology.json.tpl +0 -86
- package/presets/clearai/template/skills/process-understanding-extraction/templates/process_brief.md.tpl +0 -89
- package/presets/clearai/template/skills/process-understanding-extraction/templates/process_brief_builder_from_raw_dump.py.tpl +0 -203
- package/presets/clearai/template/skills/process-understanding-extraction/templates/process_flow_mermaid.md.tpl +0 -41
- package/presets/clearai/template/skills/process-understanding-extraction/templates/unified_execution_plan.md.tpl +0 -53
- package/presets/clearai/template/skills/process-understanding-extraction/workflows/01-process-doc-discovery.md +0 -173
- package/presets/clearai/template/skills/process-understanding-extraction/workflows/02-process-understanding-and-diagramming.md +0 -106
- package/presets/clearai/template/skills/scientific-brainstorming/SKILL.md +0 -64
- package/presets/clearai/template/skills/scientific-brainstorming/references/brainstorming_methods.md +0 -326
- package/presets/clearai/template/skills/scientific-critical-thinking/SKILL.md +0 -72
- package/presets/clearai/template/skills/scientific-critical-thinking/references/common_biases.md +0 -364
- package/presets/clearai/template/skills/scientific-critical-thinking/references/evidence_hierarchy.md +0 -485
- package/presets/clearai/template/skills/scientific-critical-thinking/references/experimental_design.md +0 -496
- package/presets/clearai/template/skills/scientific-critical-thinking/references/logical_fallacies.md +0 -478
- package/presets/clearai/template/skills/scientific-critical-thinking/references/scientific_method.md +0 -169
- package/presets/clearai/template/skills/scientific-critical-thinking/references/statistical_pitfalls.md +0 -506
- package/presets/clearai/template/skills/skill-creator/SKILL.md +0 -109
- package/presets/clearai/template/skills/skill-creator/references/authoring-guide.md +0 -89
- package/presets/clearai/template/skills/statistical-analysis/SKILL.md +0 -79
- package/presets/clearai/template/skills/statistical-analysis/references/assumptions_and_diagnostics.md +0 -369
- package/presets/clearai/template/skills/statistical-analysis/references/bayesian_statistics.md +0 -653
- package/presets/clearai/template/skills/statistical-analysis/references/effect_sizes_and_power.md +0 -578
- package/presets/clearai/template/skills/statistical-analysis/references/reporting_standards.md +0 -469
- package/presets/clearai/template/skills/statistical-analysis/references/test_selection_guide.md +0 -129
- package/presets/clearai/template/skills/statistical-analysis/scripts/assumption_checks.py +0 -538
- package/presets/clearai/template/skills/web-artifact/SKILL.md +0 -165
- package/presets/clearai/template/skills/web-artifact/assets/renderer/renderer.css +0 -229
- package/presets/clearai/template/skills/web-artifact/assets/renderer/renderer.js +0 -373
- package/presets/clearai/template/skills/web-artifact/assets/vendor/elkjs/LICENSE +0 -263
- package/presets/clearai/template/skills/web-artifact/assets/vendor/elkjs/UPSTREAM.md +0 -26
- package/presets/clearai/template/skills/web-artifact/assets/vendor/elkjs/elk.bundled.js +0 -6605
- package/presets/clearai/template/skills/web-artifact/references/when-drawing-a-topology.md +0 -150
- package/presets/clearai/template/skills/web-artifact/references/when-the-page-must-work-offline.md +0 -62
- package/presets/clearai/template/skills/web-artifact/scripts/check_artifact.py +0 -167
- package/presets/clearai/template/skills/web-artifact/scripts/render_topology.js +0 -272
- package/presets/clearai/template/skills/what-if-oracle/LICENSE.txt +0 -5
- package/presets/clearai/template/skills/what-if-oracle/SKILL.md +0 -72
- package/presets/clearai/template/skills/what-if-oracle/references/scenario-templates.md +0 -154
package/lib/lang.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lang —— 系统自己写的话用哪种语言。
|
|
3
|
+
*
|
|
4
|
+
* 规则只有一条:**跟着人说话的语言走**(会话级)。人用中文写,工具结果、运行态卡、
|
|
5
|
+
* 问人的话、系统落盘的文件都是中文;人用英文写,就都是英文。面板的界面字跟着界面语言,
|
|
6
|
+
* 两者通常一致。
|
|
7
|
+
*
|
|
8
|
+
* 读口只有一个 `language()`:
|
|
9
|
+
* · 内核(预设插件)在处理某个会话的那一刻,用进程内共享的 AsyncLocalStorage 标出语言
|
|
10
|
+
* (挂在 `globalThis[Symbol.for('clearai.language')]` 上,因为内核与宿主半是两个插件、两份模块);
|
|
11
|
+
* · 宿主半自己算面板读数时,用 `withLanguage(state.language, …)` 同步钉住。
|
|
12
|
+
* 两者都没有时是中文。
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const KEY = Symbol.for('clearai.language')
|
|
16
|
+
let pinned = null
|
|
17
|
+
|
|
18
|
+
/** 当前语言:'zh' 或 'en'。 */
|
|
19
|
+
export function language() {
|
|
20
|
+
if (pinned !== null) return pinned
|
|
21
|
+
const scope = globalThis[KEY]
|
|
22
|
+
const value = typeof scope?.getStore === 'function' ? scope.getStore() : undefined
|
|
23
|
+
return value === 'en' ? 'en' : 'zh'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** 二选一:中文在前,英文在后。 */
|
|
27
|
+
export function tr(zh, en) {
|
|
28
|
+
return language() === 'en' ? en : zh
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** 同步地把一段计算钉在某种语言上(只给同步代码用)。 */
|
|
32
|
+
export function withLanguage(lang, fn) {
|
|
33
|
+
const previous = pinned
|
|
34
|
+
pinned = lang === 'en' ? 'en' : lang === 'zh' ? 'zh' : previous
|
|
35
|
+
try {
|
|
36
|
+
return fn()
|
|
37
|
+
} finally {
|
|
38
|
+
pinned = previous
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 一段人写的话是哪种语言:有汉字且汉字不算少 ⇒ 中文;只有拉丁字母 ⇒ 英文;两样都没有 ⇒ null(不改判)。
|
|
44
|
+
* 「汉字不算少」= 汉字数 × 3 ≥ 拉丁字母数:中文句子里夹的英文术语不改判,英文句子里引一个汉字词也不改判。
|
|
45
|
+
*/
|
|
46
|
+
export function detectLanguage(text) {
|
|
47
|
+
if (typeof text !== 'string') return null
|
|
48
|
+
const body = text.replace(/```[\s\S]*?```/g, ' ').replace(/`[^`]*`/g, ' ').replace(/https?:\/\/\S+/g, ' ')
|
|
49
|
+
const cjk = (body.match(/[㐀-鿿豈-]/g) ?? []).length
|
|
50
|
+
const latin = (body.match(/[A-Za-z]/g) ?? []).length
|
|
51
|
+
if (cjk >= 1 && cjk * 3 >= latin) return 'zh'
|
|
52
|
+
if (latin >= 2) return 'en'
|
|
53
|
+
return null
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** 一条消息的正文(content 可能是字符串,也可能是若干块)。 */
|
|
57
|
+
export function messageText(message) {
|
|
58
|
+
const content = message?.content
|
|
59
|
+
if (typeof content === 'string') return content
|
|
60
|
+
if (!Array.isArray(content)) return ''
|
|
61
|
+
return content
|
|
62
|
+
.filter((part) => part?.type === 'text' && typeof part.text === 'string')
|
|
63
|
+
.map((part) => part.text)
|
|
64
|
+
.join('\n')
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 双语表:表里写 `[中文, English]`,读的时候按当前语言取一边;嵌套对象一并处理。
|
|
69
|
+
* 给模块级常量用(它们在装载时求值,那一刻还不知道是哪个会话)。
|
|
70
|
+
*/
|
|
71
|
+
export function bilingual(table) {
|
|
72
|
+
return new Proxy(table, {
|
|
73
|
+
get(target, key) {
|
|
74
|
+
const value = target[key]
|
|
75
|
+
if (Array.isArray(value) && value.length === 2 && typeof value[0] === 'string' && typeof value[1] === 'string') return tr(value[0], value[1])
|
|
76
|
+
if (Array.isArray(value)) return value.map((item) => (item !== null && typeof item === 'object' && !Array.isArray(item) ? bilingual(item) : item))
|
|
77
|
+
if (value !== null && typeof value === 'object') return bilingual(value)
|
|
78
|
+
return value
|
|
79
|
+
},
|
|
80
|
+
})
|
|
81
|
+
}
|
package/package.json
CHANGED
|
@@ -20,15 +20,8 @@
|
|
|
20
20
|
- id: persona
|
|
21
21
|
name: '@deepseek-ai/dsh-persona'
|
|
22
22
|
config:
|
|
23
|
-
prefix:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
你以**单循环**工作:计划 → 执行 → 观察 → 反思,一个循环推进,不做多 Agent 编排。子角色(评估者)由系统按触发派生,不是自由委派。
|
|
27
|
-
|
|
28
|
-
你的判断是智能的部分:理解材料、提出假设、选择路线、判断哪条证据更可信。事实的部分由系统持有:什么算完成、进度是多少、一个事实能不能写进知识库、谁的裁决有效——这些都不由你声明,只由系统算出来。
|
|
29
|
-
|
|
30
|
-
你不靠提示词约束自己:完成要过观测准入,推进只能通过唯一完成动词,L3 以上的裁决由独立评估者写。你要做的是把智能用在判断上,而不是用在描述状态上。
|
|
31
|
-
suffix: 你的工作目录是 {{cwd}}。工作区就是用户的文件夹;`clear/` 是系统与外脑的目录,其余目录都是用户的。
|
|
23
|
+
prefix: '你是 ClearAI 的主人格,运行在 DeepSeek Harness 上。怎么工作见下面三段:身份、循环、对人说话。'
|
|
24
|
+
suffix: 你的工作目录是 {{cwd}}。工作区就是用户的文件夹;`clear/` 是系统的目录,其余目录都是用户的。
|
|
32
25
|
|
|
33
26
|
- id: agent-instructions
|
|
34
27
|
name: '@deepseek-ai/dsh-agent-instructions'
|
|
@@ -71,7 +64,7 @@
|
|
|
71
64
|
- id: tool-jobs
|
|
72
65
|
name: '@deepseek-ai/dsh-tool-jobs'
|
|
73
66
|
|
|
74
|
-
# ── 技能(
|
|
67
|
+
# ── 技能(原生技能目录) ─────────────────────────────────────────────────────────────
|
|
75
68
|
|
|
76
69
|
# 技能注册表在宿主并按 scope 分层:这两行注册进**本预设的层**,所以不需要 realm。
|
|
77
70
|
# `customSkillDirs` 指向本预设自己的 skills/ —— 哲学文本随预设走,`baseUrl` 就是预设目录,
|
|
@@ -85,6 +78,37 @@
|
|
|
85
78
|
- id: tool-skill
|
|
86
79
|
name: '@deepseek-ai/dsh-tool-skill'
|
|
87
80
|
|
|
81
|
+
# ── 目标与计划模式交给原生(第三阶段) ─────────────────────────────────────────
|
|
82
|
+
# 目标的文字、续跑、暂停、完成都在原生 goal 上:模型用 create/get/update_goal,人用 /goal 与界面。
|
|
83
|
+
# ClearAI 只往当前 goal 上挂判据与判断(Frame),完成只能经 Conclude(先过独立评估);
|
|
84
|
+
# 模型直接调 update_goal(action=complete) 会被内核守卫拒绝。
|
|
85
|
+
# 人想先审计划,用原生 /plan(计划模式,exit_plan_mode 交人审阅);ClearAI 不再自带审阅卡与授权记号。
|
|
86
|
+
- id: command-goal
|
|
87
|
+
name: '@deepseek-ai/dsh-command-goal'
|
|
88
|
+
- id: tool-goal
|
|
89
|
+
name: '@deepseek-ai/dsh-tool-goal'
|
|
90
|
+
- id: planning
|
|
91
|
+
name: cordis:group
|
|
92
|
+
group: true
|
|
93
|
+
isolate:
|
|
94
|
+
planMode: true
|
|
95
|
+
config:
|
|
96
|
+
- id: plan-mode
|
|
97
|
+
name: '@deepseek-ai/dsh-plan-mode'
|
|
98
|
+
config:
|
|
99
|
+
section: |
|
|
100
|
+
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
101
|
+
|
|
102
|
+
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
103
|
+
|
|
104
|
+
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
105
|
+
|
|
106
|
+
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
107
|
+
|
|
108
|
+
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
109
|
+
|
|
110
|
+
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
111
|
+
|
|
88
112
|
# ── 压缩(上下文是受控资源) ─────────────────────────────────────────────────
|
|
89
113
|
|
|
90
114
|
# `compaction-basic` 通过 ctx.get 读 `toolResultPruner`,所以剪枝器必须与它同一个 realm。
|
|
@@ -111,26 +135,19 @@
|
|
|
111
135
|
|
|
112
136
|
# ── 认识论内核(本预设的灵魂) ───────────────────────────────────────────────
|
|
113
137
|
|
|
114
|
-
#
|
|
115
|
-
|
|
116
|
-
# + 一个 guard + 每回合派生的运行态卡 +
|
|
117
|
-
# 逐条对照 docs/loop-philosophy.md
|
|
118
|
-
#
|
|
119
|
-
# 外脑:**读侧全走宿主原生**——`./plugins/brain.js` 只把工作区投影成技能条目
|
|
120
|
-
# (`clear/skills/**` → 目录条目;`clear/memory/**` → 一个**虚拟条目** `project-memory`,
|
|
121
|
-
# 正文现算所以没有「索引过期」),目录注入与按需加载由宿主的 `tool-skill` 承担(digest 变了才注入)。
|
|
122
|
-
# 自建的只有写侧两件:`SaveSkill`(默认候选态)与 `WriteMemory`(字段校验 + 标题去重)。
|
|
138
|
+
# 6 件意图工具(目标 2 + 计划 4,见 `MECHANISM_TOOLS`;领域本体没有工具,
|
|
139
|
+
# 模型用原生文件工具直接写 clear/ontology/{concepts,relations,entities}/**.json)
|
|
140
|
+
# + 一个 guard + 每回合派生的运行态卡 + 面板数据路由。
|
|
141
|
+
# 逐条对照 docs/loop-philosophy.md 的哲学,见 ./plugins/clearai-kernel.js 的文件头。
|
|
123
142
|
#
|
|
124
|
-
#
|
|
125
|
-
#
|
|
126
|
-
# git 世界线已落地(A+B 两档):用户仓库可用就地开分支 + worktree,不可用退到旁路账本仓库。
|
|
143
|
+
# 宿主已经有的不再自带:文件改动历史归 workspace-changes,技能归原生技能目录,
|
|
144
|
+
# 并行探索归原生 subagent / workflow(竞争路线就是竞争的假设,各由一个步骤检验)。
|
|
127
145
|
#
|
|
128
146
|
# 装配是**清单驱动**的:工具面、提示词段、机制开关全部查表,代码里不出现模式名。
|
|
129
147
|
#
|
|
130
|
-
#
|
|
131
|
-
#
|
|
132
|
-
#
|
|
133
|
-
# 达成→收回,触礁/放弃→置阻塞,重启后自动补防。
|
|
148
|
+
# 目标挂在原生 goal 上:Frame 挂判据与判断(没有原生 goal 就建一枚),Conclude 先过独立评估、
|
|
149
|
+
# 通过才把原生 goal 置为完成;续跑由原生 goal 的驱动自己做。需要人而没人能答、或模型如实放弃时,
|
|
150
|
+
# 内核把原生 goal 置为阻塞并写明原因。
|
|
134
151
|
# 配置项就是机制的旋钮:
|
|
135
152
|
- id: clearai-kernel
|
|
136
153
|
# 用**包内子路径**而不是 `./plugins/…`:宿主 ≥0.1.7-alpha.1 起,预设是声明行
|
|
@@ -156,27 +173,18 @@
|
|
|
156
173
|
# 只有一个猜想时,「验证」容易退化成找证据支持自己。修订目标不受此限。
|
|
157
174
|
# 内核缺省是 0(=机制中立);**这里写 2 是产品立场**,所以它是硬门,不是文案。
|
|
158
175
|
minHypotheses: 2
|
|
159
|
-
#
|
|
160
|
-
#
|
|
161
|
-
# 「检索 → 总结 → 写报告」——本体图、实体图、认识论三张图都长不出来,
|
|
162
|
-
# 因为**完成函数里没有它们**。让缺口进卡只解决「看得见」,这一道解决「绕不过」。
|
|
163
|
-
# 它与 minHypotheses 是两条不同的立场(开工要有候选对比 / 结论要有形态),所以是两个键。
|
|
164
|
-
# 内核缺省 false(= 断言始终是加法);这里写 true 是产品立场。
|
|
165
|
-
requireTypedPromotion: true
|
|
166
|
-
# 实体门:断言主体还没落到实体图上 ⇒ 结案被拒。
|
|
176
|
+
# 实体门(结案唯一的结构关口):将要升格的判断里,断言主体还不是实体图上的节点 ⇒ 结案被拒
|
|
177
|
+
# (在派评估者**之前**拦)。只有散文、没有断言的判断不拦,那只是卡上的一条缺口。
|
|
167
178
|
# 为什么要有它:「本体写得漂亮、实体图是空的」是这套系统最容易交付出来的假完成
|
|
168
179
|
# (真实运行:451 条查到的实体,实体图 0 节点 / 0 边,而卡上写着「结构完整」)。
|
|
169
|
-
#
|
|
180
|
+
# 出口两条:给主体写实体文件 clear/ontology/entities/<id>.json(升格会落下边,不必再写同一句话),
|
|
181
|
+
# 或把断言从判断上拿掉 / 如实 abandoned。
|
|
182
|
+
# 「跳级没写理由」与「将升格的命题没有断言形态」两道门在第四阶段删了(依据见 less-is-more-plan)。
|
|
170
183
|
requireLandedEntities: true
|
|
171
184
|
# 判据修订门:改判据文本要带一份独立裁决的 auditKey。
|
|
172
185
|
# 为什么要有它:判据是"怎样算完成",它一变前面所有工作的验收含义跟着变——
|
|
173
|
-
# 允许在同一次
|
|
186
|
+
# 允许在同一次 Frame 里顺手改掉,等于允许把"做不到"重新定义成"做到了"。
|
|
174
187
|
requireCriteriaVerdict: true
|
|
175
|
-
# 跳级门:有等级被跳过而没写理由 ⇒ 结案被拒。
|
|
176
|
-
# 为什么要有它:supportedLevel 只是支持证据的最大值,跳级本来零代价——
|
|
177
|
-
# 于是"一路只在最贵的那一级交付"成了最优策略,便宜的检查从没被走过也没人知道为什么。
|
|
178
|
-
# 出口两条:ExplainLevelSkip 补理由,或如实 abandoned。
|
|
179
|
-
requireLevelReasons: true
|
|
180
188
|
# deny_rules 十条里可移植的九条(路径越狱那条不搬:宿主沙箱已经拥有它,ClearAI 自己也说「不重复」)
|
|
181
189
|
bashDenyRules: true
|
|
182
190
|
# 独立评估者:spawn = fresh context(fork 会继承历史,做的人与判的人就分不开了)
|
|
@@ -192,53 +200,20 @@
|
|
|
192
200
|
- read_image
|
|
193
201
|
# 每回合派生的运行态卡(只在状态变化时注入:前缀稳定是硬约束)
|
|
194
202
|
runtimeCard: true
|
|
195
|
-
# 运行档:人在场 / 无人值守。**它只决定一件事**:澄清协议装哪一段
|
|
196
|
-
# (槽位 clarification 收敛;两套措辞互斥,永不同时在场)。
|
|
197
|
-
#
|
|
198
|
-
# 它**不决定**下面这些——写清楚是因为这四处曾经被误认为跟着档走:
|
|
199
|
-
# · 计划授权 —— 计划**永远**要人在原生审阅卡上批准(CreatePlan 里没有自动确认分支,
|
|
200
|
-
# confirmed_by 只有 'user' 与 'progress');
|
|
201
|
-
# · 续跑策略 —— 要不要继续由 turnDemand 从**门状态**算出来(未授权/裁决在飞/门开着 → hold);
|
|
202
|
-
# · 续跑轮数 —— 只有一个默认值 128,不按档取;
|
|
203
|
-
# · 面板开关 —— 人门动词 set_autonomy 已摘除,当前没有切换入口。
|
|
204
|
-
#
|
|
205
|
-
# 所以这里写的是**部署初值**,不是"人此刻在不在场"的表示。
|
|
206
|
-
# 真正表达"要不要人"的是**门**:计划待确认 / 等裁决 / 有人在等。
|
|
207
|
-
autonomy: attended
|
|
208
|
-
# 续跑轮数上限。**刻意不写**:不写就回落到 DEFAULT_MAX_AUTO_TURNS(128),在布防点现算。
|
|
209
|
-
# 显式写一个数就两档都用它。这个键存在的意义是**保险丝**:够长到能跑完一件真活,
|
|
210
|
-
# 又短到不会无声烧掉一整夜。
|
|
211
|
-
# 执行者是**原生**:数字传到宿主目标的 maxGoalRounds,到限由 `dsh-goal-round-driver`
|
|
212
|
-
# 自己 block(code='round-limit')——上限真的是机制在执行,不是一句嘱咐。
|
|
213
203
|
# 上下文预算不在这里:那是原生 `dsh-token-meter` + `dsh-compaction-basic` 的活。
|
|
214
204
|
# 贡献表(ClearAI `composition.py` 的装配语义):装配根遍历清单,清单里出现表外的名字
|
|
215
205
|
# 当场抛错——未知机制 / 未知工具 / 未知段 / 已关机制却仍列着它的工具,四种错法都在装配期炸,
|
|
216
206
|
# 而不是静默少装一件工具、等某一轮才发现。
|
|
217
207
|
#
|
|
218
|
-
# 这里只写**机制开关**;tools / sections 缺省 = 目录全量(
|
|
219
|
-
# 同一时刻 23 段在场——澄清协议那一段由 autonomy 在两套措辞里收敛)。
|
|
208
|
+
# 这里只写**机制开关**;tools / sections 缺省 = 目录全量(6 件意图工具、3 段提示词,全部在场)。
|
|
220
209
|
# 这些数字不靠人眼维持:`node tools/verify-truth-table.mjs` 会拿代码算出来的数核对它们。
|
|
221
210
|
# 要裁剪就把 tools 或 sections 显式写出来:
|
|
222
|
-
# tools: [
|
|
223
|
-
# sections: [clearai/
|
|
224
|
-
# `clarification` 是槽位名;直接写两套措辞里的哪一个会被拒绝(同时在场不可表示)。
|
|
211
|
+
# tools: [Frame, CreatePlan, AdvancePlan, ...] # 名字必须都在工具目录里
|
|
212
|
+
# sections: [clearai/identity, clearai/loop, clearai/speaking]
|
|
225
213
|
contributions:
|
|
226
214
|
mechanisms:
|
|
227
215
|
goal: true
|
|
228
216
|
plan: true
|
|
229
|
-
worldline: true
|
|
230
|
-
scout: true
|
|
231
|
-
brain: true
|
|
232
|
-
ledger: true
|
|
233
|
-
|
|
234
|
-
# ── 人侧命令(/ 菜单) ────────────────────────────────────────────────────────
|
|
235
|
-
|
|
236
|
-
# 五个命令都是**人侧界面**:四个只读状态窗(goal/plan/evidence/worldline,从账本现算,
|
|
237
|
-
# 一个字都不落账) + 一个呈审捷径(plan-review,把「重新呈审」steer 给模型,
|
|
238
|
-
# 授权记号仍走 RequestPlanReview 工具落账——命令处理器没有变更通道,这是权威边界)。
|
|
239
|
-
- id: clearai-commands
|
|
240
|
-
# 同上:改用包内子路径(见 clearai-kernel 那一行的说明)。
|
|
241
|
-
name: 'clearai-dsh/presets/clearai/plugins/commands.js'
|
|
242
217
|
|
|
243
218
|
# ── 工作方式(非权威能力,交还原生) ──────────────────────────────────────────
|
|
244
219
|
|
|
@@ -317,11 +292,8 @@
|
|
|
317
292
|
|
|
318
293
|
# ── 刻意不挂的行(是决策,不是遗漏) ─────────────────────────────────────────
|
|
319
294
|
#
|
|
320
|
-
#
|
|
321
|
-
#
|
|
322
|
-
# 那是第二本账。ClearAI 的目标账只有一本,由内核持有,面板显示的就是它。
|
|
323
|
-
# · `plan-mode`:那是 DSH 的计划模式,与本内核的 CreatePlan/AdvancePlan 是两套计划纪律。
|
|
324
|
-
# 同时挂上就是第二本账。要它就得先决定哪一本是唯一账本。
|
|
295
|
+
# (原先这里还有 `tool-goal` / `command-goal` / `plan-mode`:第三阶段起它们都挂上了,
|
|
296
|
+
# 目标与计划审阅交给原生,见上面「目标与计划模式交给原生」那一节。)
|
|
325
297
|
#
|
|
326
298
|
# 曾经不挂、现在**挂回来了**的(阶段 5,权威边界由 test/authority-boundary.test.mjs 钉死):
|
|
327
299
|
# · `tool-todo` / `tool-subagent` / `tool-workflow` / `tool-ralph`:这些是**工作方式**,
|
|
@@ -37,15 +37,8 @@
|
|
|
37
37
|
- id: persona
|
|
38
38
|
name: '@deepseek-ai/dsh-persona'
|
|
39
39
|
config:
|
|
40
|
-
prefix:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
你以**单循环**工作:计划 → 执行 → 观察 → 反思,一个循环推进,不做多 Agent 编排。子角色(评估者)由系统按触发派生,不是自由委派。
|
|
44
|
-
|
|
45
|
-
你的判断是智能的部分:理解材料、提出假设、选择路线、判断哪条证据更可信。事实的部分由系统持有:什么算完成、进度是多少、一个事实能不能写进知识库、谁的裁决有效——这些都不由你声明,只由系统算出来。
|
|
46
|
-
|
|
47
|
-
你不靠提示词约束自己:完成要过观测准入,推进只能通过唯一完成动词,L3 以上的裁决由独立评估者写。你要做的是把智能用在判断上,而不是用在描述状态上。
|
|
48
|
-
suffix: 你的工作目录是 {{cwd}}。工作区就是用户的文件夹;`clear/` 是系统与外脑的目录,其余目录都是用户的。
|
|
40
|
+
prefix: '你是 ClearAI 的主人格,运行在 DeepSeek Harness 上。怎么工作见下面三段:身份、循环、对人说话。'
|
|
41
|
+
suffix: 你的工作目录是 {{cwd}}。工作区就是用户的文件夹;`clear/` 是系统的目录,其余目录都是用户的。
|
|
49
42
|
|
|
50
43
|
- id: agent-instructions
|
|
51
44
|
name: '@deepseek-ai/dsh-agent-instructions'
|
|
@@ -88,7 +81,7 @@
|
|
|
88
81
|
- id: tool-jobs
|
|
89
82
|
name: '@deepseek-ai/dsh-tool-jobs'
|
|
90
83
|
|
|
91
|
-
# ── 技能(
|
|
84
|
+
# ── 技能(原生技能目录) ─────────────────────────────────────────────────────────────
|
|
92
85
|
|
|
93
86
|
# 技能注册表在宿主并按 scope 分层:这两行注册进**本预设的层**,所以不需要 realm。
|
|
94
87
|
# `customSkillDirs` 指向本预设自己的 skills/ —— 哲学文本随预设走,`baseUrl` 就是预设目录,
|
|
@@ -102,6 +95,37 @@
|
|
|
102
95
|
- id: tool-skill
|
|
103
96
|
name: '@deepseek-ai/dsh-tool-skill'
|
|
104
97
|
|
|
98
|
+
# ── 目标与计划模式交给原生(第三阶段) ─────────────────────────────────────────
|
|
99
|
+
# 目标的文字、续跑、暂停、完成都在原生 goal 上:模型用 create/get/update_goal,人用 /goal 与界面。
|
|
100
|
+
# ClearAI 只往当前 goal 上挂判据与判断(Frame),完成只能经 Conclude(先过独立评估);
|
|
101
|
+
# 模型直接调 update_goal(action=complete) 会被内核守卫拒绝。
|
|
102
|
+
# 人想先审计划,用原生 /plan(计划模式,exit_plan_mode 交人审阅);ClearAI 不再自带审阅卡与授权记号。
|
|
103
|
+
- id: command-goal
|
|
104
|
+
name: '@deepseek-ai/dsh-command-goal'
|
|
105
|
+
- id: tool-goal
|
|
106
|
+
name: '@deepseek-ai/dsh-tool-goal'
|
|
107
|
+
- id: planning
|
|
108
|
+
name: cordis:group
|
|
109
|
+
group: true
|
|
110
|
+
isolate:
|
|
111
|
+
planMode: true
|
|
112
|
+
config:
|
|
113
|
+
- id: plan-mode
|
|
114
|
+
name: '@deepseek-ai/dsh-plan-mode'
|
|
115
|
+
config:
|
|
116
|
+
section: |
|
|
117
|
+
You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
|
|
118
|
+
|
|
119
|
+
Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
|
|
120
|
+
|
|
121
|
+
The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
|
|
122
|
+
|
|
123
|
+
Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
|
|
124
|
+
|
|
125
|
+
Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
|
|
126
|
+
|
|
127
|
+
When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
|
|
128
|
+
|
|
105
129
|
# ── 压缩(上下文是受控资源) ─────────────────────────────────────────────────
|
|
106
130
|
|
|
107
131
|
# `compaction-basic` 通过 ctx.get 读 `toolResultPruner`,所以剪枝器必须与它同一个 realm。
|
|
@@ -128,26 +152,19 @@
|
|
|
128
152
|
|
|
129
153
|
# ── 认识论内核(本预设的灵魂) ───────────────────────────────────────────────
|
|
130
154
|
|
|
131
|
-
#
|
|
132
|
-
|
|
133
|
-
# + 一个 guard + 每回合派生的运行态卡 +
|
|
134
|
-
# 逐条对照 docs/loop-philosophy.md
|
|
135
|
-
#
|
|
136
|
-
# 外脑:**读侧全走宿主原生**——`./plugins/brain.js` 只把工作区投影成技能条目
|
|
137
|
-
# (`clear/skills/**` → 目录条目;`clear/memory/**` → 一个**虚拟条目** `project-memory`,
|
|
138
|
-
# 正文现算所以没有「索引过期」),目录注入与按需加载由宿主的 `tool-skill` 承担(digest 变了才注入)。
|
|
139
|
-
# 自建的只有写侧两件:`SaveSkill`(默认候选态)与 `WriteMemory`(字段校验 + 标题去重)。
|
|
155
|
+
# 6 件意图工具(目标 2 + 计划 4,见 `MECHANISM_TOOLS`;领域本体没有工具,
|
|
156
|
+
# 模型用原生文件工具直接写 clear/ontology/{concepts,relations,entities}/**.json)
|
|
157
|
+
# + 一个 guard + 每回合派生的运行态卡 + 面板数据路由。
|
|
158
|
+
# 逐条对照 docs/loop-philosophy.md 的哲学,见 ./plugins/clearai-kernel.js 的文件头。
|
|
140
159
|
#
|
|
141
|
-
#
|
|
142
|
-
#
|
|
143
|
-
# git 世界线已落地(A+B 两档):用户仓库可用就地开分支 + worktree,不可用退到旁路账本仓库。
|
|
160
|
+
# 宿主已经有的不再自带:文件改动历史归 workspace-changes,技能归原生技能目录,
|
|
161
|
+
# 并行探索归原生 subagent / workflow(竞争路线就是竞争的假设,各由一个步骤检验)。
|
|
144
162
|
#
|
|
145
163
|
# 装配是**清单驱动**的:工具面、提示词段、机制开关全部查表,代码里不出现模式名。
|
|
146
164
|
#
|
|
147
|
-
#
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
# 达成→收回,触礁/放弃→置阻塞,重启后自动补防。
|
|
165
|
+
# 目标挂在原生 goal 上:Frame 挂判据与判断(没有原生 goal 就建一枚),Conclude 先过独立评估、
|
|
166
|
+
# 通过才把原生 goal 置为完成;续跑由原生 goal 的驱动自己做。需要人而没人能答、或模型如实放弃时,
|
|
167
|
+
# 内核把原生 goal 置为阻塞并写明原因。
|
|
151
168
|
# 配置项就是机制的旋钮:
|
|
152
169
|
- id: clearai-kernel
|
|
153
170
|
# 用**包内子路径**而不是 `./plugins/…`:宿主 ≥0.1.7-alpha.1 起,预设是声明行
|
|
@@ -173,27 +190,18 @@
|
|
|
173
190
|
# 只有一个猜想时,「验证」容易退化成找证据支持自己。修订目标不受此限。
|
|
174
191
|
# 内核缺省是 0(=机制中立);**这里写 2 是产品立场**,所以它是硬门,不是文案。
|
|
175
192
|
minHypotheses: 2
|
|
176
|
-
#
|
|
177
|
-
#
|
|
178
|
-
# 「检索 → 总结 → 写报告」——本体图、实体图、认识论三张图都长不出来,
|
|
179
|
-
# 因为**完成函数里没有它们**。让缺口进卡只解决「看得见」,这一道解决「绕不过」。
|
|
180
|
-
# 它与 minHypotheses 是两条不同的立场(开工要有候选对比 / 结论要有形态),所以是两个键。
|
|
181
|
-
# 内核缺省 false(= 断言始终是加法);这里写 true 是产品立场。
|
|
182
|
-
requireTypedPromotion: true
|
|
183
|
-
# 实体门:断言主体还没落到实体图上 ⇒ 结案被拒。
|
|
193
|
+
# 实体门(结案唯一的结构关口):将要升格的判断里,断言主体还不是实体图上的节点 ⇒ 结案被拒
|
|
194
|
+
# (在派评估者**之前**拦)。只有散文、没有断言的判断不拦,那只是卡上的一条缺口。
|
|
184
195
|
# 为什么要有它:「本体写得漂亮、实体图是空的」是这套系统最容易交付出来的假完成
|
|
185
196
|
# (真实运行:451 条查到的实体,实体图 0 节点 / 0 边,而卡上写着「结构完整」)。
|
|
186
|
-
#
|
|
197
|
+
# 出口两条:给主体写实体文件 clear/ontology/entities/<id>.json(升格会落下边,不必再写同一句话),
|
|
198
|
+
# 或把断言从判断上拿掉 / 如实 abandoned。
|
|
199
|
+
# 「跳级没写理由」与「将升格的命题没有断言形态」两道门在第四阶段删了(依据见 less-is-more-plan)。
|
|
187
200
|
requireLandedEntities: true
|
|
188
201
|
# 判据修订门:改判据文本要带一份独立裁决的 auditKey。
|
|
189
202
|
# 为什么要有它:判据是"怎样算完成",它一变前面所有工作的验收含义跟着变——
|
|
190
|
-
# 允许在同一次
|
|
203
|
+
# 允许在同一次 Frame 里顺手改掉,等于允许把"做不到"重新定义成"做到了"。
|
|
191
204
|
requireCriteriaVerdict: true
|
|
192
|
-
# 跳级门:有等级被跳过而没写理由 ⇒ 结案被拒。
|
|
193
|
-
# 为什么要有它:supportedLevel 只是支持证据的最大值,跳级本来零代价——
|
|
194
|
-
# 于是"一路只在最贵的那一级交付"成了最优策略,便宜的检查从没被走过也没人知道为什么。
|
|
195
|
-
# 出口两条:ExplainLevelSkip 补理由,或如实 abandoned。
|
|
196
|
-
requireLevelReasons: true
|
|
197
205
|
# deny_rules 十条里可移植的九条(路径越狱那条不搬:宿主沙箱已经拥有它,ClearAI 自己也说「不重复」)
|
|
198
206
|
bashDenyRules: true
|
|
199
207
|
# 独立评估者:spawn = fresh context(fork 会继承历史,做的人与判的人就分不开了)
|
|
@@ -209,53 +217,20 @@
|
|
|
209
217
|
- read_image
|
|
210
218
|
# 每回合派生的运行态卡(只在状态变化时注入:前缀稳定是硬约束)
|
|
211
219
|
runtimeCard: true
|
|
212
|
-
# 运行档:人在场 / 无人值守。**它只决定一件事**:澄清协议装哪一段
|
|
213
|
-
# (槽位 clarification 收敛;两套措辞互斥,永不同时在场)。
|
|
214
|
-
#
|
|
215
|
-
# 它**不决定**下面这些——写清楚是因为这四处曾经被误认为跟着档走:
|
|
216
|
-
# · 计划授权 —— 计划**永远**要人在原生审阅卡上批准(CreatePlan 里没有自动确认分支,
|
|
217
|
-
# confirmed_by 只有 'user' 与 'progress');
|
|
218
|
-
# · 续跑策略 —— 要不要继续由 turnDemand 从**门状态**算出来(未授权/裁决在飞/门开着 → hold);
|
|
219
|
-
# · 续跑轮数 —— 只有一个默认值 128,不按档取;
|
|
220
|
-
# · 面板开关 —— 人门动词 set_autonomy 已摘除,当前没有切换入口。
|
|
221
|
-
#
|
|
222
|
-
# 所以这里写的是**部署初值**,不是"人此刻在不在场"的表示。
|
|
223
|
-
# 真正表达"要不要人"的是**门**:计划待确认 / 等裁决 / 有人在等。
|
|
224
|
-
autonomy: attended
|
|
225
|
-
# 续跑轮数上限。**刻意不写**:不写就回落到 DEFAULT_MAX_AUTO_TURNS(128),在布防点现算。
|
|
226
|
-
# 显式写一个数就两档都用它。这个键存在的意义是**保险丝**:够长到能跑完一件真活,
|
|
227
|
-
# 又短到不会无声烧掉一整夜。
|
|
228
|
-
# 执行者是**原生**:数字传到宿主目标的 maxGoalRounds,到限由 `dsh-goal-round-driver`
|
|
229
|
-
# 自己 block(code='round-limit')——上限真的是机制在执行,不是一句嘱咐。
|
|
230
220
|
# 上下文预算不在这里:那是原生 `dsh-token-meter` + `dsh-compaction-basic` 的活。
|
|
231
221
|
# 贡献表(ClearAI `composition.py` 的装配语义):装配根遍历清单,清单里出现表外的名字
|
|
232
222
|
# 当场抛错——未知机制 / 未知工具 / 未知段 / 已关机制却仍列着它的工具,四种错法都在装配期炸,
|
|
233
223
|
# 而不是静默少装一件工具、等某一轮才发现。
|
|
234
224
|
#
|
|
235
|
-
# 这里只写**机制开关**;tools / sections 缺省 = 目录全量(
|
|
236
|
-
# 同一时刻 23 段在场——澄清协议那一段由 autonomy 在两套措辞里收敛)。
|
|
225
|
+
# 这里只写**机制开关**;tools / sections 缺省 = 目录全量(6 件意图工具、3 段提示词,全部在场)。
|
|
237
226
|
# 这些数字不靠人眼维持:`node tools/verify-truth-table.mjs` 会拿代码算出来的数核对它们。
|
|
238
227
|
# 要裁剪就把 tools 或 sections 显式写出来:
|
|
239
|
-
# tools: [
|
|
240
|
-
# sections: [clearai/
|
|
241
|
-
# `clarification` 是槽位名;直接写两套措辞里的哪一个会被拒绝(同时在场不可表示)。
|
|
228
|
+
# tools: [Frame, CreatePlan, AdvancePlan, ...] # 名字必须都在工具目录里
|
|
229
|
+
# sections: [clearai/identity, clearai/loop, clearai/speaking]
|
|
242
230
|
contributions:
|
|
243
231
|
mechanisms:
|
|
244
232
|
goal: true
|
|
245
233
|
plan: true
|
|
246
|
-
worldline: true
|
|
247
|
-
scout: true
|
|
248
|
-
brain: true
|
|
249
|
-
ledger: true
|
|
250
|
-
|
|
251
|
-
# ── 人侧命令(/ 菜单) ────────────────────────────────────────────────────────
|
|
252
|
-
|
|
253
|
-
# 五个命令都是**人侧界面**:四个只读状态窗(goal/plan/evidence/worldline,从账本现算,
|
|
254
|
-
# 一个字都不落账) + 一个呈审捷径(plan-review,把「重新呈审」steer 给模型,
|
|
255
|
-
# 授权记号仍走 RequestPlanReview 工具落账——命令处理器没有变更通道,这是权威边界)。
|
|
256
|
-
- id: clearai-commands
|
|
257
|
-
# 同上:改用包内子路径(见 clearai-kernel 那一行的说明)。
|
|
258
|
-
name: 'clearai-dsh/presets/clearai/plugins/commands.js'
|
|
259
234
|
|
|
260
235
|
# ── 工作方式(非权威能力,交还原生) ──────────────────────────────────────────
|
|
261
236
|
|
|
@@ -334,11 +309,8 @@
|
|
|
334
309
|
|
|
335
310
|
# ── 刻意不挂的行(是决策,不是遗漏) ─────────────────────────────────────────
|
|
336
311
|
#
|
|
337
|
-
#
|
|
338
|
-
#
|
|
339
|
-
# 那是第二本账。ClearAI 的目标账只有一本,由内核持有,面板显示的就是它。
|
|
340
|
-
# · `plan-mode`:那是 DSH 的计划模式,与本内核的 CreatePlan/AdvancePlan 是两套计划纪律。
|
|
341
|
-
# 同时挂上就是第二本账。要它就得先决定哪一本是唯一账本。
|
|
312
|
+
# (原先这里还有 `tool-goal` / `command-goal` / `plan-mode`:第三阶段起它们都挂上了,
|
|
313
|
+
# 目标与计划审阅交给原生,见上面「目标与计划模式交给原生」那一节。)
|
|
342
314
|
#
|
|
343
315
|
# 曾经不挂、现在**挂回来了**的(阶段 5,权威边界由 test/authority-boundary.test.mjs 钉死):
|
|
344
316
|
# · `tool-todo` / `tool-subagent` / `tool-workflow` / `tool-ralph`:这些是**工作方式**,
|