Default locations for agent memory and skills, with a remember tool#47
Merged
Conversation
Skills previously worked only if ~/.config/linkshell/skills happened to exist, and the orchestrator had no persistent memory at all. Now both have defined default locations created automatically when an orchestrator starts: ~/.config/linkshell/skills/ (override: [orchestrator] skills_dir) ~/.config/linkshell/memory.md (override: [orchestrator] memory_file) Memory is one markdown file, injected verbatim into the orchestrator's prompt every turn (API class) or pointed to by path in the CLI-class briefing. The agent appends short dated bullets via a new `remember` tool; the user curates the file by hand. Keeping it concise is deliberately the user's job — the file is plain markdown, trivially prunable — but the contract is enforced at the edges: past 8 KiB the prompt injection truncates and the agent is told to ask the user to prune, and `remember` replies include the file size with a warning past the same threshold. memory.md is seeded with a template explaining all of this. `remember` joins the default auto_approve set (it writes only to the agent's own memory file), and the tilde expansion previously local to skills_path is factored into a shared helper used by both paths. Tests cover the remember->inject roundtrip (including newline flattening and dated entries), empty-file suppression, the auto-approve default, and the dependency-free date helper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Skills previously worked only if ~/.config/linkshell/skills happened to exist, and the orchestrator had no persistent memory at all. Now both have defined default locations created automatically when an orchestrator starts:
~/.config/linkshell/skills/ (override: [orchestrator] skills_dir)
~/.config/linkshell/memory.md (override: [orchestrator] memory_file)
Memory is one markdown file, injected verbatim into the orchestrator's prompt every turn (API class) or pointed to by path in the CLI-class briefing. The agent appends short dated bullets via a new
remembertool; the user curates the file by hand. Keeping it concise is deliberately the user's job — the file is plain markdown, trivially prunable — but the contract is enforced at the edges: past 8 KiB the prompt injection truncates and the agent is told to ask the user to prune, andrememberreplies include the file size with a warning past the same threshold. memory.md is seeded with a template explaining all of this.rememberjoins the default auto_approve set (it writes only to the agent's own memory file), and the tilde expansion previously local to skills_path is factored into a shared helper used by both paths.Tests cover the remember->inject roundtrip (including newline flattening and dated entries), empty-file suppression, the auto-approve default, and the dependency-free date helper.