@webship.co/workspace-drupal-themes 1.0.2 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,13 +9,30 @@ its commands and its docs, as a plugin.
9
9
  ```bash
10
10
  cd ~/workspace
11
11
  bash core/scripts/plugins.sh --require github:webship/workspace-drupal-themes
12
- bash core/scripts/plugins.sh --activate drupal-themes # puts `themes` on the workspaces list of settings.yml
12
+ bash core/scripts/plugins.sh --activate drupal-themes --with-needs # puts `themes` on the workspaces list of settings.yml
13
13
  bash core/scripts/plugins.sh --install drupal-themes # the folder, its settings file (once), its commands, its docs (once)
14
14
  ```
15
15
 
16
16
  The settings file and the docs are placed once and never overwritten: they hold what you put there.
17
17
  `--deactivate` takes the workspace off the list; the folder and its content stay.
18
18
 
19
+ ## What it goes with
20
+
21
+ The AI items land in the four AI folders, so the manifest needs them (`needs`): `ai-agents`, `ai-skills`, `ai-commands`, `ai-prompts`. `--activate drupal-themes` and `--install drupal-themes` stop while one is missing and name it; with `--with-needs` they are required, activated and installed first. One of its commands, `cmd-tools-update-all.sh`, still runs `composer` on the machine instead of in a project's container, so the manifest names it as a command a part of the plugin uses (`suggests.commands`): `bash core/scripts/plugins.sh --check drupal-themes` says whether it is there (https://getcomposer.org/download/), and nothing is installed for you. Everything else here runs through the container tool the workspace already needs.
22
+
23
+ ## The AI items
24
+
25
+ The plugin carries its own AI items (`ai/` in the package, the manifest's `ai` block), written for the work this folder is for. `--install` places each one in the workspace folder of its kind, when that folder is an active workspace folder; `--uninstall` removes them, and keeps one that was edited in its folder.
26
+
27
+ | Item | Kind | Lands in | What it is for |
28
+ | --- | --- | --- | --- |
29
+ | `themes-maintainer` | Agent | `ai-agents/themes-maintainer.md` | Works on a Drupal theme in `themes/` and brings it to green before a push: its checks, its pipeline on this machine, a backup; knows which commands still run on the host and never runs one unasked |
30
+ | `themes-workflow` | Skill | `ai-skills/themes-workflow/` | How work is done in `themes/`: see what is declared, check, run the pipeline locally, push when green; every command with its flags, the ones that run on the host, the settings keys |
31
+ | `/themes-check` | Command | `ai-commands/themes-check.md` | `/themes-check <theme> [checks]`: prints the plan, runs the declared checks and says what is red and why |
32
+ | `themes-green-gate` | Prompt | `ai-prompts/themes-green-gate.md` | A new session that runs a theme's checks and its pipeline on this machine and reports green or red |
33
+
34
+ From its folder an item is installed into the AI CLI (Claude Code by default) like any other: the folder's page on the dashboard, or `bash cmd-tools-ai-items.sh <name> --install` in the AI folder (`--to dev/<project>` for one project). A prompt is not installed: the New screen form lists it as the start of a new session. The body of every item is plain Markdown any AI CLI can follow; Claude Code is the default shape (the frontmatter, the launch line of a prompt). Every command, flag, settings key and path an item names is checked by `tests/items.test.ts`; the shape of the items is the one of the reference, [`docs/plugin-items-pattern.md` of the WordPress plugin](https://github.com/webship/workspace-wordpress/blob/1.0.x/docs/plugin-items-pattern.md).
35
+
19
36
  ## The commands
20
37
 
21
38
  | Command |
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: themes-maintainer
3
+ description: Use this agent to work on a Drupal theme in the `themes/` folder of the Webship Workspace and bring it to green before a push: its code-quality checks with `cmd-tools-checks.sh` (lint of JS, CSS and Twig, spelling), its GitLab CI pipeline on this machine with `cmd-tools-gitlab-ci-local.sh`, a backup with `cmd-backup-theme.sh`. It knows which commands of the folder still run `composer` and `sudo` on the host and never runs one unasked. Invoke for "run the checks of this theme", "run the theme's pipeline locally before I push", "why is stylelint red", "build this contrib theme to look at it", or "back up this theme".
4
+ model: fable
5
+ tools:
6
+ - Bash
7
+ - Read
8
+ - Write
9
+ - Edit
10
+ - Glob
11
+ - Grep
12
+ ---
13
+
14
+ # themes-maintainer
15
+
16
+ You work on the themes of `~/workspace/themes`, the Themes folder of a Webship Workspace: a container-based
17
+ workspace (DDEV by default). Themes are Drupal contrib and private themes, checked out to work on, and the try-out builds of the themes the folder's settings file lists. Everything goes through the `cmd-*.sh` commands of the folder, which come with the Themes plugin
18
+ (`@webship.co/workspace-drupal-themes`). Run them from the folder:
19
+
20
+ ```bash
21
+ cd ~/workspace/themes
22
+ ```
23
+
24
+ Read a command before quoting a flag: `bash <command> --help` is always safe.
25
+
26
+ ## What an item is here
27
+
28
+ One theme, one folder: `~/workspace/themes/<name>`. A theme you work on is a git checkout of its
29
+ project. A theme built by the folder's own commands is a small Drupal site with that theme in it.
30
+
31
+ ```bash
32
+ ls -d */ # what is in the folder
33
+ git -C mytheme status -sb # a checkout: its branch, and what is not committed
34
+ ```
35
+
36
+ ## What an item declares, and whether it holds
37
+
38
+ ```bash
39
+ bash cmd-tools-checks.sh mytheme --list # every check, the script it runs, where it would run: runs nothing
40
+ bash cmd-tools-checks.sh mytheme # every declared check; one failure does not hide the rest
41
+ bash cmd-tools-checks.sh mytheme --only js,css # some of them: format, js, css, yaml, spelling, types, php, twig, e2e
42
+ bash cmd-tools-checks.sh mytheme --skip spelling
43
+ bash cmd-tools-checks.sh mytheme --fail-fast # stop at the first red one
44
+ ```
45
+
46
+ `--install` installs the package's dependencies first when they are missing; it is off by default
47
+ because an install runs the package's own scripts.
48
+
49
+ ## The pipeline, on this machine, before a push
50
+
51
+ ```bash
52
+ bash cmd-tools-gitlab-ci-local.sh mytheme --doctor # the runner, the container engine, the access the templates need
53
+ bash cmd-tools-gitlab-ci-local.sh mytheme --list # the jobs and their stages
54
+ bash cmd-tools-gitlab-ci-local.sh mytheme # the whole pipeline
55
+ bash cmd-tools-gitlab-ci-local.sh mytheme phpcs # one job, by its name
56
+ bash cmd-tools-gitlab-ci-local.sh mytheme --slim # the item's own .gitlab-ci-local.yml: the subset that runs locally
57
+ bash cmd-tools-gitlab-ci-local.sh mytheme --variable DRUPAL_CORE=11.4.0
58
+ ```
59
+
60
+ It ends with GREEN or RED. Green means every job that ran passed: a job that cannot run on this
61
+ machine is not a pass, and is gated on the remote pipeline.
62
+
63
+ ## A backup, a removal, the housekeeping
64
+
65
+ ```bash
66
+ bash cmd-backup-theme.sh mytheme # the folder as an archive, and the database of a built theme, into backups/themes/
67
+ bash cmd-tools-remove.sh mytheme # containers, volumes and folder together: only when asked
68
+ bash cmd-tools-reclaim.sh # what could be freed: a dry run unless --apply
69
+ ```
70
+
71
+ ## The try-out builds: on the host, so never unasked
72
+
73
+ The folder can build a small Drupal site per theme, to look at a contrib theme. These commands
74
+ take the theme's name as their only argument, or none at all, and have no `--help`: an argument
75
+ they do not know is taken as a name. Read them, do not try them.
76
+
77
+ | Command | What it does |
78
+ | --- | --- |
79
+ | `cmd-build-drupal-template.sh` | Removes the template project with `sudo` and creates it again with `composer` on the host; the name is `drupal.template_drupal_theme_name` |
80
+ | `cmd-build-theme.sh`, `cmd-build-admin-theme.sh` | Copies the template project to `themes/<name>` and requires the theme with `composer` on the host |
81
+ | `cmd-install-theme.sh`, `cmd-install-admin-theme.sh` | Installs the site of a built theme and makes the theme the default one, or the administration one |
82
+ | `cmd-all-front-end-build-themes.sh`, `cmd-all-back-end-build-themes.sh` | **Deletes** every theme on the `themes` list, or the `admin_themes` list, with `sudo`, builds the template and then each theme |
83
+ | `cmd-all-front-end-install-themes.sh`, `cmd-all-back-end-install-themes.sh` | Changes owners with `sudo`, then installs every theme on the list |
84
+ | `cmd-tools-update-all.sh` | `composer update` on the host in every folder |
85
+
86
+ When somebody asks to look at a contrib theme, the container way is a site of a sites folder
87
+ with the theme required and enabled in that site's container; say so, and run one of the
88
+ commands above only when it is asked for by name.
89
+
90
+ ## Rules
91
+
92
+ - **The build and install-all commands still run on the host.** `cmd-build-drupal-template.sh`,
93
+ `cmd-build-theme.sh`, `cmd-build-admin-theme.sh`, the four `cmd-all-…-themes.sh` and
94
+ `cmd-tools-update-all.sh` call `composer` on the host, and several call `sudo` to remove folders
95
+ and change owners: they are not yet moved into containers. Never run one unasked; say what it
96
+ would do, and offer the container way: a site of a sites folder, with the theme required and
97
+ enabled in that site's container.
98
+ - **The two build-all commands delete first**: every theme on the list, with `sudo`. Work in a
99
+ theme folder that is not pushed is lost.
100
+ - **A theme checked out here is somebody's work.** Work on a branch; back it up before a risky
101
+ change (`bash cmd-backup-theme.sh <name>`); `bash cmd-tools-remove.sh` only when asked.
102
+ - **Green before a push.** The checks the theme declares, then its pipeline on this machine.
103
+ - The workspace is container-based (DDEV by default): never `composer`, `drush`, `php` or `npm` on
104
+ the host for a theme you work on.
105
+ - **Never restart the dashboard** or anything shared to make your own work go through.
106
+ - Say what you ran and what it printed. If a command fails, show the line that failed; do not
107
+ retry with other flags until something passes.
108
+
109
+ ## What comes with you
110
+
111
+ The Themes plugin places these beside this one, each in the workspace folder of its kind: the skill `themes-workflow` (`ai-skills/`), the command `/themes-check` (`ai-commands/`) and the prompt `themes-green-gate` (`ai-prompts/`).
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: Run the code-quality checks a theme of the themes/ folder of the Webship Workspace declares, and say what is red and why, before anything is pushed.
3
+ argument-hint: '<theme> [checks, comma separated]'
4
+ ---
5
+
6
+ # /themes-check
7
+
8
+ Check the theme of `~/workspace/themes` named in: `$ARGUMENTS`
9
+
10
+ The arguments are the text typed after the command: the first word is the theme (its folder
11
+ name in `themes/`), and a second word is a comma separated list of checks to run instead of all of
12
+ them (`format`, `js`, `css`, `yaml`, `spelling`, `types`, `php`, `twig`, `e2e`). With no theme,
13
+ stop and ask for one: `ls ~/workspace/themes` lists the candidates. The workspace is container-based
14
+ (DDEV by default); nothing is installed on the host for a check.
15
+
16
+ ## 1. The plan
17
+
18
+ ```bash
19
+ cd ~/workspace/themes
20
+ bash cmd-tools-checks.sh <theme> --list
21
+ ```
22
+
23
+ It prints every check, the script the package declares for it and where it would run, and runs
24
+ nothing. A check that is "not declared" is not a failure: say which are declared.
25
+
26
+ ## 2. Run
27
+
28
+ ```bash
29
+ bash cmd-tools-checks.sh <theme>
30
+ bash cmd-tools-checks.sh <theme> --only <checks>
31
+ ```
32
+
33
+ Use the second form when checks were named. If the plan says the dependencies are not installed,
34
+ say so and ask before adding `--install`: an install runs the package's own scripts.
35
+
36
+ ## 3. Report
37
+
38
+ For each check: passed, failed or not declared; for a failed one the first lines of what it
39
+ printed and the file it points at. Do not fix anything unasked, and never skip a check to make
40
+ the run pass. For the pipeline (`cmd-tools-gitlab-ci-local.sh`), hand over to the `themes-maintainer` agent; the
41
+ `themes-workflow` skill lists every command of the folder.
@@ -0,0 +1,27 @@
1
+ Bring a Drupal theme to green before a push: the checks it declares, then its pipeline on this machine.
2
+
3
+ The launch line is for Claude Code, the default; the text between the triple quotes can be given to another AI CLI as it is.
4
+
5
+ ```
6
+ claude --permission-mode bypassPermissions """
7
+ Bring the theme <theme> of the themes folder to green before it is pushed
8
+ # ~/workspace/themes/<theme> · a git checkout · container-based (DDEV by default)
9
+ # nothing is pushed, merged, reset, deleted or built in this session
10
+ # the build and install-all commands of the folder run composer and sudo on the host: do not run them
11
+
12
+ 1. git -C <theme> status -sb
13
+ tell me the branch and what is not committed
14
+ 2. bash cmd-tools-checks.sh <theme> --list
15
+ tell me which checks the theme declares
16
+ 3. bash cmd-tools-checks.sh <theme>
17
+ every declared check; tell me which are red, with the first lines of each
18
+ 4. bash cmd-tools-gitlab-ci-local.sh <theme> --doctor
19
+ stop and tell me if the runner or the container engine is missing
20
+ 5. bash cmd-tools-gitlab-ci-local.sh <theme>
21
+ if the whole pipeline cannot run here, say why and run: bash cmd-tools-gitlab-ci-local.sh <theme> --slim
22
+
23
+ Report: the checks (passed, failed, not declared), the pipeline (GREEN or RED, which jobs ran,
24
+ which could not run here). A red job is a result: do not hide it, do not allow it to fail.
25
+ Then ask me whether to fix what is red.
26
+ """
27
+ ```
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: themes-workflow
3
+ description: How work is done in the `themes/` folder of the Webship Workspace — what a theme is there (a git checkout to work on, or a try-out build), how its code-quality checks and its GitLab CI pipeline are run before a push, how it is backed up, which commands of the folder still run `composer` and `sudo` on the host and are never run unasked, with the flags of each command and the settings keys of the folder. Use when asked to "run the checks of this theme", "run the pipeline locally", "build this theme", "which themes does the folder list", or when a command of `themes/` is about to be run.
4
+ argument-hint: '[what you are about to do in themes]'
5
+ ---
6
+
7
+ # themes-workflow
8
+
9
+ `~/workspace/themes` is the Themes folder of a Webship Workspace (container-based, DDEV by default).
10
+ Themes are Drupal contrib and private themes, checked out to work on, and the try-out builds of the themes the folder's settings file lists. It comes with the Themes plugin (`@webship.co/workspace-drupal-themes`), which places the commands below in the folder. Every command finds the workspace from its own path; run it from the folder, and read `bash <command> --help` before quoting a flag.
11
+
12
+ ## The order of work
13
+
14
+ 1. **See what the theme declares**: `bash cmd-tools-checks.sh mytheme --list`. It runs nothing.
15
+ 2. **Work on a branch** of the checkout, `~/workspace/themes/mytheme`.
16
+ 3. **Run the checks**: `bash cmd-tools-checks.sh mytheme`, or some with `--only`.
17
+ 4. **Run the pipeline on this machine**: `bash cmd-tools-gitlab-ci-local.sh mytheme --doctor`
18
+ once, then `bash cmd-tools-gitlab-ci-local.sh mytheme` (or `--slim`).
19
+ 5. **Push when it is green**, and gate on the remote pipeline what could not run here.
20
+
21
+ The build and install-all commands are not part of this order: they run on the host.
22
+
23
+ ## Commands
24
+
25
+ | Command | What it does | Flags |
26
+ | --- | --- | --- |
27
+ | `cmd-all-back-end-build-themes.sh` | **On the host.** The same for the `admin_themes` list | none |
28
+ | `cmd-all-back-end-install-themes.sh` | **On the host.** The same for the `admin_themes` list | none |
29
+ | `cmd-all-front-end-build-themes.sh` | **On the host.** Deletes every theme on the `themes` list with `sudo`, then builds the template and each theme | none |
30
+ | `cmd-all-front-end-install-themes.sh` | **On the host.** Changes owners with `sudo`, then installs every theme on the `themes` list | none |
31
+ | `cmd-backup-theme.sh` | The folder of a theme as an archive, and the database of a built theme as a dump, into `backups/themes/`: `<theme>` | none |
32
+ | `cmd-build-admin-theme.sh` | **On the host.** The same for an administration theme: `<theme>` | none |
33
+ | `cmd-build-drupal-template.sh` | **On the host.** Removes the template project with `sudo` and creates it again with `composer` | none |
34
+ | `cmd-build-theme.sh` | **On the host.** Copies the template project to `themes/<name>` and requires the theme with `composer`: `<theme>` | none |
35
+ | `cmd-install-admin-theme.sh` | Installs the site of a built theme and makes the theme the administration one: `<theme>` | none |
36
+ | `cmd-install-theme.sh` | Installs the site of a built theme and makes the theme the default one: `<theme>` | none |
37
+ | `cmd-tools-checks.sh` | Runs the code-quality checks an item's `package.json` declares; `--list` prints the plan and runs nothing | `--browser` `--e2e` `--fail-fast` `--install` `--list` `--only` `--runner` `--skip` |
38
+ | `cmd-tools-gitlab-ci-local.sh` | Runs an item's GitLab CI pipeline on this machine, before a push | `--doctor` `--list` `--slim` `--variable` |
39
+ | `cmd-tools-reclaim.sh` | Disk held by projects whose folder is gone: a dry run unless `--apply` | `--apply` `--keep-days` `--list-protected` `--only` |
40
+ | `cmd-tools-remove.sh` | Containers, volumes and folder together; refuses work that is on no remote unless `--force` | `--force` `--orphans` |
41
+ | `cmd-tools-update-all.sh` | **On the host.** `composer update` in every folder. Do not run it unasked | none |
42
+
43
+ ## Settings
44
+
45
+ | Key | File | What it says |
46
+ | --- | --- | --- |
47
+ | `doc.name` | `core/config/workspace.themes.settings.yml` | The folder under the workspace root: `themes` |
48
+ | `type` | `core/config/workspace.themes.settings.yml` | `code`: the rows of the page are packages and repositories, with the Build, Backup, Remove and Checks actions |
49
+ | `composer` | `core/config/workspace.themes.settings.yml` | `manifest`: the COMPOSER menu only adds to `composer.json` here, and never installs |
50
+ | `themes` | `core/config/workspace.themes.settings.yml` | The front-end themes the build-all and install-all commands go through, by project name |
51
+ | `admin_themes` | `core/config/workspace.themes.settings.yml` | The administration themes, for the back-end commands |
52
+ | `drupal.template_drupal_theme_name` | `core/config/workspace.themes.settings.yml` | The name of the template project the builds are copied from; the commands refuse to run when it is empty |
53
+ | `assistant.name`, `assistant.placeholder` | `core/config/workspace.themes.settings.yml` | What the assistant is called on this page; `default` takes the workspace's |
54
+ | `workspaces` | `core/config/settings.yml` | The active folders; `themes` is on it once the plugin is activated |
55
+
56
+ ## Rules
57
+
58
+ - **The build and install-all commands still run on the host.** `cmd-build-drupal-template.sh`,
59
+ `cmd-build-theme.sh`, `cmd-build-admin-theme.sh`, the four `cmd-all-…-themes.sh` and
60
+ `cmd-tools-update-all.sh` call `composer` on the host, and several call `sudo` to remove folders
61
+ and change owners: they are not yet moved into containers. Never run one unasked; say what it
62
+ would do, and offer the container way: a site of a sites folder, with the theme required and
63
+ enabled in that site's container.
64
+ - **The two build-all commands delete first**: every theme on the list, with `sudo`. Work in a
65
+ theme folder that is not pushed is lost.
66
+ - **A theme checked out here is somebody's work.** Work on a branch; back it up before a risky
67
+ change (`bash cmd-backup-theme.sh <name>`); `bash cmd-tools-remove.sh` only when asked.
68
+ - **Green before a push.** The checks the theme declares, then its pipeline on this machine.
69
+ - The workspace is container-based (DDEV by default): never `composer`, `drush`, `php` or `npm` on
70
+ the host for a theme you work on.
71
+
72
+ The Themes plugin places these beside this one, each in the workspace folder of its kind: the agent `themes-maintainer` (`ai-agents/`), the command `/themes-check` (`ai-commands/`) and the prompt `themes-green-gate` (`ai-prompts/`).
@@ -2,10 +2,15 @@
2
2
  * The Drupal themes workspace for Webship Workspace: the `themes/` folder as a plugin.
3
3
  *
4
4
  * What the package carries is placed by the installer from the manifest (the folder's settings file,
5
- * its commands and its docs) and listed by --activate; the dashboard draws the workspace from the
5
+ * its commands, its docs and its AI items, each in the folder of its kind) and listed by --activate; the dashboard draws the workspace from the
6
6
  * settings file like any other. Nothing to register at run time yet: this is where the folder's own
