Thank you for your interest in contributing to Pulse! This document outlines the process for contributing and helps you get started quickly.
- Code of Conduct
- Getting Started
- How to Contribute
- Commit Convention
- Pull Request Guidelines
- Reporting Bugs
- Requesting Features
Be respectful, inclusive, and constructive. We're all here to build something useful together.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/isonnymichael/pulse.git cd pulse - Install dependencies:
npm install
- Create a branch for your changes:
git checkout -b feature/your-feature-name
- Test your changes:
node bin/pulse.cjs optimize --url https://example.com --api-key YOUR_KEY
The most impactful contribution is adding optimization instructions for more PageSpeed audits. Here's how:
-
Open
src/utils/formatter.js -
Find the
getActionsForOpportunity()orgetActionsForDiagnostic()function -
Add your audit ID and action to the
actionMapordiagMap:'audit-id': [{ title: 'Human-readable action title', detail: 'Specific steps the AI agent should take to fix this issue.', }],
-
Test with a URL that triggers the audit
-
Create the command file at
src/commands/<command-name>.js:export async function myCommand(options) { // Command logic here }
-
Register it in
src/index.js:- Import the command
- Add arg parsing for any new flags
- Add a
if (command === '<name>') ...branch
-
Document it in the README
The generateOptimizationInstructions() function in src/utils/formatter.js generates the AI agent instructions. Improvements here directly improve optimization quality:
- More specific steps for each audit
- Framework-aware instructions (e.g., Next.js-specific image optimization)
- Better prioritization logic
We follow Conventional Commits:
type(scope): short description
| Type | When to use |
|---|---|
feat |
New feature or audit mapping |
fix |
Bug fix |
docs |
Documentation changes only |
refactor |
Code change that neither fixes a bug nor adds a feature |
chore |
Tooling, deps, config changes |
Examples:
feat(formatter): add audit mapping for uses-http2
fix(pagespeed): handle missing lighthouse result gracefully
docs(readme): add desktop strategy example
- Keep PRs focused — one feature or fix per PR
- Fill out the PR description with what changed and why
- Ensure the CLI runs without errors
- Reference any related issues with
Closes #<issue-number> - PRs must be reviewed and approved before merging
Open a GitHub Issue and include:
- Your OS and Node.js version
- The command you ran (redact your API key)
- The full error output
- Steps to reproduce
Open a GitHub Issue with:
- What optimization or analysis feature you'd like
- A brief description of the expected behavior
- Any context on why it would be valuable
By contributing to Pulse, you agree that your contributions will be licensed under the GNU General Public License v3.0.