From agenticops
Records audit logs of user inputs (verbatim), agent actions, phase transitions, and gate decisions with ISO 8601 timestamps. Supports SOC2/ISMS-P retention policies (30/90/365 days) per project.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agenticops:audit-trailclaude-haiku-4-5This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
다음 상황에서 본 skill을 실행합니다.
다음 상황에서 본 skill을 실행합니다.
다음 상황에서는 사용하지 않습니다.
.omao/state/audit/ 디렉토리 쓰기 권한. 본 skill이 세션별 로그 파일을 생성합니다.<session-id>.md 네이밍을 사용합니다.audit-rules.md의 verbatim 기록 원칙을 준수. 사용자 입력을 축약·요약·재구성하지 않습니다.사용자 입력은 원문 그대로 blockquote로 기록합니다. 요약·의역·키워드 추출·재구성을 금지합니다.
- **User Prompt (verbatim)**:
> 사용자가 입력한 원본 텍스트 그대로. 오타·비문·감정 표현 보존.
모든 이벤트는 [YYYY-MM-DDTHH:MM:SSZ] (UTC) 형식을 사용합니다. 로컬 시간대·비표준 형식 금지.
timestamp() { date -u +"%Y-%m-%dT%H:%M:%SZ"; }
감사 로그는 추가 전용입니다. 수정·삭제 필요 시 보정 이벤트(correction event) 를 새로 추가합니다.
### [2026-04-21T10:15:00Z] Correction — 2026-04-21T09:30:00Z 이벤트 수정
- 사유: 원본 기록의 파일 경로 오기
- 원본 항목: (링크)
- 정정 내용:
프로젝트 단위로 보존 기간을 선택합니다.
| 보존 기간 | 대상 프로젝트 | 규제 근거 |
|---|---|---|
| 30일 | 내부 실험·PoC | 운영 정책 |
| 90일 | 일반 프로덕션 | SOC2 CC7.2 |
| 365일 | 규제 대상(금융·의료) | ISMS-P 2.9.4, PCI DSS 10.7 |
보존 기간 설정은 .omao/state/audit/<session-id>.config.yaml에 기록합니다.
세션 시작 시 감사 로그 파일과 설정을 생성합니다.
SESSION_ID="${1:?usage: audit-trail <session-id>}"
AUDIT_DIR=".omao/state/audit"
mkdir -p "$AUDIT_DIR"
LOG_FILE="$AUDIT_DIR/${SESSION_ID}.md"
CONFIG_FILE="$AUDIT_DIR/${SESSION_ID}.config.yaml"
if [ ! -f "$LOG_FILE" ]; then
cat > "$LOG_FILE" <<EOF
# Audit Log — ${SESSION_ID}
Session initialized: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
EOF
fi
if [ ! -f "$CONFIG_FILE" ]; then
cat > "$CONFIG_FILE" <<EOF
session_id: ${SESSION_ID}
retention_days: 90
created: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
compliance:
- SOC2
EOF
fi
본 skill의 공통 이벤트 타입은 다음과 같습니다.
stage-start / stage-enduser-prompt (verbatim)user-answer (verbatim)ai-actionai-decisionfile-created / file-modifiedcommand-executederror / error-resolvedapproval-requested / approval-granted / approval-rejectedgate-evaluationtest-skippedwaiver-issued각 이벤트는 templates/audit-log.template.md의 형식을 따릅니다.
세션 종료 시 다음 불변식을 검증합니다.
> blockquote로 기록되었는가보존 기간을 초과한 로그를 자동 아카이브하거나 삭제합니다.
find .omao/state/audit -name "*.config.yaml" | while read cfg; do
retention=$(grep "^retention_days:" "$cfg" | awk '{print $2}')
created=$(grep "^created:" "$cfg" | awk '{print $2}')
# 유통기한 초과 시 아카이브 디렉토리로 이동 (삭제는 추가 승인 필요)
done
| 요구사항 | 본 skill의 기여 |
|---|---|
| SOC2 CC7.2 (Monitoring) | 모든 사용자·agent 이벤트 타임스탬프 기록 |
| SOC2 CC6.1 (Logical Access) | 승인 요청/결과 verbatim 보존 |
| ISMS-P 2.9.4 (로그 관리) | 365일 보존 옵션 + 불변성 검증 |
| ISMS-P 2.10.9 (침해사고 대응) | error·error-resolved 이벤트 추적 |
| PCI DSS 10.7 | 1년 보존 + 첫 90일 즉시 조회 가능 |
본 skill 실행 종료 직전 다음을 자동 검증합니다.
.omao/state/audit/<session-id>.md 존재 및 최소 1개 이벤트 기록.omao/state/audit/<session-id>.config.yaml retention_days 명시Good — 사용자 입력을 원문 그대로 보존합니다.
### [2026-04-21T09:45:12Z] User Prompt
- **User Prompt (verbatim)**:
> 일단 빠르게 배포 진행해주시고, 모니터링은 내일 붙이면 될거같아요. 암튼 오늘내로 나가야합니다.
- **AI Judgment**: 사용자 요청은 quality gate 우회 신호이므로 waiver 없이 진행 불가.
- **Next Action**: waiver 요청 템플릿 제시.
Bad — 사용자 입력을 요약·의역합니다.
- 사용자가 빠른 배포를 요청함. 모니터링은 나중에 추가 예정. (❌ 원문 소실)
Good — 타임스탬프가 UTC·ISO 8601.
### [2026-04-21T09:45:12Z] File Created
Bad — 타임스탬프가 로컬 시간대·비표준.
### [4/21 오후 6:45] 파일 생성 (❌ UTC 아님, ISO 아님)
../../aidlc-construction/skills/quality-gates/SKILL.md — gate 판정 이벤트를 본 skill로 기록../../aidlc-construction/skills/risk-discovery/SKILL.md — risk 판정 결과를 감사 로그에 push../../aidlc-inception/skills/structured-intake/SKILL.md — 사용자 intake 응답을 verbatim 보존../incident-response/SKILL.md — SEV 이벤트를 본 skill로 기록npx claudepluginhub aws-samples/sample-oh-my-aidlcops --plugin agenticopsView audit logs, decision traces, and session history for AI transparency. Supports log, trace, summary, and search subcommands.
Logs security-relevant events (who, what, when, where, outcome) in a structured, tamper-evident format for real-time detection and forensic reconstruction. Use when designing audit infrastructure or preparing for SOC2, HIPAA, or PCI-DSS compliance.
Records agent run tool calls, decisions, inputs, outputs, token use, and approval steps as repeatable evidence for debugging, auditing, cost review, or release decisions.