/sunstack:savefrom sunstack
Save the current Sunstack agent's work and lessons into its board and context, archive what is outdated, and ask the user to approve rule or objective changes. Use for "save" in a session holding a Sunstack identity, "sunstack save", "/sunstack:save", changing a pillar or agent rule, or before ending or switching identity.
Ships in sunstack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Skill only: /sunstack:save in Claude Code, $sunstack:save in Codex. It runs sunstack snapshot, commit, tidy and amend.
Two kinds of change, handled differently:
board.md, context.md, threads, archive) are written
automatically, through a snapshot and a checked commit so a concurrent writer (another
session working as the same agent, or another tool) is never overwritten.AGENT.md, objectives and the user's key results in
BOARD.md) change only with the user's approval, every time. This is how the agent improves
itself, and the user must see each step.Every entry you write starts with today's date: - <YYYY-MM-DD> ....
session state block that sunstack as printed in
this session. If you do not have them (for example after compaction or /clear),
recover them as the as skill says (Recover this session's identity). Never guess.sunstack command on its own, with nothing chained after it.sunstack issue "<what happened, at which step>", never message or brief text. Failed commands are already recorded.sunstack command exits non-zero in a way not handled below, show the error and stop.
Do not go on to release or to removing a thread.[O<n>]) and its needs:. If a directive newer than aligned: is
addressed to this agent, make the board follow it and set aligned: to the last one checked.
Each Now entry this session owns ends with (by: <session_name>@<host>), using the
session_name from session state and this host's short name (hostname -s, on Windows
hostname), so sessions on other hosts can tell
whose it is. Leave other sessions' Now entries as they are. A key result that fits no objective goes to
Open questions in context, for the user.
(verified: <how> [@ <commit>]),
naming checks this session actually ran (go test ./..., ran the backtest on 2026-09,
user reviewed, reviewed by codex), with the short commit when there is one. With nothing to run, write
(verified: none, <reason>). Never write a check you did not run.## Asks:
- <date> Q<n> <question> (options: <a> | <b>) (default: <a> after <date>) (by: <session>@<host>).
The default is required; pick the safer choice and a date a few days out. Key results that
wait on it carry needs: user#Q<n>. An answer message, or the user's answer in this
session, moves it to Done with (answered: <answer>) and a Decision. An ask past its
date with no answer: take the default, move it to Done with (answered: default), add
- <date> Took the default for Q<n>: <answer> under Decisions, and tell the user. Never
make an ask of something that needs explicit approval (step 2, hires, fires, anything
irreversible).archive/<YYYY-MM>.md of the month they were
written. Move, never just delete.BOARD.md.health check when it is about Sunstack itself), then a pillar line, then a
line in AGENT.md. A check is ordinary project work: offer it to the user. A pillar or
AGENT.md line goes through step 2. Record a declined proposal under Proposals with
declined and the date, and do not propose that repeat again.The user can also ask directly to change a pillar or this agent's AGENT.md; handle it in
step 2 the same way. If nothing is worth keeping, say so and stop.
For each rule change, and for any still-pending line under ## Proposals in context.md:
Snapshot the target (no token needed):
sunstack snapshot --root "<root>" "<id>" pillars.md, or AGENT.md, or
sunstack snapshot --root "<root>" --team for the team PILLARS.md, or
sunstack snapshot --root "<root>" --team BOARD.md for objectives and the user's key results.
Write the complete new file directly into candidate_dir under a name used only for this
proposal (for example pillars-<time>.md), changing only what is proposed. Pillars stay one
dated, checkable line each. AGENT.md keeps its frontmatter. Use that exact file for amend,
and do not rewrite it after the user has seen it; an edit means a new file and a new showing.
Show the user the change: the file, the lines before and after, and why. Do this even when the user asked for the change: a request is not approval of your exact wording.
Ask: approve / edit / reject / later (with AskUserQuestion if you have it, otherwise as numbered options), end your turn, and wait for the user's reply. Run amend only after an explicit approve in that reply. Claude Code or Codex may then show their own prompt for the command, or an automatic reviewer may decide it; either way, the user's reply to your question is the approval that counts.
sunstack amend --root "<root>" "<id>" pillars.md "<candidate file>" "<checksum>" --summary "<one line: what changes>"
For the team files: sunstack amend --root "<root>" --team "<candidate file>" "<checksum>" --summary "..."
(PILLARS.md), or sunstack amend --root "<root>" --team BOARD.md "<candidate file>" "<checksum>" --summary "...".
Record the outcome in context (step 3 writes it):
## Proposals, add under ## Decisions:
- <date> User approved: <change>## Proposals, add under ## Decisions:
- <date> User rejected: <change> — <reason if given>. Never propose the same change again.## Proposals; it is asked again at the next save or as.mismatch: the file changed; snapshot again, redo the candidate, ask again.Never run amend without first showing the change. Change another agent's rules only when the user asks for it, or approves a change you showed them (the hire skill's role extension).
sunstack snapshot --root "<root>" "<id>" board.md --token "<token>"
Then the same for context.md, and for threads/<topic>.md or archive/<YYYY-MM>.md when
you write them. Each output gives checksum, candidate_dir (this session's own folder), and
the current content. A board.md snapshot also prints next keys: KR<n> Q<n> on stderr: the
next free key of each kind, counting the archive. Number new entries from it. When moving entries to the archive, commit the archive first, then the
file they left, so an entry is never lost in between.
Write the complete new file directly into candidate_dir, with no subfolder: for example
<candidate_dir>/board.md, <candidate_dir>/context.md, or <candidate_dir>/<topic>.md for
a thread. Start from the snapshot content: keep everyone else's lines exactly as they are, keep
the fixed sections, one dated line per entry. Your own intended edits (updating your key
results, recording step 2 outcomes, moving entries to the archive) are allowed.
sunstack commit --root "<root>" "<id>" board.md "<candidate file>" "<checksum>" --token "<token>"
Commit each other file you snapshotted the same way; when entries move to the archive, the archive goes first.
mismatch: someone changed the file, often another session working as this agent.
The output has the fresh content and checksum. Merge your changes onto it: keep every other
entry as it is and add or update only yours. If your entry contradicts one written by
someone else, do not pick one: keep both, add an Open question in context, and tell the
user. Rewrite the candidate and commit again with the new checksum. Give up after three
rounds and tell the user.duplicate_key: a key you added is already used, often by another session that added
one at the same time, or it is in the archive. Give your entry the new key the error suggests
(give the newer entry <key>),
update your own references to it, and commit again.busy: retry once. If it persists, tell the user (a leftover lock).token: this session no longer holds the ID. Stop and tell the user.A thread is finished: snapshot it, commit its conclusion into context.md, then remove it with
the checksum of that same snapshot:
sunstack commit --root "<root>" "<id>" threads/<topic>.md --delete "<checksum>" --token "<token>".
If this says mismatch, the thread changed after you summarized it: fold the new content into
context first, then delete against the new checksum.
Run sunstack tidy "<id>" --root "<root>": it moves to the archive Done entries older than a
week or past the 10 newest, and processed messages older than a week whose message is no longer
in the inbox. If it says the context or board is over budget, archive superseded decisions and
fixed pitfalls (step 3's archive rule) or shorten Next, then save again.
When this save comes before release, a pause, or the end of the session: finish or back out
of the current step and start nothing new. Run git status --short in the project folder; if
there are uncommitted files, list them and ask the user whether to commit them as one wip:
commit. Never commit without that yes, and record the answer in the Now entry.
If what this session is doing has changed, update its line:
sunstack doing --root "<root>" "<id>" "<one line>" --token "<token>" ("" clears it).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lucklyric/sunstack --plugin sunstack21 skills in this plugin
/asTake on a Sunstack agent identity (for example builder.alice) in this project, alone or alongside sessions already working as it, or recover the identity this session already holds. Use for "sunstack as", "/sunstack:as", "take on the builder agent", "which Sunstack agent should I be", "sunstack whoami", "which agent am I", or after compaction or /clear lost the session state. Only in projects with a Sunstack team (sunstack/PROTOCOL.md)./boardShow and align the Sunstack team's objectives and key results across the user and every agent, with dependencies, stale or overdue entries and unfollowed directives. Use for "sunstack board", "/sunstack:board", "the team's OKRs", "the team's dependencies", "align the team". Not the ranked to-do list (next skill)./Other plugins' skills for the same job