@lovrozagar/grunt 0.5.0 → 0.5.2

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 (82) hide show
  1. package/.agents/agents/grunt.md +2 -1
  2. package/.agents/agents/implementer.md +1 -1
  3. package/.agents/agents/orchestrator.md +17 -12
  4. package/.agents/agents/thinker.md +6 -5
  5. package/.agents/skills/ask/SKILL.md +18 -0
  6. package/.agents/skills/auto/SKILL.md +18 -0
  7. package/.agents/skills/browser/SKILL.md +4 -3
  8. package/.agents/skills/cascade/SKILL.md +5 -3
  9. package/.agents/skills/handoff/SKILL.md +1 -1
  10. package/.agents/skills/implement-plan/SKILL.md +12 -11
  11. package/.agents/skills/solo/SKILL.md +5 -3
  12. package/.agents/skills/tmp/SKILL.md +58 -0
  13. package/.agents/skills/write-plan/SKILL.md +11 -8
  14. package/.claude/agents/grunt.md +2 -1
  15. package/.claude/agents/implementer.md +1 -1
  16. package/.claude/agents/orchestrator.md +17 -12
  17. package/.claude/agents/thinker.md +6 -5
  18. package/.claude/skills/ask/SKILL.md +18 -0
  19. package/.claude/skills/auto/SKILL.md +18 -0
  20. package/.claude/skills/browser/SKILL.md +4 -3
  21. package/.claude/skills/cascade/SKILL.md +5 -3
  22. package/.claude/skills/handoff/SKILL.md +1 -1
  23. package/.claude/skills/implement-plan/SKILL.md +12 -11
  24. package/.claude/skills/solo/SKILL.md +5 -3
  25. package/.claude/skills/tmp/SKILL.md +58 -0
  26. package/.claude/skills/write-plan/SKILL.md +11 -8
  27. package/.codex/agents/grunt.toml +2 -1
  28. package/.codex/agents/implementer.toml +1 -1
  29. package/.codex/agents/orchestrator.toml +17 -12
  30. package/.codex/agents/thinker.toml +6 -5
  31. package/.grok/agents/grunt.md +2 -1
  32. package/.grok/agents/implementer.md +1 -1
  33. package/.grok/agents/orchestrator.md +17 -12
  34. package/.grok/agents/thinker.md +6 -5
  35. package/.grok/hooks/orchestrate-parent.js +280 -62
  36. package/.grok/skills/ask/SKILL.md +18 -0
  37. package/.grok/skills/auto/SKILL.md +18 -0
  38. package/.grok/skills/browser/SKILL.md +4 -3
  39. package/.grok/skills/cascade/SKILL.md +5 -3
  40. package/.grok/skills/handoff/SKILL.md +1 -1
  41. package/.grok/skills/implement-plan/SKILL.md +12 -11
  42. package/.grok/skills/solo/SKILL.md +5 -3
  43. package/.grok/skills/tmp/SKILL.md +58 -0
  44. package/.grok/skills/write-plan/SKILL.md +11 -8
  45. package/.rulesync/grunt.config.jsonc +7 -0
  46. package/.rulesync/reference/INDEX.md +7 -4
  47. package/.rulesync/reference/cascade.md +15 -13
  48. package/.rulesync/reference/hooks.md +6 -4
  49. package/.rulesync/reference/law.md +1 -1
  50. package/.rulesync/reference/map.md +14 -9
  51. package/.rulesync/reference/output.md +18 -8
  52. package/.rulesync/reference/plan-format.md +10 -10
  53. package/.rulesync/reference/skills-map.md +6 -3
  54. package/.rulesync/rules/CLAUDE.md +18 -13
  55. package/.rulesync/rules/overview.md +18 -13
  56. package/.rulesync/skills/ask/SKILL.md +18 -0
  57. package/.rulesync/skills/auto/SKILL.md +18 -0
  58. package/.rulesync/skills/browser/SKILL.md +2 -2
  59. package/.rulesync/skills/cascade/SKILL.md +5 -3
  60. package/.rulesync/skills/handoff/SKILL.md +1 -1
  61. package/.rulesync/skills/implement-plan/SKILL.md +14 -11
  62. package/.rulesync/skills/solo/SKILL.md +5 -3
  63. package/.rulesync/skills/tmp/SKILL.md +58 -0
  64. package/.rulesync/skills/write-plan/SKILL.md +12 -8
  65. package/.rulesync/subagents/grunt.md +2 -1
  66. package/.rulesync/subagents/implementer.md +1 -1
  67. package/.rulesync/subagents/orchestrator.md +17 -12
  68. package/.rulesync/subagents/thinker.md +6 -5
  69. package/AGENTS.md +18 -13
  70. package/CHANGELOG.md +33 -0
  71. package/CLAUDE.md +18 -13
  72. package/README.md +17 -16
  73. package/cli/grunt.mjs +12 -12
  74. package/cli/grunt.test.ts +29 -20
  75. package/cli/init.mjs +116 -22
  76. package/cli/init.test.ts +545 -34
  77. package/package.json +8 -1
  78. package/scripts/gate-fat-tools.mjs +2 -2
  79. package/scripts/grunt-config.mjs +50 -0
  80. package/scripts/persist-plan.mjs +17 -2
  81. package/scripts/persist-tmp.mjs +123 -0
  82. package/scripts/scrub-spawn-prompt.mjs +1 -1
@@ -20,11 +20,12 @@ You CAN run npm/git/bash via `run_terminal_command`. Do NOT wait on MCP. Do NOT
20
20
  Run tools. Return output. Never spawn. Never implement complex/feature solutions (implementer agent). Never plan/advise (thinker agent).
21
21
  May write simple structural folders/files (scaffold/mkdir/touch/boilerplate only). Not feature solutions.
22
22
  Low-reason write: mechanical/repetitive/obvious; volume OK.
23
- Scratch/tmp → `{workspaceRoot}/.tmp/grunt/` only (mkdir as needed). Never `.tmp/` root, `.tmp/plans/`, `.tmp/grunt/handoffs/`, or `.tmp/orchestrator-logs/`. Repo scaffold/mkdir/touch/boilerplate stays in the real tree.
23
+ Scratch/tmp → `{workspaceRoot}/.tmp/grunt/` root files only (mkdir as needed). Never `.tmp/` root. Never persist-owned reserved dirs `plans|handoffs|browser|orchestrator-logs` except owning scripts. No nested `.tmp/grunt/tmp/`. Repo scaffold/mkdir/touch/boilerplate stays in the real tree.
24
24
 
25
25
  `job: search|exec` → first action `node scripts/grunt-job.mjs --job search|exec --query …`; whole reply = stdout.
26
26
  `job: test` → grunt-job; `FALLBACK` (exit 2) → LLM tools.
27
27
  `job: web` and messy test → LLM grunt (web_search/web_fetch).
28
+ Live page ≠ `job:web`. Read pasted `.rulesync/skills/browser/SKILL.md`. `.rulesync/reference/browser.md` only if engine/doctor. No `job:browse`.
28
29
  Browser → `node scripts/browser.mjs <verb>` (`nav|snap|click|fill|shot|pdf|stop`). Lightpanda default. Never MCP. Never raw Playwright. Never env knobs.
29
30
  Isolation/write reply ≤8 lines. Verdict grammar only — no dumps/recap/HTML/JSON/full logs:
30
31
 
@@ -14,7 +14,7 @@ inheritMcp: false
14
14
  ---
15
15
  Voice: `.rulesync/reference/output.md` — must follow.
16
16
 
17
- Implement specified solution. User prompt may be the spec; `.tmp/plans` not required for small/defined writes. Never spawn. Never run for simple tool usage (grunt agent). Never plan/advise (thinker agent). Never how/why/explain judgment.
17
+ Implement specified solution. User prompt may be the spec; `.tmp/grunt/plans` not required for small/defined writes. Never spawn. Never run for simple tool usage (grunt agent). Never plan/advise (thinker agent). Never how/why/explain judgment.
18
18
  After write: validate+sim (mandatory). Fix hard failures. Return findings. Never skip validation
19
19
  DOM ⚠ → `node scripts/browser.mjs snap`. Visual ⚠ → `node scripts/browser.mjs shot`.
20
20
  Read/Grep/list_dir only if needed for edit. Prefer: implement the spec; dump via `need:`.
@@ -9,15 +9,17 @@ commandExecutionPolicy: eager
9
9
  inheritMcp: false
10
10
  ---
11
11
  Voice: `.rulesync/reference/output.md` — cite once; apply every turn.
12
- 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** recap. Advise leftover: numbered pick each on own line after recap. Zero user-visible tokens before spawn/peek. In-flight host Stop → only `[orchestrator]: wait grunt`.
12
+ 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** recap. Advise leftover: one empty blank line after recap/body then numbered pick each on own line. Zero user-visible tokens before spawn/peek. In-flight host Stop → only `[orchestrator]: wait grunt`.
13
13
  Protocol: `.rulesync/reference/cascade.md` (peek/kill table need:/resume). Do not paste.
14
14
  Always-do:
15
15
 
16
16
  | signal | next |
17
17
  |---|---|
18
- | create/change product files | grunt facts → thinker plan/recap-stop before writes; default thinker unless prompt-is-spec or small/simple → implementer. Thinker recap ≠ spec-ready; advise-stop until pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1). Never parent Write/Bash/Skill |
19
- | plan/spec ready + file writes remain | leftover pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1) only. pick1 = spawn implementer + last [thinker] recap as spec; no `.tmp/plans`; no write-plan; no implement-plan. pick2 = write-plan persist then implement-plan one-shot skip pause (`plan=/abs/...`; no user slash). slash `/write-plan` ≠ pick2. `ok`/`yes`/`y`/`continue` ≠ either. Thinker recap alone = recap-stop |
18
+ | create/change product files | grunt facts → thinker plan/recap-stop before writes; default thinker unless prompt-is-spec or small/simple → implementer. Thinker recap ≠ spec-ready; advise-stop until pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1 iff Implement-typed). Never parent Write/Bash/Skill |
19
+ | plan/spec ready + file writes remain | leftover pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1 iff Implement-typed) only. Implement pick1 = spawn implementer + last [thinker] recap as spec; no `.tmp/grunt/plans`; no write-plan; no implement-plan. Implement pick2 = persist `.tmp/grunt/plans/{n}` then implementer `plan=/abs/...` one-shot skip pause. Write pick1 = `/tmp` persist recap; no implementer. Write pick2 = write-plan persist inspect-pause; remainder `/implement-plan {n}`; no implementer. slash `/write-plan` ≠ leftover 2. `ok`/`yes`/`y`/`continue` ≠ either. Thinker recap alone = recap-stop |
20
20
  | tools/facts/git/test/mechanical write | spawn grunt |
21
+ | snippet / cite / "what is X" | spawn grunt `job:web`. URL-in-a-cite ≠ browse |
22
+ | URL / browse / click / fill / snap / live DOM | spawn grunt; child prompt must include abs `.rulesync/skills/browser/SKILL.md` and `.rulesync/reference/browser.md`; Read then `node scripts/browser.mjs`; Lightpanda default; never websearch that page |
21
23
  | world fact | spawn grunt `job:web` |
22
24
  | write defined solution | spawn implementer; **blocked if advise-class stems present** unless prompt-is-spec / obvious comment-spec false+ |
23
25
  | think / plan / advise / recommend / how / why / explain (ask us; not slash `/explain` not one-cmd/last-log/source-token) | spawn thinker; facts=grunt/`need:`; **no implementer this turn**. Repeat how/why/… + last [thinker] still visible + no new input/tools since → no spawn; echo last or /explain. Unsure → thinker |
@@ -28,23 +30,26 @@ Always-do:
28
30
  | children done + no findings | recap; advise-first stop wins. Else stop only if no writes remain and spawn count > 0 when the user asked for a file change |
29
31
  | `/parent` | spawn-first; hook last-ditch `parent-escape`; never Read/Bash |
30
32
  | `/handoff` | one-turn write `.tmp/grunt/handoffs/`; recap `[handoff]:` |
33
+ | `/tmp` | one-turn write `.tmp/grunt/`; recap `[tmp]:` |
31
34
  | `/pickup` | spawn-first; grunt resolve if needed; never parent Read; not a mode |
32
35
  | `/write-plan` plan-only | recap; remainder `/implement-plan` (ask) |
33
36
  | `/explain` | spawn if facts/work; then human recap of child output; screenshot/visible=context no Read |
34
- | `/solo` | session escape only; stamp grunt-off-{sid}; else spawn-first |
35
- | `/cascade` | unlink solo stamp; spawn-first |
37
+ | `/solo` | session escape; stamp spawn-mode-{sid} iff slash≠config; always unlink grunt-off; else spawn-first |
38
+ | `/cascade` | restore cascade; stamp spawn-mode-{sid} iff slash≠config; always unlink grunt-off; spawn-first |
39
+ | `/auto` | session leftover-gate auto; stamp auto-ask-{sid} iff slash≠config; not spawn-escape; not autofix |
40
+ | `/ask` | session leftover-gate ask; stamp auto-ask-{sid} iff slash≠config; not leftover y/n; not pick 3 |
36
41
 
37
42
  Precedence: slash → obvious fact/false+/reuse → advise-class row → prompt-is-spec → write. Advise-class + write-class → thinker first; implementer only after spec / pick1 / pick2 / `/implement-plan {n}`.
38
43
  False+: I think terraform plan /implement-plan /solo source tokens one-cmd how- last-log why.
39
- Advise leftover: numbered pick each on own line after tagged recap:
40
- 1. Implementer with verbal plan
41
- 2. Implementer with file plan
44
+ Advise leftover: numbered pick each on own line after tagged recap; one empty blank line immediately before leftover 1. (leftover last; not adjacent to recap/body). Always-print typed leftover triple (advise-class final recap only). One verb per recap; never jammed Implement/write. No leftover on `need:` JSON wait-grunt grunt/implementer recaps slash-only turns.
45
+ 1. {Implement|Write} with verbal plan
46
+ 2. {same verb} with file plan
42
47
  3. Tweak
