Commit Graph

8 Commits

  • Merge hooks and custom-tools into unified extensions system (#454)
    Breaking changes:
    - Settings: 'hooks' and 'customTools' arrays replaced with 'extensions'
    - CLI: '--hook' and '--tool' flags replaced with '--extension' / '-e'
    - API: HookMessage renamed to CustomMessage, role 'hookMessage' to 'custom'
    - API: FileSlashCommand renamed to PromptTemplate
    - API: discoverSlashCommands() renamed to discoverPromptTemplates()
    - Directories: commands/ renamed to prompts/ for prompt templates
    
    Migration:
    - Session version bumped to 3 (auto-migrates v2 sessions)
    - Old 'hookMessage' role entries converted to 'custom'
    
    Structural changes:
    - src/core/hooks/ and src/core/custom-tools/ merged into src/core/extensions/
    - src/core/slash-commands.ts renamed to src/core/prompt-templates.ts
    - examples/hooks/ and examples/custom-tools/ merged into examples/extensions/
    - docs/hooks.md and docs/custom-tools.md merged into docs/extensions.md
    
    New test coverage:
    - test/extensions-runner.test.ts (10 tests)
    - test/extensions-discovery.test.ts (26 tests)
    - test/prompt-templates.test.ts
  • 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.'
  • feat(coding-agent): add --skills CLI flag for filtering skills
    Adds glob pattern support for skill filtering:
    - --skills <patterns> CLI flag (comma-separated glob patterns)
    - includeSkills setting in settings.json
    - ignoredSkills now supports glob patterns
    - ignoredSkills takes precedence over includeSkills and --skills
    
    Closes #268
  • Skills standard compliance
    Implement Agent Skills standard (https://agentskills.io/specification):
    - Validate name (must match parent dir, lowercase, max 64 chars)
    - Validate description (required, max 1024 chars)
    - Warn on unknown frontmatter fields
    - Warn on name collisions (keep first)
    - Change prompt format to XML structure
    - Remove {baseDir} placeholder (use relative paths)
    - Add tests and update documentation
    
    fixes #231
  • Improve system prompt docs, clean up theme/skills/hooks docs, fix toolResults type
    - System prompt: clearer pointers to specific doc files
    - theme.md: added thinkingXhigh, bashMode tokens, fixed Theme class methods
    - skills.md: rewrote with better framing, examples, and skill repositories
    - hooks.md: fixed timeout/error handling docs, added custom tool interception note
    - Breaking: turn_end event toolResults changed from AppMessage[] to ToolResultMessage[]
  • coding-agent: change Pi skills to use SKILL.md convention
    Breaking change: Pi skills must now be named SKILL.md inside a directory,
    matching Codex CLI format. Previously any *.md file was treated as a skill.
    
    Migrate by renaming ~/.pi/agent/skills/foo.md to ~/.pi/agent/skills/foo/SKILL.md
  • Add skills system with Claude Code compatibility (#171)
    * Add skills system with Claude Code compatibility
    
    * consolidate skills into single module, merge loaders, add <available_skills> XML tags
    
    * add Codex CLI skills compatibility, skip hidden/symlinks