SuperAPI AI Directory

project-archive

Office & productivity

View repository

Updated 10-16 08:46

About this skill

/finance:project-archive — Project Archiving

Mark a closed project as archived, with the directory read-only.

Command Format

/finance:project-archive <project-code> [--force]

Parameters:

  • <project-code>: project code
  • --force: skip status check (force archive active project)

Status Transition

planning → active → fieldwork → reporting → closed → archived
                                                  ↑
                                              此处开始只读

Can only be archived in closed status(unless --force)。

Operation Steps

Step 1: Validate Status

Read project.md 's 状态 field:

Current Status Archivable Handling
closed ✅ Archive directly
reporting ⚠️ Prompt "The project is still in the reporting stage. Confirm archiving?"
active / fieldwork / planning ❌ Reject, require close first (change status to closed)
archived ✅ Idempotent operation, output "The project is already archived"

Step 2: Validate Completeness

Check whether the project directory is complete:

  • project.md exists
  • Key deliverables exist (by type):
    • annual-audit:findings/ at least 1
    • m-and-a:due-diligence/ at least 1
    • budget-review:variance-analysis/ at least 1
    • Other: skip

When incomplete, output a warning but do not block archiving.

Step 3: Write Archive Information

Modify project.md:

  • 状态: closed → archived
  • Add 归档时间: {YYYY-MM-DD HH:MM}
  • Add 归档人: {current-user}

Optional: move the directory to ~/.config/finance-skills/projects/_archive/{code}-{YYYY}/(recommended)

Step 4: Mark Read-Only

chmod -R 555 ~/.config/finance-skills/projects/{code}/

Only ~/.config/finance-skills/projects/{code}/project.md remains writable (to allow reopen).

Step 5: Output Archive Result

════════════════════════════════════════
📦 项目已归档

代码: {code}
名称: {name}
原始周期: {start} ~ {end}
关闭时间: {closed_date}
归档时间: {archive_date}
归档人: {user}

项目目录: ~/.config/finance-skills/projects/_archive/{code}-{YYYY}/
权限: 只读

历史保留 5 年({archive_date} + 5 年后自动清理)
════════════════════════════════════════

恢复项目:/finance:project-switch {code}(会自动 reopen 到 closed 状态)
════════════════════════════════════════

History Retention Policy

归档后保留时间:5 年
├── 0-1 年:完整保留,可随时 reopen
├── 1-3 年:压缩归档(tar.gz),reopen 需手动解压缩
└── 3-5 年:标记为"待清理",到期自动提示用户
> 5 年:自动清理(除非用户标记"永久保留")

Permanent retention: add the 永久保留: true field in project.md.


Examples

→ Example: the user says "archive the 2025 annual audit project"; the system validates that the status is closed (if not closed, requires close first), and performs archiving.

→ Example: the user says "force archive the M&A alpha project"; the system uses --force to skip the status check.


Notes

  • Archiving is irreversible (unless reopened): after archiving, the directory is read-only, and modifications to deliverables will be denied by permissions
  • Credentials have been cleared: before archiving, automatically check whether ~/.config/finance-skills/credentials/ references the project ID; if so, prompt for cleanup
  • Cross-year audit association: when archiving 2025-audit, ask "Should the findings from this period be automatically synced to the 'Historical Context' section of 2026-audit?" (annual audit continuity requirement)