# core/steps/concern.step.ts

> 14 lines of code and 1 definition.

Tree: GovLab Quality
Language: typescript
Layer: application
Canonical: https://banes-lab.com/anatomy/quality#file-quality-core-steps-concern-step-ts
Source text: https://banes-lab.com/source/quality/core/steps/concern.step.ts.txt

Listed in [core/steps](https://banes-lab.com/api/source/quality/core/steps.md), after [core/steps/concept.step.ts](https://banes-lab.com/source/quality/core/steps/concept.step.ts.md) and before [core/steps/knob.step.ts](https://banes-lab.com/source/quality/core/steps/knob.step.ts.md).

## Definitions

- `catalog` (lexical_declaration, line 11)

## Contained in

- [core/steps](https://banes-lab.com/anatomy/quality/folder-quality-core-steps.md)

## Source

```typescript
import type { CatalogRule } from "#types/catalog.types";
import { absolutePath } from "@ssot/paths";
import { concernOf } from "#core/classifiers/concern.classifier";
import { defineStep } from "#core/registries/step.registry";

defineStep({
    gives: ["catalog"],
    name: "concern",
    needs: ["classified"],
    run: async (state, writer) => {
        const catalog = (state.classified ?? []).map((rule): CatalogRule => ({ ...rule, concern: concernOf(rule) }));
        await writer.json(absolutePath("govlab.quality.generated.rules"), catalog);
        return { catalog };
    },
});
```
