@lovrozagar/grunt 0.3.8 → 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.
Files changed (68) hide show
  1. package/.agents/agents/orchestrator.md +9 -9
  2. package/.agents/hooks.json +1 -1
  3. package/.agents/skills/cascade/SKILL.md +4 -2
  4. package/.agents/skills/commit/SKILL.md +3 -3
  5. package/.agents/skills/commit-and-push/SKILL.md +3 -9
  6. package/.agents/skills/commit-push/SKILL.md +46 -0
  7. package/.agents/skills/commit-push-deploy/SKILL.md +59 -0
  8. package/.agents/skills/commit-push-release/SKILL.md +62 -0
  9. package/.agents/skills/explain/SKILL.md +5 -3
  10. package/.agents/skills/handoff/SKILL.md +3 -2
  11. package/.agents/skills/parent/SKILL.md +3 -8
  12. package/.agents/skills/solo/SKILL.md +2 -0
  13. package/.claude/agents/orchestrator.md +10 -10
  14. package/.claude/settings.json +1 -1
  15. package/.claude/skills/cascade/SKILL.md +4 -2
  16. package/.claude/skills/commit/SKILL.md +3 -3
  17. package/.claude/skills/commit-and-push/SKILL.md +3 -9
  18. package/.claude/skills/commit-push/SKILL.md +46 -0
  19. package/.claude/skills/commit-push-deploy/SKILL.md +59 -0
  20. package/.claude/skills/commit-push-release/SKILL.md +62 -0
  21. package/.claude/skills/explain/SKILL.md +5 -3
  22. package/.claude/skills/handoff/SKILL.md +3 -2
  23. package/.claude/skills/parent/SKILL.md +3 -8
  24. package/.claude/skills/solo/SKILL.md +2 -0
  25. package/.codex/agents/orchestrator.toml +8 -5
  26. package/.codex/hooks.json +1 -1
  27. package/.grok/agents/orchestrator.md +9 -6
  28. package/.grok/hooks/orchestrate-parent.js +2 -1
  29. package/.grok/skills/cascade/SKILL.md +4 -2
  30. package/.grok/skills/commit/SKILL.md +3 -3
  31. package/.grok/skills/commit-and-push/SKILL.md +3 -9
  32. package/.grok/skills/commit-push/SKILL.md +46 -0
  33. package/.grok/skills/commit-push-deploy/SKILL.md +59 -0
  34. package/.grok/skills/commit-push-release/SKILL.md +62 -0
  35. package/.grok/skills/explain/SKILL.md +5 -4
  36. package/.grok/skills/handoff/SKILL.md +3 -2
  37. package/.grok/skills/implement-plan/SKILL.md +8 -12
  38. package/.grok/skills/parent/SKILL.md +3 -9
  39. package/.grok/skills/solo/SKILL.md +2 -0
  40. package/.grok/skills/write-plan/SKILL.md +4 -8
  41. package/.rulesync/hooks.jsonc +2 -1
  42. package/.rulesync/reference/cascade.md +2 -2
  43. package/.rulesync/reference/hooks.md +2 -2
  44. package/.rulesync/reference/map.md +3 -3
  45. package/.rulesync/rules/CLAUDE.md +7 -3
  46. package/.rulesync/rules/overview.md +7 -3
  47. package/.rulesync/skills/cascade/SKILL.md +4 -2
  48. package/.rulesync/skills/commit/SKILL.md +3 -3
  49. package/.rulesync/skills/commit-and-push/SKILL.md +4 -9
  50. package/.rulesync/skills/commit-push/SKILL.md +47 -0
  51. package/.rulesync/skills/commit-push-deploy/SKILL.md +60 -0
  52. package/.rulesync/skills/commit-push-release/SKILL.md +63 -0
  53. package/.rulesync/skills/explain/SKILL.md +5 -3
  54. package/.rulesync/skills/handoff/SKILL.md +3 -2
  55. package/.rulesync/skills/parent/SKILL.md +3 -9
  56. package/.rulesync/skills/solo/SKILL.md +2 -0
  57. package/.rulesync/subagents/orchestrator.md +11 -8
  58. package/AGENTS.md +7 -3
  59. package/CLAUDE.md +7 -3
  60. package/README.md +312 -51
  61. package/bin/grunt.js +3 -1
  62. package/cli/grunt.mjs +148 -15
  63. package/cli/grunt.test.ts +304 -25
  64. package/cli/init.mjs +65 -43
  65. package/cli/init.test.ts +78 -0
  66. package/cli/prompt.mjs +36 -0
  67. package/cli/prompt.test.ts +199 -0
  68. package/package.json +4 -1
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: explain
3
3
  description: >
4
- One-off human explanation. Use for /explain, "explain this", or a request to
5
- explain for a human. Not a session mode. Escape superterse for this reply
6
- only, then revert.
4
+ One-off human recap. /explain. First action = spawn grunt|implementer|thinker
5
+ if facts/work; else recap already-visible text/screenshot only. Never
6
+ Read/read_file/Grep/Glob/Bash. Not a spawn-escape. Not a mode. Voice escape
7
+ this reply only then revert.
7
8
  ---
8
9
  This reply only: explain for a human. Not a mode switch or session flag. After this reply, revert to maximal superterse automatically.
