What problem does it solve?
Feature config in authgear-server (authgear.features.yaml) is merged across code default, cluster, plan, and app override layers, and whole-section merge swaps silently reset sibling fields set by lower layers. This Skill guides adding or changing feature config fields and sections in pkg/lib/config so merges stay field-level, schema constraints match runtime semantics, and JSON serialization does not hide resolved values.
Core Features & Use Cases
- Field-level merge enforcement: Implements nil-safe, per-field Merge methods following the OAuthClientFeatureConfig reference pattern, cascading through single-field wrapper levels to real sibling fields.
- Merge regression testing: Adds cases to pkg/lib/config/testdata/merge_feature.yaml where one layer sets field A and a later layer sets sibling B, asserting both survive with non-default values.
- Schema and serialization audits: Verifies JSON schema constraints against actual consumer code behavior and removes omitempty from scalar fields whose zero value is a real default, validated with marshal-based tests.
- Use Case: When adding a new boolean field to an existing feature config section, use this Skill to write the per-field merge, add the layered merge test fixture, and confirm the resolved section serializes correctly for the Site Admin API.
Quick Start
Add a new disabled field to the messaging feature config section with a field-level merge implementation and a merge test case in merge_feature.yaml.