Kanshō

Docs / Tool calls /

CitationCard

A source citation card linking an agent claim to its evidence: title, URL, excerpt, and confidence.

Preview

1Tailwind CSS v4 — What's newWeb

Tailwind CSS v4.0 is a ground-up rewrite of the framework, redesigned for speed and simplicity. Configuration lives entirely in CSS using the new @theme directive.

tailwindcss.com· retrieved 2 min ago
2src/lib/auth/session.tsCode

export async function getSession(token: string): Promise<Session | null> { const payload = await verifyJwt(token); return payload ? db.session.findUnique({ where: { id: payload.sid } }) : null; }

local · 148 lines

Variants

Documents

1Design System — Spacing tokensDoc

All spacing values are derived from a 4px base unit. Use multiples of 4 (4, 8, 12, 16, 24, 32, 48, 64) for layout and multiples of 2 for fine-grained UI adjustments.

internal/design-system/spacing.md
2Product brief — Agent cockpitDoc

The cockpit is a lightweight observability layer for AI agents. It surfaces tool calls, reasoning traces, and cost in a scannable, developer-friendly UI.

internal/briefs/agent-cockpit-v2.md

Memory

1User preference — prefers dark modeMemory

User has stated a preference for dark mode interfaces and compact information density. Avoid large whitespace padding in generated UI.

memory · session context
2Project stack noteMemory

This project uses Bun as the package manager. Never suggest npm or yarn. The component library is Kanshō, not shadcn.

memory · project init

Props

PropTypeDescription
title*stringPrimary label for the citation — document title, file path, or page name.
source*stringOrigin string shown in monospace below the snippet (e.g. a URL, file path, or storage key).
indexnumberNumeric badge rendered at the start of the card header — links this card to an InlineCitation.
urlstringWhen provided, the card renders as an anchor tag that opens in a new tab.
snippetstringShort excerpt shown beneath the header, clamped to 3 lines.
retrievedAtstringHuman-readable retrieval timestamp (e.g. "2 min ago") shown after the source.
kind"web" | "doc" | "code" | "memory"Controls the icon and kind badge. Defaults to "web".
classNamestringExtra classes for the card element.

* required.

Usage

import { CitationCard, InlineCitation } from "@/components/agent/citation-card";

// Inline numeric reference inside prose:
<p>
  Auth uses short-lived JWTs <InlineCitation index={1} title="Session middleware" />.
</p>

// The matching card:
<CitationCard
  index={1}
  title="Session middleware docs"
  source="internal/auth/session.md"
  snippet="Sessions are stored as signed JWTs with a 15-minute TTL and rotated on each request."
  kind="doc"
/>