@laitszkin/apollo-toolkit 3.11.6 → 3.11.8

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 (37) hide show
  1. package/AGENTS.md +1 -0
  2. package/CHANGELOG.md +30 -0
  3. package/README.md +1 -2
  4. package/analyse-app-logs/scripts/__pycache__/filter_logs_by_time.cpython-312.pyc +0 -0
  5. package/analyse-app-logs/scripts/__pycache__/log_cli_utils.cpython-312.pyc +0 -0
  6. package/analyse-app-logs/scripts/__pycache__/search_logs.cpython-312.pyc +0 -0
  7. package/docs-to-voice/SKILL.md +3 -30
  8. package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
  9. package/generate-spec/SKILL.md +51 -130
  10. package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
  11. package/init-project-html/SKILL.md +3 -25
  12. package/init-project-html/lib/atlas/cli.js +897 -43
  13. package/init-project-html/scripts/architecture.js +4 -25
  14. package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
  15. package/lib/cli.js +166 -20
  16. package/lib/tool-runner.js +418 -2
  17. package/open-github-issue/SKILL.md +7 -98
  18. package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
  19. package/optimise-skill/SKILL.md +36 -0
  20. package/optimise-skill/agents/openai.yaml +4 -0
  21. package/optimise-skill/references/definition.md +38 -0
  22. package/optimise-skill/references/example_skill.md +36 -0
  23. package/package.json +1 -1
  24. package/read-github-issue/SKILL.md +6 -46
  25. package/read-github-issue/scripts/__pycache__/find_issues.cpython-312.pyc +0 -0
  26. package/read-github-issue/scripts/__pycache__/read_issue.cpython-312.pyc +0 -0
  27. package/resolve-review-comments/SKILL.md +4 -26
  28. package/resolve-review-comments/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
  29. package/scripts/validate_openai_agent_config.py +16 -1
  30. package/scripts/validate_skill_frontmatter.py +16 -1
  31. package/spec-to-project-html/SKILL.md +2 -14
  32. package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
  33. package/update-project-html/SKILL.md +3 -19
  34. package/weekly-financial-event-report/scripts/extract_pdf_text_pdfkit.swift +32 -4
  35. package/maintain-skill-catalog/README.md +0 -18
  36. package/maintain-skill-catalog/SKILL.md +0 -72
  37. package/maintain-skill-catalog/agents/openai.yaml +0 -4
@@ -29,30 +29,7 @@ const DEFAULT_OUT_REL = path.join('.apollo-toolkit', 'architecture-diff');
29
29
 
30
30
  const LEGACY_VERBS = new Set(['open', 'diff']);
31
31
 
32
- const USAGE = `apltk architecture — declarative atlas CLI.
33
-
34
- Usage:
35
- apltk architecture Open resources/project-architecture/index.html
36
- apltk architecture open Same as above
37
- apltk architecture diff Render every architecture_diff/ as one paginated viewer
38
- apltk architecture render Regenerate atlas HTML from current YAML state
39
- apltk architecture validate Run schema + referential checks
40
- apltk architecture feature add|set|remove Manage feature modules
41
- apltk architecture submodule add|set|remove Manage sub-modules
42
- apltk architecture function|variable|dataflow|error|edge add|remove
43
- Manage component rows and edges
44
- apltk architecture meta set Update meta.title / meta.summary
45
- apltk architecture actor add|remove Manage top-level actors
46
- apltk architecture undo [--steps <n>] Revert the most recent mutation or roll back multiple steps
47
- apltk architecture --help Show this help
48
-
49
- Global flags:
50
- --project <root> Project root (default: nearest ancestor with resources/project-architecture/, else cwd); missing layout dirs are created when needed
51
- --spec <spec_dir> Single specs write locally; batch member paths write to the coordination.md root architecture_diff/atlas/
52
- --no-render Skip auto-render after a mutation
53
- --no-open For open/diff: skip launching the browser
54
- --out <dir> For diff: override viewer output directory
55
- -h, --help Show this help`;
32
+ const USAGE = newCli.buildArchitectureHelpPage();
56
33
 
