From 1bb60753329e1a3273840e6973fb37884f1e895d Mon Sep 17 00:00:00 2001 From: Viswamedha Nalabotu Date: Fri, 27 Feb 2026 14:27:30 +0000 Subject: [PATCH] Added error cases, modified data files for more concise prompts --- data/2_organizations.json | 16 +++++----- data/3_roles.json | 45 +++++++++++++++++++---------- data/4_agentconfigs.json | 18 ++++++------ site/src/views/OnboardingView.vue | 6 ++-- site/src/views/OrganizationView.vue | 9 ++++-- 5 files changed, 55 insertions(+), 39 deletions(-) diff --git a/data/2_organizations.json b/data/2_organizations.json index cd14085..16f4bc0 100644 --- a/data/2_organizations.json +++ b/data/2_organizations.json @@ -7,9 +7,9 @@ "created_at": "2026-02-24T23:03:53.518Z", "updated_at": "2026-02-25T20:30:00.000Z", "name": "University of Birmingham", - "description": "The University of Birmingham is a public research university in Birmingham, England. It is a founding member of the Russell Group and the international network Universitas 21.", - "owner": 2, - "members": [2, 3, 4, 5, 6, 7] + "description": "A university learning environment for onboarding researchers, lab specialists, and student-facing support teams through structured academic and technical role pathways.", + "owner": 1, + "members": [1, 2, 3, 4, 6] } }, { @@ -20,9 +20,9 @@ "created_at": "2026-02-24T23:04:55.810Z", "updated_at": "2026-02-25T20:30:00.000Z", "name": "Example Organization", - "description": "This is an example fictional organization that has many roles, used for testing administrative workflows.", + "description": "A product and operations organization used to train onboarding cohorts in design delivery, analytics, infrastructure, and governance practices.", "owner": 1, - "members": [1, 2, 8, 9, 12] + "members": [1, 5, 7, 8] } }, { @@ -33,9 +33,9 @@ "created_at": "2026-02-25T20:30:00.000Z", "updated_at": "2026-02-25T20:30:00.000Z", "name": "Silicon Canal Tech Hub", - "description": "A collective of technology innovators and fintech enthusiasts based in the West Midlands, focusing on financial literacy and stock market simulation.", - "owner": 12, - "members": [12, 3, 5, 9, 10, 11] + "description": "A regional technology hub that trains teams in platform architecture, fintech research, and service reliability for production-grade digital systems.", + "owner": 1, + "members": [1, 9, 10, 11] } } ] \ No newline at end of file diff --git a/data/3_roles.json b/data/3_roles.json index 42f2698..4661bae 100644 --- a/data/3_roles.json +++ b/data/3_roles.json @@ -7,9 +7,9 @@ "created_at": "2026-02-25T12:51:23.873Z", "updated_at": "2026-02-25T12:51:23.873Z", "name": "UX Developer", - "description": "A hybrid professional bridging design and front-end engineering, responsible for both designing user-centric interfaces and coding them.", + "description": "Designs and implements accessible interfaces by translating product requirements into reusable UI components, interaction flows, and validated user experiences.", "organization": 2, - "members": [1, 4] + "members": [7] } }, { @@ -20,9 +20,9 @@ "created_at": "2026-02-25T13:00:00.000Z", "updated_at": "2026-02-25T13:00:00.000Z", "name": "fNIRS Specialist", - "description": "Functional Near-Infrared Spectroscopy Specialist responsible for neuroimaging data collection and analyzing cortical hemodynamic responses.", + "description": "Plans and runs fNIRS studies, manages optode configurations, validates signal quality, and interprets cortical hemodynamic outputs for research teams.", "organization": 1, - "members": [3, 5] + "members": [3] } }, { @@ -33,9 +33,9 @@ "created_at": "2026-02-25T13:05:00.000Z", "updated_at": "2026-02-25T13:05:00.000Z", "name": "Senior Research Fellow", - "description": "Leads academic research projects, secures funding, and mentors doctoral students within the University research ecosystem.", + "description": "Leads multi-phase research programmes, defines study methods, supervises analysis quality, and mentors junior researchers on publication standards.", "organization": 1, - "members": [2, 7] + "members": [2] } }, { @@ -46,9 +46,9 @@ "created_at": "2026-02-25T13:10:00.000Z", "updated_at": "2026-02-25T13:10:00.000Z", "name": "Quantitative Analyst", - "description": "Applies mathematical and statistical methods to financial and risk management problems within the stock simulation model.", + "description": "Builds statistical and mathematical models for pricing, forecasting, and risk analysis, then validates outcomes using reproducible analytical workflows.", "organization": 2, - "members": [8, 9] + "members": [8] } }, { @@ -59,9 +59,9 @@ "created_at": "2026-02-25T13:15:00.000Z", "updated_at": "2026-02-25T13:15:00.000Z", "name": "Systems Administrator", - "description": "Responsible for the maintenance, configuration, and reliable operation of the organization's server infrastructure.", + "description": "Maintains secure and reliable infrastructure, manages access controls, automates routine operations, and coordinates incident response for core systems.", "organization": 2, - "members": [1, 12] + "members": [5] } }, { @@ -72,9 +72,9 @@ "created_at": "2026-02-25T13:20:00.000Z", "updated_at": "2026-02-25T13:20:00.000Z", "name": "Lead Software Architect", - "description": "Responsible for high-level design choices and dictating technical standards, including software coding standards.", + "description": "Defines platform architecture, documents integration boundaries, reviews major technical decisions, and aligns delivery teams to consistent design standards.", "organization": 3, - "members": [12, 11] + "members": [9] } }, { @@ -85,9 +85,9 @@ "created_at": "2026-02-25T13:25:00.000Z", "updated_at": "2026-02-25T13:25:00.000Z", "name": "FinTech Researcher", - "description": "Investigates new technologies in the financial sector, focusing on algorithmic trading and user behavior.", + "description": "Evaluates fintech technologies, conducts domain research, and translates market, regulatory, and user-behaviour findings into actionable product insights.", "organization": 3, - "members": [9, 10, 3] + "members": [10] } }, { @@ -98,9 +98,22 @@ "created_at": "2026-02-25T13:30:00.000Z", "updated_at": "2026-02-25T13:30:00.000Z", "name": "Compliance Officer", - "description": "Ensures that the organization is complying with relevant financial regulations and internal policies.", + "description": "Interprets applicable regulations, maintains policy controls, monitors audit evidence, and guides teams to meet legal and governance requirements.", "organization": 2, - "members": [6, 8] + "members": [5] + } +}, +{ + "model": "accounts.role", + "pk": 9, + "fields": { + "uuid": "e9f50801-b468-4f69-bb17-972717191f71", + "created_at": "2026-02-25T13:35:00.000Z", + "updated_at": "2026-02-25T13:35:00.000Z", + "name": "Platform Reliability Engineer", + "description": "Improves service reliability by defining SLOs, implementing observability, automating recovery workflows, and leading post-incident learning actions.", + "organization": 3, + "members": [11] } } ] \ No newline at end of file diff --git a/data/4_agentconfigs.json b/data/4_agentconfigs.json index cc50027..7c8fb59 100644 --- a/data/4_agentconfigs.json +++ b/data/4_agentconfigs.json @@ -10,7 +10,7 @@ "name": "UX Developer Curriculum Agent", "agent_type": "curriculum", "llm_config": {"model_id": "meta-llama-3.1-8b-instruct"}, - "system_prompt": "You are a Senior UX Engineering Mentor. Design a learning path for a UX Developer that bridges the gap between Figma design systems and React component architecture. Focus on accessibility (WCAG), micro-interactions, and state-driven UI patterns.", + "system_prompt": "Teach the UX Developer role by explaining responsibilities such as user research translation, accessibility-first UI design, component implementation, and iterative usability validation. Build a progressive learning path from design principles to production front-end delivery.", "tool_permissions": [] } }, @@ -25,7 +25,7 @@ "name": "UX Developer Knowledge Agent", "agent_type": "knowledge", "llm_config": {"model_id": "meta-llama-3.1-8b-instruct"}, - "system_prompt": "You are a UX Documentation Assistant. Provide technical answers regarding front-end frameworks, CSS-in-JS libraries, and usability testing methodologies. Contextualize answers within the organization's specific design tokens.", + "system_prompt": "Support learners with role-specific knowledge for UX development, including design systems, interaction patterns, front-end implementation choices, and usability testing methods. Explain trade-offs clearly and connect answers to practical delivery responsibilities.", "tool_permissions": [] } }, @@ -40,7 +40,7 @@ "name": "UX Developer Assessment Agent", "agent_type": "assessment", "llm_config": {"model_id": "meta-llama-3.1-8b-instruct"}, - "system_prompt": "You are a Technical Interviewer for UX Engineers. Generate coding challenges and design critiques that evaluate a user's ability to implement responsive layouts and perform semantic code reviews.", + "system_prompt": "Assess a learner's readiness for UX Developer responsibilities through scenario-based tasks on responsive implementation, accessibility conformance, design-to-code fidelity, and maintainable component architecture.", "tool_permissions": [] } }, @@ -55,7 +55,7 @@ "name": "UX Developer Progress Monitor", "agent_type": "monitor", "llm_config": {"model_id": "meta-llama-3.1-8b-instruct"}, - "system_prompt": "You are a UX Team Lead. Track the completion of design-to-code modules. Identify areas where the developer struggles with specific UI frameworks and suggest remedial design sprints.", + "system_prompt": "Track learner progress against UX Developer competency milestones, identify weak areas in design reasoning or implementation quality, and recommend targeted remediation focused on practical job responsibilities.", "tool_permissions": [] } }, @@ -70,7 +70,7 @@ "name": "fNIRS Specialist Curriculum Agent", "agent_type": "curriculum", "llm_config": {"model_id": "meta-llama-3.1-8b-instruct"}, - "system_prompt": "You are a Neuroimaging Professor. Design a curriculum covering the physics of near-infrared light, optode placement (10-20 system), and the modified Beer-Lambert law. Focus on artifact rejection and signal processing for cortical activation.", + "system_prompt": "Teach fNIRS Specialist responsibilities by covering experiment setup, optode placement, signal quality control, and interpretation of hemodynamic responses. Sequence learning from instrumentation basics to robust analysis workflows.", "tool_permissions": [] } }, @@ -85,7 +85,7 @@ "name": "fNIRS Specialist Knowledge Agent", "agent_type": "knowledge", "llm_config": {"model_id": "meta-llama-3.1-8b-instruct"}, - "system_prompt": "You are an fNIRS Lab Assistant. Answer technical queries regarding Homer3, NIRS-Toolbox, and real-time data streaming. Provide troubleshooting steps for high-impedance channels and motion artifacts.", + "system_prompt": "Answer technical questions that help learners perform fNIRS Specialist duties, including toolchain usage, artifact mitigation, calibration checks, and defensible interpretation of recorded signals.", "tool_permissions": [] } }, @@ -100,7 +100,7 @@ "name": "fNIRS Specialist Assessment Agent", "agent_type": "assessment", "llm_config": {"model_id": "meta-llama-3.1-8b-instruct"}, - "system_prompt": "You are a Research Evaluator. Create examination questions that require the student to interpret fNIRS heatmaps and calculate oxygenated vs deoxygenated hemoglobin concentrations from raw OD data.", + "system_prompt": "Evaluate learner capability for fNIRS Specialist work with applied assessments on protocol setup, data quality checks, signal processing decisions, and interpretation of oxygenation trends.", "tool_permissions": [] } }, @@ -115,7 +115,7 @@ "name": "fNIRS Specialist Progress Monitor", "agent_type": "monitor", "llm_config": {"model_id": "meta-llama-3.1-8b-instruct"}, - "system_prompt": "You are a Principal Investigator. Monitor the student's mastery of fNIRS data collection protocols. Ensure they pass safety and calibration milestones before proceeding to human participant trials.", + "system_prompt": "Monitor advancement through fNIRS Specialist milestones, verify practical understanding of safety and calibration procedures, and flag gaps that would impact study reliability.", "tool_permissions": [] } }, @@ -130,7 +130,7 @@ "name": "Quant Analyst Curriculum Agent", "agent_type": "curriculum", "llm_config": {"model_id": "meta-llama-3.1-8b-instruct"}, - "system_prompt": "You are a Financial Engineering Lead. Design a training path focused on stochastic calculus, Monte Carlo simulations, and Black-Scholes modeling. Emphasize the implementation of these models in Python using NumPy and Pandas.", + "system_prompt": "Teach Quantitative Analyst responsibilities through a curriculum on statistical modelling, forecasting, risk analysis, and clear model communication. Progress from mathematical foundations to reproducible Python-based analytical workflows.", "tool_permissions": [] } } diff --git a/site/src/views/OnboardingView.vue b/site/src/views/OnboardingView.vue index 7c9a83f..2a70203 100644 --- a/site/src/views/OnboardingView.vue +++ b/site/src/views/OnboardingView.vue @@ -71,7 +71,7 @@ const getFlowRoleUuid = (flowData: OnboardingFlowSummary): string | undefined => const findCompletedSessionForRole = async (): Promise => { const sessionRes = await apiClient.get(API.onboarding.sessions.list(), { - params: { role: roleId.value }, + params: { 'role__uuid': roleId.value }, }) return ( sessionRes.data.find( @@ -86,7 +86,7 @@ const retryGeneration = async () => { try { const response = await apiClient.get(API.onboarding.flows.list(), { - params: { role: roleId.value }, + params: { 'role__uuid': roleId.value }, }) if (response.data && response.data.length > 0) { @@ -137,7 +137,7 @@ const initOnboarding = async () => { loading.value = true try { const response = await apiClient.get(API.onboarding.flows.list(), { - params: { role: roleId.value }, + params: { 'role__uuid': roleId.value }, }) if (response.data && response.data.length > 0) { diff --git a/site/src/views/OrganizationView.vue b/site/src/views/OrganizationView.vue index 6d59037..34e9faf 100644 --- a/site/src/views/OrganizationView.vue +++ b/site/src/views/OrganizationView.vue @@ -100,6 +100,10 @@ const selectRole = async (roleUuid: string) => { message.error('Organization not loaded') return } + if (isManager.value) { + message.error('Managers cannot join roles from this page') + return + } if (!auth.user?.uuid) { try { await auth.fetchSession(true) @@ -134,7 +138,7 @@ const fetchTrainingFiles = async () => { if (!organization.value?.uuid) return try { const response = await apiClient.get(API.knowledge.trainingFiles.list(), { - params: { organization_uuid: organization.value.uuid }, + params: { 'role__organization__uuid': organization.value.uuid }, }) trainingFiles.value = response.data } catch (error) { @@ -451,10 +455,9 @@ onMounted(async () => { Start Onboarding