@lukstei/wf 0.1.0

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.
@@ -0,0 +1,38 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume|clear|compact",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/dist/wf.cjs\" hook pre",
10
+ "timeout": 10
11
+ }
12
+ ]
13
+ }
14
+ ],
15
+ "UserPromptSubmit": [
16
+ {
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/dist/wf.cjs\" hook pre",
21
+ "timeout": 10
22
+ }
23
+ ]
24
+ }
25
+ ],
26
+ "Stop": [
27
+ {
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/dist/wf.cjs\" hook stop",
32
+ "timeout": 10
33
+ }
34
+ ]
35
+ }
36
+ ]
37
+ }
38
+ }
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@lukstei/wf",
3
+ "version": "0.1.0",
4
+ "description": "Deterministic skill workflow runner for AI agents",
5
+ "license": "MIT",
6
+ "author": "Lukas Steinbrecher",
7
+ "type": "module",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/lukstei/wf.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/lukstei/wf/issues"
14
+ },
15
+ "homepage": "https://github.com/lukstei/wf#readme",
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "hooks",
22
+ "skills",
23
+ "rules",
24
+ ".claude-plugin",
25
+ ".codex-plugin",
26
+ ".agents",
27
+ "AGENTS.md",
28
+ "README.md",
29
+ "plugin.json"
30
+ ],
31
+ "bin": {
32
+ "wf": "./dist/wf.cjs"
33
+ },
34
+ "scripts": {
35
+ "build": "node esbuild.config.js",
36
+ "typecheck": "tsc --noEmit",
37
+ "check": "biome check --write",
38
+ "test": "vitest run",
39
+ "test:watch": "vitest",
40
+ "test:update": "vitest run -u",
41
+ "verify": "npm run test && npm run typecheck"
42
+ },
43
+ "devDependencies": {
44
+ "@biomejs/biome": "2.5.14",
45
+ "@types/node": "^22.20.3",
46
+ "esbuild": "^0.28.2",
47
+ "typescript": "^7.0.2",
48
+ "vitest": "^3.0.0"
49
+ },
50
+ "dependencies": {
51
+ "mdast-util-from-markdown": "^2.0.3"
52
+ },
53
+ "allowScripts": {
54
+ "esbuild@0.28.2": true,
55
+ "fsevents@2.3.3": true
56
+ }
57
+ }
package/plugin.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "wf",
3
+ "description": "Deterministic skill workflow runner for AI agents"
4
+ }
@@ -0,0 +1,34 @@
1
+ # Workflow Runner (`wf`) Guidelines
2
+
3
+ These rules govern agent behavior whenever the `wf` plugin or an active workflow is present.
4
+
5
+ ---
6
+
7
+ ## 1. Strict Step-by-Step Execution
8
+
9
+ - **Execute Only the Active Step:** When a step instruction is injected into context, execute that specific step and nothing else.
10
+ - **Never Jump Ahead:** Do not anticipate or execute subsequent steps, future phases, or follow-on actions ahead of time.
11
+ - **Conclude Immediately:** Stop and complete your response as soon as the current step's task is finished. The workflow engine will automatically inject the next step.
12
+
13
+ ## 2. Never Read Raw Workflow Files
14
+
15
+ - **Ban on Reading Workflow Files:** Do not use `view_file`, `grep_search`, `read_url_content`, or shell commands to view raw workflow files (`.md` / `.json`) or plugin `SKILL.md` definitions during execution.
16
+ - **Why:** The workflow runner already compiles, tracks, and injects each step with its relevant context into your prompt. Reading raw workflow files clutters the context window, duplicates state, and leads to hallucinated out-of-order execution.
17
+
18
+ ## 3. Condition Step Decision Format
19
+
20
+ - **Evaluation:** When injected with a condition evaluation step, evaluate whether the stated condition is true or false using appropriate read-only inspection tools if necessary.
21
+ - **Strict Decision Token:** Always end your response with strictly either `[DECISION: YES]` or `[DECISION: NO]`.
22
+ - **Placement:** The decision token must appear at the very end of your response so the runner can deterministically parse the branch choice and advance the workflow.
23
+
24
+ ## 4. Workflow Runner Commands
25
+
26
+ Users and agents interact with workflows via slash commands:
27
+
28
+ | Command | Description |
29
+ | :--- | :--- |
30
+ | `/wf <workflow-file>` | Start and run a workflow from a Markdown (`.md`) or JSON (`.json`) file. |
31
+ | `/wf-show [<workflow-file>]` | Display workflow status, Mermaid diagram, and current position (or visualize a file). |
32
+ | `/wf-next` | Advance and execute the next step when a workflow is paused. |
33
+ | `/wf-stop` | Abort and reset the currently active or paused workflow. |
34
+ | `/wf-help` | Display usage instructions and supported runner commands. |
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: wf
3
+ description: Run a workflow from a Markdown or JSON file (/wf <workflow-file>)
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ The wf command starts a workflow and will be intercepted by the workflow runner hook.
8
+
9
+ Usage:
10
+ /wf <workflow-file> - Run a workflow from a Markdown (.md) or JSON (.json) file.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: wf-help
3
+ description: Show workflow runner commands and usage guide
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ The wf-help command will be intercepted by the workflow runner hook.
8
+
9
+ Usage:
10
+ /wf-help - Display available workflow runner commands.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: wf-next
3
+ description: Execute the next step in a paused workflow
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ The wf-next command will be intercepted by the workflow runner hook.
8
+
9
+ Usage:
10
+ /wf-next - Advance and execute the next step of a paused workflow.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: wf-show
3
+ description: Visualize workflow status, diagram, and current position (/wf-show [<workflow-file>])
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ The wf-show command visualizes a workflow and will be intercepted by the workflow runner hook.
8
+
9
+ Usage:
10
+ /wf-show - Show current workflow status, diagram, and active step.
11
+ /wf-show <workflow-file> - Visualize a specific workflow from a Markdown (.md) or JSON (.json) file.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: wf-stop
3
+ description: Stop and reset the active workflow
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ The wf-stop command will be intercepted by the workflow runner hook.
8
+
9
+ Usage:
10
+ /wf-stop - Stop and reset the currently active or paused workflow.