Skip to content

Conversation

@jinsyl123
Copy link
Collaborator

@jinsyl123 jinsyl123 commented Sep 24, 2025

#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.mdx page provides a comprehensive guide for users on how to write effective prompts for Pochi. It covers:

  • General best practices for clarity, context, and structure.
  • Specific patterns like few-shot prompting, chain-of-thought, and role-playing.
  • Task-specific examples for workflows such as debugging, refactoring, and feature development.

Fixes Implemented

  • Frontmatter: Corrected an invalid delimiter (cant--- -> ---) that was preventing the MDX parser from reading the file's metadata.
  • Character Escaping: Escaped a literal < character in a code example to prevent it from being parsed as an HTML tag.
  • XML Syntax: Fixed a malformed XML block by correctly wrapping a file path in <file> tags.
  • Clarity: Clarified the meaning of "structure" in the context of prompt iteration in response to reviewer feedback.
  • Configuration Accuracy: Corrected the documentation for agent and rule configuration to point to the correct directories (.pochi/agents/ and rules/) instead of README.pochi.md.

Additional Enhancements

Based on further review feedback, the following improvements have been made:

  • Enhanced Linking: Added direct links to the relevant documentation pages for all Pochi features mentioned (e.g., Models, MCPs, Rules, Workflows, Custom Agents, etc.) to improve navigation and user experience.
  • Improved Readability: Updated the linking style to hyperlink descriptive concepts (e.g., "custom workflows") rather than raw file paths, making the guide easier to read.
  • Clarified Sharing Feature: Replaced the unofficial term "Pochi Cloud" with a direct link to the official sharing documentation to avoid confusion.

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.

  • Production Build: Successfully ran bun run build within the packages/docs directory to confirm all build errors are resolved.
  • Development Server: Ran bun run dev and visually confirmed that the new "Prompting Guideline" page renders correctly without errors. https://screen.studio/share/vy62uJVB
  • Manual QA: A manual review of the live preview is recommended to check for broken links and ensure all content is displayed as expected.

🤖 Generated with Pochi

actions-user and others added 3 commits September 23, 2025 21:36
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]>
@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2025

PR Preview Action v1.6.2

🚀 View preview at
https://TabbyML.github.io/pochi/pr-preview/pr-427/

Built to branch gh-pages at 2025-09-29 20:27 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@jinsyl123 jinsyl123 requested a review from gyxlucy September 24, 2025 19:06
@jinsyl123 jinsyl123 changed the title fix(docs): Resolve build errors in prompting guideline feat(docs): Add prompting guideline Sep 24, 2025
@jinsyl123 jinsyl123 force-pushed the docs/add-prompting-guideline branch from cddf368 to 4c64953 Compare September 28, 2025 01:37
- 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]>
gyxlucy and others added 2 commits September 28, 2025 13:54
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]>
@jinsyl123 jinsyl123 force-pushed the docs/add-prompting-guideline branch from 20b7fa0 to 26f8ac7 Compare September 29, 2025 20:24
Copy link
Member

@gyxlucy gyxlucy left a 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.

@jinsyl123 jinsyl123 requested a review from gyxlucy October 1, 2025 17:24
@jinsyl123 jinsyl123 linked an issue Oct 2, 2025 that may be closed by this pull request
@jinsyl123
Copy link
Collaborator Author

jinsyl123 commented Oct 2, 2025

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
Copy link
Member

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.

Comment on lines +89 to +94
### 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.”
Copy link
Member

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

Comment on lines +96 to +101
### 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.”
Copy link
Member

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)

Comment on lines +103 to +118
## 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.”
Copy link
Member

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.
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add prompting guideline doc

4 participants