@produck/agent-toolkit 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +74 -43
  2. package/bin/agent-toolkit.mjs +26 -33
  3. package/bin/build-publish-assets.mjs +28 -0
  4. package/bin/command/enforce-node-baseline/help.txt +12 -10
  5. package/bin/command/enforce-node-baseline/index.mjs +23 -15
  6. package/bin/command/main/help.txt +6 -5
  7. package/bin/command/preflight/help.txt +1 -1
  8. package/bin/command/preflight/index.mjs +1 -1
  9. package/bin/command/{sync-coverage-script → sync-coverage}/help.txt +2 -1
  10. package/bin/command/{sync-coverage-script → sync-coverage}/index.mjs +116 -19
  11. package/bin/command/sync-editorconfig/index.mjs +10 -153
  12. package/bin/command/{sync-prettier-config → sync-format}/help.txt +2 -2
  13. package/bin/command/{sync-prettier-config → sync-format}/index.mjs +63 -9
  14. package/bin/command/{sync-workspace-config → sync-git}/help.txt +10 -6
  15. package/bin/command/sync-git/index.mjs +424 -0
  16. package/bin/command/sync-install/help.txt +14 -0
  17. package/bin/command/sync-install/index.mjs +106 -0
  18. package/bin/command/{sync-eslint-config → sync-lint}/help.txt +2 -2
  19. package/bin/command/{sync-eslint-config → sync-lint}/index.mjs +3 -4
  20. package/bin/command/sync-publish/help.txt +18 -0
  21. package/bin/command/sync-publish/index.mjs +157 -0
  22. package/bin/command/validate-commit-msg/index.mjs +30 -2
  23. package/package.json +3 -5
  24. package/publish-assets/gitattributes +5 -0
  25. package/publish-assets/gitignore +137 -0
  26. package/publish-assets/instructions/produck/10-produck-node.instructions.md +53 -40
  27. package/publish-assets/instructions/produck/15-produck-workspace.instructions.md +13 -16
  28. package/publish-assets/instructions/produck/20-produck-commit.instructions.md +2 -2
  29. package/publish-assets/instructions/produck/tooling-version-baseline.json +8 -1
  30. package/bin/command/sync-husky-hooks/help.txt +0 -14
  31. package/bin/command/sync-husky-hooks/index.mjs +0 -89
  32. package/bin/command/sync-workspace-config/index.mjs +0 -290
package/README.md CHANGED
@@ -22,13 +22,12 @@ What it does (in order):
22
22
  3. Syncs root `produck:format` script and initializes `.prettierrc`
23
23
  4. Syncs root `produck:lint` script, initializes/patches `eslint.config.mjs`,
24
24
  and ensures `@produck/eslint-rules`
25
- 5. Syncs root shared governance (`produck:baseline`,
26
- `produck:coverage`, `produck:precommit-check`), initializes `.c8rc.json`,
27
- and syncs shared pinned devDependencies
28
- (`c8`, `husky`, `lerna`, `@produck/agent-toolkit`)
29
- 6. Deploys the pinned `produck:coverage` script and `c8` devDependency to each workspace package, and enforces `scripts.test` (generates a default `test` script when missing).
25
+ 5. Syncs root shared governance (`produck:baseline`, `produck:coverage`, `produck:commit:check`) and syncs shared pinned devDependencies (`husky`, `lerna`, `@produck/agent-toolkit`)
26
+ 6. Deploys root `.c8rc.json` and root `c8` devDependency
30
27
  **Note:** The `produck:coverage` script in subpackages is for local and AI development use only. It is NOT enforced by organization CI or `.c8rc.json`. Only the root workspace (monorepo root) is subject to org-level coverage enforcement and `.c8rc.json`.
31
- 7. Deploys `.husky/pre-commit` and `.husky/commit-msg`
28
+ 7. Deploys root `.gitattributes`
29
+ 8. Deploys the pinned `produck:coverage` script and `c8` devDependency to each workspace package, and enforces `scripts.test` (generates a default `test` script when missing).
30
+ 9. Deploys `.husky/pre-commit` and `.husky/commit-msg`
32
31
 
33
32
  After running, add the persistent enforcement entry to the repository
34
33
  `package.json`:
@@ -49,11 +48,12 @@ npm run produck:baseline
49
48
  - agent-toolkit preflight
