@furongjun1999/dsh-memory 0.9.18 → 0.9.22

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 (1238) hide show
  1. package/CHANGELOG.md +404 -232
  2. package/LICENSE +21 -21
  3. package/README.md +33 -0
  4. package/codebuddy/mcp.json +27 -27
  5. package/docs/README.md +1 -0
  6. package/docs/mdcg/CCG/345/205/255/350/246/201/347/264/240/347/274/226/350/257/221.md +30 -0
  7. package/docs/mdcg/MCP/345/267/245/345/205/267/345/220/215/345/217/243/345/276/204_v1.0.md +41 -0
  8. package/docs/mdcg/cogmap_ops.md +36 -0
  9. package/docs/mdcg/guardrail-charter.md +168 -0
  10. package/docs/mdcg/recall_metadata.md +41 -0
  11. package/docs/mdcg//344/270/226/347/225/214/346/250/241/345/236/213/345/212/237/350/203/275/347/253/257_/344/275/277/347/224/250/344/270/216/350/277/220/347/273/264_v1.0.md +384 -0
  12. package/docs/mdcg//345/206/231/345/205/245/345/210/253/345/220/215aliases/350/247/204/350/214/203_v0.6.md +128 -0
  13. package/docs//350/247/204/350/214/203/AI/347/274/226/347/250/213/351/200/232/347/224/250/350/247/204/350/214/203_/347/201/265/346/236/242/351/200/202/351/205/215.md +45 -45
  14. package/dsh/dsh-web-start.bat +17 -17
  15. package/dsh/hive-mcp-probe.mjs +94 -94
  16. package/dsh/update-lingshu.bat +11 -11
  17. package/dsh/update-lingshu.ps1 +337 -337
  18. package/hive/README.md +705 -705
  19. package/hive/id_charset_blocks.txt +147 -147
  20. package/lib/tools.d.ts +2 -2
  21. package/md_cg/__init__.py +7 -7
  22. package/md_cg/auditview.py +248 -248
  23. package/md_cg/backfill.py +1328 -1328
  24. package/md_cg/backfill_bigdomain.py +34 -34
  25. package/md_cg/backfill_bucket_zh.py +35 -35
  26. package/md_cg/bench6_arms.py +414 -414
  27. package/md_cg/bench6_common.py +230 -230
  28. package/md_cg/bench6_competitors.py +212 -212
  29. package/md_cg/bench_axis_domain.py +257 -257
  30. package/md_cg/bench_blind_comp.py +308 -308
  31. package/md_cg/bench_e2e_judge.py +534 -534
  32. package/md_cg/bench_e2e_locomo_qa.py +375 -375
  33. package/md_cg/bench_e2e_qa.py +256 -256
  34. package/md_cg/bench_en_atoms_public.py +230 -230
  35. package/md_cg/bench_governance.py +351 -351
  36. package/md_cg/bench_lme_zh.py +410 -410
  37. package/md_cg/bench_locomo.py +121 -121
  38. package/md_cg/bench_locomo_zh.py +460 -460
  39. package/md_cg/bench_locomo_zh_public.py +147 -147
  40. package/md_cg/bench_longmem.py +112 -112
  41. package/md_cg/bench_membench.py +632 -632
  42. package/md_cg/bench_p0.py +149 -149
  43. package/md_cg/bench_progressive.py +287 -287
  44. package/md_cg/bench_role_views.py +238 -238
  45. package/md_cg/bench_task_ab.py +243 -243
  46. package/md_cg/bench_task_ab_llm.py +408 -408
  47. package/md_cg/bench_unified_en.py +204 -204
  48. package/md_cg/bench_zh_mad.py +611 -611
  49. package/md_cg/blindspot_tickets.py +123 -123
  50. package/md_cg/census.py +133 -133
  51. package/md_cg/codeindex.py +531 -531
  52. package/md_cg/comment_gate.py +337 -337
  53. package/md_cg/cond_compose.py +190 -190
  54. package/md_cg/cond_facts.py +154 -154
  55. package/md_cg/cond_template.json +106 -106
  56. package/md_cg/condition_anchor.py +142 -142
  57. package/md_cg/corpus.py +110 -110
  58. package/md_cg/crosscheck.py +1098 -1098
  59. package/md_cg/d_meta.py +310 -310
  60. package/md_cg/evolution.py +493 -493
  61. package/md_cg/generation.py +409 -409
  62. package/md_cg/ghostref.py +130 -130
  63. package/md_cg/lexicon/RULES.md +32 -32
  64. package/md_cg/lexicon/build_cedict_en_zh.py +329 -329
  65. package/md_cg/lexicon/build_standard_en.py +171 -171
  66. package/md_cg/lexicon/cedict_en_zh.json +28322 -28322
  67. package/md_cg/lexicon/char_atoms_clean.json +43813 -43813
  68. package/md_cg/lexicon/expand_en_zh.py +211 -211
  69. package/md_cg/lexicon/standard_en.json +1262 -1262
  70. package/md_cg/linkref.py +280 -280
  71. package/md_cg/mcp_server.py +4 -0
  72. package/md_cg/md_whitebox.py +345 -345
  73. package/md_cg/mdcg.py +12 -1
  74. package/md_cg/mdcos.py +14 -1
  75. package/md_cg/migrate.py +119 -119
  76. package/md_cg/migrate_aeis.py +221 -221
  77. package/md_cg/migrate_roleplay.py +293 -293
  78. package/md_cg/migrate_wisdom_graph.py +360 -360
  79. package/md_cg/mreview/__init__.py +25 -25
  80. package/md_cg/mreview/__main__.py +110 -110
  81. package/md_cg/mreview/bundle.py +178 -178
  82. package/md_cg/mreview/candidates.py +262 -262
  83. package/md_cg/mreview/govern.py +694 -694
  84. package/md_cg/mreview/locate.py +939 -939
  85. package/md_cg/mreview/pipeline.py +742 -742
  86. package/md_cg/mreview/rules/duplication.json +21 -21
  87. package/md_cg/mreview/rules/field_coverage.json +54 -54
  88. package/md_cg/mreview/rules/source_license.json +21 -21
  89. package/md_cg/mreview/rules/template_flow.json +21 -21
  90. package/md_cg/mreview/ruleset.py +252 -252
  91. package/md_cg/op_table.py +4 -0
  92. package/md_cg/progressive.py +123 -123
  93. package/md_cg/protocol/md_cg_gate.proto +33 -33
  94. package/md_cg/qmd_llm.py +334 -334
  95. package/md_cg/repeat_guard.py +122 -0
  96. package/md_cg/roleviews.py +89 -89
  97. package/md_cg/selfreport.py +161 -161
  98. package/md_cg/semantic/REPRODUCE.md +170 -170
  99. package/md_cg/semantic/SCHEMA.md +33 -33
  100. package/md_cg/semantic/__init__.py +10 -10
  101. package/md_cg/semantic/atoms.json +7348 -7348
  102. package/md_cg/semantic/en_normalizer.py +364 -364
  103. package/md_cg/semantic/search_index.json +6199 -6199
  104. package/md_cg/session5.py +198 -0
  105. package/md_cg/srcindex.py +352 -352
  106. package/md_cg/statushdr.py +179 -179
  107. package/md_cg/test_722_aliases_thin.py +85 -0
  108. package/md_cg/test_722_condition_quality.py +83 -0
  109. package/md_cg/test_723_permission_wildcard.py +80 -0
  110. package/md_cg/test_access_hints.py +147 -147
  111. package/md_cg/test_aliases_r2r3.py +92 -0
  112. package/md_cg/test_audit_rotate.py +270 -270
  113. package/md_cg/test_auditview.py +277 -277
  114. package/md_cg/test_autonomy.py +143 -143
  115. package/md_cg/test_autonomy_admission.py +1098 -1098
  116. package/md_cg/test_b1_auto_id_multiproc.py +284 -284
  117. package/md_cg/test_b1_foreign_read.py +244 -244
  118. package/md_cg/test_b1b2_write_face.py +424 -424
  119. package/md_cg/test_b2_sensitivity_landing.py +223 -223
  120. package/md_cg/test_b3_merge_keeps_content.py +583 -583
  121. package/md_cg/test_bench_governance.py +102 -102
  122. package/md_cg/test_blindspot_tickets.py +166 -166
  123. package/md_cg/test_boundary_hit.py +410 -410
  124. package/md_cg/test_branch_discard_tombstone.py +136 -136
  125. package/md_cg/test_ccg_perturb.py +184 -184
  126. package/md_cg/test_ccgc.py +458 -458
  127. package/md_cg/test_census_prune.py +81 -81
  128. package/md_cg/test_chain_read_isolate.py +168 -168
  129. package/md_cg/test_codeindex.py +338 -338
  130. package/md_cg/test_coldverify_drain.py +127 -127
  131. package/md_cg/test_comment_gate.py +187 -187
  132. package/md_cg/test_cond_compose_anchors.py +76 -76
  133. package/md_cg/test_cond_match.py +165 -165
  134. package/md_cg/test_condition_anchor.py +81 -81
  135. package/md_cg/test_config_registry.py +55 -55
  136. package/md_cg/test_cons200_scan_selection.py +793 -793
  137. package/md_cg/test_corrupt_utf8_read_surfaces.py +451 -451
  138. package/md_cg/test_crypto_rotate.py +256 -256
  139. package/md_cg/test_csre_index_import_guard.py +161 -161
  140. package/md_cg/test_curiosity_budget.py +468 -468
  141. package/md_cg/test_d17_autostart_toolface.py +453 -453
  142. package/md_cg/test_d_meta.py +412 -412
  143. package/md_cg/test_datapath_root.py +199 -199
  144. package/md_cg/test_emit_negtail_cache.py +156 -156
  145. package/md_cg/test_export_default_collision.py +138 -138
  146. package/md_cg/test_gain_gate.py +223 -223
  147. package/md_cg/test_ghostref.py +182 -182
  148. package/md_cg/test_goal_gen.py +355 -355
  149. package/md_cg/test_govern_directread.py +434 -434
  150. package/md_cg/test_health_scale.py +173 -173
  151. package/md_cg/test_heartbeat_ledger.py +563 -563
  152. package/md_cg/test_hive_ingest.py +285 -285
  153. package/md_cg/test_hot_cold.py +215 -215
  154. package/md_cg/test_hyperedge.py +245 -245
  155. package/md_cg/test_i50a_half_dup_defer.py +408 -408
  156. package/md_cg/test_i50b_defer_to_review_queue.py +545 -545
  157. package/md_cg/test_i50d_importance_source.py +531 -531
  158. package/md_cg/test_identity_contract.py +329 -329
  159. package/md_cg/test_index_crossprocess_reload.py +316 -316
  160. package/md_cg/test_issue376_heartbeat_failed.py +29 -4
  161. package/md_cg/test_issue39_utf8_stdio.py +572 -572
  162. package/md_cg/test_issue52_scan_condition_first.py +677 -677
  163. package/md_cg/test_issue53_cipher_health_hash.py +385 -385
  164. package/md_cg/test_issue66_scrub_semantics.py +107 -107
  165. package/md_cg/test_issue67_scrub_control_pool.py +233 -233
  166. package/md_cg/test_issue69_audit_boundary.py +129 -129
  167. package/md_cg/test_issue73_doc_chapter_refs.py +326 -326
  168. package/md_cg/test_issue78_export_concurrency.py +334 -334
  169. package/md_cg/test_issue80_residual_flush.py +169 -169
  170. package/md_cg/test_issue84_portability.py +95 -95
  171. package/md_cg/test_issue85_export_overwrite.py +113 -113
  172. package/md_cg/test_issue86_runtime_revoke.py +110 -110
  173. package/md_cg/test_issue87_default_sensitivity_single.py +201 -201
  174. package/md_cg/test_issue88_conclusion_face.py +280 -280
  175. package/md_cg/test_issue89_zero_score.py +169 -169
  176. package/md_cg/test_issue91_verifier_timeout.py +528 -528
  177. package/md_cg/test_issue96_key_fallback.py +102 -102
  178. package/md_cg/test_issue98_tenant_root.py +104 -104
  179. package/md_cg/test_legacy_p3_node_id_type.py +375 -375
  180. package/md_cg/test_lifecycle.py +309 -309
  181. package/md_cg/test_lifecycle_retire_leak.py +498 -498
  182. package/md_cg/test_linkref.py +320 -320
  183. package/md_cg/test_links_concurrent_write.py +188 -188
  184. package/md_cg/test_lock.py +52 -52
  185. package/md_cg/test_logref.py +4 -4
  186. package/md_cg/test_m3_h9_bucket_health_protect_mark.py +301 -301
  187. package/md_cg/test_m3_h9_semantic_guard.py +525 -525
  188. package/md_cg/test_md_writepath.py +345 -345
  189. package/md_cg/test_merge_upsert.py +168 -168
  190. package/md_cg/test_mode_parity.py +11 -0
  191. package/md_cg/test_mr_m3.py +710 -710
  192. package/md_cg/test_mr_m4.py +485 -485
  193. package/md_cg/test_n131_merge_gate.py +205 -205
  194. package/md_cg/test_n139_dek_provision_failclosed.py +185 -185
  195. package/md_cg/test_n176_link_trust.py +221 -221
  196. package/md_cg/test_n178_units_jobid_gate.py +212 -212
  197. package/md_cg/test_n184_keys_concurrent_provision.py +307 -307
  198. package/md_cg/test_n195_writepath_reload.py +283 -283
  199. package/md_cg/test_n196_stale_gate_skip.py +169 -169
  200. package/md_cg/test_n197_n208_write_face_gates.py +471 -471
  201. package/md_cg/test_n198_tokens_corrupt_failclosed.py +225 -225
  202. package/md_cg/test_n199_tokens_concurrent_write.py +378 -378
  203. package/md_cg/test_n201_proposal_visibility.py +382 -382
  204. package/md_cg/test_n202_session_notes_visibility.py +461 -461
  205. package/md_cg/test_n204_n205_n226_n227_n228_n229_exit_gates.py +542 -542
  206. package/md_cg/test_n206_stdio_jsonrpc_type.py +403 -403
  207. package/md_cg/test_n212_n213_n224_generation_gates.py +519 -519
  208. package/md_cg/test_n214_n215_n221_n222_write_face_gates.py +570 -570
  209. package/md_cg/test_n225_nonobject_load.py +1110 -1110
  210. package/md_cg/test_n238_body_text_parity.py +156 -156
  211. package/md_cg/test_n276_probe_hoist.py +199 -199
  212. package/md_cg/test_neg_condition_hits.py +333 -333
  213. package/md_cg/test_neg_coverage_budget.py +500 -500
  214. package/md_cg/test_none_id_write_guard.py +166 -166
  215. package/md_cg/test_opt_batch1_md_cg.py +451 -451
  216. package/md_cg/test_p0.py +264 -264
  217. package/md_cg/test_p1.py +316 -316
  218. package/md_cg/test_p10_identity.py +173 -173
  219. package/md_cg/test_p11_consistency.py +382 -382
  220. package/md_cg/test_p12_metacognition.py +212 -212
  221. package/md_cg/test_p13_encryption.py +241 -241
  222. package/md_cg/test_p14_root_fallback.py +373 -373
  223. package/md_cg/test_p14_sustain.py +249 -249
  224. package/md_cg/test_p15_scrub.py +280 -280
  225. package/md_cg/test_p16_self_state.py +301 -301
  226. package/md_cg/test_p17_predict.py +354 -354
  227. package/md_cg/test_p18_whitebox.py +171 -171
  228. package/md_cg/test_p19_migrate_roleplay.py +149 -149
  229. package/md_cg/test_p1x_ref_root.py +197 -197
  230. package/md_cg/test_p2.py +216 -216
  231. package/md_cg/test_p20_evolution.py +315 -315
  232. package/md_cg/test_p22_theory.py +175 -175
  233. package/md_cg/test_p23_links.py +311 -311
  234. package/md_cg/test_p25_weights.py +156 -156
  235. package/md_cg/test_p26_refindex.py +433 -433
  236. package/md_cg/test_p27_docindex.py +12 -7
  237. package/md_cg/test_p29_session_ingest_export.py +360 -360
  238. package/md_cg/test_p30_maintain.py +361 -361
  239. package/md_cg/test_p31_insight.py +535 -535
  240. package/md_cg/test_p34_crosscheck.py +331 -331
  241. package/md_cg/test_p35_conditioned_claim.py +252 -252
  242. package/md_cg/test_p36_kp_align.py +230 -230
  243. package/md_cg/test_p37_condition_space.py +248 -248
  244. package/md_cg/test_p38_contextualize.py +273 -273
  245. package/md_cg/test_p39_vision_evidence.py +369 -369
  246. package/md_cg/test_p41_evolve_patrol.py +224 -224
  247. package/md_cg/test_p42_provenance.py +269 -269
  248. package/md_cg/test_p44_md_whitebox.py +231 -231
  249. package/md_cg/test_p46_unit_scope.py +272 -272
  250. package/md_cg/test_p4_fuzzy.py +223 -223
  251. package/md_cg/test_p5_semantic.py +226 -226
  252. package/md_cg/test_p6_consolidate.py +822 -822
  253. package/md_cg/test_p7_goals_recent.py +202 -202
  254. package/md_cg/test_p83_jsonrpc_parse_error.py +124 -124
  255. package/md_cg/test_p8_subgraph_chain.py +213 -213
  256. package/md_cg/test_p9_forget_protect.py +238 -238
  257. package/md_cg/test_preflight_failclosed.py +100 -100
  258. package/md_cg/test_progressive.py +146 -146
  259. package/md_cg/test_propose_tail_index.py +157 -157
  260. package/md_cg/test_protocol.py +272 -272
  261. package/md_cg/test_rank_parity_score_mode.py +522 -522
  262. package/md_cg/test_reach_keys.py +201 -201
  263. package/md_cg/test_read_clip.py +141 -141
  264. package/md_cg/test_read_face_input_gates.py +363 -363
  265. package/md_cg/test_read_face_semantics.py +492 -492
  266. package/md_cg/test_read_scope_b27.py +277 -277
  267. package/md_cg/test_readcache_default_on.py +168 -168
  268. package/md_cg/test_readcache_precise_inval.py +270 -270
  269. package/md_cg/test_recall_metadata.py +422 -422
  270. package/md_cg/test_reconcile_v0.py +294 -294
  271. package/md_cg/test_repeat_guard_charter15.py +89 -0
  272. package/md_cg/test_retr_s1.py +344 -344
  273. package/md_cg/test_retr_s1b.py +276 -276
  274. package/md_cg/test_retr_s3.py +194 -194
  275. package/md_cg/test_retr_s4.py +163 -163
  276. package/md_cg/test_retr_s6.py +157 -157
  277. package/md_cg/test_retr_s7.py +392 -392
  278. package/md_cg/test_retr_s8_time.py +369 -369
  279. package/md_cg/test_retr_s9_edges.py +286 -286
  280. package/md_cg/test_retr_score_once.py +220 -220
  281. package/md_cg/test_review_cli_attribution.py +181 -181
  282. package/md_cg/test_review_cli_visibility.py +235 -235
  283. package/md_cg/test_review_conformance.py +385 -385
  284. package/md_cg/test_review_onepass.py +170 -170
  285. package/md_cg/test_review_queue_batch.py +123 -123
  286. package/md_cg/test_review_queue_index.py +130 -130
  287. package/md_cg/test_role_views.py +354 -354
  288. package/md_cg/test_rrf_graph_seed_cache.py +154 -154
  289. package/md_cg/test_security_audit_v21.py +249 -249
  290. package/md_cg/test_sem_noise.py +242 -242
  291. package/md_cg/test_server_version.py +67 -67
  292. package/md_cg/test_session5_identity.py +93 -93
  293. package/md_cg/test_session5_resolve.py +247 -0
  294. package/md_cg/test_session_attribution_consistency.py +813 -813
  295. package/md_cg/test_session_identity_tristate.py +486 -486
  296. package/md_cg/test_session_isolation.py +168 -168
  297. package/md_cg/test_sleep.py +668 -668
  298. package/md_cg/test_sleep_gitlock.py +134 -134
  299. package/md_cg/test_snapshot_autoclose.py +187 -187
  300. package/md_cg/test_spatial_coords3d.py +292 -292
  301. package/md_cg/test_srcindex.py +171 -171
  302. package/md_cg/test_state_events.py +178 -178
  303. package/md_cg/test_state_slots.py +691 -691
  304. package/md_cg/test_subproc_encoding.py +192 -192
  305. package/md_cg/test_sustain_mutual.py +153 -153
  306. package/md_cg/test_tail_watermark_race.py +208 -208
  307. package/md_cg/test_tasks.py +409 -409
  308. package/md_cg/test_tenant_env_override_warn.py +152 -152
  309. package/md_cg/test_tenant_registry_corrupt_warn.py +151 -151
  310. package/md_cg/test_token_lowercase_form.py +315 -315
  311. package/md_cg/test_transfer.py +180 -180
  312. package/md_cg/test_trust.py +361 -361
  313. package/md_cg/test_twophase.py +286 -286
  314. package/md_cg/test_unify_default_off.py +701 -701
  315. package/md_cg/test_unify_scope.py +182 -182
  316. package/md_cg/test_units_poll.py +71 -71
  317. package/md_cg/test_v21r1_package_version.py +310 -310
  318. package/md_cg/test_validity_filter.py +280 -280
  319. package/md_cg/test_verify_answer.py +138 -138
  320. package/md_cg/test_verify_dirty_reconcile.py +157 -157
  321. package/md_cg/test_w5_path_fingerprint.py +381 -381
  322. package/md_cg/test_wisdom_md_store.py +292 -292
  323. package/md_cg/test_writelimit.py +224 -224
  324. package/md_cg/units.py +869 -869
  325. package/md_cg/vision_evidence.py +667 -667
  326. package/md_cg/whitebox_kb/__init__.py +37 -37
  327. package/md_cg/whitebox_kb/aeis_core/__init__.py +42 -42
  328. package/md_cg/whitebox_kb/aeis_core/api.py +1047 -1047
  329. package/md_cg/whitebox_kb/aeis_core/semantic.py +280 -280
  330. package/md_cg/whitebox_kb/aeis_core/textutil.py +13 -13
  331. package/md_cg/whitebox_kb/aeis_core/time_core.py +51 -51
  332. package/md_cg/whitebox_kb/engine.py +310 -310
  333. package/md_cg/whitebox_kb/seed_knowledge/__init__.py +2 -2
  334. package/md_cg/whitebox_kb/seed_knowledge/guardrail-charter.md +164 -164
  335. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//344/270/255/345/233/275/345/217/244/344/273/243/346/226/207/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +113 -113
  336. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//344/270/255/345/233/275/347/216/260/344/273/243/346/226/207/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +89 -89
  337. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//344/272/272/345/267/245/346/231/272/350/203/275/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +121 -121
  338. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//344/272/272/347/261/273/350/247/202/345/257/237/350/200/205/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +161 -161
  339. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//344/274/232/350/256/241/345/255/246/345/216/237/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +89 -89
  340. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//344/277/241/346/201/257/350/256/272/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +90 -90
  341. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/206/345/255/220/347/224/237/347/211/251/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +113 -113
  342. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/206/346/236/220/345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +113 -113
  343. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/235/344/270/255/345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +241 -241
  344. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/235/344/270/255/345/216/206/345/217/262/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +117 -117
  345. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/235/344/270/255/345/234/260/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +109 -109
  346. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/235/344/270/255/346/225/260/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +241 -241
  347. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/235/344/270/255/347/211/251/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +317 -317
  348. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/235/344/270/255/347/224/237/347/211/251/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +261 -261
  349. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/235/344/270/255/350/213/261/350/257/255/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +113 -113
  350. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/235/344/270/255/350/257/255/346/226/207/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +113 -113
  351. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/210/235/344/270/255/351/201/223/345/276/267/344/270/216/346/263/225/346/262/273/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +105 -105
  352. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/212/250/347/211/251/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  353. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +1194 -1194
  354. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/214/226/345/267/245/345/216/237/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +113 -113
  355. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/214/273/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +111 -111
  356. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/216/206/345/217/262/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +278 -278
  357. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/216/237/345/255/220/347/211/251/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +97 -97
  358. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/217/244/344/273/243/346/261/211/350/257/255/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +97 -97
  359. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/223/262/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +111 -111
  360. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/233/272/344/275/223/347/211/251/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +133 -133
  361. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/234/237/346/234/250/345/267/245/347/250/213/345/237/272/347/241/200/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +89 -89
  362. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/234/260/347/220/206/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +154 -154
  363. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/244/215/345/217/230/345/207/275/346/225/260/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +129 -129
  364. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/244/226/345/233/275/346/226/207/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +85 -85
  365. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/244/247/345/255/246/345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +169 -169
  366. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/244/247/345/255/246/346/200/235/346/224/277/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +117 -117
  367. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/244/247/345/255/246/347/211/251/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +201 -201
  368. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/244/247/345/255/246/350/213/261/350/257/255/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +93 -93
  369. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/244/251/344/275/223/347/211/251/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +89 -89
  370. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/244/251/346/226/207/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +131 -131
  371. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/256/217/350/247/202/347/273/217/346/265/216/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +105 -105
  372. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/256/236/345/217/230/345/207/275/346/225/260/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +129 -129
  373. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/260/217/345/255/246/346/225/260/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +333 -333
  374. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/260/217/345/255/246/347/247/221/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +1124 -1124
  375. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/260/217/345/255/246/350/213/261/350/257/255/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +105 -105
  376. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/260/217/345/255/246/350/257/255/346/226/207/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +117 -117
  377. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/260/217/345/255/246/351/201/223/345/276/267/344/270/216/346/263/225/346/262/273/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +105 -105
  378. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/267/245/347/250/213/345/210/266/345/233/276/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +85 -85
  379. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/267/245/347/250/213/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +362 -362
  380. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/270/202/345/234/272/350/220/245/351/224/200/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +81 -81
  381. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/270/270/345/276/256/345/210/206/346/226/271/347/250/213/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +153 -153
  382. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/276/256/345/210/206/345/207/240/344/275/225/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  383. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/276/256/347/224/237/347/211/251/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +97 -97
  384. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/276/256/350/247/202/347/273/217/346/265/216/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  385. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//345/277/203/347/220/206/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +119 -119
  386. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/203/205/346/204/237/346/203/205/347/273/252/344/273/277/347/234/237/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +186 -186
  387. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/212/275/350/261/241/344/273/243/346/225/260/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +109 -109
  388. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/213/223/346/211/221/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +97 -97
  389. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/223/215/344/275/234/347/263/273/347/273/237/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +109 -109
  390. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/224/277/346/262/273/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +234 -234
  391. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/225/260/345/200/274/345/210/206/346/236/220/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +133 -133
  392. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/225/260/345/255/227/347/224/265/350/267/257/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  393. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/225/260/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +1166 -1166
  394. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/225/260/345/255/246/345/210/206/346/236/220/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +217 -217
  395. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/225/260/345/255/246/347/211/251/347/220/206/346/226/271/346/263/225/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +105 -105
  396. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/225/260/346/215/256/345/272/223/347/263/273/347/273/237/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  397. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/225/260/346/215/256/347/273/223/346/236/204/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +117 -117
  398. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/226/207/345/255/246/347/220/206/350/256/272/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +89 -89
  399. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/227/240/346/234/272/345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +141 -141
  400. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/227/266/347/251/272/350/256/260/345/277/206/345/233/276/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +214 -214
  401. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/231/272/350/203/275/350/256/272/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +350 -350
  402. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/234/211/346/234/272/345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +129 -129
  403. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/235/220/346/226/231/345/212/233/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  404. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/235/241/344/273/266/350/256/272/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +350 -350
  405. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/244/215/347/211/251/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +89 -89
  406. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/246/202/347/216/207/350/256/272/344/270/216/346/225/260/347/220/206/347/273/237/350/256/241/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +149 -149
  407. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/250/241/346/213/237/347/224/265/345/255/220/346/212/200/346/234/257/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  408. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//346/263/233/345/207/275/345/210/206/346/236/220/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +125 -125
  409. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/203/255/345/212/233/345/255/246/344/270/216/347/273/237/350/256/241/347/211/251/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +125 -125
  410. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/211/251/347/220/206/345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +129 -129
  411. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/211/251/347/220/206/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +1302 -1302
  412. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/216/260/344/273/243/346/261/211/350/257/255/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +89 -89
  413. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/220/206/350/256/272/345/212/233/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +137 -137
  414. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/224/237/346/200/201/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +93 -93
  415. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/224/237/347/211/251/345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +137 -137
  416. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/224/237/347/211/251/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +1018 -1018
  417. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/224/237/347/220/206/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +93 -93
  418. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/224/265/345/212/250/345/212/233/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +125 -125
  419. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/224/265/350/267/257/345/216/237/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  420. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/244/276/344/274/232/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +111 -111
  421. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/250/213/345/272/217/350/256/276/350/256/241/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  422. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/256/227/346/263/225/350/256/276/350/256/241/344/270/216/345/210/206/346/236/220/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +105 -105
  423. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/256/241/347/220/206/345/255/246/345/216/237/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +89 -89
  424. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/272/277/346/200/247/344/273/243/346/225/260/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +133 -133
  425. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/273/206/350/203/236/347/224/237/347/211/251/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +121 -121
  426. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/273/217/346/265/216/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +169 -169
  427. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/273/223/346/236/204/345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +105 -105
  428. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/273/274/345/220/210/302/267/347/273/264/345/237/272/347/273/274/350/277/260.md +184 -184
  429. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//347/274/226/350/257/221/345/216/237/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  430. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//350/207/252/346/210/221/346/204/217/350/257/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +270 -270
  431. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//350/256/241/347/256/227/346/234/272/347/247/221/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +698 -698
  432. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//350/256/241/347/256/227/346/234/272/347/273/204/346/210/220/345/216/237/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +109 -109
  433. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//350/256/241/347/256/227/346/234/272/347/275/221/347/273/234/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +109 -109
  434. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//350/257/255/350/250/200/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +226 -226
  435. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//350/275/257/344/273/266/345/267/245/347/250/213/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +97 -97
  436. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/201/227/344/274/240/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +113 -113
  437. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/207/217/345/255/220/345/212/233/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +137 -137
  438. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/207/221/350/236/215/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +89 -89
  439. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/344/270/255/345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +341 -341
  440. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/344/270/255/345/216/206/345/217/262/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  441. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/344/270/255/345/234/260/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +97 -97
  442. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/344/270/255/346/200/235/346/203/263/346/224/277/346/262/273/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +117 -117
  443. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/344/270/255/346/225/260/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +341 -341
  444. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/344/270/255/347/211/251/347/220/206/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +365 -365
  445. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/344/270/255/347/224/237/347/211/251/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +269 -269
  446. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/344/270/255/350/213/261/350/257/255/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +113 -113
  447. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/344/270/255/350/257/255/346/226/207/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +105 -105
  448. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/345/210/206/345/255/220/345/214/226/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +101 -101
  449. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/347/255/211/344/273/243/346/225/260/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +157 -157
  450. package/md_cg/whitebox_kb/seed_knowledge/wisdom_cards//351/253/230/347/255/211/346/225/260/345/255/246/302/267/347/237/245/350/257/206/347/273/274/350/277/260.md +237 -237
  451. package/md_cg/whitebox_kb/seed_knowledge//346/231/272/350/203/275/350/256/2723.4.md +5260 -5260
  452. package/md_cg/whitebox_kb/wisdom/__init__.py +6 -6
  453. package/md_cg/whitebox_kb/wisdom/answer_spec_anchor.py +87 -87
  454. package/md_cg/whitebox_kb/wisdom/browser_units.py +2631 -2631
  455. package/md_cg/whitebox_kb/wisdom/card_validator.py +223 -223
  456. package/md_cg/whitebox_kb/wisdom/causal_discover.py +432 -432
  457. package/md_cg/whitebox_kb/wisdom/chat.html +185 -185
  458. package/md_cg/whitebox_kb/wisdom/code_qa.py +119 -119
  459. package/md_cg/whitebox_kb/wisdom/code_route_bridge.py +90 -90
  460. package/md_cg/whitebox_kb/wisdom/code_test_runner.py +217 -217
  461. package/md_cg/whitebox_kb/wisdom/codegraph_white.py +312 -312
  462. package/md_cg/whitebox_kb/wisdom/compiler_compose.py +160 -160
  463. package/md_cg/whitebox_kb/wisdom/condition_algebra.py +112 -112
  464. package/md_cg/whitebox_kb/wisdom/condition_frame.py +315 -315
  465. package/md_cg/whitebox_kb/wisdom/condition_kb.py +108 -108
  466. package/md_cg/whitebox_kb/wisdom/condition_vm.py +264 -264
  467. package/md_cg/whitebox_kb/wisdom/conflict_map.json +4445 -4445
  468. package/md_cg/whitebox_kb/wisdom/core/compiler.py +301 -301
  469. package/md_cg/whitebox_kb/wisdom/core/lexer.py +512 -512
  470. package/md_cg/whitebox_kb/wisdom/core/name_checker.py +1023 -1023
  471. package/md_cg/whitebox_kb/wisdom/cspmn.py +258 -258
  472. package/md_cg/whitebox_kb/wisdom/danmaku_audit.py +252 -252
  473. package/md_cg/whitebox_kb/wisdom/danmaku_bridge.py +141 -141
  474. package/md_cg/whitebox_kb/wisdom/distilled_condition_units.json +6417 -6417
  475. package/md_cg/whitebox_kb/wisdom/docs/WB-EVAL-20260902b.json +1950 -1950
  476. package/md_cg/whitebox_kb/wisdom/docs/WB-EVAL-20260902c.json +1296 -1296
  477. package/md_cg/whitebox_kb/wisdom/docs/codegraph_ref_rating.md +52 -52
  478. package/md_cg/whitebox_kb/wisdom/docs/daoti_absorb_analysis.md +54 -54
  479. package/md_cg/whitebox_kb/wisdom/docs/dsh_memory_v030_stable.md +34 -34
  480. package/md_cg/whitebox_kb/wisdom/docs/github_absorb_analysis.md +71 -71
  481. package/md_cg/whitebox_kb/wisdom/docs/gliding_horse_absorb_analysis.md +47 -47
  482. package/md_cg/whitebox_kb/wisdom/docs/whitebox_capability_graph.md +61 -61
  483. package/md_cg/whitebox_kb/wisdom/docs/whitebox_capability_graph_demo.json +59 -59
  484. package/md_cg/whitebox_kb/wisdom/docs/whitebox_code_rating_202609.md +43 -43
  485. package/md_cg/whitebox_kb/wisdom/docs//344/273/243/347/240/201/346/235/241/344/273/266/350/267/257/347/224/261/345/233/276_CCG/350/256/276/350/256/241.md +150 -150
  486. package/md_cg/whitebox_kb/wisdom/docs//344/273/243/347/240/201/350/257/255/344/271/211/346/235/241/344/273/266/345/215/217/350/256/256.md +650 -650
  487. package/md_cg/whitebox_kb/wisdom/docs//345/261/200/351/203/250/346/234/200/344/274/230/344/270/216/346/203/205/347/273/252/345/201/217/345/245/275_/347/220/206/350/256/272/345/267/245/347/250/213.md +97 -97
  488. package/md_cg/whitebox_kb/wisdom/docs//346/226/271/345/220/221/346/200/247/346/212/211/346/213/251_/350/207/252/344/270/276vs/350/207/252/350/277/255/344/273/243.md +81 -81
  489. package/md_cg/whitebox_kb/wisdom/docs//347/201/265/346/236/242AGI/346/236/266/346/236/204/346/216/242/347/264/242_/346/226/207/346/241/243/350/247/204/345/210/222.md +51 -51
  490. package/md_cg/whitebox_kb/wisdom/docs//347/201/265/346/236/242/346/217/222/344/273/266/345/210/206/347/261/273/345/210/206/346/236/220.md +67 -67
  491. package/md_cg/whitebox_kb/wisdom/docs//347/231/275/347/256/261/346/234/254/345/234/260/346/240/241/351/252/214/345/231/250_ZeroLLM_Verifier.md +276 -276
  492. package/md_cg/whitebox_kb/wisdom/docs//347/231/275/347/256/261/350/207/252/344/270/276/347/254/254/345/205/255/351/230/266/346/256/265_/346/224/266/345/256/230/346/200/273/347/273/223.md +1207 -1207
  493. package/md_cg/whitebox_kb/wisdom/ds_compose.py +177 -177
  494. package/md_cg/whitebox_kb/wisdom/graph_db_units.py +3089 -3089
  495. package/md_cg/whitebox_kb/wisdom/graph_qa.py +123 -123
  496. package/md_cg/whitebox_kb/wisdom/human_observer_knowledge.json +43 -43
  497. package/md_cg/whitebox_kb/wisdom/knowledge_points.py +318 -318
  498. package/md_cg/whitebox_kb/wisdom/md_store.py +276 -276
  499. package/md_cg/whitebox_kb/wisdom/merge_subgraph.py +178 -178
  500. package/md_cg/whitebox_kb/wisdom/neural_retrieve.py +314 -314
  501. package/md_cg/whitebox_kb/wisdom/os_units.py +2735 -2735
  502. package/md_cg/whitebox_kb/wisdom/pattern_separation.py +376 -376
  503. package/md_cg/whitebox_kb/wisdom/prereq_map.json +364 -364
  504. package/md_cg/whitebox_kb/wisdom/python_code_units.py +2766 -2766
  505. package/md_cg/whitebox_kb/wisdom/role_compose.py +268 -268
  506. package/md_cg/whitebox_kb/wisdom/role_solidified.json +7 -7
  507. package/md_cg/whitebox_kb/wisdom/route_memory.py +244 -244
  508. package/md_cg/whitebox_kb/wisdom/scene_reconstruction.py +148 -148
  509. package/md_cg/whitebox_kb/wisdom/se_compose.py +137 -137
  510. package/md_cg/whitebox_kb/wisdom/snr_dashboard.py +219 -219
  511. package/md_cg/whitebox_kb/wisdom/snr_report.json +40 -40
  512. package/md_cg/whitebox_kb/wisdom/spatial_closure.py +96 -96
  513. package/md_cg/whitebox_kb/wisdom/spatial_qa.py +182 -182
  514. package/md_cg/whitebox_kb/wisdom/status_terms.json +21 -21
  515. package/md_cg/whitebox_kb/wisdom/task_discipline.json +43 -43
  516. package/md_cg/whitebox_kb/wisdom/test_code_compose_domains.py +7541 -7541
  517. package/md_cg/whitebox_kb/wisdom/test_compiler_self_bootstrap.py +354 -354
  518. package/md_cg/whitebox_kb/wisdom/test_ecosystem_demos.py +193 -193
  519. package/md_cg/whitebox_kb/wisdom/test_graph_db.py +292 -292
  520. package/md_cg/whitebox_kb/wisdom/test_navigate_self_bootstrap.py +69 -69
  521. package/md_cg/whitebox_kb/wisdom/test_python_self_bootstrap.py +160 -160
  522. package/md_cg/whitebox_kb/wisdom/trigger_words_index.json +4366 -4366
  523. package/md_cg/whitebox_kb/wisdom/verify_answer.py +116 -116
  524. package/md_cg/whitebox_kb/wisdom/wisdom_book.py +2759 -2759
  525. package/md_cg/whitebox_kb/wisdom/wisdom_cloud.py +479 -479
  526. package/md_cg/whitebox_kb/wisdom/wisdom_ui.html +863 -863
  527. package/md_cg/writegate.py +101 -1
  528. package/md_cg/writepipe.py +11 -1
  529. package/package.json +134 -127
  530. package/skills/README.md +121 -121
  531. package/skills/plugin.json +54 -54
  532. package/skills/skills/designer-perspective/SKILL.md +158 -158
  533. package/skills/skills/designer-perspective/references/01-observation-position.md +66 -66
  534. package/skills/skills/designer-perspective/references/02-structure-recognition.md +62 -62
  535. package/skills/skills/designer-perspective/references/03-direction-judgment.md +55 -55
  536. package/skills/skills/designer-perspective/references/04-qualification-verdict.md +72 -72
  537. package/skills/skills/designer-perspective/references/05-condition-attribution.md +74 -74
  538. package/skills/skills/designer-perspective/scripts/designer.py +545 -545
  539. package/skills/skills/designer-perspective/tests/cases.jsonl +17 -17
  540. package/skills/skills/designer-perspective/tests/selftest.py +61 -61
  541. package/skills/skills/lingshu-browser/SKILL.md +60 -60
  542. package/skills/skills/lingshu-browser/units/browser-02898b15/SKILL.md +45 -45
  543. package/skills/skills/lingshu-browser/units/browser-03b04f98/SKILL.md +45 -45
  544. package/skills/skills/lingshu-browser/units/browser-0754386d/SKILL.md +45 -45
  545. package/skills/skills/lingshu-browser/units/browser-093c03ab/SKILL.md +45 -45
  546. package/skills/skills/lingshu-browser/units/browser-09e60b35/SKILL.md +45 -45
  547. package/skills/skills/lingshu-browser/units/browser-0ab4f2db/SKILL.md +45 -45
  548. package/skills/skills/lingshu-browser/units/browser-0c7f88d6/SKILL.md +45 -45
  549. package/skills/skills/lingshu-browser/units/browser-0f598430/SKILL.md +45 -45
  550. package/skills/skills/lingshu-browser/units/browser-0fd64fa5/SKILL.md +45 -45
  551. package/skills/skills/lingshu-browser/units/browser-17906c62/SKILL.md +45 -45
  552. package/skills/skills/lingshu-browser/units/browser-18f823e2/SKILL.md +45 -45
  553. package/skills/skills/lingshu-browser/units/browser-1bafe81c/SKILL.md +45 -45
  554. package/skills/skills/lingshu-browser/units/browser-1f9ab1f0/SKILL.md +45 -45
  555. package/skills/skills/lingshu-browser/units/browser-1fdb5852/SKILL.md +45 -45
  556. package/skills/skills/lingshu-browser/units/browser-21b0359c/SKILL.md +45 -45
  557. package/skills/skills/lingshu-browser/units/browser-22e8de36/SKILL.md +45 -45
  558. package/skills/skills/lingshu-browser/units/browser-24163519/SKILL.md +45 -45
  559. package/skills/skills/lingshu-browser/units/browser-2471a991/SKILL.md +45 -45
  560. package/skills/skills/lingshu-browser/units/browser-25afee4d/SKILL.md +45 -45
  561. package/skills/skills/lingshu-browser/units/browser-283a91bd/SKILL.md +45 -45
  562. package/skills/skills/lingshu-browser/units/browser-2895ff52/SKILL.md +45 -45
  563. package/skills/skills/lingshu-browser/units/browser-2cc1da58/SKILL.md +45 -45
  564. package/skills/skills/lingshu-browser/units/browser-3189fe6f/SKILL.md +45 -45
  565. package/skills/skills/lingshu-browser/units/browser-31f2b08f/SKILL.md +45 -45
  566. package/skills/skills/lingshu-browser/units/browser-37b8339e/SKILL.md +45 -45
  567. package/skills/skills/lingshu-browser/units/browser-396ec3a6/SKILL.md +45 -45
  568. package/skills/skills/lingshu-browser/units/browser-3df2f904/SKILL.md +45 -45
  569. package/skills/skills/lingshu-browser/units/browser-43154cec/SKILL.md +45 -45
  570. package/skills/skills/lingshu-browser/units/browser-434b74b8/SKILL.md +45 -45
  571. package/skills/skills/lingshu-browser/units/browser-440d4398/SKILL.md +45 -45
  572. package/skills/skills/lingshu-browser/units/browser-44d7f183/SKILL.md +45 -45
  573. package/skills/skills/lingshu-browser/units/browser-4d6c0788/SKILL.md +45 -45
  574. package/skills/skills/lingshu-browser/units/browser-50fecd89/SKILL.md +45 -45
  575. package/skills/skills/lingshu-browser/units/browser-555c0626/SKILL.md +45 -45
  576. package/skills/skills/lingshu-browser/units/browser-57312d24/SKILL.md +45 -45
  577. package/skills/skills/lingshu-browser/units/browser-59a0ada4/SKILL.md +45 -45
  578. package/skills/skills/lingshu-browser/units/browser-5a455aeb/SKILL.md +45 -45
  579. package/skills/skills/lingshu-browser/units/browser-5ae7623a/SKILL.md +45 -45
  580. package/skills/skills/lingshu-browser/units/browser-5dac60b6/SKILL.md +45 -45
  581. package/skills/skills/lingshu-browser/units/browser-5e5f1396/SKILL.md +45 -45
  582. package/skills/skills/lingshu-browser/units/browser-5ebb01dd/SKILL.md +45 -45
  583. package/skills/skills/lingshu-browser/units/browser-5f5453f9/SKILL.md +45 -45
  584. package/skills/skills/lingshu-browser/units/browser-5f90f58c/SKILL.md +45 -45
  585. package/skills/skills/lingshu-browser/units/browser-609362ee/SKILL.md +45 -45
  586. package/skills/skills/lingshu-browser/units/browser-60aefeeb/SKILL.md +45 -45
  587. package/skills/skills/lingshu-browser/units/browser-6636d49c/SKILL.md +45 -45
  588. package/skills/skills/lingshu-browser/units/browser-6cfcb6db/SKILL.md +45 -45
  589. package/skills/skills/lingshu-browser/units/browser-6e1c1158/SKILL.md +45 -45
  590. package/skills/skills/lingshu-browser/units/browser-7008e942/SKILL.md +45 -45
  591. package/skills/skills/lingshu-browser/units/browser-716cd26c/SKILL.md +45 -45
  592. package/skills/skills/lingshu-browser/units/browser-720ce1a1/SKILL.md +45 -45
  593. package/skills/skills/lingshu-browser/units/browser-77a97b43/SKILL.md +45 -45
  594. package/skills/skills/lingshu-browser/units/browser-7bb4871d/SKILL.md +45 -45
  595. package/skills/skills/lingshu-browser/units/browser-7be57bbe/SKILL.md +45 -45
  596. package/skills/skills/lingshu-browser/units/browser-7da433f3/SKILL.md +45 -45
  597. package/skills/skills/lingshu-browser/units/browser-7e96fe1d/SKILL.md +45 -45
  598. package/skills/skills/lingshu-browser/units/browser-7f9cefec/SKILL.md +45 -45
  599. package/skills/skills/lingshu-browser/units/browser-80224e71/SKILL.md +45 -45
  600. package/skills/skills/lingshu-browser/units/browser-81345ecd/SKILL.md +45 -45
  601. package/skills/skills/lingshu-browser/units/browser-822cfa44/SKILL.md +45 -45
  602. package/skills/skills/lingshu-browser/units/browser-853690c0/SKILL.md +45 -45
  603. package/skills/skills/lingshu-browser/units/browser-85553126/SKILL.md +45 -45
  604. package/skills/skills/lingshu-browser/units/browser-87b0ce80/SKILL.md +45 -45
  605. package/skills/skills/lingshu-browser/units/browser-900c4484/SKILL.md +45 -45
  606. package/skills/skills/lingshu-browser/units/browser-910405c4/SKILL.md +45 -45
  607. package/skills/skills/lingshu-browser/units/browser-95fd3c86/SKILL.md +45 -45
  608. package/skills/skills/lingshu-browser/units/browser-97a14ca3/SKILL.md +45 -45
  609. package/skills/skills/lingshu-browser/units/browser-9de10895/SKILL.md +45 -45
  610. package/skills/skills/lingshu-browser/units/browser-9e4914a7/SKILL.md +45 -45
  611. package/skills/skills/lingshu-browser/units/browser-a280ec64/SKILL.md +45 -45
  612. package/skills/skills/lingshu-browser/units/browser-a2d9b0b0/SKILL.md +45 -45
  613. package/skills/skills/lingshu-browser/units/browser-a372edeb/SKILL.md +45 -45
  614. package/skills/skills/lingshu-browser/units/browser-a4c793a4/SKILL.md +45 -45
  615. package/skills/skills/lingshu-browser/units/browser-a681d0c2/SKILL.md +45 -45
  616. package/skills/skills/lingshu-browser/units/browser-a7a2b0c1/SKILL.md +45 -45
  617. package/skills/skills/lingshu-browser/units/browser-a990e68e/SKILL.md +45 -45
  618. package/skills/skills/lingshu-browser/units/browser-aaac4eec/SKILL.md +45 -45
  619. package/skills/skills/lingshu-browser/units/browser-ae6586bb/SKILL.md +45 -45
  620. package/skills/skills/lingshu-browser/units/browser-afa4091f/SKILL.md +45 -45
  621. package/skills/skills/lingshu-browser/units/browser-b4c8cf65/SKILL.md +45 -45
  622. package/skills/skills/lingshu-browser/units/browser-b501767c/SKILL.md +45 -45
  623. package/skills/skills/lingshu-browser/units/browser-bcd4288d/SKILL.md +45 -45
  624. package/skills/skills/lingshu-browser/units/browser-bfad66a5/SKILL.md +45 -45
  625. package/skills/skills/lingshu-browser/units/browser-c45cbfe9/SKILL.md +45 -45
  626. package/skills/skills/lingshu-browser/units/browser-c4dd6078/SKILL.md +45 -45
  627. package/skills/skills/lingshu-browser/units/browser-c879eb0b/SKILL.md +45 -45
  628. package/skills/skills/lingshu-browser/units/browser-c92ac01b/SKILL.md +45 -45
  629. package/skills/skills/lingshu-browser/units/browser-cb179242/SKILL.md +45 -45
  630. package/skills/skills/lingshu-browser/units/browser-cc7d3d6d/SKILL.md +45 -45
  631. package/skills/skills/lingshu-browser/units/browser-cf3c47f0/SKILL.md +45 -45
  632. package/skills/skills/lingshu-browser/units/browser-cf9f812e/SKILL.md +45 -45
  633. package/skills/skills/lingshu-browser/units/browser-d462581c/SKILL.md +45 -45
  634. package/skills/skills/lingshu-browser/units/browser-d5fa0b7f/SKILL.md +45 -45
  635. package/skills/skills/lingshu-browser/units/browser-d72e225b/SKILL.md +45 -45
  636. package/skills/skills/lingshu-browser/units/browser-df1a919e/SKILL.md +45 -45
  637. package/skills/skills/lingshu-browser/units/browser-e84565c1/SKILL.md +45 -45
  638. package/skills/skills/lingshu-browser/units/browser-e947a564/SKILL.md +45 -45
  639. package/skills/skills/lingshu-browser/units/browser-ea9b2b8e/SKILL.md +45 -45
  640. package/skills/skills/lingshu-browser/units/browser-f5ffc6d9/SKILL.md +45 -45
  641. package/skills/skills/lingshu-browser/units/browser-f75a4418/SKILL.md +45 -45
  642. package/skills/skills/lingshu-browser/units/browser-f8f2966e/SKILL.md +45 -45
  643. package/skills/skills/lingshu-browser/units/browser-fa65fa2d/SKILL.md +45 -45
  644. package/skills/skills/lingshu-browser/units/browser-faac8812/SKILL.md +45 -45
  645. package/skills/skills/lingshu-browser/units/browser-ff94a671/SKILL.md +45 -45
  646. package/skills/skills/lingshu-compiler/SKILL.md +56 -56
  647. package/skills/skills/lingshu-compiler/units/analyze-type-infer/SKILL.md +45 -45
  648. package/skills/skills/lingshu-compiler/units/check-name-real/SKILL.md +45 -45
  649. package/skills/skills/lingshu-compiler/units/compile-assign/SKILL.md +45 -45
  650. package/skills/skills/lingshu-compiler/units/compile-expr-tree/SKILL.md +45 -45
  651. package/skills/skills/lingshu-compiler/units/compile-full-pipeline/SKILL.md +45 -45
  652. package/skills/skills/lingshu-compiler/units/compile-func-def/SKILL.md +45 -45
  653. package/skills/skills/lingshu-compiler/units/compile-if-then/SKILL.md +45 -45
  654. package/skills/skills/lingshu-compiler/units/compile-logic-expr/SKILL.md +45 -45
  655. package/skills/skills/lingshu-compiler/units/compile-recursive/SKILL.md +45 -45
  656. package/skills/skills/lingshu-compiler/units/compile-scope/SKILL.md +45 -45
  657. package/skills/skills/lingshu-compiler/units/compile-type-check/SKILL.md +45 -45
  658. package/skills/skills/lingshu-compiler/units/compile-while/SKILL.md +45 -45
  659. package/skills/skills/lingshu-compiler/units/compiler-0010c4bf/SKILL.md +45 -45
  660. package/skills/skills/lingshu-compiler/units/compiler-0355bffb/SKILL.md +45 -45
  661. package/skills/skills/lingshu-compiler/units/compiler-0361708a/SKILL.md +45 -45
  662. package/skills/skills/lingshu-compiler/units/compiler-054a0414/SKILL.md +45 -45
  663. package/skills/skills/lingshu-compiler/units/compiler-05a1691a/SKILL.md +45 -45
  664. package/skills/skills/lingshu-compiler/units/compiler-05eeed1e/SKILL.md +45 -45
  665. package/skills/skills/lingshu-compiler/units/compiler-0622a1f6/SKILL.md +45 -45
  666. package/skills/skills/lingshu-compiler/units/compiler-08b54217/SKILL.md +45 -45
  667. package/skills/skills/lingshu-compiler/units/compiler-0a62b70c/SKILL.md +45 -45
  668. package/skills/skills/lingshu-compiler/units/compiler-0ab24d00/SKILL.md +45 -45
  669. package/skills/skills/lingshu-compiler/units/compiler-0e093688/SKILL.md +45 -45
  670. package/skills/skills/lingshu-compiler/units/compiler-0e82b966/SKILL.md +45 -45
  671. package/skills/skills/lingshu-compiler/units/compiler-0ee9b9b9/SKILL.md +45 -45
  672. package/skills/skills/lingshu-compiler/units/compiler-0f3787e6/SKILL.md +45 -45
  673. package/skills/skills/lingshu-compiler/units/compiler-1028685f/SKILL.md +45 -45
  674. package/skills/skills/lingshu-compiler/units/compiler-11897630/SKILL.md +45 -45
  675. package/skills/skills/lingshu-compiler/units/compiler-16661b9b/SKILL.md +45 -45
  676. package/skills/skills/lingshu-compiler/units/compiler-1f722303/SKILL.md +45 -45
  677. package/skills/skills/lingshu-compiler/units/compiler-25be1262/SKILL.md +45 -45
  678. package/skills/skills/lingshu-compiler/units/compiler-2a76ba07/SKILL.md +45 -45
  679. package/skills/skills/lingshu-compiler/units/compiler-2dbea54a/SKILL.md +45 -45
  680. package/skills/skills/lingshu-compiler/units/compiler-2df52f16/SKILL.md +45 -45
  681. package/skills/skills/lingshu-compiler/units/compiler-2ec2c9d2/SKILL.md +45 -45
  682. package/skills/skills/lingshu-compiler/units/compiler-2f8c8f39/SKILL.md +45 -45
  683. package/skills/skills/lingshu-compiler/units/compiler-38378ac7/SKILL.md +45 -45
  684. package/skills/skills/lingshu-compiler/units/compiler-39457d2e/SKILL.md +45 -45
  685. package/skills/skills/lingshu-compiler/units/compiler-39fb5926/SKILL.md +45 -45
  686. package/skills/skills/lingshu-compiler/units/compiler-47f4fbfa/SKILL.md +45 -45
  687. package/skills/skills/lingshu-compiler/units/compiler-4a8cd1f1/SKILL.md +45 -45
  688. package/skills/skills/lingshu-compiler/units/compiler-4b230b6b/SKILL.md +45 -45
  689. package/skills/skills/lingshu-compiler/units/compiler-4cbbda95/SKILL.md +45 -45
  690. package/skills/skills/lingshu-compiler/units/compiler-4d5a68ff/SKILL.md +45 -45
  691. package/skills/skills/lingshu-compiler/units/compiler-56dc9bdd/SKILL.md +45 -45
  692. package/skills/skills/lingshu-compiler/units/compiler-57e76ebe/SKILL.md +45 -45
  693. package/skills/skills/lingshu-compiler/units/compiler-61ff016b/SKILL.md +45 -45
  694. package/skills/skills/lingshu-compiler/units/compiler-63eae588/SKILL.md +45 -45
  695. package/skills/skills/lingshu-compiler/units/compiler-64c4224b/SKILL.md +45 -45
  696. package/skills/skills/lingshu-compiler/units/compiler-66377955/SKILL.md +45 -45
  697. package/skills/skills/lingshu-compiler/units/compiler-674ab4f6/SKILL.md +45 -45
  698. package/skills/skills/lingshu-compiler/units/compiler-6af76fd6/SKILL.md +45 -45
  699. package/skills/skills/lingshu-compiler/units/compiler-6d979db2/SKILL.md +45 -45
  700. package/skills/skills/lingshu-compiler/units/compiler-6de326c0/SKILL.md +45 -45
  701. package/skills/skills/lingshu-compiler/units/compiler-6f1c0eea/SKILL.md +45 -45
  702. package/skills/skills/lingshu-compiler/units/compiler-724d6c9b/SKILL.md +45 -45
  703. package/skills/skills/lingshu-compiler/units/compiler-7690177f/SKILL.md +45 -45
  704. package/skills/skills/lingshu-compiler/units/compiler-7b229a7d/SKILL.md +45 -45
  705. package/skills/skills/lingshu-compiler/units/compiler-7f471b3a/SKILL.md +45 -45
  706. package/skills/skills/lingshu-compiler/units/compiler-815cad08/SKILL.md +45 -45
  707. package/skills/skills/lingshu-compiler/units/compiler-83c61634/SKILL.md +45 -45
  708. package/skills/skills/lingshu-compiler/units/compiler-8c798c81/SKILL.md +45 -45
  709. package/skills/skills/lingshu-compiler/units/compiler-8dd747ac/SKILL.md +45 -45
  710. package/skills/skills/lingshu-compiler/units/compiler-90324d0a/SKILL.md +45 -45
  711. package/skills/skills/lingshu-compiler/units/compiler-94b8d72d/SKILL.md +45 -45
  712. package/skills/skills/lingshu-compiler/units/compiler-94f12231/SKILL.md +45 -45
  713. package/skills/skills/lingshu-compiler/units/compiler-95937c16/SKILL.md +45 -45
  714. package/skills/skills/lingshu-compiler/units/compiler-98a5625b/SKILL.md +45 -45
  715. package/skills/skills/lingshu-compiler/units/compiler-98b4c42f/SKILL.md +45 -45
  716. package/skills/skills/lingshu-compiler/units/compiler-98e3894a/SKILL.md +45 -45
  717. package/skills/skills/lingshu-compiler/units/compiler-9bdfe4b8/SKILL.md +45 -45
  718. package/skills/skills/lingshu-compiler/units/compiler-9d9b4e83/SKILL.md +45 -45
  719. package/skills/skills/lingshu-compiler/units/compiler-9f7be5ad/SKILL.md +45 -45
  720. package/skills/skills/lingshu-compiler/units/compiler-a6daf076/SKILL.md +45 -45
  721. package/skills/skills/lingshu-compiler/units/compiler-a7995a0c/SKILL.md +45 -45
  722. package/skills/skills/lingshu-compiler/units/compiler-a8399248/SKILL.md +45 -45
  723. package/skills/skills/lingshu-compiler/units/compiler-aabbd099/SKILL.md +45 -45
  724. package/skills/skills/lingshu-compiler/units/compiler-afe169d8/SKILL.md +45 -45
  725. package/skills/skills/lingshu-compiler/units/compiler-b0678bda/SKILL.md +45 -45
  726. package/skills/skills/lingshu-compiler/units/compiler-b09bd196/SKILL.md +45 -45
  727. package/skills/skills/lingshu-compiler/units/compiler-b1396e23/SKILL.md +45 -45
  728. package/skills/skills/lingshu-compiler/units/compiler-b9b31ce0/SKILL.md +45 -45
  729. package/skills/skills/lingshu-compiler/units/compiler-c10264a7/SKILL.md +45 -45
  730. package/skills/skills/lingshu-compiler/units/compiler-cb1e8e4b/SKILL.md +45 -45
  731. package/skills/skills/lingshu-compiler/units/compiler-ccafd438/SKILL.md +45 -45
  732. package/skills/skills/lingshu-compiler/units/compiler-cda9c262/SKILL.md +45 -45
  733. package/skills/skills/lingshu-compiler/units/compiler-ce648068/SKILL.md +45 -45
  734. package/skills/skills/lingshu-compiler/units/compiler-cf5776a4/SKILL.md +45 -45
  735. package/skills/skills/lingshu-compiler/units/compiler-d974e5d3/SKILL.md +45 -45
  736. package/skills/skills/lingshu-compiler/units/compiler-e3979fd3/SKILL.md +45 -45
  737. package/skills/skills/lingshu-compiler/units/compiler-eb1cf2b5/SKILL.md +45 -45
  738. package/skills/skills/lingshu-compiler/units/compiler-ecb30d5b/SKILL.md +45 -45
  739. package/skills/skills/lingshu-compiler/units/compiler-f8c8b24b/SKILL.md +45 -45
  740. package/skills/skills/lingshu-compiler/units/compiler-f99fedbe/SKILL.md +45 -45
  741. package/skills/skills/lingshu-compiler/units/compiler-fa8ff5f7/SKILL.md +45 -45
  742. package/skills/skills/lingshu-compiler/units/compiler-fe1b058d/SKILL.md +45 -45
  743. package/skills/skills/lingshu-compiler/units/lex-chinese-program/SKILL.md +45 -45
  744. package/skills/skills/lingshu-compiler/units/lex-dao-de-jing/SKILL.md +45 -45
  745. package/skills/skills/lingshu-compiler/units/lex-nine-chapters/SKILL.md +45 -45
  746. package/skills/skills/lingshu-compiler/units/vm-arithmetic/SKILL.md +45 -45
  747. package/skills/skills/lingshu-compiler/units/vm-array-ops/SKILL.md +45 -45
  748. package/skills/skills/lingshu-compiler/units/vm-closure-call/SKILL.md +45 -45
  749. package/skills/skills/lingshu-compiler/units/vm-closure-create/SKILL.md +45 -45
  750. package/skills/skills/lingshu-compiler/units/vm-compare/SKILL.md +45 -45
  751. package/skills/skills/lingshu-compiler/units/vm-cond-jump/SKILL.md +45 -45
  752. package/skills/skills/lingshu-compiler/units/vm-cond-space/SKILL.md +45 -45
  753. package/skills/skills/lingshu-compiler/units/vm-exception/SKILL.md +45 -45
  754. package/skills/skills/lingshu-compiler/units/vm-func-call/SKILL.md +45 -45
  755. package/skills/skills/lingshu-compiler/units/vm-loop-run/SKILL.md +45 -45
  756. package/skills/skills/lingshu-compiler/units/vm-profiling/SKILL.md +45 -45
  757. package/skills/skills/lingshu-compiler/units/vm-refcount/SKILL.md +45 -45
  758. package/skills/skills/lingshu-compiler/units/vm-run-loop/SKILL.md +45 -45
  759. package/skills/skills/lingshu-compiler/units/vm-short-circuit/SKILL.md +45 -45
  760. package/skills/skills/lingshu-compiler/units/vm-stack-guard/SKILL.md +45 -45
  761. package/skills/skills/lingshu-compiler/units/vm-stack-ops/SKILL.md +45 -45
  762. package/skills/skills/lingshu-compiler/units/vm-trust-accum/SKILL.md +45 -45
  763. package/skills/skills/lingshu-graph/SKILL.md +63 -63
  764. package/skills/skills/lingshu-graph/units/graph-04cd431b/SKILL.md +45 -45
  765. package/skills/skills/lingshu-graph/units/graph-06e2b1f2/SKILL.md +45 -45
  766. package/skills/skills/lingshu-graph/units/graph-0de12477/SKILL.md +45 -45
  767. package/skills/skills/lingshu-graph/units/graph-0e564e68/SKILL.md +45 -45
  768. package/skills/skills/lingshu-graph/units/graph-10d58a7b/SKILL.md +45 -45
  769. package/skills/skills/lingshu-graph/units/graph-12cd830a/SKILL.md +45 -45
  770. package/skills/skills/lingshu-graph/units/graph-185f2cd2/SKILL.md +45 -45
  771. package/skills/skills/lingshu-graph/units/graph-19a6a301/SKILL.md +45 -45
  772. package/skills/skills/lingshu-graph/units/graph-1b266557/SKILL.md +45 -45
  773. package/skills/skills/lingshu-graph/units/graph-1b707621/SKILL.md +45 -45
  774. package/skills/skills/lingshu-graph/units/graph-1d73b597/SKILL.md +45 -45
  775. package/skills/skills/lingshu-graph/units/graph-2041fa98/SKILL.md +45 -45
  776. package/skills/skills/lingshu-graph/units/graph-2461bc41/SKILL.md +45 -45
  777. package/skills/skills/lingshu-graph/units/graph-2465dff8/SKILL.md +45 -45
  778. package/skills/skills/lingshu-graph/units/graph-2508389f/SKILL.md +45 -45
  779. package/skills/skills/lingshu-graph/units/graph-276d554d/SKILL.md +45 -45
  780. package/skills/skills/lingshu-graph/units/graph-299f4a32/SKILL.md +45 -45
  781. package/skills/skills/lingshu-graph/units/graph-2d455cd8/SKILL.md +45 -45
  782. package/skills/skills/lingshu-graph/units/graph-2fddf701/SKILL.md +45 -45
  783. package/skills/skills/lingshu-graph/units/graph-33385442/SKILL.md +45 -45
  784. package/skills/skills/lingshu-graph/units/graph-34a1dba7/SKILL.md +45 -45
  785. package/skills/skills/lingshu-graph/units/graph-3721be1c/SKILL.md +45 -45
  786. package/skills/skills/lingshu-graph/units/graph-3755dbc9/SKILL.md +45 -45
  787. package/skills/skills/lingshu-graph/units/graph-37a45d4b/SKILL.md +45 -45
  788. package/skills/skills/lingshu-graph/units/graph-3a4a984c/SKILL.md +45 -45
  789. package/skills/skills/lingshu-graph/units/graph-3aa4c941/SKILL.md +45 -45
  790. package/skills/skills/lingshu-graph/units/graph-3b69a528/SKILL.md +45 -45
  791. package/skills/skills/lingshu-graph/units/graph-3bc2eb69/SKILL.md +45 -45
  792. package/skills/skills/lingshu-graph/units/graph-3d255ed4/SKILL.md +45 -45
  793. package/skills/skills/lingshu-graph/units/graph-3d34961d/SKILL.md +45 -45
  794. package/skills/skills/lingshu-graph/units/graph-3e18a380/SKILL.md +45 -45
  795. package/skills/skills/lingshu-graph/units/graph-3f920bf3/SKILL.md +45 -45
  796. package/skills/skills/lingshu-graph/units/graph-40b7bf61/SKILL.md +45 -45
  797. package/skills/skills/lingshu-graph/units/graph-42187d5d/SKILL.md +45 -45
  798. package/skills/skills/lingshu-graph/units/graph-4361c60e/SKILL.md +45 -45
  799. package/skills/skills/lingshu-graph/units/graph-44e56113/SKILL.md +45 -45
  800. package/skills/skills/lingshu-graph/units/graph-4b363727/SKILL.md +45 -45
  801. package/skills/skills/lingshu-graph/units/graph-52e6e216/SKILL.md +45 -45
  802. package/skills/skills/lingshu-graph/units/graph-53fbfef5/SKILL.md +45 -45
  803. package/skills/skills/lingshu-graph/units/graph-54ac2988/SKILL.md +45 -45
  804. package/skills/skills/lingshu-graph/units/graph-580dadcd/SKILL.md +45 -45
  805. package/skills/skills/lingshu-graph/units/graph-5ca34baa/SKILL.md +45 -45
  806. package/skills/skills/lingshu-graph/units/graph-5cb7fbdf/SKILL.md +45 -45
  807. package/skills/skills/lingshu-graph/units/graph-5f894c05/SKILL.md +45 -45
  808. package/skills/skills/lingshu-graph/units/graph-656e7bd4/SKILL.md +45 -45
  809. package/skills/skills/lingshu-graph/units/graph-6dc48231/SKILL.md +45 -45
  810. package/skills/skills/lingshu-graph/units/graph-7186924a/SKILL.md +45 -45
  811. package/skills/skills/lingshu-graph/units/graph-72ce5342/SKILL.md +45 -45
  812. package/skills/skills/lingshu-graph/units/graph-7376a24e/SKILL.md +45 -45
  813. package/skills/skills/lingshu-graph/units/graph-7412a7cb/SKILL.md +45 -45
  814. package/skills/skills/lingshu-graph/units/graph-7becedf0/SKILL.md +45 -45
  815. package/skills/skills/lingshu-graph/units/graph-7c38fbf3/SKILL.md +45 -45
  816. package/skills/skills/lingshu-graph/units/graph-7dc36de7/SKILL.md +45 -45
  817. package/skills/skills/lingshu-graph/units/graph-7fe49de7/SKILL.md +45 -45
  818. package/skills/skills/lingshu-graph/units/graph-80d82194/SKILL.md +45 -45
  819. package/skills/skills/lingshu-graph/units/graph-85bf101e/SKILL.md +45 -45
  820. package/skills/skills/lingshu-graph/units/graph-8650548b/SKILL.md +45 -45
  821. package/skills/skills/lingshu-graph/units/graph-86583b09/SKILL.md +45 -45
  822. package/skills/skills/lingshu-graph/units/graph-8727827c/SKILL.md +45 -45
  823. package/skills/skills/lingshu-graph/units/graph-873fb505/SKILL.md +45 -45
  824. package/skills/skills/lingshu-graph/units/graph-89b11de0/SKILL.md +45 -45
  825. package/skills/skills/lingshu-graph/units/graph-8d7b569b/SKILL.md +45 -45
  826. package/skills/skills/lingshu-graph/units/graph-8e920d5d/SKILL.md +45 -45
  827. package/skills/skills/lingshu-graph/units/graph-8eb38e3d/SKILL.md +45 -45
  828. package/skills/skills/lingshu-graph/units/graph-94582f69/SKILL.md +45 -45
  829. package/skills/skills/lingshu-graph/units/graph-947355f7/SKILL.md +45 -45
  830. package/skills/skills/lingshu-graph/units/graph-9507aff7/SKILL.md +45 -45
  831. package/skills/skills/lingshu-graph/units/graph-95b86a8b/SKILL.md +45 -45
  832. package/skills/skills/lingshu-graph/units/graph-96b85e1f/SKILL.md +45 -45
  833. package/skills/skills/lingshu-graph/units/graph-97b22f09/SKILL.md +45 -45
  834. package/skills/skills/lingshu-graph/units/graph-9833cfda/SKILL.md +45 -45
  835. package/skills/skills/lingshu-graph/units/graph-9aa8a3f4/SKILL.md +45 -45
  836. package/skills/skills/lingshu-graph/units/graph-9f6665c0/SKILL.md +45 -45
  837. package/skills/skills/lingshu-graph/units/graph-a125d282/SKILL.md +45 -45
  838. package/skills/skills/lingshu-graph/units/graph-a49ef4f0/SKILL.md +45 -45
  839. package/skills/skills/lingshu-graph/units/graph-a5cd04ae/SKILL.md +45 -45
  840. package/skills/skills/lingshu-graph/units/graph-add9a63b/SKILL.md +45 -45
  841. package/skills/skills/lingshu-graph/units/graph-b00e3dc7/SKILL.md +45 -45
  842. package/skills/skills/lingshu-graph/units/graph-b33a7662/SKILL.md +45 -45
  843. package/skills/skills/lingshu-graph/units/graph-b76d15ee/SKILL.md +45 -45
  844. package/skills/skills/lingshu-graph/units/graph-b77fa05a/SKILL.md +45 -45
  845. package/skills/skills/lingshu-graph/units/graph-b912fc3b/SKILL.md +45 -45
  846. package/skills/skills/lingshu-graph/units/graph-baf61b7c/SKILL.md +45 -45
  847. package/skills/skills/lingshu-graph/units/graph-c1d5687b/SKILL.md +45 -45
  848. package/skills/skills/lingshu-graph/units/graph-c407bbed/SKILL.md +45 -45
  849. package/skills/skills/lingshu-graph/units/graph-c4676460/SKILL.md +45 -45
  850. package/skills/skills/lingshu-graph/units/graph-c4a59d80/SKILL.md +45 -45
  851. package/skills/skills/lingshu-graph/units/graph-c5815621/SKILL.md +45 -45
  852. package/skills/skills/lingshu-graph/units/graph-ccad55f1/SKILL.md +45 -45
  853. package/skills/skills/lingshu-graph/units/graph-d0677ce1/SKILL.md +45 -45
  854. package/skills/skills/lingshu-graph/units/graph-d1289b39/SKILL.md +45 -45
  855. package/skills/skills/lingshu-graph/units/graph-d15f39b1/SKILL.md +45 -45
  856. package/skills/skills/lingshu-graph/units/graph-d40691ca/SKILL.md +45 -45
  857. package/skills/skills/lingshu-graph/units/graph-d43b387a/SKILL.md +45 -45
  858. package/skills/skills/lingshu-graph/units/graph-d4dd02f4/SKILL.md +45 -45
  859. package/skills/skills/lingshu-graph/units/graph-d724ea18/SKILL.md +45 -45
  860. package/skills/skills/lingshu-graph/units/graph-d74d36fd/SKILL.md +45 -45
  861. package/skills/skills/lingshu-graph/units/graph-d9d3934c/SKILL.md +45 -45
  862. package/skills/skills/lingshu-graph/units/graph-ddf563ff/SKILL.md +45 -45
  863. package/skills/skills/lingshu-graph/units/graph-de00894f/SKILL.md +45 -45
  864. package/skills/skills/lingshu-graph/units/graph-df1ebb63/SKILL.md +45 -45
  865. package/skills/skills/lingshu-graph/units/graph-e2905c20/SKILL.md +45 -45
  866. package/skills/skills/lingshu-graph/units/graph-e4f8cefd/SKILL.md +45 -45
  867. package/skills/skills/lingshu-graph/units/graph-ea3150e7/SKILL.md +45 -45
  868. package/skills/skills/lingshu-graph/units/graph-eb4ac7dd/SKILL.md +45 -45
  869. package/skills/skills/lingshu-graph/units/graph-ee9f6dfa/SKILL.md +45 -45
  870. package/skills/skills/lingshu-graph/units/graph-f055b2ea/SKILL.md +45 -45
  871. package/skills/skills/lingshu-graph/units/graph-f1891287/SKILL.md +45 -45
  872. package/skills/skills/lingshu-graph/units/graph-f1bb5aa1/SKILL.md +45 -45
  873. package/skills/skills/lingshu-graph/units/graph-f56fa220/SKILL.md +45 -45
  874. package/skills/skills/lingshu-graph/units/graph-f729034f/SKILL.md +45 -45
  875. package/skills/skills/lingshu-graph/units/graph-f748a63f/SKILL.md +45 -45
  876. package/skills/skills/lingshu-graph/units/graph-f8c4a59e/SKILL.md +45 -45
  877. package/skills/skills/lingshu-graph/units/graph-fca3d129/SKILL.md +45 -45
  878. package/skills/skills/lingshu-graph/units/graph-fd02d934/SKILL.md +45 -45
  879. package/skills/skills/lingshu-graph/units/graph-fd51ece9/SKILL.md +45 -45
  880. package/skills/skills/lingshu-graph/units/graph-fd6a81ab/SKILL.md +45 -45
  881. package/skills/skills/lingshu-net/SKILL.md +48 -48
  882. package/skills/skills/lingshu-net/units/net-02090d29/SKILL.md +45 -45
  883. package/skills/skills/lingshu-net/units/net-05937712/SKILL.md +45 -45
  884. package/skills/skills/lingshu-net/units/net-059d072f/SKILL.md +45 -45
  885. package/skills/skills/lingshu-net/units/net-080f6012/SKILL.md +45 -45
  886. package/skills/skills/lingshu-net/units/net-08a2fc88/SKILL.md +45 -45
  887. package/skills/skills/lingshu-net/units/net-0935edf1/SKILL.md +45 -45
  888. package/skills/skills/lingshu-net/units/net-0e7f91e4/SKILL.md +45 -45
  889. package/skills/skills/lingshu-net/units/net-0f2850e0/SKILL.md +45 -45
  890. package/skills/skills/lingshu-net/units/net-107ab486/SKILL.md +45 -45
  891. package/skills/skills/lingshu-net/units/net-111e79b0/SKILL.md +45 -45
  892. package/skills/skills/lingshu-net/units/net-126876c1/SKILL.md +45 -45
  893. package/skills/skills/lingshu-net/units/net-13eeb575/SKILL.md +45 -45
  894. package/skills/skills/lingshu-net/units/net-14102d54/SKILL.md +45 -45
  895. package/skills/skills/lingshu-net/units/net-14e9ad0d/SKILL.md +45 -45
  896. package/skills/skills/lingshu-net/units/net-184175d3/SKILL.md +45 -45
  897. package/skills/skills/lingshu-net/units/net-1da1c695/SKILL.md +45 -45
  898. package/skills/skills/lingshu-net/units/net-240a14ec/SKILL.md +45 -45
  899. package/skills/skills/lingshu-net/units/net-2784f98b/SKILL.md +45 -45
  900. package/skills/skills/lingshu-net/units/net-292ef917/SKILL.md +45 -45
  901. package/skills/skills/lingshu-net/units/net-3434e92f/SKILL.md +45 -45
  902. package/skills/skills/lingshu-net/units/net-35019e6b/SKILL.md +45 -45
  903. package/skills/skills/lingshu-net/units/net-3bbc6afb/SKILL.md +45 -45
  904. package/skills/skills/lingshu-net/units/net-3bdf9d9d/SKILL.md +45 -45
  905. package/skills/skills/lingshu-net/units/net-3dcb84d3/SKILL.md +45 -45
  906. package/skills/skills/lingshu-net/units/net-431cccf9/SKILL.md +45 -45
  907. package/skills/skills/lingshu-net/units/net-435a9f7f/SKILL.md +45 -45
  908. package/skills/skills/lingshu-net/units/net-4508101f/SKILL.md +45 -45
  909. package/skills/skills/lingshu-net/units/net-4585c9e7/SKILL.md +45 -45
  910. package/skills/skills/lingshu-net/units/net-479612a0/SKILL.md +45 -45
  911. package/skills/skills/lingshu-net/units/net-47a19838/SKILL.md +45 -45
  912. package/skills/skills/lingshu-net/units/net-4e36e1e3/SKILL.md +45 -45
  913. package/skills/skills/lingshu-net/units/net-509b8001/SKILL.md +45 -45
  914. package/skills/skills/lingshu-net/units/net-51930c5e/SKILL.md +45 -45
  915. package/skills/skills/lingshu-net/units/net-56dbd63f/SKILL.md +45 -45
  916. package/skills/skills/lingshu-net/units/net-57387462/SKILL.md +45 -45
  917. package/skills/skills/lingshu-net/units/net-5c115606/SKILL.md +45 -45
  918. package/skills/skills/lingshu-net/units/net-5d27f392/SKILL.md +45 -45
  919. package/skills/skills/lingshu-net/units/net-5f69c938/SKILL.md +45 -45
  920. package/skills/skills/lingshu-net/units/net-5fa6c13b/SKILL.md +45 -45
  921. package/skills/skills/lingshu-net/units/net-61580202/SKILL.md +45 -45
  922. package/skills/skills/lingshu-net/units/net-61926703/SKILL.md +45 -45
  923. package/skills/skills/lingshu-net/units/net-61f64fbc/SKILL.md +45 -45
  924. package/skills/skills/lingshu-net/units/net-6200f3b2/SKILL.md +45 -45
  925. package/skills/skills/lingshu-net/units/net-63c3eda3/SKILL.md +45 -45
  926. package/skills/skills/lingshu-net/units/net-66e6119b/SKILL.md +45 -45
  927. package/skills/skills/lingshu-net/units/net-68643014/SKILL.md +45 -45
  928. package/skills/skills/lingshu-net/units/net-686632aa/SKILL.md +45 -45
  929. package/skills/skills/lingshu-net/units/net-6967ff14/SKILL.md +45 -45
  930. package/skills/skills/lingshu-net/units/net-6996f499/SKILL.md +45 -45
  931. package/skills/skills/lingshu-net/units/net-6c3b02c2/SKILL.md +45 -45
  932. package/skills/skills/lingshu-net/units/net-6eb37f63/SKILL.md +45 -45
  933. package/skills/skills/lingshu-net/units/net-6f96c190/SKILL.md +45 -45
  934. package/skills/skills/lingshu-net/units/net-6fb27488/SKILL.md +45 -45
  935. package/skills/skills/lingshu-net/units/net-703559d0/SKILL.md +45 -45
  936. package/skills/skills/lingshu-net/units/net-706d2692/SKILL.md +45 -45
  937. package/skills/skills/lingshu-net/units/net-70a20e04/SKILL.md +45 -45
  938. package/skills/skills/lingshu-net/units/net-7376158c/SKILL.md +45 -45
  939. package/skills/skills/lingshu-net/units/net-74d647cb/SKILL.md +45 -45
  940. package/skills/skills/lingshu-net/units/net-74e8a576/SKILL.md +45 -45
  941. package/skills/skills/lingshu-net/units/net-7801c2c0/SKILL.md +45 -45
  942. package/skills/skills/lingshu-net/units/net-78cae54d/SKILL.md +45 -45
  943. package/skills/skills/lingshu-net/units/net-78ec0324/SKILL.md +45 -45
  944. package/skills/skills/lingshu-net/units/net-7998097c/SKILL.md +45 -45
  945. package/skills/skills/lingshu-net/units/net-7d81ae06/SKILL.md +45 -45
  946. package/skills/skills/lingshu-net/units/net-7eabbbc8/SKILL.md +45 -45
  947. package/skills/skills/lingshu-net/units/net-7ed4f2c5/SKILL.md +45 -45
  948. package/skills/skills/lingshu-net/units/net-80b56cd6/SKILL.md +45 -45
  949. package/skills/skills/lingshu-net/units/net-83447546/SKILL.md +45 -45
  950. package/skills/skills/lingshu-net/units/net-8361fe5b/SKILL.md +45 -45
  951. package/skills/skills/lingshu-net/units/net-85e3996c/SKILL.md +45 -45
  952. package/skills/skills/lingshu-net/units/net-8897d5cc/SKILL.md +45 -45
  953. package/skills/skills/lingshu-net/units/net-88ad93a6/SKILL.md +45 -45
  954. package/skills/skills/lingshu-net/units/net-8e6f359e/SKILL.md +45 -45
  955. package/skills/skills/lingshu-net/units/net-8edc4cdb/SKILL.md +45 -45
  956. package/skills/skills/lingshu-net/units/net-8f6169e9/SKILL.md +45 -45
  957. package/skills/skills/lingshu-net/units/net-91e00638/SKILL.md +45 -45
  958. package/skills/skills/lingshu-net/units/net-96c61a3c/SKILL.md +45 -45
  959. package/skills/skills/lingshu-net/units/net-99076a29/SKILL.md +45 -45
  960. package/skills/skills/lingshu-net/units/net-998f3641/SKILL.md +45 -45
  961. package/skills/skills/lingshu-net/units/net-a1d7228a/SKILL.md +45 -45
  962. package/skills/skills/lingshu-net/units/net-a74da501/SKILL.md +45 -45
  963. package/skills/skills/lingshu-net/units/net-ac57deb7/SKILL.md +45 -45
  964. package/skills/skills/lingshu-net/units/net-b22d2f2b/SKILL.md +45 -45
  965. package/skills/skills/lingshu-net/units/net-b2b29d8d/SKILL.md +45 -45
  966. package/skills/skills/lingshu-net/units/net-b2ddce5d/SKILL.md +45 -45
  967. package/skills/skills/lingshu-net/units/net-b4151e9a/SKILL.md +45 -45
  968. package/skills/skills/lingshu-net/units/net-b873d6f7/SKILL.md +45 -45
  969. package/skills/skills/lingshu-net/units/net-bd3d2d55/SKILL.md +45 -45
  970. package/skills/skills/lingshu-net/units/net-c2a3f019/SKILL.md +45 -45
  971. package/skills/skills/lingshu-net/units/net-c685b788/SKILL.md +45 -45
  972. package/skills/skills/lingshu-net/units/net-c6c1fd79/SKILL.md +45 -45
  973. package/skills/skills/lingshu-net/units/net-c74a1b5d/SKILL.md +45 -45
  974. package/skills/skills/lingshu-net/units/net-cdac702d/SKILL.md +45 -45
  975. package/skills/skills/lingshu-net/units/net-d12dff5c/SKILL.md +45 -45
  976. package/skills/skills/lingshu-net/units/net-d3747882/SKILL.md +45 -45
  977. package/skills/skills/lingshu-net/units/net-d5fefa59/SKILL.md +45 -45
  978. package/skills/skills/lingshu-net/units/net-d67ec725/SKILL.md +45 -45
  979. package/skills/skills/lingshu-net/units/net-d80c1c4c/SKILL.md +45 -45
  980. package/skills/skills/lingshu-net/units/net-d9cb43b0/SKILL.md +45 -45
  981. package/skills/skills/lingshu-net/units/net-da559517/SKILL.md +45 -45
  982. package/skills/skills/lingshu-net/units/net-db4f414e/SKILL.md +45 -45
  983. package/skills/skills/lingshu-net/units/net-dc09d67c/SKILL.md +45 -45
  984. package/skills/skills/lingshu-net/units/net-e2d185de/SKILL.md +45 -45
  985. package/skills/skills/lingshu-net/units/net-e2fc73f8/SKILL.md +45 -45
  986. package/skills/skills/lingshu-net/units/net-e33ef0c2/SKILL.md +45 -45
  987. package/skills/skills/lingshu-net/units/net-e346863c/SKILL.md +45 -45
  988. package/skills/skills/lingshu-net/units/net-e6b3389a/SKILL.md +45 -45
  989. package/skills/skills/lingshu-net/units/net-e9758fc0/SKILL.md +45 -45
  990. package/skills/skills/lingshu-net/units/net-e9a9747a/SKILL.md +45 -45
  991. package/skills/skills/lingshu-net/units/net-ea14aab8/SKILL.md +45 -45
  992. package/skills/skills/lingshu-net/units/net-eba92ac1/SKILL.md +45 -45
  993. package/skills/skills/lingshu-net/units/net-f29d91d2/SKILL.md +45 -45
  994. package/skills/skills/lingshu-net/units/net-f314dd0d/SKILL.md +45 -45
  995. package/skills/skills/lingshu-net/units/net-f332b629/SKILL.md +45 -45
  996. package/skills/skills/lingshu-net/units/net-f7df127c/SKILL.md +45 -45
  997. package/skills/skills/lingshu-net/units/net-fb9d8f5d/SKILL.md +45 -45
  998. package/skills/skills/lingshu-net/units/net-fdec2c86/SKILL.md +45 -45
  999. package/skills/skills/lingshu-os/SKILL.md +64 -64
  1000. package/skills/skills/lingshu-os/units/os-0205cf9b/SKILL.md +45 -45
  1001. package/skills/skills/lingshu-os/units/os-027dc9be/SKILL.md +45 -45
  1002. package/skills/skills/lingshu-os/units/os-03c0d7d6/SKILL.md +45 -45
  1003. package/skills/skills/lingshu-os/units/os-040b5505/SKILL.md +45 -45
  1004. package/skills/skills/lingshu-os/units/os-06fa98ed/SKILL.md +45 -45
  1005. package/skills/skills/lingshu-os/units/os-0854291c/SKILL.md +45 -45
  1006. package/skills/skills/lingshu-os/units/os-0c7f14cb/SKILL.md +45 -45
  1007. package/skills/skills/lingshu-os/units/os-0d855af2/SKILL.md +45 -45
  1008. package/skills/skills/lingshu-os/units/os-0e87e997/SKILL.md +45 -45
  1009. package/skills/skills/lingshu-os/units/os-0f8ed882/SKILL.md +45 -45
  1010. package/skills/skills/lingshu-os/units/os-111ce1de/SKILL.md +45 -45
  1011. package/skills/skills/lingshu-os/units/os-1234eb00/SKILL.md +45 -45
  1012. package/skills/skills/lingshu-os/units/os-128f3820/SKILL.md +45 -45
  1013. package/skills/skills/lingshu-os/units/os-15796db5/SKILL.md +45 -45
  1014. package/skills/skills/lingshu-os/units/os-1898928a/SKILL.md +45 -45
  1015. package/skills/skills/lingshu-os/units/os-192b8ca9/SKILL.md +45 -45
  1016. package/skills/skills/lingshu-os/units/os-1d3bcf28/SKILL.md +45 -45
  1017. package/skills/skills/lingshu-os/units/os-1f224514/SKILL.md +45 -45
  1018. package/skills/skills/lingshu-os/units/os-26a4f86a/SKILL.md +45 -45
  1019. package/skills/skills/lingshu-os/units/os-29c96147/SKILL.md +45 -45
  1020. package/skills/skills/lingshu-os/units/os-2ea9a5ff/SKILL.md +45 -45
  1021. package/skills/skills/lingshu-os/units/os-300ef22c/SKILL.md +45 -45
  1022. package/skills/skills/lingshu-os/units/os-310dda5b/SKILL.md +45 -45
  1023. package/skills/skills/lingshu-os/units/os-313ef4ed/SKILL.md +45 -45
  1024. package/skills/skills/lingshu-os/units/os-329a2147/SKILL.md +45 -45
  1025. package/skills/skills/lingshu-os/units/os-34ad4b62/SKILL.md +45 -45
  1026. package/skills/skills/lingshu-os/units/os-350bc623/SKILL.md +45 -45
  1027. package/skills/skills/lingshu-os/units/os-35ee1a30/SKILL.md +45 -45
  1028. package/skills/skills/lingshu-os/units/os-3cd28220/SKILL.md +45 -45
  1029. package/skills/skills/lingshu-os/units/os-3d84e0c9/SKILL.md +45 -45
  1030. package/skills/skills/lingshu-os/units/os-3db42aac/SKILL.md +45 -45
  1031. package/skills/skills/lingshu-os/units/os-3e0aff42/SKILL.md +45 -45
  1032. package/skills/skills/lingshu-os/units/os-3e9405d2/SKILL.md +45 -45
  1033. package/skills/skills/lingshu-os/units/os-41d14544/SKILL.md +45 -45
  1034. package/skills/skills/lingshu-os/units/os-462f3ed4/SKILL.md +45 -45
  1035. package/skills/skills/lingshu-os/units/os-485833fa/SKILL.md +45 -45
  1036. package/skills/skills/lingshu-os/units/os-4a1cf781/SKILL.md +45 -45
  1037. package/skills/skills/lingshu-os/units/os-4bf77933/SKILL.md +45 -45
  1038. package/skills/skills/lingshu-os/units/os-4c14cec2/SKILL.md +45 -45
  1039. package/skills/skills/lingshu-os/units/os-4f05d577/SKILL.md +45 -45
  1040. package/skills/skills/lingshu-os/units/os-4f50ad0b/SKILL.md +45 -45
  1041. package/skills/skills/lingshu-os/units/os-509a4596/SKILL.md +45 -45
  1042. package/skills/skills/lingshu-os/units/os-512b1b6c/SKILL.md +45 -45
  1043. package/skills/skills/lingshu-os/units/os-5192621b/SKILL.md +45 -45
  1044. package/skills/skills/lingshu-os/units/os-55672763/SKILL.md +45 -45
  1045. package/skills/skills/lingshu-os/units/os-5582bce6/SKILL.md +45 -45
  1046. package/skills/skills/lingshu-os/units/os-5a096a1f/SKILL.md +45 -45
  1047. package/skills/skills/lingshu-os/units/os-5ca15108/SKILL.md +45 -45
  1048. package/skills/skills/lingshu-os/units/os-601663e1/SKILL.md +45 -45
  1049. package/skills/skills/lingshu-os/units/os-607f1963/SKILL.md +45 -45
  1050. package/skills/skills/lingshu-os/units/os-6158581b/SKILL.md +45 -45
  1051. package/skills/skills/lingshu-os/units/os-62f9278b/SKILL.md +45 -45
  1052. package/skills/skills/lingshu-os/units/os-63797b86/SKILL.md +45 -45
  1053. package/skills/skills/lingshu-os/units/os-6a1fe224/SKILL.md +45 -45
  1054. package/skills/skills/lingshu-os/units/os-6b0a68bf/SKILL.md +45 -45
  1055. package/skills/skills/lingshu-os/units/os-6e5cee67/SKILL.md +45 -45
  1056. package/skills/skills/lingshu-os/units/os-6fb1ff58/SKILL.md +45 -45
  1057. package/skills/skills/lingshu-os/units/os-71389592/SKILL.md +45 -45
  1058. package/skills/skills/lingshu-os/units/os-72e879a3/SKILL.md +45 -45
  1059. package/skills/skills/lingshu-os/units/os-7598748a/SKILL.md +45 -45
  1060. package/skills/skills/lingshu-os/units/os-80cc3283/SKILL.md +45 -45
  1061. package/skills/skills/lingshu-os/units/os-819f3093/SKILL.md +45 -45
  1062. package/skills/skills/lingshu-os/units/os-83670c2b/SKILL.md +45 -45
  1063. package/skills/skills/lingshu-os/units/os-878c18b3/SKILL.md +45 -45
  1064. package/skills/skills/lingshu-os/units/os-89ed7af1/SKILL.md +45 -45
  1065. package/skills/skills/lingshu-os/units/os-8cb7279d/SKILL.md +45 -45
  1066. package/skills/skills/lingshu-os/units/os-92276145/SKILL.md +45 -45
  1067. package/skills/skills/lingshu-os/units/os-955c4d66/SKILL.md +45 -45
  1068. package/skills/skills/lingshu-os/units/os-97aacf40/SKILL.md +45 -45
  1069. package/skills/skills/lingshu-os/units/os-9b6ed02c/SKILL.md +45 -45
  1070. package/skills/skills/lingshu-os/units/os-9c86a7a2/SKILL.md +45 -45
  1071. package/skills/skills/lingshu-os/units/os-a13ce4aa/SKILL.md +45 -45
  1072. package/skills/skills/lingshu-os/units/os-a568affe/SKILL.md +45 -45
  1073. package/skills/skills/lingshu-os/units/os-abd48f17/SKILL.md +45 -45
  1074. package/skills/skills/lingshu-os/units/os-b0416edc/SKILL.md +45 -45
  1075. package/skills/skills/lingshu-os/units/os-b6509cac/SKILL.md +45 -45
  1076. package/skills/skills/lingshu-os/units/os-b718657b/SKILL.md +45 -45
  1077. package/skills/skills/lingshu-os/units/os-b776ade1/SKILL.md +45 -45
  1078. package/skills/skills/lingshu-os/units/os-ba24fa08/SKILL.md +45 -45
  1079. package/skills/skills/lingshu-os/units/os-bd1fc177/SKILL.md +45 -45
  1080. package/skills/skills/lingshu-os/units/os-bda92711/SKILL.md +45 -45
  1081. package/skills/skills/lingshu-os/units/os-c0fa71bd/SKILL.md +45 -45
  1082. package/skills/skills/lingshu-os/units/os-c3d5cd44/SKILL.md +45 -45
  1083. package/skills/skills/lingshu-os/units/os-c6b6a763/SKILL.md +45 -45
  1084. package/skills/skills/lingshu-os/units/os-c7661eb1/SKILL.md +45 -45
  1085. package/skills/skills/lingshu-os/units/os-c76b5a43/SKILL.md +45 -45
  1086. package/skills/skills/lingshu-os/units/os-c7d35a30/SKILL.md +45 -45
  1087. package/skills/skills/lingshu-os/units/os-c980a25d/SKILL.md +45 -45
  1088. package/skills/skills/lingshu-os/units/os-c9f8df6e/SKILL.md +45 -45
  1089. package/skills/skills/lingshu-os/units/os-cc49ef2f/SKILL.md +45 -45
  1090. package/skills/skills/lingshu-os/units/os-cd9e686a/SKILL.md +45 -45
  1091. package/skills/skills/lingshu-os/units/os-cfa66a1b/SKILL.md +45 -45
  1092. package/skills/skills/lingshu-os/units/os-d237e500/SKILL.md +45 -45
  1093. package/skills/skills/lingshu-os/units/os-d39ef086/SKILL.md +45 -45
  1094. package/skills/skills/lingshu-os/units/os-d4f9e813/SKILL.md +45 -45
  1095. package/skills/skills/lingshu-os/units/os-d97915c0/SKILL.md +45 -45
  1096. package/skills/skills/lingshu-os/units/os-da0aadde/SKILL.md +45 -45
  1097. package/skills/skills/lingshu-os/units/os-da482caf/SKILL.md +45 -45
  1098. package/skills/skills/lingshu-os/units/os-dd4ff45e/SKILL.md +45 -45
  1099. package/skills/skills/lingshu-os/units/os-de0556c5/SKILL.md +45 -45
  1100. package/skills/skills/lingshu-os/units/os-e0ad3364/SKILL.md +45 -45
  1101. package/skills/skills/lingshu-os/units/os-e7612c68/SKILL.md +45 -45
  1102. package/skills/skills/lingshu-os/units/os-ea444e45/SKILL.md +45 -45
  1103. package/skills/skills/lingshu-os/units/os-ea6e7e0b/SKILL.md +45 -45
  1104. package/skills/skills/lingshu-os/units/os-ebc34d83/SKILL.md +45 -45
  1105. package/skills/skills/lingshu-os/units/os-ecbebbe3/SKILL.md +45 -45
  1106. package/skills/skills/lingshu-os/units/os-ecfceae7/SKILL.md +45 -45
  1107. package/skills/skills/lingshu-os/units/os-ed8de3a3/SKILL.md +45 -45
  1108. package/skills/skills/lingshu-os/units/os-f69c0b08/SKILL.md +45 -45
  1109. package/skills/skills/lingshu-os/units/os-f6ae6205/SKILL.md +45 -45
  1110. package/skills/skills/lingshu-os/units/os-f9bf8dd4/SKILL.md +45 -45
  1111. package/skills/skills/lingshu-os/units/os-fcdd828d/SKILL.md +45 -45
  1112. package/skills/skills/lingshu-pylang/SKILL.md +71 -71
  1113. package/skills/skills/lingshu-pylang/units/pylang-01b23f80/SKILL.md +45 -45
  1114. package/skills/skills/lingshu-pylang/units/pylang-074fd698/SKILL.md +45 -45
  1115. package/skills/skills/lingshu-pylang/units/pylang-0b490bb2/SKILL.md +45 -45
  1116. package/skills/skills/lingshu-pylang/units/pylang-0ca7f08b/SKILL.md +45 -45
  1117. package/skills/skills/lingshu-pylang/units/pylang-10ce3e91/SKILL.md +45 -45
  1118. package/skills/skills/lingshu-pylang/units/pylang-15f76c64/SKILL.md +45 -45
  1119. package/skills/skills/lingshu-pylang/units/pylang-1703046f/SKILL.md +45 -45
  1120. package/skills/skills/lingshu-pylang/units/pylang-1aa3e939/SKILL.md +45 -45
  1121. package/skills/skills/lingshu-pylang/units/pylang-1bed54cf/SKILL.md +45 -45
  1122. package/skills/skills/lingshu-pylang/units/pylang-1dd35612/SKILL.md +45 -45
  1123. package/skills/skills/lingshu-pylang/units/pylang-24273d7b/SKILL.md +45 -45
  1124. package/skills/skills/lingshu-pylang/units/pylang-2853f59f/SKILL.md +45 -45
  1125. package/skills/skills/lingshu-pylang/units/pylang-2a6bc16e/SKILL.md +45 -45
  1126. package/skills/skills/lingshu-pylang/units/pylang-2ae78997/SKILL.md +45 -45
  1127. package/skills/skills/lingshu-pylang/units/pylang-2bc88f4c/SKILL.md +45 -45
  1128. package/skills/skills/lingshu-pylang/units/pylang-31f5b8db/SKILL.md +45 -45
  1129. package/skills/skills/lingshu-pylang/units/pylang-36d178bc/SKILL.md +45 -45
  1130. package/skills/skills/lingshu-pylang/units/pylang-38600583/SKILL.md +45 -45
  1131. package/skills/skills/lingshu-pylang/units/pylang-38e8f9ff/SKILL.md +45 -45
  1132. package/skills/skills/lingshu-pylang/units/pylang-395085ca/SKILL.md +45 -45
  1133. package/skills/skills/lingshu-pylang/units/pylang-399b317e/SKILL.md +45 -45
  1134. package/skills/skills/lingshu-pylang/units/pylang-39c72c78/SKILL.md +45 -45
  1135. package/skills/skills/lingshu-pylang/units/pylang-3a659480/SKILL.md +45 -45
  1136. package/skills/skills/lingshu-pylang/units/pylang-482be62b/SKILL.md +45 -45
  1137. package/skills/skills/lingshu-pylang/units/pylang-486a1e94/SKILL.md +45 -45
  1138. package/skills/skills/lingshu-pylang/units/pylang-49026041/SKILL.md +45 -45
  1139. package/skills/skills/lingshu-pylang/units/pylang-4963b28a/SKILL.md +45 -45
  1140. package/skills/skills/lingshu-pylang/units/pylang-4af9140e/SKILL.md +45 -45
  1141. package/skills/skills/lingshu-pylang/units/pylang-4ca283f2/SKILL.md +45 -45
  1142. package/skills/skills/lingshu-pylang/units/pylang-4ddf31f3/SKILL.md +45 -45
  1143. package/skills/skills/lingshu-pylang/units/pylang-50614726/SKILL.md +45 -45
  1144. package/skills/skills/lingshu-pylang/units/pylang-5102c069/SKILL.md +45 -45
  1145. package/skills/skills/lingshu-pylang/units/pylang-521b1bf8/SKILL.md +45 -45
  1146. package/skills/skills/lingshu-pylang/units/pylang-5880b7a1/SKILL.md +45 -45
  1147. package/skills/skills/lingshu-pylang/units/pylang-61a9102d/SKILL.md +45 -45
  1148. package/skills/skills/lingshu-pylang/units/pylang-621123dd/SKILL.md +45 -45
  1149. package/skills/skills/lingshu-pylang/units/pylang-642cd625/SKILL.md +45 -45
  1150. package/skills/skills/lingshu-pylang/units/pylang-65ca79b7/SKILL.md +45 -45
  1151. package/skills/skills/lingshu-pylang/units/pylang-672df225/SKILL.md +45 -45
  1152. package/skills/skills/lingshu-pylang/units/pylang-67d3368e/SKILL.md +45 -45
  1153. package/skills/skills/lingshu-pylang/units/pylang-6be54340/SKILL.md +45 -45
  1154. package/skills/skills/lingshu-pylang/units/pylang-70b2006f/SKILL.md +45 -45
  1155. package/skills/skills/lingshu-pylang/units/pylang-70b215f1/SKILL.md +45 -45
  1156. package/skills/skills/lingshu-pylang/units/pylang-730c3fe4/SKILL.md +45 -45
  1157. package/skills/skills/lingshu-pylang/units/pylang-733c1286/SKILL.md +45 -45
  1158. package/skills/skills/lingshu-pylang/units/pylang-79845f4d/SKILL.md +45 -45
  1159. package/skills/skills/lingshu-pylang/units/pylang-7c4cc6f8/SKILL.md +45 -45
  1160. package/skills/skills/lingshu-pylang/units/pylang-7c7193ad/SKILL.md +45 -45
  1161. package/skills/skills/lingshu-pylang/units/pylang-7d86ab5d/SKILL.md +45 -45
  1162. package/skills/skills/lingshu-pylang/units/pylang-7df8ca78/SKILL.md +45 -45
  1163. package/skills/skills/lingshu-pylang/units/pylang-8182681d/SKILL.md +45 -45
  1164. package/skills/skills/lingshu-pylang/units/pylang-81ad40ee/SKILL.md +45 -45
  1165. package/skills/skills/lingshu-pylang/units/pylang-8283d7c0/SKILL.md +45 -45
  1166. package/skills/skills/lingshu-pylang/units/pylang-82b73f3d/SKILL.md +45 -45
  1167. package/skills/skills/lingshu-pylang/units/pylang-8404bbde/SKILL.md +45 -45
  1168. package/skills/skills/lingshu-pylang/units/pylang-8584040d/SKILL.md +45 -45
  1169. package/skills/skills/lingshu-pylang/units/pylang-85d8617b/SKILL.md +45 -45
  1170. package/skills/skills/lingshu-pylang/units/pylang-886935a3/SKILL.md +45 -45
  1171. package/skills/skills/lingshu-pylang/units/pylang-88ab2f96/SKILL.md +45 -45
  1172. package/skills/skills/lingshu-pylang/units/pylang-8b6f071e/SKILL.md +45 -45
  1173. package/skills/skills/lingshu-pylang/units/pylang-8d6ec58a/SKILL.md +45 -45
  1174. package/skills/skills/lingshu-pylang/units/pylang-8fe98252/SKILL.md +45 -45
  1175. package/skills/skills/lingshu-pylang/units/pylang-9018c39a/SKILL.md +45 -45
  1176. package/skills/skills/lingshu-pylang/units/pylang-91277748/SKILL.md +45 -45
  1177. package/skills/skills/lingshu-pylang/units/pylang-943b9dcb/SKILL.md +45 -45
  1178. package/skills/skills/lingshu-pylang/units/pylang-961e9e43/SKILL.md +45 -45
  1179. package/skills/skills/lingshu-pylang/units/pylang-962954d9/SKILL.md +45 -45
  1180. package/skills/skills/lingshu-pylang/units/pylang-9dbd8e2b/SKILL.md +45 -45
  1181. package/skills/skills/lingshu-pylang/units/pylang-a02eac31/SKILL.md +45 -45
  1182. package/skills/skills/lingshu-pylang/units/pylang-a4d3d7b1/SKILL.md +45 -45
  1183. package/skills/skills/lingshu-pylang/units/pylang-a7c3d0e2/SKILL.md +45 -45
  1184. package/skills/skills/lingshu-pylang/units/pylang-a88db70d/SKILL.md +45 -45
  1185. package/skills/skills/lingshu-pylang/units/pylang-ab7dddc2/SKILL.md +45 -45
  1186. package/skills/skills/lingshu-pylang/units/pylang-ac2a4b38/SKILL.md +45 -45
  1187. package/skills/skills/lingshu-pylang/units/pylang-afaf67c0/SKILL.md +45 -45
  1188. package/skills/skills/lingshu-pylang/units/pylang-b00660e6/SKILL.md +45 -45
  1189. package/skills/skills/lingshu-pylang/units/pylang-b4d7616d/SKILL.md +45 -45
  1190. package/skills/skills/lingshu-pylang/units/pylang-b67b1878/SKILL.md +45 -45
  1191. package/skills/skills/lingshu-pylang/units/pylang-b8040e1c/SKILL.md +45 -45
  1192. package/skills/skills/lingshu-pylang/units/pylang-b880c6c6/SKILL.md +45 -45
  1193. package/skills/skills/lingshu-pylang/units/pylang-b8d45f76/SKILL.md +45 -45
  1194. package/skills/skills/lingshu-pylang/units/pylang-ba956e52/SKILL.md +45 -45
  1195. package/skills/skills/lingshu-pylang/units/pylang-bb18b1f9/SKILL.md +45 -45
  1196. package/skills/skills/lingshu-pylang/units/pylang-bb46f3f2/SKILL.md +45 -45
  1197. package/skills/skills/lingshu-pylang/units/pylang-be55a094/SKILL.md +45 -45
  1198. package/skills/skills/lingshu-pylang/units/pylang-beb47b63/SKILL.md +45 -45
  1199. package/skills/skills/lingshu-pylang/units/pylang-c017681a/SKILL.md +45 -45
  1200. package/skills/skills/lingshu-pylang/units/pylang-c1317cd9/SKILL.md +45 -45
  1201. package/skills/skills/lingshu-pylang/units/pylang-c36fabf7/SKILL.md +45 -45
  1202. package/skills/skills/lingshu-pylang/units/pylang-c42465ec/SKILL.md +45 -45
  1203. package/skills/skills/lingshu-pylang/units/pylang-c5c76a12/SKILL.md +45 -45
  1204. package/skills/skills/lingshu-pylang/units/pylang-c910ad31/SKILL.md +45 -45
  1205. package/skills/skills/lingshu-pylang/units/pylang-ca9332cf/SKILL.md +45 -45
  1206. package/skills/skills/lingshu-pylang/units/pylang-cce90fa0/SKILL.md +45 -45
  1207. package/skills/skills/lingshu-pylang/units/pylang-cd4234a5/SKILL.md +45 -45
  1208. package/skills/skills/lingshu-pylang/units/pylang-cf0fca1c/SKILL.md +45 -45
  1209. package/skills/skills/lingshu-pylang/units/pylang-d2001e1f/SKILL.md +45 -45
  1210. package/skills/skills/lingshu-pylang/units/pylang-d616eb28/SKILL.md +45 -45
  1211. package/skills/skills/lingshu-pylang/units/pylang-d8962e66/SKILL.md +45 -45
  1212. package/skills/skills/lingshu-pylang/units/pylang-db6214cd/SKILL.md +45 -45
  1213. package/skills/skills/lingshu-pylang/units/pylang-dcde3040/SKILL.md +45 -45
  1214. package/skills/skills/lingshu-pylang/units/pylang-dfad3dba/SKILL.md +45 -45
  1215. package/skills/skills/lingshu-pylang/units/pylang-dfd5aac2/SKILL.md +45 -45
  1216. package/skills/skills/lingshu-pylang/units/pylang-e1aa3818/SKILL.md +45 -45
  1217. package/skills/skills/lingshu-pylang/units/pylang-e476915b/SKILL.md +45 -45
  1218. package/skills/skills/lingshu-pylang/units/pylang-e88e31fd/SKILL.md +45 -45
  1219. package/skills/skills/lingshu-pylang/units/pylang-ecd569d2/SKILL.md +45 -45
  1220. package/skills/skills/lingshu-pylang/units/pylang-ecf27e0c/SKILL.md +45 -45
  1221. package/skills/skills/lingshu-pylang/units/pylang-f124f0e6/SKILL.md +45 -45
  1222. package/skills/skills/lingshu-pylang/units/pylang-f127a8d1/SKILL.md +45 -45
  1223. package/skills/skills/lingshu-pylang/units/pylang-f2d6ec27/SKILL.md +45 -45
  1224. package/skills/skills/lingshu-pylang/units/pylang-f2f40090/SKILL.md +45 -45
  1225. package/skills/skills/lingshu-pylang/units/pylang-f4aa9e65/SKILL.md +45 -45
  1226. package/skills/skills/lingshu-pylang/units/pylang-f4f820d4/SKILL.md +45 -45
  1227. package/skills/skills/lingshu-pylang/units/pylang-f5b34833/SKILL.md +45 -45
  1228. package/skills/skills/lingshu-pylang/units/pylang-f6ebb66e/SKILL.md +45 -45
  1229. package/skills/skills/lingshu-pylang/units/pylang-f78bdcd7/SKILL.md +45 -45
  1230. package/skills/skills/lingshu-pylang/units/pylang-f92bc49b/SKILL.md +45 -45
  1231. package/skills/skills/lingshu-pylang/units/pylang-fd7595f0/SKILL.md +45 -45
  1232. package/skills/skills/lingshu-pylang/units/pylang-fda87aa1/SKILL.md +45 -45
  1233. package/src/lib/python_path.ts +71 -71
  1234. package/src/lib/session_state.ts +127 -127
  1235. package/src/lib/whitebox_llm.ts +311 -311
  1236. package/ui/minimal/payload/web/app.js +1 -1
  1237. package/utf8_boot.py +237 -237
  1238. package/web/app.js +1 -1