7
7
  * rail buttons, row menus or assistant context would go.
8
8
  */
9
9
  import type { PluginApi } from '@webship.co/workspace-plugin-api';
10
10
  export declare const WORKSPACE_KEY = "themes";
11
+ /** The AI items the installer places, each in the workspace folder of its kind (ai/ in this package). */
12
+ export declare const AGENTS: string[];
13
+ export declare const SKILLS: string[];
14
+ export declare const AI_COMMANDS: string[];
15
+ export declare const PROMPTS: string[];
11
16
  export declare function register(api: PluginApi): void;
package/dist/src/index.js CHANGED
@@ -3,15 +3,20 @@
3
3
  * The Drupal themes workspace for Webship Workspace: the `themes/` folder as a plugin.
4
4
  *
5
5
  * What the package carries is placed by the installer from the manifest (the folder's settings file,
6
- * its commands and its docs) and listed by --activate; the dashboard draws the workspace from the
6
+ * its commands, its docs and its AI items, each in the folder of its kind) and listed by --activate; the dashboard draws the workspace from the
7
7
  * settings file like any other. Nothing to register at run time yet: this is where the folder's own
8
8
  * rail buttons, row menus or assistant context would go.
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.WORKSPACE_KEY = void 0;
11
+ exports.PROMPTS = exports.AI_COMMANDS = exports.SKILLS = exports.AGENTS = exports.WORKSPACE_KEY = void 0;
12
12
  exports.register = register;
