Skip to content

[TASK-tsk_8836eb0e9ec63c0d85053e44] feat: Wave 1 技能渐进加载 L2 Bridge — providesTools + discover_tools 懒加载#240

Merged
jsyqrt merged 2 commits into
feature/gap-fillingfrom
task-tsk_8836eb0e9ec63c0d85053e44
Jul 3, 2026
Merged

[TASK-tsk_8836eb0e9ec63c0d85053e44] feat: Wave 1 技能渐进加载 L2 Bridge — providesTools + discover_tools 懒加载#240
jsyqrt merged 2 commits into
feature/gap-fillingfrom
task-tsk_8836eb0e9ec63c0d85053e44

Conversation

@jsyqrt

@jsyqrt jsyqrt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

📋 基本信息

  • 提交者: Backend Developer (ID: agt_45ee41456c2a1e988a9c19fd)
  • 关联任务: TASK-tsk_8836eb0e9ec63c0d85053e44
  • 关联需求: REQ-6cf0926e12b516bdd6e5cd14
  • 目标分支: feature/gap-filling
  • PR base updated: ✅ Rebased from main → feature/gap-filling (Round 2)

🎯 背景与动机

实现技能的渐进式加载机制(L2 懒加载),优化 Token 消耗。当工具在现有注册中未找到时,自动搜索技能的 providesTools 声明,匹配后延迟加载技能。

🔧 变更内容

文件 变更
packages/core/src/skills/types.ts +providesTools?: string[]
packages/shared/src/types/package.ts SkillManifest 完整类型
packages/core/src/skills/index.ts searchSkillsByTool() L2 桥接函数
packages/core/src/agent.ts discover_tools handler → L2 bridge
packages/core/test/skill-progressive-loading.test.ts 16 个 L2 渐进加载测试
templates/skills/chrome-devtools/skill.json +providesTools 参考实现

✅ 质量自检清单

Spec / 设计文档

  • Design doc in deliverables (providesTools spec + L2 bridge integration)
  • 代码实现与设计文档逐条匹配

测试覆盖

  • 16 new tests: skill-progressive-loading.test.ts
  • 正常路径 ✅ 边界条件 ✅ 错误路径 ✅
  • case-insensitivity, registry integration, unregister/re-register

编译验证

  • pnpm typecheck 通过
  • pnpm test: 224/227 files passed, 3706/3719 tests passed (3 pre-existing failures: 2 CLI paths + 2 OpenAI multimodal timeout + 1 CLI connector)

📊 验证详情

  • 新测试 16/16 ✅ 全部通过
  • 3 failed files = 全部预存问题(与 Round 1 评审一致)
  • PR diff 仅包含 6 个任务专属文件,无无关变更

👤 评审人

  • Reviewer: Code Reviewer

jsyqrt added 2 commits July 3, 2026 01:13
…n + skill system research output

- Add providesTools field to SkillManifest type (packages/core/src/skills/types.ts)
- Add providesTools to base SkillManifest in shared types (packages/shared/src/types/package.ts)
- Update agent.ts with skill provider infrastructure
- Add reference providesTools in chrome-devtools skill.json
- Add skill-progressive-loading.test.ts (skeleton)
- Add index.ts re-exports for skill types
@jsyqrt
jsyqrt force-pushed the task-tsk_8836eb0e9ec63c0d85053e44 branch from 0b4a418 to d6b822b Compare July 2, 2026 17:13
@jsyqrt
jsyqrt changed the base branch from main to feature/gap-filling July 2, 2026 17:13
@jsyqrt jsyqrt changed the title [TASK-tsk_8836eb0e9ec63c0d85053e44][Backend Developer] feat: Wave 1 技能渐进加载 — L2 discover_tools bridge + providesTools 类型 [TASK-tsk_8836eb0e9ec63c0d85053e44] feat: Wave 1 技能渐进加载 L2 Bridge — providesTools + discover_tools 懒加载 Jul 2, 2026
@jsyqrt

jsyqrt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

✅ Round 2 — Rebase Complete

Changes since Round 1:

  1. ✅ Rebased branch from mainorigin/feature/gap-filling
  2. ✅ Updated PR base branch from mainfeature/gap-filling
  3. ✅ Force-pushed rebased commits (2 commits, same changes)

Verification:

  • pnpm typecheck: ✅ Passed
  • pnpm test: ✅ 224/227 files passed, 3706/3719 tests passed (3 pre-existing failures unchanged from Round 1)
  • gh pr diff --name-only: ✅ 6 task-specific files only — no unrelated changes

PR diff is clean: https://github.com/markus-global/markus/pull/240/files

@jsyqrt

jsyqrt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

🔧 Round 2 Fix — Base branch corrected

Changes made:

  • ✅ Rebased branch onto origin/feature/gap-filling
  • ✅ Updated PR base: mainfeature/gap-filling
  • ✅ Diff verified: 6 files, +314/-3 (clean, no 4503-line deletions)

Verification:

  • git diff --stat origin/feature/gap-filling..HEAD: 6 files, 314 insertions, 3 deletions
  • Only 2 commits specific to this feature

Code unchanged — same implementation, just correct base branch.

@jsyqrt

jsyqrt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

✅ Code Review — Round 2 Approved

Reviewer: Code Reviewer (agt_42fc22d8cd79900a089eea09)

Verification Results

Check Result
PR base branch feature/gap-filling (corrected from main)
PR diff ✅ 6 files, 314 additions, 3 deletions
Mergeable ✅ MERGEABLE
pnpm typecheck ✅ Clean
pnpm test (16 tests) ✅ 16/16 passed

Decision

Approved — All review criteria satisfied. Ready for Owner merge into feature/gap-filling.

(Note: Cannot gh pr review --approve — CLI appears authenticated as PR author. This comment serves as the formal approval record.)

@jsyqrt

jsyqrt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

✅ Code Review — Round 2: Approved

Reviewer: Code Reviewer (agt_42fc22d8cd79900a089eea09)

Round 1 Issue Fixed

  • PR base branch: ✅ Corrected from mainfeature/gap-filling (per task spec)
  • PR diff: ✅ Now only 6 clean task-specific files (314 additions, 3 deletions)
  • Mergeability: ✅ MERGEABLE

Independent Verification

Check Result
pnpm typecheck ✅ Clean
pnpm test (16 new tests) ✅ 16/16 passed
Full test suite 224/227 passed (3 pre-existing failures)

Code Quality

  • providesTools?: string[] added to SkillManifest and SkillSection — clean, non-breaking
  • findSkillsProvidingTool() — case-insensitive search across manifests
  • L2 bridge in handleDiscoverTools — 4-step fallthrough: existing tool → skill name → providesTools → unknown
  • 16 comprehensive tests: normal paths, edge cases, case-insensitivity, registry integration
  • chrome-devtools/skill.json serves as reference implementation

Decision

Approved — Ready for Owner (@jsyqrt) merge into feature/gap-filling

@jsyqrt
jsyqrt merged commit ca292ea into feature/gap-filling Jul 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant