Migrate the inner workings of Surge into AI Best Practices
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3584903. -->
Reported by: [webchick](https://www.drupal.org/user/24967)
Related to !17
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p><a href="https://www.drupal.org/project/surge">https://www.drupal.org/project/surge</a> is another project in the same vein. We have both expressed a desire to combine forces. Let's make a plan. :D</p>
<p>After further discussion, it seems better to bring the relevant inner workings of Surge directly into AI Best Practices instead of keeping the functionality split across projects. This will make it easier to ship an installable module, collect feedback in one place, improve the developer experience, and iterate faster on the default setup.</p>
<p>Surge contains useful orchestration and developer tooling that can help here, including the foundations around setup, AGENTS.md generation, Skills discovery and installation, and the glue needed to tie those parts together in a coherent workflow. This issue is to track the migration of those internals into this module.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>N/A. This is a task issue to track implementation work.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Migrate the parts of Surge that fit the vision of AI Best Practices into this module, with an emphasis on the internal plumbing and orchestration rather than preserving Surge as a separate dependency.</p>
<p>Scope for this issue:</p>
<p>- Move the core Surge internals that help provide a complete, installable experience.<br>
- Bring over the code needed for AGENTS.md generation and related environment detection/composition.<br>
- Bring over the code needed for Skills discovery, validation, aggregation, and installation.<br>
- Move relevant configuration and install/update behavior into module-owned code and defaults.<br>
- Refactor naming, structure, and boundaries where needed so the functionality feels native to AI Best Practices.<br>
- Create follow-up issues for pieces that should be improved, trimmed back, remove, or potentially extracted again later.</p>
<p>The goal is not a perfect final architecture in one step. The goal is to get the working pieces into this project so we can iterate in one place, gather feedback, and then refine the boundaries based on real usage.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>- Migrate Surge and it's tests<br>
- Update documentation for local development and expected generated assets<br>
- Create child issues for any larger sub-areas that need focused implementation work.</p>
<p><strong>AI-Generated: Yes (Used Cursor to migrate the workings of Surge, and additionally it was used for the actual development back in the days).<br>
</strong></p>
issue