@lovrozagar/grunt 0.10.0 → 0.11.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 (125) hide show
  1. package/.agents/agents/orchestrator.md +1 -1
  2. package/.agents/hooks.json +2 -2
  3. package/.agents/skills/browser/SKILL.md +3 -3
  4. package/.agents/skills/clasp/SKILL.md +1 -1
  5. package/.agents/skills/explain/SKILL.md +1 -1
  6. package/.agents/skills/google-workspace/SKILL.md +3 -3
  7. package/.agents/skills/handoff/SKILL.md +2 -2
  8. package/.agents/skills/implement-plan/SKILL.md +2 -2
  9. package/.agents/skills/jev/SKILL.md +3 -3
  10. package/.agents/skills/listen/SKILL.md +3 -3
  11. package/.agents/skills/pickup/SKILL.md +1 -1
  12. package/.agents/skills/speak/SKILL.md +3 -3
  13. package/.agents/skills/tmp/SKILL.md +2 -2
  14. package/.agents/skills/write-plan/SKILL.md +4 -2
  15. package/.claude/agents/orchestrator.md +1 -1
  16. package/.claude/settings.json +3 -3
  17. package/.claude/skills/browser/SKILL.md +3 -3
  18. package/.claude/skills/clasp/SKILL.md +1 -1
  19. package/.claude/skills/explain/SKILL.md +1 -1
  20. package/.claude/skills/google-workspace/SKILL.md +3 -3
  21. package/.claude/skills/handoff/SKILL.md +2 -2
  22. package/.claude/skills/implement-plan/SKILL.md +2 -2
  23. package/.claude/skills/jev/SKILL.md +3 -3
  24. package/.claude/skills/listen/SKILL.md +3 -3
  25. package/.claude/skills/pickup/SKILL.md +1 -1
  26. package/.claude/skills/speak/SKILL.md +3 -3
  27. package/.claude/skills/tmp/SKILL.md +2 -2
  28. package/.claude/skills/write-plan/SKILL.md +4 -2
  29. package/.codex/agents/orchestrator.toml +1 -1
  30. package/.codex/hooks.json +3 -3
  31. package/.grok/agents/orchestrator.md +1 -1
  32. package/.grok/hooks/orchestrate-parent.js +9 -9
  33. package/.grok/skills/browser/SKILL.md +3 -3
  34. package/.grok/skills/clasp/SKILL.md +1 -1
  35. package/.grok/skills/explain/SKILL.md +1 -1
  36. package/.grok/skills/google-workspace/SKILL.md +3 -3
  37. package/.grok/skills/handoff/SKILL.md +2 -2
  38. package/.grok/skills/implement-plan/SKILL.md +2 -2
  39. package/.grok/skills/jev/SKILL.md +3 -3
  40. package/.grok/skills/listen/SKILL.md +3 -3
  41. package/.grok/skills/pickup/SKILL.md +1 -1
  42. package/.grok/skills/speak/SKILL.md +3 -3
  43. package/.grok/skills/tmp/SKILL.md +2 -2
  44. package/.grok/skills/write-plan/SKILL.md +4 -2
  45. package/.rulesync/hooks.jsonc +3 -3
  46. package/.rulesync/reference/INDEX.md +10 -10
  47. package/.rulesync/reference/browser.md +4 -4
  48. package/.rulesync/reference/cascade.md +2 -2
  49. package/.rulesync/reference/clasp.md +1 -1
  50. package/.rulesync/reference/google-workspace.md +29 -29
  51. package/.rulesync/reference/hooks.md +3 -3
  52. package/.rulesync/reference/implementation-format.md +2 -2
  53. package/.rulesync/reference/jev.md +3 -3
  54. package/.rulesync/reference/law.md +1 -1
  55. package/.rulesync/reference/listen.md +12 -12
  56. package/.rulesync/reference/map.md +25 -25
  57. package/.rulesync/reference/output.md +9 -1
  58. package/.rulesync/reference/refs-map.md +4 -4
  59. package/.rulesync/reference/rtk.md +1 -1
  60. package/.rulesync/reference/scope.md +12 -14
  61. package/.rulesync/reference/setup.md +7 -7
  62. package/.rulesync/reference/skills-map.md +5 -5
  63. package/.rulesync/reference/speak.md +6 -6
  64. package/.rulesync/rules/overview.md +9 -5
  65. package/{scripts → .rulesync/scripts}/doctor.mjs +2 -2
  66. package/{scripts → .rulesync/scripts}/feature-packs.mjs +1 -1
  67. package/{scripts → .rulesync/scripts}/folder-map.mjs +7 -3
  68. package/{scripts → .rulesync/scripts}/gate-fat-tools.mjs +3 -3
  69. package/{scripts → .rulesync/scripts}/google-workspace.mjs +2 -2
  70. package/{scripts → .rulesync/scripts}/grunt-job.mjs +2 -0
  71. package/{scripts → .rulesync/scripts}/guarded-md.mjs +10 -4
  72. package/{scripts → .rulesync/scripts}/hooks-union.mjs +13 -8
  73. package/{scripts → .rulesync/scripts}/jev.mjs +2 -2
  74. package/{scripts → .rulesync/scripts}/listen.mjs +6 -6
  75. package/{scripts → .rulesync/scripts}/pipeline.mjs +14 -14
  76. package/{scripts → .rulesync/scripts}/session-map.mjs +1 -1
  77. package/{scripts → .rulesync/scripts}/setup.mjs +4 -4
  78. package/{scripts → .rulesync/scripts}/speak.mjs +4 -4
  79. package/.rulesync/skills/browser/SKILL.md +3 -3
  80. package/.rulesync/skills/clasp/SKILL.md +1 -1
  81. package/.rulesync/skills/explain/SKILL.md +1 -1
  82. package/.rulesync/skills/google-workspace/SKILL.md +3 -3
  83. package/.rulesync/skills/handoff/SKILL.md +2 -2
  84. package/.rulesync/skills/implement-plan/SKILL.md +2 -2
  85. package/.rulesync/skills/jev/SKILL.md +3 -3
  86. package/.rulesync/skills/listen/SKILL.md +3 -3
  87. package/.rulesync/skills/pickup/SKILL.md +1 -1
  88. package/.rulesync/skills/speak/SKILL.md +3 -3
  89. package/.rulesync/skills/tmp/SKILL.md +2 -2
  90. package/.rulesync/skills/write-plan/SKILL.md +4 -2
  91. package/.rulesync/subagents/orchestrator.md +1 -1
  92. package/AGENTS.md +11 -5
  93. package/CHANGELOG.md +22 -0
  94. package/CLAUDE.md +2 -0
  95. package/README.md +23 -23
  96. package/cli/grunt.mjs +3 -3
  97. package/cli/grunt.test.ts +6 -6
  98. package/cli/init.mjs +64 -16
  99. package/cli/init.test.ts +310 -163
  100. package/cli/prompt.mjs +1 -1
  101. package/cli/self-update.mjs +1 -1
  102. package/package.json +15 -50
  103. /package/{scripts → .rulesync/scripts}/board.mjs +0 -0
  104. /package/{scripts → .rulesync/scripts}/browser.mjs +0 -0
  105. /package/{scripts → .rulesync/scripts}/check-globals.mjs +0 -0
  106. /package/{scripts → .rulesync/scripts}/emit-agent-shell-tools.mjs +0 -0
  107. /package/{scripts → .rulesync/scripts}/emit-gemini.mjs +0 -0
  108. /package/{scripts → .rulesync/scripts}/emit-maps.mjs +0 -0
  109. /package/{scripts → .rulesync/scripts}/emit-mcp-policy.mjs +0 -0
  110. /package/{scripts → .rulesync/scripts}/guarded-roots.mjs +0 -0
  111. /package/{scripts → .rulesync/scripts}/interactive.mjs +0 -0
  112. /package/{scripts → .rulesync/scripts}/jsonc.mjs +0 -0
  113. /package/{scripts → .rulesync/scripts}/package-manager.mjs +0 -0
  114. /package/{scripts → .rulesync/scripts}/parse-need.mjs +0 -0
  115. /package/{scripts → .rulesync/scripts}/persist-handoff.mjs +0 -0
  116. /package/{scripts → .rulesync/scripts}/persist-implementation.mjs +0 -0
  117. /package/{scripts → .rulesync/scripts}/persist-plan.mjs +0 -0
  118. /package/{scripts → .rulesync/scripts}/persist-tmp.mjs +0 -0
  119. /package/{scripts → .rulesync/scripts}/prompt.mjs +0 -0
  120. /package/{scripts → .rulesync/scripts}/purge-global-mcps.mjs +0 -0
  121. /package/{scripts → .rulesync/scripts}/scrub-spawn-prompt.mjs +0 -0
  122. /package/{scripts → .rulesync/scripts}/scrub-text +0 -0
  123. /package/{scripts → .rulesync/scripts}/scrub-text-lib.mjs +0 -0
  124. /package/{scripts → .rulesync/scripts}/skill-conflicts.mjs +0 -0
  125. /package/{scripts → .rulesync/scripts}/sync-global-settings.mjs +0 -0
