@lovrozagar/grunt 0.5.2 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/agents/grunt.md +2 -24
- package/.agents/agents/orchestrator.md +5 -50
- package/.agents/skills/ask/SKILL.md +5 -12
- package/.agents/skills/auto/SKILL.md +7 -12
- package/.agents/skills/browser/SKILL.md +4 -8
- package/.agents/skills/clasp/SKILL.md +11 -0
- package/.agents/skills/commit/SKILL.md +3 -1
- package/.agents/skills/commit-push/SKILL.md +2 -0
- package/.agents/skills/commit-push-deploy/SKILL.md +2 -0
- package/.agents/skills/commit-push-release/SKILL.md +2 -0
- package/.agents/skills/explain/SKILL.md +7 -13
- package/.agents/skills/google-workspace/SKILL.md +13 -0
- package/.agents/skills/handoff/SKILL.md +7 -11
- package/.agents/skills/implement-plan/SKILL.md +5 -109
- package/.agents/skills/listen/SKILL.md +15 -0
- package/.agents/skills/pickup/SKILL.md +6 -12
- package/.agents/skills/speak/SKILL.md +13 -0
- package/.agents/skills/tmp/SKILL.md +6 -10
- package/.agents/skills/write-plan/SKILL.md +5 -77
- package/.claude/agents/grunt.md +2 -26
- package/.claude/agents/orchestrator.md +12 -50
- package/.claude/skills/ask/SKILL.md +5 -12
- package/.claude/skills/auto/SKILL.md +7 -12
- package/.claude/skills/browser/SKILL.md +4 -8
- package/.claude/skills/clasp/SKILL.md +11 -0
- package/.claude/skills/commit/SKILL.md +3 -1
- package/.claude/skills/commit-push/SKILL.md +2 -0
- package/.claude/skills/commit-push-deploy/SKILL.md +2 -0
- package/.claude/skills/commit-push-release/SKILL.md +2 -0
- package/.claude/skills/explain/SKILL.md +7 -13
- package/.claude/skills/google-workspace/SKILL.md +13 -0
- package/.claude/skills/handoff/SKILL.md +7 -11
- package/.claude/skills/implement-plan/SKILL.md +5 -109
- package/.claude/skills/listen/SKILL.md +15 -0
- package/.claude/skills/pickup/SKILL.md +6 -12
- package/.claude/skills/speak/SKILL.md +13 -0
- package/.claude/skills/tmp/SKILL.md +6 -10
- package/.claude/skills/write-plan/SKILL.md +5 -77
- package/.codex/agents/grunt.toml +2 -26
- package/.codex/agents/orchestrator.toml +4 -50
- package/.grok/agents/grunt.md +2 -24
- package/.grok/agents/orchestrator.md +4 -48
- package/.grok/global-settings.toml +1 -3
- package/.grok/hooks/orchestrate-parent.js +190 -358
- package/.grok/skills/ask/SKILL.md +5 -12
- package/.grok/skills/auto/SKILL.md +7 -12
- package/.grok/skills/browser/SKILL.md +4 -8
- package/.grok/skills/clasp/SKILL.md +11 -0
- package/.grok/skills/commit/SKILL.md +3 -1
- package/.grok/skills/commit-push/SKILL.md +2 -0
- package/.grok/skills/commit-push-deploy/SKILL.md +2 -0
- package/.grok/skills/commit-push-release/SKILL.md +2 -0
- package/.grok/skills/explain/SKILL.md +7 -13
- package/.grok/skills/google-workspace/SKILL.md +13 -0
- package/.grok/skills/handoff/SKILL.md +7 -11
- package/.grok/skills/implement-plan/SKILL.md +5 -109
- package/.grok/skills/listen/SKILL.md +15 -0
- package/.grok/skills/pickup/SKILL.md +6 -12
- package/.grok/skills/speak/SKILL.md +13 -0
- package/.grok/skills/tmp/SKILL.md +6 -10
- package/.grok/skills/write-plan/SKILL.md +5 -77
- package/.rulesync/hooks.jsonc +1 -1
- package/.rulesync/mcp-policy.jsonc +0 -2
- package/.rulesync/reference/INDEX.md +30 -20
- package/.rulesync/reference/browser.md +13 -6
- package/.rulesync/reference/cascade.md +6 -86
- package/.rulesync/reference/clasp.md +21 -0
- package/.rulesync/reference/google-workspace.md +79 -0
- package/.rulesync/reference/hooks.md +7 -11
- package/.rulesync/reference/implementation-format.md +113 -0
- package/.rulesync/reference/law.md +5 -3
- package/.rulesync/reference/listen.md +80 -0
- package/.rulesync/reference/map.md +40 -36
- package/.rulesync/reference/output.md +3 -51
- package/.rulesync/reference/plan-format.md +4 -2
- package/.rulesync/reference/refs-map.md +12 -5
- package/.rulesync/reference/rtk.md +3 -2
- package/.rulesync/reference/scope.md +37 -0
- package/.rulesync/reference/setup.md +27 -0
- package/.rulesync/reference/skills-map.md +13 -12
- package/.rulesync/reference/speak.md +59 -0
- package/.rulesync/rules/CLAUDE.md +3 -49
- package/.rulesync/rules/overview.md +9 -47
- package/.rulesync/skills/ask/SKILL.md +5 -12
- package/.rulesync/skills/auto/SKILL.md +5 -12
- package/.rulesync/skills/browser/SKILL.md +4 -8
- package/.rulesync/skills/clasp/SKILL.md +9 -0
- package/.rulesync/skills/commit/SKILL.md +3 -1
- package/.rulesync/skills/commit-push/SKILL.md +2 -0
- package/.rulesync/skills/commit-push-deploy/SKILL.md +2 -0
- package/.rulesync/skills/commit-push-release/SKILL.md +2 -0
- package/.rulesync/skills/explain/SKILL.md +7 -14
- package/.rulesync/skills/google-workspace/SKILL.md +11 -0
- package/.rulesync/skills/handoff/SKILL.md +7 -11
- package/.rulesync/skills/implement-plan/SKILL.md +5 -119
- package/.rulesync/skills/listen/SKILL.md +13 -0
- package/.rulesync/skills/pickup/SKILL.md +6 -12
- package/.rulesync/skills/speak/SKILL.md +13 -0
- package/.rulesync/skills/tmp/SKILL.md +6 -10
- package/.rulesync/skills/write-plan/SKILL.md +5 -84
- package/.rulesync/subagents/grunt.md +2 -24
- package/.rulesync/subagents/orchestrator.md +14 -59
- package/AGENTS.md +9 -47
- package/CHANGELOG.md +67 -0
- package/CLAUDE.md +1 -49
- package/README.md +89 -80
- package/cli/grunt.mjs +21 -3
- package/cli/grunt.test.ts +47 -3
- package/cli/init.mjs +134 -234
- package/cli/init.test.ts +241 -58
- package/cli/prompt.mjs +9 -36
- package/cli/prompt.test.ts +14 -0
- package/package.json +10 -2
- package/scripts/browser.mjs +128 -7
- package/scripts/doctor.mjs +104 -10
- package/scripts/emit-gemini.mjs +2 -2
- package/scripts/emit-mcp-policy.mjs +1 -1
- package/scripts/gate-fat-tools.mjs +223 -173
- package/scripts/google-workspace.mjs +713 -0
- package/scripts/grunt-job.mjs +453 -69
- package/scripts/guarded-md.mjs +230 -0
- package/scripts/guarded-roots.mjs +1 -1
- package/scripts/interactive.mjs +15 -0
- package/scripts/listen.mjs +829 -0
- package/scripts/parse-need.mjs +21 -2
- package/scripts/persist-implementation.mjs +278 -0
- package/scripts/prompt.mjs +32 -0
- package/scripts/scrub-spawn-prompt.mjs +3 -50
- package/scripts/setup.mjs +746 -0
- package/scripts/speak.mjs +291 -0
- package/.agents/agents/implementer.md +0 -32
- package/.agents/agents/thinker.md +0 -29
- package/.agents/skills/cascade/SKILL.md +0 -28
- package/.agents/skills/parent/SKILL.md +0 -6
- package/.agents/skills/solo/SKILL.md +0 -25
- package/.claude/agents/implementer.md +0 -37
- package/.claude/agents/thinker.md +0 -36
- package/.claude/skills/cascade/SKILL.md +0 -28
- package/.claude/skills/parent/SKILL.md +0 -6
- package/.claude/skills/solo/SKILL.md +0 -25
- package/.codex/agents/implementer.toml +0 -26
- package/.codex/agents/thinker.toml +0 -26
- package/.grok/agents/implementer.md +0 -27
- package/.grok/agents/thinker.md +0 -27
- package/.grok/parent.md +0 -1
- package/.grok/roles/implementer.toml +0 -5
- package/.grok/roles/thinker.toml +0 -5
- package/.grok/skills/cascade/SKILL.md +0 -28
- package/.grok/skills/parent/SKILL.md +0 -6
- package/.grok/skills/solo/SKILL.md +0 -25
- package/.rulesync/grunt.config.jsonc +0 -7
- package/.rulesync/skills/cascade/SKILL.md +0 -28
- package/.rulesync/skills/parent/SKILL.md +0 -6
- package/.rulesync/skills/solo/SKILL.md +0 -25
- package/.rulesync/subagents/implementer.md +0 -49
- package/.rulesync/subagents/thinker.md +0 -49
- package/scripts/grunt-config.mjs +0 -50
|
@@ -1,85 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: write-plan
|
|
3
|
-
description:
|
|
4
|
-
Thinker drafts a local implementer-ready checklist plan; parent Write persists
|
|
5
|
-
.tmp/grunt/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md. Use for a numbered
|
|
6
|
-
local plan, checklist for implementer, "write a plan", or /write-plan. Not a
|
|
7
|
-
design doc or PR stack.
|
|
3
|
+
description: 'Write a local checklist under .tmp/grunt/plans/. Then /implement-plan {n}.'
|
|
8
4
|
---
|
|
9
5
|
# write-plan
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
You author the plan. Persist under `.tmp/grunt/plans/` via Write (hook runs `scripts/persist-plan.mjs`). Format: `.rulesync/reference/plan-format.md`.
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
Empty task → ask for a task and stop.
|
|
14
10
|
|
|
15
|
-
|
|
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.
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Cheap-in-parent (no spawn)
|
|
20
|
-
|
|
21
|
-
Empty `$ARGUMENTS` **and** no task in conversation → `need task` and stop. Do not list the repo.
|
|
22
|
-
|
|
23
|
-
## Step 1 — thinker
|
|
24
|
-
|
|
25
|
-
Spawn `subagent_type: thinker`, `background: true`, omit `model`, `description: "write plan"`.
|
|
26
|
-
|
|
27
|
-
Pass `{abs}/.rulesync/reference/plan-format.md` in the thinker prompt. If prefetch needed: spawn grunt `job:search|exec` not parent Bash.
|
|
28
|
-
|
|
29
|
-
Prompt:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
You are thinker subagent. Read-only. Do not write files. Do not spawn.
|
|
33
|
-
|
|
34
|
-
Named-file Read of listed abs paths only; investigate/search/trees → `need:` (parent spawns grunt prefetch).
|
|
35
|
-
|
|
36
|
-
Read {abs}/.rulesync/reference/plan-format.md. Produce a plan that matches it.
|
|
37
|
-
|
|
38
|
-
Task:
|
|
39
|
-
{full $ARGUMENTS + relevant conversation context}
|
|
40
|
-
|
|
41
|
-
Cite absolute paths. Use only listed abs paths plus prefetch `verdict:` blobs. Do not explore the repo. Narrowest change that solves the task.
|
|
42
|
-
|
|
43
|
-
Output rules:
|
|
44
|
-
- Line 1: PLAN_NAME: <3-6 word name>
|
|
45
|
-
- Then the plan body only: # heading, Goal, Context, Constraints, Watch-outs, Steps, Verify
|
|
46
|
-
- All boxes [ ]
|
|
47
|
-
- No preamble, no summary, no extra sections
|
|
48
|
-
- Final message IS the plan (parent persists it verbatim)
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Wait. Fail → `[thinker]: failed: {err}` stop.
|
|
52
|
-
|
|
53
|
-
**Truncation:** if output lacks `PLAN_NAME:` or has no `N.M [ ]` leaf, resume once (`resume_from`). Resume prompt = `You are thinker subagent.` plus the new instruction only (do not re-send the original task). Still bad → stop, no write. Max 3 `resume_from` per child id.
|
|
54
|
-
|
|
55
|
-
## Step 2 — persist (parent Write)
|
|
56
|
-
|
|
57
|
-
No grunt spawn. Parent `write`s the thinker final message under `{repo}/.tmp/grunt/plans/` (any filename in that dir). Grok `orchestrate-parent.js` runs `scripts/persist-plan.mjs`: serial/slug from `PLAN_NAME:` / heading, inject YAML, rewrite path+content. Deny invalid plans and any write outside `.tmp/grunt/plans/`.
|
|
58
|
-
|
|
59
|
-
Host without that hook: name the file per `.rulesync/reference/plan-format.md` Path, or pipe the body to `node scripts/persist-plan.mjs --workspace {repo}` and use its `path`.
|
|
60
|
-
|
|
61
|
-
Report serial/path from the tool result (`updatedInput.file_path`). Fail/deny → `[write-plan]: failed: {err}` stop.
|
|
62
|
-
|
|
63
|
-
## Report
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
[thinker]: {one-line goal}; {N} leaves
|
|
67
|
-
[write-plan]: serial={int} path=.tmp/grunt/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md
|
|
68
|
-
next: /implement-plan {int}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Do not dump the plan.
|
|
72
|
-
|
|
73
|
-
## Rules
|
|
74
|
-
|
|
75
|
-
- Omit `model`. `subagent_type` ∈ {grunt, implementer, thinker} only (thinker for draft).
|
|
76
|
-
- First prompt sentence: `You are {agent} subagent.`
|
|
77
|
-
- Child prompt = task + abs paths + verdicts only (no pasted transcripts).
|
|
78
|
-
- Parent coordinates; parent Write under `.tmp/grunt/plans/` only; thinker never writes.
|
|
79
|
-
- Not `/design`, not `/execute-plan`, not a design doc.
|
|
80
|
-
- Tool-call first: emit `spawn_subagent` in the same turn as any spawn claim. Past tense after the tool result.
|
|
81
|
-
- Slash `/write-plan` = persist-only inspect-pause; remainder ask `/implement-plan {n}`. Not leftover pick 2.
|
|
82
|
-
- Implement leftover pick 2 (`Implement with file plan`) = this persist then implement-plan one-shot; skip inspect pause; no user slash.
|
|
83
|
-
- Write leftover pick 2 (`Write with file plan`) = this persist inspect-pause; remainder `/implement-plan {n}`; no implementer this turn.
|
|
84
|
-
- effective=auto + Implement-typed: this persist then implement-plan `{n}` (same chain as Implement leftover pick 2); skip leftover wait. Write-typed under auto still this persist inspect-pause leftover wait; never spawn implementer.
|
|
85
|
-
- Always-do leftover match; leftover `2` ≠ Skill-name invoke of this skill. Parent still no Write — this skill sequencing.
|
|
13
|
+
Report: wrote serial N at `.tmp/grunt/plans/{file}`. Next `/implement-plan {n}`. Do not dump the plan.
|
package/.claude/agents/grunt.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: grunt
|
|
3
|
-
description:
|
|
4
|
-
Tools. Facts/search/exec/git/web/test/low-reason mechanical write. Never
|
|
5
|
-
feature solution. Never plan/advise. Never spawn.
|
|
3
|
+
description: Isolation worker. Facts only.
|
|
6
4
|
model: haiku
|
|
7
5
|
tools:
|
|
8
6
|
- Read
|
|
@@ -18,26 +16,4 @@ disallowedTools:
|
|
|
18
16
|
permissionMode: bypassPermissions
|
|
19
17
|
effort: low
|
|
20
18
|
---
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Tools (shell/host; and more): Read, Grep, Glob, Bash, Write, Edit, Web. Git. Test runners (vitest, playwright, and similar). Other system tools. Commands of project dependencies. Installing and managing dependencies. Running dev, build, preview, deploys and similar.
|
|
24
|
-
You CAN run npm/git/bash via `Bash`. Do NOT wait on MCP. Do NOT request MCP for shell. `mcpInheritance: none` means no MCP — use shell/files instead.
|
|
25
|
-
|
|
26
|
-
Run tools. Return output. Never spawn. Never implement complex/feature solutions (implementer agent). Never plan/advise (thinker agent).
|
|
27
|
-
May write simple structural folders/files (scaffold/mkdir/touch/boilerplate only). Not feature solutions.
|
|
28
|
-
Low-reason write: mechanical/repetitive/obvious; volume OK.
|
|
29
|
-
Scratch/tmp → `{workspaceRoot}/.tmp/grunt/` root files only (mkdir as needed). Never `.tmp/` root. Never persist-owned reserved dirs `plans|handoffs|browser|orchestrator-logs` except owning scripts. No nested `.tmp/grunt/tmp/`. Repo scaffold/mkdir/touch/boilerplate stays in the real tree.
|
|
30
|
-
|
|
31
|
-
`job: search|exec` → first action `node scripts/grunt-job.mjs --job search|exec --query …`; whole reply = stdout.
|
|
32
|
-
`job: test` → grunt-job; `FALLBACK` (exit 2) → LLM tools.
|
|
33
|
-
`job: web` and messy test → LLM grunt (WebSearch/WebFetch).
|
|
34
|
-
Live page ≠ `job:web`. Read pasted `.rulesync/skills/browser/SKILL.md`. `.rulesync/reference/browser.md` only if engine/doctor. No `job:browse`.
|
|
35
|
-
Browser → `node scripts/browser.mjs <verb>` (`nav|snap|click|fill|shot|pdf|stop`). Lightpanda default. Never MCP. Never raw Playwright. Never env knobs.
|
|
36
|
-
Isolation/write reply ≤8 lines. Verdict grammar only — no dumps/recap/HTML/JSON/full logs:
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
verdict: ok|fail|empty
|
|
40
|
-
n: <count>
|
|
41
|
-
- path:line — fact
|
|
42
|
-
Fail: first 3 error lines.
|
|
43
|
-
```
|
|
19
|
+
Return isolation facts (≤8 lines, stash receipt when needed). A browse snap is the payload.
|
|
@@ -1,58 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orchestrator
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
model: haiku
|
|
4
|
+
Session agent. Do the work. Spawn grunt only under the hood when isolation is
|
|
5
|
+
cheaper.
|
|
6
|
+
model: sonnet
|
|
8
7
|
tools:
|
|
8
|
+
- Read
|
|
9
|
+
- Grep
|
|
10
|
+
- Glob
|
|
11
|
+
- Bash
|
|
9
12
|
- Write
|
|
13
|
+
- Edit
|
|
14
|
+
- WebSearch
|
|
15
|
+
- WebFetch
|
|
10
16
|
- Agent
|
|
11
17
|
permissionMode: bypassPermissions
|
|
12
|
-
effort:
|
|
18
|
+
effort: medium
|
|
13
19
|
---
|
|
14
|
-
|
|
15
|
-
en-US unless asked. every output maximal superterse. Fragments OK. Sacrifice grammar; keep meaning. Parent and child. Every turn, not final-only. no mid-turn chat; no narration while Agent runs; user-visible = legal `[role]:` + **one-line** recap. Advise leftover: one empty blank line after recap/body then numbered pick each on own line. Zero user-visible tokens before spawn/peek. In-flight host Stop → only `[orchestrator]: wait grunt`.
|
|
16
|
-
Protocol: `.rulesync/reference/cascade.md` (peek/kill table need:/resume). Do not paste.
|
|
17
|
-
Always-do:
|
|
18
|
-
|
|
19
|
-
| signal | next |
|
|
20
|
-
|---|---|
|
|
21
|
-
| create/change product files | grunt facts → thinker plan/recap-stop before writes; default thinker unless prompt-is-spec or small/simple → implementer. Thinker recap ≠ spec-ready; advise-stop until pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1 iff Implement-typed). Never parent Write/Bash/Skill |
|
|
22
|
-
| plan/spec ready + file writes remain | leftover pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1 iff Implement-typed) only. Implement pick1 = spawn implementer + last [thinker] recap as spec; no `.tmp/grunt/plans`; no write-plan; no implement-plan. Implement pick2 = persist `.tmp/grunt/plans/{n}` then implementer `plan=/abs/...` one-shot skip pause. Write pick1 = `/tmp` persist recap; no implementer. Write pick2 = write-plan persist inspect-pause; remainder `/implement-plan {n}`; no implementer. slash `/write-plan` ≠ leftover 2. `ok`/`yes`/`y`/`continue` ≠ either. Thinker recap alone = recap-stop |
|
|
23
|
-
| tools/facts/git/test/mechanical write | spawn grunt |
|
|
24
|
-
| snippet / cite / "what is X" | spawn grunt `job:web`. URL-in-a-cite ≠ browse |
|
|
25
|
-
| URL / browse / click / fill / snap / live DOM | spawn grunt; child prompt must include abs `.rulesync/skills/browser/SKILL.md` and `.rulesync/reference/browser.md`; Read then `node scripts/browser.mjs`; Lightpanda default; never websearch that page |
|
|
26
|
-
| world fact | spawn grunt `job:web` |
|
|
27
|
-
| write defined solution | spawn implementer; **blocked if advise-class stems present** unless prompt-is-spec / obvious comment-spec false+ |
|
|
28
|
-
| think / plan / advise / recommend / how / why / explain (ask us; not slash `/explain` not one-cmd/last-log/source-token) | spawn thinker; facts=grunt/`need:`; **no implementer this turn**. Repeat how/why/… + last [thinker] still visible + no new input/tools since → no spawn; echo last or /explain. Unsure → thinker |
|
|
29
|
-
| child returned | recap per output.md (echo=report not command). e.g. `[orchestrator]: wrote /abs/a` |
|
|
30
|
-
| child `need:` | parse-need + parallel grunt; `resume_from` + new verdicts; max 3 |
|
|
31
|
-
| ⚠ / validate / sim | spawn implementer with findings; do not recap; spawn; no parent-edit |
|
|
32
|
-
| work remains | spawn; do not stop. Advise recap ≠ leftover writes |
|
|
33
|
-
| children done + no findings | recap; advise-first stop wins. Else stop only if no writes remain and spawn count > 0 when the user asked for a file change |
|
|
34
|
-
| `/parent` | spawn-first; hook last-ditch `parent-escape`; never Read/Bash |
|
|
35
|
-
| `/handoff` | one-turn write `.tmp/grunt/handoffs/`; recap `[handoff]:` |
|
|
36
|
-
| `/tmp` | one-turn write `.tmp/grunt/`; recap `[tmp]:` |
|
|
37
|
-
| `/pickup` | spawn-first; grunt resolve if needed; never parent Read; not a mode |
|
|
38
|
-
| `/write-plan` plan-only | recap; remainder `/implement-plan` (ask) |
|
|
39
|
-
| `/explain` | spawn if facts/work; then human recap of child output; screenshot/visible=context no Read |
|
|
40
|
-
| `/solo` | session escape; stamp spawn-mode-{sid} iff slash≠config; always unlink grunt-off; else spawn-first |
|
|
41
|
-
| `/cascade` | restore cascade; stamp spawn-mode-{sid} iff slash≠config; always unlink grunt-off; spawn-first |
|
|
42
|
-
| `/auto` | session leftover-gate auto; stamp auto-ask-{sid} iff slash≠config; not spawn-escape; not autofix |
|
|
43
|
-
| `/ask` | session leftover-gate ask; stamp auto-ask-{sid} iff slash≠config; not leftover y/n; not pick 3 |
|
|
44
|
-
|
|
45
|
-
Precedence: slash → obvious fact/false+/reuse → advise-class row → prompt-is-spec → write. Advise-class + write-class → thinker first; implementer only after spec / pick1 / pick2 / `/implement-plan {n}`.
|
|
46
|
-
False+: I think terraform plan /implement-plan /solo source tokens one-cmd how- last-log why.
|
|
47
|
-
Advise leftover: numbered pick each on own line after tagged recap; one empty blank line immediately before leftover 1. (leftover last; not adjacent to recap/body). Always-print typed leftover triple (advise-class final recap only). One verb per recap; never jammed Implement/write. No leftover on `need:` JSON wait-grunt grunt/implementer recaps slash-only turns.
|
|
48
|
-
1. {Implement|Write} with verbal plan
|
|
49
|
-
2. {same verb} with file plan
|
|
50
|
-
3. Tweak
|
|
51
|
-
Type Implement = in-repo product writes. Type Write = persist-only/implementer-nonsense (SCA/advise-only/`/tmp`/inspect-pause). Recap remainder still names the human gate; leftover is not `4. Contact bank`. `/handoff` stays slash not Write pick1. No omit 1/2. No frozen 4. Do not relabel 3. Parent echoes printed leftover. Match number or full leftover label (or unique tail `verbal plan` / `file plan`). Always-do leftover match printed lines; not Skill-name (`2` ≠ write-plan). Implement pick1 = spawn implementer; last [thinker] recap as spec; no `.tmp/grunt/plans`; no write-plan; no implement-plan. Implement pick2 = persist `.tmp/grunt/plans/{n}` then spawn implementer `plan=/abs/...` one-shot skip pause. Write pick1 = `/tmp` persist recap/body under `.tmp/grunt/`; no implementer. Write pick2 = write-plan persist inspect-pause; remainder `/implement-plan {n}`; no implementer this turn. 3 / Tweak → stay advise; extra text = revision notes → thinker; bare 3/Tweak = stop wait notes. Bare `implement`/`implementer` → pick1 iff Implement-typed; else recap “no implementer this remainder”; no spawn. Bare `write` → pick1 iff Write-typed; else not a match. Type-mismatch → that recap no spawn. Alias `Implementer with …` → pick1/pick2 iff Implement-typed. `/write-plan` persist-only inspect-pause; remainder `/implement-plan {n}` (ask); ≠ leftover pick 2. `/implement-plan {n}` disk/file ≠ verbal. `ok`/`yes`/`y`/`continue` ≠ either pick.
|
|
52
|
-
You do not talk. First token = spawn. Illegal tools (never consider never call): Read read_file Grep grep Glob list_dir Bash run_terminal_command view_file grep_search run_command. Not in toolkit. Hook deny = backstop not UX. Next=spawn not retry. Only /solo (stamp spawn-mode-{sid} iff slash≠config; unlink grunt-off) escapes spawn workflow. /explain=voice+post-child recap never parent Read. No try-then-spawn. No parent probe. No skip-spawn. No trivia/cheap. User-visible = legal tag + **one-line** recap; advise leftover numbered pick on following lines after one empty blank line not crammed (echo printed leftover; always-print typed triple). Table = routing; echo = report not command. Siblings still run: `[grunt]:` echo. Facts/search/trees → grunt, never thinker.
|
|
53
|
-
Spawn only `grunt` | `implementer` | `thinker`. Omit `model`. Isolation `none` unless asked. Never spawn `orchestrator`. Children never spawn.
|
|
54
|
-
grunt ← tools. Snippet/cite/"what is X" → grunt `job: web`. URL/browse/click/fill/snap/live DOM → grunt; paste skill+browser.md abs paths; never websearch that page. Never memory. implementer ← specified solution or prompt-is-spec or small/simple; blocked if advise-class. thinker ← think/plan/advise/recommend/how/why/explain (default product change; no implementer this turn).
|
|
55
|
-
Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only. Browse tags match → prompt must include abs `.rulesync/skills/browser/SKILL.md` and `.rulesync/reference/browser.md`.
|
|
56
|
-
Peek every 60s/child; quote real host fields; `done|alive|stuck`; no invent; no auto-kill. Grok: `get_command_or_subagent_output` `timeout_ms=60000` every peek. Else GAP: block on spawn return = `done`. Stuck/blocked: quote host fields only.
|
|
57
|
-
Child `need:` JSON → parse-need + parallel grunt; one `resume_from` + **new** verdicts only; max 3; no re-send task; no fresh-spawn.
|
|
58
|
-
`/parent` hook last-ditch only. Skills spawn-first. Only `/solo` escapes spawn workflow. `/pickup` spawn-first; grunt resolve if needed; never parent Read; not a mode.
|
|
20
|
+
Follow AGENTS.md. Do the work. Concise complete sentences with natural grammar. Scratch in `.tmp/grunt/`. Browse with `node scripts/browser.mjs`; the rail swaps to Chromium when Lightpanda is blocked. App e2e uses Playwright.
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ask
|
|
3
|
-
description:
|
|
4
|
-
Session leftover-gate. /ask sets leftover-gate ask for this session — leftover
|
|
5
|
-
triple wait on advise-class recaps. Not leftover y/n. Not pick 3 Tweak. Not
|
|
6
|
-
spawn-escape. /auto sets auto.
|
|
3
|
+
description: 'Session flag. Finish one step, recap, then ask before the next.'
|
|
7
4
|
---
|
|
8
|
-
|
|
5
|
+
# ask
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
Session flag. Slash `/ask` stamps this session.
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
Finish one coherent step. Recap what landed. Ask whether to continue. Wait. Do not start the next step in this turn.
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Ask: always-print typed leftover triple on advise-class final recap. Write-typed leftover never spawns implementer. Not leftover pick 3.
|
|
17
|
-
|
|
18
|
-
Not `/solo`. Spawn-first still. Recap tags still.
|
|
11
|
+
`/auto` is the default: keep going; ask only on blockers. Slash `/auto` unlinks the stamp and returns this session to auto.
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: auto
|
|
3
|
-
description:
|
|
4
|
-
Session
|
|
5
|
-
|
|
6
|
-
skips leftover wait. Not autofix. Not spawn-escape. /ask restores ask.
|
|
3
|
+
description: >-
|
|
4
|
+
Session flag. Default. Work the task through. Ask on blockers instead of
|
|
5
|
+
monkey-patching.
|
|
7
6
|
---
|
|
8
|
-
|
|
7
|
+
# auto
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Session flag. Default. Slash `/auto` unlinks any `/ask` stamp on this session.
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
Work the task through. Do not stop after each step. When a blocker, missing fact, or real choice appears, stop and ask. Do not monkey-patch around a failure.
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
effective=auto + Implement-typed: write-plan persist then implement-plan `{n}`; skip leftover triple wait. Write-typed under auto still leftover wait; never spawn implementer.
|
|
17
|
-
|
|
18
|
-
Not `/solo`. Spawn-first still. Recap tags still.
|
|
13
|
+
`/ask` is the other flag: one step, then ask.
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: browser
|
|
3
|
-
description:
|
|
4
|
-
Live URL/interact → this; not websearch. /browser or browse a URL. Call node
|
|
5
|
-
scripts/browser.mjs nav|snap|click|fill|shot|pdf|stop. Lightpanda default;
|
|
6
|
-
snap is the default read. Windows → Chromium. Never MCP. Never env knobs.
|
|
7
|
-
Never raw Playwright.
|
|
3
|
+
description: Browse via node scripts/browser.mjs (Lightpanda). App e2e uses Playwright.
|
|
8
4
|
---
|
|
9
5
|
Zero-config. `node scripts/browser.mjs <verb>`.
|
|
10
6
|
|
|
11
|
-
Verbs: `nav <url>` · `snap` · `click <ref>` · `fill <ref> <text>` · `shot` · `pdf` · `stop` · `doctor` · `ensure`.
|
|
7
|
+
Verbs: `nav <url>` · `snap` · `click <ref>` · `fill <ref> <text>` · `scroll [ref|down|up|N]` · `wait [ms]` · `hover <ref>` · `select <ref> <value>` · `shot` · `pdf` · `stop` · `doctor` · `ensure`.
|
|
12
8
|
|
|
13
9
|
- **snap** = default read (markdown + numbered refs). `click`/`fill` need a prior snap.
|
|
14
|
-
- Lightpanda default. Chromium when `shot`/`pdf`/`trace`, win32, missing Lightpanda, probe-fail once,
|
|
10
|
+
- Lightpanda default. The rail swaps to Chromium when `shot`/`pdf`/`trace`, win32, missing Lightpanda, probe-fail once, Chromium-first hosts (figma docs/sheets/slides mail.google earth amazon), or a blocked/empty/client-rendered snap. One swap. Do not stop and say you cannot.
|
|
15
11
|
- Session/profile: `.tmp/grunt/browser/`. `stop` reaps; second `stop` ok.
|
|
16
12
|
- Windows: Chromium even if Lightpanda exists.
|
|
17
|
-
- `doctor`/`ensure` → `node scripts/doctor.mjs` or `grunt doctor`.
|
|
13
|
+
- `doctor`/`ensure` → `node scripts/doctor.mjs` or `grunt doctor`. Engine hints: `node scripts/setup.mjs browser`. Do not read a README unless doctor/setup is missing; then https://github.com/lovrozagar/grunt#prerequisites (not the consumer README).
|
|
18
14
|
- No env. No MCP. No raw Playwright. Spec: `.rulesync/reference/browser.md`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clasp
|
|
3
|
+
description: >-
|
|
4
|
+
Low-level Apps Script CLI. Prefer /google-workspace for sheet, doc, meeting,
|
|
5
|
+
mail.
|
|
6
|
+
---
|
|
7
|
+
# clasp
|
|
8
|
+
|
|
9
|
+
Custom Apps Script in-repo only. Spec: `.rulesync/reference/clasp.md`.
|
|
10
|
+
|
|
11
|
+
Sheets, Docs, Slides, Calendar, Gmail: `node scripts/google-workspace.mjs` and `.rulesync/reference/google-workspace.md`.
|
|
@@ -8,6 +8,8 @@ Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
|
8
8
|
|
|
9
9
|
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
10
10
|
|
|
11
|
+
If a unique in-progress file exists under `.tmp/grunt/implementations/`, its `## Files` is the default stage set. Still inspect `git status`.
|
|
12
|
+
|
|
11
13
|
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
12
14
|
|
|
13
15
|
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
@@ -18,4 +20,4 @@ NO body. NO footer. NO `Co-Authored-By`. NO `Generated with`. NO 🤖. NO traile
|
|
|
18
20
|
|
|
19
21
|
Never git push. Never `git push`. This skill never pushes.
|
|
20
22
|
|
|
21
|
-
Protocol: `.rulesync/reference/cascade.md`. Do not paste
|
|
23
|
+
Protocol: `.rulesync/reference/cascade.md`. Do not paste.
|
|
@@ -8,6 +8,8 @@ Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
|
8
8
|
|
|
9
9
|
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
10
10
|
|
|
11
|
+
If a unique in-progress file exists under `.tmp/grunt/implementations/`, its `## Files` is the default stage set. Still inspect `git status`.
|
|
12
|
+
|
|
11
13
|
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
12
14
|
|
|
13
15
|
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
@@ -9,6 +9,8 @@ Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
|
9
9
|
|
|
10
10
|
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
11
11
|
|
|
12
|
+
If a unique in-progress file exists under `.tmp/grunt/implementations/`, its `## Files` is the default stage set. Still inspect `git status`.
|
|
13
|
+
|
|
12
14
|
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
13
15
|
|
|
14
16
|
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
@@ -9,6 +9,8 @@ Inspect `git status` + `git diff` (staged and unstaged) before the message.
|
|
|
9
9
|
|
|
10
10
|
Stage only user intent. Never blind `git add -A` / `git add .`. Split unrelated concerns into multiple commits.
|
|
11
11
|
|
|
12
|
+
If a unique in-progress file exists under `.tmp/grunt/implementations/`, its `## Files` is the default stage set. Still inspect `git status`.
|
|
13
|
+
|
|
12
14
|
Message = Conventional Commits **subject only**: `type(scope): subject` (scope optional).
|
|
13
15
|
|
|
14
16
|
Types: feat fix docs style refactor perf test build ci chore revert.
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: explain
|
|
3
|
-
description:
|
|
4
|
-
One-off human recap. /explain. First action = spawn grunt|implementer|thinker
|
|
5
|
-
if facts/work; else recap already-visible text/screenshot only. Never
|
|
6
|
-
Read/read_file/Grep/Glob/Bash. Not a spawn-escape. Not a mode. Voice escape
|
|
7
|
-
this reply only then revert.
|
|
3
|
+
description: Longer human recap this reply only.
|
|
8
4
|
---
|
|
9
|
-
This reply only: explain for a human. Not a mode switch or session flag. After this reply, revert to
|
|
5
|
+
This reply only: explain for a human. Not a mode switch or session flag. After this reply, revert to output.md.
|
|
10
6
|
|
|
11
|
-
Still concise. Complete sentences
|
|
12
|
-
Four buckets (completed / in-flight / remainder / blocker). Completed work = past tense.
|
|
7
|
+
Still concise. Complete sentences. Prioritize clarity over token compression. Do not dump, sprawl, or narrate process.
|
|
8
|
+
Four buckets (completed / in-flight / remainder / blocker). Completed work = past tense. Omit empty. Natural language; no key tokens. Longer expansion this reply only — not the only grammar for complete sentences.
|
|
13
9
|
|
|
14
|
-
en-US unless asked. Keep need
|
|
10
|
+
en-US unless asked. Keep need: JSON and plan grammar when those apply.
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Freeform how/why/explain is not this skill (thinker unless cheap false+). Slash `/explain` only.
|
|
19
|
-
Not a spawn-workflow escape. Only `/solo` is. Legal tools this skill: spawn only then text. Illegal (never consider): Read read_file Grep Glob Bash list_dir. Screenshot/image is already in the prompt — do not Read a path. Recap AFTER children or from visible context. No children + no work → text only still no Read.
|
|
12
|
+
Always-why advise recap ≠ `/explain`. `/explain` = longer expansion not the why path.
|
|
13
|
+
Freeform how/why/explain is not this skill. Slash `/explain` only.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: google-workspace
|
|
3
|
+
description: >-
|
|
4
|
+
Google Sheets, Docs, Slides, Calendar, Gmail via node
|
|
5
|
+
scripts/google-workspace.mjs.
|
|
6
|
+
---
|
|
7
|
+
# google-workspace
|
|
8
|
+
|
|
9
|
+
When the user wants a Google sheet, doc, slide, meeting, or mail, run `node scripts/google-workspace.mjs`. Spec: `.rulesync/reference/google-workspace.md`. If Calendar/Gmail/sheet set fail or login is missing, tell them to run `node scripts/setup.mjs google-workspace` (TTY) for the handheld walk. Do not share creds. Do not invent OAuth JSON. Do not ask them to write Apps Script.
|
|
10
|
+
|
|
11
|
+
`whoami` · `scopes` · `accounts` · `login` · `sheet create|set|get|append|clear` · `doc create|append` · `drive list` · `slide create` · `meeting create [--attendees a@b,c@d]` · `mail send|list`. `--account NAME` for a second Google user on this machine.
|
|
12
|
+
|
|
13
|
+
Auth: `node scripts/setup.mjs google-workspace` then `login` as needed. Two Google users on one machine: `--account NAME`. Creds stay in `~/.grunt/` (or `~/.grunt/workspace/NAME/`). Do not share OAuth JSON or tokens. Doctor: `node scripts/doctor.mjs` reports google-workspace as optional (`oauth` `tokens` `adc` `clasprc`; no secrets). `clasprc` is Drive-only. Spec: `.rulesync/reference/google-workspace.md` `.rulesync/reference/setup.md`.
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: handoff
|
|
3
|
-
description:
|
|
4
|
-
Parent writes a session handoff under .tmp/grunt/handoffs/ and tells the user
|
|
5
|
-
to continue in a fresh session. Use for /handoff, "context is getting long",
|
|
6
|
-
"hand this off", "start a new session". Not a plan, not a design doc.
|
|
3
|
+
description: Write a session handoff under .tmp/grunt/handoffs/. Continue with /pickup.
|
|
7
4
|
---
|
|
8
5
|
# handoff
|
|
9
6
|
|
|
10
|
-
One turn
|
|
7
|
+
One turn. Author from this session. Write once, report path, stop.
|
|
11
8
|
|
|
12
9
|
## Invocation
|
|
13
10
|
|
|
@@ -59,7 +56,7 @@ Facts only. Absolute paths. No transcript paste, no dump, no secrets/tokens.
|
|
|
59
56
|
|
|
60
57
|
Line 1 of the body: `HANDOFF_NAME: <3-6 word name>`, then the body only.
|
|
61
58
|
|
|
62
|
-
|
|
59
|
+
Write under `.tmp/grunt/handoffs/` (any filename in that dir). Grok `orchestrate-parent.js` runs `scripts/persist-handoff.mjs`: serial/slug from `HANDOFF_NAME:` / heading, injects frontmatter, rewrites path + content. Invalid handoff or a write outside that dir is denied — fix the body, do not retry elsewhere.
|
|
63
60
|
|
|
64
61
|
Host without that hook: name the file per **Path** yourself, or pipe the body to `node scripts/persist-handoff.mjs --workspace {repo}` and use its `path`.
|
|
65
62
|
|
|
@@ -67,19 +64,18 @@ Host without that hook: name the file per **Path** yourself, or pipe the body to
|
|
|
67
64
|
|
|
68
65
|
```
|
|
69
66
|
[handoff]: serial={int} path=.tmp/grunt/handoffs/{serial}-{slug}-{stamp}.md
|
|
70
|
-
next: start a new session; `/pickup {serial}`
|
|
67
|
+
next: start a new session; `/pickup {serial}`
|
|
71
68
|
```
|
|
72
69
|
|
|
73
70
|
Do not dump the handoff body.
|
|
74
71
|
|
|
75
72
|
## Picking one up
|
|
76
73
|
|
|
77
|
-
`/pickup {serial}` owns pickup
|
|
74
|
+
`/pickup {serial}` owns pickup. Load the file, set `status: resumed`, work `Next` leaves in order, flip only the box. All `[x]` → `status: done`. Do not re-plan; a stale leaf → `/write-plan` a follow-up.
|
|
78
75
|
|
|
79
76
|
## Rules
|
|
80
77
|
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
- Handoff ≠ plan: no Steps/Verify phases, no `.tmp/grunt/plans/` write.
|
|
78
|
+
- One write. `/handoff` is not a mode.
|
|
79
|
+
- Handoff ≠ plan: no Steps/Verify phases, no `.tmp/grunt/plans/` write. Handoff ≠ implementation journal.
|
|
84
80
|
- Never rewrite or renumber an existing handoff; new session = new serial.
|
|
85
81
|
- Protocol: `.rulesync/reference/cascade.md`. Do not paste it here.
|
|
@@ -1,117 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implement-plan
|
|
3
|
-
description:
|
|
4
|
-
Implementer executes a local .tmp/grunt/plans checklist: continue, resume, or
|
|
5
|
-
pick among plans. Empty /implement-plan resumes a unique in-progress or starts
|
|
6
|
-
a unique ready plan; else lists and needs serial. Marks [x], skips completed
|
|
7
|
-
leaves. Not /implement review-loop, not /execute-plan PR DAG, not /pickup, not
|
|
8
|
-
/run-plan.
|
|
3
|
+
description: 'Execute remaining leaves in a .tmp/grunt/plans checklist. Skip [x].'
|
|
9
4
|
---
|
|
10
5
|
# implement-plan
|
|
11
6
|
|
|
12
|
-
|
|
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`.
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
Arg `{n|path}` picks that file. Empty arg: unique in-progress, else unique ready, else list serials.
|
|
15
10
|
|
|
16
|
-
|
|
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`.
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
`/implement-plan {serial|path}`
|
|
20
|
-
|
|
21
|
-
Todos: `resolve` → `implement` → `verify`. One serial per run. Partial progress is ok; re-run continues. Skip `[x]`. Remaining leaves only.
|
|
22
|
-
|
|
23
|
-
## Resolve
|
|
24
|
-
|
|
25
|
-
Arg = `$ARGUMENTS` stripped. Listing/validate: spawn grunt (`job:search|exec`) on `.tmp/grunt/plans/`. Do not parent Read/Grep/Bash.
|
|
26
|
-
|
|
27
|
-
Eligible auto = valid plan-format checkbox grammar (`N [ ]` / `N.M [ ]`; not `- [ ]`; not `1. [ ]`). Invalid grammar: exclude from auto. Drop `done` (all `[x]` or FM `status: done`) from auto. Never silent latest. Never auto-pick among many.
|
|
28
|
-
|
|
29
|
-
**In-progress:** some `[x]` and remaining `[ ]`, or FM `status: in-progress` with open leaves.
|
|
30
|
-
|
|
31
|
-
**Ready / none started:** FM `ready` or all boxes `[ ]`.
|
|
32
|
-
|
|
33
|
-
**Blocked + open:** list/tag `blocked`; empty-arg never auto-runs. Explicit `{n|path}` still runs (skip `[x]`).
|
|
34
|
-
|
|
35
|
-
### Empty arg (`/implement-plan`)
|
|
36
|
-
|
|
37
|
-
Grunt lists/validates `.tmp/grunt/plans/*.md`. Then:
|
|
38
|
-
|
|
39
|
-
| condition | action |
|
|
40
|
-
|---|---|
|
|
41
|
-
| exactly 1 in-progress | resume it (implementer; skip `[x]`; start first open leaf) |
|
|
42
|
-
| exactly 1 plan total, none started (ready / all open) | start it |
|
|
43
|
-
| 0 plans (dir missing / no files) | blocker; remainder `/write-plan` |
|
|
44
|
-
| N>1 in-progress | list those (`serial name status first-open-leaf`); `need serial`. No silent latest |
|
|
45
|
-
| 0 in-progress, N>1 eligible (ready / blocked-open) | list eligible (`serial name status first-open-leaf`; tag `blocked`); `need serial` |
|
|
46
|
-
| only `done` / only invalid | blocker; remainder `/write-plan` |
|
|
47
|
-
|
|
48
|
-
Unique in-progress wins even if other ready/done files exist. Invalid grammar does not count toward unique-auto and is omitted from auto lists.
|
|
49
|
-
|
|
50
|
-
### Arg `{n|path}`
|
|
51
|
-
|
|
52
|
-
That file only; skip `[x]`; remaining leaves. Write-plan remainder stays `/implement-plan {n}` (that serial). Never auto-pick among many.
|
|
53
|
-
|
|
54
|
-
| input | action |
|
|
55
|
-
|---|---|
|
|
56
|
-
| int (`1`, `0001`) | files whose leading number == that int |
|
|
57
|
-
| `{serial}-slug` or `*.md` or path | that file if under `.tmp/grunt/plans/` |
|
|
58
|
-
| slug only (`add-auth`) | unique match `*-{slug}-*.md` or `*-{slug}.md` |
|
|
59
|
-
| `.tmp/grunt/plans` missing / no files | `no plans. /write-plan first` stop |
|
|
60
|
-
| 0 matches | `no plan serial={n}. have: {list}` stop |
|
|
61
|
-
| >1 matches | `ambiguous: {paths}` stop |
|
|
62
|
-
| all boxes already `[x]` / `status: done` | `[implementer]: already done path=...` **no implementer spawn** |
|
|
63
|
-
|
|
64
|
-
Lookup: integer equality so `1` matches canonical `1-foo-20260826T143000Z.md` and legacy `1-foo.md`. `0001-foo.md` may still resolve if an old padded file exists. Normalize to abs path + int serial.
|
|
65
|
-
|
|
66
|
-
If prefetch needed: spawn grunt `job:search|exec`. Do not `resume_from` for dumps already listed in the plan leaves. Do not add a repo-wide explore. Then spawn implementer.
|
|
67
|
-
|
|
68
|
-
## Spawn implementer
|
|
69
|
-
|
|
70
|
-
`subagent_type: implementer`, `background: true`, omit `model`, `isolation: none`, `description: "implement plan {serial}"`.
|
|
71
|
-
|
|
72
|
-
Prompt:
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
You are implementer subagent. Do not spawn.
|
|
76
|
-
|
|
77
|
-
Read {abs}/.rulesync/reference/plan-format.md and the plan at {abs_plan_path}.
|
|
78
|
-
|
|
79
|
-
Implement remaining `[ ]` leaves in numeric order. Skip `[x]`. Start at the first open leaf.
|
|
80
|
-
Write-allowlist = paths listed in this plan only. Do not add README/docs/examples unless listed in the plan. Missing path → blocker/`need:`; do not invent.
|
|
81
|
-
After each leaf: flip that line to `[x]` in the plan file (only the box).
|
|
82
|
-
When a phase's children are all `[x]`, mark the phase `[x]`.
|
|
83
|
-
Frontmatter status: in-progress at start; done when all boxes `[x]`; blocked if you cannot finish.
|
|
84
|
-
Do not expand scope, add steps, or start a review loop.
|
|
85
|
-
If blocked: leave remaining `[ ]`, status: blocked, report reason + leftover ids.
|
|
86
|
-
Run Verify leaves. Report abs paths you changed.
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Wait. Spawn fail → `[implementer]: failed: {err}` stop.
|
|
90
|
-
|
|
91
|
-
## Recap
|
|
92
|
-
|
|
93
|
-
Recap from implementer output only. No parent Read/Grep/Bash.
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
[implementer]: serial={int} path=.tmp/grunt/plans/{file} status={status} done={x}/{total}
|
|
97
|
-
files: {abs paths}
|
|
98
|
-
{if leftover:}
|
|
99
|
-
leftover:
|
|
100
|
-
{up to 10 open leaf lines}
|
|
101
|
-
{if blocked:} blocked: {reason}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Rules
|
|
105
|
-
|
|
106
|
-
- Skip `[x]`; only flip boxes; no renumber/rewrite leaf text.
|
|
107
|
-
- No review-fix loop. Not bundled `/implement`. Implement leftover pick 1 (`Implement with verbal plan`) ≠ this skill (no `.tmp/grunt/plans`; no write-plan; no implement-plan). Bare `implement`/`implementer` → pick1 iff Implement-typed, not this skill; else recap “no implementer this remainder”.
|
|
108
|
-
- Slash `/implement-plan {n}` = disk/file run. Empty `/implement-plan` = unique-resume / unique-start / else list. Implement leftover pick 2 may invoke this sequencing without user slash (after write-plan persist; `plan=/abs/...` only). Write leftover pick 2 does not spawn implementer this turn. Always-do leftover match; leftover `2` ≠ Skill-name. Verbal leftover ≠ implement-plan.
|
|
109
|
-
- effective=auto + Implement-typed may chain this sequencing without user slash after write-plan persist (`plan=/abs/...`). Write-typed under auto: no implementer this turn; leftover wait.
|
|
110
|
-
- No auto `/write-plan` chain. Escalation → tell user to `/write-plan` a follow-up.
|
|
111
|
-
- Omit `model`. `subagent_type: implementer` only for this skill.
|
|
112
|
-
- First prompt sentence: `You are implementer subagent.`
|
|
113
|
-
- Child prompt = task + abs paths + verdicts only (no pasted transcripts).
|
|
114
|
-
- Resume prompt = `You are implementer subagent.` + new verdicts only. Do not re-send the original task. Max 3 `resume_from` per child id; then report blocked/partial.
|
|
115
|
-
- Tool-call first for spawn claims.
|
|
116
|
-
- Do not re-plan. Partial = skill success (plan file is SoT).
|
|
117
|
-
- `/pickup` stays handoffs only. Do not merge.
|
|
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.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: listen
|
|
3
|
+
description: >-
|
|
4
|
+
Speech-to-text via node scripts/listen.mjs (ffmpeg mic + local whisper.cpp,
|
|
5
|
+
OpenAI fallback). Input only.
|
|
6
|
+
---
|
|
7
|
+
# listen
|
|
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`.
|
|
10
|
+
|
|
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
|
+
|
|
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
|
+
|
|
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`.
|