Repository navigation
feat: add capabilities and overview commands to cut agent probe calls - #154
Merged
Merged
Conversation
codeasier
commented
Sep 19, 2026
codeasier
left a comment
Owner
Author
There was a problem hiding this comment.
交叉评审结论(3 位独立评审 + 裁决核验)
3 位评审员(qwen3.8-flash / deepseek-v4.1-flash / muse-spark-1.3-contributor)全部完成,全部候选发现已逐条对照 PR 头快照证据核验。无严重/高危发现;5 个低危发现存活,均以行内评论标注:
capabilities缺少失败信封(SkillCatalogError→ traceback)overview设备边界路径可泄漏原始ValueError/sqlite3.OperationalErrorpreexisting_live在event_id <= -2时把 static 块计入,违反自身谓词等价声明SnapshotAnalyzer.get_database_overview遗漏FocusFileInvalidError映射- 模板契约序列化器三份平行副本,无
--template-info交叉校验
其余核验通过:两命令均只读(mode=ro,无 focus 持久化)、模板 SQL 无注入面、preexisting_live / freed_block_lifetime 在正常输入下与被替换的旧逻辑等价、skill 仓库版与打包版字节一致、en/zh 文档同步更新。
遗留缺口:PR 自述未跑 basedpyright 与完整 pytest(checklist 两项未勾选),合并前建议补齐;overview 的 DATABASE_NOT_FOUND / DATABASE_SCHEMA_INVALID / FOCUS_FILE_INVALID 错误信封路径目前无测试。
注:本评审由并行多模型交叉评审产生,增加了 token 用量与成本。
Owner
Author
交叉评审跟进:a4d137e 全部核验通过5 个低危发现已在 a4d137e 逐一对照源码核验,并在各评论线程回复确认。验证方式:检出 a4d137e 后本地运行——
补充确认: |
added 2 commits
September 19, 2026 19:59
Give agents one-shot catalog and read-only database orientation so leak diagnosis no longer needs per-template --template-info or sqlite3 CLI fallbacks. Fixes #142
codeasier
force-pushed
the
feat/issue-142-capability-overview
branch
from
September 19, 2026 12:00
a4d137e to
2fbf5cb
Compare
11 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Add two read-only discovery commands so agents can stop probing templates one by one and stop shelling out to
sqlite3:pt-snap capabilities— CLI version, full template/parameter contracts (including field semantics), and skill listingpt-snap overview [database.db]— device list, per-device first/last event id, import-metadata statusBoth
--jsonpaths reuse the existing success/error envelope. New packaged templatespreexisting_liveandfreed_block_lifetimereplace the leak skill's sqlite3 fallbacks. Leak prerequisite probes drop from 7 calls to 2 (capabilities+overview). Helper routes overview-first, then diagnose; it still does not auto-install, import pickle, or persist focus.🔗 Related Issue
Fixes #142
Related to the Agent-friendly parent roadmap (issue 136) only. This slice must not auto-close that parent.
🧪 Testing
PYTHONPATH=src:tests/test_cli.py tests/test_cli_json.py tests/test_contract_cli_api.py tests/query/ tests/skills/test_helper_contract.py tests/test_api.pyplus new service/template/leak files — 421 passedruff checkandblack --checkon touched Python pathsbasedpyrightpytestsuite✅ Checklist
Snapshot Runtime Provenance
Snapshot provenance decision: no-update
Snapshot provenance no-update reason: This PR adds CLI discovery commands, core services, query templates, skills, tests, and docs. It does not modify
src/pt_snap_cli/snapshot/**.📋 Additional Notes
[0.5.0] - Unreleasedonly.git merge-treereports content conflicts only inskills/pt-snap-memory-leak/SKILL.mdand its bundled copy. Other shared files (includingcli.py) merge cleanly. Rebase after one of the two lands.