Skip to content
Skills Library
DevOps & cloud · Automation

secure-release

/secure-release

The secure front-door for building, developing, releasing, and updating CiteVahti. Use this whenever you are about to cut a release or bump the version; build, sign, or notarize the desktop app, the .mcpb extension, or the PyInstaller binary; set up or change automatic updates (tufup / code signing); add or change an agent/MCP tool or anything touching the blinded-rating or Zotero-write path; harden CI, secrets, or the loopback panel; or prepare CiteVahti to go from beta toward a production-grade, trustworthy product. Trigger this even when the user just says "ship it", "release", "new version

Repository
citevahti ↗
Licence
Apache-2.0
Last repository change
21.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 21.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

The secure front-door for building, developing, releasing, and updating CiteVahti. Use this whenever you are about to cut a release or bump the version; build, sign, or notarize the desktop app, the .mcpb extension, or the PyInstaller binary; set up or change automatic updates (tufup / code signing); add or change an agent/MCP tool or anything touching the blinded-rating or Zotero-write path; harden CI, secrets, or the loopback panel; or prepare CiteVahti to go from beta toward a production-grade, trustworthy product. Trigger this even when the user just says "ship it", "release", "new version

Triggers from the description

ship itrelease
Original author description

The secure front-door for building, developing, releasing, and updating CiteVahti. Use this whenever you are about to cut a release or bump the version; build, sign, or notarize the desktop app, the .mcpb extension, or the PyInstaller binary; set up or change automatic updates (tufup / code signing); add or change an agent/MCP tool or anything touching the blinded-rating or Zotero-write path; harden CI, secrets, or the loopback panel; or prepare CiteVahti to go from beta toward a production-grade, trustworthy product. Trigger this even when the user just says "ship it", "release", "new version

How it works

  1. The cardinal rule: gates before mechanics
  2. §1 — Safety gate (run this BEFORE you even think about releasing)
  3. §2 — Build & test gate
  4. §3 — Release & update gate (token-free loop)
  5. §4 — Security defaults (always on)
  6. Honest scope: what "production-grade" means here, and what to get help with
Original SKILL.md headings · 231 lines, 2,077 words
SKILL.md preview
---
name: secure-release
description: >-
  The secure front-door for building, developing, releasing, and updating CiteVahti. Use this
  whenever you are about to cut a release or bump the version; build, sign, or notarize the
  desktop app, the .mcpb extension, or the PyInstaller binary; set up or change automatic
  updates (tufup / code signing); add or change an agent/MCP tool or anything touching the
  blinded-rating or Zotero-write path; harden CI, secrets, or the loopback panel; or prepare
  CiteVahti to go from beta toward a production-grade, trustworthy product. Trigger this even
  when the user just says "ship it", "release", "new version", "build the app", "sign it",
  "set up auto-update", or "make this more secure" — the safety gates and release discipline
  here are easy to skip by accident and expensive to get wrong on a clinical-adjacent tool
  used in live pilots.
---

# Secure release & development — CiteVahti

CiteVahti is a local-first, single-user citation-integrity tool used in **live pilots with
real researchers**, handling clinical-adjacent data. That changes the bar: a broken release
or a weakened safety invariant doesn't just annoy a user, it can corrupt a research
provenance trail. This skill is the disciplined path for changing, releasing, and updating it
without breaking the guarantees the product is built on.

The repo already documents the mechanics in depth. This skill is the **orchestration layer**:
it tells you the order, the gates that are easy to skip, and the security defaults — then
points you at the canonical doc for each step. Read the referenced doc before doing that step;
don't reconstruct it from memory.

| Topic | Canonical doc in the repo |
|---|---|
| Publishing the Python package + VS Code extension | `docs/RELEASING.md` |
| Building/signing the desktop app, `.mcpb`, and binary | `desktop-extension/BUILD.md` |
| The hard safety invariants (enforced in code + tests) | `docs/SAFETY_INVARIANTS.md` |
| The secure auto-update model (tufup key split, signing) | `references/secure-updates.md` (this skill) |
| Security practices derived from the threat-model research | `references/security-checklist.md` (this skill) |

## The cardinal rule: gates before mechanics

Every release runs through three gates **in order**. Skipping a gate is the failure mode this
skill exists to prevent.

1. **Safety gate** — did this change weaken a guarantee? (§1)
2. **Build & test gate** — does it pass offline, and do the artifacts actually contain what they should? (§2)
3. **Release & update gate** — version lockstep, signed artifacts, the right trigger. (§3)

---

## §1 — Safety gate (run this BEFORE you even think about releasing)

