45 sensory level refactor - #47
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors sensory level classification to a step-based (chain-of-command) flow so the algorithm can emit structured “steps” (description/actions/state) alongside preserving the existing determineSensoryLevel entry point.
Changes:
- Refactors
determineSensoryLevelinto a step-chain with a newsensoryLevelSteps()generator. - Introduces domain-specific
SensoryLevelErrorand centralized error message constants. - Adds English translation keys for sensory level step descriptions/actions and expands unit test coverage for the new entry points.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/en.ts | Adds translation keys for sensory level step tracing; reformats existing strings. |
| src/classification/neurologicalLevels/sensoryLevelErrors.ts | Adds centralized sensory level error codes/messages and a domain error type. |
| src/classification/neurologicalLevels/sensoryLevel.ts | Implements step-based sensory level calculation + generator; updates error throwing. |
| src/classification/neurologicalLevels/sensoryLevel.spec.ts | Adds tests for new entry points and error type; refactors existing test formatting. |
| docs/sensoryLevel-architecture.md | Documents the intended step-based architecture and translation keys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
EddieMachete
force-pushed
the
45-sensory-level-refactor
branch
from
February 19, 2026 01:08
bc68bbc to
c3622f7
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Closes #45
Adds step-based logic implementing the chain-of-command pattern in file
src/classification/neurologicalLevels/sensoryLevel.ts