@vextlabs/theron-cli 0.2.1 → 0.4.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 (191) hide show
  1. package/dist/api.d.ts +8 -0
  2. package/dist/api.js +3 -0
  3. package/dist/api.js.map +1 -1
  4. package/dist/auth.js +51 -1
  5. package/dist/auth.js.map +1 -1
  6. package/dist/banner.js +3 -2
  7. package/dist/banner.js.map +1 -1
  8. package/dist/checkpoints.d.ts +32 -0
  9. package/dist/checkpoints.js +61 -0
  10. package/dist/checkpoints.js.map +1 -0
  11. package/dist/index.js +61 -5
  12. package/dist/index.js.map +1 -1
  13. package/dist/input.d.ts +61 -0
  14. package/dist/input.js +574 -0
  15. package/dist/input.js.map +1 -0
  16. package/dist/profiles/index.js +5 -0
  17. package/dist/profiles/index.js.map +1 -1
  18. package/dist/profiles/methodologies/build_domains.d.ts +6 -0
  19. package/dist/profiles/methodologies/build_domains.js +170 -0
  20. package/dist/profiles/methodologies/build_domains.js.map +1 -0
  21. package/dist/profiles/methodologies/operate_domains.d.ts +8 -0
  22. package/dist/profiles/methodologies/operate_domains.js +1239 -0
  23. package/dist/profiles/methodologies/operate_domains.js.map +1 -0
  24. package/dist/profiles/methodologies/regulated_domains.d.ts +6 -0
  25. package/dist/profiles/methodologies/regulated_domains.js +153 -0
  26. package/dist/profiles/methodologies/regulated_domains.js.map +1 -0
  27. package/dist/profiles/methodologies/research_domains.d.ts +8 -0
  28. package/dist/profiles/methodologies/research_domains.js +179 -0
  29. package/dist/profiles/methodologies/research_domains.js.map +1 -0
  30. package/dist/profiles/methodologies/strategy_domains.d.ts +15 -0
  31. package/dist/profiles/methodologies/strategy_domains.js +193 -0
  32. package/dist/profiles/methodologies/strategy_domains.js.map +1 -0
  33. package/dist/profiles/seeds.js +241 -95
  34. package/dist/profiles/seeds.js.map +1 -1
  35. package/dist/receipt.d.ts +17 -0
  36. package/dist/receipt.js +46 -0
  37. package/dist/receipt.js.map +1 -0
  38. package/dist/render.d.ts +4 -1
  39. package/dist/render.js +95 -28
  40. package/dist/render.js.map +1 -1
  41. package/dist/repl.d.ts +8 -1
  42. package/dist/repl.js +420 -62
  43. package/dist/repl.js.map +1 -1
  44. package/dist/sessions.d.ts +14 -0
  45. package/dist/sessions.js +100 -0
  46. package/dist/sessions.js.map +1 -1
  47. package/dist/ship.d.ts +2 -0
  48. package/dist/ship.js +62 -0
  49. package/dist/ship.js.map +1 -0
  50. package/dist/skills/catalog.d.ts +13 -0
  51. package/dist/skills/catalog.js +86 -0
  52. package/dist/skills/catalog.js.map +1 -0
  53. package/dist/tools/bash.js +81 -14
  54. package/dist/tools/bash.js.map +1 -1
  55. package/dist/tools/edit.js +21 -1
  56. package/dist/tools/edit.js.map +1 -1
  57. package/dist/tools/glob.js +4 -1
  58. package/dist/tools/glob.js.map +1 -1
  59. package/dist/tools/grep.d.ts +5 -0
  60. package/dist/tools/grep.js +101 -2
  61. package/dist/tools/grep.js.map +1 -1
  62. package/dist/tools/index.d.ts +22 -0
  63. package/dist/tools/index.js +177 -41
  64. package/dist/tools/index.js.map +1 -1
  65. package/dist/tools/ls.d.ts +3 -0
  66. package/dist/tools/ls.js +23 -12
  67. package/dist/tools/ls.js.map +1 -1
  68. package/dist/tools/multiedit.d.ts +12 -0
  69. package/dist/tools/multiedit.js +79 -0
  70. package/dist/tools/multiedit.js.map +1 -0
  71. package/dist/tools/stoa.d.ts +1 -1
  72. package/dist/tools/stoa.js +7 -3
  73. package/dist/tools/stoa.js.map +1 -1
  74. package/dist/tools/task.d.ts +9 -0
  75. package/dist/tools/task.js +166 -0
  76. package/dist/tools/task.js.map +1 -0
  77. package/dist/tools/todowrite.d.ts +12 -0
  78. package/dist/tools/todowrite.js +38 -0
  79. package/dist/tools/todowrite.js.map +1 -0
  80. package/dist/tools/webfetch.d.ts +6 -0
  81. package/dist/tools/webfetch.js +98 -0
  82. package/dist/tools/webfetch.js.map +1 -0
  83. package/dist/tools/websearch.d.ts +7 -0
  84. package/dist/tools/websearch.js +83 -0
  85. package/dist/tools/websearch.js.map +1 -0
  86. package/dist/tools/write.js +17 -1
  87. package/dist/tools/write.js.map +1 -1
  88. package/dist/verifiers/calc_gate.d.ts +2 -0
  89. package/dist/verifiers/calc_gate.js +112 -0
  90. package/dist/verifiers/calc_gate.js.map +1 -0
  91. package/dist/verifiers/citation_gate.d.ts +2 -0
  92. package/dist/verifiers/citation_gate.js +130 -0
  93. package/dist/verifiers/citation_gate.js.map +1 -0
  94. package/dist/verifiers/confidence_marked.d.ts +2 -0
  95. package/dist/verifiers/confidence_marked.js +49 -0
  96. package/dist/verifiers/confidence_marked.js.map +1 -0
  97. package/dist/verifiers/disclaimer_gate.d.ts +2 -0
  98. package/dist/verifiers/disclaimer_gate.js +57 -0
  99. package/dist/verifiers/disclaimer_gate.js.map +1 -0
  100. package/dist/verifiers/evidence_gate.d.ts +2 -0
  101. package/dist/verifiers/evidence_gate.js +108 -0
  102. package/dist/verifiers/evidence_gate.js.map +1 -0
  103. package/dist/verifiers/index.d.ts +5 -0
  104. package/dist/verifiers/index.js +28 -7
  105. package/dist/verifiers/index.js.map +1 -1
  106. package/dist/verifiers/lint.js +4 -3
  107. package/dist/verifiers/lint.js.map +1 -1
  108. package/dist/verifiers/promoted_kernels.d.ts +8 -0
  109. package/dist/verifiers/promoted_kernels.js +190 -0
  110. package/dist/verifiers/promoted_kernels.js.map +1 -0
  111. package/dist/verifiers/source_gate.d.ts +2 -0
  112. package/dist/verifiers/source_gate.js +125 -0
  113. package/dist/verifiers/source_gate.js.map +1 -0
  114. package/dist/verifiers/test_smoke.js +30 -0
  115. package/dist/verifiers/test_smoke.js.map +1 -1
  116. package/dist/verifiers/types.d.ts +3 -0
  117. package/package.json +4 -2
  118. package/skills/README.md +123 -0
  119. package/skills/ab-test.md +89 -0
  120. package/skills/api-design.md +175 -0
  121. package/skills/architecture-design.md +185 -0
  122. package/skills/business-case.md +77 -0
  123. package/skills/causal-inference.md +77 -0
  124. package/skills/clinical-guideline.md +98 -0
  125. package/skills/code-review.md +98 -0
  126. package/skills/cold-outreach.md +268 -0
  127. package/skills/competitive-teardown.md +223 -0
  128. package/skills/component-spec.md +121 -0
  129. package/skills/content-calendar.md +280 -0
  130. package/skills/contract-review.md +155 -0
  131. package/skills/data-analysis.md +187 -0
  132. package/skills/debug.md +91 -0
  133. package/skills/design-audit.md +121 -0
  134. package/skills/differential-diagnosis.md +79 -0
  135. package/skills/discovery-call.md +206 -0
  136. package/skills/edit-pass.md +80 -0
  137. package/skills/engineering-calc.md +101 -0
  138. package/skills/estimate.md +70 -0
  139. package/skills/experiment-design.md +105 -0
  140. package/skills/fact-check.md +82 -0
  141. package/skills/financial-model.md +104 -0
  142. package/skills/grant-proposal.md +93 -0
  143. package/skills/harmony-analysis.md +93 -0
  144. package/skills/hypothesis-generation.md +99 -0
  145. package/skills/incident-response.md +134 -0
  146. package/skills/interview-loop.md +62 -0
  147. package/skills/job-scorecard.md +92 -0
  148. package/skills/kb-article.md +174 -0
  149. package/skills/launch-plan.md +85 -0
  150. package/skills/lease-review.md +93 -0
  151. package/skills/lesson-plan.md +198 -0
  152. package/skills/literature-review.md +69 -0
  153. package/skills/market-entry.md +137 -0
  154. package/skills/market-sizing.md +159 -0
  155. package/skills/meta-analysis.md +140 -0
  156. package/skills/migrate.md +117 -0
  157. package/skills/optimize.md +88 -0
  158. package/skills/options-strategy.md +166 -0
  159. package/skills/peer-review.md +96 -0
  160. package/skills/pentest-plan.md +193 -0
  161. package/skills/pitch-review.md +132 -0
  162. package/skills/plan.md +88 -0
  163. package/skills/policy-brief.md +124 -0
  164. package/skills/positioning.md +192 -0
  165. package/skills/postmortem.md +168 -0
  166. package/skills/prd.md +105 -0
  167. package/skills/prioritize.md +162 -0
  168. package/skills/proof.md +91 -0
  169. package/skills/property-underwrite.md +159 -0
  170. package/skills/recipe-develop.md +109 -0
  171. package/skills/red-team.md +142 -0
  172. package/skills/refactor.md +58 -0
  173. package/skills/reflection-session.md +115 -0
  174. package/skills/regulatory-compliance.md +136 -0
  175. package/skills/reproduce.md +87 -0
  176. package/skills/runbook.md +344 -0
  177. package/skills/security-audit.md +154 -0
  178. package/skills/seo-brief.md +201 -0
  179. package/skills/sql-query.md +161 -0
  180. package/skills/story-craft.md +163 -0
  181. package/skills/tdd.md +59 -0
  182. package/skills/term-sheet.md +298 -0
  183. package/skills/theory-of-change.md +88 -0
  184. package/skills/threat-model.md +104 -0
  185. package/skills/ticket-triage.md +200 -0
  186. package/skills/tolerance-analysis.md +149 -0
  187. package/skills/training-program.md +151 -0
  188. package/skills/translate.md +64 -0
  189. package/skills/unit-economics.md +238 -0
  190. package/skills/valuation.md +112 -0
  191. package/skills/write-tests.md +77 -0
@@ -0,0 +1,190 @@
1
+ // Promoted kernels — the remaining verifier slugs that used to be inert aliases
2
+ // of style_lint, now given real, domain-specific logic. All are WARN-level
3
+ // (quality nudges surfaced after the turn, never hard blocks) and deliberately
4
+ // conservative: each fires only on a clear, high-signal violation so it never
5
+ // punishes already-good output. They read ctx.profile to scope themselves.
6
+ const has = (re, s) => re.test(s);
7
+ const SUBSTANTIVE = 240;
8
+ // ── claim_grounding ─────────────────────────────────────────────────────────
9
+ // Absolute claims ("always", "proven", "guarantees") should be qualified or
10
+ // cited. Fires when an absolute claim appears with neither a citation nor a
11
+ // hedge anywhere in its sentence.
12
+ const CLAIM_PROFILES = new Set(["research", "academic", "policy", "medical", "science", "business", "legal", "strategy"]);
13
+ const ABSOLUTE = /\b(always|never|guarantees?|guaranteed|proven|proves|certainly|undeniably|definitely|undoubtedly|everyone|no one|nobody|impossible|all\s+\w+\s+are|every\s+\w+\s+(is|are))\b/i;
14
+ const GROUNDING = /(https?:\/\/|\bdoi\b|\[\d+\]|§|\baccording to\b|\bper\b\s|\bcites?\b|\(\d{4}\)|\bevidence\b|\bstud(y|ies)\b|\bdata\b)/i;
15
+ const HEDGE = /\b(likely|probabl|may|might|could|tends? to|generally|often|usually|in most|appears?|suggests?|typically|can\b)\b/i;
16
+ export const claimGroundingKernel = {
17
+ slug: "claim_grounding",
18
+ describe: "Flag absolute claims that carry neither a citation nor a qualifier",
19
+ async run(ctx) {
20
+ if (!CLAIM_PROFILES.has(ctx.profile))
21
+ return [];
22
+ const text = ctx.assistantText ?? "";
23
+ if (text.trim().length < SUBSTANTIVE)
24
+ return [];
25
+ for (const sentence of text.split(/(?<=[.!?])\s+/)) {
26
+ if (ABSOLUTE.test(sentence) && !GROUNDING.test(sentence) && !HEDGE.test(sentence)) {
27
+ return [{
28
+ severity: "warn",
29
+ kernel: "claim_grounding",
30
+ message: `Absolute claim without grounding: "${sentence.trim().slice(0, 90)}…". Cite a source or qualify it (scope/conditions/likelihood).`,
31
+ }];
32
+ }
33
+ }
34
+ return [];
35
+ },
36
+ };
37
+ // ── assumption_marked ───────────────────────────────────────────────────────
38
+ // Quantitative conclusions (projections, valuations, computed results) must
39
+ // state their assumptions. Fires when a computed conclusion appears with no
40
+ // assumptions block anywhere.
41
+ const ASSUMP_PROFILES = new Set(["finance", "data", "realtor", "engineer", "strategy", "investor", "trader", "business"]);
42
+ const COMPUTED = /\b(projection|forecast|estimat|valuation|NPV|IRR|ROI|LTV|CAC|cap rate|cash[- ]on[- ]cash|DSCR|TAM|SAM|SOM|breakeven|payback|runway|burn|multiple)\b/i;
43
+ // Prefix matches (assum→assuming, hypothes→hypotheses) — leading \b only, NO
44
+ // trailing \b (a trailing boundary would break "Assuming"/"hypotheses").
45
+ const ASSUMPTIONS = /\b(assum|given|inputs?|hypothes|all else equal|ceteris paribus|baseline|scenario|holding|we take|at\s+\d+\s*%|with\s+[\$]?\d)/i;
46
+ // An explicit worked derivation (an equation with numbers, or several figures)
47
+ // already exposes its inputs — don't double-flag a shown calculation.
48
+ const DERIVATION = /=\s*[-$€£]?\d/;
49
+ const numberCount = (s) => (s.match(/\d/g) ?? []).length;
50
+ export const assumptionMarkedKernel = {
51
+ slug: "assumption_marked",
52
+ describe: "Flag quantitative conclusions stated without inputs/assumptions or a shown derivation",
53
+ async run(ctx) {
54
+ if (!ASSUMP_PROFILES.has(ctx.profile))
55
+ return [];
56
+ const text = ctx.assistantText ?? "";
57
+ if (text.trim().length < SUBSTANTIVE)
58
+ return [];
59
+ const shownWork = has(DERIVATION, text) || numberCount(text) >= 4;
60
+ if (has(COMPUTED, text) && !has(ASSUMPTIONS, text) && !shownWork) {
61
+ return [{
62
+ severity: "warn",
63
+ kernel: "assumption_marked",
64
+ message: "A quantitative conclusion is given without stating its inputs/assumptions or showing the derivation. List the inputs (growth, rate, vacancy, churn, etc.) so the number is auditable.",
65
+ }];
66
+ }
67
+ return [];
68
+ },
69
+ };
70
+ // ── unit_consistency ────────────────────────────────────────────────────────
71
+ // In quantitative/physical domains a measurement noun followed by a bare number
72
+ // (no unit, %, or currency) is usually a missing unit. High-signal: requires the
73
+ // measurement noun adjacent to the bare number.
74
+ const UNIT_PROFILES = new Set(["engineer", "data", "realtor", "math", "science", "trader", "finance"]);
75
+ const MEASURE_BARE = /\b(temperature|distance|length|width|height|depth|weight|mass|force|pressure|voltage|current|power|speed|velocity|area|volume|frequency|energy|torque|density|wavelength|load)\b[^.\n]{0,18}?\b(\d+(?:\.\d+)?)\b(?!\s*(?:%|°|[a-zA-Zµ°Ω$€£/]))/i;
76
+ export const unitConsistencyKernel = {
77
+ slug: "unit_consistency",
78
+ describe: "Flag a physical quantity stated as a bare number with no unit",
79
+ async run(ctx) {
80
+ if (!UNIT_PROFILES.has(ctx.profile))
81
+ return [];
82
+ const text = ctx.assistantText ?? "";
83
+ if (text.trim().length < SUBSTANTIVE)
84
+ return [];
85
+ const m = text.match(MEASURE_BARE);
86
+ if (m) {
87
+ return [{
88
+ severity: "warn",
89
+ kernel: "unit_consistency",
90
+ message: `A measured quantity appears without a unit near "${m[0].trim().slice(0, 50)}". Attach units (and keep them consistent) for every physical/financial quantity.`,
91
+ }];
92
+ }
93
+ return [];
94
+ },
95
+ };
96
+ // ── sentence_variance ───────────────────────────────────────────────────────
97
+ // Uniform sentence length reads as monotone, machine-generated prose. Fires when
98
+ // many sentences have a very low length coefficient-of-variation.
99
+ const PROSE_PROFILES = new Set(["writing", "creative", "marketing", "influencer", "sales"]);
100
+ export const sentenceVarianceKernel = {
101
+ slug: "sentence_variance",
102
+ describe: "Flag monotone, uniform-length sentences (a machine-text tell)",
103
+ async run(ctx) {
104
+ if (!PROSE_PROFILES.has(ctx.profile))
105
+ return [];
106
+ const text = ctx.assistantText ?? "";
107
+ const lens = text
108
+ .split(/(?<=[.!?])\s+/)
109
+ .map((s) => s.trim().split(/\s+/).filter(Boolean).length)
110
+ .filter((n) => n >= 3);
111
+ if (lens.length < 6)
112
+ return [];
113
+ const mean = lens.reduce((a, b) => a + b, 0) / lens.length;
114
+ if (mean < 5)
115
+ return [];
116
+ const sd = Math.sqrt(lens.reduce((a, b) => a + (b - mean) ** 2, 0) / lens.length);
117
+ const cv = sd / mean;
118
+ if (cv < 0.28) {
119
+ return [{
120
+ severity: "warn",
121
+ kernel: "sentence_variance",
122
+ message: `Sentences are uniform in length (low rhythm variance). Mix short and long sentences — vary the cadence so it doesn't read as machine-generated.`,
123
+ }];
124
+ }
125
+ return [];
126
+ },
127
+ };
128
+ // ── component_states_complete ───────────────────────────────────────────────
129
+ // A UI component spec that lists some interaction states but omits the
130
+ // accessibility-critical focus/disabled states is incomplete.
131
+ const DESIGN_PROFILES = new Set(["design"]);
132
+ const COMPONENT = /\b(component|button|input|field|modal|dropdown|toggle|checkbox|radio|menu|card|form|tab|slider|switch)\b/i;
133
+ export const componentStatesCompleteKernel = {
134
+ slug: "component_states_complete",
135
+ describe: "Flag a component spec missing focus/disabled (or other) states",
136
+ async run(ctx) {
137
+ if (!DESIGN_PROFILES.has(ctx.profile))
138
+ return [];
139
+ const text = ctx.assistantText ?? "";
140
+ if (text.trim().length < SUBSTANTIVE || !COMPONENT.test(text))
141
+ return [];
142
+ const states = ["default", "hover", "focus", "active", "disabled", "loading", "error", "selected", "pressed"];
143
+ const present = states.filter((s) => new RegExp(`\\b${s}\\b`, "i").test(text));
144
+ if (present.length === 0)
145
+ return []; // not a state-level spec at all
146
+ const missing = ["focus", "disabled"].filter((s) => !present.includes(s));
147
+ if (missing.length) {
148
+ return [{
149
+ severity: "warn",
150
+ kernel: "component_states_complete",
151
+ message: `Component spec lists states (${present.join(", ")}) but is missing: ${missing.join(", ")}. Enumerate every interaction state — focus + disabled are accessibility-critical.`,
152
+ }];
153
+ }
154
+ return [];
155
+ },
156
+ };
157
+ // ── token_lint ──────────────────────────────────────────────────────────────
158
+ // Design output should reference design tokens, not hardcoded colors/sizes.
159
+ const HARDCODED_HEX = /#[0-9a-fA-F]{3,8}\b/g;
160
+ export const tokenLintKernel = {
161
+ slug: "token_lint",
162
+ describe: "Flag hardcoded colors/sizes in design output (use tokens)",
163
+ async run(ctx) {
164
+ if (!DESIGN_PROFILES.has(ctx.profile))
165
+ return [];
166
+ const text = ctx.assistantText ?? "";
167
+ if (text.trim().length < SUBSTANTIVE)
168
+ return [];
169
+ const hexes = text.match(HARDCODED_HEX) ?? [];
170
+ // Allow a stray reference; flag when there are several raw hex values AND
171
+ // no token usage at all.
172
+ if (hexes.length >= 2 && !/var\(--|tokens?\.|\$[a-z-]+\b/i.test(text)) {
173
+ return [{
174
+ severity: "warn",
175
+ kernel: "token_lint",
176
+ message: `Found ${hexes.length} hardcoded colors (${[...new Set(hexes)].slice(0, 3).join(", ")}…) and no design-token usage. Reference tokens (e.g. var(--color-...)) instead of literals.`,
177
+ }];
178
+ }
179
+ return [];
180
+ },
181
+ };
182
+ export const PROMOTED_KERNELS = [
183
+ claimGroundingKernel,
184
+ assumptionMarkedKernel,
185
+ unitConsistencyKernel,
186
+ sentenceVarianceKernel,
187
+ componentStatesCompleteKernel,
188
+ tokenLintKernel,
189
+ ];
190
+ //# sourceMappingURL=promoted_kernels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promoted_kernels.js","sourceRoot":"","sources":["../../src/verifiers/promoted_kernels.ts"],"names":[],"mappings":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,EAAE,SAAS,KAAK,CAAC,MAAM,sBAAsB,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,6FAA6F;iBAC5L,CAAC,CAAC;QACL,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAe;IAC1C,oBAAoB;IACpB,sBAAsB;IACtB,qBAAqB;IACrB,sBAAsB;IACtB,6BAA6B;IAC7B,eAAe;CAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { Verifier } from "./types.js";
2
+ export declare const sourceGateKernel: Verifier;
@@ -0,0 +1,125 @@
1
+ // Source-gate verifier — the soft teeth behind the "don't recite from
2
+ // memory" move that runs across every Claude-quality domain.
3
+ //
4
+ // The throughline: when you assert a CANONICAL fact about a specific system,
5
+ // spec, standard, API, config, or codebase — the kind of fact that has an
6
+ // authoritative source you could open and read — you should have READ that
7
+ // source this turn, not recited it from training memory (which drifts,
8
+ // version-skews, and hallucinates exact signatures/flags/section numbers).
9
+ // This is the cheapest, highest-leverage discipline in the whole set: read
10
+ // the source before asserting.
11
+ //
12
+ // Unlike citation_gate (hard BLOCK on regulated facts) and calc_gate (hard
13
+ // BLOCK on bare computed numbers), this one only WARNS. Canonical recall is
14
+ // often fine — the model frequently does know the exact flag — and a hard
15
+ // block here would be too noisy. The warn nudges the model (and the user)
16
+ // toward "let me Read the actual file/spec to confirm" without halting the
17
+ // loop.
18
+ //
19
+ // How it works:
20
+ // 1. Scan the output for CANONICAL-RECALL language: a confident assertion
21
+ // about a specific named system/spec/standard's exact behavior — "the
22
+ // RFC says", "per the spec", "the default value is", "the flag is named",
23
+ // "section 4.2 of the standard", "the function signature is", "the env
24
+ // var is", "the config key is".
25
+ // 2. Check whether the turn shows evidence the SOURCE was actually consulted:
26
+ // a Read/Grep tool ran on a relevant file (touchedFiles or a read marker
27
+ // in the text), a fenced quote FROM the source, a URL/cite, or explicit
28
+ // "I read/checked the source" language.
29
+ // 3. A canonical-recall assertion with NO sign the source was read is a WARN
30
+ // — surfaced so the model self-corrects toward reading it, never blocking.
31
+ //
32
+ // Conservative by design: it only fires on assertions about a SPECIFIC named
33
+ // source's exact contents, and the source-consulted evidence is generous
34
+ // (reading ANY file this turn, quoting, or linking all count). General
35
+ // explanations, opinions, and the model's own reasoning never trip it.
36
+ // Broad set — the "read the source first" discipline is universal, but it's
37
+ // most load-bearing where exact canonical detail matters: code/spec/standards
38
+ // work and the research/regulated lanes. Writing/creative/therapy don't have a
39
+ // "canonical source" to recite, so they're excluded to keep noise down.
40
+ const APPLIES_TO_PROFILES = new Set([
41
+ "code",
42
+ "security",
43
+ "pentest",
44
+ "ops",
45
+ "engineer",
46
+ "architect",
47
+ "data",
48
+ "legal",
49
+ "research",
50
+ "academic",
51
+ "science",
52
+ "policy",
53
+ "medical",
54
+ // education profile (slug `tutor`): read the source before teaching it.
55
+ "tutor",
56
+ // strategy/design domains: a recommendation or design choice that recites a
57
+ // market "fact" / canonical pattern from memory should reference its source.
58
+ "design",
59
+ "business",
60
+ "product",
61
+ ]);
62
+ const MIN_LENGTH_TO_GATE = 160;
63
+ // CANONICAL-RECALL language: a confident assertion about a specific named
64
+ // system/spec/standard's exact contents — the kind of thing you'd want to
65
+ // open the source to confirm rather than recite.
66
+ const CLAIM_PATTERNS = [
67
+ // "the RFC/spec/standard says/states/requires/defines ..."
68
+ /\b(?:the\s+)?(?:RFC\s*\d*|spec(?:ification)?|standard|protocol|the\s+docs?|documentation|the\s+manual|man\s+page|the\s+API\s+docs?)\b[^.\n]{0,40}\b(?:says?|states?|requires?|defines?|specifies?|mandates?|describes?|documents?)\b/i,
69
+ // "section/§ 4.2 of the standard ..." — a precise section reference asserted from memory
70
+ /\b(?:section|§|clause|article|chapter)\s*\d[\d.]*\b[^.\n]{0,30}\b(?:of\s+the|requires?|states?|says?|covers?|defines?)\b/i,
71
+ // "the default (value|setting|port|timeout) is X" — an exact canonical default
72
+ /\bthe\s+default\s+(?:value|setting|port|timeout|behavior|config(?:uration)?|option)\b[^.\n]{0,20}\bis\b/i,
73
+ // "the flag/env var/config key/parameter is named X" — exact identifier recall
74
+ /\b(?:the\s+)?(?:flag|env(?:ironment)?\s+var(?:iable)?|config(?:uration)?\s+(?:key|option|value)|parameter|argument|option|field|header|method|endpoint)\b[^.\n]{0,20}\b(?:is\s+(?:named|called)|is\s+`|defaults?\s+to|must\s+be|should\s+be|takes?)\b/i,
75
+ // "the function/signature/return type is ..." — exact API shape from memory
76
+ /\b(?:the\s+)?(?:function\s+signature|method\s+signature|return\s+type|the\s+signature|the\s+interface|the\s+schema|the\s+type)\b[^.\n]{0,20}\bis\b/i,
77
+ // "per the OWASP/ISO/IEEE/NIST/POSIX ... " naming a standards body's exact requirement
78
+ /\b(?:per|according\s+to|under)\s+(?:the\s+)?(?:OWASP|ISO|IEC|IEEE|NIST|POSIX|W3C|ECMA|ANSI|the\s+RFC)\b[^.\n]{0,40}\b(?:requires?|says?|states?|defines?|mandates?|category)\b/i,
79
+ ];
80
+ // Source-consulted evidence — any sign the model actually opened the source
81
+ // this turn rather than reciting it.
82
+ const SOURCE_CONSULTED = [
83
+ /```[\s\S]*?```/, // a fenced quote FROM the source
84
+ /\bhttps?:\/\/\S+/, // a link to the source
85
+ /\[[^\]]+\]\(\S+\)/, // a markdown link
86
+ /\b(?:I\s+(?:read|checked|opened|grepped|searched|verified|confirmed)|reading|let\s+me\s+(?:read|check|grep|open))\b[^.\n]{0,40}\b(?:the\s+)?(?:file|source|spec|docs?|RFC|standard|code|config|man\s+page|repo)\b/i,
87
+ /\b(?:from|in|per)\s+(?:the\s+)?(?:file|source|repo|line\s+\d+|`[^`]+`)\b/i, // "from the file …" / "in `x.ts` line 12"
88
+ /\b[\w./-]+\.(?:ts|tsx|js|jsx|py|go|rs|java|c|cpp|h|json|ya?ml|toml|md|txt|conf|cfg|ini|sh)\b/i, // a concrete filename referenced
89
+ /\b(?:line|L)\s*\d+\b/i, // a line-number reference (read evidence)
90
+ ];
91
+ function anyMatch(patterns, text) {
92
+ return patterns.some((re) => re.test(text));
93
+ }
94
+ export const sourceGateKernel = {
95
+ slug: "source_gate",
96
+ describe: "Canonical recall: an assertion about a specific system/spec/standard's exact contents should reference reading the source — warns when it recites from memory",
97
+ async run(ctx) {
98
+ if (!APPLIES_TO_PROFILES.has(ctx.profile))
99
+ return [];
100
+ const text = ctx.assistantText;
101
+ if (text.length < MIN_LENGTH_TO_GATE)
102
+ return [];
103
+ // Is there a canonical-recall assertion at all?
104
+ const claimMatch = CLAIM_PATTERNS.map((re) => re.exec(text)).find(Boolean);
105
+ if (!claimMatch)
106
+ return [];
107
+ // If the model READ a file this turn, the source was consulted by definition — don't warn.
108
+ if ((ctx.readFiles && ctx.readFiles.length > 0) || (ctx.touchedFiles && ctx.touchedFiles.length > 0))
109
+ return [];
110
+ // Did the text itself show the source was consulted (quote / link /
111
+ // filename / "I read the file")?
112
+ if (anyMatch(SOURCE_CONSULTED, text))
113
+ return [];
114
+ return [
115
+ {
116
+ severity: "warn",
117
+ kernel: "source_gate",
118
+ message: `Canonical claim ("${claimMatch[0].slice(0, 60).trim()}…") was asserted with no sign the source was read. ` +
119
+ `Don't recite specs/standards/signatures/defaults from memory — they drift and version-skew. ` +
120
+ `Read the actual file/spec/docs and quote or cite it, or flag the claim as from-memory and unverified.`,
121
+ },
122
+ ];
123
+ },
124
+ };
125
+ //# sourceMappingURL=source_gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source_gate.js","sourceRoot":"","sources":["../../src/verifiers/source_gate.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,6DAA6D;AAC7D,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,2EAA2E;AAC3E,uEAAuE;AACvE,2EAA2E;AAC3E,2EAA2E;AAC3E,+BAA+B;AAC/B,EAAE;AACF,2EAA2E;AAC3E,4EA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AC,CAAC,IAAI,EAAE,qDAAqD;oBAC3G,8FAA8F;oBAC9F,uGAAuG;aAC1G;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -71,6 +71,36 @@ export const testSmokeKernel = {
71
71
  }
72
72
  }