50
49
  - agent-toolkit run-capture
51
50
  - agent-toolkit summarize-log
52
- - agent-toolkit sync-coverage-script
53
- - agent-toolkit sync-prettier-config
54
- - agent-toolkit sync-eslint-config
55
- - agent-toolkit sync-workspace-config
56
- - agent-toolkit sync-husky-hooks
51
+ - agent-toolkit sync-coverage
52
+ - agent-toolkit sync-git
53
+ - agent-toolkit sync-format
54
+ - agent-toolkit sync-install
55
+ - agent-toolkit sync-lint
56
+ - agent-toolkit sync-publish
57
57
  - agent-toolkit validate-commit-msg
58
58
  - agent-toolkit sync-instructions
59
59
 
@@ -71,25 +71,30 @@ Equivalent explicit form:
71
71
  npm exec -- agent-toolkit enforce-node-baseline --cwd .
72
72
  ```
73
73
 
74
- `enforce-node-baseline` runs seven steps in fixed order and stops at the first
74
+ `enforce-node-baseline` runs nine steps in fixed order and stops at the first
75
75
  failure:
76
76
 
77
- 1. `sync-instructions` — distribute organization AI instruction files into
77
+ 1. `preflight` — verify required files and directories exist
78
+ 2. `sync-instructions` — distribute organization AI instruction files into
78
79
  `.github/instructions/produck/`
79
- 2. `preflight` — verify required files and directories exist
80
- 3. `sync-prettier-config` — deploy organization format gate script
80
+ 3. `sync-editorconfig` — deploy organization `.editorconfig`
81
+ 4. `sync-format` — deploy organization format gate script
81
82
  (`produck:format`) and initialize `.prettierrc`
82
- 4. `sync-eslint-config` — deploy organization lint gate script
83
+ 5. `sync-lint` — deploy organization lint gate script
83
84
  (`produck:lint`), initialize/patch `eslint.config.mjs`, and ensure
84
85
  `@produck/eslint-rules` integration
85
- 5. `sync-workspace-config` — deploy shared root governance scripts
86
- (`produck:baseline`, `produck:coverage`, `produck:precommit-check`),
87
- initialize root `.c8rc.json`, and sync shared pinned root devDependencies
88
- (`c8`, `husky`, `lerna`, `@produck/agent-toolkit`)
89
- 6. `sync-coverage-script` — deploy pinned `produck:coverage` script and `c8`
90
- devDependency into each workspace package, and ensure each workspace
86
+ 6. `sync-install` — deploy root `scripts.produck:install`
87
+ (`npm -v && npm install`) and remove legacy `scripts.deps:install`
88
+ 7. `sync-git` deploy root `.gitattributes`, sync
89
+ `.husky/pre-commit`/`.husky/commit-msg`, and enforce shared root scripts
90
+ (`produck:baseline`, `produck:commit:check`) plus shared pinned root
91
+ devDependencies (`husky`, `lerna`, `@produck/agent-toolkit`)
92
+ 8. `sync-coverage` — deploy root `scripts.produck:coverage`, `.c8rc.json`, and
93
+ root `c8` devDependency, then deploy pinned `produck:coverage` script and
94
+ `c8` devDependency into each workspace package, and ensure each workspace
91
95
  package has `scripts.test` (auto-generate a default value when missing)
92
- 7. `sync-husky-hooks` — deploy `.husky/pre-commit` and `.husky/commit-msg`
96
+ 9. `sync-publish` — create default `lerna.json` when missing and deploy root
97
+ `scripts.produck:publish:check` plus `scripts.produck:publish`
93
98
 
94
99
  Add to downstream repository root `package.json` for one-command enforcement:
95
100
 
@@ -142,7 +147,7 @@ npm exec -- agent-toolkit summarize-log --file logs/test.log --match "FAIL|ERROR
142
147
  Deploy organization coverage script and pinned local c8 devDependency to workspace packages:
143
148
 
144
149
  ```
145
- npm exec -- agent-toolkit sync-coverage-script --cwd .
150
+ npm exec -- agent-toolkit sync-coverage --cwd .
146
151
  ```
147
152
 
148
153
  This command also enforces `scripts.test` in each workspace package.
@@ -157,15 +162,17 @@ node -e "console.log('No tests configured')"
157
162
  Deploy organization format config and script baseline to repository root:
158
163
 
159
164
  ```
