-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Implement pure, testable helper functions for Stage 3 Review:
intensityIndex(label): Map intensity string to ordinal index (subtle=0, soft=1, medium=2, hard=3, aggressive=4)textureIndex(label): Map texture string to ordinal index (alphabetical: bright=0, crunchy=1, dark=2, harsh=3, noisy=4, sharp=5, smooth=6, tonal=7, warm=8)medianIntensity(selections): Compute median intensity index from a list of CandidateSelectionmedianTextureIndex(selections): For each entry, compute median index of its texture array; then compute median across entriesflagCoherenceOutliers(selections): Return a Set of recipe names whose intensity or primary texture deviates >1 step from palette median; skip if <3 entriesbuildSummaryRows(selections, outliers): Format each selection into a table row [recipe, seed, category, intensity, texture, tags] with warning indicator for outlierssummaryColumns: Table column definitions for the palette summary table
Acceptance Criteria:
- All functions are exported and testable in isolation
- intensityIndex returns correct ordinal for all 5 values plus -1 for unknown
- textureIndex returns correct ordinal for all 9 values plus -1 for unknown
- medianIntensity/medianTextureIndex return correct median for odd and even counts
- flagCoherenceOutliers correctly identifies entries deviating >1 step from median
- flagCoherenceOutliers returns empty set when <3 entries
- buildSummaryRows includes warning indicator for flagged entries
Reactions are currently unavailable