clearai-dsh 0.1.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.
Files changed (154) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +201 -0
  3. package/README.md +138 -0
  4. package/README.zh-CN.md +138 -0
  5. package/bin/clearai.mjs +224 -0
  6. package/brand/README.md +41 -0
  7. package/brand/logo-512-dark.png +0 -0
  8. package/brand/logo-512.png +0 -0
  9. package/brand/logo-lockup-dark.png +0 -0
  10. package/brand/logo-lockup.png +0 -0
  11. package/brand/logo-lockup.svg +12 -0
  12. package/brand/logo-wordmark.svg +6 -0
  13. package/brand/logo.svg +19 -0
  14. package/cordis.patch.yml +39 -0
  15. package/lib/client.js +3071 -0
  16. package/lib/fold.js +1576 -0
  17. package/lib/host.js +605 -0
  18. package/package.json +65 -0
  19. package/presets/clearai/agent.cordis.yml +226 -0
  20. package/presets/clearai/plugins/brain.js +547 -0
  21. package/presets/clearai/plugins/clearai-kernel.js +5485 -0
  22. package/presets/clearai/plugins/ontology.js +306 -0
  23. package/presets/clearai/plugins/prompts.js +312 -0
  24. package/presets/clearai/preset.yml +5 -0
  25. package/presets/clearai/skills/clearai-loop/SKILL.md +89 -0
  26. package/presets/clearai/template/knowledge/README.md +25 -0
  27. package/presets/clearai/template/memory/README.md +34 -0
  28. package/presets/clearai/template/project.md +49 -0
  29. package/presets/clearai/template/skills/README.md +37 -0
  30. package/presets/clearai/template/skills/chart-diagram-qa/SKILL.md +43 -0
  31. package/presets/clearai/template/skills/citation-management/SKILL.md +73 -0
  32. package/presets/clearai/template/skills/citation-management/references/bibtex_formatting.md +908 -0
  33. package/presets/clearai/template/skills/citation-management/references/citation_validation.md +794 -0
  34. package/presets/clearai/template/skills/citation-management/references/google_scholar_search.md +725 -0
  35. package/presets/clearai/template/skills/citation-management/references/metadata_extraction.md +870 -0
  36. package/presets/clearai/template/skills/citation-management/references/pubmed_search.md +839 -0
  37. package/presets/clearai/template/skills/citation-management/scripts/doi_to_bibtex.py +204 -0
  38. package/presets/clearai/template/skills/citation-management/scripts/extract_metadata.py +569 -0
  39. package/presets/clearai/template/skills/citation-management/scripts/format_bibtex.py +349 -0
  40. package/presets/clearai/template/skills/citation-management/scripts/generate_schematic.py +139 -0
  41. package/presets/clearai/template/skills/citation-management/scripts/generate_schematic_ai.py +817 -0
  42. package/presets/clearai/template/skills/citation-management/scripts/search_google_scholar.py +282 -0
  43. package/presets/clearai/template/skills/citation-management/scripts/search_pubmed.py +398 -0
  44. package/presets/clearai/template/skills/citation-management/scripts/validate_citations.py +497 -0
  45. package/presets/clearai/template/skills/data-analysis/SKILL.md +92 -0
  46. package/presets/clearai/template/skills/data-analysis/checklists/readiness_check.md +23 -0
  47. package/presets/clearai/template/skills/data-analysis/templates/analysis_report.md.tpl +63 -0
  48. package/presets/clearai/template/skills/data-analysis/templates/cleaning_rules_draft.yaml.tpl +32 -0
  49. package/presets/clearai/template/skills/data-analysis/templates/data_dictionary.md.tpl +12 -0
  50. package/presets/clearai/template/skills/data-analysis/templates/domain_knowledge_template.md.tpl +316 -0
  51. package/presets/clearai/template/skills/data-analysis/templates/feature_candidates.json.tpl +20 -0
  52. package/presets/clearai/template/skills/data-analysis/templates/quality_scorecard.md.tpl +30 -0
  53. package/presets/clearai/template/skills/data-analysis/workflows/01-data-profiling.md +42 -0
  54. package/presets/clearai/template/skills/data-analysis/workflows/02-quality-audit.md +36 -0
  55. package/presets/clearai/template/skills/data-analysis/workflows/03-physical-correlation.md +25 -0
  56. package/presets/clearai/template/skills/data-analysis/workflows/04-unstructured-mining.md +26 -0
  57. package/presets/clearai/template/skills/data-qa-analysis/SKILL.md +102 -0
  58. package/presets/clearai/template/skills/data-qa-analysis/checklists/readiness_check.md +62 -0
  59. package/presets/clearai/template/skills/data-qa-analysis/templates/best_in_class_report.md.tpl +56 -0
  60. package/presets/clearai/template/skills/data-qa-analysis/templates/cleaning_rules_draft.yaml.tpl +56 -0
  61. package/presets/clearai/template/skills/data-qa-analysis/templates/data_dictionary.md.tpl +13 -0
  62. package/presets/clearai/template/skills/data-qa-analysis/templates/data_source_inventory_and_lineage.md.tpl +146 -0
  63. package/presets/clearai/template/skills/data-qa-analysis/templates/data_status_report.md.tpl +60 -0
  64. package/presets/clearai/template/skills/data-qa-analysis/templates/steady_state_rules.yaml.tpl +41 -0
  65. package/presets/clearai/template/skills/data-qa-analysis/templates/subsystem_registry.md.tpl +101 -0
  66. package/presets/clearai/template/skills/data-qa-analysis/templates/unified_execution_plan.md.tpl +100 -0
  67. package/presets/clearai/template/skills/data-qa-analysis/workflows/01-data-source-inventory-and-lineage.md +194 -0
  68. package/presets/clearai/template/skills/data-qa-analysis/workflows/02-data-alignment-and-tag-semantics.md +122 -0
  69. package/presets/clearai/template/skills/data-qa-analysis/workflows/03-steady-state-identification.md +126 -0
  70. package/presets/clearai/template/skills/data-qa-analysis/workflows/04-consumption-analysis.md +152 -0
  71. package/presets/clearai/template/skills/data-qa-analysis/workflows/05-best-in-class-and-optimization-space.md +78 -0
  72. package/presets/clearai/template/skills/domain-presearch/SKILL.md +131 -0
  73. package/presets/clearai/template/skills/domain-presearch/checklists/domain_checklist.md +24 -0
  74. package/presets/clearai/template/skills/domain-presearch/references/figure_code.md +78 -0
  75. package/presets/clearai/template/skills/domain-presearch/references/strategic_frameworks.md +38 -0
  76. package/presets/clearai/template/skills/exploration-loop/SKILL.md +81 -0
  77. package/presets/clearai/template/skills/exploratory-data-analysis/SKILL.md +77 -0
  78. package/presets/clearai/template/skills/exploratory-data-analysis/references/bioinformatics_genomics_formats.md +664 -0
  79. package/presets/clearai/template/skills/exploratory-data-analysis/references/chemistry_molecular_formats.md +664 -0
  80. package/presets/clearai/template/skills/exploratory-data-analysis/references/general_scientific_formats.md +518 -0
  81. package/presets/clearai/template/skills/exploratory-data-analysis/references/microscopy_imaging_formats.md +620 -0
  82. package/presets/clearai/template/skills/exploratory-data-analysis/references/proteomics_metabolomics_formats.md +517 -0
  83. package/presets/clearai/template/skills/exploratory-data-analysis/references/spectroscopy_analytical_formats.md +633 -0
  84. package/presets/clearai/template/skills/exploratory-data-analysis/scripts/eda_analyzer.py +547 -0
  85. package/presets/clearai/template/skills/hypothesis-generation/SKILL.md +73 -0
  86. package/presets/clearai/template/skills/hypothesis-generation/references/experimental_design_patterns.md +329 -0
  87. package/presets/clearai/template/skills/hypothesis-generation/references/hypothesis_quality_criteria.md +198 -0
  88. package/presets/clearai/template/skills/hypothesis-generation/references/literature_search_strategies.md +622 -0
  89. package/presets/clearai/template/skills/hypothesis-generation/scripts/generate_schematic.py +139 -0
  90. package/presets/clearai/template/skills/hypothesis-generation/scripts/generate_schematic_ai.py +817 -0
  91. package/presets/clearai/template/skills/literature-review/SKILL.md +72 -0
  92. package/presets/clearai/template/skills/literature-review/references/citation_styles.md +166 -0
  93. package/presets/clearai/template/skills/literature-review/references/database_strategies.md +455 -0
  94. package/presets/clearai/template/skills/literature-review/scripts/generate_pdf.py +176 -0
  95. package/presets/clearai/template/skills/literature-review/scripts/generate_schematic.py +139 -0
  96. package/presets/clearai/template/skills/literature-review/scripts/generate_schematic_ai.py +817 -0
  97. package/presets/clearai/template/skills/literature-review/scripts/search_databases.py +303 -0
  98. package/presets/clearai/template/skills/literature-review/scripts/verify_citations.py +221 -0
  99. package/presets/clearai/template/skills/paper-lookup/SKILL.md +59 -0
  100. package/presets/clearai/template/skills/paper-lookup/references/arxiv.md +161 -0
  101. package/presets/clearai/template/skills/paper-lookup/references/biorxiv.md +118 -0
  102. package/presets/clearai/template/skills/paper-lookup/references/core.md +150 -0
  103. package/presets/clearai/template/skills/paper-lookup/references/crossref.md +181 -0
  104. package/presets/clearai/template/skills/paper-lookup/references/medrxiv.md +104 -0
  105. package/presets/clearai/template/skills/paper-lookup/references/openalex.md +174 -0
  106. package/presets/clearai/template/skills/paper-lookup/references/pmc.md +152 -0
  107. package/presets/clearai/template/skills/paper-lookup/references/pubmed.md +124 -0
  108. package/presets/clearai/template/skills/paper-lookup/references/semantic-scholar.md +203 -0
  109. package/presets/clearai/template/skills/paper-lookup/references/unpaywall.md +127 -0
  110. package/presets/clearai/template/skills/process-presearch/SKILL.md +196 -0
  111. package/presets/clearai/template/skills/process-presearch/checklists/process_checklist.md +18 -0
  112. package/presets/clearai/template/skills/process-presearch/references/figure_code.md +107 -0
  113. package/presets/clearai/template/skills/process-presearch/references/source_attribution_example.md +22 -0
  114. package/presets/clearai/template/skills/process-understanding-extraction/SKILL.md +69 -0
  115. package/presets/clearai/template/skills/process-understanding-extraction/checklists/readiness_check.md +34 -0
  116. package/presets/clearai/template/skills/process-understanding-extraction/templates/docx_raw_dump_extractor.py.tpl +132 -0
  117. package/presets/clearai/template/skills/process-understanding-extraction/templates/entity_map_unit_topology.json.tpl +86 -0
  118. package/presets/clearai/template/skills/process-understanding-extraction/templates/process_brief.md.tpl +89 -0
  119. package/presets/clearai/template/skills/process-understanding-extraction/templates/process_brief_builder_from_raw_dump.py.tpl +203 -0
  120. package/presets/clearai/template/skills/process-understanding-extraction/templates/process_flow_mermaid.md.tpl +41 -0
  121. package/presets/clearai/template/skills/process-understanding-extraction/templates/unified_execution_plan.md.tpl +53 -0
  122. package/presets/clearai/template/skills/process-understanding-extraction/workflows/01-process-doc-discovery.md +173 -0
  123. package/presets/clearai/template/skills/process-understanding-extraction/workflows/02-process-understanding-and-diagramming.md +106 -0
  124. package/presets/clearai/template/skills/scientific-brainstorming/SKILL.md +64 -0
  125. package/presets/clearai/template/skills/scientific-brainstorming/references/brainstorming_methods.md +326 -0
  126. package/presets/clearai/template/skills/scientific-critical-thinking/SKILL.md +72 -0
  127. package/presets/clearai/template/skills/scientific-critical-thinking/references/common_biases.md +364 -0
  128. package/presets/clearai/template/skills/scientific-critical-thinking/references/evidence_hierarchy.md +485 -0
  129. package/presets/clearai/template/skills/scientific-critical-thinking/references/experimental_design.md +496 -0
  130. package/presets/clearai/template/skills/scientific-critical-thinking/references/logical_fallacies.md +478 -0
  131. package/presets/clearai/template/skills/scientific-critical-thinking/references/scientific_method.md +169 -0
  132. package/presets/clearai/template/skills/scientific-critical-thinking/references/statistical_pitfalls.md +506 -0
  133. package/presets/clearai/template/skills/skill-creator/SKILL.md +109 -0
  134. package/presets/clearai/template/skills/skill-creator/references/authoring-guide.md +89 -0
  135. package/presets/clearai/template/skills/statistical-analysis/SKILL.md +79 -0
  136. package/presets/clearai/template/skills/statistical-analysis/references/assumptions_and_diagnostics.md +369 -0
  137. package/presets/clearai/template/skills/statistical-analysis/references/bayesian_statistics.md +653 -0
  138. package/presets/clearai/template/skills/statistical-analysis/references/effect_sizes_and_power.md +578 -0
  139. package/presets/clearai/template/skills/statistical-analysis/references/reporting_standards.md +469 -0
  140. package/presets/clearai/template/skills/statistical-analysis/references/test_selection_guide.md +129 -0
  141. package/presets/clearai/template/skills/statistical-analysis/scripts/assumption_checks.py +538 -0
  142. package/presets/clearai/template/skills/web-artifact/SKILL.md +165 -0
  143. package/presets/clearai/template/skills/web-artifact/assets/renderer/renderer.css +229 -0
  144. package/presets/clearai/template/skills/web-artifact/assets/renderer/renderer.js +373 -0
  145. package/presets/clearai/template/skills/web-artifact/assets/vendor/elkjs/LICENSE +263 -0
  146. package/presets/clearai/template/skills/web-artifact/assets/vendor/elkjs/UPSTREAM.md +26 -0
  147. package/presets/clearai/template/skills/web-artifact/assets/vendor/elkjs/elk.bundled.js +6605 -0
  148. package/presets/clearai/template/skills/web-artifact/references/when-drawing-a-topology.md +150 -0
  149. package/presets/clearai/template/skills/web-artifact/references/when-the-page-must-work-offline.md +62 -0
  150. package/presets/clearai/template/skills/web-artifact/scripts/check_artifact.py +167 -0
  151. package/presets/clearai/template/skills/web-artifact/scripts/render_topology.js +272 -0
  152. package/presets/clearai/template/skills/what-if-oracle/LICENSE.txt +5 -0
  153. package/presets/clearai/template/skills/what-if-oracle/SKILL.md +72 -0
  154. package/presets/clearai/template/skills/what-if-oracle/references/scenario-templates.md +154 -0
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: what-if-oracle
3
+ description: |
4
+ 【情景推演·方案比选】多分支 What-If 分析(最好/最可能/最坏/二阶效应)。适用:实验方案变更、数据源替换、方法路线切换、资源投入决策前的情景压力测试。不适用:已有数据的统计验证(用 statistical-analysis);深度关联与根因分析(用 data-analysis)。
5
+ license: CC BY-NC-SA 4.0
6
+ metadata:
7
+ version: 1.1-clearai
8
+ upstream: https://github.com/ashrafkahoush-ux/claude-consciousness-skills
9
+ tier: system
10
+ origin: template
11
+ created_at: '2026-06-12T02:47:05.412617+00:00'
12
+ ---
13
+
14
+ # What-If Oracle Skill(科研情景版)
15
+
16
+ > 许可:CC BY-NC-SA 4.0,详见本目录 `LICENSE.txt`(若已复制)。
17
+
18
+ ## 使用边界
19
+
20
+ - **适用**:决策分叉、不确定性高、需映射可能性空间而非单点预测。
21
+ - **不适用**:可凭历史数据直接检验的假设 → `statistical-analysis`;正式预研报告 → domain/process presearch。
22
+
23
+ ## ClearAI 工具与路径映射
24
+
25
+ - 背景事实 → `web_search` / `read` 已有报告
26
+ - 情景文档 → `write` 到 `lab/knowledge/scenarios.md`
27
+ - 示意图 → mermaid → `lab/diagrams/`
28
+ - 经验回写 → `clear/memory/what_if_lessons.md`
29
+
30
+ ## 核心原则:精确 IF
31
+
32
+ 模糊「如果出问题怎么办」无效。须量化:
33
+ - **变量**:什么变?(如 主力数据集样本量 -30%)
34
+ - **幅度**:变多少?
35
+ - **时间窗**:本季度 / 6 个月?
36
+ - **当前态**:变更前基线?
37
+
38
+ ## 工作流
39
+
40
+ ### Phase 1:框定问题
41
+
42
+ 分解为 Variable / Magnitude / Timeframe / Context。参见 `references/scenario-templates.md` 科研/数据段落。
43
+
44
+ ### Phase 2:分支探索(4–6 条)
45
+
46
+ | 分支 | 说明 |
47
+ |------|------|
48
+ | Best | 乐观但需说明条件 |
49
+ | Likely | 基准情景 |
50
+ | Worst | 下行风险 |
51
+ | Wildcard | 低概率高影响 |
52
+ | Contrarian | 与共识相反 |
53
+ | Second-order | 一阶后果的连锁 |
54
+
55
+ ### Phase 3:每条分支的逻辑链
56
+
57
+ - 触发条件 → 一阶影响(结果有效性/进度/成本)→ 二阶影响 → 可观测指标
58
+
59
+ ### Phase 4:决策建议
60
+
61
+ - 不需替用户决策;列出「需监测的信号」与「建议的验证动作」(可链到 `hypothesis-generation`)
62
+
63
+ ## 常见场景模板
64
+
65
+ - **实验方案变更**:条件/参数/流程调整对结果有效性与成本的影响
66
+ - **数据源替换**:换用新数据集或采集渠道后的可比性与偏差风险
67
+ - **方法路线切换**:更换分析/建模方法的收益、迁移成本与回退路径
68
+ - **资源投入决策**:加大算力/实验投入前的收益-风险压力测试
69
+
70
+ ## 交付物 `lab/knowledge/scenarios.md`
71
+
72
+ 含分支表、概率区间(定性高/中/低即可)、监测指标、下一步验证建议。
@@ -0,0 +1,154 @@
1
+ # What-If Oracle — Scenario Templates
2
+
3
+ Reference guide for domain-specific scenario analysis configurations.
4
+
5
+ ## Research / Data Science
6
+
7
+ **Variables to test:**
8
+
9
+ - Experiment protocol changes (conditions, parameters, sample size)
10
+ - Data source replacement or collection interruption
11
+ - Method/model route switch (new algorithm vs. established baseline)
12
+ - Resource allocation (compute, personnel, funding, time window)
13
+ - Validity threats (confounders, drift, selection bias)
14
+
15
+ **Branch emphasis:** Likely Case + Worst Case + Second Order
16
+ **Key tension:** Rigor vs. iteration speed — evidence strength vs. time-to-conclusion
17
+
18
+ **Template prompt:**
19
+
20
+ > "What if we [change protocol / swap data source / switch method] in [timeframe]? Current baseline: [design, sample size, key metrics]. Key constraint: [compute/funding/deadline]. What we must not compromise: [validity requirement]."
21
+
22
+ ## Startup / Business Decision
23
+
24
+ **Variables to test:**
25
+
26
+ - Market entry timing
27
+ - Pricing strategy
28
+ - Partnership terms
29
+ - Hiring decisions
30
+ - Funding rounds
31
+
32
+ **Branch emphasis:** Likely Case + Contrarian + Second Order
33
+ **Key tension:** Speed vs. thoroughness — startups can't afford to analyze forever
34
+
35
+ **Template prompt:**
36
+
37
+ > "What if we [specific action] in [timeframe]? Our current state: [revenue, team size, runway]. Key constraint: [the limiting factor]."
38
+
39
+ ## Technology Architecture
40
+
41
+ **Variables to test:**
42
+
43
+ - Tech stack choice
44
+ - Build vs. buy
45
+ - Scaling approach
46
+ - Security model
47
+ - Migration path
48
+
49
+ **Branch emphasis:** Worst Case + Wild Card + Second Order
50
+ **Key tension:** Engineering elegance vs. shipping speed
51
+
52
+ **Template prompt:**
53
+
54
+ > "What if we choose [technology/approach] for [system]? Current architecture: [brief description]. Team capability: [relevant skills]. Timeline: [deadline]."
55
+
56
+ ## Investment / Financial
57
+
58
+ **Variables to test:**
59
+
60
+ - Market conditions
61
+ - Valuation scenarios
62
+ - Exit timing
63
+ - Capital allocation
64
+ - Revenue model changes
65
+
66
+ **Branch emphasis:** All 6 branches — money decisions deserve full analysis
67
+ **Key tension:** Risk tolerance vs. opportunity cost
68
+
69
+ **Template prompt:**
70
+
71
+ > "What if [market condition / financial event] happens? Our exposure: [amount/percentage]. Current position: [financial state]. Time horizon: [investment period]."
72
+
73
+ ## Career / Personal
74
+
75
+ **Variables to test:**
76
+
77
+ - Job change
78
+ - Skill development path
79
+ - Relocation
80
+ - Relationship decisions
81
+ - Health changes
82
+
83
+ **Branch emphasis:** Likely Case + Best Case + Contrarian
84
+ **Key tension:** Security vs. growth — comfort zone vs. expansion
85
+
86
+ **Template prompt:**
87
+
88
+ > "What if I [personal decision]? My current situation: [brief]. What I value most: [1-3 values]. What I'm afraid of: [honest answer]."
89
+
90
+ ## Geopolitical / Macro
91
+
92
+ **Variables to test:**
93
+
94
+ - Policy changes
95
+ - Regulatory shifts
96
+ - Market disruptions
97
+ - Technology breakthroughs
98
+ - Social movements
99
+
100
+ **Branch emphasis:** Wild Card + Second Order + Contrarian
101
+ **Key tension:** Local impact vs. systemic effects
102
+
103
+ **Template prompt:**
104
+
105
+ > "What if [geopolitical event] happens? My exposure: [how it affects me/my organization]. Time horizon: [relevant period]."
106
+
107
+ ## Crisis Response
108
+
109
+ **Variables to test:**
110
+
111
+ - Severity escalation
112
+ - Communication strategy
113
+ - Resource allocation
114
+ - Recovery timeline
115
+ - Reputation impact
116
+
117
+ **Branch emphasis:** Worst Case (detailed) + Likely Case + Second Order
118
+ **Key tension:** Immediate triage vs. root cause resolution
119
+
120
+ **Template prompt:**
121
+
122
+ > "We're facing [crisis/incident]. Current impact: [what's broken]. Stakeholders affected: [who]. Resources available: [what we can deploy]. What if [specific escalation scenario]?"
123
+
124
+ ## The Recursive Template
125
+
126
+ For complex, multi-layered analysis:
127
+
128
+ ```
129
+ ROUND 1: "What if X?"
130
+ → Identify the most likely branch (α)
131
+
132
+ ROUND 2: "Given α is happening, what if Y?"
133
+ → Identify the most likely sub-branch
134
+
135
+ ROUND 3: "Given α+Y, what if Z?"
136
+ → Map the deepest consequences
137
+
138
+ Each round narrows the possibility space while deepening understanding.
139
+ Maximum recommended depth: 3 rounds.
140
+ ```
141
+
142
+ ## Probability Calibration Guide
143
+
144
+ When assigning probabilities to branches:
145
+
146
+ | Confidence Level | Probability Range | Evidence Required |
147
+ | ---------------- | ----------------- | ---------------------------------------------------------- |
148
+ | **Very High** | >80% | Strong historical precedent + current data alignment |
149
+ | **High** | 60-80% | Multiple converging signals, some historical support |
150
+ | **Medium** | 30-60% | Mixed signals, could go either way |
151
+ | **Low** | 10-30% | Plausible but requires several things to go a specific way |
152
+ | **Very Low** | <10% | Black swan territory — possible but unlikely |
153
+
154
+ **Rule:** All branch probabilities in a single analysis should sum to approximately 100%. If they don't, there's a missing branch.