-
Couldn't load subscription status.
- Fork 23
feat(docs): Add prompting guideline #427
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
base: main
Are you sure you want to change the base?
Conversation
This commit introduces a new documentation page, "Prompting Guideline," which provides comprehensive instructions and best practices for interacting with Pochi. The new guide covers: - General prompting strategies. - How to craft clear, structured, and effective prompts. - Task-specific examples for various development workflows like debugging, refactoring, and feature development. Additionally, the documentation's navigation (meta.json) has been updated to include this new page under the "Resources" section. 🤖 Generated with [Pochi](https://getpochi.com) Co-Authored-By: Pochi <[email protected]>
🤖 Generated with [Pochi](https://getpochi.com) Co-Authored-By: Pochi <[email protected]>
- Corrected invalid frontmatter syntax. - Escaped special characters causing MDX parsing failures. - Fixed malformed XML example block. 🤖 Generated with [Pochi](https://getpochi.com) Co-Authored-By: Pochi <[email protected]>
|
cddf368 to
4c64953
Compare
- Clarified the meaning of 'structure' in prompts to refer to structured formats like XML or JSON. - Corrected and expanded the 'Leverage Pochi Features' section to be more accurate and readable, detailing the specific files and directories for rules, workflows, and custom agents based on verified documentation. 🤖 Generated with [Pochi](https://getpochi.com) Co-Authored-By: Pochi <[email protected]>
Adds relevant links to the prompting guideline documentation for features like the CLI, rules, workflows, custom agents, and integrations. Also clarifies the language around sharing features to avoid confusion. 🤖 Generated with [Pochi](https://getpochi.com) Co-Authored-By: Pochi <[email protected]>
20b7fa0 to
26f8ac7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall structure and content looking ok. Will take a closer look after Meng's approval on this PR.
|
Hi @wsxiaoys I have already made changes for the doc, do give me your feedback on it! |
| **Example:** | ||
| “Debug `@main.py`: Identify the null reference issue in `fetchUser()`, propose a fix, test with `pytest test_main.py`, log the result." | ||
|
|
||
| ### Use Structured Prompts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is more of a prompting skills for AI app developer (like us), not for our end user.
| ### Assign Pochi a Role (System Prompts) | ||
|
|
||
| Specify a role in the prompt or via a [custom agent](/custom-agent) to enforce standards. | ||
|
|
||
| **Example:** | ||
| “Act as linter for `@models/db.py` per `README.pochi.md`, focusing on PEP 8 spacing issues.” |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this example doesn't show case custom agent. and README.pochi.md doesn't really need explicit reference
| ### Chain Complex Prompts | ||
|
|
||
| Divide large tasks into numbered steps for manageability. | ||
|
|
||
| **Example:** | ||
| “Step 1: Review `@api.py` for existing `/users` route, Step 2: Add `/users` GET endpoint with Flask-Login authentication.” |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the example for this would best be https://github.com/snarktank/ai-dev-tasks, and Pochi actually adopt it in https://github.com/TabbyML/pochi/tree/main/.pochi/workflows
(create-pr / generate-tasks / process-tasks)
| ## Task-Specific Applications | ||
|
|
||
| This section applies prompting patterns to common development workflows, from project management to optimization. Customize these templates for your stack. | ||
|
|
||
| ### Project Management | ||
|
|
||
| - **Initiating a New Project Phase:** “Start a new phase for `@api.js`: Initialize a `/auth` module, list dependencies, document setup separately.” | ||
| - **Reviewing Recent Changes:** “Review `@api.js`: Summarize last 3 commits’ impact on `/users`, flag issues.” | ||
| - **Syncing Team Context:** “Sync `@utils.js` changes: Compile a summary of edits across `@api.js` and `@utils.js`, share via [Pochi link](/share), align with standards.” | ||
|
|
||
| ### Debugging | ||
|
|
||
| - **Analyzing a Crash:** “Analyze `@main.py`: Investigate why `fetchUser()` crashes with null, suggest fix, test with `pytest`.” | ||
| - **Handling Concurrency Issues:** “Debug `@main.py`: Identify deadlock in `fetchUser()` under 50 calls, propose lock fix, validate with `pytest --concurrency=5`.” | ||
| - **Handling a 500 Error:** “Handle `@api.js`: Diagnose a 500 error on `/users`, suggest a fallback, test with mock data.” | ||
| - **Handling an API Fetch Error:** “Debug `@frontend.js`: Fix a fetch error from external API, suggest retry logic (e.g., `setTimeout`), test with mock delay.” |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to reader, this entire session is more of a showcase on how to use @ feature to attach file.
|
|
||
| ### Assign Pochi a Role (System Prompts) | ||
|
|
||
| Specify a role in the prompt or via a [custom agent](/custom-agent) to enforce standards. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use code-reviewer / ask agent as example
#481
Summary
This PR introduces a new Prompting Guideline document to the official Pochi documentation. It also includes several critical fixes that were required to resolve build failures caused by syntax errors in the new MDX file.
New Documentation: Prompting Guideline
The new
prompting-guideline.mdxpage provides a comprehensive guide for users on how to write effective prompts for Pochi. It covers:Fixes Implemented
cant---->---) that was preventing the MDX parser from reading the file's metadata.<character in a code example to prevent it from being parsed as an HTML tag.<file>tags..pochi/agents/andrules/) instead ofREADME.pochi.md.Additional Enhancements
Based on further review feedback, the following improvements have been made:
Test Plan
The local development server (
bun run dev) is used for visual checks and live previews. The production build (bun run build) is a more thorough check to ensure the site can be deployed.bun run buildwithin thepackages/docsdirectory to confirm all build errors are resolved.bun run devand visually confirmed that the new "Prompting Guideline" page renders correctly without errors. https://screen.studio/share/vy62uJVB🤖 Generated with Pochi