CiteVahti's value is its guarantees, not its features. `docs/SAFETY_INVARIANTS.md` lists 12
hard invariants (enforced in code, guarded by tests) plus supporting ones. The full suite is
the real enforcement — but these are the ones a change most often erodes silently, so check
them by hand when your change is anywhere near them:

- **Blinded, sealed rating.** The AI support rating is recorded blind and stays hidden until
  the human rates (sealed-envelope). The AI value can *never* auto-become the final value, and
  a discordant record needs explicit adjudication. If you touched `rating/`, `validators/`,
  the panel rating view, or any prompt that orders human-vs-AI work — re-read invariants #4
  and #5 and run `test_dual_rating.py` + `test_rating_validators.py`.
- **Read-only views never mutate the ledger.** `claim_report`, `triage`, `methods_statement`,
  `check_paragraph` append no audit entry and write no file (the methods agreement numbers use
  `AgreementReportService.report(persist=False)`). This has been broken before by a view
  quietly calling a service that writes. If you added or changed a read surface, it MUST be
  covered by `test_readonly_tools_dont_mutate.py`.
- **The agent tool surface is allow-listed.** Adding any MCP/agent tool requires editing
  **both** `src/citevahti/agent/__init__.py` (`TOOLS`) **and** `src/citevahti/agent/policy.py`
  (`ALLOWED_AGENT_TOOLS`). The import-time `assert_safe_surface` guard fails the build if they
  disagree — that's intentional. Never widen the surface to make a tool "just work"; widen it
  deliberately and write down why. A new tool that mutates state or reaches the network needs
  the same scrutiny as a Zotero write.
- **Zotero writes stay dry-run + token-confirmed + undoable** (invariant #8). Don't add a
  write path that bypasses the one-use, payload-bound, expiring token.

**Why this is gate #1:** every other step (build, sign, publish) makes the change *harder to
take back* — once it's signed and auto-pushed to pilot users, a weakened invariant is live in
the field. Catch it here.

If the change adds an out-of-scope security or safety concern you don't want to fix in this
release, note it explicitly rather than letting it ride silently.

---

## §2 — Build & test gate

Everything must pass **offline** — the suite uses fake seams for HTTP/Zotero/BBT/PubMed/the
AI rater, so a green run proves no accidental live call crept in.

```bash
python -m pytest -q                      # full offline suite — must be green
python -m pytest -m security -q          # the security-control regression group (see SECURITY.md)
cd vscode-extension && npm run compile   # the VS Code adapter must compile
```

If your change touches a security control (loopback panel, agent surface, decision/audit
integrity, a write path), it belongs in the `security` group — mark its test
`@pytest.mark.security` and add a row to the table in `SECURITY.md`.

When building distributable artifacts, **verify the artifact contains what it claims AND
runs the way the product runs it** — the 0.44.x series shipped three consecutive builds
that froze and signed cleanly, then failed only in a user's hands (blank panel from
missing package data; an unsignable sidecar layout; a mangled `Python.framework`):

- **Wheel** — the panel UI ships as package data. Confirm `citevahti/panel/web/{index.html,
  app.js,styles.css}` are inside the `.whl` (the publish workflow already asserts this; if you
  build locally, run the check in `docs/RELEASING.md`).
- **Desktop app / `.mcpb`** — follow `desktop-extension/BUILD.md`. `build-app.sh` produces the
  **unsigned** PyInstaller bundle; signing is a separate step (§3 + `references/secure-updates.md`).
  After signing a binary, **smoke-test that it still runs** — a hardened runtime + onefile
  freeze can produce a signed binary that won't launch (`sign-notarize.sh` does this check;
  keep it).
- **Smoke-RUN the frozen artifact** — `desktop-extension/smoke_frozen_panel.py` drives the
  frozen binary through the real `open_review_panel` MCP path (or the engine sidecar via
  `--mode engine`) and fetches the panel expecting 200s — on an ephemeral port with a
  throwaway root. The build scripts and all four release-build CI jobs run it; if you add a
  freeze target or a new must-serve asset, extend it. Never point a smoke or test at the
  product's default port — a live CiteVahti may own it (that mistake got the founder's
  running engine killed mid-session once).
- **Workflow ≠ build scripts.** `desktop-extension-build.yml` does NOT call `build-binary.sh`
  or `build-app.sh` — it has its own PyInstaller invocations. Any freeze-flag change must
  land in BOTH or it silently doesn't ship (this is exactly how the blank-panel `.mcpb` and
  the keyring-less release assets happened).
