Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/author-recipes-and-cookbooks/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ All three are registered in `src/lib/recipes/recipes.ts`, share a flat `/templat
- add an entry to `cookbooks` with `id`, `name`, `description`, `recipeIds`
- rely on `createCookbook()` to derive `tags` and `services`
4. Create `src/pages/templates/<slug>.tsx` following the existing pattern:
- import `CookbookDetail`, `cookbooks`, `useAllRawRecipeMarkdown`
- import `CookbookDetail`, `cookbooks`, `useAllRecipeSections`, `useCookbookIntro`, and `composeCookbookMarkdown`
- import each recipe markdown module from `@site/content/recipes/<slug>/content.md`
- select the cookbook with `cookbooks.find((c) => c.id === "<slug>")`
- build `rawMarkdown` from `cookbook.recipeIds` joined with `\n\n---\n\n`
Expand Down
28 changes: 28 additions & 0 deletions .fallowrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "https://raw.githubusercontent.com/fallow-rs/fallow/main/schema.json",
"ignorePatterns": ["examples/**", "content/**", ".docusaurus/**", "build/**"],
"ignoreDependencies": [
"@modelcontextprotocol/sdk",
"@docusaurus/module-type-aliases",
"@docusaurus/tsconfig",
"mdast",
"mdast-util-mdx",
"unified",
"unist",
"unist-util-visit",
"prism-react-renderer"
],
"ignoreExports": [
{
"file": "api/mcp.ts",
"exports": ["GET", "POST", "DELETE"]
},
{
"file": "src/components/ui/**",
"exports": ["*"]
}
],
"rules": {
"unused-dependencies": "warn"
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ examples/**/.databricks/
# Screenshots
/screenshots
.vercel
.fallow/
30 changes: 30 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ For every change to DevHub, do the following:
- run `npm run fmt` to format the code
- run `npm run typecheck` to verify types are correct
- run `npm run verify:images` to verify example/resource images (16:9, ≥1600x900) when you've added or changed anything under `static/img/examples/`
- run `npx fallow dead-code` and `npx fallow dupes` to check for dead code and duplication after your changes (see "Dead Code & Duplication" below)
- use agent-browser to verify the changes
- use the `seo-audit` skill to verify all changes are SEO-friendly
- use the `frontend-design` skill to verify all changes adhere to the design principles
Expand Down Expand Up @@ -59,6 +60,35 @@ This repository uses **npm** exclusively. Do not use bun, yarn, or pnpm. All scr
- Use brand colors and avoid raw color values
- Always use shadcn/ui components as the foundation for all UI

## Dead Code & Duplication

After making changes, always run [fallow](https://github.com/fallow-rs/fallow) to keep the codebase clean:

```bash
npx fallow dead-code
npx fallow dupes
```

Then reason from first principles before acting on the report — do not blindly delete or merge:

### Dead code (`fallow dead-code`)

For every flagged item, decide between two options:

- **Remove it** if the code is genuinely unreachable, no longer referenced, or was scaffolding that never got wired up.
- **Wire it up** if the code is something the change you just made should actually be using (e.g. you wrote a parallel implementation and forgot the existing helper). In that case, leverage the existing code instead of duplicating it.

Always prefer the simpler outcome: a smaller codebase with no orphaned exports.

### Duplication (`fallow dupes`)

Duplication reports are a hint, not a verdict. For each cluster:

- **Ignore it** when the matches are not _real_ duplicates — e.g. similar shapes that happen to look alike, generated code, fixtures, or two functions that share a structure but model genuinely different concepts. Some repetition is good; premature abstraction is worse than a little copy-paste.
- **Unify it** only when the matches are clearly the same type, the same function, or the same logic expressed twice. In that case, extract a shared helper / type / component and replace the call sites.

When in doubt, leave it alone and write a short note in the PR explaining why the duplication is intentional.

## Browser Automation

Use `agent-browser` for web automation. Run `agent-browser --help` for all commands.
Expand Down
2 changes: 1 addition & 1 deletion api/content-markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { ABOUT_DEVHUB_SLUG } from "../src/lib/bootstrap-prompt";
import {
hasContentSlug,
hasSolutionSlug,
joinContentSections,
readContentSections,
readCookbookIntro,
} from "../src/lib/content-markdown";
import { joinContentSections } from "../src/lib/content-sections";
import { buildCookbookMarkdownDocument } from "../src/lib/cookbook-composition";
import { expandMdxImports } from "../src/lib/expand-mdx";
import {
Expand Down
143 changes: 127 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@
"@docusaurus/core": "3.9.2",
"@docusaurus/preset-classic": "3.9.2",
"@docusaurus/theme-mermaid": "3.9.2",
"@hookform/resolvers": "^5.2.2",
"@mdx-js/react": "^3.0.0",
"@modelcontextprotocol/sdk": "^1.25.2",
"@vercel/analytics": "^2.0.1",
"@vercel/functions": "^3.4.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.0.0",
"cmdk": "^1.1.1",
"date-fns": "^4.1.0",
"docusaurus-lunr-search": "3.6.0",
"embla-carousel-react": "^8.6.0",
"input-otp": "^1.4.2",
Expand All @@ -67,6 +65,7 @@
"@playwright/test": "^1.58.2",
"@tailwindcss/postcss": "^4.2.2",
"@vercel/node": "^5.6.15",
"fallow": "^2.45.0",
"husky": "^9.1.7",
"image-size": "^2.0.2",
"postcss": "^8.5.8",
Expand Down
6 changes: 4 additions & 2 deletions plugins/content-entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import type { LoadContext, Plugin } from "@docusaurus/types";
import {
getContentSlugs,
getSolutionSlugs,
joinContentSections,
readContentSections,
type ContentSections,
} from "../src/lib/content-markdown";
import {
joinContentSections,
type ContentSections,
} from "../src/lib/content-sections";
import {
recipes,
examples,
Expand Down
2 changes: 1 addition & 1 deletion plugins/cookbooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../src/lib/content-markdown";
import { cookbooks } from "../src/lib/recipes/recipes";

export type CookbooksGlobalData = {
type CookbooksGlobalData = {
/** Raw `content/cookbooks/<slug>/intro.md` bodies keyed by cookbook id. */
introsBySlug: Record<string, string>;
};
Expand Down
2 changes: 0 additions & 2 deletions plugins/robots-txt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ export default function robotsTxtPlugin(context: LoadContext): Plugin {
},
};
}

export { buildRobotsTxt };
Loading