From 439a21807b8f97448f98efa990bb4ee9f2bb3209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20M=C3=89LEN?= <20891897+ThibautMelen@users.noreply.github.com> Date: Fri, 10 Jul 2026 20:21:30 +0200 Subject: [PATCH 1/2] feat: add nika workflow language rule --- rules/nika-workflow-language.mdc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 rules/nika-workflow-language.mdc diff --git a/rules/nika-workflow-language.mdc b/rules/nika-workflow-language.mdc new file mode 100644 index 00000000..77f9c129 --- /dev/null +++ b/rules/nika-workflow-language.mdc @@ -0,0 +1,24 @@ +--- +description: Nika workflow language rules for AI assistance +globs: ["**/*.nika.yaml", "**/*.nika.yml"] +alwaysApply: false +--- + +# Nika Workflow Language + +Envelope: `nika: v1` (always · frozen forever). Extension: `.nika.yaml`. + +## 4 Verbs (locked forever) +- `infer:` LLM call (`prompt`, `system?`, `temperature?`, `schema?`) +- `exec:` subprocess (`command`, `cwd?`, `capture: text|structured`) +- `invoke:` builtin/MCP tool (`tool`, `args`) — HTTP fetch = `tool: nika:fetch` (a tool, not a verb) +- `agent:` multi-turn loop (`prompt`, `tools`, `max_turns`, `max_tokens_total`) + +## Authoring Discipline +- Interpolation uses `${{ vars.x }}` · `${{ tasks.id.output }}` · `${{ env.KEY }}` · `${{ with.alias }}`. +- Bindings use `with: { alias: ${{ tasks.id.output }} }` then `${{ with.alias }}`. +- Models use the combined form `provider/name` (for example `mock/echo`, `ollama/qwen3.5:4b`, `mistral/mistral-small`). +- `depends_on` is always an array: `depends_on: [task_id]`. +- Secrets come from the environment — never inline literal keys. +- After every edit, run `nika check ` and repair from diagnostics. +- Unknown code? Run `nika explain NIKA-XXXX`. From 311c522e4f814ed6f831ca7265b24773774267e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibaut=20M=C3=89LEN?= <20891897+ThibautMelen@users.noreply.github.com> Date: Fri, 10 Jul 2026 20:52:03 +0200 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20review=20findings=20=E2=80=94=20max?= =?UTF-8?q?=5Ftokens=20in=20infer=20signature,=20real=20secrets=20namespac?= =?UTF-8?q?e,=20both=20extensions=20named?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rules/nika-workflow-language.mdc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/nika-workflow-language.mdc b/rules/nika-workflow-language.mdc index 77f9c129..4b852c83 100644 --- a/rules/nika-workflow-language.mdc +++ b/rules/nika-workflow-language.mdc @@ -6,10 +6,10 @@ alwaysApply: false # Nika Workflow Language -Envelope: `nika: v1` (always · frozen forever). Extension: `.nika.yaml`. +Envelope: `nika: v1` (always · frozen forever). Extensions: `.nika.yaml` (canonical) and `.nika.yml`. ## 4 Verbs (locked forever) -- `infer:` LLM call (`prompt`, `system?`, `temperature?`, `schema?`) +- `infer:` LLM call (`prompt`, `system?`, `temperature?`, `schema?`, `max_tokens?`, `model?`) - `exec:` subprocess (`command`, `cwd?`, `capture: text|structured`) - `invoke:` builtin/MCP tool (`tool`, `args`) — HTTP fetch = `tool: nika:fetch` (a tool, not a verb) - `agent:` multi-turn loop (`prompt`, `tools`, `max_turns`, `max_tokens_total`) @@ -19,6 +19,6 @@ Envelope: `nika: v1` (always · frozen forever). Extension: `.nika.yaml`. - Bindings use `with: { alias: ${{ tasks.id.output }} }` then `${{ with.alias }}`. - Models use the combined form `provider/name` (for example `mock/echo`, `ollama/qwen3.5:4b`, `mistral/mistral-small`). - `depends_on` is always an array: `depends_on: [task_id]`. -- Secrets come from the environment — never inline literal keys. +- Secrets are declared in a top-level `secrets:` block (e.g. `source: env`, `key: MY_KEY`) and referenced as `${{ secrets.name }}` — never inline literal keys; `${{ env.* }}` is for non-sensitive configuration. - After every edit, run `nika check ` and repair from diagnostics. - Unknown code? Run `nika explain NIKA-XXXX`.