etymd 0.9.1 → 0.11.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 (39) hide show
  1. package/CHANGELOG.md +120 -14
  2. package/README.md +50 -2
  3. package/dist/{approve-HED3NCTE.js → approve-OUJ4UPGK.js} +5 -5
  4. package/dist/audit-A75FVXHD.js +12 -0
  5. package/dist/{brief-2CXAUDNN.js → brief-MYUESUMM.js} +7 -7
  6. package/dist/{chunk-ULM25GWG.js → chunk-2KVQBL4E.js} +1 -1
  7. package/dist/{chunk-V2SOHPXF.js → chunk-2VLNI3L2.js} +1 -1
  8. package/dist/{chunk-OAFYLBVG.js → chunk-3E2IPCRY.js} +3 -3
  9. package/dist/{chunk-IV3FYVTS.js → chunk-4VPBP6K6.js} +4 -3
  10. package/dist/{chunk-UN7IAYM6.js → chunk-5GQ52DK6.js} +5 -5
  11. package/dist/{chunk-D2RI3CCT.js → chunk-DWL2IKZH.js} +12 -3
  12. package/dist/{chunk-JSUYV26K.js → chunk-F75Q43BC.js} +4 -4
  13. package/dist/{chunk-EF6BPBG6.js → chunk-GWGKEPRX.js} +2 -2
  14. package/dist/{chunk-WENIJMVV.js → chunk-HRJJQCMT.js} +54 -18
  15. package/dist/{chunk-AQM4GYGN.js → chunk-J7XVOTZL.js} +1 -1
  16. package/dist/{chunk-C7LBUFNU.js → chunk-JHZ2BN4U.js} +3 -3
  17. package/dist/{chunk-KGVRZ6WC.js → chunk-JVLWM27I.js} +9 -9
  18. package/dist/{chunk-6DUDIVIC.js → chunk-LSZGCKIQ.js} +1 -1
  19. package/dist/cli.js +19 -19
  20. package/dist/config-XAH6PA5G.js +4 -0
  21. package/dist/{context-5ANOP2IJ.js → context-F63RSIBH.js} +4 -4
  22. package/dist/doctor-OZQTOUFR.js +19 -0
  23. package/dist/{fleet-DPJSZDEY.js → fleet-Z7W3QBEV.js} +18 -18
  24. package/dist/{gates-RR3V4PII.js → gates-47YTMMLZ.js} +10 -10
  25. package/dist/generate-PMCP37DC.js +6 -0
  26. package/dist/index.d.ts +9 -1
  27. package/dist/index.js +192 -147
  28. package/dist/{init-RC35RS5J.js → init-QLGIYFCX.js} +10 -10
  29. package/dist/ledger-4FOZ5HAB.js +5 -0
  30. package/dist/{scan-MBXSD5RO.js → scan-VWEXWM6G.js} +5 -5
  31. package/dist/scan-W7RHZVSF.js +5 -0
  32. package/dist/{screen-EHNK6ANK.js → screen-NSWNC7VQ.js} +125 -16
  33. package/package.json +4 -4
  34. package/dist/audit-Y35XVD6Z.js +0 -12
  35. package/dist/config-7WCVZCM6.js +0 -4
  36. package/dist/doctor-DXXQJ2L3.js +0 -19
  37. package/dist/generate-IPY5QIR5.js +0 -6
  38. package/dist/ledger-B2XGANTH.js +0 -5
  39. package/dist/scan-KX522VKV.js +0 -5
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { VERSION } from './chunk-AQM4GYGN.js';
3
- import path from 'node:path';
2
+ import { VERSION } from './chunk-J7XVOTZL.js';
3
+ import path from 'path';
4
4
  import { Command } from 'commander';
5
5
  import pc from 'picocolors';
6
6
 