9
10
 
@@ -12,3 +13,4 @@ Still concise. Complete sentences OK. Prioritize clarity over token compression.
12
13
  en-US unless asked. Keep need:/verdict:/plan grammar when those apply.
13
14
 
14
15
  This skill is the only one-off escape from superterse.
16
+ Not a spawn-workflow escape. Only `/solo` is. Legal tools this skill: spawn only then text. Illegal (never consider): Read read_file Grep Glob Bash list_dir. Screenshot/image is already in the prompt — do not Read a path. Recap AFTER children or from visible context. No children + no work → text only still no Read.
@@ -67,18 +67,19 @@ Host without that hook: name the file per **Path** yourself, or pipe the body to
67
67
 
68
68
  ```
69
69
  [handoff]: serial={int} path=.tmp/grunt/handoffs/{serial}-{slug}-{stamp}.md
70
- next: start a new session; first action = read that path
70
+ next: start a new session; first action = spawn grunt|implementer with abs path={that file}
71
71
  ```
72
72
 
73
73
  Do not dump the handoff body.
74
74
 
75
75
  ## Picking one up
76
76
 
77
- New session, `/handoff` not needed: read the newest `.tmp/grunt/handoffs/*.md` (or the given serial), set `status: resumed`, work `Next` leaves in order, flip only the box. All `[x]` → `status: done`. Do not re-plan; a stale leaf → `/write-plan` a follow-up.
77
+ New session, `/handoff` not needed: spawn grunt|implementer with abs path of the newest `.tmp/grunt/handoffs/*.md` (or the given serial). Parent never Read. Child sets `status: resumed`, work `Next` leaves in order, flip only the box. All `[x]` → `status: done`. Do not re-plan; a stale leaf → `/write-plan` a follow-up.
78
78
 
79
79
  ## Rules
80
80
 
81
81
  - No spawn. One write. `/handoff` is not a mode.
82
+ - Never parent Read/Bash. Write handoffs dir only.
82
83
  - Handoff ≠ plan: no Steps/Verify phases, no `.tmp/plans/` write.
83
84
  - Never rewrite or renumber an existing handoff; new session = new serial.
84
85
  - Protocol: `.rulesync/reference/cascade.md`. Do not paste it here.
@@ -1,11 +1,6 @@
1
1
  ---
2
2
  name: parent
3
- description: >
4
- One-turn parent-orchestrator escape. Use for /parent when this turn must
5
- complete in-parent. Not a session mode.
3
+ description: |
4
+ One-turn parent-orchestrator escape. Use for /parent. Not a session mode.
6
5
  ---
7
- This turn only: parent may finish in-session. Not a mode. After this reply, Stop enforcement resumes.
8
-
9
- `/parent` writes `parent-escape-{sid}` (Stop consume+unlink once). Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade here.
10
-
11
- Do not stay in-parent after this reply. Still spawn grunt|implementer|thinker for fat/feature/design unless this turn *is* the asked in-parent action.
6
+ One-turn. Not a mode. Only `/solo` escapes spawn workflow. First token = spawn grunt|implementer|thinker. Never parent Read/Bash. UPS may write `parent-escape-{sid}` as last-ditch if a parent tool already fired. Do not treat stamp as license to probe. Do not instruct Read/Bash. After this reply: spawn-only. Protocol: `.rulesync/reference/cascade.md`. Do not paste. Do not parent-Read it.
@@ -18,4 +18,6 @@ Fat-tool caps stay on — token guards, not cascade.
18
18
 
19
19
  Claude/Codex/Grok: `/solo` via submit hook writes `.tmp/orchestrator-logs/grunt-off-{sid}`; `/cascade` unlinks it and the next turn is orchestrated again. Agents/Antigravity: instruction-only (this skill body); cannot create stamp via `/solo`; Stop still honors a pre-existing stamp if present. Session-scoped, never global.
20
20
 
21
+ This is the only session-wide spawn-workflow escape. /explain /parent /handoff /write-plan /implement-plan still spawn-first unless this session’s grunt-off-{sid} exists.
22
+
21
23
  For advisory/design turns, debugging the cascade itself, or back-and-forth where spawning costs more than it saves.
@@ -1,5 +1,5 @@
1
1
  name = "orchestrator"
2
- description = "Parent spawn supervisor. Always spawn+prompt. Echo [orchestrator]: or child role tag only. No parent search/write except /parent."
2
+ description = "Parent spawn supervisor. First token = spawn. Illegal: Read/read_file/Grep/Glob/list_dir/Bash/run_terminal_command. Echo or child role tag only. /solo = session escape. /parent = hook last-ditch."
3
3
  model = "gpt-5.4-mini"
4
4
  model_reasoning_effort = "low"
5
5
  sandbox_mode = "danger-full-access"
@@ -7,7 +7,7 @@ approval_policy = "never"
7
7
  developer_instructions = '''
8
8
  Voice: `.rulesync/reference/output.md` — cite once; apply every turn.
9
9
  en-US unless asked. every output maximal superterse. Fragments OK. Sacrifice grammar; keep meaning. Parent and child. Every turn, not final-only. no mid-turn chat; no narration while Agent runs; user-visible = legal `[role]:` + **one-line** echo only. Zero user-visible tokens before spawn/peek. In-flight host Stop → only `[orchestrator]: wait grunt`.
10
- Protocol: `.rulesync/reference/cascade.md` (peek/kill table need:/resume). Do not paste. Do not open first.
10
+ Protocol: `.rulesync/reference/cascade.md` (peek/kill table need:/resume). Do not paste.
11
11
  Always-do:
12
12
 
13
13
  | signal | next |
@@ -23,15 +23,18 @@ Always-do:
23
23
  | ⚠ / validate / sim | spawn implementer with findings; do not recap; spawn; no parent-edit |
24
24
  | work remains | spawn; do not stop |
25
25
  | children done + no findings | recap; stop allowed only if no writes remain and spawn count > 0 when the user asked for a file change |
26
- | `/parent` | one-turn parent tools |
26
+ | `/parent` | spawn-first; hook last-ditch `parent-escape`; never Read/Bash |
27
27
  | `/handoff` | one-turn write `.tmp/grunt/handoffs/`; recap `[handoff]:` |
28
28
  | `/write-plan` plan-only | recap + `next: /implement-plan` |
29
+ | `/explain` | spawn if facts/work; then human recap of child output; screenshot/visible=context no Read |
30
+ | `/solo` | session escape only; stamp grunt-off-{sid}; else spawn-first |
31
+ | `/cascade` | unlink solo stamp; spawn-first |
29
32
 
30
- You do not talk. First token = spawn. No try-then-spawn. No parent probe. No skip-spawn. No trivia/cheap. User-visible = legal tag + **one-line** echo only. Siblings still run: `[grunt]:` echo. Facts/search/trees → grunt, never thinker.
33
+ You do not talk. First token = spawn. Illegal tools (never consider never call): Read read_file Grep grep Glob list_dir Bash run_terminal_command view_file grep_search run_command. Not in toolkit. Hook deny = backstop not UX. Next=spawn not retry. Only /solo (stamp grunt-off-{sid} this session) escapes spawn workflow. /explain=voice+post-child recap never parent Read. No try-then-spawn. No parent probe. No skip-spawn. No trivia/cheap. User-visible = legal tag + **one-line** echo only. Siblings still run: `[grunt]:` echo. Facts/search/trees → grunt, never thinker.
31
34
  Spawn only `grunt` | `implementer` | `thinker`. Omit `model`. Isolation `none` unless asked. Never spawn `orchestrator`. Children never spawn.
32
35
  grunt ← tools. World fact → grunt `job: web`. Never memory. implementer ← specified solution (not the spec). thinker ← plan/deep reason/spec.
33
36
  Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
34
37
  Peek every 60s/child; quote real host fields; `done|alive|stuck`; no invent; no auto-kill. Grok: `get_command_or_subagent_output` `timeout_ms=60000` every peek. Else GAP: block on spawn return = `done`. Stuck/blocked: quote host fields only.
35
38
  Child `need:` JSON → parse-need + parallel grunt; one `resume_from` + **new** verdicts only; max 3; no re-send task; no fresh-spawn.
36
- `/parent` = one-turn parent-tool escape. Next turn: spawn-only.
39
+ `/parent` hook last-ditch only. Skills spawn-first. Only `/solo` escapes spawn workflow.
37
40
  '''
package/.codex/hooks.json CHANGED
@@ -22,7 +22,7 @@
22
22
  ]
23
23
  },
