@lovrozagar/grunt 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/.agents/agents/grunt.md +2 -23
  2. package/.agents/agents/orchestrator.md +5 -45
  3. package/.agents/skills/ask/SKILL.md +11 -0
  4. package/.agents/skills/auto/SKILL.md +13 -0
  5. package/.agents/skills/browser/SKILL.md +4 -7
  6. package/.agents/skills/clasp/SKILL.md +11 -0
  7. package/.agents/skills/commit/SKILL.md +3 -1
  8. package/.agents/skills/commit-push/SKILL.md +2 -0
  9. package/.agents/skills/commit-push-deploy/SKILL.md +2 -0
  10. package/.agents/skills/commit-push-release/SKILL.md +2 -0
  11. package/.agents/skills/explain/SKILL.md +7 -13
  12. package/.agents/skills/google-workspace/SKILL.md +13 -0
  13. package/.agents/skills/handoff/SKILL.md +7 -11
  14. package/.agents/skills/implement-plan/SKILL.md +5 -108
  15. package/.agents/skills/listen/SKILL.md +15 -0
  16. package/.agents/skills/pickup/SKILL.md +6 -12
  17. package/.agents/skills/speak/SKILL.md +13 -0
  18. package/.agents/skills/tmp/SKILL.md +54 -0
  19. package/.agents/skills/write-plan/SKILL.md +5 -74
  20. package/.claude/agents/grunt.md +2 -25
  21. package/.claude/agents/orchestrator.md +12 -45
  22. package/.claude/skills/ask/SKILL.md +11 -0
  23. package/.claude/skills/auto/SKILL.md +13 -0
  24. package/.claude/skills/browser/SKILL.md +4 -7
  25. package/.claude/skills/clasp/SKILL.md +11 -0
  26. package/.claude/skills/commit/SKILL.md +3 -1
  27. package/.claude/skills/commit-push/SKILL.md +2 -0
  28. package/.claude/skills/commit-push-deploy/SKILL.md +2 -0
  29. package/.claude/skills/commit-push-release/SKILL.md +2 -0
  30. package/.claude/skills/explain/SKILL.md +7 -13
  31. package/.claude/skills/google-workspace/SKILL.md +13 -0
  32. package/.claude/skills/handoff/SKILL.md +7 -11
  33. package/.claude/skills/implement-plan/SKILL.md +5 -108
  34. package/.claude/skills/listen/SKILL.md +15 -0
  35. package/.claude/skills/pickup/SKILL.md +6 -12
  36. package/.claude/skills/speak/SKILL.md +13 -0
  37. package/.claude/skills/tmp/SKILL.md +54 -0
  38. package/.claude/skills/write-plan/SKILL.md +5 -74
  39. package/.codex/agents/grunt.toml +2 -25
  40. package/.codex/agents/orchestrator.toml +4 -45
  41. package/.grok/agents/grunt.md +2 -23
  42. package/.grok/agents/orchestrator.md +4 -43
  43. package/.grok/global-settings.toml +1 -3
  44. package/.grok/hooks/orchestrate-parent.js +278 -228
  45. package/.grok/skills/ask/SKILL.md +11 -0
  46. package/.grok/skills/auto/SKILL.md +13 -0
  47. package/.grok/skills/browser/SKILL.md +4 -7
  48. package/.grok/skills/clasp/SKILL.md +11 -0
  49. package/.grok/skills/commit/SKILL.md +3 -1
  50. package/.grok/skills/commit-push/SKILL.md +2 -0
  51. package/.grok/skills/commit-push-deploy/SKILL.md +2 -0
  52. package/.grok/skills/commit-push-release/SKILL.md +2 -0
  53. package/.grok/skills/explain/SKILL.md +7 -13
  54. package/.grok/skills/google-workspace/SKILL.md +13 -0
  55. package/.grok/skills/handoff/SKILL.md +7 -11
  56. package/.grok/skills/implement-plan/SKILL.md +5 -108
  57. package/.grok/skills/listen/SKILL.md +15 -0
  58. package/.grok/skills/pickup/SKILL.md +6 -12
  59. package/.grok/skills/speak/SKILL.md +13 -0
  60. package/.grok/skills/tmp/SKILL.md +54 -0
  61. package/.grok/skills/write-plan/SKILL.md +5 -74
  62. package/.rulesync/hooks.jsonc +1 -1
  63. package/.rulesync/mcp-policy.jsonc +0 -2
  64. package/.rulesync/reference/INDEX.md +30 -17
  65. package/.rulesync/reference/browser.md +13 -6
  66. package/.rulesync/reference/cascade.md +6 -84
  67. package/.rulesync/reference/clasp.md +21 -0
  68. package/.rulesync/reference/google-workspace.md +79 -0
  69. package/.rulesync/reference/hooks.md +7 -9
  70. package/.rulesync/reference/implementation-format.md +113 -0
  71. package/.rulesync/reference/law.md +5 -3
  72. package/.rulesync/reference/listen.md +80 -0
  73. package/.rulesync/reference/map.md +39 -31
  74. package/.rulesync/reference/output.md +3 -41
  75. package/.rulesync/reference/plan-format.md +14 -12
  76. package/.rulesync/reference/refs-map.md +12 -5
  77. package/.rulesync/reference/rtk.md +3 -2
  78. package/.rulesync/reference/scope.md +37 -0
  79. package/.rulesync/reference/setup.md +27 -0
  80. package/.rulesync/reference/skills-map.md +13 -9
  81. package/.rulesync/reference/speak.md +59 -0
  82. package/.rulesync/rules/CLAUDE.md +3 -44
  83. package/.rulesync/rules/overview.md +9 -42
  84. package/.rulesync/skills/ask/SKILL.md +11 -0
  85. package/.rulesync/skills/auto/SKILL.md +11 -0
  86. package/.rulesync/skills/browser/SKILL.md +4 -8
  87. package/.rulesync/skills/clasp/SKILL.md +9 -0
  88. package/.rulesync/skills/commit/SKILL.md +3 -1
  89. package/.rulesync/skills/commit-push/SKILL.md +2 -0
  90. package/.rulesync/skills/commit-push-deploy/SKILL.md +2 -0
  91. package/.rulesync/skills/commit-push-release/SKILL.md +2 -0
  92. package/.rulesync/skills/explain/SKILL.md +7 -14
  93. package/.rulesync/skills/google-workspace/SKILL.md +11 -0
  94. package/.rulesync/skills/handoff/SKILL.md +7 -11
  95. package/.rulesync/skills/implement-plan/SKILL.md +5 -116
  96. package/.rulesync/skills/listen/SKILL.md +13 -0
  97. package/.rulesync/skills/pickup/SKILL.md +6 -12
  98. package/.rulesync/skills/speak/SKILL.md +13 -0
  99. package/.rulesync/skills/tmp/SKILL.md +54 -0
  100. package/.rulesync/skills/write-plan/SKILL.md +5 -80
  101. package/.rulesync/subagents/grunt.md +2 -23
  102. package/.rulesync/subagents/orchestrator.md +14 -54
  103. package/AGENTS.md +9 -42
  104. package/CHANGELOG.md +89 -0
  105. package/CLAUDE.md +1 -44
  106. package/README.md +97 -88
  107. package/cli/grunt.mjs +29 -13
  108. package/cli/grunt.test.ts +62 -20
  109. package/cli/init.mjs +218 -31
  110. package/cli/init.test.ts +669 -46
  111. package/cli/prompt.mjs +8 -0
  112. package/cli/prompt.test.ts +14 -0
  113. package/package.json +13 -1
  114. package/scripts/browser.mjs +98 -5
  115. package/scripts/doctor.mjs +82 -1
  116. package/scripts/emit-gemini.mjs +1 -1
  117. package/scripts/emit-mcp-policy.mjs +1 -1
  118. package/scripts/gate-fat-tools.mjs +223 -173
  119. package/scripts/google-workspace.mjs +713 -0
  120. package/scripts/grunt-job.mjs +453 -69
  121. package/scripts/listen.mjs +829 -0
  122. package/scripts/parse-need.mjs +21 -2
  123. package/scripts/persist-implementation.mjs +278 -0
  124. package/scripts/persist-plan.mjs +17 -2
  125. package/scripts/persist-tmp.mjs +123 -0
  126. package/scripts/scrub-spawn-prompt.mjs +4 -51
  127. package/scripts/setup.mjs +746 -0
  128. package/scripts/speak.mjs +291 -0
  129. package/.agents/agents/implementer.md +0 -32
  130. package/.agents/agents/thinker.md +0 -28
  131. package/.agents/skills/cascade/SKILL.md +0 -26
  132. package/.agents/skills/parent/SKILL.md +0 -6
  133. package/.agents/skills/solo/SKILL.md +0 -23
  134. package/.claude/agents/implementer.md +0 -37
  135. package/.claude/agents/thinker.md +0 -35
  136. package/.claude/skills/cascade/SKILL.md +0 -26
  137. package/.claude/skills/parent/SKILL.md +0 -6
  138. package/.claude/skills/solo/SKILL.md +0 -23
  139. package/.codex/agents/implementer.toml +0 -26
  140. package/.codex/agents/thinker.toml +0 -25
  141. package/.grok/agents/implementer.md +0 -27
  142. package/.grok/agents/thinker.md +0 -26
  143. package/.grok/parent.md +0 -1
  144. package/.grok/roles/implementer.toml +0 -5
  145. package/.grok/roles/thinker.toml +0 -5
  146. package/.grok/skills/cascade/SKILL.md +0 -26
  147. package/.grok/skills/parent/SKILL.md +0 -6
  148. package/.grok/skills/solo/SKILL.md +0 -23
  149. package/.rulesync/skills/cascade/SKILL.md +0 -26
  150. package/.rulesync/skills/parent/SKILL.md +0 -6
  151. package/.rulesync/skills/solo/SKILL.md +0 -23
  152. package/.rulesync/subagents/implementer.md +0 -49
  153. package/.rulesync/subagents/thinker.md +0 -48
