# Upgrade

> Upgrade an existing project's managed llm-wiki structure without rerunning broad wiki bootstrap. Use when a user asks to migrate, update, or upgrade project-local .llm-wiki scripts, hooks, or changelog structure after installing a newer llm-wiki release.

- **Type:** Skill
- **Install:** `agentstack add skill-ivankuznetsov-llm-wiki-upgrade`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ivankuznetsov](https://agentstack.voostack.com/s/ivankuznetsov)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ivankuznetsov](https://github.com/ivankuznetsov)
- **Source:** https://github.com/ivankuznetsov/llm-wiki/tree/main/skills/upgrade

## Install

```sh
agentstack add skill-ivankuznetsov-llm-wiki-upgrade
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Upgrade LLM Wiki Project Structure

Upgrade the current project's managed llm-wiki files to the templates bundled
with this installed release. This is a narrow, deterministic migration: do not
regenerate wiki pages, switch the headless owner, run a refresh agent, or update
QMD. It does reconcile the deterministic bounded scheduler because stale units
are part of the managed project structure.

## Preconditions

- The current directory must be inside a Git repository already bootstrapped
  with `.llm-wiki/` and `wiki/`.
- When `.llm-wiki/config.json` exists, read it and report the configured
  `headless_agent`. Preserve the file byte-for-byte.
- When the config is missing, the script infers the owner only when legacy
  managed scripts and the latest added or modified config in Git history
  identify exactly one of Codex, Claude Code, or Pi. It creates the config with
  that owner; zero or multiple candidates stop the migration before any project
  file is changed.

## Run the Upgrade

Resolve `scripts/upgrade-project.sh` relative to this SKILL.md and run:

```bash
skills/upgrade/scripts/upgrade-project.sh --project "$(git rev-parse --show-toplevel)"
```

Use the resolved installed path, not the example's repository-relative path.
When the user asks only whether an upgrade is needed, run `--check` instead.
Exit status `10` means an upgrade is available; it is an expected check result,
not a migration failure.

The script upgrades only managed structure:

- `.llm-wiki/post-commit-refresh.sh`
- `.llm-wiki/refresh-wiki.sh`
- `.llm-wiki/compile-log.sh`
- `.llm-wiki/install-systemd-scheduler.sh`
- canonical copies of the post-commit runner and compiler under
  `$(git rev-parse --git-common-dir)/llm-wiki/` for all linked worktrees
- canonical shared owner config and keepalive refs for existing queued commits,
  backfilled in bounded source-ref transactions
- a missing `.llm-wiki/config.json` when live or historical evidence identifies
  one unambiguous legacy owner
- `wiki/log.d/` and the compiled `wiki/log.md` layout
- the marked `LLM WIKI POST-COMMIT` block in the active Git hook path
- one bounded systemd timer for the repository primary worktree, preserving an
  intentionally disabled timer while removing duplicate units for linked
  worktrees in the same repository

The post-commit template is identical in every project. The shared Git hook
runner receives the committing worktree through `--project`, reads its preserved
`headless_agent` from the shared canonical config, and dispatches to exactly one
of Codex, Claude Code, or Pi from the managed refresh worktree. The
checkout-local copy remains a manual entrypoint and compatibility fallback.
The scheduled wrapper invokes that canonical runner with `--drain`; it never
launches a provider for an empty queue and never writes into a user checkout.
On Linux, its service serializes provider work machine-wide, caps memory at
4 GiB without swap, and uses a non-persistent randomized timer.

## Safety Contract

- Preserve unrelated tracked and untracked project changes.
- Overwrite only the four llm-wiki-managed scripts listed above.
- Replace or deduplicate only the marked post-commit hook block; preserve all
  unmarked hook logic and refuse unmatched markers.
- Preserve all hand-written legacy changelog prose while introducing the
  generated fragment block. Refuse malformed generated-log markers.
- Never commit, stage, push, invoke an LLM, or change branches.
- A second upgrade must be byte-for-byte idempotent.

## Report

Report:

- Whether the project was upgraded or already current.
- Configured headless owner.
- Managed files changed.
- Whether unrelated dirty work remained unchanged.
- Any validation failure that prevented migration.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ivankuznetsov](https://github.com/ivankuznetsov)
- **Source:** [ivankuznetsov/llm-wiki](https://github.com/ivankuznetsov/llm-wiki)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ivankuznetsov-llm-wiki-upgrade
- Seller: https://agentstack.voostack.com/s/ivankuznetsov
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
