@lovrozagar/grunt 0.3.9 β 0.3.10
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/.agents/skills/commit/SKILL.md +3 -3
- package/.agents/skills/commit-and-push/SKILL.md +3 -9
- package/.agents/skills/commit-push/SKILL.md +46 -0
- package/.agents/skills/commit-push-deploy/SKILL.md +59 -0
- package/.agents/skills/commit-push-release/SKILL.md +62 -0
- package/.claude/skills/commit/SKILL.md +3 -3
- package/.claude/skills/commit-and-push/SKILL.md +3 -9
- package/.claude/skills/commit-push/SKILL.md +46 -0
- package/.claude/skills/commit-push-deploy/SKILL.md +59 -0
- package/.claude/skills/commit-push-release/SKILL.md +62 -0
- package/.grok/skills/commit/SKILL.md +3 -3
- package/.grok/skills/commit-and-push/SKILL.md +3 -9
- package/.grok/skills/commit-push/SKILL.md +46 -0
- package/.grok/skills/commit-push-deploy/SKILL.md +59 -0
- package/.grok/skills/commit-push-release/SKILL.md +62 -0
- package/.rulesync/reference/map.md +3 -3
- package/.rulesync/skills/commit/SKILL.md +3 -3
- package/.rulesync/skills/commit-and-push/SKILL.md +4 -9
- package/.rulesync/skills/commit-push/SKILL.md +47 -0
- package/.rulesync/skills/commit-push-deploy/SKILL.md +60 -0
- package/.rulesync/skills/commit-push-release/SKILL.md +63 -0
- package/README.md +311 -52
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
name: commit
|
|
3
3
|
description: >
|
|
4
4
|
Inspect the diff and commit with a Conventional Commits subject line. Use for
|
|
5
|
-
/commit, "commit this", "commit these changes". Never
|
|
5
|
+
/commit, "commit this", "commit these changes". Never git push.
|
|
6
6
|
---
|
|
7
|
-
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
7
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
8
8
|
|
|
9
9
|
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
10
10
|
|
|
@@ -16,6 +16,6 @@ Subject: imperative lowercase no trailing period.
|
|
|
16
16
|
|
|
17
17
|
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
18
18
|
|
|
19
|
-
Never `git push`.
|
|
19
|
+
Never git push. Never `git push`. This skill never pushes.
|
|
20
20
|
|
|
21
21
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: commit-and-push
|
|
3
3
|
description: >
|
|
4
|
-
Commit
|
|
5
|
-
|
|
4
|
+
Commit and push. Use for /commit-and-push, "commit and push", "commit this and
|
|
5
|
+
push". Must push.
|
|
6
6
|
---
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
If on default branch, create/switch to a feature branch first β never push default directly.
|
|
10
|
-
|
|
11
|
-
Push upstream; if no upstream `git push -u origin <current-branch>`.
|
|
12
|
-
|
|
13
|
-
Never force-push.
|
|
7
|
+
Use `.rulesync/skills/commit-push/SKILL.md`. Must push. Do not load /commit.
|
|
14
8
|
|
|
15
9
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push
|
|
3
|
+
description: >
|
|
4
|
+
Commit with a Conventional Commits subject, then push. Use for /commit-push,
|
|
5
|
+
"commit and push", "commit this and push". Must push. Never force-push.
|
|
6
|
+
---
|
|
7
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
8
|
+
|
|
9
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
10
|
+
|
|
11
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
12
|
+
|
|
13
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
14
|
+
|
|
15
|
+
Subject: imperative lowercase no trailing period.
|
|
16
|
+
|
|
17
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
18
|
+
|
|
19
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
20
|
+
|
|
21
|
+
## Branch
|
|
22
|
+
|
|
23
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
24
|
+
|
|
25
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
26
|
+
|
|
27
|
+
Recent (frozen flags; do not change):
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
git reflog -n 30
|
|
31
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
35
|
+
|
|
36
|
+
| state | action |
|
|
37
|
+
| current β default | push current |
|
|
38
|
+
| default AND 0 recent | push default |
|
|
39
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
40
|
+
| else | ask; do not push yet |
|
|
41
|
+
|
|
42
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
43
|
+
|
|
44
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
45
|
+
|
|
46
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push-deploy
|
|
3
|
+
description: >
|
|
4
|
+
Commit, push, then deploy only if allowlisted infra already exists. Use for
|
|
5
|
+
/commit-push-deploy, "commit push deploy", "deploy this". Must push. Never
|
|
6
|
+
force-push. Never invent infra.
|
|
7
|
+
---
|
|
8
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
9
|
+
|
|
10
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
11
|
+
|
|
12
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
13
|
+
|
|
14
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
15
|
+
|
|
16
|
+
Subject: imperative lowercase no trailing period.
|
|
17
|
+
|
|
18
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
19
|
+
|
|
20
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
21
|
+
|
|
22
|
+
## Branch
|
|
23
|
+
|
|
24
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
25
|
+
|
|
26
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
27
|
+
|
|
28
|
+
Recent (frozen flags; do not change):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
git reflog -n 30
|
|
32
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
36
|
+
|
|
37
|
+
| state | action |
|
|
38
|
+
| current β default | push current |
|
|
39
|
+
| default AND 0 recent | push default |
|
|
40
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
41
|
+
| else | ask; do not push yet |
|
|
42
|
+
|
|
43
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
44
|
+
|
|
45
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
46
|
+
|
|
47
|
+
## Deploy
|
|
48
|
+
|
|
49
|
+
After push. Detect **existing** repo-root (or listed) paths only β never create them:
|
|
50
|
+
|
|
51
|
+
`fly.toml` `vercel.json` `netlify.toml` `wrangler.toml` `wrangler.jsonc` `railway.toml` `railway.json` `render.yaml` `render.yml` `app.yaml` `Dockerfile` `docker-compose.yml` `docker-compose.yaml` `samconfig.toml` `serverless.yml` `serverless.yaml` `Pulumi.yaml` `terraform/` `.do/app.yaml`
|
|
52
|
+
|
|
53
|
+
This repo (`package.json` `name` `@lovrozagar/grunt`): skip deploy. Stop after push.
|
|
54
|
+
|
|
55
|
+
No allowlist hit: skip. Never invent infra, hosts, workflows, or config.
|
|
56
|
+
|
|
57
|
+
Hit: run only a deploy command already documented in-repo (scripts/CI/README). Do not guess a provider. Do not add files.
|
|
58
|
+
|
|
59
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push-release
|
|
3
|
+
description: >
|
|
4
|
+
Commit, push, bump package.json, tag vX.Y.Z, push the tag. CI publishes. Use
|
|
5
|
+
for /commit-push-release, "commit push release", "release". Must push. Never
|
|
6
|
+
force-push. No npm/gh publish.
|
|
7
|
+
---
|
|
8
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
9
|
+
|
|
10
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
11
|
+
|
|
12
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
13
|
+
|
|
14
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
15
|
+
|
|
16
|
+
Subject: imperative lowercase no trailing period.
|
|
17
|
+
|
|
18
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
19
|
+
|
|
20
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
21
|
+
|
|
22
|
+
## Branch
|
|
23
|
+
|
|
24
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
25
|
+
|
|
26
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
27
|
+
|
|
28
|
+
Recent (frozen flags; do not change):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
git reflog -n 30
|
|
32
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
36
|
+
|
|
37
|
+
| state | action |
|
|
38
|
+
| current β default | push current |
|
|
39
|
+
| default AND 0 recent | push default |
|
|
40
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
41
|
+
| else | ask; do not push yet |
|
|
42
|
+
|
|
43
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
44
|
+
|
|
45
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
46
|
+
|
|
47
|
+
## Release
|
|
48
|
+
|
|
49
|
+
Ask if off default, or patch/minor/major is unclear. Do not guess semver. Do not tag until answered.
|
|
50
|
+
|
|
51
|
+
On default + clear bump:
|
|
52
|
+
|
|
53
|
+
1. Set `package.json` `version` to `X.Y.Z` (keep lockfile in sync if it records version).
|
|
54
|
+
2. Commit the bump with the same subject rules (`chore(release): vX.Y.Z` unless the user gave a subject).
|
|
55
|
+
3. Push the branch per **Branch**.
|
|
56
|
+
4. `git tag vX.Y.Z` then `git push origin vX.Y.Z`.
|
|
57
|
+
|
|
58
|
+
Do not `npm publish`. Do not `npm pack` as publish. Do not `gh release create`. CI publishes from the tag.
|
|
59
|
+
|
|
60
|
+
Retag only if asked. Unprompted: never `git tag -f`, never delete a tag, never force-push a tag. If asked to retag: move that tag only; still never force-push a branch.
|
|
61
|
+
|
|
62
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
name: commit
|
|
3
3
|
description: >
|
|
4
4
|
Inspect the diff and commit with a Conventional Commits subject line. Use for
|
|
5
|
-
/commit, "commit this", "commit these changes". Never
|
|
5
|
+
/commit, "commit this", "commit these changes". Never git push.
|
|
6
6
|
---
|
|
7
|
-
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
7
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
8
8
|
|
|
9
9
|
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
10
10
|
|
|
@@ -16,6 +16,6 @@ Subject: imperative lowercase no trailing period.
|
|
|
16
16
|
|
|
17
17
|
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
18
18
|
|
|
19
|
-
Never `git push`.
|
|
19
|
+
Never git push. Never `git push`. This skill never pushes.
|
|
20
20
|
|
|
21
21
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: commit-and-push
|
|
3
3
|
description: >
|
|
4
|
-
Commit
|
|
5
|
-
|
|
4
|
+
Commit and push. Use for /commit-and-push, "commit and push", "commit this and
|
|
5
|
+
push". Must push.
|
|
6
6
|
---
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
If on default branch, create/switch to a feature branch first β never push default directly.
|
|
10
|
-
|
|
11
|
-
Push upstream; if no upstream `git push -u origin <current-branch>`.
|
|
12
|
-
|
|
13
|
-
Never force-push.
|
|
7
|
+
Use `.rulesync/skills/commit-push/SKILL.md`. Must push. Do not load /commit.
|
|
14
8
|
|
|
15
9
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push
|
|
3
|
+
description: >
|
|
4
|
+
Commit with a Conventional Commits subject, then push. Use for /commit-push,
|
|
5
|
+
"commit and push", "commit this and push". Must push. Never force-push.
|
|
6
|
+
---
|
|
7
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
8
|
+
|
|
9
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
10
|
+
|
|
11
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
12
|
+
|
|
13
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
14
|
+
|
|
15
|
+
Subject: imperative lowercase no trailing period.
|
|
16
|
+
|
|
17
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
18
|
+
|
|
19
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
20
|
+
|
|
21
|
+
## Branch
|
|
22
|
+
|
|
23
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
24
|
+
|
|
25
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
26
|
+
|
|
27
|
+
Recent (frozen flags; do not change):
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
git reflog -n 30
|
|
31
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
35
|
+
|
|
36
|
+
| state | action |
|
|
37
|
+
| current β default | push current |
|
|
38
|
+
| default AND 0 recent | push default |
|
|
39
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
40
|
+
| else | ask; do not push yet |
|
|
41
|
+
|
|
42
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
43
|
+
|
|
44
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
45
|
+
|
|
46
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push-deploy
|
|
3
|
+
description: >
|
|
4
|
+
Commit, push, then deploy only if allowlisted infra already exists. Use for
|
|
5
|
+
/commit-push-deploy, "commit push deploy", "deploy this". Must push. Never
|
|
6
|
+
force-push. Never invent infra.
|
|
7
|
+
---
|
|
8
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
9
|
+
|
|
10
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
11
|
+
|
|
12
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
13
|
+
|
|
14
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
15
|
+
|
|
16
|
+
Subject: imperative lowercase no trailing period.
|
|
17
|
+
|
|
18
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
19
|
+
|
|
20
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
21
|
+
|
|
22
|
+
## Branch
|
|
23
|
+
|
|
24
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
25
|
+
|
|
26
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
27
|
+
|
|
28
|
+
Recent (frozen flags; do not change):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
git reflog -n 30
|
|
32
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
36
|
+
|
|
37
|
+
| state | action |
|
|
38
|
+
| current β default | push current |
|
|
39
|
+
| default AND 0 recent | push default |
|
|
40
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
41
|
+
| else | ask; do not push yet |
|
|
42
|
+
|
|
43
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
44
|
+
|
|
45
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
46
|
+
|
|
47
|
+
## Deploy
|
|
48
|
+
|
|
49
|
+
After push. Detect **existing** repo-root (or listed) paths only β never create them:
|
|
50
|
+
|
|
51
|
+
`fly.toml` `vercel.json` `netlify.toml` `wrangler.toml` `wrangler.jsonc` `railway.toml` `railway.json` `render.yaml` `render.yml` `app.yaml` `Dockerfile` `docker-compose.yml` `docker-compose.yaml` `samconfig.toml` `serverless.yml` `serverless.yaml` `Pulumi.yaml` `terraform/` `.do/app.yaml`
|
|
52
|
+
|
|
53
|
+
This repo (`package.json` `name` `@lovrozagar/grunt`): skip deploy. Stop after push.
|
|
54
|
+
|
|
55
|
+
No allowlist hit: skip. Never invent infra, hosts, workflows, or config.
|
|
56
|
+
|
|
57
|
+
Hit: run only a deploy command already documented in-repo (scripts/CI/README). Do not guess a provider. Do not add files.
|
|
58
|
+
|
|
59
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push-release
|
|
3
|
+
description: >
|
|
4
|
+
Commit, push, bump package.json, tag vX.Y.Z, push the tag. CI publishes. Use
|
|
5
|
+
for /commit-push-release, "commit push release", "release". Must push. Never
|
|
6
|
+
force-push. No npm/gh publish.
|
|
7
|
+
---
|
|
8
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
9
|
+
|
|
10
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
11
|
+
|
|
12
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
13
|
+
|
|
14
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
15
|
+
|
|
16
|
+
Subject: imperative lowercase no trailing period.
|
|
17
|
+
|
|
18
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
19
|
+
|
|
20
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
21
|
+
|
|
22
|
+
## Branch
|
|
23
|
+
|
|
24
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
25
|
+
|
|
26
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
27
|
+
|
|
28
|
+
Recent (frozen flags; do not change):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
git reflog -n 30
|
|
32
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
36
|
+
|
|
37
|
+
| state | action |
|
|
38
|
+
| current β default | push current |
|
|
39
|
+
| default AND 0 recent | push default |
|
|
40
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
41
|
+
| else | ask; do not push yet |
|
|
42
|
+
|
|
43
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
44
|
+
|
|
45
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
46
|
+
|
|
47
|
+
## Release
|
|
48
|
+
|
|
49
|
+
Ask if off default, or patch/minor/major is unclear. Do not guess semver. Do not tag until answered.
|
|
50
|
+
|
|
51
|
+
On default + clear bump:
|
|
52
|
+
|
|
53
|
+
1. Set `package.json` `version` to `X.Y.Z` (keep lockfile in sync if it records version).
|
|
54
|
+
2. Commit the bump with the same subject rules (`chore(release): vX.Y.Z` unless the user gave a subject).
|
|
55
|
+
3. Push the branch per **Branch**.
|
|
56
|
+
4. `git tag vX.Y.Z` then `git push origin vX.Y.Z`.
|
|
57
|
+
|
|
58
|
+
Do not `npm publish`. Do not `npm pack` as publish. Do not `gh release create`. CI publishes from the tag.
|
|
59
|
+
|
|
60
|
+
Retag only if asked. Unprompted: never `git tag -f`, never delete a tag, never force-push a tag. If asked to retag: move that tag only; still never force-push a branch.
|
|
61
|
+
|
|
62
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
name: commit
|
|
3
3
|
description: >
|
|
4
4
|
Inspect the diff and commit with a Conventional Commits subject line. Use for
|
|
5
|
-
/commit, "commit this", "commit these changes". Never
|
|
5
|
+
/commit, "commit this", "commit these changes". Never git push.
|
|
6
6
|
---
|
|
7
|
-
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
7
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
8
8
|
|
|
9
9
|
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
10
10
|
|
|
@@ -16,6 +16,6 @@ Subject: imperative lowercase no trailing period.
|
|
|
16
16
|
|
|
17
17
|
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
18
18
|
|
|
19
|
-
Never `git push`.
|
|
19
|
+
Never git push. Never `git push`. This skill never pushes.
|
|
20
20
|
|
|
21
21
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: commit-and-push
|
|
3
3
|
description: >
|
|
4
|
-
Commit
|
|
5
|
-
|
|
4
|
+
Commit and push. Use for /commit-and-push, "commit and push", "commit this and
|
|
5
|
+
push". Must push.
|
|
6
6
|
---
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
If on default branch, create/switch to a feature branch first β never push default directly.
|
|
10
|
-
|
|
11
|
-
Push upstream; if no upstream `git push -u origin <current-branch>`.
|
|
12
|
-
|
|
13
|
-
Never force-push.
|
|
7
|
+
Use `.rulesync/skills/commit-push/SKILL.md`. Must push. Do not load /commit.
|
|
14
8
|
|
|
15
9
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push
|
|
3
|
+
description: >
|
|
4
|
+
Commit with a Conventional Commits subject, then push. Use for /commit-push,
|
|
5
|
+
"commit and push", "commit this and push". Must push. Never force-push.
|
|
6
|
+
---
|
|
7
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
8
|
+
|
|
9
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
10
|
+
|
|
11
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
12
|
+
|
|
13
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
14
|
+
|
|
15
|
+
Subject: imperative lowercase no trailing period.
|
|
16
|
+
|
|
17
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
18
|
+
|
|
19
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
20
|
+
|
|
21
|
+
## Branch
|
|
22
|
+
|
|
23
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
24
|
+
|
|
25
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
26
|
+
|
|
27
|
+
Recent (frozen flags; do not change):
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
git reflog -n 30
|
|
31
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
35
|
+
|
|
36
|
+
| state | action |
|
|
37
|
+
| current β default | push current |
|
|
38
|
+
| default AND 0 recent | push default |
|
|
39
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
40
|
+
| else | ask; do not push yet |
|
|
41
|
+
|
|
42
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
43
|
+
|
|
44
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
45
|
+
|
|
46
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push-deploy
|
|
3
|
+
description: >
|
|
4
|
+
Commit, push, then deploy only if allowlisted infra already exists. Use for
|
|
5
|
+
/commit-push-deploy, "commit push deploy", "deploy this". Must push. Never
|
|
6
|
+
force-push. Never invent infra.
|
|
7
|
+
---
|
|
8
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
9
|
+
|
|
10
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
11
|
+
|
|
12
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
13
|
+
|
|
14
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
15
|
+
|
|
16
|
+
Subject: imperative lowercase no trailing period.
|
|
17
|
+
|
|
18
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
19
|
+
|
|
20
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
21
|
+
|
|
22
|
+
## Branch
|
|
23
|
+
|
|
24
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
25
|
+
|
|
26
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
27
|
+
|
|
28
|
+
Recent (frozen flags; do not change):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
git reflog -n 30
|
|
32
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
36
|
+
|
|
37
|
+
| state | action |
|
|
38
|
+
| current β default | push current |
|
|
39
|
+
| default AND 0 recent | push default |
|
|
40
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
41
|
+
| else | ask; do not push yet |
|
|
42
|
+
|
|
43
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
44
|
+
|
|
45
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
46
|
+
|
|
47
|
+
## Deploy
|
|
48
|
+
|
|
49
|
+
After push. Detect **existing** repo-root (or listed) paths only β never create them:
|
|
50
|
+
|
|
51
|
+
`fly.toml` `vercel.json` `netlify.toml` `wrangler.toml` `wrangler.jsonc` `railway.toml` `railway.json` `render.yaml` `render.yml` `app.yaml` `Dockerfile` `docker-compose.yml` `docker-compose.yaml` `samconfig.toml` `serverless.yml` `serverless.yaml` `Pulumi.yaml` `terraform/` `.do/app.yaml`
|
|
52
|
+
|
|
53
|
+
This repo (`package.json` `name` `@lovrozagar/grunt`): skip deploy. Stop after push.
|
|
54
|
+
|
|
55
|
+
No allowlist hit: skip. Never invent infra, hosts, workflows, or config.
|
|
56
|
+
|
|
57
|
+
Hit: run only a deploy command already documented in-repo (scripts/CI/README). Do not guess a provider. Do not add files.
|
|
58
|
+
|
|
59
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push-release
|
|
3
|
+
description: >
|
|
4
|
+
Commit, push, bump package.json, tag vX.Y.Z, push the tag. CI publishes. Use
|
|
5
|
+
for /commit-push-release, "commit push release", "release". Must push. Never
|
|
6
|
+
force-push. No npm/gh publish.
|
|
7
|
+
---
|
|
8
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
9
|
+
|
|
10
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
11
|
+
|
|
12
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
13
|
+
|
|
14
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
15
|
+
|
|
16
|
+
Subject: imperative lowercase no trailing period.
|
|
17
|
+
|
|
18
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
19
|
+
|
|
20
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
21
|
+
|
|
22
|
+
## Branch
|
|
23
|
+
|
|
24
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
25
|
+
|
|
26
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
27
|
+
|
|
28
|
+
Recent (frozen flags; do not change):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
git reflog -n 30
|
|
32
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
36
|
+
|
|
37
|
+
| state | action |
|
|
38
|
+
| current β default | push current |
|
|
39
|
+
| default AND 0 recent | push default |
|
|
40
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
41
|
+
| else | ask; do not push yet |
|
|
42
|
+
|
|
43
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
44
|
+
|
|
45
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
46
|
+
|
|
47
|
+
## Release
|
|
48
|
+
|
|
49
|
+
Ask if off default, or patch/minor/major is unclear. Do not guess semver. Do not tag until answered.
|
|
50
|
+
|
|
51
|
+
On default + clear bump:
|
|
52
|
+
|
|
53
|
+
1. Set `package.json` `version` to `X.Y.Z` (keep lockfile in sync if it records version).
|
|
54
|
+
2. Commit the bump with the same subject rules (`chore(release): vX.Y.Z` unless the user gave a subject).
|
|
55
|
+
3. Push the branch per **Branch**.
|
|
56
|
+
4. `git tag vX.Y.Z` then `git push origin vX.Y.Z`.
|
|
57
|
+
|
|
58
|
+
Do not `npm publish`. Do not `npm pack` as publish. Do not `gh release create`. CI publishes from the tag.
|
|
59
|
+
|
|
60
|
+
Retag only if asked. Unprompted: never `git tag -f`, never delete a tag, never force-push a tag. If asked to retag: move that tag only; still never force-push a branch.
|
|
61
|
+
|
|
62
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -23,13 +23,13 @@ Cheap outline. Not a file dump.
|
|
|
23
23
|
- `.grok/hooks/orchestrate-parent.js` + `orchestrate-parent.json` β parent spawn/fat/stop/plan-write / SubagentStop intercept
|
|
24
24
|
- `.grok/hooks/rtk.json` β RTK
|
|
25
25
|
- `.grok/skills/{write-plan,implement-plan,shared}/` β hand-only (no rulesync SSOT); point to cascade, do not paste
|
|
26
|
-
- `.grok/skills/{parent,explain,handoff,solo,cascade,commit,commit-and-push}/` β generated from `.rulesync/skills/`; do not hand-edit
|
|
26
|
+
- `.grok/skills/{parent,explain,handoff,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release}/` β generated from `.rulesync/skills/`; do not hand-edit
|
|
27
27
|
- `.grok/parent.md` β 1-line pointer to orchestrator agent; not SessionStart
|
|
28
28
|
- `.grok/roles/*.toml`
|
|
29
29
|
- `.grok/global-settings.toml` β merged into `~/.grok/config.toml` by `scripts/sync-global-settings.mjs` (not auto-loaded; project config cannot set `[features]`)
|
|
30
30
|
- `.rulesync/global-settings/` β host manifest and reserved noop payloads
|
|
31
31
|
- `.rulesync/mcp-policy.jsonc` β MCP deny-default SSOT (`default: deny`, `allow: []`)
|
|
32
|
-
- `.rulesync/skills/{parent,explain,handoff,solo,cascade,commit,commit-and-push}/` β skill SSOT; `rulesync -f skills` emits `.grok/skills/`, `.claude/skills/`, `.agents/skills/` byte-equal. `/cascade` = exit solo / restore cascade (not a sticky second mode)
|
|
32
|
+
- `.rulesync/skills/{parent,explain,handoff,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release}/` β skill SSOT; `rulesync -f skills` emits `.grok/skills/`, `.claude/skills/`, `.agents/skills/` byte-equal. `/cascade` = exit solo / restore cascade (not a sticky second mode)
|
|
33
33
|
|
|
34
34
|
## Scripts
|
|
35
35
|
- `scripts/check-globals.mjs` β `$HOME/.grok/config.toml` `[agent].name==orchestrator` + `[features].two_pass_compaction==true`; project `.grok/config.toml` must not have `[features]`/`[agent]`; wired as `sync:globals:check` (also after emit-mcp in `rulesync:check`)
|
|
@@ -58,7 +58,7 @@ Cheap outline. Not a file dump.
|
|
|
58
58
|
|
|
59
59
|
## Generated (do not hand-edit; committed, not gitignored)
|
|
60
60
|
- `AGENTS.md`, `CLAUDE.md`
|
|
61
|
-
- `.claude/skills/*`, `.agents/skills/*`, `.grok/skills/{parent,explain,handoff,solo,cascade,commit,commit-and-push}/` (from `.rulesync/skills/`)
|
|
61
|
+
- `.claude/skills/*`, `.agents/skills/*`, `.grok/skills/{parent,explain,handoff,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release}/` (from `.rulesync/skills/`)
|
|
62
62
|
- `.grok/agents/*`
|
|
63
63
|
- `.claude/agents/*`
|
|
64
64
|
- `.codex/agents/*`
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
name: commit
|
|
3
3
|
description: >
|
|
4
4
|
Inspect the diff and commit with a Conventional Commits subject line. Use for
|
|
5
|
-
/commit, "commit this", "commit these changes". Never
|
|
5
|
+
/commit, "commit this", "commit these changes". Never git push.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
8
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
9
9
|
|
|
10
10
|
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
11
11
|
|
|
@@ -17,6 +17,6 @@ Subject: imperative lowercase no trailing period.
|
|
|
17
17
|
|
|
18
18
|
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
19
19
|
|
|
20
|
-
Never `git push`.
|
|
20
|
+
Never git push. Never `git push`. This skill never pushes.
|
|
21
21
|
|
|
22
22
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: commit-and-push
|
|
3
3
|
description: >
|
|
4
|
-
Commit
|
|
5
|
-
|
|
4
|
+
Commit and push. Use for /commit-and-push, "commit and push", "commit this
|
|
5
|
+
and push". Must push.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
If on default branch, create/switch to a feature branch first β never push default directly.
|
|
11
|
-
|
|
12
|
-
Push upstream; if no upstream `git push -u origin <current-branch>`.
|
|
13
|
-
|
|
14
|
-
Never force-push.
|
|
8
|
+
Use `.rulesync/skills/commit-push/SKILL.md`. Must push. Do not load /commit.
|
|
15
9
|
|
|
16
10
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
11
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push
|
|
3
|
+
description: >
|
|
4
|
+
Commit with a Conventional Commits subject, then push. Use for /commit-push,
|
|
5
|
+
"commit and push", "commit this and push". Must push. Never force-push.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
9
|
+
|
|
10
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
11
|
+
|
|
12
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
13
|
+
|
|
14
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
15
|
+
|
|
16
|
+
Subject: imperative lowercase no trailing period.
|
|
17
|
+
|
|
18
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
19
|
+
|
|
20
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
21
|
+
|
|
22
|
+
## Branch
|
|
23
|
+
|
|
24
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
25
|
+
|
|
26
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
27
|
+
|
|
28
|
+
Recent (frozen flags; do not change):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
git reflog -n 30
|
|
32
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
36
|
+
|
|
37
|
+
| state | action |
|
|
38
|
+
| current β default | push current |
|
|
39
|
+
| default AND 0 recent | push default |
|
|
40
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
41
|
+
| else | ask; do not push yet |
|
|
42
|
+
|
|
43
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
44
|
+
|
|
45
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
46
|
+
|
|
47
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push-deploy
|
|
3
|
+
description: >
|
|
4
|
+
Commit, push, then deploy only if allowlisted infra already exists. Use for
|
|
5
|
+
/commit-push-deploy, "commit push deploy", "deploy this". Must push. Never
|
|
6
|
+
force-push. Never invent infra.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
10
|
+
|
|
11
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
12
|
+
|
|
13
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
14
|
+
|
|
15
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
16
|
+
|
|
17
|
+
Subject: imperative lowercase no trailing period.
|
|
18
|
+
|
|
19
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
20
|
+
|
|
21
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
22
|
+
|
|
23
|
+
## Branch
|
|
24
|
+
|
|
25
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
26
|
+
|
|
27
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
28
|
+
|
|
29
|
+
Recent (frozen flags; do not change):
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
git reflog -n 30
|
|
33
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
37
|
+
|
|
38
|
+
| state | action |
|
|
39
|
+
| current β default | push current |
|
|
40
|
+
| default AND 0 recent | push default |
|
|
41
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
42
|
+
| else | ask; do not push yet |
|
|
43
|
+
|
|
44
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
45
|
+
|
|
46
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
47
|
+
|
|
48
|
+
## Deploy
|
|
49
|
+
|
|
50
|
+
After push. Detect **existing** repo-root (or listed) paths only β never create them:
|
|
51
|
+
|
|
52
|
+
`fly.toml` `vercel.json` `netlify.toml` `wrangler.toml` `wrangler.jsonc` `railway.toml` `railway.json` `render.yaml` `render.yml` `app.yaml` `Dockerfile` `docker-compose.yml` `docker-compose.yaml` `samconfig.toml` `serverless.yml` `serverless.yaml` `Pulumi.yaml` `terraform/` `.do/app.yaml`
|
|
53
|
+
|
|
54
|
+
This repo (`package.json` `name` `@lovrozagar/grunt`): skip deploy. Stop after push.
|
|
55
|
+
|
|
56
|
+
No allowlist hit: skip. Never invent infra, hosts, workflows, or config.
|
|
57
|
+
|
|
58
|
+
Hit: run only a deploy command already documented in-repo (scripts/CI/README). Do not guess a provider. Do not add files.
|
|
59
|
+
|
|
60
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-push-release
|
|
3
|
+
description: >
|
|
4
|
+
Commit, push, bump package.json, tag vX.Y.Z, push the tag. CI publishes. Use
|
|
5
|
+
for /commit-push-release, "commit push release", "release". Must push. Never
|
|
6
|
+
force-push. No npm/gh publish.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
10
|
+
|
|
11
|
+
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
12
|
+
|
|
13
|
+
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
14
|
+
|
|
15
|
+
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
16
|
+
|
|
17
|
+
Subject: imperative lowercase no trailing period.
|
|
18
|
+
|
|
19
|
+
NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO π€. NO trailers. No AI attribution. Work belongs to the human.
|
|
20
|
+
|
|
21
|
+
Must `git push`. Do not load /commit. Ignore never-push.
|
|
22
|
+
|
|
23
|
+
## Branch
|
|
24
|
+
|
|
25
|
+
Current: `git rev-parse --abbrev-ref HEAD`
|
|
26
|
+
|
|
27
|
+
Default: `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (strip `origin/`). If that fails: ask. Never invent default.
|
|
28
|
+
|
|
29
|
+
Recent (frozen flags; do not change):
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
git reflog -n 30
|
|
33
|
+
git for-each-ref --count=8 --sort=-committerdate --format='%(refname:short) %(committerdate:unix)' refs/heads
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Recent = unique existing non-default names from those two outputs whose `committerdate` unix is β€7d (`now - 604800`). Never invent branch names. Unknown/ambiguous names β drop them, do not guess.
|
|
37
|
+
|
|
38
|
+
| state | action |
|
|
39
|
+
| current β default | push current |
|
|
40
|
+
| default AND 0 recent | push default |
|
|
41
|
+
| default AND exactly 1 recent exists | `git checkout` that name; push it |
|
|
42
|
+
| else | ask; do not push yet |
|
|
43
|
+
|
|
44
|
+
No upstream (`git rev-parse --abbrev-ref @{upstream}` fails): `git push -u origin <branch>`. Else `git push`.
|
|
45
|
+
|
|
46
|
+
Never force-push. Never `--force`, `-f`, `--force-with-lease`, `+<branch>`.
|
|
47
|
+
|
|
48
|
+
## Release
|
|
49
|
+
|
|
50
|
+
Ask if off default, or patch/minor/major is unclear. Do not guess semver. Do not tag until answered.
|
|
51
|
+
|
|
52
|
+
On default + clear bump:
|
|
53
|
+
|
|
54
|
+
1. Set `package.json` `version` to `X.Y.Z` (keep lockfile in sync if it records version).
|
|
55
|
+
2. Commit the bump with the same subject rules (`chore(release): vX.Y.Z` unless the user gave a subject).
|
|
56
|
+
3. Push the branch per **Branch**.
|
|
57
|
+
4. `git tag vX.Y.Z` then `git push origin vX.Y.Z`.
|
|
58
|
+
|
|
59
|
+
Do not `npm publish`. Do not `npm pack` as publish. Do not `gh release create`. CI publishes from the tag.
|
|
60
|
+
|
|
61
|
+
Retag only if asked. Unprompted: never `git tag -f`, never delete a tag, never force-push a tag. If asked to retag: move that tag only; still never force-push a branch.
|
|
62
|
+
|
|
63
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
package/README.md
CHANGED
|
@@ -1,70 +1,329 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Grunt
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Multi-agent orchestrator SoT β deep-merge rulesync trees product scripts and generate pipeline into a consumer repo
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
OSS drop-in; merges existing configs; switches default provider flow to Grunt.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- [Install](#install)
|
|
8
|
+
- [Usage](#usage)
|
|
9
|
+
- [CLI](#cli)
|
|
10
|
+
- [Init](#init)
|
|
11
|
+
- [Version bump](#version-bump)
|
|
12
|
+
- [Agents](#agents)
|
|
13
|
+
- [Skills](#skills)
|
|
14
|
+
- [Generate](#generate)
|
|
15
|
+
- [Config](#config)
|
|
16
|
+
- [Architecture](#architecture)
|
|
17
|
+
- [Layout](#layout)
|
|
18
|
+
- [Develop](#develop)
|
|
19
|
+
- [Examples](#examples)
|
|
20
|
+
- [License](#license)
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
- Node.js 22+
|
|
25
|
+
- Consumer:
|
|
8
26
|
|
|
9
27
|
```
|
|
10
28
|
npm i -D @lovrozagar/grunt
|
|
11
29
|
npx @lovrozagar/grunt
|
|
12
30
|
```
|
|
13
31
|
|
|
14
|
-
|
|
32
|
+
- Same as `npx @lovrozagar/grunt init` when no command
|
|
33
|
+
- Do not `npm test` as a consumer
|
|
34
|
+
- Package: `@lovrozagar/grunt` `0.3.9` MIT Β· https://github.com/lovrozagar/grunt
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
- TTY no command β menu (init default; generate check sync-globals purge-mcps doctor help quit)
|
|
39
|
+
- Piped / CI / `--yes` / `-y` / `--non-interactive` no command β still `init`
|
|
40
|
+
- Bin: `grunt` β `./bin/grunt.js` (`type: module`)
|
|
41
|
+
|
|
42
|
+
## CLI
|
|
15
43
|
|
|
16
|
-
|
|
44
|
+
### Commands
|
|
17
45
|
|
|
18
|
-
|
|
46
|
+
- `init` β `init()` β merge SoT, `npm install`, `rulesync:generate`, `sync:globals:apply`, `rulesync:check`
|
|
47
|
+
- `generate` β `npm run rulesync:generate`
|
|
48
|
+
- `check` β `npm run rulesync:check`
|
|
49
|
+
- `sync-globals` β `npm run sync:globals` (dry-run); `--apply` β `sync:globals:apply`
|
|
50
|
+
- `purge-mcps` β `npm run purge:global-mcps` (dry-run); `--apply` β `purge:global-mcps:apply`
|
|
51
|
+
- `doctor` β `npm run rulesync:doctor`
|
|
52
|
+
- `help`
|
|
53
|
+
- `version`
|
|
19
54
|
|
|
20
|
-
|
|
55
|
+
### Flags
|
|
21
56
|
|
|
22
|
-
|
|
57
|
+
- `--skip-globals` β skip `sync:globals:apply` on init
|
|
58
|
+
- `--yes` / `-y` / `--non-interactive` β no TTY menu; default command still `init`. Not `--apply`
|
|
59
|
+
- `--apply` β write for `sync-globals` / `purge-mcps`
|
|
60
|
+
- `--host <id>` β `sync-globals --host <id>`
|
|
61
|
+
|
|
62
|
+
## Init
|
|
63
|
+
|
|
64
|
+
- Merge SoT `npm install` `rulesync:generate` `sync:globals:apply` `rulesync:check`
|
|
65
|
+
- `--skip-globals` skips apply
|
|
66
|
+
- Re-init auto-skips globals when `<!-- grunt:begin -->` in `AGENTS.md`/`CLAUDE.md` **or** `scripts/telemetry.mjs` exists
|
|
67
|
+
- First init (no sentinel no telemetry) applies globals unless flagged
|
|
68
|
+
- Owned trees/scripts refresh; extra `.rulesync` files kept; patches to grunt-owned files lost
|
|
69
|
+
|
|
70
|
+
## Version bump
|
|
23
71
|
|
|
24
72
|
```
|
|
25
73
|
npm i -D @lovrozagar/grunt@latest && npx @lovrozagar/grunt init
|
|
26
74
|
```
|
|
27
75
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
- Same re-init / globals rules as Init
|
|
77
|
+
|
|
78
|
+
## Agents
|
|
79
|
+
|
|
80
|
+
SoT: `.rulesync/subagents/{orchestrator grunt implementer thinker}.md`
|
|
81
|
+
|
|
82
|
+
Emit: `.claude/` `.grok/` `.agents/` `.gemini/`
|
|
83
|
+
|
|
84
|
+
- **orchestrator** (parent) β always spawn+prompt; user-facing only `[orchestrator]:` (or child role tag) one-line echo. `/parent` one-turn; `/handoff` writes `.tmp/grunt/handoffs/{serial}-{slug}-{stamp}.md`. Small/low router. First token spawn. No parent Read/Bash/Grep. Does not implement, plan, or fetch world facts
|
|
85
|
+
- **grunt** β tools: facts/search/exec/git/web/test/low-reason mechanical write. Isolation `verdict:`. Never feature solution. Never spawn. World fact: `job: web`
|
|
86
|
+
- **implementer** β write already-defined solution on allowlisted paths. TDD when spec/plan says tests. Validate + sim after write. Fat dumps via `need:`. Never spawn. Never plan. Id is **implementer** (not Implementor)
|
|
87
|
+
- **thinker** β plan/deep reason; edge cases. Read-only named-file Read of prompt SSOT; trees/search/exec/web/test β `need:`. Never spawn. No bash. Never implement
|
|
88
|
+
|
|
89
|
+
Children never spawn. Spawn only grunt|implementer|thinker. Omit model on spawn; frontmatter on agent files picks haiku/sonnet/opus vs grok-4.5 / grok-4.6 / other hosts. Voice: `.rulesync/reference/output.md`. Protocol: `.rulesync/reference/cascade.md`. `AGENTS.md`/`CLAUDE.md` spawn-first. `GEMINI.md` β `@AGENTS.md`. Goals: synced configs across grok build claude code codex gemini cli antigravity; max situational speed; superterse token savings; max/min reasoning by role.
|
|
90
|
+
|
|
91
|
+
## Skills
|
|
92
|
+
|
|
93
|
+
Present under `.claude` / `.rulesync` / `.agents`:
|
|
94
|
+
|
|
95
|
+
- `cascade` `commit` `commit-and-push` `commit-push` `commit-push-deploy` `commit-push-release` `explain` `handoff` `parent` `solo`
|
|
96
|
+
- Grok-only: `write-plan` `implement-plan` (`/write-plan` plan-only β `next: /implement-plan`)
|
|
97
|
+
|
|
98
|
+
## Generate
|
|
99
|
+
|
|
100
|
+
Pipeline (no `-t geminicli`):
|
|
101
|
+
|
|
102
|
+
1. `rulesync generate` β emit grok / claude / codex / antigravity
|
|
103
|
+
2. `emit-mcp-policy.mjs`
|
|
104
|
+
3. `emit-gemini.mjs` β `GEMINI.md` `.gemini/agents/{id}/agent.md` MCP `.gemini/settings.json`
|
|
105
|
+
4. `emit-agent-shell-tools` β Claude grunt body `Bash`; other hosts `run_terminal_command` (hooks-union)
|
|
106
|
+
|
|
107
|
+
`check` / `doctor` = rulesync check / doctor.
|
|
108
|
+
|
|
109
|
+
Emit writes other-CLI trees from `.rulesync` for the **next** process of that CLI. Not a live hop into another host.
|
|
110
|
+
|
|
111
|
+
## Config
|
|
112
|
+
|
|
113
|
+
- SoT merge into consumer repo; existing configs kept where not grunt-owned
|
|
114
|
+
- Globals: first init apply; re-init auto-skip (sentinel / telemetry) or `--skip-globals`
|
|
115
|
+
- `sync-globals` / `purge-mcps`: dry-run default; `--apply` writes
|
|
116
|
+
- Hosts: grok claude codex gemini antigravity
|
|
117
|
+
|
|
118
|
+
## Architecture
|
|
119
|
+
|
|
120
|
+
Protocol picture: one CLI host process, parent-only orchestrator in that session, three sibling spawn types (`grunt` | `implementer` | `thinker`), local workspace tools with RTK on Bash stdout only, one vendor Model API outside the host bubble. Not a product walkthrough. `@lovrozagar/grunt` = protocol SoT + CLI (init/generate/check); not a model runtime. Do not paste `.rulesync/reference/cascade.md` here β boxes and edges only.
|
|
121
|
+
|
|
122
|
+
### Containment
|
|
123
|
+
|
|
124
|
+
Draw **one** CLI host bubble. That bubble is **this** sessionβs CLI: Grok Build, Claude Code, Codex, Gemini CLI, or Antigravity. The CLI **is** the host β not a peer router beside another CLI. Parent lives **inside** that host session. Children spawn **inside the same process**. Other CLIs = emit/config on disk only; no runtime hop; no shared spawn/peek line.
|
|
125
|
+
|
|
126
|
+
User-visible conversation attaches only to the parent. Children never talk to the user. Children never spawn.
|
|
127
|
+
|
|
128
|
+
### Nested diagram
|
|
129
|
+
|
|
130
|
+
Same topology as the session recap; every legal edge labeled.
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
USER
|
|
134
|
+
β
|
|
135
|
+
β session in/out (parent only; tagged one-line recap)
|
|
136
|
+
β TUI local; completion tokens from Model API (mixed)
|
|
137
|
+
βΌ
|
|
138
|
+
βββββββββββββββββββββββββ CLI HOST (this process) βββββββββββββββββββββββββ
|
|
139
|
+
β TUI Β· hooks Β· emit/generate Β· RTK PreToolUse Β· fs workspace β
|
|
140
|
+
β β
|
|
141
|
+
β Parent orchestrator (only spawner; spawn-first; no parent Read/Bash) β
|
|
142
|
+
β legal spawn types: grunt | implementer | thinker β
|
|
143
|
+
β omit model on spawn; FM on agent files picks haiku/sonnet/opus β
|
|
144
|
+
β vs grok-4.5 / grok-4.6 / etc. β
|
|
145
|
+
β β
|
|
146
|
+
β spawn / peek / resume_from β
|
|
147
|
+
β β β
|
|
148
|
+
β βΌ β
|
|
149
|
+
β siblings (never spawn; no childβchild) β
|
|
150
|
+
β βββββββββββββ¬ββββββββββββββββ¬βββββββββββββββ β
|
|
151
|
+
β β grunt β implementer β thinker β β
|
|
152
|
+
β β facts/ β specified β plan/deep β β
|
|
153
|
+
β β tools β writes + TDD β reason β β
|
|
154
|
+
β β Bash+fs β Write/Bash/ β Read / need: β β
|
|
155
|
+
β β web/test β fs β no Bash β β
|
|
156
|
+
β βββββββ¬ββββββ΄ββββββββ¬ββββββββ΄ββββββββ¬βββββββ β
|
|
157
|
+
β β β β β
|
|
158
|
+
β βββββββββ tool call βββββββββββ β
|
|
159
|
+
β β β
|
|
160
|
+
β βΌ β
|
|
161
|
+
β host tools (same process) β
|
|
162
|
+
β fs: Read / Grep / Glob / Write β
|
|
163
|
+
β Bash / run_terminal_command β
|
|
164
|
+
β β β
|
|
165
|
+
β βββRTK (PreToolUse; Bash/shell stdout only)βββΊ compress β
|
|
166
|
+
β β
|
|
167
|
+
β local (not Model API): β
|
|
168
|
+
β spawn_subagent / Agent Β· peek β
|
|
169
|
+
β workspace tools Β· RTK β
|
|
170
|
+
β scrub-spawn-prompt Β· parse-need Β· grunt-job β
|
|
171
|
+
β emit / generate β
|
|
172
|
+
β β
|
|
173
|
+
β WebSearch / web_fetch = remote-not-LLM (not a second model) β
|
|
174
|
+
β MCP = denied in-tree; do not draw as a main path β
|
|
175
|
+
β β
|
|
176
|
+
β parent + children ββcompletionββββββββββββββββββββββββββββββ β
|
|
177
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββ
|
|
178
|
+
β
|
|
179
|
+
βΌ
|
|
180
|
+
Model API
|
|
181
|
+
(this hostβs SDK
|
|
182
|
+
only; one box)
|
|
183
|
+
..
|
|
184
|
+
emit/config
|
|
185
|
+
(no runtime line)
|
|
186
|
+
..
|
|
187
|
+
other CLIs
|
|
188
|
+
Gemini spawn/peek
|
|
189
|
+
= GAP
|
|
190
|
+
(no fake peeks)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### `need:` / `resume_from`
|
|
194
|
+
|
|
195
|
+
Implementer or thinker that still needs a fat dump **stops** on a `need:` JSON line. Parent fans those jobs as **parallel grunt** siblings, then one `resume_from` with **new** `verdict:` blobs only. Max **3** `resume_from` per child id. Thinker has no Bash; facts go through this loop. Grunt does not emit `need:` for its own tool use.
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
implementer | thinker
|
|
199
|
+
β
|
|
200
|
+
β stop on JSON only (β€4 jobs/batch)
|
|
201
|
+
βΌ
|
|
202
|
+
need: [{"job":"search|exec|web|test","query":"..."}]
|
|
203
|
+
β
|
|
204
|
+
β parent parse-need (or SubagentStop intercept
|
|
205
|
+
β when every job is search|exec)
|
|
206
|
+
βΌ
|
|
207
|
+
parallel grunt spawns (same host; not a new CLI)
|
|
208
|
+
β
|
|
209
|
+
β isolation
|
|
210
|
+
βΌ
|
|
211
|
+
verdict: ok|fail|empty
|
|
212
|
+
β
|
|
213
|
+
β one resume_from:<child id> + new verdicts only
|
|
214
|
+
β do not re-send original task; max 3
|
|
215
|
+
βΌ
|
|
216
|
+
same child continues (transcript already on resume_from)
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Node table
|
|
220
|
+
|
|
221
|
+
| node | inside host? | local vs AI-server | notes |
|
|
222
|
+
| --- | --- | --- | --- |
|
|
223
|
+
| User | no | mixed | Speaks only to parent session. Never a child edge. |
|
|
224
|
+
| Session in/out / TUI | yes | mixed | TUI is local; recap tokens come from the model. Legal `[role]:` one-line echo only. |
|
|
225
|
+
| CLI host process | yes (is the box) | local process | Grok Build / Claude Code / Codex / Gemini / Antigravity. Not a peer of another CLI. |
|
|
226
|
+
| Parent orchestrator | yes | AI-server **turn** | Spawn-first low router. No parent Read/Bash/Grep. Lives in this session, not a sidecar. |
|
|
227
|
+
| `grunt` sibling | yes | AI-server **turn** | Facts/tools/mechanical write. Never spawn. Never feature solution. |
|
|
228
|
+
| `implementer` sibling | yes | AI-server **turn** | Specified writes + TDD when tests are in the spec. Agent id is **implementer**. Never spawn. |
|
|
229
|
+
| `thinker` sibling | yes | AI-server **turn** | Plan/deep reason. Read-only. Named-file Read of prompt SSOT; investigate β `need:`. No Bash. Never spawn. |
|
|
230
|
+
| Host spawn / peek / `resume_from` | yes | **local** | `spawn_subagent` / `Agent` and host peek tools. Gemini spawn/peek = GAP; block on return, classify `done`; no fake peeks. |
|
|
231
|
+
| Workspace fs tools | yes | **local** | Read/Grep/Glob/Write (and host aliases). Parent is denied these except documented persist paths / `/solo`. |
|
|
232
|
+
| Bash / `run_terminal_command` | yes | **local** | RTK wraps stdout on PreToolUse. Thinker has no Bash. |
|
|
233
|
+
| RTK | yes | **local** | Bash/shell stdout compression only. Not Read/Grep/Glob/prompts/images. |
|
|
234
|
+
| `scrub-spawn-prompt` / `parse-need` / `grunt-job` | yes | **local** | Hooks and scripts. Isolation `verdict:` is grunt output, not a model hop. |
|
|
235
|
+
| emit / generate / init | yes (this repo / install) | **local** | Writes other-CLI configs. Not a runtime line to those CLIs. |
|
|
236
|
+
| WebSearch / web_fetch | tool from host | **remote-not-LLM** | Network search/fetch. Not a second Model API box. World facts: grunt `job: web`. |
|
|
237
|
+
| MCP | policy deny | n/a | Denied by policy in-tree. Do not draw as a main path. |
|
|
238
|
+
| Model API | **no** (one box outside) | AI-server | This hostβs vendor SDK only. Parent and child **turns** complete here. Spawn omits model; frontmatter on `.rulesync/subagents/*.md` picks the model. |
|
|
239
|
+
| Other CLIs | no (not this process) | emit/config only | Same protocol files emitted elsewhere. No hop, no shared peek. |
|
|
240
|
+
| `@lovrozagar/grunt` | package / CLI | local install | Protocol SoT + CLI. Not a model runtime. |
|
|
241
|
+
|
|
242
|
+
### Edge labels
|
|
243
|
+
|
|
244
|
+
Use these labels. Do not revive βprompt inputβ or βagent to useβ.
|
|
245
|
+
|
|
246
|
+
| edge | meaning |
|
|
247
|
+
| --- | --- |
|
|
248
|
+
| **session in/out** | User β parent only. Children have no user edge. |
|
|
249
|
+
| **spawn** | Parent β `grunt` \| `implementer` \| `thinker`. First sentence: `You are {agent} subagent.` Omit model. |
|
|
250
|
+
| **peek** | Parent reads host status on the child id. Real host fields. `timeout_ms=60000`. GAP hosts: no fake peeks; block on spawn return = `done`. |
|
|
251
|
+
| **resume_from** | Parent continues the **same** child id with new `verdict:` blobs only. Max 3. Not a fresh spawn. |
|
|
252
|
+
| **need:** | Child stop line: fat dump jobs for parent to fan as grunt. Cap 4 jobs per batch. |
|
|
253
|
+
| **verdict:** | Grunt isolation result back onto `resume_from`. `ok\|fail\|empty`. Short facts, not dumps. |
|
|
254
|
+
| **tool call** | Child (or, illegally if parent, denied) β host tools. |
|
|
255
|
+
| **RTK** | PreToolUse Bash/shell β compressed stdout. No other tools. |
|
|
256
|
+
| **completion** | Parent and children β **one** Model API (this hostβs SDK). |
|
|
257
|
+
| **emit/config** | Disk write to other CLI trees. Drawn with a broken line or footnote, **not** a session arrow. |
|
|
258
|
+
|
|
259
|
+
### What not to draw
|
|
260
|
+
|
|
261
|
+
- A **CLI Provider** box as a peer of the host, or a router that hops between CLIs at runtime
|
|
262
|
+
- **Thinker β CLI** as a special extra channel β thinker is a sibling; tools/`need:` like the protocol
|
|
263
|
+
- The spelling **Implementor** β id is **implementer**
|
|
264
|
+
- **Per-agent Model API** boxes β one Model API outside the host, this SDK only
|
|
265
|
+
- **Child β child spawn** β isolation is parent fan-out of grunt siblings (or in-hook grunt-job for interceptable `search|exec` batches)
|
|
266
|
+
- **MCP** as a happy-path tool rail
|
|
267
|
+
- **RTK** on Read/Grep/Glob/prompts/images
|
|
268
|
+
- **User** arrows into grunt/implementer/thinker
|
|
269
|
+
- Gemini **fake peek** loops. GAP: no invented status API; block on return
|
|
270
|
+
|
|
271
|
+
### Emit footnote and Gemini GAP
|
|
272
|
+
|
|
273
|
+
**Emit.** `rulesync generate` plus in-tree emit scripts write Claude/Codex/Antigravity/Gemini/Grok trees from `.rulesync`. Config on disk for the **next** process of that CLI. Not a live message into another host. Multi-CLI in a diagram = footnote or a second, disconnected host bubble β never an arrow from this session.
|
|
274
|
+
|
|
275
|
+
**Gemini GAP.** Gemini is not emitted as a spawn/peek host in the cascade table. Do not invent peek or kill APIs. If a Gemini session is the host, treat spawn/peek as GAP: no fake peeks, no auto-kill; block on the host call returning and classify `done`. Other GAP rows (cascade host mapping): Claude Code unless an in-tree schema names a status/output tool; Codex peek/kill; Antigravity peek/kill.
|
|
276
|
+
|
|
277
|
+
### Protocol pointers
|
|
278
|
+
|
|
279
|
+
Repo-relative (repository root):
|
|
280
|
+
|
|
281
|
+
- `.rulesync/reference/cascade.md` β parent-only spawn, peek/kill table, `need:` / `resume_from`, isolation `verdict:`
|
|
282
|
+
- `.rulesync/reference/rtk.md` β Bash/shell stdout compression
|
|
283
|
+
- `.rulesync/reference/map.md` β cheap outline of protocol, scripts, generated trees
|
|
284
|
+
- `.rulesync/subagents/orchestrator.md`
|
|
285
|
+
- `.rulesync/subagents/grunt.md`
|
|
286
|
+
- `.rulesync/subagents/implementer.md`
|
|
287
|
+
- `.rulesync/subagents/thinker.md`
|
|
288
|
+
|
|
289
|
+
## Layout
|
|
290
|
+
|
|
291
|
+
Published (`package.json` `files`): `bin/grunt.js` `cli` `scripts/check-globals.mjs` `scripts/emit-agent-shell-tools.mjs` `scripts/emit-gemini.mjs` `scripts/emit-mcp-policy.mjs` `scripts/gate-fat-tools.mjs` `scripts/hooks-union.mjs` `scripts/grunt-job.mjs` `scripts/parse-need.mjs` `scripts/persist-handoff.mjs` `scripts/persist-plan.mjs` `scripts/purge-global-mcps.mjs` `scripts/scrub-spawn-prompt.mjs` `scripts/scrub-text-lib.mjs` `scripts/sync-global-settings.mjs` `scripts/telemetry.mjs` `scripts/scrub-text` `.rulesync` `.grok` `.codex` `.claude` `.agents` `AGENTS.md` `CLAUDE.md` `.mcp.json` `README.md` `LICENSE`
|
|
292
|
+
|
|
293
|
+
No `scripts/*.test.ts` `scripts/fixtures/` `docs/` `coverage/` `vitest.config.ts` in `files`.
|
|
294
|
+
|
|
295
|
+
Repo root (also): `coverage/` `.gemini/` β no `src/` no `CONTRIBUTING` no `docs/`
|
|
296
|
+
|
|
297
|
+
- `bin/grunt.js` β CLI bin
|
|
298
|
+
- `cli/grunt.mjs` β commands
|
|
299
|
+
- `scripts/` β generate emits `telemetry.mjs` (re-init sentinel) `scrub-text`
|
|
300
|
+
- `.rulesync/` β SoT (subagents skills reference)
|
|
301
|
+
- `.claude/` `.grok/` `.codex/` `.agents/` `.gemini/` β host emit
|
|
302
|
+
- `coverage/` β vitest local not published
|
|
303
|
+
|
|
304
|
+
## Develop
|
|
305
|
+
|
|
306
|
+
Contributors to this repo only:
|
|
307
|
+
|
|
308
|
+
```
|
|
309
|
+
npm i && npm test
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
- Test: `vitest run --coverage`
|
|
313
|
+
- Test include: `scripts/**/*.test.ts` `cli/**/*.test.ts`
|
|
314
|
+
- Coverage include: `cli/**`
|
|
315
|
+
- Coverage thresholds: 100% lines / functions / branches / statements
|
|
316
|
+
- Dev deps include rulesync vitest typescript
|
|
317
|
+
|
|
318
|
+
## Examples
|
|
319
|
+
|
|
320
|
+
Keep these four flows only:
|
|
321
|
+
|
|
322
|
+
1. βCreate me a react weather appβ β thinker plan β implementer write β orchestrator recap
|
|
323
|
+
2. βWhat is 2+2β β grunt β `[grunt]:` echo
|
|
324
|
+
3. Marvel theatrical next β grunt `job:web` β recap
|
|
325
|
+
4. `.logs` 3/6/2021 tag `framework bug` β grunt local search β recap
|
|
326
|
+
|
|
327
|
+
## License
|
|
328
|
+
|
|
329
|
+
MIT Β© 2026 lovrozagar
|
package/package.json
CHANGED