@@ -7,74 +7,82 @@ tags: [map]
7
7
  Cheap outline. Not a file dump.
8
8
 
9
9
  ## Protocol
10
- - `.rulesync/reference/cascade.md` — spawn / need / resume
10
+ - `.rulesync/reference/cascade.md` — session agent tools; grunt-job first; spawn grunt when cheaper
11
11
  - `.rulesync/reference/rtk.md` — shell compression
12
- - `.rulesync/reference/browser.md` — Lightpanda-first session CLI (`nav|snap|click|fill|shot|pdf|stop`); not MCP
12
+ - `.rulesync/reference/browser.md` — Lightpanda-first session CLI (`nav|snap|click|fill|scroll|wait|hover|select|shot|pdf|stop`); not MCP
13
13
  - `.rulesync/reference/hooks.md` — hook policy
14
14
  - `.rulesync/reference/map.md` — this file
15
15
  - `.rulesync/reference/output.md` — default voice
16
+ - `.rulesync/reference/scope.md` — size gate; research → suggest → wait → `/write-plan` → `/implement-plan`
16
17
  - `.rulesync/reference/law.md` — domain law (stub; protocol stays cascade/overview)
17
- - Generated catalogs: `.rulesync/reference/INDEX.md` — aggregate catalog composed from slices (law.md, skills-map.md, refs-map.md). Maps/law = slices for deep dive. INDEX always. Not if-maps-else.
18
+ - Generated catalogs: `.rulesync/reference/INDEX.md` — aggregate catalog composed from slices (law.md, skills-map.md, refs-map.md). Maps/law = slices for deep dive. INDEX always. Not if-maps-else
18
19
 
19
20
  ## Agent SSOT
20
21
  - Docs SoT: `.rulesync/skills` + `.rulesync/reference`. Generate maps anything placed there. `.agents` / `.claude` (and other host trees) are mirrors, not SoT; no mirror scan
21
- - `.rulesync/subagents/{orchestrator,implementer,thinker,grunt}.md`
22
+ - `.rulesync/subagents/{orchestrator,grunt}.md`
22
23
  - `.rulesync/rules/overview.md` → `AGENTS.md`
23
24
  - `.rulesync/rules/CLAUDE.md` → `CLAUDE.md`
24
25
  - Default output: `.rulesync/reference/output.md` (overview.md → AGENTS.md; also agent bodies + CLAUDE.md, not auto-injected)
25
26
 
26
27
  ## Grok hand files
27
- - `.grok/hooks/orchestrate-parent.js` + `.grok/hooks/orchestrate-parent.json` — parent spawn/fat/stop/plan-write / SubagentStop intercept
28
+ - `.grok/hooks/orchestrate-parent.js` + `.grok/hooks/orchestrate-parent.json` — spawn/fat/stop/persist / SubagentStop intercept / session receipt
29
+ - Init/upgrade prune (cumulative): retired skills `parent` `solo` `cascade`; agents `implementer` `thinker` (host files + `.grok/roles/{name}.toml` + `.gemini/agents/{name}/`); scripts `telemetry.mjs` `grunt-config.mjs`; `.grok/parent.md`; `.grok/skills/shared`; `.rulesync/grunt.config.jsonc` plus local overlay and example; reserved skill dirs this package no longer ships
28
30
  - `.grok/hooks/rtk.json` — RTK
29
- - `.grok/skills/{parent,explain,handoff,pickup,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,write-plan,implement-plan}/` — generated from `.rulesync/skills/`; do not hand-edit
30
- - `.grok/parent.md` — 1-line pointer to orchestrator agent; not SessionStart
31
- - `.grok/roles/*.toml`
31
+ - `.grok/skills/` — generated from `.rulesync/skills/`; do not hand-edit
32
32
  - `.grok/global-settings.toml` — merged into `~/.grok/config.toml` by `scripts/sync-global-settings.mjs` (not auto-loaded; project config cannot set `[features]`)
33
33
  - `.rulesync/global-settings/` — host manifest and reserved noop payloads
34
34
  - `.rulesync/mcp-policy.jsonc` — MCP deny-default SSOT (`default: deny`, `allow: []`)
35
- - `.rulesync/skills/{parent,explain,handoff,pickup,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,browser,write-plan,implement-plan}/` — skill SSOT; `rulesync -f skills` emits `.grok/skills/`, `.claude/skills/`, `.agents/skills/` byte-equal. `/cascade` = exit solo / restore cascade (not a sticky second mode)
35
+ - `.rulesync/skills/{ask,auto,browser,clasp,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,explain,google-workspace,handoff,implement-plan,listen,pickup,speak,tmp,write-plan}/` — skill SSOT; `rulesync -f skills` emits host mirrors byte-equal
36
36
 
37
37
  ## Scripts
38
38
  - `scripts/pipeline.mjs` — inner generate/check/watch chain (rulesync + emit-* + hooks-union / check-globals). Called by `guarded-roots`; not a public npm script (`rulesync:generate` `rulesync:check` `rulesync:watch` only)
39
39
  - `scripts/guarded-roots.mjs` — snapshot/remerge `AGENTS.md` `CLAUDE.md` `GEMINI.md` around pipeline; check interiors wrapper
40
- - `scripts/check-globals.mjs` — `$HOME/.grok/config.toml` `[agent].name==orchestrator` + `[features].two_pass_compaction==true`; project `.grok/config.toml` must not have `[features]`/`[agent]`; wired as `sync:globals:check` (also after emit-mcp in `rulesync:check`)
40
+ - `scripts/check-globals.mjs` — `$HOME/.grok/config.toml` `[agent].name==orchestrator` + `[features].two_pass_compaction==true`
41
41
  - `scripts/gate-fat-tools.mjs`
42
42
  - `scripts/scrub-spawn-prompt.mjs`
43
43
  - `scripts/grunt-job.mjs` — flags `--job` `--query` `--path` `--glob` (repeatable) `--cwd`; regex in `--query` OK; never `cd &&`; unknown flags / exec shell-meta → FALLBACK
44
44
  - `scripts/parse-need.mjs`
45
- - `scripts/persist-handoff.mjs` — `.tmp/grunt/handoffs/{serial}-{slug}-{stamp}.md`; `HANDOFF_NAME:` → slug; H2 `Goal|State|Context|Next|Watch-outs`; `status` `open|resumed|done`
45
+ - `scripts/persist-handoff.mjs` — `.tmp/grunt/handoffs/{serial}-{slug}-{stamp}.md`
46
+ - `scripts/persist-tmp.mjs` — `.tmp/grunt/{serial}-{slug}-{stamp}.{ext}` root files
46
47
  - `scripts/persist-plan.mjs`
47
- - `scripts/sync-global-settings.mjs` — dry-run-by-default merge of `.grok/global-settings.toml` into `$HOME/.grok/config.toml`; manifest in `.rulesync/global-settings/`; `skipKeyPattern` skips MCP; never copies project MCP into `$HOME/.grok`
48
- - `scripts/purge-global-mcps.mjs` — dry-run-by-default purge of stubborn global MCP sources (`$HOME/.grok/config.toml` plugins + `disabled_mcp_servers`, `$HOME/.cursor/mcp.json` `MCP_DOCKER`); `--apply` writes; never project MCP
49
- - `scripts/emit-mcp-policy.mjs` — emit project MCP deny-default from `.rulesync/mcp-policy.jsonc` (not `rulesync -f mcp`); owns `.gemini/settings.json` `mcpServers` (merge extra keys)
50
- - `scripts/emit-gemini.mjs` — `GEMINI.md` (`@AGENTS.md`) + `.gemini/agents/{id}/agent.md` from `.rulesync/subagents` (not `rulesync -t geminicli`); no prune; does not touch settings
51
- - `scripts/emit-agent-shell-tools.mjs` — after rulesync subagents: rewrite `.claude/agents/grunt.md` body `Bash`; grok/codex/gemini/generic keep `run_terminal_command`
52
- - `scripts/browser.mjs` — session browser rail `nav|snap|click|fill|shot|pdf|stop`; Lightpanda default; Chromium on verb/OS/probe/paint-host/one-escalate; `.tmp/grunt/browser/`
48
+ - `scripts/persist-implementation.mjs` — `.tmp/grunt/implementations/{serial}-{slug}-{stamp}.md`
49
+ - `scripts/sync-global-settings.mjs`
50
+ - `scripts/purge-global-mcps.mjs`
51
+ - `scripts/emit-mcp-policy.mjs`
52
+ - `scripts/emit-gemini.mjs`
53
+ - `scripts/emit-agent-shell-tools.mjs`
54
+ - `scripts/browser.mjs` — session browser rail
55
+ - `scripts/google-workspace.mjs` — Sheets Docs Slides Calendar Gmail Drive
56
+ - `scripts/speak.mjs` — TTS
57
+ - `scripts/listen.mjs` — STT
58
+ - `scripts/setup.mjs` — handheld speak / listen / google-workspace / browser (`~/.grunt/`)
59
+ - `scripts/doctor.mjs` — unified prereqs; optional google-workspace (`oauth` `tokens` `adc` `clasprc`), speak, clasp, ffmpeg, whisper-cli
53
60
 
54
61
  ## Tmp
55
- - `.tmp/plans/` — persist-plan / parent / implementer; format SSOT = `.rulesync/reference/plan-format.md`
56
- - `.tmp/orchestrator-logs/` — parent stamps (shared; not grunt scratch)
57
- - `.tmp/grunt/` — grunt scratch/tmp only
62
+ - `.tmp/grunt/plans/` — persist-plan; format SSOT = `.rulesync/reference/plan-format.md`
63
+ - `.tmp/grunt/implementations/` — persist-implementation; format SSOT = `.rulesync/reference/implementation-format.md`
64
+ - `.tmp/grunt/orchestrator-logs/` — need-intercept, session-gate, stop-block stamps
65
+ - `.tmp/grunt/` — scratch + `/tmp` dumps `{serial}-{slug}-{stamp}.{ext}` at root (not nested `tmp/`)
58
66
  - `.tmp/grunt/browser/` — browser session/profile/shot/pdf (not MCP)
59
- - `.tmp/grunt/handoffs/` — persist-handoff / `/handoff`; own serial counter (not plan serials)
60
-
61
- ## Stamps (`.tmp/orchestrator-logs/`)
62
- - `tools-used` / `stop-block` / `need-intercept` / `parent-escape` — Stop does not waive impl finals for `tools-used`; `/parent` writes `parent-escape-{sid}` once
63
- - `grunt-off-{sid}` — `/solo` session mode. Sticky: only `/solo` / `/cascade` move it. Requires a real sid (never the `default` fallback). Read fail-closed — an unreadable stamp keeps grunt on
67
+ - `.tmp/grunt/handoffs/` — persist-handoff / `/handoff`
68
+ - `.tmp/grunt/stash/` — grunt-job / snap overflow
69
+ - `.tmp/grunt/sessions/{sid}/` — wrote/read/receipt
70
+ - `.tmp/grunt/speak/` — TTS mp3
71
+ - `.tmp/grunt/listen/` — STT wav + `latest.txt`
64
72
 
65
73
  ## Generated (do not hand-edit; committed, not gitignored)
66
74
  - `AGENTS.md`, `CLAUDE.md`
67
75
  - `.rulesync/reference/INDEX.md`, `skills-map.md`, `refs-map.md` (`emit-maps.mjs`)
68
- - `.claude/skills/*`, `.agents/skills/*`, `.grok/skills/{parent,explain,handoff,pickup,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,write-plan,implement-plan}/` (from `.rulesync/skills/`)
76
+ - `.claude/skills/*`, `.agents/skills/*`, `.grok/skills/*` (from `.rulesync/skills/`)
69
77
  - `.grok/agents/*`
70
78
  - `.claude/agents/*`
71
79
  - `.codex/agents/*`
72
80
  - `.agents/agents/*`
73
81
  - `.grok/config.toml` — project MCP `[[permissions]]` + `[plugins] deny_default`; no `[features]`
74
82
  - `.mcp.json` — `mcpServers` from policy allow only