57
34
  function parseArgs(argv) {
58
35
  const args = [...argv];
@@ -277,7 +254,9 @@ function main(argv, io = { stdout: process.stdout, stderr: process.stderr }) {
277
254
  return 1;
278
255
  }
279
256
  if (opts.help) {
280
- io.stdout.write(`${USAGE}\n`);
257
+ const explicitLegacyVerb = argv.length > 0 && !argv[0].startsWith('-') && LEGACY_VERBS.has(argv[0]);
258
+ const helpText = explicitLegacyVerb ? newCli.buildArchitectureHelpPage(argv[0]) : USAGE;
259
+ io.stdout.write(`${helpText}\n`);
281
260
  return 0;
282
261
  }
283
262
  if (opts.subcommand === 'open') return runOpen(opts, io);
package/lib/cli.js CHANGED
@@ -15,7 +15,7 @@ const {
15
15
  getTargetRoots,
16
16
  getUninstallTargetRoots,
17
17
  } = require('./installer');
18
- const { formatToolList, getToolCommand, runTool } = require('./tool-runner');
18
+ const { buildToolDiscoveryHelp, formatToolList, getToolCommand, runTool } = require('./tool-runner');
19
19
  const { checkForPackageUpdate } = require('./updater');
20
20
 
21
21
  const TARGET_OPTIONS = [
@@ -132,6 +132,25 @@ async function animateWelcomeScreen({ output, version, env }) {
132
132
  }
133
133
 
134
134
  function buildHelpText({ version, colorEnabled }) {
135
+ const examples = [
136
+ {
137
+ command: 'apltk --help',
138
+ result: 'Shows the top-level Apollo Toolkit guide, including install modes and bundled task-tool discovery.',
139
+ },
140
+ {
141
+ command: 'apltk tools --help',
142
+ result: 'Lists bundled tools by task so you can decide which CLI helper to inspect next.',
143
+ },
144
+ {
145
+ command: 'apltk architecture --help',
146
+ result: 'Shows the architecture atlas command tree, task guidance, and action-specific follow-up help paths.',
147
+ },
148
+ {
149
+ command: 'apltk tools architecture --help',
150
+ result: 'Shows what the architecture atlas tool is for, then prints its native command tree and examples.',
151
+ },
152
+ { command: 'apltk filter-logs app.log --start 2026-03-24T10:00:00Z', result: 'Prints only the log lines whose timestamps fall within the requested time window.' },
153
+ ];
135
154
  return [
136
155
  buildBanner({ version, colorEnabled }),
137
156
  '',
@@ -145,35 +164,44 @@ function buildHelpText({ version, colorEnabled }) {
145
164
  ' apltk --help',
146
165
  ' apollo-toolkit --help',
147
166
  '',
148
- 'Examples:',
149
- ' apltk',
150
- ' apltk codex openclaw',
151
- ' apltk uninstall',
152
- ' apltk uninstall codex agents --yes',
153
- ' npx @laitszkin/apollo-toolkit',
154
- ' npx @laitszkin/apollo-toolkit codex openclaw',
155
- ' npm i -g @laitszkin/apollo-toolkit',
156
- ' apltk agents',
157
- ' apltk claude-code',
158
- ' apltk all',
159
- ' apltk filter-logs app.log --start 2026-03-24T10:00:00Z',
160
- ' apltk create-specs "Membership upgrade flow" --change-name membership-upgrade-flow',
161
- ' apltk architecture # open resources/project-architecture/index.html',
162
- ' apltk architecture diff # paginated before/after view of all docs/plans/.../architecture_diff/',
163
- ' apltk tools',
164
- ' apollo-toolkit all',
167
+ 'Common goals:',
168
+ ' - Install or refresh skills in one or more agent targets: `apltk install --help`',
169
+ ' - Remove manifest-tracked installs from selected targets: `apltk uninstall --help`',
170
+ ' - Discover which bundled helper tool matches a task: `apltk tools --help`',
171
+ ' - Inspect one tool deeply before running it: `apltk tools <tool> --help`',
165
172
  '',
166
173
  'Bundled tools:',
167
174
  formatToolList(),
168
175
  '',
176
+ buildToolDiscoveryHelp(),
177
+ '',
169
178
  'Options:',
170
179
  ' --home <path> Override Apollo Toolkit home directory',
180
+ ' --symlink Install skills as symlinks instead of copied directories',
181
+ ' --copy Install skills as copied directories instead of symlinks',
171
182
  ' --yes, -y Skip uninstall confirmation',
172
183
  ' --help Show this help text',
184
+ '',
185
+ 'Examples:',
186
+ ...examples.flatMap(({ command, result }) => [` ${command}`, ` Result: ${result}`]),
173
187
  ].join('\n');
174
188
  }
175
189
 
176
190
  function buildToolsHelp({ version, colorEnabled }) {
191
+ const examples = [
192
+ {
193
+ command: 'apltk tools',
194
+ result: 'Lists all bundled tools plus the task-oriented discovery guide.',
195
+ },
196
+ {
197
+ command: 'apltk tools open-github-issue --help',
198
+ result: 'Shows when to use the GitHub issue publisher, then prints its exact script flags and examples.',
199
+ },
200
+ {
201
+ command: 'apltk tools architecture --help',
202
+ result: 'Shows when to use the architecture atlas CLI, then prints its native command tree.',
203
+ },
204
+ ];
177
205
  return [
178
206
  buildBanner({ version, colorEnabled }),
179
207
  '',
@@ -182,11 +210,107 @@ function buildToolsHelp({ version, colorEnabled }) {
182
210
  ' apltk <tool> [...args]',
183
211
  ' apltk tools <tool> [...args]',
184
212
  '',
213
+ buildToolDiscoveryHelp(),
214
+ '',
185
215
  'Bundled tools:',
186
216
  formatToolList(),
187
217
  '',
188
218
  'Tip:',
189
- ' Pass `--help` after a tool name to view the original script flags.',
219
+ ' Pass `--help` after a tool name to view task guidance, native script flags, and concrete examples.',
220
+ '',
221
+ 'Examples:',
222
+ ...examples.flatMap(({ command, result }) => [` ${command}`, ` Result: ${result}`]),
223
+ ].join('\n');
224
+ }
225
+
226
+ function buildInstallHelpText({ version, colorEnabled }) {
227
+ const examples = [
228
+ {
229
+ command: 'apltk',
230
+ result: 'Launches the interactive installer, opens the target selector, and then walks through link-mode confirmation.',
231
+ },
232
+ {
233
+ command: 'apltk codex openclaw --symlink',
234
+ result: 'Performs a non-interactive install into `codex` and `openclaw` targets using symlinks.',
235
+ },
236
+ {
237
+ command: 'npx @laitszkin/apollo-toolkit all --copy',
238
+ result: 'Installs a copied snapshot into every supported target instead of symlinking.',
239
+ },
240
+ ];
241
+
242
+ return [
243
+ buildBanner({ version, colorEnabled }),
244
+ '',
245
+ 'Usage:',
246
+ ` apltk [install] [${buildModeUsagePattern()}]...`,
247
+ ` apollo-toolkit [install] [${buildModeUsagePattern()}]...`,
248
+ '',
249
+ 'Use this when:',
250
+ ' - You want to install or refresh Apollo Toolkit skills in one or more agent targets.',
251
+ ' - You need to choose between symlink mode (auto-updating) and copy mode (stable snapshot).',
252
+ '',
253
+ 'Supported targets:',
254
+ buildSupportedTargetLines({ colorEnabled }),
255
+ '',
256
+ 'Behavior notes:',
257
+ ' - Running `apltk` with no targets opens the interactive installer and target selector.',
258
+ ' - `--symlink` keeps installed skills connected to the managed toolkit checkout in `~/.apollo-toolkit`.',
259
+ ' - `--copy` installs a snapshot that only changes when you run the installer again.',
260
+ ' - The installer can optionally include codex-exclusive skills in non-codex targets after prompting.',
261
+ '',
262
+ 'Options:',
263
+ ' --home <path> Override Apollo Toolkit home directory',
264
+ ' --symlink Install skills as symlinks (recommended)',
265
+ ' --copy Install skills as copied directories',
266
+ ' --help Show this install help',
267
+ '',
268
+ 'Examples:',
269
+ ...examples.flatMap(({ command, result }) => [` ${command}`, ` Result: ${result}`]),
270
+ ].join('\n');
271
+ }
272
+
273
+ function buildUninstallHelpText({ version, colorEnabled }) {
274
+ const examples = [
275
+ {
276
+ command: 'apltk uninstall',
277
+ result: 'Opens the interactive uninstall selector when running in a TTY and then asks for confirmation before removal.',
278
+ },
279
+ {
280
+ command: 'apltk uninstall codex agents --yes',
281
+ result: 'Removes Apollo Toolkit-managed installs from `codex` and `agents` without another confirmation prompt.',
282
+ },
283
+ {
284
+ command: 'apltk uninstall codex --home /tmp/custom-home',
285
+ result: 'Uses the custom managed toolkit home while removing manifest-tracked installs from the selected target.',
286
+ },
287
+ ];
288
+
289
+ return [
290
+ buildBanner({ version, colorEnabled }),
291
+ '',
292
+ 'Usage:',
293
+ ` apltk uninstall [${buildModeUsagePattern()}]... [--yes]`,
294
+ '',
295
+ 'Use this when:',
296
+ ' - You want to remove Apollo Toolkit-managed skills from one or more agent targets.',
297
+ ' - You need to clean up manifest-tracked historical installs as well as the current installed skills.',
298
+ '',
299
+ 'Supported targets:',
300
+ buildSupportedTargetLines({ colorEnabled }),
301
+ '',
302
+ 'Behavior notes:',
303
+ ' - With no explicit targets, uninstall opens the interactive selector in a TTY and otherwise falls back to all targets.',
304
+ ' - Uninstall removes manifest-tracked current and historical Apollo Toolkit skill directories.',
305
+ ' - `--yes` skips the confirmation prompt after the target list is resolved.',
306
+ '',
307
+ 'Options:',
308
+ ' --home <path> Override Apollo Toolkit home directory',
309
+ ' --yes, -y Skip uninstall confirmation',
310
+ ' --help Show this uninstall help',
311
+ '',
312
+ 'Examples:',
313
+ ...examples.flatMap(({ command, result }) => [` ${command}`, ` Result: ${result}`]),
190
314
  ].join('\n');
191
315
  }
192
316
 
@@ -206,6 +330,8 @@ function parseArguments(argv) {
206
330
  toolArgs: [],
207
331
  linkMode: null, // 'copy' | 'symlink' | null (prompt)
208
332
  assumeYes: false,
333
+ explicitInstallCommand: false,
334
+ helpTopic: 'overview',
209
335
  };
210
336
 
211
337
  if (args[0] === 'uninstall') {
@@ -227,6 +353,9 @@ function parseArguments(argv) {
227
353
  result.modes.push(arg);
228
354
  }
229
355
  }
356
+ if (result.showHelp) {
357
+ result.helpTopic = 'uninstall';
358
+ }
230
359
  return result;
231
360
  }
232
361
 
@@ -279,12 +408,21 @@ function parseArguments(argv) {
279
408
  }
280
409
 
281
410
  if (arg === 'install') {
411
+ result.explicitInstallCommand = true;
282
412
  continue;
283
413
  }
284
414
 
285
415
  result.modes.push(arg);
286
416
  }
287
417
 
418
+ if (result.showHelp) {
419
+ const installContextRequested = result.explicitInstallCommand
420
+ || result.modes.length > 0
421
+ || result.linkMode !== null
422
+ || result.toolkitHome !== null;
423
+ result.helpTopic = installContextRequested ? 'install' : 'overview';
424
+ }
425
+
288
426
  return result;
289
427
  }
290
428
 
@@ -585,7 +723,13 @@ async function run(argv, context = {}) {
585
723
  const parsed = parseArguments(argv);
586
724
 
587
725
  if (parsed.showHelp) {
588
- stdout.write(`${buildHelpText({ version: packageJson.version, colorEnabled: supportsColor(stdout, env) })}\n`);
726
+ const colorEnabled = supportsColor(stdout, env);
727
+ const helpText = parsed.helpTopic === 'install'
728
+ ? buildInstallHelpText({ version: packageJson.version, colorEnabled })
729
+ : parsed.helpTopic === 'uninstall'
730
+ ? buildUninstallHelpText({ version: packageJson.version, colorEnabled })
731
+ : buildHelpText({ version: packageJson.version, colorEnabled });
732
+ stdout.write(`${helpText}\n`);
589
733
  return 0;
590
734
  }
591
735
 
@@ -741,7 +885,9 @@ module.exports = {
741
885
  buildBanner,
742
886
  buildWelcomeScreen,
743
887
  buildHelpText,
888
+ buildInstallHelpText,
744
889
  buildToolsHelp,
890
+ buildUninstallHelpText,
745
891
  parseArguments,
746
892
  promptForModes,
747
893
  promptForUninstallModes,