Repository navigation
feat: limit learning commands to learn mode - #37
Merged
Merged
Conversation
carnegiedude
reviewed
Oct 9, 2026
carnegiedude
left a comment
Contributor
There was a problem hiding this comment.
It seems like this Pull Request is mostly replacing the attributes of some of the commands with learn mode from build mode. The unit tests are good, it just might be pertinent to have a positive case and not just reject bad inputs. I hope you can run some tests locally before you merge or indicate if you have.
| }, | ||
| ) | ||
|
|
||
| it.instance("Learn-only commands reject execution from other modes", () => |
Contributor
There was a problem hiding this comment.
This is a good test for the rejection of learn commands in other modes. Is there a test for acceptance of learn mode commands in learn mode?
Contributor
There was a problem hiding this comment.
It seems like the validation is included in the already existing tests, but I am not sure.
vmiloserdov
marked this pull request as ready for review
October 9, 2026 16:28
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.
Issue for this PR
Type of change
What does this PR do?
User story
As a student using Learn mode to understand a codebase without making changes, I want the learning-oriented commands to be available only in Learn mode, so that Build and other modes do not expose workflows intended for read-only exploration.
Changes
/newcomerand/associateLearn-only commands.learnagent./grouprepository-learning-map command to Learn mode by registering it only while Learn is selected./newcomercontinues to collect experience level and learning scope./associatecontinues to inspect a source file and report its associated tests./groupcontinues to build repository learning groups and request read-only guidance through Learn./associateexecution from Build mode before model execution./associateTUI flow with Learn selected./groupregistration path.How did you verify your code works?
Automated verification to run from the development container:
bun test test/session/prompt.test.tsfrompackages/opencodebun test test/prompt/command.test.ts test/associate.e2e.test.ts test/group-map.e2e.test.tsfrompackages/tuibun typecheckfrompackages/opencodebun typecheckfrompackages/tuiStatic verification completed:
git diff --checkManual verification to perform:
/newcomer,/associate, and/groupare available./associatefrom Build and confirm the server rejects it with “only available in Learn mode.”/newcomer,/associate, and/groupcontinue to work in Learn mode.Screenshots / recordings
The command behavior uses the existing mode selector and slash-command interface. I will attach a short recording showing:
/newcomer,/associate, and/group./associaterequest being rejected.GDrive Demo Link: https://drive.google.com/drive/folders/1WfCPocHSSPkcaTQu6bXUQeSjJbSU-zrr
Checklist