@oneie/claude 0.7.0 → 0.9.0

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.
Files changed (263) hide show
  1. package/agents/abm-strategist.md +89 -0
  2. package/agents/ads-meta.md +97 -0
  3. package/agents/analyst.md +173 -0
  4. package/agents/architect.md +280 -0
  5. package/agents/brand-guardian.md +88 -0
  6. package/agents/brand-strategist.md +92 -0
  7. package/agents/campaign-content.md +90 -0
  8. package/agents/campaign-email.md +88 -0
  9. package/agents/campaign-sms.md +87 -0
  10. package/agents/campaign-social.md +87 -0
  11. package/agents/cco.md +99 -0
  12. package/agents/ceo.md +106 -0
  13. package/agents/chairman.md +120 -0
  14. package/agents/cmo.md +101 -0
  15. package/agents/community-greeter.md +89 -0
  16. package/agents/community-moderator.md +92 -0
  17. package/agents/compliance.md +92 -0
  18. package/agents/copywriter.md +100 -0
  19. package/agents/creative-strategist.md +95 -0
  20. package/agents/cro.md +98 -0
  21. package/agents/cto.md +267 -0
  22. package/agents/customer-interviewer.md +93 -0
  23. package/agents/customer-researcher.md +89 -0
  24. package/agents/customer-success-manager.md +90 -0
  25. package/agents/customer-trainer.md +90 -0
  26. package/agents/cxo.md +100 -0
  27. package/agents/demand-creator.md +89 -0
  28. package/agents/demo-mover.md +83 -0
  29. package/agents/demo-specialist.md +89 -0
  30. package/agents/demo-thai-family-law.md +87 -0
  31. package/agents/designer.md +112 -0
  32. package/agents/discovery-caller.md +98 -0
  33. package/agents/doctor.md +139 -0
  34. package/agents/educate-coach.md +100 -0
  35. package/agents/elevate-tutor.md +83 -0
  36. package/agents/email-lifecycle-marketer.md +91 -0
  37. package/agents/engage-specialist.md +99 -0
  38. package/agents/events-coordinator.md +90 -0
  39. package/agents/foundation-builder.md +94 -0
  40. package/agents/funnel-architect.md +89 -0
  41. package/agents/gift-creator.md +100 -0
  42. package/agents/google-ads.md +103 -0
  43. package/agents/guide.md +292 -0
  44. package/agents/helpdesk-dispatcher.md +88 -0
  45. package/agents/hook-specialist.md +91 -0
  46. package/agents/identify-optimizer.md +101 -0
  47. package/agents/implementer.md +305 -0
  48. package/agents/incident-commander.md +120 -0
  49. package/agents/insights-lead.md +93 -0
  50. package/agents/journey-runner.md +113 -0
  51. package/agents/linkedin-ads.md +123 -0
  52. package/agents/live-sales-chat.md +90 -0
  53. package/agents/market-researcher.md +88 -0
  54. package/agents/media-buyer.md +96 -0
  55. package/agents/movers-customer-researcher.md +95 -0
  56. package/agents/movers-foundation-builder.md +96 -0
  57. package/agents/movers-market-researcher.md +97 -0
  58. package/agents/movers-pricing-strategist.md +171 -0
  59. package/agents/nurture-architect.md +99 -0
  60. package/agents/offer-architect.md +92 -0
  61. package/agents/onboarder.md +222 -0
  62. package/agents/onboarding-specialist.md +92 -0
  63. package/agents/operations-dashboard.md +98 -0
  64. package/agents/perf-engineer.md +348 -0
  65. package/agents/playbook-writer.md +71 -0
  66. package/agents/plg-strategist.md +91 -0
  67. package/agents/positioning-architect.md +88 -0
  68. package/agents/press-officer.md +89 -0
  69. package/agents/pricing-strategist.md +94 -0
  70. package/agents/privacy-officer.md +92 -0
  71. package/agents/referral-manager.md +91 -0
  72. package/agents/refine-analyst.md +102 -0
  73. package/agents/release-manager.md +261 -0
  74. package/agents/renewals-upsell-rep.md +90 -0
  75. package/agents/review-engineer.md +327 -0
  76. package/agents/rewards-steward.md +82 -0
  77. package/agents/sales-call-coach.md +94 -0
  78. package/agents/sales-closer.md +98 -0
  79. package/agents/security-auditor.md +313 -0
  80. package/agents/sell-closer.md +101 -0
  81. package/agents/share-amplifier.md +99 -0
  82. package/agents/social-media-manager.md +92 -0
  83. package/agents/storyteller.md +250 -0
  84. package/agents/strategist.md +83 -0
  85. package/agents/strategy-aligner.md +94 -0
  86. package/agents/support-agent.md +90 -0
  87. package/agents/tagger.md +245 -0
  88. package/agents/tech-writer.md +216 -0
  89. package/agents/test-engineer.md +243 -0
  90. package/agents/tiktok-ads.md +105 -0
  91. package/agents/tracking-engineer.md +92 -0
  92. package/agents/upsell-strategist.md +101 -0
  93. package/agents/voice.md +85 -0
  94. package/agents/w4-tools.md +153 -0
  95. package/agents/w4-verify.md +20 -138
  96. package/agents/workflow-optimiser.md +84 -0
  97. package/commands/close.md +814 -160
  98. package/commands/create.md +2 -2
  99. package/commands/deploy.md +554 -175
  100. package/commands/do.md +119 -109
  101. package/commands/fast.md +67 -0
  102. package/commands/improve.md +2 -2
  103. package/commands/one.md +418 -0
  104. package/commands/see.md +1 -1
  105. package/commands/sync.md +1 -1
  106. package/commands/tasks.md +222 -0
  107. package/commands/vespio.md +110 -0
  108. package/commands/vespio.remote.md +227 -0
  109. package/hooks/hooks.json +25 -79
  110. package/hooks/lib/governor-escape-match.sh +88 -0
  111. package/hooks/lib/hook.sh +4 -13
  112. package/hooks/lib/signal.sh +9 -2
  113. package/hooks/scripts/branch-pin.sh +6 -0
  114. package/hooks/scripts/config-protect.sh +6 -0
  115. package/hooks/scripts/do-outcome-gate.sh +19 -2
  116. package/hooks/scripts/git-add-guard.sh +43 -2
  117. package/hooks/scripts/governor-escape.sh +96 -0
  118. package/hooks/scripts/load-guard.sh +127 -0
  119. package/hooks/scripts/post-edit-check.sh +36 -29
  120. package/hooks/scripts/session-start.sh +34 -80
  121. package/hooks/scripts/task-complete-verify.sh +46 -40
  122. package/package.json +1 -1
  123. package/rules/documentation.md +9 -0
  124. package/scripts/ad-copy-lint.sh +656 -0
  125. package/scripts/agentverse-audit.sh +256 -0
  126. package/scripts/asi-walk.sh +435 -0
  127. package/scripts/astro-build-cached.sh +143 -0
  128. package/scripts/blocks-manifest-cached.sh +100 -0
  129. package/scripts/blocks-manifest.mjs +497 -0
  130. package/scripts/blocks-ratchet.sh +116 -0
  131. package/scripts/blocks-render-probe.mjs +529 -0
  132. package/scripts/blocks-usage.mjs +334 -0
  133. package/scripts/chat-context-check.sh +89 -0
  134. package/scripts/close-metrics.sh +558 -0
  135. package/scripts/close-owner.sh +268 -0
  136. package/scripts/db-sync-lock-check.sh +116 -0
  137. package/scripts/deploy-dev.sh +35 -0
  138. package/scripts/deploy-emit.sh +298 -0
  139. package/scripts/deploy-gate-check.sh +128 -0
  140. package/scripts/deploy-ready.sh +78 -0
  141. package/scripts/deploy-record.sh +605 -0
  142. package/scripts/deploy.sh +1273 -0
  143. package/scripts/do-auto.sh +598 -48
  144. package/scripts/do-brief.sh +113 -0
  145. package/scripts/do-close.sh +1137 -0
  146. package/scripts/do-commit.sh +75 -0
  147. package/scripts/do-consumer-sweep.sh +18 -1
  148. package/scripts/do-cycle-shape-check.sh +160 -0
  149. package/scripts/do-decide.sh +476 -0
  150. package/scripts/do-derive-check.sh +436 -0
  151. package/scripts/do-fleet.sh +106 -28
  152. package/scripts/do-folder.sh +10 -1
  153. package/scripts/do-next.sh +106 -0
  154. package/scripts/do-orchestrate.sh +17 -5
  155. package/scripts/do-plan-json.mjs +201 -0
  156. package/scripts/do-plan-json.sh +8 -0
  157. package/scripts/do-preflight.sh +117 -0
  158. package/scripts/do-project.sh +157 -0
  159. package/scripts/do-prove-selftest.sh +108 -0
  160. package/scripts/do-prove.sh +295 -23
  161. package/scripts/do-rank.py +31 -1
  162. package/scripts/do-recon-cache.sh +7 -1
  163. package/scripts/do-recon-pack.sh +196 -0
  164. package/scripts/do-reconcile.sh +121 -4
  165. package/scripts/do-signal.sh +280 -23
  166. package/scripts/do-smoke.sh +18 -1
  167. package/scripts/do-test-gate.sh +80 -0
  168. package/scripts/do-tick.sh +102 -0
  169. package/scripts/do-tier.sh +6 -0
  170. package/scripts/do-triage.sh +182 -0
  171. package/scripts/do-ui-gate.sh +1 -1
  172. package/scripts/do-w4-gates.sh +451 -0
  173. package/scripts/do-walk.sh +12 -1
  174. package/scripts/env-sync.sh +173 -0
  175. package/scripts/factory-brief-check.sh +330 -0
  176. package/scripts/factory-check.sh +68 -14
  177. package/scripts/factory-close-check.sh +257 -0
  178. package/scripts/factory-emit.sh +211 -0
  179. package/scripts/factory-executor-check.mjs +353 -0
  180. package/scripts/factory-peak.sh +301 -0
  181. package/scripts/factory-repo.sh +118 -3
  182. package/scripts/factory-review-check.mjs +61 -0
  183. package/scripts/factory-ship.sh +61 -0
  184. package/scripts/factory-tasks-check.sh +18 -1
  185. package/scripts/factory-turn.sh +326 -0
  186. package/scripts/factory-walk.sh +396 -0
  187. package/scripts/factory-width.sh +57 -0
  188. package/scripts/fade-toxic.sh +4 -3
  189. package/scripts/fixtures/factory-brief-real.md +44 -0
  190. package/scripts/fixtures/triage-dupe.md +5 -0
  191. package/scripts/fleet-manifest.mjs +108 -0
  192. package/scripts/fleet-status.sh +110 -0
  193. package/scripts/full-suite-paths-check.sh +144 -0
  194. package/scripts/gate-reaper-check.sh +98 -0
  195. package/scripts/gate-reaper.sh +125 -0
  196. package/scripts/gate-run.sh +73 -0
  197. package/scripts/gc-content-check.sh +140 -0
  198. package/scripts/gen-dev-config.py +20 -0
  199. package/scripts/govern-bound-check.sh +60 -0
  200. package/scripts/govern-claims-check.sh +233 -0
  201. package/scripts/govern-mem-check.sh +290 -0
  202. package/scripts/governor-doors-check.sh +362 -0
  203. package/scripts/governor-escape-check.sh +171 -0
  204. package/scripts/health.sh +413 -0
  205. package/scripts/id-inventory.mjs +418 -0
  206. package/scripts/land.sh +551 -0
  207. package/scripts/lib/gc-finished.sh +77 -0
  208. package/scripts/lib/govern.sh +361 -0
  209. package/scripts/lib/govern.ts +756 -0
  210. package/scripts/lighthouse-run.sh +187 -0
  211. package/scripts/livekit-live-check.sh +61 -0
  212. package/scripts/livekit-ratchet.sh +46 -0
  213. package/scripts/load-guard-check.sh +49 -0
  214. package/scripts/machine-check.sh +102 -0
  215. package/scripts/machine-watch.sh +177 -0
  216. package/scripts/one-agents.mjs +415 -0
  217. package/scripts/one-resume.sh +78 -0
  218. package/scripts/orphan-baseline.json +182 -0
  219. package/scripts/orphan-modules.mjs +179 -0
  220. package/scripts/pr-body.sh +335 -0
  221. package/scripts/preview-fd-check.sh +289 -0
  222. package/scripts/promise-manifest.mjs +24 -1
  223. package/scripts/release.sh +322 -0
  224. package/scripts/roles-check.sh +946 -0
  225. package/scripts/sdk-build-cached.sh +64 -0
  226. package/scripts/signal-watch.sh +241 -0
  227. package/scripts/skills-publish.sh +94 -0
  228. package/scripts/speed-cache-check.sh +173 -0
  229. package/scripts/speed-check.mjs +907 -0
  230. package/scripts/speed-parity-check.sh +648 -0
  231. package/scripts/speed-waterfall-check.sh +355 -0
  232. package/scripts/substrate-env-parity.mjs +156 -0
  233. package/scripts/tasks-claim-race.mjs +108 -0
  234. package/scripts/tasks-loop.sh +185 -0
  235. package/scripts/test-cached.sh +255 -0
  236. package/scripts/test-full.sh +87 -0
  237. package/scripts/test-honesty.mjs +137 -0
  238. package/scripts/test-lanes.sh +166 -0
  239. package/scripts/test-speed.sh +94 -0
  240. package/scripts/triage-shape-check.sh +149 -0
  241. package/scripts/tsc-cached.sh +179 -0
  242. package/scripts/typedb-flake-check.sh +197 -0
  243. package/scripts/urls-lint.sh +15 -0
  244. package/scripts/verify-fast.sh +445 -0
  245. package/scripts/vespio-sync.sh +149 -0
  246. package/scripts/wf-check.mjs +104 -1
  247. package/scripts/worktree-preview.sh +879 -0
  248. package/scripts/worktree-up.sh +208 -0
  249. package/skills/livekit-agents/SKILL.md +285 -0
  250. package/skills/livekit-agents/references/freshness-rules.md +168 -0
  251. package/skills/shadcn/SKILL.md +1 -1
  252. package/skills/signal/SKILL.md +0 -1
  253. package/skills/voice/SKILL.md +94 -6
  254. package/skills/voice/corpus-check.sh +87 -0
  255. package/hooks/scripts/compact-hint.sh +0 -35
  256. package/hooks/scripts/gate-guard.sh +0 -83
  257. package/hooks/scripts/read-tracker.sh +0 -26
  258. package/hooks/scripts/session-end-verify.sh +0 -51
  259. package/hooks/scripts/stop-reflect.sh +0 -140
  260. package/hooks/scripts/sync-priority-todo.sh +0 -57
  261. package/hooks/scripts/sync-todo-docs.sh +0 -46
  262. package/hooks/scripts/tool-signal.sh +0 -48
  263. package/scripts/do-tasks-bridge.py +0 -366