- **Verify macOS signing on the CI-identical layout.** CI's `setup-python` is a FRAMEWORK
  build; many local pythons aren't, and the difference changes what PyInstaller freezes and
  how codesign walks the bundle (v0.44.2's fix passed locally and failed on CI for exactly
  this reason). Reproduce with Homebrew `python@3.11` via a PATH shim before trusting a
  local signing pass.
- **Manifest parity** — the `.mcpb` advertises prompts in `desktop-extension/manifest.json` +
  `manifest.binary.json`. Adding an MCP prompt means adding it there too, or Claude Desktop
  can't discover it. The parity test guards this; don't hardcode an expected prompt set in the
  test (it silently rots) — derive it from the prompt-name constants.

---

## §3 — Release & update gate (token-free loop)

The release loop is **token-free**: no PyPI secret is stored anywhere. Publishing happens via
PyPI Trusted Publishing (OIDC) when you publish a GitHub Release. `main` is branch-protected
and needs five CI checks green. Read `docs/RELEASING.md` for the full runbook; the steps:

1. **Bump the version in lockstep across all seven hand-edited files** (a mismatch ships a
   wrong-versioned
   artifact, and the user can't tell what's running — which is exactly the bug 0.34.3 fixed by
   surfacing the version):
   - `pyproject.toml`
   - `src/citevahti/__init__.py` (`__version__`)
   - `vscode-extension/package.json`
   - `desktop-extension/manifest.json`
   - `desktop-extension/manifest.binary.json`
   - `.claude-plugin/plugin.json` (the Claude plugin manifest — it silently drifted to a
     stale 0.1.0 while the product was at 0.45.0, which reads as abandoned; keep it in step)
   - `server.json` (**two** slots: top-level `version` and `packages[0].version` — the MCP
     registry entry reads them)

   Then regenerate the two tracked lockfiles that also carry the version:
   `vscode-extension/package-lock.json` (`npm install --package-lock-only` in
   `vscode-extension/`) and `uv.lock` (`uv lock`; check the diff touches only the
   citevahti version line).
