phil / competencies
Know what each person masters: competency frameworks with stable IDs, ratings on scales, plans by role, Open Badges alignment, CASE and CSV import.
Requires
- php: >=8.5
- ext-mbstring: *
- phil/import-wizard: ^0.1@dev
- phil/url: ^0.1@dev
Requires (Dev)
- phpunit/phpunit: ^13.4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-30 02:52:23 UTC
README
Describe what people must know how to do as competency frameworks, follow what each person masters from their ratings, aim learning plans at the levels a role needs, and align badges with the competencies they recognize — with frameworks read from CASE packages and CSV files.
phil/competencies is a plain PHP library. A framework is a tree of competencies with stable identifiers, typed associations between them and a scale of levels; ratings come from assessments, courses, reviewers or other systems; the library tells, for one person, which competencies are proficient and at what level, and where they stand on their plan. Courses, certificates, badges and reports read the same frameworks instead of each keeping its own list of skills.
- A tree with stable identifiers: each competency keeps its identifier from one version of the framework to the
next, a code people read (
2.1.3), a description and an optional URL; siblings keep their order; associations —precedes,exactMatchOf,isRelatedTo,isPeerOf,isPartOf,replacedBy— link competencies beside the tree. - Scales with proficient levels: from 2 to 20 ordered levels, the proficient ones at the top; the level a person holds and the level a plan asks for are distinct.
- Aggregation rules: a parent becomes proficient when all its children are, when at least N of them are, or only when rated directly; the tree is read once from the leaves up.
- Evidence, never personal data: a rating holds identifiers only — the competency, the level, the instant, the kind of evidence, its source and the rater —; prior learning becomes a rating only once a reviewer other than the learner accepts it.
- Learning plans: templates of targets, plans copied from them for one person and adjusted, a due date, and the progress of each target.
- Open Badges 3.0 alignments: the
alignmententries of an achievement,CFItemfor a competency from CASE. - CASE and CSV: a CASE package of 1EdTech or a documented CSV file becomes a framework; the CSV reading is strict, the CASE reading counts what the model does not hold instead of guessing.
- Bounded: 10 000 competencies, 32 levels deep and 50 000 associations a framework; files bounded in size before they are read.
Status
| Part | State |
|---|---|
| Frameworks, competencies, associations, scales and aggregation rules | Implemented and tested |
| Ratings, claims of prior learning and the proficiency calculator | Implemented and tested |
| Learning plan templates, plans and their progress | Implemented and tested |
| Open Badges 3.0 alignments | Implemented and tested |
| The CSV reader and the CASE reader | Implemented, tested and fuzzed |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, installing, a first framework. |
| Frameworks | Competencies, the tree, associations, scales, aggregation rules, bounds. |
| Proficiency | Ratings, evidence, prior learning, the calculator and its results. |
| Learning plans | Templates, plans, targets and progress. |
| Open Badges alignments | The alignment entries of an achievement. |
| Importing | The CSV format, the CASE package, what is refused and what is set aside. |
| Extension points | Other sources of rows, storing frameworks and ratings, what is stable. |
| Testing | The tests, the fuzz targets, the benchmark. |
| Reference | Every public type, with its role. |
Quick start
composer require phil/competencies
use Phil\Competencies\Import\CsvFrameworkReader; use Phil\Competencies\ProficiencyCalculator; use Phil\Competencies\Rating; use Phil\Competencies\Scale; $framework = new CsvFrameworkReader()->fromString(<<<'CSV' id,parent,code,name,rule info,,1,Information literacy,at-least:1 browse,info,1.1,Browse the web, search,info,1.2,Search for information, CSV, 'digital-skills', 'Digital skills', Scale::binary()); $proficiencies = new ProficiencyCalculator()->evaluate($framework, [ new Rating('search', 'proficient', new DateTimeImmutable('2026-11-27T10:00:00+00:00')), ]); $proficiencies->isProficient('info'); // true: one child is proficient, and the rule asks for one
Requirements
PHP 8.5 or later, ext-mbstring, phil/import-wizard (for reading CSV files) and phil/url (for the URLs of
competencies).
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.