Skip to content

Commit 50abbe0

Browse files
Improve the ai assistant docs
1 parent 6fd41d6 commit 50abbe0

File tree

6 files changed

+103
-231
lines changed

6 files changed

+103
-231
lines changed

sources/platform/actors/development/ai_assistant_coding/index.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ slug: /actors/development/ai-assistants
99

1010
---
1111

12+
import { RULES_AND_INSTRUCTIONS_PROMPT } from "@site/src/utils/ai-prompts";
13+
import PromptButton from "@site/src/components/PromptButton";
14+
15+
The following documents describe how you can leverage llms.txt and llms-full.txt in AI IDEs, create rules and instructions files, and follow best practices for AI assistant coding.
16+
1217
### Documentation for LLMs: llms.txt and llms-full.txt
1318

1419
Search engines weren't built for Large Language Modals (LLMs), but AI needs context. That's why we created `llms.txt` and `llms-full.txt` for our documentation. These files follow the [growing standard](https://llmstxt.org/) for LLMs consumption.
@@ -86,9 +91,14 @@ See how to set up rules for your AI IDEs:
8691

8792
#### Apify rules and instructions
8893

89-
Use these rules and instructions for your Actors development:
94+
The best rules and instructions are specific for individual use cases, but we provide a prompt to help you get start with creating rules and instructions:
95+
96+
<PromptButton prompt={RULES_AND_INSTRUCTIONS_PROMPT}/>
97+
98+
#### Keep your rules and instructions up to date
99+
100+
As the project evolves, you might introduce new things. Always make sure that your rules are up to date.
90101

91-
- [Rules and instructions](./rules_and_instructions.md)
92102

93103
### Best practices
94104

sources/platform/actors/development/ai_assistant_coding/rules_and_instructions.md

Lines changed: 0 additions & 161 deletions
This file was deleted.

sources/platform/actors/development/quick_start/start_locally.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ slug: /actors/development/quick-start/locally
99

1010
---
1111

12-
import QuickStartPromptButton from "@site/src/components/QuickStartPromptButton";
12+
import PromptButton from "@site/src/components/PromptButton";
1313

14-
<QuickStartPromptButton/>
14+
<PromptButton/>
1515

1616
## What you'll learn
1717

src/components/QuickStartPromptButton.jsx renamed to src/components/PromptButton.jsx

Lines changed: 6 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,9 @@
11
import React, { useEffect, useRef, useState } from 'react';
2+
import { QUICK_START_PROMPT } from '../utils/ai-prompts';
23

3-
import styles from './QuickStartPromptButton.module.css';
4+
import styles from './PromptButton.module.css';
45

5-
const PROMPT = `Follow this step-by-step workflow::
6-
7-
**Step 1: Verify Prerequisites**
8-
9-
First, verify the user's environment by running these commands:
10-
11-
\`\`\`bash
12-
node --version # Requires Node.js 16 or higher
13-
npm --version
14-
apify --version # Check if Apify CLI is already installed
15-
\`\`\`
16-
17-
If any prerequisites are missing, guide the user through installation before proceeding.
18-
19-
**Step 2: Install/Update Apify CLI**
20-
\`\`\`bash
21-
npm install -g apify-cli
22-
\`\`\`
23-
24-
**Step 3: Create a New Actor**
25-
26-
Explain that this will prompt for actor name and template selection.
27-
28-
\`\`\`bash
29-
apify create
30-
\`\`\`
31-
32-
Direct users to explore templates at https://apify.com/templates.
33-
34-
**Step 4: Navigate to the Actor Directory**
35-
36-
\`\`\`bash
37-
cd [actor-name] # Use the actual name they chose in step 3
38-
\`\`\`
39-
40-
**Step 5: Run the Actor Locally**
41-
42-
Explain that this will run the actor locally.
43-
44-
\`\`\`bash
45-
apify run
46-
\`\`\`
47-
48-
**Step 6: Next Steps**
49-
50-
Explain that the user can deploy the actor to Apify, but they first need to log in to Apify:
51-
52-
\`\`\`bash
53-
apify login
54-
\`\`\`
55-
56-
After logging in, you can deploy the actor to Apify:
57-
58-
\`\`\`bash
59-
apify push
60-
\`\`\`
61-
`;
62-
63-
export default function QuickStartPromptButton({ prompt = PROMPT }) {
6+
export default function PromptButton({ prompt = QUICK_START_PROMPT, title = 'Use pre-built prompt to get started faster.' }) {
647
const [copied, setCopied] = useState(false);
658
const [showPrompt, setShowPrompt] = useState(false);
669
const timeoutRef = useRef(null);
@@ -78,7 +21,7 @@ export default function QuickStartPromptButton({ prompt = PROMPT }) {
7821
window.analytics.track('Clicked', {
7922
app: 'docs',
8023
button_text: 'Copy prompt',
81-
element: 'quick-start-prompt-button.copyButton',
24+
element: 'prompt-button.copyButton',
8225
});
8326
}
8427

@@ -102,10 +45,10 @@ export default function QuickStartPromptButton({ prompt = PROMPT }) {
10245

10346
return (
10447
<>
105-
<div className={styles['quick-start-prompt-card']}>
48+
<div className={styles['prompt-card']}>
10649
<div className={styles['prompt-content']}>
10750
<div className={styles['prompt-text']}>
108-
<span>Use this pre-built prompt to get started faster.</span>
51+
<span>{title}</span>
10952
</div>
11053
</div>
11154
<div className={styles['button-container']}>

src/components/QuickStartPromptButton.module.css renamed to src/components/PromptButton.module.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.quick-start-prompt-card {
1+
.prompt-card {
22
display: flex;
33
align-items: center;
44
justify-content: space-between;
@@ -13,7 +13,7 @@
1313
}
1414

1515
/* Light purple glow effect */
16-
.quick-start-prompt-card::before {
16+
.prompt-card::before {
1717
content: '';
1818
position: absolute;
1919
top: 0;
@@ -163,7 +163,7 @@
163163

164164
/* Responsive design */
165165
@media (max-width: 768px) {
166-
.quick-start-prompt-card {
166+
.prompt-card {
167167
flex-direction: column;
168168
gap: 1.2rem;
169169
text-align: center;

0 commit comments

Comments
 (0)