Add archify-vscode-ext skill: Archify diagrams and models for the Archify Diagram Viewer extension
Model tasks (validate, list, scaffold, resolve), diagram tasks (validate, render), the bundled Archify 3.0.1 runtime and yaml parser under scripts/vendor, references for authoring, formats and folders, and the online-shop example model.
This commit is contained in:
commit
b6b5e57922
226 files changed
+67520
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
validate:
|
||||
desc: 'Validate one diagram -- --file="<diagram.archify>" [--quality=standard|showcase]'
|
||||
cmds:
|
||||
- |
|
||||
./.scripts/diagram/api/diagram--validate.sh {{ .CLI_ARGS }}
|
||||
silent: true
|
||||
|
||||
render:
|
||||
desc: 'Render one diagram to HTML -- --file="<diagram.archify>" --out="<file.html>" [--quality=standard|showcase]'
|
||||
cmds:
|
||||
- |
|
||||
./.scripts/diagram/api/diagram--render.sh {{ .CLI_ARGS }}
|
||||
silent: true
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/diagram/lib/--index.sh
|
||||
|
||||
_diagram__diagram__render "$@"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/diagram/lib/--index.sh
|
||||
|
||||
_diagram__diagram__validate "$@"
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# CLI-only module: all input comes from flags. No environment variables are read.
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# CLI-only module: nothing to validate.
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/diagram/lib/-node--run.sh
|
||||
. ./.scripts/diagram/lib/-diagram--validate.sh
|
||||
. ./.scripts/diagram/lib/-diagram--render.sh
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
. ./.scripts/loggers/lib/--index.sh
|
||||
#
|
||||
# --> passed parameters are read & exported environment variables
|
||||
#
|
||||
. ./.scripts/diagram/lib/--env-vars-reader.sh
|
||||
#
|
||||
# --> required environment variables are validated for existence
|
||||
#
|
||||
. ./.scripts/diagram/lib/--env-vars-validator.sh
|
||||
#
|
||||
# --> available functions are imported/exported
|
||||
#
|
||||
. ./.scripts/diagram/lib/--index-api.sh
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Runs the "diagram-render" action of the Node CLI. Flags are forwarded unchanged.
|
||||
_diagram__diagram__render() {
|
||||
_diagram__node__run --action diagram-render "$@"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Runs the "diagram-validate" action of the Node CLI. Flags are forwarded unchanged.
|
||||
_diagram__diagram__validate() {
|
||||
_diagram__node__run --action diagram-validate "$@"
|
||||
}
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Runs the Node action dispatcher (YAML to stdout, exit code = success).
|
||||
_diagram__node__run() {
|
||||
node ./src/cli/commands.mjs "$@"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
export LOGGER_IS_ENABLED_INFO="${LOGGER_IS_ENABLED_INFO:-true}"
|
||||
export LOGGER_IS_ENABLED_ERROR="${LOGGER_IS_ENABLED_ERROR:-true}"
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/loggers/lib/-info.sh
|
||||
. ./.scripts/loggers/lib/-error.sh
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/loggers/lib/--env-vars-reader.sh
|
||||
. ./.scripts/loggers/lib/--index-api.sh
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
_loggers_error() {
|
||||
if [ "${LOGGER_IS_ENABLED_ERROR}" = true ]; then
|
||||
printf '# ERROR # %s\n' "$*" >&2
|
||||
fi
|
||||
}
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Logs go to stderr; stdout is reserved for the YAML result.
|
||||
_loggers_info() {
|
||||
if [ "${LOGGER_IS_ENABLED_INFO}" = true ]; then
|
||||
printf '# INFO # %s\n' "$*" >&2
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
validate:
|
||||
desc: 'Validate a whole model -- --dir="<model folder or any file inside>" [--quality=standard|showcase]'
|
||||
cmds:
|
||||
- |
|
||||
./.scripts/model/api/model--validate.sh {{ .CLI_ARGS }}
|
||||
silent: true
|
||||
|
||||
list:
|
||||
desc: 'What the model page shows -- --dir="<model folder or any file inside>"'
|
||||
cmds:
|
||||
- |
|
||||
./.scripts/model/api/model--list.sh {{ .CLI_ARGS }}
|
||||
silent: true
|
||||
|
||||
scaffold:
|
||||
desc: 'Create a model -- --dir="<folder>" --id="<id>" --name="<name>" [--description="<text>"] [--c4]'
|
||||
cmds:
|
||||
- |
|
||||
./.scripts/model/api/model--scaffold.sh {{ .CLI_ARGS }}
|
||||
silent: true
|
||||
|
||||
resolve:
|
||||
desc: 'Resolved Archify JSON of one diagram -- --file="<diagram.archify>" [--out="<file.json>"]'
|
||||
cmds:
|
||||
- |
|
||||
./.scripts/model/api/model--resolve.sh {{ .CLI_ARGS }}
|
||||
silent: true
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/model/lib/--index.sh
|
||||
|
||||
_model__model__list "$@"
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/model/lib/--index.sh
|
||||
|
||||
_model__model__resolve "$@"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/model/lib/--index.sh
|
||||
|
||||
_model__model__scaffold "$@"
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/model/lib/--index.sh
|
||||
|
||||
_model__model__validate "$@"
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# CLI-only module: all input comes from flags. No environment variables are read.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# CLI-only module: nothing to validate.
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/model/lib/-node--run.sh
|
||||
. ./.scripts/model/lib/-model--validate.sh
|
||||
. ./.scripts/model/lib/-model--list.sh
|
||||
. ./.scripts/model/lib/-model--scaffold.sh
|
||||
. ./.scripts/model/lib/-model--resolve.sh
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
. ./.scripts/loggers/lib/--index.sh
|
||||
#
|
||||
# --> passed parameters are read & exported environment variables
|
||||
#
|
||||
. ./.scripts/model/lib/--env-vars-reader.sh
|
||||
#
|
||||
# --> required environment variables are validated for existence
|
||||
#
|
||||
. ./.scripts/model/lib/--env-vars-validator.sh
|
||||
#
|
||||
# --> available functions are imported/exported
|
||||
#
|
||||
. ./.scripts/model/lib/--index-api.sh
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Runs the "model-list" action of the Node CLI. Flags are forwarded unchanged.
|
||||
_model__model__list() {
|
||||
_model__node__run --action model-list "$@"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Runs the "model-resolve" action of the Node CLI. Flags are forwarded unchanged.
|
||||
_model__model__resolve() {
|
||||
_model__node__run --action model-resolve "$@"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Runs the "model-scaffold" action of the Node CLI. Flags are forwarded unchanged.
|
||||
_model__model__scaffold() {
|
||||
_model__node__run --action model-scaffold "$@"
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Runs the "model-validate" action of the Node CLI. Flags are forwarded unchanged.
|
||||
_model__model__validate() {
|
||||
_model__node__run --action model-validate "$@"
|
||||
}
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Runs the Node action dispatcher (YAML to stdout, exit code = success).
|
||||
_model__node__run() {
|
||||
node ./src/cli/commands.mjs "$@"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
sync:
|
||||
desc: 'Refresh vendor/archify and vendor/yaml from local checkouts -- [<archify-checkout>] [--yaml-src <path>]'
|
||||
cmds:
|
||||
- |
|
||||
./.scripts/runtime/api/archify--sync.sh {{ .CLI_ARGS }}
|
||||
silent: true
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/runtime/lib/--index.sh
|
||||
|
||||
_runtime__archify__sync "$@"
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# CLI-only module: all input comes from flags. No environment variables are read.
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# CLI-only module: nothing to validate.
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/runtime/lib/-archify--sync.sh
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
. ./.scripts/loggers/lib/--index.sh
|
||||
. ./.scripts/runtime/lib/--env-vars-reader.sh
|
||||
. ./.scripts/runtime/lib/--env-vars-validator.sh
|
||||
. ./.scripts/runtime/lib/--index-api.sh
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Refreshes vendor/archify and vendor/yaml from local checkouts.
|
||||
# Flags: [<archify-checkout>] [--yaml-src <node_modules/yaml>]; see src/tools/sync-archify.mjs.
|
||||
_runtime__archify__sync() {
|
||||
_loggers_info "Syncing the Archify runtime into vendor/"
|
||||
node ./src/tools/sync-archify.mjs "$@"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: "3"
|
||||
|
||||
tasks:
|
||||
run:
|
||||
desc: "Run the skill's own checks against examples/online-shop and a scaffolded model"
|
||||
cmds:
|
||||
- |
|
||||
./.scripts/suite/api/tests--run.sh {{ .CLI_ARGS }}
|
||||
silent: true
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/suite/lib/--index.sh
|
||||
|
||||
_suite__tests__run "$@"
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# CLI-only module: all input comes from flags. No environment variables are read.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# CLI-only module: nothing to validate.
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
. ./.scripts/suite/lib/-tests--run.sh
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
. ./.scripts/loggers/lib/--index.sh
|
||||
. ./.scripts/suite/lib/--env-vars-reader.sh
|
||||
. ./.scripts/suite/lib/--env-vars-validator.sh
|
||||
. ./.scripts/suite/lib/--index-api.sh
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# -------------------------------------------------------------------------------------
|
||||
# archify-vscode-ext Agent Skill (MIT)
|
||||
# -------------------------------------------------------------------------------------
|
||||
|
||||
# Runs every task against examples/online-shop and a scaffolded temp model.
|
||||
_suite__tests__run() {
|
||||
node ./src/test/run.mjs "$@"
|
||||
}
|
||||
Reference in new issue
Block a user