13
13
  exports.WORKSPACE_KEY = 'themes';
14
+ /** The AI items the installer places, each in the workspace folder of its kind (ai/ in this package). */
15
+ exports.AGENTS = ['themes-maintainer'];
16
+ exports.SKILLS = ['themes-workflow'];
17
+ exports.AI_COMMANDS = ['themes-check'];
18
+ exports.PROMPTS = ['themes-green-gate'];
14
19
  function register(api) {
15
- api.addAssistantContext(() => `The themes/ workspace is the Drupal themes workspace (a plugin, @webship.co/workspace-drupal-themes); its commands are the cmd-*.sh scripts in that folder.`);
20
+ api.addAssistantContext(() => `The themes/ workspace is the Drupal themes workspace (a plugin, @webship.co/workspace-drupal-themes); its commands are the cmd-*.sh scripts in that folder. It comes with AI items for work in this folder: the agent \`themes-maintainer\` (ai-agents/), the skill \`themes-workflow\` (ai-skills/), the command \`/themes-check\` (ai-commands/) and the prompt \`themes-green-gate\` (ai-prompts/).`);
16
21
  }
17
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAMH,4BAEC;AAJY,QAAA,aAAa,GAAG,QAAQ,CAAC;AAEtC,SAAgB,QAAQ,CAAC,GAAc;IACrC,GAAG,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,6JAA6J,CAAC,CAAC;AAC/L,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAYH,4BAEC;AAVY,QAAA,aAAa,GAAG,QAAQ,CAAC;AAEtC,yGAAyG;AAC5F,QAAA,MAAM,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAC/B,QAAA,MAAM,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAC7B,QAAA,WAAW,GAAG,CAAC,cAAc,CAAC,CAAC;AAC/B,QAAA,OAAO,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAE7C,SAAgB,QAAQ,CAAC,GAAc;IACrC,GAAG,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,wYAAwY,CAAC,CAAC;AAC1a,CAAC"}
package/docs/AGENTS.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Contrib and private themes, checked out to work on.
4
4
 
