secure-release
Skill1 starsChanged 4 months agoApache-2.0View on GitHub
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.
- Reads credentials
- Installs packages
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- cansitki/agentic-builder-workbenchtheir own version, first seen Sep 9, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- cansitki/agentic-builder-workbench★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- site/llms.txtllms.txt
- prescreen-benchmarkSkill
- citevahti-claimsSkill
- citevahti-devSkill
- citevahti-evalSkill
- citevahti-modelsSkill
- citevahti-onboardingSkill
- citevahti-releaseSkill
- citevahti-reportSkill
- citevahti-reviewSkill
- citevahti-screenSkill
- citevahti-supportSkill
- citevahti-writingSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 39
Every release runs through three gates in order.
- Distinctive: line 74
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 …
- Distinctive: line 78
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 …
- Very specific: line 94
If your change touches a security control (loopback panel, agent surface, decision/audit integrity, a write path), it belongs in the …
- Distinctive: line 98
When building distributable artifacts, verify the artifact contains what it claims AND runs the way the product runs it — the 0.44.x series …
- Very specific: line 108
After signing a binary, smoke-test that it still runs — a hardened runtime + onefile freeze can produce a signed binary that won't launch …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
- Safety gate — did this change weaken a guarantee? (§1)
- Build & test gate — does it pass offline, and do the artifacts actually contain what they should? (§2)
- 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 runtest_dual_rating.py+test_rating_validators.py. - Read-only views never mutate the ledger.
claim_report,triage,methods_statement,check_paragraphappend no audit entry and write no file (the methods agreement numbers useAgreementReportService.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 bytest_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) andsrc/citevahti/agent/policy.py(ALLOWED_AGENT_TOOLS). The import-timeassert_safe_surfaceguard 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.
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 compileIf 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 indocs/RELEASING.md). - Desktop app /
.mcpb— followdesktop-extension/BUILD.md.build-app.shproduces 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.shdoes this check; keep it). - Smoke-RUN the frozen artifact —
desktop-extension/smoke_frozen_panel.pydrives the frozen binary through the realopen_review_panelMCP 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.ymldoes NOT callbuild-binary.shorbuild-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.mcpband the keyring-less release assets happened). - Verify macOS signing on the CI-identical layout. CI's
setup-pythonis 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 Homebrewpython@3.11via a PATH shim before trusting a local signing pass. - Manifest parity — the
.mcpbadvertises prompts indesktop-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:
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.tomlsrc/citevahti/__init__.py(__version__)vscode-extension/package.jsondesktop-extension/manifest.jsondesktop-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-levelversionandpackages[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-onlyinvscode-extension/) anduv.lock(uv lock; check the diff touches only the citevahti version line).- Add the
CHANGELOG.md## X.Y.Zsection and bump thedocs/STATUS.mdheader line. - Open a PR off a branch (never push release commits straight to
main— it's protected). Stage explicit paths; do notgit add -A— this repo carries untracked local/foreign files (e.g..claude/, stray.bibfiles) that have been swept into commits before. - Wait for the five required checks (read from branch protection 2026-07-30),
then squash-merge:
pytest (offline) · py3.10pytest (offline) · py3.12VS Code extension compilesruff (static analysis · incl. security S-rules)mypy (type check)
- Create the GitHub Release with tag
vX.Y.Ztargeting main:
This firesgh release create vX.Y.Z --target main --title "..." --notes "..."publish-pypi.yml(builds,twine checks, publishes via Trusted Publishing in thepypienvironment) anddesktop-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 (seedocs/RELEASING.mdand the citevahti-release skill). - 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
statusMCP 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 — seereferences/secure-updates.md. Until that ships, the honest UX is a version-check nudge, not a promise of auto-update. .mcpbin Claude Desktop: auto-update exists only for extensions in Anthropic's curated directory. A privately distributed.mcpbrequires 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
keyringextra), 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.envget 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: readby default; grantid-token: writeonly on the publish job (already the case). Gate any job that holds a signing key behind a GitHub Environment with required reviewers, the same waypypiis gated. - Split signing keys by trust level (see
references/secure-updates.md): online roles (tufuptimestamp/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 inpanel/server.py, guarded bytest_panel_csrf.py) — localhost is not private (DNS-rebinding, CSRF), and these checks are the defense. Any new mutating endpoint inherits them viado_POST; don't add a write path that bypasses them. Details inreferences/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 —
rootrotation 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

