Skip to content

Add persist-memory skill - #86

Open
sfc-gh-ddesai wants to merge 3 commits into
Snowflake-Labs:mainfrom
sfc-gh-ddesai:add/persist-memory
Open

sfc-gh-ddesai wants to merge 3 commits into
Snowflake-Labs:mainfrom
sfc-gh-ddesai:add/persist-memory

Conversation

@sfc-gh-ddesai

Copy link
Copy Markdown

Summary

  • Adds persist-memory — a skill that backs up CoCo's local /memories/*.md files to a Snowflake table with SHA-256 content dedup
  • Optionally summarizes recent CoCo Desktop sessions (transcripts → structured summaries) and stores them in the same table
  • Auto-creates the target COCO_MEMORY.PUBLIC.MEMORY_LOG table on first run; fully configurable target
  • Project-scoped sync from a repo directory, or full sync from the playground / with $persist-memory all

Why this skill?

CoCo Desktop's memory system is local-only. This skill solves three problems:

  1. Durability — memories survive machine resets, environment changes, and reinstalls
  2. Queryability — SELECT * FROM MEMORY_LOG WHERE PROJECT_NAME = 'my-project' to find past decisions
  3. Session history — opt-in summarization captures what was done in each CoCo session, even when the user didn't document it

No overlap with the bundled memory-sync skill — that skill handles sync between CoCo instances; this one persists to Snowflake as a durable queryable store with session summarization.

Files

  • skills/persist-memory/SKILL.md — Full skill with 7-step workflow, examples, stopping points
  • skills/persist-memory/LICENSE — Apache 2.0

Test plan

  • Frontmatter validates (all 11 required fields present)
  • Folder name matches skill name field
  • Summary under 140 chars, title under 30 chars
  • Table schema creates and INSERT/validation queries work on Snowflake
  • No hardcoded credentials, secrets, or user-specific values
  • No overlap with bundled skill names
  • Run $review-skill-sflabs (advisory, not gating)

…aries to Snowflake

New community skill that persists CoCo's local /memories/*.md files to a
Snowflake table with SHA-256 content dedup. Optionally summarizes recent
CoCo Desktop sessions and stores structured summaries alongside memory files.

- Auto-creates target database/schema/table on first run
- Configurable target (defaults to COCO_MEMORY.PUBLIC.MEMORY_LOG)
- Project-scoped or full sync depending on working directory
- Session summarization is opt-in (--sessions flag)
- Validation query ensures metadata consistency

Built by [CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) | Designed and Orchestrated by [Dash](https://www.linkedin.com/in/dash-desai/)

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

…er table entries

When syncing from multiple machines, a stale local file could insert a row that
supersedes a newer version already in the table. Now compares local file mtime
against the table's latest SAVED_AT — if the table is newer, the insert is
skipped and reported as a stale-local conflict.

Built by [CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) | Designed and Orchestrated by [Dash](https://www.linkedin.com/in/dash-desai/)

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

…ocals

When the table has a newer version of a memory file (from another machine),
the skill now pulls the content down and overwrites the local file using the
memory tool — making the sync bidirectional. Previously it only reported the
conflict without resolving it.

Built by [CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code) | Designed and Orchestrated by [Dash](https://www.linkedin.com/in/dash-desai/)

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

@snowflake-security-bot snowflake-security-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snowflake Security Review

Security grade: A — Passed ✅

This PR was classified as LOW risk by the automated pre-screen.

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