Skip to main content

技能链路由引擎 — three-layer skill routing with SAD feedback and DAG composition

Project description

Changelog — Skill Weave Iteration

All notable changes to the Skill Weave project are documented in this file.

The format is based on Keep a Changelog.


[Phase 4] — 2026-07-08 — 通用化去耦合

Added

  • circuit_breaker.py — 纯 stdlib 实现的 CircuitBreaker 状态机(CLOSED/OPEN/HALF_OPEN),8 个公开方法完全兼容原 skill_weave 接口
  • telemetry.py — 纯 stdlib 实现的 Telemetry JSONL 日志器,6 个公开方法(start_span/end_span/log_event/read_logs/stats/span),支持自动日志轮转
  • tfidf_embedder.py — HashEmbedder 轻量文本嵌入(djb2 哈希 + 字符 n-gram + 128 维 + L2 归一化),作为无外部嵌入模型时的 dense fallback
  • chains.json / chains.yaml — 链定义配置文件,支持 JSON/YAML 两种格式,用户可通过编辑配置文件添加自定义链
  • weave_chains.py 新增 _load_config() 函数,模块加载时自动读取 chains.json,不存在则回退到硬编码默认值
  • semantic_retriever.py 新增 _postprocess_ascii_abbrevs() 后处理函数,从中英混合 token 中分离 ASCII 技术缩写(LoRA/BERT/GPT 等)
  • _ASCII_ABBREVS 集合:70+ 常见技术缩写词表

Changed

  • weave_chains.py 导入改为本地模块:from circuit_breaker import CircuitBreaker / from telemetry import Telemetry,不再依赖 skill_weave 包的 CircuitBreaker/Telemetry
  • init_phase3()embed_fn=None 时自动创建 TF-IDF HashEmbedder 并重建 SemanticRetriever,确保 dense 检索始终可用
  • tokenize() 函数所有模式(jieba/fmm/bigram)统一应用 ASCII 缩写后处理

Renamed (去 Hermes 化)

  • hermes-ui-designui-design-system
  • hallmarkanti-ai-design
  • memory-maintenancememory-concierge

Fixed

  • Phase 3 SADFeedback bug: confidence_threshold 从 3.0 降到 2.0,单触发词匹配(score=2)不再触发不必要的 SAD 校正
  • Phase 3 SADFeedback bug: 添加链切换保护,新链 score 未超过原链 +1.0 时保持原链

Performance

  • Recall@10 从 93.94%(31/33)提升到 96.97%(32/33),TF-IDF 密集嵌入有效提升混合检索质量

Test Results

  • Phase 3 集成测试:42/42 通过
  • 基准路由测试:31/31 = 100%
  • v0.4 集成测试:12/12 通过

Deliverables (6 files)

  1. circuit_breaker.py — CircuitBreaker + CircuitState
  2. telemetry.py — Telemetry + RouteSpan
  3. tfidf_embedder.py — HashEmbedder + create_embed_fn
  4. semantic_retriever.py — 含 ASCII 缩写后处理
  5. weave_chains.py — 含 config loader + TF-IDF 集成 + 本地导入
  6. chains.yaml — 人类可读的链配置文件

[Phase 3] — 2026-07-08 — SAD 反馈闭环和语义检索

Added

  • semantic_retriever.py — FMM 分词器 + BM25 SparseIndex + 混合 SemanticRetriever(jieba/FMM/bigram 三级降级)
  • sad_feedback.py — SADFeedback 迭代权重校正闭环
  • dag_composer.py — TaskDecomposer + DAGComposer + DAGPlan
  • weave_chains.py 新增 init_phase3() / route_task_v3() / compose_task()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skill_weave_chains-0.1.0.tar.gz (40.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skill_weave_chains-0.1.0-py3-none-any.whl (37.1 kB view details)

Uploaded Python 3

File details

Details for the file skill_weave_chains-0.1.0.tar.gz.

File metadata

  • Download URL: skill_weave_chains-0.1.0.tar.gz
  • Upload date:
  • Size: 40.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for skill_weave_chains-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0aa1919e60775de493dceca976316300fb5a030d606c9a9414e4ec9ab67c922a
MD5 3d82c94a7956219684d37d0583b50ebb
BLAKE2b-256 969966cbfb93db6367c201bae6287a0db4717b3fc984f99a10d065947ae883d7

See more details on using hashes here.

File details

Details for the file skill_weave_chains-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for skill_weave_chains-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10a10f9e7777051b614cbfbf56e33833c5fe1cc904e808cb6246e2f17f6e9090
MD5 074edb21bb0bf602627db4bb082642e8
BLAKE2b-256 345fdd2ba6f8d06610c127fb98c3f17748536248bbd29fd0e9d359a00e932144

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page