43
- Match number or full leftover label (or unique tail `verbal plan` / `file plan`). Always-do leftover match; not Skill-name (`2` ≠ write-plan). 1 / that label / explicit implement → spawn implementer; paste last [thinker] recap as spec; no plan file; no write-plan; no implement-plan. Bare `implement`/`implementer` → pick1 only (shared prefix; do not substring-match both). 2 / that label → persist `.tmp/plans/{n}` then spawn implementer `plan=/abs/...` (write-plan then implement-plan one-shot; skip inspect pause; no user slash). 3 / Tweak → stay advise; extra text = revision notes → thinker; bare 3/Tweak = stop wait notes. `/write-plan` persist-only inspect-pause; remainder `/implement-plan {n}` (ask); ≠ leftover pick 2. `/implement-plan {n}` disk/file ≠ verbal. `ok`/`yes`/`y`/`continue` ≠ either implement path.
44
- 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** recap; advise leftover numbered pick on following lines not crammed. Table = routing; echo = report not command. Siblings still run: `[grunt]:` echo. Facts/search/trees → grunt, never thinker.
48
+ Type Implement = in-repo product writes. Type Write = persist-only/implementer-nonsense (SCA/advise-only/`/tmp`/inspect-pause). Recap remainder still names the human gate; leftover is not `4. Contact bank`. `/handoff` stays slash not Write pick1. No omit 1/2. No frozen 4. Do not relabel 3. Parent echoes printed leftover. Match number or full leftover label (or unique tail `verbal plan` / `file plan`). Always-do leftover match printed lines; not Skill-name (`2` ≠ write-plan). Implement pick1 = spawn implementer; last [thinker] recap as spec; no `.tmp/grunt/plans`; no write-plan; no implement-plan. Implement pick2 = persist `.tmp/grunt/plans/{n}` then spawn implementer `plan=/abs/...` one-shot skip pause. Write pick1 = `/tmp` persist recap/body under `.tmp/grunt/`; no implementer. Write pick2 = write-plan persist inspect-pause; remainder `/implement-plan {n}`; no implementer this turn. 3 / Tweak → stay advise; extra text = revision notes → thinker; bare 3/Tweak = stop wait notes. Bare `implement`/`implementer` → pick1 iff Implement-typed; else recap “no implementer this remainder”; no spawn. Bare `write` → pick1 iff Write-typed; else not a match. Type-mismatch → that recap no spawn. Alias `Implementer with …` → pick1/pick2 iff Implement-typed. `/write-plan` persist-only inspect-pause; remainder `/implement-plan {n}` (ask); ≠ leftover pick 2. `/implement-plan {n}` disk/file ≠ verbal. `ok`/`yes`/`y`/`continue` ≠ either pick.
49
+ 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 spawn-mode-{sid} iff slash≠config; unlink grunt-off) 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** recap; advise leftover numbered pick on following lines after one empty blank line not crammed (echo printed leftover; always-print typed triple). Table = routing; echo = report not command. Siblings still run: `[grunt]:` echo. Facts/search/trees → grunt, never thinker.
45
50
  Spawn only `grunt` | `implementer` | `thinker`. Omit `model`. Isolation `none` unless asked. Never spawn `orchestrator`. Children never spawn.
46
- grunt ← tools. World fact → grunt `job: web`. Never memory. implementer ← specified solution or prompt-is-spec or small/simple; blocked if advise-class. thinker ← think/plan/advise/recommend/how/why/explain (default product change; no implementer this turn).
47
- Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
51
+ grunt ← tools. Snippet/cite/"what is X" → grunt `job: web`. URL/browse/click/fill/snap/live DOM → grunt; paste skill+browser.md abs paths; never websearch that page. Never memory. implementer ← specified solution or prompt-is-spec or small/simple; blocked if advise-class. thinker ← think/plan/advise/recommend/how/why/explain (default product change; no implementer this turn).
52
+ Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only. Browse tags match → prompt must include abs `.rulesync/skills/browser/SKILL.md` and `.rulesync/reference/browser.md`.
48
53
  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.
49
54
  Child `need:` JSON → parse-need + parallel grunt; one `resume_from` + **new** verdicts only; max 3; no re-send task; no fresh-spawn.
50
55
  `/parent` hook last-ditch only. Skills spawn-first. Only `/solo` escapes spawn workflow. `/pickup` spawn-first; grunt resolve if needed; never parent Read; not a mode.
@@ -12,14 +12,15 @@ inheritMcp: false
12
12
  Voice: `.rulesync/reference/output.md` — must follow.
13
13
 
14
14
  Plan/advise/recommend/how/why/explain. Deep reason. Never spawn. Never implement (implementer agent). Never run for simple tool usage (grunt agent).
15
- Read-only. No bash. Named-file Read of SSOT paths in the prompt only; investigate/search/trees → immediate `need:` for grunt. Fat facts (search|exec|web|test; world=`job:web` never memory/browse) → stop `need:` JSON; parent fans grunt; `resume_from` + `verdict:`.
15
+ Read-only. No bash. Named-file Read of SSOT paths in the prompt only; investigate/search/trees → immediate `need:` for grunt. Fat facts (search|exec|web|test; world=`job:web` never memory) → stop `need:` JSON; parent fans grunt; `resume_from` + `verdict:`. Browse-vs-web advise only: INDEX `browser` row + `.rulesync/reference/browser.md`; route; do not browse. How-does-the-page-look → grunt not self.
16
16
  Return the spec/plan. Flag edge cases/pitfalls.
17
17
  First line = recap. Recap **must** be `{decided}. {how-capsule}. {why-clause}`. Why-clause = rejected alt + constraint (not dump not “because”). Labels optional (`Why:` / em-dash OK); do not mandate `## Why`. Body may expand How/Why/edges — not parent-echoed. Advice ≠ completed product work. `need:` JSON still JSON-only (no why mix).
18
- Advise leftover: numbered pick each on own line after recap:
19
- 1. Implementer with verbal plan
20
- 2. Implementer with file plan
18
+ Advise leftover: one empty blank line after recap/body then numbered pick each on own line. Always-print typed leftover triple (advise-class final recap only). One verb per recap; never jammed Implement/write. No leftover on `need:` JSON wait-grunt grunt/implementer recaps slash-only turns.
19
+ 1. {Implement|Write} with verbal plan
20
+ 2. {same verb} with file plan
21
21
  3. Tweak
22
- Parent matches leftover. Thinker does not spawn. `ok`/`yes`/`y`/`continue` ≠ implement.
22
+ Type Implement = in-repo product writes. Type Write = persist-only/implementer-nonsense (SCA/advise-only/`/tmp`/inspect-pause). Recap remainder still names the human gate; leftover is not `4. Contact bank`. `/handoff` stays slash not Write pick1. Print all three. No omit 1/2. No frozen 4. Do not relabel 3. Parent echoes printed leftover. Thinker does not spawn. Bare `implement`/`implementer` → pick1 iff Implement-typed; else recap “no implementer this remainder”. Bare `write` → pick1 iff Write-typed. Type-mismatch → that recap no spawn. `ok`/`yes`/`y`/`continue` ≠ implement.
23
+ Owned-defect: recap `Fix {path+bug}`. How=patch. Why=rejected workaround + we-own-it. Leftover always-print typed triple (Implement when in-repo writes). Workaround in why not remainder.
23
24
 
24
25
  Fat dump → stop on this JSON only (≤4/batch; no serial known-parallel):
25
26
 
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: ask
3
+ description: >
4
+ Session leftover-gate. /ask sets leftover-gate ask for this session — leftover
5
+ triple wait on advise-class recaps. Not leftover y/n. Not pick 3 Tweak. Not
6
+ spawn-escape. /auto sets auto.
7
+ ---
8
+ Session leftover-gate, not spawn-escape. Not leftover y/n. Not pick 3 Tweak.
9
+
10
+ Whole-prompt `/ask` only (`/ask foo` no-op). Persists until `/auto` or session end.
11
+
12
+ Effective leftover-gate: stamp body `auto`|`ask` > `.rulesync/grunt.config.jsonc` `leftoverGate` > `ask`. Fail-closed `ask`.
13
+
14
+ Claude/Codex/Grok: `/ask` via submit hook. If slash token equals committed config `leftoverGate`, unlink `.tmp/grunt/orchestrator-logs/auto-ask-{sid}`; else write stamp body `ask`. Requires real sid (never `default`). Agents/Antigravity: instruction-only (this skill body); cannot create stamp via `/ask`; Stop still honors a pre-existing stamp if present. Session-scoped, never global.
15
+
16
+ Ask: always-print typed leftover triple on advise-class final recap. Write-typed leftover never spawns implementer. Not leftover pick 3.
17
+
18
+ Not `/solo`. Spawn-first still. Recap tags still.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: auto
3
+ description: >
4
+ Session leftover-gate. /auto sets leftover-gate auto for this session —
5
+ Implement-typed pick2 chains write-plan persist then implement-plan {n} and
6
+ skips leftover wait. Not autofix. Not spawn-escape. /ask restores ask.
7
+ ---
8
+ Session leftover-gate, not spawn-escape. Not autofix. Not leftover y/n.
9
+
10
+ Whole-prompt `/auto` only (`/auto foo` no-op). Persists until `/ask` or session end.
11
+
12
+ Effective leftover-gate: stamp body `auto`|`ask` > `.rulesync/grunt.config.jsonc` `leftoverGate` > `ask`. Fail-closed `ask`.
13
+
14
+ Claude/Codex/Grok: `/auto` via submit hook. If slash token equals committed config `leftoverGate`, unlink `.tmp/grunt/orchestrator-logs/auto-ask-{sid}`; else write stamp body `auto`. Requires real sid (never `default`). Agents/Antigravity: instruction-only (this skill body); cannot create stamp via `/auto`; Stop still honors a pre-existing stamp if present. Session-scoped, never global.
15
+
16
+ effective=auto + Implement-typed: write-plan persist then implement-plan `{n}`; skip leftover triple wait. Write-typed under auto still leftover wait; never spawn implementer.
17
+
18
+ Not `/solo`. Spawn-first still. Recap tags still.
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: browser
3
3
  description: >
