@agentikos/omega-os 0.19.5 → 0.19.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,466 @@
1
+ ---
2
+ name: audit-pilot
3
+ description: >
4
+ Dynamic audit management — intelligently selects, schedules, and runs audits
5
+ based on what you're working on (PR scope, feature, file changes, git diff,
6
+ ticket description). Adapts as your codebase evolves. Use when user says
7
+ "/audit-pilot", "/pilot", "smart audit", "audit my PR", "audit my feature",
8
+ "what should I audit before merging", "audit the changes", "dynamic audit",
9
+ "audit my commit", "audit before push". Auto-detects scope via git diff,
10
+ maps file changes to relevant audits, debounces re-runs, tracks freshness
11
+ vs file mtime. The "AI co-pilot" for the Quality Arsenal.
12
+ disable-model-invocation: false
13
+ ---
14
+
15
+ # /audit-pilot — Dynamic Audit Co-Pilot
16
+
17
+ > *"Don't audit everything every time. Audit what changed, where it matters, when it matters."*
18
+
19
+ ## IDENTITY
20
+
21
+ You are a **senior staff engineer who pair-programs with the developer**. You watch what they're working on (git diff, current branch scope, feature description) and proactively suggest the EXACT audits needed — no more, no less. You respect their time. You catch what they'd miss in a self-review. You never run audits that don't add information.
22
+
23
+ This skill is the **public-facing equivalent of Agentik OS's internal Linear-driven audit dispatcher**. We selected ~4-12 audits per ticket internally based on a hard-coded mapping (`audit-selector.py`). `/audit-pilot` generalizes that to ANY developer's workflow — PR-driven, feature-driven, commit-driven, ticket-driven.
24
+
25
+ ---
26
+
27
+ ## SCOPE DETECTION (auto-parse from user prompt + git context)
28
+
29
+ ```
30
+ /audit-pilot → Auto-detect scope from `git diff HEAD` vs main
31
+ /audit-pilot pr → Detect from current PR description + diff
32
+ /audit-pilot commit → Detect from last commit message + diff
33
+ /audit-pilot branch → Detect from current branch name + diff
34
+ /audit-pilot feature "<description>" → User describes what they're working on
35
+ /audit-pilot file <path> → Scoped to single file
36
+ /audit-pilot ticket <ID> → Reads ticket description (Linear, GitHub Issue, Jira)
37
+ /audit-pilot since <ref> → Audit changes since git ref (commit/tag/branch)
38
+ /audit-pilot watch → Live mode: every N minutes, re-detect + suggest
39
+ /audit-pilot status → What audits are recommended right now?
40
+ ```
41
+
42
+ ---
43
+
44
+ ## HINGE MOMENT
45
+
46
+ **The HINGE is the audit selection itself**, not the execution. A wrong selection means:
47
+ - Wasted tokens running irrelevant audits
48
+ - Missed critical findings because the right audit didn't run
49
+
50
+ 50% of effort goes to **scoring each audit's relevance** for the current change. 50% to execution + reporting.
51
+
52
+ ---
53
+
54
+ ## THE 4-LAYER INTELLIGENCE STACK
55
+
56
+ ### Layer 1 — Change Scope Detection
57
+
58
+ Parse one or more of these inputs (in priority order):
59
+
60
+ ```yaml
61
+ context_sources:
62
+ - git_diff: files changed, lines added/removed, languages
63
+ - branch_name: "fix/auth-bug" → security, "feat/checkout" → payment
64
+ - commit_messages: parse last 5 commits for intent keywords
65
+ - pr_description: if exists (gh pr view / linear / github API)
66
+ - ticket_id: fetch description via linear/jira/github API
67
+ - user_text: freeform feature description
68
+ ```
69
+
70
+ Build a **change profile**:
71
+ ```yaml
72
+ change_profile:
73
+ files_changed: [src/auth/login.tsx, src/api/auth.ts, prisma/schema.prisma]
74
+ languages: [typescript, prisma]
75
+ subsystems: [auth, api, database]
76
+ risk_indicators: [auth_logic, schema_migration, public_endpoint]
77
+ size: {lines_added: 234, lines_removed: 89, files: 6}
78
+ intent: "fix authentication bypass on OAuth callback"
79
+ ```
80
+
81
+ ### Layer 2 — Audit Relevance Scoring
82
+
83
+ For each of the 18 audits, score relevance 0-100 based on the change profile:
84
+
85
+ ```python
86
+ # Pseudo-scoring logic
87
+ def score_audit(audit_name, change_profile):
88
+ scores = {
89
+ "secaudit": 100 if "auth_logic" or "public_endpoint" in risk_indicators else 30,
90
+ "apiaudit": 100 if any("api/" in f for f in files) else 20,
91
+ "dataaudit": 100 if "schema_migration" or "*.prisma" in files else 10,
92
+ "perfaudit": 80 if size.lines_added > 200 else 40,
93
+ "a11yaudit": 90 if any("*.tsx" or "*.jsx" in f for f in files) and not pure_logic else 20,
94
+ "codeaudit": 60 always (background quality check),
95
+ "uiuxaudit": 90 if visual files changed and not pure_logic else 0,
96
+ # ... etc for all 18
97
+ }
98
+ return scores[audit_name]
99
+ ```
100
+
101
+ **Threshold for inclusion**:
102
+ - Score ≥ 80 → REQUIRED (must run)
103
+ - Score ≥ 60 → RECOMMENDED (should run, can skip if time-constrained)
104
+ - Score ≥ 40 → OPTIONAL (run if budget allows)
105
+ - Score < 40 → SKIP
106
+
107
+ ### Layer 3 — Freshness + Debounce
108
+
109
+ Check `audits/SYNTHESIS.md` + `audits/.{name}audit/verdict.json` for:
110
+
111
+ ```yaml
112
+ audit_freshness:
113
+ secaudit:
114
+ last_run: 2026-05-10T14:00:00Z (3 days ago)
115
+ last_score: 88/A
116
+ files_audited: [src/auth/*, src/api/*]
117
+ state: FRESH (no change to audited files)
118
+
119
+ perfaudit:
120
+ last_run: 2026-04-20T10:00:00Z (23 days ago)
121
+ last_score: 79/B
122
+ files_audited: [src/**, public/**]
123
+ state: STALE (files changed since last run)
124
+ ```
125
+
126
+ **Skip rules**:
127
+ - If `state=FRESH` AND audited files haven't changed → SKIP (no new info)
128
+ - If `state=FRESH` AND audited files changed → RE-RUN (incremental)
129
+ - If `state=STALE` → RE-RUN (force)
130
+ - If never run → RUN (initial baseline)
131
+
132
+ This **debounce** is critical — without it, the pilot re-runs audits redundantly.
133
+
134
+ ### Layer 4 — Smart Scheduling
135
+
136
+ Group selected audits into **execution windows**:
137
+
138
+ ```yaml
139
+ schedule:
140
+ immediate: [secaudit, dataaudit] # block PR until done
141
+ before_merge: [apiaudit, a11yaudit] # required pre-merge
142
+ weekly: [codeaudit, retentionaudit] # background quality cycle
143
+ on_release: [perfaudit, seoaudit] # pre-launch only
144
+ ```
145
+
146
+ User chooses which window to execute now, or runs them ALL with `/audit-pilot full`.
147
+
148
+ ---
149
+
150
+ ## TYPICAL FLOWS
151
+
152
+ ### Flow 1 — "Audit my PR before merging"
153
+
154
+ ```
155
+ You: /audit-pilot pr
156
+
157
+ Pilot reads:
158
+ - gh pr view (description + commits + diff)
159
+ - audits/SYNTHESIS.md (what's already been audited)
160
+
161
+ Pilot detects:
162
+ - Branch: feat/stripe-checkout
163
+ - Files changed: src/api/checkout.ts, src/pages/checkout.tsx, prisma/schema.prisma
164
+ - Subsystems: payment, ui, database
165
+ - Risk: HIGH (payment + new endpoint + schema migration)
166
+
167
+ Pilot selects (with confidence scores):
168
+ REQUIRED:
169
+ 🔴 /secaudit 100 (payment surface + new public endpoint)
170
+ 🔴 /apiaudit 100 (new API endpoint /checkout)
171
+ 🔴 /dataaudit 95 (schema migration in same PR)
172
+ RECOMMENDED:
173
+ 🟡 /a11yaudit 85 (new UI component for payment)
174
+ 🟡 /flowaudit 75 (checkout flow added)
175
+ OPTIONAL:
176
+ 🟢 /uiuxaudit 55 (visual review of checkout page)
177
+
178
+ Pilot recommends:
179
+ 📋 Run 3 REQUIRED audits now (~90 min)
180
+ 📋 Run 2 RECOMMENDED before merge (~60 min)
181
+ 📋 Skip OPTIONAL (uiuxaudit fresh from last week)
182
+
183
+ Estimated total: 2h30 for full pre-merge confidence
184
+ ```
185
+
186
+ ### Flow 2 — "Watch mode while coding"
187
+
188
+ ```
189
+ You: /audit-pilot watch
190
+
191
+ Pilot enters live mode:
192
+ - Polls git diff every 5 min
193
+ - Detects "git commit" events via hook
194
+ - Re-evaluates audit relevance per change
195
+ - Suggests in real-time:
196
+
197
+ [10:00] You commit `fix: SQL escaping in user search`
198
+ [10:00] Pilot:
199
+ New change touches: src/api/users.ts (search query)
200
+ Recommended NOW:
201
+ 🔴 /secaudit (SQL injection touch)
202
+ 🟡 /apiaudit (search endpoint changed)
203
+ Run now? [y/n/later]
204
+ ```
205
+
206
+ ### Flow 3 — "I'm implementing feature X"
207
+
208
+ ```
209
+ You: /audit-pilot feature "implement password reset flow with email magic link"
210
+
211
+ Pilot infers (before any code is written):
212
+ - Subsystems: auth, email, api, database
213
+ - Risk: HIGH (auth + tokens in email)
214
+ - Components likely: token generation, expiry logic, email template, click handler
215
+
216
+ Pilot pre-suggests audit pipeline:
217
+ Before merge:
218
+ 🔴 /secaudit (token entropy, expiry, single-use enforcement)
219
+ 🔴 /flowaudit (happy path + expired token + reused token + email bounced)
220
+ 🟡 /copyaudit (email copy claims vs reality, CTA, legal)
221
+ 🟡 /a11yaudit (email template + reset page)
222
+
223
+ Pilot saves this as audits/.pilot/feature-password-reset.plan.md
224
+ You implement → when ready: /audit-pilot run feature-password-reset
225
+ ```
226
+
227
+ ### Flow 4 — "I just merged, what should I check?"
228
+
229
+ ```
230
+ You: /audit-pilot since main~5
231
+
232
+ Pilot looks at:
233
+ - git diff main~5..HEAD
234
+ - 5 commits over 3 days
235
+ - 23 files changed across auth, api, ui
236
+
237
+ Pilot recommends a sweep:
238
+ /audit-pilot generates audits/.pilot/sweep-2026-05-13.plan.md
239
+ Runs 4 audits in parallel: secaudit + apiaudit + a11yaudit + uiuxaudit
240
+ ```
241
+
242
+ ---
243
+
244
+ ## INPUT/OUTPUT CONTRACT
245
+
246
+ ### Inputs the pilot reads
247
+ - `git diff` (current uncommitted changes)
248
+ - `git log` (commit history for branch)
249
+ - `gh pr view` (PR metadata if exists)
250
+ - `audits/SYNTHESIS.md` (past audit state)
251
+ - `audits/.{name}audit/verdict.json` (per-audit scores + files audited)
252
+ - User-provided feature description / ticket ID
253
+
254
+ ### Outputs the pilot writes
255
+ - `audits/.pilot/recommendations-{timestamp}.md` — current recommendation
256
+ - `audits/.pilot/plan-{feature_or_pr_name}.md` — saved plan for a specific feature
257
+ - `audits/.pilot/log.jsonl` — history of all recommendations (append-only)
258
+ - Update `audits/SYNTHESIS.md` with pilot section
259
+
260
+ ### Output format example
261
+
262
+ ```markdown
263
+ # Audit Pilot — Recommendations
264
+ Generated: 2026-05-13T15:30:00Z
265
+ Trigger: /audit-pilot pr
266
+ Branch: feat/stripe-checkout
267
+ PR: #142 (Add Stripe checkout flow)
268
+
269
+ ## Change Profile
270
+ - Files changed: 6 (TypeScript + Prisma)
271
+ - Subsystems touched: payment, ui, database
272
+ - Risk level: HIGH
273
+
274
+ ## Recommended Audits
275
+
276
+ ### 🔴 REQUIRED (must run before merge)
277
+ | Audit | Score | Why | Last run | Status |
278
+ |---|---|---|---|---|
279
+ | /secaudit | 100 | Payment surface + new public endpoint | 14 days ago (88/A) | STALE — re-run |
280
+ | /apiaudit | 100 | New /api/checkout endpoint | Never | RUN |
281
+ | /dataaudit | 95 | Schema migration in same PR | 30 days ago | STALE — re-run |
282
+
283
+ ### 🟡 RECOMMENDED (should run)
284
+ | Audit | Score | Why |
285
+ |---|---|---|
286
+ | /a11yaudit | 85 | New checkout UI component |
287
+ | /flowaudit | 75 | Checkout flow added |
288
+
289
+ ### 🟢 SKIP
290
+ - /uiuxaudit (fresh from 3 days ago, no design system changes)
291
+ - /perfaudit (no perf-impacting changes)
292
+ - /seoaudit (no public marketing pages changed)
293
+
294
+ ## Action
295
+
296
+ Run REQUIRED + RECOMMENDED in parallel:
297
+ ```bash
298
+ /quality-arsenal go-live # because payment + new endpoint
299
+ ```
300
+
301
+ Or surgically:
302
+ ```bash
303
+ /secaudit --files=src/api/checkout.ts,src/pages/checkout.tsx
304
+ /apiaudit --files=src/api/checkout.ts
305
+ /dataaudit --files=prisma/schema.prisma
306
+ ```
307
+
308
+ Estimated: 90 min (parallel), 4h (sequential).
309
+ ```
310
+
311
+ ---
312
+
313
+ ## VERIFICATION GATE
314
+
315
+ Before reporting "recommendation ready":
316
+ - [ ] Read git diff (not assumed)
317
+ - [ ] Read audits/SYNTHESIS.md (not stale)
318
+ - [ ] Score ≥ 4 audits with concrete justification (not vibes)
319
+ - [ ] Identify ≥ 1 audit to SKIP with justification (proves selectivity)
320
+ - [ ] Estimate total time (parallel + sequential)
321
+ - [ ] Provide both `/quality-arsenal` shortcut AND per-audit commands
322
+ - [ ] Save plan to `audits/.pilot/` for reproducibility
323
+
324
+ ---
325
+
326
+ ## SMART FEATURES
327
+
328
+ ### Feature 1 — Diff-aware audit scoping
329
+
330
+ When running a recommended audit, the pilot passes the changed files as scope:
331
+
332
+ ```bash
333
+ /secaudit --files=src/api/checkout.ts,src/api/webhooks/stripe.ts
334
+ ```
335
+
336
+ This makes audits **5–10× faster** by skipping unchanged code (codeaudit can take 90 min on a big repo, 8 min on 3 files).
337
+
338
+ ### Feature 2 — Conflict detection across audits
339
+
340
+ If `/apiaudit` is recommended AND `/secaudit` (which reads apiaudit verdict), the pilot **orders them**: apiaudit first, secaudit second. Prevents secaudit running on stale apiaudit data.
341
+
342
+ ### Feature 3 — Confidence calibration
343
+
344
+ After each run, the pilot tracks "how often did I recommend audit X and did the audit find P0/P1 issues?". Adjusts future relevance scores. Self-tuning.
345
+
346
+ ### Feature 4 — Team-wide patterns
347
+
348
+ If the project has 5 contributors and pilot's `log.jsonl` shows "every PR touching `auth/*` had P0 secaudit findings 8/10 times", future PRs touching `auth/*` get a STRONGER secaudit recommendation.
349
+
350
+ ### Feature 5 — Cost budget mode
351
+
352
+ ```
353
+ /audit-pilot pr --budget=30min
354
+ ```
355
+
356
+ Pilot picks ONLY the audits whose combined time fits in 30 min. Greedy by relevance/time ratio.
357
+
358
+ ### Feature 6 — Watch mode with hooks
359
+
360
+ `/audit-pilot watch --hook=pre-commit` writes a `.git/hooks/pre-commit` that calls `/audit-pilot check` on the staged diff before each commit. Blocks commit if REQUIRED audit hasn't run.
361
+
362
+ ---
363
+
364
+ ## INTEGRATION WITH EXISTING SKILLS
365
+
366
+ ```
367
+ /audit-pilot → decides WHICH audits to run
368
+
369
+ /audit-orchestrator → decides WHICH POWER LEVEL (quick/standard/forensic)
370
+
371
+ /codeaudit, /secaudit, etc. → actually run the audits
372
+
373
+ /audit-tracker → dashboard + freshness tracking
374
+
375
+ /quality-arsenal → master entry that ties it all together
376
+ ```
377
+
378
+ In practice users just type one of:
379
+ - `/audit-pilot pr` → pilot picks + dispatches automatically
380
+ - `/audit-pilot status` → see what's currently recommended
381
+ - `/audit-pilot run <plan>` → execute a saved plan
382
+
383
+ ---
384
+
385
+ ## DOMAIN EXPERTISE — File-to-Audit Mapping
386
+
387
+ Specific patterns the pilot uses (NOT "look for issues"):
388
+
389
+ ### Auth subsystem
390
+ - File patterns: `src/auth/**`, `**/auth.*`, `middleware.ts`, `**/session.ts`
391
+ - Mandatory: /secaudit
392
+ - Recommended: /apiaudit, /flowaudit (recovery paths)
393
+
394
+ ### Payment subsystem
395
+ - File patterns: `**/checkout*`, `**/stripe*`, `**/payment*`, `**/billing*`
396
+ - Mandatory: /secaudit + /apiaudit
397
+ - Recommended: /flowaudit, /dataaudit, /copyaudit (legal claims)
398
+
399
+ ### Database schema
400
+ - File patterns: `**/*.prisma`, `**/schema.ts`, `**/migrations/**`, `convex/schema.ts`
401
+ - Mandatory: /dataaudit
402
+ - Recommended: /apiaudit (contract drift)
403
+
404
+ ### Public API endpoints
405
+ - File patterns: `**/api/**/*.ts`, `**/routes/**`, `**/handlers/**`
406
+ - Mandatory: /apiaudit
407
+ - Recommended: /secaudit (auth surface), /perfaudit (response time)
408
+
409
+ ### UI components
410
+ - File patterns: `**/*.tsx`, `**/*.jsx`, `**/components/**`
411
+ - Mandatory: /a11yaudit (if user-facing)
412
+ - Recommended: /uiuxaudit (design consistency), /motionaudit (if animations)
413
+
414
+ ### Marketing pages
415
+ - File patterns: `**/page.tsx` in app dir, `**/(marketing)/**`, `**/(landing)/**`
416
+ - Mandatory: /copyaudit + /seoaudit
417
+ - Recommended: /a11yaudit, /perfaudit
418
+
419
+ ### Cron / Scripts / Daemons
420
+ - File patterns: `scripts/**`, `cron/**`, `**/*.cron`, `**/daemon*`
421
+ - Mandatory: /automationaudit
422
+ - Recommended: /secaudit (secret exposure in scripts)
423
+
424
+ ### Documentation
425
+ - File patterns: `README.md`, `CONTRIBUTING.md`, `docs/**`
426
+ - Mandatory: /dxaudit + /copyaudit
427
+ - Recommended: /seoaudit (if public-facing docs)
428
+
429
+ ---
430
+
431
+ ## ANTI-PATTERNS (what the pilot WON'T do)
432
+
433
+ - ❌ Recommend ALL 18 audits "just in case" (that's `/quality-arsenal full`, different intent)
434
+ - ❌ Re-run audits that are fresh AND unrelated to current change
435
+ - ❌ Skip critical audits because user said "be quick" (security on payment = non-negotiable)
436
+ - ❌ Run audits sequentially when DAG allows parallel
437
+ - ❌ Use vague language ("might want to check") — be specific or skip
438
+ - ❌ Save recommendations without timestamp (loses freshness signal)
439
+
440
+ ---
441
+
442
+ ## ECOSYSTEM INTEGRATION
443
+
444
+ **Before**:
445
+ - `/audit-pilot init` — sets up `audits/.pilot/` directory + git hooks (optional)
446
+ - Make sure `/quality-arsenal` is installed
447
+
448
+ **After**:
449
+ - `/audit-orchestrator` to actually run the audits (or `/quality-arsenal` shortcut)
450
+ - `/audit-tracker` to see results
451
+ - Push to GitHub with confidence
452
+
453
+ **Sister skills**:
454
+ - `/audit-orchestrator` — picks power level
455
+ - `/audit-tracker` — dashboard
456
+ - `/quality-arsenal` — master entry
457
+ - `/newcmd` — for adding new audits to the arsenal
458
+
459
+ ---
460
+
461
+ ## SOURCES
462
+
463
+ - Internal: Agentik OS `audit-selector.py` (Linear-ticket-driven dispatcher), generalized here
464
+ - Public: https://github.com/agentik-os/claude-code-quality-audits
465
+ - File-to-audit mappings: derived from 18-audit cross-validation matrix
466
+ - Confidence calibration model: empirical from 6 months / 3 codebases dogfooding
@@ -0,0 +1,147 @@
1
+ ---
2
+ name: audit-tracker
3
+ description: >
4
+ Audit setup + tracking dashboard. Use when user says "/audit-tracker", "audit
5
+ status", "audit dashboard", "audit history", "list audits", "where am I with
6
+ audits", "setup audits", "init audits". Ensures audits/ folder exists, .gitignore
7
+ configured, tracks all audits run with scores + freshness, recommends re-runs
8
+ when stale (>30 days). Reads audits/.{name}audit/verdict.json across all
9
+ audit subdirs to build dashboard.
10
+ disable-model-invocation: false
11
+ ---
12
+
13
+ # /audit-tracker — Setup + Progress Dashboard
14
+
15
+ You are the **audit accountant**. Init audit infrastructure for a project and
16
+ report status of all past + ongoing audits.
17
+
18
+ ## Modes
19
+
20
+ ```bash
21
+ /audit-tracker init # setup audits/ + .gitignore + initial SYNTHESIS.md
22
+ /audit-tracker # dashboard: status of all audits
23
+ /audit-tracker stale # only audits older than 30 days
24
+ /audit-tracker scores # only the scores table (compact)
25
+ /audit-tracker latest # most recent audit + summary
26
+ ```
27
+
28
+ ## Mode 1 — `/audit-tracker init`
29
+
30
+ Bootstrap audits infrastructure in the current project:
31
+
32
+ 1. Create `audits/` directory if missing
33
+ 2. Append to `.gitignore` (idempotent — only if not already present):
34
+ ```gitignore
35
+ # Audit outputs (Quality Arsenal)
36
+ /audits/.*audit*/
37
+ !/audits/.*audit*/verdict.json
38
+ !/audits/.*audit*/REPORT.md
39
+ !/audits/.*audit*/CHECKLIST.md
40
+ !/audits/SYNTHESIS.md
41
+ ```
42
+ This ignores the bulky audit artifacts but preserves the headline outputs
43
+ (verdict.json, REPORT.md, SYNTHESIS.md).
44
+ 3. Write `audits/SYNTHESIS.md` skeleton:
45
+ ```markdown
46
+ # Audit Synthesis — {project_name}
47
+
48
+ Last update: 2026-05-13
49
+ Status: 🟡 No audits run yet
50
+
51
+ ## Recommended starting audits
52
+
53
+ - `/audit-orchestrator quick` — gut-check (15 min)
54
+ - `/audit-orchestrator standard` — regular quality cycle (60 min)
55
+ - `/audit-orchestrator full` — complete arsenal (4h)
56
+
57
+ ## Past runs
58
+
59
+ _none yet_
60
+ ```
61
+ 4. Output to user: "✅ Audits initialized. Run /audit-orchestrator to start."
62
+
63
+ ## Mode 2 — `/audit-tracker` (dashboard)
64
+
65
+ Scan `audits/` for all `.{name}audit*/verdict.json` files. Build a markdown table:
66
+
67
+ ```
68
+ 🎯 AUDIT DASHBOARD — {project_name}
69
+
70
+ ┌──────────────────────┬──────┬──────┬───────────┬────────────────┐
71
+ │ Audit │ Score │ Grade │ Age │ Status │
72
+ ├──────────────────────┼──────┼──────┼───────────┼────────────────┤
73
+ │ codeaudit (v2) │ 92 │ A │ 2 days │ ✅ Fresh │
74
+ │ secaudit │ 88 │ A │ 5 days │ ✅ Fresh │
75
+ │ uiuxaudit (v3) │ 91 │ S │ 3 days │ ✅ Fresh │
76
+ │ a11yaudit (v2) │ 88 │ A │ 14 days │ ⚠️ Aging │
77
+ │ perfaudit │ 79 │ B │ 35 days │ 🔴 Stale │
78
+ │ apiaudit │ 67 │ C │ 12 days │ 🟡 Re-audit │
79
+ └──────────────────────┴──────┴──────┴───────────┴────────────────┘
80
+
81
+ Overall health: 84/100 (Grade A-)
82
+ Recommended: re-run /perfaudit (stale 35d), push /apiaudit to >85 (re-audit)
83
+ ```
84
+
85
+ Status thresholds:
86
+ - **Fresh** ≤ 7 days
87
+ - **Aging** 8-30 days
88
+ - **Stale** > 30 days (recommend re-run)
89
+ - **Re-audit** score < 85 (recommend fix cycle)
90
+
91
+ ## Mode 3 — `/audit-tracker stale`
92
+
93
+ Filter dashboard to only show audits > 30 days old.
94
+
95
+ ## Mode 4 — `/audit-tracker scores`
96
+
97
+ Compact one-liner per audit:
98
+ ```
99
+ codeaudit: 92/A · secaudit: 88/A · uiuxaudit: 91/S · ...
100
+ ```
101
+
102
+ ## Mode 5 — `/audit-tracker latest`
103
+
104
+ Show the single most recent audit + its findings summary + verdict link.
105
+
106
+ ## Implementation hints
107
+
108
+ To parse a verdict.json:
109
+ ```bash
110
+ jq -r '.score, .grade, .timestamp' audits/.{name}audit/verdict.json
111
+ ```
112
+
113
+ If the audit has v2/v3/v4 variants (e.g., `.codeaudit-v3/`), prefer the
114
+ HIGHEST version (most recent re-audit cycle).
115
+
116
+ Detect project name from:
117
+ 1. `package.json` "name" field
118
+ 2. Else basename of cwd
119
+
120
+ Detect audit freshness:
121
+ - File mtime of `verdict.json` → compare to `now()`
122
+ - Days = int((now - mtime) / 86400)
123
+
124
+ ## Anti-patterns
125
+
126
+ - ❌ Listing audits in random order (sort by mtime desc OR by score asc)
127
+ - ❌ Missing the "Recommended actions" footer
128
+ - ❌ Including audits that have no verdict.json (incomplete runs)
129
+ - ❌ Modifying audit outputs (read-only)
130
+ - ❌ Running an audit directly (delegate to `/audit-orchestrator`)
131
+
132
+ ## Output format
133
+
134
+ Always end with **3 actionable recommendations** like:
135
+ ```
136
+ 📋 Next actions:
137
+ 1. Re-run /perfaudit (last run 35d ago, scores drift)
138
+ 2. Push /apiaudit from C → A via 2 fix cycles
139
+ 3. Run /retentionaudit (never run, would unlock new feature ideas)
140
+ ```
141
+
142
+ ## Sources
143
+
144
+ - Reads: `audits/SYNTHESIS.md`, `audits/.{name}audit*/verdict.json`
145
+ - Writes: `audits/SYNTHESIS.md` (updates), `.gitignore` (init mode)
146
+ - Related: `/audit-orchestrator` to actually RUN audits
147
+ - Public mirror: https://github.com/agentik-os/quality-arsenal