75
- - `.claude/settings.json` MCP keys (`enableAllProjectMcpServers`, `enabledMcpjsonServers`, `permissions.deny` `mcp__*`); Agent denies/hooks stay
76
- - `.codex/config.toml` `mcp_servers` (absent when allow empty); keep `[agents] max_depth`
77
- - `.agents/mcp_config.json` — `mcpServers` from policy allow only
83
+ - `.claude/settings.json` MCP keys; Agent denies/hooks stay
84
+ - `.codex/config.toml` `mcp_servers` (absent when allow empty)
85
+ - `.agents/mcp_config.json`
78
86
  - `GEMINI.md` — `@AGENTS.md` pointer (`emit-gemini.mjs`)
79
- - `.gemini/agents/{orchestrator,implementer,thinker,grunt}/agent.md` — `name` `description` `model` only (`emit-gemini.mjs`)
80
- - `.gemini/settings.json` — `mcpServers` from policy allow only (`emit-mcp-policy.mjs`; extra keys preserved)
87
+ - `.gemini/agents/{orchestrator,grunt}/agent.md`
88
+ - `.gemini/settings.json` — `mcpServers` from policy allow only
@@ -4,46 +4,8 @@ tags: [output]
4
4
 
5
5
  # Output
6
6
 
7
- 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. Advise leftover: numbered pick each on own line after that tagged recap — do not cram 1./2./3. onto the recap line
7
+ en-US unless asked. Concise complete sentences with natural grammar. Skip filler and fluff.
8
8
 
9
- **Mid-turn** (in-flight; first line still legal tag): `[orchestrator]: wait grunt` only. `need:` stop = JSON only. Grunt isolation = `verdict:` only; parent maps to natural recap. ⚠/validate: no recap; spawn. Imperative = routing/mid-turn only.
9
+ Completed work uses past verbs and paths. If more work remains, say what. Ask in English when a choice is real. `/auto` asks on blockers; `/ask` asks after each step.
10
10
 
11
- **Final recap** (children done / child return; omit empty buckets): natural language. No literal `done:` `in_progress:` `left:` `blocked:` tokens. No `|` key join.
12
-
13
- Buckets (semantic; not tokens):
14
-
15
- - completed — work landed; past verbs + abs paths
16
- - in-flight — siblings/peek still live; host state not past
17
- - remainder — more work; noun + one recommended X then ask
18
- - blocker — cannot continue; noun + one recommended X then ask
19
-
20
- Past-tense: completed work = past verbs only. Remainder/blocker = noun + one recommended X then ask. Do not break `need:` JSON, `verdict:`, wait-grunt, or legal first-line tag regex.
21
-
22
- Ask = recap line + stop (no invent ask_user_question). Named `Do X?` / `X? y/n`: `y` = accept X. Bare `ok`/`yes`/`y`/`continue` after advise still ≠ pick1/pick2.
23
-
24
- **Do not ask** mid-turn / siblings-alive — stay `[orchestrator]: wait grunt` or tag+echo + peek.
25
-
26
- Examples:
27
- ```
28
- [orchestrator]: wrote /abs/a.md
29
- [orchestrator]: wrote /abs/a.md. Spawn implementer on /abs/b.md? y/n
30
- [implementer]: missing /abs/b.md. Prefetch via grunt? y/n
31
- ```
32
-
33
- Child first line = those buckets in natural language. Body may continue (plans/findings). Parent echo one recap line. Advise leftover continues after it numbered pick each on own line. Do not force children to one line only for body/logs.
34
-
35
- Advise recap includes why-clause (one clause not treatise): `{decided}. {how-capsule}. {why-clause}`. Why-clause = rejected alt + constraint. Parent echo = that recap verbatim-ish; no-strip; forbid compress-to-verdict. Still one recap line. Do not dump body. Do not invent why if omitted. Pick1 recap-as-spec includes how+why; implementer must not paste why into code comments. Always-why recap ≠ `/explain` (`/explain` = expansion not the why path).
36
-
37
- `/write-plan`: remainder `/implement-plan` (ask). `/explain`: same four buckets; sentences OK.
38
-
39
- Advise leftover: numbered pick (number or full leftover label, or unique tail `verbal plan` / `file plan`):
40
- 1. Implementer with verbal plan
41
- 2. Implementer with file plan
42
- 3. Tweak
43
- ```
44
- [orchestrator]: wrote /abs/a
45
- 1. Implementer with verbal plan
46
- 2. Implementer with file plan
47
- 3. Tweak
48
- ```
49
- Always-do leftover match (output.md cascade.md skills Rules); not Skill-name (`2` ≠ write-plan). Stop leftover-lines = recap format only; no code maps `2` → skill names. 1 / that label / explicit implement → pick1 (spawn implementer; paste last [thinker] recap as spec — how+why; implementer must not paste why into code comments; 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); not a leftover number. `/implement-plan {n}` disk/file ≠ verbal. `ok`/`yes`/`y`/`continue` ≠ either implement path.
11
+ Grunt-job stdout is a sentence plus up to 6 dash facts, cap 8 lines, optional `stash=` receipt.
@@ -1,10 +1,10 @@
1
1
  # Plan format (SSOT)
2
2
 
3
- Local implementer checklist. Not a design doc, PR stack, or DAG.
3
+ Local session checklist. Not a design doc, PR stack, or DAG.
4
4
 
5
5
  ## Path
6
6
 
7
- `.tmp/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md`
7
+ `.tmp/grunt/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md`
8
8
 
9
9
  - **serial:** unpadded decimal int only (`1`, `12`, `10000`). **Never** `0001`, never quoted `"0001"` / `"1"`. Serial ≥ 1.
10
10
  - **filename:** unpadded serial, slug, UTC datetime stamp (`6-sync-global-settings-20260826T143000Z.md`, not `0001-slug.md`). Stamp is `created` with `-` and `:` dropped (keep `T` and `Z`).
@@ -26,9 +26,9 @@ Local implementer checklist. Not a design doc, PR stack, or DAG.
26
26
  ## Allocate next serial (grunt, bash)
27
27
 
28
28
  ```bash
29
- mkdir -p .tmp/plans
29
+ mkdir -p .tmp/grunt/plans
30
30
  next=1
31
- for f in .tmp/plans/*; do
31
+ for f in .tmp/grunt/plans/*; do
32
32
  [ -f "$f" ] || continue
33
33
  b=$(basename "$f")
34
34
  case "$b" in
@@ -81,7 +81,7 @@ No required Why heading. Optional why footnote only (not a `##`). Pick2 file pla
81
81
  - Fresh plans: all `[ ]`, never `[x]`
82
82
  - Marking done: only flip the box. No renumber, delete, or rewrite leaf text
83
83
  - Depth 2 default (`N` phase + `N.M` leaf). 3rd level only if a leaf would itself be a mini-plan
84
- - Every phase `N` has ≥1 leaf `N.M`. Implementer **executes leaves**. Roll up: all children `[x]` ⇒ parent `[x]`
84
+ - Every phase `N` has ≥1 leaf `N.M`. The session agent **executes leaves**. Roll up: all children `[x]` ⇒ parent `[x]`
85
85
  - Verify = last numbered phase, same grammar
86
86
  - Done plan: every checkbox `[x]`, `status: done`
87
87
 
@@ -94,6 +94,8 @@ No required Why heading. Optional why footnote only (not a `##`). Pick2 file pla
94
94
  | Steps | bulk of the file; each leaf = one coherent edit or one file-level action |
95
95
  | Verify | 1–5 runnable leaves (cmd or observable) |
96
96
 
