RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Diff/lepinkainen-hovimestari-gemini ↔ lepinkainen-hovimestari-clinerules-project

Comparison

A · GEMINI.md · lepinkainen/hovimestariB · Cline rules · lepinkainen/hovimestari
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections0890%
Commands0500%
Section tags23325%

What each file covers

Sections

0 shared · 8 only in A · 9 only in B
  • − Gemini Code Assistant Guide for Hovimestari
  • − Project Overview
  • − Core Architecture & Key Files
  • − Developer Workflow & Commands
  • − Import calendar events
  • − Generate the daily brief
  • − Project Conventions
  • − Testing
  • + Project: Hovimestari - Personal AI Butler Assistant
  • + Language
  • + LLM Prompts
  • + Common Tasks
  • + Adding a New Importer
  • + Modifying the Database Schema
  • + Adding a New Command
  • + Working with the Configuration System
  • + Ollama Integration

Commands

0 shared · 5 only in A · 0 only in B
  • − task build
  • − task test
  • − task lint
  • − task deps
  • − go.mod

Section tags

2 shared · 3 only in A · 3 only in B
  • − test
  • − code-style
  • − testing-strategy
  • + types
  • + database
  • + docs
  •   architecture
  •   agent-behaviour

Line diff

+87 added−51 removed26 unchanged23.0% identical
lepinkainen/hovimestari · GEMINI.md
@@ −1 @@
1# Gemini Code Assistant Guide for Hovimestari
2 
3This guide provides essential information for AI code assistants working on the Hovimestari project.
4 
5## Project Overview
 
 
 
 
 
 
6 
7Hovimestari is a personal AI butler assistant written in Go. It gathers information from various sources (calendars, weather APIs, manual input), stores them as "memories" in a SQLite database, and uses a Large Language Model (LLM) to generate a personalized daily brief.
8 
9- **Inspiration**: [Geoffrey Litt's AI assistant](https://www.geoffreylitt.com/2025/04/12/how-i-made-a-useful-ai-assistant-with-one-sqlite-table-and-a-handful-of-cron-jobs)
10- **Name**: "Hovimestari" is Finnish for "Butler".
11- **Primary Language**: Briefs are generated in Finnish by default, but the codebase, comments, and logs are in English.
 
12 
13## Core Architecture & Key Files
14 
15The project follows a modular structure, separating concerns into distinct packages within the `internal/` directory.
 
 
 
16 
17- **Entry Point**: `cmd/hovimestari/main.go` initializes the [Cobra](https://github.com/spf13/cobra) CLI.
18- **CLI Commands**: Each command is a separate file in `cmd/hovimestari/commands/`.
19- **Configuration**: `internal/config/viper.go` manages configuration using [Viper](https://github.com/spf13/viper), supporting file-based (`config.json`), environment variables, and XDG standard directories (`~/.config/hovimestari/`).
20- **Database**: `internal/store/store.go` handles all interactions with the SQLite database (`memories.db`). It uses `modernc.org/sqlite` for CGO-free compilation. All data is stored in a single `memories` table.
21- **Brief Generation**: `internal/brief/brief.go` orchestrates the collection of memories and context to generate the final brief via the LLM.
22- **LLM Interaction**: `internal/llm/gemini.go` contains the client for the Google Gemini API. Prompts are stored in `prompts.json`.
23- **Importers**: Data sources are implemented as importers in `internal/importer/`. For example, `internal/importer/calendar/calendar.go` handles iCalendar/WebCal imports.
24- **Output**: `internal/output/` contains a multi-destination system to send briefs to the CLI, Discord, and Telegram.
25 
26## Developer Workflow & Commands
27 
28This project uses [Task](https://taskfile.dev/) as a command runner instead of Make. All common development tasks are defined in `Taskfile.yml`.
 
 
 
29 
30- **Build the application**:
31 
32 ```bash
33 task build
34 ```
35 
36- **Run all tests**:
37 
38 ```bash
39 task test
40 ```
 
41 
42- **Run linter**:
43 
44 ```bash
45 task lint
46 ```
47 
48- **Tidy dependencies**:
 
49 
50 ```bash
51 task deps
52 ```
53 
54Application commands are executed via the compiled binary. For example:
 
 
 
 
 
 
 
 
 
 
 
55 
56```bash
57# Import calendar events
58./build/hovimestari import-calendar
 
59 
60# Generate the daily brief
61./build/hovimestari generate-brief
 
 
 
 
 
 
 
 
 
62```
63 
64## Project Conventions
65 
66- **Error Handling**: Use the `fmt.Errorf("...: %w", err)` pattern to wrap and add context to errors.
67- **Logging**: The project uses the standard `log/slog` library with a custom human-readable handler in `internal/logging/handler.go`. Use this for all logging.
68- **Dependencies**: Use the standard library where possible. For external dependencies, ensure they are added to `go.mod` and run `task deps`.
69- **Configuration**: When adding new configuration options, update the `Config` struct in `internal/config/viper.go` and the `config.example.json` file.
70- **Adding a Command**: To add a new CLI command, create a new file in `cmd/hovimestari/commands/` and add it to the root command in `cmd/hovimestari/main.go`. Follow the existing Cobra command structure.
71 
72## Testing
 
 
 
 
 
 
 
73 
74- Tests are located in `*_test.go` files alongside the code they test.
75- Tests should be deterministic and not rely on external services (network, LLM APIs, or the database). Mock these dependencies where necessary.
76- Run all tests using `task test`.
 
 
 
 
 
77 
lepinkainen/hovimestari · .clinerules/project.md
@@ +1 @@
1# Project: Hovimestari - Personal AI Butler Assistant
2 
3For detailed project information, refer to the documentation files in the `docs/` directory:
4 
5- `docs/01_overview.md`: Project overview and technology stack
6- `docs/02_architecture.md`: Directory structure, key files, and data flow
7- `docs/03_core_concepts.md`: Core concepts (memories, importers, briefs)
8- `docs/04_configuration.md`: Configuration and configuration file examples
9- `docs/05_database.md`: Database schema
10- `docs/06_llm.md`: LLM integration, providers, and prompt structure
11- `docs/07_cli.md`: CLI commands
12 
13## Language
14 
15- The name "Hovimestari" means "Butler" in Finnish.
16- All briefs and responses are generated in a language the user can configure.
17- Code comments and documentation are in English.
18- All log output and CLI messages should be in English.
19 
20### LLM Prompts
21 
22- Store LLM prompts in English in configuration files (e.g., `prompts.json`).
23- Use placeholders (e.g., `%LANG%`) for output language, which is specified in `config.json`.
24- Use placeholders (e.g., `%NOTES%`) for dynamic content like memories.
25- Keep prompts clear, concise, and focused on the specific task.
26 
27## Common Tasks
 
 
 
 
 
 
 
28 
29### Adding a New Importer
30 
311. Create a new package under `internal/importer/`.
322. Implement the importer with a similar interface to the calendar importer.
333. Add a new command in `cmd/hovimestari/main.go`.
344. Update the README.md with the new functionality.
35 
36### Modifying the Database Schema
37 
381. Update the `Initialize` function in `internal/store/store.go`.
392. Add any new methods needed to interact with the new schema.
403. Consider adding a migration mechanism if the change is not backward compatible.
41 
42### Adding a New Command
43 
441. Create a new command file in `cmd/hovimestari/commands/` (e.g., `new_command.go`).
452. Implement the command using the Cobra framework, following the pattern of existing commands.
463. Add the command to the root command in the `main.go` file.
474. Update the README.md with the new command.
48 
49Example of a new command file structure:
50 
51```go
52package commands
 
53 
54import (
55 "fmt"
56 
57 "github.com/lepinkainen/hovimestari/internal/config"
58 "github.com/spf13/cobra"
59)
60 
61// NewCommandCmd returns the new command
62func NewCommandCmd() *cobra.Command {
63 cmd := &cobra.Command{
64 Use: "new-command",
65 Short: "Short description",
66 Long: `Longer description of the command.`,
67 RunE: func(cmd *cobra.Command, args []string) error {
68 // Get the configuration
69 cfg, err := config.GetConfig()
70 if err != nil {
71 return fmt.Errorf("failed to get configuration: %w", err)
72 }
73 
74 // Implement command functionality
75 return runNewCommand(cmd.Context())
76 },
77 }
78 
79 // Add flags if needed
80 // cmd.Flags().StringVar(&flagVar, "flag-name", "", "Flag description")
81 
82 return cmd
83}
84 
85// runNewCommand implements the command functionality
86func runNewCommand(ctx context.Context) error {
87 // Implement the command logic here
88 return nil
89}
90```
91 
92### Working with the Configuration System
93 
94The application uses Spf13/Viper for configuration management. When working with configuration:
 
 
 
 
95 
961. Use `config.GetConfig()` to retrieve the current configuration.
972. Access configuration values through the returned struct.
983. For new configuration options:
99 - Add the field to the `Config` struct in `internal/config/viper.go`
100 - Add default values in the `InitViper` function if needed
101 - Add environment variable binding if appropriate
102 - Update validation functions if necessary
103 - Update the example configuration file
104 
105### Ollama Integration
106 
107When working with Ollama LLM integration:
108 
1091. The `docs/llm-ollama.md` file contains comprehensive documentation about Ollama integration.
1102. Configuration should support both Gemini and Ollama as LLM providers.
1113. The LLM interface should be provider-agnostic, allowing seamless switching between providers.
1124. Ensure prompts work well with both Gemini and Ollama models.
113 
@@ −1 +1 @@
1−# Gemini Code Assistant Guide for Hovimestari
1+# Project: Hovimestari - Personal AI Butler Assistant
22  
3−This guide provides essential information for AI code assistants working on the Hovimestari project.
3+For detailed project information, refer to the documentation files in the `docs/` directory:
44  
5−## Project Overview
5+- `docs/01_overview.md`: Project overview and technology stack
6+- `docs/02_architecture.md`: Directory structure, key files, and data flow
7+- `docs/03_core_concepts.md`: Core concepts (memories, importers, briefs)
8+- `docs/04_configuration.md`: Configuration and configuration file examples
9+- `docs/05_database.md`: Database schema
10+- `docs/06_llm.md`: LLM integration, providers, and prompt structure
11+- `docs/07_cli.md`: CLI commands
612  
7−Hovimestari is a personal AI butler assistant written in Go. It gathers information from various sources (calendars, weather APIs, manual input), stores them as "memories" in a SQLite database, and uses a Large Language Model (LLM) to generate a personalized daily brief.
13+## Language
814  
9−- **Inspiration**: [Geoffrey Litt's AI assistant](https://www.geoffreylitt.com/2025/04/12/how-i-made-a-useful-ai-assistant-with-one-sqlite-table-and-a-handful-of-cron-jobs)
10−- **Name**: "Hovimestari" is Finnish for "Butler".
11−- **Primary Language**: Briefs are generated in Finnish by default, but the codebase, comments, and logs are in English.
15+- The name "Hovimestari" means "Butler" in Finnish.
16+- All briefs and responses are generated in a language the user can configure.
17+- Code comments and documentation are in English.
18+- All log output and CLI messages should be in English.
1219  
13−## Core Architecture & Key Files
20+### LLM Prompts
1421  
15−The project follows a modular structure, separating concerns into distinct packages within the `internal/` directory.
22+- Store LLM prompts in English in configuration files (e.g., `prompts.json`).
23+- Use placeholders (e.g., `%LANG%`) for output language, which is specified in `config.json`.
24+- Use placeholders (e.g., `%NOTES%`) for dynamic content like memories.
25+- Keep prompts clear, concise, and focused on the specific task.
1626  
17−- **Entry Point**: `cmd/hovimestari/main.go` initializes the [Cobra](https://github.com/spf13/cobra) CLI.
18−- **CLI Commands**: Each command is a separate file in `cmd/hovimestari/commands/`.
19−- **Configuration**: `internal/config/viper.go` manages configuration using [Viper](https://github.com/spf13/viper), supporting file-based (`config.json`), environment variables, and XDG standard directories (`~/.config/hovimestari/`).
20−- **Database**: `internal/store/store.go` handles all interactions with the SQLite database (`memories.db`). It uses `modernc.org/sqlite` for CGO-free compilation. All data is stored in a single `memories` table.
21−- **Brief Generation**: `internal/brief/brief.go` orchestrates the collection of memories and context to generate the final brief via the LLM.
22−- **LLM Interaction**: `internal/llm/gemini.go` contains the client for the Google Gemini API. Prompts are stored in `prompts.json`.
23−- **Importers**: Data sources are implemented as importers in `internal/importer/`. For example, `internal/importer/calendar/calendar.go` handles iCalendar/WebCal imports.
24−- **Output**: `internal/output/` contains a multi-destination system to send briefs to the CLI, Discord, and Telegram.
27+## Common Tasks
2528  
26−## Developer Workflow & Commands
29+### Adding a New Importer
2730  
28−This project uses [Task](https://taskfile.dev/) as a command runner instead of Make. All common development tasks are defined in `Taskfile.yml`.
31+1. Create a new package under `internal/importer/`.
32+2. Implement the importer with a similar interface to the calendar importer.
33+3. Add a new command in `cmd/hovimestari/main.go`.
34+4. Update the README.md with the new functionality.
2935  
30−- **Build the application**:
36+### Modifying the Database Schema
3137  
32− ```bash
33− task build
34− ```
38+1. Update the `Initialize` function in `internal/store/store.go`.
39+2. Add any new methods needed to interact with the new schema.
40+3. Consider adding a migration mechanism if the change is not backward compatible.
3541  
36−- **Run all tests**:
42+### Adding a New Command
3743  
38− ```bash
39− task test
40− ```
44+1. Create a new command file in `cmd/hovimestari/commands/` (e.g., `new_command.go`).
45+2. Implement the command using the Cobra framework, following the pattern of existing commands.
46+3. Add the command to the root command in the `main.go` file.
47+4. Update the README.md with the new command.
4148  
42−- **Run linter**:
49+Example of a new command file structure:
4350  
44− ```bash
45− task lint
46− ```
51+```go
52+package commands
4753  
48−- **Tidy dependencies**:
54+import (
55+ "fmt"
4956  
50− ```bash
51− task deps
52− ```
57+ "github.com/lepinkainen/hovimestari/internal/config"
58+ "github.com/spf13/cobra"
59+)
5360  
54−Application commands are executed via the compiled binary. For example:
61+// NewCommandCmd returns the new command
62+func NewCommandCmd() *cobra.Command {
63+ cmd := &cobra.Command{
64+ Use: "new-command",
65+ Short: "Short description",
66+ Long: `Longer description of the command.`,
67+ RunE: func(cmd *cobra.Command, args []string) error {
68+ // Get the configuration
69+ cfg, err := config.GetConfig()
70+ if err != nil {
71+ return fmt.Errorf("failed to get configuration: %w", err)
72+ }
5573  
56−```bash
57−# Import calendar events
58−./build/hovimestari import-calendar
74+ // Implement command functionality
75+ return runNewCommand(cmd.Context())
76+ },
77+ }
5978  
60−# Generate the daily brief
61−./build/hovimestari generate-brief
79+ // Add flags if needed
80+ // cmd.Flags().StringVar(&flagVar, "flag-name", "", "Flag description")
81+ 
82+ return cmd
83+}
84+ 
85+// runNewCommand implements the command functionality
86+func runNewCommand(ctx context.Context) error {
87+ // Implement the command logic here
88+ return nil
89+}
6290 ```
6391  
64−## Project Conventions
92+### Working with the Configuration System
6593  
66−- **Error Handling**: Use the `fmt.Errorf("...: %w", err)` pattern to wrap and add context to errors.
67−- **Logging**: The project uses the standard `log/slog` library with a custom human-readable handler in `internal/logging/handler.go`. Use this for all logging.
68−- **Dependencies**: Use the standard library where possible. For external dependencies, ensure they are added to `go.mod` and run `task deps`.
69−- **Configuration**: When adding new configuration options, update the `Config` struct in `internal/config/viper.go` and the `config.example.json` file.
70−- **Adding a Command**: To add a new CLI command, create a new file in `cmd/hovimestari/commands/` and add it to the root command in `cmd/hovimestari/main.go`. Follow the existing Cobra command structure.
94+The application uses Spf13/Viper for configuration management. When working with configuration:
7195  
72−## Testing
96+1. Use `config.GetConfig()` to retrieve the current configuration.
97+2. Access configuration values through the returned struct.
98+3. For new configuration options:
99+ - Add the field to the `Config` struct in `internal/config/viper.go`
100+ - Add default values in the `InitViper` function if needed
101+ - Add environment variable binding if appropriate
102+ - Update validation functions if necessary
103+ - Update the example configuration file
73104  
74−- Tests are located in `*_test.go` files alongside the code they test.
75−- Tests should be deterministic and not rely on external services (network, LLM APIs, or the database). Mock these dependencies where necessary.
76−- Run all tests using `task test`.
105+### Ollama Integration
106+ 
107+When working with Ollama LLM integration:
108+ 
109+1. The `docs/llm-ollama.md` file contains comprehensive documentation about Ollama integration.
110+2. Configuration should support both Gemini and Ollama as LLM providers.
111+3. The LLM interface should be provider-agnostic, allowing seamless switching between providers.
112+4. Ensure prompts work well with both Gemini and Ollama models.
77113  
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack