singularity-forge/docs/context-and-hooks
Derek Pearson 6889f6666f docs(skills): update all references from ~/.gsd/agent/skills/ to ~/.agents/skills/
Updates docs/skills.md with:
- New skill directories section (global + project-local)
- Migration note for existing users
- Installation via skills.sh CLI
- Curated onboarding catalog with all available packs
- Maintainer guide for adding/editing catalog entries

Also updates:
- docs/configuration.md: skill lookup paths
- docs/what-is-pi/09-the-customization-stack.md: placement paths
- docs/context-and-hooks/07-the-system-prompt-anatomy.md: example path
- src/resource-loader.ts: JSDoc comment (skills no longer synced)
2026-03-22 05:35:14 -04:00
..
01-the-context-pipeline.md docs: add extension docs 2026-03-11 00:54:01 -06:00
02-hook-reference.md docs: add extension docs 2026-03-11 00:54:01 -06:00
03-context-injection-patterns.md docs: add extension docs 2026-03-11 00:54:01 -06:00
04-message-types-and-llm-visibility.md docs: add extension docs 2026-03-11 00:54:01 -06:00
05-inter-extension-communication.md docs: add extension docs 2026-03-11 00:54:01 -06:00
06-advanced-patterns-from-source.md docs: add extension docs 2026-03-11 00:54:01 -06:00
07-the-system-prompt-anatomy.md docs(skills): update all references from ~/.gsd/agent/skills/ to ~/.agents/skills/ 2026-03-22 05:35:14 -04:00
README.md docs: add extension docs 2026-03-11 00:54:01 -06:00

Context & Hooks — Deep Reference

How context flows through pi, how to intercept and shape it, and advanced patterns for extension authors.

These documents fill gaps between the high-level extending-pi docs and the actual source implementation. Read the extending-pi docs first for fundamentals, then use these for precision work.

Documents

# Document When to read
01 The Context Pipeline Understanding the full journey of a user prompt through every transformation stage to the LLM
02 Hook Reference Complete behavioral specification of every hook — timing, chaining, return shapes, edge cases
03 Context Injection Patterns Practical recipes for injecting, filtering, transforming, and managing context
04 Message Types and LLM Visibility How every message type is converted for the LLM, what it sees, what it doesn't
05 Inter-Extension Communication pi.events, shared state patterns, and multi-extension coordination
06 Advanced Patterns from Source Production patterns extracted from the pi codebase and built-in extensions
07 The System Prompt Anatomy How the system prompt is built, every input source, when it's rebuilt, and every lever to shape it