Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.27 KB

File metadata and controls

45 lines (33 loc) · 1.27 KB

Contributing

Thanks for helping improve prompt-snapshot. Focus is on a small, sharp tool — please keep the surface minimal.

Local dev

pnpm install
pnpm run build
pnpm run test
pnpm run typecheck

Adding an assertion

  1. Implement it in src/assertions.ts as a factory returning Assertion.
  2. Name it in camelCase; keep the result's name field the same.
  3. Return ok: boolean + a short human message. Optionally include detail for verbose mode.
  4. Add unit tests in tests/assertions.test.ts.
  5. Document in README.md and AGENTS.md.

Adding a provider

  1. Add src/providers/<name>.ts exporting create<Name>Provider(): Provider.
  2. Read the API key from model.apiKey ?? process.env.<KEY>.
  3. Wire it into buildProvider in src/providers/index.ts.
  4. Add an entry to ProviderId in src/types.ts.
  5. Add an integration test gated on the key being set.

Style

  • No new runtime deps without a reason.
  • Stderr for logs, stdout for data.
  • Every command must support --json and update the help-agents catalog.
  • Keep the CLI non-interactive.

Commit style

runner: skip cases when --only is passed
assertions: add oneOf
snapshot: collapse trailing newlines in normalize()

Short present-tense summaries scoped to a subsystem.