@lovrozagar/grunt 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/agents/grunt.md +2 -1
- package/.agents/agents/implementer.md +1 -1
- package/.agents/agents/orchestrator.md +17 -12
- package/.agents/agents/thinker.md +6 -5
- package/.agents/skills/ask/SKILL.md +18 -0
- package/.agents/skills/auto/SKILL.md +18 -0
- package/.agents/skills/browser/SKILL.md +4 -3
- package/.agents/skills/cascade/SKILL.md +5 -3
- package/.agents/skills/handoff/SKILL.md +1 -1
- package/.agents/skills/implement-plan/SKILL.md +12 -11
- package/.agents/skills/solo/SKILL.md +5 -3
- package/.agents/skills/tmp/SKILL.md +58 -0
- package/.agents/skills/write-plan/SKILL.md +11 -8
- package/.claude/agents/grunt.md +2 -1
- package/.claude/agents/implementer.md +1 -1
- package/.claude/agents/orchestrator.md +17 -12
- package/.claude/agents/thinker.md +6 -5
- package/.claude/skills/ask/SKILL.md +18 -0
- package/.claude/skills/auto/SKILL.md +18 -0
- package/.claude/skills/browser/SKILL.md +4 -3
- package/.claude/skills/cascade/SKILL.md +5 -3
- package/.claude/skills/handoff/SKILL.md +1 -1
- package/.claude/skills/implement-plan/SKILL.md +12 -11
- package/.claude/skills/solo/SKILL.md +5 -3
- package/.claude/skills/tmp/SKILL.md +58 -0
- package/.claude/skills/write-plan/SKILL.md +11 -8
- package/.codex/agents/grunt.toml +2 -1
- package/.codex/agents/implementer.toml +1 -1
- package/.codex/agents/orchestrator.toml +17 -12
- package/.codex/agents/thinker.toml +6 -5
- package/.grok/agents/grunt.md +2 -1
- package/.grok/agents/implementer.md +1 -1
- package/.grok/agents/orchestrator.md +17 -12
- package/.grok/agents/thinker.md +6 -5
- package/.grok/hooks/orchestrate-parent.js +280 -62
- package/.grok/skills/ask/SKILL.md +18 -0
- package/.grok/skills/auto/SKILL.md +18 -0
- package/.grok/skills/browser/SKILL.md +4 -3
- package/.grok/skills/cascade/SKILL.md +5 -3
- package/.grok/skills/handoff/SKILL.md +1 -1
- package/.grok/skills/implement-plan/SKILL.md +12 -11
- package/.grok/skills/solo/SKILL.md +5 -3
- package/.grok/skills/tmp/SKILL.md +58 -0
- package/.grok/skills/write-plan/SKILL.md +11 -8
- package/.rulesync/grunt.config.jsonc +7 -0
- package/.rulesync/reference/INDEX.md +7 -4
- package/.rulesync/reference/cascade.md +15 -13
- package/.rulesync/reference/hooks.md +6 -4
- package/.rulesync/reference/law.md +1 -1
- package/.rulesync/reference/map.md +14 -9
- package/.rulesync/reference/output.md +18 -8
- package/.rulesync/reference/plan-format.md +10 -10
- package/.rulesync/reference/skills-map.md +6 -3
- package/.rulesync/rules/CLAUDE.md +18 -13
- package/.rulesync/rules/overview.md +18 -13
- package/.rulesync/skills/ask/SKILL.md +18 -0
- package/.rulesync/skills/auto/SKILL.md +18 -0
- package/.rulesync/skills/browser/SKILL.md +2 -2
- package/.rulesync/skills/cascade/SKILL.md +5 -3
- package/.rulesync/skills/handoff/SKILL.md +1 -1
- package/.rulesync/skills/implement-plan/SKILL.md +14 -11
- package/.rulesync/skills/solo/SKILL.md +5 -3
- package/.rulesync/skills/tmp/SKILL.md +58 -0
- package/.rulesync/skills/write-plan/SKILL.md +12 -8
- package/.rulesync/subagents/grunt.md +2 -1
- package/.rulesync/subagents/implementer.md +1 -1
- package/.rulesync/subagents/orchestrator.md +17 -12
- package/.rulesync/subagents/thinker.md +6 -5
- package/AGENTS.md +18 -13
- package/CHANGELOG.md +33 -0
- package/CLAUDE.md +18 -13
- package/README.md +17 -16
- package/cli/grunt.mjs +12 -12
- package/cli/grunt.test.ts +29 -20
- package/cli/init.mjs +116 -22
- package/cli/init.test.ts +545 -34
- package/package.json +8 -1
- package/scripts/gate-fat-tools.mjs +2 -2
- package/scripts/grunt-config.mjs +50 -0
- package/scripts/persist-plan.mjs +17 -2
- package/scripts/persist-tmp.mjs +123 -0
- package/scripts/scrub-spawn-prompt.mjs +1 -1
|
@@ -16,8 +16,10 @@ This session: cascade suspended. You are one normal agent.
|
|
|
16
16
|
|
|
17
17
|
Fat-tool caps stay on — token guards, not cascade.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Effective spawn: stamp body `solo`|`cascade` > one-release `grunt-off-{sid}` presence as solo > `.rulesync/grunt.config.jsonc` `spawnMode` > `cascade`. Fail-closed `cascade`. Unreadable/bad stamp body ignored (dual-read grunt-off else config). Never fail-closed solo.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Claude/Codex/Grok: `/solo` via submit hook. If slash token equals committed config `spawnMode`, unlink `.tmp/grunt/orchestrator-logs/spawn-mode-{sid}`; else write stamp body `solo`. Always unlink `grunt-off-{sid}` (new+legacy). Requires real sid (never `default`). Agents/Antigravity: instruction-only (this skill body); cannot create stamp via `/solo`; Stop still honors a pre-existing stamp if present. Session-scoped, never global.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
This is the only session-wide spawn-workflow escape. /explain /parent /handoff /pickup /write-plan /implement-plan still spawn-first unless this session’s effective spawn is solo.
|
|
24
|
+
|
|
25
|
+
Spawn-escape only. Not advisory/design routing. Leftover-gate `/auto`/`/ask` is not spawn-escape.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tmp
|
|
3
|
+
description: >
|
|
4
|
+
One-off convo artifact dump under .tmp/grunt/. Use for /tmp, dump a draft,
|
|
5
|
+
save a note/email/script from this session. Not a plan, not a handoff, not
|
|
6
|
+
product source.
|
|
7
|
+
---
|
|
8
|
+
# tmp
|
|
9
|
+
|
|
10
|
+
One turn, in-parent. Parent authors from this session (email/script/note). **Do not spawn.** Write once. Recap path. Stop.
|
|
11
|
+
|
|
12
|
+
## Invocation
|
|
13
|
+
|
|
14
|
+
`/tmp [what]`
|
|
15
|
+
|
|
16
|
+
Empty `$ARGUMENTS` + no already-visible dumpable blob → `need task`. Empty + visible blob (code fence / draft) → dump that.
|
|
17
|
+
|
|
18
|
+
## When
|
|
19
|
+
|
|
20
|
+
Dump a one-off convo artifact. Not `/handoff` (no pickup no Goal/State/Next). Not `.tmp/grunt/plans/`. Not product source. Not OS `/tmp`.
|
|
21
|
+
|
|
22
|
+
## Path
|
|
23
|
+
|
|
24
|
+
`.tmp/grunt/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.{ext}`
|
|
25
|
+
|
|
26
|
+
- serial: unpadded int ≥ 1, next after existing tmp dumps (own counter; not plan/handoff serials)
|
|
27
|
+
- slug: lower, non `[a-z0-9]` → `-`, collapse, trim 50
|
|
28
|
+
- stamp: UTC `YYYYMMDDTHHMMSSZ`
|
|
29
|
+
- ext: `TMP_EXT` or explicit `.{ext}` in args; else `md`
|
|
30
|
+
|
|
31
|
+
## Write
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
TMP_NAME: <3-6 word name>
|
|
35
|
+
TMP_EXT: md
|
|
36
|
+
<artifact only>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`TMP_EXT` optional. Parent `write`s any root filename under `.tmp/grunt/` (not `plans|handoffs|browser|orchestrator-logs`). Grok `orchestrate-parent.js` runs `scripts/persist-tmp.mjs`: serial/slug/ext from `TMP_*`, strips those lines, no YAML frontmatter, rewrites path + content. Write outside that root or missing `TMP_NAME:` is denied.
|
|
40
|
+
|
|
41
|
+
Host without that hook: name the file per **Path** yourself, or pipe the body to `node scripts/persist-tmp.mjs --workspace {repo}` and use its `path`.
|
|
42
|
+
|
|
43
|
+
Never rewrite an existing dump; new serial. Artifact file content after hook = artifact only (no TMP_* lines no YAML frontmatter).
|
|
44
|
+
|
|
45
|
+
## Report
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
[tmp]: serial={int} path=.tmp/grunt/{serial}-{slug}-{stamp}.{ext}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Do not dump the body.
|
|
52
|
+
|
|
53
|
+
## Rules
|
|
54
|
+
|
|
55
|
+
- No spawn. One write. `/tmp` is not a mode. Slash `/tmp` = no leftover. Write leftover pick 1 (`Write with verbal plan`) uses this persist sequencing; recap `[tmp]:`; no implementer. No pickup.
|
|
56
|
+
- Never parent Read/Bash. Write `.tmp/grunt/` root files only.
|
|
57
|
+
- Secrets/tokens: refuse dump. Text artifacts only; no binary.
|
|
58
|
+
- Protocol: `.rulesync/reference/cascade.md`. Do not paste it here.
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
name: write-plan
|
|
3
3
|
description: >
|
|
4
4
|
Thinker drafts a local implementer-ready checklist plan; parent Write persists
|
|
5
|
-
.tmp/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md. Use for a numbered
|
|
6
|
-
plan, checklist for implementer, "write a plan", or /write-plan. Not a
|
|
7
|
-
doc or PR stack.
|
|
5
|
+
.tmp/grunt/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md. Use for a numbered
|
|
6
|
+
local plan, checklist for implementer, "write a plan", or /write-plan. Not a
|
|
7
|
+
design doc or PR stack.
|
|
8
8
|
---
|
|
9
9
|
# write-plan
|
|
10
10
|
|
|
11
|
-
Parent orchestrates thinker then persists via Write under `.tmp/plans/`. Parent does not author the plan body.
|
|
11
|
+
Parent orchestrates thinker then persists via Write under `.tmp/grunt/plans/`. Parent does not author the plan body.
|
|
12
12
|
|
|
13
13
|
## Invocation
|
|
14
14
|
|
|
@@ -54,7 +54,7 @@ Wait. Fail → `[thinker]: failed: {err}` stop.
|
|
|
54
54
|
|
|
55
55
|
## Step 2 — persist (parent Write)
|
|
56
56
|
|
|
57
|
-
No grunt spawn. Parent `write`s the thinker final message under `{repo}/.tmp/plans/` (any filename in that dir). Grok `orchestrate-parent.js` runs `scripts/persist-plan.mjs`: serial/slug from `PLAN_NAME:` / heading, inject YAML, rewrite path+content. Deny invalid plans and any write outside `.tmp/plans/`.
|
|
57
|
+
No grunt spawn. Parent `write`s the thinker final message under `{repo}/.tmp/grunt/plans/` (any filename in that dir). Grok `orchestrate-parent.js` runs `scripts/persist-plan.mjs`: serial/slug from `PLAN_NAME:` / heading, inject YAML, rewrite path+content. Deny invalid plans and any write outside `.tmp/grunt/plans/`.
|
|
58
58
|
|
|
59
59
|
Host without that hook: name the file per `.rulesync/reference/plan-format.md` Path, or pipe the body to `node scripts/persist-plan.mjs --workspace {repo}` and use its `path`.
|
|
60
60
|
|
|
@@ -64,7 +64,7 @@ Report serial/path from the tool result (`updatedInput.file_path`). Fail/deny
|
|
|
64
64
|
|
|
65
65
|
```
|
|
66
66
|
[thinker]: {one-line goal}; {N} leaves
|
|
67
|
-
[write-plan]: serial={int} path=.tmp/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md
|
|
67
|
+
[write-plan]: serial={int} path=.tmp/grunt/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md
|
|
68
68
|
next: /implement-plan {int}
|
|
69
69
|
```
|
|
70
70
|
|
|
@@ -75,8 +75,11 @@ Do not dump the plan.
|
|
|
75
75
|
- Omit `model`. `subagent_type` ∈ {grunt, implementer, thinker} only (thinker for draft).
|
|
76
76
|
- First prompt sentence: `You are {agent} subagent.`
|
|
77
77
|
- Child prompt = task + abs paths + verdicts only (no pasted transcripts).
|
|
78
|
-
- Parent coordinates; parent Write under `.tmp/plans/` only; thinker never writes.
|
|
78
|
+
- Parent coordinates; parent Write under `.tmp/grunt/plans/` only; thinker never writes.
|
|
79
79
|
- Not `/design`, not `/execute-plan`, not a design doc.
|
|
80
80
|
- Tool-call first: emit `spawn_subagent` in the same turn as any spawn claim. Past tense after the tool result.
|
|
81
81
|
- Slash `/write-plan` = persist-only inspect-pause; remainder ask `/implement-plan {n}`. Not leftover pick 2.
|
|
82
|
-
-
|
|
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.
|
|
@@ -6,7 +6,7 @@ Protocol stays cascade/overview; domain fills this.
|
|
|
6
6
|
|
|
7
7
|
## Skills naming
|
|
8
8
|
|
|
9
|
-
Reserved (do not reuse in consumer custom skills): `browser` `cascade` `commit` `commit-and-push` `commit-push` `commit-push-deploy` `commit-push-release` `explain` `handoff` `implement-plan` `parent` `pickup` `solo` `write-plan`.
|
|
9
|
+
Reserved (do not reuse in consumer custom skills): `ask` `auto` `browser` `cascade` `commit` `commit-and-push` `commit-push` `commit-push-deploy` `commit-push-release` `explain` `handoff` `implement-plan` `parent` `pickup` `solo` `tmp` `write-plan`.
|
|
10
10
|
|
|
11
11
|
Override: same name → one SSOT path (`.rulesync/skills/<name>/`). Re-init force-refresh overwrites grunt-owned names; consumer extras kept. Maps `origin` badge ≠ content picker.
|
|
12
12
|
|
|
@@ -14,7 +14,9 @@ Override: same name → one SSOT path (`.rulesync/skills/<name>/`). Re-init forc
|
|
|
14
14
|
|
|
15
15
|
| name | origin | description | task | commandPath | refs |
|
|
16
16
|
| --- | --- | --- | --- | --- | --- |
|
|
17
|
-
|
|
|
17
|
+
| ask | local | Session leftover-gate. /ask sets leftover-gate ask for this session — leftover triple wait on advise-class recaps. Not… | | | |
|
|
18
|
+
| auto | local | Session leftover-gate. /auto sets leftover-gate auto for this session — Implement-typed pick2 chains write-plan persist… | | | |
|
|
19
|
+
| browser | local | Live URL/interact → this; not websearch. /browser or browse a URL. Call node scripts/browser.mjs nav\|snap\|click\|fill\|sh… | | | |
|
|
18
20
|
| cascade | local | Session mode. /cascade exits solo and restores the grunt cascade for this session — spawn, orchestrator, recap, need\|ve… | | | |
|
|
19
21
|
| commit | local | Inspect the diff and commit with a Conventional Commits subject line. Use for /commit, "commit this", "commit these cha… | | | |
|
|
20
22
|
| 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.… | | | |
|
|
@@ -23,11 +25,12 @@ Override: same name → one SSOT path (`.rulesync/skills/<name>/`). Re-init forc
|
|
|
23
25
|
| 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… | | | |
|
|
24
26
|
| explain | local | One-off human recap. /explain. First action = spawn grunt\|implementer\|thinker if facts/work; else recap already-visible… | | | |
|
|
25
27
|
| handoff | local | Parent writes a session handoff under .tmp/grunt/handoffs/ and tells the user to continue in a fresh session. Use for /… | | | |
|
|
26
|
-
| implement-plan | local | Implementer executes a local .tmp/plans checklist: continue, resume, or pick among plans. Empty /implement-plan
|
|
28
|
+
| implement-plan | local | Implementer executes a local .tmp/grunt/plans checklist: continue, resume, or pick among plans. Empty /implement-plan r… | | | |
|
|
27
29
|
| parent | local | One-turn parent-orchestrator escape. Use for /parent. Not a session mode. | | | |
|
|
28
30
|
| pickup | local | Pick up/continue a session handoff under .tmp/grunt/handoffs/. Use for /pickup, pick up, continue handoff, serial, drag… | | | |
|
|
29
31
|
| solo | local | Session mode. /solo disables the grunt cascade for this session — one normal agent, no spawn, no orchestrator. /cascade… | | | |
|
|
30
|
-
|
|
|
32
|
+
| tmp | local | One-off convo artifact dump under .tmp/grunt/. Use for /tmp, dump a draft, save a note/email/script from this session.… | | | |
|
|
33
|
+
| write-plan | local | Thinker drafts a local implementer-ready checklist plan; parent Write persists .tmp/grunt/plans/{serial}-{slug}-{YYYYMM… | | | |
|
|
31
34
|
|
|
32
35
|
# Refs
|
|
33
36
|
|
|
@@ -10,23 +10,24 @@ Shipped protocol: **parent-only spawn**. Only the parent **orchestrator** sessio
|
|
|
10
10
|
|
|
11
11
|
Always-do lives in orchestrator/overview (do not open this file first). Peek/kill/`need:` stay here as reference.
|
|
12
12
|
⚠ / validate / sim → spawn implementer; not stop.
|
|
13
|
-
Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
|
|
13
|
+
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`.
|
|
14
14
|
|
|
15
|
-
Always spawn + prompt. First token = spawn. Parent Read/Bash deny expected if forgotten. Only `/solo` (
|
|
16
|
-
Create/change product files → grunt facts first; then thinker advise/plan/stop unless small/simple or prompt-is-spec → implementer. Default without detailed spec = grunt check → thinker advise/plan → stop. Advise-first stop wins until unlock. Unlock implementer only on: numbered/label pick1 or pick2 or `/implement-plan {n}` or explicit implement (=pick1). `ok`/`yes`/`y`/`continue` ≠ either
|
|
17
|
-
Advise leftover: numbered pick each on own line after tagged recap (not same-line):
|
|
18
|
-
1.
|
|
19
|
-
2.
|
|
15
|
+
Always spawn + prompt. First token = spawn. Parent Read/Bash deny expected if forgotten. Only `/solo` (effective spawnMode solo) escapes spawn workflow. `/parent` is last-ditch hook stamp not skill-instructed Read/Bash. No try-then-spawn. No parent probe. No tiny-read/grep/list_dir/bash/grunt-job for the user. No skip-spawn.
|
|
16
|
+
Create/change product files → grunt facts first; then thinker advise/plan/stop unless small/simple or prompt-is-spec → implementer. Default without detailed spec = grunt check → thinker advise/plan → stop. Advise-first stop wins until unlock. Unlock implementer only on: Implement-typed numbered/label pick1 or pick2 or `/implement-plan {n}` or explicit implement (=pick1 iff Implement-typed). Write-typed leftover never spawns implementer. `ok`/`yes`/`y`/`continue` ≠ either pick (`continue` = write-plan file gate only). Thinker recap alone ≠ spec-ready; do not auto-implement. Conversational advise recap = stop.
|
|
17
|
+
Advise leftover: numbered pick each on own line after tagged recap (not same-line); 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) unless effective leftover-gate=auto and Implement-typed (pick2 chains write-plan persist → implement-plan `{n}`; skip leftover wait). Write-typed under auto still leftover wait; never spawn implementer. One verb per recap; never jammed Implement/write. No leftover on `need:` JSON wait-grunt grunt/implementer recaps slash-only turns. Effective leftover-gate: stamp `auto-ask-{sid}` > `.rulesync/grunt.config.jsonc` `leftoverGate` > `ask`. Effective spawn: stamp `spawn-mode-{sid}` body `solo`|`cascade` > one-release `grunt-off` presence as solo > `.rulesync/grunt.config.jsonc` `spawnMode` > `cascade`. Fail-closed cascade. `/auto` `/ask` session leftover-gate, not spawn-escape.
|
|
18
|
+
1. {Implement|Write} with verbal plan
|
|
19
|
+
2. {same verb} with file plan
|
|
20
20
|
3. Tweak
|
|
21
|
-
Match number or full leftover label (or unique tail `verbal plan` / `file plan`). Always-do leftover match; not Skill-name (`2` ≠ write-plan).
|
|
22
|
-
|
|
21
|
+
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; paste last [thinker] recap as spec (how+why; implementer must not paste why into code comments); 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. Parent still no Write — existing write-plan/`/tmp` path/skill sequencing. 3 / Tweak → stay advise; extra text → 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 ask `/implement-plan {n}`. Not leftover pick 2. `/implement-plan {n}` stays disk/file run; ≠ conversational verbal pick. Disk leftover may invoke without user slash; verbal ≠ implement-plan.
|
|
22
|
+
Owned-defect after grunt: check/see-if = grunt first. Verdict names defect in path we control (in-tree or package we publish) → writes remain → spawn thinker; not fact-stop; not implementer yet unless user already said fix / prompt-is-spec / small. Not ours → fact-stop/workaround OK; no Implement pick1. Unsure ownership → thinker. Control ≠ cwd; human-owned package still Fix {path} from consumer session; can't write → remainder `fix in {checkout path}` + ask switch. Recap `{decided}=Fix {path+bug}`; leftover always-print typed triple (Implement when in-repo writes; 3=tweak); do not relabel 3. Workaround = why rejected-alt never remainder. Grunt no leftover.
|
|
23
|
+
Never parent Write/Edit/Bash/Skill-that-writes. Child returned is not terminal if writes remain after that gate or spawn count is 0 on a pick1/pick2/`/implement-plan {n}`/spec/small file-change turn. plan/spec ready + writes remain → spawn implementer only on Implement-typed pick1/pick2 or `/implement-plan {n}`/spec/small; else recap-stop. plan-only `/write-plan` → recap + remainder `/implement-plan` (ask).
|
|
23
24
|
|
|
24
25
|
Precedence: slash → obvious fact/false+/reuse → advise-class row → prompt-is-spec → write.
|
|
25
26
|
1. Tools (facts / search / exec / git / web / test / low-reason mechanical write) → grunt. Facts/search → grunt, never thinker.
|
|
26
27
|
2. Write defined solution (prompt-is-spec or small/simple) → implementer. **Blocked if advise-class stems present** unless prompt-is-spec / obvious comment-spec false+. Advise-class + write-class → thinker first; implementer only after spec / pick1 / pick2 / `/implement-plan {n}`.
|
|
27
28
|
3. Think / plan / advise / recommend / how / why / explain (ask-us; not slash `/explain`; not one-cmd/last-log/source-token) → thinker. Facts=grunt/`need:`. **No implementer this turn**. Unsure → thinker. Cheap false+: I think / terraform plan / `/implement-plan` / `/solo` / source tokens / one-cmd / how- last-log / why. Why = judgment not patch not dump; parent cannot invent why; **parent cannot drop why**. Thinker recap without why = incomplete (leftover 3 / re-spawn; not silent; not invent). One re-spawn max then recap-as-is + flag.
|
|
28
|
-
Reuse iff ALL: (1) same parent transcript already has finished `[thinker]:` (or the fact recap they’re poking); (2) user turn is advise-class again with no new path/error/snippet/name/“what about/also/now/but/instead”; (3) no implementer or grunt after that answer; no unresolved `need:`; (4) not “more/deeper/details/walk through/wrong”. Any tick fail / new session / `/pickup` / `/handoff` / compaction ate the body → spawn. Echo last `[thinker]:` recap one-line (don’t paraphrase; no-strip why; no compress-to-verdict).
|
|
29
|
-
4.
|
|
29
|
+
Reuse iff ALL: (1) same parent transcript already has finished `[thinker]:` (or the fact recap they’re poking); (2) user turn is advise-class again with no new path/error/snippet/name/“what about/also/now/but/instead”; (3) no implementer or grunt after that answer; no unresolved `need:`; (4) not “more/deeper/details/walk through/wrong”. Any tick fail / new session / `/pickup` / `/handoff` / compaction ate the body → spawn. Echo last `[thinker]:` recap one-line (don’t paraphrase; no-strip why; no compress-to-verdict). Reuse echo: reprint last thinker’s leftover triple. Type-mismatch / bare implement on Write-typed → recap “no implementer this remainder”; ≠ spawn. Prose → `/explain` on visible child. Always-why recap ≠ `/explain`. Not grunt for parrot. Tag `[orchestrator]:` on no-spawn — don’t fake `[thinker]:`. Pitfalls: deeper→thinker; code moved invalidates; `need:` open; compaction.
|
|
30
|
+
4. Snippet / cite / "what is X" / world fact → grunt `job: web`. URL-in-a-cite ≠ browse. URL / browse / click / fill / snap / live DOM → 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. Never answer from memory. No `job:browse`.
|
|
30
31
|
|
|
31
32
|
Spawn only `grunt` | `implementer` | `thinker`. Omit `model`. Isolation `none` unless asked.
|
|
32
33
|
|
|
@@ -43,10 +44,11 @@ Classify `done` | `alive` | `stuck` vs prior peek: **done** (completed/failed),
|
|
|
43
44
|
Loop until done. No auto-kill. Kill only if the user asks and the host has a kill tool.
|
|
44
45
|
Final recap uses [output.md](output.md) natural buckets (completed / in-flight / remainder / blocker; omit empty). Do not redo the child's work. Exceptions: in-flight wait = `[orchestrator]: wait grunt` only; `need:` stop = JSON only; max 3 `resume_from` → blocker recap + gathered verdicts (ask).
|
|
45
46
|
|
|
46
|
-
Parent Stop (`MAX_STOP=3`): do not waive fenced/impl finals for `tools-used` stamp. Parent `end_turn` is tagged recap (advise leftover numbered pick on own lines after) or `[orchestrator]: wait grunt`. First non-empty line must match legal `[orchestrator|grunt|implementer|thinker|handoff]:`. Advise leftover numbered pick may follow the tagged recap (format only; hook does not map
|
|
47
|
+
Parent Stop (`MAX_STOP=3`): do not waive fenced/impl finals for `tools-used` stamp. Parent `end_turn` is tagged recap (advise leftover numbered pick on own lines after one empty blank line) or `[orchestrator]: wait grunt`. First non-empty line must match legal `[orchestrator|grunt|implementer|thinker|handoff|tmp]:`. Advise leftover numbered pick may follow the tagged recap after one empty blank line (echo printed leftover; format only; hook does not map leftover numbers → skills; no leftover-label parser). Siblings still run → role tag + one-line echo. In-flight wait recap is `[orchestrator]: wait grunt` only. Mid-turn stays exactly `[orchestrator]: wait grunt`. Or consume `parent-escape-{sid}` once. Else block. No `isCheap` / trivia / long definitions.
|
|
47
48
|
`/handoff` is the other in-parent turn: context large + work unfinished → parent writes one `.tmp/grunt/handoffs/` file from its own transcript (no child sees the session), recaps `[handoff]: serial=… path=…`, tells the user to continue in a new session. No spawn, one write, not a mode.
|
|
49
|
+
`/tmp` is in-parent dump: parent writes one `.tmp/grunt/` root artifact from this session, recaps `[tmp]: serial=… path=…`. No spawn, one write, not a handoff, not a plan, no pickup.
|
|
48
50
|
`/pickup` is spawn-first pickup, not in-parent write; parent never Read. Inverse of `/handoff`.
|
|
49
|
-
`/solo`
|
|
51
|
+
`/solo` `/cascade` are session mode (not one-turn): `beforeSubmitPrompt` write-or-unlink `.tmp/grunt/orchestrator-logs/spawn-mode-{sid}` vs config (`solo`|`cascade`); slash==config unlinks; slash≠config writes body token; **always** unlink `grunt-off` (new+legacy). Effective stamp>one-release `grunt-off`>config>`cascade`. Fail-closed cascade. Unreadable/bad stamp body ignored. Every gate short-circuits while effective solo. Antigravity: skill-only, no stamp create (see hooks.md). `/auto` `/ask` session leftover-gate (not spawn-escape): stamp `.tmp/grunt/orchestrator-logs/auto-ask-{sid}` body `auto`|`ask` when slash ≠ config; slash==config unlinks. Effective stamp>config>ask. auto+Implement-typed pick2 chain skip leftover wait; Write-typed leftover wait. `/parent` is last-ditch hook stamp (not a mode, not skill-instructed Read/Bash): UserPromptSubmit writes `.tmp/grunt/orchestrator-logs/parent-escape-{sid}`; Stop consumes+unlinks once. Next Stop resumes spawn/recap rules. `/explain` is human recap after children; never parent Read; not a mode; not spawn-escape. Skills point here; do not paste this file. Never parent-Read protocol files.
|
|
50
52
|
|
|
51
53
|
Host mapping (in-tree only; do not invent peek/kill APIs). GAP rows: no fake peeks, no auto-kill.
|
|
52
54
|
|
|
@@ -88,6 +90,6 @@ Fail: first 3 error lines. ≤8 lines. No dumps, recap, HTML, JSON, full logs.
|
|
|
88
90
|
|
|
89
91
|
Implementer/thinker: fat dumps via `need:` JSON. Implementer shell via rtk; cat/rg/curl/tests without rtk → fat `need:`.
|
|
90
92
|
|
|
91
|
-
Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
|
|
93
|
+
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`.
|
|
92
94
|
|
|
93
95
|
Grok PostToolUse is observe-only. SessionStart stays empty (token baseline). See [hooks](hooks.md).
|
|
@@ -10,15 +10,17 @@ Grok PostToolUse / UserPromptSubmit / SessionStart are observe-only — do not a
|
|
|
10
10
|
|
|
11
11
|
Claude / Codex / Antigravity PreToolUse still run `../../scripts/scrub-spawn-prompt.mjs` and `../../scripts/gate-fat-tools.mjs`. Grok does not — spawn/fat rewrite is `../../.grok/hooks/orchestrate-parent.js` only. RTK stays `../../.grok/hooks/rtk.json`.
|
|
12
12
|
|
|
13
|
-
Parent Read|Write|Edit|Bash|Skill deny unless `/solo` (session) or `/parent` last-ditch stamp. Grok PreToolUse has no matcher (Read included). Skills spawn-first; do not instruct parent Read/Bash. `.tmp/plans
|
|
13
|
+
Parent Read|Write|Edit|Bash|Skill deny unless `/solo` (session) or `/parent` last-ditch stamp. Grok PreToolUse has no matcher (Read included). Skills spawn-first; do not instruct parent Read/Bash. `.tmp/grunt/plans/`, `.tmp/grunt/handoffs/`, and `.tmp/grunt/` root-file Write still persist. Parent Bash still allowed for workspace `../../scripts/grunt-job.mjs` `--job search|exec`. Children with a type skip parent-deny (fat-only). Skill allowlist without escape: `parent|explain|solo|cascade|auto|ask|handoff|tmp|pickup|write-plan|implement-plan`. Deny reason: `First action=spawn implementer|grunt|thinker. Deny expected. Only /solo this session escapes.`. Parent `end_turn` is tagged recap (advise leftover numbered pick on own lines after) or `[orchestrator]: wait grunt`. Mid-turn stays exactly `[orchestrator]: wait grunt`. Leftover-required under ask waived iff effective leftover-gate=auto.
|
|
14
14
|
|
|
15
15
|
Parent `run_terminal_command` is deny-by-default except `node` (optional leading `rtk`) invoking `{workspace}/scripts/grunt-job.mjs` with `--job search|exec` and `--query`. Optional `--path` `--glob` (repeatable) `--cwd`. Not `web|test`, not other scripts. META strips `--query` value first so `|` inside query is allowed; pipes/`&&` outside query still deny. Never `cd &&`. Exec shell-meta in query is grunt-job FALLBACK (exit 2), not a parent-bash allow. Unknown flags → FALLBACK.
|
|
16
16
|
|
|
17
|
-
SubagentStop (and child Stop with `subagentType`) intercepts a parseable `need:` whose jobs are all `search|exec` (cap 4): runs grunt-job in-hook and continues the child with concatenated `verdict:` blobs. Mixed/web/test, parse fail, FALLBACK, `stopHookActive`, or more than 3 intercepts per child session → empty stdout (allow stop; parent LLM path). Parent `write` is deny-by-default except `.tmp/plans/` (`../../scripts/persist-plan.mjs`)
|
|
17
|
+
SubagentStop (and child Stop with `subagentType`) intercepts a parseable `need:` whose jobs are all `search|exec` (cap 4): runs grunt-job in-hook and continues the child with concatenated `verdict:` blobs. Mixed/web/test, parse fail, FALLBACK, `stopHookActive`, or more than 3 intercepts per child session → empty stdout (allow stop; parent LLM path). Parent `write` is deny-by-default except `.tmp/grunt/plans/` (`../../scripts/persist-plan.mjs`), `.tmp/grunt/handoffs/` (`../../scripts/persist-handoff.mjs`), and `.tmp/grunt/` root files (`../../scripts/persist-tmp.mjs`); all validate + rewrite path/content, invalid body denies. Parent Stop (`MAX_STOP=3`): do not waive impl finals for `tools-used`. Parent `end_turn` is tagged recap (advise leftover numbered pick on own lines after) or `[orchestrator]: wait grunt`. Mid-turn stays exactly `[orchestrator]: wait grunt`. First non-empty line must match legal `[orchestrator|grunt|implementer|thinker|handoff|tmp]:`. Ask leftover-required: `[orchestrator]:` needs leftover triple (not exact wait-grunt); `[thinker]:` with >1 nonempty line needs it; `[grunt]|[implementer]|[handoff]|[tmp]:` do not. Missing triple → existing `STOP_REASONS` block. Waived iff effective leftover-gate=auto. Claude Agent launch ≠ done; in-flight host Stop → wait recap `[orchestrator]: wait grunt` only; no SendMessage. Or consume `parent-escape-{sid}` once (`/parent` last-ditch, not “use parent tools”). No `isCheap` / trivia. Stamps: `tools-used` / `stop-block` / `need-intercept` / `parent-escape` / `auto-ask` / `spawn-mode`. Skills point to cascade; do not paste protocol here.
|
|
18
18
|
|
|
19
|
-
`/solo`
|
|
19
|
+
`/solo` `/cascade` write-or-unlink `spawn-mode-{sid}` vs config (`beforeSubmitPrompt`, exact-match only). Slash==config unlinks; slash≠config writes body `solo`|`cascade`. **Always** unlink `grunt-off` (new+legacy). Sid-less: no stamp. Effective: valid stamp body `solo`|`cascade` > one-release `grunt-off` presence as solo > config `spawnMode` > `cascade`. Fail-closed cascade. Unreadable/bad stamp body ignored (dual-read `grunt-off` else config). While effective solo: PreToolUse allows parent tools (fat gate still runs) and skips the `defaultGrunt` spawn rewrite; Stop returns 0 **before** the `parent-escape` consume, so solo never burns the one-turn stamp. Session-scoped. Antigravity: skill-only, no stamp create.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
`/auto` `/ask` write `auto-ask-{sid}` body `auto`|`ask` when slash ≠ config leftoverGate; slash==config unlinks (`beforeSubmitPrompt`, exact-match only). Sid-less: no stamp. Effective: stamp > config > ask. Leftover-required waived iff effective=auto. Not spawn-escape. Antigravity: skill-only, no stamp create (same solo degrade).
|
|
22
|
+
|
|
23
|
+
rulesync canonical event is `beforeSubmitPrompt` (→ Claude/Codex `UserPromptSubmit`), not `userPromptSubmit` — an unknown key makes Zod reject the whole `.rulesync/hooks.jsonc`, emitting nothing while `--check` still reports up to date. Antigravity supports neither `beforeSubmitPrompt` nor `subagentStop`; `/solo` `/auto` `/ask` degrade there to the skill body alone.
|
|
22
24
|
|
|
23
25
|
Stop and SubagentStop timeout is 30s (grunt-job cap is 20s). PreToolUse / PostToolUse / UserPromptSubmit stay at 5s. If the intercept times out, the hook fail-opens and the child stops without verdicts.
|
|
24
26
|
|
|
@@ -4,6 +4,6 @@ Protocol stays cascade/overview; domain fills this.
|
|
|
4
4
|
|
|
5
5
|
## Skills naming
|
|
6
6
|
|
|
7
|
-
Reserved (do not reuse in consumer custom skills): `browser` `cascade` `commit` `commit-and-push` `commit-push` `commit-push-deploy` `commit-push-release` `explain` `handoff` `implement-plan` `parent` `pickup` `solo` `write-plan`.
|
|
7
|
+
Reserved (do not reuse in consumer custom skills): `ask` `auto` `browser` `cascade` `commit` `commit-and-push` `commit-push` `commit-push-deploy` `commit-push-release` `explain` `handoff` `implement-plan` `parent` `pickup` `solo` `tmp` `write-plan`.
|
|
8
8
|
|
|
9
9
|
Override: same name → one SSOT path (`.rulesync/skills/<name>/`). Re-init force-refresh overwrites grunt-owned names; consumer extras kept. Maps `origin` badge ≠ content picker.
|
|
@@ -26,13 +26,14 @@ Cheap outline. Not a file dump.
|
|
|
26
26
|
## Grok hand files
|
|
27
27
|
- `.grok/hooks/orchestrate-parent.js` + `.grok/hooks/orchestrate-parent.json` — parent spawn/fat/stop/plan-write / SubagentStop intercept
|
|
28
28
|
- `.grok/hooks/rtk.json` — RTK
|
|
29
|
-
- `.grok/skills/{parent,explain,handoff,pickup,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,write-plan,implement-plan}/` — generated from `.rulesync/skills/`; do not hand-edit
|
|
29
|
+
- `.grok/skills/{parent,explain,handoff,pickup,solo,cascade,auto,ask,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,write-plan,implement-plan}/` — generated from `.rulesync/skills/`; do not hand-edit
|
|
30
30
|
- `.grok/parent.md` — 1-line pointer to orchestrator agent; not SessionStart
|
|
31
31
|
- `.grok/roles/*.toml`
|
|
32
32
|
- `.grok/global-settings.toml` — merged into `~/.grok/config.toml` by `scripts/sync-global-settings.mjs` (not auto-loaded; project config cannot set `[features]`)
|
|
33
33
|
- `.rulesync/global-settings/` — host manifest and reserved noop payloads
|
|
34
34
|
- `.rulesync/mcp-policy.jsonc` — MCP deny-default SSOT (`default: deny`, `allow: []`)
|
|
35
|
-
- `.rulesync/
|
|
35
|
+
- `.rulesync/grunt.config.jsonc` — leftover-gate + spawnMode SSOT (`version` `1`, `leftoverGate` `ask`|`auto` committed default `ask`, `spawnMode` `solo`|`cascade` committed default `cascade` never `solo`). Effective spawn: stamp `spawn-mode-{sid}` > one-release `grunt-off` > config > `cascade`. Fail-closed cascade. Keys independent.
|
|
36
|
+
- `.rulesync/skills/{parent,explain,handoff,pickup,solo,cascade,auto,ask,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,browser,write-plan,implement-plan}/` — skill SSOT; `rulesync -f skills` emits `.grok/skills/`, `.claude/skills/`, `.agents/skills/` byte-equal. `/cascade` = exit solo / restore cascade (not a sticky second mode). `/auto` `/ask` = session leftover-gate (not spawn-escape)
|
|
36
37
|
|
|
37
38
|
## Scripts
|
|
38
39
|
- `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)
|
|
@@ -43,6 +44,7 @@ Cheap outline. Not a file dump.
|
|
|
43
44
|
- `scripts/grunt-job.mjs` — flags `--job` `--query` `--path` `--glob` (repeatable) `--cwd`; regex in `--query` OK; never `cd &&`; unknown flags / exec shell-meta → FALLBACK
|
|
44
45
|
- `scripts/parse-need.mjs`
|
|
45
46
|
- `scripts/persist-handoff.mjs` — `.tmp/grunt/handoffs/{serial}-{slug}-{stamp}.md`; `HANDOFF_NAME:` → slug; H2 `Goal|State|Context|Next|Watch-outs`; `status` `open|resumed|done`
|
|
47
|
+
- `scripts/persist-tmp.mjs` — `.tmp/grunt/{serial}-{slug}-{stamp}.{ext}` root files; `TMP_NAME:` / `TMP_EXT:`; own serial; skip reserved dirs
|
|
46
48
|
- `scripts/persist-plan.mjs`
|
|
47
49
|
- `scripts/sync-global-settings.mjs` — dry-run-by-default merge of `.grok/global-settings.toml` into `$HOME/.grok/config.toml`; manifest in `.rulesync/global-settings/`; `skipKeyPattern` skips MCP; never copies project MCP into `$HOME/.grok`
|
|
48
50
|
- `scripts/purge-global-mcps.mjs` — dry-run-by-default purge of stubborn global MCP sources (`$HOME/.grok/config.toml` plugins + `disabled_mcp_servers`, `$HOME/.cursor/mcp.json` `MCP_DOCKER`); `--apply` writes; never project MCP
|
|
@@ -50,22 +52,25 @@ Cheap outline. Not a file dump.
|
|
|
50
52
|
- `scripts/emit-gemini.mjs` — `GEMINI.md` (`@AGENTS.md`) + `.gemini/agents/{id}/agent.md` from `.rulesync/subagents` (not `rulesync -t geminicli`); no prune; does not touch settings
|
|
51
53
|
- `scripts/emit-agent-shell-tools.mjs` — after rulesync subagents: rewrite `.claude/agents/grunt.md` body `Bash`; grok/codex/gemini/generic keep `run_terminal_command`
|
|
52
54
|
- `scripts/browser.mjs` — session browser rail `nav|snap|click|fill|shot|pdf|stop`; Lightpanda default; Chromium on verb/OS/probe/paint-host/one-escalate; `.tmp/grunt/browser/`
|
|
55
|
+
- `scripts/grunt-config.mjs` — `loadLeftoverGate(workspaceRoot)` fail-closed `ask`; `loadSpawnMode(workspaceRoot)` fail-closed `cascade`; keys independent
|
|
53
56
|
|
|
54
57
|
## Tmp
|
|
55
|
-
- `.tmp/plans/` — persist-plan / parent / implementer; format SSOT = `.rulesync/reference/plan-format.md`
|
|
56
|
-
- `.tmp/orchestrator-logs/` — parent stamps
|
|
57
|
-
- `.tmp/grunt/` — grunt scratch
|
|
58
|
+
- `.tmp/grunt/plans/` — persist-plan / parent / implementer; format SSOT = `.rulesync/reference/plan-format.md`
|
|
59
|
+
- `.tmp/grunt/orchestrator-logs/` — parent stamps
|
|
60
|
+
- `.tmp/grunt/` — grunt scratch + `/tmp` dumps `{serial}-{slug}-{stamp}.{ext}` at root (not nested `tmp/`)
|
|
58
61
|
- `.tmp/grunt/browser/` — browser session/profile/shot/pdf (not MCP)
|
|
59
62
|
- `.tmp/grunt/handoffs/` — persist-handoff / `/handoff`; own serial counter (not plan serials)
|
|
60
63
|
|
|
61
|
-
## Stamps (`.tmp/orchestrator-logs/`)
|
|
62
|
-
- `tools-used` / `stop-block` / `need-intercept` / `parent-escape` — Stop does not waive impl finals for `tools-used`; `/parent` writes `parent-escape-{sid}` once
|
|
63
|
-
- `
|
|
64
|
+
## Stamps (`.tmp/grunt/orchestrator-logs/`)
|
|
65
|
+
- `tools-used` / `stop-block` / `need-intercept` / `parent-escape` / `auto-ask` / `spawn-mode` — Stop does not waive impl finals for `tools-used`; `/parent` writes `parent-escape-{sid}` once
|
|
66
|
+
- `spawn-mode-{sid}` — spawn session stamp. Body `solo`|`cascade`. Slash==config unlinks. Sid-less: no stamp. Unreadable/bad body ignored (dual-read `grunt-off` else config → cascade). `/solo` `/cascade` always unlink `grunt-off`
|
|
67
|
+
- `grunt-off-{sid}` — one-release dual-read as solo when spawn-mode stamp missing or body not exact `solo`|`cascade`. `/solo` `/cascade` always unlink. Requires a real sid (never the `default` fallback). Do not write new `grunt-off`
|
|
68
|
+
- `auto-ask-{sid}` — leftover-gate session stamp. Body `auto`|`ask`. Slash==config unlinks. Sid-less: no stamp. Unreadable/bad body ignored (fall through config → ask). Not spawn-escape.
|
|
64
69
|
|
|
65
70
|
## Generated (do not hand-edit; committed, not gitignored)
|
|
66
71
|
- `AGENTS.md`, `CLAUDE.md`
|
|
67
72
|
- `.rulesync/reference/INDEX.md`, `skills-map.md`, `refs-map.md` (`emit-maps.mjs`)
|
|
68
|
-
- `.claude/skills/*`, `.agents/skills/*`, `.grok/skills/{parent,explain,handoff,pickup,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,write-plan,implement-plan}/` (from `.rulesync/skills/`)
|
|
73
|
+
- `.claude/skills/*`, `.agents/skills/*`, `.grok/skills/{parent,explain,handoff,pickup,solo,cascade,auto,ask,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,write-plan,implement-plan}/` (from `.rulesync/skills/`)
|
|
69
74
|
- `.grok/agents/*`
|
|
70
75
|
- `.claude/agents/*`
|
|
71
76
|
- `.codex/agents/*`
|
|
@@ -4,7 +4,7 @@ tags: [output]
|
|
|
4
4
|
|
|
5
5
|
# Output
|
|
6
6
|
|
|
7
|
-
en-US unless asked. every output maximal superterse. Fragments OK. Sacrifice grammar; keep meaning. Parent and child. Every turn, not final-only. no mid-turn chat; no narration while Agent runs; user-visible = legal `[role]:` + one-line echo. Advise leftover: numbered pick each on own line after that tagged recap — do not cram 1./2./3. onto the recap line
|
|
7
|
+
en-US unless asked. every output maximal superterse. Fragments OK. Sacrifice grammar; keep meaning. Parent and child. Every turn, not final-only. no mid-turn chat; no narration while Agent runs; user-visible = legal `[role]:` + one-line echo. Advise leftover: numbered pick each on own line after that tagged recap; one empty blank line immediately before leftover 1. (leftover last; not adjacent to recap/body) — do not cram 1./2./3. onto the recap line
|
|
8
8
|
|
|
9
9
|
**Mid-turn** (in-flight; first line still legal tag): `[orchestrator]: wait grunt` only. `need:` stop = JSON only. Grunt isolation = `verdict:` only; parent maps to natural recap. ⚠/validate: no recap; spawn. Imperative = routing/mid-turn only.
|
|
10
10
|
|
|
@@ -30,20 +30,30 @@ Examples:
|
|
|
30
30
|
[implementer]: missing /abs/b.md. Prefetch via grunt? y/n
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Child first line = those buckets in natural language. Body may continue (plans/findings). Parent echo one recap line. Advise leftover continues after it numbered pick each on own line. Do not force children to one line only for body/logs.
|
|
33
|
+
Child first line = those buckets in natural language. Body may continue (plans/findings). Parent echo one recap line. Advise leftover continues after it: one empty blank line then numbered pick each on own line. Do not force children to one line only for body/logs.
|
|
34
34
|
|
|
35
35
|
Advise recap includes why-clause (one clause not treatise): `{decided}. {how-capsule}. {why-clause}`. Why-clause = rejected alt + constraint. Parent echo = that recap verbatim-ish; no-strip; forbid compress-to-verdict. Still one recap line. Do not dump body. Do not invent why if omitted. Pick1 recap-as-spec includes how+why; implementer must not paste why into code comments. Always-why recap ≠ `/explain` (`/explain` = expansion not the why path).
|
|
36
36
|
|
|
37
37
|
`/write-plan`: remainder `/implement-plan` (ask). `/explain`: same four buckets; sentences OK.
|
|
38
38
|
|
|
39
|
-
Advise leftover: numbered pick (number or full leftover label, or unique tail `verbal plan` / `file plan`)
|
|
40
|
-
1.
|
|
41
|
-
2.
|
|
39
|
+
Advise leftover: numbered pick (number or full leftover label, or unique tail `verbal plan` / `file plan`). Always-print typed leftover triple (advise-class final recap only) unless effective leftover-gate=auto and Implement-typed (pick2 chain skip leftover wait). Else always-print typed triple on advise-class final recap. Write-typed under auto still leftover wait. One verb per recap; never jammed `Implement/write`. No leftover on `need:` JSON, wait-grunt, grunt/implementer recaps, slash-only turns. Leftover ⊆ remainder kinds.
|
|
40
|
+
1. {Implement|Write} with verbal plan
|
|
41
|
+
2. {same verb} with file plan
|
|
42
42
|
3. Tweak
|
|
43
|
+
Type Implement — how-capsule = in-repo product writes (code tests `.rulesync/` CLAUDE/AGENTS skills). Product docs in-tree = Implement. Type Write — persist-only or implementer-nonsense: `.tmp/grunt/plans` inspect-pause `/tmp` artifact advise-only how/why with no product writes do-not-code external-human (SCA/bank/credentials). Recap remainder still names the human gate; leftover is not `4. Contact bank`. `/handoff` stays slash not Write pick1. Print all three every advise-class final recap. No omit 1/2. No frozen 4. Do not relabel 3.
|
|
43
44
|
```
|
|
44
45
|
[orchestrator]: wrote /abs/a
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
|
|
47
|
+
1. Implement with verbal plan
|
|
48
|
+
2. Implement with file plan
|
|
49
|
+
3. Tweak
|
|
50
|
+
```
|
|
51
|
+
```
|
|
52
|
+
[orchestrator]: advise-only how. Remainder persist note.
|
|
53
|
+
|
|
54
|
+
1. Write with verbal plan
|
|
55
|
+
2. Write with file plan
|
|
47
56
|
3. Tweak
|
|
48
57
|
```
|
|
49
|
-
Always-do leftover match (output.md cascade.md skills Rules); not Skill-name (`2` ≠ write-plan). Stop leftover-lines = recap format only; no code maps
|
|
58
|
+
Parent echoes printed leftover lines. Reuse echo: reprint last thinker’s leftover triple. Always-do leftover match printed lines (output.md cascade.md skills Rules); not Skill-name (`2` ≠ write-plan). Stop leftover-lines = recap format only; no code maps leftover numbers → skills; no leftover-label parser. `1` / full label / unique tail `verbal plan` → pick1. `2` / full / `file plan` → pick2. `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 verbal plan` / `Implementer with file plan` → pick1/pick2 iff Implement-typed. Implement pick1 = spawn implementer; paste last [thinker] recap as spec — how+why; implementer must not paste why into code comments; no `.tmp/grunt/plans`; no write-plan; no implement-plan. Implement pick2 = persist `.tmp/grunt/plans/{n}` then spawn implementer `plan=/abs/...` (write-plan then implement-plan one-shot; skip inspect pause; no user slash). Write pick1 = `/tmp` sequencing: persist recap/body under `.tmp/grunt/`; no implementer. Write pick2 = write-plan sequencing only: thinker draft + persist `.tmp/grunt/plans/{n}`; stop inspect-pause; remainder ask `/implement-plan {n}`; no implementer this turn. `/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.
|
|
59
|
+
Owned-defect recap: `Fix {owned path}`. Leftover always-print typed triple (Implement when in-repo writes). Do not relabel 3 to the bug. Workaround in why-clause not remainder.
|
|
@@ -4,7 +4,7 @@ Local implementer checklist. Not a design doc, PR stack, or DAG.
|
|
|
4
4
|
|
|
5
5
|
## Path
|
|
6
6
|
|
|
7
|
-
`.tmp/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md`
|
|
7
|
+
`.tmp/grunt/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md`
|
|
8
8
|
|
|
9
9
|
- **serial:** unpadded decimal int only (`1`, `12`, `10000`). **Never** `0001`, never quoted `"0001"` / `"1"`. Serial ≥ 1.
|
|
10
10
|
- **filename:** unpadded serial, slug, UTC datetime stamp (`6-sync-global-settings-20260826T143000Z.md`, not `0001-slug.md`). Stamp is `created` with `-` and `:` dropped (keep `T` and `Z`).
|
|
@@ -26,9 +26,9 @@ Local implementer checklist. Not a design doc, PR stack, or DAG.
|
|
|
26
26
|
## Allocate next serial (grunt, bash)
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
mkdir -p .tmp/plans
|
|
29
|
+
mkdir -p .tmp/grunt/plans
|
|
30
30
|
next=1
|
|
31
|
-
for f in .tmp/plans/*; do
|
|
31
|
+
for f in .tmp/grunt/plans/*; do
|
|
32
32
|
[ -f "$f" ] || continue
|
|
33
33
|
b=$(basename "$f")
|
|
34
34
|
case "$b" in
|
|
@@ -109,7 +109,7 @@ Thinker cites **absolute paths**. Leaves must be implementable without re-planni
|
|
|
109
109
|
|
|
110
110
|
## Worked example
|
|
111
111
|
|
|
112
|
-
File: `.tmp/plans/1-add-tmp-ignore-20260826T143000Z.md`
|
|
112
|
+
File: `.tmp/grunt/plans/1-add-tmp-ignore-20260826T143000Z.md`
|
|
113
113
|
|
|
114
114
|
```markdown
|
|
115
115
|
---
|
|
@@ -123,16 +123,16 @@ source: "gitignore .tmp so local plans stay untracked"
|
|
|
123
123
|
# add-tmp-ignore
|
|
124
124
|
|
|
125
125
|
## Goal
|
|
126
|
-
Repo `.gitignore` ignores `.tmp/` so files under `.tmp/plans/` stay untracked. Existing ignore entries stay.
|
|
126
|
+
Repo `.gitignore` ignores `.tmp/` so files under `.tmp/grunt/plans/` stay untracked. Existing ignore entries stay.
|
|
127
127
|
|
|
128
128
|
## Context
|
|
129
129
|
- `/home/ecomet/Development/example-app/.gitignore` may be missing or lack `.tmp/`
|
|
130
|
-
- Plans live at `/home/ecomet/Development/example-app/.tmp/plans/`
|
|
130
|
+
- Plans live at `/home/ecomet/Development/example-app/.tmp/grunt/plans/`
|
|
131
131
|
- No python helpers; bash only
|
|
132
132
|
|
|
133
133
|
## Constraints
|
|
134
134
|
- Do not clobber other `.gitignore` lines
|
|
135
|
-
- Do not create sample plans under `.tmp/plans` for git
|
|
135
|
+
- Do not create sample plans under `.tmp/grunt/plans` for git
|
|
136
136
|
- Do not edit `AGENTS.md`
|
|
137
137
|
|
|
138
138
|
## Watch-outs
|
|
@@ -145,15 +145,15 @@ Repo `.gitignore` ignores `.tmp/` so files under `.tmp/plans/` stay untracked. E
|
|
|
145
145
|
1.2 [ ] create `/home/ecomet/Development/example-app/.gitignore` when missing, body `.tmp/`
|
|
146
146
|
1.3 [ ] append `.tmp/` to `/home/ecomet/Development/example-app/.gitignore` if the line is absent
|
|
147
147
|
2 [ ] plans dir
|
|
148
|
-
2.1 [ ] mkdir -p `/home/ecomet/Development/example-app/.tmp/plans`
|
|
148
|
+
2.1 [ ] mkdir -p `/home/ecomet/Development/example-app/.tmp/grunt/plans`
|
|
149
149
|
2.2 [ ] confirm the dir exists; do not add a sample `*.md` under it
|
|
150
150
|
3 [ ] sanity
|
|
151
151
|
3.1 [ ] grep `^\.tmp/` in `/home/ecomet/Development/example-app/.gitignore`
|
|
152
152
|
3.2 [ ] confirm no extra hunks in that file besides the ignore line
|
|
153
|
-
3.3 [ ] `git check-ignore -v /home/ecomet/Development/example-app/.tmp/plans` from repo root
|
|
153
|
+
3.3 [ ] `git check-ignore -v /home/ecomet/Development/example-app/.tmp/grunt/plans` from repo root
|
|
154
154
|
|
|
155
155
|
## Verify
|
|
156
156
|
4 [ ] Verify
|
|
157
|
-
4.1 [ ] `git check-ignore -v .tmp/plans` reports ignored
|
|
157
|
+
4.1 [ ] `git check-ignore -v .tmp/grunt/plans` reports ignored
|
|
158
158
|
4.2 [ ] `git status --short -- .gitignore` shows only the ignore edit
|
|
159
159
|
```
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
| name | origin | description | task | commandPath | refs |
|
|
6
6
|
| --- | --- | --- | --- | --- | --- |
|
|
7
|
-
|
|
|
7
|
+
| ask | local | Session leftover-gate. /ask sets leftover-gate ask for this session — leftover triple wait on advise-class recaps. Not… | | | |
|
|
8
|
+
| auto | local | Session leftover-gate. /auto sets leftover-gate auto for this session — Implement-typed pick2 chains write-plan persist… | | | |
|
|
9
|
+
| browser | local | Live URL/interact → this; not websearch. /browser or browse a URL. Call node scripts/browser.mjs nav\|snap\|click\|fill\|sh… | | | |
|
|
8
10
|
| cascade | local | Session mode. /cascade exits solo and restores the grunt cascade for this session — spawn, orchestrator, recap, need\|ve… | | | |
|
|
9
11
|
| commit | local | Inspect the diff and commit with a Conventional Commits subject line. Use for /commit, "commit this", "commit these cha… | | | |
|
|
10
12
|
| commit-and-push | local | Alias of commit-push (1-release stub). Use for /commit-and-push, "commit and push", "commit this and push". Must push.… | | | |
|
|
@@ -13,8 +15,9 @@
|
|
|
13
15
|
| commit-push-release | local | Commit, push, bump package.json, tag vX.Y.Z, push the tag. CI publishes. Use for /commit-push-release, "commit push rel… | | | |
|
|
14
16
|
| explain | local | One-off human recap. /explain. First action = spawn grunt\|implementer\|thinker if facts/work; else recap already-visible… | | | |
|
|
15
17
|
| handoff | local | Parent writes a session handoff under .tmp/grunt/handoffs/ and tells the user to continue in a fresh session. Use for /… | | | |
|
|
16
|
-
| implement-plan | local | Implementer executes a local .tmp/plans checklist: continue, resume, or pick among plans. Empty /implement-plan
|
|
18
|
+
| implement-plan | local | Implementer executes a local .tmp/grunt/plans checklist: continue, resume, or pick among plans. Empty /implement-plan r… | | | |
|
|
17
19
|
| parent | local | One-turn parent-orchestrator escape. Use for /parent. Not a session mode. | | | |
|
|
18
20
|
| pickup | local | Pick up/continue a session handoff under .tmp/grunt/handoffs/. Use for /pickup, pick up, continue handoff, serial, drag… | | | |
|
|
19
21
|
| solo | local | Session mode. /solo disables the grunt cascade for this session — one normal agent, no spawn, no orchestrator. /cascade… | | | |
|
|
20
|
-
|
|
|
22
|
+
| tmp | local | One-off convo artifact dump under .tmp/grunt/. Use for /tmp, dump a draft, save a note/email/script from this session.… | | | |
|
|
23
|
+
| write-plan | local | Thinker drafts a local implementer-ready checklist plan; parent Write persists .tmp/grunt/plans/{serial}-{slug}-{YYYYMM… | | | |
|