2026-08-26 16:00:34 +02:00
---
name: kb-publish
2026-08-26 22:35:45 +02:00
description: At session close, asks the operator whether to publish the KB site if kb/**/*.md changed this session. Trigger whenever the session is wrapping up (save-session, "kończymy sesję", natural end of task) and this session's own edits, or a merge/diff visible in git, touched files under kb/.
2026-08-26 16:00:34 +02:00
---
## What this skill does
2026-08-26 22:35:45 +02:00
Trigger point: **session close** , not every response. Session close means the
operator signals they're wrapping up — e.g. invoking `save-session` , saying
something like "kończymy sesję" / "koniec na dziś" / "wrap up", or the task
reaching its natural end with no further work queued. Don't act on this skill
mid-session just because a `kb/` file was touched.
2026-08-26 16:00:34 +02:00
2026-08-26 22:35:45 +02:00
At that moment, if this session touched `kb/**/*.md` — either through your
own edits or through a merge/diff you observed in git — **ask the operator
directly**, as a question requiring a yes/no answer, not a passive reminder:
2026-08-26 16:00:34 +02:00
2026-08-26 22:35:45 +02:00
> Sesja dotknęła kb/. Zregenerować i zasugerować publikację (`bash scripts/kb/publish.sh`)?
- If the operator confirms (any affirmative reply): print the ready-to-paste
command block so they can copy it straight into their own shell:
```bash
bash scripts/kb/publish.sh
```
Do not run it yourself — see below.
- If the operator declines: drop it, nothing more to do.
- If the operator doesn't respond or ignores the question (moves on to
something else, ends the conversation): do **not** ask again in this
session. One ask per session, max.
2026-08-26 16:00:34 +02:00
## What this skill does NOT do
**Never run `scripts/kb/publish.sh` yourself**, under any circumstances, even
if the operator's task prompt says to deploy, publish, or calibrate. The
script SSHes into PIHA and overwrites the live `kb-site` content volume on
production — that is out of scope for a worktree agent and requires an
explicit, direct instruction from the operator in the current turn.
If the operator explicitly asks you to run it, that instruction stands on its
2026-08-26 22:35:45 +02:00
own — this skill only governs the session-close question, not that request.