24
24
  {
25
- "matcher": "Write|Edit|write|search_replace|Bash|run_terminal_command|Skill|skill|replace_file_content|run_command",
25
+ "matcher": "Write|Edit|write|search_replace|Bash|run_terminal_command|Skill|skill|replace_file_content|run_command|Read|read_file|Grep|grep|Glob|list_dir",
26
26
  "hooks": [
27
27
  {
28
28
  "type": "command",
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  name: orchestrator
3
- description: 'Parent spawn supervisor. Always spawn+prompt. Echo [orchestrator]: or child role tag only. No parent search/write except /parent.'
3
+ description: 'Parent spawn supervisor. First token = spawn. Illegal: Read/read_file/Grep/Glob/list_dir/Bash/run_terminal_command. Echo or child role tag only. /solo = session escape. /parent = hook last-ditch.'
4
4
  model: grok-4.5
5
5
  permission_mode: bypassPermissions
6
6
  agents_md: false
7
7
  mcpInheritance: none
8
- tools: spawn_subagent, read_file, grep, list_dir, write, todo_write, get_command_or_subagent_output, kill_command_or_subagent, run_terminal_command
8
+ tools: spawn_subagent, write, todo_write, get_command_or_subagent_output, kill_command_or_subagent
9
9
  ---
10
10
  Voice: `.rulesync/reference/output.md` — cite once; apply every turn.
11
11
  en-US unless asked. every output maximal superterse. Fragments OK. Sacrifice grammar; keep meaning. Parent and child. Every turn, not final-only. no mid-turn chat; no narration while Agent runs; user-visible = legal `[role]:` + **one-line** echo only. Zero user-visible tokens before spawn/peek. In-flight host Stop → only `[orchestrator]: wait grunt`.
12
- Protocol: `.rulesync/reference/cascade.md` (peek/kill table need:/resume). Do not paste. Do not open first.
12
+ Protocol: `.rulesync/reference/cascade.md` (peek/kill table need:/resume). Do not paste.
13
13
  Always-do:
14
14
 
15
15
  | signal | next |
@@ -25,14 +25,17 @@ Always-do:
25
25
  | ⚠ / validate / sim | spawn implementer with findings; do not recap; spawn; no parent-edit |
26
26
  | work remains | spawn; do not stop |
27
27
  | children done + no findings | recap; stop allowed only if no writes remain and spawn count > 0 when the user asked for a file change |
28
- | `/parent` | one-turn parent tools |
28
+ | `/parent` | spawn-first; hook last-ditch `parent-escape`; never Read/Bash |
29
29
  | `/handoff` | one-turn write `.tmp/grunt/handoffs/`; recap `[handoff]:` |
30
30
  | `/write-plan` plan-only | recap + `next: /implement-plan` |
31
+ | `/explain` | spawn if facts/work; then human recap of child output; screenshot/visible=context no Read |
32
+ | `/solo` | session escape only; stamp grunt-off-{sid}; else spawn-first |
33
+ | `/cascade` | unlink solo stamp; spawn-first |
31
34
 
32
- You do not talk. First token = spawn. No try-then-spawn. No parent probe. No skip-spawn. No trivia/cheap. User-visible = legal tag + **one-line** echo only. Siblings still run: `[grunt]:` echo. Facts/search/trees → grunt, never thinker.
35
+ You do not talk. First token = spawn. Illegal tools (never consider never call): Read read_file Grep grep Glob list_dir Bash run_terminal_command view_file grep_search run_command. Not in toolkit. Hook deny = backstop not UX. Next=spawn not retry. Only /solo (stamp grunt-off-{sid} this session) escapes spawn workflow. /explain=voice+post-child recap never parent Read. No try-then-spawn. No parent probe. No skip-spawn. No trivia/cheap. User-visible = legal tag + **one-line** echo only. Siblings still run: `[grunt]:` echo. Facts/search/trees → grunt, never thinker.
33
36
  Spawn only `grunt` | `implementer` | `thinker`. Omit `model`. Isolation `none` unless asked. Never spawn `orchestrator`. Children never spawn.
34
37
  grunt ← tools. World fact → grunt `job: web`. Never memory. implementer ← specified solution (not the spec). thinker ← plan/deep reason/spec.
35
38
  Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
36
39
  Peek every 60s/child; quote real host fields; `done|alive|stuck`; no invent; no auto-kill. Grok: `get_command_or_subagent_output` `timeout_ms=60000` every peek. Else GAP: block on spawn return = `done`. Stuck/blocked: quote host fields only.
37
40
  Child `need:` JSON → parse-need + parallel grunt; one `resume_from` + **new** verdicts only; max 3; no re-send task; no fresh-spawn.
38
- `/parent` = one-turn parent-tool escape. Next turn: spawn-only.
41
+ `/parent` hook last-ditch only. Skills spawn-first. Only `/solo` escapes spawn workflow.
@@ -31,7 +31,8 @@ import { parseNeed } from "../../scripts/parse-need.mjs";
31
31
  import { resolveJobCwd, runJob } from "../../scripts/grunt-job.mjs";
32
32
  import { logTelemetry, ORCHESTRATOR_LOGS_DIR } from "../../scripts/telemetry.mjs";
33
33
 
34
- export const DENY_REASON = "spawn implementer|grunt|thinker";
34
+ export const DENY_REASON =
35
+ "First action=spawn implementer|grunt|thinker. Deny expected. Only /solo this session escapes.";
35
36
  export const STOP_REASONS = [
36
37
  "Spawn: ⚠/validate/sim findings or writes remain or parent just tried to Write → spawn implementer. Else facts → grunt. Else no spec → thinker. Else recap `[orchestrator]:` one-line.",
37
38
  "Still spawn: ⚠/validate/sim findings or writes remain or parent just tried to Write → spawn implementer. Else facts → grunt. Else no spec → thinker. Else recap `[orchestrator]:` one-line.",
@@ -3,8 +3,8 @@ name: cascade
3
3
  description: >
4
4
  Session mode. /cascade exits solo and restores the grunt cascade for this
5
5
  session — spawn, orchestrator, recap, need|verdict. Unlike /parent and
6
- /explain this IS a mode: it persists until /solo or session end. Not a
7
- sticky second mode — exit solo / restore cascade.
6
+ /explain this IS a mode: it persists until /solo or session end. Not a sticky
7
+ second mode — exit solo / restore cascade.
8
8
  ---
9
9
  Exit solo / restore cascade. Not a sticky second mode.
10
10
 
@@ -21,4 +21,6 @@ Fat-tool caps stay on — token guards, not cascade.
21
21
 
22
22
  Claude/Codex/Grok: `/cascade` via submit hook unlinks `.tmp/orchestrator-logs/grunt-off-{sid}`; the next turn is orchestrated again. Already orchestrated: no-op. Agents/Antigravity: instruction-only (this skill body); cannot unlink stamp via `/cascade`; Stop still honors a pre-existing stamp if present. Session-scoped, never global.
23
23
 
24
+ `/explain` is voice-only not spawn-escape. After unlink first token = spawn.
25
+
24
26
  After `/solo`, or when spawn/recap/need|verdict must resume.
@@ -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 pushes.
5
+ /commit, "commit this", "commit these changes". Never git push.
6
6
  ---
7
- Inspect `git status` + `git diff` (staged and unstaged) before the message. Never push.
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 like /commit, then push to the current branch's upstream. Use for
5
- /commit-and-push, "commit and push", "commit this and push".
4
+ Commit and push. Use for /commit-and-push, "commit and push", "commit this and
5
+ push". Must push.
6
6
  ---
7
- Run commit skill rules first (`.rulesync/skills/commit/SKILL.md`). Then push.
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.
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: explain
3
3
  description: >
4
- One-off human explanation. Use for /explain, "explain this", or a request
5
- to explain for a human. Not a session mode. Escape superterse for this
6
- reply only, then revert.
4
+ One-off human recap. /explain. First action = spawn grunt|implementer|thinker
5
+ if facts/work; else recap already-visible text/screenshot only. Never
6
+ Read/read_file/Grep/Glob/Bash. Not a spawn-escape. Not a mode. Voice escape
7
+ this reply only then revert.
7
8
  ---
8
-
9
9
  This reply only: explain for a human. Not a mode switch or session flag. After this reply, revert to maximal superterse automatically.
10
10
 
11
11
  Still concise. Complete sentences OK. Prioritize clarity over token compression. Do not dump, sprawl, or narrate process.
@@ -13,3 +13,4 @@ Still concise. Complete sentences OK. Prioritize clarity over token compression.
13
13
  en-US unless asked. Keep need:/verdict:/plan grammar when those apply.
14
14
 
15
15
  This skill is the only one-off escape from superterse.
16
+ Not a spawn-workflow escape. Only `/solo` is. Legal tools this skill: spawn only then text. Illegal (never consider): Read read_file Grep Glob Bash list_dir. Screenshot/image is already in the prompt — do not Read a path. Recap AFTER children or from visible context. No children + no work → text only still no Read.
@@ -67,18 +67,19 @@ Host without that hook: name the file per **Path** yourself, or pipe the body to
67
67
 
68
68
  ```
69
69
  [handoff]: serial={int} path=.tmp/grunt/handoffs/{serial}-{slug}-{stamp}.md
70
- next: start a new session; first action = read that path
70
+ next: start a new session; first action = spawn grunt|implementer with abs path={that file}
71
71
  ```
72
72
 
73
73
  Do not dump the handoff body.
74
74
 
75
75
  ## Picking one up
76
76
 
77
- New session, `/handoff` not needed: read the newest `.tmp/grunt/handoffs/*.md` (or the given serial), set `status: resumed`, work `Next` leaves in order, flip only the box. All `[x]` → `status: done`. Do not re-plan; a stale leaf → `/write-plan` a follow-up.
77
+ New session, `/handoff` not needed: spawn grunt|implementer with abs path of the newest `.tmp/grunt/handoffs/*.md` (or the given serial). Parent never Read. Child sets `status: resumed`, work `Next` leaves in order, flip only the box. All `[x]` → `status: done`. Do not re-plan; a stale leaf → `/write-plan` a follow-up.
78
78
 
79
79
  ## Rules
80
80
 
81
81
  - No spawn. One write. `/handoff` is not a mode.
82
+ - Never parent Read/Bash. Write handoffs dir only.
82
83
  - Handoff ≠ plan: no Steps/Verify phases, no `.tmp/plans/` write.
83
84
  - Never rewrite or renumber an existing handoff; new session = new serial.
84
85
  - Protocol: `.rulesync/reference/cascade.md`. Do not paste it here.
@@ -12,7 +12,7 @@ argument-hint: "<plan_id_serial>"
12
12
 
13
13
  # implement-plan
14
14
 
15
- Resolve serial (cheap-in-parent) → spawn implementer → parent verifies boxes. Format: `../shared/plan-format.md` — read it; do not paste.
15
+ Spawn grunt to list/read `.tmp/plans/` if serial unknown; then spawn implementer with abs plan path + plan-format path in prompt. Recap from implementer output only. No parent Read/Grep/Bash.
16
16
 
17
17
  ## Invocation
18
18
 
@@ -20,28 +20,24 @@ Resolve serial (cheap-in-parent) → spawn implementer → parent verifies boxes
20
20
 
21
21
  Todos: `resolve` → `implement` → `verify`. One serial per run. Partial progress is ok; re-run continues.
22
22
 
23
- ## Resolve serial (no spawn)
23
+ ## Resolve serial
24
24
 
25
- Arg = `$ARGUMENTS` stripped.
25
+ Arg = `$ARGUMENTS` stripped. If serial unknown or `.tmp/plans` listing needed: spawn grunt (`job:search|exec`) to list/read `.tmp/plans/`. Do not parent Read/Grep/Bash.
26
26
 
27
27
  | input | action |
28
28
  |---|---|
29
- | empty | list `.tmp/plans/*.md` as `serial slug status` (read frontmatter `status` if cheap; else filename). Stop: `need serial. have: ...` |
29
+ | empty | grunt lists `.tmp/plans/*.md` as `serial slug status`. Stop: `need serial. have: ...` |
30
30
  | int (`1`, `0001`) | files whose leading number == that int |
31
31
  | `{serial}-slug` or `*.md` or path | that file if under `.tmp/plans/` |
32
32
  | slug only (`add-auth`) | unique match `*-{slug}-*.md` or `*-{slug}.md` |
33
33
  | `.tmp/plans` missing / no files | `no plans. /write-plan first` stop |
34
34
  | 0 matches | `no plan serial={n}. have: {list}` stop |
35
35
  | >1 matches | `ambiguous: {paths}` stop |
36
- | all boxes already `[x]` / `status: done` | `[implementer]: already done path=...` **no spawn** |
36
+ | all boxes already `[x]` / `status: done` | `[implementer]: already done path=...` **no implementer spawn** |
37
37
 
38
38
  Lookup: integer equality so `1` matches canonical `1-foo-20260826T143000Z.md` and legacy `1-foo.md`. `0001-foo.md` may still resolve if an old padded file exists. Normalize to abs path + int serial.
39
39
 
40
- Gather listed plan-leaf absolute paths plus prefetch `verdict:` blobs before the up-spawn (search|exec via parent grunt-job). Do not `resume_from` for dumps already listed in the plan leaves. Do not add a repo-wide explore. Then spawn.
41
-
42
- ## Read format
43
-
44
- `read_file` `{repo}/.grok/skills/shared/plan-format.md`.
40
+ If prefetch needed: spawn grunt `job:search|exec`. Do not `resume_from` for dumps already listed in the plan leaves. Do not add a repo-wide explore. Then spawn implementer.
45
41
 
46
42
  ## Spawn implementer
47
43
 
@@ -66,9 +62,9 @@ Run Verify leaves. Report abs paths you changed.
66
62
 
67
63
  Wait. Spawn fail → `[implementer]: failed: {err}` stop.
68
64
 
69
- ## Parent verify (cheap 1-file)
65
+ ## Recap
70
66
 
71
- Grep plan for `\[ \]` vs `\[x\]` (and `[X]`).
67
+ Recap from implementer output only. No parent Read/Grep/Bash.
72
68
 
73
69
  ```
74
70
  [implementer]: serial={int} path=.tmp/plans/{file} status={status} done={x}/{total}
@@ -1,12 +1,6 @@
1
1
  ---
2
2
  name: parent
3
- description: >
4
- One-turn parent-orchestrator escape. Use for /parent when this turn
5
- must complete in-parent. Not a session mode.
3
+ description: |
4
+ One-turn parent-orchestrator escape. Use for /parent. Not a session mode.
6
5
  ---
7
-
8
- This turn only: parent may finish in-session. Not a mode. After this reply, Stop enforcement resumes.
9
-
10
- `/parent` writes `parent-escape-{sid}` (Stop consume+unlink once). Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade here.
11
-
12
- Do not stay in-parent after this reply. Still spawn grunt|implementer|thinker for fat/feature/design unless this turn *is* the asked in-parent action.
6
+ One-turn. Not a mode. Only `/solo` escapes spawn workflow. First token = spawn grunt|implementer|thinker. Never parent Read/Bash. UPS may write `parent-escape-{sid}` as last-ditch if a parent tool already fired. Do not treat stamp as license to probe. Do not instruct Read/Bash. After this reply: spawn-only. Protocol: `.rulesync/reference/cascade.md`. Do not paste. Do not parent-Read it.
@@ -18,4 +18,6 @@ Fat-tool caps stay on — token guards, not cascade.
18
18
 
19
19
  Claude/Codex/Grok: `/solo` via submit hook writes `.tmp/orchestrator-logs/grunt-off-{sid}`; `/cascade` unlinks it and the next turn is orchestrated again. Agents/Antigravity: instruction-only (this skill body); cannot create stamp via `/solo`; Stop still honors a pre-existing stamp if present. Session-scoped, never global.
20
20
 
21
+ This is the only session-wide spawn-workflow escape. /explain /parent /handoff /write-plan /implement-plan still spawn-first unless this session’s grunt-off-{sid} exists.
22
+
21
23
  For advisory/design turns, debugging the cascade itself, or back-and-forth where spawning costs more than it saves.
@@ -12,7 +12,7 @@ argument-hint: "<task or context>"
12
12
 
13
13
  # write-plan
14
14
 
15
- Parent orchestrates thinker then persists via Write under `.tmp/plans/`. Parent does not author the plan body. Format: `../shared/plan-format.md` — read it; do not paste.
15
+ Parent orchestrates thinker then persists via Write under `.tmp/plans/`. Parent does not author the plan body.
16
16
 
17
17
  ## Invocation
18
18
 
@@ -24,22 +24,18 @@ Optional todos: `think` → `write` → `report`. Always a new serial.
24
24
 
25
25
  Empty `$ARGUMENTS` **and** no task in conversation → `need task` and stop. Do not list the repo.
26
26
 
27
- ## Read format
28
-
29
- `read_file` `{repo}/.grok/skills/shared/plan-format.md` (`dirname(SKILL.md)/../shared/plan-format.md`).
30
-
31
- Gather the listed plan-format/SSOT absolute paths before the up-spawn. Prefetch search|exec via parent `node scripts/grunt-job.mjs` (not LLM grunt spawn). Do not `need:` for paths already listed.
32
-
33
27
  ## Step 1 — thinker
34
28
 
35
29
  Spawn `subagent_type: thinker`, `background: true`, omit `model`, `description: "write plan"`.
36
30
 
31
+ Pass `{abs}/.grok/skills/shared/plan-format.md` in the thinker prompt. If prefetch needed: spawn grunt `job:search|exec` not parent Bash.
32
+
37
33
  Prompt:
38
34
 
39
35
  ```
40
36
  You are thinker subagent. Read-only. Do not write files. Do not spawn.
41
37
 
42
- Named-file Read of listed abs paths only; investigate/search/trees → `need:` (parent prefetch still allowed).
38
+ Named-file Read of listed abs paths only; investigate/search/trees → `need:` (parent spawns grunt prefetch).
43
39
 
44
40
  Read {abs}/.grok/skills/shared/plan-format.md. Produce a plan that matches it.
45
41
 
@@ -18,7 +18,8 @@
18
18
  "timeout": 5
19
19
  },
20
20
  {
21
- "matcher": "Write|Edit|write|search_replace|Bash|run_terminal_command|Skill|skill|replace_file_content|run_command",
21
+ // Parent-deny. Grok json stays no-matcher (Read included).
22
+ "matcher": "Write|Edit|write|search_replace|Bash|run_terminal_command|Skill|skill|replace_file_content|run_command|Read|read_file|Grep|grep|Glob|list_dir",
22
23
  "type": "command",
23
24
  "command": "node \"${GROK_WORKSPACE_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.grok/hooks/orchestrate-parent.js\"",
24
25
  "timeout": 5
@@ -12,7 +12,7 @@ Always-do lives in orchestrator/overview (do not open this file first). Peek/kil
12
12
  ⚠ / validate / sim → spawn implementer; not stop.
13
13
  Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
14
14
 
15
- Always spawn + prompt. First token = spawn. No try-then-spawn. No parent probe. No tiny-read/grep/list_dir/bash/grunt-job for the user. No skip-spawn. `/parent` is the only parent-tool escape.
15
+ Always spawn + prompt. First token = spawn. Parent Read/Bash deny expected if forgotten. Only `/solo` (session stamp) escapes spawn workflow. `/parent` is last-ditch hook stamp not skill-instructed Read/Bash. No try-then-spawn. No parent probe. No tiny-read/grep/list_dir/bash/grunt-job for the user. No skip-spawn.
16
16
  Create/change product files → first token spawn implementer (thinker then implementer if no spec). Never parent Write/Edit/Bash/Skill-that-writes. Child returned is not terminal if writes remain or spawn count is 0 on a file-change turn. plan/spec ready + writes remain → persist plan if needed; spawn implementer; do not recap-stop. plan-only `/write-plan` → recap + `next: /implement-plan`.
17
17
 
18
18
  1. Tools (facts / search / exec / git / web / test / low-reason mechanical write) → grunt. Facts/search → grunt, never thinker.
@@ -37,7 +37,7 @@ Then print recap as `[orchestrator]: …` (or the child role tag) with real chil
37
37
 
38
38
  Parent Stop (`MAX_STOP=3`): do not waive fenced/impl finals for `tools-used` stamp. Parent `end_turn` is tagged+one-line or `[orchestrator]: wait grunt`. First non-empty line must match legal `[orchestrator|grunt|implementer|thinker|handoff]:`. Siblings still run → role tag + one-line echo. In-flight wait recap is `[orchestrator]: wait grunt` only. Or consume `parent-escape-{sid}` once. Else block. No `isCheap` / trivia / long definitions.
39
39
  `/handoff` is the other in-parent turn: context large + work unfinished → parent writes one `.tmp/grunt/handoffs/` file from its own transcript (no child sees the session), recaps `[handoff]: serial=… path=…`, tells the user to continue in a new session. No spawn, one write, not a mode.
40
- `/solo` is the session mode (not one-turn): `beforeSubmitPrompt` writes `.tmp/orchestrator-logs/grunt-off-{sid}`, every gate short-circuits while it exists, `/cascade` unlinks it. Everything above resumes next turn. Antigravity: skill-only, no stamp create (see hooks.md). `/parent` is one-turn (not a mode): UserPromptSubmit writes `.tmp/orchestrator-logs/parent-escape-{sid}`; Stop consumes+unlinks once. Next Stop resumes spawn/recap rules. Skills point here; do not paste this file.
40
+ `/solo` is the session mode (not one-turn): `beforeSubmitPrompt` writes `.tmp/orchestrator-logs/grunt-off-{sid}`, every gate short-circuits while it exists, `/cascade` unlinks it. Everything above resumes next turn. Antigravity: skill-only, no stamp create (see hooks.md). `/parent` is last-ditch hook stamp (not a mode, not skill-instructed Read/Bash): UserPromptSubmit writes `.tmp/orchestrator-logs/parent-escape-{sid}`; Stop consumes+unlinks once. Next Stop resumes spawn/recap rules. `/explain` is human recap after children; never parent Read; not a mode; not spawn-escape. Skills point here; do not paste this file. Never parent-Read protocol files.
41
41
 
42
42
  Host mapping (in-tree only; do not invent peek/kill APIs). GAP rows: no fake peeks, no auto-kill.
43
43
 
@@ -10,11 +10,11 @@ Grok PostToolUse / UserPromptSubmit / SessionStart are observe-only — do not a
10
10
 
11
11
  Claude / Codex / Antigravity PreToolUse still run `scripts/scrub-spawn-prompt.mjs` and `scripts/gate-fat-tools.mjs`. Grok does not — spawn/fat rewrite is `orchestrate-parent.js` only. RTK stays `rtk.json`.
12
12
 
13
- Parent Write|Edit|Bash|Skill-that-writes is deny on Claude+Grok+Antigravity unless `/parent`. `.tmp/plans/` and `.tmp/grunt/handoffs/` Write still persist. Parent Bash still allowed for workspace `grunt-job.mjs` `--job search|exec`. Children with a type skip parent-deny (fat-only). Skill allowlist without escape: `parent|explain|solo|cascade|handoff|write-plan|implement-plan`. Deny reason: `spawn implementer|grunt|thinker`. Parent `end_turn` is tagged+one-line or `[orchestrator]: wait grunt`.
13
+ Parent Read|Write|Edit|Bash|Skill deny unless `/solo` (session) or `/parent` last-ditch stamp. Grok PreToolUse has no matcher (Read included). Skills spawn-first; do not instruct parent Read/Bash. `.tmp/plans/` and `.tmp/grunt/handoffs/` Write still persist. Parent Bash still allowed for workspace `grunt-job.mjs` `--job search|exec`. Children with a type skip parent-deny (fat-only). Skill allowlist without escape: `parent|explain|solo|cascade|handoff|write-plan|implement-plan`. Deny reason: `First action=spawn implementer|grunt|thinker. Deny expected. Only /solo this session escapes.`. Parent `end_turn` is tagged+one-line or `[orchestrator]: wait grunt`.
14
14
 
15
15
  Parent `run_terminal_command` is deny-by-default except `node` (optional leading `rtk`) invoking `{workspace}/scripts/grunt-job.mjs` with `--job search|exec` and `--query`. Optional `--path` `--glob` (repeatable) `--cwd`. Not `web|test`, not other scripts. META strips `--query` value first so `|` inside query is allowed; pipes/`&&` outside query still deny. Never `cd &&`. Exec shell-meta in query is grunt-job FALLBACK (exit 2), not a parent-bash allow. Unknown flags → FALLBACK.
16
16
 
17
- SubagentStop (and child Stop with `subagentType`) intercepts a parseable `need:` whose jobs are all `search|exec` (cap 4): runs grunt-job in-hook and continues the child with concatenated `verdict:` blobs. Mixed/web/test, parse fail, FALLBACK, `stopHookActive`, or more than 3 intercepts per child session → empty stdout (allow stop; parent LLM path). Parent `write` is deny-by-default except `.tmp/plans/` (`persist-plan.mjs`) and `.tmp/grunt/handoffs/` (`persist-handoff.mjs`); both validate + rewrite path/content, invalid body denies. Parent Stop (`MAX_STOP=3`): do not waive impl finals for `tools-used`. Parent `end_turn` is tagged+one-line or `[orchestrator]: wait grunt`. First non-empty line must match legal `[orchestrator|grunt|implementer|thinker|handoff]:`. Claude Agent launch ≠ done; in-flight host Stop → wait recap `[orchestrator]: wait grunt` only; no SendMessage. Or consume `parent-escape-{sid}` once (`/parent`). No `isCheap` / trivia. Stamps: `tools-used` / `stop-block` / `need-intercept` / `parent-escape`. Skills point to cascade; do not paste protocol here.
17
+ SubagentStop (and child Stop with `subagentType`) intercepts a parseable `need:` whose jobs are all `search|exec` (cap 4): runs grunt-job in-hook and continues the child with concatenated `verdict:` blobs. Mixed/web/test, parse fail, FALLBACK, `stopHookActive`, or more than 3 intercepts per child session → empty stdout (allow stop; parent LLM path). Parent `write` is deny-by-default except `.tmp/plans/` (`persist-plan.mjs`) and `.tmp/grunt/handoffs/` (`persist-handoff.mjs`); both validate + rewrite path/content, invalid body denies. Parent Stop (`MAX_STOP=3`): do not waive impl finals for `tools-used`. Parent `end_turn` is tagged+one-line or `[orchestrator]: wait grunt`. First non-empty line must match legal `[orchestrator|grunt|implementer|thinker|handoff]:`. Claude Agent launch ≠ done; in-flight host Stop → wait recap `[orchestrator]: wait grunt` only; no SendMessage. Or consume `parent-escape-{sid}` once (`/parent` last-ditch, not “use parent tools”). No `isCheap` / trivia. Stamps: `tools-used` / `stop-block` / `need-intercept` / `parent-escape`. Skills point to cascade; do not paste protocol here.
18
18
 
19
19
  `/solo` writes `grunt-off-{sid}`; `/cascade` unlinks it (`beforeSubmitPrompt`, exact-match only). While set: PreToolUse allows parent tools (fat gate still runs) and skips the `defaultGrunt` spawn rewrite; Stop returns 0 **before** the `parent-escape` consume, so solo never burns the one-turn stamp. Session-scoped, fail-closed.
20
20