ワンクリックで
cleanse-memory
Use when Ground Truth alignment finds memory contamination and the user explicitly requests scoped cleanup with /cleanse.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when Ground Truth alignment finds memory contamination and the user explicitly requests scoped cleanup with /cleanse.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when registering, reviewing, merging, or rebuilding HXSK glossary term definitions after glossary-detect suggests a candidate or the user invokes /define.
Use when staged changes exist requiring qlty checks, logical split detection, or HXSK phase-scoped conventional commit creation.
Use when validating code for circular imports, layer violations, or design doc logic errors before merging architecture-level changes.
Use when .hxsk/.bootstrap-version is missing (fresh install) or exists (verify/update) to initialize HExoskeleton.
Use when shell scripts need linting/formatting before execution or commit to ensure code quality.
Use when analyzing an existing codebase to generate ARCHITECTURE.md and STACK.md, or when mapping project structure, dependencies, patterns, integrations, and technical debt before planning.
| description | Use when Ground Truth alignment finds memory contamination and the user explicitly requests scoped cleanup with /cleanse. |
| name | cleanse-memory |
/cleanse <gt-id> 또는 /cleanse --all.hxsk/.purge-log.tsv appendHXSK_CONTRADICTION_CHECK=0으로 신규 저장 시 contradiction check 비활성화.purge-log.tsv (git 추적) + git history로 삭제 이력 복구 가능/cleanse <gt-source-id> # 특정 GT 소스 scope 내 메모리만 검사
/cleanse --all # sources.yaml 내 모든 GT 소스 순회
/cleanse --dry-run <gt-id> # 삭제 없이 후보 목록만 출력
gt-source-id는 .hxsk/ground-truth/sources.yaml의 id 필드값.
예시: /cleanse hxsk-spec, /cleanse anthropic-sdk-docs
cat .hxsk/ground-truth/sources.yaml
<gt-id>에 해당하는 항목의 scope, authority, type, path/url 추출type: docs이고 url: ""이면 → HITL 재질문: "GT URL을 입력해주세요. 없으면 Skip."scope: []이면 → HITL 재질문: "scope가 비어있습니다. 적용 범위를 지정해주세요."bash .hxsk/hooks/md-recall-memory.sh "<scope_tag>" "." 20 full 1
각 파일에 대해 GT 사실과 비교:
HITL 선택지:
[D] 삭제 — 확실한 오염, 영구 삭제 + purge-log 기록
[K] 보관 — 다른 scope로 이동 또는 태그 분리 후 보존
[G] GT 오류 — 이 메모리가 맞고 GT가 오류, Skip (메모리 유지)
[S] Skip — 판단 보류, 이번 sweep에서 제외
# 1. 파일 삭제
rm "<memory_filepath>"
# 2. purge-log.tsv append
echo "$(date -u +%Y-%m-%dT%H:%M:%SZ)\t<memory_id>\t<reason>\t<gt-id>\t<summary_≤200chars>\t<hitl_choice>" \
>> .hxsk/.purge-log.tsv
# 3. 관련 메모리의 contradicted_by 갱신 (있는 경우)
# related 파일 목록 조회 후 해당 파일의 contradicted_by 배열에 삭제된 파일명 추가
purge-log 컬럼 형식:
| 컬럼 | 설명 |
|---|---|
| deleted_at | ISO-8601 UTC |
| memory_id | 파일 basename |
| reason | 1줄 삭제 사유 (≤80자) |
| gt_source | GT id (sources.yaml id 값) |
| original_summary | contextual_description ≤200자 |
| hitl_decision | D / K / G / S |
🔍 Cleanse Report: <gt-id>
검사: N건 | 삭제: M건 | 보관: K건 | Skip: S건
purge-log: .hxsk/.purge-log.tsv (M행 추가)
--all 모드도 각 GT의 scope 경계 준수 (GT별 독립 sweep)type: docs이고 url: ""인 GT → 자동 fetch 금지, HITL로 URL 요청--dry-run 시 실제 삭제·purge-log 기록 금지, 후보 목록과 예상 삭제 수만 출력.hxsk/ground-truth/sources.yaml — GT 소스 카탈로그.hxsk/.purge-log.tsv — 삭제 audit trail (git 추적).hxsk/hooks/md-recall-memory.sh — 메모리 검색 (provenance 우선순위 적용).hxsk/hooks/md-store-memory.sh — 저장 시 contradiction check (ADR-007).hxsk/adapters/hitl/ — HITL 어댑터 (하네스별)