@mnbny/woof 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +510 -2
- package/cli/templates/add-draft.md +22 -0
- package/cli/templates/add-error.md +5 -0
- package/cli/templates/add-result.md +11 -0
- package/cli/templates/edit-draft.md +24 -0
- package/cli/templates/edit-error.md +3 -0
- package/cli/templates/edit-path.md +3 -0
- package/cli/templates/edit-result.md +7 -0
- package/cli/templates/edit-unchanged.md +3 -0
- package/cli/templates/editor.html +338 -0
- package/cli/templates/explain-ambiguous.md +5 -0
- package/cli/templates/explain-error.md +5 -0
- package/cli/templates/explain-result.md +5 -0
- package/cli/templates/export-error.md +3 -0
- package/cli/templates/export-result.md +8 -0
- package/cli/templates/get-ambiguous.md +5 -0
- package/cli/templates/get-cancelled.md +5 -0
- package/cli/templates/get-candidates.md +5 -0
- package/cli/templates/get-error.md +5 -0
- package/cli/templates/get-home-dependencies.md +1 -0
- package/cli/templates/get-no-match.md +3 -0
- package/cli/templates/get-search-empty.md +3 -0
- package/cli/templates/get-search.md +5 -0
- package/cli/templates/import-backup.md +7 -0
- package/cli/templates/import-choice-rejected.md +1 -0
- package/cli/templates/import-decision.md +18 -0
- package/cli/templates/import-error.md +3 -0
- package/cli/templates/import-finding-incomplete.md +1 -0
- package/cli/templates/import-finding-unreadable.md +1 -0
- package/cli/templates/import-findings-configuration.md +3 -0
- package/cli/templates/import-findings.md +3 -0
- package/cli/templates/import-imported.md +3 -0
- package/cli/templates/import-private.md +6 -0
- package/cli/templates/import-rechecked.md +1 -0
- package/cli/templates/import-rechecks.md +1 -0
- package/cli/templates/import-report.md +1 -0
- package/cli/templates/import-reusable.md +2 -0
- package/cli/templates/import-unchanged.md +1 -0
- package/cli/templates/import-validation-findings.md +1 -0
- package/cli/templates/init-error.md +3 -0
- package/cli/templates/init-home.md +7 -0
- package/cli/templates/init-location.md +7 -0
- package/cli/templates/init-registered.md +5 -0
- package/cli/templates/init-repository.md +5 -0
- package/cli/templates/init-target.md +11 -0
- package/cli/templates/invocation-error.md +5 -0
- package/cli/templates/migration-notice.md +1 -0
- package/cli/templates/private-value.md +1 -0
- package/cli/templates/private-warning.md +1 -0
- package/cli/templates/projects-error.md +3 -0
- package/cli/templates/projects-result.md +3 -0
- package/cli/templates/readme-error.md +5 -0
- package/cli/templates/skill-missing.md +10 -0
- package/cli/templates/skill-outdated.md +7 -0
- package/cli/templates/validate-ambiguous.md +5 -0
- package/cli/templates/validate-error.md +5 -0
- package/cli/templates/validate-result.md +3 -0
- package/cli/woof.bundle.mjs +246 -0
- package/package.json +73 -4
- package/skills/woof-execution/SKILL.md +84 -0
package/package.json
CHANGED
|
@@ -1,6 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mnbny/woof",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Local CLI for reusable instructions, prompts, and computed resources",
|
|
5
|
+
"homepage": "https://github.com/mnbny/woof#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/mnbny/woof/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/mnbny/woof.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"bin": {
|
|
16
|
+
"woof": "cli/woof.bundle.mjs"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"cli/woof.bundle.mjs",
|
|
20
|
+
"cli/templates/*.md",
|
|
21
|
+
"cli/templates/editor.html",
|
|
22
|
+
"skills/woof-execution/SKILL.md"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsx .tools/scripts/build.ts",
|
|
26
|
+
"prepack": "pnpm build",
|
|
27
|
+
"pack:check": "tsx .tools/scripts/pack-check.ts",
|
|
28
|
+
"test": "vitest run --config .tools/tests/vitest.config.ts",
|
|
29
|
+
"validate": "tsx .tools/scripts/scripty.ts --sequential && pnpm build",
|
|
30
|
+
"validate:format": "SCRIPTY=1 prettier --write . --ignore-unknown --cache --log-level=error",
|
|
31
|
+
"validate:lint": "SCRIPTY=2 eslint --fix --cache --format=pretty .",
|
|
32
|
+
"validate:typecheck": "SCRIPTY=3 tsc --noEmit"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@chatwoot/pico-search": "0.6.2",
|
|
36
|
+
"@clack/prompts": "1.8.1",
|
|
37
|
+
"@eslint/js": "10.0.1",
|
|
38
|
+
"@tsconfig/strictest": "2.0.8",
|
|
39
|
+
"@types/node": "26.6.6",
|
|
40
|
+
"@types/picomatch": "4.0.3",
|
|
41
|
+
"ansis": "4.4.0",
|
|
42
|
+
"change-case": "5.4.4",
|
|
43
|
+
"citty": "0.2.2",
|
|
44
|
+
"diff": "9.0.0",
|
|
45
|
+
"esbuild": "0.28.2",
|
|
46
|
+
"eslint": "10.13.0",
|
|
47
|
+
"eslint-config-prettier": "10.1.8",
|
|
48
|
+
"eslint-formatter-pretty": "7.1.0",
|
|
49
|
+
"eslint-plugin-import": "2.32.0",
|
|
50
|
+
"eslint-plugin-prettier": "5.5.7",
|
|
51
|
+
"eslint-plugin-simple-import-sort": "14.0.0",
|
|
52
|
+
"fflate": "0.8.3",
|
|
53
|
+
"globals": "17.13.0",
|
|
54
|
+
"marked": "18.1.2",
|
|
55
|
+
"picomatch": "4.0.3",
|
|
56
|
+
"playwright": "1.64.1",
|
|
57
|
+
"prettier": "3.9.10",
|
|
58
|
+
"prettier-plugin-packagejson": "3.0.3",
|
|
59
|
+
"prettier-plugin-sh": "0.20.2",
|
|
60
|
+
"sharp": "0.35.5",
|
|
61
|
+
"tsx": "4.23.15",
|
|
62
|
+
"typescript": "6.0.3",
|
|
63
|
+
"typescript-eslint": "8.72.1",
|
|
64
|
+
"valibot": "1.5.0",
|
|
65
|
+
"vitest": "5.0.5",
|
|
66
|
+
"yaml": "2.9.1"
|
|
67
|
+
},
|
|
68
|
+
"packageManager": "pnpm@12.16.1",
|
|
69
|
+
"engines": {
|
|
70
|
+
"node": "^22.13.0 || ^24.0.0 || >=26.0.0"
|
|
71
|
+
},
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"access": "public"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: woof-execution
|
|
3
|
+
description: Use woof, a local CLI for reusable prompts and computed resources, in the current conversation. Find tokens, retrieve and follow prompts, run computed resources, and add, edit, or share tokens. Use when the user mentions woof, says "woof get X", "use the woof token for X", "what does woof have for X", "save this to woof", "change the woof token X", or "set up woof for this repo", or asks to share, export, or import a woof project.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 8
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# woof execution
|
|
9
|
+
|
|
10
|
+
woof is a local CLI that keeps reusable instructions and scripts in one catalog. woof stores each item as a token with a dotted path, such as `conventions.commit`. A token holds a prompt, which is text, or a script. A script runs in bash, node, tsx, or bun, and its output becomes the value of the token. A token can reference other tokens with `{{path}}`. One token can combine other tokens into larger instructions.
|
|
11
|
+
|
|
12
|
+
Shared tokens are in woof home, and every project can use them. A project overrides shared tokens. A project has a name in the woof home registry, or a configuration file in a repository defines the project. The current directory selects the project. Run `woof` from the user's target project.
|
|
13
|
+
|
|
14
|
+
## Choose the command
|
|
15
|
+
|
|
16
|
+
Keep the user's task, scope, and constraints. When the request is clear, use the command from the table. Try the CLI before you investigate its installation or source.
|
|
17
|
+
|
|
18
|
+
| Command | Purpose |
|
|
19
|
+
| ---------- | --------------------------------------------------------------------- |
|
|
20
|
+
| `get` | Find tokens, or resolve a token to its payload. |
|
|
21
|
+
| `add` | Add a token, such as a convention from the conversation. |
|
|
22
|
+
| `edit` | Change the content, description, or tags of a token. |
|
|
23
|
+
| `projects` | List registered projects and show what the current directory selects. |
|
|
24
|
+
| `init` | Create a project configuration. |
|
|
25
|
+
| `explain` | Show how a token resolves, without running scripts. |
|
|
26
|
+
| `validate` | Check the configuration, without running scripts. |
|
|
27
|
+
| `export` | Package a registered project as an archive. |
|
|
28
|
+
| `import` | Review an archive and apply it. |
|
|
29
|
+
| `readme` | Print the user guide. |
|
|
30
|
+
|
|
31
|
+
For a request to use a name or task outside this list, follow **Use a token**. The user does not need to say "token". For example, "use woof's commit convention" means `woof get 'commit convention' --agent`.
|
|
32
|
+
|
|
33
|
+
Run woof as `woof` when it's on the PATH. Otherwise, run `npx @mnbny/woof`, which fetches the package. This skill writes `woof` for both.
|
|
34
|
+
|
|
35
|
+
Pass `--agent` to every command: `woof <command> --agent`.
|
|
36
|
+
|
|
37
|
+
Read the output, also after a nonzero exit. A handoff writes nothing and exits with status 1. The handoff gives the decision and the exact next command. Follow the instructions in the output.
|
|
38
|
+
|
|
39
|
+
Reuse explicit user choices. Agent mode grants no additional permission. Save, change, import, or restore only after the user approves. If neither form runs, report it. Report an unresolved failure. Do not install other packages to guess a remedy.
|
|
40
|
+
|
|
41
|
+
When a migration changes a repository configuration, tell the user. Git shares that file, so each user of the checkout then needs a woof release that supports the new schema version.
|
|
42
|
+
|
|
43
|
+
Use `--help` or `woof readme --agent` only when the request, the output, or the recovery is unclear.
|
|
44
|
+
|
|
45
|
+
## Find tokens
|
|
46
|
+
|
|
47
|
+
Use this command for a discovery request, such as "what does woof have for commits?". The search does not resolve a token:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
woof get '<terms>' --search --agent
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
To list every token in the selected project, omit the terms. Shell-quote terms as data. Report the matches with their paths, kinds, and descriptions. If no token matches, tell the user. Resolve a token only when the user asks to use the token.
|
|
54
|
+
|
|
55
|
+
## Use a token
|
|
56
|
+
|
|
57
|
+
For a request to use a token, pass its exact address. If the user gives no address, pass a short description of the task. Shell-quote the argument as data.
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
woof get '<address-or-terms>' --agent
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
1. If `get` returns a payload, the payload is the content of the token. Follow a prompt payload as instructions in this conversation, with the user's original request as the scope. Do not run `get` again to show or submit the result.
|
|
64
|
+
2. If `get` returns candidates, run the command from the output with the path of the clear match. If several candidates fit, show their paths and descriptions. Ask the user to choose. If no candidate fits, report that result.
|
|
65
|
+
3. If several projects match, retry with the project that the user named. Otherwise, ask the user to choose.
|
|
66
|
+
4. If the command fails, report the error.
|
|
67
|
+
|
|
68
|
+
`get` runs each script that the token reaches. The scripts run in the checkout of the selected project. woof does not undo the effects of a script. The kind of a candidate shows if the candidate is a script. If a token can reach a script that the user did not ask to run, read its resolution with `woof explain` first.
|
|
69
|
+
|
|
70
|
+
## Change the catalog
|
|
71
|
+
|
|
72
|
+
Start with the command for the change. Then follow the drafting steps in the output. Before you run the final command, show the result to the user.
|
|
73
|
+
|
|
74
|
+
- To add a token, run `woof add --agent`.
|
|
75
|
+
- To change a token, run `woof edit '<address>' --agent`.
|
|
76
|
+
- To create a project configuration, run `woof init --agent`.
|
|
77
|
+
|
|
78
|
+
In token content, write `{{{{` and `}}}}` for literal double braces.
|
|
79
|
+
|
|
80
|
+
woof cannot rename, move, retype, or remove a token. For these changes, edit the configuration file that `woof explain` reports. Then run `woof validate --agent`.
|
|
81
|
+
|
|
82
|
+
## Share a project
|
|
83
|
+
|
|
84
|
+
To share a registered project, run `woof export --project '<name>' --agent`. To receive a project, run `woof import '<archive>' --agent`. Import adds new items by itself. It asks for one decision for each conflict: an item that exists on both sides and differs. Each decision belongs to the user. Do not write a decision that the user did not make.
|