-
Notifications
You must be signed in to change notification settings - Fork 141
docs: Add documentation for vibe coding #1756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 34 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
2c507db
docs: Quick Start improvement - structure
patrikbraborec 67cbf9e
Add quick start prompt to the docs
patrikbraborec 3144626
Improve the flow of prompt quick start
patrikbraborec 4b19c6e
Fix lint errors
patrikbraborec 7b6ef70
Fix lint errors
patrikbraborec ac7037c
Remove extra words
patrikbraborec 366bc79
Test analytics
patrikbraborec c88909d
Remove console.log
patrikbraborec 910b109
Improve prompt
patrikbraborec 0b2041b
Add next steps to prompt
patrikbraborec d3cce1c
feat: implement basic kapa.ai and inkeep a/b test (#1722)
B4nan c62a0cc
docs: Add documentation for vibe coding
patrikbraborec 87b9b5f
Refactor the docs
patrikbraborec e398cc6
Improve the ai assistant docs
patrikbraborec c05b264
Fix lint errors
patrikbraborec e9f0fed
Fix lint errors
patrikbraborec 73140be
Restructure wording
patrikbraborec 735c4d1
Fix comments from feedback
patrikbraborec d33175f
Marge conflict w/ package-json
patrikbraborec 1d95fec
Reset package-lock to master version
patrikbraborec 41880e6
Fix package-lock
patrikbraborec 9fc8097
Fix lint errors
patrikbraborec c55b5ee
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec 2712c30
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec 96023c9
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec c955cc2
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec 205e6f7
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec 3263d3f
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec 4c373d0
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec a21f264
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec 0472353
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec e1d585e
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec d516b0c
Fix PR comments
patrikbraborec 3dad123
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec 88a3937
Update sources/platform/actors/development/quick_start/vibe_coding.md
patrikbraborec 738d739
Add markdown info, and remove robots and sitemap info
patrikbraborec 44d63b1
Fix build errors
patrikbraborec 39d5fe8
Change vibe coding to build with ai
patrikbraborec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+113 KB
sources/platform/actors/development/quick_start/images/github-copilot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
sources/platform/actors/development/quick_start/vibe_coding.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| --- | ||
| title: Vibe coding | ||
patrikbraborec marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| sidebar_position: 3 | ||
| description: Learn how to set up your environment, choose the right tools, and establish workflows for effective vibe coding | ||
| slug: /actors/development/quick-start/vibe-coding | ||
| toc_max_heading_level: 4 | ||
| --- | ||
|
|
||
| **Set up your environment, choose tools, and build workflows for effective vibe coding.** | ||
|
|
||
| --- | ||
|
|
||
| import { RULES_AND_INSTRUCTIONS_PROMPT } from "@site/src/utils/ai-prompts"; | ||
| import PromptButton from "@site/src/components/PromptButton"; | ||
|
|
||
| This guide explains how to enhance your development workflow by leveraging `llms.txt` and `llms-full.txt` with an AI assistant. You will learn how to provide foundational context and further refine AI's behavior with specific rules and instruction files. | ||
|
|
||
| ## `llms.txt` and `llms-full.txt` | ||
|
|
||
| Search engines weren't built for Large Language Models (LLMs), but they needs context. That's why we've created `[llms.txt](https://docs.apify.com/llms.txt)` and `[llms-full.txt](https://docs.apify.com/llms-full.txt)` for our documentation. These files follow the [growing standard](https://llmstxt.org/) for LLMs consumption. | ||
patrikbraborec marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| | File | Purpose | Impact on LLM Processing | | ||
| | :--- | :--- | :--- | | ||
| | `/robots.txt` | Tells crawlers where to go. | It doesn't help with content understanding. | | ||
| | `/sitemap.xml` | Lists pages. | It doesn't help with content. LLM systems still need to parse complex HTML and handle extra info, which clutters the context window. | | ||
| | `/llms.txt` | Solves LLMs problems by presenting content optimized for LLM processing. | It overcomes context window limits and removes markup and scripts. | | ||
patrikbraborec marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Use llms.txt and llms-full.txt | ||
|
|
||
| LLMs don't automatically discover `llms.txt` files, you need to add the link manually. Some tools like [Cursor](https://www.cursor.com/) provide settings for this. | ||
|
|
||
| #### Cursor | ||
|
|
||
| Go to: **Settings -> Cursor Settings -> Indexing & Docs -> Add Doc**. | ||
|
|
||
| Now, you can just provide the link to Apify `llms-full.txt`: | ||
|
|
||
| ```markdown | ||
| https://docs.apify.com/llms-full.txt | ||
| ``` | ||
|
|
||
|  | ||
|
|
||
| #### Windsurf | ||
|
|
||
| Open Windsurf Cascade, and add context via `@web`: | ||
|
|
||
|  | ||
|
|
||
| :::note Windsurf @docs | ||
|
|
||
| Windsurf provides the `@docs` command, but you cannot customize it. It means that you cannot add your own documentation. | ||
|
|
||
| ::: | ||
|
|
||
| #### GitHub Copilot | ||
|
|
||
| Open Copilot Chat mode, and add context via `#fetch`: | ||
|
|
||
|  | ||
|
|
||
| :::note GitHub Copilot and documentation | ||
|
|
||
| Similar to Windsurf, GitHub Copilot does not provide an option for adding your own documentation. | ||
|
|
||
| ::: | ||
|
|
||
| #### Ask AI | ||
|
|
||
| New to Apify? Ask questions and provide the `llms.txt` link. Popular AI models can search the web. With the right context, you get better answers: | ||
|
|
||
|  | ||
|
|
||
| ## Add rules | ||
|
|
||
| To get the most from AI IDEs, add rules or instructions. | ||
|
|
||
| See how to set up rules for your AI IDEs: | ||
patrikbraborec marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - [Cursor Rules](https://docs.cursor.com/en/context/rules) | ||
| - [Windsurf Rules](https://docs.windsurf.com/windsurf/cascade/memories#rules) | ||
| - [GitHub Copilot instructions](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions) | ||
|
|
||
| ### Apify rules and instructions | ||
|
|
||
| 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: | ||
|
|
||
| <PromptButton prompt={RULES_AND_INSTRUCTIONS_PROMPT}/> | ||
|
|
||
| :::info Keep your rules and instructions up to date | ||
|
|
||
| As the project evolves, you might introduce new things. Always make sure that your rules and instructions are up to date. | ||
|
|
||
| ::: | ||
|
|
||
| ## Best practices | ||
|
|
||
| - _Small tasks_: Don't ask AI for many tasks at once. Break complex problems into smaller pieces. Solve them step by step. | ||
|
|
||
| - _Iterative approach_: Work iteratively with clear steps. Start with a basic implementation and gradually add complexity. | ||
|
|
||
| - _Versioning_: Version your changes often using git. This lets you track changes, roll back if needed, and maintain a clear history. | ||
|
|
||
| - _Security_: Don't expose API keys, secrets, or sensitive information in your code or conversations with LLM assistants. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| import React, { useEffect, useRef, useState } from 'react'; | ||
|
|
||
| import { QUICK_START_PROMPT } from '../utils/ai-prompts'; | ||
| import styles from './PromptButton.module.css'; | ||
|
|
||
| export default function PromptButton({ prompt = QUICK_START_PROMPT, title = 'Use pre-built prompt to get started faster.' }) { | ||
| const [copied, setCopied] = useState(false); | ||
| const [showPrompt, setShowPrompt] = useState(false); | ||
| const timeoutRef = useRef(null); | ||
|
|
||
| useEffect(() => { | ||
| return () => { | ||
| if (timeoutRef.current) { | ||
| clearTimeout(timeoutRef.current); | ||
| } | ||
| }; | ||
| }, []); | ||
|
|
||
| const handleCopy = async () => { | ||
| if (window.analytics) { | ||
| window.analytics.track('Clicked', { | ||
| app: 'docs', | ||
| button_text: 'Copy prompt', | ||
| element: 'prompt-button.copyButton', | ||
| }); | ||
| } | ||
|
|
||
| try { | ||
| await navigator.clipboard.writeText(prompt); | ||
|
|
||
| if (timeoutRef.current) { | ||
| clearTimeout(timeoutRef.current); | ||
| } | ||
|
|
||
| setCopied(true); | ||
| timeoutRef.current = setTimeout(() => setCopied(false), 2000); | ||
| } catch (err) { | ||
| console.error('Failed to copy prompt:', err); | ||
| } | ||
| }; | ||
|
|
||
| const togglePrompt = () => { | ||
| setShowPrompt(!showPrompt); | ||
| }; | ||
|
|
||
| return ( | ||
| <> | ||
| <div className={styles['prompt-card']}> | ||
| <div className={styles['prompt-content']}> | ||
| <div className={styles['prompt-text']}> | ||
| <span>{title}</span> | ||
| </div> | ||
| </div> | ||
| <div className={styles['button-container']}> | ||
| <button | ||
| className={styles['toggle-button']} | ||
| onClick={togglePrompt} | ||
| > | ||
| {showPrompt ? 'Hide the prompt' : 'Show the prompt'} | ||
| </button> | ||
| <button | ||
| className={`${styles['copy-button']} ${copied ? styles.copied : ''}`} | ||
| onClick={handleCopy} | ||
| > | ||
| {copied ? 'Copied!' : 'Copy prompt'} | ||
| </button> | ||
| </div> | ||
| </div> | ||
| {showPrompt && ( | ||
| <div className={styles['full-prompt-container']}> | ||
| <div className={styles['full-prompt']}> | ||
| <pre>{prompt}</pre> | ||
| </div> | ||
| </div> | ||
| )} | ||
| </> | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.