73
73
  catch { /* fall through */ }
74
+ // Vitest or Jest detection: find the touched test files and run against them.
75
+ const vitestConfig = findUpward(ctx.cwd, ["vitest.config.ts", "vitest.config.js", "vitest.config.mjs"]);
76
+ const jestConfig = findUpward(ctx.cwd, ["jest.config.ts", "jest.config.js", "jest.config.cjs", "jest.config.mjs"]);
77
+ const testFiles = ctx.touchedFiles.filter((p) => /\.(test|spec)\.(ts|tsx|js|jsx|mjs)$/.test(p));
78
+ if (vitestConfig && testFiles.length > 0) {
79
+ const rootDir = path.dirname(vitestConfig);
80
+ const res = await runCmd("npx", ["vitest", "run", "--bail=1", ...testFiles], rootDir, 5000);
81
+ if (res.code !== 0 && res.code !== -1) {
82
+ return [{
83
+ severity: "block",
84
+ kernel: "test_smoke",
85
+ message: `vitest failed (exit ${res.code}): ${res.out.slice(0, 300)}`,
86
+ location: path.relative(ctx.cwd, vitestConfig),
87
+ }];
88
+ }
89
+ return [];
90
+ }
91
+ if (jestConfig && testFiles.length > 0) {
92
+ const rootDir = path.dirname(jestConfig);
93
+ const res = await runCmd("npx", ["jest", "--bail", "--passWithNoTests", ...testFiles], rootDir, 5000);
94
+ if (res.code !== 0 && res.code !== -1) {
95
+ return [{
96
+ severity: "block",
97
+ kernel: "test_smoke",
98
+ message: `jest failed (exit ${res.code}): ${res.out.slice(0, 300)}`,
99
+ location: path.relative(ctx.cwd, jestConfig),
100
+ }];
101
+ }
102
+ return [];
103
+ }
74
104
  }
75
105
  // Python: look for pytest + tests/ dir + touched .py files.
76
106
  const pyTouched = ctx.touchedFiles.filter((p) => p.endsWith(".py"));
@@ -1 +1 @@
1
- {"version":3,"file":"test_smoke.js","sourceRoot":"","sources":["../../src/verifiers/test_smoke.ts"],"names":[],"mappings":"AA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AM,SAAS,GAAG,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACpE,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;YAChD,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;gBACnF,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC;oBACtC,OAAO,CAAC;4BACN,QAAQ,EAAE,OAAO;4BACjB,MAAM,EAAE,YAAY;4BACpB,OAAO,EAAE,uBAAuB,GAAG,CAAC,IAAI,GAAG;4BAC3C,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC;yBAC3C,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAC"}
@@ -17,6 +17,9 @@ export interface VerifierContext {
17
17
  * Write or Edit). Verifiers focus their work on these to keep
18
18
  * latency low. */
19
19
  touchedFiles: string[];
20
+ /** Files the assistant READ this turn (paths passed to Read). Used by
21
+ * source_gate to confirm a source was consulted rather than recited. */
22
+ readFiles?: string[];
20
23
  /** Profile slug active during this turn. */
21
24
  profile: string;
22
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vextlabs/theron-cli",
3
- "version": "0.2.1",
3
+ "version": "0.4.0",
4
4
  "description": "Theron CLI — an agentic coding assistant that verifies its own output. Runs an agentic tool loop in your terminal, then runs post-turn checks (types, tests, lint, arithmetic, citations) over the files it touched; blocking failures feed the next turn so it self-corrects. Across a 33-profile domain council. From Vext Labs.",
