package file→ .shtukbase/packages/risks/checks/r01_risk_held.ts
checks/r01_risk_held.ts
16 lines, 1.0 KB.
- // RSK-R01. A live risk (open or mitigated: category arriving or working) can be held: it has an owner, a likelihood
- // and an impact, a signal (how we notice it) and a mitigation (how we lower it).
- import type { Project, Result } from '../../collections/checks/lib/speclib.ts';
- import { main } from '../../collections/checks/lib/runner.ts';
- import { checkFields, live } from '../../quality/checks/lib/qlib.ts';
- export const RULE = { id: 'rsk-r01', title: 'A risk has an owner, an assessment, a signal and a measure', scope: 'risks in the states "Open" and "Mitigated"' };
- export function check(p: Project, res: Result): void {
- checkFields(p, res, 'RISK', [
- { when: (r) => live(p, r, 'RISK'), fields: ['owner', 'likelihood', 'impact', 'signal', 'mitigation'], why: 'nobody holds the risk, or there is nothing to hold it with',
- fix: 'write who is responsible (owner), the likelihood and the impact, how we will notice (signal) and how we reduce it (mitigation)', code: 'not-held' },
- ]);
- }
- if (import.meta.main) main({ RULE, check });