97
+ Tests live in Steps (not a new heading). New behavior or a bug: a failing test leaf before the impl leaf. Other behavior change: a test leaf immediately after the impl leaf. Docs, rename-only, config-only, generated: no test leaf. Verify is the end gate (project cmd or named subset), not a substitute for those leaves. Do not re-run the whole suite after every leaf unless it is cheap.
98
+
97
99
  Thinker cites **absolute paths**. Leaves must be implementable without re-planning. Product fork → pick the narrowest default, state it under Constraints, still emit steps.
98
100
 
99
101
  ## Validation checklist
@@ -109,7 +111,7 @@ Thinker cites **absolute paths**. Leaves must be implementable without re-planni
109
111
 
110
112
  ## Worked example
111
113
 
112
- File: `.tmp/plans/1-add-tmp-ignore-20260826T143000Z.md`
114
+ File: `.tmp/grunt/plans/1-add-tmp-ignore-20260826T143000Z.md`
113
115
 
114
116
  ```markdown
115
117
  ---
@@ -123,16 +125,16 @@ source: "gitignore .tmp so local plans stay untracked"
123
125
  # add-tmp-ignore
124
126
 
125
127
  ## Goal
126
- Repo `.gitignore` ignores `.tmp/` so files under `.tmp/plans/` stay untracked. Existing ignore entries stay.
128
+ Repo `.gitignore` ignores `.tmp/` so files under `.tmp/grunt/plans/` stay untracked. Existing ignore entries stay.
127
129
 
128
130
  ## Context
129
131
  - `/home/ecomet/Development/example-app/.gitignore` may be missing or lack `.tmp/`
130
- - Plans live at `/home/ecomet/Development/example-app/.tmp/plans/`
132
+ - Plans live at `/home/ecomet/Development/example-app/.tmp/grunt/plans/`
131
133
  - No python helpers; bash only
132
134
 
133
135
  ## Constraints
134
136
  - Do not clobber other `.gitignore` lines
135
- - Do not create sample plans under `.tmp/plans` for git
137
+ - Do not create sample plans under `.tmp/grunt/plans` for git
136
138
  - Do not edit `AGENTS.md`
137
139
 
138
140
  ## Watch-outs
@@ -145,15 +147,15 @@ Repo `.gitignore` ignores `.tmp/` so files under `.tmp/plans/` stay untracked. E
145
147
  1.2 [ ] create `/home/ecomet/Development/example-app/.gitignore` when missing, body `.tmp/`
146
148
  1.3 [ ] append `.tmp/` to `/home/ecomet/Development/example-app/.gitignore` if the line is absent
147
149
  2 [ ] plans dir
148
- 2.1 [ ] mkdir -p `/home/ecomet/Development/example-app/.tmp/plans`
150
+ 2.1 [ ] mkdir -p `/home/ecomet/Development/example-app/.tmp/grunt/plans`
149
151
  2.2 [ ] confirm the dir exists; do not add a sample `*.md` under it
150
152
  3 [ ] sanity
151
153
  3.1 [ ] grep `^\.tmp/` in `/home/ecomet/Development/example-app/.gitignore`
152
154
  3.2 [ ] confirm no extra hunks in that file besides the ignore line
153
- 3.3 [ ] `git check-ignore -v /home/ecomet/Development/example-app/.tmp/plans` from repo root
155
+ 3.3 [ ] `git check-ignore -v /home/ecomet/Development/example-app/.tmp/grunt/plans` from repo root
154
156
 
155
157
  ## Verify
156
158
  4 [ ] Verify
157
- 4.1 [ ] `git check-ignore -v .tmp/plans` reports ignored
159
+ 4.1 [ ] `git check-ignore -v .tmp/grunt/plans` reports ignored
158
160
  4.2 [ ] `git status --short -- .gitignore` shows only the ignore edit
159
161
  ```
@@ -4,11 +4,18 @@
4
4
 
5
5
  | path | title | tags | summary |
6
6
  | --- | --- | --- | --- |
7
- | .rulesync/reference/browser.md | Browser | browser | Zero-config in-tree session rail. Not MCP. Not env. Not raw Playwright. |
8
- | .rulesync/reference/cascade.md | Cascade | cascade | Shipped protocol: **parent-only spawn**. Only the parent **orchestrator** session calls `spawn_subagent`. Implementer a… |
7
+ | .rulesync/reference/browser.md | Browser | browser | Zero-config in-tree session rail. Not MCP. Not env. Not raw Playwright. Lightpanda first; swap to Chromium when blocked. |
8
+ | .rulesync/reference/cascade.md | Protocol | cascade | The session agent has tools. Fat Read/Grep/Bash dumps are rewritten to `scripts/grunt-job.mjs` (squeez + stash). Isolat… |
9
+ | .rulesync/reference/clasp.md | Clasp | clasp | Low-level Apps Script CLI. Optional. Doctor reports it. |
10
+ | .rulesync/reference/google-workspace.md | google-workspace | google-workspace | Create and edit Google Sheets, Docs, Slides, Calendar events, and Gmail from the session. |
9
11
  | .rulesync/reference/hooks.md | Hooks | hooks | SessionStart: keep empty (token baseline). Do not inject context. Do not register a SessionStart hook on `../../.grok/h… |
10
- | .rulesync/reference/law.md | Law | | Protocol stays cascade/overview; domain fills this. |
12
+ | .rulesync/reference/implementation-format.md | Implementation format (SSOT) | | Local session journal for `/implement-plan`. Not a plan, handoff, or git commit. |
13
+ | .rulesync/reference/law.md | Law | | Protocol stays overview; domain fills this. |
14
+ | .rulesync/reference/listen.md | Listen | listen | Speech-to-text from the session. Input only. Not TTS. Not a live voice agent. Not MCP. |
11
15
  | .rulesync/reference/map.md | Map | map | Cheap outline. Not a file dump. |
12
- | .rulesync/reference/output.md | Output | output | en-US unless asked. every output maximal superterse. Fragments OK. Sacrifice grammar; keep meaning. Parent and child. E… |
13
- | .rulesync/reference/plan-format.md | Plan format (SSOT) | | Local implementer checklist. Not a design doc, PR stack, or DAG. |
16
+ | .rulesync/reference/output.md | Output | output | en-US unless asked. Concise complete sentences with natural grammar. Skip filler and fluff. |
17
+ | .rulesync/reference/plan-format.md | Plan format (SSOT) | | Local session checklist. Not a design doc, PR stack, or DAG. |
14
18
  | .rulesync/reference/rtk.md | RTK | rtk | Shell stdout compression. PreToolUse: Bash → `rtk <cmd>`. Not Read/Grep/Glob/prompts/images. |
19
+ | .rulesync/reference/scope.md | Scope | scope | Default: do the work. Escalate only when it is not a straight shot. This file is the size-gate SSOT. |
20
+ | .rulesync/reference/setup.md | Setup | setup | Handheld machine setup for optional integrations. Any OS. Secrets stay in `~/.grunt/` (Windows `%USERPROFILE%\.grunt`).… |
21
+ | .rulesync/reference/speak.md | Speak | speak | Text-to-speech from the session. Output only. Not STT. Not a mic. Not MCP. Speech-to-text is `/listen`: `.rulesync/refe… |
@@ -6,17 +6,18 @@ tags: [rtk]
6
6
 
7
7
  Shell stdout compression. PreToolUse: Bash → `rtk <cmd>`. Not Read/Grep/Glob/prompts/images.
8
8
 
9
- Grok PostToolUse is observe-only — do not attempt output scrub; compress via RTK / spawn / isolation verdict only.
9
+ Grok PostToolUse is observe-only — do not attempt output scrub; compress via RTK / spawn / isolation facts only.
10
10
 
