Save

From egregore-labs/egregore · View interactive version

Save is an AI agent skill from the GitHub repository egregore-labs/egregore. Save current Egregore work: validate distribution, commit the task branch, push it, and create or reuse a PR against the configured integration branch.

How to use this skill

Skill file

Save work without asking the user to manage Git mechanics.

When to invoke

Use for “save”, “commit and push”, “push this work”, or $save. When the user

is ending a session and needs a durable continuation record, use handoff or

wrap first; their canonical writes are already independently durable.

Contract

Codex, Pi, and Prime.

develop or main.

projection repair are separate Runtime operations.

changes and already-created memory records.

boundary; GitHub identity is not ActorIdentity.

Flow

  1. Inspect branch, working-tree changes, memory changes, ahead count, and an

existing PR. A clean tree can still need a push/PR when the branch is ahead.

  1. Resolve the configured integration branch first:
bash bin/base-branch.sh

It prints the branch name; for a managed repo run bash bin/base-branch.sh <repo-name>.

A non-zero exit means the configuration could not be resolved: stop before any

Git change. Use the printed name wherever {base} appears below.

Stop before mutation if it cannot be resolved.

  1. The shared bin/agent.sh save preflight runs distribution validation,

the change report, and the strict Runtime-skill audit before any memory or

project mutation. Both engine and registry must exist; installed public

instances intentionally omit the development engine.

It also prints an advisory affected-skill receipt from the branch diff,

staged/unstaged edits, and relevant untracked files. Read the named

instructions for drift and include material findings in PR verification;

ordinary edits require no new approval. A missing base is reported as an

unavailable review, never as zero affected skills. Set

EGREGORE_SKILL_REVIEW=0 only to explicitly disable this advisory receipt.

Ask one placement question only for a genuinely new/unclassified component or

an explicit placement change. Ordinary edits to an existing component do not

prompt.

For that question, show artifacts/capability-pipeline.html and offer:

  1. OSS + Connect — part of the open runtime; Connect inherits it.
  2. Connect only — delivered only to authenticated Connect users.
  3. Curve Labs / Egregore — used only in this development instance.

Record each new component as queued under the selected placement with all

its governed source paths. Availability changes separately after review.

Group components in one checkpoint only when they share a placement. Apply

the decision to capability-distribution.json, regenerate

skill-distribution.json and both artifacts, then validate again. Rebuild

runtime packs when an available runtime component changes placement. Reuse

an explicit placement decision from the current work; do not ask twice.

  1. Derive:

verification for non-Markdown changes.

If unrelated changes make the save scope ambiguous, show one Save all / Narrow

scope checkpoint. Otherwise continue without ritual confirmation.

  1. Choose readiness from the work's actual state, without a permission ritual:

drafts by default; passing --draft also converts an existing ready PR

before pushing, avoiding paid checks on unfinished iterations.

--ready. In the Egregore source repository (not an installed instance)

the bridge first runs the checks CI would select for the branch on this

machine, which can take as long as a CI run; run the save in the

background where the harness allows. If a check fails, the work is still

pushed, the PR stays a draft, and the bridge exits non-zero naming the

check and its log: fix it, then save with --ready again. For an existing

draft, the bridge pushes the final head before marking it ready, so CI

checks the saved version. If CI fails or another edit is needed, use

--draft for the next in-progress save.

readiness flag unless the work should deliberately remain a draft.

--ready are mutually exclusive and cannot be combined with --no-pr.

  1. Execute exactly once:

Use {message}, {topic}, and {pr_body} for the commit subject/body, topic, and PR body derived in Step 4; single-quote each value, writing an embedded single quote as '\''. Append --draft or --ready as selected above; omit both for the normal non-coding path.

bin/agent.sh save \
  --message '{message}' \
  --topic '{topic}' \
  --pr-body '{pr_body}'

The bridge owns branch safety, exact commits, push, PR create/reuse, and memory

sync. Do not run manual Git commands around it or trigger a graph scan.

  1. Report only the branch, commit/push outcome, PR URL/reuse and draft/ready

state, memory sync, and any failed step. Local commits remain safe if transport fails.

Rules

Emit content-free command telemetry after the bridge returns:

bash bin/telemetry.sh emit "command" '{"command":"save"}' 2>/dev/null &
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.