@webship.co/workspace-ai-commands 0.0.0-stage → 1.0.0-alpha1

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
@@ -1,3 +1,26 @@
1
- # Temporary Holding Version
1
+ # @webship.co/workspace-ai-commands
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The **AI Commands** workspace of the [Webship Workspace](https://github.com/webship/workspace) dashboard:
4
+ the `ai-commands/` folder (type `ai-items`), its settings file (`core/config/workspace.ai-commands.settings.yml`),
5
+ its commands and its docs, as a plugin.
6
+
7
+ ## Use it
8
+
9
+ ```bash
10
+ cd ~/workspace
11
+ bash core/scripts/plugins.sh --require github:webship/workspace-ai-commands
12
+ bash core/scripts/plugins.sh --activate ai-commands # puts `ai-commands` on the workspaces list of settings.yml
13
+ bash core/scripts/plugins.sh --install ai-commands # the folder, its settings file (once), its commands, its docs (once)
14
+ ```
15
+
16
+ The settings file and the docs are placed once and never overwritten: they hold what you put there.
17
+ `--deactivate` takes the workspace off the list; the folder and its content stay.
18
+
19
+ ## The commands
20
+
21
+ | Command |
22
+ | --- |
23
+ | `cmd-tool-backup-command.sh` |
24
+ | `cmd-tools-ai-items.sh` |
25
+
26
+ The bash functions these commands call live in the dashboard's `core/scripts/functions`.
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Bootstrap.
4
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
5
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
6
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
7
+
8
+ # Load workspace settings and extra lists.
9
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.ai-commands.settings.yml);
10
+
11
+ ARGPARSE_DESCRIPTION="Backup a command"
12
+ argparse "$@" <<ARGEOF || exit 1
13
+ parser.add_argument('PROJECT_NAME',
14
+ help='The name of the project.')
15
+ ARGEOF
16
+
17
+ shift $#;
18
+ trim_project_name ; # "v11x00b1/" -> "v11x00b1" — see functions/fun-project-name.sh
19
+
20
+ backup_workspace_item "${PROJECT_NAME}" || exit 1 ;
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Move commands between the three places they live: this workspace folder,
4
+ # the Claude Code CLI (~/.claude/commands), and the shared repository
5
+ # github.com/webship/ai-agents.
6
+
7
+ # Bootstrap.
8
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
9
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
10
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
11
+
12
+ # Load workspace settings and extra lists.
13
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.ai-commands.settings.yml);
14
+
15
+ ARGPARSE_DESCRIPTION="Show, fetch, pull, install or clone commands (workspace | ~/.claude | webship/ai-agents)"
16
+ source ${WORKSPACE_SCRIPTS}/args/arg-ai-items.sh || exit 1 ;
17
+
18
+ shift $#;
19
+
20
+ if [ "${PROPOSE}" == 'yes' ] ; then
21
+ ai_items_propose "ai-commands" "${NAME}" "${SUMMARY}" "$([ "${CONFIRM}" == 'yes' ] && echo yes || echo no)" ;
22
+ elif [ ! "${CLONE_TO}" == '_none_' ] ; then
23
+ clone_ai_item "ai-commands" "${NAME}" "${CLONE_TO}" || exit 1 ;
24
+ tailor_ai_item "ai-commands" "${CLONED_AI_ITEM}" "${CLONE_TO}" "${PURPOSE}" ;
25
+ elif [ "${LIST_REMOTE}" == 'yes' ] ; then
26
+ ai_items_list_remote "ai-commands" ;
27
+ elif [ "${FETCH}" == 'yes' ] ; then
28
+ ai_items_fetch "ai-commands" "${NAME}" claude ;
29
+ elif [ "${PULL}" == 'yes' ] ; then
30
+ if [ "${SOURCE}" == 'claude' ] ; then
31
+ ai_items_from_claude "ai-commands" "${NAME}" "${FILTER}" ;
32
+ else
33
+ ai_items_fetch "ai-commands" "${NAME}" workspace ;
34
+ fi
35
+ elif [ "${INSTALL}" == 'yes' ] ; then
36
+ install_ai_item "ai-commands" "${NAME}" "${TO}" ;
37
+ elif [ ! "${ADD}" == '_none_' ] ; then
38
+ ai_items_add "ai-commands" "${NAME}" "${ADD}" "${TO}" ;
39
+ elif [ "${UPDATE}" == 'yes' ] ; then
40
+ ai_items_update "ai-commands" "${NAME}" "${TO}" ;
41
+ elif [ "${CHECK}" == 'yes' ] ; then
42
+ ai_items_check "ai-commands" "${NAME}" "${TO}" ;
43
+ else
44
+ ai_items_status "ai-commands" ;
45
+ fi
@@ -0,0 +1,13 @@
1
+ doc:
2
+ name: ai-commands
3
+
4
+ # What this folder's projects are, and which actions their rows offer:
5
+ # sites | code | files | media | ai-items — see core/workspace-app/WORKSPACES.md.
6
+ type: ai-items
7
+
8
+ # What the assistant is called on THIS workspace's page, and what its composer says when empty.
9
+ # `default` in either means "whatever settings.yml says" — the global value, so a rename there
10
+ # still reaches this page. Set a value here to override it for this workspace alone.
11
+ assistant:
12
+ name: default
13
+ placeholder: default
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The AI Commands workspace for Webship Workspace: the `ai-commands/` folder as a plugin.
3
+ *
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
6
+ * settings file like any other. Nothing to register at run time yet: this is where the folder's own
7
+ * rail buttons, row menus or assistant context would go.
8
+ */
9
+ import type { PluginApi } from '@webship.co/workspace-plugin-api';
10
+ export declare const WORKSPACE_KEY = "ai-commands";
11
+ export declare function register(api: PluginApi): void;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * The AI Commands workspace for Webship Workspace: the `ai-commands/` folder as a plugin.
4
+ *
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
7
+ * settings file like any other. Nothing to register at run time yet: this is where the folder's own
8
+ * rail buttons, row menus or assistant context would go.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.WORKSPACE_KEY = void 0;
12
+ exports.register = register;
13
+ exports.WORKSPACE_KEY = 'ai-commands';
14
+ function register(api) {
15
+ api.addAssistantContext(() => `The ai-commands/ workspace is the AI Commands workspace (a plugin, @webship.co/workspace-ai-commands); its commands are the cmd-*.sh scripts in that folder.`);
16
+ }
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAMH,4BAEC;AAJY,QAAA,aAAa,GAAG,aAAa,CAAC;AAE3C,SAAgB,QAAQ,CAAC,GAAc;IACrC,GAAG,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,8JAA8J,CAAC,CAAC;AAChM,CAAC"}
package/docs/AGENTS.md ADDED
@@ -0,0 +1,24 @@
1
+ # Prompts
2
+
3
+ Reusable AI prompts. Run them from the dashboard or clone one to adapt; they are not
4
+ installed as slash commands, because a prompt with placeholders is meant to be filled in.
5
+
6
+ Part of the **Webship Workspace** (`~/workspace`), a DDEV-only harness. The rules in the root
7
+ `CLAUDE.md` apply here too; what follows is what is specific to this folder.
8
+
9
+ ## What an item is here
10
+
11
+ One markdown file per prompt. They are run — handed to the assistant with the placeholders still
12
+ in them, to fill in — or cloned and adapted. They are deliberately NOT installed as slash
13
+ commands: a prompt nobody has filled in is not a command.
14
+
15
+ ## Commands here
16
+
17
+ ```bash
18
+ bash cmd-tool-backup-prompt.sh # Bootstrap.
19
+ bash cmd-tool-git-change-filemode-to-false.sh # Bootstrap.
20
+ bash cmd-tool-propose-prompts.sh # Propose one prompt back to the shared repository — webship/ai-agents by default, or whatever
21
+ ```
22
+
23
+ Every one locates the workspace from its own path, so there is nothing to export and nothing to
24
+ install. `--help` on any of them lists its arguments.
package/docs/CLAUDE.md ADDED
@@ -0,0 +1,7 @@
1
+ # Prompts — workspace context
2
+
3
+ You are inside the **prompts** workspace of the Webship Workspace (`~/workspace`).
4
+
5
+ @AGENTS.md
6
+
7
+ The rules in it apply to everything under this folder, however deep.
package/docs/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # AI Commands
2
+
3
+ Claude Code **slash commands**: one `<name>.md` per command, installed into
4
+ `~/.claude/commands/` where it becomes `/<name>`.
5
+
6
+ Three places hold them, and this folder is one of them:
7
+
8
+ | Where | What it is |
9
+ |---|---|
10
+ | `~/workspace/ai-commands/` | this folder — drafts, and what you edit |
11
+ | `~/.claude/commands/` | what a Claude Code session actually loads |
12
+ | `webship/ai-agents` `.claude/commands/` | what the team has |
13
+
14
+ ## Why it is `ai-commands` and not `commands`
15
+
16
+ `~/workspace/commands` is already taken: it is the Settings view over every `cmd-*.sh` shell
17
+ script in the workspace, and it is deliberately not a registered workspace. Two different things
18
+ called "commands" in one tree would collide on the folder name, so this one is `ai-commands`.
19
+ Its label in the dashboard is **AI Commands**.
20
+
21
+ ## Use it
22
+
23
+ ```bash
24
+ bash cmd-tools-ai-items.sh # what is here, installed, and in the repo
25
+ bash cmd-tools-ai-items.sh --list-remote # what the shared repo has
26
+ bash cmd-tools-ai-items.sh review --pull # repo -> this folder, to read or edit
27
+ bash cmd-tools-ai-items.sh review --fetch # repo -> ~/.claude, usable next session
28
+ bash cmd-tools-ai-items.sh review --install # here -> ~/.claude
29
+ bash cmd-tools-ai-items.sh review --clone-to my-review --purpose "..."
30
+ bash cmd-tool-backup-command.sh review # tar it into ~/workspace/backups/
31
+ ```
32
+
33
+ Omit the name and every command is meant.
34
+
35
+ ## Commands and prompts both land in `~/.claude/commands/`
36
+
37
+ A command is a markdown spec with `$ARGUMENTS`, typed mid-session. A **prompt**
38
+ (`~/workspace/ai-prompts/`) is a whole `claude …` launch command that opens a new screen session in
39
+ a folder or project. Six names exist in both — `drupal-patch`, `explain`, `phpcs-fix`, `review`,
40
+ `say`, `test` — and installing one writes over the other. Pick the kind you want before you run
41
+ `--install`.
@@ -0,0 +1,12 @@
1
+ Feature: The AI Commands workspace plugin
2
+ Once the plugin is activated and installed, the ai-commands workspace is on the dashboard, and the
3
+ Plugins page lists the plugin with its four steps.
4
+
5
+ Scenario: The workspace page is there
6
+ Given I am on "/ai-commands"
7
+ Then I should see "AI Commands"
8
+
9
+ Scenario: The plugin is listed on the Plugins page
10
+ Given I am on "/settings/plugins"
11
+ Then I should see "AI Commands"
12
+ And I should see "@webship.co/workspace-ai-commands"
package/package.json CHANGED
@@ -1,6 +1,54 @@
1
1
  {
2
2
  "name": "@webship.co/workspace-ai-commands",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0-alpha1",
4
+ "description": "The AI Commands workspace for Webship Workspace: the `ai-commands/` folder (type ai-items), its settings file, its 2 commands and its docs, activated as a plugin.",
5
+ "main": "dist/src/index.js",
6
+ "types": "dist/src/index.d.ts",
7
+ "license": "ISC",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/webship/workspace-ai-commands.git"
11
+ },
12
+ "files": [
13
+ "dist/src",
14
+ "commands",
15
+ "config",
16
+ "docs",
17
+ "features",
18
+ "README.md"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsc -p tsconfig.json",
22
+ "prepare": "npm run build",
23
+ "test": "npm run build && node --test dist/tests/*.test.js",
24
+ "lint": "tsc -p tsconfig.json --noEmit"
25
+ },
26
+ "workspacePlugin": {
27
+ "name": "ai-commands",
28
+ "label": "AI Commands",
29
+ "workspace": {
30
+ "key": "ai-commands",
31
+ "settingsTemplate": "config/workspace.ai-commands.settings.yml",
32
+ "files": [
33
+ "commands/cmd-tool-backup-command.sh",
34
+ "commands/cmd-tools-ai-items.sh"
35
+ ],
36
+ "docs": [
37
+ "docs/AGENTS.md",
38
+ "docs/CLAUDE.md",
39
+ "docs/README.md"
40
+ ]
41
+ },
42
+ "features": [
43
+ "features/ai-commands.feature"
44
+ ]
45
+ },
46
+ "devDependencies": {
47
+ "@types/node": "^24.0.0",
48
+ "@webship.co/workspace-plugin-api": "^1.0.0-alpha1",
49
+ "typescript": "^5.9.0"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ }
54
+ }