11
11
  ## Commands
12
12
 
13
- ls · tree · read · smart · git · gh · glab · aws · psql · pnpm · err · test · json · deps · env · find · diff · log · dotnet · docker · kubectl · oc · summary · grep · rg · init · wget · wc · gain · cc-economics · config · jest · vitest · prisma · tsc · next · lint · prettier · format · playwright · lightpanda · cargo · npm · npx · curl · discover · session · telemetry · learn · run · proxy · pipe · trust · untrust · verify · ruff · pytest · mypy · rake · rubocop · rspec · pip · go · gt · golangci-lint · gradlew · mvn · hook-audit · rewrite · hook · help
13
+ ls · tree · read · smart · git · gh · glab · clasp · aws · psql · pnpm · err · test · json · deps · env · find · diff · log · dotnet · docker · kubectl · oc · summary · grep · rg · init · wget · wc · gain · cc-economics · config · jest · vitest · prisma · tsc · next · lint · prettier · format · playwright · lightpanda · cargo · npm · npx · curl · discover · session · telemetry · learn · run · proxy · pipe · trust · untrust · verify · ruff · pytest · mypy · rake · rubocop · rspec · pip · go · gt · golangci-lint · gradlew · mvn · hook-audit · rewrite · hook · help
14
14
 
15
15
  **git:** diff · log · status · show · add · commit · push · pull · branch · fetch · stash (list show pop apply drop push) · worktree
16
16
  **cargo:** build · test · clippy · check · install · nextest
17
17
  **go:** test · build · vet
18
18
  **docker:** ps · images · logs · compose (ps logs build)
19
19
  **gh:** pr · issue · run · repo
20
+ **clasp:** login · logout · create · clone · pull · push · status · open · run · deploy · logs · setting
20
21
 
21
22
  Flags: `-v`/`-vv`/`-vvv` · `--ultra-compact` · `--skip-env` · `-h` · `-V`
22
23
 
@@ -0,0 +1,37 @@
1
+ ---
2
+ tags: [scope]
3
+ ---
4
+
5
+ # Scope
6
+
7
+ Default: do the work. Escalate only when it is not a straight shot. This file is the size-gate SSOT.
8
+
9
+ ## Gate
10
+
11
+ Straight shot: one obvious path, the user named the edit, or a follow-up on work already agreed. Do it. Do not run this file as a ritual.
12
+
13
+ Not a straight shot: ambiguous goal, two or more valid approaches, cross-cutting, or hard to undo — or the user asked to plan.
14
+
15
+ Skip the loop: questions, lookups, one-file named edits, "just do it", commits.
16
+
17
+ `/ask` is not this loop. `/ask` pauses after each execution step. This loop pauses until the approach is agreed. `/auto` already treats a real choice as a blocker; "which approach?" is that blocker.
18
+
19
+ ## Research
20
+
21
+ Read and search until you can pick an approach. Enough to choose, not a literature review. Fat notes go under `.tmp/grunt/` (`/tmp` if they must persist). Do not add `## Research` to a plan.
22
+
23
+ ## Suggest
24
+
25
+ 5–10 lines: approach, why, rejected alternative, one open question. Not a fake plan. Do not `/write-plan` in the same turn.
26
+
27
+ ## Wait
28
+
29
+ Stop. One real question. Feedback → research if needed → suggest again. Repeat until the approach is agreed.
30
+
31
+ ## Plan
32
+
33
+ After agreement only: `/write-plan`. Format: `.rulesync/reference/plan-format.md`. Distill facts into Context, Constraints, Watch-outs. Leaves are the work. Report serial. Stop unless the user said plan and do it.
34
+
35
+ ## Implement
36
+
37
+ `/implement-plan` in a separate turn, or the same turn only if the user said plan and do it. Skip `[x]`. Write-allowlist = paths listed in the plan. Do not skip test leaves. Journal: `.rulesync/reference/implementation-format.md` under `.tmp/grunt/implementations/` (create on start; not for straight shots). Straight-shot behavior change: run the nearest existing test if the repo has one. Bugfix: repro first. Do not scaffold a test file on a straight shot unless it is a bug.
@@ -0,0 +1,27 @@
1
+ ---
2
+ tags: [setup]
3
+ ---
4
+
5
+ # Setup
6
+
7
+ Handheld machine setup for optional integrations. Any OS. Secrets stay in `~/.grunt/` (Windows `%USERPROFILE%\.grunt`). Not git. Env still wins over the file.
8
+
9
+ ```
10
+ npm exec grunt setup
11
+ node scripts/setup.mjs
12
+ node scripts/setup.mjs speak
13
+ node scripts/setup.mjs listen
14
+ node scripts/setup.mjs google-workspace
15
+ node scripts/setup.mjs browser
16
+ ```
17
+
18
+ TTY: menu with ok/missing. Already ok asks redo (`--redo` skips the ask). Missing bins: print the OS command (never run it), then re-check PATH. Ends with a four-line status. Non-TTY needs flags (keys / `--creds`). Doctor never installs bins; setup never installs bins either.
19
+
20
+ | target | what it writes | flags |
21
+ | --- | --- | --- |
22
+ | speak | `~/.grunt/speak.json` | `--elevenlabs-key` `--openai-key` `--provider` `--skip-verify` |
23
+ | listen | same file (`openai` / `listen`) plus `~/.grunt/whisper/` | `--openai-key` `--device` `--skip-download` |
24
+ | google-workspace | Desktop OAuth JSON + tokens under `~/.grunt/` | `--creds PATH` `--account NAME` `--project ID` |
25
+ | browser | nothing (print Lightpanda / Chromium hints; both required except win32 Chromium-only) | |
26
+
27
+ Do not invent keys. If the session is not a TTY, tell the user to run `grunt setup` in their terminal. This spec is enough. Do not read https://github.com/lovrozagar/grunt#readme unless this file is missing.
@@ -4,17 +4,21 @@
4
4
 
5
5
  | name | origin | description | task | commandPath | refs |
6
6
  | --- | --- | --- | --- | --- | --- |
7
- | browser | local | Session browser rail. /browser or browse a URL. Call node scripts/browser.mjs nav\|snap\|click\|fill\|shot\|pdf\|stop. Lightp… | | | |
8
- | cascade | local | Session mode. /cascade exits solo and restores the grunt cascade for this session — spawn, orchestrator, recap, need\|ve… | | | |
7
+ | ask | local | Session flag. Finish one step, recap, then ask before the next. | | | |
8
+ | auto | local | Session flag. Default. Work the task through. Ask on blockers instead of monkey-patching. | | | |
9
+ | browser | local | Browse via node scripts/browser.mjs (Lightpanda). App e2e uses Playwright. | | | |
10
+ | clasp | local | Low-level Apps Script CLI. Prefer /google-workspace for sheet, doc, meeting, mail. | | | |
9
11
  | commit | local | Inspect the diff and commit with a Conventional Commits subject line. Use for /commit, "commit this", "commit these cha… | | | |
10
12
  | commit-and-push | local | Alias of commit-push (1-release stub). Use for /commit-and-push, "commit and push", "commit this and push". Must push.… | | | |
11
13
  | commit-push | local | Commit with a Conventional Commits subject, then push. Use for /commit-push, "commit and push", "commit this and push".… | | | |
12
14
  | commit-push-deploy | local | Commit, push, then deploy only if allowlisted infra already exists. Use for /commit-push-deploy, "commit push deploy",… | | | |
