{"_id":"@alvinng89/pi-output-styles","name":"@alvinng89/pi-output-styles","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@alvinng89/pi-output-styles","version":"0.1.0","description":"Claude Code-compatible output styles for pi","keywords":["pi-package","pi-extension","pi-coding-agent","claude-code","output-styles"],"license":"MIT","homepage":"https://github.com/AlvinNg89/pi-output-styles#readme","repository":{"type":"git","url":"git+https://github.com/AlvinNg89/pi-output-styles.git"},"bugs":{"url":"https://github.com/AlvinNg89/pi-output-styles/issues"},"type":"module","pi":{"extensions":["./extensions/output-styles.ts"],"image":"https://raw.githubusercontent.com/AlvinNg89/pi-output-styles/main/docs/pi-output-styles-comparison.png"},"scripts":{"test":"bun run test/output-styles.test.ts && tsc"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"devDependencies":{"@earendil-works/pi-coding-agent":"*","@types/node":"^24.0.0","typescript":"^5.9.0"},"engines":{"node":">=22"},"gitHead":"5638d7d4ae9f030f7863fd2ab466193976413d70","_id":"@alvinng89/pi-output-styles@0.1.0","_nodeVersion":"22.22.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-/ZJwy1eDByuunBjOUkrMWZSA1Mo1seXZfOZX1X5qfaoRQHGkdiVlF3qi6hioEfc/MhXn36K2Ujz2GJmNo8mdWQ==","shasum":"932324d4b134326f794d29a55daca50970ac412c","tarball":"https://registry.npmjs.org/@alvinng89/pi-output-styles/-/pi-output-styles-0.1.0.tgz","fileCount":9,"unpackedSize":397102,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE+B4onVdk7rfii4qk6dL4RJ1KjMss2/x6iO3mXs5Dt3AiEA9+mhI/S0mXE7tJynk0seFG/elELvRMO7m35DGcvqL+U="}]},"_npmUser":{"name":"alvinng89","email":"alvin.ng.89@gmail.com"},"directories":{},"maintainers":[{"name":"alvinng89","email":"alvin.ng.89@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-output-styles_0.1.0_1786538678991_0.10209607145043509"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-12T12:44:38.851Z","0.1.0":"2026-08-12T12:44:39.151Z","modified":"2026-08-12T12:44:39.345Z"},"maintainers":[{"name":"alvinng89","email":"alvin.ng.89@gmail.com"}],"description":"Claude Code-compatible output styles for pi","homepage":"https://github.com/AlvinNg89/pi-output-styles#readme","keywords":["pi-package","pi-extension","pi-coding-agent","claude-code","output-styles"],"repository":{"type":"git","url":"git+https://github.com/AlvinNg89/pi-output-styles.git"},"bugs":{"url":"https://github.com/AlvinNg89/pi-output-styles/issues"},"license":"MIT","readme":"# pi-output-styles\n\nA small [pi](https://pi.dev) package that adds reusable output styles.\n\n![Explanatory, Learning, and Proactive compared on the same task](docs/pi-output-styles-comparison.png)\n\n## Install\n\nFrom this checkout:\n\n```bash\npi install ./\n```\n\nOr publish it and install the package name:\n\n```bash\npi install npm:@alvinng89/pi-output-styles\n```\n\nUse `/output-style` to choose a style, or `/output-style Explanatory` to select one directly.\n\n![The output-style picker in Pi](docs/pi-output-styles.png)\n\nThe selection is saved to the repository root's `.claude/settings.local.json` for Claude Code compatibility and starts in a new session.\n\n## Add a custom style\n\nCopy a Markdown style into a user or project directory, then start a new Pi session:\n\n```bash\nmkdir -p ~/.pi/output-styles\ncp my-style.md ~/.pi/output-styles/\n```\n\nFor example, download the ASD-STE100 style from the provided gist after reviewing it:\n\n```bash\ncurl -fsSL 'https://gist.github.com/L1nefeed/4164ecaaf77879e76dca3c06f142f1c2/raw' \\\n  -o ~/.pi/output-styles/asd-ste100.md\n```\n\nRun `/output-style` and select `ASD-STE100`. The package reads local Markdown files; it does not fetch styles from URLs at runtime.\n\nOutput styles are Markdown files with optional frontmatter:\n\n```markdown\n---\nname: Diagrams first\ndescription: Lead explanations with a diagram\nkeep-coding-instructions: true\n---\n\nWhen explaining code, start with a Mermaid diagram.\n```\n\nPut styles in Pi-native directories:\n\n- User: `~/.pi/output-styles/*.md`\n- Project: `.pi/output-styles/*.md`; when started in a subdirectory, directories from the repository root through the current working directory are combined and the closest definition wins.\n\nPi does not currently define a managed-policy output-style directory, so this package does not invent one. Add that scope when Pi provides a managed configuration API.\n\nFor backward compatibility, the package also reads `~/.claude/output-styles/*.md` and project `.claude/output-styles/*.md`. Pi-native styles always override same-named Claude styles; within either source, project overrides user and the directory closest to the current working directory wins.\n\n## Behavior\n\n- Built-in styles: `Default`, `Explanatory`, `Learning`, and `Proactive`.\n- Style names come from `name` frontmatter or the filename.\n- `description` appears in the picker.\n- `keep-coding-instructions: true` appends instructions to Pi's normal coding prompt. Otherwise, the style replaces Pi's coding instructions while preserving the prompt tail containing project context and skills.\n- A custom style cannot override `Default`; it always means Pi's normal prompt.\n- The active style is loaded once at session start, keeping the system prompt stable for prompt caching.\n- Active style precedence follows Claude-compatible settings: user `~/.claude/settings.json`, project `.claude/settings.json`, then repository-root `.claude/settings.local.json`.\n\nProject styles are loaded only after project trust. A project that contains only Claude-shaped configuration gets an approval prompt; non-interactive runs reject unapproved project styles.\n\n## Package shape\n\nPi packages are regular npm/git packages with a `pi` manifest in `package.json`:\n\n```json\n{\n  \"pi\": {\n    \"extensions\": [\"./extensions/output-styles.ts\"]\n  }\n}\n```\n\nThe extension is a TypeScript default-export factory receiving `ExtensionAPI`. It registers `session_start`, `before_agent_start`, and `/output-style`; no fork of Pi is required.\n\n## References\n\n- [Pi extensions](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/docs/extensions.md)\n- [Pi packages](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/docs/packages.md)\n- [pi-code output styles](https://github.com/ilovepixelart/pi-code/blob/main/extensions/output-styles.ts)\n- [Claude Code output styles](https://code.claude.com/docs/en/output-styles)\n","readmeFilename":"README.md","_rev":"1-d971bc7748e9a894a3b6f6cc8bfabd0f"}