agentleFS
ww-w-aiww-w-ai/bkit-claude-code/skills/audit/SKILL.md

audit

Skill605 starsChanged 3 months agoApache-2.0View on GitHub

View audit logs, decision traces, and session history for AI transparency. ACTION_TYPES (19 entries) include PDCA events (phase_transition, gate_passed/failed, agent_spawned/completed/failed, rollback_executed, destructive_blocked) and Sprint events (sprint_paused, sprint_resumed, master_plan_created — v2.1.13). Triggers: audit, log, decision trace, history

194 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use delight, teach-impeccable and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • HK-hubSkill

    delight

    Add moments of joy, personality, and unexpected touches that make interfaces memorable and enjoyable to use. Elevates functional to delightful. Use when the user asks to add polish, personality, animations, micro-interactions, delight, or make an interface feel fun or memorable.

    Also in 32 projects that use this

  • HK-hubSkill

    teach-impeccable

    One-time setup that gathers design context for your project and saves it to your AI config file. Run once to establish persistent design guidelines.

    Also in 19 projects that use this

  • zwy123zwySkill

    normalize

    将用户随意输入的提示词规范化为结构清晰、便于大模型执行的标准化提示词。适用于需要整理、统一提示词格式时调用。

    Also in 19 projects that use this

  • SkillPilotCHSkill

    level-up

    Eine Automatisierung pro Woche finden, scopen, shippen. Output landet als proposed-Eintrag in cadence.md mit konkreten Implementations-Schritten.

    Also in 12 projects that use this

  • +7 more from HK-hub

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 174 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read today's audit log from .bkit/audit/YYYY-MM-DD.jsonl

    line 43
  2. Distinctive:

    If today's log is empty or has fewer than 20 entries, also read yesterday's log

    line 44
  3. Very specific:

    Read decision trace files from .bkit/decisions/YYYY-MM-DD.jsonl

    line 83
  4. Distinctive:

    Read audit logs for the current day (and optionally past 7 days)

    line 127
  5. Distinctive:

    Search audit logs by action type, feature name, or date range.

    line 164
  6. Very specific:

    If query matches an action type (e.g., phase_transition), filter by action

    line 167
  7. Distinctive:

    If query matches a feature name, filter by feature

    line 168
  8. Distinctive:

    If query matches a date (YYYY-MM-DD), filter by date

    line 169
  9. Very specific:

    Read relevant JSONL files from .bkit/audit/

    line 171

“Common” is measured: kept by at least 6 in 10 of the 174 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Audit Skill

User-invocable skill for viewing audit logs, decision traces, and session history.

Arguments

ArgumentDescriptionExample
(none)Show recent audit log entries (same as log)/audit
logShow recent audit log entries (last 20)/audit log
trace <feature>Show decision traces for a feature/audit trace user-auth
summaryShow daily/weekly audit summary/audit summary
search <query>Search audit logs by action type, feature, or date/audit search "phase_transition"

Action Details

log (Default)

Display recent audit log entries.

  1. Read today's audit log from .bkit/audit/YYYY-MM-DD.jsonl
  2. If today's log is empty or has fewer than 20 entries, also read yesterday's log
  3. Parse JSONL entries (one JSON object per line)
  4. Display the last 20 entries in reverse chronological order
  5. Format each entry with timestamp, action, feature, and details

JSONL Entry Schema:

{
  "timestamp": "2026-03-19T10:30:00.000Z",
  "action": "phase_transition",
  "feature": "user-auth",
  "from": "plan",
  "to": "design",
  "automationLevel": "semi-auto",
  "triggeredBy": "user",
  "details": "Plan approved, transitioning to Design"
}

Output Format:

--- Audit Log (Last 20 Entries) -------------------
[2026-03-19 10:30] phase_transition | user-auth
  plan -> design (Semi-Auto, user-triggered)

[2026-03-19 10:25] checkpoint_created | user-auth
  Checkpoint cp-1710842700000 before Design phase

[2026-03-19 10:20] automation_level_changed | -
  L1 -> L2 (trust score: 72)
