Skip to content
Agentmart
Submit a tool

sage-artifact-retention

Preserve high-value Sage contracts, handoffs, reviews, transcripts, and evidence in a private project-local history while keeping payloads, credentials…

Skill by MythicAgents

IndexedGPL-3.0★ 29
Write a review

Chalk Labs

Need help deploying sage-artifact-retention?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/mythicagents-sage-artifact-retention

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Preserve high-value Sage contracts, handoffs, reviews, transcripts, and evidence in a private project-local history while keeping payloads, credentials, locks, fixtures, clones, and other scratch work temporary.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/sage-artifact-retention
  • /tmp/claude-
  • /tmp/pip-
  • /tmp/pytest-
  • /tmp/sage_arch_gate
  • /tmp/sage_arch_review
  • /tmp/sage_payloads
  • /tmp/sage-frozen-review-
  • /tmp/sage-isc49-primary-bootstrap.
  • /tmp/sage-isc49-review-lease-probe-
  • /tmp/sessions
  • /tmp/tmp

What's inside

Skill name
sage-artifact-retention
Description
Preserve high-value Sage contracts, handoffs, reviews, transcripts, and evidence in a private project-local history while keeping payloads, credentials, locks, fixtures, clones, and other scratch work temporary.
License
GPL-3.0
Instructions
79 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (6)

  • SKILL.md
  • openai.yaml · agents/
  • artifact_retention.py · scripts/
  • retention_guard.py · scripts/
  • test_artifact_retention.py · tests/
  • test_retention_guard.py · tests/

SKILL.md (first lines)

# Sage Artifact Retention

Use this skill whenever a Sage task creates evidence or decision material that must survive a reboot. The durable
root defaults to `.sage_history/` at the repository root and can be overridden for testing with
`SAGE_HISTORY_ROOT`. It is private, gitignored local state; it is not a system backup.

## Retention Classes

- `scratch`: active locks and leases, temporary clones, fixtures, staging, payload downloads, environment
  snapshots, and reproducible intermediate files. Keep these under `/tmp`.
- `durable-private`: contracts, final handoffs, decision-bearing reviews, external panel packets and responses,
  full chat transcripts used for analysis, accepted or rejected evaluation evidence, closed governance receipts,
  and manifests. Store these under `.sage_history/`.
- `published`: a later curated and redacted subset. Never publish directly from the raw private archive.

An artifact is durable when any of these statements is true:

- a final response cites it;
- it approves, rejects, or materially explains a decision;
- it proves an evaluation or live-run result;
- it contains a worker contract or final handoff;
- resuming accurately after reboot requires its exact bytes.

`/tmp` must not be the source of truth for a durable artifact.

## Commands

Initialize or inspect the private history:

```bash
.venv/bin/python skills/sage-artifact-retention/scripts/artifact_retention.py init
.venv/bin/python skills/sage-artifact-retention/scripts/artifact_retention.py manifest
```

Allocate a durable path for a tool that cannot import the helper:

```bash
.venv/bin/python skills/sage-artifact-retention/scripts/artifact_retention.py path --category transcripts/native-chat --name request.json
```

After that tool writes the file or directory, append its hashes to the manifest:

```bash
.venv/bin/python skills/sage-artifact-retention/scripts/artifact_retention.py record --category transcripts/native-chat --artifact-type native-chat-transcript /path/returned/above
```

Write a structured handoff from a JSON file or standard input:

```bash
.venv/bin/python skills/sage-artifact-retention/scripts/artifact_retention.py write-json --category handoffs --name handoff.json --artifact-type task-handoff --input /path/to/handoff.json
```

Copy explicitly reviewed temp artifacts into durable history:

```bash
.venv/bin/python skills/sage-artifact-retention/scripts/artifact_retention.py promote --category migrated/reviews --artifact-type external-review --context 'approved retention migration' /tmp/example-review.md
```

Promotion is copy-only. It refuses symlinks, files larger than 100 MiB, and names shaped like credentials,
environment files, private keys, or payloads. Do not bypass that refusal by renaming sensitive material.

## Manifest

`.sage_history/manifest.jsonl` is an append-only, machine-readable index. Each record binds an artifact or
promoted directory to its relative path, SHA-256, size, type, source path when applicable, and recording time.
Raw history remains operator-sensitive even when obvious auth files are excluded.

## Completion Guard

The project `Stop` and `SubagentStop` hooks run `retention_guard.py`. It scans only a bounded tail of the current
transcript, warns about existing high-value `/tmp` paths that lack a matching manifest record, and never copies
anything automatically. Treat it as a guardrail, not a complete parser or a substitute for the retention rule.

## Scripts

- `scripts/artifact_retention.py`: path allocation, private JSON writes, explicit promotion, and manifest queries.
- `scripts/retention_guard.py`: bounded completion-time warning for unpromoted high-value temp artifacts.

From MythicAgents/sage, GPL-3.0.

More from MythicAgents/sage

Signals

Stars
29
Forks
5
Open issues
1
Last commit (this folder)
Jul 29, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
GPL-3.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from MythicAgents

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get sage-artifact-retention running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying sage-artifact-retention?

CallGet help
Cite this page

sage-artifact-retention skill. Agent Mart. https://agentmart.dev/skills/mythicagents-sage-artifact-retention (last updated 2026-10-24)