@hawkeyexl/manni 4.3.1 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/dist/batch-GFNLTGOH.js +36 -0
- package/dist/build-COYIQ25L.js +31 -0
- package/dist/calibrate-MDBLJKEE.js +31 -0
- package/dist/capture-LRML2PKV.js +32 -0
- package/dist/check-ASPIHA6B.js +40 -0
- package/dist/check-ASPIHA6B.js.map +1 -0
- package/dist/check-EDLBYL5N.js +27 -0
- package/dist/check-EDLBYL5N.js.map +1 -0
- package/dist/check-HYNGXYJV.js +18 -0
- package/dist/check-HYNGXYJV.js.map +1 -0
- package/dist/chunk-2B7ZNTPV.js +230 -0
- package/dist/chunk-2B7ZNTPV.js.map +1 -0
- package/dist/chunk-2H7UOFLK.js +11 -0
- package/dist/chunk-2H7UOFLK.js.map +1 -0
- package/dist/chunk-37LP5HMZ.js +1042 -0
- package/dist/chunk-37LP5HMZ.js.map +1 -0
- package/dist/chunk-3VK37OR2.js +2957 -0
- package/dist/chunk-3VK37OR2.js.map +1 -0
- package/dist/chunk-4IUC2MNL.js +2165 -0
- package/dist/chunk-4IUC2MNL.js.map +1 -0
- package/dist/{chunk-3R23C5DT.js → chunk-4TSWU2SU.js} +2 -14
- package/dist/chunk-4TSWU2SU.js.map +1 -0
- package/dist/chunk-57NEQRVO.js +10921 -0
- package/dist/chunk-57NEQRVO.js.map +1 -0
- package/dist/chunk-6JSSEWBG.js +6737 -0
- package/dist/chunk-6JSSEWBG.js.map +1 -0
- package/dist/chunk-6OYEI2VV.js +88 -0
- package/dist/chunk-6OYEI2VV.js.map +1 -0
- package/dist/chunk-77AINBYM.js +19 -0
- package/dist/chunk-77AINBYM.js.map +1 -0
- package/dist/chunk-7UKO3ASZ.js +54 -0
- package/dist/chunk-7UKO3ASZ.js.map +1 -0
- package/dist/chunk-A5ULMVHQ.js +164 -0
- package/dist/chunk-A5ULMVHQ.js.map +1 -0
- package/dist/chunk-C4SQM22E.js +299 -0
- package/dist/chunk-C4SQM22E.js.map +1 -0
- package/dist/chunk-CK7SKVHR.js +1042 -0
- package/dist/chunk-CK7SKVHR.js.map +1 -0
- package/dist/{chunk-G5CM2VGQ.js → chunk-DXNZS72W.js} +8 -94
- package/dist/chunk-DXNZS72W.js.map +1 -0
- package/dist/chunk-EPH54CAY.js +374 -0
- package/dist/chunk-EPH54CAY.js.map +1 -0
- package/dist/{chunk-KJR7OVDX.js → chunk-FBEQCK47.js} +56 -137
- package/dist/chunk-FBEQCK47.js.map +1 -0
- package/dist/{chunk-IOYXPBCL.js → chunk-G3T47CFV.js} +1 -7
- package/dist/{chunk-IOYXPBCL.js.map → chunk-G3T47CFV.js.map} +1 -1
- package/dist/chunk-GCQRPUSB.js +1287 -0
- package/dist/chunk-GCQRPUSB.js.map +1 -0
- package/dist/chunk-GLP5PSXB.js +72 -0
- package/dist/chunk-GLP5PSXB.js.map +1 -0
- package/dist/chunk-I2AH3CJJ.js +1192 -0
- package/dist/chunk-I2AH3CJJ.js.map +1 -0
- package/dist/chunk-IDV6HJCB.js +388 -0
- package/dist/chunk-IDV6HJCB.js.map +1 -0
- package/dist/chunk-IKEWBMCN.js +98 -0
- package/dist/chunk-IKEWBMCN.js.map +1 -0
- package/dist/chunk-JCDXE76J.js +52 -0
- package/dist/chunk-JCDXE76J.js.map +1 -0
- package/dist/chunk-JXLTXMJ7.js +455 -0
- package/dist/chunk-JXLTXMJ7.js.map +1 -0
- package/dist/chunk-LJ2RDH3F.js +49 -0
- package/dist/chunk-LJ2RDH3F.js.map +1 -0
- package/dist/chunk-M2JCK5F6.js +805 -0
- package/dist/chunk-M2JCK5F6.js.map +1 -0
- package/dist/chunk-M3W7J6MU.js +4398 -0
- package/dist/chunk-M3W7J6MU.js.map +1 -0
- package/dist/chunk-MMTSSTG7.js +23 -0
- package/dist/chunk-MMTSSTG7.js.map +1 -0
- package/dist/chunk-MNH7QO4Z.js +15 -0
- package/dist/chunk-MNH7QO4Z.js.map +1 -0
- package/dist/chunk-MWJLZMBL.js +934 -0
- package/dist/chunk-MWJLZMBL.js.map +1 -0
- package/dist/chunk-MYMBCTDE.js +387 -0
- package/dist/chunk-MYMBCTDE.js.map +1 -0
- package/dist/chunk-NCPWXHDO.js +683 -0
- package/dist/chunk-NCPWXHDO.js.map +1 -0
- package/dist/chunk-NLXTXE5Y.js +1661 -0
- package/dist/chunk-NLXTXE5Y.js.map +1 -0
- package/dist/{chunk-CFDUZRM2.js → chunk-NXV7WE2D.js} +32 -240
- package/dist/chunk-NXV7WE2D.js.map +1 -0
- package/dist/chunk-OWBRDNRZ.js +16 -0
- package/dist/chunk-OWBRDNRZ.js.map +1 -0
- package/dist/{chunk-KTSJ2ZHA.js → chunk-PAU352SV.js} +5 -3
- package/dist/{chunk-KTSJ2ZHA.js.map → chunk-PAU352SV.js.map} +1 -1
- package/dist/chunk-PCE7QHXJ.js +68 -0
- package/dist/chunk-PCE7QHXJ.js.map +1 -0
- package/dist/chunk-PIKOVN6W.js +1651 -0
- package/dist/chunk-PIKOVN6W.js.map +1 -0
- package/dist/chunk-PNPQTHBT.js +17 -0
- package/dist/chunk-PNPQTHBT.js.map +1 -0
- package/dist/chunk-PU6DFJMY.js +1975 -0
- package/dist/chunk-PU6DFJMY.js.map +1 -0
- package/dist/chunk-Q35YIDBV.js +1202 -0
- package/dist/chunk-Q35YIDBV.js.map +1 -0
- package/dist/{chunk-5HNHEUD5.js → chunk-QQUKGCAJ.js} +3 -3
- package/dist/chunk-QRWGPQKO.js +198 -0
- package/dist/chunk-QRWGPQKO.js.map +1 -0
- package/dist/{chunk-UBMMXS2Y.js → chunk-QZ6LRSNV.js} +69 -48
- package/dist/{chunk-UBMMXS2Y.js.map → chunk-QZ6LRSNV.js.map} +1 -1
- package/dist/chunk-RL5XWQOL.js +3872 -0
- package/dist/chunk-RL5XWQOL.js.map +1 -0
- package/dist/chunk-RNVYGWIC.js +30 -0
- package/dist/chunk-RNVYGWIC.js.map +1 -0
- package/dist/chunk-SE4JN5XN.js +19 -0
- package/dist/chunk-SE4JN5XN.js.map +1 -0
- package/dist/chunk-SKSDRUUK.js +622 -0
- package/dist/chunk-SKSDRUUK.js.map +1 -0
- package/dist/chunk-TIUTIOFB.js +25 -0
- package/dist/chunk-TIUTIOFB.js.map +1 -0
- package/dist/chunk-TK3FC4RF.js +3090 -0
- package/dist/chunk-TK3FC4RF.js.map +1 -0
- package/dist/chunk-TU2WUBVZ.js +2 -0
- package/dist/chunk-TU2WUBVZ.js.map +1 -0
- package/dist/chunk-TZOYZK2E.js +98 -0
- package/dist/chunk-TZOYZK2E.js.map +1 -0
- package/dist/chunk-UJCVAWP7.js +178 -0
- package/dist/chunk-UJCVAWP7.js.map +1 -0
- package/dist/chunk-UKZNLVJW.js +17 -0
- package/dist/chunk-UKZNLVJW.js.map +1 -0
- package/dist/{chunk-HAPTXWU2.js → chunk-UQISLDAV.js} +4 -4
- package/dist/chunk-WB3QM6PP.js +5440 -0
- package/dist/chunk-WB3QM6PP.js.map +1 -0
- package/dist/chunk-YB4IBW3M.js +96 -0
- package/dist/chunk-YB4IBW3M.js.map +1 -0
- package/dist/chunk-YEUYKR62.js +72 -0
- package/dist/chunk-YEUYKR62.js.map +1 -0
- package/dist/chunk-YJOGUXGP.js +634 -0
- package/dist/chunk-YJOGUXGP.js.map +1 -0
- package/dist/chunk-YNHZHSSM.js +41 -0
- package/dist/chunk-YNHZHSSM.js.map +1 -0
- package/dist/chunk-YTURO7SI.js +979 -0
- package/dist/chunk-YTURO7SI.js.map +1 -0
- package/dist/chunk-ZXRAE55H.js +31 -0
- package/dist/chunk-ZXRAE55H.js.map +1 -0
- package/dist/cli-3BIBYHFK.js +473 -0
- package/dist/cli-3BIBYHFK.js.map +1 -0
- package/dist/cli-673OTRGE.js +28 -0
- package/dist/cli-673OTRGE.js.map +1 -0
- package/dist/cli-6HIDIFVT.js +1203 -0
- package/dist/cli-6HIDIFVT.js.map +1 -0
- package/dist/cli-6UB5N6CU.js +232 -0
- package/dist/cli-6UB5N6CU.js.map +1 -0
- package/dist/cli-LFP5ZGYS.js +346 -0
- package/dist/cli-LFP5ZGYS.js.map +1 -0
- package/dist/cli-MN7PYMBI.js +552 -0
- package/dist/cli-MN7PYMBI.js.map +1 -0
- package/dist/cli-PYPX6O6E.js +739 -0
- package/dist/cli-PYPX6O6E.js.map +1 -0
- package/dist/cli-RPM5PELX.js +626 -0
- package/dist/cli-RPM5PELX.js.map +1 -0
- package/dist/cli-VI7VHWNZ.js +423 -0
- package/dist/cli-VI7VHWNZ.js.map +1 -0
- package/dist/cli.d.ts +12 -2
- package/dist/cli.js +109 -7661
- package/dist/cli.js.map +1 -1
- package/dist/docmeta.js +15 -3
- package/dist/docmeta.js.map +1 -1
- package/dist/github-6QMYOHC3.js +27 -0
- package/dist/github-6QMYOHC3.js.map +1 -0
- package/dist/github-SXPGP5DB.js +32 -0
- package/dist/github-SXPGP5DB.js.map +1 -0
- package/dist/index.d.ts +65 -3
- package/dist/index.js +407 -337
- package/dist/index.js.map +1 -1
- package/dist/json-7WV7KL6H.js +17 -0
- package/dist/json-7WV7KL6H.js.map +1 -0
- package/dist/json-SY7KLNC7.js +35 -0
- package/dist/json-SY7KLNC7.js.map +1 -0
- package/dist/lint-ASMJLLPA.js +28 -0
- package/dist/lint-ASMJLLPA.js.map +1 -0
- package/dist/list-KZNVTNVC.js +31 -0
- package/dist/list-KZNVTNVC.js.map +1 -0
- package/dist/list-Q57YTFUQ.js +29 -0
- package/dist/list-Q57YTFUQ.js.map +1 -0
- package/dist/page-KSGV5RD4.js +41 -0
- package/dist/page-KSGV5RD4.js.map +1 -0
- package/dist/picker-3XF36MJF.js +14 -0
- package/dist/picker-3XF36MJF.js.map +1 -0
- package/dist/pretty-A5EGTN35.js +37 -0
- package/dist/pretty-A5EGTN35.js.map +1 -0
- package/dist/pretty-CXSDXNAS.js +43 -0
- package/dist/pretty-CXSDXNAS.js.map +1 -0
- package/dist/reporters-HUY7UXFS.js +42 -0
- package/dist/reporters-HUY7UXFS.js.map +1 -0
- package/dist/reporters-K2VUKSAK.js +71 -0
- package/dist/reporters-K2VUKSAK.js.map +1 -0
- package/dist/reporters-M6LJ2IYU.js +21 -0
- package/dist/reporters-M6LJ2IYU.js.map +1 -0
- package/dist/run-3DYJNRIG.js +33 -0
- package/dist/run-3DYJNRIG.js.map +1 -0
- package/dist/term-BIQUPMOR.js +1592 -0
- package/dist/term-BIQUPMOR.js.map +1 -0
- package/dist/types-Y6TXHM7M.js +10 -0
- package/dist/types-Y6TXHM7M.js.map +1 -0
- package/dist/validate-53RKM2XG.js +16 -0
- package/dist/validate-53RKM2XG.js.map +1 -0
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +9 -0
- package/plugin/manni/hooks/hooks.json +69 -0
- package/plugin/manni/hooks/manni.mjs +157 -0
- package/plugin/manni/skills/check/SKILL.md +20 -0
- package/plugin/manni/skills/evals/SKILL.md +27 -0
- package/plugin/manni/skills/fix/SKILL.md +56 -0
- package/plugin/manni/skills/setup/SKILL.md +41 -0
- package/dist/batch-A5HZKYIW.js +0 -18
- package/dist/calibrate-S5K6QHUY.js +0 -13
- package/dist/capture-OZEZDABQ.js +0 -15
- package/dist/chunk-3R23C5DT.js.map +0 -1
- package/dist/chunk-CFDUZRM2.js.map +0 -1
- package/dist/chunk-G5CM2VGQ.js.map +0 -1
- package/dist/chunk-KJR7OVDX.js.map +0 -1
- package/dist/chunk-V4KUVE47.js +0 -27170
- package/dist/chunk-V4KUVE47.js.map +0 -1
- package/dist/chunk-ZQBTK3DO.js +0 -26518
- package/dist/chunk-ZQBTK3DO.js.map +0 -1
- package/dist/picker-6HRMETE7.js +0 -12
- package/plugin/tracevals/.claude-plugin/plugin.json +0 -9
- package/plugin/tracevals/hooks/hooks.json +0 -17
- /package/dist/{batch-A5HZKYIW.js.map → batch-GFNLTGOH.js.map} +0 -0
- /package/dist/{calibrate-S5K6QHUY.js.map → build-COYIQ25L.js.map} +0 -0
- /package/dist/{capture-OZEZDABQ.js.map → calibrate-MDBLJKEE.js.map} +0 -0
- /package/dist/{picker-6HRMETE7.js.map → capture-LRML2PKV.js.map} +0 -0
- /package/dist/{chunk-5HNHEUD5.js.map → chunk-QQUKGCAJ.js.map} +0 -0
- /package/dist/{chunk-HAPTXWU2.js.map → chunk-UQISLDAV.js.map} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check
|
|
3
|
+
description: Run manni check over the repository and walk the findings. Use when asked to check, verify or validate the docs, or when a hook reports manni errors.
|
|
4
|
+
allowed-tools: Bash(npx manni *), Bash(node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" *)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Check the docs with manni
|
|
8
|
+
|
|
9
|
+
`manni check` runs every check the repository set up, and nothing else.
|
|
10
|
+
|
|
11
|
+
1. Run `node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" status`. It lists each domain as in play, not set up or not checked.
|
|
12
|
+
2. Run `node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" check`. Add paths to check only those files, as in `manni check docs/limits.md`.
|
|
13
|
+
3. Read the report. Each section names the check that found the problem, such as `meta validate` or `cite check`.
|
|
14
|
+
4. Only errors fail the run. Warnings and notices are information.
|
|
15
|
+
5. For each error, follow the `fix` skill. Do not guess a repair from the message alone.
|
|
16
|
+
6. Run `manni check` again until it exits 0.
|
|
17
|
+
|
|
18
|
+
A skipped check means its domain is not set up. That is not a failure.
|
|
19
|
+
If the report says no config was found, use the `setup` skill.
|
|
20
|
+
Exit code 2 means a check could not run. Read its message and fix the cause before you trust the result.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: evals
|
|
3
|
+
description: Author evals for docs pages or for agent artifacts such as CLAUDE.md, skills and subagents. Use when asked to add, propose or promote evals.
|
|
4
|
+
allowed-tools: Bash(npx manni *), Bash(node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" *)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Author evals
|
|
8
|
+
|
|
9
|
+
Evals declare what a page or an agent artifact must satisfy. Propose them, show the diff, and let the user review.
|
|
10
|
+
|
|
11
|
+
## Pages
|
|
12
|
+
|
|
13
|
+
1. Run `node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" docevals list` to see the evals each page resolves.
|
|
14
|
+
2. Run `manni docevals fill <path>` to have the model propose frontmatter evals. It writes only proposals above the confidence threshold.
|
|
15
|
+
3. Run `manni docevals generate <path>` to write check scripts for command evals that have an assertion but no command.
|
|
16
|
+
4. Run `manni docevals promote` to find model-graded evals that a deterministic check can express. Add `--write` to convert them.
|
|
17
|
+
5. Run `manni docevals run --deterministic-only` to confirm the new evals pass.
|
|
18
|
+
|
|
19
|
+
## Agent artifacts
|
|
20
|
+
|
|
21
|
+
Run `manni tracevals fill <path>` over a skill, a subagent definition or a rules file. It proposes evals in the artifact's `metadata.evals` block.
|
|
22
|
+
`manni tracevals list` shows what the evals cover.
|
|
23
|
+
|
|
24
|
+
## Review
|
|
25
|
+
|
|
26
|
+
Show the user `git diff` of every file an authoring command wrote.
|
|
27
|
+
Do not weaken an assertion so that a page passes. A new eval should fail on the defect it describes.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fix
|
|
3
|
+
description: Repair manni findings in docs. Use after manni check or a hook reports errors in metadata, citations, terms, structure, evals or the graph.
|
|
4
|
+
allowed-tools: Bash(npx manni *), Bash(node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" *)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Repair manni findings
|
|
8
|
+
|
|
9
|
+
Start from the report of `node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" check`. Each section names the check. Match it to a repair below.
|
|
10
|
+
|
|
11
|
+
## Guardrails
|
|
12
|
+
|
|
13
|
+
- Never loosen a schema, a config key or an eval to make a check pass. Fix the page.
|
|
14
|
+
- Never run `manni cite update --accept` before you read the changed source lines.
|
|
15
|
+
- Run `manni check` after every repair. A fix in one domain can break another.
|
|
16
|
+
- If a finding is wrong, stop and tell the user why. Do not hide it.
|
|
17
|
+
|
|
18
|
+
## meta validate
|
|
19
|
+
|
|
20
|
+
The finding names a field path, such as `/description`. Edit the page frontmatter so the field is present and valid.
|
|
21
|
+
|
|
22
|
+
Some fields are managed. Stamp them from history with `node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" meta derive <path>`. Add `--check` to see which are stale without writing.
|
|
23
|
+
Do not hand-edit a managed field. `derive` writes it.
|
|
24
|
+
|
|
25
|
+
## cite check
|
|
26
|
+
|
|
27
|
+
Each finding has a rule id.
|
|
28
|
+
|
|
29
|
+
| Rule | Repair |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `source-moved` | The cited lines moved. Run `manni cite update <path>`. |
|
|
32
|
+
| `claim-moved`, `claim-reanchored` | The sentence moved. Run `manni cite update <path>`. |
|
|
33
|
+
| `source-changed` | The cited source changed since the pin. Read the lines at the current commit. If the sentence is still true, run `manni cite update --accept --only <id> <path>`. If it is not, rewrite the sentence first, then accept. |
|
|
34
|
+
| `source-never-true`, `source-missing`, `source-moved-ambiguous` | Open the source and find the lines the sentence rests on. Fix the pin or the sentence. |
|
|
35
|
+
| `marker-orphan`, `marker-invalid`, `anchor-invalid`, `entry-invalid` | Fix the marker or the entry the finding names. |
|
|
36
|
+
|
|
37
|
+
Preview any rewrite with `--dry-run`. It prints the diffs and writes nothing.
|
|
38
|
+
|
|
39
|
+
## term check
|
|
40
|
+
|
|
41
|
+
The glossary and the `concepts:` pages disagree. Fix the term page or the concept name.
|
|
42
|
+
After you change a term page, run `manni term write` to regenerate any rendered output the repository commits. Add `--check` to see whether it is stale.
|
|
43
|
+
|
|
44
|
+
## lint check
|
|
45
|
+
|
|
46
|
+
Run `manni lint structure <path> --explain` to see which template routed the page and why.
|
|
47
|
+
Then edit the page to meet that template. Change the page `type` only if the routing is wrong.
|
|
48
|
+
|
|
49
|
+
## docevals run
|
|
50
|
+
|
|
51
|
+
An eval failed. Read the eval assertion and the evidence it cites. Fix the page so the assertion holds.
|
|
52
|
+
Do not edit the eval to pass. To change an eval on purpose, use the `evals` skill.
|
|
53
|
+
|
|
54
|
+
## graph check
|
|
55
|
+
|
|
56
|
+
A shape failed. The finding names the node and the property. Fix the frontmatter, the link or the heading it points at.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup
|
|
3
|
+
description: Set up manni in a repository. Use when there is no manni.config.yaml, when the user asks to add manni, or when manni check reports that nothing is set up.
|
|
4
|
+
allowed-tools: Bash(npm *), Bash(npx manni *), Bash(node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" *)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Set up manni
|
|
8
|
+
|
|
9
|
+
Do these steps in order. Ask before you choose anything that changes how the docs are judged.
|
|
10
|
+
|
|
11
|
+
1. Install the package: `npm install --save-dev @hawkeyexl/manni`.
|
|
12
|
+
2. Find the docs. Look for Markdown and MDX folders, such as `docs/`. Ask the user to confirm the paths.
|
|
13
|
+
3. Write `manni.config.yaml` at the repository root with a top-level `collections:` entry for those docs.
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
collections:
|
|
17
|
+
- name: site
|
|
18
|
+
paths:
|
|
19
|
+
- "docs/**/*.{md,mdx}"
|
|
20
|
+
exclude:
|
|
21
|
+
- "docs/drafts/**"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`name` is required and unique. The name `docs` is refused, so pick another. `exclude` is optional.
|
|
25
|
+
|
|
26
|
+
4. Ask which domains to set up. A domain is in play only when its section exists. Offer these:
|
|
27
|
+
|
|
28
|
+
| Domain | What it checks | How to set it up |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| meta | Frontmatter against JSON Schema | Add a `meta:` section with `schemas:`. Run `manni meta schemas` to list the built-in ones. |
|
|
31
|
+
| lint | Page structure against templates | Add a `lint:` section. See `manni lint templates`. |
|
|
32
|
+
| docevals | Evals declared in page frontmatter | Add a `docevals:` section. |
|
|
33
|
+
| graph | The knowledge graph and its SHACL shapes | Run `manni graph init`. It appends a `graph:` section. |
|
|
34
|
+
|
|
35
|
+
Run `manni docevals init` only when no config file exists. It refuses an existing one. With a config in place, write the `docevals:` section by hand.
|
|
36
|
+
Citations and terms need no section. They are in play when the pages carry them.
|
|
37
|
+
|
|
38
|
+
5. Run `node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" status` and show the user the table.
|
|
39
|
+
6. Run `node "${CLAUDE_PLUGIN_ROOT}/hooks/manni.mjs" check`. Report the result and use the `fix` skill for any error.
|
|
40
|
+
|
|
41
|
+
Do not add a section for a domain the user declined. A section that exists turns that domain's checks on.
|
package/dist/batch-A5HZKYIW.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
keepNewerThan,
|
|
4
|
-
parseNewerThan,
|
|
5
|
-
resolveBatchTraces,
|
|
6
|
-
runBatch
|
|
7
|
-
} from "./chunk-KJR7OVDX.js";
|
|
8
|
-
import "./chunk-CFDUZRM2.js";
|
|
9
|
-
import "./chunk-ZQBTK3DO.js";
|
|
10
|
-
import "./chunk-3R23C5DT.js";
|
|
11
|
-
import "./chunk-IOYXPBCL.js";
|
|
12
|
-
export {
|
|
13
|
-
keepNewerThan,
|
|
14
|
-
parseNewerThan,
|
|
15
|
-
resolveBatchTraces,
|
|
16
|
-
runBatch
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=batch-A5HZKYIW.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
runCalibrate
|
|
4
|
-
} from "./chunk-HAPTXWU2.js";
|
|
5
|
-
import "./chunk-KJR7OVDX.js";
|
|
6
|
-
import "./chunk-CFDUZRM2.js";
|
|
7
|
-
import "./chunk-ZQBTK3DO.js";
|
|
8
|
-
import "./chunk-3R23C5DT.js";
|
|
9
|
-
import "./chunk-IOYXPBCL.js";
|
|
10
|
-
export {
|
|
11
|
-
runCalibrate
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=calibrate-S5K6QHUY.js.map
|
package/dist/capture-OZEZDABQ.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
renderCapture,
|
|
4
|
-
runCapture
|
|
5
|
-
} from "./chunk-G5CM2VGQ.js";
|
|
6
|
-
import "./chunk-5HNHEUD5.js";
|
|
7
|
-
import "./chunk-CFDUZRM2.js";
|
|
8
|
-
import "./chunk-ZQBTK3DO.js";
|
|
9
|
-
import "./chunk-3R23C5DT.js";
|
|
10
|
-
import "./chunk-IOYXPBCL.js";
|
|
11
|
-
export {
|
|
12
|
-
renderCapture,
|
|
13
|
-
runCapture
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=capture-OZEZDABQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tracevals/trace/discover.ts","../src/tracevals/types.ts"],"sourcesContent":["/**\n * Session-store discovery: find Claude Code trace files for a project (or all\n * projects) in Claude Code's own config directory.\n *\n * The location is detected, not configured: `CLAUDE_CONFIG_DIR` is Claude\n * Code's variable for that directory, so a session that has moved it is\n * followed without tracevals adding a switch of its own, and a test or CI job\n * points at a fixture tree with the same variable the agent itself reads.\n */\nimport { open, readdir, stat } from \"node:fs/promises\";\nimport { homedir } from \"node:os\";\nimport { join, resolve } from \"node:path\";\n\nexport interface TraceListing {\n /** Absolute path of the trace file. */\n file: string;\n mtimeMs: number;\n sizeBytes: number;\n sessionId?: string;\n /** The cwd recorded in the session, when readable. */\n project?: string;\n /** First non-sidechain user prompt, for identification in lists. */\n firstPrompt?: string;\n}\n\nexport interface DiscoverOptions {\n /** Project directory to scope to (its session-store slug is scanned). */\n project?: string;\n /** Scan every project directory in the store. */\n allProjects?: boolean;\n /** Maximum entries returned, applied after newest-first sorting. */\n limit?: number;\n env?: Record<string, string | undefined>;\n}\n\n/** Claude Code's project-slug rule: every non-alphanumeric character → `-`. */\nexport function slugFor(cwd: string): string {\n return cwd.replace(/[^a-zA-Z0-9]/g, \"-\");\n}\n\n/**\n * Claude Code's config directory: `CLAUDE_CONFIG_DIR` when it is set, and\n * `~/.claude` otherwise. Everything the agent keeps per user — `projects/`,\n * `skills/`, `agents/`, `commands/`, `plugins/` — hangs off it.\n */\nexport function configDir(\n env: Record<string, string | undefined> = process.env,\n): string {\n const configured = env.CLAUDE_CONFIG_DIR;\n if (configured) return resolve(configured);\n return join(homedir(), \".claude\");\n}\n\nexport async function discoverTraces(\n options: DiscoverOptions = {},\n): Promise<TraceListing[]> {\n const store = join(configDir(options.env), \"projects\");\n\n let projectDirs: string[];\n if (options.allProjects) {\n try {\n const entries = await readdir(store, { withFileTypes: true });\n projectDirs = entries\n .filter((e) => e.isDirectory())\n .map((e) => join(store, e.name));\n } catch {\n return [];\n }\n } else {\n const project = options.project ?? process.cwd();\n projectDirs = [join(store, slugFor(project))];\n }\n\n const listings: TraceListing[] = [];\n for (const dir of projectDirs) {\n let names: string[];\n try {\n names = (await readdir(dir)).filter((n) => n.endsWith(\".jsonl\"));\n } catch {\n continue;\n }\n for (const name of names) {\n const file = join(dir, name);\n try {\n const info = await stat(file);\n listings.push({\n file,\n mtimeMs: info.mtimeMs,\n sizeBytes: info.size,\n ...(await summarizeTrace(file)),\n });\n } catch {\n continue;\n }\n }\n }\n\n listings.sort((a, b) => b.mtimeMs - a.mtimeMs);\n return options.limit !== undefined\n ? listings.slice(0, options.limit)\n : listings;\n}\n\n/** Bytes read from the head of a session file when summarizing for a list. */\nconst SUMMARY_WINDOW = 256 * 1024;\n\n/** Read only the first `bytes` of a file — session files run to many MB. */\nasync function readHead(file: string, bytes: number): Promise<string | null> {\n let handle;\n try {\n handle = await open(file, \"r\");\n const buffer = Buffer.alloc(bytes);\n const { bytesRead } = await handle.read(buffer, 0, bytes, 0);\n return buffer.toString(\"utf-8\", 0, bytesRead);\n } catch {\n return null;\n } finally {\n await handle?.close();\n }\n}\n\nasync function summarizeTrace(\n file: string,\n): Promise<Pick<TraceListing, \"sessionId\" | \"project\" | \"firstPrompt\">> {\n const content = await readHead(file, SUMMARY_WINDOW);\n if (content === null) return {};\n\n const summary: Pick<TraceListing, \"sessionId\" | \"project\" | \"firstPrompt\"> =\n {};\n for (const line of content.split(\"\\n\")) {\n const trimmed = line.trim();\n if (!trimmed) continue;\n let parsed: unknown;\n try {\n parsed = JSON.parse(trimmed);\n } catch {\n continue;\n }\n // A bare `null`, number or string is valid JSON but no record. The same\n // guard `detect.ts` uses: skip the line rather than let a property read\n // throw and drop the whole file from the listing.\n if (typeof parsed !== \"object\" || parsed === null) continue;\n const rec = parsed as Record<string, unknown>;\n if (summary.sessionId === undefined) {\n const id = rec.sessionId ?? rec.session_id;\n if (typeof id === \"string\") summary.sessionId = id;\n }\n if (summary.project === undefined && typeof rec.cwd === \"string\") {\n summary.project = rec.cwd;\n }\n if (\n summary.firstPrompt === undefined &&\n rec.type === \"user\" &&\n rec.isSidechain !== true\n ) {\n const message = rec.message as Record<string, unknown> | undefined;\n const content = message?.content;\n if (typeof content === \"string\" && !content.startsWith(\"<command-\")) {\n summary.firstPrompt = content.split(\"\\n\")[0]?.slice(0, 200);\n }\n }\n if (summary.sessionId && summary.project && summary.firstPrompt) break;\n }\n return summary;\n}\n","/** Shared result model and errors for manni tracevals. */\nimport type { ConsensusResult } from \"@hawkeyexl/inference\";\nimport type {\n AvailabilityReport,\n CoverageEntry,\n} from \"./artifacts/types.js\";\nimport type { ArtifactType } from \"./artifacts/types.js\";\nimport type { ManifestReport } from \"./capture/types.js\";\nimport type { Finding } from \"./graders/types.js\";\nimport { ToolError } from \"../shared/errors.js\";\n\n/**\n * Operational error: bad usage, unreadable input, unknown format. Exits 2.\n * A `ToolError`, so the shared bin runner prints it as one line.\n */\nexport class TracevalsError extends ToolError {\n constructor(message: string) {\n super(message);\n this.name = \"TracevalsError\";\n }\n}\n\nexport type Outcome = \"pass\" | \"fail\" | \"error\" | \"needs-review\" | \"skipped\";\n\nexport interface EvalResult {\n evalName: string;\n /** Path of the artifact the eval came from. */\n artifact: string;\n artifactName: string;\n artifactType: ArtifactType;\n grader: string;\n implicit: boolean;\n /**\n * Where the eval is declared: the item of `metadata.evals` that names it, in\n * the artifact or in the manifest that supplied the block (proposal 0037).\n * `file` is relative to the working directory and forward-slashed when it is\n * inside it, absolute when it is not, and a URL for a hosted manifest.\n * `line` is 1-based, and absent when nothing records one, as for the\n * implicit eval, which no entry declares.\n */\n location: { file: string; line?: number };\n outcome: Outcome;\n /** Present for deterministic evals that produced findings. */\n findings?: Finding[];\n /** Present for judged evals. */\n consensus?: ConsensusResult;\n error?: string;\n skipReason?: string;\n /**\n * Judged evals only: uncached ensemble runs this eval spent. `0` when the\n * ensemble came from cache, or when the turn budget stopped it.\n */\n turns?: number;\n /**\n * Set when the model that judged this eval also produced what it graded.\n *\n * `session` — the judge model is the model that ran the session. This is the\n * sharpest form of the bias in either manni tool: the judge is not being\n * asked about a document it happened to draft, it is being asked whether its\n * own behavior followed the rules. `criterion` — `meta-provenance` records\n * this model proposing this assertion, so the judge wrote the question.\n *\n * Reported, never fatal: bias skews a verdict, it does not stop one forming,\n * and erroring would punish a single-model setup with no second provider to\n * reach for.\n */\n selfPreference?: { axis: \"session\" | \"criterion\"; model: string };\n /**\n * The eval's weight in the run's pass rate. Never changes its own outcome —\n * the binary verdict is what the reporters and exit code consume.\n */\n weight?: number;\n durationMs: number;\n}\n\nexport interface RunSummary {\n total: number;\n pass: number;\n fail: number;\n error: number;\n needsReview: number;\n skipped: number;\n /**\n * Weighted share of the graded set that passed, 1 when nothing was graded.\n *\n * The graded set is pass + fail + error; `needs-review` and `skipped` are in\n * neither half, so a session awaiting review neither helps nor hurts. Each\n * eval contributes its `weight` (1 unless it says otherwise), which is what\n * lets a secondary check report without dominating.\n *\n * Reported, never gated: manni tracevals has no suite targets to compare it\n * against, and inventing an exit-code rule around a number nobody configured\n * would be a gate no one asked for.\n */\n passRate: number;\n}\n\nexport interface RunReport {\n trace: {\n file: string;\n source: string;\n sessionId?: string;\n cwd: string;\n model?: string;\n turnCount: number;\n };\n /** Trace + resolution warnings, surfaced in every format. */\n warnings: string[];\n coverage: CoverageEntry[];\n /**\n * Offered versus used (ADR 01016). An observation about the session's\n * configuration; it never contributes to `summary` or `exitCode`.\n */\n availability: AvailabilityReport;\n /**\n * The session manifest this run consulted (ADR 01024), when one was found.\n * Absent means no manifest existed, which is the ordinary case — every hash\n * check then reports `skipped` and staleness stays the mtime heuristic.\n * Like `availability`, an observation: never in `summary`, never in\n * `exitCode`.\n */\n manifest?: ManifestReport;\n evalResults: EvalResult[];\n summary: RunSummary;\n /** 0 pass, 1 any fail/error (and needs-review when failOnReview). */\n exitCode: 0 | 1;\n /** Uncached ensemble runs this run spent. See `judge.maxTurns`. */\n turns: number;\n durationMs: number;\n}\n\n/* -------------------------------------------------------------------------- *\n * Batch runs (ADR 01018)\n *\n * Adherence is a rate across sessions, not a single verdict. `BatchReport`\n * sits alongside `RunReport` rather than replacing it: naming one trace still\n * yields exactly the `RunReport` above, byte for byte.\n * -------------------------------------------------------------------------- */\n\n/** Outcome tallies for one aggregate row. */\nexport interface AggregateCounts {\n pass: number;\n fail: number;\n error: number;\n needsReview: number;\n skipped: number;\n}\n\n/**\n * One artifact, or one eval within it, summed over every trace in the batch.\n *\n * Keyed by type and *name* rather than by path, so the same skill evaluated\n * across several projects is one rate — which is the fleet question this\n * report exists to answer. The paths it resolved from are kept in `artifacts`\n * so a reader can see when a row spans more than one.\n */\nexport interface AggregateRow {\n /** `<type>:<name>` for an artifact row, plus `::<evalName>` for an eval row. */\n key: string;\n artifactName: string;\n artifactType: ArtifactType;\n /** Distinct resolved paths this row was aggregated from, sorted. */\n artifacts: string[];\n /** Absent on artifact rows. */\n evalName?: string;\n /** The grader kinds seen for this row, sorted. Usually exactly one. */\n graders?: string[];\n /** Traces that produced at least one result for this row. */\n traces: number;\n /** Eval results contributing to this row. */\n total: number;\n counts: AggregateCounts;\n /** `total` minus `skipped` — the pass-rate denominator. */\n graded: number;\n /**\n * `pass / graded`, or `null` when nothing was graded. Skipped results are\n * excluded deliberately: a check that never armed is not evidence either\n * way, and folding it in would let an artifact nobody invoked report a\n * perfect score.\n */\n passRate: number | null;\n /** Traces where this row produced a `fail` or an `error`, in batch order. */\n failingTraces: string[];\n /** Traces where it produced a `needs-review`, in batch order. */\n reviewTraces: string[];\n /** Distinct skip reasons, sorted — an exhausted budget surfaces here. */\n skipReasons: string[];\n}\n\n/** One trace's place in the batch. */\nexport interface BatchTraceEntry {\n file: string;\n sessionId?: string;\n /**\n * Set when the trace could not be evaluated at all — unreadable, or not a\n * recognized format. One bad file in a corpus of fifty must not cost the\n * other forty-nine, so this is an entry rather than an aborted run.\n */\n error?: string;\n /** Absent when `error` is set. */\n summary?: RunSummary;\n warnings: string[];\n exitCode: 0 | 1;\n /** Judge turns spent on that trace. */\n turns: number;\n durationMs: number;\n}\n\nexport interface BatchSummary extends RunSummary {\n /** Traces selected, including any that errored. */\n traces: number;\n tracesPassed: number;\n /** Traces that produced a report with exit code 1. */\n tracesFailed: number;\n /** Traces that could not be evaluated at all. */\n tracesErrored: number;\n}\n\nexport interface BatchReport {\n traces: BatchTraceEntry[];\n /** Per-artifact rates, sorted by `key`. */\n artifacts: AggregateRow[];\n /** Per-eval rates, sorted by `key`. */\n evals: AggregateRow[];\n /** Eval counts summed over every trace, plus the per-trace tallies. */\n summary: BatchSummary;\n /** Batch-level warnings: plugin loading and trace selection. */\n warnings: string[];\n /** `1` when any trace failed or errored. */\n exitCode: 0 | 1;\n /** Judge turns spent across the batch. The budget spans it, not each trace. */\n turns: number;\n durationMs: number;\n}\n"],"mappings":";;;;;;AASA,SAAS,MAAM,SAAS,YAAY;AACpC,SA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