Skip to content

Add agent memory retrieval safety skill - #20

Open
milos-plavsic wants to merge 1 commit into
cockroachlabs:mainfrom
milos-plavsic:add-skill/application-development/verifying-agent-memory-retrieval-safety
Open

milos-plavsic wants to merge 1 commit into
cockroachlabs:mainfrom
milos-plavsic:add-skill/application-development/verifying-agent-memory-retrieval-safety

Conversation

@milos-plavsic

Copy link
Copy Markdown

What does this PR do?

Adds a focused Agent Skill for reviewing CockroachDB-backed semantic-memory retrieval before an application treats ranked memories as trustworthy.

The workflow separates four commonly conflated control planes:

  • application eligibility predicates
  • database grants and roles
  • row-level security, when used
  • relational integrity constraints

It also covers embedding-space compatibility, bounded retrieval, non-executing plan inspection, synthetic boundary tests, explicit abstention, and a redacted report template.

This is a draft pending maintainer alignment on the proposal and scope.

Related Issue

Closes #19

Type of Change

  • New skill
  • Skill update/improvement
  • Documentation update
  • Infrastructure/tooling change
  • Bug fix

Skill Compliance Checklist

  • SKILL.md includes required frontmatter fields (name, description)
  • Skill name follows naming conventions (lowercase, hyphens, gerund form preferred)
  • Skill name matches directory name exactly
  • Description is specific and includes "when to use" trigger keywords
  • Description is max 1024 characters
  • Skill is under 500 lines (or uses references/ for detailed content)
  • References official CockroachDB documentation (not duplicate content)
  • Includes safety guardrails for risky operations (if applicable)
  • Tested with at least one AI agent (manual validation)
  • No time-sensitive information (version numbers, dates, "currently")
  • Directory structure follows specification (only scripts/, references/, assets/ subdirs)
  • No reserved words in skill name ("anthropic", "claude")
  • Local validation passes: python scripts/validate-spec.py skills/

Documentation Updates

  • README.md
  • CONTRIBUTING.md
  • Skill SKILL.md files
  • Other: reusable references/report-template.md

Testing

Manual testing:

  • Tested with AI agent: OpenAI Codex, using a multi-tenant vector-retrieval review scenario
  • Verified skill is discoverable with prompts about cross-tenant semantic-memory retrieval and embedding migrations
  • Validated technical accuracy against CockroachDB vector, EXPLAIN, authorization, and row-level-security documentation
  • Tested commands: confirmed the example uses non-executing EXPLAIN; the skill intentionally provides no mutation script

Automated testing:

  • Agent Skills quick_validate.py passes
  • Local repository validation passes: python scripts/validate-spec.py skills/cockroachdb-application-development/verifying-agent-memory-retrieval-safety/
  • CI validation will run automatically on this PR

The repository validator emits a non-blocking suggestion because its gerund allow-list does not recognize verifying, although the name is already a gerund and follows the proposal in #19.

Reviewer Notes

Please focus on whether the boundary between application retrieval policy and database authorization is crisp enough, and whether the read-only EXPLAIN guidance is appropriately conservative.


By submitting this PR, I confirm:

  • I have read the contributing guidelines
  • I have followed the Agent Skills Specification
  • I have tested my changes
  • I am willing to address review feedback

@milos-plavsic
milos-plavsic marked this pull request as ready for review September 5, 2026 16:09
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.

[Skill] verifying-agent-memory-retrieval-safety

1 participant