Skip to content

Commit a5016c6

Browse files
Krigsclaude
andcommitted
feat(docs): add CLI reference and Best Practices pages
- Created /docs/cli with all ODIN CLI commands reference - Created /docs/best-practices with context engineering guidelines - Fixes 404 errors on documentation navigation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 658de63 commit a5016c6

File tree

2 files changed

+157
-0
lines changed

2 files changed

+157
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import { Navbar } from "@/components/layout/navbar"
2+
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/ui/card"
3+
4+
export default function BestPracticesPage() {
5+
const practices = [
6+
{
7+
title: "Be Specific with Context",
8+
description: "Provide clear, relevant information",
9+
content: "Always include only the most relevant context for each interaction. Avoid dumping entire codebases or documents. Instead, carefully select the specific sections that matter for the task at hand.",
10+
},
11+
{
12+
title: "Structure Your Prompts",
13+
description: "Use consistent formatting patterns",
14+
content: "Organize your prompts with clear sections: role definition, context, task description, output format, and constraints. This helps AI models parse and respond to your requests more effectively.",
15+
},
16+
{
17+
title: "Iterate and Refine",
18+
description: "Continuously improve your templates",
19+
content: "Treat your prompts as living documents. Collect feedback, analyze results, and refine your templates over time. Small adjustments can lead to significant improvements in output quality.",
20+
},
21+
{
22+
title: "Use Examples Wisely",
23+
description: "Demonstrate desired outputs",
24+
content: "Include 2-3 high-quality examples in your prompts to show the AI exactly what you expect. This few-shot approach dramatically improves consistency and accuracy.",
25+
},
26+
{
27+
title: "Manage Token Budgets",
28+
description: "Optimize context window usage",
29+
content: "Be mindful of token limits. Prioritize the most important information, use summarization for lengthy content, and leverage ODIN's chunking features to maximize the value of every token.",
30+
},
31+
{
32+
title: "Version Your Prompts",
33+
description: "Track changes over time",
34+
content: "Use version control for your prompt templates just like code. This allows you to track what works, roll back changes, and collaborate effectively with your team.",
35+
},
36+
{
37+
title: "Test Across Scenarios",
38+
description: "Validate with diverse inputs",
39+
content: "Test your prompts with various edge cases and input types. What works for one scenario may fail for another. Build a test suite for your critical prompts.",
40+
},
41+
{
42+
title: "Document Your Patterns",
43+
description: "Share knowledge across your team",
44+
content: "Create a library of proven prompt patterns and share them with your team. Document what works, what doesn't, and why. This accelerates learning and ensures consistency.",
45+
},
46+
]
47+
48+
return (
49+
<>
50+
<Navbar />
51+
<main className="min-h-screen pt-24 pb-16">
52+
<div className="container mx-auto px-4 max-w-4xl">
53+
<h1 className="text-4xl font-bold mb-4">Best Practices</h1>
54+
<p className="text-xl text-muted-foreground mb-12">
55+
Proven strategies for effective context engineering and prompt design.
56+
</p>
57+
58+
<div className="space-y-6">
59+
{practices.map((practice, index) => (
60+
<Card key={index}>
61+
<CardHeader>
62+
<div className="flex items-center gap-3">
63+
<span className="flex items-center justify-center w-8 h-8 rounded-full bg-cyan-500/10 text-cyan-400 text-sm font-bold">
64+
{index + 1}
65+
</span>
66+
<div>
67+
<CardTitle>{practice.title}</CardTitle>
68+
<CardDescription>{practice.description}</CardDescription>
69+
</div>
70+
</div>
71+
</CardHeader>
72+
<CardContent>
73+
<p className="text-muted-foreground">{practice.content}</p>
74+
</CardContent>
75+
</Card>
76+
))}
77+
</div>
78+
</div>
79+
</main>
80+
</>
81+
)
82+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import { Navbar } from "@/components/layout/navbar"
2+
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "@/components/ui/card"
3+
4+
export default function CliPage() {
5+
const commands = [
6+
{
7+
title: "odin init",
8+
description: "Initialize a new ODIN project",
9+
content: "Creates a new ODIN project with the recommended structure, configuration files, and default prompts. Use --template to start from a pre-built template.",
10+
usage: "odin init [project-name] [--template <name>]",
11+
},
12+
{
13+
title: "odin add",
14+
description: "Add a new context or prompt template",
15+
content: "Adds a new context file or prompt template to your project. Supports various formats including markdown, JSON, and YAML.",
16+
usage: "odin add <type> <name> [--format <format>]",
17+
},
18+
{
19+
title: "odin build",
20+
description: "Build and optimize your context files",
21+
content: "Compiles and optimizes all context files, generating the final artifacts ready for deployment. Includes validation and token counting.",
22+
usage: "odin build [--output <dir>] [--minify]",
23+
},
24+
{
25+
title: "odin validate",
26+
description: "Validate your context configuration",
27+
content: "Checks your context files for errors, validates token limits, and ensures all references are resolved correctly.",
28+
usage: "odin validate [--strict] [--fix]",
29+
},
30+
{
31+
title: "odin serve",
32+
description: "Start a local development server",
33+
content: "Launches a local server for testing your prompts and contexts in real-time with hot reloading support.",
34+
usage: "odin serve [--port <number>] [--open]",
35+
},
36+
{
37+
title: "odin deploy",
38+
description: "Deploy your context to production",
39+
content: "Deploys your built context files to your configured production environment. Supports multiple deployment targets.",
40+
usage: "odin deploy [--env <environment>] [--dry-run]",
41+
},
42+
]
43+
44+
return (
45+
<>
46+
<Navbar />
47+
<main className="min-h-screen pt-24 pb-16">
48+
<div className="container mx-auto px-4 max-w-4xl">
49+
<h1 className="text-4xl font-bold mb-4">CLI Reference</h1>
50+
<p className="text-xl text-muted-foreground mb-12">
51+
Complete reference for all ODIN command-line interface commands.
52+
</p>
53+
54+
<div className="space-y-6">
55+
{commands.map((command, index) => (
56+
<Card key={index}>
57+
<CardHeader>
58+
<CardTitle className="font-mono text-cyan-400">{command.title}</CardTitle>
59+
<CardDescription>{command.description}</CardDescription>
60+
</CardHeader>
61+
<CardContent className="space-y-4">
62+
<p className="text-muted-foreground">{command.content}</p>
63+
<div className="bg-muted/50 rounded-lg p-4 font-mono text-sm">
64+
<span className="text-muted-foreground">$ </span>
65+
<span>{command.usage}</span>
66+
</div>
67+
</CardContent>
68+
</Card>
69+
))}
70+
</div>
71+
</div>
72+
</main>
73+
</>
74+
)
75+
}

0 commit comments

Comments
 (0)