Skip to content

docs: add architecture-oriented AGENTS.md hierarchy - #111

Closed
codeasier wants to merge 1 commit into
mainfrom
docs/agents-md
Closed

codeasier wants to merge 1 commit into
mainfrom
docs/agents-md

Conversation

@codeasier

Copy link
Copy Markdown
Owner

Summary

Completes and hardens the architecture-oriented AGENTS.md hierarchy (22 files: root + 21 scoped guides).

Files changed (AGENTS.md only)

  • Root AGENTS.md: navigation index now links every child guide (two tables: top-level scopes plus deeper nested guides); runtime topology refined with verified console scripts (pt-snap, pt-snap-mcp) and the report command group (pt-snap report peak-memory); added the CI type check (basedpyright) to development commands.
  • All 21 child AGENTS.md files: added a visible, relative Parent scope: [..](../AGENTS.md) link under each title (docs/zh also links its en translation reference) and refreshed the Updated header.

Key architecture facts documented (verified against source)

  • Entry points from pyproject.toml [project.scripts]: pt-snap = pt_snap_cli.cli:_safe_call, pt-snap-mcp = pt_snap_cli.mcp.server:main.
  • Focus precedence in src/pt_snap_cli/config.py: Config.resolve_focus(): explicit path -> PT_SNAP_DB_PATH -> nearest .pt-snap/focus.json -> legacy global ~/.config/pt-snap-cli/config.json.
  • src/pt_snap_cli/context.py opens SQLite with mode=ro, validates the dictionary table, and discovers devices from trace_entry_% tables.
  • src/pt_snap_cli/query/executor.py renders with Jinja2 StrictUndefined, injects device_trace_table/device_block_table, and normalizes failures to TemplateRenderError.
  • Split contract in core/split_service.py: exactly one positive strategy (--slices or --max-entries), replay validation, no-replace publication.
  • CI (.github/workflows/test.yml) is a reusable workflow: provenance guard, ruff, black, basedpyright, pytest matrix 3.10-3.13; release.yml gates quality -> build -> publish -> github-release.

Validation

  • validate_agents.py: Checked 22 AGENTS.md files: 0 error(s), 0 warning(s).
  • git diff --check: clean.

@codeasier

Copy link
Copy Markdown
Owner Author

已由 #178 替代并合入。按当前 main 架构重新核对和重写 AGENTS.md 层级,保留既有指南路径,覆盖 CLI 拆分、资源/缓存生命周期、双 schema 查询、技能工作流与评估、打包及发布门槛。新 PR 的 Python 3.10–3.13、lint/type、provenance 和 wheel 验收全绿。原 PR 基于旧架构且缺少 snapshot 文档变更所需的 provenance 声明,因此关闭为已替代,不合并旧提交。

@codeasier codeasier closed this Oct 3, 2026
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