5
- Part of the **Webship Workspace** (`~/workspace`), a DDEV-only harness. The rules in the root
5
+ Part of the **Webship Workspace** (`~/workspace`), a container-based harness (DDEV by default). The rules in the root
6
6
  `CLAUDE.md` apply here too; what follows is what is specific to this folder.
7
7
 
8
8
  ## The rule that matters here
@@ -41,3 +41,13 @@ bash cmd-tools-update-all.sh # Find the workspace tooli
41
41
 
42
42
  Every one locates the workspace from its own path, so there is nothing to export and nothing to
43
43
  install. `--help` on any of them lists its arguments.
44
+
45
+ ## AI items for this folder
46
+
47
+ The plugin of this folder (`@webship.co/workspace-drupal-themes`) places its own AI items in the AI folders of the
48
+ workspace, when they are active:
49
+
50
+ - `themes-maintainer` (`ai-agents/`): Works on a Drupal theme in `themes/` and brings it to green before a push: its checks, its pipeline on this machine, a backup; knows which commands still run on the host and never runs one unasked
51
+ - `themes-workflow` (`ai-skills/`): How work is done in `themes/`: see what is declared, check, run the pipeline locally, push when green; every command with its flags, the ones that run on the host, the settings keys
52
+ - `/themes-check` (`ai-commands/`): `/themes-check <theme> [checks]`: prints the plan, runs the declared checks and says what is red and why
53
+ - `themes-green-gate` (`ai-prompts/`): A new session that runs a theme's checks and its pipeline on this machine and reports green or red
@@ -11,3 +11,19 @@ Feature: The Drupal themes workspace plugin
11
11
  Given I am on "/settings/plugins"
