# Write Features File

Write the file .smithers/specs/features.ts with the feature groups below.

First create the directory: mkdir -p specs

Use this exact TypeScript structure:

```typescript
/**
 * Code-backed Smithers feature inventory.
 *
 * Auto-generated by the sync-features workflow.
 * Last synced at commit: {props.lastCommitHash ?? "unknown"}
 */

export const FeatureGroups = {'{'}
  // Source: {'<'}file paths{'>'}
  GROUP_NAME: [
    "FEATURE_1",
    "FEATURE_2",
  ],
{'}'} as const satisfies Record{'<'}string, readonly string[]{'>'};

type FeatureGroupMap = typeof FeatureGroups;
export type FeatureGroupName = keyof FeatureGroupMap;
export type FeatureName = FeatureGroupMap[FeatureGroupName][number];

const featureEntries: Array{'<'}readonly [FeatureName, FeatureName]{'>'} = [];

for (const group of Object.values(FeatureGroups) as readonly (readonly FeatureName[])[]) {'{'}
  for (const feature of group) {'{'}
    featureEntries.push([feature, feature] as const);
  {'}'}
{'}'}

export const Features = Object.freeze(
  Object.fromEntries(featureEntries) as Record{'<'}FeatureName, FeatureName{'>'},{'\n'}
);
```

FEATURE GROUPS:
{JSON.stringify(props.featureGroups, null, 2)}

Write the file, then report: filePath ".smithers/specs/features.ts", commitHash "{props.lastCommitHash ?? "unknown"}", totalGroups and totalFeatures counts.

REQUIRED OUTPUT:
{props.schema}
