Skip to content

feat: add runtime-aware Context Tree value audits - #5

Merged
Gandy2025 merged 1 commit into
fix/agent-slug-selectorfrom
feat/runtime-evidence-adapters
Jul 29, 2026
Merged

feat: add runtime-aware Context Tree value audits#5
Gandy2025 merged 1 commit into
fix/agent-slug-selectorfrom
feat/runtime-evidence-adapters

Conversation

@Gandy2025

Copy link
Copy Markdown
Contributor

What changed

  • rename the explicit Skill from context-tree-insights to context-tree-value-audit
  • preserve the existing Codex collector, Task-first judgment model, pending semantics, and 0.2.x artifact compatibility
  • select the current Runtime from FIRST_TREE_PROVIDER without allowing adapter overrides
  • recover Claude Code and Claude Code TUI reads from their existing native local transcripts with bounded Chat/session/workspace preflight and strict call/result pairing
  • keep Cursor and Kimi Code historical evidence explicitly unsupported and pending; they never produce confirmed reads
  • install a minimal Claude manual-only projection while keeping the canonical Codex Skill schema valid
  • document a recoverable rename upgrade and rollback that leaves one callable Skill name

Why

insights was too broad for an explicit, evidence-gated audit. The Task/effect/report core is Runtime-neutral, but historical evidence recovery must use only complete native records that can be attributed to the current Agent and authorized Chat.

This change deliberately stays at the Skill layer. It adds no First Tree Runtime handler, sidecar, metadata schema, ledger, Server, database, Web surface, or shared Tree-read abstraction. Missing or unsupported evidence remains N/A / pending and can never be interpreted as zero effect.

Runtime support

Runtime Historical value audit
Codex Supported through the existing adapter
Claude Code Supported through native local transcripts
Claude Code TUI Supported through the Claude transcript adapter
Cursor Pending / unsupported
Kimi Code Pending / unsupported

Codex invocation remains $context-tree-value-audit. Claude invocation is /context-tree-value-audit; its projection sets disable-model-invocation: true so ordinary prompts cannot trigger the audit implicitly.

Validation

  • python3 scripts/validate_skill.py
  • canonical Skill Creator quick validator
  • python3 -m compileall -q skills tests scripts projections
  • python3 -m unittest discover -s tests (37/37)
  • git diff --check
  • disposable fresh-install, upgrade, and rollback discovery matrix
  • two independent exact-diff reviews: APPROVED at full diff SHA-256 5b9f16cc7bdbaf3900ac39e0f76872d57d2916317187133ddf2b386b9044ea68

Dependency and release boundary

This PR is intentionally stacked on fix/agent-slug-selector / PR #4 at exact base ed0ece52c14bec0579de1deeb78707758e5a3572.

The deterministic Skill gates pass. A fresh network-backed Claude Code / Claude Code TUI one-turn audit remains a separate live release check, so this PR stays Draft.

@Gandy2025
Gandy2025 marked this pull request as ready for review July 29, 2026 01:48
@Gandy2025
Gandy2025 requested a review from yuezengwu as a code owner July 29, 2026 01:48
@Gandy2025
Gandy2025 merged commit 0f09f7c into fix/agent-slug-selector Jul 29, 2026
2 checks passed
@yuezengwu

Copy link
Copy Markdown
Contributor

Post-merge blocker / follow-up from static review:

claude_trace_pairs() validates each transcript row's cwd, but drops that value when it records a tool_use (around lines 4143–4149). provider_read_rows() then calls normalized_provider_tool() with preflight.workspace, so a Claude Bash call without an explicit cwd is always classified relative to the Agent workspace (lines 3744–3753), even when the accepted transcript row actually ran from the supported legacy <workspace>/<chat-id> directory.

That makes relative-path attribution incorrect. A real bound-Tree read such as sed ... ../context-tree/NODE.md can be lost, while a successful read of context-tree/NODE.md beneath the Chat workdir can be attributed to <workspace>/context-tree/NODE.md and accepted as bound-Tree evidence. The latter violates the audit's strict Tree isolation and can create a false confirmed read.

Please preserve the validated per-call row cwd in the paired call, use that exact directory for markdown_read_plan(), and add a Claude Bash regression covering the legacy per-Chat cwd. I consider this blocking for evidence correctness even though the PR was already merged before this review event arrived.

I did not run tests or QA; this finding comes from the exact base-to-head diff (ed0ece5..614e89b).

Gandy2025 added a commit that referenced this pull request Jul 29, 2026
* fix: bind audits to runtime agent slug

* fix: support legacy agent selectors

* fix: recover composite context tree reads

* fix: recover literal guarded tree reads

* feat: add runtime-aware Context Tree value audits (#5)

* fix: close value audit evidence gaps

* fix: close implicit evidence side effects

* fix: reject unbound git diagnostics

* fix: close remaining command helper paths

---------

Co-authored-by: YueZengwu <yzengwu@gmail.com>
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.

2 participants