refresh-cycle

A project-maintenance step that regenerates the living specification from tests and current project files, summarizes notes from the previous session, and prepares source files for the next cycle.

In plain words
What is it for?
Use it at the end of a development cycle to refresh state documentation, summarize interview and design records, regenerate docstrings, and compact Python source files.
Why use it?
It keeps documentation based on the tested implementation instead of outdated prose or memory, while preserving important decisions and carry-over information.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nullhack/temple8/refresh-cycle
Any agent
npx skills add nullhack/temple8 --skill refresh-cycle
Clone the repo
git clone --depth 1 https://github.com/nullhack/temple8

Made for: Claude Code, Codex.

Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 609 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.00609
Opus 5 $0.00019 $0.00304
Sonnet 5 $0.00008 $0.00122
Haiku 4.5 $0.00004 $0.00061

Measured 2d ago against content hash 84a9736ccd94, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

refresh-cycle scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.opencode/skills/refresh-cycle/SKILL.md · 14 lines

What it actually says

Refresh Cycle

  1. Load [[methodology/simplicity-discipline]], [[software-craft/git-conventions]] — the derived-view rule and the commit form. You close the cycle; the next discovery pass inherits what you write.
  2. Regenerate the living specification. Render docs/state.md from .templates/docs/state.md.template, substituting <name>, <version> (from pyproject.toml), <YYYY-MM-DD>, and <session_id>. Derive every field from the truth — the current test .pyi/.py, pending marks (uv run pytest --collect-only -m pending -q), cassettes, migrations, and docs/glossary.md — never from prose or memory. The contract-index intent column is read from each test body; the composition and data-flow lines are read from the e2e path the tests express. This file is a derived view; when prose and a test disagree, the test wins. Never hand-edit it.
  3. Summarize the carry-over cache files. Rewrite each of .cache/<session_id>/interview-notes.md, .cache/<session_id>/external-contracts.md, .cache/<session_id>/data-model.md, and .cache/<session_id>/journal.md as a ~1000-word summary of this cycle — the decisions made, the contracts built, the gaps closed, the escalations resolved. Preserve the headers each template carries so the next pass appends in the right place; replace the body with the distilled record. Transient per-pass files (build-target.md, probe-target.md, probe-research.md) are NOT summarized — they are regenerated by the next pass.
  4. Regenerate docstrings. Author faithful prose for every module, class, and public function/method across <package>/**/*.py — never a mechanical restatement of the signature; the why of an architectural decision lives in an ADR, not a docstring. Source only, never tests. Then run task lint-merge (ruff check --extend-select SIM,RUF . && ruff format .). Commit on dev as docs: regenerate docstrings + format.
  5. Strip all .py docstrings. Run uv run python scripts/strip_docstrings.py $(find <package> tests -name '*.py' -type f) (many files, in place, line-range only; the glob skips .pyi). Commit on dev as chore: strip docstrings for next dev cycle.
  6. Assert the gate evidence: spec-regenerated=true, cache-summarized=true, docstrings-regenerated=true, docstrings-stripped=true.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 14 lines · 39 tokens per session scan A 84a9736ccd94

Subscribe to this mod's changes

refresh-cycle is a skill published in the GitHub repository nullhack/temple8 (11 stars, last pushed 27d ago), licensed MIT. It adds 39 tokens to every session and 609 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.