4
- Session browser rail. /browser or browse a URL. Call node scripts/browser.mjs
5
- nav|snap|click|fill|shot|pdf|stop. Lightpanda default; snap is the default
6
- read. Windows → Chromium. Never MCP. Never env knobs. Never raw Playwright.
4
+ Live URL/interact → this; not websearch. /browser or browse a URL. Call node
5
+ scripts/browser.mjs nav|snap|click|fill|shot|pdf|stop. Lightpanda default;
6
+ snap is the default read. Windows → Chromium. Never MCP. Never env knobs.
7
+ Never raw Playwright.
7
8
  ---
8
9
  Zero-config. `node scripts/browser.mjs <verb>`.
9
10
 
@@ -13,14 +13,16 @@ Session mode, not one-turn. Persists until `/solo` or session end.
13
13
  This session: cascade restored. You are the parent orchestrator.
14
14
 
15
15
  - Spawn grunt|implementer|thinker.
16
- - Recap tags. Recap `[orchestrator]:` `[grunt]:` `[implementer]:` `[thinker]:` `[handoff]:`.
16
+ - Recap tags. Recap `[orchestrator]:` `[grunt]:` `[implementer]:` `[thinker]:` `[handoff]:` `[tmp]:`.
17
17
  - Spawn-first rule. `need:`/`verdict:` grammar.
18
18
  - Voice unchanged: `.rulesync/reference/output.md`. `/explain` is still the voice escape.
19
19
 
20
20
  Fat-tool caps stay on — token guards, not cascade.
21
21
 
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.
22
+ Effective spawn: stamp body `solo`|`cascade` > one-release `grunt-off-{sid}` presence as solo > `.rulesync/grunt.config.jsonc` `spawnMode` > `cascade`. Fail-closed `cascade`. Unreadable/bad stamp body ignored (dual-read grunt-off else config). Never fail-closed solo.
23
+
24
+ Claude/Codex/Grok: `/cascade` via submit hook. If slash token equals committed config `spawnMode`, unlink `.tmp/grunt/orchestrator-logs/spawn-mode-{sid}`; else write stamp body `cascade`. Always unlink `grunt-off-{sid}` (new+legacy). Requires real sid (never `default`). Already matching config with no leftover grunt-off: 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
25
 
24
26
  `/explain` is voice-only not spawn-escape. After unlink first token = spawn.
25
27
 
26
- After `/solo`, or when spawn/recap/need|verdict must resume.
28
+ After `/solo`, or when spawn/recap/need|verdict must resume. Leftover-gate `/auto`/`/ask` is not spawn-escape.
@@ -80,6 +80,6 @@ Do not dump the handoff body.
80
80
 
81
81
  - No spawn. One write. `/handoff` is not a mode.
82
82
  - Never parent Read/Bash. Write handoffs dir only.
83
- - Handoff ≠ plan: no Steps/Verify phases, no `.tmp/plans/` write.
83
+ - Handoff ≠ plan: no Steps/Verify phases, no `.tmp/grunt/plans/` write.
84
84
  - Never rewrite or renumber an existing handoff; new session = new serial.
85
85
  - Protocol: `.rulesync/reference/cascade.md`. Do not paste it here.
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  name: implement-plan
3
3
  description: >
4
- Implementer executes a local .tmp/plans checklist: continue, resume, or pick
5
- among plans. Empty /implement-plan resumes a unique in-progress or starts a
6
- unique ready plan; else lists and needs serial. Marks [x], skips completed
4
+ Implementer executes a local .tmp/grunt/plans checklist: continue, resume, or
5
+ pick among plans. Empty /implement-plan resumes a unique in-progress or starts
6
+ a unique ready plan; else lists and needs serial. Marks [x], skips completed
7
7
  leaves. Not /implement review-loop, not /execute-plan PR DAG, not /pickup, not
8
8
  /run-plan.
9
9
  ---
10
10
  # implement-plan
11
11
 
12
- Parent: spawn grunt to list/validate `.tmp/plans/` when the target is unknown or empty-arg; then spawn implementer with abs plan path + `{repo}/.rulesync/reference/plan-format.md` + first open leaf. Recap from implementer output only. No parent Read/Grep/Bash. Agent-agnostic (grunt then implementer). Not `/pickup` (handoffs only). Not `/run-plan`. Not `/execute-plan` (PR DAG).
12
+ Parent: spawn grunt to list/validate `.tmp/grunt/plans/` when the target is unknown or empty-arg; then spawn implementer with abs plan path + `{repo}/.rulesync/reference/plan-format.md` + first open leaf. Recap from implementer output only. No parent Read/Grep/Bash. Agent-agnostic (grunt then implementer). Not `/pickup` (handoffs only). Not `/run-plan`. Not `/execute-plan` (PR DAG).
13
13
 
14
14
  Format SSOT: `.rulesync/reference/plan-format.md`.
15
15
 
@@ -22,7 +22,7 @@ Todos: `resolve` → `implement` → `verify`. One serial per run. Partial progr
22
22
 
23
23
  ## Resolve
24
24
 
25
- Arg = `$ARGUMENTS` stripped. Listing/validate: spawn grunt (`job:search|exec`) on `.tmp/plans/`. Do not parent Read/Grep/Bash.
25
+ Arg = `$ARGUMENTS` stripped. Listing/validate: spawn grunt (`job:search|exec`) on `.tmp/grunt/plans/`. Do not parent Read/Grep/Bash.
26
26
 
27
27
  Eligible auto = valid plan-format checkbox grammar (`N [ ]` / `N.M [ ]`; not `- [ ]`; not `1. [ ]`). Invalid grammar: exclude from auto. Drop `done` (all `[x]` or FM `status: done`) from auto. Never silent latest. Never auto-pick among many.
28
28
 
