Commit Graph

172 Commits

Author SHA1 Message Date
melkeydev fd61d00d91 removing setup hook that doesnt exist 2026-03-11 14:11:14 -07:00
melkeydev 25c1cae890 fixing telemetry 2026-03-11 12:39:08 -07:00
melkeydev 16db2e9c95 removing timeouts 2026-03-11 12:24:48 -07:00
melkeydev 6258a7e349 adding event bridge and reviewer comments 2026-03-11 12:16:28 -07:00
melkeydev 55eeae089f adding telemetry 2026-03-11 10:46:51 -07:00
melkeydev c7a13ac307 adding telemetry 2026-03-11 09:23:07 -07:00
melkeydev dd67615a1c Stashing for now 2026-03-10 22:41:41 -07:00
melkeydev 4f95105551 fixing telemetry 2026-03-10 22:06:08 -07:00
melkeydev 0493dbcd70 adding telemetry 2026-03-10 22:04:10 -07:00
John Lindquist 7a124e6561 Add sitemap field to skill metadata: parse metadata.sitemap in skill-map-frontmatter.mts, add sitemap to SkillConfig interface and KNOWN_KEYS, render sitemap URLs in buildDocsBlock() alongside doc links, include sitemap in generated manifest, and add sitemap URLs to 35 SKILL.md files for domains that have sitemap.xml. Also fix 15 broken doc URLs across 14 skills (vercel.com/docs path changes, anthropic docs, stripe, descope, flags-sdk, ai-sdk). Bump to 0.16.1. 2026-03-10 14:31:40 -06:00
John Lindquist 17be9898ea Add sitemap field to SkillConfig and inject sitemap URLs alongside doc links in the docs warning block. For each skill, find the sitemap.xml URL for its primary documentation domain and add it as metadata.sitemap in SKILL.md frontmatter. Update buildDocsBlock() in patterns.mts to render sitemap URLs parenthetically after doc links. Parse and validate the new field in skill-map-frontmatter.mts, include it in the generated manifest via build-manifest.ts, and propagate the type through pretooluse and user-prompt-submit hooks. 35 of 46 skills now have sitemaps (8 skipped: domains without sitemaps). Rebuild hooks and manifest. 2026-03-10 14:29:36 -06:00
John Lindquist 5dffded3d5 Replace skill body injection with Skill tool invocation; bump to 0.16.0
Instead of injecting full SKILL.md bodies as additionalContext, hooks now
inject "You must run the Skill(<name>) tool." — leveraging the conventional
Skill tool mechanism for context loading.
2026-03-10 12:46:54 -06:00
John Lindquist d5b5ef47f7 Replace skill body injection with Skill tool invocation instructions
Instead of injecting the full SKILL.md body as additionalContext, inject
"You must run the Skill(<name>) tool." — a more conventional way of
telling the agent to use the Skill tool for context loading.
2026-03-10 12:46:11 -06:00
John Lindquist ad4127d120 In the ai-sdk and ai-elements skills, make AI Elements mandatory for ALL AI-generated text displayed in browser UIs — remove every escape hatch that lets agents skip it. Specifically: remove the "Without AI Elements (Manual)" section from ai-sdk that teaches raw {text} rendering, scope toTextStreamResponse() guidance to non-browser clients only with explicit warnings against using it to skip AI Elements, strengthen the rendering mandate to say "no exceptions — even for simple prose" because AI SDK models always produce markdown, update the ai-elements "When to Use" table to replace "Optional — may be overkill" with "Yes — models always produce markdown", and add streaming panels/perspectives/summaries to the examples list. Rebuild the manifest. 2026-03-10 12:46:00 -06:00
John Lindquist 5948eb1497 Scan every skills/*/SKILL.md file for documentation URLs, HTTP-check each one for 404s, and replace broken links with verified live alternatives. Broken URLs found: vercel.com/docs/marketplace → /docs/integrations, vercel.com/docs/marketplace/sign-in-with-vercel → /docs/sign-in-with-vercel, vercel.com/docs/functions/middleware → /docs/routing-middleware, vercel.com/docs/getting-started → /docs/getting-started-with-vercel, vercel.com/docs/infrastructure/runtime-cache → /docs/runtime-cache, vercel.com/docs/content → /docs/solutions/cms, vercel.com/docs/queues/api-reference → /docs/queues/api, vercel.com/docs/security/secure-backend-access/oidc-federation → /docs/oidc, vercel.com/docs/workflow/flags → /docs/feature-flags, flags-sdk.dev/docs/upgrade-guide → github.com/vercel/flags upgrade-to-v4.md, ai-sdk.dev/docs/reference/types/ui-message → /docs/reference/ai-sdk-core/ui-message, docs.anthropic.com/en/docs/claude-code/agent-tool-use → /sub-agents, docs.descope.com/sdks/nextjs → /getting-started/nextjs, docs.stripe.com/libraries/node → /sdks, vercel.com/blog/ncc → github.com/vercel/ncc. Rebuild manifest. Bump to 0.15.1. 2026-03-10 12:32:09 -06:00
John Lindquist f7ac4549de Add source code extraction from sandboxes and fix Vercel deploy auth in run-eval.ts.
Source extraction: After each eval, tar the project source (excluding node_modules, .next, .git) from the sandbox via sandbox.readFile(), save as source.tar.gz in the results directory. Include extraction instructions in the markdown report with commands to untar and run locally.

Deploy fix: The VERCEL_TOKEN env var (vca_* session token) doesn't support vercel deploy. Fix by unsetting VERCEL_TOKEN before running vercel link + vercel deploy so the CLI falls back to ~/.local/share/com.vercel.cli/auth.json which has proper auth. Also run vercel link --yes --scope vercel-labs --project <name> before deploy.

Hoist runId to module-level let so it's accessible from runScenario for archive paths. Add sourcePath field to ScenarioResult.

Verified: source.tar.gz extracted successfully (17KB for ai-writing-assistant with shadcn components, API routes, app structure).
2026-03-10 07:59:17 -06:00
John Lindquist b43d7106d1 Add timestamped markdown reports, Vercel deploy step, and AI-required scenarios to sandbox eval runner.
In run-eval.ts:
- Add generateReport() that writes a timestamped .reports/<timestamp>.md after each eval run with: summary table, live/deploy URLs, per-scenario details (prompt, skills, files, injection timeline, verification results), and aggregate skill coverage
- Add vercel deploy step after verification — runs `vercel deploy --yes --scope vercel-labs --name <slug>-<timestamp>` to get permanent *.vercel.app URLs (currently blocked by scope access — needs vercel link first)
- Replace 5 scenarios with AI-required ones: ai-writing-assistant (AI SDK streamText + SWR + middleware), ai-code-reviewer (AI SDK + vercel-flags + cron + observability), ai-flashcard-trainer (AI SDK generateText + SWR + runtime-cache), ai-meeting-summarizer (AI SDK streamText + satori OG + middleware), ai-deploy-analyzer (AI SDK + vercel-flags + cron + observability + vercel.json)
- All scenarios use @ai-sdk/anthropic provider to verify OIDC/AI Gateway auth works end-to-end

In SKILL.md: comprehensive rewrite documenting the full two-phase eval flow, all CLI flags, session flow diagram, verification prompt structure, proven results, and known limitations.

Proven: ai-writing-assistant hit 5/6 expected skills (83%) with 3/3 user stories passing. ai-deploy-analyzer hit 6/8 (75%). 19 unique skills injected across 5 scenarios.
2026-03-10 07:14:48 -06:00
John Lindquist fc0982b97f Replace simple app scenarios with heavy Vercel-stack scenarios that stress-test plugin skill injection.
Replace pomodoro-timer, color-palette-gen, markdown-previewer, weather-dashboard, and quiz-builder with 5 new scenarios that require deep Vercel platform features:

1. ai-chatbot-rag — AI SDK streamText, Vercel Blob, SWR, middleware auth, Geist font
2. feature-flagged-dashboard — @vercel/flags flag(), edge runtime, cron jobs, @vercel/kv cache, observability
3. ai-image-gallery — AI SDK, Vercel Blob upload, Satori OG images, SWR, dynamic routes
4. realtime-collab-notes — AI SDK summarize, @vercel/kv CRUD, middleware timing, edge runtime, cron cleanup, Geist
5. deploy-monitor-ai — Vercel API patterns, AI SDK analysis, @vercel/flags, cron health check, edge runtime, observability, vercel.json crons

Each scenario has 3 user stories verified by agent-browser in Phase 2. Expected skills per scenario range from 7-9, covering: ai-sdk, vercel-storage, swr, vercel-flags, edge-runtime, runtime-cache, cron-jobs, satori, observability, routing-middleware, vercel-api, vercel-functions, geist, shadcn, nextjs.

Proven: feature-flagged-dashboard hit 7/8 expected skills (87.5%), deploy-monitor-ai hit 5/9 (56%). Both passed 3/3 user stories.
2026-03-10 06:23:14 -06:00
John Lindquist 96845cc6c2 Add agent-browser verification phase to sandbox eval runner with 5 new app scenarios and user stories.
Rewrite run-eval.ts with a two-phase eval flow:
- Phase 1: Claude Code builds a Next.js app (existing)
- Phase 2: A follow-up Claude Code session uses agent-browser to walk through 3 user stories per app, fixing issues until all pass

New scenarios (replacing the old 5): pomodoro-timer, color-palette-gen, markdown-previewer, weather-dashboard, quiz-builder. Each has 3 concrete user stories like "As a user, I can type markdown and see it rendered as a heading in the preview".

Install agent-browser globally alongside claude-code and vercel in each sandbox. After build completes and dev server starts on port 3000, build a verification prompt from the user stories that instructs Claude to use agent-browser open/snapshot/click/fill/screenshot commands. Parse VERIFICATION_RESULTS from output to track pass/fail per story.

Add --skip-verify flag to skip Phase 2. Summary table now shows Build/Skills/Files/Verify columns. Verification details section shows per-story pass/fail with checkmarks.

Proven: markdown-previewer 3/3 passed, quiz-builder 3/3 passed (6/6 total).

Usage: bun run .claude/skills/benchmark-sandbox/run-eval.ts --keep-alive --keep-hours 8 --concurrency 5
2026-03-10 05:31:17 -06:00
John Lindquist a30f57ba00 Add --keep-alive flag to benchmark-sandbox run-eval.ts that keeps sandboxes running with public URLs after Claude Code sessions complete.
When --keep-alive is passed: after each Claude Code session times out (5-min Hobby cap), start `npx next dev --turbopack` in the background, call `sandbox.extendTimeout()` to keep it alive for --keep-hours (default 8), and print the public https://sb-XXXXX.vercel.run URL. The process blocks at the end so sandboxes stay alive for overnight checks.

Also add ports: [3000] to Sandbox.create() so domain(3000) returns a public URL at creation time. Update the 20s poll loop to include port 3000 HTTP status via curl. Only stop sandboxes in the finally block when --keep-alive is NOT set.

Usage: bun run .claude/skills/benchmark-sandbox/run-eval.ts --keep-alive --keep-hours 8 --concurrency 5
2026-03-10 04:09:52 -06:00
John Lindquist 905ffba7fa feat: add lexical stemmer, prompt signal scoring, docs, and plugin metadata
- Add stemmer and shared contractions modules for lexical prompt matching
- Enhance lexical index and prompt patterns with stemming support
- Add promptSignals metadata to all 43 skill frontmatter files
- Add comprehensive documentation site (docs/)
- Add .claude-plugin marketplace and plugin metadata
- Add benchmark scenarios script
- Update skill manifest with prompt signal data
- Add lexical-index and stemmer tests, expand prompt-patterns tests
2026-03-10 03:24:38 -06:00
John Lindquist 0f90c84b04 feat(benchmark-sandbox): add working sandbox eval runner with parallel execution
Proven working eval system that runs Claude Code sessions inside Vercel
Sandboxes with the vercel-plugin installed. Key capabilities:

- 5 parallel sandboxes with unique public URLs (ports: [3000])
- Fresh sandbox per scenario (no snapshots — npm globals don't persist)
- Plugin uploaded via writeFiles() + installed via npx add-plugin
- Claude Code with --dangerously-skip-permissions --debug
- 20s progress polling (skills, files, port 3000 status)
- Skill coverage analysis (expected vs actual)

Critical environment findings documented in SKILL.md:
- Home dir: /home/vercel-sandbox (not /home/user)
- SDK: @vercel/sandbox@1.8.0 with ports: [3000] for public URLs
- Hobby tier caps at 5 min regardless of timeout param
- add-plugin works because claude is in sh PATH after npm -g install
2026-03-10 03:22:42 -06:00
John Lindquist 367555fb84 feat(skills): add retrieval metadata to skill frontmatter
Add retrieval aliases, intents, entities, and examples to the ai-sdk, auth,
and chat-sdk skills so skill matching can find them from user phrasing.

Verified: ruby -e 'require "yaml"; files=%w[skills/ai-sdk/SKILL.md skills/auth/SKILL.md skills/chat-sdk/SKILL.md]; files.each do |f| s=File.read(f); m=s.match(/\A---\n(.*?)\n---\n/m) or abort("missing frontmatter: #{f}"); y=YAML.safe_load(m[1]); abort("missing retrieval: #{f}") unless y["retrieval"].is_a?(Hash); puts "OK #{f} #{y["retrieval"]["aliases"].length} aliases"; end'\nVerified: git diff --check -- skills/ai-sdk/SKILL.md skills/auth/SKILL.md skills/chat-sdk/SKILL.md\nSwarm-Agent: codex-skill-retrieval
2026-03-09 19:09:12 -06:00
John Lindquist 319bf1eb65 feat(hooks): add lexical prompt fallback scoring
Add scorePromptWithLexical as an additive wrapper around the existing exact prompt matcher.
It preserves current matching behavior, then falls back to lexical index hits when the exact score stays below threshold.

Verified: bun test tests/prompt-patterns-lexical.test.ts
Verified: tsc -p hooks/tsconfig.json --noEmit
Swarm-Agent: codex-prompt-patterns
2026-03-09 19:07:07 -06:00
John Lindquist 657e96a294 feat(hooks): add lexical skill index
Add a MiniSearch-backed lexical index for retrieval frontmatter with synonym and contraction expansion so hooks can rank skills from short natural-language queries.

Verified: bun test hooks/lexical-index.test.ts
Verified: ./node_modules/.bin/tsc --noEmit --module NodeNext --moduleResolution NodeNext --target ES2022 --strict --skipLibCheck --types node hooks/src/lexical-index.mts
Swarm-Agent: codex-lexical-index
2026-03-09 19:04:18 -06:00
John Lindquist e9ee9f2966 feat(hooks): add unified skill ranker
Add a shared rankSkills utility that combines path, command, import, profiler, prompt, lexical, and priority signals into a single sortable score with per-signal breakdowns.

Add a focused Bun regression test covering weighted scoring, ordering, and default field behavior for sparse candidates.

Verified: bun test tests/unified-ranker.test.ts
How to test: bun test tests/unified-ranker.test.ts
Swarm-Agent: codex-unified-ranker
2026-03-09 19:04:01 -06:00
John Lindquist 525258f2d3 feat: add @vercel/sandbox dep and benchmark-sandbox spike
Add @vercel/sandbox as a dev dependency for sandbox benchmarking.
Include initial spike scripts and regenerated manifests.
2026-03-09 18:58:11 -06:00
John Lindquist b8b233995c feat(skills): broaden trigger patterns for 7 under-injected skills based on eval findings; add next-forge skill; bump to 0.15.0
Eval analysis of 9 real sessions showed 10 skills never triggering despite being
requested. Root causes: pathPatterns too narrow (agents write to lib/email-template.tsx
not emails/), promptSignals containing regex instead of plain text (vercel-sandbox),
and missing promptSignals entirely (v0-dev, vercel-firewall).

Skills updated: email, vercel-queues, edge-runtime, vercel-firewall, chat-sdk,
v0-dev, vercel-sandbox. New skill: next-forge (bootstrap detection).
2026-03-09 17:56:23 -06:00
John Lindquist b565b09f1f fix(skills): align frontmatter trigger patterns
Update skill frontmatter to reflect the file paths and prompt language agents
actually use for email templates, workflow-backed queue code, edge runtime
middleware entrypoints, and firewall configuration prompts.

Verified: bun test tests/skill-map-frontmatter.test.ts
Verified: bun --eval "import { buildSkillMap } from './hooks/src/skill-map-frontmatter.mts'; import { compileSkillPatterns, matchImportWithReason, matchPathWithReason } from './hooks/src/patterns.mts'; import { compilePromptSignals, matchPromptWithReason, normalizePromptText } from './hooks/src/prompt-patterns.mts'; const skillMap = buildSkillMap('./skills').skills; const compiled = compileSkillPatterns(skillMap); const bySkill = (name) => { const entry = compiled.find((item) => item.skill === name); if (!entry) throw new Error('missing skill: ' + name); return entry; }; if (!matchPathWithReason('lib/email-template.tsx', bySkill('email').compiledPaths)) throw new Error('email pathPatterns did not match lib/email-template.tsx'); const queueEntry = bySkill('vercel-queues'); if (!matchPathWithReason('app/api/workflows/process/route.ts', queueEntry.compiledPaths)) throw new Error('vercel-queues pathPatterns did not match app/api/workflows/process/route.ts'); if (!matchImportWithReason(\"import { workflow } from '@vercel/workflow'\", queueEntry.compiledImports)) throw new Error('vercel-queues importPatterns did not match @vercel/workflow import'); const edgeSignals = compilePromptSignals(skillMap['edge-runtime'].promptSignals); if (!matchPathWithReason('middleware.ts', bySkill('edge-runtime').compiledPaths)) throw new Error('edge-runtime pathPatterns did not match middleware.ts'); if (!matchPromptWithReason(normalizePromptText('I need an edge function that should run at the edge'), edgeSignals).matched) throw new Error('edge-runtime promptSignals did not match edge prompt'); const firewallSignals = compilePromptSignals(skillMap['vercel-firewall'].promptSignals); if (!matchPromptWithReason(normalizePromptText('Add rate limiting and WAF protection to this app'), firewallSignals).matched) throw new Error('vercel-firewall promptSignals did not match firewall prompt'); console.log('skill trigger verification passed');"\nSwarm-Agent: codex-patterns-infra
2026-03-09 17:44:23 -06:00
John Lindquist 0c49abc547 fix(skills): quote YAML validate patterns ending with colon to fix js-yaml parse errors; bump to 0.14.1 2026-03-09 16:38:11 -06:00
John Lindquist 1e0fc2467c feat(hooks): wire subagent launch bootstrap
Connect SubagentStart to pending launch records so prompt-signal matches
can be merged into likely skills before context assembly.
SessionEnd now cleans hashed pending-launch temp directories and the
hook registry observes Agent tool launches.

Verified: node --input-type=module -e "import { build } from 'tsup'; await build({ entry: ['hooks/src/subagent-start-bootstrap.mts','hooks/src/session-end-cleanup.mts'], format: ['esm'], outDir: 'hooks', outExtension: () => ({ js: '.mjs' }), bundle: false, splitting: false, sourcemap: false, dts: false, clean: false, target: 'node20' });"
Verified: bun test tests/subagent-start-context.test.ts tests/session-end-cleanup.test.ts
Swarm-Agent: codex-wiring
2026-03-09 16:30:02 -06:00
John Lindquist 1dfa612df7 feat(hooks): observe agent subagent spawns
Add a PreToolUse observer hook that records Agent tool launches as pending subagent spawn metadata for downstream bootstrap logic.
It preserves the existing no-mutation contract by always returning {} and now integrates with the committed subagent-state append API.

Verified: bun test tests/pretooluse-subagent-spawn-observe.test.ts
Verified: ./node_modules/.bin/tsc -p hooks/tsconfig.json --noEmit
How to test: run bun test tests/pretooluse-subagent-spawn-observe.test.ts
Swarm-Agent: codex-observer
2026-03-09 16:28:50 -06:00
John Lindquist 2f8111da6d feat(subagent-state): add pending launch state helpers
Add a shared hooks library for pending subagent launch records and per-agent JSON state. The module filters stale launch records, claims the oldest matching launch under a file lock, and writes agent state with atomic rename semantics.

Verified: bun test tests/subagent-state.test.ts
Verified: node --input-type=module -e "import('./hooks/subagent-state.mjs').then((mod) => { if (typeof mod.listPendingLaunches !== 'function' || typeof mod.claimPendingLaunch !== 'function' || typeof mod.appendPendingLaunch !== 'function' || typeof mod.readAgentState !== 'function' || typeof mod.writeAgentState !== 'function') { process.exit(1); } })"
Swarm-Agent: codex-subagent-state
2026-03-09 16:25:50 -06:00
John Lindquist 92dbe3ae02 feat(hooks): add SubagentStart/SubagentStop hooks for subagent skill injection; bump to 0.14.0
- SubagentStart bootstrap hook injects project context (likely skills, summaries) into spawned subagents
  with budget scaling by agent type (minimal for Explore/Plan, standard for general-purpose)
- SubagentStop sync hook writes agent metadata to a session-scoped JSONL ledger for observability
- SessionEnd cleanup extended to remove subagent ledger files
- Updated ai-elements/nextjs skills, benchmark-agents and eval skill definitions
2026-03-09 15:52:56 -06:00
John Lindquist f15a7d6889 feat(eval): ai-elements validate rules, broader workflow promptSignals, wider chat pathPatterns; bump to 0.13.0
- ai-elements: add PostToolUse validate rules catching raw part.text rendering,
  react-markdown, and dangerouslySetInnerHTML — guides agent to use MessageResponse
- ai-elements: add *chat* and *message* wildcard pathPatterns (catches flight-chat.tsx etc.)
- workflow: add 8 phrases for reliability language ("individually reliable",
  "retry on transient", "transient failures", etc.)
- workflow: add 7 allOf pairs ([retry, transient], [reliable, retry], [sandbox, reliable], etc.)
2026-03-09 15:17:38 -06:00
John Lindquist 5d548e5be8 fix(security): address audit findings — path traversal, brace expansion, injection escaping, profiler hardening; bump to 0.12.0
- Validate sessionId in dedupClaimDirPath() to prevent path traversal (HIGH)
- Add brace expansion pre-pass in globToRegex for {ts,js,mjs} patterns (HIGH)
- Escape --> sequences in HTML comment metadata blocks (MEDIUM)
- Harden checkVercelCli/checkAgentBrowser with 3s timeouts, suggest latest version (MEDIUM)
- Replace silent catch {} blocks with debug logging (LOW)
- Add semver-aware version comparison (LOW)
- Update golden snapshots and fix invocationId sharing
2026-03-09 14:18:43 -06:00
John Lindquist fdef1e9ff7 fix(hooks): share invocation ids across hook logs
Hook modules were creating separate logger instances, so a single PreToolUse run could emit multiple invocationIds once hook-env catch logging fired. Reusing one process-scoped invocationId keeps all lines from one hook invocation correlated.

This also demotes internal trigger diagnostics back to debug so summary mode stays limited to complete and issue events, matching the logger contract and tests.

Verified: bun test tests/pretooluse-skill-inject.test.ts (278 tests pass)
Verified: bun test tests/logger.test.ts (12 tests pass)
Verified: bun test tests/hook-sync.test.ts -t "logger .mts/.mjs sync|pretooluse-skill-inject .mts/.mjs sync" (6 tests pass)
Swarm-Agent: codex-invocation-id-fix
2026-03-09 14:16:27 -06:00
John Lindquist 830e49c69b fix(profiler): harden CLI availability checks
Make the session-start profiler resolve binaries from PATH safely before
invoking them, cap the version-check subprocesses at 3 seconds, and
avoid crashing when npm or agent-browser is missing.

Also expand the outdated Vercel CLI guidance to include the pnpm global
upgrade path and cover the new skip/timeout behavior in profiler tests.

Verified: bun test tests/session-start-profiler.test.ts
Swarm-Agent: codex-profiler-harden-split-2-v2
2026-03-09 14:06:35 -06:00
John Lindquist ee21fef192 fix(hooks): log swallowed profiler errors
Replace empty catch blocks in hook-env and session-start-profiler with\nstructured debug logging using the shared hook logger.\nAlso make the Vercel CLI update check compare numeric version\nsegments so 1.9.0 correctly sorts below 1.10.0.\n\nVerified: bun test tests/session-start-profiler.test.ts\nHow to test: bun test tests/session-start-profiler.test.ts\nSwarm-Agent: codex-profiler-harden-split-1
2026-03-09 13:55:54 -06:00
John Lindquist f035d9afb3 fix(inject): strip YAML frontmatter from skill bodies before injection; bump to 0.11.1
Skill frontmatter (pathPatterns, bashPatterns, promptSignals, etc.)
was being injected alongside the skill body, wasting token budget on
metadata only useful for hook matching. Now uses extractFrontmatter()
to emit only the markdown body.
2026-03-09 13:43:45 -06:00
John Lindquist 4ac3929ef0 fix(manifest): rebuild brace-expanded regex sources
The PreToolUse hook restores path regexes from generated/skill-manifest.json when a v2 manifest is present, so the brace-expansion fix also needs regenerated pathRegexSources. This refresh updates the affected extension-list patterns from literal brace matches to alternations.

Verified: bun run build:manifest
Verified: bun test tests/pretooluse-skill-inject.test.ts -t "matches src/middleware\.(mjs|mts) to routing-middleware skill"
Swarm-Agent: codex-brace-expand
2026-03-09 13:41:28 -06:00
John Lindquist 0930f2aa66 fix(patterns): expand brace globs in globToRegex
Brace groups like {ts,js,mjs} were being escaped literally, which prevented extension-list path patterns from matching. The glob parser now expands balanced brace groups into recursive regex alternations while preserving literal braces when no alternation is present.

Verified: bun test tests/patterns.test.ts
Verified: bun test tests/fuzz-glob.test.ts
Verified: bun test tests/hook-sync.test.ts
Verified: bun test tests/pretooluse-skill-inject.test.ts -t "matches src/middleware\.(mjs|mts) to routing-middleware skill"
Swarm-Agent: codex-brace-expand
2026-03-09 13:39:41 -06:00
John Lindquist ad5859e2c7 fix(hook-env): harden dedup temp paths
Hash invalid session IDs before constructing dedup temp paths so crafted stdin values cannot smuggle traversal segments into recursive claim cleanup. Shared temp-path resolution now verifies the resolved target stays under tmpdir, and seen-skills tests cover both stable safe IDs and hashed invalid IDs.

Verified: bun test tests/session-start-seen-skills.test.ts
How to test: bun test tests/session-start-seen-skills.test.ts
Swarm-Agent: codex-path-traversal
2026-03-09 13:39:32 -06:00
John Lindquist 7ac8edfb8f feat(skills): aggressive prompt signals for workflow/sandbox, "check the docs" directives across 8 skills; bump to 0.11.0
- workflow: add ~60 new promptSignal phrases for reliability language
  (survive page reload, fault-tolerant, retry on failure, session
  persistence, reconnect, durable chat/agent), human-in-the-loop
  patterns (approval, pause until, wait for), and pipeline vocabulary.
  Add ~25 new allOf pairs and 12 new anyOf terms.

- vercel-sandbox: add promptSignals from scratch (had none). 33 phrases
  covering isolated execution, sandbox environments, code safety,
  FFmpeg/media processing, code playgrounds, and tutor patterns.
  27 allOf pairs, 8 anyOf terms, noneOf excludes iframe/codesandbox.

- Add "CRITICAL — your training data is outdated" blockquote at the top
  of 8 fast-moving skill bodies (workflow, ai-sdk, vercel-sandbox,
  ai-gateway, chat-sdk, vercel-flags, vercel-queues, ai-elements)
  directing agents to fetch docs before writing code.

Eval results that motivated these changes:
- content-pipeline: 9/10 (workflow triggered, correct WDK patterns)
- customer-support: 3/10 → workflow never injected (now scores 50)
- code-sandbox-tutor: 1/10 → sandbox never injected (now scores 80)
2026-03-09 13:16:16 -06:00
John Lindquist 300488ebf3 fix(workflow): add explicit --no-src-dir guidance for create-next-app, update golden fixtures; bump to 0.10.1 2026-03-09 12:55:59 -06:00
John Lindquist 5ce557a33e feat(skills): add ai-generation-persistence and verification skills; bump to 0.10.0
New ai-generation-persistence skill (priority 6) injects guidance for treating
AI generations as first-class persistent resources — unique IDs, addressable
URLs, database/Blob storage, cost tracking, and generate-then-redirect UX
patterns. Triggers on AI SDK imports and broad prompt signals.

New verification skill added. Updated ecosystem graph, catalog, manifest,
fixtures, and snapshots.
2026-03-09 12:23:19 -06:00
John Lindquist ff965cc377 fix(skills): remove styled-jsx, regenerate catalog, add investigation-mode skill, build-from-skills templates; bump to 0.9.10 2026-03-09 11:38:08 -06:00
John Lindquist 2cbc3d45de fix(skills): remove styled-jsx skill in favor of shadcn/tailwind
styled-jsx is no longer recommended — all CSS-in-JS guidance should
point to shadcn/tailwind and existing solutions instead.
2026-03-09 11:08:23 -06:00
John Lindquist 0d404c0b8b fix(skills): allow plain "provider/model" strings as primary gateway syntax
Plain "provider/model" strings (e.g., model: "openai/gpt-5.4") route
through AI Gateway automatically — the gateway() wrapper is optional and
only needed for providerOptions.gateway (routing, failover, tags). Updated
vercel.md, ai-sdk, and ai-gateway skills to match official Vercel docs.
2026-03-09 11:03:25 -06:00
John Lindquist 81a6da32f7 fix(ai-sdk): add validate rules for direct openai() model bypass, dall-e-3, and experimental_generateImage; bump to 0.9.9 2026-03-09 08:10:50 -06:00