2. **Add the `CHANGELOG.md` `## X.Y.Z` section** and bump the `docs/STATUS.md` header line.
3. **Open a PR off a branch** (never push release commits straight to `main` — it's protected).
   Stage explicit paths; do **not** `git add -A` — this repo carries untracked local/foreign
   files (e.g. `.claude/`, stray `.bib` files) that have been swept into commits before.
4. **Wait for the five required checks** (read from branch protection 2026-07-30),
   then squash-merge:
   - `pytest (offline) · py3.10`
   - `pytest (offline) · py3.12`
   - `VS Code extension compiles`
   - `ruff (static analysis · incl. security S-rules)`
   - `mypy (type check)`
5. **Create the GitHub Release** with tag `vX.Y.Z` targeting main:
   ```bash
   gh release create vX.Y.Z --target main --title "..." --notes "..."
   ```
   This fires `publish-pypi.yml` (builds, `twine check`s, publishes via Trusted Publishing in
   the `pypi` environment) **and** `desktop-extension-build.yml` (builds the signed bundles) —
   and nothing else. MCP registry (`mcp-publisher publish`), VS Code Marketplace, and Open VSX
   are separate manual publishes; Zenodo mints a DOI only once its one-time GitHub toggle is
   enabled (see `docs/RELEASING.md` and the citevahti-release skill).
6. **Confirm it actually published** — trust the workflow logs first (the PyPI JSON API lags
   minutes). Then confirm the running version is the new one (the `status` MCP tool reports it).

End commit messages with the `Co-Authored-By: Claude` trailer and PR bodies with the
`Generated with Claude Code` line, per repo convention.

### Updates reach users differently per surface — set expectations honestly

- **Desktop app (the primary product):** there is currently **no auto-updater**. The path to
  one is `tufup` + code signing — see `references/secure-updates.md`. Until that ships, the
  honest UX is a version-check nudge, not a promise of auto-update.
- **`.mcpb` in Claude Desktop:** auto-update exists **only** for extensions in Anthropic's
  curated directory. A privately distributed `.mcpb` requires a manual remove-and-reinstall
  (Claude Desktop caches the old one). So: surface the version in a tool (done in 0.34.3) and
  nudge, until/unless CiteVahti is accepted into the directory. *(Vendor behavior, dated 2026;
  re-check before relying on it.)*
- **PyPI:** technical users `pip install -U`. An in-app "newer version on PyPI" nudge is fine;
  never silently auto-`pip install` — that violates the local-first, no-surprise posture.

---

## §4 — Security defaults (always on)

These aren't release-time extras; they're standing practice. Full detail and the threat-model
reasoning are in `references/security-checklist.md`. The non-negotiables:

- **Secrets never touch git, logs, or chat.** PyPI/Marketplace/signing tokens go in env vars,
  the OS keychain (the `keyring` extra), or GitHub Secrets — never committed, never echoed.
  GitHub Secrets are safe across the planned history rewrite *because they're not in git* —
  keep it that way; never let a keystore or `.env` get committed during the transition.
- **GitHub Actions are pinned to full commit SHAs** (done in #163; Dependabot keeps them
  current) — a compromised third-party action is the most common way CI secrets (your signing
  keys, once added) leak. Keep any *new* workflow step pinned too, especially before a signing
  secret lands in CI; never reintroduce a floating tag (`@v7` / `@release/v1`).
- **Keep CI least-privilege.** `permissions: contents: read` by default; grant `id-token:
  write` only on the publish job (already the case). Gate any job that holds a signing key
  behind a GitHub Environment with required reviewers, the same way `pypi` is gated.
- **Split signing keys by trust level** (see `references/secure-updates.md`): online roles
  (tufup `timestamp`/`snapshot`) may live in CI; the trust anchors (`root`/`targets`) stay
  offline even in beta. That single split is the whole reason to use tufup over a one-key
  scheme.
- **The loopback panel is hardened** (`Host`/`Origin`/`Content-Type` + a **per-session CSRF
  token** in `panel/server.py`, guarded by `test_panel_csrf.py`) — localhost is not private
  (DNS-rebinding, CSRF), and these checks are the defense. Any new mutating endpoint inherits
  them via `do_POST`; don't add a write path that bypasses them. Details in
  `references/security-checklist.md`.

---

## Honest scope: what "production-grade" means here, and what to get help with

"Flawless" for a single-maintainer clinical-adjacent tool means **trustworthy and
well-bounded**, not feature-complete. Prioritize the guarantees and the update/signing chain;
defer breadth.

Flag these as **real maintenance burdens — get a second pair of eyes / outside help**, don't
silently take them on solo:

- **Signing-key custody and rotation** for tufup (and what happens if a key leaks — `root`
  rotation is the painful one). Write a key-management runbook before the first signed update.
- **Windows code signing under the Vahtian org** (Azure Artifact Signing is token-free and
  cheap for EU *organizations* but not for EU individuals — this is why it goes under Vahtian).
  Confirm the org verification before depending on it.
- **A signed/anchored audit trail.** The current hash-chain is tamper-*evident*, not signed —
  a full re-hash still validates. That's an honest beta posture (documented in
  `SAFETY_INVARIANTS.md`), not a flaw to hide. Upgrading it (RFC 3161 timestamping / signing
  the audit head) is a deliberate, scoped decision for when pilots grow — not a silent default.
Files in this package (3)
  • SKILL.md 15 KB
  • references/secure-updates.md 7 KB
  • references/security-checklist.md 8 KB

Versions

The database has no other skills named secure-release.

Database snapshot: 13.11.2026 · package version 4828063b3222 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90citevahti-release
    Use when shipping a CiteVahti release — cutting a version, checking feature parity across the MCP server, desktop extension (.mcpb), loopback panel, and VS Code extension, bumping versions in lockstep, writing the changelog entry, minting the release DOI, or preparing rollback…
  • 90citevahti-onboarding
    Use when writing or regenerating CiteVahti install and quickstart documentation for a distribution channel — the desktop app, the .mcpb in Claude Desktop, MCP config for Claude Code or other clients, the VS Code extension, or pip — or when checking that channel docs still match…
  • 100release-publish
    Prepare and publish a ClawWork desktop release or prerelease. Use when: user says "release", "publish beta", "发版", "发布 beta", "发 beta", "cut a release", or asks to ship a version tag.
  • 100release
    Create a release branch from dev with version bumps and changelog. Use when the user wants to prepare a new release, bump a version, or cut a release. Triggers on phrases like "release 17.1.2", "cut a release", "prepare a release", "version bump", or just "/release".
  • 100release
    Execute the grill-me-sleek release process. Use this skill when the user wants to publish a new version, create a release, bump version numbers, or says things like "release v0.2.0", "publish a new version", "cut a release", "ship it", or "prepare release". Also use when the…
  • 100releasing
    Full release lifecycle — version bump, CHANGELOG, rich release notes, tag, publish. Use when user says "release", "tag and release", "publish version", "cut a release", "new version".

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.