Skip to content
Open
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
36 changes: 28 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,34 @@

```
src/
├── index.ts # CLI entry point (Commander)
├── types.ts # Shared types
├── commands/ # Command implementations (init, suggest, history, completion, batch)
├── config/ # Config persistence
├── git/ # Git operations (diff)
├── history/ # History JSONL + style learner
├── llm/ # Prompt builder + API client
└── providers/ # LLM provider adapters
├── index.ts # CLI entry point (Commander) — registers all commands
├── types.ts # Shared TypeScript interfaces (Config, Provider, Suggestion, etc.)
├── commands/
│ ├── init.ts # Interactive setup wizard (clack/prompts) — provider, model, API key
│ ├── suggest.ts # Core suggestion flow: diff → LLM → display → optional commit
│ ├── history.ts # View learned style profile and recent commit history
│ ├── config.ts # View current config

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Document the configuration-setting command as well.

src/index.ts:10 imports configSetCommand, so describing config.ts only as “View current config” is incomplete. Update the annotation to mention viewing and setting configuration.

Proposed fix
-│   ├── config.ts         # View current config
+│   ├── config.ts         # View and set current config
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
│ ├── config.ts # View current config
│ ├── config.ts # View and set current config
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CONTRIBUTING.md` at line 43, Update the config.ts entry in the repository
structure documentation to describe both viewing and setting configuration,
reflecting the imported configSetCommand usage in src/index.ts.

│ ├── batch.ts # Process multiple git repos in batch mode
│ └── completion.ts # Generate shell completion scripts (bash, zsh, fish)
├── providers/
│ ├── index.ts # Provider factory: createProvider(), complete(), completeStream(), fetchModels()
│ ├── registry.ts # BUILTIN_PROVIDERS array (OpenAI, Anthropic, Google, Mistral, etc.)
│ ├── openai-compatible.ts # Default adapter for OpenAI-compatible APIs (most providers)
│ ├── anthropic.ts # Anthropic-specific adapter (Messages API)
│ ├── cohere.ts # Cohere-specific adapter
│ ├── example.ts # No-op example provider for testing
│ ├── request.ts # Shared HTTP request helpers
│ └── sse.ts # Server-Sent Events streaming parser
├── llm/
│ ├── client.ts # generateSuggestions() — orchestrates config → prompt → LLM → parse
│ └── prompt.ts # buildSystemPrompt(), buildUserPrompt(), template vars, diff truncation
├── git/
│ ├── diff.ts # Git ops: getStagedDiff(), getUnstagedDiff(), commit(), checkGitRepo()
│ └── hook.ts # Git hook management: prepare-commit-msg, post-commit
├── history/
│ └── store.ts # JSONL history: loadEntries(), appendEntry(), buildProfile(), formatProfile()
└── config/
└── store.ts # Config persistence: loadConfig(), saveConfig(), env var overrides
```

## Code Conventions
Expand Down