@bendyline/gilde 0.1.55 → 0.1.56
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/authoring/chat-models/glm-5.3-flash-320b-q2.json +129 -0
- package/authoring/gstack/wave.json +2 -2
- package/data/chat-models/gl/glm-5.3-flash-320b-q2/manifest.json +137 -0
- package/data/chat-models/gl/glm-5.3-flash-320b-q2/versions/1.0.0/manifest.json +23 -0
- package/data/chat-models/index.json +1 -1
- package/data/craftbook-templates/a1/a11y-audit/versions/1.1.3/test.json +16 -8
- package/data/craftbook-templates/ac/accessibility-retrofit/versions/2.0.2/craftbook.json +618 -0
- package/data/craftbook-templates/ac/accessibility-retrofit/versions/2.0.2/test.json +228 -0
- package/data/craftbook-templates/al/album-curate/versions/1.0.3/test.json +6 -3
- package/data/craftbook-templates/al/alert-rules/versions/1.0.3/test.json +8 -8
- package/data/craftbook-templates/an/anniversary-cut/versions/1.0.5/test.json +10 -5
- package/data/craftbook-templates/an/annual-document-review/versions/1.0.3/test.json +16 -8
- package/data/craftbook-templates/an/anomaly-scan/versions/1.0.3/test.json +12 -6
- package/data/craftbook-templates/ap/apply-review-findings/versions/1.0.2/craftbook.json +602 -0
- package/data/craftbook-templates/ap/apply-review-findings/versions/1.0.2/test.json +290 -0
- package/data/craftbook-templates/ar/artifact-integrity-review/versions/1.0.3/test.json +18 -9
- package/data/craftbook-templates/au/audiobook-master-pack/versions/1.0.5/test.json +10 -5
- package/data/craftbook-templates/au/auth-flow/versions/1.0.3/test.json +12 -6
- package/data/craftbook-templates/au/auth-flow/versions/1.0.4/craftbook.json +282 -0
- package/data/craftbook-templates/au/auth-flow/versions/1.0.4/test.json +143 -0
- package/data/craftbook-templates/au/automation-recipe/versions/1.0.3/test.json +12 -6
- package/data/craftbook-templates/ba/backup-routine/versions/1.0.4/craftbook.json +282 -0
- package/data/craftbook-templates/ba/backup-routine/versions/1.0.4/test.json +108 -0
- package/data/craftbook-templates/bl/blog-post/versions/1.0.3/test.json +8 -8
- package/data/craftbook-templates/br/branding-website/versions/1.1.3/craftbook.json +335 -0
- package/data/craftbook-templates/br/branding-website/versions/1.1.3/test.json +164 -0
- package/data/craftbook-templates/br/broadcast-announcement/versions/1.0.3/test.json +8 -8
- package/data/craftbook-templates/br/browser-qa-audit/versions/2.0.8/craftbook.json +621 -0
- package/data/craftbook-templates/br/browser-qa-audit/versions/2.0.8/test.json +376 -0
- package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.2/craftbook.json +730 -0
- package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.2/test.json +221 -0
- package/data/craftbook-templates/bu/build-loop/versions/1.1.1/test.json +8 -8
- package/data/craftbook-templates/ca/case-study/versions/1.0.3/test.json +8 -8
- package/data/craftbook-templates/ch/chapter-narration-run/versions/1.0.4/test.json +10 -5
- package/data/craftbook-templates/ch/character-turnaround/versions/1.0.3/test.json +25 -11
- package/data/craftbook-templates/ci/ci-pipeline/versions/2.0.2/craftbook.json +587 -0
- package/data/craftbook-templates/ci/ci-pipeline/versions/2.0.2/test.json +225 -0
- package/data/craftbook-templates/ci/citation-audit/versions/1.0.3/test.json +28 -14
- package/data/craftbook-templates/cl/cli-tool/versions/1.1.3/test.json +8 -8
- package/data/craftbook-templates/co/codebase-refactoring-review/versions/1.0.3/test.json +16 -8
- package/data/craftbook-templates/co/codebase-ux-review/versions/1.0.3/test.json +18 -9
- package/data/craftbook-templates/co/codemod-sweep/versions/1.0.2/craftbook.json +605 -0
- package/data/craftbook-templates/co/codemod-sweep/versions/1.0.2/test.json +252 -0
- package/data/craftbook-templates/co/cohort-analysis/versions/1.0.3/test.json +18 -9
- package/data/craftbook-templates/co/competitive-analysis/versions/1.0.3/test.json +23 -15
- package/data/craftbook-templates/co/content-accuracy-review/versions/1.0.3/test.json +28 -14
- package/data/craftbook-templates/co/content-deck/versions/1.2.3/craftbook.json +4 -4
- package/data/craftbook-templates/co/content-deck/versions/1.2.3/test.json +3 -0
- package/data/craftbook-templates/co/content-deck/versions/1.2.4/craftbook.json +341 -0
- package/data/craftbook-templates/co/content-deck/versions/1.2.4/test.json +169 -0
- package/data/craftbook-templates/co/copy-review/versions/1.0.3/test.json +14 -7
- package/data/craftbook-templates/co/corpus-email-digest/versions/1.2.3/craftbook.json +4 -4
- package/data/craftbook-templates/co/corpus-email-digest/versions/1.2.3/test.json +3 -0
- package/data/craftbook-templates/co/corpus-email-digest/versions/1.2.4/craftbook.json +345 -0
- package/data/craftbook-templates/co/corpus-email-digest/versions/1.2.4/test.json +187 -0
- package/data/craftbook-templates/co/corpus-synthesis/versions/1.0.3/test.json +26 -13
- package/data/craftbook-templates/co/cover-letter/versions/1.0.3/test.json +8 -8
- package/data/craftbook-templates/cs/csv-transformer/versions/1.2.4/test.json +7 -7
- package/data/craftbook-templates/da/dashboard-spec/versions/1.0.3/test.json +7 -7
- package/data/craftbook-templates/da/data-export-migrate/versions/1.0.4/craftbook.json +285 -0
- package/data/craftbook-templates/da/data-export-migrate/versions/1.0.4/test.json +104 -0
- package/data/craftbook-templates/da/data-pipeline-etl/versions/1.0.5/craftbook.json +284 -0
- package/data/craftbook-templates/da/data-pipeline-etl/versions/1.0.5/test.json +162 -0
- package/data/craftbook-templates/da/data-quality-audit/versions/1.0.3/test.json +38 -19
- package/data/craftbook-templates/da/data-to-report/versions/1.0.3/test.json +12 -6
- package/data/craftbook-templates/db/db-index-tuning/versions/1.0.4/craftbook.json +286 -0
- package/data/craftbook-templates/db/db-index-tuning/versions/1.0.4/test.json +104 -0
- package/data/craftbook-templates/de/dependency-audit/versions/1.1.3/test.json +14 -7
- package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.2/craftbook.json +621 -0
- package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.2/test.json +235 -0
- package/data/craftbook-templates/de/design-review/versions/1.0.3/test.json +16 -8
- package/data/craftbook-templates/de/design-system-consultation/versions/2.0.8/craftbook.json +616 -0
- package/data/craftbook-templates/de/design-system-consultation/versions/2.0.8/test.json +201 -0
- package/data/craftbook-templates/do/doc-intake-pipeline/versions/1.0.4/craftbook.json +285 -0
- package/data/craftbook-templates/do/doc-intake-pipeline/versions/1.0.4/test.json +104 -0
- package/data/craftbook-templates/do/doc-rewrite/versions/1.0.3/test.json +119 -55
- package/data/craftbook-templates/do/dockerize-app/versions/1.0.4/craftbook.json +285 -0
- package/data/craftbook-templates/do/dockerize-app/versions/1.0.4/test.json +92 -0
- package/data/craftbook-templates/do/documentation-drift-review/versions/1.0.3/test.json +18 -9
- package/data/craftbook-templates/dr/draft-social-post/versions/1.0.2/craftbook.json +324 -0
- package/data/craftbook-templates/dr/draft-social-post/versions/1.0.2/test.json +161 -0
- package/data/craftbook-templates/ed/edit-notes/versions/1.0.3/test.json +11 -4
- package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.8/craftbook.json +566 -0
- package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.8/test.json +191 -0
- package/data/craftbook-templates/ep/episode-plan/versions/1.0.3/test.json +10 -5
- package/data/craftbook-templates/ex/executive-level-review/versions/2.0.7/test.json +7 -10
- package/data/craftbook-templates/ex/executive-level-review/versions/2.0.8/craftbook.json +595 -0
- package/data/craftbook-templates/ex/executive-level-review/versions/2.0.8/test.json +139 -0
- package/data/craftbook-templates/ex/expense-categorize/versions/1.0.4/craftbook.json +277 -0
- package/data/craftbook-templates/ex/expense-categorize/versions/1.0.4/test.json +104 -0
- package/data/craftbook-templates/fe/feature-flag-rollout/versions/1.1.2/craftbook.json +327 -0
- package/data/craftbook-templates/fe/feature-flag-rollout/versions/1.1.2/test.json +162 -0
- package/data/craftbook-templates/fl/flaky-test-fix/versions/1.0.2/craftbook.json +718 -0
- package/data/craftbook-templates/fl/flaky-test-fix/versions/1.0.2/test.json +239 -0
- package/data/craftbook-templates/fo/form-fill-batch/versions/1.0.4/craftbook.json +285 -0
- package/data/craftbook-templates/fo/form-fill-batch/versions/1.0.4/test.json +162 -0
- package/data/craftbook-templates/fo/form-wizard/versions/1.0.3/test.json +8 -8
- package/data/craftbook-templates/ho/holiday-card-run/versions/1.0.3/test.json +11 -4
- package/data/craftbook-templates/ho/hotfix-flow/versions/2.0.2/craftbook.json +610 -0
- package/data/craftbook-templates/ho/hotfix-flow/versions/2.0.2/test.json +220 -0
- package/data/craftbook-templates/ht/html-arcade-game/versions/1.2.3/craftbook.json +343 -0
- package/data/craftbook-templates/ht/html-arcade-game/versions/1.2.3/test.json +176 -0
- package/data/craftbook-templates/id/idea-office-hours/versions/2.0.8/craftbook.json +566 -0
- package/data/craftbook-templates/id/idea-office-hours/versions/2.0.8/test.json +141 -0
- package/data/craftbook-templates/im/image-set-index/versions/1.2.3/craftbook.json +298 -0
- package/data/craftbook-templates/im/image-set-index/versions/1.2.3/test.json +180 -0
- package/data/craftbook-templates/in/insurance-inventory/versions/1.0.3/test.json +11 -4
- package/data/craftbook-templates/in/interactive-quiz/versions/1.0.3/test.json +48 -23
- package/data/craftbook-templates/in/invitation-design/versions/1.0.3/test.json +1 -1
- package/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/it/item-intake/versions/1.0.3/test.json +11 -4
- package/data/craftbook-templates/le/lead-enrichment/versions/1.0.4/craftbook.json +277 -0
- package/data/craftbook-templates/le/lead-enrichment/versions/1.0.4/test.json +104 -0
- package/data/craftbook-templates/me/meeting-prep-brief/versions/1.0.3/test.json +16 -8
- package/data/craftbook-templates/me/memory-prompt-session/versions/1.0.3/test.json +3 -0
- package/data/craftbook-templates/mo/morning-report/versions/1.0.3/test.json +21 -9
- package/data/craftbook-templates/of/office-hours/versions/1.1.1/test.json +8 -8
- package/data/craftbook-templates/pe/perf-optimization/versions/2.0.2/craftbook.json +697 -0
- package/data/craftbook-templates/pe/perf-optimization/versions/2.0.2/test.json +235 -0
- package/data/craftbook-templates/pe/pest-diagnosis/versions/1.0.3/test.json +19 -8
- package/data/craftbook-templates/pl/plan/versions/1.0.2/test.json +8 -8
- package/data/craftbook-templates/pl/playtest-report/versions/1.0.3/test.json +17 -7
- package/data/craftbook-templates/pr/practice-exam/versions/1.0.3/test.json +7 -2
- package/data/craftbook-templates/pr/practice-session/versions/1.0.3/test.json +11 -4
- package/data/craftbook-templates/pu/pull-request-review/versions/1.9.2/craftbook.json +435 -0
- package/data/craftbook-templates/pu/pull-request-review/versions/1.9.2/test.json +141 -0
- package/data/craftbook-templates/qu/quarterly-summary/versions/1.0.3/test.json +16 -8
- package/data/craftbook-templates/re/receipt-intake/versions/1.0.3/test.json +11 -4
- package/data/craftbook-templates/re/receipt-ocr-ledger/versions/1.0.4/craftbook.json +277 -0
- package/data/craftbook-templates/re/receipt-ocr-ledger/versions/1.0.4/test.json +104 -0
- package/data/craftbook-templates/re/recipe-capture/versions/1.0.3/test.json +13 -5
- package/data/craftbook-templates/re/record-a-relative/versions/1.0.3/test.json +3 -0
- package/data/craftbook-templates/re/recurring-invoice-run/versions/1.0.4/craftbook.json +285 -0
- package/data/craftbook-templates/re/recurring-invoice-run/versions/1.0.4/test.json +104 -0
- package/data/craftbook-templates/re/refactor-module/versions/2.0.2/craftbook.json +695 -0
- package/data/craftbook-templates/re/refactor-module/versions/2.0.2/test.json +241 -0
- package/data/craftbook-templates/re/release-artifact-sanity-check/versions/1.0.4/craftbook.json +361 -0
- package/data/craftbook-templates/re/release-artifact-sanity-check/versions/1.0.4/test.json +138 -0
- package/data/craftbook-templates/re/release-notes/versions/1.0.4/test.json +8 -8
- package/data/craftbook-templates/re/release-notes/versions/1.0.5/craftbook.json +339 -0
- package/data/craftbook-templates/re/release-notes/versions/1.0.5/test.json +111 -0
- package/data/craftbook-templates/re/reliability-review/versions/1.0.3/test.json +16 -8
- package/data/craftbook-templates/re/research-report/versions/1.0.3/test.json +16 -8
- package/data/craftbook-templates/ro/root-cause-investigation/versions/2.0.8/craftbook.json +596 -0
- package/data/craftbook-templates/ro/root-cause-investigation/versions/2.0.8/test.json +157 -0
- package/data/craftbook-templates/ro/rough-cut-assembly/versions/1.0.4/test.json +13 -5
- package/data/craftbook-templates/sc/schema-migration/versions/2.0.2/craftbook.json +624 -0
- package/data/craftbook-templates/sc/schema-migration/versions/2.0.2/test.json +225 -0
- package/data/craftbook-templates/sc/script-automation/versions/1.0.4/craftbook.json +284 -0
- package/data/craftbook-templates/sc/script-automation/versions/1.0.4/test.json +162 -0
- package/data/craftbook-templates/se/security-architecture-review/versions/2.0.7/test.json +10 -13
- package/data/craftbook-templates/se/security-architecture-review/versions/2.0.8/craftbook.json +597 -0
- package/data/craftbook-templates/se/security-architecture-review/versions/2.0.8/test.json +157 -0
- package/data/craftbook-templates/so/social-digest/versions/1.0.3/craftbook.json +239 -0
- package/data/craftbook-templates/so/social-digest/versions/1.0.3/test.json +168 -0
- package/data/craftbook-templates/so/source-quality-audit/versions/1.0.3/test.json +25 -11
- package/data/craftbook-templates/sp/spec-authoring/versions/2.0.8/craftbook.json +599 -0
- package/data/craftbook-templates/sp/spec-authoring/versions/2.0.8/test.json +162 -0
- package/data/craftbook-templates/te/technical-documentation/versions/2.0.8/craftbook.json +577 -0
- package/data/craftbook-templates/te/technical-documentation/versions/2.0.8/test.json +174 -0
- package/data/craftbook-templates/te/test-coverage-review/versions/1.2.1/test.json +16 -8
- package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.2/craftbook.json +592 -0
- package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.2/test.json +195 -0
- package/data/craftbook-templates/th/thank-you-batch/versions/1.0.3/test.json +6 -3
- package/data/craftbook-templates/th/thank-you-sweep/versions/1.0.3/test.json +11 -4
- package/data/craftbook-templates/ti/tileset-batch/versions/1.0.3/test.json +9 -3
- package/data/craftbook-templates/tr/transcribe-and-shownotes/versions/1.0.3/test.json +10 -5
- package/data/craftbook-templates/tr/transcribe-index/versions/1.0.3/test.json +6 -3
- package/data/craftbook-templates/tr/translate-content/versions/1.1.3/craftbook.json +140 -0
- package/data/craftbook-templates/tr/translate-content/versions/1.1.3/test.json +141 -0
- package/data/craftbook-templates/ty/type-safety-pass/versions/2.0.2/craftbook.json +594 -0
- package/data/craftbook-templates/ty/type-safety-pass/versions/2.0.2/test.json +221 -0
- package/data/craftbook-templates/ux/ux-update/versions/1.0.2/craftbook.json +606 -0
- package/data/craftbook-templates/ux/ux-update/versions/1.0.2/test.json +206 -0
- package/data/craftbook-templates/we/weak-spot-drill/versions/1.0.3/test.json +11 -4
- package/data/craftbook-templates/we/weekly-walkthrough/versions/1.0.3/test.json +21 -9
- package/data/craftbook-templates/wh/whitepaper/versions/1.0.3/test.json +16 -8
- package/data/craftbook-templates/ye/year-in-review/versions/1.0.3/test.json +8 -4
- package/data/project-types/index.json +1 -1
- package/data/project-types/ju/just-chat/manifest.json +1 -1
- package/data/project-types/ju/just-chat/versions/1.0.1/about.md +5 -0
- package/data/project-types/ju/just-chat/versions/1.0.1/manifest.json +19 -0
- package/package.json +1 -1
- package/schemas/chat-model-identity.schema.json +27 -0
- package/schemas/chat-model-version.schema.json +22 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "Behavior-preserving extraction of duplicated logic",
|
|
4
|
+
"objective": "The craftbook drives a disciplined refactor of copy-pasted name-normalization logic: a green baseline recorded before anything moves, reversible stages with the suite green throughout, a re-measured duplication target, and an enforced review — verified mechanically via a reference matrix across both call sites, a duplication count across src/, and a green-suite run.",
|
|
5
|
+
"tags": [
|
|
6
|
+
"code",
|
|
7
|
+
"refactor",
|
|
8
|
+
"tactical-fleet"
|
|
9
|
+
],
|
|
10
|
+
"prompt": "Use the Behavior-Preserving Refactor craftbook for this: the same name-normalization logic is copy-pasted in src/format-name.js and src/report.js, and the copies have drifted once already. The brief is in source/refactor-brief.md. Extract the shared logic into a new src/normalize-name.js used by both files, without changing behavior.",
|
|
11
|
+
"setup": {
|
|
12
|
+
"projectName": "Crewlog",
|
|
13
|
+
"about": "A tiny crew-hours logging module. Tests run with `npm run test` (node --test).",
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "package.json",
|
|
17
|
+
"content": "{\n \"name\": \"crewlog\",\n \"private\": true,\n \"version\": \"1.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"test\": \"node --test\"\n }\n}\n"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "src/format-name.js",
|
|
21
|
+
"content": "export function formatName(raw) {\n const words = String(raw).trim().split(/\\s+/);\n const fixed = [];\n for (const word of words) {\n fixed.push(word.charAt(0).toUpperCase() + word.slice(1).toLowerCase());\n }\n return fixed.join(' ');\n}\n"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "src/report.js",
|
|
25
|
+
"content": "function titleCaseName(raw) {\n const words = String(raw).trim().split(/\\s+/);\n const fixed = [];\n for (const word of words) {\n fixed.push(word.charAt(0).toUpperCase() + word.slice(1).toLowerCase());\n }\n return fixed.join(' ');\n}\n\nexport function reportLine(entry) {\n return titleCaseName(entry.name) + ': ' + entry.hours + 'h';\n}\n\nexport function reportSummary(entries) {\n return entries.map((entry) => reportLine(entry)).join('\\n');\n}\n"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "tests/format.test.mjs",
|
|
29
|
+
"content": "import assert from 'node:assert/strict';\nimport { test } from 'node:test';\nimport { formatName } from '../src/format-name.js';\n\ntest('formats a messy name', () => {\n assert.equal(formatName(' ada lovelace '), 'Ada Lovelace');\n});\n"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"path": "tests/report.test.mjs",
|
|
33
|
+
"content": "import assert from 'node:assert/strict';\nimport { test } from 'node:test';\nimport { reportLine } from '../src/report.js';\n\ntest('report line normalizes the name', () => {\n assert.equal(reportLine({ name: 'grace hopper', hours: 2 }), 'Grace Hopper: 2h');\n});\n"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "source/refactor-brief.md",
|
|
37
|
+
"content": "# Refactor brief\n\nThe same name-normalization logic (trim, collapse inner whitespace, title-case each word) is copy-pasted in two places:\n\n- src/format-name.js - `formatName`, used by the profile screens\n- src/report.js - a private `titleCaseName` helper feeding `reportLine`\n\nThe copies drifted once before and had to be manually re-synced. Extract the shared logic into a NEW `src/normalize-name.js` module used by both files, WITHOUT changing behavior. Every output must stay byte-for-byte identical, including edge cases: extra inner spaces, ALL-CAPS input, single letters, and the empty string. Public exports must survive unchanged: `formatName`, `reportLine`, and `reportSummary` keep their names and signatures.\n"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"path": "tests/verify-refactor.mjs",
|
|
41
|
+
"content": "import assert from 'node:assert/strict';\nimport { execFileSync } from 'node:child_process';\nimport { readFileSync, readdirSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { formatName } from '../src/format-name.js';\nimport { reportLine, reportSummary } from '../src/report.js';\n\n// 1) Behavior: a reference matrix across BOTH call sites, quirks included.\nconst matrix = [\n [' ada lovelace ', 'Ada Lovelace'],\n ['GRACE HOPPER', 'Grace Hopper'],\n ['katherine g. johnson', 'Katherine G. Johnson'],\n ['a', 'A'],\n ['', ''],\n];\nfor (const [input, expected] of matrix) {\n assert.equal(formatName(input), expected, 'formatName(' + JSON.stringify(input) + ')');\n}\nassert.equal(reportLine({ name: ' grace HOPPER ', hours: 4 }), 'Grace Hopper: 4h');\nassert.equal(reportLine({ name: 'ada lovelace', hours: 2 }), 'Ada Lovelace: 2h');\nassert.equal(\n reportSummary([\n { name: 'ADA LOVELACE', hours: 1 },\n { name: ' mary jackson ', hours: 3 },\n ]),\n 'Ada Lovelace: 1h\\nMary Jackson: 3h',\n);\nconsole.log('REFACTOR_MODULE_ORACLE behavior ok');\n\n// 2) Deduplication: the title-case implementation exists at most once\n// across src/ - two surviving copies mean the extraction did not happen.\nconst root = process.cwd();\nfunction countMarker(relDir) {\n let count = 0;\n for (const entry of readdirSync(join(root, relDir), { withFileTypes: true })) {\n const relPath = relDir + '/' + entry.name;\n if (entry.isDirectory()) {\n count += countMarker(relPath);\n } else if (/\\.(js|mjs|cjs|ts)$/.test(entry.name)) {\n const text = readFileSync(join(root, relPath), 'utf8');\n count += (text.match(/toUpperCase/g) ?? []).length;\n }\n }\n return count;\n}\nconst occurrences = countMarker('src');\nassert.ok(\n occurrences <= 1,\n 'the title-case implementation appears ' + occurrences + ' times across src/ - the duplication was not extracted to one shared place',\n);\nconsole.log('REFACTOR_MODULE_ORACLE dedupe ok');\n\n// 3) The whole suite is green on the refactored tree (real run).\nfunction runSuite(cwd) {\n try {\n execFileSync(process.execPath, ['--test'], { cwd, stdio: 'pipe', timeout: 30000 });\n return 0;\n } catch (err) {\n return typeof err.status === 'number' ? err.status : 1;\n }\n}\nassert.equal(runSuite(root), 0, 'the suite must be green on the refactored tree');\nconsole.log('REFACTOR_MODULE_ORACLE suite green');\nconsole.log('REFACTOR_MODULE_ORACLE done');\n",
|
|
42
|
+
"surface": "harness"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"craftbookParams": {
|
|
46
|
+
"scope": "Extract the duplicated name normalization in src/format-name.js and src/report.js into a shared src/normalize-name.js used by both, without changing behavior; see source/refactor-brief.md."
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"mocks": [],
|
|
50
|
+
"success": {
|
|
51
|
+
"summary": "The duplicated normalization lives in exactly one place, both call sites behave byte-for-byte as before (reference matrix), the suite is green on a real run, and every fleet artifact exists with honest citations.",
|
|
52
|
+
"deliverables": [
|
|
53
|
+
{
|
|
54
|
+
"path": "{{task.dir}}/baseline.md",
|
|
55
|
+
"kind": "markdown-notes",
|
|
56
|
+
"artifact": true,
|
|
57
|
+
"minBytes": 500,
|
|
58
|
+
"checks": [
|
|
59
|
+
{
|
|
60
|
+
"kind": "contains",
|
|
61
|
+
"file": "{{task.dir}}/baseline.md",
|
|
62
|
+
"pattern": "^##\\s+Current behavior[\\s\\S]*^##\\s+Measurements[\\s\\S]*^##\\s+Guardrail",
|
|
63
|
+
"flags": "im",
|
|
64
|
+
"label": "baseline sections in order"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"kind": "citationsResolve",
|
|
68
|
+
"file": "{{task.dir}}/baseline.md",
|
|
69
|
+
"minCitations": 2,
|
|
70
|
+
"artifact": true
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "{{task.dir}}/plan.md",
|
|
76
|
+
"kind": "markdown-notes",
|
|
77
|
+
"artifact": true,
|
|
78
|
+
"minBytes": 500,
|
|
79
|
+
"checks": [
|
|
80
|
+
{
|
|
81
|
+
"kind": "contains",
|
|
82
|
+
"file": "{{task.dir}}/plan.md",
|
|
83
|
+
"pattern": "^##\\s+Target[\\s\\S]*^##\\s+Stages[\\s\\S]*^##\\s+Acceptance criteria",
|
|
84
|
+
"flags": "im",
|
|
85
|
+
"label": "plan sections in order"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"kind": "citationsResolve",
|
|
89
|
+
"file": "{{task.dir}}/plan.md",
|
|
90
|
+
"minCitations": 2,
|
|
91
|
+
"artifact": true
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"path": "{{task.dir}}/change-notes.md",
|
|
97
|
+
"kind": "markdown-notes",
|
|
98
|
+
"artifact": true,
|
|
99
|
+
"minBytes": 600,
|
|
100
|
+
"checks": [
|
|
101
|
+
{
|
|
102
|
+
"kind": "contains",
|
|
103
|
+
"file": "{{task.dir}}/change-notes.md",
|
|
104
|
+
"pattern": "^##\\s+Stages executed[\\s\\S]*^##\\s+Files touched[\\s\\S]*^##\\s+Deviations from plan",
|
|
105
|
+
"flags": "im",
|
|
106
|
+
"label": "change-notes sections in order"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"kind": "citationsResolve",
|
|
110
|
+
"file": "{{task.dir}}/change-notes.md",
|
|
111
|
+
"minCitations": 2,
|
|
112
|
+
"artifact": true
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"path": "{{task.dir}}/verification.md",
|
|
118
|
+
"kind": "markdown-notes",
|
|
119
|
+
"artifact": true,
|
|
120
|
+
"minBytes": 400,
|
|
121
|
+
"checks": [
|
|
122
|
+
{
|
|
123
|
+
"kind": "contains",
|
|
124
|
+
"file": "{{task.dir}}/verification.md",
|
|
125
|
+
"pattern": "^##\\s+Before\\s*/\\s*after[\\s\\S]*^##\\s+Suite[\\s\\S]*^##\\s+Result",
|
|
126
|
+
"flags": "im",
|
|
127
|
+
"label": "verification sections in order"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"kind": "contains",
|
|
131
|
+
"file": "{{task.dir}}/verification.md",
|
|
132
|
+
"pattern": "^##\\s+Before\\s*/\\s*after[\\s\\S]*\\d",
|
|
133
|
+
"flags": "im",
|
|
134
|
+
"label": "before/after figures quoted"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"path": "{{task.dir}}/review.md",
|
|
140
|
+
"kind": "markdown-report",
|
|
141
|
+
"artifact": true,
|
|
142
|
+
"minBytes": 400,
|
|
143
|
+
"checks": [
|
|
144
|
+
{
|
|
145
|
+
"kind": "contains",
|
|
146
|
+
"file": "{{task.dir}}/review.md",
|
|
147
|
+
"pattern": "Verdict:\\s*(?:PASS|REVISE)",
|
|
148
|
+
"flags": "i",
|
|
149
|
+
"label": "explicit reviewer verdict"
|
|
150
|
+
}
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"checks": [
|
|
155
|
+
{
|
|
156
|
+
"kind": "notContains",
|
|
157
|
+
"file": "src/format-name.js",
|
|
158
|
+
"pattern": "toUpperCase",
|
|
159
|
+
"label": "format-name.js no longer carries its own title-case copy"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"kind": "notContains",
|
|
163
|
+
"file": "src/report.js",
|
|
164
|
+
"pattern": "toUpperCase",
|
|
165
|
+
"label": "report.js no longer carries its own title-case copy"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"kind": "sourceParses",
|
|
169
|
+
"file": "src/format-name.js"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"kind": "sourceParses",
|
|
173
|
+
"file": "src/report.js"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"kind": "nodeScriptPasses",
|
|
177
|
+
"script": "tests/verify-refactor.mjs",
|
|
178
|
+
"timeoutMs": 60000,
|
|
179
|
+
"requiredOutput": [
|
|
180
|
+
{
|
|
181
|
+
"pattern": "REFACTOR_MODULE_ORACLE behavior ok",
|
|
182
|
+
"label": "both call sites match the reference matrix"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"pattern": "REFACTOR_MODULE_ORACLE dedupe ok",
|
|
186
|
+
"label": "the implementation exists at most once across src/"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"pattern": "REFACTOR_MODULE_ORACLE suite green",
|
|
190
|
+
"label": "suite green on the refactored tree"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"taskNotes": {
|
|
196
|
+
"minBytes": 120,
|
|
197
|
+
"checks": [
|
|
198
|
+
{
|
|
199
|
+
"kind": "contains",
|
|
200
|
+
"file": "task-notes.md",
|
|
201
|
+
"pattern": "\\bDONE\\b[\\s\\S]*(npm\\s+run\\s+test|node\\s+--test)",
|
|
202
|
+
"flags": "i",
|
|
203
|
+
"label": "DONE note names the real test command"
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
"taskGraph": {
|
|
208
|
+
"requireCraftbookTask": true,
|
|
209
|
+
"requireTerminalStep": true
|
|
210
|
+
},
|
|
211
|
+
"unchangedFixtures": [
|
|
212
|
+
"source/refactor-brief.md",
|
|
213
|
+
"package.json"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"rubric": {
|
|
217
|
+
"artifact": {
|
|
218
|
+
"path": "{{task.dir}}/change-notes.md",
|
|
219
|
+
"kind": "markdown"
|
|
220
|
+
},
|
|
221
|
+
"axes": [
|
|
222
|
+
{
|
|
223
|
+
"name": "Guardrail-first discipline",
|
|
224
|
+
"description": "The suite was genuinely run and recorded green before any restructuring, characterization coverage was considered honestly, and the baseline counted the duplication with a stated method."
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "Reversible-stage execution",
|
|
228
|
+
"description": "The restructure happened in small planned stages at the real sites, with the suite kept green between stages and deviations recorded honestly rather than papered over."
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"name": "Genuine deduplication",
|
|
232
|
+
"description": "One shared implementation remains, both call sites use it, public exports survived unchanged, and no behavior change was smuggled in under cover of the refactor."
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
"qualityFocus": [
|
|
237
|
+
"green-before/green-after receipts",
|
|
238
|
+
"same-method re-measurement",
|
|
239
|
+
"enforced review loop"
|
|
240
|
+
]
|
|
241
|
+
}
|
package/data/craftbook-templates/re/release-artifact-sanity-check/versions/1.0.4/craftbook.json
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "release-artifact-sanity-check",
|
|
3
|
+
"name": "Release Artifact Sanity Check",
|
|
4
|
+
"description": "Sanity-check a folder of release artifacts without executing them: inventory every package, verify hashes and signatures against trusted evidence, safely inspect every file inside archives and application bundles, scan for suspicious or secret-bearing content, and produce an evidence-backed ship or no-ship report.\n\nThis craftbook treats release artifacts as hostile input. It never executes an installer, application, script, postinstall hook, or extracted binary. It stages any extraction under a disposable workspace directory, rejects path traversal and escaping symlinks, bounds recursive expansion, and reports any item it could not inspect as NOT VERIFIED rather than silently passing it. The result is a file-level inventory plus a go/no-go report whose claims are tied to commands, hashes, signer identities, and exact paths.\n\nWorking files under {{workPath}}/, reviews/, and reports/ live in the project artifacts drawer; source and user-facing output files remain in the workspace.",
|
|
5
|
+
"entryStepId": "inventory",
|
|
6
|
+
"triggers": [
|
|
7
|
+
"sanity check release artifacts",
|
|
8
|
+
"audit release packages",
|
|
9
|
+
"verify installer signatures",
|
|
10
|
+
"inspect app bundles",
|
|
11
|
+
"check release artifact integrity",
|
|
12
|
+
"scan a release folder"
|
|
13
|
+
],
|
|
14
|
+
"toolsets": [
|
|
15
|
+
{
|
|
16
|
+
"toolsetId": "builtin.security-intel",
|
|
17
|
+
"autoAllow": true,
|
|
18
|
+
"reason": "reuse local secret, dependency, malware, and vulnerability scanner evidence when available"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"toolsetId": "builtin.code-intel",
|
|
22
|
+
"autoAllow": true,
|
|
23
|
+
"reason": "search safely extracted text and package manifests without executing bundled code"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"paramSchema": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"workPath": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"title": "Working folder",
|
|
32
|
+
"description": "Per-task working folder in the artifacts drawer. Defaults to this task's own folder so runs never collide; override with a stable name when you deliberately want runs to share files.",
|
|
33
|
+
"default": "{{task.dir}}"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"steps": [
|
|
38
|
+
{
|
|
39
|
+
"id": "inventory",
|
|
40
|
+
"name": "Inventory the release set",
|
|
41
|
+
"description": "identify every release record, artifact, checksum, signature, and package boundary",
|
|
42
|
+
"prompt": "Treat the entire input folder as hostile and do not execute anything in it. Locate the requested release folder; if it came from the GitHub Releases connector, use the release Markdown records, frontmatter, asset tables, and sibling `attachments/` directories to associate bytes with releases. Enumerate every top-level artifact, checksum manifest, detached signature, certificate/provenance file, and release-notes record. Record exact relative path, byte size, file type identified from magic bytes (not extension alone), release/tag association, and the expected digest/signature evidence available. Define the inspection boundary and a safe staging directory outside the source corpus. Before extraction, list archive entries and flag absolute paths, `..` traversal, device files, escaping links, duplicate paths, case collisions, excessive nesting, or expansion bombs. Never follow a symlink outside the staging root. Write the complete inventory, counts, tool availability, inspection limits, and acceptance checklist to `{{workPath}}/release-artifact-inventory.md` and task notes. Any artifact omitted by a configured size/name filter must be listed as NOT PRESENT and prevents a full-set pass.\n\nStore `{{workPath}}/release-artifact-inventory.md` in the artifacts drawer with `write_artifact` and verify them with `read_artifact`; do not write these working files to the workspace.",
|
|
43
|
+
"suggestedRole": "developer",
|
|
44
|
+
"toolPolicy": {
|
|
45
|
+
"disallowBuiltinToolsets": [
|
|
46
|
+
"ai-apps",
|
|
47
|
+
"audio",
|
|
48
|
+
"browser-automation",
|
|
49
|
+
"craftbooks",
|
|
50
|
+
"data-tables",
|
|
51
|
+
"entity-intel",
|
|
52
|
+
"git",
|
|
53
|
+
"image-intel",
|
|
54
|
+
"images",
|
|
55
|
+
"role-delegation",
|
|
56
|
+
"role-delegation-escalation",
|
|
57
|
+
"security-intel",
|
|
58
|
+
"team-management",
|
|
59
|
+
"videos",
|
|
60
|
+
"web",
|
|
61
|
+
"workspace-fs-write"
|
|
62
|
+
],
|
|
63
|
+
"outputMedium": "artifact"
|
|
64
|
+
},
|
|
65
|
+
"advanceWhen": {
|
|
66
|
+
"file": "{{workPath}}/release-artifact-inventory.md",
|
|
67
|
+
"minBytes": 1,
|
|
68
|
+
"sniff": "nonempty",
|
|
69
|
+
"artifact": true
|
|
70
|
+
},
|
|
71
|
+
"gate": {
|
|
72
|
+
"at": "completion",
|
|
73
|
+
"checks": [
|
|
74
|
+
{
|
|
75
|
+
"kind": "minBytes",
|
|
76
|
+
"file": "{{workPath}}/release-artifact-inventory.md",
|
|
77
|
+
"bytes": 500,
|
|
78
|
+
"artifact": true
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"kind": "sniff",
|
|
82
|
+
"file": "{{workPath}}/release-artifact-inventory.md",
|
|
83
|
+
"sniff": "nonempty",
|
|
84
|
+
"artifact": true
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"onReject": "inventory",
|
|
88
|
+
"maxAttempts": 3
|
|
89
|
+
},
|
|
90
|
+
"next": "verify"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "verify",
|
|
94
|
+
"name": "Verify integrity and signing",
|
|
95
|
+
"description": "hash every artifact and validate signatures against a trusted identity",
|
|
96
|
+
"prompt": "Without executing any artifact, compute SHA-256 for every top-level asset and compare it independently against: GitHub's supplied `sha256:` digest when present, checked-in checksum manifests, detached signature payloads, and any release provenance/attestation. A hash written beside the same untrusted artifact is evidence of consistency, not authenticity; name the trust root. Verify signatures with the platform-appropriate verifier when installed (for example `codesign`/`spctl`/`pkgutil` on macOS, `Get-AuthenticodeSignature` or `signtool` on Windows, and `gpgv`, `cosign verify-blob`, `rpm --checksig`, or package-native verification on Linux). Capture the exact command, exit status, signer subject/team/key identity, timestamp/notarization status, certificate chain or trusted key source, and whether the signed object covers the bytes being shipped. Do not call an artifact signed merely because a signature file exists. Use PASS / FAIL / NOT VERIFIED for every artifact and evidence type. A mismatch, invalid signature, unsigned required executable, untrusted key, unavailable verifier, or missing expected artifact is not a pass. Write results to `{{workPath}}/release-artifact-verification.md` and task notes.\n\nStore `{{workPath}}/release-artifact-verification.md` in the artifacts drawer with `write_artifact` and verify them with `read_artifact`; do not write these working files to the workspace.",
|
|
97
|
+
"suggestedRole": "reviewer",
|
|
98
|
+
"toolPolicy": {
|
|
99
|
+
"disallowBuiltinToolsets": [
|
|
100
|
+
"ai-apps",
|
|
101
|
+
"archives",
|
|
102
|
+
"audio",
|
|
103
|
+
"browser-automation",
|
|
104
|
+
"code-execution",
|
|
105
|
+
"craftbooks",
|
|
106
|
+
"data-tables",
|
|
107
|
+
"entity-intel",
|
|
108
|
+
"git",
|
|
109
|
+
"image-intel",
|
|
110
|
+
"images",
|
|
111
|
+
"role-delegation",
|
|
112
|
+
"role-delegation-escalation",
|
|
113
|
+
"security-intel",
|
|
114
|
+
"team-management",
|
|
115
|
+
"videos",
|
|
116
|
+
"web",
|
|
117
|
+
"workspace-fs-write"
|
|
118
|
+
],
|
|
119
|
+
"outputMedium": "artifact"
|
|
120
|
+
},
|
|
121
|
+
"advanceWhen": {
|
|
122
|
+
"file": "{{workPath}}/release-artifact-verification.md",
|
|
123
|
+
"minBytes": 1,
|
|
124
|
+
"sniff": "nonempty",
|
|
125
|
+
"artifact": true
|
|
126
|
+
},
|
|
127
|
+
"gate": {
|
|
128
|
+
"at": "completion",
|
|
129
|
+
"checks": [
|
|
130
|
+
{
|
|
131
|
+
"kind": "minBytes",
|
|
132
|
+
"file": "{{workPath}}/release-artifact-verification.md",
|
|
133
|
+
"bytes": 600,
|
|
134
|
+
"artifact": true
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"scripts": [
|
|
138
|
+
{
|
|
139
|
+
"name": "checkContains",
|
|
140
|
+
"scope": "standard",
|
|
141
|
+
"inputs": {
|
|
142
|
+
"file": "{{workPath}}/release-artifact-verification.md",
|
|
143
|
+
"pattern": "PASS|FAIL|NOT VERIFIED",
|
|
144
|
+
"flags": "i"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"onReject": "verify",
|
|
149
|
+
"maxAttempts": 3
|
|
150
|
+
},
|
|
151
|
+
"next": "inspect"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"id": "inspect",
|
|
155
|
+
"name": "Inspect every package member",
|
|
156
|
+
"description": "safely unpack app packages and scan every contained file",
|
|
157
|
+
"prompt": "Work only in the disposable staging directory; never mutate the source corpus and never execute package contents. Safely expand each supported container recursively, including ZIP/TAR archives, DMG/PKG and `.app` bundles where host tooling permits, MSI/EXE packages where a non-executing extractor is available, AppImage/deb/rpm packages, and nested archives. Inventory EVERY regular file and symlink with relative path, magic-byte type, size, SHA-256, executable bit, signing coverage, and parent package. Inspect manifests, entitlements, permissions, dynamic libraries, launch agents/services, updater helpers, install scripts as text, bundled runtimes/dependencies, debug symbols, universal architectures, and unexpected executables. Scan extracted text and metadata for secrets, private keys, credentials, unsafe URLs, suspicious persistence, world-writable paths, and provenance drift; reuse `security_scan`/local malware scanners when available, recording tool name/version/result. Never run an installer, binary, macro, or script and disable postinstall hooks. If a format/tool/limit prevents inspecting even one member, name the exact gap and mark the package coverage INCOMPLETE / NOT VERIFIED. Write the file-count reconciliation, findings, and evidence to `{{workPath}}/release-package-inspection.md` and task notes.\n\nStore `{{workPath}}/release-package-inspection.md` in the artifacts drawer with `write_artifact` and verify them with `read_artifact`; do not write these working files to the workspace.",
|
|
158
|
+
"suggestedRole": "developer",
|
|
159
|
+
"toolPolicy": {
|
|
160
|
+
"disallowBuiltinToolsets": [
|
|
161
|
+
"ai-apps",
|
|
162
|
+
"audio",
|
|
163
|
+
"browser-automation",
|
|
164
|
+
"craftbooks",
|
|
165
|
+
"data-tables",
|
|
166
|
+
"entity-intel",
|
|
167
|
+
"git",
|
|
168
|
+
"image-intel",
|
|
169
|
+
"images",
|
|
170
|
+
"role-delegation",
|
|
171
|
+
"role-delegation-escalation",
|
|
172
|
+
"team-management",
|
|
173
|
+
"videos",
|
|
174
|
+
"web",
|
|
175
|
+
"workspace-fs-write"
|
|
176
|
+
],
|
|
177
|
+
"outputMedium": "artifact"
|
|
178
|
+
},
|
|
179
|
+
"advanceWhen": {
|
|
180
|
+
"file": "{{workPath}}/release-package-inspection.md",
|
|
181
|
+
"minBytes": 1,
|
|
182
|
+
"sniff": "nonempty",
|
|
183
|
+
"artifact": true
|
|
184
|
+
},
|
|
185
|
+
"gate": {
|
|
186
|
+
"at": "completion",
|
|
187
|
+
"checks": [
|
|
188
|
+
{
|
|
189
|
+
"kind": "minBytes",
|
|
190
|
+
"file": "{{workPath}}/release-package-inspection.md",
|
|
191
|
+
"bytes": 700,
|
|
192
|
+
"artifact": true
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"scripts": [
|
|
196
|
+
{
|
|
197
|
+
"name": "checkContains",
|
|
198
|
+
"scope": "standard",
|
|
199
|
+
"inputs": {
|
|
200
|
+
"file": "{{workPath}}/release-package-inspection.md",
|
|
201
|
+
"pattern": "file|path|SHA-256|coverage",
|
|
202
|
+
"flags": "i"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"onReject": "inspect",
|
|
207
|
+
"maxAttempts": 3
|
|
208
|
+
},
|
|
209
|
+
"next": "report"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"id": "report",
|
|
213
|
+
"name": "Write the artifact sanity report",
|
|
214
|
+
"description": "state a ship decision with complete evidence and blockers",
|
|
215
|
+
"prompt": "Write `release-artifact-sanity-report.md`. Put one decision at the top: PASS / NO-GO / PASS-WITH-CONDITIONS, with the deciding evidence. Include: scope and release/tag; coverage summary with top-level and contained-file counts reconciled; an artifact matrix with expected/computed digest, integrity result, signature result, signer/trust root, package-inspection coverage, and evidence path/command; findings ranked by severity with exact package/member paths; unsupported or uninspected items; and blockers with concrete remediation/rebuild/re-sign/re-upload actions. Distinguish verified authenticity from checksum consistency and signature presence. A digest mismatch, invalid/untrusted/required-but-missing signature, escaping archive member, secret-bearing shipped file, uninspected package member, or unavailable mandatory verifier prevents an unconditional PASS. Do not minimize an issue because another platform's package passed. Include enough detail for another reviewer to reproduce each claim without running the artifacts. Record the report path, decision, artifact count, contained-file count, and blocker count in task notes.",
|
|
216
|
+
"suggestedRole": "reviewer",
|
|
217
|
+
"toolPolicy": {
|
|
218
|
+
"disallowBuiltinToolsets": [
|
|
219
|
+
"ai-apps",
|
|
220
|
+
"artifacts",
|
|
221
|
+
"audio",
|
|
222
|
+
"browser-automation",
|
|
223
|
+
"code-execution",
|
|
224
|
+
"craftbooks",
|
|
225
|
+
"data-tables",
|
|
226
|
+
"entity-intel",
|
|
227
|
+
"git",
|
|
228
|
+
"image-intel",
|
|
229
|
+
"images",
|
|
230
|
+
"role-delegation",
|
|
231
|
+
"role-delegation-escalation",
|
|
232
|
+
"security-intel",
|
|
233
|
+
"team-management",
|
|
234
|
+
"videos",
|
|
235
|
+
"web"
|
|
236
|
+
],
|
|
237
|
+
"outputMedium": "workspace",
|
|
238
|
+
"additionalOutputMedia": [
|
|
239
|
+
"task-note"
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
"advanceWhen": {
|
|
243
|
+
"file": "release-artifact-sanity-report.md",
|
|
244
|
+
"minBytes": 1,
|
|
245
|
+
"sniff": "nonempty"
|
|
246
|
+
},
|
|
247
|
+
"gate": {
|
|
248
|
+
"at": "completion",
|
|
249
|
+
"checks": [
|
|
250
|
+
{
|
|
251
|
+
"kind": "minBytes",
|
|
252
|
+
"file": "release-artifact-sanity-report.md",
|
|
253
|
+
"bytes": 2000
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"scripts": [
|
|
257
|
+
{
|
|
258
|
+
"name": "checkContains",
|
|
259
|
+
"scope": "standard",
|
|
260
|
+
"inputs": {
|
|
261
|
+
"file": "release-artifact-sanity-report.md",
|
|
262
|
+
"pattern": "PASS|NO-GO|PASS-WITH-CONDITIONS",
|
|
263
|
+
"flags": "i"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "checkContains",
|
|
268
|
+
"scope": "standard",
|
|
269
|
+
"inputs": {
|
|
270
|
+
"file": "release-artifact-sanity-report.md",
|
|
271
|
+
"pattern": "integrity|digest|SHA-256",
|
|
272
|
+
"flags": "i"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "checkContains",
|
|
277
|
+
"scope": "standard",
|
|
278
|
+
"inputs": {
|
|
279
|
+
"file": "release-artifact-sanity-report.md",
|
|
280
|
+
"pattern": "signature|signer|notar",
|
|
281
|
+
"flags": "i"
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"onReject": "report",
|
|
286
|
+
"maxAttempts": 4
|
|
287
|
+
},
|
|
288
|
+
"next": "evaluate"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"id": "evaluate",
|
|
292
|
+
"name": "Evaluate",
|
|
293
|
+
"description": "grade coverage and evidence; pass only when every acceptance criterion is met",
|
|
294
|
+
"prompt": "Open `release-artifact-sanity-report.md` and the three evidence notes. Grade EACH criterion PASS/FAIL with one-line evidence: (1) every top-level release artifact is inventoried and its SHA-256 computed; (2) expected digests are compared and mismatches are blockers; (3) every required signature is cryptographically verified against a named trusted identity, with presence-only and unavailable checks marked NOT VERIFIED; (4) every supported package is safely expanded without executing content; (5) contained-file counts reconcile and every member has a path/type/hash/security disposition; (6) traversal, escaping links, expansion limits, secrets, persistence, entitlements, permissions, libraries, and nested executables are addressed; (7) all inspection gaps are explicit and prevent an unconditional pass; (8) the final decision follows from the evidence. Then route explicitly: if every criterion passes, call `advance_task_step({ ref, stepId: \"evaluate\", next: \"finish\" })`. If any criterion fails, write the exact gap to task notes and call `advance_task_step({ ref, stepId: \"evaluate\", next: \"report\" })`. Never route to finish with a silent omission or unsupported package. After three unproductive loops, stop with DONE_WITH_CONCERNS for user review.",
|
|
295
|
+
"suggestedRole": "reviewer",
|
|
296
|
+
"toolPolicy": {
|
|
297
|
+
"disallowBuiltinToolsets": [
|
|
298
|
+
"ai-apps",
|
|
299
|
+
"archives",
|
|
300
|
+
"artifacts",
|
|
301
|
+
"audio",
|
|
302
|
+
"browser-automation",
|
|
303
|
+
"code-execution",
|
|
304
|
+
"craftbooks",
|
|
305
|
+
"data-tables",
|
|
306
|
+
"entity-intel",
|
|
307
|
+
"git",
|
|
308
|
+
"image-intel",
|
|
309
|
+
"images",
|
|
310
|
+
"role-delegation",
|
|
311
|
+
"role-delegation-escalation",
|
|
312
|
+
"team-management",
|
|
313
|
+
"videos",
|
|
314
|
+
"web",
|
|
315
|
+
"workspace-fs-write"
|
|
316
|
+
],
|
|
317
|
+
"outputMedium": "task-note"
|
|
318
|
+
},
|
|
319
|
+
"consumes": [
|
|
320
|
+
{
|
|
321
|
+
"file": "release-artifact-sanity-report.md"
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"next": "report"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"id": "finish",
|
|
328
|
+
"name": "Finish",
|
|
329
|
+
"description": "stamp the decision and hand off the evidence-backed report",
|
|
330
|
+
"prompt": "All acceptance criteria passed. Write a concise DONE summary to task notes: the release/tag and folder reviewed, report path, decision, top-level artifact count, contained-file count, blocker count, and any conditions or NOT VERIFIED items. Remind the user that the audit did not execute any artifact. Then report DONE.",
|
|
331
|
+
"suggestedRole": "reviewer",
|
|
332
|
+
"toolPolicy": {
|
|
333
|
+
"disallowBuiltinToolsets": [
|
|
334
|
+
"ai-apps",
|
|
335
|
+
"archives",
|
|
336
|
+
"artifacts",
|
|
337
|
+
"audio",
|
|
338
|
+
"browser-automation",
|
|
339
|
+
"craftbooks",
|
|
340
|
+
"data-tables",
|
|
341
|
+
"entity-intel",
|
|
342
|
+
"git",
|
|
343
|
+
"image-intel",
|
|
344
|
+
"images",
|
|
345
|
+
"role-delegation",
|
|
346
|
+
"role-delegation-escalation",
|
|
347
|
+
"security-intel",
|
|
348
|
+
"team-management",
|
|
349
|
+
"videos",
|
|
350
|
+
"web",
|
|
351
|
+
"workspace-fs-write"
|
|
352
|
+
],
|
|
353
|
+
"outputMedium": "task-note"
|
|
354
|
+
},
|
|
355
|
+
"terminal": true
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
"version": "1.0.4",
|
|
359
|
+
"releasedAt": "2026-09-05T03:30:00Z",
|
|
360
|
+
"minGezelVersion": "1.26233"
|
|
361
|
+
}
|