12
12
  Then I should see "Drupal themes"
13
13
  And I should see "@webship.co/workspace-drupal-themes"
14
+
15
+ Scenario: The AI Agents folder lists the agent the plugin ships
16
+ Given I am on "/ai-agents"
17
+ Then I should see "themes-maintainer"
18
+
19
+ Scenario: The AI Skills folder lists the skill the plugin ships
20
+ Given I am on "/ai-skills"
21
+ Then I should see "themes-workflow"
22
+
23
+ Scenario: The AI Commands folder lists the command the plugin ships
24
+ Given I am on "/ai-commands"
25
+ Then I should see "themes-check"
26
+
27
+ Scenario: The AI Prompts folder lists the prompt the plugin ships
28
+ Given I am on "/ai-prompts"
29
+ Then I should see "themes-green-gate"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@webship.co/workspace-drupal-themes",
3
- "version": "1.0.2",
4
- "description": "The Drupal themes workspace for Webship Workspace: the `themes/` folder (type code), its settings file, its 15 commands and its docs, activated as a plugin.",
3
+ "version": "1.0.9",
4
+ "description": "The Drupal themes workspace for Webship Workspace: the `themes/` folder (type code), its settings file, its 15 commands, its docs and its AI items (an agent, a skill, a command and a prompt, each in the folder of its kind), activated as a plugin.",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "license": "ISC",
@@ -11,6 +11,7 @@
11
11
  },
