файл пакета→ .shtukbase/packages/quality/checks/q06_outcome.ts
checks/q06_outcome.ts
19 строк, 1.2 КБ.
Файл как есть в пакете: код и комментарии в нём не переводятся.
- // QLT-R06. A benefit past «hypothesis» (category working or done) is described in full: formula, unit, expected
- // effect, horizon, who measures it in operation and where the data comes from; and the goal, when the project has
- // a goals collection (without the layer "Business" the goal is written in the body).
- import type { Project, Result } from '../../collections/checks/lib/speclib.ts';
- import { main } from '../../collections/checks/lib/runner.ts';
- import { checkFields } from './lib/qlib.ts';
- export const RULE = { id: 'qlt-r06', title: 'A benefit past the hypothesis is described in full', scope: 'benefit in operation in the states after "Hypothesis"' };
- export function check(p: Project, res: Result): void {
- const fields = ['formula', 'unit', 'expectedEffect', 'horizon', 'measuredInOpsBy', 'opsDataSource'];
- if (p.coll('GOAL')) fields.unshift('goal');
- checkFields(p, res, 'OUT', [
- { when: (r) => ['working', 'done'].includes(p.category(r, 'OUT') ?? ''), fields, why: 'the benefit is not described so that it could be measured',
- fix: 'fill in the fields or return the benefit to "Hypothesis"', code: 'not-described' },
- ]);
- }
- if (import.meta.main) main({ RULE, check });