archive

A command for archiving a completed work cycle. It collects project notes and results into a dated archive, then prepares the workspace for the next cycle.

In plain words
What is it for?
Use it after implementation and reflection are finished to check project records, update the README and changelog, archive the current memory files, and clean up the workspace.
Why use it?
It prevents unfinished work or missing reflections from being treated as complete and keeps past project information organized for later reference.

Command for Cursor

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 commands/zenobia0000/cursor-agentic-coding-template/archive
Clone the repo
git clone --depth 1 https://github.com/Zenobia0000/cursor-agentic-coding-template

Made for: Cursor.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,094 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00017 $0.01094
Opus 5 $0.00009 $0.00547
Sonnet 5 $0.00003 $0.00219
Haiku 4.5 $0.00002 $0.00109

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

Security

Grade A, and why

archive 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.

Origin

This is a copy

100% identical to archive — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/commands/archive.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

📚 ARCHIVE MODE (v3)

封存當前週期的知識與成果,為未來鋪路,確保沒有任何智慧被遺忘。

1. PLAN 🎯 (規劃)

Objective

將一個已完成開發週期的所有工作成果 (即 memory-bank/current/ 中的所有內容) 進行結構化歸檔,並清理工作區,為下一個週期的乾淨啟動做準備。

Guiding Rules

在執行此指令時,AI Agent 必須遵循以下規則:

  • 主要規則: .cursor/rules/principles/global.mdc
  • Git 工作流: .cursor/rules/process/git-workflow.mdc
  • 核心隔離: .cursor/rules/isolation_rules/main.mdc

Prerequisites Check

在開始封存之前,請確保:

  • 實作已完成: memory-bank/current/tasks.md 中絕大多數任務都已標記為 completed
  • 反思已完成: 一個對應的 reflection-*.md 文件已存在於 memory-bank/current/ 中。
  • Failure Action: 如果任務未完成或反思不存在,AI 必須拒絕封存,並建議用戶先執行 /implement/reflect

2. DO 実行 (執行)

Core Process

遵循一個嚴謹的、不可逆的封存流程:

Step 0: 健康檢查 (Health Check)

  • 檢查拓撲完整性: 驗證 memory-bank/current/ 中的 tasks.md, progress.md, 和 reflection-*.md 文件是否存在且狀態一致。
  • 批判性思考: 封存是一個週期的終點。AI 應檢查是否存在任何「半成品」。如果發現,應向用戶提問並請求確認。

Step 1: 文件定稿 (Finalize Documentation)

  • 基於 memory-bank/current/reflection-*.md 的內容,更新 README.mdCHANGELOG.md

Step 2: 記憶體互動 - 讀取與寫入 (Memory Interaction - Read & Write)

  • 創建封存目錄: 創建一個新的、以日期命名的封存目錄,例如 archive/sprint-2025-12-18/
  • 複製記憶體:整個 memory-bank/current/ 目錄的內容複製到新的封存目錄中。
  • 清理工作區:用戶確認後,清理 memory-bank/current/ 中的內容。

Step 3: 版本控制 (Version Control)

  • Git Add: 將新的 archive/ 目錄和更新的 README.md / CHANGELOG.md 添加到 Git 暫存區。
  • Git Commit: 創建一個標準化的提交訊息,例如 chore(project): archive sprint-2025-12-18 work cycle

3. CHECK ✓ (檢查)

Verification Checklist

  • 封存目錄已創建: archive/sprint-..../ 目錄和其內容是否已成功創建?
  • 記憶體已複製: 封存目錄中的文件是否與封存前的 memory-bank/current/ 內容完全一致?
  • Git 狀態正確: git status 是否顯示了預期的變更?

4. ACT 改善 (行動)

Finalization

  • 向用戶確認: 在執行清理和提交等不可逆操作之前,AI 必須向用戶請求最終批准。例如:「我已準備好將本次週期的所有成果封存到 archive/sprint-..../ 並創建一個 Git 提交。清理工作區並提交後,此操作不可逆。 是否繼續?」

Next Steps

封存完成後,一個完整的週期便告結束。

  • 👉 Primary Next Step: 執行 /van 指令,重新初始化一個乾淨的 memory-bank/current 工作區。
  • 💡 Alternative: 將專案移交給維護團隊,並告知他們 archive/ 目錄是最終的知識庫。

Read the full file on GitHub · 65 lines

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 · 65 lines · 17 tokens per session scan A ce583f43fce4

Subscribe to this mod's changes

archive is a command published in the GitHub repository Zenobia0000/cursor-agentic-coding-template (5 stars, last pushed 4mo ago), licensed MIT. It adds 17 tokens to every session and 1,094 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to archive, differing in 0 lines, and is treated as a copy.