@lovrozagar/grunt 0.4.1 → 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/hooks/orchestrate-parent.js +3 -100
- 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/hooks.md +4 -4
- package/.rulesync/reference/law.md +9 -0
- package/.rulesync/reference/map.md +12 -8
- 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 +13 -11
- package/.rulesync/rules/overview.md +13 -11
- 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 +13 -11
- package/CHANGELOG.md +210 -0
- package/CLAUDE.md +13 -11
- package/README.md +37 -16
- package/cli/init.mjs +21 -4
- package/cli/init.test.ts +97 -26
- package/package.json +6 -6
- package/scripts/doctor.mjs +64 -2
- package/scripts/emit-maps.mjs +422 -0
- package/scripts/grunt-job.mjs +0 -9
- package/scripts/guarded-roots.mjs +4 -7
- package/scripts/pipeline.mjs +67 -0
- package/scripts/skill-conflicts.mjs +71 -0
- package/scripts/telemetry.mjs +0 -38
package/AGENTS.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
<!-- grunt:begin -->
|
|
2
2
|
Voice: `.rulesync/reference/output.md` — cite once; apply every turn.
|
|
3
|
-
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`.
|
|
3
|
+
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`.
|
|
4
4
|
All output exclude AI attribution, Co-Authored-By, trailers, generated markers.
|
|
5
5
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste.
|
|
6
|
+
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.
|
|
6
7
|
Always-do:
|
|
7
8
|
|
|
8
9
|
| signal | next |
|
|
9
10
|
|---|---|
|
|
10
|
-
| 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
|
|
11
|
-
| plan/spec ready + file writes remain |
|
|
11
|
+
| 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 |
|
|
12
|
+
| 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 |
|
|
12
13
|
| tools/facts/git/test/mechanical write | spawn grunt |
|
|
13
14
|
| world fact | spawn grunt `job:web` |
|
|
14
15
|
| write defined solution | spawn implementer; **blocked if advise-class stems present** unless prompt-is-spec / obvious comment-spec false+ |
|
|
15
16
|
| 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 |
|
|
16
|
-
| child returned | recap per output.md (echo=report not command). e.g. `[orchestrator]: wrote /abs/a` |
|
|
17
|
+
| child returned | recap per output.md (echo=report not command; thinker recap verbatim-ish; no-strip). e.g. `[orchestrator]: wrote /abs/a` |
|
|
17
18
|
| child `need:` | parse-need + parallel grunt; `resume_from` + new verdicts; max 3 |
|
|
18
19
|
| ⚠ / validate / sim | spawn implementer with findings; do not recap; spawn; no parent-edit |
|
|
19
20
|
| work remains | spawn; do not stop. Advise recap ≠ leftover writes |
|
|
@@ -26,15 +27,16 @@ Always-do:
|
|
|
26
27
|
| `/solo` | session escape only; stamp grunt-off-{sid}; else spawn-first |
|
|
27
28
|
| `/cascade` | unlink solo stamp; spawn-first |
|
|
28
29
|
|
|
29
|
-
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`.
|
|
30
|
+
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}`.
|
|
30
31
|
False+: I think terraform plan /implement-plan /solo source tokens one-cmd how- last-log why.
|
|
31
|
-
Advise
|
|
32
|
-
1.
|
|
33
|
-
2.
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
Advise leftover: numbered pick each on own line after tagged recap:
|
|
33
|
+
1. Implementer with verbal plan
|
|
34
|
+
2. Implementer with file plan
|
|
35
|
+
3. Tweak
|
|
36
|
+
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.
|
|
37
|
+
Parent = orchestrator (this file). You do not talk. Spawn wait echo.
|
|
36
38
|
Spawn only grunt|implementer|thinker. Never spawn orchestrator. Children never spawn.
|
|
37
|
-
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.
|
|
39
|
+
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.
|
|
38
40
|
`/parent` hook last-ditch only. Skills spawn-first. Only `/solo` escapes spawn workflow.
|
|
39
41
|
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).
|
|
40
42
|
Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.5.0] - 2026-09-01
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Advise leftover picks after thinker recap: (1) Implementer with verbal plan (2) Implementer with file plan (3) Tweak — pick1 = implementer + last thinker recap as spec; pick2 = write-plan persist then implement-plan one-shot (`plan=/abs/...`); `/write-plan` ≠ pick2; `/implement-plan {n}` disk/file ≠ verbal
|
|
13
|
+
- Thinker recap shape `{decided}. {how-capsule}. {why-clause}`
|
|
14
|
+
- rulesync SSOT skills `write-plan` + `implement-plan` (host mirrors under `.agents` / `.claude` / `.grok` as applicable)
|
|
15
|
+
- `.rulesync/reference/` maps/index: `INDEX.md` `law.md` `plan-format.md` `refs-map.md` `skills-map.md`
|
|
16
|
+
- `scripts/pipeline.mjs` `emit-maps.mjs` `skill-conflicts.mjs` (+ tests/fixtures); doctor `REQUIRED_MAP_FILES` + skill-conflicts warn; `cli/init.mjs` `PRODUCT_SCRIPTS` for those scripts + skill conflict warn
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Public `rulesync:generate|check|watch` via guarded-roots → pipeline (drop consumer-facing `:raw` scripts)
|
|
21
|
+
- `package.json` `files` publishes `emit-maps` `pipeline` `skill-conflicts`
|
|
22
|
+
- README: advise picks; `.rulesync` SoT / host mirrors; maps on generate
|
|
23
|
+
- `plan-format` moved to `.rulesync/reference/plan-format.md` (was `.grok/skills/shared/plan-format.md`)
|
|
24
|
+
- `commit-and-push` thin alias; explain skill updates as in tree
|
|
25
|
+
|
|
26
|
+
### Removed
|
|
27
|
+
|
|
28
|
+
- Tracked `.grok/skills/shared/plan-format.md`
|
|
29
|
+
- npm scripts `rulesync:generate:raw` / `rulesync:watch:raw` / `rulesync:check:raw`
|
|
30
|
+
|
|
31
|
+
## [0.4.2] - 2026-08-31
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- Keep a Changelog history in `CHANGELOG.md` (this file); publish it via `package.json` `files`
|
|
36
|
+
- `scripts/guarded-roots.test.ts` for generate/check/watch snapshot-remerge
|
|
37
|
+
- README host-support GAP table (Grok/Claude/Codex/Antigravity/Gemini spawn-peek-kill; no invented peek/kill APIs)
|
|
38
|
+
- scrub-text tests for remaining mid-intent phrases and blank/ws/fence helpers
|
|
39
|
+
- init tests: sentinel auto-skip without a telemetry file; `.grok/hooks/orchestrate-parent.js` means inited, not auto-skip
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- Parent SoT: `Parent = orchestrator (this file)` in `AGENTS.md` / `CLAUDE.md` / rulesync rules
|
|
44
|
+
- `.rulesync/reference/hooks.md` and `map.md`: repo-relative hook/script paths; drop `scripts/telemetry.mjs` from the map
|
|
45
|
+
- README package version `0.4.2`; re-init sentinels no longer mention telemetry; Grok-only `write-plan` `implement-plan` `shared` noted as hand files (not rulesync SSOT); published `files` list documents `guarded-roots.mjs` + `CHANGELOG.md` and drops telemetry
|
|
46
|
+
- `cli/init.mjs`: drop `telemetry.mjs` from `PRODUCT_SCRIPTS`; `shouldAutoSkipGlobals` no longer treats `scripts/telemetry.mjs` as a sentinel
|
|
47
|
+
- `scripts/grunt-job.mjs` and `.grok/hooks/orchestrate-parent.js`: strip `logTelemetry`; `ORCHESTRATOR_LOGS_DIR` inlined on the hook
|
|
48
|
+
- Tests drop NDJSON telemetry assertions (`cli/init.test.ts`, `scripts/orchestrate-parent.test.ts`, `scripts/gate-fat-tools.test.ts`)
|
|
49
|
+
|
|
50
|
+
### Removed
|
|
51
|
+
|
|
52
|
+
- Product telemetry: `scripts/telemetry.mjs` (append-only `.tmp/orchestrator-logs/telemetry.ndjson` from hooks / grunt-job; fail-open)
|
|
53
|
+
- Telemetry as a re-init / globals auto-skip sentinel
|
|
54
|
+
- `scripts/telemetry.mjs` from the published `files` list (`scripts/telemetry.test.ts` already absent)
|
|
55
|
+
|
|
56
|
+
## [0.4.1] - 2026-08-31
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- Init snapshot/remerge of guarded roots `AGENTS.md` `CLAUDE.md` `GEMINI.md` around generate/check/watch
|
|
61
|
+
- Orchestrator advise-first Implement picks; `ok` / `yes` / `continue` ≠ implement after conversational advise
|
|
62
|
+
|
|
63
|
+
## [0.4.0] - 2026-08-31
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
|
|
67
|
+
- Lightpanda-first session browser rail `nav|snap|click|fill|shot|pdf|stop` plus unified doctor
|
|
68
|
+
- Browser skill shipped to host trees
|
|
69
|
+
- `/pickup` spawn-first handoff counterpart (not a mode)
|
|
70
|
+
|
|
71
|
+
## [0.3.11] - 2026-08-28
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
|
|
75
|
+
- Prompt-is-spec implementer write allowlist (gate)
|
|
76
|
+
|
|
77
|
+
## [0.3.10] - 2026-08-28
|
|
78
|
+
|
|
79
|
+
### Added
|
|
80
|
+
|
|
81
|
+
- `commit-push` release and deploy skills
|
|
82
|
+
|
|
83
|
+
### Changed
|
|
84
|
+
|
|
85
|
+
- README rewritten as a full product guide
|
|
86
|
+
|
|
87
|
+
### Removed
|
|
88
|
+
|
|
89
|
+
- Architecture Excalidraw diagram
|
|
90
|
+
|
|
91
|
+
## [0.3.9] - 2026-08-28
|
|
92
|
+
|
|
93
|
+
### Changed
|
|
94
|
+
|
|
95
|
+
- Clack CLI prompts
|
|
96
|
+
|
|
97
|
+
### Fixed
|
|
98
|
+
|
|
99
|
+
- Orchestrator spawn-first deny Read; clarify `DENY_REASON`
|
|
100
|
+
|
|
101
|
+
## [0.3.8] - 2026-08-27
|
|
102
|
+
|
|
103
|
+
### Added
|
|
104
|
+
|
|
105
|
+
- `/cascade` exit-solo skill
|
|
106
|
+
|
|
107
|
+
## [0.3.7] - 2026-08-27
|
|
108
|
+
|
|
109
|
+
### Fixed
|
|
110
|
+
|
|
111
|
+
- Consumer hook permissions deny without `Write(platform)`
|
|
112
|
+
|
|
113
|
+
## [0.3.6] - 2026-08-27
|
|
114
|
+
|
|
115
|
+
### Fixed
|
|
116
|
+
|
|
117
|
+
- Deny parent Write; voice Stop
|
|
118
|
+
|
|
119
|
+
## [0.3.5] - 2026-08-27
|
|
120
|
+
|
|
121
|
+
### Fixed
|
|
122
|
+
|
|
123
|
+
- Hook `package.json` `"type": "module"` so Stop ESM loads
|
|
124
|
+
- Positive-only Stop; thinker offload
|
|
125
|
+
|
|
126
|
+
## [0.3.4] - 2026-08-27
|
|
127
|
+
|
|
128
|
+
### Fixed
|
|
129
|
+
|
|
130
|
+
- Recap tags; stop-block reset
|
|
131
|
+
|
|
132
|
+
## [0.3.3] - 2026-08-27
|
|
133
|
+
|
|
134
|
+
### Added
|
|
135
|
+
|
|
136
|
+
- Stop walls with always-do XOR map
|
|
137
|
+
|
|
138
|
+
## [0.3.2] - 2026-08-27
|
|
139
|
+
|
|
140
|
+
### Added
|
|
141
|
+
|
|
142
|
+
- `--skip-globals` and smarter init merge
|
|
143
|
+
|
|
144
|
+
## [0.3.1] - 2026-08-27
|
|
145
|
+
|
|
146
|
+
### Added
|
|
147
|
+
|
|
148
|
+
- CI publish `@lovrozagar/grunt` to GitHub Packages
|
|
149
|
+
|
|
150
|
+
### Fixed
|
|
151
|
+
|
|
152
|
+
- Stop recap, spawn cap, scratch rewrite
|
|
153
|
+
|
|
154
|
+
## [0.3.0] - 2026-08-27
|
|
155
|
+
|
|
156
|
+
### Added
|
|
157
|
+
|
|
158
|
+
- Skills: `handoff`, `solo`, `commit`, `commit-and-push`, `explain`, `parent` (rulesync + host trees)
|
|
159
|
+
- Larger init pipeline: `emit-gemini`, `emit-agent-shell-tools`, `emit-mcp-policy`, `hooks-union`, `persist-handoff`
|
|
160
|
+
- Gemini CLI agent shells + settings emit
|
|
161
|
+
- Orchestrate-parent expansion; host `hooks.json`
|
|
162
|
+
|
|
163
|
+
### Changed
|
|
164
|
+
|
|
165
|
+
- Cascade/map/rules sync; package `0.3.0`
|
|
166
|
+
|
|
167
|
+
## [0.2.0] - 2026-08-27
|
|
168
|
+
|
|
169
|
+
### Added
|
|
170
|
+
|
|
171
|
+
- Agents context
|
|
172
|
+
|
|
173
|
+
### Changed
|
|
174
|
+
|
|
175
|
+
- Slim agent prompts; max permissions
|
|
176
|
+
|
|
177
|
+
## [0.1.0] - 2026-08-26
|
|
178
|
+
|
|
179
|
+
First published tag. No `v0.0.x`.
|
|
180
|
+
|
|
181
|
+
### Added
|
|
182
|
+
|
|
183
|
+
- `@lovrozagar/grunt` npm package: deep-merge rulesync trees, product scripts, and generate pipeline into a consumer repo (`npx @lovrozagar/grunt` / `init`)
|
|
184
|
+
- Host emit matrix: Grok, Claude Code, Codex, Antigravity; Gemini CLI tracked as a generate gap
|
|
185
|
+
- Agents: orchestrator (parent) plus grunt / implementer / thinker
|
|
186
|
+
- Product scripts including `grunt-job`, persist-plan, emit-mcp-policy, gate-fat-tools, scrub-spawn-prompt, scrub-text, check-globals, sync-global-settings, purge-global-mcps, and `scripts/telemetry.mjs` NDJSON (present from the first commit)
|
|
187
|
+
- Skills: `explain`, `parent`, `terse`; Grok-only `write-plan` / `implement-plan`
|
|
188
|
+
- GitHub Actions CI and npm `0.1.0` release
|
|
189
|
+
|
|
190
|
+
### Fixed
|
|
191
|
+
|
|
192
|
+
- Terse and spawn rules
|
|
193
|
+
|
|
194
|
+
[0.4.2]: https://github.com/lovrozagar/grunt/compare/v0.4.1...v0.4.2
|
|
195
|
+
[0.4.1]: https://github.com/lovrozagar/grunt/compare/v0.4.0...v0.4.1
|
|
196
|
+
[0.4.0]: https://github.com/lovrozagar/grunt/compare/v0.3.11...v0.4.0
|
|
197
|
+
[0.3.11]: https://github.com/lovrozagar/grunt/compare/v0.3.10...v0.3.11
|
|
198
|
+
[0.3.10]: https://github.com/lovrozagar/grunt/compare/v0.3.9...v0.3.10
|
|
199
|
+
[0.3.9]: https://github.com/lovrozagar/grunt/compare/v0.3.8...v0.3.9
|
|
200
|
+
[0.3.8]: https://github.com/lovrozagar/grunt/compare/v0.3.7...v0.3.8
|
|
201
|
+
[0.3.7]: https://github.com/lovrozagar/grunt/compare/v0.3.6...v0.3.7
|
|
202
|
+
[0.3.6]: https://github.com/lovrozagar/grunt/compare/v0.3.5...v0.3.6
|
|
203
|
+
[0.3.5]: https://github.com/lovrozagar/grunt/compare/v0.3.4...v0.3.5
|
|
204
|
+
[0.3.4]: https://github.com/lovrozagar/grunt/compare/v0.3.3...v0.3.4
|
|
205
|
+
[0.3.3]: https://github.com/lovrozagar/grunt/compare/v0.3.2...v0.3.3
|
|
206
|
+
[0.3.2]: https://github.com/lovrozagar/grunt/compare/v0.3.1...v0.3.2
|
|
207
|
+
[0.3.1]: https://github.com/lovrozagar/grunt/compare/v0.3.0...v0.3.1
|
|
208
|
+
[0.3.0]: https://github.com/lovrozagar/grunt/compare/v0.2.0...v0.3.0
|
|
209
|
+
[0.2.0]: https://github.com/lovrozagar/grunt/compare/v0.1.0...v0.2.0
|
|
210
|
+
[0.1.0]: https://github.com/lovrozagar/grunt/releases/tag/v0.1.0
|
package/CLAUDE.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
<!-- grunt:begin -->
|
|
2
2
|
Voice: `.rulesync/reference/output.md` — cite once; apply every turn.
|
|
3
|
-
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`.
|
|
3
|
+
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`.
|
|
4
4
|
All output exclude AI attribution, Co-Authored-By, trailers, generated markers.
|
|
5
5
|
Protocol: `.rulesync/reference/cascade.md`. Do not paste.
|
|
6
|
+
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.
|
|
6
7
|
Always-do:
|
|
7
8
|
|
|
8
9
|
| signal | next |
|
|
9
10
|
|---|---|
|
|
10
|
-
| 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
|
|
11
|
-
| plan/spec ready + file writes remain |
|
|
11
|
+
| 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 |
|
|
12
|
+
| 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 |
|
|
12
13
|
| tools/facts/git/test/mechanical write | spawn grunt |
|
|
13
14
|
| world fact | spawn grunt `job:web` |
|
|
14
15
|
| write defined solution | spawn implementer; **blocked if advise-class stems present** unless prompt-is-spec / obvious comment-spec false+ |
|
|
15
16
|
| 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 |
|
|
16
|
-
| child returned | recap per output.md (echo=report not command). e.g. `[orchestrator]: wrote /abs/a` |
|
|
17
|
+
| child returned | recap per output.md (echo=report not command; thinker recap verbatim-ish; no-strip). e.g. `[orchestrator]: wrote /abs/a` |
|
|
17
18
|
| child `need:` | parse-need + parallel grunt; `resume_from` + new verdicts; max 3 |
|
|
18
19
|
| ⚠ / validate / sim | spawn implementer with findings; do not recap; spawn; no parent-edit |
|
|
19
20
|
| work remains | spawn; do not stop. Advise recap ≠ leftover writes |
|
|
@@ -26,15 +27,16 @@ Always-do:
|
|
|
26
27
|
| `/solo` | session escape only; stamp grunt-off-{sid}; else spawn-first |
|
|
27
28
|
| `/cascade` | unlink solo stamp; spawn-first |
|
|
28
29
|
|
|
29
|
-
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`.
|
|
30
|
+
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}`.
|
|
30
31
|
False+: I think terraform plan /implement-plan /solo source tokens one-cmd how- last-log why.
|
|
31
|
-
Advise
|
|
32
|
-
1.
|
|
33
|
-
2.
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
Advise leftover: numbered pick each on own line after tagged recap:
|
|
33
|
+
1. Implementer with verbal plan
|
|
34
|
+
2. Implementer with file plan
|
|
35
|
+
3. Tweak
|
|
36
|
+
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.
|
|
37
|
+
Parent = orchestrator (this file). You do not talk. Spawn wait echo.
|
|
36
38
|
Spawn only grunt|implementer|thinker. Never spawn orchestrator. Children never spawn.
|
|
37
|
-
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.
|
|
39
|
+
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.
|
|
38
40
|
`/parent` hook last-ditch only. Skills spawn-first. Only `/solo` escapes spawn workflow.
|
|
39
41
|
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).
|
|
40
42
|
Child prompt first sentence only: `You are {agent} subagent.` Then task + abs paths + verdicts only.
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ npx @lovrozagar/grunt
|
|
|
32
32
|
|
|
33
33
|
- Same as `npx @lovrozagar/grunt init` when no command
|
|
34
34
|
- Do not `npm test` as a consumer
|
|
35
|
-
- Package: `@lovrozagar/grunt` `0.
|
|
35
|
+
- Package: `@lovrozagar/grunt` `0.4.2` MIT · https://github.com/lovrozagar/grunt
|
|
36
36
|
|
|
37
37
|
## Prerequisites
|
|
38
38
|
|
|
@@ -87,8 +87,8 @@ Rulesync schema doctor is separate: `npm run rulesync:doctor`.
|
|
|
87
87
|
|
|
88
88
|
- Merge SoT `npm install` `rulesync:generate` `sync:globals:apply` `rulesync:check`
|
|
89
89
|
- `--skip-globals` skips apply
|
|
90
|
-
- Re-init auto-skips globals when `<!-- grunt:begin -->` in `AGENTS.md`/`CLAUDE.md`
|
|
91
|
-
- First init (no sentinel
|
|
90
|
+
- Re-init auto-skips globals when `<!-- grunt:begin -->` in `AGENTS.md`/`CLAUDE.md`
|
|
91
|
+
- First init (no sentinel) applies globals unless flagged
|
|
92
92
|
- Owned trees/scripts refresh; extra `.rulesync` files kept; patches to grunt-owned files lost
|
|
93
93
|
|
|
94
94
|
## Version bump
|
|
@@ -105,7 +105,7 @@ SoT: `.rulesync/subagents/{orchestrator grunt implementer thinker}.md`
|
|
|
105
105
|
|
|
106
106
|
Emit: `.claude/` `.grok/` `.agents/` `.gemini/`
|
|
107
107
|
|
|
108
|
-
- **orchestrator** (parent) — always spawn+prompt; user-facing `[orchestrator]:` (or child role tag) one-line recap; advise leftover numbered pick each on own line after that recap (do not cram `1.
|
|
108
|
+
- **orchestrator** (parent) — always spawn+prompt; user-facing `[orchestrator]:` (or child role tag) one-line recap; advise leftover numbered pick each on own line after that recap (do not cram `1. Implementer with verbal plan 2. Implementer with file plan 3. Tweak` onto the recap line). `/parent` one-turn; `/handoff` writes `.tmp/grunt/handoffs/{serial}-{slug}-{stamp}.md`; `/pickup` spawn-first pickup (inverse of `/handoff`; not a mode). `/solo` session escape; `/cascade` restores it. Small/low router. First token spawn. No parent Read/Bash/Grep. Does not implement, plan, or fetch world facts
|
|
109
109
|
- **grunt** — tools: facts/search/exec/git/web/test/low-reason mechanical write. Isolation `verdict:`. Never feature solution. Never spawn. World fact: `job: web`
|
|
110
110
|
- **implementer** — write already-defined solution on allowlisted paths. TDD when spec/plan says tests. Validate + sim after write. Fat dumps via `need:`. Never spawn. Never plan. Id is **implementer** (not Implementor)
|
|
111
111
|
- **thinker** — think/plan/advise/recommend/how/why/explain; unsure→thinker; cheap false+; edge cases. Read-only named-file Read of prompt SSOT; trees/search/exec/web/test → `need:`. Never spawn. No bash. Never implement
|
|
@@ -120,13 +120,18 @@ Lightpanda-first session CLI: `node scripts/browser.mjs nav|snap|click|fill|shot
|
|
|
120
120
|
|
|
121
121
|
## Skills
|
|
122
122
|
|
|
123
|
-
Present under `.claude` / `.rulesync` / `.agents
|
|
123
|
+
Present under `.claude` / `.rulesync` / `.agents` / `.grok` (`rulesync -f skills` mirrors SSOT):
|
|
124
124
|
|
|
125
|
-
- `browser` `cascade` `commit` `commit-and-push` `commit-push` `commit-push-deploy` `commit-push-release` `explain` `handoff` `pickup` `parent` `solo`
|
|
126
|
-
|
|
125
|
+
- `browser` `cascade` `commit` `commit-and-push` (1-release alias → `commit-push`) `commit-push` `commit-push-deploy` `commit-push-release` `explain` `handoff` `pickup` `parent` `solo` `write-plan` `implement-plan`
|
|
126
|
+
|
|
127
|
+
Reserved names: do not reuse those stems for consumer custom skills. Same name → one SSOT under `.rulesync/skills/<name>/`; re-init force-refresh overwrites grunt-owned names; extras kept; maps `origin` badge ≠ content picker. See `.rulesync/reference/law.md` (flows into INDEX).
|
|
128
|
+
|
|
129
|
+
`/write-plan` and `/implement-plan` SSOT: `.rulesync/skills/{write-plan,implement-plan}/`; format SSOT `.rulesync/reference/plan-format.md`. `/write-plan` plan-only inspect-pause → `next: /implement-plan {n}`; empty `/implement-plan` resumes unique in-progress or starts unique ready, else lists (need serial); leftover pick **2. Implementer with file plan** = persist then implement one-shot skip pause; leftover pick **1. Implementer with verbal plan** / explicit implement = verbal spec no plan file; slash `/implement-plan {n}` disk/file ≠ verbal; not `ok`/`yes`/`go`
|
|
127
130
|
|
|
128
131
|
## Generate
|
|
129
132
|
|
|
133
|
+
SoT: `.rulesync/skills` + `.rulesync/reference`. Generate maps anything placed there. `.agents` / `.claude` (and other host trees) are mirrors, not SoT; no mirror scan.
|
|
134
|
+
|
|
130
135
|
Pipeline (no `-t geminicli`):
|
|
131
136
|
|
|
132
137
|
1. `rulesync generate` — emit grok / claude / codex / antigravity
|
|
@@ -141,7 +146,7 @@ Emit writes other-CLI trees from `.rulesync` for the **next** process of that CL
|
|
|
141
146
|
## Config
|
|
142
147
|
|
|
143
148
|
- SoT merge into consumer repo; existing configs kept where not grunt-owned
|
|
144
|
-
- Globals: first init apply; re-init auto-skip (sentinel
|
|
149
|
+
- Globals: first init apply; re-init auto-skip (sentinel) or `--skip-globals`
|
|
145
150
|
- `sync-globals` / `purge-mcps`: dry-run default; `--apply` writes
|
|
146
151
|
- Hosts: grok claude codex gemini antigravity
|
|
147
152
|
|
|
@@ -155,6 +160,18 @@ Draw **one** CLI host bubble. That bubble is **this** session’s CLI: Grok Buil
|
|
|
155
160
|
|
|
156
161
|
User-visible conversation attaches only to the parent. Children never talk to the user. Children never spawn.
|
|
157
162
|
|
|
163
|
+
### Host support (GAP)
|
|
164
|
+
|
|
165
|
+
Not feature-parity across hosts. In-tree mapping only; do not invent peek/kill APIs. GAP rows: no fake peeks, no auto-kill; block on spawn return and classify `done`.
|
|
166
|
+
|
|
167
|
+
| Host | Spawn | Peek | Kill |
|
|
168
|
+
| --- | --- | --- | --- |
|
|
169
|
+
| Grok | `spawn_subagent` `background:true` → `task_id` | `get_command_or_subagent_output` + `timeout_ms=60000` | `kill_command_or_subagent` (user-ask only) |
|
|
170
|
+
| Claude Code | `Agent` if the parent session exposes it | GAP unless an in-tree schema names a status/output tool on that id (do not invent `TaskOutput`); else block on Agent return and classify `done`. Agent launch ≠ child done; in-flight host Stop → only `[orchestrator]: wait grunt`; no SendMessage | GAP unless in-tree; no auto-kill |
|
|
171
|
+
| Codex | host agent/call | GAP; block on host agent/call return; classify `done` | GAP; no auto-kill |
|
|
172
|
+
| Antigravity | main-session parent | GAP peek/kill; main-session parent | GAP; no auto-kill |
|
|
173
|
+
| Gemini | not emitted; tracked gap | GAP; no fake peeks | GAP; no auto-kill |
|
|
174
|
+
|
|
158
175
|
### Nested diagram
|
|
159
176
|
|
|
160
177
|
Same topology as the session recap; every legal edge labeled.
|
|
@@ -162,7 +179,7 @@ Same topology as the session recap; every legal edge labeled.
|
|
|
162
179
|
```
|
|
163
180
|
USER
|
|
164
181
|
│
|
|
165
|
-
│ session in/out (parent only; tagged one-line recap; advise leftover 1./2. own lines)
|
|
182
|
+
│ session in/out (parent only; tagged one-line recap; advise leftover 1./2./3. own lines)
|
|
166
183
|
│ TUI local; completion tokens from Model API (mixed)
|
|
167
184
|
▼
|
|
168
185
|
┌──────────────────────── CLI HOST (this process) ────────────────────────┐
|
|
@@ -308,6 +325,8 @@ Use these labels. Do not revive “prompt input” or “agent to use”.
|
|
|
308
325
|
|
|
309
326
|
Repo-relative (repository root):
|
|
310
327
|
|
|
328
|
+
- `.rulesync/reference/INDEX.md` — aggregate catalog composed from slices (law.md, skills-map.md, refs-map.md). Maps/law = slices for deep dive. Always. Not if-maps-else
|
|
329
|
+
- `.rulesync/reference/law.md` — domain law stub (protocol stays cascade/overview)
|
|
311
330
|
- `.rulesync/reference/cascade.md` — parent-only spawn, peek/kill table, `need:` / `resume_from`, isolation `verdict:`
|
|
312
331
|
- `.rulesync/reference/rtk.md` — Bash/shell stdout compression
|
|
313
332
|
- `.rulesync/reference/map.md` — cheap outline of protocol, scripts, generated trees
|
|
@@ -318,17 +337,19 @@ Repo-relative (repository root):
|
|
|
318
337
|
|
|
319
338
|
## Layout
|
|
320
339
|
|
|
321
|
-
Published (`package.json` `files`): `bin/grunt.js` `cli` `scripts/check-globals.mjs` `scripts/emit-agent-shell-tools.mjs` `scripts/emit-gemini.mjs` `scripts/emit-mcp-policy.mjs` `scripts/gate-fat-tools.mjs` `scripts/hooks-union.mjs` `scripts/grunt-job.mjs` `scripts/parse-need.mjs` `scripts/persist-handoff.mjs` `scripts/persist-plan.mjs` `scripts/purge-global-mcps.mjs` `scripts/scrub-spawn-prompt.mjs` `scripts/scrub-text-lib.mjs` `scripts/sync-global-settings.mjs` `scripts/
|
|
340
|
+
Published (`package.json` `files`): `bin/grunt.js` `cli` `scripts/check-globals.mjs` `scripts/emit-agent-shell-tools.mjs` `scripts/emit-gemini.mjs` `scripts/guarded-roots.mjs` `scripts/emit-mcp-policy.mjs` `scripts/gate-fat-tools.mjs` `scripts/hooks-union.mjs` `scripts/pipeline.mjs` `scripts/grunt-job.mjs` `scripts/parse-need.mjs` `scripts/persist-handoff.mjs` `scripts/persist-plan.mjs` `scripts/purge-global-mcps.mjs` `scripts/scrub-spawn-prompt.mjs` `scripts/scrub-text-lib.mjs` `scripts/sync-global-settings.mjs` `scripts/browser.mjs` `scripts/doctor.mjs` `scripts/scrub-text` `.rulesync` `.grok` `.codex` `.claude` `.agents` `AGENTS.md` `CLAUDE.md` `.mcp.json` `README.md` `LICENSE` `CHANGELOG.md`
|
|
341
|
+
|
|
342
|
+
No `scripts/*.test.ts` `scripts/fixtures/` `docs/` `coverage/` `vitest.config.ts` in `files`. `cli` dir ships whole (includes `cli/*.test.ts`).
|
|
322
343
|
|
|
323
|
-
|
|
344
|
+
Not packed: `GEMINI.md` `.gemini/` — `emit-gemini.mjs` writes them on `generate` / `init` (`GEMINI.md` → `@AGENTS.md`). Not in `files`.
|
|
324
345
|
|
|
325
|
-
Repo root (also): `coverage/` `.gemini/` — no `src/` no `CONTRIBUTING` no `docs/`
|
|
346
|
+
Repo root (also): `coverage/` `.gemini/` `GEMINI.md` — no `src/` no `CONTRIBUTING` no `docs/`
|
|
326
347
|
|
|
327
348
|
- `bin/grunt.js` — CLI bin
|
|
328
349
|
- `cli/grunt.mjs` — commands
|
|
329
|
-
- `scripts/` —
|
|
330
|
-
- `.rulesync/` — SoT (subagents skills reference)
|
|
331
|
-
- `.claude/` `.grok/` `.codex/` `.agents/` `.gemini/` — host emit
|
|
350
|
+
- `scripts/` — init copies product scripts (`grunt-job.mjs` `scrub-text` …). Re-init sentinels: `.grok/hooks/orchestrate-parent.js` `.rulesync` `<!-- grunt:begin -->`
|
|
351
|
+
- `.rulesync/` — SoT (subagents skills reference). Skills + reference maps on generate; host trees are mirrors
|
|
352
|
+
- `.claude/` `.grok/` `.codex/` `.agents/` `.gemini/` — host emit; not SoT; no mirror scan
|
|
332
353
|
- `coverage/` — vitest local not published
|
|
333
354
|
|
|
334
355
|
## Develop
|
|
@@ -349,7 +370,7 @@ npm i && npm test
|
|
|
349
370
|
|
|
350
371
|
Keep these four flows only:
|
|
351
372
|
|
|
352
|
-
1. “Create me a react weather app” → thinker plan/recap-stop + pick 1.
|
|
373
|
+
1. “Create me a react weather app” → thinker plan/recap-stop + pick 1.Implementer with verbal plan 2.Implementer with file plan 3.Tweak → user picks 1 (verbal spec) or 2 (file plan one-shot) or `/implement-plan {n}` → implementer write → recap
|
|
353
374
|
2. “What is 2+2” → grunt → `[grunt]:` echo
|
|
354
375
|
3. Marvel theatrical next → grunt `job:web` → recap
|
|
355
376
|
4. `.logs` 3/6/2021 tag `framework bug` → grunt local search → recap
|
package/cli/init.mjs
CHANGED
|
@@ -2,6 +2,11 @@ import { execFileSync } from "node:child_process"
|
|
|
2
2
|
import fs from "node:fs"
|
|
3
3
|
import path from "node:path"
|
|
4
4
|
import { fileURLToPath } from "node:url"
|
|
5
|
+
import {
|
|
6
|
+
WORKSPACE_SKILLS_REL,
|
|
7
|
+
findSkillContentConflicts,
|
|
8
|
+
formatSkillConflictWarn,
|
|
9
|
+
} from "../scripts/skill-conflicts.mjs"
|
|
5
10
|
|
|
6
11
|
const PKG_ROOT = path.join(path.dirname(fileURLToPath(import.meta.url)), "..")
|
|
7
12
|
|
|
@@ -9,10 +14,12 @@ const PRODUCT_SCRIPTS = [
|
|
|
9
14
|
"check-globals.mjs",
|
|
10
15
|
"emit-agent-shell-tools.mjs",
|
|
11
16
|
"emit-gemini.mjs",
|
|
17
|
+
"emit-maps.mjs",
|
|
12
18
|
"guarded-roots.mjs",
|
|
13
19
|
"emit-mcp-policy.mjs",
|
|
14
20
|
"gate-fat-tools.mjs",
|
|
15
21
|
"hooks-union.mjs",
|
|
22
|
+
"pipeline.mjs",
|
|
16
23
|
"grunt-job.mjs",
|
|
17
24
|
"parse-need.mjs",
|
|
18
25
|
"persist-handoff.mjs",
|
|
@@ -21,9 +28,9 @@ const PRODUCT_SCRIPTS = [
|
|
|
21
28
|
"scrub-spawn-prompt.mjs",
|
|
22
29
|
"scrub-text-lib.mjs",
|
|
23
30
|
"sync-global-settings.mjs",
|
|
24
|
-
"telemetry.mjs",
|
|
25
31
|
"browser.mjs",
|
|
26
32
|
"doctor.mjs",
|
|
33
|
+
"skill-conflicts.mjs",
|
|
27
34
|
"scrub-text",
|
|
28
35
|
]
|
|
29
36
|
|
|
@@ -74,14 +81,13 @@ function destHasGruntSentinel(dest) {
|
|
|
74
81
|
|
|
75
82
|
export function destAlreadyInited(dest) {
|
|
76
83
|
return (
|
|
77
|
-
fs.existsSync(path.join(dest, "scripts", "telemetry.mjs")) ||
|
|
78
84
|
fs.existsSync(path.join(dest, ".grok", "hooks", "orchestrate-parent.js")) ||
|
|
79
85
|
fs.existsSync(path.join(dest, ".rulesync"))
|
|
80
86
|
)
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
export function shouldAutoSkipGlobals(dest) {
|
|
84
|
-
return destHasGruntSentinel(dest)
|
|
90
|
+
return destHasGruntSentinel(dest)
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
function detectNewline(text) {
|
|
@@ -379,7 +385,7 @@ export function mergePackageJson(dest, pkgRoot) {
|
|
|
379
385
|
const srcPkg = JSON.parse(fs.readFileSync(path.join(pkgRoot, "package.json"), "utf8"))
|
|
380
386
|
destPkg.scripts = { ...(destPkg.scripts || {}) }
|
|
381
387
|
for (const [k, v] of Object.entries(srcPkg.scripts || {})) {
|
|
382
|
-
if (k === "test") continue
|
|
388
|
+
if (k === "test" || k.endsWith(":raw")) continue
|
|
383
389
|
destPkg.scripts[k] = mergeScriptValue(k, v, destPkg.scripts[k])
|
|
384
390
|
}
|
|
385
391
|
destPkg.devDependencies = { ...(destPkg.devDependencies || {}) }
|
|
@@ -408,6 +414,17 @@ export function init(dest, { pkgRoot: pkgRootOpt, execFileSync: exec = execFileS
|
|
|
408
414
|
const self = samePath(dest, pkgRoot)
|
|
409
415
|
|
|
410
416
|
phase("merge", () => {
|
|
417
|
+
const wsSkills = path.join(dest, WORKSPACE_SKILLS_REL)
|
|
418
|
+
const pkgSkills = path.join(pkgRoot, WORKSPACE_SKILLS_REL)
|
|
419
|
+
if (!samePath(wsSkills, pkgSkills)) {
|
|
420
|
+
for (const c of findSkillContentConflicts({
|
|
421
|
+
workspaceSkillsDir: wsSkills,
|
|
422
|
+
packagedSkillsDir: pkgSkills,
|
|
423
|
+
})) {
|
|
424
|
+
console.warn(formatSkillConflictWarn(c.name))
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
411
428
|
for (const dir of COPY_DIRS) {
|
|
412
429
|
const src = path.join(pkgRoot, dir)
|
|
413
430
|
const d = path.join(dest, dir)
|