continuous-improvement 3.0.0 → 3.8.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 (126) hide show
  1. package/.claude-plugin/marketplace.json +78 -0
  2. package/CHANGELOG.md +210 -0
  3. package/LICENSE +21 -21
  4. package/QUICKSTART.md +101 -81
  5. package/README.md +224 -198
  6. package/SKILL.md +87 -9
  7. package/action.yml +33 -0
  8. package/bin/analyze.sh +161 -153
  9. package/bin/backfill.mjs +172 -0
  10. package/bin/check-docs-substrings.mjs +333 -0
  11. package/bin/check-everything-mirror.mjs +145 -0
  12. package/bin/check-routing-targets.mjs +151 -0
  13. package/bin/check-skill-law-tag.mjs +128 -0
  14. package/bin/check-skill-mirror.mjs +119 -0
  15. package/bin/check-skill-tiers.mjs +116 -0
  16. package/bin/check-third-party-shape.mjs +202 -0
  17. package/bin/generate-plugin-manifests.mjs +169 -0
  18. package/bin/harvest-friction.mjs +279 -0
  19. package/bin/hook-stats.mjs +258 -0
  20. package/bin/install.mjs +418 -456
  21. package/bin/lint-transcript.mjs +239 -0
  22. package/bin/mcp-server.mjs +842 -499
  23. package/bin/observe.mjs +148 -0
  24. package/bin/pre-commit-block-strays.sh +49 -0
  25. package/bin/refresh-third-party.mjs +416 -0
  26. package/bin/unified-cli.mjs +533 -0
  27. package/commands/continuous-improvement.md +115 -74
  28. package/commands/dashboard.md +56 -0
  29. package/commands/discipline.md +51 -0
  30. package/commands/harvest.md +76 -0
  31. package/commands/learn-eval.md +117 -0
  32. package/commands/planning-with-files.md +66 -0
  33. package/commands/proceed-with-the-recommendation.md +62 -0
  34. package/commands/ralph.md +103 -0
  35. package/commands/release-train.md +81 -0
  36. package/commands/seven-laws.md +16 -0
  37. package/commands/superpowers.md +153 -0
  38. package/commands/swarm.md +101 -0
  39. package/commands/workspace-surface-audit.md +77 -0
  40. package/hooks/observe.sh +172 -134
  41. package/hooks/session.sh +106 -106
  42. package/hooks/three-section-close.mjs +181 -0
  43. package/instinct-packs/go.json +58 -0
  44. package/instinct-packs/meta.json +16 -0
  45. package/instinct-packs/python.json +58 -0
  46. package/instinct-packs/react.json +58 -0
  47. package/lib/cli-anything.mjs +401 -0
  48. package/lib/compound-engineering.mjs +831 -0
  49. package/lib/observe-event.mjs +128 -0
  50. package/lib/plugin-metadata.mjs +432 -0
  51. package/lib/pm-marketplace.mjs +61 -0
  52. package/lib/pm-skills.mjs +1274 -0
  53. package/lib/resolve-home-dir.mjs +43 -0
  54. package/lib/skill-tiers.mjs +137 -0
  55. package/lib/unified-plugin.mjs +924 -0
  56. package/llms.txt +68 -0
  57. package/package.json +38 -15
  58. package/plugins/beginner.json +17 -6
  59. package/plugins/continuous-improvement/.claude-plugin/marketplace.json +20 -0
  60. package/plugins/continuous-improvement/.claude-plugin/plugin.json +26 -0
  61. package/plugins/continuous-improvement/LICENSE +21 -0
  62. package/plugins/continuous-improvement/README.md +56 -0
  63. package/plugins/continuous-improvement/bin/backfill.mjs +172 -0
  64. package/plugins/continuous-improvement/bin/mcp-server.mjs +886 -0
  65. package/plugins/continuous-improvement/bin/observe.mjs +148 -0
  66. package/plugins/continuous-improvement/commands/continuous-improvement.md +115 -0
  67. package/plugins/continuous-improvement/commands/dashboard.md +56 -0
  68. package/plugins/continuous-improvement/commands/discipline.md +51 -0
  69. package/plugins/continuous-improvement/commands/harvest.md +76 -0
  70. package/plugins/continuous-improvement/commands/learn-eval.md +117 -0
  71. package/plugins/continuous-improvement/commands/planning-with-files.md +66 -0
  72. package/plugins/continuous-improvement/commands/proceed-with-the-recommendation.md +62 -0
  73. package/plugins/continuous-improvement/commands/ralph.md +103 -0
  74. package/plugins/continuous-improvement/commands/release-train.md +81 -0
  75. package/plugins/continuous-improvement/commands/seven-laws.md +16 -0
  76. package/plugins/continuous-improvement/commands/superpowers.md +153 -0
  77. package/plugins/continuous-improvement/commands/swarm.md +101 -0
  78. package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -0
  79. package/plugins/continuous-improvement/hooks/hooks.json +60 -0
  80. package/plugins/continuous-improvement/hooks/observe.sh +172 -0
  81. package/plugins/continuous-improvement/hooks/session.sh +106 -0
  82. package/plugins/continuous-improvement/hooks/three-section-close.mjs +181 -0
  83. package/plugins/continuous-improvement/instinct-packs/go.json +58 -0
  84. package/plugins/continuous-improvement/instinct-packs/meta.json +16 -0
  85. package/plugins/continuous-improvement/instinct-packs/python.json +58 -0
  86. package/plugins/continuous-improvement/instinct-packs/react.json +58 -0
  87. package/plugins/continuous-improvement/lib/observe-event.mjs +128 -0
  88. package/plugins/continuous-improvement/lib/plugin-metadata.mjs +432 -0
  89. package/plugins/continuous-improvement/lib/resolve-home-dir.mjs +43 -0
  90. package/plugins/continuous-improvement/skills/README.md +34 -0
  91. package/plugins/continuous-improvement/skills/continuous-improvement/SKILL.md +249 -0
  92. package/plugins/continuous-improvement/skills/deploy-receipt/SKILL.md +131 -0
  93. package/plugins/continuous-improvement/skills/gateguard/SKILL.md +155 -0
  94. package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +108 -0
  95. package/plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md +454 -0
  96. package/plugins/continuous-improvement/skills/ralph/SKILL.md +221 -0
  97. package/plugins/continuous-improvement/skills/safety-guard/SKILL.md +76 -0
  98. package/plugins/continuous-improvement/skills/strategic-compact/SKILL.md +104 -0
  99. package/plugins/continuous-improvement/skills/superpowers/SKILL.md +212 -0
  100. package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -0
  101. package/plugins/continuous-improvement/skills/token-budget-advisor/SKILL.md +136 -0
  102. package/plugins/continuous-improvement/skills/verification-loop/SKILL.md +192 -0
  103. package/plugins/continuous-improvement/skills/wild-risa-balance/SKILL.md +191 -0
  104. package/plugins/continuous-improvement/skills/workspace-surface-audit/SKILL.md +147 -0
  105. package/plugins/continuous-improvement/templates/planning-with-files/findings.md +8 -0
  106. package/plugins/continuous-improvement/templates/planning-with-files/progress.md +7 -0
  107. package/plugins/continuous-improvement/templates/planning-with-files/task_plan.md +23 -0
  108. package/plugins/expert.json +34 -5
  109. package/skills/README.md +79 -0
  110. package/skills/deploy-receipt.md +131 -0
  111. package/skills/gateguard.md +155 -0
  112. package/skills/para-memory-files.md +108 -0
  113. package/skills/proceed-with-the-recommendation.md +454 -0
  114. package/skills/ralph.md +221 -0
  115. package/skills/safety-guard.md +76 -0
  116. package/skills/strategic-compact.md +104 -0
  117. package/skills/superpowers.md +212 -0
  118. package/skills/tdd-workflow.md +411 -0
  119. package/skills/token-budget-advisor.md +136 -0
  120. package/skills/verification-loop.md +192 -0
  121. package/skills/wild-risa-balance.md +191 -0
  122. package/skills/workspace-surface-audit.md +147 -0
  123. package/templates/planning-with-files/findings.md +8 -0
  124. package/templates/planning-with-files/progress.md +7 -0
  125. package/templates/planning-with-files/task_plan.md +23 -0
  126. package/templates/verify-ladder.example.json +47 -0
