Model Package
Pure business logic for deriving jobs, agent profiles, skill matrices, and career progression from schema data.
When to Use
- •Modifying job derivation logic (skill levels, behaviour maturities)
- •Changing agent profile generation
- •Working with skill modifier resolution
- •Updating checklist derivation for stage transitions
- •Modifying interview question selection
- •Changing career progression analysis
Package Structure
code
apps/model/src/ derivation.js # Core: deriveSkillMatrix, deriveBehaviourProfile, deriveJob modifiers.js # Skill modifier resolution profile.js # Post-processing: filtering, sorting for agents job.js # Job preparation for display job-cache.js # Job caching for pages agent.js # Agent profile/skill generation checklist.js # Stage transition checklists interview.js # Interview question selection matching.js # Job matching logic progression.js # Career progression analysis
Key Modules
derivation.js
Core derivation functions used by all consumers.
javascript
import {
deriveSkillMatrix,
deriveBehaviourProfile,
deriveJob,
} from "@forwardimpact/model/derivation";
profile.js
Agent-specific filtering and sorting:
- •Excludes
isHumanOnlyskills - •Keeps only highest level per skill
- •Sorts by level (highest first)
javascript
import { prepareAgentProfile } from "@forwardimpact/model/profile";
job.js / job-cache.js
Job preparation and caching for web pages.
javascript
import { getOrCreateJob } from "@forwardimpact/model/job-cache";
agent.js
Agent profile and skill file generation.
javascript
import {
deriveAgentSkills,
generateStageAgentProfile,
} from "@forwardimpact/model/agent";
interview.js
Question selection based on role requirements.
progression.js
Career progression analysis between grades.
Job Derivation
Jobs are derived from Discipline × Grade × Track?:
- •Base skill levels from grade (by skill type: primary/secondary/broad)
- •Track modifiers applied to capabilities (+1, 0, -1)
- •Behaviour modifiers combined from discipline and track
- •Responsibilities by discipline type (professional/management)
code
Final Level = clamp(Base Level + Track Modifier, awareness, grade ceiling)
Agent Profiles
Agent profiles use the same derivation as jobs, filtered for AI-applicable capabilities:
code
Agent Profile = Discipline × Track × Stage
- •Uses practitioner-level reference grade
- •Excludes
isHumanOnlyskills - •Constrained by stage tools and permissions
Pure Functions
All derivation functions are pure:
- •No side effects
- •Same inputs → same outputs
- •No external state access
This makes them easy to test and reason about.
Verification
Run tests after changes:
sh
npm run test