Thank you for your interest in contributing to Photon!
- Fork the repository
- Clone your fork:
git clone https://github.com/<your-username>/photon.git - Install dependencies:
npm install - Build:
npm run build - Run tests:
npm test
- Create a feature branch from
main:git checkout -b feat/my-feature - Make your changes
- Ensure code passes lint and format checks:
npm run lint npm run format:check
- Run the full test suite:
npm test - Commit using Conventional Commits:
fix:for bug fixes (patch release)feat:for new features (minor release)feat:withBREAKING CHANGE:in body for breaking changes (major release)
- Push your branch and open a Pull Request
- Keep PRs focused — one feature or fix per PR
- Include a clear description of what changed and why
- Add tests for new functionality
- Ensure all CI checks pass before requesting review
- Update documentation if your change affects public APIs
- TypeScript with strict mode
- Formatting enforced by Prettier (config in
.prettierrc) - Linting via ESLint (config in
eslint.config.mjs) - Run
npm run formatto auto-fix formatting - Run
npm run lint:fixto auto-fix lint issues
src/— Main source codetests/— Test filesdocs/— User-facing documentationdocs/internals/— Internal architecture docs for contributorstemplates/— Project templates
Detailed documentation for contributors can be found in docs/internals/:
- Auto-UI Architecture — How the Auto-UI system generates interfaces
- Daemon PubSub Protocol — Protocol for the Photon Daemon's pub/sub system
- Elicitation Architecture — Architecture of the elicitation system
- MCP Elicitation Implementation — Implementation details for MCP elicitation
- Constructor Context — Per-call context plumbed through the constructor
- Constructor Injection — How env vars, MCPs, and photons get injected
- Middleware — The 12-phase method-call pipeline
- Rendering Engine — How
@formatresults render across CLI, Beam, MCP - Stateful State Sync — Event emission and patch streaming for
@statefulphotons - Lifecycle & Ingress — Lifecycle hooks and the ingress/visibility model
- OAuth Authorization Server — OAuth 2.1 AS, CIMD, DCR, OIDC id_token, RFC 8693 token exchange
- PHOTON_DIR & Namespace — How a photon's source location determines where its data lives
- UX Guidelines — Guidelines for consistent CLI and UI experience
For general usage and development of Photon MCPs:
- GUIDE.md — The main developer guide
- ADVANCED.md — Advanced features and patterns
- BEST-PRACTICES.md — Best practices for writing Photons
Use GitHub Issues to report bugs or request features. Please include:
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Node.js version and OS