/peak-workflow:refresh-docs [arch|design|blank for both]from peak-workflow
Updates architecture.md and design-notes.md to match the actual codebase by reading source files and session handoffs. Run after completing a phase or before a release.
Ships in peak-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are refreshing the project's architecture and design documentation to reflect the as-built codebase.
docs/architecture.md and docs/design-notes.md (or equivalent paths specified in CLAUDE.md) are written as planning artifacts before implementation begins. As epics complete, they drift from reality — versions change, endpoints multiply, patterns emerge that weren't anticipated. This command reads the actual source code and the accumulated session handoffs to bring both documents back into alignment with what was built.
When to run this:
Important: docs/architecture.md and docs/design-notes.md describe the system's
architecture and design decisions. They do not contain TOR requirements. The requirements
baseline lives in docs/requirements/*.feature.md — that is maintained by
/peak-workflow:capture-requirements, not by this skill. Do not move, copy, or summarize
TOR requirements into architecture.md or design-notes.md.
Target: $ARGUMENTS
docs/architecture.md and docs/design-notes.mdarch or architecture → docs/architecture.md onlydesign or notes → docs/design-notes.md onlyBefore any other action: run sh "${CLAUDE_PLUGIN_ROOT}/scripts/tor-lifecycle" format.
On exit 0 (verdict: current, or new for a project with no peak-workflow files yet), continue.
On any other exit, print its output and stop — it names the fix (/peak-workflow:upgrade, a
plugin update, or a Python install). After this guard, read the project's files only in the
current format.
CLAUDE.md — extract the Tech Stack table, Key Architecture Decisions, Important Reminders, and note any custom paths to architecture or design docs (if different from docs/architecture.md / docs/design-notes.md)docs/implementation-plan/status/epic-*.md and grep for status: Complete or status: Implemented to identify which epics have finished. These are the epics whose handoffs are relevant to the documentation refresh.Read each target document in full. As you read, extract and note every verifiable claim the document makes:
These become the claims to verify in Step 4.
Read all files in docs/implementation-plan/session-handoffs/ that correspond to Complete or Implemented epics. Skip Paused handoffs — their decisions may not be final.
For each handoff, collect:
After reading all handoffs, produce two lists:
Read every file in the implementation file set (from Step 3).
Additionally, look for and read these framework-configuration artifacts — they carry authoritative version and structure data that docs commonly get wrong:
| Artifact | What it tells you |
|---|---|
Dockerfile (any) | Actual build stage count, base image names and versions, injected ARG names |
package.json (frontend root) | Actual framework versions — React, router, table, query, virtual, etc. |
.csproj, pom.xml, pyproject.toml, go.mod, Cargo.toml | Actual backend runtime version and dependency versions |
Application entrypoint (Program.cs, main.py, App.tsx, main.ts, etc.) | Actual service registrations, route definitions, lazy-load configuration |
As you read, note where actual state matches or diverges from the claims extracted in Step 2.
Produce a gap table for each target document.
architecture.md — example format:
| Section / Topic | Current Claim | Actual State | Action |
|---|---|---|---|
| .NET version | .NET 8+ | .NET 10 | Correct throughout |
| Endpoint count | 7 endpoints | 11 endpoints | Expand table |
| Docker stages | 2-stage | 3-stage (Bun → SDK → runtime) | Rewrite section |
| Admin Geocoding page | Not mentioned | /admin/geocoding route in App.tsx | Add to pages table |
design-notes.md — example format:
| Decision | Status | Evidence |
|---|---|---|
| Custom MarkerClusterGroup wrapper | Missing | Epic 5 handoff — Key Decisions |
| Manual query param binding (.NET 10 bug) | Missing | Epic 3 handoff — Key Decisions |
| CartoDB Light tile choice | Missing | Source code (tile URL + attribution comment) |
| Client-side filtering rationale | Missing | Epic 4 handoff — Key Decisions |
Present both tables to the user. Explain the impact of each gap. Ask for explicit confirmation before proceeding to Step 6.
If both tables are empty, report that the documentation is current and stop — no rewrite needed.
Rewrite only the documents where gaps were found. Never cite a superseded or retired TOR ID in
either document (tor-lifecycle titles <ID> says which): name its Change Record (CR-…) and the
live successor(s) instead — check reports any such citation as finding E.
docs/architecture.mdDockerfile — stage names, base images, ARG namesdocs/design-notes.mdCANNOT VERIFY items from wrapup handoffsAfter rewriting, verify the highest-stakes claims before committing:
architecture.md?architecture.md?package.json and .csproj (or equivalent) — do the framework versions match what the docs now say?design-notes.md?Report any remaining discrepancies. Fix them before proceeding to Step 8.
Ask the user if they'd like to commit the refreshed documents. If the user confirms:
sh "${CLAUDE_PLUGIN_ROOT}/scripts/tor-lifecycle" check --base <base>: an E finding marked [this branch] is a superseded or retired ID this rewrite cited — name its CR-… and successor instead.develop, main, or master), first git checkout -b docs/refresh-<YYYY-MM-DD>, and
after the commit ask via AskUserQuestion ["Merge into <base> locally", "Leave the branch for a PR"] — Merge: git checkout <base> && git merge --no-ff -m "docs: merge docs/refresh-<YYYY-MM-DD> — refresh architecture and design notes" docs/refresh-<YYYY-MM-DD> && git branch -d docs/refresh-<YYYY-MM-DD>. On any other branch, commit there.docs/architecture.md and/or docs/design-notes.md)docs: refresh architecture and design notes to as-built stateDo NOT push — leave that for the user.
What SKILL.md sets; muted values are Claude Code's defaults
15 skills in this plugin
/addAdds new epic(s) to the implementation plan from a natural language description.
Epics reference TOR requirement IDs from docs/requirements/*.feature.md as their Requirements
Anchors — the TOR ID is the acceptance criterion and the Given/When/Then is the verification.
Use when the user wants to add a single epic or small batch without re-running full planning.
Triggers on: "add epic", "new epic", "create epic", "I need to add more work",
"there's a new feature we need", "can we squeeze in", "add a feature",
"another thing we need to build".
/capture-requirementsDerives formal Gherkin-style TOR requirements (.feature.md files) from product-vision.md and
concept-of-operations.md. Main agent adopts a seasoned-PM persona to author feature files
autonomously; Haiku sub-agent verifies traceability and writes .feature.tracing.json sidecars.
Changes to merged requirements (reword, supersede, retire, record as pending, uphold) each leave a
Change Record in docs/requirements/changes/. With a TOR ID argument it amends that one
requirement (e.g. one that changed since it was verified, or one known to be wrong).
User reviews via the docs/ branch and merge — there is no inline interview.
Run after /peak-workflow:discover and before /peak-workflow:plan-project.
Triggers on: "capture requirements", "derive requirements", "write feature files",
"create TOR requirements", "formalize requirements", "establish requirements baseline",
"generate TOR IDs", "requirements capture", "amend requirement", "retire requirement",
"supersede requirement".
/discoverAdaptive discovery interview that produces product-vision.md and concept-of-operations.md.
Use when starting a new project (greenfield) or evolving an existing project's direction (brownfield).
Creates a docs/{task-short-name} branch if on develop/main/master so all planning artifacts
travel through a reviewable branch before merging to develop.
Triggers on: "discover", "new project", "product vision", "concept of operations", "what should we build",
"let's figure out what to build", "I have an idea for an app", "brainstorm features",
"requirements gathering", "what are we building", "help me scope this out".
/mockupLow-fidelity UX prototyping on the docs/ branch. Turns ConOps operational scenarios into a
screen inventory, per-scenario screen flows, and grayscale HTML wireframes, then feeds the
screen and control names back into the ConOps steps so /peak-workflow:capture-requirements
derives TORs against named screens and states. Web app, Desktop app, and UI-bearing Hybrid
projects only. Run after /peak-workflow:discover and before /peak-workflow:capture-requirements.
Triggers on: "mockup", "wireframe", "prototype the screens", "sketch the UI",
"what screens do we need", "screen flow", "storyboard the app".
/new-projectFront-door router for newcomers. Reads the project's format stamp to tell a fresh
project, an existing peak-workflow project, and one that needs /peak-workflow:upgrade
apart, and dispatches to the correct entry point. Writes no state files.
Use when starting work on a project for the first time and you're not sure which
command to run.
Triggers on: "new project", "where do I start", "first time here",
"help me get started", "I'm new to peak-workflow", "what should I run first",
"set up a new project", "start a new project".
/pausePauses current epic implementation and saves progress to a handoff file.
Use when stopping mid-epic before the session ends.
Triggers on: "pause epic", "stop epic", "save progress",
"I need to stop for today", "save my progress", "I'm done for now",
"let's pick this up later".
Note: If the user says "I'm done with epic N", check whether they mean pause (stopping mid-work) or wrapup (finished implementation). If all acceptance criteria are checked, suggest /peak-workflow:wrapup-epic instead.
npx claudepluginhub peakflames/claude-plugins-peakflames --plugin peak-workflowOther plugins' skills for the same job