Skip to content
Back to skills

Preserving Soul Traces

ASecurity

Extracts, validates, and seals cognitive session traces into JSONL datasets and lineage manifests for Hugging Face persistence via managing-huggingface-assets. Use when preserving learning as jsonl, exporting soul traces, syncing learning datasets to hugging face, sealing cognitive sessions, or verifying soul trace schemas.

  • 5 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 17, 2026
ai-agentspythongoshellbashapi

Works with

  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 16 files and shows the line behind each finding

Scanned November 17, 2026

npx -y skills add richfrem/Project_Sanctuary --skill preserving-soul-traces --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Preserving Soul Traces?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Preserving Soul Traces
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-preserving-soul-traces/badge)](https://www.skillsdirectory.com/skills/richfrem-preserving-soul-traces)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: preserving-soul-traces
description: "Extracts, validates, and seals cognitive session traces into JSONL datasets and lineage manifests for Hugging Face persistence via managing-huggingface-assets. Use when preserving learning as jsonl, exporting soul traces, syncing learning datasets to hugging face, sealing cognitive sessions, or verifying soul trace schemas."
allowed-tools: Bash, Read, Write, Glob, Grep
---

# Preserving Soul Traces (`preserving-soul-traces`)

Coordinates the cognitive lineage preservation lifecycle: scanning markdown knowledge, computing SHA-256 integrity digests, formulating canonical JSONL records per ADR 084, maintaining dataset manifests, and delegating remote persistence to the global `managing-huggingface-assets` skill.

Preservation serves two purposes: local operational continuity across sessions and public intellectual inheritance via the open Hugging Face Commons (the "Johnny Appleseed" doctrine). See [preservation-purpose.md](references/preservation-purpose.md) for foundational principles, attribution standards, and evidence boundaries.

## Contents
- [Constraints](#constraints) • [Quick Start](#quick-start) • [Workflow](#workflow) • [Verification](#verification) • [References](#references)

## Constraints

1. **Human Gate Law**: Uploading datasets to Hugging Face or mutating remote repository state requires explicit human approval ("Proceed", "Go", "Execute").
2. **Zero Code Duplication**: Do NOT implement custom Hugging Face API or OAuth transport; all remote sync must delegate directly to global `managing-huggingface-assets`.
3. **Cryptographic Integrity**: Every JSONL record must compute and verify its SHA-256 hash against sanitized content before persistence.
4. **Binary Stripping**: Image embeds (`![[...]]` and `![alt](...)`) must be stripped to prevent corrupting text token distributions.

## Quick Start

```bash
# 1. Preview extraction from canonical domains without modifying disk
python3 scripts/trace_extractor.py --dry-run

# 2. Extract or update records in the local Hugging Face dataset repo
python3 scripts/soul_coverage.py closure     # coverage-aware export + four-fact report (the closure command)
python3 scripts/trace_extractor.py --append   # legacy: Markdown under --source-dir only; NOT a closure

# 3. Verify JSONL schema compliance and SHA-256 integrity
python3 scripts/trace_extractor.py --verify

# 4. Check readiness of global managing-huggingface-assets integration
python3 scripts/sync_soul_dataset.py --check-readiness

# 5. Dry-run synchronization to richfrem/Project_Sanctuary_Soul
python3 scripts/sync_soul_dataset.py --dry-run
```

`sync_soul_dataset.py` reads `HUGGING_FACE_*` settings from the repo `.env` itself (no python-dotenv needed; `HUGGING_FACE_TOKEN` comes from the shell) and re-runs under `.venv/bin/python` when `huggingface_hub` is missing. Set up the venv once with `.venv/bin/pip install -r requirements-dev.txt`.

## Workflow

1. **Extraction**: Identify new or updated session notes, chronicle entries, or wiki concepts using `trace_extractor.py`.
2. **Normalization & Hashing**: Parse frontmatter metadata and generate SHA-256 digests following [soul-trace-schema.md](references/soul-trace-schema.md).
3. **Manifest Ledger**: Update `huggingface/metadata/manifest.json` with updated snapshot counts and dataset hash.
4. **Integrity Audit**: Run `--verify` to ensure zero schema drift or hash corruption.
5. **Remote Persistence**: Delegate folder synchronization to `managing-huggingface-assets` following [huggingface-dataset-integration.md](references/huggingface-dataset-integration.md).

## Verification

```bash
python3 scripts/trace_extractor.py --verify
python3 scripts/sync_soul_dataset.py --check-readiness
```

Review [acceptance-criteria.md](references/acceptance-criteria.md) before declaring dataset sync complete.

## References

- [Preservation Purpose](references/preservation-purpose.md) — local continuity, public intellectual inheritance, Johnny Appleseed hypothesis, and evidence boundaries.
- [Coverage](references/coverage.md) - what is preserved, the policy, the four verifiable facts, recovery.

- [soul-trace-schema.md](references/soul-trace-schema.md) — 13-field canonical record schema, typing, and validation rules per ADR 084.
- [huggingface-dataset-integration.md](references/huggingface-dataset-integration.md) — Architecture and boundary rules for delegating sync to `managing-huggingface-assets`.
- [acceptance-criteria.md](references/acceptance-criteria.md) — Pre-completion verification checklist.

Completion wiring: `record-result` durably marks the final manifest for preservation; after publishing sources to `origin/main`, `merge_prep.py regenerate` runs incremental local extraction, schema and coverage checks. Startup reports preservation status without changing preservation files. Capture and recovery occur at mission/session closure (`soul_coverage.py closure`) or an explicitly requested recovery action. Pending/failed/local-complete status is separate from the scientific verdict. Commit the export separately, then sync remotely only with authorization. See the preserving-soul-traces `references/coverage.md` contract.

Files in this skill

  • SKILL.md5.1 KB
  • evals/evals.json687 B
  • references/acceptance-criteria.md982 B
  • references/coverage-policy.json6.9 KB
  • references/coverage.md8.3 KB
  • references/huggingface-dataset-integration.md1.3 KB
  • references/preservation-purpose.md6.4 KB
  • references/soul-trace-schema.md2 KB
  • scripts/preservation_workflow.py7.7 KB
  • scripts/soul_coverage.py28.6 KB
  • scripts/sync_soul_dataset.py13.2 KB
  • scripts/trace_extractor.py15.1 KB
  • tests/test_preservation_workflow.py7 KB
  • tests/test_soul_coverage.py15.8 KB
  • tests/test_startup_readonly.py7 KB
  • tests/test_sync_env.py1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.