WIP self improvement procedure
This commit is contained in:
@@ -7,13 +7,10 @@
|
||||
## Flow
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start([Start])
|
||||
LoadUserBasic[The /user/basic.md file should contain info to identify and address the user properly<br>Also load the last 10 messages from /user/conversation_history/ ]
|
||||
Start([The /user/basic.md file contains info to identify and address the user<br>Load the last 10 messages from /user/conversation_history/ ])
|
||||
PrepareForDraft{Have everything needed for drafting a message?}
|
||||
DraftMessage[Draft message in reasoning entry]
|
||||
ReadInput[Read input from standard input]
|
||||
ReasonCleanContext[List id's of entries that are no longer needed<br>Explain for each entry why it is no longer needed]
|
||||
DeleteEntries[Remove the entries that are no longer needed<br>End by deleting the ReasonCleanContext entry]
|
||||
AddHistoryUser[Add the message to the /user/conversation_history/ directory<br>The filename is the id of the stdin entry with .user extension]
|
||||
LoadTask[Look for the task in the /tasks directory and load relevant files]
|
||||
LoadUserDetails[Look in the /user directory for relevant files]
|
||||
@@ -24,25 +21,21 @@ flowchart TD
|
||||
SendMessage[Send the message using standard output]
|
||||
AddHistoryAgent[Add the message to the /user/conversation_history/ directory<br>The filename is the id of the stdout entry with .agent extension]
|
||||
ReasonResponse[Is the conversation ongoing?<br>How long is the user expected to take to respond?]
|
||||
NeedAwaitResponse{Is it likely to get a response within a minute?}
|
||||
BusyWait[Wait 1 second for the first busy wait, double the time each iteration until a response is received<br>Make sure to set the timout]
|
||||
|
||||
NeedAwaitResponse{Is it likely to get a response within a minute of sending the message?}
|
||||
BusyWait[Wait 5 seconds<br>Make sure to set the timout]
|
||||
AnalyzeContext[Create reasoning entry<br>For each entry in context indicate:<br>- Can delete<br>- Contains info to save<br>- Must keep in context]
|
||||
MakeNotes[Create or update files with info to save]
|
||||
End([Clean the context])
|
||||
|
||||
Start --> LoadUserBasic
|
||||
LoadUserBasic --> PrepareForDraft
|
||||
Start --> PrepareForDraft
|
||||
|
||||
PrepareForDraft -->|Got all needed info| DraftMessage
|
||||
PrepareForDraft -->|Getting the required info would slow the conversation| DraftMessage
|
||||
PrepareForDraft -->|Input available on stdin| ReadInput
|
||||
PrepareForDraft -->|Context usage more than 50%| ReasonCleanContext
|
||||
PrepareForDraft -->|Task mentioned but not loaded| LoadTask
|
||||
PrepareForDraft -->|Personal or social info mentioned but not loaded| LoadUserDetails
|
||||
PrepareForDraft -->|Calculations, system info or other numerical values that can be scripted are mentioned| EstimateScript
|
||||
|
||||
ReasonCleanContext --> DeleteEntries
|
||||
DeleteEntries --> PrepareForDraft
|
||||
|
||||
ReadInput --> AddHistoryUser
|
||||
AddHistoryUser --> PrepareForDraft
|
||||
|
||||
@@ -62,8 +55,11 @@ flowchart TD
|
||||
AddHistoryAgent --> ReasonResponse
|
||||
ReasonResponse --> NeedAwaitResponse
|
||||
|
||||
NeedAwaitResponse -->|Quick response is unlikely| End
|
||||
NeedAwaitResponse -->|Quick response is unlikely| AnalyzeContext
|
||||
NeedAwaitResponse -->|Input available on stdin| PrepareForDraft
|
||||
NeedAwaitResponse -->|Quick response is likely| BusyWait
|
||||
BusyWait --> NeedAwaitResponse
|
||||
|
||||
AnalyzeContext --> MakeNotes
|
||||
MakeNotes --> End
|
||||
```
|
||||
Reference in New Issue
Block a user