본문으로 건너뛰기
cccskills
무료GitHub에 공개

history-design

Use when choosing HOW to record change history / audit trails — walks the tier matrix (columns → audit log → temporal → event sourcing). Triggers on 'wer hat was wann', 'audit log'.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md4.6 KB
  • evals/triggers.json1.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

history-design

When to use

  • A model/table is declared audit-scoped ("we need to know who changed what and when") and the mechanism must be chosen — NOT assumed.
  • The user asks for an audit trail, change history, activity log, or proposes event sourcing.
  • NOT for reviewing an existing migration diff (route to schema-review) and NOT for privacy/DSR policy design (route to privacy-review; this skill only wires the interlock).

Procedure

  1. Collect the requirement facts (ask ONE question only if missing): who edits the data (single editor vs multi-tenant), compliance need (GDPR/SOC2/audit), point-in-time query need, replay/projection need, expected mutation volume.

  2. Walk the tier matrix — normative, cheapest-sufficient wins:

    TierMechanismUse whenGrowth control
    0updated_at/updated_by columnssingle-editor, no compliance neednone needed
    1Row-level audit log (Laravel: spatie/activitylog or owen-it/laravel-auditing; TS: thin custom audit table)admin panels, SaaS tenant data, "wer hat was wann geändert"retention policy REQUIRED
    2DB temporal/system-versioned tablespoint-in-time queries needed, DB supports itpartition rotation
    3Event sourcingdomain genuinely event-driven, replay/projection neededsnapshotting + archive REQUIRED

    Default tier: 1. Tier 3 requires an explicit architecture waiver from the user — never "upgrade" to event sourcing unprompted.

  3. Apply the four interlocks to the chosen tier:

    • Hygiene (R-B3): audit storage indexed on (auditable_type, auditable_id, created_at); store JSON diffs, not full-row copies, where a diff suffices.
    • Growth (R-A7): the audit table itself declares retention (TTL, pruning job, partition rotation, or archive path) — history must not re-create the unbounded-growth problem it documents.
    • Privacy (R-B4): audit records inherit the deletion/ anonymization obligations of the data they describe — a GDPR Art. 17 path must exist before the mechanism ships.
    • Reliability (R-B5): audit capture is same-transaction (Tier-1 default: observer + cheap single insert — allowed request-path work) OR outbox/afterCommit with a durable queue when offloaded. A lossy audit trail is worse than none.
  4. Emit the decision artifact (Output below) and, when the tier lands, hand implementation to the stack-native path (Laravel package install + config, or the thin custom audit-table pattern for TS — no dependency needed there).

Output

The decision artifact MUST contain:

  1. Tier decision line — Tier N — <mechanism> plus the one-sentence cheapest-sufficient justification.
  2. Interlock checklist — the four interlocks (hygiene, growth, privacy, reliability) each with its concrete answer for this model, not a bare checkmark.
  3. Rejected-tier note — one line on the nearest rejected tier and why (usually why NOT event sourcing, or why Tier 0 is insufficient).

Gotcha

  • Tier-1 reference per stack — Laravel: spatie/laravel-activitylog (source-level comparison 2026-07-27: age-based activitylog:clean retention command maps directly onto the R-A7 growth budget; JSON diff columns match R-B3 hygiene) with owen-it/laravel-auditing as the forensic alternative (ip/url/user-agent/tags; count-based pruning); TS/Node: the thin custom audit-table pattern, no dependency. Re-verify the package pick against the project's framework version at decision time.
  • Tier 2 (temporal tables) depends on the database: MariaDB/SQL Server have system-versioned tables, vanilla MySQL and SQLite do not, and Postgres needs an extension or trigger pattern — verify the actual connector before recommending Tier 2.

Do NOT

  • Do NOT recommend event sourcing without an explicit architecture waiver from the user — Tier 3 is an architecture, not an audit mechanism.
  • Do NOT ship any tier without its retention/growth answer — an unbounded audit table is an F7 defect by definition.
  • Do NOT copy full row snapshots into audit records when a diff suffices — that is the denormalized-duplication failure (F4) applied to history.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when reviewing UI for accessibility — WCAG 2.2 AA, keyboard nav, focus, ARIA, contrast, screen-reader semantics — even on 'is this a11y-OK?' or 'mach das barrierefrei'.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config132026년 10월 22일 업데이트

Use when defining or auditing the activation event — aha-moment selection, retention correlation, falsifiable definition. Triggers on 'what is our aha moment', 'redefine activation'.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config132026년 10월 22일 업데이트

Use when capturing an architectural decision — file naming, next ADR number, Status / Context / Decision / Consequences, index regen; fires even without saying 'ADR'.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config132026년 10월 22일 업데이트

Adversarial critique — devil's advocate, stress-test, honest teardown ('poke holes', 'be brutal', 'was hältst du davon'); explicit request only. Routine code or design review → code-review.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config132026년 10월 22일 업데이트

Use when reading, creating, or updating agent documentation, module docs, roadmaps, or AGENTS.md. Understands the full .augment/, agents/, and copilot-instructions structure.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config132026년 10월 22일 업데이트

Use for an adversarial red-team / blue-team / auditor review of an AI agent's CONFIG + behaviour (rules, skills, MCP, hooks, permissions) — attack-chain → defensive-gap list, not a code audit.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

event4u-app/agent-config132026년 10월 22일 업데이트

event4u-app의 스킬 모두 보기

이 스킬의 문제 신고