@@ -1,710 +1,710 @@
1
- # -*- coding: utf-8 -*-
2
- """M3 定位自测(D1 字段级定位):六类定位器 + 契约四键 + 批量/包 + 零写入。
3
-
4
- 真源:docs/记忆评审系统_立项设计与施工交接_20260915.md §5 D1
5
- `locate(node_id, issue_hint) -> [{field, span, issue_kind, evidence}]`
6
-
7
- 纪律(同 test_mr_m1/m2):
8
- · **自备数据源**——合成节点 + tempfile 合成库,零依赖真源库(外部 clone 全绿)。
9
- · **零写入实锤**——全部相位跑完后认知图指纹逐字节不变(M3 是只读模块)。
10
- · **确定性**——同一输入两次调用逐字节一致;`now` 显式传入,不靠墙钟。
11
- · **不猜**——语义级矛盾归 blindspot(`contradiction_semantic`),不编造字符区间。
12
-
13
- 覆盖:A 基础工具(纯函数) B 问题面定位器(含字段层门限、指纹不一致成因)+ 观测面
14
- (observation_aged:观测时刻不是失效声明,**不进告警面**)
15
- C 提示过滤与 blindspot(含 stale 的**依赖存在性**判据:载体消失/漂移)
16
- D 契约与确定性 E 批量与包 F 零写入
17
- 运行:python -m md_cg.test_mr_m3
18
- """
19
- from __future__ import annotations
20
-
21
- import hashlib
22
- import json
23
- import os
24
- import shutil
25
- import sys
26
- import tempfile
27
-
28
- from . import codeindex as CI
29
- from . import conformance as CF
30
- from . import nodefile as NF
31
- from . import writelimit as WL
32
- from .mreview import locate as LC
33
-
34
- PASS = FAIL = SKIP = 0
35
- FAILS = []
36
-
37
-
38
- def ok(cond, label):
39
- global PASS, FAIL
40
- if cond:
41
- PASS += 1
42
- else:
43
- FAIL += 1
44
- FAILS.append(label)
45
- print(" FAIL %s" % label)
46
-
47
-
48
- def skip(label):
49
- global SKIP
50
- SKIP += 1
51
- print(" SKIP %s" % label)
52
-
53
-
54
- # ---------------------------- 合成库 ----------------------------
55
-
56
- def ccg(fn="示例节点", *, 生效="载体/位置:本地仓;时间:全时窗(任意时刻成立);方法:test;约束:无",
57
- sub="a/b", exe="python -m md_cg.demo", ver="test", neg="无", extra=""):
58
- """六要素齐全的正文(防 `_loc_missing_field` 的 CCG 缺行噪声干扰其它判据)。"""
59
- return ("# 功能名:%s\n# 生效条件:%s\n# 子功能:%s\n# 执行:%s\n"
60
- "# 验证方式:%s\n# 不适用条件:%s\n%s" % (fn, 生效, sub, exe, ver, neg, extra))
61
-
62
-
63
- def full_cs(*, pos="本地仓", tw=(0.0, 9999999999.0), tool="test", con="无"):
64
- return {"observation_position": pos, "time_window": list(tw),
65
- "observation_tool": tool, "existence_constraint": con}
66
-
67
-
68
- def mkroot(root, nodes):
69
- """合成认知图根:`_index.json` + 节点盘文件(文件文本由 NF.dumps 生成)。"""
70
- os.makedirs(root, exist_ok=True)
71
- idx = {}
72
- for nid, spec in nodes.items():
73
- fm = dict(spec.get("fm") or {})
74
- fm.setdefault("id", nid)
75
- content = spec.get("content") or ""
76
- rel = spec.get("path") or ("knowledge/%s.md" % nid)
77
- p = os.path.join(root, rel)
78
- os.makedirs(os.path.dirname(p), exist_ok=True)
79
- with open(p, "w", encoding="utf-8") as f:
80
- f.write(NF.dumps(fm, content))
81
- meta = dict(spec.get("meta") or {})
82
- meta.setdefault("path", rel)
83
- meta.setdefault("layer", spec.get("layer") or "knowledge")
84
- meta.setdefault("content_hash", NF.content_hash(content))
85
- meta.update({"id": nid, "path": rel})
86
- meta["path"] = rel
87
- idx[nid] = meta
88
- with open(os.path.join(root, CF.INDEX_FILE), "w", encoding="utf-8") as f:
89
- json.dump({"nodes": idx}, f, ensure_ascii=False)
90
- return root
91
-
92
-
93
- def snapshot(root):
94
- out = {}
95
- for dp, _dns, fns in os.walk(root):
96
- for fn in fns:
97
- p = os.path.join(dp, fn)
98
- with open(p, "rb") as f:
99
- out[os.path.relpath(p, root)] = hashlib.md5(f.read()).hexdigest()
100
- return out
101
-
102
-
103
- def kinds_of(hits):
104
- return sorted({h["issue_kind"] for h in hits})
105
-
106
-
107
- def fields_of(hits, kind=None):
108
- return sorted({h["field"] for h in hits if kind is None or h["issue_kind"] == kind})
109
-
110
-
111
- NOW = 1789000000.0 # 固定「当前时间」(2026-09 量级),不靠墙钟
112
- EXPIRED = (1000.0, 2000.0)
113
-
114
-
115
- # ---------------------------- A 组:基础工具 ----------------------------
116
-
117
- def phase_a(tmp):
118
- print("[A] 基础工具(纯函数)")
119
-
120
- c = "第一句。第二句!第三句?第四句;"
121
- sp = LC.sentence_spans(c)
122
- ok(len(sp) == 4 and [i for i, _s, _e, _t in sp] == [0, 1, 2, 3],
123
- "A1 sentence_spans 句索引连续(%s)" % [i for i, _s, _e, _t in sp])
124
- ok(all(c[s:e] == t for _i, s, e, t in sp), "A2 span 与原文切片逐字对应")
125
- ok(LC.sentence_spans("") == [] and LC.sentence_spans(" ") == [],
126
- "A3 空/纯空白正文零句(不编号空句)")
127
- ok([t for _i, _s, _e, t in LC.sentence_spans("甲。\n乙。")] == ["甲。", "乙。"],
128
- "A4 换行是句尾且空句不编号(分隔符不残留在句首)")
129
-
130
- body = ccg(extra="尾句。")
131
- ms = LC.mark_spans(body)
132
- ok(set(ms) == set(NF.CCG_MARKS), "A5 mark_spans 六要素全提(实得 %s)" % sorted(ms))
133
- ok(all(body[s:e].startswith("#") for s, e in ms.values()),
134
- "A6 要素行 span 覆盖整行")
135
- ok(LC.mark_spans(ccg() + "# 功能名:第二个\n").get("功能名")
136
- == LC.mark_spans(ccg()).get("功能名"), "A7 同要素取首次出现(确定性)")
137
-
138
- text = NF.dumps({"id": "n1", "path": "knowledge/n1.md", "tags": []}, ccg())
139
- ks = LC.key_line_spans(text)
140
- ok(ks.get("id", (None, None))[0] == 2, "A8 key_line_spans 行号 1-based(实得 %s)"
141
- % (ks.get("id") or (None,))[0])
142
- ok("功能名" not in ks and "---" not in ks,
143
- "A9 正文 `#` 行与 `---` 分隔线都排除在 frontmatter 之外")
144
- ok(ks.get("id") and text[ks["id"][1][0]:ks["id"][1][1]].startswith('id:'),
145
- "A10 键行 span 切片以键名开头")
146
-
147
- root = mkroot(os.path.join(tmp, "a"), {
148
- "n1": {"content": ccg(), "meta": {"layer": "knowledge", "tags": ["a"]}},
149
- "n2": {"content": "短", "path": "", "meta": {"layer": "knowledge"}},
150
- })
151
- nd = LC.load_node("n1", root)
152
- ok(nd and nd["meta"].get("layer") == "knowledge" and "# 功能名:" in (nd["content"] or ""),
153
- "A11 load_node 取索引 meta + 文件正文")
154
- ok(nd and nd["fm"].get("id") == "n1", "A12 loads 解析出的 fm 是文件真源")
155
- ok(LC.load_node("ghost", root) is None, "A13 索引无此节点 → None(不猜路径)")
156
- ok(LC.load_node("n1", root, index={"nodes": {"n1": {"path": "knowledge/n1.md"}}})
157
- is not None, "A14 index 可显式注入(不读盘 index)")
158
- ok(LC._index(root).get("n1") is not None, "A15 _index 兼容 {nodes:…} 形态")
159
- ok(LC._index(root, index={"n1": {"path": "x"}}) == {"n1": {"path": "x"}},
160
- "A16 裸 dict 索引原样透传")
161
-
162
- ok(LC._snippet("甲" * 200, [0, 200]).endswith("…"), "A17 超长片段截断加省略号")
163
- ok(LC._line_of(text, nd["content"], [0, 5]) == 6,
164
- "A18 _line_of 定位到正文首行(实得 %s)" % LC._line_of(text, nd["content"], [0, 5]))
165
- ok(LC._line_of(None, "x", [0, 1]) is None and LC._line_of(text, "不存在", [0, 1]) is None,
166
- "A19 无 text / 正文不在文件内 → line=None(不编造)")
167
- ok(LC.canonical_kind("dup_content") == "dup"
168
- and LC.canonical_kind("template_flow_digits_only") == "template_flow",
169
- "A20 M1/D1 用词归并到 D1 规范名")
170
- ok(LC.canonical_kind("天外飞仙") == "天外飞仙", "A21 未知类别原样返回(不假装认路)")
171
-
172
-
173
- # ---------------------------- B 组:六类定位器 ----------------------------
174
-
175
- def phase_b(tmp):
176
- print("[B] 六类定位器")
177
-
178
- # B1-B6 missing_field
179
- m = {"id": "b1", "layer": "knowledge", "content_hash": "h1",
180
- "tags": ["a"], "role": "", "importance": 0.5, "evidence_count": 3,
181
- "lifecycle_state": "active", "condition_space": full_cs()}
182
- hits = LC.locate_ex("b1", "missing_field", meta=m, content=ccg(),
183
- text="", fm={}, peers=[], now=NOW)["hits"]
184
- ok(fields_of(hits) == ["role"] and all(h["span"] is None for h in hits),
185
- "B1 字段两处皆空 → missing_field 且 span=None(实得 %s)" % fields_of(hits))
186
-
187
- m2 = dict(m, evidence_count=0, role="knowledge-card")
188
- hits = LC.locate_ex("b1", "missing_field", meta=m2, content=ccg(),
189
- text="", fm={}, peers=[], now=NOW)["hits"]
190
- ok("evidence_count" in fields_of(hits) and "evidence_zero" in {h["rule"] for h in hits},
191
- "B2 evidence_count=0 → 专项命中(rule=evidence_zero)")
192
-
193
- m3 = dict(m, importance=1.7, role="k")
194
- hits = LC.locate_ex("b1", "missing_field", meta=m3, content=ccg(),
195
- text="", fm={}, peers=[], now=NOW)["hits"]
196
- ok("importance" in fields_of(hits) and "field_invalid" in {h["rule"] for h in hits},
197
- "B3 importance 越界 → 字段存在但不可用")
198
-
199
- m4 = dict(m, condition_space={"observation_position": "本地"},
200
- role="k", tags=["a"])
201
- body = ccg()
202
- hits = LC.locate_ex("b1", "missing_field", meta=m4, content=body,
203
- text="", fm={}, peers=[], now=NOW)["hits"]
204
- h = [x for x in hits if x["field"] == "condition_space"]
205
- ok(bool(h) and h[0]["span"] is not None
206
- and body[h[0]["span"][0]:h[0]["span"][1]].startswith("# 生效条件"),
207
- "B4 四槽不全 → 指向正文「# 生效条件」行(%d/4)"
208
- % (len(NF.CONDITION_SLOTS) - 3))
209
-
210
- cut = "# 功能名:只有一行\n正文没有其它要素。\n"
211
- hits = LC.locate_ex("b1", "missing_field", meta=dict(m, role="k", tags=["a"]),
212
- content=cut, text="", fm={}, peers=[], now=NOW)["hits"]
213
- hm = [x for x in hits if x["rule"] == "ccg_incomplete"]
214
- ok(bool(hm) and hm[0]["field"] == "content" and hm[0]["span"] is None
215
- and "生效条件" in hm[0]["evidence"],
216
- "B5 正文缺 CCG 要素行 → field=content 且 span=None(行不存在,不编造区间)")
217
- ok(not [x for x in LC.locate_ex("b1", "missing_field", meta=m3, content=ccg(),
218
- text="", fm={}, peers=[], now=NOW)["hits"]
219
- if x["rule"] == "ccg_incomplete"],
220
- "B6 要素齐全 → 无 ccg_incomplete 噪声")
221
-
222
- # B7-B10 weak_source
223
- hits = LC.locate_ex("b1", "weak_source",
224
- meta={"verification_basis": "", "tags": ["计算机"]},
225
- content=ccg(), text="", fm={}, peers=[], now=NOW)["hits"]
226
- ok(len(hits) == 1 and hits[0]["rule"] == "basis_absent", "B7 基底为空 → basis_absent")
227
-
228
- hits = LC.locate_ex("b1", "weak_source",
229
- meta={"verification_basis": "self", "tags": ["计算机"]},
230
- content=ccg(), text="", fm={}, peers=[], now=NOW)["hits"]
231
- ok(len(hits) == 1 and hits[0]["rule"] == "basis_enum", "B8 基底越枚举 → basis_enum")
232
-
233
- hits = LC.locate_ex("b1", "weak_source",
234
- meta={"verification_basis": "textbook", "tags": ["计算机"]},
235
- content=ccg(), text="", fm={}, peers=[], now=NOW)["hits"]
236
- ok(len(hits) == 1 and hits[0]["rule"] == "basis_licensed"
237
- and "science" in hits[0]["evidence"], "B9 理科×textbook → 赛道不相容(实得 %s)"
238
- % (hits[0]["evidence"] if hits else "无"))
239
-
240
- hits = LC.locate_ex("b1", "weak_source",
241
- meta={"verification_basis": "textbook", "tags": ["语文"]},
242
- content=ccg(), text="", fm={}, peers=[], now=NOW)["hits"]
243
- ok(hits == [], "B10 文科×textbook 合规 → 零命中(不误报)")
244
-
245
- # B11-B12c observation_aged(原「stale」的时间窗口径:**观测时刻不是失效声明**)
246
- m5 = dict(m, role="k", tags=["a"], condition_space=full_cs(tw=EXPIRED))
247
- body = ccg()
248
- hits = LC.locate_ex("b1", "observation_aged", meta=m5, content=body, text="",
249
- fm={}, peers=[], now=NOW)["hits"]
250
- ok(len(hits) == 1 and hits[0]["field"] == "condition_space"
251
- and hits[0]["severity"] == "info" and "观测时刻" in hits[0]["evidence"],
252
- "B11 时间窗过期 → observation_aged(观测面·info,不冒充失效)")
253
-
254
- m6 = dict(m5, condition_space=full_cs(tw=(0.0, NF.FULL_TIME_WINDOW_MAX)))
255
- ok(LC.locate_ex("b1", "observation_aged", meta=m6, content=body, text="", fm={},
256
- peers=[], now=NOW)["hits"] == [],
257
- "B12 全时窗是合法声明 → 不判")
258
-
259
- # B12b-B12c 时间窗来源链(真库口径:索引快照只带 time_window,**无 condition_space 键**)
260
- m_nocs = {k: v for k, v in m.items() if k != "condition_space"}
261
- hits = LC.locate_ex("b1", "observation_aged", meta=dict(m_nocs, role="k"),
262
- content=body, text="",
263
- fm={"condition_space": full_cs(tw=EXPIRED)}, peers=[],
264
- now=NOW)["hits"]
265
- ok(len(hits) == 1 and hits[0]["rule"] == "observation_window_passed",
266
- "B12b 快照无条件空间 → 回退 fm 真源仍判(实得 %d 条)" % len(hits))
267
-
268
- hits = LC.locate_ex("b1", "observation_aged",
269
- meta=dict(m_nocs, role="k", time_window=list(EXPIRED)),
270
- content=body, text="", fm={}, peers=[], now=NOW)["hits"]
271
- ok(len(hits) == 1 and hits[0]["rule"] == "observation_window_passed",
272
- "B12c 快照只带 time_window → 真库口径下仍判")
273
-
274
- # B12d-B12e **观测面不进评审告警面**(B+C 修正的关键隔离断言)
275
- hits = LC.locate_ex("b1", None, meta=m5, content=body, text="", fm={},
276
- peers=[], now=NOW)["hits"]
277
- ok(all(h["issue_kind"] != "observation_aged" for h in hits),
278
- "B12d 默认全量定位不含 observation_aged(不进评审告警面)")
279
- ok("observation_aged" in LC.ADVISORY_KINDS
280
- and "observation_aged" not in LC.ISSUE_KINDS,
281
- "B12e observation_aged 归观测面(ADVISORY_KINDS),不占问题面 D1 六类")
282
-
283
- # C stale —— **依赖存在性**(B+C 修正:时效判定看载体是否还在,不看观测时刻)
284
- src = tempfile.mkdtemp(prefix="m3src_")
285
- slines = ["def f():", " return 1", "", "def g():", " return 2"]
286
- with open(os.path.join(src, "mod.py"), "w", encoding="utf-8") as f:
287
- f.write("\n".join(slines))
288
- ref_ok = {"path": "mod.py", "name": "f", "kind": "def", "lineno": 1, "end": 2,
289
- "lang": "py", "precise": True,
290
- "hash": CI.region_hash(slines, 1, 2), "root": src}
291
- hits = LC.locate_ex("c1", "stale", meta={}, content=body, text="",
292
- fm={"code_ref": dict(ref_ok)}, peers=[], now=NOW)["hits"]
293
- ok(hits == [], "C1 依赖源文件在且区间哈希吻合 → 零命中(不误报)")
294
-
295
- hits = LC.locate_ex("c1", "stale", meta={}, content=body, text="",
296
- fm={"code_ref": dict(ref_ok, hash="000000000000")},
297
- peers=[], now=NOW)["hits"]
298
- ok(len(hits) == 1 and hits[0]["rule"] == "ref_stale"
299
- and hits[0]["field"] == "code_ref",
300
- "C2 源文件在但区间哈希不符(已漂移)→ stale")
301
-
302
- hits = LC.locate_ex("c1", "stale", meta={}, content=body, text="",
303
- fm={"code_ref": dict(ref_ok, path="gone.py")},
304
- peers=[], now=NOW)["hits"]
305
- ok(len(hits) == 1 and hits[0]["rule"] == "ref_dangling",
306
- "C3 依赖源文件不存在(悬空)→ stale(载体消失)")
307
-
308
- hits = LC.locate_ex("c1", "stale", meta={}, content=body, text="",
309
- fm={"doc_ref": {"path": "x.md", "lineno": 1, "end": 2,
310
- "hash": "000000000000"}},
311
- peers=[], now=NOW)["hits"]
312
- ok(hits == [], "C4 ref 无 root(判不了)→ 零命中(观测手段不足不冒充失效)")
313
-
314
- hits = LC.locate_ex("c1", None, meta=m5, content=body, text="",
315
- fm={"code_ref": dict(ref_ok, path="gone.py")},
316
- peers=[], now=NOW)["hits"]
317
- ok(any(h["issue_kind"] == "stale" for h in hits),
318
- "C5 默认全量定位会跑 stale(依赖存在性属问题面)")
319
- shutil.rmtree(src, ignore_errors=True)
320
-
321
- # B13-B14 dup
322
- same = ccg(fn="重复节点")
323
- peers = LC.build_peers([{"node_id": "b1", "content": same},
324
- {"node_id": "b2", "content": same}])
325
- hits = LC.locate_ex("b1", "dup",
326
- meta=dict(m, role="k", content_hash=NF.content_hash(same)),
327
- content=same, text="", fm={}, peers=peers.get("b1"),
328
- now=NOW)["hits"]
329
- ok(len(hits) == 1 and hits[0]["field"] == "content_hash"
330
- and hits[0]["span"] == [0, len(same)] and hits[0]["peer"] == "b2",
331
- "B13 同内容指纹 → dup 指整篇正文(peer=%s)"
332
- % (hits[0]["peer"] if hits else "无"))
333
-
334
- hits = LC.locate_ex("b1", "dup", meta=dict(m, role="k", tags=["a"]),
335
- content=ccg(fn="甲"), text="", fm={},
336
- peers=LC.build_peers([{"node_id": "b1", "content": ccg(fn="甲")},
337
- {"node_id": "b2", "content": ccg(fn="乙")}]
338
- ).get("b1"), now=NOW)["hits"]
339
- ok(hits == [], "B14 内容不同 → 不判 dup(不误报)")
340
-
341
- # B15 template_flow:逐句骨架相同、仅数值不同
342
- t1 = ccg(fn="批次 1 收官", extra="本批处理 100 条记录,耗用 12 秒。第二句写 200 条。")
343
- t2 = ccg(fn="批次 2 收官", extra="本批处理 300 条记录,耗用 45 秒。第二句写 400 条。")
344
- peers2 = LC.build_peers([{"node_id": "b1", "content": t1},
345
- {"node_id": "b2", "content": t2}])
346
- hits = LC.locate_ex("b1", "template_flow", meta=dict(m, role="k", tags=["a"]),
347
- content=t1, text="", fm={}, peers=peers2.get("b1"), now=NOW)["hits"]
348
- ok(len(hits) >= 2 and all(h["field"] == "content" and h["span"] is not None
349
- for h in hits),
350
- "B15 同模板流水 → 逐句给出 span(%d 句命中)" % len(hits))
351
- ok(all(t1[h["span"][0]:h["span"][1]].strip()[:LC.SNIPPET_MAX] == h["snippet"]
352
- for h in hits),
353
- "B16 片段=span 切片去空白截断(与实现同口径,可肉眼复核)")
354
- ok(hits and hits[0]["sentence"] is not None and hits[0]["peer"] == "b2",
355
- "B17 携带句索引与对照节点(人工可跳行)")
356
-
357
- hits = LC.locate_ex("b1", "template_flow", meta=dict(m, role="k", tags=["a"]),
358
- content=t1, text="", fm={},
359
- peers=LC.build_peers([{"node_id": "b1", "content": t1}]).get("b1"),
360
- now=NOW)["hits"]
361
- ok(hits == [], "B18 无对照节点 → 不判流水")
362
-
363
- # B19-B21 contradiction(确定性)
364
- body = ccg()
365
- hits = LC.locate_ex("b1", "contradiction",
366
- meta={"content_hash": "declared!", "role": "k", "tags": ["a"]},
367
- content=body, text="", fm={}, peers=[], now=NOW)["hits"]
368
- ok(len(hits) == 1 and hits[0]["rule"] == "hash_declared_vs_actual"
369
- and NF.content_hash(body) in hits[0]["evidence"],
370
- "B19 索引声明指纹 ≠ 正文实算 → contradiction")
371
-
372
- hits = LC.locate_ex("b1", "contradiction",
373
- meta={"content_hash": NF.content_hash(body), "role": "k"},
374
- content=body, text="", fm={"id": "别的id"}, peers=[],
375
- now=NOW)["hits"]
376
- ok(len(hits) == 1 and hits[0]["rule"] == "id_declared_vs_index"
377
- and hits[0]["field"] == "id", "B20 文件 id ≠ 索引键 → contradiction")
378
-
379
- hits = LC.locate_ex("b1", "contradiction",
380
- meta={"content_hash": NF.content_hash(body), "role": "k"},
381
- content=body, text="", fm={"id": "b1"}, peers=[], now=NOW)["hits"]
382
- ok(hits == [], "B21 声明与事实一致 → 零命中")
383
-
384
- # B22-B25 字段层门限(判据同源:派生自 M1 规则库,不另立一份)
385
- scope = LC.field_layer_scope()
386
- ok(scope.get("role") == ["knowledge"]
387
- and scope.get("evidence_count") == ["knowledge"],
388
- "B22 层门限派生自 rules/*.json 的 matcher.layer(实得 %s)" % scope)
389
- ok("verification_basis" not in scope,
390
- "B23 未限层的字段不入表 = 全层适用(M1 R-BASIS-MISSING 无 layer 门限)")
391
-
392
- hits = LC.locate_ex("b1", "missing_field",
393
- meta=dict(m, layer="contextual", role="", evidence_count=0,
394
- tags=[]),
395
- content=ccg(), text="", fm={}, peers=[], now=NOW)["hits"]
396
- fld = fields_of(hits)
397
- ok("role" not in fld and "evidence_count" not in fld,
398
- "B24 非 knowledge 层 → 限层字段越层不报(与 M1 `_scope` 同口径,实得 %s)" % fld)
399
- ok("tags" in fld,
400
- "B25 未限层字段不受门限影响(tags 仍全层检查,实得 %s)" % fld)
401
-
402
- # B26-B28 指纹不一致的**成因**(同一条命中,两种成因,处置完全不同)
403
- cause, note = LC.hash_mismatch_cause({"content_hash": "x"}, root=None, path=None)
404
- ok(cause == "unknown" and "成因未判定" in note,
405
- "B26 无盘上证据 → cause=unknown(不假装知道成因)")
406
-
407
- root = mkroot(os.path.join(tmp, "b_lag"), {
408
- "n1": {"content": body, "meta": {"content_hash": "declared!"}},
409
- })
410
- node_f = os.path.join(root, "knowledge", "n1.md")
411
- idx_f = os.path.join(root, CF.INDEX_FILE)
412
- mt = os.path.getmtime(node_f)
413
- os.utime(idx_f, (mt - 60.0, mt - 60.0)) # 索引快照比节点文件旧 60s
414
- hc = [h for h in LC.locate_ex("n1", "contradiction", root=root, now=NOW)["hits"]
415
- if h["rule"] == "hash_declared_vs_actual"]
416
- ok(hc and hc[0]["cause"] == "index_lag" and "快照滞后" in hc[0]["evidence"],
417
- "B27 文件比索引快照新 → cause=index_lag(正常写路径现象,实得 %s)"
418
- % (hc[0]["cause"] if hc else "无命中"))
419
-
420
- os.utime(idx_f, (mt + 60.0, mt + 60.0)) # 索引快照不旧于节点文件
421
- hc = [h for h in LC.locate_ex("n1", "contradiction", root=root, now=NOW)["hits"]
422
- if h["rule"] == "hash_declared_vs_actual"]
423
- ok(hc and hc[0]["cause"] == "true_mismatch" and "真源相抵触" in hc[0]["evidence"],
424
- "B28 索引快照不旧于文件 → cause=true_mismatch(需查,实得 %s)"
425
- % (hc[0]["cause"] if hc else "无命中"))
426
-
427
-
428
- # ---------------------------- C 组:提示过滤与 blindspot ----------------------------
429
-
430
- def _mixed():
431
- """同时命中多类的节点:role 空 + 四槽不全(missing_field)+ 指纹不符(contradiction)。
432
-
433
- `condition_space` 刻意只声明 1 槽——让 D 组同时存在「可指区间」(`# 生效条件` 行)
434
- 与「无区间」(frontmatter 声明类)两种命中,契约两侧都被覆盖。
435
- 基底取 `textbook` + `语文`(文科档)——让 `weak_source` 真的干净,
436
- C 组才能验证「该类无问题就返回空、不借机报别的类」。
437
- """
438
- body = ccg()
439
- return dict({"content_hash": "declared!", "role": "", "tags": ["语文"],
440
- "layer": "knowledge", "verification_basis": "textbook",
441
- "importance": 0.5, "evidence_count": 3, "lifecycle_state": "active",
442
- "condition_space": {"observation_position": "本地仓"}}), body
443
-
444
-
445
- def phase_c(tmp):
446
- print("[C] 提示过滤与 blindspot")
447
- m, body = _mixed()
448
- kw = dict(meta=m, content=body, text="", fm={}, peers=[], now=NOW)
449
-
450
- all_hits = LC.locate_ex("c1", None, **kw)["hits"]
451
- ok({"missing_field", "contradiction"} <= set(kinds_of(all_hits)),
452
- "C1 hint=None → 全量定位(实得 %s)" % kinds_of(all_hits))
453
-
454
- only = LC.locate_ex("c1", "weak_source", **kw)["hits"]
455
- ok(all(h["issue_kind"] == "weak_source" for h in only),
456
- "C2 hint=类别 → 只跑该类(实得 %s)" % kinds_of(only))
457
- ok(only == [], "C3 该类无问题 → 空(不借机报别的类)")
458
-
459
- by_field = LC.locate_ex("c1", "role", **kw)["hits"]
460
- ok(by_field and all(h["field"] == "role" for h in by_field),
461
- "C4 hint=字段名 → 按字段过滤全量结果(实得 %s)" % fields_of(by_field))
462
-
463
- both = LC.locate_ex("c1", {"issue_kind": "missing_field", "field": "role"}, **kw)["hits"]
464
- ok(both and len(both) == len(by_field), "C5 dict 形态 hint 同时收类别与字段")
465
-
466
- lst = LC.locate_ex("c1", ["contradiction", "missing_field"], **kw)["hits"]
467
- ok(len(lst) == len(all_hits)
468
- and set(kinds_of(lst)) == {"contradiction", "missing_field"}
469
- and LC.locate_ex("c1", ["contradiction", {"field": "role"}], **kw)["hits"] == [],
470
- "C6 list 形态 hint 收集多个类别;类别与字段是收窄关系(交集空即空,不退回全量)"
471
- "(实得 %d 条 %s)" % (len(lst), kinds_of(lst)))
472
-
473
- ex = LC.locate_ex("c1", "contradiction_semantic", **kw)
474
- ok(ex["hits"] == [] and ex["blindspot"] and "语义" in ex["blindspot"][0],
475
- "C7 语义级矛盾 → blindspot 且零 hits(不猜、不编造区间)")
476
- ok(ex["blindspot"] == LC.locate_ex("c1", "contradiction_semantic", **kw)["blindspot"],
477
- "C8 blindspot 文本确定(可断言)")
478
-
479
- ex2 = LC.locate_ex("c1", ["contradiction_semantic", "missing_field"], **kw)
480
- ok(ex2["blindspot"] and ex2["hits"]
481
- and all(h["issue_kind"] == "missing_field" for h in ex2["hits"]),
482
- "C9 blindspot 与可定位类别同批共存(互不吞没)")
483
-
484
- unk = LC.locate_ex("c1", "天外飞仙", **kw)
485
- ok(unk["hits"] == [] and unk["blindspot"] == [],
486
- "C10 未知提示 → 当字段过滤后为空,不炸也不假装认路")
487
-
488
- alias = LC.locate_ex("c1", "dup_content", **kw)["hits"]
489
- ok(all(h["issue_kind"] == "dup" for h in alias) and bool(alias) is False,
490
- "C11 M1 用词 dup_content 归并为 dup(无重复故空)")
491
-
492
- ok(LC.blindspot_reason("contradiction") == "" and
493
- LC.blindspot_reason("contradiction_semantic") != "",
494
- "C12 blindspot_reason 单一归口(可定位类别返回空串)")
495
-
496
-
497
- # ---------------------------- D 组:契约与确定性 ----------------------------
498
-
499
- def phase_d(tmp):
500
- print("[D] 契约与确定性")
501
- m, body = _mixed()
502
- kw = dict(meta=m, content=body, text="", fm={}, peers=[], now=NOW)
503
- hits = LC.locate("d1", None, **kw)
504
-
505
- ok(isinstance(hits, list), "D1 locate() 契约入口返回 list")
506
- ok(all({"field", "span", "issue_kind", "evidence"} <= set(h) for h in hits),
507
- "D2 四键齐备(实得 %s)" % (sorted(hits[0]) if hits else "无命中"))
508
- ok(all(h["issue_kind"] in LC.ISSUE_KINDS for h in hits),
509
- "D3 issue_kind 全落 D1 枚举(实得 %s)" % kinds_of(hits))
510
- ok(all(str(h["evidence"]).strip() for h in hits),
511
- "D4 evidence 非空(白箱判据:为何算问题)")
512
-
513
- sp = [h for h in hits if h["span"] is not None]
514
- ok(all(isinstance(h["span"], list) and len(h["span"]) == 2
515
- and h["span"][0] < h["span"][1] and h["span"][1] <= len(body) for h in sp),
516
- "D5 span 是正文内的半开区间 [start,end)")
517
- ok(all(isinstance(h["span"][0], int) and isinstance(h["span"][1], int) for h in sp),
518
- "D6 span 端点为整数(可复算切片)")
519
- ok(all(body[h["span"][0]:h["span"][1]].strip() != "" for h in sp),
520
- "D7 span 指向非空片段")
521
- ok(all(h.get("snippet") != "" for h in sp),
522
- "D8 有 span 即有片段(人工核对可肉眼确认)")
523
- ok(all(not h.get("snippet") for h in hits if h["span"] is None),
524
- "D9 声明类命中无区间 → 片段为空(不编造区间)")
525
-
526
- h2 = LC.locate("d1", None, **kw)
527
- ok(json.dumps(hits, ensure_ascii=False) == json.dumps(h2, ensure_ascii=False),
528
- "D10 同一输入两次调用逐字节一致(确定性)")
529
- ok(LC.locate_ex("d1", None, **kw)["load"]["content_len"] == len(body),
530
- "D11 load 回报正文长度(审计留痕)")
531
-
532
- key = [(h["issue_kind"], str(h["field"])) for h in hits]
533
- ok(key == sorted(key), "D12 命中按 (issue_kind, field, span, peer) 稳定排序(实得 %s)" % key)
534
-
535
- try:
536
- LC.locate_ex("d1", None, meta=m, content=None, text="", fm={}, peers=[], now=NOW)
537
- raised = False
538
- except ValueError:
539
- raised = True
540
- ok(raised, "D13 无正文且无 root → fail-closed 报错(不假装能定位)")
541
-
542
-
543
- # ---------------------------- E 组:批量与包 ----------------------------
544
-
545
- def _pkg(entries, bid="bE"):
546
- return {"bundle_id": bid, "group_kind": "batch", "group_key": "g",
547
- "size": len(entries), "entries": entries}
548
-
549
-
550
- def _ent(nid, *, excerpt="", h="", **kw):
551
- e = {"ref": nid, "node_id": nid, "excerpt": excerpt, "content_hash": h,
552
- "layer": "knowledge", "tags": ["a"]}
553
- e.update(kw)
554
- return e
555
-
556
-
557
- def _clean_meta(**kw):
558
- """合规 meta(理科档 × test 基底)——「干净」必须是真干净,否则 clean 断言无意义。
559
-
560
- `layer="knowledge"`:层门限(真源 = M1 规则库 `matcher.layer`)下,
561
- `role`/`evidence_count` 只在本层检查;缺层节点根本不进判据,clean 断言会空转。
562
- """
563
- m = {"role": "knowledge-card", "tags": ["计算机"], "layer": "knowledge",
564
- "verification_basis": "test",
565
- "importance": 0.5, "evidence_count": 2, "lifecycle_state": "active",
566
- "condition_space": full_cs()}
567
- m.update(kw)
568
- return m
569
-
570
-
571
- def phase_e(tmp):
572
- print("[E] 批量与包")
573
- same = ccg(fn="重复的")
574
- diff = ccg(fn="独一无二的甲")
575
- peers = LC.build_peers([{"node_id": "e1", "content": same},
576
- {"node_id": "e2", "content": same},
577
- {"node_id": "e3", "content": diff}])
578
- ok([p["node_id"] for p in peers["e1"]] == ["e2"]
579
- and [p["node_id"] for p in peers["e2"]] == ["e1"],
580
- "E1 build_peers 同内容指纹互为对照(双向)")
581
- ok(peers["e3"] == [], "E2 内容不同 → 不同组(不是「同批即同组」)")
582
-
583
- t1 = ccg(fn="批次 1 收官", extra="处理 100 条。")
584
- t2 = ccg(fn="批次 2 收官", extra="处理 200 条。")
585
- p2 = LC.build_peers([{"node_id": "e1", "content": t1},
586
- {"node_id": "e2", "content": t2}])
587
- ok([p["node_id"] for p in p2["e1"]] == ["e2"],
588
- "E3 同标题模板骨架 → 互为对照(指纹不同也入组)")
589
- ok(all(p["sk"] for p in p2["e1"]), "E4 对照项携带模板骨架(M1 同源口径)")
590
-
591
- ok(LC.build_peers([]) == {}, "E5 空批 → 空映射(不炸)")
592
- ok("e1" in LC.build_peers([{"node_id": "e1", "content": same}]),
593
- "E6 单条批仍回填键(调用方不必判空)")
594
-
595
- items = [{"node_id": "e1", "content": ccg(fn="干净的"), "meta": _clean_meta()},
596
- {"node_id": "e2", "content": ccg(fn="有问题的"),
597
- "meta": _clean_meta(role="")}]
598
- rep = LC.locate_many(items=items, now=NOW)
599
- ok(rep["nodes"] == 2 and rep["clean"] == ["e1"] and rep["missing"] == [],
600
- "E7 locate_many 报「干净」条(没问题≠没看,clean=%s)" % rep["clean"])
601
- ok(rep["by_kind"].get("missing_field") == 1 and rep["by_field"].get("role") == 1,
602
- "E8 by_kind/by_field 汇总正确(%s / %s)" % (rep["by_kind"], rep["by_field"]))
603
- ok(all(h["node_id"] == "e2" for h in rep["hits"]), "E9 命中归属到正确节点")
604
-
605
- root = mkroot(os.path.join(tmp, "e"), {
606
- "n1": {"content": ccg(fn="盘上节点"), "meta": _clean_meta(role="")},
607
- "n2": {"content": ccg(fn="盘上无问题"), "meta": _clean_meta()},
608
- })
609
- rep2 = LC.locate_many(["n1", "n2", "ghost"], root=root, now=NOW)
610
- ok(rep2["nodes"] == 2 and rep2["missing"] == ["ghost"],
611
- "E10 读不到的节点单列 missing(「没看」≠「没问题」,missing=%s)" % rep2["missing"])
612
- ok(rep2["clean"] == ["n2"], "E11 读盘形态同样分流 clean")
613
- ok(rep2["hits"] and rep2["hits"][0]["field"] == "role",
614
- "E12 读盘形态命中与显式 items 同判据")
615
-
616
- exc9 = ccg(fn="只在摘录里的节点")
617
- pkg = _pkg([_ent("n1", excerpt="摘录里没有特征码", h="过期指纹"),
618
- _ent("p9", excerpt=exc9, h=NF.content_hash(exc9),
619
- **_clean_meta(condition_space={"observation_position": "本地仓",
620
- "time_window": [0.0, 9999999999.0],
621
- "observation_tool": "test"}))])
622
- rep3 = LC.locate_package(pkg, root=root, now=NOW)
623
- ok(rep3["bundle_id"] == "bE" and rep3["entries"] == 2 and rep3["nodes"] == 2,
624
- "E13 locate_package 带包标识与条目计数")
625
- ok(any(h["node_id"] == "n1" for h in rep3["hits"]),
626
- "E14 包内可读节点走读盘正文(准确)")
627
- p9 = [h for h in rep3["hits"] if h["node_id"] == "p9"]
628
- ok(p9 and all(h["field"] == "condition_space" for h in p9)
629
- and exc9[p9[0]["span"][0]:p9[0]["span"][1]].startswith("# 生效条件"),
630
- "E15 文件不可读 → 用包内 excerpt 仍给出正文区间(降级但仍可指,实得 %s)"
631
- % kinds_of(p9))
632
- ok(not [h for h in rep3["hits"] if h["node_id"] == "n1"
633
- and h["issue_kind"] == "dup"],
634
- "E16 excerpt 不冒充正文做重复判定(诚实降级)")
635
-
636
- s = LC.summary(rep3["hits"])
637
- ok(s["total"] == len(rep3["hits"]) and s["nodes"] == len(s["node_ids"])
638
- and s["by_kind"], "E17 summary 汇总口径自洽")
639
- ok(LC.summary([])["total"] == 0 and LC.summary([])["node_ids"] == [],
640
- "E18 空命中 summary 不炸")
641
-
642
- md = LC.markdown_table(rep3["hits"])
643
- ok(md.count("\n") >= len(rep3["hits"]) + 1 and "人工判定" in md,
644
- "E19 markdown_table 逐条一行且留人工判定列")
645
- ok(LC.markdown_table([{"node_id": "x", "issue_kind": "dup", "field": "c",
646
- "span": None, "evidence": "含|竖线"}]).count("\\|") == 1,
647
- "E20 表格竖线转义(不破坏表格结构)")
648
-
649
- code = LC.main(["--root", root, "--node", "n1", "--json"])
650
- ok(code == 0, "E21 CLI --json 退出码 0")
651
- code2 = LC.main(["--root", root, "--node", "n1", "--kind", "missing_field",
652
- "--markdown"])
653
- ok(code2 == 0, "E22 CLI --kind + --markdown 退出码 0")
654
- # 本用例断言「缺 root → fail-closed」,而 locate 的 --root 缺省读环境变量 MDCG_ROOT
655
- # → 环境里存在该变量时用例必假失败(非 hermetic)。故用例内显式清除、用完还原。
656
- _saved_root = os.environ.pop("MDCG_ROOT", None)
657
- try:
658
- ok(LC.main(["--node", "n1"]) == 2, "E23 缺 root → 退出码 2(fail-closed)")
659
- finally:
660
- if _saved_root is not None:
661
- os.environ["MDCG_ROOT"] = _saved_root
662
- ok(LC.main(["--root", root]) == 2, "E24 缺 node → 退出码 2(不静默空跑)")
663
-
664
-
665
- # ---------------------------- F 组:零写入 ----------------------------
666
-
667
- def phase_f(tmp):
668
- print("[F] 零写入")
669
- root = mkroot(os.path.join(tmp, "f"), {
670
- "n1": {"content": ccg(fn="批次 1 收官", extra="处理 100 条。"),
671
- "meta": {"role": "", "tags": ["a"], "importance": 0.5,
672
- "evidence_count": 0, "lifecycle_state": "active",
673
- "condition_space": full_cs(tw=EXPIRED)}},
674
- "n2": {"content": ccg(fn="批次 2 收官", extra="处理 200 条。"),
675
- "meta": {"role": "knowledge-card", "tags": ["语文"],
676
- "importance": 0.5, "evidence_count": 1,
677
- "lifecycle_state": "active",
678
- "condition_space": full_cs()}},
679
- })
680
- before = snapshot(root)
681
- LC.locate_many(["n1", "n2"], root=root, now=NOW)
682
- LC.locate_package(_pkg([_ent("n1"), _ent("n2")]), root=root, now=NOW)
683
- LC.locate("n1", None, root=root, now=NOW)
684
- LC.main(["--root", root, "--node", "n1", "--node", "n2"])
685
- ok(snapshot(root) == before,
686
- "F1 全相位跑完认知图指纹逐字节不变(M3 只读)")
687
- ok(not os.path.exists(os.path.join(root, "_mreview")),
688
- "F2 定位不另立状态目录(无残留)")
689
-
690
-
691
- # ---------------------------- main ----------------------------
692
-
693
- def main(argv=None):
694
- with tempfile.TemporaryDirectory(prefix="mrev_m3_") as tmp:
695
- phase_a(tmp)
696
- phase_b(tmp)
697
- phase_c(tmp)
698
- phase_d(tmp)
699
- phase_e(tmp)
700
- phase_f(tmp)
701
- print("\nM3 自测:%d 通过 / %d 失败 / %d 跳过" % (PASS, FAIL, SKIP))
702
- if FAILS:
703
- print("失败项:")
704
- for f in FAILS:
705
- print(" - %s" % f)
706
- return 1 if FAIL else 0
707
-
708
-
709
- if __name__ == "__main__":
710
- sys.exit(main())
1
+ # -*- coding: utf-8 -*-
2
+ """M3 定位自测(D1 字段级定位):六类定位器 + 契约四键 + 批量/包 + 零写入。
3
+
4
+ 真源:docs/记忆评审系统_立项设计与施工交接_20260915.md §5 D1
5
+ `locate(node_id, issue_hint) -> [{field, span, issue_kind, evidence}]`
6
+
7
+ 纪律(同 test_mr_m1/m2):
8
+ · **自备数据源**——合成节点 + tempfile 合成库,零依赖真源库(外部 clone 全绿)。
9
+ · **零写入实锤**——全部相位跑完后认知图指纹逐字节不变(M3 是只读模块)。
10
+ · **确定性**——同一输入两次调用逐字节一致;`now` 显式传入,不靠墙钟。
11
+ · **不猜**——语义级矛盾归 blindspot(`contradiction_semantic`),不编造字符区间。
12
+
13
+ 覆盖:A 基础工具(纯函数) B 问题面定位器(含字段层门限、指纹不一致成因)+ 观测面
14
+ (observation_aged:观测时刻不是失效声明,**不进告警面**)
15
+ C 提示过滤与 blindspot(含 stale 的**依赖存在性**判据:载体消失/漂移)
16
+ D 契约与确定性 E 批量与包 F 零写入
17
+ 运行:python -m md_cg.test_mr_m3
18
+ """
19
+ from __future__ import annotations
20
+
21
+ import hashlib
22
+ import json
23
+ import os
24
+ import shutil
25
+ import sys
26
+ import tempfile
27
+
28
+ from . import codeindex as CI
29
+ from . import conformance as CF
30
+ from . import nodefile as NF
31
+ from . import writelimit as WL
32
+ from .mreview import locate as LC
33
+
34
+ PASS = FAIL = SKIP = 0
35
+ FAILS = []
36
+
37
+
38
+ def ok(cond, label):
39
+ global PASS, FAIL
40
+ if cond:
41
+ PASS += 1
42
+ else:
43
+ FAIL += 1
44
+ FAILS.append(label)
45
+ print(" FAIL %s" % label)
46
+
47
+
48
+ def skip(label):
49
+ global SKIP
50
+ SKIP += 1
51
+ print(" SKIP %s" % label)
52
+
53
+
54
+ # ---------------------------- 合成库 ----------------------------
55
+
56
+ def ccg(fn="示例节点", *, 生效="载体/位置:本地仓;时间:全时窗(任意时刻成立);方法:test;约束:无",
57
+ sub="a/b", exe="python -m md_cg.demo", ver="test", neg="无", extra=""):
58
+ """六要素齐全的正文(防 `_loc_missing_field` 的 CCG 缺行噪声干扰其它判据)。"""
59
+ return ("# 功能名:%s\n# 生效条件:%s\n# 子功能:%s\n# 执行:%s\n"
60
+ "# 验证方式:%s\n# 不适用条件:%s\n%s" % (fn, 生效, sub, exe, ver, neg, extra))
61
+
62
+
63
+ def full_cs(*, pos="本地仓", tw=(0.0, 9999999999.0), tool="test", con="无"):
64
+ return {"observation_position": pos, "time_window": list(tw),
65
+ "observation_tool": tool, "existence_constraint": con}
66
+
67
+
68
+ def mkroot(root, nodes):
69
+ """合成认知图根:`_index.json` + 节点盘文件(文件文本由 NF.dumps 生成)。"""
70
+ os.makedirs(root, exist_ok=True)
71
+ idx = {}
72
+ for nid, spec in nodes.items():
73
+ fm = dict(spec.get("fm") or {})
74
+ fm.setdefault("id", nid)
75
+ content = spec.get("content") or ""
76
+ rel = spec.get("path") or ("knowledge/%s.md" % nid)
77
+ p = os.path.join(root, rel)
78
+ os.makedirs(os.path.dirname(p), exist_ok=True)
79
+ with open(p, "w", encoding="utf-8") as f:
80
+ f.write(NF.dumps(fm, content))
81
+ meta = dict(spec.get("meta") or {})
82
+ meta.setdefault("path", rel)
83
+ meta.setdefault("layer", spec.get("layer") or "knowledge")
84
+ meta.setdefault("content_hash", NF.content_hash(content))
85
+ meta.update({"id": nid, "path": rel})
86
+ meta["path"] = rel
87
+ idx[nid] = meta
88
+ with open(os.path.join(root, CF.INDEX_FILE), "w", encoding="utf-8") as f:
89
+ json.dump({"nodes": idx}, f, ensure_ascii=False)
90
+ return root
91
+
92
+
93
+ def snapshot(root):
94
+ out = {}
95
+ for dp, _dns, fns in os.walk(root):
96
+ for fn in fns:
97
+ p = os.path.join(dp, fn)
98
+ with open(p, "rb") as f:
99
+ out[os.path.relpath(p, root)] = hashlib.md5(f.read()).hexdigest()
100
+ return out
101
+
102
+
103
+ def kinds_of(hits):
104
+ return sorted({h["issue_kind"] for h in hits})
105
+
106
+
107
+ def fields_of(hits, kind=None):
108
+ return sorted({h["field"] for h in hits if kind is None or h["issue_kind"] == kind})
109
+
110
+
111
+ NOW = 1789000000.0 # 固定「当前时间」(2026-09 量级),不靠墙钟
112
+ EXPIRED = (1000.0, 2000.0)
113
+
114
+
115
+ # ---------------------------- A 组:基础工具 ----------------------------
116
+
117
+ def phase_a(tmp):
118
+ print("[A] 基础工具(纯函数)")
119
+
120
+ c = "第一句。第二句!第三句?第四句;"
121
+ sp = LC.sentence_spans(c)
122
+ ok(len(sp) == 4 and [i for i, _s, _e, _t in sp] == [0, 1, 2, 3],
123
+ "A1 sentence_spans 句索引连续(%s)" % [i for i, _s, _e, _t in sp])
124
+ ok(all(c[s:e] == t for _i, s, e, t in sp), "A2 span 与原文切片逐字对应")
125
+ ok(LC.sentence_spans("") == [] and LC.sentence_spans(" ") == [],
126
+ "A3 空/纯空白正文零句(不编号空句)")
127
+ ok([t for _i, _s, _e, t in LC.sentence_spans("甲。\n乙。")] == ["甲。", "乙。"],
128
+ "A4 换行是句尾且空句不编号(分隔符不残留在句首)")
129
+
130
+ body = ccg(extra="尾句。")
131
+ ms = LC.mark_spans(body)
132
+ ok(set(ms) == set(NF.CCG_MARKS), "A5 mark_spans 六要素全提(实得 %s)" % sorted(ms))
133
+ ok(all(body[s:e].startswith("#") for s, e in ms.values()),
134
+ "A6 要素行 span 覆盖整行")
135
+ ok(LC.mark_spans(ccg() + "# 功能名:第二个\n").get("功能名")
136
+ == LC.mark_spans(ccg()).get("功能名"), "A7 同要素取首次出现(确定性)")
137
+
138
+ text = NF.dumps({"id": "n1", "path": "knowledge/n1.md", "tags": []}, ccg())
139
+ ks = LC.key_line_spans(text)
140
+ ok(ks.get("id", (None, None))[0] == 2, "A8 key_line_spans 行号 1-based(实得 %s)"
141
+ % (ks.get("id") or (None,))[0])
142
+ ok("功能名" not in ks and "---" not in ks,
143
+ "A9 正文 `#` 行与 `---` 分隔线都排除在 frontmatter 之外")
144
+ ok(ks.get("id") and text[ks["id"][1][0]:ks["id"][1][1]].startswith('id:'),
145
+ "A10 键行 span 切片以键名开头")
146
+
147
+ root = mkroot(os.path.join(tmp, "a"), {
148
+ "n1": {"content": ccg(), "meta": {"layer": "knowledge", "tags": ["a"]}},
149
+ "n2": {"content": "短", "path": "", "meta": {"layer": "knowledge"}},
150
+ })
151
+ nd = LC.load_node("n1", root)
152
+ ok(nd and nd["meta"].get("layer") == "knowledge" and "# 功能名:" in (nd["content"] or ""),
153
+ "A11 load_node 取索引 meta + 文件正文")
154
+ ok(nd and nd["fm"].get("id") == "n1", "A12 loads 解析出的 fm 是文件真源")
155
+ ok(LC.load_node("ghost", root) is None, "A13 索引无此节点 → None(不猜路径)")
156
+ ok(LC.load_node("n1", root, index={"nodes": {"n1": {"path": "knowledge/n1.md"}}})
157
+ is not None, "A14 index 可显式注入(不读盘 index)")
158
+ ok(LC._index(root).get("n1") is not None, "A15 _index 兼容 {nodes:…} 形态")
159
+ ok(LC._index(root, index={"n1": {"path": "x"}}) == {"n1": {"path": "x"}},
160
+ "A16 裸 dict 索引原样透传")
161
+
162
+ ok(LC._snippet("甲" * 200, [0, 200]).endswith("…"), "A17 超长片段截断加省略号")
163
+ ok(LC._line_of(text, nd["content"], [0, 5]) == 6,
164
+ "A18 _line_of 定位到正文首行(实得 %s)" % LC._line_of(text, nd["content"], [0, 5]))
165
+ ok(LC._line_of(None, "x", [0, 1]) is None and LC._line_of(text, "不存在", [0, 1]) is None,
166
+ "A19 无 text / 正文不在文件内 → line=None(不编造)")
167
+ ok(LC.canonical_kind("dup_content") == "dup"
168
+ and LC.canonical_kind("template_flow_digits_only") == "template_flow",
169
+ "A20 M1/D1 用词归并到 D1 规范名")
170
+ ok(LC.canonical_kind("天外飞仙") == "天外飞仙", "A21 未知类别原样返回(不假装认路)")
171
+
172
+
173
+ # ---------------------------- B 组:六类定位器 ----------------------------
174
+
175
+ def phase_b(tmp):
176
+ print("[B] 六类定位器")
177
+
178
+ # B1-B6 missing_field
179
+ m = {"id": "b1", "layer": "knowledge", "content_hash": "h1",
180
+ "tags": ["a"], "role": "", "importance": 0.5, "evidence_count": 3,
181
+ "lifecycle_state": "active", "condition_space": full_cs()}
182
+ hits = LC.locate_ex("b1", "missing_field", meta=m, content=ccg(),
183
+ text="", fm={}, peers=[], now=NOW)["hits"]
184
+ ok(fields_of(hits) == ["role"] and all(h["span"] is None for h in hits),
185
+ "B1 字段两处皆空 → missing_field 且 span=None(实得 %s)" % fields_of(hits))
186
+
187
+ m2 = dict(m, evidence_count=0, role="knowledge-card")
188
+ hits = LC.locate_ex("b1", "missing_field", meta=m2, content=ccg(),
189
+ text="", fm={}, peers=[], now=NOW)["hits"]
190
+ ok("evidence_count" in fields_of(hits) and "evidence_zero" in {h["rule"] for h in hits},
191
+ "B2 evidence_count=0 → 专项命中(rule=evidence_zero)")
192
+
193
+ m3 = dict(m, importance=1.7, role="k")
194
+ hits = LC.locate_ex("b1", "missing_field", meta=m3, content=ccg(),
195
+ text="", fm={}, peers=[], now=NOW)["hits"]
196
+ ok("importance" in fields_of(hits) and "field_invalid" in {h["rule"] for h in hits},
197
+ "B3 importance 越界 → 字段存在但不可用")
198
+
199
+ m4 = dict(m, condition_space={"observation_position": "本地"},
200
+ role="k", tags=["a"])
201
+ body = ccg()
202
+ hits = LC.locate_ex("b1", "missing_field", meta=m4, content=body,
203
+ text="", fm={}, peers=[], now=NOW)["hits"]
204
+ h = [x for x in hits if x["field"] == "condition_space"]
205
+ ok(bool(h) and h[0]["span"] is not None
206
+ and body[h[0]["span"][0]:h[0]["span"][1]].startswith("# 生效条件"),
207
+ "B4 四槽不全 → 指向正文「# 生效条件」行(%d/4)"
208
+ % (len(NF.CONDITION_SLOTS) - 3))
209
+
210
+ cut = "# 功能名:只有一行\n正文没有其它要素。\n"
211
+ hits = LC.locate_ex("b1", "missing_field", meta=dict(m, role="k", tags=["a"]),
212
+ content=cut, text="", fm={}, peers=[], now=NOW)["hits"]
213
+ hm = [x for x in hits if x["rule"] == "ccg_incomplete"]
214
+ ok(bool(hm) and hm[0]["field"] == "content" and hm[0]["span"] is None
215
+ and "生效条件" in hm[0]["evidence"],
216
+ "B5 正文缺 CCG 要素行 → field=content 且 span=None(行不存在,不编造区间)")
217
+ ok(not [x for x in LC.locate_ex("b1", "missing_field", meta=m3, content=ccg(),
218
+ text="", fm={}, peers=[], now=NOW)["hits"]
219
+ if x["rule"] == "ccg_incomplete"],
220
+ "B6 要素齐全 → 无 ccg_incomplete 噪声")
221
+
222
+ # B7-B10 weak_source
223
+ hits = LC.locate_ex("b1", "weak_source",
224
+ meta={"verification_basis": "", "tags": ["计算机"]},
225
+ content=ccg(), text="", fm={}, peers=[], now=NOW)["hits"]
226
+ ok(len(hits) == 1 and hits[0]["rule"] == "basis_absent", "B7 基底为空 → basis_absent")
227
+
228
+ hits = LC.locate_ex("b1", "weak_source",
229
+ meta={"verification_basis": "self", "tags": ["计算机"]},
230
+ content=ccg(), text="", fm={}, peers=[], now=NOW)["hits"]
231
+ ok(len(hits) == 1 and hits[0]["rule"] == "basis_enum", "B8 基底越枚举 → basis_enum")
232
+
233
+ hits = LC.locate_ex("b1", "weak_source",
234
+ meta={"verification_basis": "textbook", "tags": ["计算机"]},
235
+ content=ccg(), text="", fm={}, peers=[], now=NOW)["hits"]
236
+ ok(len(hits) == 1 and hits[0]["rule"] == "basis_licensed"
237
+ and "science" in hits[0]["evidence"], "B9 理科×textbook → 赛道不相容(实得 %s)"
238
+ % (hits[0]["evidence"] if hits else "无"))
239
+
240
+ hits = LC.locate_ex("b1", "weak_source",
241
+ meta={"verification_basis": "textbook", "tags": ["语文"]},
242
+ content=ccg(), text="", fm={}, peers=[], now=NOW)["hits"]
243
+ ok(hits == [], "B10 文科×textbook 合规 → 零命中(不误报)")
244
+
245
+ # B11-B12c observation_aged(原「stale」的时间窗口径:**观测时刻不是失效声明**)
246
+ m5 = dict(m, role="k", tags=["a"], condition_space=full_cs(tw=EXPIRED))
247
+ body = ccg()
248
+ hits = LC.locate_ex("b1", "observation_aged", meta=m5, content=body, text="",
249
+ fm={}, peers=[], now=NOW)["hits"]
250
+ ok(len(hits) == 1 and hits[0]["field"] == "condition_space"
251
+ and hits[0]["severity"] == "info" and "观测时刻" in hits[0]["evidence"],
252
+ "B11 时间窗过期 → observation_aged(观测面·info,不冒充失效)")
253
+
254
+ m6 = dict(m5, condition_space=full_cs(tw=(0.0, NF.FULL_TIME_WINDOW_MAX)))
255
+ ok(LC.locate_ex("b1", "observation_aged", meta=m6, content=body, text="", fm={},
256
+ peers=[], now=NOW)["hits"] == [],
257
+ "B12 全时窗是合法声明 → 不判")
258
+
259
+ # B12b-B12c 时间窗来源链(真库口径:索引快照只带 time_window,**无 condition_space 键**)
260
+ m_nocs = {k: v for k, v in m.items() if k != "condition_space"}
261
+ hits = LC.locate_ex("b1", "observation_aged", meta=dict(m_nocs, role="k"),
262
+ content=body, text="",
263
+ fm={"condition_space": full_cs(tw=EXPIRED)}, peers=[],
264
+ now=NOW)["hits"]
265
+ ok(len(hits) == 1 and hits[0]["rule"] == "observation_window_passed",
266
+ "B12b 快照无条件空间 → 回退 fm 真源仍判(实得 %d 条)" % len(hits))
267
+
268
+ hits = LC.locate_ex("b1", "observation_aged",
269
+ meta=dict(m_nocs, role="k", time_window=list(EXPIRED)),
270
+ content=body, text="", fm={}, peers=[], now=NOW)["hits"]
271
+ ok(len(hits) == 1 and hits[0]["rule"] == "observation_window_passed",
272
+ "B12c 快照只带 time_window → 真库口径下仍判")
273
+
274
+ # B12d-B12e **观测面不进评审告警面**(B+C 修正的关键隔离断言)
275
+ hits = LC.locate_ex("b1", None, meta=m5, content=body, text="", fm={},
276
+ peers=[], now=NOW)["hits"]
277
+ ok(all(h["issue_kind"] != "observation_aged" for h in hits),
278
+ "B12d 默认全量定位不含 observation_aged(不进评审告警面)")
279
+ ok("observation_aged" in LC.ADVISORY_KINDS
280
+ and "observation_aged" not in LC.ISSUE_KINDS,
281
+ "B12e observation_aged 归观测面(ADVISORY_KINDS),不占问题面 D1 六类")
282
+
283
+ # C stale —— **依赖存在性**(B+C 修正:时效判定看载体是否还在,不看观测时刻)
284
+ src = tempfile.mkdtemp(prefix="m3src_")
285
+ slines = ["def f():", " return 1", "", "def g():", " return 2"]
286
+ with open(os.path.join(src, "mod.py"), "w", encoding="utf-8") as f:
287
+ f.write("\n".join(slines))
288
+ ref_ok = {"path": "mod.py", "name": "f", "kind": "def", "lineno": 1, "end": 2,
289
+ "lang": "py", "precise": True,
290
+ "hash": CI.region_hash(slines, 1, 2), "root": src}
291
+ hits = LC.locate_ex("c1", "stale", meta={}, content=body, text="",
292
+ fm={"code_ref": dict(ref_ok)}, peers=[], now=NOW)["hits"]
293
+ ok(hits == [], "C1 依赖源文件在且区间哈希吻合 → 零命中(不误报)")
294
+
295
+ hits = LC.locate_ex("c1", "stale", meta={}, content=body, text="",
296
+ fm={"code_ref": dict(ref_ok, hash="000000000000")},
297
+ peers=[], now=NOW)["hits"]
298
+ ok(len(hits) == 1 and hits[0]["rule"] == "ref_stale"
299
+ and hits[0]["field"] == "code_ref",
300
+ "C2 源文件在但区间哈希不符(已漂移)→ stale")
301
+
302
+ hits = LC.locate_ex("c1", "stale", meta={}, content=body, text="",
303
+ fm={"code_ref": dict(ref_ok, path="gone.py")},
304
+ peers=[], now=NOW)["hits"]
305
+ ok(len(hits) == 1 and hits[0]["rule"] == "ref_dangling",
306
+ "C3 依赖源文件不存在(悬空)→ stale(载体消失)")
307
+
308
+ hits = LC.locate_ex("c1", "stale", meta={}, content=body, text="",
309
+ fm={"doc_ref": {"path": "x.md", "lineno": 1, "end": 2,
310
+ "hash": "000000000000"}},
311
+ peers=[], now=NOW)["hits"]
312
+ ok(hits == [], "C4 ref 无 root(判不了)→ 零命中(观测手段不足不冒充失效)")
313
+
314
+ hits = LC.locate_ex("c1", None, meta=m5, content=body, text="",
315
+ fm={"code_ref": dict(ref_ok, path="gone.py")},
316
+ peers=[], now=NOW)["hits"]
317
+ ok(any(h["issue_kind"] == "stale" for h in hits),
318
+ "C5 默认全量定位会跑 stale(依赖存在性属问题面)")
319
+ shutil.rmtree(src, ignore_errors=True)
320
+
321
+ # B13-B14 dup
322
+ same = ccg(fn="重复节点")
323
+ peers = LC.build_peers([{"node_id": "b1", "content": same},
324
+ {"node_id": "b2", "content": same}])
325
+ hits = LC.locate_ex("b1", "dup",
326
+ meta=dict(m, role="k", content_hash=NF.content_hash(same)),
327
+ content=same, text="", fm={}, peers=peers.get("b1"),
328
+ now=NOW)["hits"]
329
+ ok(len(hits) == 1 and hits[0]["field"] == "content_hash"
330
+ and hits[0]["span"] == [0, len(same)] and hits[0]["peer"] == "b2",
331
+ "B13 同内容指纹 → dup 指整篇正文(peer=%s)"
332
+ % (hits[0]["peer"] if hits else "无"))
333
+
334
+ hits = LC.locate_ex("b1", "dup", meta=dict(m, role="k", tags=["a"]),
335
+ content=ccg(fn="甲"), text="", fm={},
336
+ peers=LC.build_peers([{"node_id": "b1", "content": ccg(fn="甲")},
337
+ {"node_id": "b2", "content": ccg(fn="乙")}]
338
+ ).get("b1"), now=NOW)["hits"]
339
+ ok(hits == [], "B14 内容不同 → 不判 dup(不误报)")
340
+
341
+ # B15 template_flow:逐句骨架相同、仅数值不同
342
+ t1 = ccg(fn="批次 1 收官", extra="本批处理 100 条记录,耗用 12 秒。第二句写 200 条。")
343
+ t2 = ccg(fn="批次 2 收官", extra="本批处理 300 条记录,耗用 45 秒。第二句写 400 条。")
344
+ peers2 = LC.build_peers([{"node_id": "b1", "content": t1},
345
+ {"node_id": "b2", "content": t2}])
346
+ hits = LC.locate_ex("b1", "template_flow", meta=dict(m, role="k", tags=["a"]),
347
+ content=t1, text="", fm={}, peers=peers2.get("b1"), now=NOW)["hits"]
348
+ ok(len(hits) >= 2 and all(h["field"] == "content" and h["span"] is not None
349
+ for h in hits),
350
+ "B15 同模板流水 → 逐句给出 span(%d 句命中)" % len(hits))
351
+ ok(all(t1[h["span"][0]:h["span"][1]].strip()[:LC.SNIPPET_MAX] == h["snippet"]
352
+ for h in hits),
353
+ "B16 片段=span 切片去空白截断(与实现同口径,可肉眼复核)")
354
+ ok(hits and hits[0]["sentence"] is not None and hits[0]["peer"] == "b2",
355
+ "B17 携带句索引与对照节点(人工可跳行)")
356
+
357
+ hits = LC.locate_ex("b1", "template_flow", meta=dict(m, role="k", tags=["a"]),
358
+ content=t1, text="", fm={},
359
+ peers=LC.build_peers([{"node_id": "b1", "content": t1}]).get("b1"),
360
+ now=NOW)["hits"]
361
+ ok(hits == [], "B18 无对照节点 → 不判流水")
362
+
363
+ # B19-B21 contradiction(确定性)
364
+ body = ccg()
365
+ hits = LC.locate_ex("b1", "contradiction",
366
+ meta={"content_hash": "declared!", "role": "k", "tags": ["a"]},
367
+ content=body, text="", fm={}, peers=[], now=NOW)["hits"]
368
+ ok(len(hits) == 1 and hits[0]["rule"] == "hash_declared_vs_actual"
369
+ and NF.content_hash(body) in hits[0]["evidence"],
370
+ "B19 索引声明指纹 ≠ 正文实算 → contradiction")
371
+
372
+ hits = LC.locate_ex("b1", "contradiction",
373
+ meta={"content_hash": NF.content_hash(body), "role": "k"},
374
+ content=body, text="", fm={"id": "别的id"}, peers=[],
375
+ now=NOW)["hits"]
376
+ ok(len(hits) == 1 and hits[0]["rule"] == "id_declared_vs_index"
377
+ and hits[0]["field"] == "id", "B20 文件 id ≠ 索引键 → contradiction")
378
+
379
+ hits = LC.locate_ex("b1", "contradiction",
380
+ meta={"content_hash": NF.content_hash(body), "role": "k"},
381
+ content=body, text="", fm={"id": "b1"}, peers=[], now=NOW)["hits"]
382
+ ok(hits == [], "B21 声明与事实一致 → 零命中")
383
+
384
+ # B22-B25 字段层门限(判据同源:派生自 M1 规则库,不另立一份)
385
+ scope = LC.field_layer_scope()
386
+ ok(scope.get("role") == ["knowledge"]
387
+ and scope.get("evidence_count") == ["knowledge"],
388
+ "B22 层门限派生自 rules/*.json 的 matcher.layer(实得 %s)" % scope)
389
+ ok("verification_basis" not in scope,
390
+ "B23 未限层的字段不入表 = 全层适用(M1 R-BASIS-MISSING 无 layer 门限)")
391
+
392
+ hits = LC.locate_ex("b1", "missing_field",
393
+ meta=dict(m, layer="contextual", role="", evidence_count=0,
394
+ tags=[]),
395
+ content=ccg(), text="", fm={}, peers=[], now=NOW)["hits"]
396
+ fld = fields_of(hits)
397
+ ok("role" not in fld and "evidence_count" not in fld,
398
+ "B24 非 knowledge 层 → 限层字段越层不报(与 M1 `_scope` 同口径,实得 %s)" % fld)
399
+ ok("tags" in fld,
400
+ "B25 未限层字段不受门限影响(tags 仍全层检查,实得 %s)" % fld)
401
+
402
+ # B26-B28 指纹不一致的**成因**(同一条命中,两种成因,处置完全不同)
403
+ cause, note = LC.hash_mismatch_cause({"content_hash": "x"}, root=None, path=None)
404
+ ok(cause == "unknown" and "成因未判定" in note,
405
+ "B26 无盘上证据 → cause=unknown(不假装知道成因)")
406
+
407
+ root = mkroot(os.path.join(tmp, "b_lag"), {
408
+ "n1": {"content": body, "meta": {"content_hash": "declared!"}},
409
+ })
410
+ node_f = os.path.join(root, "knowledge", "n1.md")
411
+ idx_f = os.path.join(root, CF.INDEX_FILE)
412
+ mt = os.path.getmtime(node_f)
413
+ os.utime(idx_f, (mt - 60.0, mt - 60.0)) # 索引快照比节点文件旧 60s
414
+ hc = [h for h in LC.locate_ex("n1", "contradiction", root=root, now=NOW)["hits"]
415
+ if h["rule"] == "hash_declared_vs_actual"]
416
+ ok(hc and hc[0]["cause"] == "index_lag" and "快照滞后" in hc[0]["evidence"],
417
+ "B27 文件比索引快照新 → cause=index_lag(正常写路径现象,实得 %s)"
418
+ % (hc[0]["cause"] if hc else "无命中"))
419
+
420
+ os.utime(idx_f, (mt + 60.0, mt + 60.0)) # 索引快照不旧于节点文件
421
+ hc = [h for h in LC.locate_ex("n1", "contradiction", root=root, now=NOW)["hits"]
422
+ if h["rule"] == "hash_declared_vs_actual"]
423
+ ok(hc and hc[0]["cause"] == "true_mismatch" and "真源相抵触" in hc[0]["evidence"],
424
+ "B28 索引快照不旧于文件 → cause=true_mismatch(需查,实得 %s)"
425
+ % (hc[0]["cause"] if hc else "无命中"))
426
+
427
+
428
+ # ---------------------------- C 组:提示过滤与 blindspot ----------------------------
429
+
430
+ def _mixed():
431
+ """同时命中多类的节点:role 空 + 四槽不全(missing_field)+ 指纹不符(contradiction)。
432
+
433
+ `condition_space` 刻意只声明 1 槽——让 D 组同时存在「可指区间」(`# 生效条件` 行)
434
+ 与「无区间」(frontmatter 声明类)两种命中,契约两侧都被覆盖。
435
+ 基底取 `textbook` + `语文`(文科档)——让 `weak_source` 真的干净,
436
+ C 组才能验证「该类无问题就返回空、不借机报别的类」。
437
+ """
438
+ body = ccg()
439
+ return dict({"content_hash": "declared!", "role": "", "tags": ["语文"],
440
+ "layer": "knowledge", "verification_basis": "textbook",
441
+ "importance": 0.5, "evidence_count": 3, "lifecycle_state": "active",
442
+ "condition_space": {"observation_position": "本地仓"}}), body
443
+
444
+
445
+ def phase_c(tmp):
446
+ print("[C] 提示过滤与 blindspot")
447
+ m, body = _mixed()
448
+ kw = dict(meta=m, content=body, text="", fm={}, peers=[], now=NOW)
449
+
450
+ all_hits = LC.locate_ex("c1", None, **kw)["hits"]
451
+ ok({"missing_field", "contradiction"} <= set(kinds_of(all_hits)),
452
+ "C1 hint=None → 全量定位(实得 %s)" % kinds_of(all_hits))
453
+
454
+ only = LC.locate_ex("c1", "weak_source", **kw)["hits"]
455
+ ok(all(h["issue_kind"] == "weak_source" for h in only),
456
+ "C2 hint=类别 → 只跑该类(实得 %s)" % kinds_of(only))
457
+ ok(only == [], "C3 该类无问题 → 空(不借机报别的类)")
458
+
459
+ by_field = LC.locate_ex("c1", "role", **kw)["hits"]
460
+ ok(by_field and all(h["field"] == "role" for h in by_field),
461
+ "C4 hint=字段名 → 按字段过滤全量结果(实得 %s)" % fields_of(by_field))
462
+
463
+ both = LC.locate_ex("c1", {"issue_kind": "missing_field", "field": "role"}, **kw)["hits"]
464
+ ok(both and len(both) == len(by_field), "C5 dict 形态 hint 同时收类别与字段")
465
+
466
+ lst = LC.locate_ex("c1", ["contradiction", "missing_field"], **kw)["hits"]
467
+ ok(len(lst) == len(all_hits)
468
+ and set(kinds_of(lst)) == {"contradiction", "missing_field"}
469
+ and LC.locate_ex("c1", ["contradiction", {"field": "role"}], **kw)["hits"] == [],
470
+ "C6 list 形态 hint 收集多个类别;类别与字段是收窄关系(交集空即空,不退回全量)"
471
+ "(实得 %d 条 %s)" % (len(lst), kinds_of(lst)))
472
+
473
+ ex = LC.locate_ex("c1", "contradiction_semantic", **kw)
474
+ ok(ex["hits"] == [] and ex["blindspot"] and "语义" in ex["blindspot"][0],
475
+ "C7 语义级矛盾 → blindspot 且零 hits(不猜、不编造区间)")
476
+ ok(ex["blindspot"] == LC.locate_ex("c1", "contradiction_semantic", **kw)["blindspot"],
477
+ "C8 blindspot 文本确定(可断言)")
478
+
479
+ ex2 = LC.locate_ex("c1", ["contradiction_semantic", "missing_field"], **kw)
480
+ ok(ex2["blindspot"] and ex2["hits"]
481
+ and all(h["issue_kind"] == "missing_field" for h in ex2["hits"]),
482
+ "C9 blindspot 与可定位类别同批共存(互不吞没)")
483
+
484
+ unk = LC.locate_ex("c1", "天外飞仙", **kw)
485
+ ok(unk["hits"] == [] and unk["blindspot"] == [],
486
+ "C10 未知提示 → 当字段过滤后为空,不炸也不假装认路")
487
+
488
+ alias = LC.locate_ex("c1", "dup_content", **kw)["hits"]
489
+ ok(all(h["issue_kind"] == "dup" for h in alias) and bool(alias) is False,
490
+ "C11 M1 用词 dup_content 归并为 dup(无重复故空)")
491
+
492
+ ok(LC.blindspot_reason("contradiction") == "" and
493
+ LC.blindspot_reason("contradiction_semantic") != "",
494
+ "C12 blindspot_reason 单一归口(可定位类别返回空串)")
495
+
496
+
497
+ # ---------------------------- D 组:契约与确定性 ----------------------------
498
+
499
+ def phase_d(tmp):
500
+ print("[D] 契约与确定性")
501
+ m, body = _mixed()
502
+ kw = dict(meta=m, content=body, text="", fm={}, peers=[], now=NOW)
503
+ hits = LC.locate("d1", None, **kw)
504
+
505
+ ok(isinstance(hits, list), "D1 locate() 契约入口返回 list")
506
+ ok(all({"field", "span", "issue_kind", "evidence"} <= set(h) for h in hits),
507
+ "D2 四键齐备(实得 %s)" % (sorted(hits[0]) if hits else "无命中"))
508
+ ok(all(h["issue_kind"] in LC.ISSUE_KINDS for h in hits),
509
+ "D3 issue_kind 全落 D1 枚举(实得 %s)" % kinds_of(hits))
510
+ ok(all(str(h["evidence"]).strip() for h in hits),
511
+ "D4 evidence 非空(白箱判据:为何算问题)")
512
+
513
+ sp = [h for h in hits if h["span"] is not None]
514
+ ok(all(isinstance(h["span"], list) and len(h["span"]) == 2
515
+ and h["span"][0] < h["span"][1] and h["span"][1] <= len(body) for h in sp),
516
+ "D5 span 是正文内的半开区间 [start,end)")
517
+ ok(all(isinstance(h["span"][0], int) and isinstance(h["span"][1], int) for h in sp),
518
+ "D6 span 端点为整数(可复算切片)")
519
+ ok(all(body[h["span"][0]:h["span"][1]].strip() != "" for h in sp),
520
+ "D7 span 指向非空片段")
521
+ ok(all(h.get("snippet") != "" for h in sp),
522
+ "D8 有 span 即有片段(人工核对可肉眼确认)")
523
+ ok(all(not h.get("snippet") for h in hits if h["span"] is None),
524
+ "D9 声明类命中无区间 → 片段为空(不编造区间)")
525
+
526
+ h2 = LC.locate("d1", None, **kw)
527
+ ok(json.dumps(hits, ensure_ascii=False) == json.dumps(h2, ensure_ascii=False),
528
+ "D10 同一输入两次调用逐字节一致(确定性)")
529
+ ok(LC.locate_ex("d1", None, **kw)["load"]["content_len"] == len(body),
530
+ "D11 load 回报正文长度(审计留痕)")
531
+
532
+ key = [(h["issue_kind"], str(h["field"])) for h in hits]
533
+ ok(key == sorted(key), "D12 命中按 (issue_kind, field, span, peer) 稳定排序(实得 %s)" % key)
534
+
535
+ try:
536
+ LC.locate_ex("d1", None, meta=m, content=None, text="", fm={}, peers=[], now=NOW)
537
+ raised = False
538
+ except ValueError:
539
+ raised = True
540
+ ok(raised, "D13 无正文且无 root → fail-closed 报错(不假装能定位)")
541
+
542
+
543
+ # ---------------------------- E 组:批量与包 ----------------------------
544
+
545
+ def _pkg(entries, bid="bE"):
546
+ return {"bundle_id": bid, "group_kind": "batch", "group_key": "g",
547
+ "size": len(entries), "entries": entries}
548
+
549
+
550
+ def _ent(nid, *, excerpt="", h="", **kw):
551
+ e = {"ref": nid, "node_id": nid, "excerpt": excerpt, "content_hash": h,
552
+ "layer": "knowledge", "tags": ["a"]}
553
+ e.update(kw)
554
+ return e
555
+
556
+
557
+ def _clean_meta(**kw):
558
+ """合规 meta(理科档 × test 基底)——「干净」必须是真干净,否则 clean 断言无意义。
559
+
560
+ `layer="knowledge"`:层门限(真源 = M1 规则库 `matcher.layer`)下,
561
+ `role`/`evidence_count` 只在本层检查;缺层节点根本不进判据,clean 断言会空转。
562
+ """
563
+ m = {"role": "knowledge-card", "tags": ["计算机"], "layer": "knowledge",
564
+ "verification_basis": "test",
565
+ "importance": 0.5, "evidence_count": 2, "lifecycle_state": "active",
566
+ "condition_space": full_cs()}
567
+ m.update(kw)
568
+ return m
569
+
570
+
571
+ def phase_e(tmp):
572
+ print("[E] 批量与包")
573
+ same = ccg(fn="重复的")
574
+ diff = ccg(fn="独一无二的甲")
575
+ peers = LC.build_peers([{"node_id": "e1", "content": same},
576
+ {"node_id": "e2", "content": same},
577
+ {"node_id": "e3", "content": diff}])
578
+ ok([p["node_id"] for p in peers["e1"]] == ["e2"]
579
+ and [p["node_id"] for p in peers["e2"]] == ["e1"],
580
+ "E1 build_peers 同内容指纹互为对照(双向)")
581
+ ok(peers["e3"] == [], "E2 内容不同 → 不同组(不是「同批即同组」)")
582
+
583
+ t1 = ccg(fn="批次 1 收官", extra="处理 100 条。")
584
+ t2 = ccg(fn="批次 2 收官", extra="处理 200 条。")
585
+ p2 = LC.build_peers([{"node_id": "e1", "content": t1},
586
+ {"node_id": "e2", "content": t2}])
587
+ ok([p["node_id"] for p in p2["e1"]] == ["e2"],
588
+ "E3 同标题模板骨架 → 互为对照(指纹不同也入组)")
589
+ ok(all(p["sk"] for p in p2["e1"]), "E4 对照项携带模板骨架(M1 同源口径)")
590
+
591
+ ok(LC.build_peers([]) == {}, "E5 空批 → 空映射(不炸)")
592
+ ok("e1" in LC.build_peers([{"node_id": "e1", "content": same}]),
593
+ "E6 单条批仍回填键(调用方不必判空)")
594
+
595
+ items = [{"node_id": "e1", "content": ccg(fn="干净的"), "meta": _clean_meta()},
596
+ {"node_id": "e2", "content": ccg(fn="有问题的"),
597
+ "meta": _clean_meta(role="")}]
598
+ rep = LC.locate_many(items=items, now=NOW)
599
+ ok(rep["nodes"] == 2 and rep["clean"] == ["e1"] and rep["missing"] == [],
600
+ "E7 locate_many 报「干净」条(没问题≠没看,clean=%s)" % rep["clean"])
601
+ ok(rep["by_kind"].get("missing_field") == 1 and rep["by_field"].get("role") == 1,
602
+ "E8 by_kind/by_field 汇总正确(%s / %s)" % (rep["by_kind"], rep["by_field"]))
603
+ ok(all(h["node_id"] == "e2" for h in rep["hits"]), "E9 命中归属到正确节点")
604
+
605
+ root = mkroot(os.path.join(tmp, "e"), {
606
+ "n1": {"content": ccg(fn="盘上节点"), "meta": _clean_meta(role="")},
607
+ "n2": {"content": ccg(fn="盘上无问题"), "meta": _clean_meta()},
608
+ })
609
+ rep2 = LC.locate_many(["n1", "n2", "ghost"], root=root, now=NOW)
610
+ ok(rep2["nodes"] == 2 and rep2["missing"] == ["ghost"],
611
+ "E10 读不到的节点单列 missing(「没看」≠「没问题」,missing=%s)" % rep2["missing"])
612
+ ok(rep2["clean"] == ["n2"], "E11 读盘形态同样分流 clean")
613
+ ok(rep2["hits"] and rep2["hits"][0]["field"] == "role",
614
+ "E12 读盘形态命中与显式 items 同判据")
615
+
616
+ exc9 = ccg(fn="只在摘录里的节点")
617
+ pkg = _pkg([_ent("n1", excerpt="摘录里没有特征码", h="过期指纹"),
618
+ _ent("p9", excerpt=exc9, h=NF.content_hash(exc9),
619
+ **_clean_meta(condition_space={"observation_position": "本地仓",
620
+ "time_window": [0.0, 9999999999.0],
621
+ "observation_tool": "test"}))])
622
+ rep3 = LC.locate_package(pkg, root=root, now=NOW)
623
+ ok(rep3["bundle_id"] == "bE" and rep3["entries"] == 2 and rep3["nodes"] == 2,
624
+ "E13 locate_package 带包标识与条目计数")
625
+ ok(any(h["node_id"] == "n1" for h in rep3["hits"]),
626
+ "E14 包内可读节点走读盘正文(准确)")
627
+ p9 = [h for h in rep3["hits"] if h["node_id"] == "p9"]
628
+ ok(p9 and all(h["field"] == "condition_space" for h in p9)
629
+ and exc9[p9[0]["span"][0]:p9[0]["span"][1]].startswith("# 生效条件"),
630
+ "E15 文件不可读 → 用包内 excerpt 仍给出正文区间(降级但仍可指,实得 %s)"
631
+ % kinds_of(p9))
632
+ ok(not [h for h in rep3["hits"] if h["node_id"] == "n1"
633
+ and h["issue_kind"] == "dup"],
634
+ "E16 excerpt 不冒充正文做重复判定(诚实降级)")
635
+
636
+ s = LC.summary(rep3["hits"])
637
+ ok(s["total"] == len(rep3["hits"]) and s["nodes"] == len(s["node_ids"])
638
+ and s["by_kind"], "E17 summary 汇总口径自洽")
639
+ ok(LC.summary([])["total"] == 0 and LC.summary([])["node_ids"] == [],
640
+ "E18 空命中 summary 不炸")
641
+
642
+ md = LC.markdown_table(rep3["hits"])
643
+ ok(md.count("\n") >= len(rep3["hits"]) + 1 and "人工判定" in md,
644
+ "E19 markdown_table 逐条一行且留人工判定列")
645
+ ok(LC.markdown_table([{"node_id": "x", "issue_kind": "dup", "field": "c",
646
+ "span": None, "evidence": "含|竖线"}]).count("\\|") == 1,
647
+ "E20 表格竖线转义(不破坏表格结构)")
648
+
649
+ code = LC.main(["--root", root, "--node", "n1", "--json"])
650
+ ok(code == 0, "E21 CLI --json 退出码 0")
651
+ code2 = LC.main(["--root", root, "--node", "n1", "--kind", "missing_field",
652
+ "--markdown"])
653
+ ok(code2 == 0, "E22 CLI --kind + --markdown 退出码 0")
654
+ # 本用例断言「缺 root → fail-closed」,而 locate 的 --root 缺省读环境变量 MDCG_ROOT
655
+ # → 环境里存在该变量时用例必假失败(非 hermetic)。故用例内显式清除、用完还原。
656
+ _saved_root = os.environ.pop("MDCG_ROOT", None)
657
+ try:
658
+ ok(LC.main(["--node", "n1"]) == 2, "E23 缺 root → 退出码 2(fail-closed)")
659
+ finally:
660
+ if _saved_root is not None:
661
+ os.environ["MDCG_ROOT"] = _saved_root
662
+ ok(LC.main(["--root", root]) == 2, "E24 缺 node → 退出码 2(不静默空跑)")
663
+
664
+
665
+ # ---------------------------- F 组:零写入 ----------------------------
666
+
667
+ def phase_f(tmp):
668
+ print("[F] 零写入")
669
+ root = mkroot(os.path.join(tmp, "f"), {
670
+ "n1": {"content": ccg(fn="批次 1 收官", extra="处理 100 条。"),
671
+ "meta": {"role": "", "tags": ["a"], "importance": 0.5,
672
+ "evidence_count": 0, "lifecycle_state": "active",
673
+ "condition_space": full_cs(tw=EXPIRED)}},
674
+ "n2": {"content": ccg(fn="批次 2 收官", extra="处理 200 条。"),
675
+ "meta": {"role": "knowledge-card", "tags": ["语文"],
676
+ "importance": 0.5, "evidence_count": 1,
677
+ "lifecycle_state": "active",
678
+ "condition_space": full_cs()}},
679
+ })
680
+ before = snapshot(root)
681
+ LC.locate_many(["n1", "n2"], root=root, now=NOW)
682
+ LC.locate_package(_pkg([_ent("n1"), _ent("n2")]), root=root, now=NOW)
683
+ LC.locate("n1", None, root=root, now=NOW)
684
+ LC.main(["--root", root, "--node", "n1", "--node", "n2"])
685
+ ok(snapshot(root) == before,
686
+ "F1 全相位跑完认知图指纹逐字节不变(M3 只读)")
687
+ ok(not os.path.exists(os.path.join(root, "_mreview")),
688
+ "F2 定位不另立状态目录(无残留)")
689
+
690
+
691
+ # ---------------------------- main ----------------------------
692
+
693
+ def main(argv=None):
694
+ with tempfile.TemporaryDirectory(prefix="mrev_m3_") as tmp:
695
+ phase_a(tmp)
696
+ phase_b(tmp)
697
+ phase_c(tmp)
698
+ phase_d(tmp)
699
+ phase_e(tmp)
700
+ phase_f(tmp)
701
+ print("\nM3 自测:%d 通过 / %d 失败 / %d 跳过" % (PASS, FAIL, SKIP))
702
+ if FAILS:
703
+ print("失败项:")
704
+ for f in FAILS:
705
+ print(" - %s" % f)
706
+ return 1 if FAIL else 0
707
+
708
+
709
+ if __name__ == "__main__":
710
+ sys.exit(main())