etymd 0.3.1 → 0.3.2
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.
- package/CHANGELOG.md +21 -0
- package/dist/{approve-3B2UL7LG.js → approve-P255DGOI.js} +2 -2
- package/dist/{audit-4YB3K62W.js → audit-IGIUGKSQ.js} +4 -4
- package/dist/{brief-6EEXGQUW.js → brief-SFZ2DR65.js} +2 -2
- package/dist/{chunk-HOLFW5QY.js → chunk-7MOBQ4N5.js} +1 -1
- package/dist/{chunk-DKC7MLWG.js → chunk-B3SUTZVY.js} +1 -1
- package/dist/{chunk-MEJ4MBVL.js → chunk-WOBHQQ6H.js} +1 -1
- package/dist/{chunk-V6NZEIHF.js → chunk-WUGBAW6Z.js} +7 -7
- package/dist/cli.js +13 -13
- package/dist/{doctor-T76ZNL4S.js → doctor-4LBUZHVD.js} +4 -4
- package/dist/{fleet-WOPKM2Z3.js → fleet-Q6J5XIHH.js} +4 -4
- package/dist/{gates-WIGDS5VF.js → gates-T5J3H7WL.js} +2 -2
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -7
- package/dist/{init-NSYVVMF2.js → init-WYVDRQ2J.js} +2 -2
- package/dist/scan-IY3LCBJ6.js +5 -0
- package/dist/{scan-COEPZJBO.js → scan-PZFF6LDA.js} +2 -2
- package/package.json +1 -1
- package/dist/scan-BAD2UJAL.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# etymd
|
|
2
2
|
|
|
3
|
+
## 0.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- A truth finding from any lens now reaches a `doctor` run.
|
|
8
|
+
|
|
9
|
+
`doctor` filters to truth-only, and it used to filter at the **lens** level — so `gate-integrity`
|
|
10
|
+
(an improvement lens) was skipped entirely, and its `hooks-not-wired` finding (tier: risk —
|
|
11
|
+
"tracked hooks exist but never run") was invisible in the one view meant to catch it. The lens
|
|
12
|
+
label was never the right granularity: a lens can emit both kinds, and "hooks exist and are
|
|
13
|
+
unwired" is as objective as anything the truth lens reports.
|
|
14
|
+
|
|
15
|
+
`kind` now lives on the Finding, defaulting to the lens kind when a finding does not set its
|
|
16
|
+
own, and the `--truth` filter operates at the finding level. Every lens still runs under
|
|
17
|
+
`--truth`; findings are filtered afterward, so nothing objective is invisible.
|
|
18
|
+
|
|
19
|
+
Also in this release: CI proves the publish tarball's exact manifest on every push (packagers
|
|
20
|
+
ignore `.gitignore`, so a stray local file can ship while every git-scoped check stays green),
|
|
21
|
+
and the generated hook companions (`.githooks/<hook>.local`) ship in this repo as a worked
|
|
22
|
+
example of the resolve-by-name convention.
|
|
23
|
+
|
|
3
24
|
## 0.3.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { section, theme, print, renderBaselineDrift, glyph } from './chunk-TADKOW6P.js';
|
|
3
|
-
import { scanProject } from './chunk-
|
|
4
|
-
import { VERSION } from './chunk-
|
|
3
|
+
import { scanProject } from './chunk-7MOBQ4N5.js';
|
|
4
|
+
import { VERSION } from './chunk-B3SUTZVY.js';
|
|
5
5
|
import { readBaseline, summarizeBaselineDrift, isDriftEmpty, writeBaseline, deriveProfile } from './chunk-R74SJ7HS.js';
|
|
6
6
|
import { PACK_VERSION } from './chunk-CRJHIXJH.js';
|
|
7
7
|
import './chunk-YLNQQZ5F.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { run } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
export { run } from './chunk-WOBHQQ6H.js';
|
|
3
|
+
import './chunk-WUGBAW6Z.js';
|
|
4
4
|
import './chunk-LT67FU2Y.js';
|
|
5
5
|
import './chunk-WWBF4Y7K.js';
|
|
6
6
|
import './chunk-NMZ3RHWW.js';
|
|
7
7
|
import './chunk-TADKOW6P.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import './chunk-7MOBQ4N5.js';
|
|
9
|
+
import './chunk-B3SUTZVY.js';
|
|
10
10
|
import './chunk-R74SJ7HS.js';
|
|
11
11
|
import './chunk-CRJHIXJH.js';
|
|
12
12
|
import './chunk-YLNQQZ5F.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { print, theme } from './chunk-TADKOW6P.js';
|
|
3
|
-
import { scanProject } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { scanProject } from './chunk-7MOBQ4N5.js';
|
|
4
|
+
import './chunk-B3SUTZVY.js';
|
|
5
5
|
import { ETYMD_DIR } from './chunk-R74SJ7HS.js';
|
|
6
6
|
import './chunk-CRJHIXJH.js';
|
|
7
7
|
import './chunk-YLNQQZ5F.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { VERSION } from './chunk-
|
|
2
|
+
import { VERSION } from './chunk-B3SUTZVY.js';
|
|
3
3
|
import { PACK_VERSION } from './chunk-CRJHIXJH.js';
|
|
4
4
|
import { normalizeRelPath, isDirectory, readJson, git, matchesAnyGlob, pathExists, readText } from './chunk-YLNQQZ5F.js';
|
|
5
5
|
import path from 'node:path';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { parseFailOnTier, runAudit, meetsFailOn } from './chunk-
|
|
2
|
+
import { parseFailOnTier, runAudit, meetsFailOn } from './chunk-WUGBAW6Z.js';
|
|
3
3
|
import { print, section, theme, renderLensCoverage, renderFindings, renderLedgerDiff } from './chunk-TADKOW6P.js';
|
|
4
4
|
|
|
5
5
|
// src/commands/audit.ts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { measureContext } from './chunk-LT67FU2Y.js';
|
|
3
3
|
import { readLedger, reconcileLedger, writeLedger, visibleFindings } from './chunk-WWBF4Y7K.js';
|
|
4
4
|
import { DEFAULT_CONFIG, readConfig, CONFIG_FILE } from './chunk-NMZ3RHWW.js';
|
|
5
|
-
import { scanProject, expandFileGlobs } from './chunk-
|
|
5
|
+
import { scanProject, expandFileGlobs } from './chunk-7MOBQ4N5.js';
|
|
6
6
|
import { ETYMD_DIR, writeCachedFacts, readBaseline, deriveProfile, baselineCarriesMachinePath, BASELINE_FILE } from './chunk-R74SJ7HS.js';
|
|
7
7
|
import { PACK_VERSION } from './chunk-CRJHIXJH.js';
|
|
8
8
|
import { pathExists, readJson, git, readText, isDirectory, matchesAnyGlob, isCiEnvironment, normalizeRelPath } from './chunk-YLNQQZ5F.js';
|
|
@@ -474,6 +474,7 @@ function deriveGateFindings(inv, disclosures = []) {
|
|
|
474
474
|
finding({
|
|
475
475
|
id: `${LENS_ID2}/hooks-not-wired`,
|
|
476
476
|
tier: "risk",
|
|
477
|
+
kind: "truth",
|
|
477
478
|
claim: "Tracked .githooks/ exist but git core.hooksPath is unset \u2014 the hooks never run",
|
|
478
479
|
evidence: [".githooks/"],
|
|
479
480
|
why: "Every check in those hooks is silently skipped on this clone.",
|
|
@@ -1329,9 +1330,7 @@ async function runAudit(root, opts = {}) {
|
|
|
1329
1330
|
};
|
|
1330
1331
|
}
|
|
1331
1332
|
const profile = baseline?.profile ?? deriveProfile(facts);
|
|
1332
|
-
const selected = LENSES.filter(
|
|
1333
|
-
(lens) => (!opts.kind || lens.kind === opts.kind) && (!opts.lensIds || opts.lensIds.includes(lens.id))
|
|
1334
|
-
);
|
|
1333
|
+
const selected = LENSES.filter((lens) => !opts.lensIds || opts.lensIds.includes(lens.id));
|
|
1335
1334
|
const reports = [];
|
|
1336
1335
|
for (const lens of selected) {
|
|
1337
1336
|
try {
|
|
@@ -1349,11 +1348,12 @@ async function runAudit(root, opts = {}) {
|
|
|
1349
1348
|
});
|
|
1350
1349
|
}
|
|
1351
1350
|
}
|
|
1352
|
-
const all = reports.flatMap((r) => r.findings);
|
|
1351
|
+
const all = reports.flatMap((r) => r.findings.map((f) => ({ ...f, kind: f.kind ?? r.kind })));
|
|
1352
|
+
const visible = opts.kind ? all.filter((f) => f.kind === opts.kind) : all;
|
|
1353
1353
|
const previous = await readLedger(ledgerRoot);
|
|
1354
1354
|
const outOfScope = reports.flatMap((r) => r.outOfScope ?? []);
|
|
1355
1355
|
const { ledger, diff } = reconcileLedger(previous, all, void 0, outOfScope);
|
|
1356
|
-
const fullRun =
|
|
1356
|
+
const fullRun = !opts.kind && !opts.lensIds;
|
|
1357
1357
|
const ledgerWritable = !opts.readOnlyRoot || ledgerRoot !== root;
|
|
1358
1358
|
if ((opts.persistLedger ?? true) && fullRun && ledgerWritable) {
|
|
1359
1359
|
await writeLedger(ledgerRoot, ledger);
|
|
@@ -1364,7 +1364,7 @@ async function runAudit(root, opts = {}) {
|
|
|
1364
1364
|
baseline,
|
|
1365
1365
|
config,
|
|
1366
1366
|
reports,
|
|
1367
|
-
findings: rankFindings(visibleFindings(
|
|
1367
|
+
findings: rankFindings(visibleFindings(visible, previous)),
|
|
1368
1368
|
ledger,
|
|
1369
1369
|
diff
|
|
1370
1370
|
};
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { VERSION } from './chunk-
|
|
2
|
+
import { VERSION } from './chunk-B3SUTZVY.js';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { Command } from 'commander';
|
|
5
5
|
import pc from 'picocolors';
|
|
@@ -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-
|
|
34
|
+
const { run } = await import('./audit-IGIUGKSQ.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-
|
|
47
|
+
const { run } = await import('./init-WYVDRQ2J.js');
|
|
48
48
|
await run({ cwd: resolveCwd(cmd), yes: opts.yes });
|
|
49
49
|
})
|
|
50
50
|
);
|
|
@@ -52,19 +52,19 @@ 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-
|
|
55
|
+
const { run } = await import('./approve-P255DGOI.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-
|
|
61
|
+
const { run } = await import('./scan-PZFF6LDA.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-
|
|
67
|
+
const { run } = await import('./doctor-4LBUZHVD.js');
|
|
68
68
|
await run({ cwd: resolveCwd(cmd), json: opts.json });
|
|
69
69
|
})
|
|
70
70
|
);
|
|
@@ -76,7 +76,7 @@ program.command("context").description("Measure the always-loaded context footpr
|
|
|
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-
|
|
79
|
+
const { run } = await import('./brief-SFZ2DR65.js');
|
|
80
80
|
await run({ cwd: resolveCwd(cmd), human: opts.human });
|
|
81
81
|
})
|
|
82
82
|
);
|
|
@@ -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-
|
|
114
|
+
const { sweep } = await import('./fleet-Q6J5XIHH.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-
|
|
129
|
+
const { check } = await import('./fleet-Q6J5XIHH.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-
|
|
139
|
+
const { add } = await import('./fleet-Q6J5XIHH.js');
|
|
140
140
|
const shared = cmd.optsWithGlobals();
|
|
141
141
|
await add({
|
|
142
142
|
cwd: resolveCwd(cmd),
|
|
@@ -154,7 +154,7 @@ fleet.command("dismiss").argument("<name>", "the registered project name").argum
|
|
|
154
154
|
"Dismiss a project's finding from any cwd \u2014 corp ledgers persist beside the manifest"
|
|
155
155
|
).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(
|
|
156
156
|
(name, id, _opts, cmd) => action(async () => {
|
|
157
|
-
const { dismiss } = await import('./fleet-
|
|
157
|
+
const { dismiss } = await import('./fleet-Q6J5XIHH.js');
|
|
158
158
|
const opts = cmd.optsWithGlobals();
|
|
159
159
|
await dismiss({
|
|
160
160
|
cwd: resolveCwd(cmd),
|
|
@@ -169,7 +169,7 @@ fleet.command("accept").argument("<name>", "the registered project name").argume
|
|
|
169
169
|
"Accept a project's finding as a known trade-off \u2014 corp ledgers persist beside the manifest"
|
|
170
170
|
).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(
|
|
171
171
|
(name, id, _opts, cmd) => action(async () => {
|
|
172
|
-
const { accept } = await import('./fleet-
|
|
172
|
+
const { accept } = await import('./fleet-Q6J5XIHH.js');
|
|
173
173
|
const opts = cmd.optsWithGlobals();
|
|
174
174
|
await accept({ cwd: resolveCwd(cmd), manifest: opts.manifest, name, id, reason: opts.reason });
|
|
175
175
|
})
|
|
@@ -191,7 +191,7 @@ program.command("screen").description(
|
|
|
191
191
|
);
|
|
192
192
|
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(
|
|
193
193
|
(opts, cmd) => action(async () => {
|
|
194
|
-
const { run } = await import('./gates-
|
|
194
|
+
const { run } = await import('./gates-T5J3H7WL.js');
|
|
195
195
|
await run({ cwd: resolveCwd(cmd), ci: opts.ci, yes: opts.yes });
|
|
196
196
|
})
|
|
197
197
|
);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { run } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
import { run } from './chunk-WOBHQQ6H.js';
|
|
3
|
+
import './chunk-WUGBAW6Z.js';
|
|
4
4
|
import './chunk-LT67FU2Y.js';
|
|
5
5
|
import './chunk-WWBF4Y7K.js';
|
|
6
6
|
import './chunk-NMZ3RHWW.js';
|
|
7
7
|
import './chunk-TADKOW6P.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import './chunk-7MOBQ4N5.js';
|
|
9
|
+
import './chunk-B3SUTZVY.js';
|
|
10
10
|
import './chunk-R74SJ7HS.js';
|
|
11
11
|
import './chunk-CRJHIXJH.js';
|
|
12
12
|
import './chunk-YLNQQZ5F.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { dismiss, accept } from './chunk-MMPV67FW.js';
|
|
3
|
-
import { parseFailOnTier, meetsFailOn, runAudit } from './chunk-
|
|
3
|
+
import { parseFailOnTier, meetsFailOn, runAudit } from './chunk-WUGBAW6Z.js';
|
|
4
4
|
import './chunk-LT67FU2Y.js';
|
|
5
5
|
import { readLedger } from './chunk-WWBF4Y7K.js';
|
|
6
6
|
import { DEFAULT_CONFIG } from './chunk-NMZ3RHWW.js';
|
|
7
7
|
import { print, theme, section, renderFleetRows, renderFleetNotes, renderFindings, TIER_BADGE, glyph } from './chunk-TADKOW6P.js';
|
|
8
|
-
import { scanProject } from './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import { scanProject } from './chunk-7MOBQ4N5.js';
|
|
9
|
+
import './chunk-B3SUTZVY.js';
|
|
10
10
|
import { ETYMD_DIR } from './chunk-R74SJ7HS.js';
|
|
11
11
|
import './chunk-CRJHIXJH.js';
|
|
12
12
|
import { readText, pathExists, git, isDirectory } from './chunk-YLNQQZ5F.js';
|
|
@@ -688,7 +688,7 @@ async function checkCorpEmails(manifest, findings, disclosures) {
|
|
|
688
688
|
}
|
|
689
689
|
async function checkGateDrift(manifest, findings, disclosures) {
|
|
690
690
|
const { planWorkflow } = await import('./generate-I75IEXXF.js');
|
|
691
|
-
const { scanProject: scanProject2 } = await import('./scan-
|
|
691
|
+
const { scanProject: scanProject2 } = await import('./scan-IY3LCBJ6.js');
|
|
692
692
|
const { readConfig } = await import('./config-MX7OYI7F.js');
|
|
693
693
|
for (const entry of manifest.entries) {
|
|
694
694
|
const root = entry.resolvedRoot;
|
|
@@ -3,8 +3,8 @@ import { applyFiles } from './chunk-EF6BPBG6.js';
|
|
|
3
3
|
import { derivedCommands, planWorkflow, runPrefix, isSafeGateCommand } from './chunk-VFUYQLW7.js';
|
|
4
4
|
import { readConfig, CONFIG_FILE, configPath } from './chunk-NMZ3RHWW.js';
|
|
5
5
|
import { section, print, glyph, theme, renderPlan } from './chunk-TADKOW6P.js';
|
|
6
|
-
import { scanProject } from './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import { scanProject } from './chunk-7MOBQ4N5.js';
|
|
7
|
+
import './chunk-B3SUTZVY.js';
|
|
8
8
|
import './chunk-R74SJ7HS.js';
|
|
9
9
|
import './chunk-CRJHIXJH.js';
|
|
10
10
|
import { readText, git } from './chunk-YLNQQZ5F.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -279,6 +279,13 @@ interface Finding {
|
|
|
279
279
|
id: string;
|
|
280
280
|
lens: string;
|
|
281
281
|
tier: FindingTier;
|
|
282
|
+
/**
|
|
283
|
+
* Whether this finding is an objective truth (the repo is lying) or an improvement opinion
|
|
284
|
+
* (something worth doing). Lives ON THE FINDING, not the lens: a lens can emit both kinds —
|
|
285
|
+
* gate-integrity is an improvement lens, but "hooks-not-wired" is an objective truth a `doctor`
|
|
286
|
+
* run must not skip. Defaulted from the lens kind when a finding does not set its own.
|
|
287
|
+
*/
|
|
288
|
+
kind?: LensKind;
|
|
282
289
|
/** One sentence: what is wrong / missing. */
|
|
283
290
|
claim: string;
|
|
284
291
|
/** File paths, job names, or metrics that ground the claim. Never empty. */
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ var init_package = __esm({
|
|
|
29
29
|
"package.json"() {
|
|
30
30
|
package_default = {
|
|
31
31
|
name: "etymd",
|
|
32
|
-
version: "0.3.
|
|
32
|
+
version: "0.3.2",
|
|
33
33
|
description: "Keep your agent instructions true \u2014 verify AGENTS.md, CLAUDE.md, rules & skills against the actual repo, with drift caught over time and a regression ledger.",
|
|
34
34
|
keywords: [
|
|
35
35
|
"cli",
|
|
@@ -1806,6 +1806,7 @@ function deriveGateFindings(inv, disclosures = []) {
|
|
|
1806
1806
|
finding({
|
|
1807
1807
|
id: `${LENS_ID2}/hooks-not-wired`,
|
|
1808
1808
|
tier: "risk",
|
|
1809
|
+
kind: "truth",
|
|
1809
1810
|
claim: "Tracked .githooks/ exist but git core.hooksPath is unset \u2014 the hooks never run",
|
|
1810
1811
|
evidence: [".githooks/"],
|
|
1811
1812
|
why: "Every check in those hooks is silently skipped on this clone.",
|
|
@@ -2769,9 +2770,7 @@ async function runAudit(root, opts = {}) {
|
|
|
2769
2770
|
};
|
|
2770
2771
|
}
|
|
2771
2772
|
const profile = baseline?.profile ?? deriveProfile(facts);
|
|
2772
|
-
const selected = LENSES.filter(
|
|
2773
|
-
(lens) => (!opts.kind || lens.kind === opts.kind) && (!opts.lensIds || opts.lensIds.includes(lens.id))
|
|
2774
|
-
);
|
|
2773
|
+
const selected = LENSES.filter((lens) => !opts.lensIds || opts.lensIds.includes(lens.id));
|
|
2775
2774
|
const reports = [];
|
|
2776
2775
|
for (const lens of selected) {
|
|
2777
2776
|
try {
|
|
@@ -2789,11 +2788,12 @@ async function runAudit(root, opts = {}) {
|
|
|
2789
2788
|
});
|
|
2790
2789
|
}
|
|
2791
2790
|
}
|
|
2792
|
-
const all = reports.flatMap((r) => r.findings);
|
|
2791
|
+
const all = reports.flatMap((r) => r.findings.map((f) => ({ ...f, kind: f.kind ?? r.kind })));
|
|
2792
|
+
const visible = opts.kind ? all.filter((f) => f.kind === opts.kind) : all;
|
|
2793
2793
|
const previous = await readLedger(ledgerRoot);
|
|
2794
2794
|
const outOfScope = reports.flatMap((r) => r.outOfScope ?? []);
|
|
2795
2795
|
const { ledger, diff } = reconcileLedger(previous, all, void 0, outOfScope);
|
|
2796
|
-
const fullRun =
|
|
2796
|
+
const fullRun = !opts.kind && !opts.lensIds;
|
|
2797
2797
|
const ledgerWritable = !opts.readOnlyRoot || ledgerRoot !== root;
|
|
2798
2798
|
if ((opts.persistLedger ?? true) && fullRun && ledgerWritable) {
|
|
2799
2799
|
await writeLedger(ledgerRoot, ledger);
|
|
@@ -2804,7 +2804,7 @@ async function runAudit(root, opts = {}) {
|
|
|
2804
2804
|
baseline,
|
|
2805
2805
|
config,
|
|
2806
2806
|
reports,
|
|
2807
|
-
findings: rankFindings(visibleFindings(
|
|
2807
|
+
findings: rankFindings(visibleFindings(visible, previous)),
|
|
2808
2808
|
ledger,
|
|
2809
2809
|
diff
|
|
2810
2810
|
};
|
|
@@ -3,8 +3,8 @@ import { applyFiles } from './chunk-EF6BPBG6.js';
|
|
|
3
3
|
import { planWorkflow } from './chunk-VFUYQLW7.js';
|
|
4
4
|
import './chunk-NMZ3RHWW.js';
|
|
5
5
|
import { theme, renderFacts, print, renderPlan, section, glyph } from './chunk-TADKOW6P.js';
|
|
6
|
-
import { scanProject } from './chunk-
|
|
7
|
-
import { VERSION } from './chunk-
|
|
6
|
+
import { scanProject } from './chunk-7MOBQ4N5.js';
|
|
7
|
+
import { VERSION } from './chunk-B3SUTZVY.js';
|
|
8
8
|
import { writeCachedFacts, deriveProfile, writeBaseline, CACHE_DIR } from './chunk-R74SJ7HS.js';
|
|
9
9
|
import { PACK_VERSION } from './chunk-CRJHIXJH.js';
|
|
10
10
|
import { git, readText } from './chunk-YLNQQZ5F.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { print, renderFacts, theme } from './chunk-TADKOW6P.js';
|
|
3
|
-
import { scanProject } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { scanProject } from './chunk-7MOBQ4N5.js';
|
|
4
|
+
import './chunk-B3SUTZVY.js';
|
|
5
5
|
import { writeCachedFacts } from './chunk-R74SJ7HS.js';
|
|
6
6
|
import './chunk-CRJHIXJH.js';
|
|
7
7
|
import './chunk-YLNQQZ5F.js';
|
package/package.json
CHANGED