From 079ed2aff59fc1088b94c529a75c7de46be4b7f4 Mon Sep 17 00:00:00 2001 From: Petr Lavrov Date: Fri, 21 Mar 2025 03:33:38 +0300 Subject: [PATCH 1/2] Update CLAUDE.md --- CLAUDE.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 3dfad56..1877551 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,3 +1,21 @@ +# 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 + # Botspot Development Guide ## Build & Test Commands From 660854955cf427d58a48e7fd3b511edc2dc25983 Mon Sep 17 00:00:00 2001 From: Petr Lavrov Date: Mon, 24 Mar 2025 01:35:47 +0300 Subject: [PATCH 2/2] bound llm queue: Spec and workalong --- CLAUDE.md | 17 ------ .../rework_protocol.md | 58 +++++++++++++++++++ dev/workalong_bound_llm_queue/spec.md | 17 ++++++ dev/workalong_bound_llm_queue/workalong.md | 0 4 files changed, 75 insertions(+), 17 deletions(-) create mode 100644 dev/workalong_bound_llm_queue/rework_protocol.md create mode 100644 dev/workalong_bound_llm_queue/spec.md create mode 100644 dev/workalong_bound_llm_queue/workalong.md diff --git a/CLAUDE.md b/CLAUDE.md index 1877551..327d0bc 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,20 +1,3 @@ -# 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 # Botspot Development Guide diff --git a/dev/workalong_bound_llm_queue/rework_protocol.md b/dev/workalong_bound_llm_queue/rework_protocol.md new file mode 100644 index 0000000..e28f6e4 --- /dev/null +++ b/dev/workalong_bound_llm_queue/rework_protocol.md @@ -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 + diff --git a/dev/workalong_bound_llm_queue/spec.md b/dev/workalong_bound_llm_queue/spec.md new file mode 100644 index 0000000..1abdc28 --- /dev/null +++ b/dev/workalong_bound_llm_queue/spec.md @@ -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 diff --git a/dev/workalong_bound_llm_queue/workalong.md b/dev/workalong_bound_llm_queue/workalong.md new file mode 100644 index 0000000..e69de29