@@ -0,0 +1,43 @@
1
+ // resolve-home-dir.mts — Single source of truth for the telemetry home dir
2
+ // resolution rule shared by hooks/three-section-close.mjs and bin/hook-stats.mjs.
3
+ //
4
+ // Previously this 20-line function lived in three byte-equivalent copies; this
5
+ // module collapses them. Behavior is unchanged.
6
+ import { homedir } from "node:os";
7
+ /**
8
+ * Resolve the home directory used to locate `.claude/hook-telemetry/`.
9
+ *
10
+ * Contract (AND-semantic opt-out):
11
+ * - If BOTH `HOME` and `USERPROFILE` are explicitly set to the empty string
12
+ * (set, not merely undefined), return `""`. This is the operator/test
13
+ * opt-out signal: telemetry is intentionally disabled.
14
+ * - Otherwise return the first truthy value from, in order:
15
+ * `process.env.HOME`, `process.env.USERPROFILE`, `os.homedir()`.
16
+ * - If none yields a truthy path, return `""`.
17
+ *
18
+ * The AND-semantic is deliberate: an OR-semantic would silently disable
19
+ * telemetry whenever a shell happened to clear one variable while the other
20
+ * still pointed at a valid path.
21
+ *
22
+ * Never throws. `os.homedir()` is wrapped in try/catch because it can throw
23
+ * in pathological env conditions.
24
+ */
25
+ export function resolveHomeDir() {
26
+ const home = process.env.HOME;
27
+ const userProfile = process.env.USERPROFILE;
28
+ if (home === "" && userProfile === "")
29
+ return "";
30
+ if (home)
31
+ return home;
32
+ if (userProfile)
33
+ return userProfile;
34
+ try {
35
+ const fromOs = homedir();
36
+ if (fromOs)
37
+ return fromOs;
38
+ }
39
+ catch {
40
+ // os.homedir() can throw in pathological env conditions
41
+ }
42
+ return "";
43
+ }
@@ -0,0 +1,137 @@
1
+ // Tier-aware rendering for the bundled-skills README.
2
+ //
3
+ // Source-of-truth: each skills/<name>.md declares its own tier in YAML
4
+ // frontmatter via a tier: field. The generator parses each file at build
5
+ // time and groups them into sections in the bundled README. This is the
6
+ // single source consumed by both the generator and its unit test, so the
7
+ // two cannot drift.
8
+ //
9
+ // Recognized tier values:
10
+ // "featured" — the recommended pairing for the 7 Laws
11
+ // "1" — Tier 1: ships in beginner mode
12
+ // "2" — Tier 2: ships in expert mode
13
+ // "companion" — always-bundled drop-in companion skill
14
+ // anything else (or absent) — falls into the "Other" bucket so the file
15
+ // is still listed, visibly miscategorized
16
+ // so the maintainer notices and assigns one
17
+ const TIER_ORDER = ["core", "featured", "1", "2", "companion", "unknown"];
18
+ const TIER_HEADINGS = {
19
+ core: "## Core skill",
20
+ featured: "## Featured companion",
21
+ "1": "## Tier 1 — beginner-mode pairing",
22
+ "2": "## Tier 2 — expert-mode add-ons",
23
+ companion: "## Always-bundled companions",
24
+ unknown: "## Other skills",
25
+ };
26
+ const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---/;
27
+ export function parseSkillFrontmatter(content) {
28
+ const match = FRONTMATTER_RE.exec(content);
29
+ if (!match)
30
+ return {};
31
+ const out = {};
32
+ const lines = match[1].split(/\r?\n/);
33
+ for (let i = 0; i < lines.length; i++) {
34
+ const line = lines[i];
35
+ const m = /^([a-zA-Z][a-zA-Z0-9_-]*):\s*(.*)$/.exec(line);
36
+ if (!m)
37
+ continue;
38
+ const key = m[1];
39
+ let value = m[2];
40
+ if (value === ">" || value === ">-" || value === "|" || value === "|-") {
41
+ // Block scalar — collect indented continuation lines until we hit an
42
+ // unindented line (a sibling top-level key) or end-of-frontmatter.
43
+ // Folded scalars (>, >-): join with spaces. Literal (|, |-): join with
44
+ // newlines. We use simple folding (single space) for everything since
45
+ // that's what we need for descriptions in this repo.
46
+ const bodyLines = [];
47
+ let j = i + 1;
48
+ while (j < lines.length) {
49
+ const next = lines[j];
50
+ if (/^\s*$/.test(next)) {
51
+ bodyLines.push("");
52
+ j++;
53
+ continue;
54
+ }
55
+ if (/^\S/.test(next))
56
+ break; // unindented — sibling key
57
+ bodyLines.push(next.trim());
58
+ j++;
59
+ }
60
+ value = bodyLines.filter((s) => s.length > 0).join(" ");
61
+ i = j - 1;
62
+ }
63
+ else if (value.startsWith('"') && value.endsWith('"') && value.length >= 2) {
64
+ value = value.slice(1, -1);
65
+ }
66
+ else if (value.startsWith("'") && value.endsWith("'") && value.length >= 2) {
67
+ value = value.slice(1, -1);
68
+ }
69
+ out[key] = value;
70
+ }
71
+ return {
72
+ name: out.name,
73
+ tier: out.tier,
74
+ description: out.description,
75
+ };
76
+ }
77
+ export function normalizeTier(rawTier) {
78
+ if (!rawTier)
79
+ return "unknown";
80
+ const value = rawTier.trim().toLowerCase();
81
+ if (value === "core")
82
+ return "core";
83
+ if (value === "featured")
84
+ return "featured";
85
+ if (value === "1" || value === "tier1" || value === "tier-1")
86
+ return "1";
87
+ if (value === "2" || value === "tier2" || value === "tier-2")
88
+ return "2";
89
+ if (value === "companion")
90
+ return "companion";
91
+ return "unknown";
92
+ }
93
+ export function groupSkillsByTier(skills) {
94
+ const groups = {
95
+ core: [],
96
+ featured: [],
97
+ "1": [],
98
+ "2": [],
99
+ companion: [],
100
+ unknown: [],
101
+ };
102
+ for (const skill of skills) {
103
+ groups[skill.tier].push(skill);
104
+ }
105
+ for (const tier of TIER_ORDER) {
106
+ groups[tier].sort((a, b) => a.name.localeCompare(b.name));
107
+ }
108
+ return groups;
109
+ }
110
+ export function renderBundledSkillsReadme(skills) {
111
+ const groups = groupSkillsByTier(skills);
112
+ const lines = [
113
+ "# Bundled Skills (generated)",
114
+ "",
115
+ "> **Do not edit anything in this directory.** It is regenerated by `npm run build`",
116
+ "> from the source skill files in the repo root (SKILL.md and skills/*.md).",
117
+ "> Any local edits here will be lost on the next build.",
118
+ "",
119
+ "Each skill below declares its own tier via the `tier:` field in its source",
120
+ "frontmatter. The build groups them into sections; this file is rendered from",
121
+ "those declarations so the table of contents cannot drift from the actual",
122
+ "skill set on disk.",
123
+ ];
124
+ for (const tier of TIER_ORDER) {
125
+ const inTier = groups[tier];
126
+ if (inTier.length === 0)
127
+ continue;
128
+ lines.push("", TIER_HEADINGS[tier]);
129
+ for (const skill of inTier) {
130
+ const marker = tier === "featured" ? " ⭐" : "";
131
+ const desc = skill.description ? ` — ${skill.description}` : "";
132
+ lines.push(`- \`${skill.name}\`${marker}${desc}`);
133
+ }
134
+ }
135
+ lines.push("");
136
+ return lines.join("\n");
137
+ }