OpenParable
Skip to content
← Back to skills

Register Feature Flag

Development
register-feature-flag

Register Feature Flag is an Agent Skill for development published in the PrestaShop/PrestaShop repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Register the domain's feature flag in `feature_flag.xml`. This entry populates the `ps_feature_flag` table at install/upgrade and enables the flag-based routing between legacy and Symfony controllers.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/PrestaShop/PrestaShop/blob/HEAD/.ai/Component/Controller/skills/register-feature-flag/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/register-feature-flag, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

register-feature-flag

Instructions

  1. Open install-dev/data/xml/feature_flag.xml.
  2. Add inside <entities>:
    <feature_flag id="{domain}">
      <stability>beta</stability>
      <state>0</state>
      <label_wording>{Domain} page</label_wording>
      <label_domain>Admin.{Section}.Feature</label_domain>
      <description_wording>Enable the new Symfony-based {domain} management page (beta).</description_wording>
      <description_domain>Admin.{Section}.Feature</description_domain>
    </feature_flag>
    
  3. The name field (which maps to the id attribute in XML) must exactly match the _legacy_feature_flag values in the routing YAML.
  4. Insert a row manually for local dev: INSERT INTO ps_feature_flag (name, state, stability) VALUES ('{domain}', 0, 'beta');
  5. Enable for development: UPDATE ps_feature_flag SET state=1 WHERE name='{domain}';
  6. Verify routing: visit legacy URL with flag OFF → legacy page. Enable flag → redirect to Symfony route.

Rules

Conventions (atomic commit, beta→stable lifecycle) are in Controller/CONTEXT.md. Skill-specific reminder:

  • state starts as 0 — contributors enable manually; merchants never see it until GA