hex-audit 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +137 -77
- package/DEMO.md +40 -117
- package/README.md +200 -402
- package/dashboard/.next/BUILD_ID +1 -1
- package/dashboard/.next/app-build-manifest.json +56 -101
- package/dashboard/.next/app-path-routes-manifest.json +1 -1
- package/dashboard/.next/build-manifest.json +9 -9
- package/dashboard/.next/next-server.js.nft.json +1 -1
- package/dashboard/.next/prerender-manifest.json +1 -1
- package/dashboard/.next/react-loadable-manifest.json +436 -15
- package/dashboard/.next/routes-manifest.json +1 -1
- package/dashboard/.next/server/app/_not-found/page.js +1 -1
- package/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/api/code/route.js +1 -1
- package/dashboard/.next/server/app/api/code/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/comments/route.js +1 -0
- package/dashboard/.next/server/app/api/comments/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/export/route.js +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/export/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/resolve/route.js +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/resolve/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/route.js +1 -0
- package/dashboard/.next/server/app/api/diagrams/[name]/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/figures/[name]/route.js +1 -0
- package/dashboard/.next/server/app/api/figures/[name]/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/focus/route.js +1 -0
- package/dashboard/.next/server/app/api/focus/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/github-status/route.js +1 -1
- package/dashboard/.next/server/app/api/invariants/[id]/route.js +1 -0
- package/dashboard/.next/server/app/api/invariants/[id]/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/revert-auto/route.js +1 -0
- package/dashboard/.next/server/app/api/issues/[id]/revert-auto/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/nav/route.js +1 -0
- package/dashboard/.next/server/app/api/nav/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/notes/done/route.js +1 -1
- package/dashboard/.next/server/app/api/notes/done/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/notes/lead/route.js +1 -1
- package/dashboard/.next/server/app/api/notes/lead/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/notes/question/route.js +1 -1
- package/dashboard/.next/server/app/api/notes/question/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/notes/record/route.js +3 -3
- package/dashboard/.next/server/app/api/notes/route.js +2 -2
- package/dashboard/.next/server/app/api/palette/route.js +1 -0
- package/dashboard/.next/server/app/api/palette/route.js.nft.json +1 -0
- package/dashboard/.next/server/app/api/progress/route.js +1 -1
- package/dashboard/.next/server/app/api/progress/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/watch/route.js +2 -2
- package/dashboard/.next/server/app/api/watch/route.js.nft.json +1 -1
- package/dashboard/.next/server/app/api/xref/route.js +1 -0
- package/dashboard/.next/server/app/changes/page.js +1 -20
- package/dashboard/.next/server/app/changes/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/changes/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/excalidraw-assets/[...path]/route.js +1 -0
- package/dashboard/.next/server/app/issues/page.js +5 -28
- package/dashboard/.next/server/app/issues/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/model/page.js +1 -0
- package/dashboard/.next/server/app/{calls → model}/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/model/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app/page.js +1 -20
- package/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/report/page.js +1 -1
- package/dashboard/.next/server/app/report/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/report/page_client-reference-manifest.js +1 -1
- package/dashboard/.next/server/app/review/page.js +1 -0
- package/dashboard/.next/server/app/{access → review}/page.js.nft.json +1 -1
- package/dashboard/.next/server/app/review/page_client-reference-manifest.js +1 -0
- package/dashboard/.next/server/app-paths-manifest.json +19 -16
- package/dashboard/.next/server/chunks/310.js +4 -0
- package/dashboard/.next/server/chunks/370.js +1 -0
- package/dashboard/.next/server/chunks/42.js +1 -1
- package/dashboard/.next/server/chunks/624.js +14 -0
- package/dashboard/.next/server/chunks/645.js +1 -1
- package/dashboard/.next/server/chunks/649.js +1 -1
- package/dashboard/.next/server/chunks/653.js +1 -0
- package/dashboard/.next/server/functions-config-manifest.json +1 -1
- package/dashboard/.next/server/middleware-build-manifest.js +1 -1
- package/dashboard/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dashboard/.next/server/pages/500.html +1 -1
- package/dashboard/.next/server/pages/_error.js +1 -1
- package/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dashboard/.next/static/chunks/0bbe10ee.8e7ffa06d2170dfe.js +84 -0
- package/dashboard/.next/static/chunks/1026.0ef689a305302427.js +1 -0
- package/dashboard/.next/static/chunks/1164.34eb76767ebea46f.js +8 -0
- package/dashboard/.next/static/chunks/119.a9a79633900a235f.js +5 -0
- package/dashboard/.next/static/chunks/1291.6c486c9b1d4b1b3a.js +1 -0
- package/dashboard/.next/static/chunks/139.4691848fc5a46253.js +10 -0
- package/dashboard/.next/static/chunks/145.1bf74fecdb4022e3.js +11 -0
- package/dashboard/.next/static/chunks/1517.8e7075f78e22b3a0.js +8 -0
- package/dashboard/.next/static/chunks/165.6f174060a0ce2db4.js +6 -0
- package/dashboard/.next/static/chunks/1741.5c370b7702d2eb40.js +8 -0
- package/dashboard/.next/static/chunks/1e36816c.5748c83adc8a6bd6.js +108 -0
- package/dashboard/.next/static/chunks/2061.eab75b3c1dfa068a.js +1 -0
- package/dashboard/.next/static/chunks/2148.3ce718f62d1b2f7c.js +10 -0
- package/dashboard/.next/static/chunks/217-1d5b680ffd10e3f9.js +1 -0
- package/dashboard/.next/static/chunks/2208.fb884379aa3ae968.js +1 -0
- package/dashboard/.next/static/chunks/2276.112c7855333fca5f.js +6 -0
- package/dashboard/.next/static/chunks/2374-8c6f137938f8518a.js +1 -0
- package/dashboard/.next/static/chunks/2445.18a86507d2996b95.js +1 -0
- package/dashboard/.next/static/chunks/2712.15dd8577973baf22.js +10 -0
- package/dashboard/.next/static/chunks/2759.533dec5317e0a1d1.js +1 -0
- package/dashboard/.next/static/chunks/2812.62b213bef580b69a.js +1 -0
- package/dashboard/.next/static/chunks/2895.bb57cacb7aaf42a1.js +9 -0
- package/dashboard/.next/static/chunks/2972.e5a9251b538dcf19.js +9 -0
- package/dashboard/.next/static/chunks/3206.8d9a10db2b04b93f.js +1 -0
- package/dashboard/.next/static/chunks/3485.36766504793b7237.js +9 -0
- package/dashboard/.next/static/chunks/3725.de9376dc994735d4.js +9 -0
- package/dashboard/.next/static/chunks/3774.1df377928e8387f7.js +9 -0
- package/dashboard/.next/static/chunks/3963.39d72b3875dfe2e9.js +13 -0
- package/dashboard/.next/static/chunks/4013.73884b23bfaebdde.js +11 -0
- package/dashboard/.next/static/chunks/4117.278aff1fa23fd36e.js +6 -0
- package/dashboard/.next/static/chunks/4210.cc8594110017c579.js +11 -0
- package/dashboard/.next/static/chunks/4282.28485875540886cc.js +7 -0
- package/dashboard/.next/static/chunks/4318.a2f469a88d88f6d0.js +8 -0
- package/dashboard/.next/static/chunks/4363.8999a6e727c48003.js +1 -0
- package/dashboard/.next/static/chunks/4641.e03d118fffebd580.js +5 -0
- package/dashboard/.next/static/chunks/483.a910dab7734a1074.js +8 -0
- package/dashboard/.next/static/chunks/4926.76693f542e9cc062.js +6 -0
- package/dashboard/.next/static/chunks/4938.03f6d04dabf38745.js +10 -0
- package/dashboard/.next/static/chunks/5112.0757c2b0c285e62e.js +1 -0
- package/dashboard/.next/static/chunks/5199.c83ea7efb0eec705.js +11 -0
- package/dashboard/.next/static/chunks/530.849957a8907eb288.js +1 -0
- package/dashboard/.next/static/chunks/5424.4e8ca0711a32bccf.js +7 -0
- package/dashboard/.next/static/chunks/55.a593a78be9714679.js +1 -0
- package/dashboard/.next/static/chunks/5535.6cd0bd8d368d8902.js +4 -0
- package/dashboard/.next/static/chunks/5626.7d4e93d7acbeffc9.js +10 -0
- package/dashboard/.next/static/chunks/5775.a0d7c1b1e89b9a93.js +9 -0
- package/dashboard/.next/static/chunks/6118.266956b3333b1d7a.js +9 -0
- package/dashboard/.next/static/chunks/6121.a2e6d93720b1205e.js +77 -0
- package/dashboard/.next/static/chunks/6853.d3ad43614e8ca0ab.js +1 -0
- package/dashboard/.next/static/chunks/6951.02a3a158d02158c9.js +5 -0
- package/dashboard/.next/static/chunks/6970.013f24568c87d918.js +11 -0
- package/dashboard/.next/static/chunks/7013.39d41e82b37be63b.js +9 -0
- package/dashboard/.next/static/chunks/7107.1c5412197912b8ed.js +8 -0
- package/dashboard/.next/static/chunks/7508.dd60e2d06d149f5f.js +9 -0
- package/dashboard/.next/static/chunks/7524.0fde4c61553d1491.js +3 -0
- package/dashboard/.next/static/chunks/7834-47f318a04a05688f.js +1 -0
- package/dashboard/.next/static/chunks/8317.d0b3eddef4cae0d5.js +1 -0
- package/dashboard/.next/static/chunks/838.2b2aa006519ba44c.js +10 -0
- package/dashboard/.next/static/chunks/8398.924fd8f4c83417c0.js +7 -0
- package/dashboard/.next/static/chunks/8428b36f.8ac4e67061c01307.js +34 -0
- package/dashboard/.next/static/chunks/8514.85ccbbea8ab21d04.js +5 -0
- package/dashboard/.next/static/chunks/8538.5f7ebe76c4b63162.js +1 -0
- package/dashboard/.next/static/chunks/8687.9406baa8b5601fd0.js +1 -0
- package/dashboard/.next/static/chunks/8721.47346e2cb6412376.js +10 -0
- package/dashboard/.next/static/chunks/8770.4f544bd1a6f03a62.js +8 -0
- package/dashboard/.next/static/chunks/8812.3d96fd54dba566f8.js +9 -0
- package/dashboard/.next/static/chunks/8962.d22aa67a97970dd8.js +1 -0
- package/dashboard/.next/static/chunks/8986.b327224b83f4399a.js +5 -0
- package/dashboard/.next/static/chunks/9271.5f66c19a8ee1ff36.js +10 -0
- package/dashboard/.next/static/chunks/9282.f8d01442bab4c0da.js +2 -0
- package/dashboard/.next/static/chunks/9366.0ec24a0791b9b00f.js +1 -0
- package/dashboard/.next/static/chunks/9707.5cd7d2ee933a4af5.js +6 -0
- package/dashboard/.next/static/chunks/9716.15fffc0b0038601d.js +4 -0
- package/dashboard/.next/static/chunks/9791.e3b3f5a367f63c8a.js +1 -0
- package/dashboard/.next/static/chunks/9820.8c1efad5260e8137.js +1 -0
- package/dashboard/.next/static/chunks/985.50150e9eaa4bde33.js +39 -0
- package/dashboard/.next/static/chunks/997.56901b86e1b8a87b.js +8 -0
- package/dashboard/.next/static/chunks/app/changes/page-f8a860034221cad4.js +1 -0
- package/dashboard/.next/static/chunks/app/issues/page-da4da93188c414a6.js +1 -0
- package/dashboard/.next/static/chunks/app/layout-27a9da4610423c1e.js +1 -0
- package/dashboard/.next/static/chunks/app/model/page-9680e22fdd6ddb81.js +1 -0
- package/dashboard/.next/static/chunks/app/page-0e67750d99fb2836.js +1 -0
- package/dashboard/.next/static/chunks/app/report/page-b56b1db9b9dcf2b6.js +1 -0
- package/dashboard/.next/static/chunks/app/review/page-3ef69f0e0badd333.js +1 -0
- package/dashboard/.next/static/chunks/c75e29e3.d91220f782934d80.js +1 -0
- package/dashboard/.next/static/chunks/{main-cc3a889b25e9aa68.js → main-9c95a7ffedc7afb4.js} +1 -1
- package/dashboard/.next/static/chunks/webpack-6da70e4f9fcf1799.js +1 -0
- package/dashboard/.next/static/css/ceafd91ca8dd753d.css +3 -0
- package/dashboard/.next/static/css/e4aad1f9c715b79a.css +1 -0
- package/dashboard/.next/static/media/Assistant-Bold.c8f39f24.woff2 +0 -0
- package/dashboard/.next/static/media/Assistant-Medium.1e75d8e6.woff2 +0 -0
- package/dashboard/.next/static/media/Assistant-Regular.7acbabb8.woff2 +0 -0
- package/dashboard/.next/static/media/Assistant-SemiBold.167acbf8.woff2 +0 -0
- package/dashboard/app/api/code/route.ts +26 -20
- package/dashboard/app/api/comments/route.ts +158 -0
- package/dashboard/app/api/diagrams/[name]/export/route.ts +26 -0
- package/dashboard/app/api/diagrams/[name]/resolve/route.ts +25 -0
- package/dashboard/app/api/diagrams/[name]/route.ts +37 -0
- package/dashboard/app/api/figures/[name]/route.ts +15 -0
- package/dashboard/app/api/focus/route.ts +35 -0
- package/dashboard/app/api/invariants/[id]/route.ts +35 -0
- package/dashboard/app/api/issues/[id]/revert-auto/route.ts +18 -0
- package/dashboard/app/api/nav/route.ts +120 -0
- package/dashboard/app/api/palette/route.ts +68 -0
- package/dashboard/app/api/progress/route.ts +54 -23
- package/dashboard/app/api/xref/route.ts +30 -0
- package/dashboard/app/changes/ChangesClient.tsx +730 -356
- package/dashboard/app/changes/page.tsx +27 -19
- package/dashboard/app/excalidraw-assets/[...path]/route.ts +56 -0
- package/dashboard/app/globals.css +231 -77
- package/dashboard/app/issues/BoardClient.tsx +817 -0
- package/dashboard/app/issues/page.tsx +27 -272
- package/dashboard/app/layout.tsx +32 -17
- package/dashboard/app/model/ModelClient.tsx +1303 -0
- package/dashboard/app/model/page.tsx +98 -0
- package/dashboard/app/page.tsx +191 -277
- package/dashboard/app/report/ReportClient.tsx +147 -74
- package/dashboard/app/report/page.tsx +25 -14
- package/dashboard/app/review/ReviewClient.tsx +1180 -0
- package/dashboard/app/review/page.tsx +93 -0
- package/dashboard/components/AutoRefresh.tsx +22 -19
- package/dashboard/components/CodeComments.tsx +303 -0
- package/dashboard/components/CodeNav.tsx +523 -0
- package/dashboard/components/CodeReference.tsx +92 -99
- package/dashboard/components/CodeViewer.tsx +526 -0
- package/dashboard/components/CommandPalette.tsx +141 -66
- package/dashboard/components/DiagramCanvas.tsx +275 -0
- package/dashboard/components/DianeNote.tsx +244 -0
- package/dashboard/components/LiveStatus.tsx +30 -68
- package/dashboard/components/MarkdownRenderer.tsx +34 -32
- package/dashboard/components/RecordButton.tsx +132 -0
- package/dashboard/components/ui/Button.tsx +39 -0
- package/dashboard/components/ui/Chip.tsx +37 -0
- package/dashboard/components/ui/EmptyState.tsx +31 -0
- package/dashboard/components/ui/Icons.tsx +126 -0
- package/dashboard/components/ui/Inspector.tsx +122 -0
- package/dashboard/components/ui/Kbd.tsx +15 -0
- package/dashboard/components/ui/ListRow.tsx +92 -0
- package/dashboard/components/ui/LocalTime.tsx +14 -0
- package/dashboard/components/ui/ProgressRing.tsx +54 -0
- package/dashboard/components/ui/ResizeHandle.tsx +93 -0
- package/dashboard/components/ui/RiskMeter.tsx +27 -0
- package/dashboard/components/ui/SearchField.tsx +55 -0
- package/dashboard/components/ui/SegmentedControl.tsx +71 -0
- package/dashboard/components/ui/SeverityDot.tsx +57 -0
- package/dashboard/components/ui/Sidebar.tsx +236 -0
- package/dashboard/components/ui/SplitView.tsx +122 -0
- package/dashboard/components/ui/StateGlyph.tsx +66 -0
- package/dashboard/components/ui/Toast.tsx +91 -0
- package/dashboard/lib/api.ts +17 -0
- package/dashboard/lib/cn.ts +4 -0
- package/dashboard/lib/data.ts +2 -21
- package/dashboard/lib/finding-markdown.ts +1 -1
- package/dashboard/lib/focus.ts +42 -0
- package/dashboard/lib/hotkeys.ts +41 -0
- package/dashboard/lib/inline-markdown.test.ts +11 -0
- package/dashboard/lib/live.ts +32 -0
- package/dashboard/lib/pane-width.ts +36 -0
- package/dashboard/lib/server/board.ts +229 -0
- package/dashboard/lib/server/diagrams.ts +191 -0
- package/dashboard/lib/server/safe-path.ts +28 -0
- package/dashboard/lib/server/workspace.ts +113 -0
- package/dashboard/lib/server/xref.ts +42 -0
- package/dashboard/lib/solidity.test.ts +37 -0
- package/dashboard/lib/solidity.ts +191 -0
- package/dashboard/lib/source.ts +28 -0
- package/dashboard/lib/types.ts +164 -0
- package/dashboard/lib/url.ts +18 -0
- package/dashboard/lib/watcher.ts +31 -22
- package/dashboard/tailwind.config.ts +6 -3
- package/dist/analysis/code-model.d.ts.map +1 -1
- package/dist/analysis/code-model.js +4 -1
- package/dist/analysis/code-model.js.map +1 -1
- package/dist/analysis/diff.d.ts +12 -1
- package/dist/analysis/diff.d.ts.map +1 -1
- package/dist/analysis/diff.js +143 -0
- package/dist/analysis/diff.js.map +1 -1
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +17 -48
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/claude.d.ts.map +1 -1
- package/dist/commands/claude.js +5 -0
- package/dist/commands/claude.js.map +1 -1
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +10 -2
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/diagram.d.ts +3 -0
- package/dist/commands/diagram.d.ts.map +1 -0
- package/dist/commands/diagram.js +71 -0
- package/dist/commands/diagram.js.map +1 -0
- package/dist/commands/diff.d.ts +4 -5
- package/dist/commands/diff.d.ts.map +1 -1
- package/dist/commands/diff.js +56 -17
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +5 -18
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/facts.d.ts +23 -0
- package/dist/commands/facts.d.ts.map +1 -0
- package/dist/commands/facts.js +121 -0
- package/dist/commands/facts.js.map +1 -0
- package/dist/commands/fix-review.d.ts +9 -0
- package/dist/commands/fix-review.d.ts.map +1 -0
- package/dist/commands/fix-review.js +367 -0
- package/dist/commands/fix-review.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +51 -47
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/issue.d.ts.map +1 -1
- package/dist/commands/issue.js +151 -2
- package/dist/commands/issue.js.map +1 -1
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +11 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/model.d.ts +4 -0
- package/dist/commands/model.d.ts.map +1 -0
- package/dist/commands/model.js +275 -0
- package/dist/commands/model.js.map +1 -0
- package/dist/commands/note.d.ts.map +1 -1
- package/dist/commands/note.js +31 -1
- package/dist/commands/note.js.map +1 -1
- package/dist/commands/review.d.ts +4 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/commands/review.js +164 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/core/comments.d.ts +59 -0
- package/dist/core/comments.d.ts.map +1 -0
- package/dist/core/comments.js +263 -0
- package/dist/core/comments.js.map +1 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +0 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/dedup.d.ts +56 -0
- package/dist/core/dedup.d.ts.map +1 -0
- package/dist/core/dedup.js +208 -0
- package/dist/core/dedup.js.map +1 -0
- package/dist/core/errors.d.ts +1 -1
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +0 -15
- package/dist/core/errors.js.map +1 -1
- package/dist/core/external-tools.d.ts +0 -14
- package/dist/core/external-tools.d.ts.map +1 -1
- package/dist/core/external-tools.js +2 -52
- package/dist/core/external-tools.js.map +1 -1
- package/dist/core/fix-review.d.ts +54 -0
- package/dist/core/fix-review.d.ts.map +1 -0
- package/dist/core/fix-review.js +98 -0
- package/dist/core/fix-review.js.map +1 -0
- package/dist/core/fuzz-sync.d.ts +93 -0
- package/dist/core/fuzz-sync.d.ts.map +1 -0
- package/dist/core/fuzz-sync.js +516 -0
- package/dist/core/fuzz-sync.js.map +1 -0
- package/dist/core/git.d.ts +7 -0
- package/dist/core/git.d.ts.map +1 -1
- package/dist/core/git.js +42 -0
- package/dist/core/git.js.map +1 -1
- package/dist/core/issues.d.ts +32 -1
- package/dist/core/issues.d.ts.map +1 -1
- package/dist/core/issues.js +135 -3
- package/dist/core/issues.js.map +1 -1
- package/dist/core/mcp-config.d.ts +12 -0
- package/dist/core/mcp-config.d.ts.map +1 -0
- package/dist/core/mcp-config.js +29 -0
- package/dist/core/mcp-config.js.map +1 -0
- package/dist/core/model.d.ts +38 -0
- package/dist/core/model.d.ts.map +1 -0
- package/dist/core/model.js +160 -0
- package/dist/core/model.js.map +1 -0
- package/dist/core/notes.d.ts +2 -0
- package/dist/core/notes.d.ts.map +1 -1
- package/dist/core/notes.js +13 -3
- package/dist/core/notes.js.map +1 -1
- package/dist/core/review.d.ts +47 -0
- package/dist/core/review.d.ts.map +1 -1
- package/dist/core/review.js +177 -1
- package/dist/core/review.js.map +1 -1
- package/dist/core/rules.d.ts +12 -0
- package/dist/core/rules.d.ts.map +1 -0
- package/dist/core/rules.js +66 -0
- package/dist/core/rules.js.map +1 -0
- package/dist/core/schema.d.ts +4817 -2245
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +452 -113
- package/dist/core/schema.js.map +1 -1
- package/dist/core/scope.d.ts +8 -0
- package/dist/core/scope.d.ts.map +1 -0
- package/dist/core/scope.js +18 -0
- package/dist/core/scope.js.map +1 -0
- package/dist/diagrams/build.d.ts +18 -0
- package/dist/diagrams/build.d.ts.map +1 -0
- package/dist/diagrams/build.js +135 -0
- package/dist/diagrams/build.js.map +1 -0
- package/dist/diagrams/excalidraw.d.ts +27 -0
- package/dist/diagrams/excalidraw.d.ts.map +1 -0
- package/dist/diagrams/excalidraw.js +219 -0
- package/dist/diagrams/excalidraw.js.map +1 -0
- package/dist/diagrams/layout.d.ts +48 -0
- package/dist/diagrams/layout.d.ts.map +1 -0
- package/dist/diagrams/layout.js +686 -0
- package/dist/diagrams/layout.js.map +1 -0
- package/dist/facts/build.d.ts +23 -0
- package/dist/facts/build.d.ts.map +1 -0
- package/dist/facts/build.js +112 -0
- package/dist/facts/build.js.map +1 -0
- package/dist/facts/extract.d.ts +53 -0
- package/dist/facts/extract.d.ts.map +1 -0
- package/dist/facts/extract.js +635 -0
- package/dist/facts/extract.js.map +1 -0
- package/dist/facts/fallback.d.ts +7 -0
- package/dist/facts/fallback.d.ts.map +1 -0
- package/dist/facts/fallback.js +156 -0
- package/dist/facts/fallback.js.map +1 -0
- package/dist/facts/implementations.d.ts +29 -0
- package/dist/facts/implementations.d.ts.map +1 -0
- package/dist/facts/implementations.js +43 -0
- package/dist/facts/implementations.js.map +1 -0
- package/dist/facts/query.d.ts +35 -0
- package/dist/facts/query.d.ts.map +1 -0
- package/dist/facts/query.js +157 -0
- package/dist/facts/query.js.map +1 -0
- package/dist/facts/xref.d.ts +53 -0
- package/dist/facts/xref.d.ts.map +1 -0
- package/dist/facts/xref.js +282 -0
- package/dist/facts/xref.js.map +1 -0
- package/dist/index.js +14 -16
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts +3 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +400 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/skills/ai-audit/SKILL.md +16 -6
- package/dist/skills/ai-audit/UPSTREAM.md +9 -4
- package/dist/skills/ai-audit/references/hex-board.md +34 -46
- package/dist/skills/diane.md +26 -12
- package/dist/skills/fix-review.md +58 -0
- package/dist/skills/fuzz/LICENSE +21 -0
- package/dist/skills/fuzz/SKILL.md +655 -0
- package/dist/skills/fuzz/UPSTREAM.md +119 -0
- package/dist/skills/fuzz/agents/implementers/global-property-implementer.md +81 -0
- package/dist/skills/fuzz/agents/implementers/specific-property-implementer.md +121 -0
- package/dist/skills/fuzz/agents/invariant-discovery/adversarial-profit-maximizer.md +123 -0
- package/dist/skills/fuzz/agents/invariant-discovery/conservation-auditor.md +92 -0
- package/dist/skills/fuzz/agents/invariant-discovery/protocol-type-specialist.md +173 -0
- package/dist/skills/fuzz/agents/invariant-discovery/roundtrip-rounding-analyst.md +164 -0
- package/dist/skills/fuzz/agents/invariant-discovery/state-transition-mapper.md +92 -0
- package/dist/skills/fuzz/agents/invariant-discovery/synthesizer.md +261 -0
- package/dist/skills/fuzz/agents/protocol-analyzer.md +80 -0
- package/dist/skills/fuzz/agents/report-writer.md +135 -0
- package/dist/skills/fuzz/references/handler-patterns.md +222 -0
- package/dist/skills/fuzz/references/hex-invariants.md +102 -0
- package/dist/skills/fuzz/references/property-generation.md +149 -0
- package/dist/skills/fuzz/references/selection-policy.md +49 -0
- package/dist/skills/fuzz/references/setup-playbook.md +92 -0
- package/dist/skills/fuzz/references/template-map.md +121 -0
- package/dist/skills/fuzz/scripts/ensure_foundry.sh +125 -0
- package/dist/skills/fuzz/scripts/estimate_cost.js +157 -0
- package/dist/skills/fuzz/scripts/extract_abis.js +303 -0
- package/dist/skills/fuzz/scripts/fizz_sync.js +692 -0
- package/dist/skills/fuzz/scripts/generate_handlers.js +370 -0
- package/dist/skills/fuzz/scripts/generate_suite.js +254 -0
- package/dist/skills/fuzz/scripts/lib/log-viewer.js +332 -0
- package/dist/skills/fuzz/scripts/run_echidna.js +192 -0
- package/dist/skills/fuzz/scripts/run_medusa.js +329 -0
- package/dist/skills/fuzz/scripts/select_functions.js +637 -0
- package/dist/skills/fuzz/scripts/setup_fuzz_profile.sh +142 -0
- package/dist/skills/fuzz/templates/Actor.sol +63 -0
- package/dist/skills/fuzz/templates/Base.sol +121 -0
- package/dist/skills/fuzz/templates/FoundryTester.sol +29 -0
- package/dist/skills/fuzz/templates/FuzzTester.sol +11 -0
- package/dist/skills/fuzz/templates/Properties.sol +17 -0
- package/dist/skills/fuzz/templates/README.md +56 -0
- package/dist/skills/fuzz/templates/Snapshots.sol +26 -0
- package/dist/skills/fuzz/templates/echidna.yaml +18 -0
- package/dist/skills/fuzz/templates/handlers/Handlers.sol +13 -0
- package/dist/skills/fuzz/templates/medusa.json +93 -0
- package/dist/skills/fuzz/templates/utils/Clamp.sol +223 -0
- package/dist/skills/fuzz/templates/utils/DecimalPrinter.sol +63 -0
- package/dist/skills/fuzz/templates/utils/Deployer.sol +17 -0
- package/dist/skills/fuzz/templates/utils/EnumerableSet.sol +206 -0
- package/dist/skills/fuzz/templates/utils/Hevm.sol +62 -0
- package/dist/skills/fuzz/templates/utils/Logger.sol +619 -0
- package/dist/skills/fuzz/templates/utils/Math.sol +52 -0
- package/dist/skills/fuzz/templates/utils/MockERC20.sol +279 -0
- package/dist/skills/fuzz/templates/utils/PropertiesAsserts.sol +238 -0
- package/dist/skills/fuzz/templates/utils/StringUtils.sol +85 -0
- package/dist/skills/fuzz-convert/SKILL.md +249 -0
- package/dist/skills/fuzz-sync/SKILL.md +342 -0
- package/dist/skills/generate-poc.md +8 -26
- package/dist/skills/generate-report.md +17 -5
- package/dist/skills/ingest-aa-report.md +11 -30
- package/dist/skills/init-audit/SKILL.md +155 -0
- package/dist/skills/init-audit/references/agents/conformance-checker.md +36 -0
- package/dist/skills/init-audit/references/agents/contract-reader.md +59 -0
- package/dist/skills/init-audit/references/agents/diagram-composer.md +48 -0
- package/dist/skills/init-audit/references/agents/docs-extractor.md +26 -0
- package/dist/skills/init-audit/references/agents/prior-audit.md +32 -0
- package/dist/skills/init-audit/references/agents/regression-checker.md +28 -0
- package/dist/skills/init-audit/references/agents/skeptic.md +31 -0
- package/dist/skills/init-audit/references/agents/standards-checker.md +39 -0
- package/dist/skills/init-audit/references/agents/synthesizer.md +50 -0
- package/dist/skills/prevalidate.md +62 -0
- package/dist/skills/sync-issues.md +11 -25
- package/dist/skills/validate-all-findings.md +2 -2
- package/dist/skills/validate-finding.md +25 -24
- package/dist/skills/write-finding.md +6 -5
- package/dist/types/index.d.ts +16 -12
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +5 -4
- package/dashboard/.next/server/app/access/page.js +0 -1
- package/dashboard/.next/server/app/access/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/api/flows/route.js +0 -1
- package/dashboard/.next/server/app/api/mermaid/route.js +0 -1
- package/dashboard/.next/server/app/calls/page.js +0 -1
- package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/conformance/page.js +0 -1
- package/dashboard/.next/server/app/conformance/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/diagram/page.js +0 -1
- package/dashboard/.next/server/app/diagram/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/flows/page.js +0 -1
- package/dashboard/.next/server/app/flows/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/functions/page.js +0 -1
- package/dashboard/.next/server/app/functions/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/notes/page.js +0 -22
- package/dashboard/.next/server/app/notes/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/notes/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/progress/page.js +0 -1
- package/dashboard/.next/server/app/progress/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/app/stats/page.js +0 -1
- package/dashboard/.next/server/app/stats/page.js.nft.json +0 -1
- package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +0 -1
- package/dashboard/.next/server/chunks/530.js +0 -1
- package/dashboard/.next/server/chunks/622.js +0 -3
- package/dashboard/.next/server/chunks/665.js +0 -13
- package/dashboard/.next/server/chunks/939.js +0 -1
- package/dashboard/.next/static/chunks/3017.4a5312e3c20a173f.js +0 -1
- package/dashboard/.next/static/chunks/7397-37adf76cad543297.js +0 -1
- package/dashboard/.next/static/chunks/7973.e34032723285a616.js +0 -79
- package/dashboard/.next/static/chunks/8452-6d77fa353402422c.js +0 -13
- package/dashboard/.next/static/chunks/8928-fc049decdfbdaa6d.js +0 -1
- package/dashboard/.next/static/chunks/app/access/page-f8403cbdfc1c176b.js +0 -1
- package/dashboard/.next/static/chunks/app/calls/page-41f20d01e12382ef.js +0 -1
- package/dashboard/.next/static/chunks/app/changes/page-82bf8b6f48cdc506.js +0 -1
- package/dashboard/.next/static/chunks/app/conformance/page-6bb8e3b372e38098.js +0 -1
- package/dashboard/.next/static/chunks/app/diagram/page-469cd7a6f183efba.js +0 -1
- package/dashboard/.next/static/chunks/app/flows/page-7872dd9141ba0b07.js +0 -1
- package/dashboard/.next/static/chunks/app/functions/page-5847bcb77a8e7edf.js +0 -1
- package/dashboard/.next/static/chunks/app/issues/page-1ffc64fe40439002.js +0 -1
- package/dashboard/.next/static/chunks/app/layout-6c6d2a0fd7c989d3.js +0 -1
- package/dashboard/.next/static/chunks/app/notes/page-8bcaa52304500098.js +0 -1
- package/dashboard/.next/static/chunks/app/page-d63800ddb072b77b.js +0 -1
- package/dashboard/.next/static/chunks/app/progress/page-e26554f655a62eef.js +0 -1
- package/dashboard/.next/static/chunks/app/report/page-18c04fb2f193b020.js +0 -1
- package/dashboard/.next/static/chunks/app/stats/page-67ff59fd69bed651.js +0 -1
- package/dashboard/.next/static/chunks/webpack-4de0e79bdd6a0418.js +0 -1
- package/dashboard/.next/static/css/1112cea2260b3926.css +0 -3
- package/dashboard/app/access/AccessClient.tsx +0 -402
- package/dashboard/app/access/ReadOnlyFunctions.tsx +0 -114
- package/dashboard/app/access/page.tsx +0 -125
- package/dashboard/app/api/flows/route.ts +0 -32
- package/dashboard/app/api/mermaid/route.ts +0 -25
- package/dashboard/app/calls/CallsClient.tsx +0 -170
- package/dashboard/app/calls/page.tsx +0 -57
- package/dashboard/app/conformance/ConformanceTable.tsx +0 -214
- package/dashboard/app/conformance/page.tsx +0 -186
- package/dashboard/app/diagram/page.tsx +0 -65
- package/dashboard/app/flows/page.tsx +0 -102
- package/dashboard/app/functions/FunctionsClient.tsx +0 -167
- package/dashboard/app/functions/page.tsx +0 -178
- package/dashboard/app/issues/IssuesBoardClient.tsx +0 -813
- package/dashboard/app/notes/NotesClient.tsx +0 -706
- package/dashboard/app/notes/page.tsx +0 -47
- package/dashboard/app/progress/ProgressClient.tsx +0 -354
- package/dashboard/app/progress/page.tsx +0 -127
- package/dashboard/app/stats/StatsClient.tsx +0 -452
- package/dashboard/app/stats/page.tsx +0 -50
- package/dashboard/components/ConfidenceBadge.tsx +0 -53
- package/dashboard/components/DashboardLayout.tsx +0 -510
- package/dashboard/components/FilterableTable.tsx +0 -293
- package/dashboard/components/MermaidViewer.tsx +0 -267
- package/dashboard/components/NotYetGenerated.tsx +0 -32
- package/dashboard/components/SeverityBadge.tsx +0 -28
- package/dashboard/components/SignalBars.tsx +0 -27
- package/dashboard/components/SortableTable.tsx +0 -122
- package/dashboard/lib/conformance-tokens.ts +0 -49
- package/dist/skills/init-audit.md +0 -386
- /package/dashboard/.next/server/app/api/{flows → xref}/route.js.nft.json +0 -0
- /package/dashboard/.next/server/app/{api/mermaid → excalidraw-assets/[...path]}/route.js.nft.json +0 -0
- /package/dashboard/.next/static/{z5XBev05xDAkDrxWxAjNu → bGV1ry1vvIbM5b506eVBR}/_buildManifest.js +0 -0
- /package/dashboard/.next/static/{z5XBev05xDAkDrxWxAjNu → bGV1ry1vvIbM5b506eVBR}/_ssgManifest.js +0 -0
- /package/dashboard/.next/static/chunks/{3205-47d09be47325709f.js → 3205-fd963acf2fdfd080.js} +0 -0
- /package/dashboard/.next/static/chunks/{3924-88d849290406ee6f.js → 3924-f1f85ccc7d59d7ab.js} +0 -0
- /package/dashboard/.next/static/chunks/{618f8807-69fc7bb97c2b87c1.js → 618f8807-fbb1466bc29c17c6.js} +0 -0
- /package/dashboard/.next/static/chunks/{7498-d1814d68ba346d13.js → 7498-7cf464d8af69cd0a.js} +0 -0
- /package/dashboard/.next/static/chunks/app/_not-found/{page-c299b935209993df.js → page-5ff5d54b6fd6f17e.js} +0 -0
|
@@ -12,7 +12,7 @@ The report Turn 5 printed is not touched. The board copy is a **rewrite** of eac
|
|
|
12
12
|
Hex's report standard, because the board's text ends up verbatim in the client's report.
|
|
13
13
|
|
|
14
14
|
**Never** hand-edit `.hex/tracking.json` or `.hex/findings.json` — cards go through
|
|
15
|
-
`npx hex issue`, leads through `npx hex note lead`. **Never** move a card to Verified, and never
|
|
15
|
+
`npx --no-install hex issue`, leads through `npx --no-install hex note lead`. **Never** move a card to Verified, and never
|
|
16
16
|
run `/validate-finding` or `/sync-issues` from here: those are the auditor's calls.
|
|
17
17
|
|
|
18
18
|
---
|
|
@@ -46,42 +46,25 @@ Read, in one parallel message:
|
|
|
46
46
|
|
|
47
47
|
## Step 3 — Triage each FINDING
|
|
48
48
|
|
|
49
|
+
Also read the triage rules once: `npx --no-install hex rules list`.
|
|
50
|
+
|
|
49
51
|
Go through the digest's FINDINGs in order. For each one decide **exactly one** outcome:
|
|
50
52
|
|
|
51
53
|
1. **already on board** — its key is in the set above. Skip it. Do not update that card: the
|
|
52
54
|
auditor may have edited, validated or rejected it, and a re-scan does not overrule them.
|
|
53
|
-
2. **
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### Match rules (the same rules `/ingest-aa-report` uses)
|
|
64
|
-
|
|
65
|
-
Compare the finding against each candidate on four signals:
|
|
66
|
-
|
|
67
|
-
| Signal | How to compare |
|
|
68
|
-
|---|---|
|
|
69
|
-
| **contract** (boolean) | Does the affected contract name match? |
|
|
70
|
-
| **function** (boolean) | Does the affected function name match? |
|
|
71
|
-
| **root_cause** | `same` / `overlapping` / `different` — judge the technical mechanism. |
|
|
72
|
-
| **attack_vector** | `same` / `overlapping` / `different` — judge what an attacker actually does. |
|
|
73
|
-
|
|
74
|
-
A match is **at least one of**:
|
|
75
|
-
- `root_cause = same` AND `function = true`, or
|
|
76
|
-
- `root_cause = same` AND `contract = true` AND `attack_vector = same`, or
|
|
77
|
-
- `root_cause = overlapping` AND `function = true` AND `attack_vector = same`.
|
|
78
|
-
|
|
79
|
-
When several cards match, the canonical one is the earliest-created card that is not itself in
|
|
80
|
-
the Duplicate column.
|
|
55
|
+
2. **excluded by a triage rule** — the finding's whole impact depends on a rule (a trusted role,
|
|
56
|
+
an out-of-scope token type, a known issue). Skip it and list it in the summary with the rule
|
|
57
|
+
id. A finding a rule only partly covers is filed.
|
|
58
|
+
3. **known from the prior audit** — differential audit only. It is the same issue as a prior
|
|
59
|
+
finding the prior audit left open: `review.json` status `acknowledged_still_present`, or a
|
|
60
|
+
prior `resolution` of `Acknowledged`, `Unresolved` or `Not Fixed`. Skip it; the client already
|
|
61
|
+
knows. A match to a prior finding that was **fixed** is a regression, and it is filed.
|
|
62
|
+
4. **file it** — everything else. Whether it duplicates an existing card is decided after
|
|
63
|
+
filing, by the dedup engine (Step 5).
|
|
81
64
|
|
|
82
65
|
## Step 4 — Write the raw records
|
|
83
66
|
|
|
84
|
-
For every finding
|
|
67
|
+
For every finding you **file**, read the code at its location
|
|
85
68
|
(`Contract.function` — find the contract's file in the scope, then read the function), and write
|
|
86
69
|
one record. Ids continue from the highest `AI-NNN` already in the file (`AI-001` when empty).
|
|
87
70
|
|
|
@@ -110,7 +93,7 @@ Write the whole file once with the Write tool, keeping every earlier record:
|
|
|
110
93
|
|
|
111
94
|
This file is the source record behind the cards (as `ai-results/auditagent/findings.json` is for
|
|
112
95
|
AuditAgent); `hex issue new` materializes each card from it. Writing it directly is correct.
|
|
113
|
-
Skipped findings (already on board, known from the prior audit) get **no** record.
|
|
96
|
+
Skipped findings (already on board, excluded by a rule, known from the prior audit) get **no** record.
|
|
114
97
|
|
|
115
98
|
### Field rules
|
|
116
99
|
|
|
@@ -164,29 +147,26 @@ code-block rules as above). This is what fills the card's File(s) line and the r
|
|
|
164
147
|
For each record, in id order:
|
|
165
148
|
|
|
166
149
|
```bash
|
|
167
|
-
npx hex issue new --source ai-audit --source-ref AI-NNN --title "<title>" --severity <Severity>
|
|
150
|
+
npx --no-install hex issue new --source ai-audit --source-ref AI-NNN --title "<title>" --severity <Severity>
|
|
168
151
|
```
|
|
169
152
|
|
|
170
153
|
It prints the allocated `H-NNN`; capture it. The card lands in Potential as `unverified`, with
|
|
171
154
|
description, recommendation and code materialized from the record.
|
|
172
155
|
|
|
173
|
-
|
|
156
|
+
Then run the dedup engine on each new card:
|
|
174
157
|
|
|
175
158
|
```bash
|
|
176
|
-
npx hex issue
|
|
159
|
+
npx --no-install hex issue dedup <new H-NNN>
|
|
177
160
|
```
|
|
178
161
|
|
|
179
|
-
|
|
180
|
-
|
|
162
|
+
It lists existing cards on the same exact functions first and prints the match rules (the same
|
|
163
|
+
rules every source uses). Judge each strong candidate against those rules. On a match (the
|
|
164
|
+
canonical card is the earliest-created one that is not itself a duplicate):
|
|
181
165
|
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
"confidence": "high | medium | low",
|
|
187
|
-
"match_signals": { "contract": true, "function": true, "root_cause": "same", "attack_vector": "same" },
|
|
188
|
-
"reasoning": "<one short sentence: which signals carried the call>"
|
|
189
|
-
}
|
|
166
|
+
```bash
|
|
167
|
+
npx --no-install hex issue mark-duplicate <new H-NNN> --of <canonical H-NNN> \
|
|
168
|
+
--root-cause <same|overlapping|different> --attack-vector <same|overlapping|different> \
|
|
169
|
+
[--same-contract] [--same-function] --reasoning "<one short sentence>"
|
|
190
170
|
```
|
|
191
171
|
|
|
192
172
|
## Step 6 — Leads to notes
|
|
@@ -195,7 +175,7 @@ For each LEAD in the digest, add it to the contract's note. `<Contract>` is the
|
|
|
195
175
|
location before the first `.`:
|
|
196
176
|
|
|
197
177
|
```bash
|
|
198
|
-
npx hex note lead "<Contract>" \
|
|
178
|
+
npx --no-install hex note lead "<Contract>" \
|
|
199
179
|
--text "<title> (\`Contract.function\`): <the lead's body, one line>" \
|
|
200
180
|
--source ai-audit --source-ref "<key>"
|
|
201
181
|
```
|
|
@@ -204,7 +184,14 @@ The command is idempotent on the key: a lead already added by an earlier scan (o
|
|
|
204
184
|
dismissed) is left as it is, and the command says so on stderr. Open leads keep the contract
|
|
205
185
|
unreviewed on `/progress` until the auditor closes them — that is intended.
|
|
206
186
|
|
|
207
|
-
## Step 7 —
|
|
187
|
+
## Step 7 — Pre-validate
|
|
188
|
+
|
|
189
|
+
Run the **`/prevalidate`** skill on the cards this scan filed that are not duplicates. Background
|
|
190
|
+
agents reproduce or refute each one; conclusive cases move on their own (reproduced with a passing
|
|
191
|
+
PoC → Verified; refuted by two independent agents → Rejected), the rest stay in Potential with a
|
|
192
|
+
verdict. Skip this step only when the auditor passed `--no-prevalidate`.
|
|
193
|
+
|
|
194
|
+
## Step 8 — Summary
|
|
208
195
|
|
|
209
196
|
Print, and nothing else:
|
|
210
197
|
|
|
@@ -213,6 +200,7 @@ Hex board — scan {stamp}
|
|
|
213
200
|
- N new Potential card(s): H-0xx, H-0yy, ...
|
|
214
201
|
- K marked Duplicate of existing cards
|
|
215
202
|
- J already on the board from an earlier scan (not re-filed)
|
|
203
|
+
- E excluded by triage rules (R-…)
|
|
216
204
|
- P known from the prior audit (not filed)
|
|
217
205
|
- L lead(s) added to contract notes (M already there)
|
|
218
206
|
Report: .hex/ai-audit/runs/{stamp}/full-report.md
|
package/dist/skills/diane.md
CHANGED
|
@@ -4,9 +4,8 @@ description: "Diane — your audit recorder. Ingest voice narration into a livin
|
|
|
4
4
|
|
|
5
5
|
# Skill: Diane
|
|
6
6
|
|
|
7
|
-
**Recommended model:** Sonnet
|
|
8
7
|
|
|
9
|
-
You are **Diane**, the auditor's **pair auditor** — the Twin Peaks framing: the auditor narrates their thought process aloud while reading a contract, and you are Diane, a sharp second set of eyes who organizes their reasoning into a living profile **and audits alongside them**. You don't just record — you read the code, check what they claim, and speak up. The auditor records narration from the dashboard **
|
|
8
|
+
You are **Diane**, the auditor's **pair auditor** — the Twin Peaks framing: the auditor narrates their thought process aloud while reading a contract, and you are Diane, a sharp second set of eyes who organizes their reasoning into a living profile **and audits alongside them**. You don't just record — you read the code, check what they claim, and speak up. The auditor records narration from the dashboard's **Review** page (the *Record narration* button; the selected function's contract is the active contract); the recording is transcribed locally and lands as a *session*. This skill picks up that session and processes it.
|
|
10
9
|
|
|
11
10
|
Persona: attentive, candid, direct. Be concise. Confirm briefly when the auditor is right; push back with `file:line` evidence when they're wrong or have missed something. Never flatter, never challenge without grounds, never narrate your own process at length. **Address the auditor directly and impersonally — never by name.**
|
|
12
11
|
|
|
@@ -21,22 +20,23 @@ Persona: attentive, candid, direct. Be concise. Confirm briefly when the auditor
|
|
|
21
20
|
## Step 1 — Pick up the latest narration
|
|
22
21
|
|
|
23
22
|
```bash
|
|
24
|
-
npx hex note session latest
|
|
23
|
+
npx --no-install hex note session latest
|
|
25
24
|
```
|
|
26
25
|
|
|
27
26
|
This prints JSON: `{ file, contract, ts, processed, text }` for the most recent unprocessed session, or `null`. If `null`, tell the auditor there's nothing new to process and stop. Otherwise:
|
|
28
27
|
|
|
29
|
-
- `contract` is the **active contract** the notes belong under (the
|
|
28
|
+
- `contract` is the **active contract** the notes belong under (the contract selected on the Review page). `general` means cross-cutting.
|
|
30
29
|
- `text` is the raw transcript — disfluent, with filler, repetition, and false starts. That's expected.
|
|
31
30
|
|
|
32
31
|
## Step 2 — Segment the transcript into thought-units
|
|
33
32
|
|
|
34
33
|
Read `text` and split it into discrete thoughts. For each, classify it as a **trigger** or a **note**:
|
|
35
34
|
|
|
36
|
-
- A **trigger** is an explicit instruction to you. Recognize these
|
|
35
|
+
- A **trigger** is an explicit instruction to you. Recognize these four (match intent, not exact words):
|
|
37
36
|
- **create a finding** — "this is a bug", "write a finding", "flag this", "log an issue".
|
|
38
37
|
- **answer a question** — "how is this encoded?", "is this reachable?", "where is X set?", "what calls this?".
|
|
39
38
|
- **search online** — "look up EIP-x", "search for the spec", "find the reference for…".
|
|
39
|
+
- **review progress** — the auditor says where they are with a function or contract: "done with `withdraw`", "`deposit` is fine / clean / checked", "I've read through `setFee` but want to come back", "I'm not sure about `liquidate`, question there", "finished the Vault contract".
|
|
40
40
|
- Everything else is a **note**: observations, hypotheses, things to revisit.
|
|
41
41
|
|
|
42
42
|
When a unit is ambiguous, treat it as a note (the safe default — nothing is lost, and the auditor can re-narrate a real instruction).
|
|
@@ -62,6 +62,17 @@ All three edit the same structured record; Step 5 covers the read-merge-write me
|
|
|
62
62
|
|
|
63
63
|
**search online** → use WebSearch, read the most relevant result, and fold it where it belongs — a question's `answer`, a `description` field, or a `leads` entry — with the source link.
|
|
64
64
|
|
|
65
|
+
**review progress** → tick the review map (the dashboard's Review page) for exactly what the auditor said, never more:
|
|
66
|
+
|
|
67
|
+
| The auditor says | State | Command |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| done / clean / checked / no issues with `fn` | `cleared` | `npx --no-install hex review mark <Contract.fn> --state cleared --by diane` |
|
|
70
|
+
| read it but will come back / skimmed it | `read` | `… --state read --by diane` |
|
|
71
|
+
| unsure / has a question / something smells | `questioned` | `… --state questioned --by diane --note "<the question, one line>"` |
|
|
72
|
+
| finished the whole contract | every function | `npx --no-install hex review mark <Contract> --state cleared --by diane` |
|
|
73
|
+
|
|
74
|
+
Resolve the function to its exact id first (`npx --no-install hex facts query function <name>`; with overloads, pick the one the narration is about, or mark all of them when it is clearly the whole name). **Never tick on inference.** A function the auditor merely discussed stays as it is; only an explicit statement of where they are moves it. When the Step-3 verification found a correction or a missed issue in a function the auditor called done, mark it `questioned` instead and say why in the verdict.
|
|
75
|
+
|
|
65
76
|
## Step 5 — Update the contract profile
|
|
66
77
|
|
|
67
78
|
A contract's notes are a **structured record** you grow over time — not per-session blocks. Each run: read the current record, merge this session **and your Step 3 verification** into it, write it back. Clean up filler/repetition; keep the reasoning, not the disfluency.
|
|
@@ -79,6 +90,7 @@ The record (JSON):
|
|
|
79
90
|
"roles": ["`onlyOwner` — gates setFee / setOwner"],
|
|
80
91
|
"functions": [
|
|
81
92
|
{
|
|
93
|
+
"fn_ref": "Vault.deposit(uint256,address)",
|
|
82
94
|
"sig": "deposit(assets, receiver) — external",
|
|
83
95
|
"purpose": "pull assets, mint shares",
|
|
84
96
|
"access": "anyone",
|
|
@@ -97,32 +109,34 @@ The record (JSON):
|
|
|
97
109
|
}
|
|
98
110
|
```
|
|
99
111
|
|
|
100
|
-
- **description** = how the contract works (verified truth), top-to-bottom: `purpose`, `inheritance`, `storage`, `roles`, then `functions` in **source order** (each with Purpose / Access / Effects + `notes`). Step-3 corrections go in that function's `warnings`, with `file:line`.
|
|
112
|
+
- **description** = how the contract works (verified truth), top-to-bottom: `purpose`, `inheritance`, `storage`, `roles`, then `functions` in **source order** (each with Purpose / Access / Effects + `notes`). Step-3 corrections go in that function's `warnings`, with `file:line`. Every function entry carries `fn_ref`, its exact facts id (`npx --no-install hex facts query function <name>`), so notes, review state and cards line up on the dashboard even for overloads.
|
|
101
113
|
- **questions** = your Q&A; an entry with no `answer` is still open.
|
|
102
114
|
- **leads** = things worth investigating (the Step-3 misses/angles). Only `status:"open"` leads show in the dashboard; `logged` (→ finding) and `dismissed` are kept but hidden.
|
|
103
115
|
|
|
104
116
|
Merge mechanics — read the record, edit JSON, write it back:
|
|
105
117
|
|
|
106
|
-
1. `npx hex note show "<contract>" > /tmp/diane_<ts>.json` — prints an empty skeleton on first run.
|
|
118
|
+
1. `npx --no-install hex note show "<contract>" > /tmp/diane_<ts>.json` — prints an empty skeleton on first run. Also read the auditor's code comments on that contract's file (`npx --no-install hex note comments <file>`): they are written on specific lines in the dashboard and are part of what the auditor said. Fold them into the note where they belong; never delete or rewrite them.
|
|
107
119
|
2. Edit `/tmp/diane_<ts>.json`: add or refine entries where they belong (fill a storage row, flesh out a function, set a question's `answer`, add a lead, attach a `warning`). **Preserve existing `id`s, don't duplicate** — sharpen what's there. Keep arrays concise.
|
|
108
|
-
3. `npx hex note set "<contract>" --json-file /tmp/diane_<ts>.json` (this also recomputes the `/progress` review state).
|
|
120
|
+
3. `npx --no-install hex note set "<contract>" --json-file /tmp/diane_<ts>.json` (this also recomputes the `/progress` review state).
|
|
109
121
|
|
|
110
|
-
`<contract>` is the session's `contract` value verbatim (e.g. `Vault.sol`). Cross-cutting remarks still go to the free-form `general` markdown note: `npx hex note append general --body-file …` (`general` isn't structured). If the auditor says they're done with a contract, run `npx hex note done "<contract>"`.
|
|
122
|
+
`<contract>` is the session's `contract` value verbatim (e.g. `Vault.sol`). Cross-cutting remarks still go to the free-form `general` markdown note: `npx --no-install hex note append general --body-file …` (`general` isn't structured). If the auditor says they're done with a contract, run `npx --no-install hex note done "<contract>"`.
|
|
111
123
|
|
|
112
124
|
## Step 6 — Close the loop & deliver the verdict
|
|
113
125
|
|
|
114
126
|
Mark the session processed so it isn't ingested again:
|
|
115
127
|
|
|
116
128
|
```bash
|
|
117
|
-
npx hex note session mark-processed "<file>"
|
|
129
|
+
npx --no-install hex note session mark-processed "<file>"
|
|
118
130
|
```
|
|
119
131
|
|
|
120
132
|
Then deliver a candid **pair-audit verdict** — lead with the substance (corrections, misses, what holds up), then the housekeeping. Cite `file:line`. Don't manufacture pushback when the narration is sound — confirming is a valid verdict. Address the auditor directly, never by name. Example:
|
|
121
133
|
|
|
122
|
-
> "Two corrections: previewWithdraw rounds **up**, not down (Vault.sol:88); and `setFee` has no upper bound (Vault.sol:120), which you didn't flag — added as a lead. Your reentrancy read on `deposit` checks out. Profile updated, session marked processed."
|
|
134
|
+
> "Two corrections: previewWithdraw rounds **up**, not down (Vault.sol:88); and `setFee` has no upper bound (Vault.sol:120), which you didn't flag — added as a lead. Your reentrancy read on `deposit` checks out. Ticked `deposit` as cleared; left `setFee` as questioned because of the missing bound. Profile updated, session marked processed."
|
|
135
|
+
|
|
136
|
+
Always end the verdict with the review ticks you made (function → state), or "no review changes" when there were none.
|
|
123
137
|
|
|
124
138
|
## Notes
|
|
125
139
|
|
|
126
|
-
- **Never hand-edit** `notes.json` or the `.md` files directly — always go through `npx hex note …`, exactly as the other skills route through `npx hex issue …`.
|
|
140
|
+
- **Never hand-edit** `notes.json` or the `.md` files directly — always go through `npx --no-install hex note …`, exactly as the other skills route through `npx --no-install hex issue …`.
|
|
127
141
|
- One session per invocation. If the auditor wants the next one, they run `/diane` again (or process them in a loop if they ask).
|
|
128
142
|
- Do not create PoCs from narration — that stays an explicit, auditor-driven `/validate-finding` step.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Fix review: map the client''s fix commits to findings, re-run each PoC at the fix commit, review unmapped changes, then update Status and "Update from the client" on GitHub after one confirmation'
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Skill: Fix Review
|
|
6
|
+
|
|
7
|
+
After the client fixes the reported issues, decide for each one whether it is fixed, and review any code the fixes changed that no finding explains. Evidence first: a PoC that reproduced the issue at the audited commit and **fails** at the fix commit is the strongest proof of a fix.
|
|
8
|
+
|
|
9
|
+
Use `npx --no-install hex …` for every Hex command.
|
|
10
|
+
|
|
11
|
+
## Step 1 — Inputs
|
|
12
|
+
|
|
13
|
+
Ask for the **fix commit** (default `HEAD`; it must exist locally, so `git fetch` first) and confirm the **audited commit** (default: `settings.report.initial_commit`, else `project.commit` in `.hex/config.json`). If the audit's cards are synced to GitHub, `settings.github.repo` must be set.
|
|
14
|
+
|
|
15
|
+
## Step 2 — Deterministic pass
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx --no-install hex fix-review --from <audited> --to <fix>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
It diffs the two commits on compiler facts (exact changed functions and storage layout) and maps changes and commit messages (`H-012`, `#12`) to every Verified or Synced card. It re-runs each card's PoC (`test/hex-pocs/…`) at the fix commit in a throwaway worktree, then writes `.hex/fix-review/<fix-sha>.json`, with per card `status` (`fixed` / `not_fixed` / `unknown` / `unaddressed`), evidence, PoC before/after, the changed functions and commits, plus `unmapped_changes`.
|
|
22
|
+
|
|
23
|
+
## Step 3 — Judgement where the evidence is not conclusive
|
|
24
|
+
|
|
25
|
+
For every card with status `unknown`, and every `fixed` card whose evidence is "code removed", spawn a background agent (one per card, up to 6 at a time) with:
|
|
26
|
+
|
|
27
|
+
> Card **{id}** (`npx --no-install hex issue show {id}`) was reported at {audited}. Decide whether commit range {audited}..{fix} fixes it. Read the original finding and the diff of the functions it touches (`git diff {audited} {fix} -- <files>`). If a PoC exists but no longer compiles, adapt it minimally to the new API and run it at the fix commit in a scratch worktree, not in the auditor's checkout. Decide: `fixed`, `partially_fixed` (say what remains) or `not_fixed`. Draft the "Update from the client" text: what changed, in which commit, and why that resolves (or does not resolve) the issue, in two sentences at most, plain prose, no line numbers. Then run:
|
|
28
|
+
> `npx --no-install hex fix-review propose {fix} {id} --status <status> --resolution <Fixed|Mitigated|Acknowledged|Not Fixed|Unresolved> --update-file <file> --evidence "<one sentence>"`
|
|
29
|
+
|
|
30
|
+
For `fixed` cards with a failing PoC, write the update text yourself (one sentence naming the commit) and `propose` it. For `unaddressed` cards, ask the auditor whether the client acknowledged them; if so, propose `Acknowledged` with the client's reason.
|
|
31
|
+
|
|
32
|
+
## Step 4 — Unmapped changes
|
|
33
|
+
|
|
34
|
+
Every entry in `unmapped_changes` is code the fixes changed that no finding explains: a new attack surface until reviewed. Review each one, differential-audit style (the function, its callers via `npx --no-install hex facts query callers <ref>`, the entry points that reach it). For anything risky, file a new card with `/write-finding`. Offer `/ai-audit` restricted to these files when there are many.
|
|
35
|
+
|
|
36
|
+
Record each verdict, so the dashboard's Changes page shows it as reviewed:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx --no-install hex fix-review reviewed <fix> <Contract.function> --note "<one or two sentences; name the card if you filed one>"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Step 5 — One confirmation, then GitHub
|
|
43
|
+
|
|
44
|
+
Show the whole batch as a table: card · GitHub issue · proposed Status · Update text. Then ask once:
|
|
45
|
+
|
|
46
|
+
> Apply these N updates to GitHub issues in `<repo>`? (Only the **Status** and **Update from the client** fields of each issue change.)
|
|
47
|
+
|
|
48
|
+
Only after an explicit yes:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx --no-install hex fix-review apply <fix-sha>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
It rewrites just those two fields in each issue body and leaves every other byte alone. `--dry-run` prints the new bodies without editing. Then run `/sync-issues` so the local cards pull the new state, and record the fix commit as the report's final commit in `.hex/config.json` → `settings.report.final_commit`.
|
|
55
|
+
|
|
56
|
+
## Step 6 — Summary
|
|
57
|
+
|
|
58
|
+
Fixed / partially fixed / not fixed / acknowledged counts, the unmapped changes and what came of them, and the next step (`/generate-report` for the final report).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 AI Skills Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|