From mst
Archives old ideation, discussion, request, and capture sessions into tar.gz files. Lists archive status, restores items, or purges via CLI args. Triggers on 'archive' keywords or /mst:archive.
npx claudepluginhub myrtlepn/gran-maestro --plugin mstThis skill uses the workspace's default tool permissions.
타입별(ideation/discussion/requests/captures) 최근 N개 항목만 활성 유지하고, 초과분을 `archived/`에 tar.gz 압축 보관합니다.
Batch cleans Maestro sessions: keeps recent N ideation/discussion/debug/plans, archives excess completed requests beyond min count, interactively prunes old active requests. Invoke via /mst:cleanup or keywords.
Revives previous sessions from YAML squirrel logs and transcripts to reconstruct context. Browses recent activity across walnuts, filters by topic/person/timeframe, flags unsaved sessions.
Excavates Claude Code session logs to track provenance for research findings, ADRs, and code contributions by tracing UUID chains across compacted sessions. Creates self-contained registry entries; useful for origin queries and git commits.
Share bugs, ideas, or general feedback.
타입별(ideation/discussion/requests/captures) 최근 N개 항목만 활성 유지하고, 초과분을 archived/에 tar.gz 압축 보관합니다.
Bash(python3 {PLUGIN_ROOT}/scripts/mst.py config get archive)의 archive 섹션:
| 설정 | 기본값 | 설명 |
|---|---|---|
max_active_sessions | 200 | 타입별 활성 유지 갯수 |
archive_retention_days | null | null=영구 보존, 숫자=N일 후 아카이브 자동 삭제 |
auto_archive_on_create | true | 새 세션 생성 시 자동 아카이브 체크 |
archive_directory | {type_dir}/archived | 타입별 아카이브 저장 경로 (자동) |
경로 규칙 (MANDATORY): 이 스킬의 모든
.gran-maestro/경로는 절대경로로 사용합니다. 스킬 실행 시작 시PROJECT_ROOT를 취득하고, 이후 모든 경로에{PROJECT_ROOT}/접두사를 붙입니다.PROJECT_ROOT=$(pwd)
{PLUGIN_ROOT}는 이 스킬의 "Base directory"에서skills/{스킬명}/을 제거한 절대경로입니다. 상대경로(.claude/...)는 절대 사용하지 않습니다.
~/.claude/user-profile.json (AskUserQuestion 컨텍스트, 비차단)~/.claude/user-profile.json을 Read한다.
user_profile_context = null로 처리하고 기존 동작을 유지한다 (graceful fallback).role (string)experience_level (string)domain_knowledge (string[])communication_style (string)user_profile_context = null로 처리한다 (워크플로우 차단 금지).AskUserQuestion과 사용자 설명 텍스트 작성 시:
communication_style을 최우선 반영한다.experience_level/domain_knowledge에 맞춰 용어 수준과 설명 깊이를 조절한다.archive 설정 로드 → 각 타입 디렉토리 스캔(IDN-/DSC-/REQ-* 수, CAP-* 수) + archived/의 tar.gz 파일 수/디스크 사용량 확인 → 현황 표시:
Gran Maestro — 아카이브 현황
═══════════════════════════════════════
설정: max_active=20, retention=영구, auto_archive=ON
타입 활성 아카이브 상태
─────────────────────────────────────
ideation 12 0 OK
discussion 8 0 OK
requests 23 0 초과 (3개 아카이브 대상)
아카이브 디스크 사용량: 0 B
--run: 수동 아카이브 실행--type {ideation|discussion|requests|cap}로 특정 타입만 실행 가능.
session.json/request.json 읽기done/completed/cancelled 아닌 세션은 절대 아카이브 금지
created_at 오래된 순 정렬 → max_active_sessions 초과분 선별{type_dir}/archived/ 생성 후 tar.gz 압축 (원본 삭제):
tar -czf {PROJECT_ROOT}/.gran-maestro/{type_dir}/archived/{type}-{ID_from}-{ID_to}-{YYYYMMDD}.tar.gz \
-C {PROJECT_ROOT}/.gran-maestro/{type_dir} {session_dirs...}
archive_retention_days 설정 시 만료된 tar.gz 자동 삭제 (mtime 기준)아카이브 완료
─────────────────────────────────────
requests: 3개 세션 아카이브됨
→ requests-REQ001-REQ003-20260217.tar.gz (24.5 KB)
원본 삭제 완료
만료 아카이브 삭제: 0개
--restore {ID}: 아카이브에서 세션 복원archived/에서 해당 ID 포함 tar.gz 탐색tar -tzf {archive_file} | grep {ID}tar -xzf {archive_file} -C {PROJECT_ROOT}/.gran-maestro/{type_dir} {session_dir}--purge [--before {YYYY-MM-DD}]: 오래된 아카이브 삭제--before: 해당 날짜 이전 tar.gz 삭제archive_retention_days 기준 만료 파일 삭제 (null이면 "보존 기간 미설정" 안내)AskUserQuestion 확인 후 실행--list: 아카이브된 세션 목록 표시각 타입 archived/의 tar.gz 파일 스캔 → tar -tzf {archive_file}로 내용 확인 → 타입별 그룹화 표시:
Gran Maestro — 아카이브 목록
═══════════════════════════════════════
ideation (2 archives):
ideation-IDN001-IDN005-20260210.tar.gz (15.2 KB)
IDN-001, IDN-002, IDN-003, IDN-004, IDN-005
ideation-IDN006-IDN010-20260215.tar.gz (18.7 KB)
IDN-006, IDN-007, IDN-008, IDN-009, IDN-010
discussion (1 archive):
discussion-DSC001-DSC003-20260212.tar.gz (8.3 KB)
DSC-001, DSC-002, DSC-003
requests (1 archive):
requests-REQ001-REQ010-20260214.tar.gz (42.1 KB)
REQ-001 ~ REQ-010
[MST skill={name} step={N}/{M} return_to={parent_skill/step | null}]skill: 현재 실행 중인 스킬 이름step: 현재 단계(N/M) 또는 서브스킬 종료 시 returnedreturn_to: 최상위 스킬이면 null, 서브스킬이면 {parent_skill}/{step_number}[MST skill={subskill} step=returned return_to={parent/step}][MST skill={name} step=1/3 return_to=null][MST skill={subskill} step=returned return_to={parent_skill}/{step_number}]archive.auto_archive_on_create=true 시 새 세션 생성 시점에 자동 체크:
max_active_sessions 초과 시:
[Archive] {type} {N}개 세션 아카이브됨 → {archive_filename} 알림done/completed/cancelled 아닌 모든 항목은 자동/수동 아카이브 모두에서 절대 아카이브 금지 (예: analyzing, collecting, phase1_analysis, phase2_execution 등).
각 타입 디렉토리의 counter.json은 절대 삭제 금지 — ID 단조 증가 카운터로 아카이브/정리 대상 아님. --run 시 대상 디렉토리(IDN-/DSC-/DBG-/REQ-/CAP-*)만 처리, counter.json은 건드리지 않음.
.gran-maestro/
├── ideation/
│ ├── IDN-* (active) + counter.json
│ └── archived/
│ └── ideation-IDN001-IDN005-20260217.tar.gz
├── discussion/
│ ├── DSC-* (active) + counter.json
│ └── archived/
│ └── discussion-DSC001-DSC003-20260217.tar.gz
├── requests/
│ ├── REQ-* (active) + counter.json
│ └── archived/
│ └── requests-REQ001-REQ010-20260217.tar.gz
├── captures/
│ ├── CAP-* (active) + counter.json
│ └── archived/
│ └── captures-CAP001-CAP003-20260217.tar.gz
├── debug/
│ ├── DBG-* + counter.json
│ └── archived/
└── plans/
└── PLN-*.md
| 상황 | 대응 |
|---|---|
{type_dir}/archived/ 생성 실패 | 쓰기 권한 확인 안내 |
| tar 명령 실패 | 에러 메시지 표시, 원본 보존 (삭제하지 않음) |
| 복원 시 ID를 찾을 수 없음 | 아카이브 목록 표시 + 올바른 ID 안내 |
| 복원 대상 디렉토리가 이미 존재 | 덮어쓰기 전 사용자 확인 |
Bash(python3 {PLUGIN_ROOT}/scripts/mst.py config get archive) 결과에 archive 섹션 없음 | 기본값 사용 (max_active=20, retention=null, auto=true) |
/mst:archive # 현황 표시
/mst:archive --run # 모든 타입 아카이브 실행
/mst:archive --run --type ideation # ideation만 아카이브
/mst:archive --run --type cap # captures만 아카이브 (TTL 기반)
/mst:archive --restore IDN-003 # IDN-003 복원
/mst:archive --list # 아카이브 목록
/mst:archive --purge # 만료 아카이브 삭제
/mst:archive --purge --before 2026-01-01 # 특정 날짜 이전 삭제
max_active_sessions 이하session.json/request.json 상태 확인--purge 또는 archive_retention_days 설정