Skip to content

Implement Self-Evolving Project Skills v2 run 24 - #919

Draft
adriandemian wants to merge 1 commit into
ralphx/ralphx/agent-88af9c08from
ralphx/ralphx/agent-217ff174
Draft

Implement Self-Evolving Project Skills v2 run 24#919
adriandemian wants to merge 1 commit into
ralphx/ralphx/agent-88af9c08from
ralphx/ralphx/agent-217ff174

Conversation

@adriandemian

@adriandemian adriandemian commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds learned-skill telemetry plumbing across the MCP tool surface, chat-service recording path, HTTP handlers, and storage repositories.
  • Read tools now carry transport-owned conversation/run identity without exposing those identifiers in model-facing tool schemas.
  • Learned-skill usage recording is expanded to cover launch, interactive stdin, and read-path attribution, with batch persistence support in the domain repository.

User Impact

  • Learned-skill usage events can be attributed more precisely to conversations and agent runs.
  • Read tooling can identify the active conversation/run when that identity is available while keeping orchestration identifiers out of the model-facing schemas.
  • Skill injection and usage records are more complete across Claude and Codex harness flows.

Technical Context

  • learned-skill-tools now distinguishes read and write tool transport headers and reuses runtime identity helpers for read calls.
  • Chat-service composition propagates injected skill names from fresh launches and resume/recovery flows.
  • learned_skill_substrate and the learned-skills HTTP handler resolve injected skill names, persist usage events, and suppress unresolved or cross-project records.
  • Memory and SQLite learned-skill repositories, plus the domain repository interface, now support batch recording semantics.
  • Harness adapters and repository tests were updated to align launch-time learned-skill injection and usage attribution.

Risks / Follow-Ups

  • This change spans MCP tooling, chat-service orchestration, HTTP, and persistence; mismatches between transport identity and persisted metadata would affect attribution.
  • Learned-skill suppression depends on resolving injected skill names against the current project scope, so unresolved or cross-project names remain excluded.
View full plan

Spec §PR C2 — Injection Telemetry

Implement C2 only on the current automation base: preserve C1’s exact injected project-skill names through the existing Claude and Codex launch structures, then record trustworthy, idempotent usage for compact-index injection, full loads, composer directives, and interactive stdin.

Current-base inspection shows useful substrate is already present: C1 emits structured learned:{project_skill_id} names; the four usage kinds and usage repository already exist; composer markers and partial composer/stdin recording are landed; and MCP runtime context already carries conversation/run identity. The remaining gaps are that Claude/Codex composition drops injected names, project-skill reads do not send or validate transport-owned attribution headers, usage writes are non-idempotent/non-atomic, and stdin telemetry is currently attempted before transport success.

The implementation will extend the existing provider-neutral composition, launch, HTTP/MCP, and ledger seams—without parallel composition types, payload identity, a new usage-kind schema migration, frontend work, or any C3 outcome-linking behavior. Usage telemetry remains best-effort and cannot break an otherwise authorized read or successful delivery; atomic persistence and typed diagnostics prevent partial or falsely attributed rows. Focused behavioral tests will prove both harnesses, exact-name propagation, linkage/scoring policies, invalid/stale identity suppression, project isolation, retry safety, failure isolation, and absence of telemetry on failed or suppressed paths. The linked Blueprint is intentionally unabridged: it contains the complete ten-step implementation sequence, a four-kind scoring/linkage matrix, a production-entry behavioral matrix, focused validation commands, and a proof-obligation completion gate.


Generated by RalphX


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Spec §PR C2 — carry C1's structured `learned:{id}` names through the
existing Claude/Codex composition and launch types, and persist compact
index, full load, composer directive, and interactive stdin usage with
trusted attribution, deterministic IDs, and atomic idempotent batches.

Review repair:
- Fix the stdin metadata assertion to read `exclusion_reason`, the key the
  usage builder actually emits (matches learned_skill_substrate_tests).
- Add `learned_skill_usage_tests.rs` covering the launch recorder: dual-kind
  emission, metadata provenance, same-run idempotency, distinct-run
  separation, unresolved-name suppression, cross-project suppression on both
  loops, missing project scope, and contained telemetry persistence failure.
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