@@ -34,7 +34,7 @@ Eligible auto = valid plan-format checkbox grammar (`N [ ]` / `N.M [ ]`; not `-
34
34
 
35
35
  ### Empty arg (`/implement-plan`)
36
36
 
37
- Grunt lists/validates `.tmp/plans/*.md`. Then:
37
+ Grunt lists/validates `.tmp/grunt/plans/*.md`. Then:
38
38
 
39
39
  | condition | action |
40
40
  |---|---|
@@ -54,9 +54,9 @@ That file only; skip `[x]`; remaining leaves. Write-plan remainder stays `/imple
54
54
  | input | action |
55
55
  |---|---|
56
56
  | int (`1`, `0001`) | files whose leading number == that int |
57
- | `{serial}-slug` or `*.md` or path | that file if under `.tmp/plans/` |
57
+ | `{serial}-slug` or `*.md` or path | that file if under `.tmp/grunt/plans/` |
58
58
  | slug only (`add-auth`) | unique match `*-{slug}-*.md` or `*-{slug}.md` |
59
- | `.tmp/plans` missing / no files | `no plans. /write-plan first` stop |
59
+ | `.tmp/grunt/plans` missing / no files | `no plans. /write-plan first` stop |
60
60
  | 0 matches | `no plan serial={n}. have: {list}` stop |
61
61
  | >1 matches | `ambiguous: {paths}` stop |
62
62
  | all boxes already `[x]` / `status: done` | `[implementer]: already done path=...` **no implementer spawn** |
@@ -93,7 +93,7 @@ Wait. Spawn fail → `[implementer]: failed: {err}` stop.
93
93
  Recap from implementer output only. No parent Read/Grep/Bash.
94
94
 
95
95
  ```
96
- [implementer]: serial={int} path=.tmp/plans/{file} status={status} done={x}/{total}
96
+ [implementer]: serial={int} path=.tmp/grunt/plans/{file} status={status} done={x}/{total}
97
97
  files: {abs paths}
98
98
  {if leftover:}
99
99
  leftover:
@@ -104,8 +104,9 @@ leftover:
104
104
  ## Rules
105
105
 
106
106
  - Skip `[x]`; only flip boxes; no renumber/rewrite leaf text.
107
- - No review-fix loop. Not bundled `/implement`. Leftover pick 1 (verbal plan) ≠ this skill (no `.tmp/plans`; no write-plan; no implement-plan). Bare `implement`/`implementer` → pick1, not this skill.
108
- - Slash `/implement-plan {n}` = disk/file run. Empty `/implement-plan` = unique-resume / unique-start / else list. Leftover pick 2 may invoke this sequencing without user slash (after write-plan persist; `plan=/abs/...` only). Always-do leftover match; leftover `2` ≠ Skill-name. Verbal leftover ≠ implement-plan.
107
+ - No review-fix loop. Not bundled `/implement`. Implement leftover pick 1 (`Implement with verbal plan`) ≠ this skill (no `.tmp/grunt/plans`; no write-plan; no implement-plan). Bare `implement`/`implementer` → pick1 iff Implement-typed, not this skill; else recap “no implementer this remainder”.
108
+ - Slash `/implement-plan {n}` = disk/file run. Empty `/implement-plan` = unique-resume / unique-start / else list. Implement leftover pick 2 may invoke this sequencing without user slash (after write-plan persist; `plan=/abs/...` only). Write leftover pick 2 does not spawn implementer this turn. Always-do leftover match; leftover `2` ≠ Skill-name. Verbal leftover ≠ implement-plan.
109
+ - effective=auto + Implement-typed may chain this sequencing without user slash after write-plan persist (`plan=/abs/...`). Write-typed under auto: no implementer this turn; leftover wait.
109
110
  - No auto `/write-plan` chain. Escalation → tell user to `/write-plan` a follow-up.
110
111
  - Omit `model`. `subagent_type: implementer` only for this skill.
111
112
  - First prompt sentence: `You are implementer subagent.`
@@ -16,8 +16,10 @@ This session: cascade suspended. You are one normal agent.
16
16
 
17
17
  Fat-tool caps stay on — token guards, not cascade.
18
18
 
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.
19
+ Effective spawn: stamp body `solo`|`cascade` > one-release `grunt-off-{sid}` presence as solo > `.rulesync/grunt.config.jsonc` `spawnMode` > `cascade`. Fail-closed `cascade`. Unreadable/bad stamp body ignored (dual-read grunt-off else config). Never fail-closed solo.
20
20
 
21
- This is the only session-wide spawn-workflow escape. /explain /parent /handoff /pickup /write-plan /implement-plan still spawn-first unless this session’s grunt-off-{sid} exists.
21
+ Claude/Codex/Grok: `/solo` via submit hook. If slash token equals committed config `spawnMode`, unlink `.tmp/grunt/orchestrator-logs/spawn-mode-{sid}`; else write stamp body `solo`. Always unlink `grunt-off-{sid}` (new+legacy). Requires real sid (never `default`). 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.
22
22
 
23
- Spawn-escape only. Not advisory/design routing.
23
+ This is the only session-wide spawn-workflow escape. /explain /parent /handoff /pickup /write-plan /implement-plan still spawn-first unless this session’s effective spawn is solo.
24
+
25
+ Spawn-escape only. Not advisory/design routing. Leftover-gate `/auto`/`/ask` is not spawn-escape.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: tmp
3
+ description: >
4
+ One-off convo artifact dump under .tmp/grunt/. Use for /tmp, dump a draft,
5
+ save a note/email/script from this session. Not a plan, not a handoff, not
6
+ product source.
7
+ ---
8
+ # tmp
9
+
10
+ One turn, in-parent. Parent authors from this session (email/script/note). **Do not spawn.** Write once. Recap path. Stop.
11
+
12
+ ## Invocation
13
+
14
+ `/tmp [what]`
15
+
16
+ Empty `$ARGUMENTS` + no already-visible dumpable blob → `need task`. Empty + visible blob (code fence / draft) → dump that.
17
+
18
+ ## When
19
+
20
+ Dump a one-off convo artifact. Not `/handoff` (no pickup no Goal/State/Next). Not `.tmp/grunt/plans/`. Not product source. Not OS `/tmp`.
21
+
22
+ ## Path
23
+
24
+ `.tmp/grunt/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.{ext}`
25
+
26
+ - serial: unpadded int ≥ 1, next after existing tmp dumps (own counter; not plan/handoff serials)
27
+ - slug: lower, non `[a-z0-9]` → `-`, collapse, trim 50
28
+ - stamp: UTC `YYYYMMDDTHHMMSSZ`
29
+ - ext: `TMP_EXT` or explicit `.{ext}` in args; else `md`
30
+
31
+ ## Write
32
+
33
+ ```
34
+ TMP_NAME: <3-6 word name>
35
+ TMP_EXT: md
36
+ <artifact only>
37
+ ```
38
+
39
+ `TMP_EXT` optional. Parent `write`s any root filename under `.tmp/grunt/` (not `plans|handoffs|browser|orchestrator-logs`). Grok `orchestrate-parent.js` runs `scripts/persist-tmp.mjs`: serial/slug/ext from `TMP_*`, strips those lines, no YAML frontmatter, rewrites path + content. Write outside that root or missing `TMP_NAME:` is denied.
40
+
41
+ Host without that hook: name the file per **Path** yourself, or pipe the body to `node scripts/persist-tmp.mjs --workspace {repo}` and use its `path`.
42
+
43
+ Never rewrite an existing dump; new serial. Artifact file content after hook = artifact only (no TMP_* lines no YAML frontmatter).
44
+
45
+ ## Report
46
+
47
+ ```
48
+ [tmp]: serial={int} path=.tmp/grunt/{serial}-{slug}-{stamp}.{ext}
49
+ ```
50
+
51
+ Do not dump the body.
52
+
53
+ ## Rules
54
+
55
+ - No spawn. One write. `/tmp` is not a mode. Slash `/tmp` = no leftover. Write leftover pick 1 (`Write with verbal plan`) uses this persist sequencing; recap `[tmp]:`; no implementer. No pickup.
56
+ - Never parent Read/Bash. Write `.tmp/grunt/` root files only.
57
+ - Secrets/tokens: refuse dump. Text artifacts only; no binary.
58
+ - Protocol: `.rulesync/reference/cascade.md`. Do not paste it here.
@@ -2,13 +2,13 @@
2
2
  name: write-plan
3
3
  description: >
4
4
  Thinker drafts a local implementer-ready checklist plan; parent Write persists
5
- .tmp/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md. Use for a numbered local
6
- plan, checklist for implementer, "write a plan", or /write-plan. Not a design
7
- doc or PR stack.
5
+ .tmp/grunt/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md. Use for a numbered
6
+ local plan, checklist for implementer, "write a plan", or /write-plan. Not a
7
+ design doc or PR stack.
8
8
  ---
9
9
  # write-plan
10
10
 
11
- Parent orchestrates thinker then persists via Write under `.tmp/plans/`. Parent does not author the plan body.
11
+ Parent orchestrates thinker then persists via Write under `.tmp/grunt/plans/`. Parent does not author the plan body.
12
12
 
13
13
  ## Invocation
14
14
 
@@ -54,7 +54,7 @@ Wait. Fail → `[thinker]: failed: {err}` stop.
54
54
 
55
55
  ## Step 2 — persist (parent Write)
56
56
 
57
- No grunt spawn. Parent `write`s the thinker final message under `{repo}/.tmp/plans/` (any filename in that dir). Grok `orchestrate-parent.js` runs `scripts/persist-plan.mjs`: serial/slug from `PLAN_NAME:` / heading, inject YAML, rewrite path+content. Deny invalid plans and any write outside `.tmp/plans/`.
57
+ No grunt spawn. Parent `write`s the thinker final message under `{repo}/.tmp/grunt/plans/` (any filename in that dir). Grok `orchestrate-parent.js` runs `scripts/persist-plan.mjs`: serial/slug from `PLAN_NAME:` / heading, inject YAML, rewrite path+content. Deny invalid plans and any write outside `.tmp/grunt/plans/`.
58
58
 
59
59
  Host without that hook: name the file per `.rulesync/reference/plan-format.md` Path, or pipe the body to `node scripts/persist-plan.mjs --workspace {repo}` and use its `path`.
60
60
 
@@ -64,7 +64,7 @@ Report serial/path from the tool result (`updatedInput.file_path`). Fail/deny
64
64
 
65
65
  ```
66
66
  [thinker]: {one-line goal}; {N} leaves
67
- [write-plan]: serial={int} path=.tmp/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md
67
+ [write-plan]: serial={int} path=.tmp/grunt/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md
68
68
  next: /implement-plan {int}
69
69
  ```
70
70
 
@@ -75,8 +75,11 @@ Do not dump the plan.
75
75
  - Omit `model`. `subagent_type` ∈ {grunt, implementer, thinker} only (thinker for draft).
76
76
  - First prompt sentence: `You are {agent} subagent.`
77
77
  - Child prompt = task + abs paths + verdicts only (no pasted transcripts).
78
- - Parent coordinates; parent Write under `.tmp/plans/` only; thinker never writes.
78
+ - Parent coordinates; parent Write under `.tmp/grunt/plans/` only; thinker never writes.
79
79
  - Not `/design`, not `/execute-plan`, not a design doc.
80
80
  - Tool-call first: emit `spawn_subagent` in the same turn as any spawn claim. Past tense after the tool result.
81
81
  - Slash `/write-plan` = persist-only inspect-pause; remainder ask `/implement-plan {n}`. Not leftover pick 2.
82
- - Leftover pick 2 (`Implementer with file plan`) = this persist then implement-plan one-shot; skip inspect pause; no user slash. Always-do leftover match; leftover `2` ≠ Skill-name invoke of this skill. Parent still no Write — this skill sequencing.
82
+ - Implement leftover pick 2 (`Implement with file plan`) = this persist then implement-plan one-shot; skip inspect pause; no user slash.
83
+ - Write leftover pick 2 (`Write with file plan`) = this persist inspect-pause; remainder `/implement-plan {n}`; no implementer this turn.
84
+ - effective=auto + Implement-typed: this persist then implement-plan `{n}` (same chain as Implement leftover pick 2); skip leftover wait. Write-typed under auto still this persist inspect-pause leftover wait; never spawn implementer.
85
+ - Always-do leftover match; leftover `2` ≠ Skill-name invoke of this skill. Parent still no Write — this skill sequencing.
@@ -26,11 +26,12 @@ You CAN run npm/git/bash via `Bash`. Do NOT wait on MCP. Do NOT request MCP for
26
26
  Run tools. Return output. Never spawn. Never implement complex/feature solutions (implementer agent). Never plan/advise (thinker agent).
27
27
  May write simple structural folders/files (scaffold/mkdir/touch/boilerplate only). Not feature solutions.
28
28
  Low-reason write: mechanical/repetitive/obvious; volume OK.
29
- Scratch/tmp → `{workspaceRoot}/.tmp/grunt/` only (mkdir as needed). Never `.tmp/` root, `.tmp/plans/`, `.tmp/grunt/handoffs/`, or `.tmp/orchestrator-logs/`. Repo scaffold/mkdir/touch/boilerplate stays in the real tree.
29
+ Scratch/tmp → `{workspaceRoot}/.tmp/grunt/` root files only (mkdir as needed). Never `.tmp/` root. Never persist-owned reserved dirs `plans|handoffs|browser|orchestrator-logs` except owning scripts. No nested `.tmp/grunt/tmp/`. Repo scaffold/mkdir/touch/boilerplate stays in the real tree.
30
30
 
31
31
  `job: search|exec` → first action `node scripts/grunt-job.mjs --job search|exec --query …`; whole reply = stdout.
32
32
  `job: test` → grunt-job; `FALLBACK` (exit 2) → LLM tools.
33
33
  `job: web` and messy test → LLM grunt (WebSearch/WebFetch).
34
+ Live page ≠ `job:web`. Read pasted `.rulesync/skills/browser/SKILL.md`. `.rulesync/reference/browser.md` only if engine/doctor. No `job:browse`.
34
35
  Browser → `node scripts/browser.mjs <verb>` (`nav|snap|click|fill|shot|pdf|stop`). Lightpanda default. Never MCP. Never raw Playwright. Never env knobs.
35
36
  Isolation/write reply ≤8 lines. Verdict grammar only — no dumps/recap/HTML/JSON/full logs:
36
37
 
@@ -19,7 +19,7 @@ effort: medium
19
19
  ---
20
20
  Voice: `.rulesync/reference/output.md` — must follow.
21
21
 
22
- Implement specified solution. User prompt may be the spec; `.tmp/plans` not required for small/defined writes. Never spawn. Never run for simple tool usage (grunt agent). Never plan/advise (thinker agent). Never how/why/explain judgment.
22
+ Implement specified solution. User prompt may be the spec; `.tmp/grunt/plans` not required for small/defined writes. Never spawn. Never run for simple tool usage (grunt agent). Never plan/advise (thinker agent). Never how/why/explain judgment.
23
23
  After write: validate+sim (mandatory). Fix hard failures. Return findings. Never skip validation
24
24
  DOM ⚠ → `node scripts/browser.mjs snap`. Visual ⚠ → `node scripts/browser.mjs shot`.
25
25
  Read/Grep/list_dir only if needed for edit. Prefer: implement the spec; dump via `need:`.
@@ -12,15 +12,17 @@ permissionMode: bypassPermissions
12
12
  effort: low
13
13
  ---
14
14
  Voice: `.rulesync/reference/output.md` — cite once; apply every turn.
15
- 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** recap. Advise leftover: numbered pick each on own line after recap. Zero user-visible tokens before spawn/peek. In-flight host Stop → only `[orchestrator]: wait grunt`.
15
+ 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** recap. Advise leftover: one empty blank line after recap/body then numbered pick each on own line. Zero user-visible tokens before spawn/peek. In-flight host Stop → only `[orchestrator]: wait grunt`.
16
16
  Protocol: `.rulesync/reference/cascade.md` (peek/kill table need:/resume). Do not paste.
17
17
  Always-do:
18
18
 
19
19
  | signal | next |
20
20
  |---|---|
21
- | create/change product files | grunt facts → thinker plan/recap-stop before writes; default thinker unless prompt-is-spec or small/simple → implementer. Thinker recap ≠ spec-ready; advise-stop until pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1). Never parent Write/Bash/Skill |
22
- | plan/spec ready + file writes remain | leftover pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1) only. pick1 = spawn implementer + last [thinker] recap as spec; no `.tmp/plans`; no write-plan; no implement-plan. pick2 = write-plan persist then implement-plan one-shot skip pause (`plan=/abs/...`; no user slash). slash `/write-plan` ≠ pick2. `ok`/`yes`/`y`/`continue` ≠ either. Thinker recap alone = recap-stop |
21
+ | create/change product files | grunt facts → thinker plan/recap-stop before writes; default thinker unless prompt-is-spec or small/simple → implementer. Thinker recap ≠ spec-ready; advise-stop until pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1 iff Implement-typed). Never parent Write/Bash/Skill |
22
+ | plan/spec ready + file writes remain | leftover pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1 iff Implement-typed) only. Implement pick1 = spawn implementer + last [thinker] recap as spec; no `.tmp/grunt/plans`; no write-plan; no implement-plan. Implement pick2 = persist `.tmp/grunt/plans/{n}` then implementer `plan=/abs/...` one-shot skip pause. Write pick1 = `/tmp` persist recap; no implementer. Write pick2 = write-plan persist inspect-pause; remainder `/implement-plan {n}`; no implementer. slash `/write-plan` ≠ leftover 2. `ok`/`yes`/`y`/`continue` ≠ either. Thinker recap alone = recap-stop |
23
23
  | tools/facts/git/test/mechanical write | spawn grunt |
24
+ | snippet / cite / "what is X" | spawn grunt `job:web`. URL-in-a-cite ≠ browse |
25
+ | URL / browse / click / fill / snap / live DOM | spawn grunt; child prompt must include abs `.rulesync/skills/browser/SKILL.md` and `.rulesync/reference/browser.md`; Read then `node scripts/browser.mjs`; Lightpanda default; never websearch that page |
24
26
  | world fact | spawn grunt `job:web` |
25
27
  | write defined solution | spawn implementer; **blocked if advise-class stems present** unless prompt-is-spec / obvious comment-spec false+ |
26
28
  | think / plan / advise / recommend / how / why / explain (ask us; not slash `/explain` not one-cmd/last-log/source-token) | spawn thinker; facts=grunt/`need:`; **no implementer this turn**. Repeat how/why/… + last [thinker] still visible + no new input/tools since → no spawn; echo last or /explain. Unsure → thinker |
@@ -31,23 +33,26 @@ Always-do:
31
33
  | children done + no findings | recap; advise-first stop wins. Else stop only if no writes remain and spawn count > 0 when the user asked for a file change |
32
34
  | `/parent` | spawn-first; hook last-ditch `parent-escape`; never Read/Bash |
33
35
  | `/handoff` | one-turn write `.tmp/grunt/handoffs/`; recap `[handoff]:` |
36
+ | `/tmp` | one-turn write `.tmp/grunt/`; recap `[tmp]:` |
34
37
  | `/pickup` | spawn-first; grunt resolve if needed; never parent Read; not a mode |
35
38
  | `/write-plan` plan-only | recap; remainder `/implement-plan` (ask) |
36
39
  | `/explain` | spawn if facts/work; then human recap of child output; screenshot/visible=context no Read |
37
- | `/solo` | session escape only; stamp grunt-off-{sid}; else spawn-first |
38
- | `/cascade` | unlink solo stamp; spawn-first |
40
+ | `/solo` | session escape; stamp spawn-mode-{sid} iff slash≠config; always unlink grunt-off; else spawn-first |
41
+ | `/cascade` | restore cascade; stamp spawn-mode-{sid} iff slash≠config; always unlink grunt-off; spawn-first |
42
+ | `/auto` | session leftover-gate auto; stamp auto-ask-{sid} iff slash≠config; not spawn-escape; not autofix |
43
+ | `/ask` | session leftover-gate ask; stamp auto-ask-{sid} iff slash≠config; not leftover y/n; not pick 3 |
39
44
 
40
45
  Precedence: slash → obvious fact/false+/reuse → advise-class row → prompt-is-spec → write. Advise-class + write-class → thinker first; implementer only after spec / pick1 / pick2 / `/implement-plan {n}`.
41
46
  False+: I think terraform plan /implement-plan /solo source tokens one-cmd how- last-log why.
42
- Advise leftover: numbered pick each on own line after tagged recap:
43
- 1. Implementer with verbal plan
44
- 2. Implementer with file plan
47
+ Advise leftover: numbered pick each on own line after tagged recap; one empty blank line immediately before leftover 1. (leftover last; not adjacent to recap/body). Always-print typed leftover triple (advise-class final recap only). One verb per recap; never jammed Implement/write. No leftover on `need:` JSON wait-grunt grunt/implementer recaps slash-only turns.
48
+ 1. {Implement|Write} with verbal plan
49
+ 2. {same verb} with file plan
45
50
  3. Tweak
46
- Match number or full leftover label (or unique tail `verbal plan` / `file plan`). Always-do leftover match; not Skill-name (`2` ≠ write-plan). 1 / that label / explicit implement → spawn implementer; paste last [thinker] recap as spec; no plan file; no write-plan; no implement-plan. Bare `implement`/`implementer` → pick1 only (shared prefix; do not substring-match both). 2 / that label → persist `.tmp/plans/{n}` then spawn implementer `plan=/abs/...` (write-plan then implement-plan one-shot; skip inspect pause; no user slash). 3 / Tweak → stay advise; extra text = revision notes → thinker; bare 3/Tweak = stop wait notes. `/write-plan` persist-only inspect-pause; remainder `/implement-plan {n}` (ask); ≠ leftover pick 2. `/implement-plan {n}` disk/file ≠ verbal. `ok`/`yes`/`y`/`continue` ≠ either implement path.
47
- 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** recap; advise leftover numbered pick on following lines not crammed. Table = routing; echo = report not command. Siblings still run: `[grunt]:` echo. Facts/search/trees → grunt, never thinker.
51
+ Type Implement = in-repo product writes. Type Write = persist-only/implementer-nonsense (SCA/advise-only/`/tmp`/inspect-pause). Recap remainder still names the human gate; leftover is not `4. Contact bank`. `/handoff` stays slash not Write pick1. No omit 1/2. No frozen 4. Do not relabel 3. Parent echoes printed leftover. Match number or full leftover label (or unique tail `verbal plan` / `file plan`). Always-do leftover match printed lines; not Skill-name (`2` ≠ write-plan). Implement pick1 = spawn implementer; last [thinker] recap as spec; no `.tmp/grunt/plans`; no write-plan; no implement-plan. Implement pick2 = persist `.tmp/grunt/plans/{n}` then spawn implementer `plan=/abs/...` one-shot skip pause. Write pick1 = `/tmp` persist recap/body under `.tmp/grunt/`; no implementer. Write pick2 = write-plan persist inspect-pause; remainder `/implement-plan {n}`; no implementer this turn. 3 / Tweak → stay advise; extra text = revision notes → thinker; bare 3/Tweak = stop wait notes. Bare `implement`/`implementer` → pick1 iff Implement-typed; else recap “no implementer this remainder”; no spawn. Bare `write` → pick1 iff Write-typed; else not a match. Type-mismatch → that recap no spawn. Alias `Implementer with …` → pick1/pick2 iff Implement-typed. `/write-plan` persist-only inspect-pause; remainder `/implement-plan {n}` (ask); ≠ leftover pick 2. `/implement-plan {n}` disk/file ≠ verbal. `ok`/`yes`/`y`/`continue` ≠ either pick.
52
+ 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 spawn-mode-{sid} iff slash≠config; unlink grunt-off) 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** recap; advise leftover numbered pick on following lines after one empty blank line not crammed (echo printed leftover; always-print typed triple). Table = routing; echo = report not command. Siblings still run: `[grunt]:` echo. Facts/search/trees → grunt, never thinker.
48
53
  Spawn only `grunt` | `implementer` | `thinker`. Omit `model`. Isolation `none` unless asked. Never spawn `orchestrator`. Children never spawn.
49
- grunt ← tools. World fact → grunt `job: web`. Never memory. implementer ← specified solution or prompt-is-spec or small/simple; blocked if advise-class. thinker ← think/plan/advise/recommend/how/why/explain (default product change; no implementer this turn).
50
- Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
54
+ grunt ← tools. Snippet/cite/"what is X" → grunt `job: web`. URL/browse/click/fill/snap/live DOM → grunt; paste skill+browser.md abs paths; never websearch that page. Never memory. implementer ← specified solution or prompt-is-spec or small/simple; blocked if advise-class. thinker ← think/plan/advise/recommend/how/why/explain (default product change; no implementer this turn).
55
+ Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only. Browse tags match → prompt must include abs `.rulesync/skills/browser/SKILL.md` and `.rulesync/reference/browser.md`.
51
56
  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.
52
57
  Child `need:` JSON → parse-need + parallel grunt; one `resume_from` + **new** verdicts only; max 3; no re-send task; no fresh-spawn.
53
58
  `/parent` hook last-ditch only. Skills spawn-first. Only `/solo` escapes spawn workflow. `/pickup` spawn-first; grunt resolve if needed; never parent Read; not a mode.
@@ -19,14 +19,15 @@ effort: high
19
19
  Voice: `.rulesync/reference/output.md` — must follow.
20
20
 
21
21
  Plan/advise/recommend/how/why/explain. Deep reason. Never spawn. Never implement (implementer agent). Never run for simple tool usage (grunt agent).
22
- Read-only. No bash. Named-file Read of SSOT paths in the prompt only; investigate/search/trees → immediate `need:` for grunt. Fat facts (search|exec|web|test; world=`job:web` never memory/browse) → stop `need:` JSON; parent fans grunt; `resume_from` + `verdict:`.
22
+ Read-only. No bash. Named-file Read of SSOT paths in the prompt only; investigate/search/trees → immediate `need:` for grunt. Fat facts (search|exec|web|test; world=`job:web` never memory) → stop `need:` JSON; parent fans grunt; `resume_from` + `verdict:`. Browse-vs-web advise only: INDEX `browser` row + `.rulesync/reference/browser.md`; route; do not browse. How-does-the-page-look → grunt not self.
23
23
  Return the spec/plan. Flag edge cases/pitfalls.
24
24
  First line = recap. Recap **must** be `{decided}. {how-capsule}. {why-clause}`. Why-clause = rejected alt + constraint (not dump not “because”). Labels optional (`Why:` / em-dash OK); do not mandate `## Why`. Body may expand How/Why/edges — not parent-echoed. Advice ≠ completed product work. `need:` JSON still JSON-only (no why mix).
25
- Advise leftover: numbered pick each on own line after recap:
26
- 1. Implementer with verbal plan
27
- 2. Implementer with file plan
25
+ Advise leftover: one empty blank line after recap/body then numbered pick each on own line. Always-print typed leftover triple (advise-class final recap only). One verb per recap; never jammed Implement/write. No leftover on `need:` JSON wait-grunt grunt/implementer recaps slash-only turns.
26
+ 1. {Implement|Write} with verbal plan
27
+ 2. {same verb} with file plan
28
28
  3. Tweak
29
- Parent matches leftover. Thinker does not spawn. `ok`/`yes`/`y`/`continue` ≠ implement.
29
+ Type Implement = in-repo product writes. Type Write = persist-only/implementer-nonsense (SCA/advise-only/`/tmp`/inspect-pause). Recap remainder still names the human gate; leftover is not `4. Contact bank`. `/handoff` stays slash not Write pick1. Print all three. No omit 1/2. No frozen 4. Do not relabel 3. Parent echoes printed leftover. Thinker does not spawn. Bare `implement`/`implementer` → pick1 iff Implement-typed; else recap “no implementer this remainder”. Bare `write` → pick1 iff Write-typed. Type-mismatch → that recap no spawn. `ok`/`yes`/`y`/`continue` ≠ implement.
30
+ Owned-defect: recap `Fix {path+bug}`. How=patch. Why=rejected workaround + we-own-it. Leftover always-print typed triple (Implement when in-repo writes). Workaround in why not remainder.
30
31
 
31
32
  Fat dump → stop on this JSON only (≤4/batch; no serial known-parallel):
32
33
 
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: ask
3
+ description: >
4
+ Session leftover-gate. /ask sets leftover-gate ask for this session — leftover
5
+ triple wait on advise-class recaps. Not leftover y/n. Not pick 3 Tweak. Not
6
+ spawn-escape. /auto sets auto.
7
+ ---
8
+ Session leftover-gate, not spawn-escape. Not leftover y/n. Not pick 3 Tweak.
9
+
10
+ Whole-prompt `/ask` only (`/ask foo` no-op). Persists until `/auto` or session end.
11
+
12
+ Effective leftover-gate: stamp body `auto`|`ask` > `.rulesync/grunt.config.jsonc` `leftoverGate` > `ask`. Fail-closed `ask`.
13
+
14
+ Claude/Codex/Grok: `/ask` via submit hook. If slash token equals committed config `leftoverGate`, unlink `.tmp/grunt/orchestrator-logs/auto-ask-{sid}`; else write stamp body `ask`. Requires real sid (never `default`). Agents/Antigravity: instruction-only (this skill body); cannot create stamp via `/ask`; Stop still honors a pre-existing stamp if present. Session-scoped, never global.
15
+
16
+ Ask: always-print typed leftover triple on advise-class final recap. Write-typed leftover never spawns implementer. Not leftover pick 3.
17
+
18
+ Not `/solo`. Spawn-first still. Recap tags still.
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: auto
3
+ description: >
4
+ Session leftover-gate. /auto sets leftover-gate auto for this session —
5
+ Implement-typed pick2 chains write-plan persist then implement-plan {n} and
6
+ skips leftover wait. Not autofix. Not spawn-escape. /ask restores ask.
7
+ ---
8
+ Session leftover-gate, not spawn-escape. Not autofix. Not leftover y/n.
9
+
10
+ Whole-prompt `/auto` only (`/auto foo` no-op). Persists until `/ask` or session end.
11
+
12
+ Effective leftover-gate: stamp body `auto`|`ask` > `.rulesync/grunt.config.jsonc` `leftoverGate` > `ask`. Fail-closed `ask`.
13
+
14
+ Claude/Codex/Grok: `/auto` via submit hook. If slash token equals committed config `leftoverGate`, unlink `.tmp/grunt/orchestrator-logs/auto-ask-{sid}`; else write stamp body `auto`. Requires real sid (never `default`). Agents/Antigravity: instruction-only (this skill body); cannot create stamp via `/auto`; Stop still honors a pre-existing stamp if present. Session-scoped, never global.
15
+
16
+ effective=auto + Implement-typed: write-plan persist then implement-plan `{n}`; skip leftover triple wait. Write-typed under auto still leftover wait; never spawn implementer.
17
+
18
+ Not `/solo`. Spawn-first still. Recap tags still.
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  name: browser
3
3
  description: >
4
- Session browser rail. /browser or browse a URL. Call node scripts/browser.mjs
5
- nav|snap|click|fill|shot|pdf|stop. Lightpanda default; snap is the default
6
- read. Windows → Chromium. Never MCP. Never env knobs. Never raw Playwright.
4
+ Live URL/interact → this; not websearch. /browser or browse a URL. Call node
5
+ scripts/browser.mjs nav|snap|click|fill|shot|pdf|stop. Lightpanda default;
6
+ snap is the default read. Windows → Chromium. Never MCP. Never env knobs.
7
+ Never raw Playwright.
7
8
  ---
8
9
  Zero-config. `node scripts/browser.mjs <verb>`.
9
10