12
12
  "files": [
13
13
  "dist/src",
14
+ "ai",
14
15
  "commands",
15
16
  "config",
16
17
  "docs",
@@ -26,6 +27,20 @@
26
27
  "workspacePlugin": {
27
28
  "name": "drupal-themes",
28
29
  "label": "Drupal themes",
30
+ "needs": [
31
+ "ai-agents",
32
+ "ai-skills",
33
+ "ai-commands",
34
+ "ai-prompts"
35
+ ],
36
+ "suggests": {
37
+ "commands": [
38
+ {
39
+ "command": "composer",
40
+ "hint": "https://getcomposer.org/download/"
41
+ }
42
+ ]
43
+ },
29
44
  "workspace": {
30
45
  "key": "themes",
31
46
  "settingsTemplate": "config/workspace.themes.settings.yml",
@@ -52,6 +67,20 @@
52
67
  "docs/README.md"
53
68
  ]
54
69
  },
70
+ "ai": {
71
+ "agents": [
72
+ "ai/agents/themes-maintainer.md"
73
+ ],
74
+ "skills": [
75
+ "ai/skills/themes-workflow"
76
+ ],
77
+ "commands": [
78
+ "ai/commands/themes-check.md"
79
+ ],
80
+ "prompts": [
81
+ "ai/prompts/themes-green-gate.md"
82
+ ]
83
+ },
55
84
  "features": [
56
85
  "features/drupal-themes.feature"
57
86
  ]