@@ -0,0 +1,256 @@
1
+ #!/usr/bin/env bash
2
+ # agentverse-audit.sh — measure the health and composition of the Agentverse
3
+ # agent directory.
4
+ #
5
+ # This is an AUDIT, not an exposé. It reports what is measurable and states what
6
+ # it cannot know. Every number is reproducible by anyone holding an Agentverse
7
+ # API key, including Fetch — that is the design. An accusation is deniable;
8
+ # arithmetic is not.
9
+ #
10
+ # WHAT IT MEASURES
11
+ # Liveness status, unresponsive flag, total vs RECENT interactions
12
+ # Quality description, readme, declared protocols, rating
13
+ # Composition owner concentration, generated-name clustering, categories
14
+ # Time creation year, staleness of last update
15
+ #
16
+ # WHAT IT DELIBERATELY DOES NOT CLAIM
17
+ # - That any published agent count is wrong. Registered is not the same as
18
+ # active, and this measures ACTIVITY and COMPOSITION. Both can be true.
19
+ # - That bulk-created agents are illegitimate. Generating one agent per entry
20
+ # in a catalogue is a normal integration pattern. Clustering is REPORTED so a
21
+ # reader can judge what a headline count represents — not as an allegation.
22
+ # - That anyone acted in bad faith. Dormancy is normal in every registry: npm,
23
+ # the App Store and GitHub all look like this.
24
+ # - That the sample is uniformly random. It is not, and cannot be. See LIMITS.
25
+ #
26
+ # LIMITS — read before quoting any number
27
+ # 1. SEARCH-BIASED SAMPLE. Agents come from POST /v1/search/agents, ranked by
28
+ # relevancy. No enumeration endpoint is exposed, so a uniform random sample
29
+ # is impossible. Many unrelated queries plus deep pagination reduce the skew;
30
+ # nothing removes it.
31
+ # 2. THEIR FIELDS, NOT OURS. `status`, `rating` and the interaction counters are
32
+ # what the API returns. Their definitions are unpublished, so this measures
33
+ # "what Agentverse says about its own agents" — the honest framing.
34
+ # 3. DUPLICATES ARE REAL. The directory returns the same agent repeatedly; this
35
+ # dedupes by address before counting.
36
+ # 4. A SAMPLE IS NOT A CENSUS. Every figure is "of agents sampled".
37
+ # 5. OWNER IDS ARE OPAQUE. One owner id is one account, which is not
38
+ # necessarily one person or one company.
39
+ #
40
+ # Usage:
41
+ # agentverse-audit.sh # default depth, human report
42
+ # agentverse-audit.sh --json # machine-readable receipt
43
+ # agentverse-audit.sh --pages 4 # pages per query (50 agents each)
44
+ # agentverse-audit.sh --self-test # prove the counters can report health
45
+ #
46
+ # Env:
47
+ # AGENTVERSE_API_KEY required. Absent → exit 3 (could not run), never a
48
+ # fabricated zero.
49
+ set -uo pipefail
50
+
51
+ BASE="${AGENTVERSE_BASE:-https://agentverse.ai/v1}"
52
+ LIMIT=50 # API hard-caps at 50
53
+ PAGES=3
54
+ JSON=0
55
+ SELFTEST=0
56
+
57
+ while [[ $# -gt 0 ]]; do
58
+ case "$1" in
59
+ --json) JSON=1; shift ;;
60
+ --pages) PAGES="${2:-3}"; shift 2 ;;
61
+ --self-test) SELFTEST=1; shift ;;
62
+ -h|--help) sed -n '2,48p' "${BASH_SOURCE[0]}"; exit 0 ;;
63
+ *) echo "agentverse-audit: unknown flag $1" >&2; exit 2 ;;
64
+ esac
65
+ done
66
+
67
+ # Fixed probe set, spread across verticals rather than clustered in one. Fixed in
68
+ # the script so a run is reproducible — hand-picking queries per run would let
69
+ # anyone tune the result.
70
+ QUERIES=(
71
+ agent data trading assistant payment finance search weather
72
+ news health travel game nft defi oracle chat image translate
73
+ storage compute music legal research market social crypto
74
+ bot llm model tool
75
+ )
76
+
77
+ if [[ $SELFTEST -eq 1 ]]; then
78
+ echo "agentverse-audit --self-test"
79
+ out=$(python3 - <<'PY'
80
+ # A counter that cannot report a HEALTHY directory is theatre. Feed the reducer a
81
+ # synthetic all-healthy, all-distinct-owner set and confirm it says so.
82
+ agents = [{"address": f"a{i}", "status": "active", "type": "mailbox",
83
+ "total_interactions": 5, "recent_interactions": 2, "rating": 4.5,
84
+ "description": "d", "readme": "r", "protocols": ["p"],
85
+ "owner": f"owner{i}", "unresponsive": False} for i in range(10)]
86
+ n = len(agents)
87
+ active = sum(1 for a in agents if a["status"] == "active")
88
+ rated = sum(1 for a in agents if (a.get("rating") or 0) > 0)
89
+ protos = sum(1 for a in agents if a.get("protocols"))
90
+ owners = len({a["owner"] for a in agents})
91
+ print(f"{active}/{n} {rated}/{n} {protos}/{n} owners={owners}")
92
+ PY
93
+ )
94
+ if [[ "$out" == "10/10 10/10 10/10 owners=10" ]]; then
95
+ echo " ok a healthy directory reports 100% and 10 distinct owners"
96
+ echo " (the counters are not hardcoded to a pessimistic answer)"
97
+ exit 0
98
+ fi
99
+ echo " BAD reducer returned '$out'"; exit 1
100
+ fi
101
+
102
+ if [[ -z "${AGENTVERSE_API_KEY:-}" ]]; then
103
+ echo "agentverse-audit: AGENTVERSE_API_KEY unset — cannot run." >&2
104
+ echo " An unrun audit is not an audit reporting zero. Exiting 3." >&2
105
+ exit 3
106
+ fi
107
+
108
+ RAW="$(mktemp)"; trap 'rm -f "$RAW"' EXIT
109
+ nreq=0
110
+ for q in "${QUERIES[@]}"; do
111
+ for ((p=0; p<PAGES; p++)); do
112
+ off=$((p * LIMIT))
113
+ body="$(printf '{"search_text":"%s","sort":"relevancy","direction":"asc","offset":%d,"limit":%d}' "$q" "$off" "$LIMIT")"
114
+ resp="$(curl -s -m 30 -X POST \
115
+ -H "Authorization: Bearer ${AGENTVERSE_API_KEY}" \
116
+ -H 'Content-Type: application/json' \
117
+ -d "$body" "$BASE/search/agents" 2>/dev/null)"
118
+ printf '%s\t%s\n' "$q" "$resp" >> "$RAW"
119
+ nreq=$((nreq+1))
120
+ sleep 0.35 # polite: this is their infrastructure
121
+ done
122
+ done
123
+
124
+ python3 - "$RAW" "$nreq" "$JSON" <<'PY'
125
+ import json, re, sys
126
+ from collections import Counter
127
+ from datetime import datetime, timezone
128
+
129
+ raw, nreq, as_json = sys.argv[1], int(sys.argv[2]), sys.argv[3] == "1"
130
+
131
+ seen, agents, failed = set(), [], 0
132
+ for line in open(raw, encoding="utf-8"):
133
+ _, _, payload = line.partition("\t")
134
+ try:
135
+ d = json.loads(payload)
136
+ except Exception:
137
+ failed += 1; continue
138
+ if not isinstance(d, dict) or "agents" not in d:
139
+ failed += 1; continue
140
+ for a in d.get("agents") or []:
141
+ addr = a.get("address")
142
+ if not addr or addr in seen:
143
+ continue
144
+ seen.add(addr); agents.append(a)
145
+
146
+ n = len(agents)
147
+ if n == 0:
148
+ print("agentverse-audit: no agents returned — cannot report. exit 3", file=sys.stderr)
149
+ sys.exit(3)
150
+
151
+ def pct(k): return round(100.0 * k / n, 1)
152
+ def yr(s):
153
+ try: return int(str(s)[:4])
154
+ except Exception: return None
155
+
156
+ active = sum(1 for a in agents if a.get("status") == "active")
157
+ unresp = sum(1 for a in agents if a.get("unresponsive"))
158
+ ever = sum(1 for a in agents if (a.get("total_interactions") or 0) > 0)
159
+ recent = sum(1 for a in agents if (a.get("recent_interactions") or 0) > 0)
160
+ rated = sum(1 for a in agents if (a.get("rating") or 0) > 0)
161
+ desc = sum(1 for a in agents if (a.get("description") or "").strip())
162
+ readme = sum(1 for a in agents if (a.get("readme") or "").strip())
163
+ protos = sum(1 for a in agents if a.get("protocols"))
164
+ featured = sum(1 for a in agents if a.get("featured"))
165
+
166
+ owners = Counter(a.get("owner") or "unknown" for a in agents)
167
+ top10 = owners.most_common(10)
168
+ top10_share = round(100.0 * sum(c for _, c in top10) / n, 1)
169
+ top1_share = round(100.0 * top10[0][1] / n, 1) if top10 else 0.0
170
+
171
+ # Agents minted in bulk share a stem: "hf-info-<model>", "test-bot-<n>". Strip a
172
+ # trailing id/hash and count stems. REPORTED, not alleged — a catalogue
173
+ # integration is legitimate; the reader decides what a headline count represents.
174
+ def stem(name: str) -> str:
175
+ s = re.sub(r'[-_][0-9a-fA-F]{6,}$', '', name or '')
176
+ s = re.sub(r'[-_]\d+$', '', s)
177
+ parts = re.split(r'[-_\s]+', s)
178
+ return '-'.join(parts[:2]).lower() if len(parts) >= 2 else s.lower()
179
+
180
+ stems = Counter(stem(a.get("name") or "") for a in agents)
181
+ big_stems = [(s, c) for s, c in stems.most_common(10) if c >= 3]
182
+ clustered = sum(c for _, c in stems.items() if c >= 3)
183
+
184
+ years = Counter(y for y in (yr(a.get("created_at")) for a in agents) if y)
185
+ now = datetime.now(timezone.utc)
186
+ stale = 0
187
+ for a in agents:
188
+ try:
189
+ d = datetime.fromisoformat(str(a.get("last_updated")).replace("Z", "+00:00"))
190
+ if (now - d).days > 180: stale += 1
191
+ except Exception:
192
+ pass
193
+
194
+ cats = Counter(a.get("category") or "none" for a in agents)
195
+ types = Counter(a.get("type") or "unknown" for a in agents)
196
+
197
+ result = {
198
+ "sampled": n, "requests": nreq, "failed_requests": failed,
199
+ "liveness": {"active": active, "active_pct": pct(active),
200
+ "unresponsive": unresp,
201
+ "ever_interacted": ever, "ever_interacted_pct": pct(ever),
202
+ "recently_interacted": recent, "recently_interacted_pct": pct(recent)},
203
+ "quality": {"rated": rated, "rated_pct": pct(rated),
204
+ "has_description": desc, "has_description_pct": pct(desc),
205
+ "has_readme": readme, "has_readme_pct": pct(readme),
206
+ "declares_protocols": protos, "declares_protocols_pct": pct(protos),
207
+ "featured": featured},
208
+ "composition": {"distinct_owners": len(owners),
209
+ "top_owner_share_pct": top1_share,
210
+ "top10_owner_share_pct": top10_share,
211
+ "top_owners": [{"owner": o[:12] + "…", "agents": c} for o, c in top10],
212
+ "name_clustered_agents": clustered,
213
+ "name_clustered_pct": pct(clustered),
214
+ "top_name_stems": [{"stem": s, "agents": c} for s, c in big_stems]},
215
+ "time": {"created_by_year": dict(sorted(years.items())),
216
+ "not_updated_in_180d": stale, "not_updated_in_180d_pct": pct(stale)},
217
+ "types": dict(types), "categories": dict(cats.most_common(6)),
218
+ }
219
+
220
+ if as_json:
221
+ print(json.dumps(result, indent=2)); sys.exit(0)
222
+
223
+ print(f"Agentverse directory audit — {n} unique agents from {nreq} requests")
224
+ if failed: print(f" NOTE {failed} request(s) returned no usable payload")
225
+ print()
226
+ print("LIVENESS")
227
+ print(f" active {active:>5} / {n} {pct(active):>5}%")
228
+ print(f" ever interacted with {ever:>5} / {n} {pct(ever):>5}%")
229
+ print(f" RECENTLY interacted {recent:>5} / {n} {pct(recent):>5}%")
230
+ print(f" flagged unresponsive {unresp:>5}")
231
+ print()
232
+ print("QUALITY")
233
+ print(f" carries a rating {rated:>5} / {n} {pct(rated):>5}%")
234
+ print(f" declares a protocol {protos:>5} / {n} {pct(protos):>5}%")
235
+ print(f" has a description {desc:>5} / {n} {pct(desc):>5}%")
236
+ print(f" has a readme {readme:>5} / {n} {pct(readme):>5}%")
237
+ print()
238
+ print("COMPOSITION")
239
+ print(f" distinct owners {len(owners):>5} for {n} agents")
240
+ print(f" largest owner holds {top1_share:>5}% of the sample")
241
+ print(f" top 10 owners hold {top10_share:>5}%")
242
+ print(f" in a name cluster (>=3) {clustered:>5} / {n} {pct(clustered):>5}%")
243
+ for s, c in big_stems[:5]:
244
+ print(f" {s:<28} {c:>4}")
245
+ print()
246
+ print("TIME")
247
+ print(f" created by year {dict(sorted(years.items()))}")
248
+ print(f" not updated in 180d {stale:>5} / {n} {pct(stale):>5}%")
249
+ print()
250
+ print(f" types {dict(types)}")
251
+ print()
252
+ print(" Reproduce: bash .claude/scripts/agentverse-audit.sh --json")
253
+ print(" SEARCH-BIASED SAMPLE, not a census. Fields are Agentverse's own.")
254
+ print(" Registered is not the same as active — both can be true at once.")
255
+ print(" Bulk-created agents are a normal integration pattern, not an allegation.")
256
+ PY