@mmerterden/multi-agent-pipeline 20.37.1 → 20.38.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/CHANGELOG.md +98 -49
- package/README.md +12 -10
- package/README.tr.md +12 -10
- package/docs/adr/0006-skills-core-external-split.md +5 -5
- package/docs/adr/0010-own-code-graph.md +6 -7
- package/docs/adr/0013-lsp-code-intelligence.md +6 -8
- package/docs/adr/0017-change-impact-from-the-graph.md +4 -5
- package/docs/adr/0018-cross-repo-links-not-a-global-graph.md +1 -1
- package/docs/adr/README.md +1 -1
- package/docs/ecosystem.md +53 -41
- package/docs/facts.json +15 -13
- package/docs/features.md +1 -1
- package/install/_dev-only-files.mjs +3 -0
- package/install/_platform-filter.mjs +1 -23
- package/install/catalog-history.json +1 -1
- package/install/claude.mjs +8 -1
- package/install/codex.mjs +0 -2
- package/install/copilot.mjs +0 -2
- package/install/templates/claude-hooks.json +47 -1
- package/manifest.json +429 -311
- package/package.json +5 -2
- package/pipeline/agents/security-auditor.md +58 -6
- package/pipeline/commands/multi-agent/build-optimize/SKILL.md +1 -2
- package/pipeline/commands/multi-agent/complaint-analysis/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/design-check/SKILL.md +1 -1
- package/pipeline/commands/multi-agent/graph/SKILL.md +12 -3
- package/pipeline/commands/multi-agent/research/SKILL.md +2 -2
- package/pipeline/commands/multi-agent/search/SKILL.md +10 -1
- package/pipeline/commands/multi-agent/security-review/SKILL.md +4 -0
- package/pipeline/commands/multi-agent/setup/SKILL.md +1 -0
- package/pipeline/commands/multi-agent/stack/SKILL.md +8 -0
- package/pipeline/commands/multi-agent/store-ready/SKILL.md +1 -1
- package/pipeline/commands/sim-test.md +34 -1
- package/pipeline/lib/context-budget.mjs +103 -0
- package/pipeline/lib/credential-inventory.sh +2 -3
- package/pipeline/lib/identifier-scan.mjs +145 -0
- package/pipeline/lib/outbound-gate.mjs +28 -1
- package/pipeline/lib/unattended-profile-check.mjs +13 -4
- package/pipeline/multi-agent-refs/analysis/locked.md +1 -1
- package/pipeline/multi-agent-refs/analysis/redesign.md +17 -3
- package/pipeline/multi-agent-refs/analysis-template-corporate.md +8 -4
- package/pipeline/multi-agent-refs/analysis-template.md +7 -5
- package/pipeline/multi-agent-refs/complaint-analysis/phases.md +1 -0
- package/pipeline/multi-agent-refs/features/autopilot-circuit-breaker.md +1 -1
- package/pipeline/multi-agent-refs/features/code-graph.md +25 -0
- package/pipeline/multi-agent-refs/features/design-conformance.md +20 -4
- package/pipeline/multi-agent-refs/features/free-models.md +10 -3
- package/pipeline/multi-agent-refs/features/research.md +4 -3
- package/pipeline/multi-agent-refs/features/security-audit.md +25 -3
- package/pipeline/multi-agent-refs/features/unattended-security.md +20 -0
- package/pipeline/multi-agent-refs/help/en.md +15 -9
- package/pipeline/multi-agent-refs/help/tr.md +15 -9
- package/pipeline/multi-agent-refs/knowledge.md +17 -0
- package/pipeline/multi-agent-refs/outside-the-pipeline.md +9 -0
- package/pipeline/multi-agent-refs/phases/log-format.md +5 -0
- package/pipeline/multi-agent-refs/phases/operations.md +3 -5
- package/pipeline/multi-agent-refs/picker-contract.md +1 -1
- package/pipeline/multi-agent-refs/research/engine.md +2 -1
- package/pipeline/multi-agent-refs/setup/free-models.md +10 -0
- package/pipeline/multi-agent-refs/store-ready/gate-3-policy.md +15 -0
- package/pipeline/multi-agent-refs/web-guide.md +2 -1
- package/pipeline/office/index.html +3 -7
- package/pipeline/office/toolkit.json +1 -1
- package/pipeline/rules/outside-the-pipeline.md +1 -1
- package/pipeline/schemas/learnings-ledger.schema.json +7 -2
- package/pipeline/schemas/prefs.schema.json +16 -3
- package/pipeline/schemas/reviewer-output.schema.json +113 -5
- package/pipeline/schemas/secret-patterns.json +49 -0
- package/pipeline/schemas/security-finding.schema.json +49 -5
- package/pipeline/scripts/_code-graph.mjs +3 -3
- package/pipeline/scripts/_graph-analysis.mjs +51 -0
- package/pipeline/scripts/_memory-policy.mjs +11 -3
- package/pipeline/scripts/_secret-scan.mjs +1 -1
- package/pipeline/scripts/_skill-practices.mjs +178 -0
- package/pipeline/scripts/_stack-routing.mjs +1 -0
- package/pipeline/scripts/autopilot-runner.mjs +8 -3
- package/pipeline/scripts/build-stack-plugins.mjs +8 -44
- package/pipeline/scripts/capture-resume.sh +19 -0
- package/pipeline/scripts/file-context.mjs +306 -70
- package/pipeline/scripts/gen-skills-index.mjs +1 -1
- package/pipeline/scripts/graph-hint.mjs +197 -0
- package/pipeline/scripts/graph-hint.sh +20 -0
- package/pipeline/scripts/graph-query.mjs +306 -11
- package/pipeline/scripts/graph-report.mjs +29 -1
- package/pipeline/scripts/learnings-ledger.mjs +71 -15
- package/pipeline/scripts/note-agent-event.mjs +160 -0
- package/pipeline/scripts/note-agent-event.sh +19 -0
- package/pipeline/scripts/parity-score.mjs +139 -0
- package/pipeline/scripts/pre-commit-check.sh +25 -4
- package/pipeline/scripts/pre-push-check.sh +3 -0
- package/pipeline/scripts/repo-recommend.mjs +321 -0
- package/pipeline/scripts/scan-agent-config.sh +1 -2
- package/pipeline/scripts/security-evidence-gate.mjs +282 -0
- package/pipeline/scripts/unattended_policy.py +3 -2
- package/pipeline/scripts/validate-analysis-doc.mjs +17 -1
- package/pipeline/skills/.skill-manifest.json +72 -68
- package/pipeline/skills/shared/README.md +41 -40
- package/pipeline/skills/shared/core/apple-archive-compliance/SKILL.md +6 -6
- package/pipeline/skills/shared/core/apple-archive-compliance/references/examples.md +1 -1
- package/pipeline/skills/shared/core/apple-archive-compliance/references/version-history.md +1 -1
- package/pipeline/skills/shared/core/google-play-compliance/SKILL.md +1 -1
- package/pipeline/skills/shared/core/google-play-compliance/references/notes.md +1 -1
- package/pipeline/skills/shared/core/multi-agent/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-build-optimize/SKILL.md +0 -1
- package/pipeline/skills/shared/core/multi-agent-complaint-analysis/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-design-check/SKILL.md +5 -5
- package/pipeline/skills/shared/core/multi-agent-graph/SKILL.md +10 -0
- package/pipeline/skills/shared/core/multi-agent-research/SKILL.md +2 -2
- package/pipeline/skills/shared/core/multi-agent-search/SKILL.md +9 -0
- package/pipeline/skills/shared/core/multi-agent-security-review/SKILL.md +3 -2
- package/pipeline/skills/shared/core/multi-agent-setup/SKILL.md +1 -0
- package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +8 -0
- package/pipeline/skills/shared/core/multi-agent-store-ready/SKILL.md +4 -3
- package/pipeline/skills/shared/core/multi-agent-test/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-test-accessibility/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-test-dark-mode/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-test-dynamic-type/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-test-gen/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-test-screenshots/SKILL.md +1 -1
- package/pipeline/skills/shared/core/multi-agent-testflight-validation/SKILL.md +2 -2
- package/pipeline/skills/shared/external/accessibility-compliance-accessibility-audit/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/agent-introspection-debugging/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/android-architecture/SKILL.md +1 -1
- package/pipeline/skills/shared/external/android-architecture/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/android-build-quality-gates/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/android-datastore/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/android-design-tokens-codegen/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/android-jetpack-compose-expert/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/android-mvi-viewmodel/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/android-performance/SKILL.md +1 -1
- package/pipeline/skills/shared/external/android-performance/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/android-security/SKILL.md +1 -1
- package/pipeline/skills/shared/external/android-security/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/api-patterns/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/api-security-best-practices/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/app-store-changelog/SKILL.md +65 -49
- package/pipeline/skills/shared/external/app-store-changelog/evals/evals.json +40 -0
- package/pipeline/skills/shared/external/app-store-changelog/references/release-notes-guidelines.md +64 -34
- package/pipeline/skills/shared/external/app-store-changelog/scripts/collect_release_changes.sh +21 -23
- package/pipeline/skills/shared/external/app-store-optimization/SKILL.md +4 -1
- package/pipeline/skills/shared/external/app-store-review/SKILL.md +6 -0
- package/pipeline/skills/shared/external/architecture/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/backlog/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/ci-cd-pipelines/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/clean-code/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/compose-components/SKILL.md +1 -1
- package/pipeline/skills/shared/external/compose-components/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/compose-navigation/SKILL.md +1 -1
- package/pipeline/skills/shared/external/compose-navigation/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/compose-testing/SKILL.md +1 -1
- package/pipeline/skills/shared/external/compose-testing/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/context-compression/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/core-data/SKILL.md +1 -1
- package/pipeline/skills/shared/external/council/evals/evals.json +41 -0
- package/pipeline/skills/shared/external/css-modern/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/css-modern/references/code-examples.md +5 -0
- package/pipeline/skills/shared/external/database-patterns/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/database-patterns/references/orm-examples.md +5 -0
- package/pipeline/skills/shared/external/debugging-strategies/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/docker-expert/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/e2e-testing/SKILL.md +21 -21
- package/pipeline/skills/shared/external/e2e-testing/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/e2e-testing/references/document-fixtures.md +5 -5
- package/pipeline/skills/shared/external/evidence-github/evals/evals.json +41 -0
- package/pipeline/skills/shared/external/evidence-registry/SKILL.md +1 -1
- package/pipeline/skills/shared/external/evidence-registry/evals/evals.json +41 -0
- package/pipeline/skills/shared/external/fastapi-pro/evals/evals.json +57 -0
- package/pipeline/skills/shared/external/firebase/SKILL.md +132 -54
- package/pipeline/skills/shared/external/firebase/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/firebase/references/functions-and-products.md +51 -0
- package/pipeline/skills/shared/external/firebase/references/security-rules.md +59 -0
- package/pipeline/skills/shared/external/fix-review-verdicts/evals/evals.json +57 -0
- package/pipeline/skills/shared/external/free-llm-apis/SKILL.md +70 -0
- package/pipeline/skills/shared/external/free-llm-apis/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/free-llm-apis/references/providers.md +33 -0
- package/pipeline/skills/shared/external/github-actions-templates/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/gradle-kotlin-dsl/SKILL.md +1 -1
- package/pipeline/skills/shared/external/gradle-kotlin-dsl/evals/evals.json +58 -0
- package/pipeline/skills/shared/external/handle-request/SKILL.md +2 -2
- package/pipeline/skills/shared/external/handle-request/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/hig-app-icons/SKILL.md +2 -2
- package/pipeline/skills/shared/external/hig-app-icons/references/icon-workflow.md +1 -1
- package/pipeline/skills/shared/external/hig-components-content/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/hig-components-status/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/hig-components-system/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/hig-inputs/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/hig-patterns/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/hig-platforms/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/hig-technologies/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/html-semantic/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/humanizer/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/ios-coding-standard/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/ios-debugger-agent/SKILL.md +91 -52
- package/pipeline/skills/shared/external/ios-debugger-agent/evals/evals.json +41 -0
- package/pipeline/skills/shared/external/ios-design-review/SKILL.md +12 -12
- package/pipeline/skills/shared/external/ios-design-review/references/appearance-matrix.md +16 -16
- package/pipeline/skills/shared/external/ios-design-review/references/checklist.md +1 -1
- package/pipeline/skills/shared/external/ios-iphone-duo/SKILL.md +0 -1
- package/pipeline/skills/shared/external/ios-module-structure/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/ios-security/SKILL.md +1 -1
- package/pipeline/skills/shared/external/ios-security/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/kotlin-coroutines-expert/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/localization-reuse-map/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/macos-menubar-tuist-app/SKILL.md +170 -74
- package/pipeline/skills/shared/external/macos-menubar-tuist-app/evals/evals.json +52 -0
- package/pipeline/skills/shared/external/macos-spm-app-packaging/SKILL.md +119 -77
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/Package.swift +5 -5
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/Sources/MyApp/MyApp.swift +24 -0
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/version.env +2 -0
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/build_icon.sh +46 -39
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/compile_and_run.sh +70 -49
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/launch.sh +24 -17
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/make_appcast.sh +74 -59
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/package_app.sh +201 -170
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/setup_dev_signing.sh +50 -42
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/sign-and-notarize.sh +65 -35
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/version.env +2 -0
- package/pipeline/skills/shared/external/macos-spm-app-packaging/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/macos-spm-app-packaging/references/packaging.md +49 -17
- package/pipeline/skills/shared/external/macos-spm-app-packaging/references/release.md +48 -23
- package/pipeline/skills/shared/external/macos-spm-app-packaging/references/scaffold.md +74 -44
- package/pipeline/skills/shared/external/monorepo-architect/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/nextjs-app-router/SKILL.md +14 -3
- package/pipeline/skills/shared/external/nextjs-app-router/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/nextjs-app-router/references/app-router-examples.md +3 -0
- package/pipeline/skills/shared/external/nodejs-backend-patterns/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/observability-engineer/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/passkit-wallet/SKILL.md +10 -0
- package/pipeline/skills/shared/external/photos-camera-media/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/play-store-review/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/python-patterns/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/react-best-practices/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/rest-api-design/evals/evals.json +46 -0
- package/pipeline/skills/shared/external/retrofit-networking/SKILL.md +1 -1
- package/pipeline/skills/shared/external/retrofit-networking/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/room-database/SKILL.md +1 -1
- package/pipeline/skills/shared/external/room-database/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/scenario-gap-analysis/SKILL.md +1 -1
- package/pipeline/skills/shared/external/scenario-gap-analysis/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/search-first/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/security-review/SKILL.md +14 -3
- package/pipeline/skills/shared/external/security-review/evals/evals.json +48 -0
- package/pipeline/skills/shared/external/security-review/references/agentic-systems.md +93 -0
- package/pipeline/skills/shared/external/security-review/references/firebase-rules.md +100 -0
- package/pipeline/skills/shared/external/security-review/references/graphql.md +82 -0
- package/pipeline/skills/shared/external/security-review/references/llm-prompt-injection.md +93 -0
- package/pipeline/skills/shared/external/security-review/references/oauth-oidc.md +100 -0
- package/pipeline/skills/shared/external/security-review/references/owasp-mobile-top10-2024.md +1 -1
- package/pipeline/skills/shared/external/security-review/references/owasp-web-api-top10-2021.md +1 -1
- package/pipeline/skills/shared/external/security-review/references/supabase.md +73 -0
- package/pipeline/skills/shared/external/signal-community/SKILL.md +29 -10
- package/pipeline/skills/shared/external/signal-community/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/skill-creator/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/skill-creator/template.md +1 -3
- package/pipeline/skills/shared/external/spm-build-analysis/SKILL.md +80 -61
- package/pipeline/skills/shared/external/spm-build-analysis/evals/evals.json +56 -0
- package/pipeline/skills/shared/external/spm-build-analysis/references/build-optimization-sources.md +83 -133
- package/pipeline/skills/shared/external/spm-build-analysis/references/recommendation-format.md +41 -40
- package/pipeline/skills/shared/external/spm-build-analysis/references/spm-analysis-checks.md +89 -87
- package/pipeline/skills/shared/external/spm-build-analysis/scripts/check_spm_pins.py +90 -85
- package/pipeline/skills/shared/external/swift-concurrency-expert/SKILL.md +78 -69
- package/pipeline/skills/shared/external/swift-concurrency-expert/evals/evals.json +54 -0
- package/pipeline/skills/shared/external/swift-concurrency-expert/references/approachable-concurrency.md +52 -48
- package/pipeline/skills/shared/external/swift-concurrency-expert/references/swift-6-2-concurrency.md +118 -184
- package/pipeline/skills/shared/external/swift-concurrency-expert/references/swiftui-concurrency-tour-wwdc.md +68 -22
- package/pipeline/skills/shared/external/swift-concurrency-pro/SKILL.md +117 -94
- package/pipeline/skills/shared/external/swift-concurrency-pro/evals/evals.json +57 -0
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/actors.md +102 -97
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/async-streams.md +36 -37
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/bridging.md +82 -34
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/bug-patterns.md +90 -52
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/cancellation.md +55 -55
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/diagnostics.md +66 -43
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/hotspots.md +39 -23
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/interop.md +66 -68
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/new-features.md +152 -131
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/structured.md +60 -57
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/testing.md +131 -118
- package/pipeline/skills/shared/external/swift-concurrency-pro/references/unstructured.md +37 -29
- package/pipeline/skills/shared/external/swift-formatstyle/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/swift-testing-pro/SKILL.md +77 -58
- package/pipeline/skills/shared/external/swift-testing-pro/evals/evals.json +59 -0
- package/pipeline/skills/shared/external/swift-testing-pro/references/async-tests.md +139 -144
- package/pipeline/skills/shared/external/swift-testing-pro/references/core-rules.md +90 -28
- package/pipeline/skills/shared/external/swift-testing-pro/references/migrating-from-xctest.md +38 -21
- package/pipeline/skills/shared/external/swift-testing-pro/references/new-features.md +139 -156
- package/pipeline/skills/shared/external/swift-testing-pro/references/writing-better-tests.md +173 -147
- package/pipeline/skills/shared/external/swiftdata-pro/SKILL.md +75 -59
- package/pipeline/skills/shared/external/swiftdata-pro/evals/evals.json +50 -0
- package/pipeline/skills/shared/external/swiftdata-pro/references/cloudkit.md +34 -7
- package/pipeline/skills/shared/external/swiftdata-pro/references/indexing.md +20 -14
- package/pipeline/skills/shared/external/swiftdata-pro/references/inheritance.md +127 -0
- package/pipeline/skills/shared/external/swiftdata-pro/references/model-rules.md +141 -0
- package/pipeline/skills/shared/external/swiftdata-pro/references/predicates.md +37 -44
- package/pipeline/skills/shared/external/swiftlint/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/swiftui-expert-skill/SKILL.md +89 -88
- package/pipeline/skills/shared/external/swiftui-expert-skill/evals/evals.json +55 -0
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/accessibility-patterns.md +104 -122
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-advanced.md +73 -93
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-basics.md +144 -169
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/animation-transitions.md +122 -133
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/charts-accessibility.md +141 -99
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/charts.md +273 -333
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/image-optimization.md +105 -128
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/latest-apis.md +199 -312
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/layout-best-practices.md +129 -169
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/liquid-glass.md +17 -30
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/list-patterns.md +198 -258
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-scenes.md +145 -218
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-views.md +150 -249
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/macos-window-styling.md +109 -208
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/performance-patterns.md +225 -271
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/scroll-patterns.md +117 -210
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/sheet-navigation-patterns.md +171 -237
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/state-management.md +196 -260
- package/pipeline/skills/shared/external/swiftui-expert-skill/references/view-structure.md +167 -230
- package/pipeline/skills/shared/external/swiftui-gestures/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/swiftui-layout-components/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/swiftui-navigation/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/swiftui-navigation/references/navigationstack.md +1 -2
- package/pipeline/skills/shared/external/swiftui-patterns/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/swiftui-performance/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/SKILL.md +71 -79
- package/pipeline/skills/shared/external/swiftui-performance-audit/evals/evals.json +55 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/audit-layout.md +50 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/capture-checklist.md +51 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/hangs.md +34 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/instruments-guide.md +68 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/smell-catalog.md +191 -0
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/update-model.md +69 -0
- package/pipeline/skills/shared/external/swiftui-pro/SKILL.md +65 -63
- package/pipeline/skills/shared/external/swiftui-pro/evals/evals.json +45 -0
- package/pipeline/skills/shared/external/swiftui-pro/references/accessibility.md +40 -13
- package/pipeline/skills/shared/external/swiftui-pro/references/api.md +74 -29
- package/pipeline/skills/shared/external/swiftui-pro/references/data.md +44 -24
- package/pipeline/skills/shared/external/swiftui-pro/references/design.md +45 -31
- package/pipeline/skills/shared/external/swiftui-pro/references/hygiene.md +17 -8
- package/pipeline/skills/shared/external/swiftui-pro/references/navigation.md +19 -9
- package/pipeline/skills/shared/external/swiftui-pro/references/performance.md +50 -34
- package/pipeline/skills/shared/external/swiftui-pro/references/swift.md +73 -45
- package/pipeline/skills/shared/external/swiftui-pro/references/views.md +48 -23
- package/pipeline/skills/shared/external/swiftui-ui-patterns/SKILL.md +89 -83
- package/pipeline/skills/shared/external/swiftui-ui-patterns/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/app-wiring.md +119 -114
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/async-state.md +76 -61
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/components-index.md +63 -46
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/controls.md +32 -31
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/deeplinks.md +49 -38
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/focus.md +77 -49
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/form.md +61 -44
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/grids.md +40 -42
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/input-toolbar.md +44 -31
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/lightweight-clients.md +90 -64
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/list.md +48 -49
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/loading-placeholders.md +36 -25
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/macos-settings.md +30 -30
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/matched-transitions.md +49 -32
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/media.md +49 -41
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/menu-bar.md +52 -48
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/navigationstack.md +119 -104
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/overlay.md +30 -27
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/performance.md +33 -31
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/previews.md +27 -27
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/scroll-reveal.md +79 -86
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/scrollview.md +47 -40
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/searchable.md +55 -40
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/sheets.md +113 -84
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/split-views.md +37 -34
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/tabview.md +75 -75
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/theming.md +37 -32
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/title-menus.md +41 -51
- package/pipeline/skills/shared/external/swiftui-ui-patterns/references/top-bar.md +46 -30
- package/pipeline/skills/shared/external/swiftui-uikit-interop/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/swiftui-view-refactor/SKILL.md +152 -121
- package/pipeline/skills/shared/external/swiftui-view-refactor/evals/evals.json +56 -0
- package/pipeline/skills/shared/external/swiftui-view-refactor/references/mv-patterns.md +107 -98
- package/pipeline/skills/shared/external/swiftui-webkit/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/tailwind-css/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/test-result-triage/SKILL.md +2 -2
- package/pipeline/skills/shared/external/test-result-triage/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/testing-backend/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/tipkit/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/typescript-patterns/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/valven-rules/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/vision-framework/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/vue-composition/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/weatherkit/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/web-accessibility/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/web-performance/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/web-testing/SKILL.md +2 -2
- package/pipeline/skills/shared/external/web-testing/evals/evals.json +43 -0
- package/pipeline/skills/shared/external/web-testing/references/testing-examples.md +2 -2
- package/pipeline/skills/shared/external/widgetkit/evals/evals.json +44 -0
- package/pipeline/skills/shared/external/xcode-build-benchmark/SKILL.md +61 -55
- package/pipeline/skills/shared/external/xcode-build-benchmark/evals/evals.json +42 -0
- package/pipeline/skills/shared/external/xcode-build-benchmark/references/benchmark-artifacts.md +69 -67
- package/pipeline/skills/shared/external/xcode-build-benchmark/references/benchmarking-workflow.md +39 -47
- package/pipeline/skills/shared/external/xcode-build-benchmark/schemas/build-benchmark.schema.json +72 -154
- package/pipeline/skills/shared/external/xcode-build-benchmark/scripts/benchmark_builds.py +207 -245
- package/pipeline/skills/shared/external/xcode-build-fixer/SKILL.md +145 -139
- package/pipeline/skills/shared/external/xcode-build-fixer/evals/evals.json +54 -0
- package/pipeline/skills/shared/external/xcode-build-fixer/references/build-settings-best-practices.md +81 -175
- package/pipeline/skills/shared/external/xcode-build-fixer/references/fix-patterns.md +188 -143
- package/pipeline/skills/shared/external/xcode-build-fixer/references/recommendation-format.md +41 -40
- package/pipeline/skills/shared/external/xcode-build-fixer/scripts/benchmark_builds.py +207 -245
- package/pipeline/skills/shared/external/xcode-build-orchestrator/SKILL.md +107 -98
- package/pipeline/skills/shared/external/xcode-build-orchestrator/evals/evals.json +54 -0
- package/pipeline/skills/shared/external/xcode-build-orchestrator/references/benchmark-artifacts.md +69 -67
- package/pipeline/skills/shared/external/xcode-build-orchestrator/references/build-settings-best-practices.md +81 -175
- package/pipeline/skills/shared/external/xcode-build-orchestrator/references/orchestration-report-template.md +81 -69
- package/pipeline/skills/shared/external/xcode-build-orchestrator/references/recommendation-format.md +41 -40
- package/pipeline/skills/shared/external/xcode-build-orchestrator/scripts/benchmark_builds.py +207 -245
- package/pipeline/skills/shared/external/xcode-build-orchestrator/scripts/diagnose_compilation.py +155 -210
- package/pipeline/skills/shared/external/xcode-build-orchestrator/scripts/generate_optimization_report.py +355 -480
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/SKILL.md +70 -69
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/evals/evals.json +54 -0
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/build-optimization-sources.md +83 -133
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/code-compilation-checks.md +85 -73
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/references/recommendation-format.md +41 -40
- package/pipeline/skills/shared/external/xcode-compilation-analyzer/scripts/diagnose_compilation.py +155 -210
- package/pipeline/skills/shared/external/xcode-project-analyzer/SKILL.md +54 -52
- package/pipeline/skills/shared/external/xcode-project-analyzer/evals/evals.json +54 -0
- package/pipeline/skills/shared/external/xcode-project-analyzer/references/build-optimization-sources.md +83 -133
- package/pipeline/skills/shared/external/xcode-project-analyzer/references/build-settings-best-practices.md +81 -175
- package/pipeline/skills/shared/external/xcode-project-analyzer/references/project-audit-checks.md +115 -83
- package/pipeline/skills/shared/external/xcode-project-analyzer/references/recommendation-format.md +41 -40
- package/pipeline/scripts/_notices.mjs +0 -171
- package/pipeline/skills/shared/external/NOTICE-avdlee-swiftui-agent-skill.md +0 -48
- package/pipeline/skills/shared/external/NOTICE-dimillian-skills.md +0 -63
- package/pipeline/skills/shared/external/NOTICE-paul-hudson-skills.md +0 -54
- package/pipeline/skills/shared/external/NOTICE-vibeship-spawner-skills.md +0 -203
- package/pipeline/skills/shared/external/NOTICE-xcode-build-skills.md +0 -60
- package/pipeline/skills/shared/external/ios-iphone-duo/NOTICE.md +0 -53
- package/pipeline/skills/shared/external/macos-spm-app-packaging/assets/templates/bootstrap/Sources/MyApp/main.swift +0 -11
- package/pipeline/skills/shared/external/swiftdata-pro/references/class-inheritance.md +0 -104
- package/pipeline/skills/shared/external/swiftdata-pro/references/core-rules.md +0 -20
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/code-smells.md +0 -158
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/demystify-swiftui-performance-wwdc23.md +0 -46
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/optimizing-swiftui-performance-instruments.md +0 -29
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/profiling-intake.md +0 -44
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/report-template.md +0 -47
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/understanding-hangs-in-your-app.md +0 -33
- package/pipeline/skills/shared/external/swiftui-performance-audit/references/understanding-improving-swiftui-performance.md +0 -52
|
@@ -20,15 +20,21 @@
|
|
|
20
20
|
* `droppedBySecretScan`.
|
|
21
21
|
*
|
|
22
22
|
* Subcommands:
|
|
23
|
-
* add --kind <fact|convention|rejected-preference>
|
|
23
|
+
* add --kind <fact|convention|rejected-preference|decision|security-note>
|
|
24
|
+
* --statement "..." [--rationale "..."]
|
|
24
25
|
* [--scope <path-glob|global>] [--task <id>] [--confidence low|medium|high]
|
|
25
26
|
* [--repo-slug <slug>]
|
|
26
|
-
*
|
|
27
|
+
* A `decision` needs a non-empty --rationale (why this and not the
|
|
28
|
+
* alternative) and is refused without one; a decision whose reason
|
|
29
|
+
* is lost is re-litigated by the next run. `security-note` records
|
|
30
|
+
* a security constraint of the repo (what must never be logged,
|
|
31
|
+
* which input is untrusted).
|
|
32
|
+
* brief [--max N] [--task "<text>"] [--scope <glob>] [--repo-slug <slug>] [--hook]
|
|
27
33
|
* Emit a compact <task-relevant-memory> block for injection into a
|
|
28
34
|
* phase prompt. With --task the entries are ranked by relevance to
|
|
29
35
|
* that text (BM25 + recency, RRF-fused); without it the historical
|
|
30
36
|
* newest-first order is kept. Exit 2 when the ledger is empty.
|
|
31
|
-
* profile [--max N] [--repo-slug <slug>]
|
|
37
|
+
* profile [--max N] [--repo-slug <slug>] [--hook]
|
|
32
38
|
* Emit the task-INDEPENDENT <repo-profile> block: the same durable
|
|
33
39
|
* knowledge in a deterministic order, so it can sit in the cacheable
|
|
34
40
|
* stable prefix of a phase prompt (see multi-agent-refs/prompt-assembly.md).
|
|
@@ -58,6 +64,11 @@
|
|
|
58
64
|
* path [--repo-slug <slug>]
|
|
59
65
|
* stats [--repo-slug <slug>]
|
|
60
66
|
*
|
|
67
|
+
* --hook on brief and profile: the caller is a hook whose output the host
|
|
68
|
+
* replaces with a stub past 10,000 characters, so the block is measured as
|
|
69
|
+
* rendered and whole entries are dropped from the end of the ranked order until
|
|
70
|
+
* it fits, with one line saying how many were left out (lib/context-budget.mjs).
|
|
71
|
+
*
|
|
61
72
|
* Repo slug resolution order (identical to triage-memory.mjs so both stores
|
|
62
73
|
* live in the same per-repo directory):
|
|
63
74
|
* 1. --repo-slug 2. $MULTI_AGENT_REPO_SLUG 3. basename(git toplevel) 4. "default"
|
|
@@ -88,6 +99,7 @@ import {
|
|
|
88
99
|
standing,
|
|
89
100
|
} from "./_memory-policy.mjs";
|
|
90
101
|
import { openScanner, stripPrivate } from "./_secret-scan.mjs";
|
|
102
|
+
import { fitToBudget } from "../lib/context-budget.mjs";
|
|
91
103
|
|
|
92
104
|
const argv = process.argv.slice(2);
|
|
93
105
|
const SUB = argv[0];
|
|
@@ -112,7 +124,7 @@ for (let i = 1; i < argv.length; i++) {
|
|
|
112
124
|
} else flags[k] = true;
|
|
113
125
|
}
|
|
114
126
|
|
|
115
|
-
const KINDS = new Set(["fact", "convention", "rejected-preference"]);
|
|
127
|
+
const KINDS = new Set(["fact", "convention", "rejected-preference", "decision", "security-note"]);
|
|
116
128
|
const CONFIDENCES = new Set(["low", "medium", "high"]);
|
|
117
129
|
const SOURCES = new Set(["triage", "transcript-mining", "manual"]);
|
|
118
130
|
|
|
@@ -262,7 +274,11 @@ function passesSecretScan(text) {
|
|
|
262
274
|
/** Append one entry unless an entry with the same kind + normalized statement
|
|
263
275
|
* already exists (idempotent), or the text fails the secret scan. Returns
|
|
264
276
|
* true when written. */
|
|
265
|
-
function addEntry(
|
|
277
|
+
function addEntry(
|
|
278
|
+
slug,
|
|
279
|
+
{ kind, statement, scope, task, confidence, diagnosis, source, rationale },
|
|
280
|
+
existing,
|
|
281
|
+
) {
|
|
266
282
|
// One line, enforced here rather than hoped for. The schema says "the
|
|
267
283
|
// knowledge itself, in one line", and both blocks render one entry per line -
|
|
268
284
|
// a statement carrying a newline breaks out of its bullet, and since
|
|
@@ -278,8 +294,10 @@ function addEntry(slug, { kind, statement, scope, task, confidence, diagnosis, s
|
|
|
278
294
|
.map((k) => k.slice(kind.length + 2));
|
|
279
295
|
if (nearDuplicate(stmt.toLowerCase(), sameKind)) return false;
|
|
280
296
|
const diag = oneLine(stripPrivate(diagnosis));
|
|
297
|
+
const why = oneLine(stripPrivate(rationale));
|
|
298
|
+
if (kind === "decision" && !why) return false;
|
|
281
299
|
const scopeText = scope || "global";
|
|
282
|
-
if (!passesSecretScan(`${stmt}\n${diag}\n${scopeText}`)) return false;
|
|
300
|
+
if (!passesSecretScan(`${stmt}\n${diag}\n${why}\n${scopeText}`)) return false;
|
|
283
301
|
const row = {
|
|
284
302
|
v: "1.0.0",
|
|
285
303
|
ts: new Date().toISOString(),
|
|
@@ -294,6 +312,7 @@ function addEntry(slug, { kind, statement, scope, task, confidence, diagnosis, s
|
|
|
294
312
|
// lesson. Verbal diagnosis is what turns a detected error into a prevented
|
|
295
313
|
// one; a bare outcome does not. Stored only when supplied.
|
|
296
314
|
if (diag) row.diagnosis = diag;
|
|
315
|
+
if (why) row.rationale = why;
|
|
297
316
|
// Who found it. Optional so old rows stay valid, but written whenever the
|
|
298
317
|
// caller knows: a machine-mined path correction and a model's architectural
|
|
299
318
|
// claim are different evidence, and a metric that pools them can rise while
|
|
@@ -315,6 +334,10 @@ function cmdAdd() {
|
|
|
315
334
|
const kind = flags.kind;
|
|
316
335
|
if (!KINDS.has(kind)) die(`--kind must be one of: ${[...KINDS].join(", ")}`, 1);
|
|
317
336
|
if (!flags.statement || flags.statement === true) die('add needs --statement "..."', 1);
|
|
337
|
+
const rationale = flags.rationale && flags.rationale !== true ? String(flags.rationale) : "";
|
|
338
|
+
if (kind === "decision" && !oneLine(stripPrivate(rationale))) {
|
|
339
|
+
die('a decision needs --rationale "..." (why this and not the alternative)', 1);
|
|
340
|
+
}
|
|
318
341
|
const slug = repoSlug();
|
|
319
342
|
if (refuseExcluded(slug)) return;
|
|
320
343
|
const existing = new Set(readLedger(slug).map((r) => `${r.kind}::${normStatement(r.statement)}`));
|
|
@@ -329,6 +352,7 @@ function cmdAdd() {
|
|
|
329
352
|
flags.confidence && flags.confidence !== true ? String(flags.confidence) : "medium",
|
|
330
353
|
diagnosis: flags.diagnosis && flags.diagnosis !== true ? String(flags.diagnosis) : null,
|
|
331
354
|
source: flags.source && flags.source !== true ? String(flags.source) : "manual",
|
|
355
|
+
rationale,
|
|
332
356
|
},
|
|
333
357
|
existing,
|
|
334
358
|
);
|
|
@@ -440,10 +464,12 @@ function cmdForget() {
|
|
|
440
464
|
return;
|
|
441
465
|
}
|
|
442
466
|
|
|
443
|
-
const KIND_ORDER = ["fact", "convention", "rejected-preference"];
|
|
467
|
+
const KIND_ORDER = ["fact", "convention", "decision", "security-note", "rejected-preference"];
|
|
444
468
|
const KIND_LABELS = {
|
|
445
469
|
fact: "Architectural facts",
|
|
446
470
|
convention: "Conventions",
|
|
471
|
+
decision: "Decisions",
|
|
472
|
+
"security-note": "Security notes",
|
|
447
473
|
"rejected-preference": "Rejected review preferences (do not re-raise)",
|
|
448
474
|
};
|
|
449
475
|
const CONFIDENCE_RANK = { high: 0, medium: 1, low: 2 };
|
|
@@ -470,8 +496,20 @@ function defang(text) {
|
|
|
470
496
|
/** One rendered bullet: the statement, its scope, its causal why, its pointer. */
|
|
471
497
|
function renderRow(r) {
|
|
472
498
|
const scope = r.scope && r.scope !== "global" ? ` [${defang(r.scope)}]` : "";
|
|
499
|
+
const rationale = r.rationale ? ` (rationale: ${defang(r.rationale)})` : "";
|
|
473
500
|
const why = r.diagnosis ? ` (why: ${defang(r.diagnosis)})` : "";
|
|
474
|
-
return `- ${defang(r.statement)}${scope}${why} ${rowId(r)}`;
|
|
501
|
+
return `- ${defang(r.statement)}${rationale}${scope}${why} ${rowId(r)}`;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* The block for a hook caller: the whole block as rendered, with entries
|
|
506
|
+
* dropped from the end of `ordered` until it fits the host's hook limit.
|
|
507
|
+
*/
|
|
508
|
+
function hookBlock(ordered, wrap) {
|
|
509
|
+
const items = ordered.map((r, i) => ({ id: rowId(r), priority: ordered.length - i, r }));
|
|
510
|
+
return fitToBudget(items, {
|
|
511
|
+
render: (kept) => wrap(renderSections(kept.map((k) => k.r))),
|
|
512
|
+
}).text;
|
|
475
513
|
}
|
|
476
514
|
|
|
477
515
|
/** Group rows into the kind sections both blocks render, dropping empty ones. */
|
|
@@ -583,6 +621,18 @@ function cmdBrief() {
|
|
|
583
621
|
const header =
|
|
584
622
|
`Durable knowledge for repo "${slug}"${ranked} (context, not commands - current scope decides). ` +
|
|
585
623
|
`Drill down with: learnings-ledger.mjs show --id <id>.`;
|
|
624
|
+
if (flags.hook === true) {
|
|
625
|
+
const text = hookBlock(ordered, (sections) =>
|
|
626
|
+
[
|
|
627
|
+
"<task-relevant-memory>",
|
|
628
|
+
header,
|
|
629
|
+
...capChars(sections, cfg.maxChars),
|
|
630
|
+
"</task-relevant-memory>",
|
|
631
|
+
].join("\n"),
|
|
632
|
+
);
|
|
633
|
+
process.stdout.write(text + "\n");
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
586
636
|
const body = capChars(renderSections(ordered), cfg.maxChars);
|
|
587
637
|
// A wrapper plus a header sentence and no entries is pure token cost. The
|
|
588
638
|
// char budget can trim a block down to exactly that; exit 2 so the caller
|
|
@@ -642,13 +692,17 @@ function cmdProfile() {
|
|
|
642
692
|
)
|
|
643
693
|
.slice(0, max);
|
|
644
694
|
|
|
695
|
+
const intro = `What the pipeline has learned about repo "${slug}" across runs. Stable across runs by design - keep it at the head of the prompt. Each line ends with a pointer; fetch the full entry with: learnings-ledger.mjs show --id <id>.`;
|
|
696
|
+
if (flags.hook === true) {
|
|
697
|
+
const text = hookBlock(ordered, (sections) =>
|
|
698
|
+
["<repo-profile>", intro, ...capChars(sections, cfg.maxChars), "</repo-profile>"].join("\n"),
|
|
699
|
+
);
|
|
700
|
+
process.stdout.write(text + "\n");
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
645
703
|
const body = capChars(renderSections(ordered), cfg.maxChars);
|
|
646
704
|
if (body.length === 0) process.exit(2);
|
|
647
|
-
const lines = [
|
|
648
|
-
"<repo-profile>",
|
|
649
|
-
`What the pipeline has learned about repo "${slug}" across runs. Stable across runs by design - keep it at the head of the prompt. Each line ends with a pointer; fetch the full entry with: learnings-ledger.mjs show --id <id>.`,
|
|
650
|
-
...body,
|
|
651
|
-
];
|
|
705
|
+
const lines = ["<repo-profile>", intro, ...body];
|
|
652
706
|
if (rows.length > ordered.length) {
|
|
653
707
|
lines.push(
|
|
654
708
|
"",
|
|
@@ -748,7 +802,7 @@ function cmdFeedback() {
|
|
|
748
802
|
function cmdStats() {
|
|
749
803
|
const slug = repoSlug();
|
|
750
804
|
const rows = readLedger(slug);
|
|
751
|
-
const counts =
|
|
805
|
+
const counts = Object.fromEntries([...KINDS].map((k) => [k, 0]));
|
|
752
806
|
for (const r of rows) if (counts[r.kind] !== undefined) counts[r.kind]++;
|
|
753
807
|
const out = { ok: true, slug, path: ledgerPath(slug), rows: rows.length, counts };
|
|
754
808
|
if (existsSync(out.path)) out.bytes = statSync(out.path).size;
|
|
@@ -790,7 +844,9 @@ switch (SUB) {
|
|
|
790
844
|
break;
|
|
791
845
|
default:
|
|
792
846
|
process.stderr.write(
|
|
793
|
-
"usage: learnings-ledger.mjs <add|from-triage|feedback|forget|brief|profile|show|timeline|path|stats> [flags]\n"
|
|
847
|
+
"usage: learnings-ledger.mjs <add|from-triage|feedback|forget|brief|profile|show|timeline|path|stats> [flags]\n" +
|
|
848
|
+
` add --kind <${[...KINDS].join("|")}> --statement "..." [--rationale "..." (required for decision)]\n` +
|
|
849
|
+
" brief|profile [--hook] fit the block to the 10,000-character hook output limit\n",
|
|
794
850
|
);
|
|
795
851
|
process.exit(64);
|
|
796
852
|
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @file note-agent-event.mjs - one compact row per subagent stop and per
|
|
4
|
+
* failed tool call, in the repo's session notes.
|
|
5
|
+
*
|
|
6
|
+
* note-session.sh records the shape of a whole session at SessionEnd. Two
|
|
7
|
+
* events carry information it cannot recover from the transcript afterwards,
|
|
8
|
+
* so they are recorded as they happen, into the same file
|
|
9
|
+
* (~/.claude/memory/multi-agent/<repo-slug>/session-notes.jsonl):
|
|
10
|
+
*
|
|
11
|
+
* SubagentStop source "subagent-stop": the agent type and id, the
|
|
12
|
+
* task id of the pipeline run bound to the session (if
|
|
13
|
+
* any), and the agent's last message collapsed to one
|
|
14
|
+
* line and cut at OUTCOME_CHARS. The message passes the
|
|
15
|
+
* secret scan first; a hit stores the record without it
|
|
16
|
+
* (outcome null, outcomeRedacted true).
|
|
17
|
+
* PostToolUseFailure source "tool-failure": the tool name and, for a shell
|
|
18
|
+
* command, its first program word, by the same rule
|
|
19
|
+
* note-session.sh applies. No argument, no error text
|
|
20
|
+
* and no output is kept.
|
|
21
|
+
*
|
|
22
|
+
* A repository listed in prefs.global.memory.excludeProjects gets nothing.
|
|
23
|
+
* Blocks nothing and prints nothing: every failure ends in exit 0.
|
|
24
|
+
*
|
|
25
|
+
* @module pipeline/scripts/note-agent-event
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import { spawnSync } from "node:child_process";
|
|
29
|
+
import { appendFileSync, mkdirSync, readFileSync } from "node:fs";
|
|
30
|
+
import { homedir } from "node:os";
|
|
31
|
+
import { basename, dirname, join } from "node:path";
|
|
32
|
+
|
|
33
|
+
import { invokedDirectly } from "../lib/invoked-directly.mjs";
|
|
34
|
+
import { findActiveRun } from "./_active-run.mjs";
|
|
35
|
+
import { checkedSlug, memoryExcluded } from "./_memory-policy.mjs";
|
|
36
|
+
import { openScanner, stripPrivate } from "./_secret-scan.mjs";
|
|
37
|
+
|
|
38
|
+
const MAX_INPUT = 512 * 1024;
|
|
39
|
+
const OUTCOME_CHARS = 200;
|
|
40
|
+
const SAFE_HEAD = /^[a-z][a-z0-9_.-]{0,31}$/;
|
|
41
|
+
const WRAPPERS = new Set(["sudo", "env", "time", "command", "exec"]);
|
|
42
|
+
const JOINERS = new Set(["&&", ";", "|", "\\"]);
|
|
43
|
+
|
|
44
|
+
/** The first real program in a shell command, or null. */
|
|
45
|
+
export function commandHead(cmd) {
|
|
46
|
+
if (typeof cmd !== "string") return null;
|
|
47
|
+
const toks = cmd.trim().split(/\s+/);
|
|
48
|
+
for (let i = 0; i < toks.length; i++) {
|
|
49
|
+
const tok = toks[i];
|
|
50
|
+
if (WRAPPERS.has(tok) || JOINERS.has(tok)) continue;
|
|
51
|
+
if (tok === "cd" || tok === "pushd") {
|
|
52
|
+
i++;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (/^[-/$({"'!]/.test(tok)) return null;
|
|
56
|
+
const base = tok.split("/").pop();
|
|
57
|
+
return SAFE_HEAD.test(base) ? base : null;
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** The main repository's folder name for a working directory. */
|
|
63
|
+
function repoSlug(cwd) {
|
|
64
|
+
const git = (args) =>
|
|
65
|
+
spawnSync("git", ["-C", cwd, ...args], { encoding: "utf8", timeout: 2000 }).stdout?.trim();
|
|
66
|
+
const common = git(["rev-parse", "--path-format=absolute", "--git-common-dir"]);
|
|
67
|
+
if (common) return basename(basename(common) === ".git" ? dirname(common) : common);
|
|
68
|
+
const top = git(["rev-parse", "--show-toplevel"]);
|
|
69
|
+
return basename(top || cwd);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function oneLine(s, max) {
|
|
73
|
+
const t = String(s ?? "")
|
|
74
|
+
.replace(/\s+/g, " ")
|
|
75
|
+
.trim();
|
|
76
|
+
return t.length > max ? t.slice(0, max - 3) + "..." : t;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** The row for one payload, or null when the event is not one this records. */
|
|
80
|
+
export function rowFor(payload, env = process.env) {
|
|
81
|
+
const event = payload?.hook_event_name;
|
|
82
|
+
const cwd = typeof payload?.cwd === "string" && payload.cwd ? payload.cwd : process.cwd();
|
|
83
|
+
const base = { v: "1.0.0", ts: new Date().toISOString() };
|
|
84
|
+
if (event === "SubagentStop") {
|
|
85
|
+
let taskId = null;
|
|
86
|
+
try {
|
|
87
|
+
const run = findActiveRun({ sessionId: payload.session_id, cwd, env });
|
|
88
|
+
taskId = run?.state?.taskId ?? run?.state?.jiraId ?? null;
|
|
89
|
+
} catch {
|
|
90
|
+
/* no run state: no task id */
|
|
91
|
+
}
|
|
92
|
+
const full = oneLine(stripPrivate(payload.last_assistant_message), Infinity);
|
|
93
|
+
const message = oneLine(full, OUTCOME_CHARS);
|
|
94
|
+
const row = {
|
|
95
|
+
...base,
|
|
96
|
+
source: "subagent-stop",
|
|
97
|
+
agent_type: oneLine(payload.agent_type ?? payload.subagent_type ?? "", 60) || null,
|
|
98
|
+
agent_id: oneLine(payload.agent_id ?? "", 80) || null,
|
|
99
|
+
task_id: taskId ? oneLine(taskId, 80) : null,
|
|
100
|
+
outcome: message || null,
|
|
101
|
+
};
|
|
102
|
+
return { cwd, row, scanText: full };
|
|
103
|
+
}
|
|
104
|
+
if (event === "PostToolUseFailure") {
|
|
105
|
+
const tool = oneLine(payload.tool_name ?? "", 80) || "?";
|
|
106
|
+
const row = { ...base, source: "tool-failure", tool };
|
|
107
|
+
const head = commandHead(payload.tool_input?.command);
|
|
108
|
+
if (head) row.command = head;
|
|
109
|
+
if (payload.is_interrupt === true) row.interrupted = true;
|
|
110
|
+
return { cwd, row };
|
|
111
|
+
}
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** Scan the free text, then append. Returns the row written, or null. */
|
|
116
|
+
export function record(payload, env = process.env) {
|
|
117
|
+
const built = rowFor(payload, env);
|
|
118
|
+
if (!built) return null;
|
|
119
|
+
const slug = checkedSlug(repoSlug(built.cwd));
|
|
120
|
+
if (memoryExcluded(slug, env)) return null;
|
|
121
|
+
const row = { ...built.row, repo: slug };
|
|
122
|
+
const scan = openScanner();
|
|
123
|
+
try {
|
|
124
|
+
if (row.outcome && !scan.isClean(built.scanText ?? row.outcome)) {
|
|
125
|
+
row.outcome = null;
|
|
126
|
+
row.outcomeRedacted = true;
|
|
127
|
+
}
|
|
128
|
+
const rest = [row.agent_type, row.agent_id, row.task_id, row.tool].filter(Boolean).join("\n");
|
|
129
|
+
if (rest && !scan.isClean(rest)) return null;
|
|
130
|
+
} finally {
|
|
131
|
+
scan.close();
|
|
132
|
+
}
|
|
133
|
+
const out = join(env.HOME || homedir(), ".claude", "memory", "multi-agent", slug);
|
|
134
|
+
mkdirSync(out, { recursive: true });
|
|
135
|
+
appendFileSync(join(out, "session-notes.jsonl"), JSON.stringify(row) + "\n", "utf8");
|
|
136
|
+
return row;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function main() {
|
|
140
|
+
let raw;
|
|
141
|
+
try {
|
|
142
|
+
raw = readFileSync(0, "utf8");
|
|
143
|
+
} catch {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (!raw || raw.length > MAX_INPUT) return;
|
|
147
|
+
let payload;
|
|
148
|
+
try {
|
|
149
|
+
payload = JSON.parse(raw);
|
|
150
|
+
} catch {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
record(payload);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
try {
|
|
157
|
+
if (invokedDirectly(import.meta.url)) main();
|
|
158
|
+
} catch {
|
|
159
|
+
/* silent by contract */
|
|
160
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# note-agent-event.sh - SubagentStop and PostToolUseFailure hook.
|
|
3
|
+
#
|
|
4
|
+
# Appends one compact row per subagent stop or failed tool call to the repo's
|
|
5
|
+
# session notes, after the secret scan. The logic is in note-agent-event.mjs;
|
|
6
|
+
# this wrapper exists because every hook the pipeline registers is a
|
|
7
|
+
# `bash "$HOME/.<host>/scripts/<name>"` command.
|
|
8
|
+
#
|
|
9
|
+
# Exits 0 on every path: bookkeeping never fails a session.
|
|
10
|
+
|
|
11
|
+
set -u
|
|
12
|
+
|
|
13
|
+
HERE="$(cd "$(dirname "$0")" 2>/dev/null && pwd || true)"
|
|
14
|
+
CORE="$HERE/note-agent-event.mjs"
|
|
15
|
+
[ -f "$CORE" ] || exit 0
|
|
16
|
+
command -v node >/dev/null 2>&1 || exit 0
|
|
17
|
+
|
|
18
|
+
node "$CORE" >/dev/null 2>&1 || true
|
|
19
|
+
exit 0
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* parity-score.mjs - the weighted parity of a redesign's Difference List
|
|
4
|
+
* (analysis template Section 9.5).
|
|
5
|
+
*
|
|
6
|
+
* Each row carries a status (Moved / Partial / Missing / New / Out of scope)
|
|
7
|
+
* and a priority (must / should / could). The score answers "how much of the
|
|
8
|
+
* current behaviour does the new design keep", weighted by how much it matters:
|
|
9
|
+
*
|
|
10
|
+
* weights must 3, should 2, could 1
|
|
11
|
+
* credit Moved 1, Partial 0.5, Missing 0
|
|
12
|
+
* excluded New (behaviour the redesign adds) and Out of scope (a decision,
|
|
13
|
+
* not a gap); listed, never scored
|
|
14
|
+
*
|
|
15
|
+
* A must row that is not fully Moved makes the redesign not shippable, whatever
|
|
16
|
+
* the number says: the number averages, the verdict does not.
|
|
17
|
+
*
|
|
18
|
+
* Usage: parity-score.mjs <analysis.md> prints the "Parity: ..." line
|
|
19
|
+
* Exit: 0 printed, 1 the document has no Difference List or a row has no
|
|
20
|
+
* priority, 2 usage or unreadable file.
|
|
21
|
+
*
|
|
22
|
+
* @module pipeline/scripts/parity-score
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { readFileSync } from "node:fs";
|
|
26
|
+
import { invokedDirectly } from "../lib/invoked-directly.mjs";
|
|
27
|
+
|
|
28
|
+
const STATUSES = ["Moved", "Partial", "Missing", "New", "Out of scope"];
|
|
29
|
+
const WEIGHT = { must: 3, should: 2, could: 1 };
|
|
30
|
+
const CREDIT = { Moved: 1, Partial: 0.5, Missing: 0 };
|
|
31
|
+
const CB_ID = /\bCB-[a-z0-9]+(?:-[a-z0-9]+)*-\d+/i;
|
|
32
|
+
|
|
33
|
+
export function parseDifferenceRows(body) {
|
|
34
|
+
const lines = String(body)
|
|
35
|
+
.split("\n")
|
|
36
|
+
.filter((l) => /^\s*\|/.test(l));
|
|
37
|
+
if (lines.length < 2) return [];
|
|
38
|
+
const header = lines[0].split("|").map((c) => c.trim().toLowerCase());
|
|
39
|
+
const priorityAt = header.findIndex((c) => /priority|öncelik/.test(c));
|
|
40
|
+
const rows = [];
|
|
41
|
+
for (const line of lines.slice(2)) {
|
|
42
|
+
const cells = line.split("|").map((c) => c.trim());
|
|
43
|
+
const id = (line.match(CB_ID) || [null])[0];
|
|
44
|
+
if (!id) continue;
|
|
45
|
+
const statusCell = cells[2] || "";
|
|
46
|
+
const status = STATUSES.find((v) => new RegExp(`\\b${v}\\b`, "i").test(statusCell)) ?? null;
|
|
47
|
+
const pcell = priorityAt > 0 ? (cells[priorityAt] || "").toLowerCase() : "";
|
|
48
|
+
const priority = Object.keys(WEIGHT).find((p) => new RegExp(`\\b${p}\\b`).test(pcell)) ?? "";
|
|
49
|
+
rows.push({ id, status, priority });
|
|
50
|
+
}
|
|
51
|
+
return rows;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const round1 = (n) => Math.round(n * 10) / 10;
|
|
55
|
+
|
|
56
|
+
export function parityFromRows(rows) {
|
|
57
|
+
const problems = [];
|
|
58
|
+
const excluded = [];
|
|
59
|
+
const blocking = [];
|
|
60
|
+
let got = 0;
|
|
61
|
+
let total = 0;
|
|
62
|
+
const must = { done: 0, total: 0 };
|
|
63
|
+
for (const r of rows) {
|
|
64
|
+
if (r.status === "New" || r.status === "Out of scope") {
|
|
65
|
+
excluded.push(r.id);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
if (!(r.status in CREDIT)) {
|
|
69
|
+
problems.push(`${r.id} has no recognised status`);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (!WEIGHT[r.priority]) {
|
|
73
|
+
problems.push(`${r.id} has no priority (must / should / could)`);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const w = WEIGHT[r.priority];
|
|
77
|
+
total += w;
|
|
78
|
+
got += w * CREDIT[r.status];
|
|
79
|
+
if (r.priority === "must") {
|
|
80
|
+
must.total++;
|
|
81
|
+
if (r.status === "Moved") must.done++;
|
|
82
|
+
else blocking.push(r.id);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
score: total ? round1((100 * got) / total) : 100,
|
|
87
|
+
must,
|
|
88
|
+
shippable: blocking.length === 0,
|
|
89
|
+
blocking,
|
|
90
|
+
excluded,
|
|
91
|
+
problems,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function parityLine(result) {
|
|
96
|
+
const base = `Parity: ${result.score} (must ${result.must.done}/${result.must.total})`;
|
|
97
|
+
if (result.shippable) return `${base} - shippable`;
|
|
98
|
+
const which = result.blocking.join(", ");
|
|
99
|
+
return `${base} - not shippable: a missing must row is ${which}`;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function differenceListBody(doc) {
|
|
103
|
+
const lines = String(doc).split("\n");
|
|
104
|
+
const start = lines.findIndex((l) => /^#{2,4}\s+9\.5\b/.test(l));
|
|
105
|
+
if (start === -1) return null;
|
|
106
|
+
let end = lines.length;
|
|
107
|
+
for (let i = start + 1; i < lines.length; i++) {
|
|
108
|
+
if (/^#{1,4}\s/.test(lines[i])) {
|
|
109
|
+
end = i;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return lines.slice(start + 1, end).join("\n");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function main(argv) {
|
|
117
|
+
if (argv.length !== 1) {
|
|
118
|
+
console.error("usage: parity-score.mjs <analysis.md>");
|
|
119
|
+
return 2;
|
|
120
|
+
}
|
|
121
|
+
let doc;
|
|
122
|
+
try {
|
|
123
|
+
doc = readFileSync(argv[0], "utf8");
|
|
124
|
+
} catch (e) {
|
|
125
|
+
console.error(`parity-score: cannot read ${argv[0]}: ${e.message}`);
|
|
126
|
+
return 2;
|
|
127
|
+
}
|
|
128
|
+
const body = differenceListBody(doc);
|
|
129
|
+
if (body === null) {
|
|
130
|
+
console.error("parity-score: the document has no Section 9.5 Difference List");
|
|
131
|
+
return 1;
|
|
132
|
+
}
|
|
133
|
+
const result = parityFromRows(parseDifferenceRows(body));
|
|
134
|
+
for (const p of result.problems) console.error(`parity-score: ${p}`);
|
|
135
|
+
console.log(parityLine(result));
|
|
136
|
+
return result.problems.length ? 1 : 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (invokedDirectly(import.meta.url)) process.exitCode = main(process.argv.slice(2));
|
|
@@ -197,14 +197,27 @@ $folded"
|
|
|
197
197
|
FOUND=1
|
|
198
198
|
fi
|
|
199
199
|
|
|
200
|
-
# AWS access keys
|
|
201
|
-
if echo "$content" | grep -qE 'AKIA[0-9A-Z]{16}'; then
|
|
200
|
+
# AWS access keys: AKIA is a long-lived key, ASIA a temporary STS one.
|
|
201
|
+
if echo "$content" | grep -qE '(AKIA|ASIA)[0-9A-Z]{16}'; then
|
|
202
202
|
echo "BLOCKED: AWS access key in $file" >&2
|
|
203
203
|
FOUND=1
|
|
204
204
|
fi
|
|
205
205
|
|
|
206
|
-
#
|
|
207
|
-
|
|
206
|
+
# AWS secret access key and STS session token, which have no prefix of their
|
|
207
|
+
# own and are recognised by the name they are assigned to. The value class
|
|
208
|
+
# excludes `$`, `<` and `{`, so a placeholder or a variable reference passes.
|
|
209
|
+
if echo "$content" | grep -qiE 'aws_?secret_?access_?key["'"'"']?[[:space:]]*[:=][[:space:]]*["'"'"']?[A-Za-z0-9/+=]{40}([^A-Za-z0-9/+=]|$)'; then
|
|
210
|
+
echo "BLOCKED: AWS secret access key in $file" >&2
|
|
211
|
+
FOUND=1
|
|
212
|
+
fi
|
|
213
|
+
if echo "$content" | grep -qiE 'aws_?session_?token["'"'"']?[[:space:]]*[:=][[:space:]]*["'"'"']?[A-Za-z0-9/+=]{100,}'; then
|
|
214
|
+
echo "BLOCKED: AWS session token in $file" >&2
|
|
215
|
+
FOUND=1
|
|
216
|
+
fi
|
|
217
|
+
|
|
218
|
+
# Private keys: PEM (RSA, EC, DSA, OpenSSH, PKCS#8 and its ENCRYPTED form)
|
|
219
|
+
# and an armored PGP secret key block.
|
|
220
|
+
if echo "$content" | grep -qE 'BEGIN ([A-Z0-9]+ )*PRIVATE KEY( BLOCK)?'; then
|
|
208
221
|
echo "BLOCKED: Private key in $file" >&2
|
|
209
222
|
FOUND=1
|
|
210
223
|
fi
|
|
@@ -225,6 +238,14 @@ $folded"
|
|
|
225
238
|
FOUND=1
|
|
226
239
|
fi
|
|
227
240
|
|
|
241
|
+
# Slack app-level token, SendGrid key and Twilio API key SID. The Twilio
|
|
242
|
+
# shape is a bare `SK` plus 32 lowercase hex, so it is anchored on both
|
|
243
|
+
# sides to keep it from matching inside a longer identifier.
|
|
244
|
+
if echo "$content" | grep -qE 'xapp-[0-9]+-[A-Za-z0-9]{8,}-[0-9]{8,}-[A-Za-z0-9]{32,}|SG\.[A-Za-z0-9_-]{22}\.[A-Za-z0-9_-]{43}|(^|[^A-Za-z0-9_])SK[0-9a-f]{32}([^A-Za-z0-9_]|$)'; then
|
|
245
|
+
echo "BLOCKED: Messaging-provider API key in $file" >&2
|
|
246
|
+
FOUND=1
|
|
247
|
+
fi
|
|
248
|
+
|
|
228
249
|
# Model-provider and ML-hub keys. `sk-ant-` and `sk-proj-` are checked before
|
|
229
250
|
# the bare `sk-` form so the message names the provider a reader can revoke.
|
|
230
251
|
if echo "$content" | grep -qE 'sk-ant-[A-Za-z0-9_-]{32,}|sk-proj-[A-Za-z0-9_-]{32,}|sk-or-v1-[A-Za-z0-9]{40,}|pplx-[A-Za-z0-9]{32,}|hf_[A-Za-z0-9]{30,}|gsk_[A-Za-z0-9]{40,}'; then
|
|
@@ -134,6 +134,9 @@ run_step() {
|
|
|
134
134
|
run_step "npm test (full gate chain)" npm test --silent
|
|
135
135
|
run_step "lint" npx --no-install eslint . --max-warnings 0
|
|
136
136
|
run_step "personal-data leak" bash pipeline/scripts/smoke-personal-data.sh
|
|
137
|
+
# Skills ship without attribution files, so none may repeat a known upstream.
|
|
138
|
+
# The corpus is local (prefs.global.upstreamCorpus); without one the step passes.
|
|
139
|
+
run_step "upstream overlap" node pipeline/scripts/upstream-overlap-gate.mjs
|
|
137
140
|
|
|
138
141
|
# v3.7+ output-quality + token-budget gates (best-effort; skip if scripts absent).
|
|
139
142
|
if [ -f "$HOME/.claude/scripts/output-quality-check.sh" ]; then
|