160
- npm exec -- agent-toolkit sync-prettier-config --cwd .
165
+ npm exec -- agent-toolkit sync-format --cwd .
161
166
  ```
162
167
 
163
168
  This command manages `scripts.produck:format` and `.prettierrc` only.
169
+ The managed `produck:format` script always writes formatting fixes via
170
+ Prettier, so a separate root `format` script is not required.
164
171
 
165
172
  Deploy organization lint config and script baseline to repository root:
166
173
 
167
174
  ```
168
- npm exec -- agent-toolkit sync-eslint-config --cwd .
175
+ npm exec -- agent-toolkit sync-lint --cwd .
169
176
  ```
170
177
 
171
178
  This command manages `scripts.produck:lint`, `eslint.config.mjs`, and
@@ -173,25 +180,50 @@ This command manages `scripts.produck:lint`, `eslint.config.mjs`, and
173
180
  `@produck/eslint-rules`, it appends Produck integration to the exported config
174
181
  array.
175
182
 
176
- Deploy organization root shared scripts and shared pinned dependencies to
177
- repository root:
183
+ Deploy root and workspace coverage config plus root `c8` devDependency:
178
184
 
179
185
  ```
180
- npm exec -- agent-toolkit sync-workspace-config --cwd .
186
+ npm exec -- agent-toolkit sync-coverage --cwd .
181
187
  ```
182
188
 
183
- This command manages `scripts.produck:baseline`,
184
- `scripts.produck:coverage`, `scripts.produck:precommit-check`, initializes
185
- `.c8rc.json`, and pins `c8`, `husky`, `lerna`, and `@produck/agent-toolkit`
186
- in root `devDependencies`.
189
+ This command manages root `scripts.produck:coverage`, root `.c8rc.json`, pins
190
+ root `devDependencies.c8`, and updates workspace package `produck:coverage`,
191
+ `test`, and `devDependencies.c8`. The generated `.c8rc.json` uses `src/**` and
192
+ `extension/**` as the default include scope, excludes common build and
193
+ dependency directories, and enables `check-coverage` with 99.5 thresholds for
194
+ branches, functions, lines, and statements.
187
195
 
188
- Deploy organization local anti-drift husky hooks to repository root:
196
+ Deploy root git attributes baseline:
189
197
 
190
198
  ```
191
- npm exec -- agent-toolkit sync-husky-hooks --cwd .
199
+ npm exec -- agent-toolkit sync-git --cwd .
192
200
  ```
193
201
 
194
- This command syncs only `.husky/pre-commit` and `.husky/commit-msg`.
202
+ This command manages root `.gitattributes`, `.husky/pre-commit`,
203
+ `.husky/commit-msg`, `scripts.produck:baseline`,
204
+ `scripts.produck:commit:check`, and shared pinned root devDependencies
205
+ `husky`, `lerna`, and `@produck/agent-toolkit`.
206
+
207
+ Deploy root install script baseline:
208
+
209
+ ```
210
+ npm exec -- agent-toolkit sync-install --cwd .
211
+ ```
212
+
213
+ This command manages `scripts.produck:install` with value
214
+ `npm -v && npm install` and removes legacy `scripts.deps:install`.
215
+
216
+ Deploy root publish script baseline:
217
+
218
+ ```
219
+ npm exec -- agent-toolkit sync-publish --cwd .
220
+ ```
221
+
222
+ This command manages `scripts.produck:publish:check` and
223
+ `scripts.produck:publish`. If `lerna.json` is absent, sync mode creates a
224
+ default file before writing the scripts. When `scripts.publish` already
225
+ exists, `scripts.produck:publish` delegates to it after the shared checks;
226
+ otherwise it falls back to `lerna publish`.
195
227
 
196
228
  Validate commit message format:
197
229
 
@@ -246,8 +278,8 @@ Use repository style gates first, then run package checks when needed.
246
278
  From repository root:
247
279
 
248
280
  ```bash
249
- npm run format:check
250
- npm run lint
281
+ npm run produck:format
282
+ npm run produck:lint
251
283
  npm --workspace @produck/agent-toolkit run test
252
284
  npm --workspace @produck/agent-toolkit run pack:check
253
285
  # optional health check
@@ -262,8 +294,7 @@ package-level release scripts.
262
294
  From monorepo root (`produck/.github`):
263
295
 
264
296
  ```bash
265
- npm run format:check
266
- npm run test
297
+ npm run produck:publish:check
267
298
  npm run publish:dry-run
268
299
  npm run publish
269
300
  ```
@@ -289,9 +320,9 @@ Workflow behavior:
289
320
  Release policy:
290
321
 
291
322
  - Central package is installed locally in downstream repositories at a fixed
292
- version managed by `agent-toolkit sync-husky-hooks`.
293
- - Run format:check and test first, then workspace `publish:dry-run` before
294
- `publish`.
323
+ version managed by `agent-toolkit sync-git`.
324
+ - Run `produck:publish:check` first.
325
+ - Then run workspace `publish:dry-run` before `publish`.
295
326
  - Keep rollback option by republishing previous stable version if needed.
296
327
 
297
328
  Rollback quick steps:
@@ -7,31 +7,20 @@ import {
7
7
  import { printPreflightHelp, runPreflight } from './command/preflight/index.mjs';
8
8
  import { printRunCaptureHelp, runCapture } from './command/run-capture/index.mjs';
9
9
  import { printSummarizeHelp, runSummarize } from './command/summarize-log/index.mjs';
10
- import {
11
- printSyncCoverageScriptHelp,
12
- runSyncCoverageScript,
13
- } from './command/sync-coverage-script/index.mjs';
14
- import { printSyncHuskyHooksHelp, runSyncHuskyHooks } from './command/sync-husky-hooks/index.mjs';
10
+ import { printSyncCoverageHelp, runSyncCoverage } from './command/sync-coverage/index.mjs';
11
+ import { printSyncInstallHelp, runSyncInstall } from './command/sync-install/index.mjs';
15
12
  import {
16
13
  printSyncInstructionsHelp,
17
14
  runSyncInstructions,
18
15
  } from './command/sync-instructions/index.mjs';
19
- import {
20
- printSyncPrettierConfigHelp,
21
- runSyncPrettierConfig,
22
- } from './command/sync-prettier-config/index.mjs';
16
+ import { printSyncFormatHelp, runSyncFormat } from './command/sync-format/index.mjs';
23
17
  import {
24
18
  printSyncEditorconfigHelp,
25
19
  runSyncEditorconfig,
26
20
  } from './command/sync-editorconfig/index.mjs';
27
- import {
28
- printSyncEslintConfigHelp,
29
- runSyncEslintConfig,
30
- } from './command/sync-eslint-config/index.mjs';
31
- import {
32
- printSyncWorkspaceConfigHelp,
33
- runSyncWorkspaceConfig,
34
- } from './command/sync-workspace-config/index.mjs';
21
+ import { printSyncLintHelp, runSyncLint } from './command/sync-lint/index.mjs';
22
+ import { printSyncGitHelp, runSyncGit } from './command/sync-git/index.mjs';
23
+ import { printSyncPublishHelp, runSyncPublish } from './command/sync-publish/index.mjs';
35
24
  import { hasFlag, parseCommonArgs } from './command/shared/args.mjs';
36
25
  import {
37
26
  printValidateCommitMsgHelp,
@@ -55,25 +44,21 @@ const COMMANDS = {
55
44
  printHelp: printSummarizeHelp,
56
45
  run: runSummarize,
57
46
  },
58
- 'sync-coverage-script': {
59
- printHelp: printSyncCoverageScriptHelp,
60
- run: runSyncCoverageScript,
47
+ 'sync-coverage': {
48
+ printHelp: printSyncCoverageHelp,
49
+ run: runSyncCoverage,
61
50
  },
62
- 'sync-prettier-config': {
63
- printHelp: printSyncPrettierConfigHelp,
64
- run: runSyncPrettierConfig,
51
+ 'sync-install': {
52
+ printHelp: printSyncInstallHelp,
53
+ run: runSyncInstall,
65
54
  },
66
- 'sync-eslint-config': {
67
- printHelp: printSyncEslintConfigHelp,
68
- run: runSyncEslintConfig,
55
+ 'sync-format': {
56
+ printHelp: printSyncFormatHelp,
57
+ run: runSyncFormat,
69
58
  },
70
- 'sync-workspace-config': {
71
- printHelp: printSyncWorkspaceConfigHelp,
72
- run: runSyncWorkspaceConfig,
73
- },
74
- 'sync-husky-hooks': {
75
- printHelp: printSyncHuskyHooksHelp,
76
- run: runSyncHuskyHooks,
59
+ 'sync-lint': {
60
+ printHelp: printSyncLintHelp,
61
+ run: runSyncLint,
77
62
  },
78
63
  'validate-commit-msg': {
79
64
  printHelp: printValidateCommitMsgHelp,
@@ -87,6 +72,14 @@ const COMMANDS = {
87
72
  printHelp: printSyncEditorconfigHelp,
88
73
  run: runSyncEditorconfig,
89
74
  },
75
+ 'sync-git': {
76
+ printHelp: printSyncGitHelp,
77
+ run: runSyncGit,
78
+ },
79
+ 'sync-publish': {
80
+ printHelp: printSyncPublishHelp,
81
+ run: runSyncPublish,
82
+ },
90
83
  };
91
84
 
92
85
  const DEFAULT_COMMAND = 'enforce-node-baseline';
@@ -10,6 +10,10 @@ const SOURCE_DIR = path.resolve(REPO_ROOT, '.github/distribution/produck');
10
10
  const OUTPUT_DIR = path.resolve(PACKAGE_ROOT, 'publish-assets/instructions/produck');
11
11
  const SOURCE_TOOLING_BASELINE_PATH = path.resolve(SOURCE_DIR, 'tooling-version-baseline.json');
12
12
  const OUTPUT_TOOLING_BASELINE_PATH = path.resolve(OUTPUT_DIR, 'tooling-version-baseline.json');
13
+ const SOURCE_GITATTRIBUTES_PATH = path.resolve(REPO_ROOT, '.gitattributes');
14
+ const SOURCE_GITIGNORE_PATH = path.resolve(REPO_ROOT, '.gitignore');
15
+ const OUTPUT_GITATTRIBUTES_PATH = path.resolve(PACKAGE_ROOT, 'publish-assets/gitattributes');
16
+ const OUTPUT_GITIGNORE_PATH = path.resolve(PACKAGE_ROOT, 'publish-assets/gitignore');
13
17
  const LEGACY_OUTPUT_PATH = path.resolve(
14
18
  PACKAGE_ROOT,
15
19
  'publish-assets/instructions/org.instructions.md',
@@ -127,6 +131,7 @@ function cleanStaleManagedFiles(expectedNames) {
127
131
 
128
132
  function run() {
129
133
  fs.mkdirSync(OUTPUT_DIR, { recursive: true });
134
+ fs.mkdirSync(path.dirname(OUTPUT_GITATTRIBUTES_PATH), { recursive: true });
130
135
 
131
136
  const sourceEntries = readSourceEntries();
132
137
  const expectedNames = new Set(sourceEntries.map((entry) => entry.fileName));
@@ -143,6 +148,29 @@ function run() {
143
148
  `Generated ${OUTPUT_TOOLING_BASELINE_PATH} from ${SOURCE_TOOLING_BASELINE_PATH}\n`,
144
149
  );
145
150
 
151
+ if (!fs.existsSync(SOURCE_GITATTRIBUTES_PATH)) {
152
+ throw new Error(`Missing source .gitattributes: ${SOURCE_GITATTRIBUTES_PATH}`);
153
+ }
154
+ if (!fs.existsSync(SOURCE_GITIGNORE_PATH)) {
155
+ throw new Error(`Missing source .gitignore: ${SOURCE_GITIGNORE_PATH}`);
156
+ }
157
+
158
+ fs.writeFileSync(
159
+ OUTPUT_GITATTRIBUTES_PATH,
160
+ normalize(fs.readFileSync(SOURCE_GITATTRIBUTES_PATH, 'utf8')),
161
+ 'utf8',
162
+ );
163
+ process.stdout.write(
164
+ `Generated ${OUTPUT_GITATTRIBUTES_PATH} from ${SOURCE_GITATTRIBUTES_PATH}\n`,
165
+ );
166
+
167
+ fs.writeFileSync(
168
+ OUTPUT_GITIGNORE_PATH,
169
+ normalize(fs.readFileSync(SOURCE_GITIGNORE_PATH, 'utf8')),
170
+ 'utf8',
171
+ );
172
+ process.stdout.write(`Generated ${OUTPUT_GITIGNORE_PATH} from ${SOURCE_GITIGNORE_PATH}\n`);
173
+
146
174
  cleanStaleManagedFiles(expectedNames);
147
175
 
148
176
  if (fs.existsSync(LEGACY_OUTPUT_PATH)) {
@@ -5,18 +5,20 @@ Usage:
5
5
 
6
6
  Behavior:
7
7
  - Runs mandatory baseline flow in fixed order:
8
- 1) sync-instructions
9
- 2) preflight
10
- 3) sync-prettier-config
11
- 4) sync-eslint-config
12
- 5) sync-workspace-config
13
- 6) sync-coverage-script
14
- 7) sync-husky-hooks
8
+ 1) preflight
9
+ 2) sync-instructions
10
+ 3) sync-editorconfig
11
+ 4) sync-format
12
+ 5) sync-lint
13
+ 6) sync-install
14
+ 7) sync-git
15
+ 8) sync-coverage
16
+ 9) sync-publish
15
17
  - Stops at first failed step and exits non-zero
16
18
  - Prints one combined JSON report for all executed steps
17
19
 
18
20
  Rules:
19
- - --check runs non-mutating validation mode for step 1, step 3, step 4, step 5, step 6, and step 7
20
- - --dry-run runs non-mutating preview mode for step 1, step 3, step 4, step 5, step 6, and step 7
21
+ - --check runs non-mutating validation mode for step 2, step 3, step 4, step 5, step 6, step 7, step 8, and step 9
22
+ - --dry-run runs non-mutating preview mode for step 2, step 3, step 4, step 5, step 6, step 7, step 8, and step 9
21
23
  - --check takes precedence over --dry-run
22
- - --workspace filters coverage sync targets in step 6
24
+ - --workspace filters coverage sync targets in step 8
@@ -103,7 +103,7 @@ export function runEnforceNodeBaseline(options) {
103
103
  preflightArgs.push('--check-workspace-package-json', 'package.json');
104
104
  }
105
105
 
106
- const syncCoverageArgs = ['sync-coverage-script', '--cwd', cwd];
106
+ const syncCoverageArgs = ['sync-coverage', '--cwd', cwd];
107
107
  for (const workspacePath of workspaces) {
108
108
  syncCoverageArgs.push('--workspace', workspacePath);
109
109
  }
@@ -113,18 +113,25 @@ export function runEnforceNodeBaseline(options) {
113
113
  syncCoverageArgs.push('--dry-run');
114
114
  }
115
115
 
116
- const syncHuskyArgs = ['sync-husky-hooks', '--cwd', cwd];
116
+ const syncPublishArgs = ['sync-publish', '--cwd', cwd];
117
117
  if (check) {
118
- syncHuskyArgs.push('--check');
118
+ syncPublishArgs.push('--check');
119
119
  } else if (dryRun) {
120
- syncHuskyArgs.push('--dry-run');
120
+ syncPublishArgs.push('--dry-run');
121
121
  }
122
122
 
123
- const syncWorkspaceConfigArgs = ['sync-workspace-config', '--cwd', cwd];
123
+ const syncInstallArgs = ['sync-install', '--cwd', cwd];
124
124
  if (check) {
125
- syncWorkspaceConfigArgs.push('--check');
125
+ syncInstallArgs.push('--check');
126
126
  } else if (dryRun) {
127
- syncWorkspaceConfigArgs.push('--dry-run');
127
+ syncInstallArgs.push('--dry-run');
128
+ }
129
+
130
+ const syncGitArgs = ['sync-git', '--cwd', cwd];
131
+ if (check) {
132
+ syncGitArgs.push('--check');
133
+ } else if (dryRun) {
134
+ syncGitArgs.push('--dry-run');
128
135
  }
129
136
 
130
137
  const syncEditorconfigArgs = ['sync-editorconfig', '--cwd', cwd];
@@ -134,14 +141,14 @@ export function runEnforceNodeBaseline(options) {
134
141
  syncEditorconfigArgs.push('--dry-run');
135
142
  }
136
143
 
137
- const syncPrettierConfigArgs = ['sync-prettier-config', '--cwd', cwd];
144
+ const syncPrettierConfigArgs = ['sync-format', '--cwd', cwd];
138
145
  if (check) {
139
146
  syncPrettierConfigArgs.push('--check');
140
147
  } else if (dryRun) {
141
148
  syncPrettierConfigArgs.push('--dry-run');
142
149
  }
143
150
 
144
- const syncEslintConfigArgs = ['sync-eslint-config', '--cwd', cwd];
151
+ const syncEslintConfigArgs = ['sync-lint', '--cwd', cwd];
145
152
  if (check) {
146
153
  syncEslintConfigArgs.push('--check');
147
154
  } else if (dryRun) {
@@ -149,14 +156,15 @@ export function runEnforceNodeBaseline(options) {
149
156
  }
150
157
 
151
158
  const plan = [
152
- { name: 'sync-instructions', args: syncInstructionsArgs },
153
159
  { name: 'preflight', args: preflightArgs },
160
+ { name: 'sync-instructions', args: syncInstructionsArgs },
154
161
  { name: 'sync-editorconfig', args: syncEditorconfigArgs },
155
- { name: 'sync-prettier-config', args: syncPrettierConfigArgs },
156
- { name: 'sync-eslint-config', args: syncEslintConfigArgs },
157
- { name: 'sync-workspace-config', args: syncWorkspaceConfigArgs },
158
- { name: 'sync-coverage-script', args: syncCoverageArgs },
159
- { name: 'sync-husky-hooks', args: syncHuskyArgs },
162
+ { name: 'sync-format', args: syncPrettierConfigArgs },
163
+ { name: 'sync-lint', args: syncEslintConfigArgs },
164
+ { name: 'sync-install', args: syncInstallArgs },
165
+ { name: 'sync-git', args: syncGitArgs },
166
+ { name: 'sync-coverage', args: syncCoverageArgs },
167
+ { name: 'sync-publish', args: syncPublishArgs },
160
168
  ];
161
169
 
162
170
  for (const step of plan) {
@@ -3,12 +3,13 @@ agent-toolkit commands:
3
3
  preflight
4
4
  run-capture
5
5
  summarize-log
6
- sync-coverage-script
6
+ sync-coverage
7
7
  sync-editorconfig
8
- sync-prettier-config
9
- sync-eslint-config
10
- sync-workspace-config
11
- sync-husky-hooks
8
+ sync-git
9
+ sync-format
10
+ sync-install
11
+ sync-lint
12
+ sync-publish
12
13
  validate-commit-msg
13
14
  sync-instructions
14
15
 
@@ -6,4 +6,4 @@ Usage:
6
6
  Rules for --check-workspace-package-json:
7
7
  - `private` must be true
8
8
  - `workspaces` must be a non-empty array of explicit paths (no glob tokens)
9
- - `scripts` must include deps:install, test, produck:coverage, lint
9
+ - `scripts` must include produck:install, test, produck:coverage, produck:lint
@@ -9,7 +9,7 @@ import { validateWorkspaceShape } from '../shared/workspace-validation.mjs';
9
9
  const COMMAND_DIR = path.dirname(fileURLToPath(import.meta.url));
10
10
  const HELP_FILE = path.resolve(COMMAND_DIR, 'help.txt');
11
11
  const REQUIRED_WORKSPACE_FIELDS = ['private', 'workspaces', 'scripts'];
12
- const REQUIRED_WORKSPACE_SCRIPTS = ['deps:install', 'test', 'produck:coverage', 'lint'];
12
+ const REQUIRED_WORKSPACE_SCRIPTS = ['produck:install', 'test', 'produck:coverage', 'produck:lint'];
13
13
 
14
14
  export function printPreflightHelp() {
15
15
  printTextResource(HELP_FILE);
@@ -1,8 +1,9 @@
1
1
  Usage:
2
- agent-toolkit sync-coverage-script [--cwd <dir>]
2
+ agent-toolkit sync-coverage [--cwd <dir>]
3
3
  [--workspace <path>] ... [--check] [--dry-run] [--json <file>]
4
4
 
5
5
  Behavior:
6
+ - Adds or updates root scripts.produck:coverage, root .c8rc.json, and root devDependencies.c8.
6
7
  - Adds or updates scripts.produck:coverage and devDependencies.c8 in each workspace package.json.
7
8
  - Enforces scripts.test in each workspace package.json.
8
9
  - If scripts.test is missing, generates: