name: coach-repo-bootstrap description: >- Interview a user and scaffold a personalized git-based repo where an LLM acts as their ongoing strength-and-conditioning coach, with all state kept in files rather than the model's context. Use this whenever someone wants to set up a workout or training tracker, a personal-coach or AI-fitness-log repo, an RPE-autoregulated strength program, or any long-running per-session tracking system an agent maintains across sessions — even if they never say "skill," "scaffold," or "repo," and even if they only describe the outcome ("I want an AI to plan and log my workouts and handle the progression for me").
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Drupal\MYMODULE\Plugin\Block; | |
| use Drupal\Core\Block\Attribute\Block; | |
| use Drupal\Core\Block\BlockBase; | |
| use Drupal\Core\Config\TypedConfigManagerInterface; | |
| use Drupal\Core\Form\FormStateInterface; | |
| use Drupal\Core\Plugin\ContainerFactoryPluginInterface; | |
| use Drupal\Core\StringTranslation\TranslatableMarkup; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| declare(strict_types=1); | |
| namespace Drupal\mymodule\StackMiddleware; | |
| use Symfony\Component\HttpFoundation\InputBag; | |
| use Symfony\Component\HttpFoundation\Request; | |
| use Symfony\Component\HttpFoundation\Response; | |
| use Symfony\Component\HttpKernel\HttpKernelInterface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Drush\Commands\DrushCommands; | |
| /** | |
| * @file | |
| * Reset module hook_post_update_NAME | |
| * | |
| * A tool for developing and debugging post_update hooks. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat hello.php | terminus remote:wp ${SITE}.${ENV} -- eval-file - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Drupal\Tests\humanstxt\Functional; | |
| use Drupal\Tests\BrowserTestBase; | |
| use Drupal\Core\Url; | |
| /** | |
| * Tests basic functionality of configured humans.txt files. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "rules": [ | |
| { | |
| "description": "change home key to command + left_arrow", | |
| "manipulators": [ | |
| { | |
| "from": { | |
| "key_code": "home" | |
| }, | |
| "to": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // chaining with .entity. | |
| $query = \Drupal::entityQuery('node'); | |
| $articles_by_name = $query->condition('type', 'article') | |
| ->condition('uid.entity.name', 'admin') | |
| ->execute(); | |
| //Equal/>=/<=/etc (3rd parameter) | |
| // Find particular nodes published in the last year. | |
| $query = \Drupal::entityQuery('node'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Implements hook_form_alter(). | |
| */ | |
| function MYMODULE_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { | |
| $view_names = array('my_view_name'); | |
| $view = $form_state->getStorage('view'); | |
| if ($form_id == 'views_exposed_form' && in_array($view['view']->id(), $view_names)) { | |
| // Do some shilzzle. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function THEMENAME_theme_suggestions_block_alter(array &$suggestions, array $variables) { | |
| if (isset($variables['elements']['content']['#block_content'])) { | |
| $suggestions[] = 'block__' . $variables['elements']['content']['#block_content']->bundle(); | |
| } | |
| } |
NewerOlder