@peter.prib/decisionengine
v0.4.0
Published
SADIS, the Semantic Architectural Decision Intelligence System: ranks what to build next over a portfolio graph, and explains why — no dependencies; runs in Node.js or a browser.
Maintainers
Readme
decisionengine
Powered by SADIS — the Semantic Architectural Decision Intelligence System. Prioritisation that hurts, in a good way.
decisionengine answers what should we build next, and why? It ranks the work in a portfolio graph (objectives, outcomes, capabilities, epics, features) and explains each place in the ranking, part by part, so a recommendation can be argued with rather than just accepted.
The thing it is built to see is the riddle: work whose visible value is small but which unlocks a lot. A semantic registry looks like "just metadata"; search, governance, lineage and AI enablement all depend on it.
No dependencies; runs in Node.js or a browser.
npm install @peter.prib/decisionengineTry it
From a clone of the repository:
npm test
npm run example
npm run serve:examples # then open http://localhost:8096/examples/browser/The browser example, SADIS Explorer, ranks a portfolio live: drag the factor and flow weights,
switch where capability mappings come from (and type a classifier's mappings), click a candidate to see
why it ranks where it does. For a graph with a history it has "as of" dates to replay and a "changes since" date; a "what if" box
ranks the portfolio after proposed records; a capacity plans it into periods.
With perspectives it shows a weight per stakeholder, each candidate's rank under every
perspective and the most contested. It lists what the engine offers: the relationships and what each means
for scoring, the mapping options, and every refusal code. Portfolios come from the built-in example,
from a modelengine checkout beside this repo (served at /modelengine/), or from your own
.graph.json and .decision.json files. Beside the ranking it shows renderengine's Decision
Workbench live (DecisionWorkbenchPart: executive, architecture, explore, delivery, portfolio and replay
views, and "Export report" to HTML, Word, Excel, Markdown or CSV), following every change. The page loads
renderengine's workspace bundle from a renderengine checkout beside this repo (served at /renderengine/,
its dist/), else the published one; only the page depends on renderengine, not the engine. With neither,
"Download for the Decision Workbench" saves the ranking, plan and earlier ranking as a workbench file (with
the scored graph), which renderengine's examples/decision-workbench.html opens.
1. Semantic registry 0.316
2. Data governance 0.174
3. Executive dashboards 0.163
...
#1 Semantic registry (Capability registry) — score 0.316
rating 0.057 × 0.5 = 0.029
value 0.570 from:
strategicAlignment 2 → 0.400 × 0.25 = 0.100
...
unlock 80.0% × 0.25 = 0.200 — frees search, governance, lineage via governance, ai via search
influence 35.0% × 0.25 = 0.087 — reaches obj-trust in 2 via governance, obj-ai in 3 via search → aiUse
import { Sadis } from '@peter.prib/decisionengine';
const report = new Sadis(config).recommend(graph); // a SADIS report
report.top(5); // ranked entries, every part of each score kept
report.explain('registry'); // why it ranks where it doesgraphis a sqlengine graph document (.graph.json:nodeswithid,labels,props;edgeswithfrom,to,type). The relationships are the specification's:DEPENDS_ONandBLOCKSsay what unlocks what;ENABLES,IMPLEMENTS,REALIZESandSUPPORTScarry value up to the objectives;MITIGATESfeeds risk reduction,SUPERSEDEStakes a candidate out of the ranking, andCONFLICTS_WITHreports two candidates that cannot both be done.- A portfolio kept in sqlengine is read the same way:
recommend(db.graphs.toDocument('portfolio')). Such a graph usually holds relationships the scoring does not use (SERVES, ASSIGNED_TO, a view's SHOWS): setignorein the config to the types to skip, or to"unknown"for every type the engine does not know. The report counts what was skipped (report.ignored); anything else unknown is still refused. A graph in another vocabulary is read throughrelationshipsaliases ({ "SERVES": "ENABLES", "COMPOSITION": { "as": "IMPLEMENTS", "reverse": true } }), counted inreport.aliased. That is how an Archi model is ranked: renderengine reads the.archimatefile, sqlengine'sarchimateToGraphmakes it a graph (each element's Archi properties as its ratings), and modelengine's SADIS for ArchiMate configures the ranking of its Work Packages. - Graph intelligence: a factor can be derived from the graph rather than rated (
riskReduction: { from: "mitigation" }scores the share of risk exposure a candidate mitigates); a superseded candidate is not ranked; candidates that conflict are reported with each other. Depth can be derived too (depth: { from: "basin" }): how many layers of work sit above a candidate. And the riddle itself (riddleValue: { from: "riddle" }): how much more the best of what a candidate leads to is worth than it looks. - Stakeholder perspectives: each stakeholder's own weights (
perspectives), reconciled into one ranking; every entry shows each perspective's rank, andreport.disagreements()the most contested. - Time: a portfolio can carry when each thing holds and when it was known (
validFrom,validTo,recordedAtin props).recommend(graph, { asOf })replays the recommendation as it was made then, andSadisReport.compare(before, after)says what changed. Temporal confidence (from: "confidence") scores how settled a candidate's facts are;sadis.whatIf(graph, proposal)ranks a proposed change beside the portfolio as it is. - Delivery plan:
sadis.plan(graph, { capacity: 13 })sequences the recommendation into periods, respecting what waits on what, conflicts and capacity, and says when each candidate lands and why. Work can span periods (split), teams can have their own capacity (teams) and share a candidate (team: { platform: 5, product: 3 }), and the order can be rank, weighted shortest job first, whichever delivers value sooner (order: "best"), or a searched order that improves on that (order: "search", using variable neighborhood search over adjacent swaps and distance moves). configsays which node types are candidates and which are the top of the basin, the factors with their weights and scales, and how the flow score is mixed. The engine holds no weights of its own: the defaults are in modelengine (domains/software-delivery/sadis-defaults.decision.json).- Mapping items to capabilities comes from the graph's edges, from a classifier the host plugs in
(
ResolvedClassifierreads semanticengine's classifications from a chosen perspective), or both (mapping.by:edges,classified,both); each recommendation says which, and an item whose classifications disagree is shown unsettled rather than guessed.
How each score is worked out is in documentation/SCORING.md.
Anything the engine cannot score correctly is refused with a DecisionError carrying a code
(a factor off its scale, a missing value with no default, a dependency cycle, an unknown
relationship), never guessed.
What is built and what is planned
All nine phases of the specification are built: rating; basin (unlock and influence); graph intelligence; depth; riddle; perspectives; time (replay, history, temporal confidence, what-if); the delivery plan; the SADIS Estimation Engine (SEE: architecture-driven predictions for effort, duration, cost, risk and confidence); and the Decision Workbench, in renderengine. What changed in each release is in CHANGELOG.md; what may come next is in the repository's tasks.md.
decisionengine sits on the other engines rather than beside them, and imports none of them: sqlengine
stores the portfolio graph and its history (db.graphs.toDocument), semanticengine's classifications
map items to capabilities (ResolvedClassifier), and renderengine draws the Decision Workbench from
this engine's JSON (DecisionWorkbench, examples/decision-workbench.html).
Licence
GPL-3.0-only. Copyright 2026 Jaroslav Peter Prib, Purveyor of Excellence.