@@ -4,10 +4,10 @@ description: 'Execute remaining leaves in a .tmp/grunt/plans checklist. Skip [x]
4
4
  ---
5
5
  # implement-plan
6
6
 
7
- You execute the plan in this session. Skip `[x]`. Start at the first open leaf. Flip only the box after each leaf. When a phase's children are `[x]`, mark the phase `[x]`. Frontmatter `in-progress` then `done`.
7
+ You execute the plan in this session. Start only on a plan the user approved, or when the request said "plan and do it". Skip `[x]`. Start at the first open leaf. Flip only the box after each leaf. When a phase's children are `[x]`, mark the phase `[x]`. Frontmatter `in-progress` then `done`.
8
8
 
9
9
  Arg `{n|path}` picks that file. Empty arg: unique in-progress, else unique ready, else list serials.
10
10
 
11
- Format: `.rulesync/reference/plan-format.md`. Write-allowlist = paths listed in the plan. Run Verify leaves. Do not skip a test leaf. Do not flip a behavior leaf `[x]` until its test ran. Fat dumps go through `node scripts/grunt-job.mjs`.
11
+ Format: `.rulesync/reference/plan-format.md`. Write-allowlist = paths listed in the plan. Run Verify leaves. Do not skip a test leaf. Do not flip a behavior leaf `[x]` until its test ran. Fat dumps go through `node .rulesync/scripts/grunt-job.mjs`.
12
12
 
13
13
  On start: if this plan has no journal, Write one under `.tmp/grunt/implementations/` (`IMPL_NAME:`, `IMPL_PLAN: {n}`). Format: `.rulesync/reference/implementation-format.md`. After each leaf: append `N.M [x] …` to Log, update Files (repo-relative product paths) and Done. Blocked → `status: blocked` and Blockers. Verify done → `status: done`. Straight shots do not write a journal.
@@ -2,17 +2,17 @@
2
2
  name: jev
3
3
  description: >-
4
4
  Yes/no or named-option decision on text already saved. Run node
5
- scripts/jev.mjs --available first. On yes, one decision call. On no, decide
5
+ .rulesync/scripts/jev.mjs --available first. On yes, one decision call. On no, decide
6
6
  yourself and do not mention Jev.
7
7
  ---
8
8
  # jev
9
9
 
10
10
  Use this when the source text is already saved and the leftover question is a yes/no or a choice among options the research already named. Spec: `.rulesync/reference/jev.md`.
11
11
 
12
- Run `node scripts/jev.mjs --available`. It prints `yes` or `no` and exits 0.
12
+ Run `node .rulesync/scripts/jev.mjs --available`. It prints `yes` or `no` and exits 0.
13
13
 
14
14
  `no`: answer the question yourself. Do not run a decision call. Do not mention Jev, a missing key, or setup.
15
15
 
16
- `yes`: read `.rulesync/reference/jev.md`. Write the passage and one questions file under `.tmp/grunt/jev/`. Run `node scripts/jev.mjs --state <state> --questions <questions>` once. Use the printed label and confidence. A low confidence is the result. Do not call again.
16
+ `yes`: read `.rulesync/reference/jev.md`. Write the passage and one questions file under `.tmp/grunt/jev/`. Run `node .rulesync/scripts/jev.mjs --state <state> --questions <questions>` once. Use the printed label and confidence. A low confidence is the result. Do not call again.
17
17
 
18
18
  Open research, code, and grunt-job stay with the session. If the decision call exits non-zero, answer from the sources. Do not invent a label.
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  name: listen
3
3
  description: >-
4
- Speech-to-text via node scripts/listen.mjs (ffmpeg mic + local whisper.cpp,
4
+ Speech-to-text via node .rulesync/scripts/listen.mjs (ffmpeg mic + local whisper.cpp,
5
5
  OpenAI fallback). Input only.
6
6
  ---
7
7
  # listen
8
8
 
9
- When the user wants to dictate, transcribe a recording, or toggle a mic, run `node scripts/listen.mjs`. Spec: `.rulesync/reference/listen.md`. Input only (audio → text). Do not speak. Do not use `/speak`.
9
+ When the user wants to dictate, transcribe a recording, or toggle a mic, run `node .rulesync/scripts/listen.mjs`. Spec: `.rulesync/reference/listen.md`. Input only (audio → text). Do not speak. Do not use `/speak`.
10
10
 
11
11
  `whoami` · `devices` · `rec [--seconds N]` · `start` · `stop` · `toggle` · `status` · `file --path P` · `latest`. `--clip` copies the transcript. `--cwd DIR` when the process is not already in the repo (hotkeys). `rec` prints the transcript and `transcript=.tmp/grunt/listen/latest.txt`.
12
12
 
13
13
  STT: local `whisper-cli` first (mac: `brew install whisper-cpp`); first listen downloads the ggml model to `~/.grunt/whisper/`. Else `OPENAI_API_KEY`. Mic verbs need ffmpeg. Do not tell them to pip-install openai-whisper or curl the model by hand.
14
14
 
15
- If the CLI exits non-zero, print its message. Lines with `setup:` are for the user — show that command. Tell them to run `node scripts/setup.mjs listen` (or `grunt setup`) in their terminal. Do not dump JSON. Do not invent a key. Spec: `.rulesync/reference/listen.md` `.rulesync/reference/setup.md`.
15
+ If the CLI exits non-zero, print its message. Lines with `setup:` are for the user — show that command. Tell them to run `node .rulesync/scripts/setup.mjs listen` (or `grunt setup`) in their terminal. Do not dump JSON. Do not invent a key. Spec: `.rulesync/reference/listen.md` `.rulesync/reference/setup.md`.
@@ -18,7 +18,7 @@ Load a handoff and continue in this session. Not a mode. Not `/handoff`. Inverse
18
18
 
19
19
  ## Resolve
20
20
 
21
- Read `.tmp/grunt/handoffs/`. Use `node scripts/grunt-job.mjs --job search|exec` when the listing is fat.
21
+ Read `.tmp/grunt/handoffs/`. Use `node .rulesync/scripts/grunt-job.mjs --job search|exec` when the listing is fat.
22
22
 
23
23
  Order:
24
24
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: speak
3
- description: Text-to-speech via node scripts/speak.mjs (ElevenLabs or OpenAI). Output only.
3
+ description: Text-to-speech via node .rulesync/scripts/speak.mjs (ElevenLabs or OpenAI). Output only.
4
4
  ---
5
5
  # speak
6
6
 
7
- When the user wants spoken audio, run `node scripts/speak.mjs`. Spec: `.rulesync/reference/speak.md`. Output only (text → mp3). Do not record a mic. Do not transcribe.
7
+ When the user wants spoken audio, run `node .rulesync/scripts/speak.mjs`. Spec: `.rulesync/reference/speak.md`. Output only (text → mp3). Do not record a mic. Do not transcribe.
8
8
 
9
9
  `whoami` · `voices` · `say --text T [--provider elevenlabs|openai] [--voice ID] [--out path] [--play]`.
10
10
 
11
11
  Auth: `ELEVENLABS_API_KEY` or `OPENAI_API_KEY` or `~/.grunt/speak.json`. Do not commit the key. Default voices: ElevenLabs George (`JBFqnCBsd6RMkjVDRZzb`), OpenAI `coral`.
12
12
 
13
- If the CLI exits non-zero, print its message. Lines with `setup:` are for the user — show that command. Tell them to run `node scripts/setup.mjs speak` (or `grunt setup`) in their terminal. Do not dump JSON. Do not invent a key. Spec: `.rulesync/reference/speak.md` `.rulesync/reference/setup.md`.
13
+ If the CLI exits non-zero, print its message. Lines with `setup:` are for the user — show that command. Tell them to run `node .rulesync/scripts/setup.mjs speak` (or `grunt setup`) in their terminal. Do not dump JSON. Do not invent a key. Spec: `.rulesync/reference/speak.md` `.rulesync/reference/setup.md`.
@@ -33,9 +33,9 @@ TMP_EXT: md
33
33
  <artifact only>
34
34
  ```
35
35
 
36
- `TMP_EXT` optional. Write any root filename under `.tmp/grunt/` (not `plans|handoffs|implementations|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.
36
+ `TMP_EXT` optional. Write any root filename under `.tmp/grunt/` (not `plans|handoffs|implementations|browser|orchestrator-logs`). Grok `orchestrate-parent.js` runs `.rulesync/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.
37
37
 
38
- 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`.
38
+ Host without that hook: name the file per **Path** yourself, or pipe the body to `node .rulesync/scripts/persist-tmp.mjs --workspace {repo}` and use its `path`.
39
39
 
40
40
  Never rewrite an existing dump; new serial. Artifact file content after hook = artifact only (no TMP_* lines no YAML frontmatter).
41
41
 
@@ -4,10 +4,12 @@ description: 'Write a local checklist under .tmp/grunt/plans/. Then /implement-p
4
4
  ---
5
5
  # write-plan
6
6
 
7
- You author the plan. Persist under `.tmp/grunt/plans/` via Write (hook runs `scripts/persist-plan.mjs`). Format: `.rulesync/reference/plan-format.md`.
7
+ You author the plan. Persist under `.tmp/grunt/plans/` via Write (hook runs `.rulesync/scripts/persist-plan.mjs`). Format: `.rulesync/reference/plan-format.md`.
8
8
 
9
9
  Empty task → ask for a task and stop.
10
10
 
11
11
  Body starts with `PLAN_NAME: <3-6 word name>`, then Goal, Context, Constraints, Watch-outs, Steps, Verify. All boxes `[ ]`. Tests: new behavior or bug → failing test leaf before impl; other behavior → test leaf right after impl; docs/rename/config/generated → skip. Verify is the end gate.
12
12
 
13
- Report: wrote serial N at `.tmp/grunt/plans/{file}`. Next `/implement-plan {n}`. Do not dump the plan.
13
+ The plan is the proposal and caps the result (`.rulesync/reference/scope.md`). Before writing, research until every leaf is defensible; ask any plan-shaping question the user alone can answer, then research again on the answer. Do not default a plan-shaping choice. A minor open choice goes under Constraints as the chosen default plus "confirm".
14
+
15
+ Report: serial N at `.tmp/grunt/plans/{file}`, the goal, the phase list, the top risks, and any assumption to confirm. Do not dump the plan. Stop and ask for approval; on feedback, revise this file and stop again. Run `/implement-plan {n}` in the same turn only when the request said "plan and do it".
@@ -7,14 +7,14 @@
7
7
  {
8
8
  "matcher": "spawn_subagent|Task|Agent|spawn_agent",
9
9
  "type": "command",
10
- "command": "node \"${GROK_WORKSPACE_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/scripts/scrub-spawn-prompt.mjs\"",
10
+ "command": "node \"${GROK_WORKSPACE_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.rulesync/scripts/scrub-spawn-prompt.mjs\"",
11
11
  "timeout": 5
12
12
  },
13
13
  {
14
14
  // Fat Read/Grep/Glob/Bash + Write/Edit scratch rewrite (never deny writes).
15
15
  "matcher": "Read|read_file|Grep|grep|Glob|list_dir|Bash|run_terminal_command|Write|Edit|write|search_replace",
16
16
  "type": "command",
17
- "command": "node \"${GROK_WORKSPACE_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/scripts/gate-fat-tools.mjs\"",
17
+ "command": "node \"${GROK_WORKSPACE_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.rulesync/scripts/gate-fat-tools.mjs\"",
18
18
  "timeout": 5
19
19
  },
20
20
  {
@@ -29,7 +29,7 @@
29
29
  {
30
30
  // Code-only folder map as additionalContext (hooks-union keeps it first).
31
31
  "type": "command",
32
- "command": "node \"${GROK_WORKSPACE_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/scripts/session-map.mjs\"",
32
+ "command": "node \"${GROK_WORKSPACE_ROOT:-${CLAUDE_PROJECT_DIR:-.}}/.rulesync/scripts/session-map.mjs\"",
33
33
  "timeout": 5
34
34
  }
35
35
  ],
@@ -10,7 +10,7 @@ Reserved (do not reuse in consumer custom skills): `ask` `auto` `browser` `clasp
10
10
 
11
11
  Override: same name → one SSOT path (`.rulesync/skills/<name>/`). Re-init / `grunt upgrade` force-refresh overwrites grunt-owned names; consumer extras kept. Maps `origin` badge ≠ content picker.
12
12
 
13
- Upgrade copies the current package trees and product scripts, then deletes cumulative retired grunt-owned names (skills `parent` `solo` `cascade`; agents `implementer` `thinker`; scripts `telemetry.mjs` `grunt-config.mjs`; paths `.grok/parent.md` `.grok/skills/shared` `.rulesync/grunt.config.jsonc` `.rulesync/grunt.config.local.jsonc` `.rulesync/grunt.config.local.jsonc.example`) and any reserved skill dir this package no longer ships. `fs.cpSync` does not remove dest extras; prune is what drops them. Consumer skills/refs/scripts not on those lists stay. Extra `##` headings in shared reference docs (e.g. `law.md`) are kept. `grunt:*` package scripts that differ from a known grunt default stay; `grunt:test:e2e` is added only when a vitest e2e config exists. Check steps omitted from dest `scripts/pipeline.mjs` seed `.rulesync/grunt.pipeline.jsonc`. doctor/listen/speak call `scripts/lib/env.mjs` `loadEnv` when that file exists.
13
+ Upgrade copies the current package trees and product scripts (to `.rulesync/scripts/`), then deletes cumulative retired grunt-owned names (skills `parent` `solo` `cascade`; agents `implementer` `thinker`; scripts `telemetry.mjs` `grunt-config.mjs`; paths `.grok/parent.md` `.grok/skills/shared` `.rulesync/grunt.config.jsonc` `.rulesync/grunt.config.local.jsonc` `.rulesync/grunt.config.local.jsonc.example`) and any reserved skill dir this package no longer ships. `fs.cpSync` does not remove dest extras; prune is what drops them. Consumer skills/refs/scripts not on those lists stay. Extra `##` headings in shared reference docs (e.g. `law.md`) are kept. `grunt:*` package scripts that differ from a known grunt default stay; `grunt:test:e2e` is added only when a vitest e2e config exists. When a pre-0.11 root `scripts/` holds `guarded-roots.mjs` or `gate-fat-tools.mjs`, upgrade deletes the grunt product names there, removes the dir if that empties it, and rewrites `scripts/<grunt name>` refs in package scripts and `.rulesync/grunt.pipeline.jsonc`; consumer files and refs stay. Check steps omitted from the dest pipeline (`.rulesync/scripts/pipeline.mjs`, or the legacy root copy) seed `.rulesync/grunt.pipeline.jsonc`. doctor/listen/speak call the consumer's root `scripts/lib/env.mjs` `loadEnv` when that file exists.
14
14
 
15
15
  # Skills
16
16
 
@@ -18,7 +18,7 @@ Upgrade copies the current package trees and product scripts, then deletes cumul
18
18
  | --- | --- | --- | --- | --- | --- |
19
19
  | ask | local | Session flag. Finish one step, recap, then ask before the next. | | | |
20
20
  | auto | local | Session flag. Default. Work the task through. Ask on blockers instead of monkey-patching. | | | |
21
- | browser | local | Browse via node scripts/browser.mjs (Lightpanda). App e2e uses Playwright. | | | |
21
+ | browser | local | Browse via node .rulesync/scripts/browser.mjs (Lightpanda). App e2e uses Playwright. | | | |
22
22
  | clasp | local | Low-level Apps Script CLI. Prefer /google-workspace for sheet, doc, meeting, mail. | | | |
23
23
  | commit | local | Inspect the diff and commit with a Conventional Commits subject line. Use for /commit, "commit this", "commit these cha… | | | |
24
24
  | 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.… | | | |
@@ -26,13 +26,13 @@ Upgrade copies the current package trees and product scripts, then deletes cumul
26
26
  | commit-push-deploy | local | Commit, push, then deploy only if allowlisted infra already exists. Use for /commit-push-deploy, "commit push deploy",… | | | |
27
27
  | 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… | | | |
28
28
  | explain | local | Longer human recap this reply only. | | | |
29
- | google-workspace | local | Google Sheets, Docs, Slides, Calendar, Gmail via node scripts/google-workspace.mjs. | | | |
29
+ | google-workspace | local | Google Sheets, Docs, Slides, Calendar, Gmail via node .rulesync/scripts/google-workspace.mjs. | | | |
30
30
  | handoff | local | Write a session handoff under .tmp/grunt/handoffs/. Continue with /pickup. | | | |
31
31
  | implement-plan | local | Execute remaining leaves in a .tmp/grunt/plans checklist. Skip [x]. | | | |
32
- | jev | local | Yes/no or named-option decision on text already saved. Run node scripts/jev.mjs --available first. On yes, one decision… | | | |
33
- | listen | local | Speech-to-text via node scripts/listen.mjs (ffmpeg mic + local whisper.cpp, OpenAI fallback). Input only. | | | |
32
+ | jev | local | Yes/no or named-option decision on text already saved. Run node .rulesync/scripts/jev.mjs --available first. On yes, on… | | | |
33
+ | listen | local | Speech-to-text via node .rulesync/scripts/listen.mjs (ffmpeg mic + local whisper.cpp, OpenAI fallback). Input only. | | | |
34
34
  | pickup | local | Continue a handoff under .tmp/grunt/handoffs/. | | | |
35
- | speak | local | Text-to-speech via node scripts/speak.mjs (ElevenLabs or OpenAI). Output only. | | | |
35
+ | speak | local | Text-to-speech via node .rulesync/scripts/speak.mjs (ElevenLabs or OpenAI). Output only. | | | |
36
36
  | su | local | Short status update: done, next, and blockers or on-track ETA. | | | |
37
37
  | tmp | local | Dump a one-off convo artifact under .tmp/grunt/. | | | |
38
38
  | write-plan | local | Write a local checklist under .tmp/grunt/plans/. Then /implement-plan {n}. | | | |
@@ -42,18 +42,18 @@ Upgrade copies the current package trees and product scripts, then deletes cumul
42
42
  | path | title | tags | summary |
43
43
  | --- | --- | --- | --- |
44
44
  | .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. |
45
- | .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… |
45
+ | .rulesync/reference/cascade.md | Protocol | cascade | The session agent has tools. Fat Read/Grep/Bash dumps are rewritten to `.rulesync/scripts/grunt-job.mjs` (squeez + stas… |
46
46
  | .rulesync/reference/clasp.md | Clasp | clasp | Low-level Apps Script CLI. Optional. Doctor reports it. |
47
47
  | .rulesync/reference/google-workspace.md | google-workspace | google-workspace | Create and edit Google Sheets, Docs, Slides, Calendar events, and Gmail from the session. |
48
- | .rulesync/reference/hooks.md | Hooks | hooks | SessionStart carries only the folder map: Claude / Codex run `../../scripts/session-map.mjs`, which injects the code-on… |
48
+ | .rulesync/reference/hooks.md | Hooks | hooks | SessionStart carries only the folder map: Claude / Codex run `../../.rulesync/scripts/session-map.mjs`, which injects t… |
49
49
  | .rulesync/reference/implementation-format.md | Implementation format (SSOT) | | Local session journal for `/implement-plan`. Not a plan, handoff, or git commit. |
50
50
  | .rulesync/reference/jev.md | Jev | jev | Closed external decision. The source text is already saved. The question is a yes/no or a named choice. One call. Not o… |
51
51
  | .rulesync/reference/law.md | Law | | Protocol stays overview; domain fills this. |
52
52
  | .rulesync/reference/listen.md | Listen | listen | Speech-to-text from the session. Input only. Not TTS. Not a live voice agent. Not MCP. |
53
53
  | .rulesync/reference/map.md | Map | map | Cheap outline. Not a file dump. |
54
- | .rulesync/reference/output.md | Output | output | en-US unless asked. Concise complete sentences with natural grammar. Skip filler and fluff. |
54
+ | .rulesync/reference/output.md | Output | output | en-US unless asked. Concise complete sentences with natural grammar. Skip filler and fluff. Examples are a class. |
55
55
  | .rulesync/reference/plan-format.md | Plan format (SSOT) | | Local session checklist. Not a design doc, PR stack, or DAG. |
56
56
  | .rulesync/reference/rtk.md | RTK | rtk | Shell stdout compression. PreToolUse: Bash → `rtk <cmd>`. Not Read/Grep/Glob/prompts/images. |
57
- | .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. |
57
+ | .rulesync/reference/scope.md | Scope | scope | Plan by default. A straight shot is the exception. The plan caps the result, so its depth scales with the work. This fi… |
58
58
  | .rulesync/reference/setup.md | Setup | setup | Handheld machine setup for optional integrations. Any OS. Secrets stay in `~/.grunt/` (Windows `%USERPROFILE%\.grunt`).… |
59
59
  | .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… |
@@ -7,7 +7,7 @@ tags: [browser]
7
7
  Zero-config in-tree session rail. Not MCP. Not env. Not raw Playwright. Lightpanda first; swap to Chromium when blocked.
8
8
 
9
9
  ```
10
- node scripts/browser.mjs nav|snap|click|fill|scroll|wait|hover|select|shot|pdf|stop|doctor|ensure
10
+ node .rulesync/scripts/browser.mjs nav|snap|click|fill|scroll|wait|hover|select|shot|pdf|stop|doctor|ensure
11
11
  ```
12
12
 
13
13
  Default engine: **Lightpanda** (`lightpanda` on PATH). Chromium when a rule below requires it. Never report "can't browse" while Chromium is available.
@@ -27,14 +27,14 @@ Default engine: **Lightpanda** (`lightpanda` on PATH). Chromium when a rule belo
27
27
  | `shot` | screenshot (Chromium paint) |
28
28
  | `pdf` | PDF (Chromium paint) |
29
29
  | `stop` | reap engine pid; clear session; idempotent |
30
- | `doctor` | unified prereq doctor (`scripts/doctor.mjs`); alias `ensure` |
30
+ | `doctor` | unified prereq doctor (`.rulesync/scripts/doctor.mjs`); alias `ensure` |
31
31
  | `ensure` | alias of `doctor` |
32
32
 
33
33
  Session + profile + artifacts: `.tmp/grunt/browser/` only.
34
34
 
35
35
  ## Install
36
36
 
37
- Run `grunt doctor` / `node scripts/doctor.mjs`. Handheld engine hints (no keys): `node scripts/setup.mjs browser`. Doctor/setup is enough. Do not read a README unless those are missing; then https://github.com/lovrozagar/grunt#prerequisites (not the consumer README).
37
+ Run `grunt doctor` / `node .rulesync/scripts/doctor.mjs`. Handheld engine hints (no keys): `node .rulesync/scripts/setup.mjs browser`. Doctor/setup is enough. Do not read a README unless those are missing; then https://github.com/lovrozagar/grunt#prerequisites (not the consumer README).
38
38
 
39
39
  ## Engine
40
40
 
@@ -63,4 +63,4 @@ No user env. Never `GRUNT_BROWSER*`. Never `LIGHTPANDA_CDP_URL`.
63
63
 
64
64
  ## RTK
65
65
 
66
- `playwright` on the RTK command list is the **test-runner family only**. Browser rail is `lightpanda` + `scripts/browser.mjs`.
66
+ `playwright` on the RTK command list is the **test-runner family only**. Browser rail is `lightpanda` + `.rulesync/scripts/browser.mjs`.
@@ -4,9 +4,9 @@ tags: [cascade]
4
4
 
5
5
  # Protocol
6
6
 
7
- The session agent has tools. Fat Read/Grep/Bash dumps are rewritten to `scripts/grunt-job.mjs` (squeez + stash). Isolation facts stay ≤8 lines.
7
+ The session agent has tools. Fat Read/Grep/Bash dumps are rewritten to `.rulesync/scripts/grunt-job.mjs` (squeez + stash). Isolation facts stay ≤8 lines.
8
8
 
9
- Run `node scripts/grunt-job.mjs --job search|exec|slice|fetch|test` first. Spawn a grunt model only when the dump needs judgment (browse snap, messy test log). Isolation work may run as grunt.
9
+ Run `node .rulesync/scripts/grunt-job.mjs --job search|exec|slice|fetch|test` first. Spawn a grunt model only when the dump needs judgment (browse snap, messy test log). Isolation work may run as grunt.
10
10
 
11
11
  `need:` JSON (search|exec|slice|fetch) may be intercepted in-hook (cap 4). Peek/kill if a child is running: Grok `get_command_or_subagent_output` `timeout_ms=60000`. Other hosts: block on spawn return.
12
12
 
@@ -6,7 +6,7 @@ tags: [clasp]
6
6
 
7
7
  Low-level Apps Script CLI. Optional. Doctor reports it.
8
8
 
9
- For create/edit sheet, doc, slide, meeting, or mail, use **google-workspace**: `.rulesync/reference/google-workspace.md` and `node scripts/google-workspace.mjs`. Do not start from clasp.
9
+ For create/edit sheet, doc, slide, meeting, or mail, use **google-workspace**: `.rulesync/reference/google-workspace.md` and `node .rulesync/scripts/google-workspace.mjs`. Do not start from clasp.
10
10
 
11
11
  ```
12
12
  npm i -g @google/clasp
@@ -7,35 +7,35 @@ tags: [google-workspace]
7
7
  Create and edit Google Sheets, Docs, Slides, Calendar events, and Gmail from the session.
8
8
 
9
9
  ```
10
- node scripts/google-workspace.mjs whoami
11
- node scripts/google-workspace.mjs scopes
12
- node scripts/google-workspace.mjs login
13
- node scripts/google-workspace.mjs sheet create --title "Q3" --csv "item,qty\nA,2"
14
- node scripts/google-workspace.mjs sheet set --id ID --cell A1 --value x
15
- node scripts/google-workspace.mjs sheet get --id ID --range A1:B10
16
- node scripts/google-workspace.mjs sheet append --id ID --csv "c,3"
17
- node scripts/google-workspace.mjs sheet clear --id ID --range A1:Z
18
- node scripts/google-workspace.mjs doc create --title "Notes" --body "hello"
19
- node scripts/google-workspace.mjs doc append --id ID --body "more"
20
- node scripts/google-workspace.mjs drive list --query "mimeType='application/vnd.google-apps.spreadsheet'"
21
- node scripts/google-workspace.mjs slide create --title "Deck"
22
- node scripts/google-workspace.mjs meeting create --title "Standup" --start 2026-09-15T09:00:00Z --end 2026-09-15T09:15:00Z --attendees a@x.com,b@y.com
23
- node scripts/google-workspace.mjs mail send --to you@example.com --subject hi --body hello
24
- node scripts/google-workspace.mjs mail list
10
+ node .rulesync/scripts/google-workspace.mjs whoami
11
+ node .rulesync/scripts/google-workspace.mjs scopes
12
+ node .rulesync/scripts/google-workspace.mjs login
13
+ node .rulesync/scripts/google-workspace.mjs sheet create --title "Q3" --csv "item,qty\nA,2"
14
+ node .rulesync/scripts/google-workspace.mjs sheet set --id ID --cell A1 --value x
15
+ node .rulesync/scripts/google-workspace.mjs sheet get --id ID --range A1:B10
16
+ node .rulesync/scripts/google-workspace.mjs sheet append --id ID --csv "c,3"
17
+ node .rulesync/scripts/google-workspace.mjs sheet clear --id ID --range A1:Z
18
+ node .rulesync/scripts/google-workspace.mjs doc create --title "Notes" --body "hello"
19
+ node .rulesync/scripts/google-workspace.mjs doc append --id ID --body "more"
20
+ node .rulesync/scripts/google-workspace.mjs drive list --query "mimeType='application/vnd.google-apps.spreadsheet'"
21
+ node .rulesync/scripts/google-workspace.mjs slide create --title "Deck"
22
+ node .rulesync/scripts/google-workspace.mjs meeting create --title "Standup" --start 2026-09-15T09:00:00Z --end 2026-09-15T09:15:00Z --attendees a@x.com,b@y.com
23
+ node .rulesync/scripts/google-workspace.mjs mail send --to you@example.com --subject hi --body hello
24
+ node .rulesync/scripts/google-workspace.mjs mail list
25
25
  ```
26
26
 
27
27
  Each person has their own Google Cloud app. Creds stay in `~/.grunt/` on that machine. Do not share OAuth JSON or tokens. Do not commit them. Inviting others to a meeting is attendee emails, not shared creds.
28
28
 
29
- Handheld (any OS): `node scripts/setup.mjs google-workspace` or `npm exec grunt setup` → google-workspace. Opens each Cloud Console page, waits, copies the Desktop JSON into `~/.grunt/google-oauth.json`, then browser Allow. Non-TTY: `--creds PATH` to a Desktop download. `--account NAME` for a second Google user.
29
+ Handheld (any OS): `node .rulesync/scripts/setup.mjs google-workspace` or `npm exec grunt setup` → google-workspace. Opens each Cloud Console page, waits, copies the Desktop JSON into `~/.grunt/google-oauth.json`, then browser Allow. Non-TTY: `--creds PATH` to a Desktop download. `--account NAME` for a second Google user.
30
30
 
31
31
  Doctor reports google-workspace as optional: `ok` when Desktop OAuth JSON, tokens, gcloud ADC, or `~/.clasprc.json` exists, else `missing (optional)`. It prints source names (`oauth` `tokens` `adc` `clasprc`), not secrets. `clasprc` is Drive-only.
32
32
 
33
33
  Two Google accounts on one machine: `--account NAME` (or `WORKSPACE_ACCOUNT`). Default is `default` (legacy files `~/.grunt/google-oauth.json` + `workspace-tokens.json` still work). Other accounts use `~/.grunt/workspace/NAME/`.
34
34
 
35
35
  ```
36
- node scripts/google-workspace.mjs --account work login
37
- node scripts/google-workspace.mjs --account work whoami
38
- node scripts/google-workspace.mjs accounts
36
+ node .rulesync/scripts/google-workspace.mjs --account work login
37
+ node .rulesync/scripts/google-workspace.mjs --account work whoami
38
+ node .rulesync/scripts/google-workspace.mjs accounts
39
39
  ```
40
40
 
41
41
  Each account needs its own Desktop JSON in that folder (`google-oauth.json`) and its own `login`.
@@ -44,7 +44,7 @@ Clasp’s public OAuth client is Drive-only. Calendar and Gmail are restricted;
44
44
 
45
45
  ## Agent: setup e2e
46
46
 
47
- If `whoami` works but `meeting` / `mail` / `sheet set` fail with missing scope or “app is blocked”, run **this user** through `node scripts/setup.mjs google-workspace` (TTY). Do not reuse another person’s JSON. Do not invent a client JSON.
47
+ If `whoami` works but `meeting` / `mail` / `sheet set` fail with missing scope or “app is blocked”, run **this user** through `node .rulesync/scripts/setup.mjs google-workspace` (TTY). Do not reuse another person’s JSON. Do not invent a client JSON.
48
48
 
49
49
  Local dir is created by setup (`~/.grunt/`, mode 700 on Unix). Manual equivalent: `mkdir -p "$HOME/.grunt" && chmod 700 "$HOME/.grunt"` then:
50
50
 
@@ -59,21 +59,21 @@ Local dir is created by setup (`~/.grunt/`, mode 700 on Unix). Manual equivalent
59
59
  - Application type: **Desktop app**.
60
60
  - Create → **Download JSON**.
61
61
  5. Copy the download to `$HOME/.grunt/google-oauth.json` (Windows: `%USERPROFILE%\.grunt\google-oauth.json`). chmod 600 on Unix. Confirm it has `"installed"` and `client_id`. For `--account NAME`, use `$HOME/.grunt/workspace/NAME/google-oauth.json`.
62
- 6. From the repo: `node scripts/google-workspace.mjs login` (or `--account NAME`) — browser Allow. Tokens write beside the JSON (`workspace-tokens.json` or `workspace/NAME/tokens.json`).
62
+ 6. From the repo: `node .rulesync/scripts/google-workspace.mjs login` (or `--account NAME`) — browser Allow. Tokens write beside the JSON (`workspace-tokens.json` or `workspace/NAME/tokens.json`).
63
63
  7. Smoke:
64
64
 
65
65
  ```
66
- node scripts/google-workspace.mjs whoami
67
- node scripts/google-workspace.mjs scopes
68
- node scripts/google-workspace.mjs sheet create --title smoke-sheet --csv "k,v\nok,1"
69
- node scripts/google-workspace.mjs doc create --title smoke-doc --body ok
70
- node scripts/google-workspace.mjs slide create --title smoke-slide
71
- node scripts/google-workspace.mjs meeting create --title smoke-meeting --start 2026-09-16T09:00:00Z --end 2026-09-16T09:15:00Z
72
- node scripts/google-workspace.mjs mail send --to THEIR_EMAIL --subject smoke --body ok
66
+ node .rulesync/scripts/google-workspace.mjs whoami
67
+ node .rulesync/scripts/google-workspace.mjs scopes
68
+ node .rulesync/scripts/google-workspace.mjs sheet create --title smoke-sheet --csv "k,v\nok,1"
69
+ node .rulesync/scripts/google-workspace.mjs doc create --title smoke-doc --body ok
70
+ node .rulesync/scripts/google-workspace.mjs slide create --title smoke-slide
71
+ node .rulesync/scripts/google-workspace.mjs meeting create --title smoke-meeting --start 2026-09-16T09:00:00Z --end 2026-09-16T09:15:00Z
72
+ node .rulesync/scripts/google-workspace.mjs mail send --to THEIR_EMAIL --subject smoke --body ok
73
73
  ```
74
74
 
75
75
  `scopes` must include `calendar`, `gmail.modify` or `gmail.send`, `spreadsheets`, `documents`, `drive`. If login times out, they did not finish Allow; re-run `login`.
76
76
 
77
- If `google-oauth.json` is missing, `login` prints `setup: node scripts/setup.mjs google-workspace`. Prefer the handheld setup (it opens the Project ID URLs). Manual steps above still work.
77
+ If `google-oauth.json` is missing, `login` prints `setup: node .rulesync/scripts/setup.mjs google-workspace`. Prefer the handheld setup (it opens the Project ID URLs). Manual steps above still work.
78
78
 
79
79
  `gcloud` on PATH is an alternate login (`gcloud auth application-default login` with the extra scopes). Still per person, still local.
@@ -4,15 +4,15 @@ tags: [hooks]
4
4
 
5
5
  # Hooks
6
6
 
7
- SessionStart carries only the folder map: Claude / Codex run `../../scripts/session-map.mjs`, which injects the code-only map from `../../scripts/folder-map.mjs` as `additionalContext` (capped under Claude Code's 10,000-char per-hook `additionalContext` limit, about 2.4k tokens, below the 5k `grunt map` budget; cache-stable, fail-open) and logs `{rows, tokens}` to `.tmp/grunt/sessions/<sid>/map.json`. Inject nothing else at SessionStart. Antigravity has no rulesync sessionStart. Do not register a SessionStart hook on `../../.grok/hooks/orchestrate-parent.json`.
7
+ SessionStart carries only the folder map: Claude / Codex run `../../.rulesync/scripts/session-map.mjs`, which injects the code-only map from `../../.rulesync/scripts/folder-map.mjs` as `additionalContext` (capped under Claude Code's 10,000-char per-hook `additionalContext` limit, about 2.4k tokens, below the 5k `grunt map` budget; cache-stable, fail-open) and logs `{rows, tokens}` to `.tmp/grunt/sessions/<sid>/map.json`. Inject nothing else at SessionStart. Antigravity has no rulesync sessionStart. Do not register a SessionStart hook on `../../.grok/hooks/orchestrate-parent.json`.
8
8
 
9
9
  Grok PostToolUse / SessionStart are observe-only — do not attempt output scrub; compress via RTK / spawn / isolation facts only. Do not add PostToolUse scrub hooks. UserPromptSubmit may emit a one-line `sessionGate=auto|ask` plus session receipt, then up to 8 other live lines from `~/.grunt/board/` (`hookSpecificOutput.additionalContext`). The current session's own line is omitted. Skip host Stop banners. `/ask` exact-match slash stamps `session-gate-{sid}` to `ask`. `/auto` unlinks. Sid-less: no stamp. Default: `auto`.
10
10
 
11
11
  In `sessionGate=ask`, parent Stop on `end_turn` blocks unless the recap asks (`?`) or is exactly `[orchestrator]: wait grunt`. Reason: `ask after this step`. Cap 3. `sessionGate=auto` does not Stop-block.
12
12
 
13
- Claude / Codex / Antigravity PreToolUse still run `../../scripts/scrub-spawn-prompt.mjs` and `../../scripts/gate-fat-tools.mjs`. Grok spawn/fat rewrite is `../../.grok/hooks/orchestrate-parent.js`. RTK stays `../../.grok/hooks/rtk.json`.
13
+ Claude / Codex / Antigravity PreToolUse still run `../../.rulesync/scripts/scrub-spawn-prompt.mjs` and `../../.rulesync/scripts/gate-fat-tools.mjs`. Grok spawn/fat rewrite is `../../.grok/hooks/orchestrate-parent.js`. RTK stays `../../.grok/hooks/rtk.json`.
14
14
 
15
- Session agent tools are on. Fat Read/Grep/Glob/Bash still gate. Writes under `.tmp/grunt/plans/`, `.tmp/grunt/handoffs/`, `.tmp/grunt/implementations/`, and `.tmp/grunt/` root files persist via `../../scripts/persist-plan.mjs` / `persist-handoff.mjs` / `persist-implementation.mjs` / `persist-tmp.mjs`. Invalid body denies.
15
+ Session agent tools are on. Fat Read/Grep/Glob/Bash still gate. Writes under `.tmp/grunt/plans/`, `.tmp/grunt/handoffs/`, `.tmp/grunt/implementations/`, and `.tmp/grunt/` root files persist via `../../.rulesync/scripts/persist-plan.mjs` / `persist-handoff.mjs` / `persist-implementation.mjs` / `persist-tmp.mjs`. Invalid body denies.
16
16
 
17
17
  SubagentStop (and child Stop with `subagentType`) intercepts a parseable `need:` whose jobs are all `search|exec|slice|fetch` (cap 4): runs grunt-job in-hook and continues the child with concatenated facts. Mixed/web/test, parse fail, FALLBACK, `stopHookActive`, or more than 3 intercepts per child session → empty stdout (allow stop).
18
18
 
@@ -60,9 +60,9 @@ No other `##` headings.
60
60
 
61
61
  ## Write
62
62
 
63
- Write under `.tmp/grunt/implementations/` (any filename in that dir). Grok `orchestrate-parent.js` runs `scripts/persist-implementation.mjs` on create (`IMPL_NAME:`): serial/slug from the name, injects frontmatter, rewrites path + content. Updates to an existing file keep the path; full-body writes are validated in place. Invalid create/update denies — fix the body, do not retry elsewhere.
63
+ Write under `.tmp/grunt/implementations/` (any filename in that dir). Grok `orchestrate-parent.js` runs `.rulesync/scripts/persist-implementation.mjs` on create (`IMPL_NAME:`): serial/slug from the name, injects frontmatter, rewrites path + content. Updates to an existing file keep the path; full-body writes are validated in place. Invalid create/update denies — fix the body, do not retry elsewhere.
64
64
 
65
- Host without that hook: name the file per **Path**, or pipe the body to `node scripts/persist-implementation.mjs --workspace {repo}` and use its `path`.
65
+ Host without that hook: name the file per **Path**, or pipe the body to `node .rulesync/scripts/persist-implementation.mjs --workspace {repo}` and use its `path`.
66
66
 
67
67
  Never allocate a new serial to log a leaf. Append Log, update Files/Done, flip the plan box.
68
68
 
@@ -9,7 +9,7 @@ Closed external decision. The source text is already saved. The question is a ye
9
9
  ## Availability
10
10
 
11
11
  ```
12
- node scripts/jev.mjs --available
12
+ node .rulesync/scripts/jev.mjs --available
13
13
  ```
14
14
 
15
15
  Prints `yes` or `no` and exits 0. No request. No setup line.
@@ -18,14 +18,14 @@ Prints `yes` or `no` and exits 0. No request. No setup line.
18
18
 
19
19
  `yes`: continue below.
20
20
 
21
- A key is `TYPESAFE_API_KEY` or `apiKey` in `~/.grunt/jev.json` (mode 0600). Env wins. Setup, when a person asks for it: `node scripts/setup.mjs jev`. Spec: `.rulesync/reference/setup.md`.
21
+ A key is `TYPESAFE_API_KEY` or `apiKey` in `~/.grunt/jev.json` (mode 0600). Env wins. Setup, when a person asks for it: `node .rulesync/scripts/setup.mjs jev`. Spec: `.rulesync/reference/setup.md`.
22
22
 
23
23
  ## Decision
24
24
 
25
25
  Write `.tmp/grunt/jev/<slug>-state.txt` (plain text or a JSON object) and `.tmp/grunt/jev/<slug>-questions.json` (the System One questions map). Put every label for that study in the one map. At most 8 questions. State at most 64000 characters.
26
26
 
27
27
  ```
28
- node scripts/jev.mjs --state .tmp/grunt/jev/<slug>-state.txt --questions .tmp/grunt/jev/<slug>-questions.json
28
+ node .rulesync/scripts/jev.mjs --state .tmp/grunt/jev/<slug>-state.txt --questions .tmp/grunt/jev/<slug>-questions.json
29
29
  ```
30
30
 
31
31
  Yes/no:
@@ -8,4 +8,4 @@ Reserved (do not reuse in consumer custom skills): `ask` `auto` `browser` `clasp
8
8
 
9
9
  Override: same name → one SSOT path (`.rulesync/skills/<name>/`). Re-init / `grunt upgrade` force-refresh overwrites grunt-owned names; consumer extras kept. Maps `origin` badge ≠ content picker.
10
10
 
11
- Upgrade copies the current package trees and product scripts, then deletes cumulative retired grunt-owned names (skills `parent` `solo` `cascade`; agents `implementer` `thinker`; scripts `telemetry.mjs` `grunt-config.mjs`; paths `.grok/parent.md` `.grok/skills/shared` `.rulesync/grunt.config.jsonc` `.rulesync/grunt.config.local.jsonc` `.rulesync/grunt.config.local.jsonc.example`) and any reserved skill dir this package no longer ships. `fs.cpSync` does not remove dest extras; prune is what drops them. Consumer skills/refs/scripts not on those lists stay. Extra `##` headings in shared reference docs (e.g. `law.md`) are kept. `grunt:*` package scripts that differ from a known grunt default stay; `grunt:test:e2e` is added only when a vitest e2e config exists. Check steps omitted from dest `scripts/pipeline.mjs` seed `.rulesync/grunt.pipeline.jsonc`. doctor/listen/speak call `scripts/lib/env.mjs` `loadEnv` when that file exists.
11
+ Upgrade copies the current package trees and product scripts (to `.rulesync/scripts/`), then deletes cumulative retired grunt-owned names (skills `parent` `solo` `cascade`; agents `implementer` `thinker`; scripts `telemetry.mjs` `grunt-config.mjs`; paths `.grok/parent.md` `.grok/skills/shared` `.rulesync/grunt.config.jsonc` `.rulesync/grunt.config.local.jsonc` `.rulesync/grunt.config.local.jsonc.example`) and any reserved skill dir this package no longer ships. `fs.cpSync` does not remove dest extras; prune is what drops them. Consumer skills/refs/scripts not on those lists stay. Extra `##` headings in shared reference docs (e.g. `law.md`) are kept. `grunt:*` package scripts that differ from a known grunt default stay; `grunt:test:e2e` is added only when a vitest e2e config exists. When a pre-0.11 root `scripts/` holds `guarded-roots.mjs` or `gate-fat-tools.mjs`, upgrade deletes the grunt product names there, removes the dir if that empties it, and rewrites `scripts/<grunt name>` refs in package scripts and `.rulesync/grunt.pipeline.jsonc`; consumer files and refs stay. Check steps omitted from the dest pipeline (`.rulesync/scripts/pipeline.mjs`, or the legacy root copy) seed `.rulesync/grunt.pipeline.jsonc`. doctor/listen/speak call the consumer's root `scripts/lib/env.mjs` `loadEnv` when that file exists.
@@ -7,24 +7,24 @@ tags: [listen]
7
7
  Speech-to-text from the session. Input only. Not TTS. Not a live voice agent. Not MCP.
8
8
 
9
9
  ```
10
- node scripts/listen.mjs whoami
11
- node scripts/listen.mjs devices
12
- node scripts/listen.mjs rec [--seconds 8] [--device D] [--clip]
13
- node scripts/listen.mjs start [--device D]
14
- node scripts/listen.mjs stop [--clip]
15
- node scripts/listen.mjs toggle [--clip]
16
- node scripts/listen.mjs status
17
- node scripts/listen.mjs file --path clip.wav [--clip]
18
- node scripts/listen.mjs latest
10
+ node .rulesync/scripts/listen.mjs whoami
11
+ node .rulesync/scripts/listen.mjs devices
12
+ node .rulesync/scripts/listen.mjs rec [--seconds 8] [--device D] [--clip]
13
+ node .rulesync/scripts/listen.mjs start [--device D]
14
+ node .rulesync/scripts/listen.mjs stop [--clip]
15
+ node .rulesync/scripts/listen.mjs toggle [--clip]
16
+ node .rulesync/scripts/listen.mjs status
17
+ node .rulesync/scripts/listen.mjs file --path clip.wav [--clip]
18
+ node .rulesync/scripts/listen.mjs latest
19
19
  ```
20
20
 
21
21
  `rec` records then transcribes (default 8s, cap 120s). `toggle` is the hotkey verb: first run starts, second run stops and prints the transcript. Audio and `latest.txt` live under `.tmp/grunt/listen/`. `--cwd /path/to/repo` when the hotkey does not already run in the repo.
22
22
 
23
23
  ## Auth and capture
24
24
 
25
- Handheld (any OS): `node scripts/setup.mjs listen` or `npm exec grunt setup` → listen. Prints OS install commands for ffmpeg / whisper-cli (does not run them), optional ggml download into `~/.grunt/whisper/`, OpenAI fallback key if local STT is missing.
25
+ Handheld (any OS): `node .rulesync/scripts/setup.mjs listen` or `npm exec grunt setup` → listen. Prints OS install commands for ffmpeg / whisper-cli (does not run them), optional ggml download into `~/.grunt/whisper/`, OpenAI fallback key if local STT is missing.
26
26
 
27
- If ffmpeg, whisper-cli, a ggml model, or `OPENAI_API_KEY` is missing, the CLI prints `setup: node scripts/setup.mjs listen` and exits 1. Agents should show that line, not a stack or JSON. Do not invent a key.
27
+ If ffmpeg, whisper-cli, a ggml model, or `OPENAI_API_KEY` is missing, the CLI prints `setup: node .rulesync/scripts/setup.mjs listen` and exits 1. Agents should show that line, not a stack or JSON. Do not invent a key.
28
28
 
29
29
  STT prefers **local whisper.cpp**. Install the binary; the first `listen` downloads `ggml-base.en.bin` (~142MB) into `~/.grunt/whisper/`. No API cost after that. If the binary or download is missing, it falls back to OpenAI `whisper-1` (`OPENAI_API_KEY` or `~/.grunt/speak.json`). Force with `LISTEN_STT=local` or `LISTEN_STT=openai`. Never commit keys.
30
30
 
@@ -45,7 +45,7 @@ One install:
45
45
  - linux: build https://github.com/ggml-org/whisper.cpp (`whisper-cli` on PATH)
46
46
  - win: whisper.cpp release `whisper-cli.exe` on PATH
47
47
 
48
- Then `node scripts/listen.mjs whoami` or `rec`. The first run fetches `ggml-base.en.bin` to `~/.grunt/whisper/`. Do not pip-install OpenAI Whisper. Do not curl the model yourself unless the auto-download fails.
48
+ Then `node .rulesync/scripts/listen.mjs whoami` or `rec`. The first run fetches `ggml-base.en.bin` to `~/.grunt/whisper/`. Do not pip-install OpenAI Whisper. Do not curl the model yourself unless the auto-download fails.
49
49
 
50
50
  Larger models: put another `ggml-*.bin` in that folder or set `WHISPER_MODEL`. Doctor reports `whisper-cli` as optional. `whoami` prints `stt=local` or `stt=openai`.
51
51
 
@@ -13,7 +13,7 @@ Cheap outline. Not a file dump.
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
+ - `.rulesync/reference/scope.md` — size gate; plan by default: research → `/write-plan` → approval → `/implement-plan`
17
17
  - `.rulesync/reference/law.md` — domain law (stub; protocol stays cascade/overview)
18
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
19
19
 
@@ -29,35 +29,35 @@ Cheap outline. Not a file dump.
29
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
30
30
  - `.grok/hooks/rtk.json` — RTK
31
31
  - `.grok/skills/` — generated from `.rulesync/skills/`; do not hand-edit
32
- - `.grok/global-settings.toml` — merged into `~/.grok/config.toml` by `scripts/sync-global-settings.mjs` (not auto-loaded; project config cannot set `[features]`)
32
+ - `.grok/global-settings.toml` — merged into `~/.grok/config.toml` by `.rulesync/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
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
- - `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
- - `scripts/guarded-md.mjs` — sentinel merge for `AGENTS.md` `CLAUDE.md` `GEMINI.md`; copied into consumers
40
- - `scripts/guarded-roots.mjs` — snapshot/remerge `AGENTS.md` `CLAUDE.md` `GEMINI.md` around pipeline; check interiors wrapper
41
- - `scripts/check-globals.mjs` — `$HOME/.grok/config.toml` `[agent].name==orchestrator` + `[features].two_pass_compaction==true`
42
- - `scripts/gate-fat-tools.mjs`
43
- - `scripts/scrub-spawn-prompt.mjs`
44
- - `scripts/grunt-job.mjs` — flags `--job` `--query` `--path` `--glob` (repeatable) `--cwd`; regex in `--query` OK; never `cd &&`; unknown flags / exec shell-meta → FALLBACK
45
- - `scripts/parse-need.mjs`
46
- - `scripts/persist-handoff.mjs` — `.tmp/grunt/handoffs/{serial}-{slug}-{stamp}.md`
47
- - `scripts/persist-tmp.mjs` — `.tmp/grunt/{serial}-{slug}-{stamp}.{ext}` root files
48
- - `scripts/persist-plan.mjs`
49
- - `scripts/persist-implementation.mjs` — `.tmp/grunt/implementations/{serial}-{slug}-{stamp}.md`
50
- - `scripts/sync-global-settings.mjs`
51
- - `scripts/purge-global-mcps.mjs`
52
- - `scripts/emit-mcp-policy.mjs`
53
- - `scripts/emit-gemini.mjs`
54
- - `scripts/emit-agent-shell-tools.mjs`
55
- - `scripts/browser.mjs` — session browser rail
56
- - `scripts/google-workspace.mjs` — Sheets Docs Slides Calendar Gmail Drive
57
- - `scripts/speak.mjs` — TTS
58
- - `scripts/listen.mjs` — STT
59
- - `scripts/setup.mjs` — handheld speak / listen / google-workspace / browser (`~/.grunt/`)
60
- - `scripts/doctor.mjs` — unified prereqs; optional google-workspace (`oauth` `tokens` `adc` `clasprc`), speak, clasp, ffmpeg, whisper-cli
38
+ - `.rulesync/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
+ - `.rulesync/scripts/guarded-md.mjs` — sentinel merge for `AGENTS.md` `CLAUDE.md` `GEMINI.md`; copied into consumers
40
+ - `.rulesync/scripts/guarded-roots.mjs` — snapshot/remerge `AGENTS.md` `CLAUDE.md` `GEMINI.md` around pipeline; check interiors wrapper
41
+ - `.rulesync/scripts/check-globals.mjs` — `$HOME/.grok/config.toml` `[agent].name==orchestrator` + `[features].two_pass_compaction==true`
42
+ - `.rulesync/scripts/gate-fat-tools.mjs`
43
+ - `.rulesync/scripts/scrub-spawn-prompt.mjs`
44
+ - `.rulesync/scripts/grunt-job.mjs` — flags `--job` `--query` `--path` `--glob` (repeatable) `--cwd`; regex in `--query` OK; never `cd &&`; unknown flags / exec shell-meta → FALLBACK
45
+ - `.rulesync/scripts/parse-need.mjs`
46
+ - `.rulesync/scripts/persist-handoff.mjs` — `.tmp/grunt/handoffs/{serial}-{slug}-{stamp}.md`
47
+ - `.rulesync/scripts/persist-tmp.mjs` — `.tmp/grunt/{serial}-{slug}-{stamp}.{ext}` root files
48
+ - `.rulesync/scripts/persist-plan.mjs`
49
+ - `.rulesync/scripts/persist-implementation.mjs` — `.tmp/grunt/implementations/{serial}-{slug}-{stamp}.md`
50
+ - `.rulesync/scripts/sync-global-settings.mjs`
51
+ - `.rulesync/scripts/purge-global-mcps.mjs`
52
+ - `.rulesync/scripts/emit-mcp-policy.mjs`
53
+ - `.rulesync/scripts/emit-gemini.mjs`
54
+ - `.rulesync/scripts/emit-agent-shell-tools.mjs`
55
+ - `.rulesync/scripts/browser.mjs` — session browser rail
56
+ - `.rulesync/scripts/google-workspace.mjs` — Sheets Docs Slides Calendar Gmail Drive
57
+ - `.rulesync/scripts/speak.mjs` — TTS
58
+ - `.rulesync/scripts/listen.mjs` — STT
59
+ - `.rulesync/scripts/setup.mjs` — handheld speak / listen / google-workspace / browser (`~/.grunt/`)
60
+ - `.rulesync/scripts/doctor.mjs` — unified prereqs; optional google-workspace (`oauth` `tokens` `adc` `clasprc`), speak, clasp, ffmpeg, whisper-cli
61
61
 
62
62
  ## Tmp
63
63
  - `.tmp/grunt/plans/` — persist-plan; format SSOT = `.rulesync/reference/plan-format.md`
@@ -4,7 +4,15 @@ tags: [output]
4
4
 
5
5
  # Output
6
6
 
7
- en-US unless asked. Concise complete sentences with natural grammar. Skip filler and fluff.
7
+ en-US unless asked. Concise complete sentences with natural grammar. Skip filler and fluff. Examples are a class.
8
+
9
+ An example, an open list, or a negative example is a class, not the whole set and not a script. `...`, `…`, `etc`, `etc.`, etcetera, and a `;` between specimens are that same class. Infer the class and do what reasonably fits this case, including what they did not name. Cue names are examples too: example, e.g., for instance, such as, and so on, a sketched sentence, one labeled case. A `;` in code or an ordinary clause join is not a cue. A negative example is a class to avoid. Do not copy its words, stop at the named items, reuse one reply for every turn, or add work outside the class. Pick the count and the form for this case.
10
+
11
+ A closed instruction stays literal. Cues of that kind include only, exactly, just these, verbatim, no others, a schema, an identifier, a command, or quoted text. When an open cue and a closed cue both apply, the closed cue wins.
12
+
13
+ A question or a work result opens with the least demanding lines: the verdict, the counts, or the outcome, failures and gaps included. The middle is the short explanation, tied to the constraint they named. The last line lands those same facts as the decision or the one real next step. Do not invent a question, soften a mixed result, or let the close introduce new numbers. One sentence is enough when that is the whole answer.
14
+
15
+ Skip that shape when they asked for a raw artifact to copy, or a format already defines the reply. `/su`, plan files, commit subjects, and grunt-job stdout keep their own shape. `/explain` keeps this shape and may lengthen the middle. Grunt children do not talk to the user. In a plan or a spawn prompt, write the class, not only the named items.
8
16
 
9
17
  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
18