5
5
  "author": "Vext Labs Inc.",
6
6
  "license": "Apache-2.0",
@@ -16,6 +16,7 @@
16
16
  "files": [
17
17
  "bin",
18
18
  "dist",
19
+ "skills",
19
20
  "README.md",
20
21
  "LICENSE.txt"
21
22
  ],
@@ -29,7 +30,7 @@
29
30
  "build": "tsc -p .",
30
31
  "dev": "tsc -p . --watch",
31
32
  "start": "node ./bin/theron.js",
32
- "test": "npm run build && node test/sweep.mjs",
33
+ "test": "npm run build && node test/sweep.mjs && node test/pentest.unit.test.mjs && node test/verifiers.unit.test.mjs && node test/input.unit.test.mjs && node test/integrity.unit.test.mjs",
33
34
  "test:integration": "npm run build && THERON_RUN_INTEGRATION=1 node test/integration.mjs",
34
35
  "prepublishOnly": "npm run build",
35
36
  "release": "npm version patch && npm publish",
@@ -38,6 +39,7 @@
38
39
  },
39
40
  "dependencies": {
40
41
  "@types/node": "^20.0.0",
42
+ "@vextlabs/theron-agent-sdk": "^0.3.1",
41
43
  "chalk": "^5.3.0",
42
44
  "fast-glob": "^3.3.2",
43
45
  "marked": "^12.0.0",
@@ -0,0 +1,123 @@
1
+ # Theron skill library
2
+
3
+ A curated library of **73** reusable **SKILL.md** playbooks — dense, senior-practitioner workflows the agent loads on demand. Invoke any skill with `/<name>` in the `theron` CLI or the JUWEL.ai VS Code panel; each is also auto-invoked when its `description` matches your task. Run `/skills` to browse them grouped by entrance.
4
+
5
+ **Extend or override:** drop a `<name>.md` in `~/.theron/skills/` (all your projects) or `<project>/.theron/skills/` (this project). A same-named file overrides the bundled one. Format:
6
+
7
+ ```markdown
8
+ ---
9
+ name: my-skill
10
+ description: one line used to decide when to auto-invoke
11
+ allowed-tools: Read, Grep, Bash
12
+ ---
13
+ <the playbook body>
14
+ ```
15
+
16
+ ---
17
+
18
+ ## Research & Science _(13)_
19
+
20
+ - **`/ab-test`** — Design and analyze a controlled A/B test end-to-end — covering metric + MDE definition, power/sample-size/duration, randomization unit, pre-registration, SRM + novelty checks, effect estimation with confidence intervals, multiple-comparison correction, and a go/no-go decision; invoke when a user wants to run or evaluate any controlled experiment on product, model, UI, pricing, ranking, or policy changes. _(tools: Read, Bash, Write)_
21
+ - **`/causal-inference`** — Identify causal effects, not correlations — define the estimand, draw the DAG, pick an identification strategy (RCT/IV/RDD/DiD/matching), and run falsification tests. _(tools: Read, Bash, Write, Grep)_
22
+ - **`/clinical-guideline`** — Summarize clinical practice guidelines for a disease/condition/intervention — extracting evidence grades (GRADE/strength), target populations, contraindications, and cross-body conflicts — with primary source citations and a mandatory educational-use disclaimer; invoke when the user asks what guidelines say about a clinical topic, drug, screening threshold, treatment protocol, or diagnostic criterion. _(tools: Read, WebSearch, WebFetch, Write)_
23
+ - **`/data-analysis`** — End-to-end data analysis — profile before modeling, EDA, method fit to the question, honest validation (leakage, baselines, CIs), and limitations. _(tools: Read, Bash, Write, Glob, Grep)_
24
+ - **`/differential-diagnosis`** — Build and rank a structured clinical differential diagnosis from a symptom/sign/lab constellation — covering likelihood, danger, discriminating features, red flags, confirmatory/exclusionary tests, and guideline citations — for EDUCATIONAL use only; always appends the not-a-substitute-for-a-physician disclaimer. _(tools: Read, WebSearch, WebFetch, Write)_
25
+ - **`/experiment-design`** — Design a rigorous, falsifiable experiment — hypothesis + null, controls for confounds, power analysis, pre-registered analysis plan, and validity threat mitigation. _(tools: Read, Write, WebSearch, Grep)_
26
+ - **`/fact-check`** — Adversarially verify claims — decompose into atomic claims, find primary sources, try to refute each, and rate with cited evidence. Never assert without a source. _(tools: WebSearch, WebFetch, Read, Grep)_
27
+ - **`/hypothesis-generation`** — Generate and rank falsifiable hypotheses — diverse candidates each with a concrete prediction and discriminating test, ranked by novelty × plausibility × testability. _(tools: Read, WebSearch, WebFetch, Write)_
28
+ - **`/literature-review`** — Systematic literature review — search strategy, screening, quality appraisal, thematic synthesis, and an honest gap analysis with primary-source citations. _(tools: WebSearch, WebFetch, Read, Write, Grep, TodoWrite)_
29
+ - **`/meta-analysis`** — Pool studies rigorously — common effect-size metric, fixed/random-effects choice, heterogeneity (I²/τ²), publication-bias checks, sensitivity, and GRADE certainty. _(tools: Read, Bash, WebSearch, WebFetch, Write)_
30
+ - **`/peer-review`** — Review a paper/manuscript like a journal referee — summarize the contribution, assess soundness/novelty/reproducibility, separate major from minor, end with a justified recommendation. _(tools: Read, WebSearch, WebFetch, Write)_
31
+ - **`/proof`** — Construct a rigorous proof — restate precisely, choose the strategy, justify every step by name, hunt the failure modes (circularity, edge cases, quantifier slips), then verify it. _(tools: Read, Write)_
32
+ - **`/reproduce`** — Reproduce a bug, paper result, or benchmark — pin the exact claim and environment, get a minimal case, reproduce baseline first, bisect to the trigger, report repro status honestly. _(tools: Read, Bash, WebFetch, Grep, Glob, Write)_
33
+
34
+ ## Coding & Engineering _(12)_
35
+
36
+ - **`/api-design`** — Design clean, evolvable APIs — start from consumer use cases, make illegal states unrepresentable, explicit errors, versioning and backward-compatibility. _(tools: Read, Write, Edit, Grep, Glob)_
37
+ - **`/architecture-design`** — Design a system from the non-functional requirements + load numbers — components and boundaries, storage/consistency tradeoffs, failure modes, ADRs, and design-for-change. _(tools: Read, Write, Grep, Glob)_
38
+ - **`/code-review`** — Review a diff like a senior engineer — correctness first, then security, tests, API/compat, perf, readability; every comment file:line + concrete fix + severity tag. _(tools: Read, Grep, Glob, Bash)_
39
+ - **`/debug`** — Root-cause debugging — reproduce first, read the error, hypothesize and test (not shotgun), bisect/instrument, fix the cause not the symptom, add a regression test. _(tools: Read, Bash, Grep, Glob, Edit)_
40
+ - **`/engineering-calc`** — Perform a rigorous engineering calculation (structural load/stress/buckling, member sizing, thermal analysis, pressure vessel, circuit power/impedance, fluid flow) — states givens with SI/imperial units, cites governing equation + its derivation assumptions and validity limits, solves step-by-step with dimensional tracking, applies code-required safety factor, bounds-checks against first-principles intuition, and flags where a licensed PE stamp is legally required before use. _(tools: Read, Bash, Write)_
41
+ - **`/migrate`** — Migrate a codebase safely — inventory all call sites first, use expand-migrate-contract, change in small reversible batches keeping the build green, verify semantics preserved. _(tools: Read, Edit, MultiEdit, Bash, Grep, Glob)_
42
+ - **`/optimize`** — Performance optimization — measure and profile first, fix the real bottleneck (algorithmic before micro), re-measure after each change, keep results correct. _(tools: Read, Edit, Bash, Grep, Glob)_
43
+ - **`/refactor`** — Behavior-preserving refactoring — pin behavior with tests first, one small transformation at a time, run tests after each, never mix refactor with behavior change. _(tools: Read, Edit, MultiEdit, Bash, Grep, Glob)_
44
+ - **`/sql-query`** — Write, review, or optimize a SQL query against a real schema — confirm table grain + column names first, produce a correct readable query, verify row-count expectations, then measure and apply structural optimizations (indexes, predicate pushdown, window functions, N+1 elimination). _(tools: Read, Bash, Grep, Write)_
45
+ - **`/tdd`** — Test-driven development — red/green/refactor with the real test framework; write the failing test first, see it fail, minimal code to green, refactor, full-suite before done. _(tools: Read, Edit, MultiEdit, Write, Bash, Grep, Glob)_
46
+ - **`/tolerance-analysis`** — Full tolerance stack-up and GD&T analysis workflow — identify the critical dimension chain, run worst-case and RSS/statistical analysis, allocate tolerances to part cost tiers, design the datum scheme, and flag the binding contributor; invoke whenever a mechanical assembly has a gap, interference, clearance, or fit requirement that must be verified before release or when geometric controls (flatness, position, runout, profile) are being defined or reviewed. _(tools: Read, Bash, Write)_
47
+ - **`/write-tests`** — Author comprehensive tests — cover happy path, boundaries, error paths, and invariants; test behavior not implementation; deterministic and isolated; verify the test can actually fail. _(tools: Read, Write, Edit, Bash, Grep, Glob)_
48
+
49
+ ## Security _(4)_
50
+
51
+ - **`/pentest-plan`** — Plan and execute an authorized penetration test: scope lock, attack-surface enumeration mapped to OWASP Top 10 + API/cloud-native vectors, likelihood×impact prioritization, evidence capture standards, and non-destructive guardrails — invoke when asked to pentest, assess, or audit a system for security vulnerabilities. _(tools: Read, Write, Grep, Bash)_
52
+ - **`/red-team`** — Adversarially review your own (or given) work — hunt for correctness bugs, edge cases, security holes, and false assumptions; severity-rate each with evidence and a fix. _(tools: Read, Grep, Glob, Bash)_
53
+ - **`/security-audit`** — Static security audit of a codebase — map the attack surface, review against OWASP/CWE, scan deps + secrets; every finding gets severity, file:line, exploit scenario, and fix. _(tools: Read, Grep, Glob, Bash)_
54
+ - **`/threat-model`** — Threat-model a system — assets + trust boundaries, STRIDE enumeration, attack trees, risk-rated threats mapped to mitigations, and explicit residual risk. _(tools: Read, Write, Grep, Glob)_
55
+
56
+ ## Finance & Investing _(8)_
57
+
58
+ - **`/financial-model`** — Build a driver-based 3-statement (P&L / balance sheet / cash flow) projection model with explicit assumptions, linked drivers, upside/base/downside scenarios, DCF/terminal-value valuation, and sanity-checks against stage-appropriate industry benchmarks — invoke whenever the task is financial forecasting, unit-economics analysis, fundraising model, DCF valuation, or scenario planning. _(tools: Read, Bash, Write)_
59
+ - **`/lease-review`** — Review a commercial lease end-to-end: extract and stress-test every economic term (base rent, escalations, CAM, TI, free rent, options), flag off-market risk provisions (assignment, default cure periods, exclusivity, co-tenancy, holdover), and deliver a redline priority list with effective-rent computation. _(tools: Read, Write)_
60
+ - **`/options-strategy`** — Educational options-strategy explainer: given a named strategy or market outlook, produce structure, payoff diagram (ASCII), breakevens, max gain/loss, Greeks, ideal market scenario, risk-first sizing guidance, and a mandatory not-investment-advice disclaimer. _(tools: Read, Bash, Write)_
61
+ - **`/pitch-review`** — Review a startup pitch deck with senior VC rigor — separates what is missing from what is wrong, benchmarks each dimension to stage norms, surfaces the 3 hardest investor objections, and identifies the single most important fix before the next meeting. _(tools: Read, Write)_
62
+ - **`/property-underwrite`** — Full-cycle real estate underwriting playbook — collect deal inputs, state all assumptions explicitly, compute NOI/cap rate/cash-on-cash/DSCR/IRR step by step, run a two-variable sensitivity table, and deliver a conservative go/no-go verdict with annotated kill conditions; invoke whenever a user provides a property address, asking price, rent roll, or deal memo and wants investment analysis. _(tools: Read, Bash, Write)_
63
+ - **`/term-sheet`** — Analyze a venture-capital or angel term sheet — decompose economics vs. control provisions, step-by-step dilution math (option-pool shuffle, SAFE conversion, liquidation waterfall, anti-dilution), flag founder-unfriendly deviations from NVCA/YC market standard, and surface negotiation priorities; outputs a structured red/yellow/green memo with a NOT LEGAL ADVICE footer. _(tools: Read, Bash, Write)_
64
+ - **`/unit-economics`** — Compute and stress-test SaaS/subscription unit economics — contribution margin, CAC, LTV (with churn and discount rate), LTV/CAC ratio, payback period, and cohort-level retention curves — from first principles; flags when assumptions break the model. _(tools: Read, Bash, Write)_
65
+ - **`/valuation`** — Value a private or public company via DCF (WACC build-up, explicit FCF, terminal value) and trading/transaction comparable multiples, then reconcile the two into a single defensible range with a sensitivity table on the two highest-impact drivers; invoked when the task is to price a business, assess a deal, build a pitch-book range, or stress-test an offer price. _(tools: Read, Bash, Write)_
66
+
67
+ ## Business, Product & Strategy _(10)_
68
+
69
+ - **`/business-case`** — Build a rigorous business case for a decision or investment: size the problem and opportunity, model costs/benefits/risks across options including do-nothing, surface assumptions explicitly, and deliver a single prioritized recommendation with leading indicators and the strongest counterargument pre-empted. _(tools: Read, WebSearch, Write)_
70
+ - **`/competitive-teardown`** — Tear down a named AI/SaaS competitor end-to-end — positioning, ICP, pricing/packaging, product strengths and gaps, GTM motion, moat, and the specific wedges where we win or lose — grounded in public evidence; outputs a ranked battlecard and a single recommended attack vector. _(tools: Read, WebSearch, WebFetch, Write)_
71
+ - **`/estimate`** — Principled Fermi estimation — decompose into estimable factors with ranges, propagate uncertainty, sanity-check against anchors, tighten the dominant factor, report a range not false precision. _(tools: Read, Write)_
72
+ - **`/launch-plan`** — Build a full GTM launch plan for a software product or feature: segment audience, structure alpha/beta/GA tiers, craft the core message + proof points, assign channel owners + metrics, produce an asset checklist, set a timeline, and generate a launch-day runbook — invoke when asked to plan a launch, go-to-market, release strategy, or channel plan. _(tools: Read, Write)_
73
+ - **`/market-entry`** — Analyze a new market entry decision end-to-end: market attractiveness, right-to-win, entry mode and sequencing, irreversible vs reversible commitments, strongest reasons NOT to enter, and a staged de-risking plan with explicit kill criteria. _(tools: Read, WebSearch, Bash, Write)_
74
+ - **`/market-sizing`** — Size a market TAM/SAM/SOM via dual top-down and bottom-up triangulation, reconcile the gap, stress-test on the dominant driver, and produce a realistic obtainable-share view — invoke whenever a user asks to size a market, estimate addressable revenue, or validate a market opportunity for a product, segment, or geography. _(tools: Read, Bash, Write)_
75
+ - **`/positioning`** — Position an offering against named competitive alternatives — extract unique attributes, translate them to customer-valued outcomes, identify the best-fit buyer segment, name the market frame, and produce a positioning statement plus the messaging hierarchy it implies; invoke when launching, repositioning, entering a new segment, or diagnosing why sales are slow. _(tools: Read, Write)_
76
+ - **`/prd`** — Write a complete Product Requirements Document — extract the real problem, define Theron users + evidence, set measurable goals tied to agentic/receipt/specialist value, scope must/should/could requirements, map key flows and edge cases through the STOA/CIP surface, and lock an explicit out-of-scope. _(tools: Read, Write)_
77
+ - **`/prioritize`** — Score and sequence a backlog of features, bugs, research, or capability-injection work using RICE/WSJF — show every formula step, expose hard dependencies, name deferrals and why, and output a waterlined cycle plan. _(tools: Read, Write)_
78
+ - **`/seo-brief`** — Research and structure an SEO content brief — map search intent, SERP features, entity clusters, E-E-A-T signals, secondary queries, title/meta/H1, recommended layout, and draft the featured-snippet opening to maximize organic reach for a target keyword. _(tools: WebSearch, WebFetch, Read, Write)_
79
+
80
+ ## Go-to-market & Support _(4)_
81
+
82
+ - **`/cold-outreach`** — Execute multi-touch, research-driven cold outreach sequences for AI infrastructure / agentic platforms; one clear CTA per touch, no spray-and-pray. _(tools: Read, Write)_
83
+ - **`/discovery-call`** — Design and run an enterprise B2B discovery call end-to-end — intent-setting open, current-state diagnosis with quantified impact, MEDDPICC qualification, trap and tell-me-more follow-ups, and a mutual next step — diagnosing before pitching and never prescribing before the pain is owned by the buyer. _(tools: Read, Write)_
84
+ - **`/kb-article`** — Write task-focused knowledge base articles — shape the title around one problem, structure in numbered steps with concrete callouts/screenshots, branch for failures, and close with related links. Skip corporate filler; ship text a practitioner skims in 3 minutes and trusts. _(tools: Read, Write)_
85
+ - **`/ticket-triage`** — Reproduce, severity-assess, and resolve theron-cli support tickets end-to-end; escalate only when root cause requires dev/founder intervention or the customer is Enterprise. _(tools: Read, Write, Bash)_
86
+
87
+ ## Legal, Policy & Nonprofit _(5)_
88
+
89
+ - **`/contract-review`** — Clause-by-clause contract redline — flags red-flag, missing, and one-sided terms by risk severity, cites governing market norms, and proposes specific replacement language; never invents statutes or cases. _(tools: Read, WebSearch, WebFetch, Write)_
90
+ - **`/grant-proposal`** — Draft, review, or strengthen a complete funder-mirrored grant proposal (need+data, logic model, measurable outcomes, M&E plan, organizational capacity, line-item budget, sustainability) for nonprofit, government, or philanthropic RFPs — invoke whenever a user needs to write, audit, or rebuild a grant application. _(tools: Read, WebSearch, WebFetch, Write)_
91
+ - **`/policy-brief`** — Draft a rigorous 2-page policy brief on a named policy question — problem framing with quantified status-quo baseline, do-nothing and active options scored on effectiveness/cost/equity/feasibility, WINNERS and LOSERS named explicitly, evidence tier labeled for every quantitative claim, statutory citations verified for every legal reference, and a single prioritized recommendation with a named rebuttal — use when asked to brief a policymaker, analyze a bill, evaluate a regulation, or compare policy options on any public-sector question. _(tools: Read, WebSearch, WebFetch, Write)_
92
+ - **`/regulatory-compliance`** — Map a product or process to a named regulation (GDPR/CPRA, HIPAA, SOC 2, FTC Act §5, PCI-DSS v4.0, EU AI Act, CCPA, etc.), enumerate every applicable obligation with exact cited section, distinguish control gaps from evidence gaps, rank remediation items by legal exposure and breach probability, surface cross-jurisdiction conflicts, and flag all items requiring licensed counsel — use when the user asks about compliance gaps, regulatory mapping, audit readiness, or legal risk for a specific product or workflow. _(tools: Read, WebSearch, WebFetch, Write)_
93
+ - **`/theory-of-change`** — Build a rigorous theory of change for a program, product, or initiative: map the long-term impact goal backward through causal preconditions to activities, make every causal arrow's assumptions explicit and testable, assign indicators per outcome, and cite the evidence base that validates each assumption — invoked when asked to develop, stress-test, or document a theory of change, logic model, impact pathway, or results framework. _(tools: Read, Write)_
94
+
95
+ ## Ops & People _(6)_
96
+
97
+ - **`/incident-response`** — Run a live production incident end-to-end — declare severity, assign IC/comms/ops roles, mitigate-before-diagnose to restore SLO, drive cadenced stakeholder comms, maintain a live timeline, bound every mitigation's blast radius, and hand off a postmortem-ready artifact. _(tools: Read, Write, Bash)_
98
+ - **`/interview-loop`** — Design and run a structured interview loop: map each stage to a competency, write legally-safe STAR behavioral questions + real work samples per stage, build a scored rubric, and run a calibrated debrief — same questions every candidate, bias minimized. _(tools: Read, Write)_
99
+ - **`/job-scorecard`** — Build a role scorecard (mission, 4-6 measurable 12-month outcomes, ranked competencies with behavioral anchors, must-have vs nice-to-have) before drafting any job description — triggered whenever a user asks to define, hire for, or evaluate a role. _(tools: Read, Write)_
100
+ - **`/plan`** — Decompose a complex task into a grounded, verifiable plan — investigate current state first, small steps with acceptance checks, riskiest unknowns first, surface before irreversible work. _(tools: Read, Grep, Glob, TodoWrite, WebSearch)_
101
+ - **`/postmortem`** — Write blameless, timeline-driven postmortem for production incidents; root cause via 5-whys + systemic analysis; action items with owners + dates _(tools: Read, Write)_
102
+ - **`/runbook`** — On-call incident runbook — triage severity/scope in <2 min, detect patterns (cascade vs. isolated), isolate blast radius, execute fixed-sequence recovery, document timeline, and verify the fix held. _(tools: Read, Write, Grep, Bash)_
103
+
104
+ ## Education & Wellbeing _(3)_
105
+
106
+ - **`/lesson-plan`** — Build a rigorous, topic-specific lesson from scratch — diagnose entry state, write Bloom-leveled objectives, sequence concrete-to-abstract, scaffold worked examples into faded practice, and preempt the misconceptions that derail learners of this exact topic. _(tools: Read, Write)_
107
+ - **`/reflection-session`** — Run a structured, CBT/ACT-informed EDUCATIONAL reflective session with a user who wants to process an emotion, thought pattern, stressor, or difficult experience — asking reflective questions, validating feelings, gently surfacing cognitive distortions, and closing with one concrete micro-action; escalates immediately to crisis resources on any risk signal. _(tools: Read, Write)_
108
+ - **`/training-program`** — Design a periodized, goal-specific resistance/conditioning training program: screen for contraindications, set phase structure, prescribe sets×reps×intensity (RPE/%1RM)+rest+tempo, supply technique cues+regressions, enforce deload weeks, and close with a mandatory physician disclaimer — invoke when a user requests a workout plan, training block, strength/hypertrophy/conditioning program, or progressive-overload schedule. _(tools: Read, Write)_
109
+
110
+ ## Creative, Design & Lifestyle _(8)_
111
+
112
+ - **`/component-spec`** — Produce a complete, build-ready UI component specification covering anatomy, prop/variant matrix, every interaction and data state, design tokens (color/space/type/motion/dark-mode), full accessibility contract (ARIA roles, keyboard, focus), responsive rules, automation hooks, breaking-change policy, and do/don't usage — output is the single source of truth a designer and engineer both build from without a meeting. _(tools: Read, Write)_
113
+ - **`/content-calendar`** — Engineer a multi-month content calendar for a digital product or research AI platform — define content pillars, a repeatable series arc, native platform format per channel, engagement metrics to track (saves/shares over vanity), realistic cadence, and sponsorship disclosure; invoke when launching a brand, scaling social presence, or productizing thought leadership at a tech company. _(tools: Read, Write)_
114
+ - **`/design-audit`** — Audit a UI component or user flow for interaction-state completeness (default/hover/focus/active/disabled/loading/error/empty), WCAG accessibility (contrast, focus order, labels, target size, keyboard), responsive behavior, design-token vs hardcoded-value discipline, and cross-component consistency with the design system; delivers a severity-graded findings table and a SHIP/CONDITIONAL/CLEAR verdict. _(tools: Read, Grep, Write)_
115
+ - **`/edit-pass`** — Run a senior seven-phase editorial pass on prose or docs — macro structure first, then clarity, concision, grammar, rhythm, and a signed change log — killing AI-isms/hedging/em-dash abuse while preserving the author's voice and never altering meaning. _(tools: Read, Edit, Write)_
116
+ - **`/harmony-analysis`** — Analyze the harmonic language of a piece or passage — key, Roman-numeral function, cadences, voice-leading, secondary dominants, modal interchange, enharmonic modulation, formal structure, and tension/release mechanics — producing a rigorous, notation-standard analytical report within the common-practice tonal tradition. _(tools: Read, Write)_
117
+ - **`/recipe-develop`** — Develop, stress-test, and document a recipe end-to-end — ratio-first formulation, dual-unit (grams + volume) ingredient list, yield/serving breakdown, phase-by-phase technique with temperature/time/sensory doneness cues, food-science rationale, substitution tradeoffs, food-safety critical points, and non-linear scaling rules — invoke whenever the user asks to create, fix, scale, or deeply explain a recipe. _(tools: Read, Write)_
118
+ - **`/story-craft`** — Craft short literary fiction — character desire + obstacle, scene-level cause-effect, sensory show-not-tell, escalating conflict to a turn, distinctive voice, no clichés — when user asks to write, revise, or critique a short story or flash fiction piece. _(tools: Read, Write)_
119
+ - **`/translate`** — Translate text/documents between human languages preserving meaning, register, tone, markup, and placeholders — localizing idioms/units/dates, flagging untranslatables with alternatives, and marking low-confidence renderings for review; never silently drop or invent content. _(tools: Read, Write)_
120
+
121
+ ---
122
+
123
+ _73 skills across 10 entrances. The same library ships in the `@vextlabs/theron-cli` package and the JUWEL.ai VS Code extension._