Repository navigation
Add PersonaNode for OCEAN personality trait configuration - #17
Merged
Merged
Conversation
aysmayyy
force-pushed
the
persona
branch
2 times, most recently
from
October 14, 2026 00:49
8c986c5 to
43e7886
Compare
jay-m-dev
self-requested a review
October 20, 2026 18:26
jay-m-dev
requested changes
Oct 20, 2026
jay-m-dev
left a comment
Collaborator
There was a problem hiding this comment.
Found four issues that should be addressed before merging:
- Frontend compilation fails. The PR removes existing exports, props, and types while callers still depend on them, including LlmConfigLevelRow, ProtocolCanvasHandle.openConnectorFactor, NodeRunState.bypassed, and DatasetRowSchema.ready. The frontend CI check confirms these failures.
- Existing factor workflows regress. ProtocolCanvas.tsx removes connector-factor dialogs, actions, and test selectors unrelated to adding personas. Please preserve these existing workflows.
- Persona factors produce incorrect system prompts. Persona factor levels store structured objects, but _resolve_persona_config() returns those objects directly and _run_agent_node() interpolates them into the prompt. This also affects the included experiment: “None” produces metadata text instead of an empty persona, contaminating the baseline. Please resolve each level to its actual persona text before composing the prompt.
- Persona connector integration is incomplete. Both backend and frontend connector registries omit persona, so persona configuration edges are treated as main-pipeline inputs. The documented single-persona limit is also unenforced. Please register the connector consistently and enforce its cardinality in both frontend and backend validation.
- Add PersonaNode component with persona connector to agents - Implement 15 OCEAN personality traits (baseline + 4 presets + 10 dimensions) - Add PersonaLevelRow to FactorEditorDialog for persona_text factors - Backend: persona texts prepend to agent system prompts via _resolve_persona_configs() - Frontend: extract persona_label for proper cell labeling in results - Add persona connector handle to AgentNode (top position) - Store all 15 persona markdown files in personas/ directory - Fix label extraction in factorLevels.ts and FactorEditorDialog makeDraft() - Add PersonaNodeConfig type and persona connection validation
- Add state management for multiple persona selection - Restore 'Add another' button with max 5 personas - Join all selected persona labels with ' + ' separator - Combine all selected persona prompts into single text
- Clicking toolbar icon now opens factor editor directly - Added personaFactorNodeId state and dialog in ProtocolCanvas - PersonaNode uses requestPersonaFactor instead of generic requestMakeFactor - Added useEffect to sync persona selections when editing - Fixes field picker UX and partial fix for selection persistence
Persona levels are config-shaped objects, but the factor was bound to config.persona_text (a string). reconcileFactorBaselines enforces level[0] == bound canvas value, so it overwrote level 1 with the node's string after every edit; apply_factor_bindings would likewise have written the level object into persona_text at runtime. Bind config instead, like model_config/dataset_config, seed a real factor name and baseline level from the node, and mirror level 1 back into the node on save.
…dedupe library Addresses the remaining items from the PR EpistasisLab#17 review: - Register "persona" in _CONNECTOR_HANDLES, _NODE_TYPE_TO_HANDLE, _HANDLE_LABELS and the agent-only connector guard. Without it a persona edge was classified as a main-pipeline edge, so the Persona node showed up as an upstream input of its agent. Persona is uncapped like Skill: several wired personas concatenate into one system-prompt prefix in wiring order. Covered by 7 new tests mirroring the Skill ones. - Baseline persona now has an empty prompt. The executor skips empty persona_text, so a "Baseline" cell gets a clean, unmodified system prompt instead of metadata text contaminating the control condition. - Move the persona library into personaLibrary.ts; the inspector and the factor level editor each had their own identical 15-entry copy. - Declare persona_ids on PersonaNodeConfig and drop its index signature, which lets metricFields.ts/mcpToolMetrics.ts go back to main's cast-free versions.
jay-m-dev
approved these changes
Oct 21, 2026
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.
Adds a PersonaNode for experimental manipulation of agent personality traits using the OCEAN framework.
Rebuilt on top of current main (bb61d45, includes #18-#20). The diff is additive; no existing exports, dialogs, or factor workflows are removed.
What's included
PersonaNode: a connector node (like Skill) wired into a new Persona slot on Agent. Persona text is prepended to the agent's system prompt at runtime via _resolve_persona_configs in protocol_execution.py.
Persona library with 15 entries: Baseline, 4 composite personas (Analyst, Explorer, Critic, Pushover) and 10 OCEAN poles (high/low Openness, Conscientiousness, Extraversion, Agreeableness, Neuroticism). Single source of truth in personaLibrary.ts. Baseline has an empty prompt so control cells get an unmodified system prompt.
Three configuration modes in the node inspector: pick from library (multi-select, up to 5 personas combined per node), direct text, or .md file upload.
Factor support: a Persona node can be turned into an experimental factor from its hover toolbar. Levels use the same library/text/file UI, each level can combine up to 5 personas, and level labels show the persona names (i.e. "High Neuroticism + Low Agreeableness") instead of level1/level2. The factor binds the node's whole config, consistent with model_config and dataset_config, so the baseline invariant holds and cells apply a plain persona_text string.
Backend connector registration: persona is in _CONNECTOR_HANDLES, _NODE_TYPE_TO_HANDLE, _HANDLE_LABELS and the agent-only connector guard, so a persona edge is treated as configuration, not a pipeline input. The connector is deliberately uncapped, matching Skill: multiple personas concatenate in wiring order.
Changes since the last review