Commit graph

12 commits

Author SHA1 Message Date
Mario Zechner
3dca4979e4 docs(coding-agent): fix token count in themes.md, rewrite skills.md
- Fixed themes.md: 50 -> 51 color tokens
- Rewrote skills.md to match structure of other docs (TOC, concise sections)
- Removed redundant content from skills.md while keeping all essential info
2026-01-25 20:48:47 +01:00
Mario Zechner
951fb953ed feat(coding-agent): support disable-model-invocation frontmatter for skills
When set to true, the skill is hidden from the system prompt, preventing
agentic invocation. Users can still invoke explicitly via /skill:name.

Also fixes pre-existing test bug where source expectation was wrong.

Fixes #927
2026-01-24 03:34:40 +01:00
Mario Zechner
b846a4bfcf feat(coding-agent): ResourceLoader, package management, and /reload command (#645)
- Add ResourceLoader interface and DefaultResourceLoader implementation
- Add PackageManager for npm/git extension sources with install/remove/update
- Add session.reload() and session.bindExtensions() APIs
- Add /reload command in interactive mode
- Add CLI flags: --skill, --theme, --prompt-template, --no-themes, --no-prompt-templates
- Add pi install/remove/update commands for extension management
- Refactor settings.json to use arrays for skills, prompts, themes
- Remove legacy SkillsSettings source flags and filters
- Update SDK examples and documentation for ResourceLoader pattern
- Add theme registration and loadThemeFromPath for dynamic themes
- Add getShellEnv to include bin dir in PATH for bash commands
2026-01-22 13:49:38 +01:00
Mario Zechner
9655907624 feat: Add skill slash commands and fuzzy matching for all commands
- Skills registered as /skill:name commands for quick access
- Toggle via /settings or skills.enableSkillCommands in settings.json
- Fuzzy matching for all slash command autocomplete (type /skbra for /skill:brave-search)
- Moved fuzzy module from coding-agent to tui package for reuse

Closes #630 by @Dwsy (reimplemented with fixes)
2026-01-11 17:56:11 +01:00
Mario Zechner
c6fc084534 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
2026-01-05 01:43:35 +01:00
Mario Zechner
84b663276d 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.'
2025-12-31 13:16:44 +01:00
Mario Zechner
d95a5c4186 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
2025-12-21 20:58:54 +01:00
Nico Bailon
70440f7591
feat(coding-agent): add configurable skills directories (#269) 2025-12-21 20:48:40 +01:00
Mario Zechner
05b7b81338 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
2025-12-19 00:11:39 +01:00
Mario Zechner
5e5bdadbf9 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[]
2025-12-17 21:27:28 +01:00
Mario Zechner
3b2b9abffc 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
2025-12-12 23:23:17 +01:00
Nico Bailon
09bca9672f
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
2025-12-12 18:24:52 +01:00