@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.
- package/agents/abm-strategist.md +89 -0
- package/agents/ads-meta.md +97 -0
- package/agents/analyst.md +173 -0
- package/agents/architect.md +280 -0
- package/agents/brand-guardian.md +88 -0
- package/agents/brand-strategist.md +92 -0
- package/agents/campaign-content.md +90 -0
- package/agents/campaign-email.md +88 -0
- package/agents/campaign-sms.md +87 -0
- package/agents/campaign-social.md +87 -0
- package/agents/cco.md +99 -0
- package/agents/ceo.md +106 -0
- package/agents/chairman.md +120 -0
- package/agents/cmo.md +101 -0
- package/agents/community-greeter.md +89 -0
- package/agents/community-moderator.md +92 -0
- package/agents/compliance.md +92 -0
- package/agents/copywriter.md +100 -0
- package/agents/creative-strategist.md +95 -0
- package/agents/cro.md +98 -0
- package/agents/cto.md +267 -0
- package/agents/customer-interviewer.md +93 -0
- package/agents/customer-researcher.md +89 -0
- package/agents/customer-success-manager.md +90 -0
- package/agents/customer-trainer.md +90 -0
- package/agents/cxo.md +100 -0
- package/agents/demand-creator.md +89 -0
- package/agents/demo-mover.md +83 -0
- package/agents/demo-specialist.md +89 -0
- package/agents/demo-thai-family-law.md +87 -0
- package/agents/designer.md +112 -0
- package/agents/discovery-caller.md +98 -0
- package/agents/doctor.md +139 -0
- package/agents/educate-coach.md +100 -0
- package/agents/elevate-tutor.md +83 -0
- package/agents/email-lifecycle-marketer.md +91 -0
- package/agents/engage-specialist.md +99 -0
- package/agents/events-coordinator.md +90 -0
- package/agents/foundation-builder.md +94 -0
- package/agents/funnel-architect.md +89 -0
- package/agents/gift-creator.md +100 -0
- package/agents/google-ads.md +103 -0
- package/agents/guide.md +292 -0
- package/agents/helpdesk-dispatcher.md +88 -0
- package/agents/hook-specialist.md +91 -0
- package/agents/identify-optimizer.md +101 -0
- package/agents/implementer.md +305 -0
- package/agents/incident-commander.md +120 -0
- package/agents/insights-lead.md +93 -0
- package/agents/journey-runner.md +113 -0
- package/agents/linkedin-ads.md +123 -0
- package/agents/live-sales-chat.md +90 -0
- package/agents/market-researcher.md +88 -0
- package/agents/media-buyer.md +96 -0
- package/agents/movers-customer-researcher.md +95 -0
- package/agents/movers-foundation-builder.md +96 -0
- package/agents/movers-market-researcher.md +97 -0
- package/agents/movers-pricing-strategist.md +171 -0
- package/agents/nurture-architect.md +99 -0
- package/agents/offer-architect.md +92 -0
- package/agents/onboarder.md +222 -0
- package/agents/onboarding-specialist.md +92 -0
- package/agents/operations-dashboard.md +98 -0
- package/agents/perf-engineer.md +348 -0
- package/agents/playbook-writer.md +71 -0
- package/agents/plg-strategist.md +91 -0
- package/agents/positioning-architect.md +88 -0
- package/agents/press-officer.md +89 -0
- package/agents/pricing-strategist.md +94 -0
- package/agents/privacy-officer.md +92 -0
- package/agents/referral-manager.md +91 -0
- package/agents/refine-analyst.md +102 -0
- package/agents/release-manager.md +261 -0
- package/agents/renewals-upsell-rep.md +90 -0
- package/agents/review-engineer.md +327 -0
- package/agents/rewards-steward.md +82 -0
- package/agents/sales-call-coach.md +94 -0
- package/agents/sales-closer.md +98 -0
- package/agents/security-auditor.md +313 -0
- package/agents/sell-closer.md +101 -0
- package/agents/share-amplifier.md +99 -0
- package/agents/social-media-manager.md +92 -0
- package/agents/storyteller.md +250 -0
- package/agents/strategist.md +83 -0
- package/agents/strategy-aligner.md +94 -0
- package/agents/support-agent.md +90 -0
- package/agents/tagger.md +245 -0
- package/agents/tech-writer.md +216 -0
- package/agents/test-engineer.md +243 -0
- package/agents/tiktok-ads.md +105 -0
- package/agents/tracking-engineer.md +92 -0
- package/agents/upsell-strategist.md +101 -0
- package/agents/voice.md +85 -0
- package/agents/w4-tools.md +153 -0
- package/agents/w4-verify.md +20 -138
- package/agents/workflow-optimiser.md +84 -0
- package/commands/close.md +814 -160
- package/commands/create.md +2 -2
- package/commands/deploy.md +554 -175
- package/commands/do.md +119 -109
- package/commands/fast.md +67 -0
- package/commands/improve.md +2 -2
- package/commands/one.md +418 -0
- package/commands/see.md +1 -1
- package/commands/sync.md +1 -1
- package/commands/tasks.md +222 -0
- package/commands/vespio.md +110 -0
- package/commands/vespio.remote.md +227 -0
- package/hooks/hooks.json +25 -79
- package/hooks/lib/governor-escape-match.sh +88 -0
- package/hooks/lib/hook.sh +4 -13
- package/hooks/lib/signal.sh +9 -2
- package/hooks/scripts/branch-pin.sh +6 -0
- package/hooks/scripts/config-protect.sh +6 -0
- package/hooks/scripts/do-outcome-gate.sh +19 -2
- package/hooks/scripts/git-add-guard.sh +43 -2
- package/hooks/scripts/governor-escape.sh +96 -0
- package/hooks/scripts/load-guard.sh +127 -0
- package/hooks/scripts/post-edit-check.sh +36 -29
- package/hooks/scripts/session-start.sh +34 -80
- package/hooks/scripts/task-complete-verify.sh +46 -40
- package/package.json +1 -1
- package/rules/documentation.md +9 -0
- package/scripts/ad-copy-lint.sh +656 -0
- package/scripts/agentverse-audit.sh +256 -0
- package/scripts/asi-walk.sh +435 -0
- package/scripts/astro-build-cached.sh +143 -0
- package/scripts/blocks-manifest-cached.sh +100 -0
- package/scripts/blocks-manifest.mjs +497 -0
- package/scripts/blocks-ratchet.sh +116 -0
- package/scripts/blocks-render-probe.mjs +529 -0
- package/scripts/blocks-usage.mjs +334 -0
- package/scripts/chat-context-check.sh +89 -0
- package/scripts/close-metrics.sh +558 -0
- package/scripts/close-owner.sh +268 -0
- package/scripts/db-sync-lock-check.sh +116 -0
- package/scripts/deploy-dev.sh +35 -0
- package/scripts/deploy-emit.sh +298 -0
- package/scripts/deploy-gate-check.sh +128 -0
- package/scripts/deploy-ready.sh +78 -0
- package/scripts/deploy-record.sh +605 -0
- package/scripts/deploy.sh +1273 -0
- package/scripts/do-auto.sh +598 -48
- package/scripts/do-brief.sh +113 -0
- package/scripts/do-close.sh +1137 -0
- package/scripts/do-commit.sh +75 -0
- package/scripts/do-consumer-sweep.sh +18 -1
- package/scripts/do-cycle-shape-check.sh +160 -0
- package/scripts/do-decide.sh +476 -0
- package/scripts/do-derive-check.sh +436 -0
- package/scripts/do-fleet.sh +106 -28
- package/scripts/do-folder.sh +10 -1
- package/scripts/do-next.sh +106 -0
- package/scripts/do-orchestrate.sh +17 -5
- package/scripts/do-plan-json.mjs +201 -0
- package/scripts/do-plan-json.sh +8 -0
- package/scripts/do-preflight.sh +117 -0
- package/scripts/do-project.sh +157 -0
- package/scripts/do-prove-selftest.sh +108 -0
- package/scripts/do-prove.sh +295 -23
- package/scripts/do-rank.py +31 -1
- package/scripts/do-recon-cache.sh +7 -1
- package/scripts/do-recon-pack.sh +196 -0
- package/scripts/do-reconcile.sh +121 -4
- package/scripts/do-signal.sh +280 -23
- package/scripts/do-smoke.sh +18 -1
- package/scripts/do-test-gate.sh +80 -0
- package/scripts/do-tick.sh +102 -0
- package/scripts/do-tier.sh +6 -0
- package/scripts/do-triage.sh +182 -0
- package/scripts/do-ui-gate.sh +1 -1
- package/scripts/do-w4-gates.sh +451 -0
- package/scripts/do-walk.sh +12 -1
- package/scripts/env-sync.sh +173 -0
- package/scripts/factory-brief-check.sh +330 -0
- package/scripts/factory-check.sh +68 -14
- package/scripts/factory-close-check.sh +257 -0
- package/scripts/factory-emit.sh +211 -0
- package/scripts/factory-executor-check.mjs +353 -0
- package/scripts/factory-peak.sh +301 -0
- package/scripts/factory-repo.sh +118 -3
- package/scripts/factory-review-check.mjs +61 -0
- package/scripts/factory-ship.sh +61 -0
- package/scripts/factory-tasks-check.sh +18 -1
- package/scripts/factory-turn.sh +326 -0
- package/scripts/factory-walk.sh +396 -0
- package/scripts/factory-width.sh +57 -0
- package/scripts/fade-toxic.sh +4 -3
- package/scripts/fixtures/factory-brief-real.md +44 -0
- package/scripts/fixtures/triage-dupe.md +5 -0
- package/scripts/fleet-manifest.mjs +108 -0
- package/scripts/fleet-status.sh +110 -0
- package/scripts/full-suite-paths-check.sh +144 -0
- package/scripts/gate-reaper-check.sh +98 -0
- package/scripts/gate-reaper.sh +125 -0
- package/scripts/gate-run.sh +73 -0
- package/scripts/gc-content-check.sh +140 -0
- package/scripts/gen-dev-config.py +20 -0
- package/scripts/govern-bound-check.sh +60 -0
- package/scripts/govern-claims-check.sh +233 -0
- package/scripts/govern-mem-check.sh +290 -0
- package/scripts/governor-doors-check.sh +362 -0
- package/scripts/governor-escape-check.sh +171 -0
- package/scripts/health.sh +413 -0
- package/scripts/id-inventory.mjs +418 -0
- package/scripts/land.sh +551 -0
- package/scripts/lib/gc-finished.sh +77 -0
- package/scripts/lib/govern.sh +361 -0
- package/scripts/lib/govern.ts +756 -0
- package/scripts/lighthouse-run.sh +187 -0
- package/scripts/livekit-live-check.sh +61 -0
- package/scripts/livekit-ratchet.sh +46 -0
- package/scripts/load-guard-check.sh +49 -0
- package/scripts/machine-check.sh +102 -0
- package/scripts/machine-watch.sh +177 -0
- package/scripts/one-agents.mjs +415 -0
- package/scripts/one-resume.sh +78 -0
- package/scripts/orphan-baseline.json +182 -0
- package/scripts/orphan-modules.mjs +179 -0
- package/scripts/pr-body.sh +335 -0
- package/scripts/preview-fd-check.sh +289 -0
- package/scripts/promise-manifest.mjs +24 -1
- package/scripts/release.sh +322 -0
- package/scripts/roles-check.sh +946 -0
- package/scripts/sdk-build-cached.sh +64 -0
- package/scripts/signal-watch.sh +241 -0
- package/scripts/skills-publish.sh +94 -0
- package/scripts/speed-cache-check.sh +173 -0
- package/scripts/speed-check.mjs +907 -0
- package/scripts/speed-parity-check.sh +648 -0
- package/scripts/speed-waterfall-check.sh +355 -0
- package/scripts/substrate-env-parity.mjs +156 -0
- package/scripts/tasks-claim-race.mjs +108 -0
- package/scripts/tasks-loop.sh +185 -0
- package/scripts/test-cached.sh +255 -0
- package/scripts/test-full.sh +87 -0
- package/scripts/test-honesty.mjs +137 -0
- package/scripts/test-lanes.sh +166 -0
- package/scripts/test-speed.sh +94 -0
- package/scripts/triage-shape-check.sh +149 -0
- package/scripts/tsc-cached.sh +179 -0
- package/scripts/typedb-flake-check.sh +197 -0
- package/scripts/urls-lint.sh +15 -0
- package/scripts/verify-fast.sh +445 -0
- package/scripts/vespio-sync.sh +149 -0
- package/scripts/wf-check.mjs +104 -1
- package/scripts/worktree-preview.sh +879 -0
- package/scripts/worktree-up.sh +208 -0
- package/skills/livekit-agents/SKILL.md +285 -0
- package/skills/livekit-agents/references/freshness-rules.md +168 -0
- package/skills/shadcn/SKILL.md +1 -1
- package/skills/signal/SKILL.md +0 -1
- package/skills/voice/SKILL.md +94 -6
- package/skills/voice/corpus-check.sh +87 -0
- package/hooks/scripts/compact-hint.sh +0 -35
- package/hooks/scripts/gate-guard.sh +0 -83
- package/hooks/scripts/read-tracker.sh +0 -26
- package/hooks/scripts/session-end-verify.sh +0 -51
- package/hooks/scripts/stop-reflect.sh +0 -140
- package/hooks/scripts/sync-priority-todo.sh +0 -57
- package/hooks/scripts/sync-todo-docs.sh +0 -46
- package/hooks/scripts/tool-signal.sh +0 -48
- package/scripts/do-tasks-bridge.py +0 -366
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# worktree-up.sh — a worktree with a WORKING dev environment, in one command.
|
|
3
|
+
#
|
|
4
|
+
# manifest: monorepo-only
|
|
5
|
+
#
|
|
6
|
+
# The locked loop (one-ie/CLAUDE.md § The dev → prod loop) says every session
|
|
7
|
+
# edits in `.claude/worktrees/<name>` and main only receives merges. A bare
|
|
8
|
+
# `git worktree add` gives you a tree that cannot run: git omits gitignored
|
|
9
|
+
# dirs, so there is no node_modules, no .env, no miniflare state.
|
|
10
|
+
#
|
|
11
|
+
# THE FIX, in two halves that are both required:
|
|
12
|
+
# 1. symlink every gitignored path from main, EXCEPT node_modules/.vite
|
|
13
|
+
# 2. give the worktree its OWN .vite, SEEDED WARM by cloning main's
|
|
14
|
+
#
|
|
15
|
+
# Neither half works alone, and that is why this took six attempts to pin down:
|
|
16
|
+
# * share main's .vite (what a wholesale `ln -s node_modules` does) and two
|
|
17
|
+
# dev servers write one esbuild optimiser cache. The bundles corrupt and
|
|
18
|
+
# every SSR route 500s with "module is not defined" at
|
|
19
|
+
# workers/runner-worker/index.js. It reads like module resolution. It is not.
|
|
20
|
+
# * give it its own EMPTY .vite and you trade corruption for a cold start:
|
|
21
|
+
# vite discovers deps incrementally and reloads the workerd runner after each
|
|
22
|
+
# batch ("✨ optimized dependencies changed. reloading"), and every request
|
|
23
|
+
# landing mid-teardown 500s with the SAME message. It does not settle.
|
|
24
|
+
# Own + warm is the only combination that serves.
|
|
25
|
+
#
|
|
26
|
+
# MEASURED 2026-09-05, main's dev server deliberately RUNNING so the contention
|
|
27
|
+
# was present: worktree :4322 /u/one = 200 and main :4321 /u/one = 200, both, 24s.
|
|
28
|
+
#
|
|
29
|
+
# ── DO NOT `bun install` HERE ──────────────────────────────────────────────
|
|
30
|
+
# It re-points MAIN's one.ie/web/node_modules/@oneie/sdk at this worktree's
|
|
31
|
+
# dist-less copy and breaks the main checkout. That is why deps are linked.
|
|
32
|
+
#
|
|
33
|
+
# ── WHY .env AND .dev.vars ARE LINKS, NOT COPIES ──────────────────────────
|
|
34
|
+
# A rotated key then reaches every live worktree at once instead of going stale
|
|
35
|
+
# in N copies. (They disagree today and the WORKER reads .dev.vars, not .env —
|
|
36
|
+
# see project_local_gateway_8787_is_the_substrate_door.)
|
|
37
|
+
#
|
|
38
|
+
# ── FOUR THINGS THAT ARE NOT THE PROBLEM, EACH MEASURED ───────────────────
|
|
39
|
+
# Do not re-run these:
|
|
40
|
+
# * vite.resolve.preserveSymlinks (deps resolving outside the root as CJS)
|
|
41
|
+
# * bypassing `bun run dev`s codegen — real, fixed below, but not this bug
|
|
42
|
+
# * an empty .wrangler/.astro (no miniflare D1 state)
|
|
43
|
+
# * "something was editing the worktree" — a CLEAN worktree failed identically
|
|
44
|
+
#
|
|
45
|
+
# ── THE METHOD LESSON, which is the reusable part ─────────────────────────
|
|
46
|
+
# Five of those six wrong answers came from changing one thing and reading the
|
|
47
|
+
# result while OTHER variables moved underneath. Main's dev server going up and
|
|
48
|
+
# down between runs is what made a passing control look like proof: it passed
|
|
49
|
+
# because main was DOWN and the worktree had the shared cache to itself. Hold
|
|
50
|
+
# the rest still, and say which state you held it in.
|
|
51
|
+
#
|
|
52
|
+
# Usage:
|
|
53
|
+
# bash .claude/scripts/worktree-up.sh <name> [--port N] [--no-dev] [--base REF]
|
|
54
|
+
# bash .claude/scripts/worktree-up.sh <name> --check # is it really serving?
|
|
55
|
+
# bash .claude/scripts/worktree-up.sh <name> --down
|
|
56
|
+
# bash .claude/scripts/worktree-up.sh --self-test # prove READY can go red
|
|
57
|
+
set -uo pipefail
|
|
58
|
+
|
|
59
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
60
|
+
# Branches are cut from `dev`, not main: dev is the integration branch every
|
|
61
|
+
# branch lands into, so a branch cut from main starts life missing whatever
|
|
62
|
+
# dev has already integrated. `--base main` still does the old thing.
|
|
63
|
+
NAME=""; PORT=""; BASE="dev"; MODE="up"
|
|
64
|
+
|
|
65
|
+
while [ $# -gt 0 ]; do
|
|
66
|
+
case "$1" in
|
|
67
|
+
--port) PORT="${2:-}"; shift 2 ;;
|
|
68
|
+
--base) BASE="${2:-dev}"; shift 2 ;;
|
|
69
|
+
--no-dev) MODE="setup"; shift ;;
|
|
70
|
+
--check) MODE="check"; shift ;;
|
|
71
|
+
--down) MODE="down"; shift ;;
|
|
72
|
+
--self-test) MODE="selftest"; shift ;;
|
|
73
|
+
-*) echo "worktree-up: unknown flag $1" >&2; exit 2 ;;
|
|
74
|
+
*) NAME="$1"; shift ;;
|
|
75
|
+
esac
|
|
76
|
+
done
|
|
77
|
+
|
|
78
|
+
WT="$ROOT/.claude/worktrees/$NAME"
|
|
79
|
+
_say() { echo "[worktree-up] $*"; }
|
|
80
|
+
_port_file() { echo "$WT/.worktree-port"; }
|
|
81
|
+
|
|
82
|
+
# Every gitignored path the dev env needs. Wholesale symlinks — a per-package
|
|
83
|
+
# farm was tried and bought nothing.
|
|
84
|
+
# one.ie/web/node_modules is deliberately ABSENT here — it is built below as a
|
|
85
|
+
# farm of per-package links so that .vite can be worktree-local. A wholesale
|
|
86
|
+
# symlink would drag main's .vite in with it, which is the corruption above.
|
|
87
|
+
LINKS="node_modules
|
|
88
|
+
packages/node_modules
|
|
89
|
+
packages/sdk/dist
|
|
90
|
+
packages/sdk/node_modules
|
|
91
|
+
pay/backend/node_modules
|
|
92
|
+
channels/node_modules
|
|
93
|
+
one.ie/web/.env
|
|
94
|
+
one.ie/web/.dev.vars
|
|
95
|
+
one.ie/web/.wrangler
|
|
96
|
+
one.ie/web/.astro
|
|
97
|
+
one.ie/web/src/data/fleets.json
|
|
98
|
+
pay/backend/.env
|
|
99
|
+
channels/.env"
|
|
100
|
+
|
|
101
|
+
# Ports are ALLOCATED, never assumed: several worktrees run at once, and a
|
|
102
|
+
# hardcoded port is how two of them come to think they serve each other's code.
|
|
103
|
+
# 4322+ keeps main's 4321 uncontended.
|
|
104
|
+
_free_port() {
|
|
105
|
+
local p=4322
|
|
106
|
+
while lsof -nP -iTCP:"$p" -sTCP:LISTEN >/dev/null 2>&1; do p=$((p+1)); done
|
|
107
|
+
echo "$p"
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
_link_deps() {
|
|
111
|
+
local d n=0
|
|
112
|
+
while IFS= read -r d; do
|
|
113
|
+
[ -n "$d" ] || continue
|
|
114
|
+
if [ -e "$ROOT/$d" ] && [ ! -e "$WT/$d" ]; then
|
|
115
|
+
mkdir -p "$WT/$(dirname "$d")"
|
|
116
|
+
ln -s "$ROOT/$d" "$WT/$d" 2>/dev/null && n=$((n+1))
|
|
117
|
+
fi
|
|
118
|
+
done <<< "$LINKS"
|
|
119
|
+
_say "linked $n gitignored path(s) from main"
|
|
120
|
+
|
|
121
|
+
# The web package's node_modules is a REAL directory of per-package symlinks.
|
|
122
|
+
# This is the only shape that shares every dependency with main while keeping
|
|
123
|
+
# .vite local — see the header.
|
|
124
|
+
local web="$WT/one.ie/web" mainweb="$ROOT/one.ie/web" e b p=0
|
|
125
|
+
if [ ! -d "$web/node_modules" ] || [ -L "$web/node_modules" ]; then
|
|
126
|
+
rm -f "$web/node_modules" 2>/dev/null
|
|
127
|
+
mkdir -p "$web/node_modules"
|
|
128
|
+
for e in "$mainweb"/node_modules/* "$mainweb"/node_modules/.[!.]*; do
|
|
129
|
+
[ -e "$e" ] || continue
|
|
130
|
+
b="$(basename "$e")"
|
|
131
|
+
[ "$b" = ".vite" ] && continue
|
|
132
|
+
ln -s "$e" "$web/node_modules/$b" 2>/dev/null && p=$((p+1))
|
|
133
|
+
done
|
|
134
|
+
_say "one.ie/web/node_modules: $p package links (.vite kept local)"
|
|
135
|
+
fi
|
|
136
|
+
|
|
137
|
+
# Seed the optimiser cache WARM. An empty one is not a neutral start — it is
|
|
138
|
+
# the reload storm. `cp -c` is APFS clonefile: copy-on-write, near free.
|
|
139
|
+
if [ -d "$mainweb/node_modules/.vite" ]; then
|
|
140
|
+
rm -rf "$web/node_modules/.vite"
|
|
141
|
+
cp -Rc "$mainweb/node_modules/.vite" "$web/node_modules/.vite" 2>/dev/null \
|
|
142
|
+
|| cp -R "$mainweb/node_modules/.vite" "$web/node_modules/.vite"
|
|
143
|
+
_say "seeded .vite warm from main"
|
|
144
|
+
else
|
|
145
|
+
_say "WARNING: main has no .vite to clone. Run main's dev server once and"
|
|
146
|
+
_say " let it settle, or this worktree will 500 through the reload storm."
|
|
147
|
+
fi
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
# READY means a real SSR route answered 200 — not that a port opened. /u/one is
|
|
151
|
+
# the probe because it exercises SSR + D1 + the substrate, so a 200 there says
|
|
152
|
+
# the whole chain works. "The process started" is not the same fact.
|
|
153
|
+
_wait_ready() {
|
|
154
|
+
local port="$1" n=0 code=""
|
|
155
|
+
while [ $n -lt 240 ]; do
|
|
156
|
+
code="$(curl -s -o /dev/null -w '%{http_code}' -m 5 "http://localhost:$port/u/one" 2>/dev/null)"
|
|
157
|
+
[ "$code" = "200" ] && { _say "READY — http://localhost:$port serves /u/one 200 (${n}s)"; return 0; }
|
|
158
|
+
sleep 3; n=$((n+3))
|
|
159
|
+
done
|
|
160
|
+
_say "NOT READY after ${n}s — last status ${code:-none}. tail -40 $WT/.dev.log"
|
|
161
|
+
if grep -q "module is not defined" "$WT/.dev.log" 2>/dev/null; then
|
|
162
|
+
_say " Saw 'module is not defined' — that is the .vite cache, every time."
|
|
163
|
+
_say " Either this worktree is SHARING main's cache (check that"
|
|
164
|
+
_say " one.ie/web/node_modules is a real dir, not a symlink), or its own"
|
|
165
|
+
_say " cache was cold. Re-run: this script reseeds it warm."
|
|
166
|
+
fi
|
|
167
|
+
return 1
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
case "$MODE" in
|
|
171
|
+
check)
|
|
172
|
+
[ -f "$(_port_file)" ] || { echo "no port recorded for $NAME"; exit 1; }
|
|
173
|
+
p="$(cat "$(_port_file)")"
|
|
174
|
+
c="$(curl -s -o /dev/null -w '%{http_code}' -m 5 "http://localhost:$p/u/one")"
|
|
175
|
+
echo "$NAME: port $p -> /u/one $c"; [ "$c" = "200" ] ;;
|
|
176
|
+
down)
|
|
177
|
+
[ -f "$WT/.dev.pid" ] && kill -9 "$(cat "$WT/.dev.pid")" 2>/dev/null
|
|
178
|
+
[ -f "$(_port_file)" ] && lsof -ti:"$(cat "$(_port_file)")" | xargs kill -9 2>/dev/null
|
|
179
|
+
_say "$NAME stopped" ;;
|
|
180
|
+
selftest)
|
|
181
|
+
# A checker that cannot go red proves nothing. Point the readiness probe at a
|
|
182
|
+
# port with nothing behind it and assert it never reports 200.
|
|
183
|
+
dead="$(_free_port)"
|
|
184
|
+
code="$(curl -s -o /dev/null -w '%{http_code}' -m 2 "http://localhost:$dead/u/one" 2>/dev/null)"
|
|
185
|
+
[ "$code" = "200" ] && { echo "SELF-TEST INCONCLUSIVE: dead port $dead answered 200"; exit 1; }
|
|
186
|
+
echo "SELF-TEST ok: a dead port reports '${code:-none}' — _wait_ready would refuse, not pass." ;;
|
|
187
|
+
*)
|
|
188
|
+
[ -n "$NAME" ] || { echo "usage: worktree-up.sh <name> [--port N] [--no-dev|--check|--down]" >&2; exit 2; }
|
|
189
|
+
if [ ! -d "$WT" ]; then
|
|
190
|
+
git -C "$ROOT" worktree add -b "feat/$NAME" "$WT" "$BASE" >/dev/null 2>&1 \
|
|
191
|
+
|| git -C "$ROOT" worktree add "$WT" "$BASE" >/dev/null 2>&1 \
|
|
192
|
+
|| { echo "worktree-up: could not create $WT" >&2; exit 1; }
|
|
193
|
+
_say "worktree $NAME cut from $BASE"
|
|
194
|
+
else
|
|
195
|
+
_say "worktree $NAME exists — reusing"
|
|
196
|
+
fi
|
|
197
|
+
_link_deps
|
|
198
|
+
[ "$MODE" = "setup" ] && { _say "setup only — no dev server"; exit 0; }
|
|
199
|
+
[ -n "$PORT" ] || PORT="$(_free_port)"
|
|
200
|
+
echo "$PORT" > "$(_port_file)"
|
|
201
|
+
# `bun run dev`, not a bare `astro dev`: the package script runs four codegen
|
|
202
|
+
# steps first (gen:playbook-meta/promises/fleets/page-modified) that write
|
|
203
|
+
# modules the app imports, and they are gitignored build output a fresh
|
|
204
|
+
# worktree does not have.
|
|
205
|
+
( cd "$WT/one.ie/web" && nohup bun run dev --port "$PORT" > "$WT/.dev.log" 2>&1 & echo $! > "$WT/.dev.pid" )
|
|
206
|
+
_say "astro dev starting on $PORT (log: $WT/.dev.log)"
|
|
207
|
+
_wait_ready "$PORT" ;;
|
|
208
|
+
esac
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: livekit-agents
|
|
3
|
+
description: 'Build voice AI agents with LiveKit Cloud and the Agents SDK. Use when the user asks to "build a voice agent", "create a LiveKit agent", "add voice AI", "implement handoffs", "structure agent workflows", or is working with LiveKit Agents SDK. Provides opinionated guidance for the recommended path: LiveKit Cloud + LiveKit Inference. REQUIRES writing tests for all implementations.'
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: livekit
|
|
7
|
+
version: "0.3.1"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# LiveKit Agents Development for LiveKit Cloud
|
|
11
|
+
|
|
12
|
+
This skill provides opinionated guidance for building voice AI agents with LiveKit Cloud. It assumes you are using LiveKit Cloud (the recommended path) and encodes *how to approach* agent development, not API specifics. All factual information about APIs, methods, and configurations must come from live documentation.
|
|
13
|
+
|
|
14
|
+
**This skill is for LiveKit Cloud developers.** If you're self-hosting LiveKit, some recommendations (particularly around LiveKit Inference) won't apply directly.
|
|
15
|
+
|
|
16
|
+
## MANDATORY: Read This Checklist Before Starting
|
|
17
|
+
|
|
18
|
+
Before writing ANY code, complete this checklist:
|
|
19
|
+
|
|
20
|
+
1. **Read this entire skill document** - Do not skip sections even if MCP is available
|
|
21
|
+
2. **Ensure LiveKit Cloud project is connected** - You need `LIVEKIT_URL`, `LIVEKIT_API_KEY`, and `LIVEKIT_API_SECRET` from your Cloud project
|
|
22
|
+
3. **Set up documentation access** - Use MCP if available, otherwise use web search
|
|
23
|
+
4. **Plan to write tests** - Every agent implementation MUST include tests (see testing section below)
|
|
24
|
+
5. **Verify all APIs against live docs** - Never rely on model memory for LiveKit APIs
|
|
25
|
+
|
|
26
|
+
This checklist applies regardless of whether MCP is available. MCP provides documentation access but does NOT replace the guidance in this skill.
|
|
27
|
+
|
|
28
|
+
## LiveKit Cloud Setup
|
|
29
|
+
|
|
30
|
+
LiveKit Cloud is the fastest way to get a voice agent running. It provides:
|
|
31
|
+
- Managed infrastructure (no servers to deploy)
|
|
32
|
+
- **LiveKit Inference** for AI models (no separate API keys needed)
|
|
33
|
+
- Built-in noise cancellation, turn detection, and other voice features
|
|
34
|
+
- Simple credential management
|
|
35
|
+
|
|
36
|
+
### Connect to Your Cloud Project
|
|
37
|
+
|
|
38
|
+
1. Sign up at [cloud.livekit.io](https://cloud.livekit.io) if you haven't already
|
|
39
|
+
2. Create a project (or use an existing one)
|
|
40
|
+
3. Get your credentials from the project settings:
|
|
41
|
+
- `LIVEKIT_URL` - Your project's WebSocket URL (e.g., `wss://your-project.livekit.cloud`)
|
|
42
|
+
- `LIVEKIT_API_KEY` - API key for authentication
|
|
43
|
+
- `LIVEKIT_API_SECRET` - API secret for authentication
|
|
44
|
+
|
|
45
|
+
4. Set these as environment variables (typically in `.env.local`):
|
|
46
|
+
```bash
|
|
47
|
+
LIVEKIT_URL=wss://your-project.livekit.cloud
|
|
48
|
+
LIVEKIT_API_KEY=your-api-key
|
|
49
|
+
LIVEKIT_API_SECRET=your-api-secret
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The LiveKit CLI can automate credential setup. Consult the CLI documentation for current commands.
|
|
53
|
+
|
|
54
|
+
### Use LiveKit Inference for AI Models
|
|
55
|
+
|
|
56
|
+
**LiveKit Inference is the recommended way to use AI models with LiveKit Cloud.** It provides access to leading AI model providers—all through your LiveKit credentials with no separate API keys needed.
|
|
57
|
+
|
|
58
|
+
Benefits of LiveKit Inference:
|
|
59
|
+
- No separate API keys to manage for each AI provider
|
|
60
|
+
- Billing consolidated through your LiveKit Cloud account
|
|
61
|
+
- Optimized for voice AI workloads
|
|
62
|
+
|
|
63
|
+
Consult the documentation for available models, supported providers, and current usage patterns. The documentation always has the most up-to-date information.
|
|
64
|
+
|
|
65
|
+
## Critical Rule: Never Trust Model Memory for LiveKit APIs
|
|
66
|
+
|
|
67
|
+
LiveKit Agents is a fast-evolving SDK. Model training data is outdated the moment it's created. When working with LiveKit:
|
|
68
|
+
|
|
69
|
+
- **Never assume** API signatures, method names, or configuration options from memory
|
|
70
|
+
- **Never guess** SDK behavior or default values
|
|
71
|
+
- **Always verify** against live documentation before writing code
|
|
72
|
+
- **Always cite** the documentation source when implementing features
|
|
73
|
+
|
|
74
|
+
This rule applies even when confident about an API. Verify anyway.
|
|
75
|
+
|
|
76
|
+
## REQUIRED: Use LiveKit MCP Server for Documentation
|
|
77
|
+
|
|
78
|
+
Before writing any LiveKit code, ensure access to the LiveKit documentation MCP server. This provides current, verified API information and prevents reliance on stale model knowledge.
|
|
79
|
+
|
|
80
|
+
### Check for MCP Availability
|
|
81
|
+
|
|
82
|
+
Look for `livekit-docs` MCP tools. If available, use them for all documentation lookups:
|
|
83
|
+
- Search documentation before implementing any feature
|
|
84
|
+
- Verify API signatures and method parameters
|
|
85
|
+
- Look up configuration options and their valid values
|
|
86
|
+
- Find working examples for the specific task at hand
|
|
87
|
+
|
|
88
|
+
### If MCP Is Not Available
|
|
89
|
+
|
|
90
|
+
If the LiveKit MCP server is not configured, inform the user and recommend installation. Installation instructions for all supported platforms are available at:
|
|
91
|
+
|
|
92
|
+
**https://docs.livekit.io/intro/mcp-server/**
|
|
93
|
+
|
|
94
|
+
Fetch the installation instructions appropriate for the user's coding agent from that page.
|
|
95
|
+
|
|
96
|
+
### Fallback When MCP Unavailable
|
|
97
|
+
|
|
98
|
+
If MCP cannot be installed in the current session:
|
|
99
|
+
1. **Inform the user immediately** that documentation cannot be verified in real-time
|
|
100
|
+
2. Use web search to fetch current documentation from docs.livekit.io
|
|
101
|
+
3. **Explicitly mark all LiveKit-specific code** with a comment like `# UNVERIFIED: Please check docs.livekit.io for current API`
|
|
102
|
+
4. **State clearly** when you cannot verify something: "I cannot verify this API signature against current documentation"
|
|
103
|
+
5. Recommend the user verify against https://docs.livekit.io before using the code
|
|
104
|
+
|
|
105
|
+
## Voice Agent Architecture Principles
|
|
106
|
+
|
|
107
|
+
Voice AI agents have fundamentally different requirements than text-based agents or traditional software. Internalize these principles:
|
|
108
|
+
|
|
109
|
+
### Latency Is Critical
|
|
110
|
+
|
|
111
|
+
Voice conversations are real-time. Users expect responses within hundreds of milliseconds, not seconds. Every architectural decision should consider latency impact:
|
|
112
|
+
|
|
113
|
+
- Minimize LLM context size to reduce inference time
|
|
114
|
+
- Avoid unnecessary tool calls during active conversation
|
|
115
|
+
- Prefer streaming responses over batch responses
|
|
116
|
+
- Design for the unhappy path (network delays, API timeouts)
|
|
117
|
+
|
|
118
|
+
### Context Bloat Kills Performance
|
|
119
|
+
|
|
120
|
+
Large system prompts and extensive tool lists directly increase latency. A voice agent with 50 tools and a 10,000-token system prompt will feel sluggish regardless of model speed.
|
|
121
|
+
|
|
122
|
+
Design agents with minimal viable context:
|
|
123
|
+
- Include only tools relevant to the current conversation phase
|
|
124
|
+
- Keep system prompts focused and concise
|
|
125
|
+
- Remove tools and context that aren't actively needed
|
|
126
|
+
|
|
127
|
+
### Users Don't Read, They Listen
|
|
128
|
+
|
|
129
|
+
Voice interface constraints differ from text:
|
|
130
|
+
- Long responses frustrate users—keep outputs concise
|
|
131
|
+
- Users cannot scroll back—ensure clarity on first delivery
|
|
132
|
+
- Interruptions are normal—design for graceful handling
|
|
133
|
+
- Silence feels broken—acknowledge processing when needed
|
|
134
|
+
|
|
135
|
+
## Workflow Architecture: Handoffs and Tasks
|
|
136
|
+
|
|
137
|
+
Complex voice agents should not be monolithic. LiveKit Agents supports structured workflows that maintain low latency while handling sophisticated use cases.
|
|
138
|
+
|
|
139
|
+
### The Problem with Monolithic Agents
|
|
140
|
+
|
|
141
|
+
A single agent handling an entire conversation flow accumulates:
|
|
142
|
+
- Tools for every possible action (bloated tool list)
|
|
143
|
+
- Instructions for every conversation phase (bloated context)
|
|
144
|
+
- State management for all scenarios (complexity)
|
|
145
|
+
|
|
146
|
+
This creates latency and reduces reliability.
|
|
147
|
+
|
|
148
|
+
### Handoffs: Agent-to-Agent Transitions
|
|
149
|
+
|
|
150
|
+
Handoffs allow one agent to transfer control to another. Use handoffs to:
|
|
151
|
+
- Separate distinct conversation phases (greeting → intake → resolution)
|
|
152
|
+
- Isolate specialized capabilities (general support → billing specialist)
|
|
153
|
+
- Manage context boundaries (each agent has only what it needs)
|
|
154
|
+
|
|
155
|
+
Design handoffs around natural conversation boundaries where context can be summarized rather than transferred wholesale.
|
|
156
|
+
|
|
157
|
+
### Tasks: Scoped Operations
|
|
158
|
+
|
|
159
|
+
Tasks are tightly-scoped prompts designed to achieve a specific outcome. Use tasks for:
|
|
160
|
+
- Discrete operations that don't require full agent capabilities
|
|
161
|
+
- Situations where a focused prompt outperforms a general-purpose agent
|
|
162
|
+
- Reducing context when only a specific capability is needed
|
|
163
|
+
|
|
164
|
+
Consult the documentation for implementation details on handoffs and tasks.
|
|
165
|
+
|
|
166
|
+
## REQUIRED: Write Tests for Agent Behavior
|
|
167
|
+
|
|
168
|
+
Voice agent behavior is code. Every agent implementation MUST include tests. Shipping an agent without tests is shipping untested code.
|
|
169
|
+
|
|
170
|
+
### Mandatory Testing Workflow
|
|
171
|
+
|
|
172
|
+
When building or modifying a LiveKit agent:
|
|
173
|
+
|
|
174
|
+
1. **Create a `tests/` directory** if one doesn't exist
|
|
175
|
+
2. **Write at least one test** before considering the implementation complete
|
|
176
|
+
3. **Test the core behavior** the user requested
|
|
177
|
+
4. **Run the tests** to verify they pass
|
|
178
|
+
|
|
179
|
+
### Test-Driven Development Process
|
|
180
|
+
|
|
181
|
+
When modifying agent behavior—instructions, tool descriptions, workflows—begin by writing tests for the desired behavior:
|
|
182
|
+
|
|
183
|
+
1. Define what the agent should do in specific scenarios
|
|
184
|
+
2. Write test cases that verify this behavior
|
|
185
|
+
3. Implement the feature
|
|
186
|
+
4. Iterate until tests pass
|
|
187
|
+
|
|
188
|
+
This approach prevents shipping agents that "seem to work" but fail in production.
|
|
189
|
+
|
|
190
|
+
### What Every Agent Test Should Cover
|
|
191
|
+
|
|
192
|
+
At minimum, write tests for:
|
|
193
|
+
- **Basic conversation flow**: Agent responds appropriately to a greeting
|
|
194
|
+
- **Tool invocation** (if tools exist): Tools are called with correct parameters
|
|
195
|
+
- **Error handling**: Agent handles unexpected input gracefully
|
|
196
|
+
|
|
197
|
+
Focus tests on:
|
|
198
|
+
- **Tool invocation**: Does the agent call the right tools with correct parameters?
|
|
199
|
+
- **Response quality**: Does the agent produce appropriate responses for given inputs?
|
|
200
|
+
- **Workflow transitions**: Do handoffs and tasks trigger correctly?
|
|
201
|
+
- **Edge cases**: How does the agent handle unexpected input, interruptions, silence?
|
|
202
|
+
|
|
203
|
+
### Test Implementation Pattern
|
|
204
|
+
|
|
205
|
+
Use LiveKit's testing framework. Consult the testing documentation via MCP for current patterns:
|
|
206
|
+
```
|
|
207
|
+
search: "livekit agents testing"
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
The framework supports:
|
|
211
|
+
- Simulated user input
|
|
212
|
+
- Verification of agent responses
|
|
213
|
+
- Tool call assertions
|
|
214
|
+
- Workflow transition testing
|
|
215
|
+
|
|
216
|
+
### Why This Is Non-Negotiable
|
|
217
|
+
|
|
218
|
+
Agents that "seem to work" in manual testing frequently fail in production:
|
|
219
|
+
- Prompt changes silently break behavior
|
|
220
|
+
- Tool descriptions affect when tools are called
|
|
221
|
+
- Model updates change response patterns
|
|
222
|
+
|
|
223
|
+
Tests catch these issues before users do.
|
|
224
|
+
|
|
225
|
+
### Skipping Tests
|
|
226
|
+
|
|
227
|
+
If a user explicitly requests no tests, proceed without them but inform them:
|
|
228
|
+
> "I've built the agent without tests as requested. I strongly recommend adding tests before deploying to production. Voice agents are difficult to verify manually and tests prevent silent regressions."
|
|
229
|
+
|
|
230
|
+
## Common Mistakes to Avoid
|
|
231
|
+
|
|
232
|
+
### Overloading the Initial Agent
|
|
233
|
+
|
|
234
|
+
Starting with one agent that "does everything" and adding tools/instructions over time. Instead, design workflow structure upfront, even if initial implementation is simple.
|
|
235
|
+
|
|
236
|
+
### Ignoring Latency Until It's a Problem
|
|
237
|
+
|
|
238
|
+
Latency issues compound. An agent that feels "a bit slow" in development becomes unusable in production with real network conditions. Measure and optimize latency continuously.
|
|
239
|
+
|
|
240
|
+
### Copying Examples Without Understanding
|
|
241
|
+
|
|
242
|
+
Examples in documentation demonstrate specific patterns. Copying code without understanding its purpose leads to bloated, poorly-structured agents. Understand what each component does before including it.
|
|
243
|
+
|
|
244
|
+
### Skipping Tests Because "It's Just Prompts"
|
|
245
|
+
|
|
246
|
+
Agent behavior is code. Prompt changes affect behavior as much as code changes. Test agent behavior with the same rigor as traditional software. **Never deliver an agent implementation without at least one test file.**
|
|
247
|
+
|
|
248
|
+
### Assuming Model Knowledge Is Current
|
|
249
|
+
|
|
250
|
+
Reiterating the critical rule: never trust model memory for LiveKit APIs. The SDK evolves faster than model training cycles. Verify everything.
|
|
251
|
+
|
|
252
|
+
## When to Consult Documentation
|
|
253
|
+
|
|
254
|
+
**Always consult documentation for:**
|
|
255
|
+
- API method signatures and parameters
|
|
256
|
+
- Configuration options and their valid values
|
|
257
|
+
- SDK version-specific features or changes
|
|
258
|
+
- Deployment and infrastructure setup
|
|
259
|
+
- Model provider integration details
|
|
260
|
+
- CLI commands and flags
|
|
261
|
+
|
|
262
|
+
**This skill provides guidance on:**
|
|
263
|
+
- Architectural approach and design principles
|
|
264
|
+
- Workflow structure decisions
|
|
265
|
+
- Testing strategy
|
|
266
|
+
- Common pitfalls to avoid
|
|
267
|
+
|
|
268
|
+
The distinction matters: this skill tells you *how to think* about building voice agents. The documentation tells you *how to implement* specific features.
|
|
269
|
+
|
|
270
|
+
## Feedback Loop
|
|
271
|
+
|
|
272
|
+
When using LiveKit documentation via MCP, note any gaps, outdated information, or confusing content. Reporting documentation issues helps improve the ecosystem for all developers.
|
|
273
|
+
|
|
274
|
+
## Summary
|
|
275
|
+
|
|
276
|
+
Building effective voice agents with LiveKit Cloud requires:
|
|
277
|
+
|
|
278
|
+
1. **Use LiveKit Cloud + LiveKit Inference** as the foundation—it's the fastest path to production
|
|
279
|
+
2. **Verify everything** against live documentation—never trust model memory
|
|
280
|
+
3. **Minimize latency** at every architectural decision point
|
|
281
|
+
4. **Structure workflows** using handoffs and tasks to manage complexity
|
|
282
|
+
5. **Test behavior** before and after changes—never ship without tests
|
|
283
|
+
6. **Keep context minimal**—only include what's needed for the current phase
|
|
284
|
+
|
|
285
|
+
These principles remain valid regardless of SDK version or API changes. For all implementation specifics, consult the LiveKit documentation via MCP.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Freshness Rules for LiveKit Development
|
|
2
|
+
|
|
3
|
+
This document provides detailed guidance on maintaining accuracy when building with LiveKit Agents. These rules exist because model training data becomes outdated immediately, and LiveKit's SDK evolves rapidly.
|
|
4
|
+
|
|
5
|
+
## The Core Problem
|
|
6
|
+
|
|
7
|
+
Coding agents (Claude, GPT, etc.) are trained on historical data. This training includes:
|
|
8
|
+
- Old versions of LiveKit documentation
|
|
9
|
+
- Outdated code examples from blogs and tutorials
|
|
10
|
+
- Previous SDK versions with different APIs
|
|
11
|
+
- Community answers that may no longer be accurate
|
|
12
|
+
|
|
13
|
+
When an agent "knows" something about LiveKit, that knowledge may be months or years out of date.
|
|
14
|
+
|
|
15
|
+
## Verification Requirements
|
|
16
|
+
|
|
17
|
+
### Before Writing Any LiveKit Code
|
|
18
|
+
|
|
19
|
+
1. **Identify what needs verification**
|
|
20
|
+
- Method names and signatures
|
|
21
|
+
- Configuration options and their types
|
|
22
|
+
- Import paths and module structure
|
|
23
|
+
- Default values and behaviors
|
|
24
|
+
|
|
25
|
+
2. **Query the documentation**
|
|
26
|
+
- Use MCP to search for the specific feature
|
|
27
|
+
- Read the current documentation, not cached knowledge
|
|
28
|
+
- Look for version notes or recent changes
|
|
29
|
+
|
|
30
|
+
3. **Cite your source**
|
|
31
|
+
- Note which documentation page informed the implementation
|
|
32
|
+
- If something cannot be verified, explicitly state this
|
|
33
|
+
|
|
34
|
+
### During Implementation
|
|
35
|
+
|
|
36
|
+
When writing code, verify:
|
|
37
|
+
|
|
38
|
+
| Element | Why It Changes | How to Verify |
|
|
39
|
+
|---------|----------------|---------------|
|
|
40
|
+
| Import statements | Module restructuring | Search docs for current import paths |
|
|
41
|
+
| Method signatures | API evolution | Look up method in API reference |
|
|
42
|
+
| Configuration keys | Naming conventions change | Check configuration documentation |
|
|
43
|
+
| Default behaviors | Defaults are tuned over time | Read parameter documentation |
|
|
44
|
+
| Event names | Event systems evolve | Check events/callbacks documentation |
|
|
45
|
+
|
|
46
|
+
### After Implementation
|
|
47
|
+
|
|
48
|
+
Before presenting code to the user:
|
|
49
|
+
- Confirm all APIs used are documented
|
|
50
|
+
- Verify example patterns match current best practices
|
|
51
|
+
- Check for deprecation warnings in documentation
|
|
52
|
+
|
|
53
|
+
## What Cannot Be Verified
|
|
54
|
+
|
|
55
|
+
Some things legitimately cannot be verified against documentation:
|
|
56
|
+
- User's specific environment or configuration
|
|
57
|
+
- Integration with user's existing codebase
|
|
58
|
+
- Business logic and application requirements
|
|
59
|
+
|
|
60
|
+
When providing guidance on these topics, clearly distinguish between:
|
|
61
|
+
- "According to LiveKit documentation..." (verified)
|
|
62
|
+
- "Based on your requirements..." (application-specific)
|
|
63
|
+
- "This may need adjustment..." (uncertain)
|
|
64
|
+
|
|
65
|
+
## Red Flags: When to Stop and Verify
|
|
66
|
+
|
|
67
|
+
Pause and verify against documentation when:
|
|
68
|
+
|
|
69
|
+
1. **Writing from memory** - If you're typing an API call without having just looked it up, verify it
|
|
70
|
+
2. **"I think" or "I believe"** - Uncertainty about LiveKit APIs requires verification
|
|
71
|
+
3. **Complex configurations** - Multi-option configurations are likely to have evolved
|
|
72
|
+
4. **Error handling** - Exception types and error formats change
|
|
73
|
+
5. **Newer features** - Recently added features have the highest drift risk
|
|
74
|
+
|
|
75
|
+
## Communication with Users
|
|
76
|
+
|
|
77
|
+
### When Verified
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
According to the LiveKit Agents documentation, the correct approach is...
|
|
81
|
+
[implementation]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### When Partially Verified
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
The workflow structure follows LiveKit's documented patterns. However, I could not
|
|
88
|
+
verify [specific detail] against current documentation. Please confirm this matches
|
|
89
|
+
your SDK version.
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### When Unverified
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
I cannot verify this implementation against current LiveKit documentation. This is
|
|
96
|
+
based on general patterns and may require adjustment. I recommend:
|
|
97
|
+
1. Checking the official documentation at [link]
|
|
98
|
+
2. Testing this implementation before relying on it
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## MCP Server Unavailable
|
|
102
|
+
|
|
103
|
+
If the LiveKit MCP server is not installed or accessible:
|
|
104
|
+
|
|
105
|
+
1. **Inform the user immediately** - They should know verification isn't possible
|
|
106
|
+
2. **Recommend installation** - Point to https://docs.livekit.io/mcp
|
|
107
|
+
3. **Proceed with caution** - Clearly mark all LiveKit-specific code as unverified
|
|
108
|
+
4. **Suggest manual verification** - User should check docs before using the code
|
|
109
|
+
|
|
110
|
+
Do not pretend to have verified something when MCP access was unavailable.
|
|
111
|
+
|
|
112
|
+
## Version Awareness
|
|
113
|
+
|
|
114
|
+
LiveKit Agents has distinct versions with potentially different APIs:
|
|
115
|
+
- Python SDK (`livekit-agents`)
|
|
116
|
+
- Node.js/TypeScript SDK (`@livekit/agents`)
|
|
117
|
+
|
|
118
|
+
Each has its own release cycle and API surface. When working with LiveKit:
|
|
119
|
+
- Determine which SDK the user is using
|
|
120
|
+
- Search documentation specific to that SDK
|
|
121
|
+
- Do not assume API parity between Python and Node.js versions
|
|
122
|
+
|
|
123
|
+
## Examples of Drift
|
|
124
|
+
|
|
125
|
+
These examples illustrate why verification matters:
|
|
126
|
+
|
|
127
|
+
### Configuration Changes
|
|
128
|
+
Old tutorials might show:
|
|
129
|
+
```python
|
|
130
|
+
agent = VoiceAgent(config={"model": "gpt-4"})
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Current API might be:
|
|
134
|
+
```python
|
|
135
|
+
agent = VoiceAgent(llm=SomeLLMClass(...))
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Method Renames
|
|
139
|
+
What was once:
|
|
140
|
+
```python
|
|
141
|
+
agent.start_session()
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Might now be:
|
|
145
|
+
```python
|
|
146
|
+
agent.start()
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Import Restructuring
|
|
150
|
+
Previous:
|
|
151
|
+
```python
|
|
152
|
+
from livekit.agents.voice import VoiceAgent
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Current:
|
|
156
|
+
```python
|
|
157
|
+
from livekit.agents import VoiceAgent
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
None of these changes are predictable from training data. Only live documentation reflects current state.
|
|
161
|
+
|
|
162
|
+
## Summary
|
|
163
|
+
|
|
164
|
+
1. **Default to distrust** - Assume any LiveKit knowledge from memory is outdated
|
|
165
|
+
2. **Verify actively** - Use MCP to check documentation before implementation
|
|
166
|
+
3. **Communicate uncertainty** - Tell users when something cannot be verified
|
|
167
|
+
4. **Cite sources** - Reference documentation when providing verified information
|
|
168
|
+
5. **Recommend MCP** - If unavailable, make installation a priority
|
package/skills/shadcn/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: shadcn
|
|
3
|
-
description: shadcn/ui primitives in `one.ie/web` under the ONE 6-token design system. Covers the `src/components/ui/` inventory, why shadcn's own `-foreground` names survive the `--color-*: initial` palette wipe via the Layout.astro aliases, adding a primitive with the CLI, and Button/Badge/Card/Dialog variants. Use when adding or editing a `src/components/ui/` primitive, when a shadcn component renders transparent or invisible after the wipe, or when picking between a token utility and an alias.
|
|
3
|
+
description: "shadcn/ui primitives in `one.ie/web` under the ONE 6-token design system. Covers the `src/components/ui/` inventory, why shadcn's own `-foreground` names survive the `--color-*: initial` palette wipe via the Layout.astro aliases, adding a primitive with the CLI, and Button/Badge/Card/Dialog variants. Use when adding or editing a `src/components/ui/` primitive, when a shadcn component renders transparent or invisible after the wipe, or when picking between a token utility and an alias."
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Read, Write, Edit, Glob, Grep, Bash
|
|
6
6
|
---
|
package/skills/signal/SKILL.md
CHANGED
|
@@ -43,7 +43,6 @@ If in doubt: `+1` on success, `-1` on failure. The gradations are discretion.
|
|
|
43
43
|
| Prefix | Example | Emitter |
|
|
44
44
|
|--------------|-------------------------------|---------------------------------------------------------|
|
|
45
45
|
| `ui:*` | `ui:chat:copy` | React `onClick` via `emitClick()` |
|
|
46
|
-
| `tool:*` | `tool:Edit:ok`, `tool:Bash:fail` | `.claude/hooks/tool-signal.sh` on PostToolUse |
|
|
47
46
|
| `hook:*` | `hook:post-edit:warn` | other hook scripts via `emit_signal` (`hooks/lib/signal.sh`) |
|
|
48
47
|
| `cli:*` | `cli:signal:send` | `oneie` CLI verbs |
|
|
49
48
|
| `bridge:*` | `bridge:mirrorMark` | `src/engine/bridge.ts` |
|