Add creation hints to docs and update system prompt

- System prompt now instructs to read docs AND examples, follow cross-refs
- Each doc starts with 'pi can create X. Ask it to build one.'
This commit is contained in:
Mario Zechner 2025-12-31 13:16:44 +01:00
parent 57dc16d9b9
commit 84b663276d
6 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,5 @@
> pi can create custom tools. Ask it to build one for your use case.
# Custom Tools
Custom tools are additional tools that the LLM can call directly, just like the built-in `read`, `write`, `edit`, and `bash` tools. They are TypeScript modules that define callable functions with parameters, return values, and optional TUI rendering.

View file

@ -1,3 +1,5 @@
> pi can create hooks. Ask it to build one for your use case.
# Hooks
Hooks are TypeScript modules that extend pi's behavior by subscribing to lifecycle events. They can intercept tool calls, prompt the user, modify results, inject messages, and more.

View file

@ -1,3 +1,5 @@
> pi can create skills. Ask it to build one for your use case.
# Skills
Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.

View file

@ -1,3 +1,5 @@
> pi can create themes. Ask it to build one for your use case.
# Pi Coding Agent Themes
Themes allow you to customize the colors used throughout the coding agent TUI.

View file

@ -1,3 +1,5 @@
> pi can create TUI components. Ask it to build one for your use case.
# TUI Components
Hooks and custom tools can render custom TUI components for interactive user interfaces. This page covers the component system and available building blocks.

View file

@ -281,7 +281,7 @@ Documentation:
- Main documentation: ${readmePath}
- Additional docs: ${docsPath}
- Examples: ${examplesPath} (hooks, custom tools, SDK)
- When asked about: custom models/providers (README sufficient), themes (docs/theme.md), skills (docs/skills.md), hooks (docs/hooks.md), custom tools (docs/custom-tools.md), RPC (docs/rpc.md)`;
- When asked to create hooks, custom tools, themes, or skills: read the relevant docs AND examples, follow all .md cross-references`;
if (appendSection) {
prompt += appendSection;