{"success":true,"filters":{"layer":null,"surface":null,"search":null},"summary":{"profiles":7,"layers":7,"surfaces":5,"roles":15,"controls":28,"evidenceOutputs":23,"defaultInputTokenBudget":18000,"defaultOutputTokenBudget":1024},"profiles":[{"id":"grading-request-validation","layer":"request_validation","name":"Structured grading request validation","purpose":"Accept grading submissions only when the target, learner response, optional role, and metadata match the universal grading contract.","enforcementPoint":"parseAndGuardGradeRequest, GradeRequestSchema, parsePublicJsonRequest","failClosedRule":"Malformed JSON, oversize payloads, missing response text, or invalid target fields are rejected before model calls.","surfaces":["universal_grading","demo_grading","assessment_grading"],"roleCoverage":[{"role":"support","roleLabel":"Support","productLine":"AIducation for Support","academyPath":"/ai-training/support","firstWedge":true},{"role":"sales","roleLabel":"Sales","productLine":"AIducation for Sales","academyPath":"/ai-training/sales","firstWedge":false},{"role":"marketing","roleLabel":"Marketing","productLine":"AIducation for Marketing","academyPath":"/ai-training/marketing","firstWedge":false},{"role":"hr","roleLabel":"HR","productLine":"AIducation for HR","academyPath":"/ai-training/hr","firstWedge":false},{"role":"finance","roleLabel":"Finance","productLine":"AIducation for Finance","academyPath":"/ai-training/finance","firstWedge":false},{"role":"engineering","roleLabel":"Engineering","productLine":"AIducation for Engineering","academyPath":"/ai-training/engineering","firstWedge":false},{"role":"product","roleLabel":"Product","productLine":"AIducation for Product Managers","academyPath":"/ai-training/product","firstWedge":false},{"role":"executives","roleLabel":"Executives","productLine":"AIducation for Executives","academyPath":"/ai-training/executives","firstWedge":false},{"role":"operations","roleLabel":"Operations","productLine":"AIducation for Operations","academyPath":"/ai-training/operations","firstWedge":false},{"role":"students","roleLabel":"Students","productLine":"AIducation for Students","academyPath":"/ai-training/students","firstWedge":false},{"role":"teachers","roleLabel":"Teachers","productLine":"AIducation for Teachers","academyPath":"/ai-training/teachers","firstWedge":false},{"role":"government","roleLabel":"Government","productLine":"AIducation for Government","academyPath":"/ai-training/government","firstWedge":false},{"role":"healthcare-admin","roleLabel":"Healthcare Admin","productLine":"AIducation for Healthcare Admin","academyPath":"/ai-training/healthcare-admin","firstWedge":false},{"role":"legal","roleLabel":"Legal","productLine":"AIducation for Legal Teams","academyPath":"/ai-training/legal","firstWedge":false},{"role":"small-business","roleLabel":"Small Business","productLine":"AIducation for Small Businesses","academyPath":"/ai-training/small-business","firstWedge":false}],"controls":["Zod schema validates scenarioId, response, role, and metadata","Request body size is capped before parsing","Response text length is capped before prompt assembly","Scenario, workflow, seed, or instance targets are resolved through one service path"],"evidenceOutputs":["Accepted grading attempt payload","Target type and target identifier","Role context used for rubric selection"],"implementationRefs":["src/lib/grading/guardrails.ts","src/lib/public-api-guardrails.ts","src/app/api/grading/route.ts","src/app/api/grading/universal/route.ts"]},{"id":"grading-prompt-injection","layer":"prompt_injection","name":"Prompt-injection screening","purpose":"Block learner submissions that try to override grading instructions, reveal prompts, force perfect scores, or prevent evaluation.","enforcementPoint":"detectPromptInjectionRisk inside parseAndGuardGradeRequest","failClosedRule":"Known prompt-injection patterns return a guarded grading error instead of reaching the grader model.","surfaces":["universal_grading","workflow_grading","demo_grading","assessment_grading"],"roleCoverage":[{"role":"support","roleLabel":"Support","productLine":"AIducation for Support","academyPath":"/ai-training/support","firstWedge":true},{"role":"sales","roleLabel":"Sales","productLine":"AIducation for Sales","academyPath":"/ai-training/sales","firstWedge":false},{"role":"marketing","roleLabel":"Marketing","productLine":"AIducation for Marketing","academyPath":"/ai-training/marketing","firstWedge":false},{"role":"hr","roleLabel":"HR","productLine":"AIducation for HR","academyPath":"/ai-training/hr","firstWedge":false},{"role":"finance","roleLabel":"Finance","productLine":"AIducation for Finance","academyPath":"/ai-training/finance","firstWedge":false},{"role":"engineering","roleLabel":"Engineering","productLine":"AIducation for Engineering","academyPath":"/ai-training/engineering","firstWedge":false},{"role":"product","roleLabel":"Product","productLine":"AIducation for Product Managers","academyPath":"/ai-training/product","firstWedge":false},{"role":"executives","roleLabel":"Executives","productLine":"AIducation for Executives","academyPath":"/ai-training/executives","firstWedge":false},{"role":"operations","roleLabel":"Operations","productLine":"AIducation for Operations","academyPath":"/ai-training/operations","firstWedge":false},{"role":"students","roleLabel":"Students","productLine":"AIducation for Students","academyPath":"/ai-training/students","firstWedge":false},{"role":"teachers","roleLabel":"Teachers","productLine":"AIducation for Teachers","academyPath":"/ai-training/teachers","firstWedge":false},{"role":"government","roleLabel":"Government","productLine":"AIducation for Government","academyPath":"/ai-training/government","firstWedge":false},{"role":"healthcare-admin","roleLabel":"Healthcare Admin","productLine":"AIducation for Healthcare Admin","academyPath":"/ai-training/healthcare-admin","firstWedge":false},{"role":"legal","roleLabel":"Legal","productLine":"AIducation for Legal Teams","academyPath":"/ai-training/legal","firstWedge":false},{"role":"small-business","roleLabel":"Small Business","productLine":"AIducation for Small Businesses","academyPath":"/ai-training/small-business","firstWedge":false}],"controls":["Detect attempts to ignore previous instructions","Detect attempts to reveal system, developer, or grader prompts","Detect forced-score and do-not-grade instructions","Preserve suspicious submissions as safety evidence instead of executing them"],"evidenceOutputs":["Prompt-injection rejection reason","Safety coaching signal for the learner","Manager-readable risk event for repeated abuse"],"implementationRefs":["src/lib/grading/guardrails.ts","src/lib/platform/ai-safety-red-team.ts","src/app/api/ai-safety-red-team/route.ts"]},{"id":"grading-rate-limit","layer":"rate_limit","name":"Public grading rate limits","purpose":"Keep public demo grading and universal grading from becoming an unbounded model-cost or abuse surface.","enforcementPoint":"enforcePublicRateLimit and checkRateLimit with grading namespace keys","failClosedRule":"Rate-limited clients receive a retryable error before any scenario lookup or model request.","surfaces":["universal_grading","demo_grading","assessment_grading"],"roleCoverage":[{"role":"support","roleLabel":"Support","productLine":"AIducation for Support","academyPath":"/ai-training/support","firstWedge":true},{"role":"sales","roleLabel":"Sales","productLine":"AIducation for Sales","academyPath":"/ai-training/sales","firstWedge":false},{"role":"marketing","roleLabel":"Marketing","productLine":"AIducation for Marketing","academyPath":"/ai-training/marketing","firstWedge":false},{"role":"hr","roleLabel":"HR","productLine":"AIducation for HR","academyPath":"/ai-training/hr","firstWedge":false},{"role":"finance","roleLabel":"Finance","productLine":"AIducation for Finance","academyPath":"/ai-training/finance","firstWedge":false},{"role":"engineering","roleLabel":"Engineering","productLine":"AIducation for Engineering","academyPath":"/ai-training/engineering","firstWedge":false},{"role":"product","roleLabel":"Product","productLine":"AIducation for Product Managers","academyPath":"/ai-training/product","firstWedge":false},{"role":"executives","roleLabel":"Executives","productLine":"AIducation for Executives","academyPath":"/ai-training/executives","firstWedge":false},{"role":"operations","roleLabel":"Operations","productLine":"AIducation for Operations","academyPath":"/ai-training/operations","firstWedge":false},{"role":"students","roleLabel":"Students","productLine":"AIducation for Students","academyPath":"/ai-training/students","firstWedge":false},{"role":"teachers","roleLabel":"Teachers","productLine":"AIducation for Teachers","academyPath":"/ai-training/teachers","firstWedge":false},{"role":"government","roleLabel":"Government","productLine":"AIducation for Government","academyPath":"/ai-training/government","firstWedge":false},{"role":"healthcare-admin","roleLabel":"Healthcare Admin","productLine":"AIducation for Healthcare Admin","academyPath":"/ai-training/healthcare-admin","firstWedge":false},{"role":"legal","roleLabel":"Legal","productLine":"AIducation for Legal Teams","academyPath":"/ai-training/legal","firstWedge":false},{"role":"small-business","roleLabel":"Small Business","productLine":"AIducation for Small Businesses","academyPath":"/ai-training/small-business","firstWedge":false}],"controls":["Client key is derived from forwarded IP, user agent, or fallback identity","Rate-limit windows are scoped to grading routes","Target-specific keys reduce repeated abuse of one scenario","Enterprise APIs can use stronger key-based limits outside public demos"],"evidenceOutputs":["Rejected public grading request","Client retry window","Abuse signal for platform operations"],"implementationRefs":["src/lib/grading/guardrails.ts","src/lib/public-api-guardrails.ts","src/lib/rate-limit.ts","src/lib/enterprise-api-auth.ts"]},{"id":"grading-cost-control","layer":"cost_control","name":"AI grading cost controls","purpose":"Budget grader model usage before a request is sent, with configurable input, output, and total token ceilings.","enforcementPoint":"prepareAiRequestBudget({ feature: 'grading' }) before OpenRouter calls","failClosedRule":"Requests that exceed the grading budget are rejected before model invocation.","surfaces":["universal_grading","workflow_grading","assessment_grading","enterprise_reporting"],"roleCoverage":[{"role":"support","roleLabel":"Support","productLine":"AIducation for Support","academyPath":"/ai-training/support","firstWedge":true},{"role":"sales","roleLabel":"Sales","productLine":"AIducation for Sales","academyPath":"/ai-training/sales","firstWedge":false},{"role":"marketing","roleLabel":"Marketing","productLine":"AIducation for Marketing","academyPath":"/ai-training/marketing","firstWedge":false},{"role":"hr","roleLabel":"HR","productLine":"AIducation for HR","academyPath":"/ai-training/hr","firstWedge":false},{"role":"finance","roleLabel":"Finance","productLine":"AIducation for Finance","academyPath":"/ai-training/finance","firstWedge":false},{"role":"engineering","roleLabel":"Engineering","productLine":"AIducation for Engineering","academyPath":"/ai-training/engineering","firstWedge":false},{"role":"product","roleLabel":"Product","productLine":"AIducation for Product Managers","academyPath":"/ai-training/product","firstWedge":false},{"role":"executives","roleLabel":"Executives","productLine":"AIducation for Executives","academyPath":"/ai-training/executives","firstWedge":false},{"role":"operations","roleLabel":"Operations","productLine":"AIducation for Operations","academyPath":"/ai-training/operations","firstWedge":false},{"role":"students","roleLabel":"Students","productLine":"AIducation for Students","academyPath":"/ai-training/students","firstWedge":false},{"role":"teachers","roleLabel":"Teachers","productLine":"AIducation for Teachers","academyPath":"/ai-training/teachers","firstWedge":false},{"role":"government","roleLabel":"Government","productLine":"AIducation for Government","academyPath":"/ai-training/government","firstWedge":false},{"role":"healthcare-admin","roleLabel":"Healthcare Admin","productLine":"AIducation for Healthcare Admin","academyPath":"/ai-training/healthcare-admin","firstWedge":false},{"role":"legal","roleLabel":"Legal","productLine":"AIducation for Legal Teams","academyPath":"/ai-training/legal","firstWedge":false},{"role":"small-business","roleLabel":"Small Business","productLine":"AIducation for Small Businesses","academyPath":"/ai-training/small-business","firstWedge":false}],"controls":["Default input budget: 18,000 tokens","Default output budget: 1,024 tokens","Default total budget: 20,000 tokens","Environment overrides use AIDUCATION_AI_GRADING_* or global AI budget variables"],"evidenceOutputs":["Estimated input token count","Configured max output tokens","Cost-control rejection when budgets are exceeded"],"implementationRefs":["src/lib/ai-cost-controls.ts","src/lib/grading/service.ts","src/app/api/grading/route.ts"]},{"id":"grading-output-validation","layer":"output_validation","name":"Model-output validation","purpose":"Parse AI grader output into expected score, pass/fail, rubric dimensions, coaching, and evidence fields before persistence.","enforcementPoint":"parseGradingResponse and parseRubricContractGradingResponse","failClosedRule":"Invalid or incomplete model output becomes a grading error instead of a trusted readiness result.","surfaces":["universal_grading","workflow_grading","demo_grading","assessment_grading"],"roleCoverage":[{"role":"support","roleLabel":"Support","productLine":"AIducation for Support","academyPath":"/ai-training/support","firstWedge":true},{"role":"sales","roleLabel":"Sales","productLine":"AIducation for Sales","academyPath":"/ai-training/sales","firstWedge":false},{"role":"marketing","roleLabel":"Marketing","productLine":"AIducation for Marketing","academyPath":"/ai-training/marketing","firstWedge":false},{"role":"hr","roleLabel":"HR","productLine":"AIducation for HR","academyPath":"/ai-training/hr","firstWedge":false},{"role":"finance","roleLabel":"Finance","productLine":"AIducation for Finance","academyPath":"/ai-training/finance","firstWedge":false},{"role":"engineering","roleLabel":"Engineering","productLine":"AIducation for Engineering","academyPath":"/ai-training/engineering","firstWedge":false},{"role":"product","roleLabel":"Product","productLine":"AIducation for Product Managers","academyPath":"/ai-training/product","firstWedge":false},{"role":"executives","roleLabel":"Executives","productLine":"AIducation for Executives","academyPath":"/ai-training/executives","firstWedge":false},{"role":"operations","roleLabel":"Operations","productLine":"AIducation for Operations","academyPath":"/ai-training/operations","firstWedge":false},{"role":"students","roleLabel":"Students","productLine":"AIducation for Students","academyPath":"/ai-training/students","firstWedge":false},{"role":"teachers","roleLabel":"Teachers","productLine":"AIducation for Teachers","academyPath":"/ai-training/teachers","firstWedge":false},{"role":"government","roleLabel":"Government","productLine":"AIducation for Government","academyPath":"/ai-training/government","firstWedge":false},{"role":"healthcare-admin","roleLabel":"Healthcare Admin","productLine":"AIducation for Healthcare Admin","academyPath":"/ai-training/healthcare-admin","firstWedge":false},{"role":"legal","roleLabel":"Legal","productLine":"AIducation for Legal Teams","academyPath":"/ai-training/legal","firstWedge":false},{"role":"small-business","roleLabel":"Small Business","productLine":"AIducation for Small Businesses","academyPath":"/ai-training/small-business","firstWedge":false}],"controls":["AI output must parse into the expected result shape","Rubric contract dimensions preserve score weights and evidence requirements","Must-pass safety dimensions can block readiness even when average score is high","Feedback is normalized before it appears in learner or manager surfaces"],"evidenceOutputs":["Validated score","Rubric dimension breakdown","Must-pass safety status","Learner coaching feedback"],"implementationRefs":["src/lib/grading/service.ts","src/lib/grading/service.ts#parseGradingResponse","src/lib/platform/rubrics.ts","src/app/api/rubric-contracts/route.ts"]},{"id":"grading-tenant-scope","layer":"tenant_scope","name":"Tenant-scoped grading targets","purpose":"Resolve scenarios, seeds, workflow sessions, and rubric contracts only when the learner or API principal can read the target content.","enforcementPoint":"resolveGradableTarget with tenant-scoped content access checks","failClosedRule":"Private, org-only, or draft targets cannot be graded outside their allowed identity and tenant boundary.","surfaces":["universal_grading","workflow_grading","assessment_grading","enterprise_reporting"],"roleCoverage":[{"role":"support","roleLabel":"Support","productLine":"AIducation for Support","academyPath":"/ai-training/support","firstWedge":true},{"role":"sales","roleLabel":"Sales","productLine":"AIducation for Sales","academyPath":"/ai-training/sales","firstWedge":false},{"role":"marketing","roleLabel":"Marketing","productLine":"AIducation for Marketing","academyPath":"/ai-training/marketing","firstWedge":false},{"role":"hr","roleLabel":"HR","productLine":"AIducation for HR","academyPath":"/ai-training/hr","firstWedge":false},{"role":"finance","roleLabel":"Finance","productLine":"AIducation for Finance","academyPath":"/ai-training/finance","firstWedge":false},{"role":"engineering","roleLabel":"Engineering","productLine":"AIducation for Engineering","academyPath":"/ai-training/engineering","firstWedge":false},{"role":"product","roleLabel":"Product","productLine":"AIducation for Product Managers","academyPath":"/ai-training/product","firstWedge":false},{"role":"executives","roleLabel":"Executives","productLine":"AIducation for Executives","academyPath":"/ai-training/executives","firstWedge":false},{"role":"operations","roleLabel":"Operations","productLine":"AIducation for Operations","academyPath":"/ai-training/operations","firstWedge":false},{"role":"students","roleLabel":"Students","productLine":"AIducation for Students","academyPath":"/ai-training/students","firstWedge":false},{"role":"teachers","roleLabel":"Teachers","productLine":"AIducation for Teachers","academyPath":"/ai-training/teachers","firstWedge":false},{"role":"government","roleLabel":"Government","productLine":"AIducation for Government","academyPath":"/ai-training/government","firstWedge":false},{"role":"healthcare-admin","roleLabel":"Healthcare Admin","productLine":"AIducation for Healthcare Admin","academyPath":"/ai-training/healthcare-admin","firstWedge":false},{"role":"legal","roleLabel":"Legal","productLine":"AIducation for Legal Teams","academyPath":"/ai-training/legal","firstWedge":false},{"role":"small-business","roleLabel":"Small Business","productLine":"AIducation for Small Businesses","academyPath":"/ai-training/small-business","firstWedge":false}],"controls":["Scenario instances inherit parent seed visibility","Workflow sessions remain scoped to learner and organization","Rubric contracts follow content visibility and lifecycle rules","Demo scenarios stay public while company-specific scenarios stay tenant-bound"],"evidenceOutputs":["Target visibility decision","Tenant identifier for private readiness evidence","Denied access event for unauthorized grading attempts"],"implementationRefs":["src/lib/grading/service.ts","src/lib/content-access.ts","src/lib/platform/access-control.ts","src/lib/db/schema.ts"]},{"id":"grading-evidence-persistence","layer":"evidence_persistence","name":"Readiness evidence persistence","purpose":"Turn validated grading results into reusable proof for readiness scores, manager reports, credentials, workflow portfolios, and enterprise exports.","enforcementPoint":"persisted grading results, workflow grading results, readiness rollups, and credential evidence links","failClosedRule":"Unvalidated, unscoped, or failed grading attempts do not become readiness proof or credential evidence.","surfaces":["universal_grading","workflow_grading","demo_grading","assessment_grading","enterprise_reporting"],"roleCoverage":[{"role":"support","roleLabel":"Support","productLine":"AIducation for Support","academyPath":"/ai-training/support","firstWedge":true},{"role":"sales","roleLabel":"Sales","productLine":"AIducation for Sales","academyPath":"/ai-training/sales","firstWedge":false},{"role":"marketing","roleLabel":"Marketing","productLine":"AIducation for Marketing","academyPath":"/ai-training/marketing","firstWedge":false},{"role":"hr","roleLabel":"HR","productLine":"AIducation for HR","academyPath":"/ai-training/hr","firstWedge":false},{"role":"finance","roleLabel":"Finance","productLine":"AIducation for Finance","academyPath":"/ai-training/finance","firstWedge":false},{"role":"engineering","roleLabel":"Engineering","productLine":"AIducation for Engineering","academyPath":"/ai-training/engineering","firstWedge":false},{"role":"product","roleLabel":"Product","productLine":"AIducation for Product Managers","academyPath":"/ai-training/product","firstWedge":false},{"role":"executives","roleLabel":"Executives","productLine":"AIducation for Executives","academyPath":"/ai-training/executives","firstWedge":false},{"role":"operations","roleLabel":"Operations","productLine":"AIducation for Operations","academyPath":"/ai-training/operations","firstWedge":false},{"role":"students","roleLabel":"Students","productLine":"AIducation for Students","academyPath":"/ai-training/students","firstWedge":false},{"role":"teachers","roleLabel":"Teachers","productLine":"AIducation for Teachers","academyPath":"/ai-training/teachers","firstWedge":false},{"role":"government","roleLabel":"Government","productLine":"AIducation for Government","academyPath":"/ai-training/government","firstWedge":false},{"role":"healthcare-admin","roleLabel":"Healthcare Admin","productLine":"AIducation for Healthcare Admin","academyPath":"/ai-training/healthcare-admin","firstWedge":false},{"role":"legal","roleLabel":"Legal","productLine":"AIducation for Legal Teams","academyPath":"/ai-training/legal","firstWedge":false},{"role":"small-business","roleLabel":"Small Business","productLine":"AIducation for Small Businesses","academyPath":"/ai-training/small-business","firstWedge":false}],"controls":["Store grading result metadata for the graded target","Feed rubric evidence into readiness score models","Expose manager coaching priorities from repeated weak dimensions","Connect exit assessments, credentials, and export centers to graded proof"],"evidenceOutputs":["Grading result record","Readiness score input","Manager coaching report signal","Credential and export evidence link"],"implementationRefs":["src/lib/grading/service.ts","src/lib/readiness/service.ts","src/lib/platform/manager-coaching-reports.ts","src/lib/platform/evidence-export-center.ts","src/lib/platform/credentials.ts"]}]}