macca-method 2.1.2 → 3.0.0-rc.1

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 (89) hide show
  1. package/.agents/macca-lock.json +2 -1
  2. package/.agents/macca-managed-skills.txt +1 -0
  3. package/.agents/skills/_shared/references/additional-skills.md +17 -1
  4. package/.agents/skills/_shared/references/brainstorm-session.md +61 -21
  5. package/.agents/skills/_shared/references/config-mutation.md +58 -18
  6. package/.agents/skills/_shared/references/fix-mode.md +21 -7
  7. package/.agents/skills/_shared/references/human-loop.md +2 -0
  8. package/.agents/skills/_shared/references/implementation-principles.md +4 -0
  9. package/.agents/skills/_shared/references/interaction-contract.md +33 -0
  10. package/.agents/skills/_shared/references/invocation-policy.md +14 -3
  11. package/.agents/skills/_shared/references/language-config.md +24 -4
  12. package/.agents/skills/_shared/references/output-ownership.md +12 -5
  13. package/.agents/skills/_shared/references/planning-principles.md +35 -0
  14. package/.agents/skills/_shared/references/scope-delta.md +21 -0
  15. package/.agents/skills/_shared/references/scope-rules.md +1 -1
  16. package/.agents/skills/_shared/references/skill-catalog.md +30 -13
  17. package/.agents/skills/_shared/references/workspace-safety.md +11 -0
  18. package/.agents/skills/_shared/scripts/config-file.js +132 -0
  19. package/.agents/skills/_shared/scripts/config-validator.js +164 -0
  20. package/.agents/skills/_shared/scripts/read-preferences.js +128 -0
  21. package/.agents/skills/add-feature/SKILL.md +24 -18
  22. package/.agents/skills/brainstorm-api/SKILL.md +24 -23
  23. package/.agents/skills/brainstorm-api/assets/api.template.md +11 -23
  24. package/.agents/skills/brainstorm-architecture/SKILL.md +41 -48
  25. package/.agents/skills/brainstorm-architecture/assets/architecture.template.md +24 -16
  26. package/.agents/skills/brainstorm-prd/SKILL.md +26 -28
  27. package/.agents/skills/brainstorm-prd/assets/PRD.template.md +10 -9
  28. package/.agents/skills/brainstorm-rules/SKILL.md +42 -46
  29. package/.agents/skills/brainstorm-rules/assets/rules.template.md +8 -8
  30. package/.agents/skills/brainstorm-schema/SKILL.md +17 -17
  31. package/.agents/skills/brainstorm-schema/assets/schema.template.md +9 -8
  32. package/.agents/skills/brainstorm-styleguide/SKILL.md +27 -26
  33. package/.agents/skills/brainstorm-styleguide/assets/StyleGuide.template.md +27 -51
  34. package/.agents/skills/brainstorm-task/SKILL.md +53 -37
  35. package/.agents/skills/brainstorm-task/assets/Task.template.md +11 -12
  36. package/.agents/skills/bug-fix/SKILL.md +78 -175
  37. package/.agents/skills/bug-fix/assets/bug-log.template.md +61 -0
  38. package/.agents/skills/code-review/SKILL.md +14 -6
  39. package/.agents/skills/code-review/references/review-checklist.md +24 -44
  40. package/.agents/skills/developer/SKILL.md +23 -25
  41. package/.agents/skills/developer/references/close-phase.md +11 -6
  42. package/.agents/skills/developer/references/execute-task.md +15 -8
  43. package/.agents/skills/developer/references/onboarding.md +16 -19
  44. package/.agents/skills/help/SKILL.md +49 -49
  45. package/.agents/skills/meet/SKILL.md +37 -85
  46. package/.agents/skills/quick-dev/SKILL.md +40 -75
  47. package/.agents/skills/release-readiness/SKILL.md +1 -1
  48. package/.agents/skills/setup-macca-method/SKILL.md +79 -0
  49. package/.agents/skills/spec-audit/SKILL.md +21 -17
  50. package/.agents/skills/spec-compliance/SKILL.md +36 -18
  51. package/.agents/skills/spec-init/SKILL.md +53 -22
  52. package/CHANGELOG.md +31 -0
  53. package/README.md +92 -1195
  54. package/bin/macca-method.js +833 -286
  55. package/docs/configuration.md +174 -0
  56. package/docs/troubleshooting.md +180 -0
  57. package/docs/workflows.md +175 -0
  58. package/package.json +48 -4
  59. package/scripts/lib/npm-command.js +76 -0
  60. package/scripts/test-cli-setup.js +869 -0
  61. package/scripts/test-config.js +320 -0
  62. package/scripts/test-install.js +63 -28
  63. package/scripts/test-installer-safety.js +545 -0
  64. package/scripts/test-npm-command.js +143 -0
  65. package/scripts/test-package-safety.js +252 -0
  66. package/scripts/test-preferences.js +475 -0
  67. package/scripts/test-upgrade-legacy.js +11 -21
  68. package/scripts/validate-docs.js +166 -0
  69. package/scripts/validate-package.js +285 -0
  70. package/scripts/validate-skill-behavior.js +914 -12
  71. package/.agents/skills/antislop-copywriting/SKILL.md +0 -372
  72. package/.agents/skills/skill-creator/LICENSE.txt +0 -202
  73. package/.agents/skills/skill-creator/SKILL.md +0 -485
  74. package/.agents/skills/skill-creator/agents/analyzer.md +0 -274
  75. package/.agents/skills/skill-creator/agents/comparator.md +0 -202
  76. package/.agents/skills/skill-creator/agents/grader.md +0 -223
  77. package/.agents/skills/skill-creator/assets/eval_review.html +0 -146
  78. package/.agents/skills/skill-creator/eval-viewer/generate_review.py +0 -471
  79. package/.agents/skills/skill-creator/eval-viewer/viewer.html +0 -1325
  80. package/.agents/skills/skill-creator/references/schemas.md +0 -441
  81. package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
  82. package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
  83. package/.agents/skills/skill-creator/scripts/generate_report.py +0 -326
  84. package/.agents/skills/skill-creator/scripts/improve_description.py +0 -247
  85. package/.agents/skills/skill-creator/scripts/package_skill.py +0 -136
  86. package/.agents/skills/skill-creator/scripts/quick_validate.py +0 -103
  87. package/.agents/skills/skill-creator/scripts/run_eval.py +0 -310
  88. package/.agents/skills/skill-creator/scripts/run_loop.py +0 -328
  89. package/.agents/skills/skill-creator/scripts/utils.py +0 -47
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ const fs = require("node:fs");
4
+ const path = require("node:path");
5
+ const { execFileSync } = require("node:child_process");
6
+
7
+ function resolveNpmCommand(args) {
8
+ function realFile(candidate) {
9
+ if (typeof candidate !== "string" || !path.isAbsolute(candidate)) return null;
10
+ try {
11
+ const resolved = fs.realpathSync(candidate);
12
+ return fs.statSync(resolved).isFile() ? resolved : null;
13
+ } catch {
14
+ return null;
15
+ }
16
+ }
17
+
18
+ function javascriptCommand(candidate) {
19
+ const resolved = realFile(candidate);
20
+ // npm_execpath can belong to another package manager. Only invoke npm's CLI.
21
+ if (!resolved || !/^npm-cli\.(?:c?js|mjs)$/i.test(path.basename(resolved))) return null;
22
+ return { command: process.execPath, args: [resolved, ...args] };
23
+ }
24
+
25
+ const fromEnvironment = javascriptCommand(process.env.npm_execpath);
26
+ if (fromEnvironment) return fromEnvironment;
27
+
28
+ const nodePaths = new Set([process.execPath, realFile(process.execPath)].filter(Boolean));
29
+ for (const nodePath of nodePaths) {
30
+ const directory = path.dirname(nodePath);
31
+ for (const candidate of [
32
+ path.join(directory, "node_modules", "npm", "bin", "npm-cli.js"),
33
+ path.join(directory, "..", "lib", "node_modules", "npm", "bin", "npm-cli.js"),
34
+ ]) {
35
+ const command = javascriptCommand(candidate);
36
+ if (command) return command;
37
+ }
38
+ }
39
+
40
+ if (process.platform !== "win32") return { command: "npm", args: [...args] };
41
+
42
+ let candidates = [];
43
+ try {
44
+ candidates = execFileSync("where.exe", ["npm"], {
45
+ encoding: "utf8", shell: false, windowsHide: true,
46
+ stdio: ["ignore", "pipe", "pipe"],
47
+ }).split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
48
+ } catch {
49
+ // The descriptive failure below also covers a missing where.exe or PATH entry.
50
+ }
51
+ for (const candidate of candidates) {
52
+ // Inspect shim locations and their real targets, but never execute a .cmd file
53
+ // or interpret its contents as shell text. Arguments remain literal values.
54
+ if (!path.isAbsolute(candidate)) continue;
55
+ const locations = new Set([candidate, realFile(candidate)].filter(Boolean));
56
+ for (const location of locations) {
57
+ const directory = path.dirname(location);
58
+ for (const cli of [
59
+ location,
60
+ path.join(directory, "npm-cli.js"),
61
+ path.join(directory, "node_modules", "npm", "bin", "npm-cli.js"),
62
+ path.join(directory, "..", "node_modules", "npm", "bin", "npm-cli.js"),
63
+ ]) {
64
+ const command = javascriptCommand(cli);
65
+ if (command) return command;
66
+ }
67
+ }
68
+ }
69
+ throw new Error(
70
+ "Cannot locate npm's JavaScript CLI (npm-cli.js). Install Node.js with npm, " +
71
+ "ensure npm is on PATH, or set npm_execpath to its existing npm-cli.js. " +
72
+ "Windows .cmd shims cannot be executed directly without a shell.",
73
+ );
74
+ }
75
+
76
+ module.exports = { resolveNpmCommand };