@@ -31,7 +31,7 @@ program.command("audit").description("Verify every instruction claim against the
31
31
  "exit non-zero when findings at/above this tier exist (risk|gap|polish)"
32
32
  ).action(
33
33
  (opts, cmd) => action(async () => {
34
- const { run } = await import('./audit-Y35XVD6Z.js');
34
+ const { run } = await import('./audit-A75FVXHD.js');
35
35
  await run({
36
36
  cwd: resolveCwd(cmd),
37
37
  json: opts.json,
@@ -44,7 +44,7 @@ program.command("audit").description("Verify every instruction claim against the
44
44
  );
45
45
  program.command("init").description("Onboard the truth guard: approve the baseline; scaffold AGENTS.md only if missing").option("-y, --yes", "accept defaults without prompting (never overwrites)").action(
46
46
  (opts, cmd) => action(async () => {
47
- const { run } = await import('./init-RC35RS5J.js');
47
+ const { run } = await import('./init-QLGIYFCX.js');
48
48
  await run({ cwd: resolveCwd(cmd), yes: opts.yes });
49
49
  })
50
50
  );
@@ -52,49 +52,49 @@ program.command("approve").description(
52
52
  "Re-approve the committed baseline after intentional structural changes (non-interactive)"
53
53
  ).action(
54
54
  (_opts, cmd) => action(async () => {
55
- const { run } = await import('./approve-HED3NCTE.js');
55
+ const { run } = await import('./approve-OUJ4UPGK.js');
56
56
  await run({ cwd: resolveCwd(cmd) });
57
57
  })
58
58
  );
59
59
  program.command("scan").description("Deterministically reckon the project into a facts index").option("--json", "print the raw facts as JSON").option("--no-save", "do not write the .etymd cache").action(
60
60
  (opts, cmd) => action(async () => {
61
- const { run } = await import('./scan-MBXSD5RO.js');
61
+ const { run } = await import('./scan-VWEXWM6G.js');
62
62
  await run({ cwd: resolveCwd(cmd), json: opts.json, save: opts.save });
63
63
  })
64
64
  );
65
65
  program.command("doctor").description('Alias for `audit --truth` \u2014 "are the recorded instructions still true?"').option("--json", "print findings as JSON").action(
66
66
  (opts, cmd) => action(async () => {
67
- const { run } = await import('./doctor-DXXQJ2L3.js');
67
+ const { run } = await import('./doctor-OZQTOUFR.js');
68
68
  await run({ cwd: resolveCwd(cmd), json: opts.json });
69
69
  })
70
70
  );
71
71
  program.command("context").description("Measure the always-loaded context footprint and flag extraction candidates").option("--json", "print the budget as JSON").action(
72
72
  (opts, cmd) => action(async () => {
73
- const { run } = await import('./context-5ANOP2IJ.js');
73
+ const { run } = await import('./context-F63RSIBH.js');
74
74
  await run({ cwd: resolveCwd(cmd), json: opts.json });
75
75
  })
76
76
  );
77
77
  program.command("brief").description("Emit a grounded briefing for the in-repo agent to complete the semantic layer").option("--human", "write a human onboarding brief instead of the agent briefing").action(
78
78
  (opts, cmd) => action(async () => {
79
- const { run } = await import('./brief-2CXAUDNN.js');
79
+ const { run } = await import('./brief-MYUESUMM.js');
80
80
  await run({ cwd: resolveCwd(cmd), human: opts.human });
81
81
  })
82
82
  );
83
83
  program.command("ledger").description("List every tracked finding grouped by status (open \xB7 accepted \xB7 dismissed \xB7 \u2026)").option("--json", "print the raw ledger as JSON").action(
84
84
  (opts, cmd) => action(async () => {
85
- const { list } = await import('./ledger-B2XGANTH.js');
85
+ const { list } = await import('./ledger-4FOZ5HAB.js');
86
86
  await list({ cwd: resolveCwd(cmd), json: opts.json });
87
87
  })
88
88
  );
89
89
  program.command("dismiss").argument("<finding-id>", "the finding id (from `etymd audit`) to dismiss").description("Dismiss a finding as a false positive / not applicable (hidden from future audits)").requiredOption("--reason <text>", "why it is dismissed \u2014 recorded so the decision survives").action(
90
90
  (id, opts, cmd) => action(async () => {
91
- const { dismiss } = await import('./ledger-B2XGANTH.js');
91
+ const { dismiss } = await import('./ledger-4FOZ5HAB.js');
92
92
  await dismiss({ cwd: resolveCwd(cmd), id, reason: opts.reason });
93
93
  })
94
94
  );
95
95
  program.command("accept").argument("<finding-id>", "the finding id (from `etymd audit`) to accept").description("Accept a real finding as a known trade-off (hidden from future audits)").option("--reason <text>", "optional note on why the trade-off is accepted").action(
96
96
  (id, opts, cmd) => action(async () => {
97
- const { accept } = await import('./ledger-B2XGANTH.js');
97
+ const { accept } = await import('./ledger-4FOZ5HAB.js');
98
98
  await accept({ cwd: resolveCwd(cmd), id, reason: opts.reason });
99
99
  })
100
100
  );
@@ -111,7 +111,7 @@ var fleet = program.command("fleet").description(
111
111
  "exit non-zero when findings at/above this tier exist (risk|gap|polish)"
112
112
  ).action(
113
113
  (opts, cmd) => action(async () => {
114
- const { sweep } = await import('./fleet-DPJSZDEY.js');
114
+ const { sweep } = await import('./fleet-Z7W3QBEV.js');
115
115
  await sweep({
116
116
  cwd: resolveCwd(cmd),
117
117
  manifest: opts.manifest,
@@ -126,7 +126,7 @@ var fleet = program.command("fleet").description(
126
126
  );
127
127
  fleet.command("check").description("Validate the manifest pair only \u2014 no lenses: dangling mappings, duplicates, leaks").option("--manifest <file>", "the fleet manifest \u2014 required unless the cwd holds registry.json").option("--json", "print the findings as JSON (EXPERIMENTAL through 0.2.x)").action(
128
128
  (_opts, cmd) => action(async () => {
129
- const { check } = await import('./fleet-DPJSZDEY.js');
129
+ const { check } = await import('./fleet-Z7W3QBEV.js');
130
130
  const opts = cmd.optsWithGlobals();
131
131
  await check({ cwd: resolveCwd(cmd), manifest: opts.manifest, json: opts.json });
132
132
  })
@@ -136,7 +136,7 @@ fleet.command("add").argument("<dir>", "directory of the project to register").d
136
136
  "public-repo | public-bound | private \u2014 mandatory for personal entries"
137
137
  ).option("-y, --yes", "skip prompts; every mandatory value must be passed as a flag").option("--manifest <file>", "the fleet manifest \u2014 required unless the cwd holds registry.json").action(
138
138
  (dir, opts, cmd) => action(async () => {
139
- const { add } = await import('./fleet-DPJSZDEY.js');
139
+ const { add } = await import('./fleet-Z7W3QBEV.js');
140
140
  const shared = cmd.optsWithGlobals();
141
141
  await add({
142
142
  cwd: resolveCwd(cmd),
@@ -159,7 +159,7 @@ fleet.command("dismiss").argument("<name>", "the registered project name").argum
159
159
  "Dismiss a project's finding from any cwd \u2014 corp ledgers persist beside the manifest"
160
160
  ).requiredOption("--reason <text>", "why it is dismissed \u2014 recorded so the decision survives").option("--manifest <file>", "the fleet manifest \u2014 required unless the cwd holds registry.json").action(
161
161
  (name, id, _opts, cmd) => action(async () => {
162
- const { dismiss } = await import('./fleet-DPJSZDEY.js');
162
+ const { dismiss } = await import('./fleet-Z7W3QBEV.js');
163
163
  const opts = cmd.optsWithGlobals();
164
164
  await dismiss({
165
165
  cwd: resolveCwd(cmd),
@@ -174,7 +174,7 @@ fleet.command("accept").argument("<name>", "the registered project name").argume
174
174
  "Accept a project's finding as a known trade-off \u2014 corp ledgers persist beside the manifest"
175
175
  ).option("--reason <text>", "optional note on why the trade-off is accepted").option("--manifest <file>", "the fleet manifest \u2014 required unless the cwd holds registry.json").action(
176
176
  (name, id, _opts, cmd) => action(async () => {
177
- const { accept } = await import('./fleet-DPJSZDEY.js');
177
+ const { accept } = await import('./fleet-Z7W3QBEV.js');
178
178
  const opts = cmd.optsWithGlobals();
179
179
  await accept({ cwd: resolveCwd(cmd), manifest: opts.manifest, name, id, reason: opts.reason });
180
180
  })
@@ -183,7 +183,7 @@ program.command("screen").description(
183
183
  "Content screen: check for text that must never be published. Bring your own patterns \u2014 etymd ships none."
184
184
  ).option("--staged", "screen what a commit is about to add (default)").option("--tree", "screen every tracked file \u2014 what is about to leave the machine").option("--message <file>", "screen a commit message (the commit-msg hook's $1)").option("--dir <dir>", "screen an unpacked build artifact \u2014 what actually ships").option("--patterns <file>", "pattern file (default: ~/.config/etymd/screen-patterns)").option("--advisory", "report without failing").action(
185
185
  (opts, cmd) => action(async () => {
186
- const { run } = await import('./screen-EHNK6ANK.js');
186
+ const { run } = await import('./screen-NSWNC7VQ.js');
187
187
  const scope = opts.message ? "message" : opts.dir ? "dir" : opts.tree ? "tree" : "staged";
188
188
  await run({
189
189
  cwd: resolveCwd(cmd),
@@ -196,7 +196,7 @@ program.command("screen").description(
196
196
  );
197
197
  program.command("gates").description("Install the local git-hook gates (process \u2192 pre-commit, correctness \u2192 pre-push)").option("--ci", "note about the CI review gate (ships later; local gates install now)").option("-y, --yes", "skip prompts; never overwrites a hand-edited hook").action(
198
198
  (opts, cmd) => action(async () => {
199
- const { run } = await import('./gates-RR3V4PII.js');
199
+ const { run } = await import('./gates-47YTMMLZ.js');
200
200
  await run({ cwd: resolveCwd(cmd), ci: opts.ci, yes: opts.yes });
201
201
  })
202
202
  );
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ export { CONFIG_FILE, DEFAULT_CONFIG, configPath, readConfig } from './chunk-DWL2IKZH.js';
3
+ import './chunk-JHZ2BN4U.js';
4
+ import './chunk-4VPBP6K6.js';
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { measureContext } from './chunk-JSUYV26K.js';
3
- import { readConfig } from './chunk-D2RI3CCT.js';
2
+ import { measureContext } from './chunk-F75Q43BC.js';
3
+ import { readConfig } from './chunk-DWL2IKZH.js';
4
4
  import { print, renderContext } from './chunk-5BVKFJWM.js';
5
- import './chunk-C7LBUFNU.js';
6
- import './chunk-IV3FYVTS.js';
5
+ import './chunk-JHZ2BN4U.js';
6
+ import './chunk-4VPBP6K6.js';
7
7
 
8
8
  // src/commands/context.ts
9
9
  async function run(opts) {
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ import { run } from './chunk-2KVQBL4E.js';
3
+ import './chunk-JVLWM27I.js';
4
+ import './chunk-F75Q43BC.js';
5
+ import './chunk-3E2IPCRY.js';
6
+ import './chunk-DWL2IKZH.js';
7
+ import './chunk-5BVKFJWM.js';
8
+ import './chunk-5GQ52DK6.js';
9
+ import './chunk-J7XVOTZL.js';
10
+ import './chunk-JHZ2BN4U.js';
11
+ import './chunk-LSZGCKIQ.js';
12
+ import './chunk-4VPBP6K6.js';
13
+
14
+ // src/commands/doctor.ts
15
+ async function run2(opts) {
16
+ await run({ cwd: opts.cwd, json: opts.json, truth: true });
17
+ }
18
+
19
+ export { run2 as run };
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
- import { dismiss, accept } from './chunk-V2SOHPXF.js';
3
- import { parseFailOnTier, meetsFailOn, runAudit } from './chunk-KGVRZ6WC.js';
4
- import './chunk-JSUYV26K.js';
5
- import { readLedger } from './chunk-OAFYLBVG.js';
6
- import { DEFAULT_CONFIG } from './chunk-D2RI3CCT.js';
2
+ import { dismiss, accept } from './chunk-2VLNI3L2.js';
3
+ import { parseFailOnTier, meetsFailOn, runAudit } from './chunk-JVLWM27I.js';
4
+ import './chunk-F75Q43BC.js';
5
+ import { readLedger } from './chunk-3E2IPCRY.js';
6
+ import { DEFAULT_CONFIG } from './chunk-DWL2IKZH.js';
7
7
  import { print, theme, section, renderFleetRows, renderFleetNotes, renderFindings, TIER_BADGE, glyph } from './chunk-5BVKFJWM.js';
8
- import { scanProject } from './chunk-UN7IAYM6.js';
9
- import './chunk-AQM4GYGN.js';
10
- import { ETYMD_DIR } from './chunk-C7LBUFNU.js';
11
- import './chunk-6DUDIVIC.js';
12
- import { readText, pathExists, git, isDirectory } from './chunk-IV3FYVTS.js';
13
- import { promises } from 'node:fs';
14
- import os from 'node:os';
15
- import path from 'node:path';
8
+ import { scanProject } from './chunk-5GQ52DK6.js';
9
+ import './chunk-J7XVOTZL.js';
10
+ import { ETYMD_DIR } from './chunk-JHZ2BN4U.js';
11
+ import './chunk-LSZGCKIQ.js';
12
+ import { readText, pathExists, git, isDirectory } from './chunk-4VPBP6K6.js';
13
+ import { promises } from 'fs';
14
+ import os from 'os';
15
+ import path from 'path';
16
16
  import { select, isCancel, cancel, text, confirm } from '@clack/prompts';
17
- import { execFile } from 'node:child_process';
18
- import { promisify } from 'node:util';
17
+ import { execFile } from 'child_process';
18
+ import { promisify } from 'util';
19
19
 
20
20
  var FLEET_TRUST_VALUES = ["public-repo", "public-bound", "private"];
21
21
  function isFleetTrust(value) {
@@ -687,9 +687,9 @@ async function checkCorpEmails(manifest, findings, disclosures) {
687
687
  }
688
688
  }
689
689
  async function checkGateDrift(manifest, findings, disclosures) {
690
- const { planWorkflow } = await import('./generate-IPY5QIR5.js');
691
- const { scanProject: scanProject2 } = await import('./scan-KX522VKV.js');
692
- const { readConfig } = await import('./config-7WCVZCM6.js');
690
+ const { planWorkflow } = await import('./generate-PMCP37DC.js');
691
+ const { scanProject: scanProject2 } = await import('./scan-W7RHZVSF.js');
692
+ const { readConfig } = await import('./config-XAH6PA5G.js');
693
693
  for (const entry of manifest.entries) {
694
694
  const root = entry.resolvedRoot;
695
695
  if (!root || !await isDirectory(root)) continue;
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { applyFiles } from './chunk-EF6BPBG6.js';
3
- import { deriveFailOn, derivedCommands, planWorkflow, runPrefix, isSafeGateCommand } from './chunk-WENIJMVV.js';
4
- import { readConfig, CONFIG_FILE, configPath } from './chunk-D2RI3CCT.js';
2
+ import { applyFiles } from './chunk-GWGKEPRX.js';
3
+ import { deriveFailOn, derivedCommands, planWorkflow, runPrefix, isSafeGateCommand } from './chunk-HRJJQCMT.js';
4
+ import { readConfig, CONFIG_FILE, configPath } from './chunk-DWL2IKZH.js';
5
5
  import { section, print, glyph, theme, renderPlan } from './chunk-5BVKFJWM.js';
6
- import { scanProject } from './chunk-UN7IAYM6.js';
7
- import './chunk-AQM4GYGN.js';
8
- import './chunk-C7LBUFNU.js';
9
- import './chunk-6DUDIVIC.js';
10
- import { readText, git } from './chunk-IV3FYVTS.js';
11
- import { promises } from 'node:fs';
12
- import path from 'node:path';
6
+ import { scanProject } from './chunk-5GQ52DK6.js';
7
+ import './chunk-J7XVOTZL.js';
8
+ import './chunk-JHZ2BN4U.js';
9
+ import './chunk-LSZGCKIQ.js';
10
+ import { readText, git } from './chunk-4VPBP6K6.js';
11
+ import { promises } from 'fs';
12
+ import path from 'path';
13
13
  import { confirm, isCancel, cancel, select, multiselect } from '@clack/prompts';
14
14
 
15
15
  function detectIndent(raw) {
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ export { deriveFailOn, derivedCommands, planWorkflow, riskReachability } from './chunk-HRJJQCMT.js';
3
+ import './chunk-DWL2IKZH.js';
4
+ import './chunk-JHZ2BN4U.js';
5
+ import './chunk-LSZGCKIQ.js';
6
+ import './chunk-4VPBP6K6.js';
package/dist/index.d.ts CHANGED
@@ -226,6 +226,14 @@ interface GateConfig {
226
226
  failOn: string;
227
227
  /** Emit the publish-time screen. Unset = derive from whether the repo publishes. */
228
228
  publishGate?: boolean;
229
+ /**
230
+ * Check the commit subject against Conventional Commits. **Unset = off.** Every other check
231
+ * the pack generates is either derived from what the repo already does or inert without a
232
+ * checker the user installed themselves; this one is a convention, and a convention is an
233
+ * opinion. Etymd ships the door and never decides that a repo wants it: `true` here is the
234
+ * repo asking, and nothing else turns it on.
235
+ */
236
+ commitFormat?: boolean;
229
237
  /** Commands allowed into a gate despite looking like they write (an explicit override). */
230
238
  allowWriting: string[];
231
239
  }
@@ -804,7 +812,7 @@ declare const gateIntegrityLens: Lens;
804
812
  * change meaning. Stamped into facts, baselines, and generated artifacts so drift against the
805
813
  * pack is computable and `harvest` has something to diff.
806
814
  */
807
- declare const PACK_VERSION = "6";
815
+ declare const PACK_VERSION = "8";
808
816
 
809
817
  declare const VERSION: string;
810
818
  declare const NAME: string;