Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Botspot Development Guide

## Build & Test Commands
Expand Down
58 changes: 58 additions & 0 deletions dev/workalong_bound_llm_queue/rework_protocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
This is a protocol for refactoring / reworking code components with claude-code or other
ai tools.
The main goal of this protocol is to ensure the codebase doesn't bloat and grow riddled
with duplicated code during AI refactoring / reworks.

# Pre-rework

- Commit. Make sure everything is committed
- Optional: Create a new branch for the rework
- Optional: Check tests, if present.

# Simple protocol:

If the task is clear, go directly to coding phase

# Complex protocol:

If there's a complex task - first, read spec.md or ask user for a list of requirements

- After that, evaluate the current solution on the match with specs
- Which additional featuers were implemented that are not present in the spec
- What is the likely reason were they added
-
- Which components / features explicitly listed in the spec are missing
- How difficult it is to add this
- write to workalong.md
- proceed to coding

## Coding:

- Before coding, lay out a plan to the user in clear terms.
- Which components / features will be added
- Which modified
- Which moved / removed
- Make an explicit enumeration for user to specify which steps are approved and
which are declined
- Each item should be formulated in as simple terms as possible, 1 line maximum per
item, not longer than a few words
- Always remove duplicate code or alternative / previous implementations of the same
feature
- After making a change, call git diff and make sure file is in a desired target
state and the changes you planned are correctly reflected
- proceed with implementing each item one by one and track progress with checkboxes in
workalong.md
- [x] item 1 - keep to original item descriptions, DO NOT ADD SUB-ITEMS. List which
files were affected for this feature.

AI Issue resolution

1) Failed deletions
Sometimes AI applier fails to delete code according to instructions
This results in really confusing situations with duplicate functions / methods
present in multiple places across the codebase
To mitigate that

- Check file diff after each modifications and make sure it reflects the changes you've
made

17 changes: 17 additions & 0 deletions dev/workalong_bound_llm_queue/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Bound LLM Queue

- **Main Feature**: A queue that auto-parses messages with LLM Utils and requests missing fields, triggered by a single bind action.
- **Demo Bot**: Send `/bind` in a chat; every message after is auto-queued, parsed by LLM (e.g., into a contact form), and prompts for missing fields if needed.
- **Useful Bot**: **People Bot (Enhanced)** - Bind it to a chat; it auto-parses all messages (or forwarded ones) into contacts, stores them, and asks for missing details—all hands-off after `/bind`.

## Developer Notes

For llm queue - first of all, this is a combination of other components - bind, llm utils and queue. But on top of that - also new features enabled by that.

1) ingest -> load all past messages (via telethon client), process them with llm and add to queue. Then some of those messages would have missing mandatory fields -> and we will have procedures to fix that.

2) procedure 1 - /fix_records (or some other name - invent better) command to initiate a process to go through records one by one and fill missing data.

3) procedure 2 - scheduled auto-reminders to ask user about one unfilled item.

4) One more thing - part of these mechanics already implemented in oibot - /Users/petrlavrov/work/projects/outstanding-items-bot
Empty file.