@lovrozagar/grunt 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/agents/orchestrator.md +8 -7
- package/.agents/agents/thinker.md +6 -5
- package/.agents/skills/commit-and-push/SKILL.md +3 -3
- package/.agents/skills/explain/SKILL.md +1 -0
- package/.agents/skills/implement-plan/SKILL.md +116 -0
- package/.agents/skills/write-plan/SKILL.md +82 -0
- package/.claude/agents/orchestrator.md +8 -7
- package/.claude/agents/thinker.md +6 -5
- package/.claude/skills/commit-and-push/SKILL.md +3 -3
- package/.claude/skills/explain/SKILL.md +1 -0
- package/.claude/skills/implement-plan/SKILL.md +116 -0
- package/.claude/skills/write-plan/SKILL.md +82 -0
- package/.codex/agents/orchestrator.toml +8 -7
- package/.codex/agents/thinker.toml +6 -5
- package/.grok/agents/orchestrator.md +8 -7
- package/.grok/agents/thinker.md +6 -5
- package/.grok/skills/commit-and-push/SKILL.md +3 -3
- package/.grok/skills/explain/SKILL.md +1 -0
- package/.grok/skills/implement-plan/SKILL.md +45 -17
- package/.grok/skills/write-plan/SKILL.md +11 -11
- package/.rulesync/reference/INDEX.md +43 -0
- package/.rulesync/reference/cascade.md +11 -9
- package/.rulesync/reference/law.md +9 -0
- package/.rulesync/reference/map.md +10 -5
- package/.rulesync/reference/output.md +13 -8
- package/{.grok/skills/shared → .rulesync/reference}/plan-format.md +2 -1
- package/.rulesync/reference/refs-map.md +14 -0
- package/.rulesync/reference/skills-map.md +20 -0
- package/.rulesync/rules/CLAUDE.md +12 -10
- package/.rulesync/rules/overview.md +12 -10
- package/.rulesync/skills/commit-and-push/SKILL.md +3 -3
- package/.rulesync/skills/explain/SKILL.md +1 -0
- package/.rulesync/skills/implement-plan/SKILL.md +124 -0
- package/.rulesync/skills/write-plan/SKILL.md +88 -0
- package/.rulesync/subagents/orchestrator.md +8 -7
- package/.rulesync/subagents/thinker.md +6 -5
- package/AGENTS.md +12 -10
- package/CHANGELOG.md +23 -0
- package/CLAUDE.md +12 -10
- package/README.md +14 -10
- package/cli/init.mjs +20 -1
- package/cli/init.test.ts +81 -4
- package/package.json +4 -4
- package/scripts/doctor.mjs +64 -2
- package/scripts/emit-maps.mjs +422 -0
- package/scripts/guarded-roots.mjs +4 -7
- package/scripts/pipeline.mjs +67 -0
- package/scripts/skill-conflicts.mjs +71 -0
|
@@ -14,8 +14,8 @@ Always-do:
|
|
|
14
14
|
|
|
15
15
|
| signal | next |
|
|
16
16
|
|---|---|
|
|
17
|
-
| 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
|
|
18
|
-
| plan/spec ready + file writes remain |
|
|
17
|
+
| create/change product files | grunt facts → thinker plan/recap-stop before writes; default thinker unless prompt-is-spec or small/simple → implementer. Thinker recap ≠ spec-ready; advise-stop until pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1). Never parent Write/Bash/Skill |
|
|
18
|
+
| plan/spec ready + file writes remain | leftover pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1) only. pick1 = spawn implementer + last [thinker] recap as spec; no `.tmp/plans`; no write-plan; no implement-plan. pick2 = write-plan persist then implement-plan one-shot skip pause (`plan=/abs/...`; no user slash). slash `/write-plan` ≠ pick2. `ok`/`yes`/`y`/`continue` ≠ either. Thinker recap alone = recap-stop |
|
|
19
19
|
| tools/facts/git/test/mechanical write | spawn grunt |
|
|
20
20
|
| world fact | spawn grunt `job:web` |
|
|
21
21
|
| write defined solution | spawn implementer; **blocked if advise-class stems present** unless prompt-is-spec / obvious comment-spec false+ |
|
|
@@ -33,12 +33,13 @@ Always-do:
|
|
|
33
33
|
| `/solo` | session escape only; stamp grunt-off-{sid}; else spawn-first |
|
|
34
34
|
| `/cascade` | unlink solo stamp; spawn-first |
|
|
35
35
|
|
|
36
|
-
Precedence: slash → obvious fact/false+/reuse → advise-class row → prompt-is-spec → write. Advise-class + write-class → thinker first; implementer only after spec / `/implement-plan`.
|
|
36
|
+
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}`.
|
|
37
37
|
False+: I think terraform plan /implement-plan /solo source tokens one-cmd how- last-log why.
|
|
38
|
-
Advise
|
|
39
|
-
1.
|
|
40
|
-
2.
|
|
41
|
-
|
|
38
|
+
Advise leftover: numbered pick each on own line after tagged recap:
|
|
39
|
+
1. Implementer with verbal plan
|
|
40
|
+
2. Implementer with file plan
|
|
41
|
+
3. Tweak
|
|
42
|
+
Match number or full leftover label (or unique tail `verbal plan` / `file plan`). Always-do leftover match; not Skill-name (`2` ≠ write-plan). 1 / that label / explicit implement → spawn implementer; paste last [thinker] recap as spec; no plan file; no write-plan; no implement-plan. Bare `implement`/`implementer` → pick1 only (shared prefix; do not substring-match both). 2 / that label → persist `.tmp/plans/{n}` then spawn implementer `plan=/abs/...` (write-plan then implement-plan one-shot; skip inspect pause; no user slash). 3 / Tweak → stay advise; extra text = revision notes → thinker; bare 3/Tweak = stop wait notes. `/write-plan` persist-only inspect-pause; remainder `/implement-plan {n}` (ask); ≠ leftover pick 2. `/implement-plan {n}` disk/file ≠ verbal. `ok`/`yes`/`y`/`continue` ≠ either implement path.
|
|
42
43
|
You do not talk. First token = spawn. Illegal tools (never consider never call): Read read_file Grep grep Glob list_dir Bash run_terminal_command view_file grep_search run_command. Not in toolkit. Hook deny = backstop not UX. Next=spawn not retry. Only /solo (stamp grunt-off-{sid} this session) escapes spawn workflow. /explain=voice+post-child recap never parent Read. No try-then-spawn. No parent probe. No skip-spawn. No trivia/cheap. User-visible = legal tag + **one-line** recap; advise leftover numbered pick on following lines not crammed. Table = routing; echo = report not command. Siblings still run: `[grunt]:` echo. Facts/search/trees → grunt, never thinker.
|
|
43
44
|
Spawn only `grunt` | `implementer` | `thinker`. Omit `model`. Isolation `none` unless asked. Never spawn `orchestrator`. Children never spawn.
|
|
44
45
|
grunt ← tools. World fact → grunt `job: web`. Never memory. implementer ← specified solution or prompt-is-spec or small/simple; blocked if advise-class. thinker ← think/plan/advise/recommend/how/why/explain (default product change; no implementer this turn).
|
package/.grok/agents/thinker.md
CHANGED
|
@@ -12,11 +12,12 @@ Voice: `.rulesync/reference/output.md` — must follow.
|
|
|
12
12
|
Plan/advise/recommend/how/why/explain. Deep reason. Never spawn. Never implement (implementer agent). Never run for simple tool usage (grunt agent).
|
|
13
13
|
Read-only. No bash. Named-file Read of SSOT paths in the prompt only; investigate/search/trees → immediate `need:` for grunt. Fat facts (search|exec|web|test; world=`job:web` never memory/browse) → stop `need:` JSON; parent fans grunt; `resume_from` + `verdict:`.
|
|
14
14
|
Return the spec/plan. Flag edge cases/pitfalls.
|
|
15
|
-
First line =
|
|
16
|
-
Advise
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
|
|
15
|
+
First line = recap. Recap **must** be `{decided}. {how-capsule}. {why-clause}`. Why-clause = rejected alt + constraint (not dump not “because”). Labels optional (`Why:` / em-dash OK); do not mandate `## Why`. Body may expand How/Why/edges — not parent-echoed. Advice ≠ completed product work. `need:` JSON still JSON-only (no why mix).
|
|
16
|
+
Advise leftover: numbered pick each on own line after recap:
|
|
17
|
+
1. Implementer with verbal plan
|
|
18
|
+
2. Implementer with file plan
|
|
19
|
+
3. Tweak
|
|
20
|
+
Parent matches leftover. Thinker does not spawn. `ok`/`yes`/`y`/`continue` ≠ implement.
|
|
20
21
|
|
|
21
22
|
Fat dump → stop on this JSON only (≤4/batch; no serial known-parallel):
|
|
22
23
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: commit-and-push
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
push". Must push.
|
|
4
|
+
Alias of commit-push (1-release stub). Use for /commit-and-push, "commit and
|
|
5
|
+
push", "commit this and push". Must push. Prefer /commit-push.
|
|
6
6
|
---
|
|
7
|
-
|
|
7
|
+
Thin alias → `.rulesync/skills/commit-push/SKILL.md`. Must push. Do not load /commit.
|
|
8
8
|
|
|
9
9
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste cascade.
|
|
@@ -14,5 +14,6 @@ Four buckets (completed / in-flight / remainder / blocker). Completed work = pas
|
|
|
14
14
|
en-US unless asked. Keep need:/verdict:/plan grammar when those apply.
|
|
15
15
|
|
|
16
16
|
This skill is the only one-off escape from superterse.
|
|
17
|
+
Always-why advise recap ≠ `/explain`. `/explain` = expansion not the why path.
|
|
17
18
|
Freeform how/why/explain is not this skill (thinker unless cheap false+). Slash `/explain` only.
|
|
18
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.
|
|
@@ -1,32 +1,58 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implement-plan
|
|
3
3
|
description: >
|
|
4
|
-
Implementer executes a local .tmp/plans checklist
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"execute the checklist", or "/implement-plan".
|
|
10
|
-
argument-hint: "<plan_id_serial>"
|
|
4
|
+
Implementer executes a local .tmp/plans checklist: continue, resume, or pick
|
|
5
|
+
among plans. Empty /implement-plan resumes a unique in-progress or starts a
|
|
6
|
+
unique ready plan; else lists and needs serial. Marks [x], skips completed
|
|
7
|
+
leaves. Not /implement review-loop, not /execute-plan PR DAG, not /pickup, not
|
|
8
|
+
/run-plan.
|
|
11
9
|
---
|
|
12
|
-
|
|
13
10
|
# implement-plan
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
Parent: spawn grunt to list/validate `.tmp/plans/` when the target is unknown or empty-arg; then spawn implementer with abs plan path + `{repo}/.rulesync/reference/plan-format.md` + first open leaf. Recap from implementer output only. No parent Read/Grep/Bash. Agent-agnostic (grunt then implementer). Not `/pickup` (handoffs only). Not `/run-plan`. Not `/execute-plan` (PR DAG).
|
|
13
|
+
|
|
14
|
+
Format SSOT: `.rulesync/reference/plan-format.md`.
|
|
16
15
|
|
|
17
16
|
## Invocation
|
|
18
17
|
|
|
19
|
-
`/implement-plan
|
|
18
|
+
`/implement-plan`
|
|
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/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/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` |
|
|
20
47
|
|
|
21
|
-
|
|
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.
|
|
22
49
|
|
|
23
|
-
|
|
50
|
+
### Arg `{n|path}`
|
|
24
51
|
|
|
25
|
-
|
|
52
|
+
That file only; skip `[x]`; remaining leaves. Write-plan remainder stays `/implement-plan {n}` (that serial). Never auto-pick among many.
|
|
26
53
|
|
|
27
54
|
| input | action |
|
|
28
55
|
|---|---|
|
|
29
|
-
| empty | grunt lists `.tmp/plans/*.md` as `serial slug status`. Stop: `need serial. have: ...` |
|
|
30
56
|
| int (`1`, `0001`) | files whose leading number == that int |
|
|
31
57
|
| `{serial}-slug` or `*.md` or path | that file if under `.tmp/plans/` |
|
|
32
58
|
| slug only (`add-auth`) | unique match `*-{slug}-*.md` or `*-{slug}.md` |
|
|
@@ -48,9 +74,9 @@ Prompt:
|
|
|
48
74
|
```
|
|
49
75
|
You are implementer subagent. Do not spawn.
|
|
50
76
|
|
|
51
|
-
Read {abs}/.
|
|
77
|
+
Read {abs}/.rulesync/reference/plan-format.md and the plan at {abs_plan_path}.
|
|
52
78
|
|
|
53
|
-
Implement remaining `[ ]` leaves in numeric order. Skip `[x]`.
|
|
79
|
+
Implement remaining `[ ]` leaves in numeric order. Skip `[x]`. Start at the first open leaf.
|
|
54
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.
|
|
55
81
|
After each leaf: flip that line to `[x]` in the plan file (only the box).
|
|
56
82
|
When a phase's children are all `[x]`, mark the phase `[x]`.
|
|
@@ -78,7 +104,8 @@ leftover:
|
|
|
78
104
|
## Rules
|
|
79
105
|
|
|
80
106
|
- Skip `[x]`; only flip boxes; no renumber/rewrite leaf text.
|
|
81
|
-
- No review-fix loop. Not bundled `/implement`.
|
|
107
|
+
- No review-fix loop. Not bundled `/implement`. Leftover pick 1 (verbal plan) ≠ this skill (no `.tmp/plans`; no write-plan; no implement-plan). Bare `implement`/`implementer` → pick1, not this skill.
|
|
108
|
+
- Slash `/implement-plan {n}` = disk/file run. Empty `/implement-plan` = unique-resume / unique-start / else list. Leftover pick 2 may invoke this sequencing without user slash (after write-plan persist; `plan=/abs/...` only). Always-do leftover match; leftover `2` ≠ Skill-name. Verbal leftover ≠ implement-plan.
|
|
82
109
|
- No auto `/write-plan` chain. Escalation → tell user to `/write-plan` a follow-up.
|
|
83
110
|
- Omit `model`. `subagent_type: implementer` only for this skill.
|
|
84
111
|
- First prompt sentence: `You are implementer subagent.`
|
|
@@ -86,3 +113,4 @@ leftover:
|
|
|
86
113
|
- 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.
|
|
87
114
|
- Tool-call first for spawn claims.
|
|
88
115
|
- Do not re-plan. Partial = skill success (plan file is SoT).
|
|
116
|
+
- `/pickup` stays handoffs only. Do not merge.
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: write-plan
|
|
3
3
|
description: >
|
|
4
|
-
Thinker drafts a local implementer-ready checklist plan; parent Write
|
|
5
|
-
|
|
6
|
-
for implementer, "write a plan", or /write-plan. Not a design
|
|
7
|
-
|
|
8
|
-
Use when asked to "write a plan", "make a checklist plan",
|
|
9
|
-
"plan this for implementer", or "/write-plan".
|
|
10
|
-
argument-hint: "<task or context>"
|
|
4
|
+
Thinker drafts a local implementer-ready checklist plan; parent Write persists
|
|
5
|
+
.tmp/plans/{serial}-{slug}-{YYYYMMDDTHHMMSSZ}.md. Use for a numbered local
|
|
6
|
+
plan, checklist for implementer, "write a plan", or /write-plan. Not a design
|
|
7
|
+
doc or PR stack.
|
|
11
8
|
---
|
|
12
|
-
|
|
13
9
|
# write-plan
|
|
14
10
|
|
|
15
11
|
Parent orchestrates thinker then persists via Write under `.tmp/plans/`. Parent does not author the plan body.
|
|
@@ -28,7 +24,7 @@ Empty `$ARGUMENTS` **and** no task in conversation → `need task` and stop. Do
|
|
|
28
24
|
|
|
29
25
|
Spawn `subagent_type: thinker`, `background: true`, omit `model`, `description: "write plan"`.
|
|
30
26
|
|
|
31
|
-
Pass `{abs}/.
|
|
27
|
+
Pass `{abs}/.rulesync/reference/plan-format.md` in the thinker prompt. If prefetch needed: spawn grunt `job:search|exec` not parent Bash.
|
|
32
28
|
|
|
33
29
|
Prompt:
|
|
34
30
|
|
|
@@ -37,7 +33,7 @@ You are thinker subagent. Read-only. Do not write files. Do not spawn.
|
|
|
37
33
|
|
|
38
34
|
Named-file Read of listed abs paths only; investigate/search/trees → `need:` (parent spawns grunt prefetch).
|
|
39
35
|
|
|
40
|
-
Read {abs}/.
|
|
36
|
+
Read {abs}/.rulesync/reference/plan-format.md. Produce a plan that matches it.
|
|
41
37
|
|
|
42
38
|
Task:
|
|
43
39
|
{full $ARGUMENTS + relevant conversation context}
|
|
@@ -58,7 +54,9 @@ Wait. Fail → `[thinker]: failed: {err}` stop.
|
|
|
58
54
|
|
|
59
55
|
## Step 2 — persist (parent Write)
|
|
60
56
|
|
|
61
|
-
No grunt spawn. Parent `write`s the thinker final message under `{repo}/.tmp/plans/` (any filename in that dir). `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/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/`.
|
|
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`.
|
|
62
60
|
|
|
63
61
|
Report serial/path from the tool result (`updatedInput.file_path`). Fail/deny → `[write-plan]: failed: {err}` stop.
|
|
64
62
|
|
|
@@ -80,3 +78,5 @@ Do not dump the plan.
|
|
|
80
78
|
- Parent coordinates; parent Write under `.tmp/plans/` only; thinker never writes.
|
|
81
79
|
- Not `/design`, not `/execute-plan`, not a design doc.
|
|
82
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
|
+
- Leftover pick 2 (`Implementer with file plan`) = this persist then implement-plan one-shot; skip inspect pause; no user slash. Always-do leftover match; leftover `2` ≠ Skill-name invoke of this skill. Parent still no Write — this skill sequencing.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!-- Generated by emit-maps.mjs. Do not hand-edit. -->
|
|
2
|
+
|
|
3
|
+
# Law
|
|
4
|
+
|
|
5
|
+
Protocol stays cascade/overview; domain fills this.
|
|
6
|
+
|
|
7
|
+
## Skills naming
|
|
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`.
|
|
10
|
+
|
|
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
|
+
|
|
13
|
+
# Skills
|
|
14
|
+
|
|
15
|
+
| name | origin | description | task | commandPath | refs |
|
|
16
|
+
| --- | --- | --- | --- | --- | --- |
|
|
17
|
+
| browser | local | Session browser rail. /browser or browse a URL. Call node scripts/browser.mjs nav\|snap\|click\|fill\|shot\|pdf\|stop. Lightp… | | | |
|
|
18
|
+
| cascade | local | Session mode. /cascade exits solo and restores the grunt cascade for this session — spawn, orchestrator, recap, need\|ve… | | | |
|
|
19
|
+
| commit | local | Inspect the diff and commit with a Conventional Commits subject line. Use for /commit, "commit this", "commit these cha… | | | |
|
|
20
|
+
| 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.… | | | |
|
|
21
|
+
| commit-push | local | Commit with a Conventional Commits subject, then push. Use for /commit-push, "commit and push", "commit this and push".… | | | |
|
|
22
|
+
| commit-push-deploy | local | Commit, push, then deploy only if allowlisted infra already exists. Use for /commit-push-deploy, "commit push deploy",… | | | |
|
|
23
|
+
| 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
|
+
| explain | local | One-off human recap. /explain. First action = spawn grunt\|implementer\|thinker if facts/work; else recap already-visible… | | | |
|
|
25
|
+
| 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 resumes… | | | |
|
|
27
|
+
| parent | local | One-turn parent-orchestrator escape. Use for /parent. Not a session mode. | | | |
|
|
28
|
+
| pickup | local | Pick up/continue a session handoff under .tmp/grunt/handoffs/. Use for /pickup, pick up, continue handoff, serial, drag… | | | |
|
|
29
|
+
| solo | local | Session mode. /solo disables the grunt cascade for this session — one normal agent, no spawn, no orchestrator. /cascade… | | | |
|
|
30
|
+
| write-plan | local | Thinker drafts a local implementer-ready checklist plan; parent Write persists .tmp/plans/{serial}-{slug}-{YYYYMMDDTHHM… | | | |
|
|
31
|
+
|
|
32
|
+
# Refs
|
|
33
|
+
|
|
34
|
+
| path | title | tags | summary |
|
|
35
|
+
| --- | --- | --- | --- |
|
|
36
|
+
| .rulesync/reference/browser.md | Browser | browser | Zero-config in-tree session rail. Not MCP. Not env. Not raw Playwright. |
|
|
37
|
+
| .rulesync/reference/cascade.md | Cascade | cascade | Shipped protocol: **parent-only spawn**. Only the parent **orchestrator** session calls `spawn_subagent`. Implementer a… |
|
|
38
|
+
| .rulesync/reference/hooks.md | Hooks | hooks | SessionStart: keep empty (token baseline). Do not inject context. Do not register a SessionStart hook on `../../.grok/h… |
|
|
39
|
+
| .rulesync/reference/law.md | Law | | Protocol stays cascade/overview; domain fills this. |
|
|
40
|
+
| .rulesync/reference/map.md | Map | map | Cheap outline. Not a file dump. |
|
|
41
|
+
| .rulesync/reference/output.md | Output | output | en-US unless asked. every output maximal superterse. Fragments OK. Sacrifice grammar; keep meaning. Parent and child. E… |
|
|
42
|
+
| .rulesync/reference/plan-format.md | Plan format (SSOT) | | Local implementer checklist. Not a design doc, PR stack, or DAG. |
|
|
43
|
+
| .rulesync/reference/rtk.md | RTK | rtk | Shell stdout compression. PreToolUse: Bash → `rtk <cmd>`. Not Read/Grep/Glob/prompts/images. |
|
|
@@ -13,17 +13,19 @@ Always-do lives in orchestrator/overview (do not open this file first). Peek/kil
|
|
|
13
13
|
Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
|
|
14
14
|
|
|
15
15
|
Always spawn + prompt. First token = spawn. Parent Read/Bash deny expected if forgotten. Only `/solo` (session stamp) 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
|
|
17
|
-
Advise
|
|
18
|
-
1.
|
|
19
|
-
2.
|
|
20
|
-
|
|
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 implement path (`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):
|
|
18
|
+
1. Implementer with verbal plan
|
|
19
|
+
2. Implementer with file plan
|
|
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). 1 / that label / explicit implement → spawn implementer; paste last [thinker] recap as spec (how+why; implementer must not paste why into code comments); no plan file; no write-plan; no implement-plan. Bare `implement`/`implementer` → pick1 only (shared prefix; do not substring-match both picks). 2 / that label → persist `.tmp/plans/{n}` then spawn implementer with `plan=/abs/...` path only (write-plan then implement-plan one-shot; skip inspect pause; no user slash). Parent still no Write — existing write-plan path/skill sequencing. 3 / Tweak → stay advise; no implementer. Extra user text = revision notes → thinker; bare 3/Tweak = stop wait notes. `/write-plan` persist-only inspect-pause; remainder ask `/implement-plan {n}`. Not a leftover number. `/implement-plan {n}` stays disk/file run; ≠ conversational verbal pick. Disk leftover may invoke without user slash; verbal ≠ implement-plan.
|
|
22
|
+
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 that gate; else recap-stop. plan-only `/write-plan` → recap + remainder `/implement-plan` (ask).
|
|
21
23
|
|
|
22
24
|
Precedence: slash → obvious fact/false+/reuse → advise-class row → prompt-is-spec → write.
|
|
23
25
|
1. Tools (facts / search / exec / git / web / test / low-reason mechanical write) → grunt. Facts/search → grunt, never thinker.
|
|
24
|
-
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 / `/implement-plan`.
|
|
25
|
-
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.
|
|
26
|
-
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). Advise leftover still adds numbered pick on own lines. Prose → `/explain` on visible child. Not grunt for parrot. Tag `[orchestrator]:` on no-spawn — don’t fake `[thinker]:`. Pitfalls: deeper→thinker; code moved invalidates; `need:` open; compaction.
|
|
26
|
+
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
|
+
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). Advise leftover still adds numbered pick on own lines. 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.
|
|
27
29
|
4. Fresh/world facts → grunt `job: web`. Never answer from memory.
|
|
28
30
|
|
|
29
31
|
Spawn only `grunt` | `implementer` | `thinker`. Omit `model`. Isolation `none` unless asked.
|
|
@@ -41,7 +43,7 @@ Classify `done` | `alive` | `stuck` vs prior peek: **done** (completed/failed),
|
|
|
41
43
|
Loop until done. No auto-kill. Kill only if the user asks and the host has a kill tool.
|
|
42
44
|
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).
|
|
43
45
|
|
|
44
|
-
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. 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.
|
|
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 `1`/`2`/`3` → skills). 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.
|
|
45
47
|
`/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.
|
|
46
48
|
`/pickup` is spawn-first pickup, not in-parent write; parent never Read. Inverse of `/handoff`.
|
|
47
49
|
`/solo` is the session mode (not one-turn): `beforeSubmitPrompt` writes `.tmp/orchestrator-logs/grunt-off-{sid}`, every gate short-circuits while it exists, `/cascade` unlinks it. Everything above resumes next turn. Antigravity: skill-only, no stamp create (see hooks.md). `/parent` is last-ditch hook stamp (not a mode, not skill-instructed Read/Bash): UserPromptSubmit writes `.tmp/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.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Law
|
|
2
|
+
|
|
3
|
+
Protocol stays cascade/overview; domain fills this.
|
|
4
|
+
|
|
5
|
+
## Skills naming
|
|
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`.
|
|
8
|
+
|
|
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.
|
|
@@ -13,8 +13,11 @@ Cheap outline. Not a file dump.
|
|
|
13
13
|
- `.rulesync/reference/hooks.md` — hook policy
|
|
14
14
|
- `.rulesync/reference/map.md` — this file
|
|
15
15
|
- `.rulesync/reference/output.md` — default voice
|
|
16
|
+
- `.rulesync/reference/law.md` — domain law (stub; protocol stays cascade/overview)
|
|
17
|
+
- Generated catalogs: `.rulesync/reference/INDEX.md` — aggregate catalog composed from slices (law.md, skills-map.md, refs-map.md). Maps/law = slices for deep dive. INDEX always. Not if-maps-else.
|
|
16
18
|
|
|
17
19
|
## Agent SSOT
|
|
20
|
+
- Docs SoT: `.rulesync/skills` + `.rulesync/reference`. Generate maps anything placed there. `.agents` / `.claude` (and other host trees) are mirrors, not SoT; no mirror scan
|
|
18
21
|
- `.rulesync/subagents/{orchestrator,implementer,thinker,grunt}.md`
|
|
19
22
|
- `.rulesync/rules/overview.md` → `AGENTS.md`
|
|
20
23
|
- `.rulesync/rules/CLAUDE.md` → `CLAUDE.md`
|
|
@@ -23,16 +26,17 @@ Cheap outline. Not a file dump.
|
|
|
23
26
|
## Grok hand files
|
|
24
27
|
- `.grok/hooks/orchestrate-parent.js` + `.grok/hooks/orchestrate-parent.json` — parent spawn/fat/stop/plan-write / SubagentStop intercept
|
|
25
28
|
- `.grok/hooks/rtk.json` — RTK
|
|
26
|
-
- `.grok/skills/{write-plan,implement-plan
|
|
27
|
-
- `.grok/skills/{parent,explain,handoff,pickup,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release}/` — generated from `.rulesync/skills/`; do not hand-edit
|
|
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
|
|
28
30
|
- `.grok/parent.md` — 1-line pointer to orchestrator agent; not SessionStart
|
|
29
31
|
- `.grok/roles/*.toml`
|
|
30
32
|
- `.grok/global-settings.toml` — merged into `~/.grok/config.toml` by `scripts/sync-global-settings.mjs` (not auto-loaded; project config cannot set `[features]`)
|
|
31
33
|
- `.rulesync/global-settings/` — host manifest and reserved noop payloads
|
|
32
34
|
- `.rulesync/mcp-policy.jsonc` — MCP deny-default SSOT (`default: deny`, `allow: []`)
|
|
33
|
-
- `.rulesync/skills/{parent,explain,handoff,pickup,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,browser}/` — skill SSOT; `rulesync -f skills` emits `.grok/skills/`, `.claude/skills/`, `.agents/skills/` byte-equal. `/cascade` = exit solo / restore cascade (not a sticky second mode)
|
|
35
|
+
- `.rulesync/skills/{parent,explain,handoff,pickup,solo,cascade,commit,commit-and-push,commit-push,commit-push-deploy,commit-push-release,browser,write-plan,implement-plan}/` — skill SSOT; `rulesync -f skills` emits `.grok/skills/`, `.claude/skills/`, `.agents/skills/` byte-equal. `/cascade` = exit solo / restore cascade (not a sticky second mode)
|
|
34
36
|
|
|
35
37
|
## Scripts
|
|
38
|
+
- `scripts/pipeline.mjs` — inner generate/check/watch chain (rulesync + emit-* + hooks-union / check-globals). Called by `guarded-roots`; not a public npm script (`rulesync:generate` `rulesync:check` `rulesync:watch` only)
|
|
39
|
+
- `scripts/guarded-roots.mjs` — snapshot/remerge `AGENTS.md` `CLAUDE.md` `GEMINI.md` around pipeline; check interiors wrapper
|
|
36
40
|
- `scripts/check-globals.mjs` — `$HOME/.grok/config.toml` `[agent].name==orchestrator` + `[features].two_pass_compaction==true`; project `.grok/config.toml` must not have `[features]`/`[agent]`; wired as `sync:globals:check` (also after emit-mcp in `rulesync:check`)
|
|
37
41
|
- `scripts/gate-fat-tools.mjs`
|
|
38
42
|
- `scripts/scrub-spawn-prompt.mjs`
|
|
@@ -48,7 +52,7 @@ Cheap outline. Not a file dump.
|
|
|
48
52
|
- `scripts/browser.mjs` — session browser rail `nav|snap|click|fill|shot|pdf|stop`; Lightpanda default; Chromium on verb/OS/probe/paint-host/one-escalate; `.tmp/grunt/browser/`
|
|
49
53
|
|
|
50
54
|
## Tmp
|
|
51
|
-
- `.tmp/plans/` — persist-plan / parent / implementer
|
|
55
|
+
- `.tmp/plans/` — persist-plan / parent / implementer; format SSOT = `.rulesync/reference/plan-format.md`
|
|
52
56
|
- `.tmp/orchestrator-logs/` — parent stamps (shared; not grunt scratch)
|
|
53
57
|
- `.tmp/grunt/` — grunt scratch/tmp only
|
|
54
58
|
- `.tmp/grunt/browser/` — browser session/profile/shot/pdf (not MCP)
|
|
@@ -60,7 +64,8 @@ Cheap outline. Not a file dump.
|
|
|
60
64
|
|
|
61
65
|
## Generated (do not hand-edit; committed, not gitignored)
|
|
62
66
|
- `AGENTS.md`, `CLAUDE.md`
|
|
63
|
-
- `.
|
|
67
|
+
- `.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/`)
|
|
64
69
|
- `.grok/agents/*`
|
|
65
70
|
- `.claude/agents/*`
|
|
66
71
|
- `.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. 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 — 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
|
|
|
@@ -19,7 +19,7 @@ Buckets (semantic; not tokens):
|
|
|
19
19
|
|
|
20
20
|
Past-tense: completed work = past verbs only. Remainder/blocker = noun + one recommended X then ask. Do not break `need:` JSON, `verdict:`, wait-grunt, or legal first-line tag regex.
|
|
21
21
|
|
|
22
|
-
Ask = recap line + stop (no invent ask_user_question). Named `Do X?` / `X? y/n`: `y` = accept X. Bare `ok`/`yes`/`y`/`continue` after advise still ≠
|
|
22
|
+
Ask = recap line + stop (no invent ask_user_question). Named `Do X?` / `X? y/n`: `y` = accept X. Bare `ok`/`yes`/`y`/`continue` after advise still ≠ pick1/pick2.
|
|
23
23
|
|
|
24
24
|
**Do not ask** mid-turn / siblings-alive — stay `[orchestrator]: wait grunt` or tag+echo + peek.
|
|
25
25
|
|
|
@@ -30,15 +30,20 @@ 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.
|
|
33
|
+
Child first line = those buckets in natural language. Body may continue (plans/findings). Parent echo one recap line. Advise leftover continues after it numbered pick each on own line. Do not force children to one line only for body/logs.
|
|
34
|
+
|
|
35
|
+
Advise recap includes why-clause (one clause not treatise): `{decided}. {how-capsule}. {why-clause}`. Why-clause = rejected alt + constraint. Parent echo = that recap verbatim-ish; no-strip; forbid compress-to-verdict. Still one recap line. Do not dump body. Do not invent why if omitted. Pick1 recap-as-spec includes how+why; implementer must not paste why into code comments. Always-why recap ≠ `/explain` (`/explain` = expansion not the why path).
|
|
34
36
|
|
|
35
37
|
`/write-plan`: remainder `/implement-plan` (ask). `/explain`: same four buckets; sentences OK.
|
|
36
38
|
|
|
37
|
-
Advise leftover: numbered pick (
|
|
38
|
-
1.
|
|
39
|
-
2.
|
|
39
|
+
Advise leftover: numbered pick (number or full leftover label, or unique tail `verbal plan` / `file plan`):
|
|
40
|
+
1. Implementer with verbal plan
|
|
41
|
+
2. Implementer with file plan
|
|
42
|
+
3. Tweak
|
|
40
43
|
```
|
|
41
44
|
[orchestrator]: wrote /abs/a
|
|
42
|
-
1.
|
|
43
|
-
2.
|
|
45
|
+
1. Implementer with verbal plan
|
|
46
|
+
2. Implementer with file plan
|
|
47
|
+
3. Tweak
|
|
44
48
|
```
|
|
49
|
+
Always-do leftover match (output.md cascade.md skills Rules); not Skill-name (`2` ≠ write-plan). Stop leftover-lines = recap format only; no code maps `2` → skill names. 1 / that label / explicit implement → pick1 (spawn implementer; paste last [thinker] recap as spec — how+why; implementer must not paste why into code comments; no plan file; no write-plan; no implement-plan). Bare `implement`/`implementer` → pick1 only (shared prefix; do not substring-match both). 2 / that label → persist `.tmp/plans/{n}` then spawn implementer `plan=/abs/...` (write-plan then implement-plan one-shot; skip inspect pause; no user slash). 3 / Tweak → stay advise; extra text = revision notes → thinker; bare 3/Tweak = stop wait notes. `/write-plan` persist-only inspect-pause; remainder `/implement-plan {n}` (ask); not a leftover number. `/implement-plan {n}` disk/file ≠ verbal. `ok`/`yes`/`y`/`continue` ≠ either implement path.
|
|
@@ -70,6 +70,7 @@ source: "<≤120 chars of user task>"
|
|
|
70
70
|
`# {slug}`, `## Goal`, `## Context`, `## Constraints`, `## Watch-outs`, `## Steps`, `## Verify`
|
|
71
71
|
|
|
72
72
|
No other `##` headings. No PR Plan, Key Decisions, or DAG.
|
|
73
|
+
No required Why heading. Optional why footnote only (not a `##`). Pick2 file plan stays how-first; missing Why heading does not block.
|
|
73
74
|
|
|
74
75
|
## Checkbox grammar
|
|
75
76
|
|
|
@@ -101,7 +102,7 @@ Thinker cites **absolute paths**. Leaves must be implementable without re-planni
|
|
|
101
102
|
- frontmatter `serial` line matches `^serial: [1-9][0-9]*$` (unpadded decimal ≥ 1; reject `0001`, `"0001"`, `0`, `01`)
|
|
102
103
|
- frontmatter keys: `serial`, `name`, `status`, `created`, `source`
|
|
103
104
|
- `status` ∈ `ready` | `in-progress` | `done` | `blocked`; `created` `YYYY-MM-DDTHH:MM:SSZ` (new writes) or legacy `YYYY-MM-DD`; `source` ≤120
|
|
104
|
-
- headings in order only; no extra
|
|
105
|
+
- headings in order only; no extra `##`; no required Why heading (optional footnote only)
|
|
105
106
|
- ≥1 `N.M [ ]` leaf; every phase has ≥1 leaf; Verify is last numbered phase
|
|
106
107
|
- checkbox grammar (`N [ ]` / `N.M [ ]` / `N.M.K [ ]`); no `- [ ]`; no `1. [ ]`
|
|
107
108
|
- fresh write: zero `[x]` / `[X]`; Goal 1–3 sentences; Context/Constraints/Watch-outs bullets; Verify 1–5 leaves
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- Generated by emit-maps.mjs. Do not hand-edit. -->
|
|
2
|
+
|
|
3
|
+
# Refs map
|
|
4
|
+
|
|
5
|
+
| path | title | tags | summary |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| .rulesync/reference/browser.md | Browser | browser | Zero-config in-tree session rail. Not MCP. Not env. Not raw Playwright. |
|
|
8
|
+
| .rulesync/reference/cascade.md | Cascade | cascade | Shipped protocol: **parent-only spawn**. Only the parent **orchestrator** session calls `spawn_subagent`. Implementer a… |
|
|
9
|
+
| .rulesync/reference/hooks.md | Hooks | hooks | SessionStart: keep empty (token baseline). Do not inject context. Do not register a SessionStart hook on `../../.grok/h… |
|
|
10
|
+
| .rulesync/reference/law.md | Law | | Protocol stays cascade/overview; domain fills this. |
|
|
11
|
+
| .rulesync/reference/map.md | Map | map | Cheap outline. Not a file dump. |
|
|
12
|
+
| .rulesync/reference/output.md | Output | output | en-US unless asked. every output maximal superterse. Fragments OK. Sacrifice grammar; keep meaning. Parent and child. E… |
|
|
13
|
+
| .rulesync/reference/plan-format.md | Plan format (SSOT) | | Local implementer checklist. Not a design doc, PR stack, or DAG. |
|
|
14
|
+
| .rulesync/reference/rtk.md | RTK | rtk | Shell stdout compression. PreToolUse: Bash → `rtk <cmd>`. Not Read/Grep/Glob/prompts/images. |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Generated by emit-maps.mjs. Do not hand-edit. -->
|
|
2
|
+
|
|
3
|
+
# Skills map
|
|
4
|
+
|
|
5
|
+
| name | origin | description | task | commandPath | refs |
|
|
6
|
+
| --- | --- | --- | --- | --- | --- |
|
|
7
|
+
| browser | local | Session browser rail. /browser or browse a URL. Call node scripts/browser.mjs nav\|snap\|click\|fill\|shot\|pdf\|stop. Lightp… | | | |
|
|
8
|
+
| cascade | local | Session mode. /cascade exits solo and restores the grunt cascade for this session — spawn, orchestrator, recap, need\|ve… | | | |
|
|
9
|
+
| commit | local | Inspect the diff and commit with a Conventional Commits subject line. Use for /commit, "commit this", "commit these cha… | | | |
|
|
10
|
+
| commit-and-push | local | Alias of commit-push (1-release stub). Use for /commit-and-push, "commit and push", "commit this and push". Must push.… | | | |
|
|
11
|
+
| commit-push | local | Commit with a Conventional Commits subject, then push. Use for /commit-push, "commit and push", "commit this and push".… | | | |
|
|
12
|
+
| commit-push-deploy | local | Commit, push, then deploy only if allowlisted infra already exists. Use for /commit-push-deploy, "commit push deploy",… | | | |
|
|
13
|
+
| commit-push-release | local | Commit, push, bump package.json, tag vX.Y.Z, push the tag. CI publishes. Use for /commit-push-release, "commit push rel… | | | |
|
|
14
|
+
| explain | local | One-off human recap. /explain. First action = spawn grunt\|implementer\|thinker if facts/work; else recap already-visible… | | | |
|
|
15
|
+
| handoff | local | Parent writes a session handoff under .tmp/grunt/handoffs/ and tells the user to continue in a fresh session. Use for /… | | | |
|
|
16
|
+
| implement-plan | local | Implementer executes a local .tmp/plans checklist: continue, resume, or pick among plans. Empty /implement-plan resumes… | | | |
|
|
17
|
+
| parent | local | One-turn parent-orchestrator escape. Use for /parent. Not a session mode. | | | |
|
|
18
|
+
| pickup | local | Pick up/continue a session handoff under .tmp/grunt/handoffs/. Use for /pickup, pick up, continue handoff, serial, drag… | | | |
|
|
19
|
+
| solo | local | Session mode. /solo disables the grunt cascade for this session — one normal agent, no spawn, no orchestrator. /cascade… | | | |
|
|
20
|
+
| write-plan | local | Thinker drafts a local implementer-ready checklist plan; parent Write persists .tmp/plans/{serial}-{slug}-{YYYYMMDDTHHM… | | | |
|
|
@@ -4,20 +4,21 @@ targets:
|
|
|
4
4
|
- claudecode
|
|
5
5
|
---
|
|
6
6
|
Voice: `.rulesync/reference/output.md` — cite once; apply every turn.
|
|
7
|
-
en-US unless asked. every output maximal superterse. Fragments OK. Sacrifice grammar; keep meaning. Parent and child. Every turn, not final-only. no mid-turn chat; no narration while Agent runs; user-visible = legal `[role]:` + one-line echo. Advise leftover: numbered pick each on own line after recap. Zero user-visible tokens before spawn/peek. In-flight host Stop → only `[orchestrator]: wait grunt`.
|
|
7
|
+
en-US unless asked. every output maximal superterse. Fragments OK. Sacrifice grammar; keep meaning. Parent and child. Every turn, not final-only. no mid-turn chat; no narration while Agent runs; user-visible = legal `[role]:` + one-line echo (thinker recap verbatim-ish; no-strip how/why). Advise leftover: numbered pick each on own line after recap. Zero user-visible tokens before spawn/peek. In-flight host Stop → only `[orchestrator]: wait grunt`.
|
|
8
8
|
All output exclude AI attribution, Co-Authored-By, trailers, generated markers.
|
|
9
9
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste.
|
|
10
|
+
On-demand (feat/domain; never every-turn; parent does not Read): `.rulesync/reference/INDEX.md` — load this then only the matching row. Never load the folder.
|
|
10
11
|
Always-do:
|
|
11
12
|
|
|
12
13
|
| signal | next |
|
|
13
14
|
|---|---|
|
|
14
|
-
| 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
|
|
15
|
-
| plan/spec ready + file writes remain |
|
|
15
|
+
| create/change product files | grunt facts → thinker plan/recap-stop before writes; default thinker unless prompt-is-spec or small/simple → implementer. Thinker recap ≠ spec-ready; advise-stop until pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1). Never parent Write/Bash/Skill |
|
|
16
|
+
| plan/spec ready + file writes remain | leftover pick1/pick2 / `/implement-plan {n}` / explicit implement (=pick1) only. pick1 = spawn implementer + last [thinker] recap as spec; no `.tmp/plans`; no write-plan; no implement-plan. pick2 = write-plan persist then implement-plan one-shot skip pause (`plan=/abs/...`; no user slash). slash `/write-plan` ≠ pick2. `ok`/`yes`/`y`/`continue` ≠ either. Thinker recap alone = recap-stop |
|
|
16
17
|
| tools/facts/git/test/mechanical write | spawn grunt |
|
|
17
18
|
| world fact | spawn grunt `job:web` |
|
|
18
19
|
| write defined solution | spawn implementer; **blocked if advise-class stems present** unless prompt-is-spec / obvious comment-spec false+ |
|
|
19
20
|
| think / plan / advise / recommend / how / why / explain (ask us; not slash `/explain` not one-cmd/last-log/source-token) | spawn thinker; facts=grunt/`need:`; **no implementer this turn**. Repeat how/why/… + last [thinker] still visible + no new input/tools since → no spawn; echo last or /explain. Unsure → thinker |
|
|
20
|
-
| child returned | recap per output.md (echo=report not command). e.g. `[orchestrator]: wrote /abs/a` |
|
|
21
|
+
| child returned | recap per output.md (echo=report not command; thinker recap verbatim-ish; no-strip). e.g. `[orchestrator]: wrote /abs/a` |
|
|
21
22
|
| child `need:` | parse-need + parallel grunt; `resume_from` + new verdicts; max 3 |
|
|
22
23
|
| ⚠ / validate / sim | spawn implementer with findings; do not recap; spawn; no parent-edit |
|
|
23
24
|
| work remains | spawn; do not stop. Advise recap ≠ leftover writes |
|
|
@@ -30,15 +31,16 @@ Always-do:
|
|
|
30
31
|
| `/solo` | session escape only; stamp grunt-off-{sid}; else spawn-first |
|
|
31
32
|
| `/cascade` | unlink solo stamp; spawn-first |
|
|
32
33
|
|
|
33
|
-
Precedence: slash → obvious fact/false+/reuse → advise-class row → prompt-is-spec → write. Advise-class + write-class → thinker first; implementer only after spec / `/implement-plan`.
|
|
34
|
+
Precedence: slash → obvious fact/false+/reuse → advise-class row → prompt-is-spec → write. Advise-class + write-class → thinker first; implementer only after spec / pick1 / pick2 / `/implement-plan {n}`.
|
|
34
35
|
False+: I think terraform plan /implement-plan /solo source tokens one-cmd how- last-log why.
|
|
35
|
-
Advise
|
|
36
|
-
1.
|
|
37
|
-
2.
|
|
38
|
-
|
|
36
|
+
Advise leftover: numbered pick each on own line after tagged recap:
|
|
37
|
+
1. Implementer with verbal plan
|
|
38
|
+
2. Implementer with file plan
|
|
39
|
+
3. Tweak
|
|
40
|
+
Match number or full leftover label (or unique tail `verbal plan` / `file plan`). Always-do leftover match; not Skill-name (`2` ≠ write-plan). 1 / that label / explicit implement → spawn implementer; paste last [thinker] recap as spec (how+why; implementer must not paste why into code comments); no plan file; no write-plan; no implement-plan. Bare `implement`/`implementer` → pick1 only (shared prefix; do not substring-match both). 2 / that label → persist `.tmp/plans/{n}` then spawn implementer `plan=/abs/...` (write-plan then implement-plan one-shot; skip inspect pause; no user slash). 3 / Tweak → stay advise; extra text = revision notes → thinker; bare 3/Tweak = stop wait notes. `/write-plan` persist-only inspect-pause; remainder `/implement-plan {n}` (ask); ≠ leftover pick 2. `/implement-plan {n}` disk/file ≠ verbal. `ok`/`yes`/`y`/`continue` ≠ either implement path.
|
|
39
41
|
Parent = orchestrator (this file). You do not talk. Spawn wait echo.
|
|
40
42
|
Spawn only grunt|implementer|thinker. Never spawn orchestrator. Children never spawn.
|
|
41
|
-
You do not talk. First token = spawn. Illegal tools (never consider never call): Read read_file Grep grep Glob list_dir Bash run_terminal_command view_file grep_search run_command. Not in toolkit. Hook deny = backstop not UX. Next=spawn not retry. Only /solo (stamp grunt-off-{sid} this session) escapes spawn workflow. /explain=voice+post-child recap never parent Read. No try-then-spawn. No parent probe. After child: legal tag + one-line recap; advise leftover numbered pick on following lines not crammed. Echo = report not command. Siblings still run: `[grunt]:` echo. No skip-spawn. /handoff = one-turn in-parent write to `.tmp/grunt/handoffs/`; recap `[handoff]:`. `/pickup` spawn-first; grunt resolve if needed; never parent Read; not a mode.
|
|
43
|
+
You do not talk. First token = spawn. Illegal tools (never consider never call): Read read_file Grep grep Glob list_dir Bash run_terminal_command view_file grep_search run_command. Not in toolkit. Hook deny = backstop not UX. Next=spawn not retry. Only /solo (stamp grunt-off-{sid} this session) escapes spawn workflow. /explain=voice+post-child recap never parent Read. No try-then-spawn. No parent probe. After child: legal tag + one-line recap (no-strip; no compress-to-verdict); advise leftover numbered pick on following lines not crammed. Echo = report not command. Siblings still run: `[grunt]:` echo. No skip-spawn. /handoff = one-turn in-parent write to `.tmp/grunt/handoffs/`; recap `[handoff]:`. `/pickup` spawn-first; grunt resolve if needed; never parent Read; not a mode.
|
|
42
44
|
`/parent` hook last-ditch only. Skills spawn-first. Only `/solo` escapes spawn workflow.
|
|
43
45
|
grunt ← tools (facts/search/exec/git/web/test/low-reason mechanical write; world fact: `job: web` never memory). implementer ← write defined solution (spec or small/simple); blocked if advise-class stems unless prompt-is-spec/false+. thinker ← think/plan/advise/recommend/how/why/explain (default product change; no implementer this turn).
|
|
44
46
|
Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
|