...
---------------------------------------------------
Total entries today: 45

trace <feature>

Show decision traces for a specific feature.

  1. Read decision trace files from .bkit/decisions/YYYY-MM-DD.jsonl
  2. Filter entries matching the specified feature
  3. Display chronological decision chain with rationale

Decision Trace Entry Schema:

{
  "timestamp": "2026-03-19T10:30:00.000Z",
  "feature": "user-auth",
  "decision": "advance_to_design",
  "rationale": "Plan document complete, matchRate N/A at this phase",
  "alternatives": ["request_plan_revision", "skip_to_do"],
  "chosenBecause": "Plan deliverable exists and passes validation",
  "automationLevel": "semi-auto",
  "confidence": 0.92
}

Output Format:

--- Decision Trace: user-auth ---------------------
[10:15] START -> pm
  Decision: Begin PDCA cycle
  Rationale: New feature request detected

[10:20] pm -> plan
  Decision: advance_to_plan
  Rationale: PRD document generated successfully
  Alternatives: [reject_prd, revise_scope]
  Confidence: 0.88

[10:30] plan -> design
  Decision: advance_to_design
  Rationale: Plan document complete, passes validation
  Alternatives: [request_plan_revision, skip_to_do]
  Confidence: 0.92
---------------------------------------------------
Total decisions: 3

summary

Show daily or weekly audit summary.

  1. Read audit logs for the current day (and optionally past 7 days)
  2. Aggregate by action type and count occurrences
  3. Calculate key metrics:
    • Total actions recorded
    • Phase transitions count
    • Automation vs manual ratio
    • Error/recovery events
    • Average trust score change
  4. Display formatted summary

Output Format:

--- Audit Summary (2026-03-19) --------------------
Total Actions       : 45
Phase Transitions   : 12
Checkpoints Created : 4
Errors Recorded     : 1
Recoveries          : 1

Action Breakdown:
  phase_transition       : 12 (27%)
  checkpoint_created     :  4 (9%)
  match_rate_recorded    :  8 (18%)
  automation_level_change:  2 (4%)
  iteration_completed    :  6 (13%)
  other                  : 13 (29%)

Automation Ratio: 67% auto / 33% manual
Trust Score Change: +3 (69 -> 72)
---------------------------------------------------
Weekly Trend (last 7 days):
  Mon: 32 actions | Tue: 45 actions | Wed: 28 actions
  ...

search <query>

Search audit logs by action type, feature name, or date range.

  1. Parse the search query to determine filter type:
    • If query matches an action type (e.g., phase_transition), filter by action
    • If query matches a feature name, filter by feature
    • If query matches a date (YYYY-MM-DD), filter by date
    • Otherwise, perform full-text search across all fields
  2. Read relevant JSONL files from .bkit/audit/
  3. Apply filters and return matching entries (max 50 results)
  4. Display results in chronological order

Search Examples:

# Search by action type
/audit search "phase_transition"

# Search by feature name
/audit search "user-auth"

# Search by date
/audit search "2026-03-18"

# Full-text search
/audit search "error"

File Locations

PathFormatPurpose
.bkit/audit/YYYY-MM-DD.jsonlJSONLDaily audit log entries
.bkit/audit/summary/JSONPre-computed daily/weekly summaries
.bkit/decisions/YYYY-MM-DD.jsonlJSONLDecision trace entries

Module Dependencies

ModuleFunctionUsage
lib/audit/audit-logger.jsreadAuditLog()Read audit entries
lib/audit/audit-logger.jssearchAuditLog()Search/filter entries
lib/audit/decision-tracer.jsgetDecisionTrace()Read decision traces

Retention Policy

  • Audit logs: 30-day retention, auto-cleanup via daily hook
  • Decision traces: 30-day retention, linked to audit logs
  • Total storage budget: 100MB (auto-prune oldest when exceeded)

Usage Examples

# View recent log entries
/audit

# View decision trace for a feature
/audit trace user-auth

# View daily summary
/audit summary

# Search for phase transitions
/audit search "phase_transition"

# Search by feature
/audit search "user-auth"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.