Commit Graph

31 Commits

Author SHA1 Message Date
Nathan 🔶 Tarbert c84e2166bc docs(git): require branching from up-to-date origin/main
Add a rule to .claude/docs/git.md to fetch and branch off origin/main
(not stale local main) before starting work, with the worktree
equivalent and the rebase recovery command for an already-stale branch.
Prevents PRs from being based on an old commit.
2026-06-23 17:22:07 -04:00
Sam Julien 4c311ac3fb chore(docs): add shell-docs symlink 2026-06-18 14:54:25 -07:00
Sam Julien 33a79485b6 chore(docs): remove retired docs app 2026-06-18 10:54:16 -07:00
Sam Julien 2d3bafd61c docs: clarify shell-docs hybrid authoring 2026-06-17 10:18:13 -07:00
Atai Barkai 51df081bd5 docs: commit-as-you-go and draft-PR-up-front conventions
Every meaningful unit of work gets its own pushed commit; a draft PR
opens on the first commit of a branch and flips to ready only on the
developer's say-so.
2026-06-10 10:46:08 -07:00
Austin Merrick 9c0ec8eec0 fix(skills): remove internal-only skills from public repo (#5187)
## What

Two unrelated cleanups:

### 1. Move internal-only skills out of the public repo

Three staff-only skills lived under `.claude/skills/` and
`.agents/skills/`, so `npx skills add CopilotKit/CopilotKit` swept them
into end-user installs. This PR deletes them here; they now live in the
internal-skills plugin (**CopilotKit/internal-skills#108**):

- `copilotkit-demo-parity`
- `git-hooks`
- `showcase-demo-debugging`

### 2. Recommend a cleaner skills install command

The **Build with agents** guide now recommends:

```bash
npx skills add CopilotKit/CopilotKit/skills -y
```

- `/skills` subpath installs only the published skills under `skills/`
(the repo root also picks up internal skills).
- `-y` skips the interactive prompts.

A Callout documents the interactive variant and `-g` for a global
install.
2026-06-03 14:43:15 -07:00
Austin Merrick 179242cd82 fix(skills): remove internal-only skills from public repo
Removes the three internal-only skills (copilotkit-demo-parity, git-hooks,
showcase-demo-debugging) from .claude/skills/ and .agents/skills/. These are
staff-only and now live in the internal-skills plugin. Removing them at the
source means root skill discovery no longer sweeps internal skills into a
user's install.
2026-06-03 11:26:24 -07:00
github-actions[bot] 43c448b5d4 style: auto-fix formatting 2026-06-03 17:06:19 +00:00
Sam Julien 69673f2ea7 docs: route all documentation authoring to shell-docs
The top-level docs/ app is retired but nothing said so, and two
instruction surfaces still pointed contributors there. Establish a
single canonical rule and reduce the other surfaces to pointers.

- Add .claude/docs/documentation.md as the source of truth: CopilotKit
  docs are authored in showcase/shell-docs/src/content/; the top-level
  docs/ folder is retired; AG-UI protocol docs are authored upstream in
  ag-ui-protocol/ag-ui and mirrored here.
- CLAUDE.md: add an Essentials rule and a Reference link.
- docs/README.md: replace boilerplate with a retired/STOP banner.
- .claude/docs/hooks.md: fix the stale /docs pointer; document that a
  hook's API reference page lives in reference/hooks/ and that v2
  reference nav is generated from frontmatter (no meta.json).
- CONTRIBUTING.md: add a two-domain documentation section.
2026-06-03 10:04:56 -07:00
Austin Merrick b9514a9037 fix(skills): mark showcase-demo-debugging as internal
Add `metadata.internal: true` so the skill is hidden from
`npx skills add CopilotKit/CopilotKit` public installs.
Same pattern as PR #4937 for git-hooks and copilotkit-demo-parity.
2026-05-27 08:47:13 -07:00
Alem Tuzlak 4cf0c5fed3 docs: add showcase demo work skill 2026-05-21 10:35:12 +02:00
Tyler Slaton 1a9cb461e0 chore(claude): remove leftover logic from past dev sessions
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-05-20 21:29:31 -07:00
Tyler Slaton 0186ae9f28 fix(shell-docs): unbreak preview build + harden related regressions
Three regressions from the earlier CR Round 1 fix batch + a related
miss the same round didn't catch.

1. `components/ai/page-actions.tsx` is `"use client"`; importing
   `getBaseUrl` from `@/lib/sitemap-helpers` pulled `fs` / `path` /
   `gray-matter` into the client bundle and broke the build entirely
   ("Module not found: Can't resolve 'fs'"). The whole point of
   `getBaseUrl` is the 2-line env-var read + trailing-slash strip — no
   filesystem work — so inline a `getClientBaseUrl()` helper here with a
   pointer to the canonical server-side version. `sitemap-helpers.ts`
   stays untouched so other server-side callers keep their convenience.

2. The same file re-threw caught errors from `fetchMarkdown` /
   `clipboard.writeText` on the assumption that Fumadocs's
   `useCopyButton` would treat the rejection as "don't flip the
   `checked` state". It doesn't — there's no `.catch()` on the
   internal promise (verified in
   `fumadocs-ui/dist/utils/use-copy-button.js`), so the throw produced
   an unhandled rejection (browser console noise + Sentry spam) AND
   gave the user no visible failure indicator either way. Log and
   swallow at this layer; a follow-up PR can introduce an explicit
   error UI if we want "Copy failed" to surface.

3. `.claude/launch.json` routed `shell` to port 3004 by passing
   `-- --port 3004` to `npm --prefix showcase/shell run dev`. But
   shell's `dev` script ends with `npx -y concurrently -k -n
   bundle,next "tsx ... --watch" "next dev"` — the trailing
   `--port 3004` was parsed by `concurrently`, not `next dev`, so
   `next dev` still bound 3000 and the original collision with `docs`
   persisted. Switch to `bash -c "PORT=3004 npm --prefix showcase/shell
   run dev"` so the env var passes through `concurrently` into
   `next dev` (which natively reads PORT).

Call-site enumeration:
- `getClientBaseUrl` (new) — only used inside the same file. No
  external callers to update.
- `getBaseUrl` (untouched in `@/lib/sitemap-helpers`) — server-side
  callers (sitemap routes, `llms-full.txt` route, `llms.txt` route)
  unchanged; verified via grep that no `"use client"` file imports it.
- `MarkdownCopyButton` — error now logged once via `console.error`
  and swallowed; the button stays in its idle state.
- `.claude/launch.json` `shell` entry — `runtimeExecutable` flipped
  from `npm` to `bash`; harness reads these as opaque strings.
2026-05-20 20:12:03 -07:00
Tyler Slaton 04c6383990 fix(shell-docs): resolve launch.json port collision + harden preview script + untrack next-env.d.ts
`.claude/launch.json` declared port 3000 for both \`docs\` (Next.js at
docs/) and \`shell\` (Next.js at showcase/shell/) — only one could
actually start at a time, and Next's auto-port-fallback would land
\`shell\` on whatever was free without the launch config knowing.
Reassign \`shell\` to port 3004 (next free slot after the existing
3001/2/3 cluster) and pass \`-- --port 3004\` through \`npm run dev\`
so the runtime port matches the declared port.

\`.claude/preview/shell-docs.sh\` had a blanket
\`|| { echo "(may have failed — expected)" }\` after \`pnpm install\` that
swallowed every install failure, not just the documented \`lefthook\`
prepare-hook one. A real failure (network down, lockfile drift) would
get silently absorbed and then explode much later at the \`npx tsx\`
generator step with a confusing \`Cannot find module\` error. Verify
\`$SCRIPTS_DIR/node_modules\` exists after the install attempt; bail
with a clear instruction if it doesn't.

\`showcase/shell-docs/next-env.d.ts\` is a Next.js-auto-generated file
whose contents differ between \`next dev\` (\`./.next/dev/types/...\`)
and \`next build\` (\`./.next/types/...\`). Per Next.js's own
recommendation it should never be checked in — the v16 path change
would otherwise produce dirty trees on every build/dev switch, and a
clean checkout's typecheck would fail because the imported
\`.next/dev/types/routes.d.ts\` is itself gitignored. Add the file to
\`.gitignore\` (matching the existing \`docs/next-env.d.ts\` entry) and
\`git rm --cached\` to untrack the committed copy. Next regenerates it
on first \`next dev\`/\`next build\`.

Call-site enumeration:
- \`.claude/launch.json\` — no callers within the repo; the
  \`/run\` slash command reads it as data. Port change is non-breaking
  for any other tooling that doesn't bind to 3000 for \`shell\`.
- \`.claude/preview/shell-docs.sh\` — the lefthook installer is the
  only thing that runs it (besides interactive users); both flows
  benefit from the loud failure.
- \`next-env.d.ts\` — no source file imports from it; the file is a
  TypeScript \`/// <reference\` declaration consumed by tsc only,
  regenerated on each build/dev.
2026-05-20 20:01:16 -07:00
Tyler Slaton 5728611dfd feat(shell-docs): upgrade to fumadocs 16 / next 16, polish layout, add llms.txt + page actions
Stack upgrade
- fumadocs-core/ui 15.8.5 → 16.8.12, next 15 → 16 (Turbopack), react 19 → 19.2
- Swap "next lint" → "oxlint ." to match the rest of the repo
- New deps for the page-actions component: @radix-ui/react-popover,
  class-variance-authority, clsx, tailwind-merge

Layout & brand polish
- Sidebar floats as a rounded-2xl card with column-aligned padding;
  framework picker pill, accent-purple section icons (16px), accent
  active state, and a single divider line at the footer
- New custom <ThemeSwitch> — single 50×28 neutral switch replaces the
  fumadocs sun/moon split (drops the vertical divider and purple tint)
- Sidebar folder collapse state persists across navigations via
  SidebarFolderStatePreserver
- BrandNav: wider top bar, lowercase "Talk to an engineer", BookIcon
  for Docs, GitHub/Discord icons rendered inline in our footer row
- Mobile: nav clipping + content padding fixes, content grid-span-full
- TOC-less pages: lift article max-width so content stretches into the
  empty TOC column on wide viewports

New routes
- /llms.txt — page index per fumadocs LLMs integration
- /llms-full.txt — concatenated full text of every docs page
- /<path>.md and /<path>.mdx — per-page raw markdown with <Snippet>
  regions inlined as fenced code blocks (resolver in lib/llm-text.ts
  reuses the same demo-content.json the <Snippet> runtime reads)
- Page-actions bar: Copy Markdown + Open in Claude / Claude Code /
  Windsurf / Codex (Codex links to https://chatgpt.com/codex for
  universal coverage)

Content fixes
- Reasoning page (generative-ui/reasoning.mdx): rewrite to point at
  the real reasoning-default / reasoning-custom cells instead of the
  stale agentic-chat-reasoning / reasoning-default-render names
- Strip <FeatureIntegrations /> chip list ("SUPPORTED BY ...") from
  16 docs MDX files (component definition kept in mdx-registry)
- Drop hideTOC: true from 11 pages so they pick up the lifted-cap rule
- Default home (/) to the built-in-agent authored sidebar; fix active
  state matching on the home url
- Restore default fumadocs Callout (drop the bespoke docs-callout)
- OpsPlatformCTA redesign — light bordered card with accent stripe
- FrameworkOverview redesign — drop atmospheric chrome, smaller hero
- Homepage / docs-landing redesign

Integrations (LGP / LGT / ADK)
- Tag @region[default-reasoning-zero-config] in reasoning-default and
  @region[reasoning-block-render] in reasoning-custom for all three
  frameworks so the docs <Snippet> calls resolve
- Tag @region[use-agent-simple] + @region[message-list-simple] in
  headless-simple and @region[use-rendered-messages-hook] +
  @region[manual-tool-call-rendering] +
  @region[manual-activity-message-rendering] + @region[custom-bubbles]
  across headless-complete

Other
- docs/components/layout/mobile-sidebar.tsx: lowercase "engineer" to
  match shell-docs
- .claude/launch.json + .claude/preview/ — dev launch configs for the
  worktree so /preview brings up shell-docs on :3003
2026-05-20 19:32:18 -07:00
Austin Merrick 16dc2e691b fix(skills): hide contributor skills from public install discovery
`.claude/skills/git-hooks` and `.claude/skills/copilotkit-demo-parity`
are contributor-only — they teach Claude Code about lefthook and the
parity tooling in `examples/integrations/`, not about using CopilotKit.

Without this, `npx skills add CopilotKit/CopilotKit` installs 11 skills
into end-user environments instead of the 9 intended public ones.

Mark them `metadata.internal: true` so they're excluded by default per
the vercel-labs/skills convention. Maintainers can still install them
with `INSTALL_INTERNAL_SKILLS=1`. Claude Code's project-local auto-load
of `.claude/skills/` is unaffected.
2026-05-20 11:33:15 -07:00
github-actions[bot] b13129b319 style: auto-fix formatting 2026-05-07 19:08:48 +00:00
Alem Tuzlak 90c38bdb91 docs(showcase/langgraph-python): genuine-pass test spec
Design doc for the lgp-test-genuine-pass blitz: Phase 0 cleanup,
Phase 1 family rewrites for 11 cells, Phase 2A wrong-target
D5 probe splits, Phase 2B smoke→genuine D5 probe rewrites.
2026-05-07 17:04:06 +02:00
github-actions[bot] 3f814cf602 style: auto-fix formatting 2026-05-01 12:31:04 +02:00
Ran Shem Tov 09501b43ed chore(integrations/_parity): inline-prompt contract + track Dockerfile
Two small changes to the parity tooling, surfaced while validating it on
the langgraph-fastapi port.

1. Drop the per-instance PROMPT.md file. The reference demo
   (langgraph-python) does not load agent/PROMPT.md at runtime — it inlines
   the prompt as a triple-string literal in agent/main.py. Syncing a
   cosmetic PROMPT.md file to every instance created a contract the code
   did not follow. Now:
   - sync.ts no longer writes agent/PROMPT.md per instance.
   - verify.ts greps the first non-blank line of _parity/canonical/PROMPT.md
     against each instance's agent source. Inline the prompt string in
     source; verifier passes.
   - Deleted the now-orphaned PROMPT.md copy under langgraph-js/agent/.

2. Track Dockerfile, docker/Dockerfile.agent, and serve.py in the shared
   verbatim-files list. These were previously silent "allowed divergence"
   across all instances — any Docker or runtime-adapter drift shipped
   unflagged. Now:
   - Added to tracked.verbatimFiles in manifest.json.
   - langgraph-js keeps them in allowedDivergence (Node-only stack, legit
     difference from the Python-based reference).
   - langgraph-fastapi drops them from allowedDivergence (same language
     stack as the reference; Docker/serve.py should match).

README and the copilotkit-demo-parity skill updated to match the new
prompt contract. Verifier still supports `--target` and exits non-zero on
unexpected drift.
2026-05-01 12:31:04 +02:00
Ran Shem Tov 2bb9f3fdf4 chore(integrations): add _parity tooling + copilotkit-demo-parity skill
Introduce machinery for keeping examples/integrations/* demos aligned to a
single north-star (langgraph-python). Built first so the upcoming
langgraph-js and langgraph-fastapi alignment PRs have a mechanical baseline
to work against instead of manual copy-paste.

- examples/integrations/_parity/manifest.json declares verbatim files,
  tracked package.json keys, and expected agent surface (tool names,
  state keys) per instance plus allowed-divergence lists.
- _parity/sync.ts copies verbatim files + rewrites tracked package.json
  keys from north-star to a target instance. Dry-run supported.
- _parity/verify.ts diffs each instance vs north-star and exits non-zero
  on unexpected drift. Checks verbatim content, tracked keys, canonical
  prompt equality, and agent-surface grep-level presence.
- Canonical prompt at _parity/canonical/PROMPT.md — synced into each
  instance's agent/PROMPT.md on parity:sync.
- Root package.json: pnpm parity:sync, parity:verify, parity:check.
- CI: .github/workflows/integrations_parity.yml runs parity:check on PRs
  touching examples/integrations/**.
- Skill: .claude/skills/copilotkit-demo-parity/SKILL.md teaches agents
  how to drive sync/verify and handle manual-merge zones (agent code,
  api route, Dockerfile).

Does NOT touch the existing instance demos yet. Those alignment commits
follow in the same PR.
2026-05-01 12:31:04 +02:00
github-actions[bot] e1fc123332 style: auto-fix formatting 2026-04-30 11:36:20 +00:00
Alem Tuzlak b243a21e95 docs: LGP D5 coverage design plan 2026-04-30 12:42:35 +02:00
Jordan Ritter 39b4ea6ecc docs: clarify client-side debug prop behavior
Updated JSDoc and troubleshooting docs to accurately describe that
the client-side debug prop forwards config to the AG-UI transport
layer, not CopilotKit's own logging. Removed fabricated console.debug
output examples that don't exist.
2026-04-14 14:58:44 -07:00
Alem Tuzlak e977a49972 fix: address CR findings for debug mode feature
- Fix clone() dropping debug config on ProxiedCopilotRuntimeAgent
- Pass raw DebugConfig to agents instead of collapsing to boolean
- Clamp verbose to false when enabled is false
- Fix pino-pretty log format in docs (parentheses, timestamps, levels)
- Add loggedEventCount to doc example
- Fix "Agent run started/finished" → actual log messages in arch docs
2026-04-14 18:35:32 +02:00
Alem Tuzlak 7e0a632e64 test: add debug mode tests for shared, runtime, and core packages 2026-04-14 18:34:47 +02:00
Tyler Slaton 96885b5959 refactor: consolidate V1/V2 packages into flat @copilotkit/* structure
Flatten all packages from packages/v1/* and packages/v2/* into packages/* —
every package now lives directly under the @copilotkit/ scope with no v1/v2
subdirectories.

- Move all v1 packages (react-core, react-ui, runtime, shared, etc.) from
  packages/v1/* to packages/*
- Absorb v2 react code into packages/react-core/src/v2/ (exported via /v2 subpath)
- Absorb v2 agent code into packages/runtime/src/agent/ (exported via /v2 subpath)
- Move v2 packages (core, angular, demo-agents, etc.) to packages/*
- Replace all @copilotkitnext/* imports with @copilotkit/* equivalents
- Keep @copilotkitnext/angular as the sole exception (angular remains on next)
- Update CI workflows, renovate config, release scripts for flat structure
- No public API surface changes — all exports fields are preserved

Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-28 16:45:10 -07:00
Alem Tuzlak 09572f7a37 docs: add commit grouping convention to git guidelines
Commits should be grouped by area of concern when committing batches
of changes, with related file moves included in the same commit.
2026-03-13 14:22:52 +01:00
Alem Tuzlak 33109250e7 chore: add Claude Code hook to enforce lefthook pre-commit
Agents and subagents sometimes skip pre-commit hooks by passing
bypass flags to git commit. This adds a PreToolUse hook that blocks
those attempts, ensuring lefthook always runs.
2026-03-13 14:22:13 +01:00
Ran Shem Tov dfe061e9c8 chore: add skill for claude to describe our pre-commit hooks 2026-03-10 09:50:35 +01:00
Alem Tuzlak 9bd041888e docs: refactor AGENTS.md and CLAUDE.md with progressive disclosure (#3259)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:15:52 +01:00