Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions .claude/commands/add-new-parser-or-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ Use this workflow when working on **add-new-parser-or-provider** in `periscope`.

## Goal

Adds support for a new agent/provider/parser, including implementation, integration, and test coverage.
Adds support for a new agent, data source, or provider to the system, including schema detection, discovery, and integration with sync and test coverage.

## Common Files

- `internal/parser/*_provider.go`
- `internal/parser/*.go`
- `internal/parser/testdata/*/*.json`
- `internal/parser/*_test.go`
- `internal/parser/<agent>_provider.go`
- `internal/parser/<agent>.go`
- `internal/parser/types.go`
- `internal/parser/provider.go`
- `internal/sync/engine.go`
- `internal/parser/provider_migration.go`
- `internal/parser/testdata/<agent>/*`
- `internal/parser/<agent>_test.go`

## Suggested Sequence

Expand All @@ -30,13 +31,14 @@ Adds support for a new agent/provider/parser, including implementation, integrat

## Typical Commit Signals

- Add new parser/provider Go files (e.g., internal/parser/<provider>_provider.go, internal/parser/<provider>.go).
- Update provider registry or discovery (e.g., internal/parser/provider.go).
- Add or update test data and test cases (e.g., internal/parser/testdata/<provider>/*.json, internal/parser/<provider>_test.go).
- Integrate with sync engine if needed (e.g., internal/sync/engine.go).
- Update documentation and format sources (e.g., docs/internal/session-format-sources.md, docs/configuration.md).
- Implement parser/provider logic in `internal/parser` (e.g., `<agent>_provider.go`, `<agent>.go`).
- Add or update types in `internal/parser/types.go`.
- Update provider registration in `internal/parser/provider.go` and/or `provider_migration.go`.
- Add test fixtures and coverage in `internal/parser/testdata/<agent>/*` and `<agent>_test.go`.
- Integrate with sync engine (`internal/sync/engine.go`, `engine_test.go`, `integration_test.go`).
- Update documentation and format sources (e.g., `docs/internal/session-format-sources.md`, `docs/configuration.md`).

## Notes

- Treat this as a scaffold, not a hard-coded script.
- Update the command if the workflow evolves materially.
- Update the command if the workflow evolves materially.