mirror of
https://github.com/rajnandan1/kener.git
synced 2026-06-23 04:10:22 +00:00
refactor: update SKILL.md for code-architecture and tailwindcss; enhance button component in docs page; implement API spec retrieval in v4 server
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
---
|
||||
name: codearch
|
||||
description: |
|
||||
Persistent project memory via a `.codearch/` folder. Use this skill at the START and END of every coding session, agentic task, or multi-step file operation. Trigger whenever the user asks you to work on a codebase, fix a bug, refactor, review code, or continue work from a previous session. Also trigger if the user mentions "context," "memory," "remember this," "pick up where we left off," or references prior work. This skill tells you how to read relevant context before acting and how to compress + save what you learned after acting. Always use it — skipping it loses hard-won context.
|
||||
name: code-architecture
|
||||
description: Persistent project memory via a `.codearch/` folder.
|
||||
user-invokable: false
|
||||
metadata:
|
||||
category: architecture
|
||||
---
|
||||
|
||||
# codearch — Project Memory Skill
|
||||
# code-architecture — Project Memory Skill
|
||||
|
||||
Use this skill at the START and END of every coding session, agentic task, or multi-step file operation. Trigger whenever the user asks you to work on a codebase, fix a bug, refactor, review code, or continue work from a previous session. Also trigger if the user mentions "context," "memory," "remember this," "pick up where we left off," or references prior work. This skill tells you how to read relevant context before acting and how to compress + save what you learned after acting. Always use it — skipping it loses hard-won context.
|
||||
|
||||
`.codearch/` is a folder that lives at the project root. It stores compressed context files so you can resume work without re-deriving what was already figured out.
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
---
|
||||
name: tailwindcss
|
||||
displayName: Tailwind CSS
|
||||
description: Tailwind CSS v4 utility-first styling patterns including responsive design, dark mode, and custom configuration. Use when styling with Tailwind, adding utility classes, configuring Tailwind, setting up dark mode, or customizing the theme.
|
||||
version: 1.0.0
|
||||
user-invokable: false
|
||||
metadata:
|
||||
category: styling
|
||||
---
|
||||
|
||||
# Tailwind CSS v4 Development Guidelines
|
||||
@@ -358,11 +359,3 @@ Tailwind v4 delivers 3.5x faster full builds (~100ms) compared to v3 using moder
|
||||
6. **Enable Dark Mode**: Plan for dark mode from the start
|
||||
7. **Use Plugins**: Leverage official plugins for common needs
|
||||
8. **Optimize Production**: Ensure purge is configured correctly
|
||||
|
||||
## Additional Resources
|
||||
|
||||
For detailed information, see:
|
||||
|
||||
- [Utility Patterns](resources/utility-patterns.md)
|
||||
- [Component Library](resources/component-library.md)
|
||||
- [Configuration Guide](resources/configuration.md)
|
||||
|
||||
@@ -303,7 +303,12 @@
|
||||
|
||||
<div class="mb-8 flex flex-wrap justify-center gap-3 md:gap-4 lg:justify-start">
|
||||
{#each getCtaButtons() as button (button.title)}
|
||||
<Button href={getHref(button.href)} variant={button.primary ? "default" : "outline"} size="lg">
|
||||
<Button
|
||||
href={getHref(button.href)}
|
||||
variant={button.primary ? "default" : "outline"}
|
||||
rel="external"
|
||||
size="lg"
|
||||
>
|
||||
{button.title}
|
||||
{#if button.primary}
|
||||
<ArrowRight class="h-4 w-4" />
|
||||
|
||||
@@ -398,6 +398,28 @@ export function getVersionDocsLlmEntries(versionSlug: string, baseDomain: string
|
||||
const entries: DocsLlmEntry[] = [];
|
||||
const seenUrls = new Set<string>();
|
||||
|
||||
const tabs = version.content.navigation?.tabs ?? [];
|
||||
|
||||
for (const tab of tabs) {
|
||||
const tabUrl = tab.url?.trim();
|
||||
if (!tabUrl) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const url = normalizeAbsoluteUrl(baseDomain, tabUrl);
|
||||
if (!url || seenUrls.has(url)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
seenUrls.add(url);
|
||||
|
||||
entries.push({
|
||||
title: normalizeText(tab.name) || titleFromSlug(tabUrl),
|
||||
description: tab.name === "API Reference" ? "Interactive API reference for this docs version" : "",
|
||||
url,
|
||||
});
|
||||
}
|
||||
|
||||
for (const pageSlug of pageSlugs) {
|
||||
const normalizedSlug = pageSlug.replace(/^\/+/, "");
|
||||
if (!normalizedSlug) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { RequestHandler } from "./$types";
|
||||
import { asset } from "$app/paths";
|
||||
|
||||
const render = ScalarApiReference({
|
||||
url: asset("/api-references/v4.json"),
|
||||
url: asset("/docs/spec/v4/spec.json"),
|
||||
hideModels: true,
|
||||
hideTestRequestButton: false,
|
||||
theme: "kepler",
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import type { RequestHandler } from "./$types";
|
||||
|
||||
const SPEC_PATH = join(process.cwd(), "static", "api-references", "v4.json");
|
||||
|
||||
export const GET: RequestHandler = async () => {
|
||||
try {
|
||||
const spec = await readFile(SPEC_PATH, "utf-8");
|
||||
|
||||
return new Response(spec, {
|
||||
status: 200,
|
||||
headers: {
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"cache-control": "public, max-age=300",
|
||||
},
|
||||
});
|
||||
} catch {
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
error: {
|
||||
code: "NOT_FOUND",
|
||||
message: "API specification not found",
|
||||
},
|
||||
}),
|
||||
{
|
||||
status: 404,
|
||||
headers: {
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user