13
15
  | commit-push-release | local | Commit, push, bump package.json, tag vX.Y.Z, push the tag. CI publishes. Use for /commit-push-release, "commit push rel… | | | |
14
- | explain | local | One-off human recap. /explain. First action = spawn grunt\|implementer\|thinker if facts/work; else recap already-visible… | | | |
15
- | handoff | local | Parent writes a session handoff under .tmp/grunt/handoffs/ and tells the user to continue in a fresh session. Use for /… | | | |
16
- | implement-plan | local | Implementer executes a local .tmp/plans checklist: continue, resume, or pick among plans. Empty /implement-plan resumes… | | | |
17
- | parent | local | One-turn parent-orchestrator escape. Use for /parent. Not a session mode. | | | |
18
- | pickup | local | Pick up/continue a session handoff under .tmp/grunt/handoffs/. Use for /pickup, pick up, continue handoff, serial, drag… | | | |
19
- | solo | local | Session mode. /solo disables the grunt cascade for this session — one normal agent, no spawn, no orchestrator. /cascade… | | | |
20
- | write-plan | local | Thinker drafts a local implementer-ready checklist plan; parent Write persists .tmp/plans/{serial}-{slug}-{YYYYMMDDTHHM… | | | |
16
+ | explain | local | Longer human recap this reply only. | | | |
17
+ | google-workspace | local | Google Sheets, Docs, Slides, Calendar, Gmail via node scripts/google-workspace.mjs. | | | |
18
+ | handoff | local | Write a session handoff under .tmp/grunt/handoffs/. Continue with /pickup. | | | |
19
+ | implement-plan | local | Execute remaining leaves in a .tmp/grunt/plans checklist. Skip [x]. | | | |
20
+ | listen | local | Speech-to-text via node scripts/listen.mjs (ffmpeg mic + local whisper.cpp, OpenAI fallback). Input only. | | | |
21
+ | pickup | local | Continue a handoff under .tmp/grunt/handoffs/. | | | |
22
+ | speak | local | Text-to-speech via node scripts/speak.mjs (ElevenLabs or OpenAI). Output only. | | | |
23
+ | tmp | local | Dump a one-off convo artifact under .tmp/grunt/. | | | |
24
+ | write-plan | local | Write a local checklist under .tmp/grunt/plans/. Then /implement-plan {n}. | | | |
@@ -0,0 +1,59 @@
1
+ ---
2
+ tags: [speak]
3
+ ---
4
+
5
+ # Speak
6
+
7
+ Text-to-speech from the session. Output only. Not STT. Not a mic. Not MCP. Speech-to-text is `/listen`: `.rulesync/reference/listen.md` and `node scripts/listen.mjs`.
8
+
9
+ ```
10
+ node scripts/speak.mjs whoami
11
+ node scripts/speak.mjs voices [--provider elevenlabs|openai]
12
+ node scripts/speak.mjs say --text "hello" [--provider elevenlabs|openai] [--voice ID] [--out path] [--play]
13
+ ```
14
+
15
+ `say` writes an mp3 under `.tmp/grunt/speak/` (or `--out`) and prints the path. `--play` is local `afplay` (mac) or `ffplay`.
16
+
17
+ ## Auth
18
+
19
+ Handheld (any OS): `node scripts/setup.mjs speak` or `npm exec grunt setup` → speak. Opens the key page, hides the paste, writes `~/.grunt/speak.json`, verifies. Non-TTY: `--elevenlabs-key` / `--openai-key`.
20
+
21
+ If a key is missing or rejected, the CLI prints `setup: node scripts/setup.mjs speak` and exits 1. Agents should show that line, not a stack or JSON. Do not invent a key.
22
+
23
+ One key is enough. Never commit it.
24
+
25
+ | | env | file |
26
+ | --- | --- | --- |
27
+ | ElevenLabs | `ELEVENLABS_API_KEY` | `elevenlabs.apiKey` |
28
+ | OpenAI | `OPENAI_API_KEY` | `openai.apiKey` |
29
+ | Force provider | `SPEAK_PROVIDER` | `provider` |
30
+
31
+ `~/.grunt/speak.json` (chmod 600):
32
+
33
+ ```json
34
+ {
35
+ "provider": "elevenlabs",
36
+ "elevenlabs": {
37
+ "apiKey": "sk_…",
38
+ "voiceId": "JBFqnCBsd6RMkjVDRZzb",
39
+ "modelId": "eleven_multilingual_v2"
40
+ },
41
+ "openai": {
42
+ "apiKey": "sk-…",
43
+ "voice": "coral",
44
+ "model": "gpt-4o-mini-tts"
45
+ }
46
+ }
47
+ ```
48
+
49
+ Env wins over the file. Default provider is `SPEAK_PROVIDER` else the first configured key (elevenlabs, then openai).
50
+
51
+ ## Defaults
52
+
53
+ - ElevenLabs voice: George `JBFqnCBsd6RMkjVDRZzb`. Model: `eleven_multilingual_v2`.
54
+ - OpenAI voice: `coral`. Model: `gpt-4o-mini-tts`.
55
+ - Format: mp3.
56
+
57
+ Create an ElevenLabs key at https://elevenlabs.io/app/settings/api-keys. OpenAI at https://platform.openai.com/api-keys.
58
+
59
+ Doctor reports speak as optional: `ok` when a key or `~/.grunt/speak.json` exists, else `missing (optional)`. It prints the provider name, not the secret.
@@ -2,48 +2,7 @@
2
2
  root: true
3
3
  targets:
4
4
  - claudecode
5
+ globs:
6
+ - "**/*"
5
7
  ---
6
- Voice: `.rulesync/reference/output.md` — cite once; apply every turn.
7
- 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 (thinker recap verbatim-ish; no-strip how/why). 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`.
8
- All output exclude AI attribution, Co-Authored-By, trailers, generated markers.
9
- Protocol: `.rulesync/reference/cascade.md`. Do not paste.
10
- On-demand (feat/domain; never every-turn; parent does not Read): `.rulesync/reference/INDEX.md` — load this then only the matching row. Never load the folder.
11
- Always-do:
12
-
13
- | signal | next |
14
- |---|---|
15
- | 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 |
16
- | 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 |
17
- | tools/facts/git/test/mechanical write | spawn grunt |
18
- | world fact | spawn grunt `job:web` |
19
- | write defined solution | spawn implementer; **blocked if advise-class stems present** unless prompt-is-spec / obvious comment-spec false+ |
20
- | 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 |
21
- | child returned | recap per output.md (echo=report not command; thinker recap verbatim-ish; no-strip). e.g. `[orchestrator]: wrote /abs/a` |
22
- | child `need:` | parse-need + parallel grunt; `resume_from` + new verdicts; max 3 |
23
- | ⚠ / validate / sim | spawn implementer with findings; do not recap; spawn; no parent-edit |
24
- | work remains | spawn; do not stop. Advise recap ≠ leftover writes |
25
- | 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 |
26
- | `/parent` | spawn-first; hook last-ditch `parent-escape`; never Read/Bash |
27
- | `/handoff` | one-turn write `.tmp/grunt/handoffs/`; recap `[handoff]:` |
28
- | `/pickup` | spawn-first; grunt resolve if needed; never parent Read; not a mode |
29
- | `/write-plan` plan-only | recap; remainder `/implement-plan` (ask) |
30
- | `/explain` | spawn if facts/work; then human recap of child output; screenshot/visible=context no Read |
31
- | `/solo` | session escape only; stamp grunt-off-{sid}; else spawn-first |
32
- | `/cascade` | unlink solo stamp; spawn-first |
33
-
34
- 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}`.
35
- False+: I think terraform plan /implement-plan /solo source tokens one-cmd how- last-log why.
36
- Advise leftover: numbered pick each on own line after tagged recap:
37
- 1. Implementer with verbal plan
38
- 2. Implementer with file plan
39
- 3. Tweak
40
- 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 (how+why; implementer must not paste why into code comments); 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.
41
- Parent = orchestrator (this file). You do not talk. Spawn wait echo.
42
- Spawn only grunt|implementer|thinker. Never spawn orchestrator. Children never spawn.
43
- 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. After child: legal tag + one-line recap (no-strip; no compress-to-verdict); advise leftover numbered pick on following lines not crammed. Echo = report not command. Siblings still run: `[grunt]:` echo. No skip-spawn. /handoff = one-turn in-parent write to `.tmp/grunt/handoffs/`; recap `[handoff]:`. `/pickup` spawn-first; grunt resolve if needed; never parent Read; not a mode.
44
- `/parent` hook last-ditch only. Skills spawn-first. Only `/solo` escapes spawn workflow.
45
- grunt ← tools (facts/search/exec/git/web/test/low-reason mechanical write; world fact: `job: web` never memory). implementer ← write defined solution (spec or small/simple); blocked if advise-class stems unless prompt-is-spec/false+. thinker ← think/plan/advise/recommend/how/why/explain (default product change; no implementer this turn).
46
- Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
47
- Peek every 60s/child; quote real host fields; `done|alive|stuck`; no invent; no auto-kill. `timeout_ms=60000` every peek. GAP: block on spawn return = `done`. Stuck/blocked: quote host fields only.
48
- `need:` JSON → parse-need + parallel grunt; one `resume_from` + new verdicts; max 3; no re-send task; no fresh-spawn.
49
- Child: this file does not apply; your agent file gates you. Never spawn.
8
+ @AGENTS.md
@@ -8,47 +8,14 @@ targets:
8
8
  globs:
9
9
  - "**/*"
10
10
  ---
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 echo (thinker recap verbatim-ish; no-strip how/why). 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`.
13
- All output exclude AI attribution, Co-Authored-By, trailers, generated markers.
14
- Protocol: `.rulesync/reference/cascade.md`. Do not paste.
15
- On-demand (feat/domain; never every-turn; parent does not Read): `.rulesync/reference/INDEX.md` — load this then only the matching row. Never load the folder.
16
- Always-do:
11
+ You are the session agent. Do the work. Use en-US unless asked. Write concise complete sentences with natural grammar. Skip filler and fluff. Ship optimal solutions only; rewrite if not. Flag blockers. Do not monkey-patch. Keep all work free of AI attribution, Co-Authored-By, trailers, and generated markers.
17
12
 
18
- | signal | next |
19
- |---|---|
20
- | 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 |
21
- | 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 |
22
- | tools/facts/git/test/mechanical write | spawn grunt |
23
- | world fact | spawn grunt `job:web` |
24
- | write defined solution | spawn implementer; **blocked if advise-class stems present** unless prompt-is-spec / obvious comment-spec false+ |
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 |
26
- | child returned | recap per output.md (echo=report not command; thinker recap verbatim-ish; no-strip). e.g. `[orchestrator]: wrote /abs/a` |
27
- | child `need:` | parse-need + parallel grunt; `resume_from` + new verdicts; max 3 |
28
- | ⚠ / validate / sim | spawn implementer with findings; do not recap; spawn; no parent-edit |
29
- | work remains | spawn; do not stop. Advise recap ≠ leftover writes |
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 |
31
- | `/parent` | spawn-first; hook last-ditch `parent-escape`; never Read/Bash |
32
- | `/handoff` | one-turn write `.tmp/grunt/handoffs/`; recap `[handoff]:` |
33
- | `/pickup` | spawn-first; grunt resolve if needed; never parent Read; not a mode |
34
- | `/write-plan` plan-only | recap; remainder `/implement-plan` (ask) |
35
- | `/explain` | spawn if facts/work; then human recap of child output; screenshot/visible=context no Read |
36
- | `/solo` | session escape only; stamp grunt-off-{sid}; else spawn-first |
37
- | `/cascade` | unlink solo stamp; spawn-first |
13
+ Size first. Straight shot: do it. Else read `.rulesync/reference/scope.md`.
14
+ Default `/auto`: keep going; ask on blockers. `/ask`: one step, then ask.
38
15
 
39
- 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}`.
40
- False+: I think terraform plan /implement-plan /solo source tokens one-cmd how- last-log why.
41
- Advise leftover: numbered pick each on own line after tagged recap:
42
- 1. Implementer with verbal plan
43
- 2. Implementer with file plan
44
- 3. Tweak
45
- 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 (how+why; implementer must not paste why into code comments); 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.
46
- Parent = orchestrator (this file). You do not talk. Spawn wait echo.
47
- Spawn only grunt|implementer|thinker. Never spawn orchestrator. Children never spawn.
48
- 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. After child: legal tag + one-line recap (no-strip; no compress-to-verdict); advise leftover numbered pick on following lines not crammed. Echo = report not command. Siblings still run: `[grunt]:` echo. No skip-spawn. /handoff = one-turn in-parent write to `.tmp/grunt/handoffs/`; recap `[handoff]:`. `/pickup` spawn-first; grunt resolve if needed; never parent Read; not a mode.
49
- `/parent` hook last-ditch only. Skills spawn-first. Only `/solo` escapes spawn workflow.
50
- grunt ← tools (facts/search/exec/git/web/test/low-reason mechanical write; world fact: `job: web` never memory). implementer ← write defined solution (spec or small/simple); blocked if advise-class stems unless prompt-is-spec/false+. thinker ← think/plan/advise/recommend/how/why/explain (default product change; no implementer this turn).
51
- Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
52
- Peek every 60s/child; quote real host fields; `done|alive|stuck`; no invent; no auto-kill. `timeout_ms=60000` every peek. GAP: block on spawn return = `done`. Stuck/blocked: quote host fields only.
53
- `need:` JSON → parse-need + parallel grunt; one `resume_from` + new verdicts; max 3; no re-send task; no fresh-spawn.
54
- Child: this file does not apply; your agent file gates you. Never spawn.
16
+ Read `.rulesync/reference/INDEX.md` once. When a row matches the work, read that reference in full.
17
+
18
+ Large dumps are compressed (search, test logs, snaps). Scratch and dumps live in `.tmp/grunt/` (gitignored). After a write, recap the path; edit with an offset slice when you need lines.
19
+ Fat dumps: `node scripts/grunt-job.mjs --job search|exec|slice|fetch|test` first; spawn grunt only when the dump needs judgment.
20
+
21
+ Browse with `node scripts/browser.mjs`. Lightpanda first; the rail swaps to Chromium when Lightpanda is blocked, empty, or client-rendered. Do not stop and say you cannot. App e2e is `playwright test`.
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: ask
3
+ description: "Session flag. Finish one step, recap, then ask before the next."
4
+ ---
5
+ # ask
6
+
7
+ Session flag. Slash `/ask` stamps this session.
8
+
9
+ Finish one coherent step. Recap what landed. Ask whether to continue. Wait. Do not start the next step in this turn.
10
+
11
+ `/auto` is the default: keep going; ask only on blockers. Slash `/auto` unlinks the stamp and returns this session to auto.