@codyswann/lisa 4.54.13 → 4.55.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/all/copy-contents/.gitattributes +8 -0
- package/all/copy-overwrite/scripts/check-orphaned-branches.mjs +78 -9
- package/all/copy-overwrite/scripts/check-third-party-action-pins.mjs +17 -1
- package/all/copy-overwrite/scripts/lib/process-tree-runner.mjs +194 -7
- package/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +31 -0
- package/all/copy-overwrite/scripts/lisa-hooks/block-blind-automerge.sh +81 -2
- package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +293 -8
- package/all/copy-overwrite/scripts/lisa-hooks/block-instruction-file-edits.sh +21 -0
- package/all/copy-overwrite/scripts/lisa-hooks/block-managed-file-edits.sh +78 -15
- package/all/copy-overwrite/scripts/lisa-hooks/block-no-verify.sh +21 -0
- package/all/copy-overwrite/scripts/lisa-hooks/block-shell-json-parsing.sh +21 -0
- package/all/copy-overwrite/scripts/lisa-hooks/guard-dedupe.bash +340 -0
- package/all/copy-overwrite/scripts/lisa-hooks/parity-safety-net.sh +29 -1
- package/all/copy-overwrite/scripts/lisa-hooks/worktree-binding-guard.mjs +183 -1
- package/all/copy-overwrite/scripts/lisa-hooks/worktree-binding-guard.sh +21 -0
- package/all/copy-overwrite/scripts/lisa-postinstall.mjs +21 -1
- package/all/copy-overwrite/scripts/lisa-run-gates.mjs +100 -5
- package/all/copy-overwrite/scripts/lisa-work-item.mjs +1085 -80
- package/all/create-only/.github/workflows/continuous-gates.yml +7 -0
- package/cdk/create-only/.github/workflows/ci.yml +7 -0
- package/cdk/create-only/.github/workflows/deploy.yml +21 -0
- package/dist/cli/apply.d.ts.map +1 -1
- package/dist/cli/apply.js +9 -1
- package/dist/cli/apply.js.map +1 -1
- package/dist/cli/doctor-apply-deletions.d.ts +61 -0
- package/dist/cli/doctor-apply-deletions.d.ts.map +1 -0
- package/dist/cli/doctor-apply-deletions.js +137 -0
- package/dist/cli/doctor-apply-deletions.js.map +1 -0
- package/dist/cli/doctor-cdk-preset-adoption.d.ts +15 -0
- package/dist/cli/doctor-cdk-preset-adoption.d.ts.map +1 -0
- package/dist/cli/doctor-cdk-preset-adoption.js +316 -0
- package/dist/cli/doctor-cdk-preset-adoption.js.map +1 -0
- package/dist/cli/doctor-config-shadowing.d.ts +22 -0
- package/dist/cli/doctor-config-shadowing.d.ts.map +1 -0
- package/dist/cli/doctor-config-shadowing.js +123 -0
- package/dist/cli/doctor-config-shadowing.js.map +1 -0
- package/dist/cli/doctor-rails-deploy-intent.d.ts +15 -0
- package/dist/cli/doctor-rails-deploy-intent.d.ts.map +1 -0
- package/dist/cli/doctor-rails-deploy-intent.js +197 -0
- package/dist/cli/doctor-rails-deploy-intent.js.map +1 -0
- package/dist/cli/doctor-seeded-artifacts.d.ts +12 -0
- package/dist/cli/doctor-seeded-artifacts.d.ts.map +1 -0
- package/dist/cli/doctor-seeded-artifacts.js +54 -0
- package/dist/cli/doctor-seeded-artifacts.js.map +1 -0
- package/dist/cli/doctor-stale-banner-scan.d.ts +44 -0
- package/dist/cli/doctor-stale-banner-scan.d.ts.map +1 -0
- package/dist/cli/doctor-stale-banner-scan.js +152 -0
- package/dist/cli/doctor-stale-banner-scan.js.map +1 -0
- package/dist/cli/doctor-stale-managed-banner.d.ts +19 -0
- package/dist/cli/doctor-stale-managed-banner.d.ts.map +1 -0
- package/dist/cli/doctor-stale-managed-banner.js +198 -0
- package/dist/cli/doctor-stale-managed-banner.js.map +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +16 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/ui-detected-stacks.d.ts.map +1 -1
- package/dist/cli/ui-detected-stacks.js +3 -2
- package/dist/cli/ui-detected-stacks.js.map +1 -1
- package/dist/cli/update-check.d.ts.map +1 -1
- package/dist/cli/update-check.js +14 -0
- package/dist/cli/update-check.js.map +1 -1
- package/dist/cli/worktree-liveness.d.ts +5 -0
- package/dist/cli/worktree-liveness.d.ts.map +1 -1
- package/dist/cli/worktree-liveness.js +7 -6
- package/dist/cli/worktree-liveness.js.map +1 -1
- package/dist/cli/worktree-ownership.d.ts +13 -0
- package/dist/cli/worktree-ownership.d.ts.map +1 -1
- package/dist/cli/worktree-ownership.js +14 -0
- package/dist/cli/worktree-ownership.js.map +1 -1
- package/dist/configs/eslint/base.d.ts +34 -0
- package/dist/configs/eslint/base.d.ts.map +1 -1
- package/dist/configs/eslint/base.js +34 -0
- package/dist/configs/eslint/base.js.map +1 -1
- package/dist/core/apply-receipt.d.ts +65 -0
- package/dist/core/apply-receipt.d.ts.map +1 -1
- package/dist/core/apply-receipt.js +62 -2
- package/dist/core/apply-receipt.js.map +1 -1
- package/dist/core/cdk-preset-adoption.d.ts +136 -0
- package/dist/core/cdk-preset-adoption.d.ts.map +1 -0
- package/dist/core/cdk-preset-adoption.js +135 -0
- package/dist/core/cdk-preset-adoption.js.map +1 -0
- package/dist/core/config-shadowing.d.ts +36 -0
- package/dist/core/config-shadowing.d.ts.map +1 -1
- package/dist/core/config-shadowing.js +38 -0
- package/dist/core/config-shadowing.js.map +1 -1
- package/dist/core/config.d.ts +11 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/learnings-merge-driver.d.ts +10 -0
- package/dist/core/learnings-merge-driver.d.ts.map +1 -1
- package/dist/core/learnings-merge-driver.js +18 -0
- package/dist/core/learnings-merge-driver.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +136 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +9 -1
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.d.ts +5 -5
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +7 -7
- package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
- package/dist/core/ownership-header.d.ts +74 -0
- package/dist/core/ownership-header.d.ts.map +1 -0
- package/dist/core/ownership-header.js +76 -0
- package/dist/core/ownership-header.js.map +1 -0
- package/dist/core/rails-deploy-production-intent.d.ts +36 -0
- package/dist/core/rails-deploy-production-intent.d.ts.map +1 -0
- package/dist/core/rails-deploy-production-intent.js +79 -0
- package/dist/core/rails-deploy-production-intent.js.map +1 -0
- package/dist/core/stale-managed-banner.d.ts +78 -0
- package/dist/core/stale-managed-banner.d.ts.map +1 -0
- package/dist/core/stale-managed-banner.js +118 -0
- package/dist/core/stale-managed-banner.js.map +1 -0
- package/dist/core/two-channel-delivery-scan.d.ts +33 -1
- package/dist/core/two-channel-delivery-scan.d.ts.map +1 -1
- package/dist/core/two-channel-delivery-scan.js +133 -6
- package/dist/core/two-channel-delivery-scan.js.map +1 -1
- package/dist/core/two-channel-delivery.d.ts +101 -4
- package/dist/core/two-channel-delivery.d.ts.map +1 -1
- package/dist/core/two-channel-delivery.js +121 -13
- package/dist/core/two-channel-delivery.js.map +1 -1
- package/dist/core/two-channel-staleness.d.ts +137 -0
- package/dist/core/two-channel-staleness.d.ts.map +1 -0
- package/dist/core/two-channel-staleness.js +268 -0
- package/dist/core/two-channel-staleness.js.map +1 -0
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +265 -121
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/core/workflow-deletion-ownership.d.ts +6 -24
- package/dist/core/workflow-deletion-ownership.d.ts.map +1 -1
- package/dist/core/workflow-deletion-ownership.js +22 -42
- package/dist/core/workflow-deletion-ownership.js.map +1 -1
- package/dist/detection/detectors/cdk.d.ts.map +1 -1
- package/dist/detection/detectors/cdk.js +2 -1
- package/dist/detection/detectors/cdk.js.map +1 -1
- package/dist/health/template-inspection.d.ts.map +1 -1
- package/dist/health/template-inspection.js +2 -1
- package/dist/health/template-inspection.js.map +1 -1
- package/dist/migrations/ensure-lisa-postinstall.d.ts +16 -0
- package/dist/migrations/ensure-lisa-postinstall.d.ts.map +1 -1
- package/dist/migrations/ensure-lisa-postinstall.js +16 -0
- package/dist/migrations/ensure-lisa-postinstall.js.map +1 -1
- package/dist/migrations/ensure-pinned-reusable-workflow-refs.d.ts +2 -2
- package/dist/migrations/ensure-pinned-reusable-workflow-refs.d.ts.map +1 -1
- package/dist/migrations/ensure-pinned-reusable-workflow-refs.js +98 -34
- package/dist/migrations/ensure-pinned-reusable-workflow-refs.js.map +1 -1
- package/dist/migrations/ensure-playwright-dedicated-caller.d.ts.map +1 -1
- package/dist/migrations/ensure-playwright-dedicated-caller.js +1 -0
- package/dist/migrations/ensure-playwright-dedicated-caller.js.map +1 -1
- package/dist/opencode/hooks-installer.d.ts.map +1 -1
- package/dist/opencode/hooks-installer.js +1 -0
- package/dist/opencode/hooks-installer.js.map +1 -1
- package/dist/opencode/plugin-templates/block-managed-file-edits.sh +78 -15
- package/dist/opencode/plugin-templates/block-no-verify.sh +21 -0
- package/dist/opencode/plugin-templates/guard-dedupe.bash +337 -0
- package/dist/opencode/plugin-templates/lisa-block-direct-issue-create.ts +242 -55
- package/dist/opencode/plugin-templates/parity-safety-net.sh +29 -1
- package/dist/strategies/package-lisa.d.ts.map +1 -1
- package/dist/strategies/package-lisa.js +2 -1
- package/dist/strategies/package-lisa.js.map +1 -1
- package/dist/utils/path-utils.d.ts +29 -0
- package/dist/utils/path-utils.d.ts.map +1 -1
- package/dist/utils/path-utils.js +41 -0
- package/dist/utils/path-utils.js.map +1 -1
- package/expo/create-only/.github/workflows/ci.yml +21 -0
- package/expo/create-only/.github/workflows/deploy.yml +28 -0
- package/expo/create-only/.github/workflows/maestro-e2e.yml +7 -0
- package/expo/create-only/.github/workflows/nightly-e2e-bypass-reaper.yml +124 -13
- package/expo/create-only/.github/workflows/nightly-e2e-health.yml +7 -0
- package/expo/create-only/.github/workflows/nightly-e2e-report.yml +7 -0
- package/expo/create-only/.github/workflows/nightly-e2e-tracking.yml +8 -0
- package/expo/create-only/.github/workflows/playwright-e2e.yml +7 -0
- package/harper-fabric/copy-overwrite/.github/workflows/ci.yml +7 -0
- package/harper-fabric/create-only/.github/workflows/deploy.yml +14 -0
- package/nestjs/create-only/.github/workflows/ci.yml +14 -0
- package/nestjs/create-only/.github/workflows/deploy.yml +28 -0
- package/package.json +10 -5
- package/phaser/copy-overwrite/.github/workflows/ci.yml +7 -0
- package/plugins/lisa/.claude-plugin/plugin.json +28 -1
- package/plugins/lisa/.codex-plugin/hooks.json +27 -0
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +130 -19
- package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +27 -4
- package/plugins/lisa/.codex-plugin/skills/lisa-github-prd-intake/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-github-validate-issue/SKILL.md +22 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-verify/SKILL.md +14 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +51 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-intake/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +27 -4
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-validate-ticket/SKILL.md +22 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-verify/SKILL.md +14 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-write-ticket/SKILL.md +51 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-access/SKILL.md +55 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +27 -4
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-prd-intake/SKILL.md +47 -30
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-to-tracker/SKILL.md +3 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-validate-issue/SKILL.md +22 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-verify/SKILL.md +14 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +54 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-prd-ticket-coverage/SKILL.md +2 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-qa-clear/SKILL.md +19 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-qa-fail/SKILL.md +28 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-qa-queue/SKILL.md +28 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-repair-intake/SKILL.md +94 -24
- package/plugins/lisa/.codex-plugin/skills/lisa-rework-triage/SKILL.md +32 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-linear/SKILL.md +4 -4
- package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-build-intake/SKILL.md +9 -0
- package/plugins/lisa/agents/linear-prd-intake.md +8 -8
- package/plugins/lisa/hooks/block-blind-automerge.sh +81 -2
- package/plugins/lisa/hooks/block-direct-issue-create.agy.sh +64 -16
- package/plugins/lisa/hooks/block-direct-issue-create.sh +293 -8
- package/plugins/lisa/hooks/block-instruction-file-edits.sh +21 -0
- package/plugins/lisa/hooks/block-managed-file-edits.sh +78 -15
- package/plugins/lisa/hooks/block-no-verify.sh +21 -0
- package/plugins/lisa/hooks/block-shell-json-parsing.sh +21 -0
- package/plugins/lisa/hooks/failure-signature-index.mjs +240 -5
- package/plugins/lisa/hooks/guard-dedupe.bash +337 -0
- package/plugins/lisa/hooks/inject-rules.sh +13 -5
- package/plugins/lisa/hooks/operational-hazards.mjs +736 -0
- package/plugins/lisa/hooks/operational-hazards.sh +28 -0
- package/plugins/lisa/hooks/parity-safety-net.sh +29 -1
- package/plugins/lisa/hooks/threshold-ratchet-compare.mjs +102 -21
- package/plugins/lisa/hooks/threshold-ratchet-families.mjs +130 -2
- package/plugins/lisa/hooks/threshold-ratchet.mjs +63 -13
- package/plugins/lisa/hooks/worktree-binding-guard.mjs +183 -1
- package/plugins/lisa/hooks/worktree-binding-guard.sh +21 -0
- package/plugins/lisa/rules/eager/00-rule-index.md +1 -0
- package/plugins/lisa/rules/eager/operational-hazards.md +50 -0
- package/plugins/lisa/rules/eager/tracked-work.md +1 -1
- package/plugins/lisa/rules/reference/config-resolution.md +1 -1
- package/plugins/lisa/rules/reference/leaf-only-lifecycle.md +1 -1
- package/plugins/lisa/rules/reference/operational-hazards.md +115 -0
- package/plugins/lisa/rules/reference/work-item-trailer-definition.md +129 -0
- package/plugins/lisa/scripts/intake-blocker-reprobe.mjs +407 -26
- package/plugins/lisa/scripts/qa-signal-lifecycle.mjs +507 -0
- package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +130 -19
- package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +27 -4
- package/plugins/lisa/skills/lisa-github-prd-intake/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-github-validate-issue/SKILL.md +22 -0
- package/plugins/lisa/skills/lisa-github-verify/SKILL.md +14 -0
- package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +51 -0
- package/plugins/lisa/skills/lisa-intake/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +27 -4
- package/plugins/lisa/skills/lisa-jira-validate-ticket/SKILL.md +22 -0
- package/plugins/lisa/skills/lisa-jira-verify/SKILL.md +14 -0
- package/plugins/lisa/skills/lisa-jira-write-ticket/SKILL.md +51 -0
- package/plugins/lisa/skills/lisa-linear-access/SKILL.md +55 -2
- package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +27 -4
- package/plugins/lisa/skills/lisa-linear-prd-intake/SKILL.md +48 -31
- package/plugins/lisa/skills/lisa-linear-to-tracker/SKILL.md +3 -3
- package/plugins/lisa/skills/lisa-linear-validate-issue/SKILL.md +22 -0
- package/plugins/lisa/skills/lisa-linear-verify/SKILL.md +14 -0
- package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +54 -3
- package/plugins/lisa/skills/lisa-prd-ticket-coverage/SKILL.md +2 -2
- package/plugins/lisa/skills/lisa-qa-clear/SKILL.md +19 -7
- package/plugins/lisa/skills/lisa-qa-fail/SKILL.md +28 -3
- package/plugins/lisa/skills/lisa-qa-queue/SKILL.md +28 -3
- package/plugins/lisa/skills/lisa-repair-intake/SKILL.md +94 -24
- package/plugins/lisa/skills/lisa-rework-triage/SKILL.md +32 -2
- package/plugins/lisa/skills/lisa-setup-linear/SKILL.md +5 -5
- package/plugins/lisa/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-tracker-build-intake/SKILL.md +9 -0
- package/plugins/lisa-agy/agents/linear-prd-intake.md +8 -8
- package/plugins/lisa-agy/hooks/block-blind-automerge.sh +81 -2
- package/plugins/lisa-agy/hooks/block-direct-issue-create.agy.sh +64 -16
- package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +293 -8
- package/plugins/lisa-agy/hooks/block-instruction-file-edits.sh +21 -0
- package/plugins/lisa-agy/hooks/block-managed-file-edits.sh +78 -15
- package/plugins/lisa-agy/hooks/block-shell-json-parsing.sh +21 -0
- package/plugins/lisa-agy/hooks/guard-dedupe.bash +337 -0
- package/plugins/lisa-agy/hooks/parity-safety-net.sh +29 -1
- package/plugins/lisa-agy/hooks.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/intake-blocker-reprobe.mjs +407 -26
- package/plugins/lisa-agy/scripts/qa-signal-lifecycle.mjs +507 -0
- package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +130 -19
- package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +27 -4
- package/plugins/lisa-agy/skills/lisa-github-prd-intake/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-github-validate-issue/SKILL.md +22 -0
- package/plugins/lisa-agy/skills/lisa-github-verify/SKILL.md +14 -0
- package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +51 -0
- package/plugins/lisa-agy/skills/lisa-intake/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +27 -4
- package/plugins/lisa-agy/skills/lisa-jira-validate-ticket/SKILL.md +22 -0
- package/plugins/lisa-agy/skills/lisa-jira-verify/SKILL.md +14 -0
- package/plugins/lisa-agy/skills/lisa-jira-write-ticket/SKILL.md +51 -0
- package/plugins/lisa-agy/skills/lisa-linear-access/SKILL.md +55 -2
- package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +27 -4
- package/plugins/lisa-agy/skills/lisa-linear-prd-intake/SKILL.md +48 -31
- package/plugins/lisa-agy/skills/lisa-linear-to-tracker/SKILL.md +3 -3
- package/plugins/lisa-agy/skills/lisa-linear-validate-issue/SKILL.md +22 -0
- package/plugins/lisa-agy/skills/lisa-linear-verify/SKILL.md +14 -0
- package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +54 -3
- package/plugins/lisa-agy/skills/lisa-prd-ticket-coverage/SKILL.md +2 -2
- package/plugins/lisa-agy/skills/lisa-qa-clear/SKILL.md +19 -7
- package/plugins/lisa-agy/skills/lisa-qa-fail/SKILL.md +28 -3
- package/plugins/lisa-agy/skills/lisa-qa-queue/SKILL.md +28 -3
- package/plugins/lisa-agy/skills/lisa-repair-intake/SKILL.md +94 -24
- package/plugins/lisa-agy/skills/lisa-rework-triage/SKILL.md +32 -2
- package/plugins/lisa-agy/skills/lisa-setup-linear/SKILL.md +5 -5
- package/plugins/lisa-agy/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-tracker-build-intake/SKILL.md +9 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +19 -1
- package/plugins/lisa-copilot/agents/linear-prd-intake.agent.md +8 -8
- package/plugins/lisa-copilot/hooks/block-blind-automerge.sh +81 -2
- package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +293 -8
- package/plugins/lisa-copilot/hooks/block-instruction-file-edits.sh +21 -0
- package/plugins/lisa-copilot/hooks/block-managed-file-edits.sh +78 -15
- package/plugins/lisa-copilot/hooks/block-no-verify.sh +21 -0
- package/plugins/lisa-copilot/hooks/block-shell-json-parsing.sh +21 -0
- package/plugins/lisa-copilot/hooks/failure-signature-index.mjs +240 -5
- package/plugins/lisa-copilot/hooks/guard-dedupe.bash +337 -0
- package/plugins/lisa-copilot/hooks/inject-rules.sh +13 -5
- package/plugins/lisa-copilot/hooks/operational-hazards.mjs +736 -0
- package/plugins/lisa-copilot/hooks/operational-hazards.sh +28 -0
- package/plugins/lisa-copilot/hooks/parity-safety-net.sh +29 -1
- package/plugins/lisa-copilot/hooks/threshold-ratchet-compare.mjs +102 -21
- package/plugins/lisa-copilot/hooks/threshold-ratchet-families.mjs +130 -2
- package/plugins/lisa-copilot/hooks/threshold-ratchet.mjs +63 -13
- package/plugins/lisa-copilot/hooks/worktree-binding-guard.mjs +183 -1
- package/plugins/lisa-copilot/hooks/worktree-binding-guard.sh +21 -0
- package/plugins/lisa-copilot/rules/eager/00-rule-index.md +1 -0
- package/plugins/lisa-copilot/rules/eager/operational-hazards.md +50 -0
- package/plugins/lisa-copilot/rules/eager/tracked-work.md +1 -1
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +1 -1
- package/plugins/lisa-copilot/rules/reference/leaf-only-lifecycle.md +1 -1
- package/plugins/lisa-copilot/rules/reference/operational-hazards.md +115 -0
- package/plugins/lisa-copilot/rules/reference/work-item-trailer-definition.md +129 -0
- package/plugins/lisa-copilot/scripts/intake-blocker-reprobe.mjs +407 -26
- package/plugins/lisa-copilot/scripts/qa-signal-lifecycle.mjs +507 -0
- package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +130 -19
- package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +27 -4
- package/plugins/lisa-copilot/skills/lisa-github-prd-intake/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-github-validate-issue/SKILL.md +22 -0
- package/plugins/lisa-copilot/skills/lisa-github-verify/SKILL.md +14 -0
- package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +51 -0
- package/plugins/lisa-copilot/skills/lisa-intake/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +27 -4
- package/plugins/lisa-copilot/skills/lisa-jira-validate-ticket/SKILL.md +22 -0
- package/plugins/lisa-copilot/skills/lisa-jira-verify/SKILL.md +14 -0
- package/plugins/lisa-copilot/skills/lisa-jira-write-ticket/SKILL.md +51 -0
- package/plugins/lisa-copilot/skills/lisa-linear-access/SKILL.md +55 -2
- package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +27 -4
- package/plugins/lisa-copilot/skills/lisa-linear-prd-intake/SKILL.md +48 -31
- package/plugins/lisa-copilot/skills/lisa-linear-to-tracker/SKILL.md +3 -3
- package/plugins/lisa-copilot/skills/lisa-linear-validate-issue/SKILL.md +22 -0
- package/plugins/lisa-copilot/skills/lisa-linear-verify/SKILL.md +14 -0
- package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +54 -3
- package/plugins/lisa-copilot/skills/lisa-prd-ticket-coverage/SKILL.md +2 -2
- package/plugins/lisa-copilot/skills/lisa-qa-clear/SKILL.md +19 -7
- package/plugins/lisa-copilot/skills/lisa-qa-fail/SKILL.md +28 -3
- package/plugins/lisa-copilot/skills/lisa-qa-queue/SKILL.md +28 -3
- package/plugins/lisa-copilot/skills/lisa-repair-intake/SKILL.md +94 -24
- package/plugins/lisa-copilot/skills/lisa-rework-triage/SKILL.md +32 -2
- package/plugins/lisa-copilot/skills/lisa-setup-linear/SKILL.md +5 -5
- package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-tracker-build-intake/SKILL.md +9 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/agents/linear-prd-intake.md +8 -8
- package/plugins/lisa-cursor/hooks/block-blind-automerge.sh +81 -2
- package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +293 -8
- package/plugins/lisa-cursor/hooks/block-instruction-file-edits.sh +21 -0
- package/plugins/lisa-cursor/hooks/block-managed-file-edits.sh +78 -15
- package/plugins/lisa-cursor/hooks/block-no-verify.sh +21 -0
- package/plugins/lisa-cursor/hooks/block-shell-json-parsing.sh +21 -0
- package/plugins/lisa-cursor/hooks/failure-signature-index.mjs +240 -5
- package/plugins/lisa-cursor/hooks/guard-dedupe.bash +337 -0
- package/plugins/lisa-cursor/hooks/hooks.json +10 -0
- package/plugins/lisa-cursor/hooks/operational-hazards.mjs +736 -0
- package/plugins/lisa-cursor/hooks/operational-hazards.sh +28 -0
- package/plugins/lisa-cursor/hooks/parity-safety-net.sh +29 -1
- package/plugins/lisa-cursor/hooks/threshold-ratchet-compare.mjs +102 -21
- package/plugins/lisa-cursor/hooks/threshold-ratchet-families.mjs +130 -2
- package/plugins/lisa-cursor/hooks/threshold-ratchet.mjs +63 -13
- package/plugins/lisa-cursor/hooks/worktree-binding-guard.mjs +183 -1
- package/plugins/lisa-cursor/hooks/worktree-binding-guard.sh +21 -0
- package/plugins/lisa-cursor/rules/00-rule-index.mdc +1 -0
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +1 -1
- package/plugins/lisa-cursor/rules/leaf-only-lifecycle-reference.mdc +1 -1
- package/plugins/lisa-cursor/rules/operational-hazards-reference.mdc +120 -0
- package/plugins/lisa-cursor/rules/operational-hazards.mdc +55 -0
- package/plugins/lisa-cursor/rules/tracked-work.mdc +1 -1
- package/plugins/lisa-cursor/rules/work-item-trailer-definition-reference.mdc +134 -0
- package/plugins/lisa-cursor/scripts/intake-blocker-reprobe.mjs +407 -26
- package/plugins/lisa-cursor/scripts/qa-signal-lifecycle.mjs +507 -0
- package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +130 -19
- package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +27 -4
- package/plugins/lisa-cursor/skills/lisa-github-prd-intake/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-github-validate-issue/SKILL.md +22 -0
- package/plugins/lisa-cursor/skills/lisa-github-verify/SKILL.md +14 -0
- package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +51 -0
- package/plugins/lisa-cursor/skills/lisa-intake/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +27 -4
- package/plugins/lisa-cursor/skills/lisa-jira-validate-ticket/SKILL.md +22 -0
- package/plugins/lisa-cursor/skills/lisa-jira-verify/SKILL.md +14 -0
- package/plugins/lisa-cursor/skills/lisa-jira-write-ticket/SKILL.md +51 -0
- package/plugins/lisa-cursor/skills/lisa-linear-access/SKILL.md +55 -2
- package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +27 -4
- package/plugins/lisa-cursor/skills/lisa-linear-prd-intake/SKILL.md +48 -31
- package/plugins/lisa-cursor/skills/lisa-linear-to-tracker/SKILL.md +3 -3
- package/plugins/lisa-cursor/skills/lisa-linear-validate-issue/SKILL.md +22 -0
- package/plugins/lisa-cursor/skills/lisa-linear-verify/SKILL.md +14 -0
- package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +54 -3
- package/plugins/lisa-cursor/skills/lisa-prd-ticket-coverage/SKILL.md +2 -2
- package/plugins/lisa-cursor/skills/lisa-qa-clear/SKILL.md +19 -7
- package/plugins/lisa-cursor/skills/lisa-qa-fail/SKILL.md +28 -3
- package/plugins/lisa-cursor/skills/lisa-qa-queue/SKILL.md +28 -3
- package/plugins/lisa-cursor/skills/lisa-repair-intake/SKILL.md +94 -24
- package/plugins/lisa-cursor/skills/lisa-rework-triage/SKILL.md +32 -2
- package/plugins/lisa-cursor/skills/lisa-setup-linear/SKILL.md +5 -5
- package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-tracker-build-intake/SKILL.md +9 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/hooks/inject-rules.sh +14 -3
- package/plugins/lisa-harper-fabric/rules/eager/harper-fabric.md +31 -0
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/hooks/inject-rules.sh +14 -3
- package/plugins/lisa-harper-fabric-copilot/rules/eager/harper-fabric.md +31 -0
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/rules/harper-fabric-reference.mdc +57 -0
- package/plugins/lisa-harper-fabric-cursor/rules/harper-fabric.mdc +32 -53
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/hooks/inject-rules.sh +14 -3
- package/plugins/lisa-phaser/rules/eager/phaser.md +44 -0
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/hooks/inject-rules.sh +14 -3
- package/plugins/lisa-phaser-copilot/rules/eager/phaser.md +44 -0
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/rules/phaser-reference.mdc +189 -0
- package/plugins/lisa-phaser-cursor/rules/phaser.mdc +45 -185
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/hooks/inject-rules.sh +14 -4
- package/plugins/lisa-rails/rules/eager/rails-conventions.md +23 -0
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/hooks/inject-rules.sh +14 -4
- package/plugins/lisa-rails-copilot/rules/eager/rails-conventions.md +23 -0
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/rules/rails-conventions-reference.mdc +181 -0
- package/plugins/lisa-rails-cursor/rules/rails-conventions.mdc +24 -177
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/materialized-artifacts.json +1 -0
- package/plugins/src/base/.claude-plugin/plugin.json +27 -0
- package/plugins/src/base/agents/linear-prd-intake.md +8 -8
- package/plugins/src/base/hooks/block-blind-automerge.sh +81 -2
- package/plugins/src/base/hooks/block-direct-issue-create.agy.sh +64 -16
- package/plugins/src/base/hooks/block-direct-issue-create.sh +293 -8
- package/plugins/src/base/hooks/block-instruction-file-edits.sh +21 -0
- package/plugins/src/base/hooks/block-managed-file-edits.sh +78 -15
- package/plugins/src/base/hooks/block-no-verify.sh +21 -0
- package/plugins/src/base/hooks/block-shell-json-parsing.sh +21 -0
- package/plugins/src/base/hooks/failure-signature-index.mjs +240 -5
- package/plugins/src/base/hooks/guard-dedupe.bash +337 -0
- package/plugins/src/base/hooks/inject-rules.sh +13 -5
- package/plugins/src/base/hooks/operational-hazards.mjs +736 -0
- package/plugins/src/base/hooks/operational-hazards.sh +28 -0
- package/plugins/src/base/hooks/parity-safety-net.sh +29 -1
- package/plugins/src/base/hooks/threshold-ratchet-compare.mjs +102 -21
- package/plugins/src/base/hooks/threshold-ratchet-families.mjs +130 -2
- package/plugins/src/base/hooks/threshold-ratchet.mjs +63 -13
- package/plugins/src/base/hooks/worktree-binding-guard.mjs +183 -1
- package/plugins/src/base/hooks/worktree-binding-guard.sh +21 -0
- package/plugins/src/base/rules/eager/00-rule-index.md +1 -0
- package/plugins/src/base/rules/eager/operational-hazards.md +50 -0
- package/plugins/src/base/rules/eager/tracked-work.md +1 -1
- package/plugins/src/base/rules/reference/config-resolution.md +1 -1
- package/plugins/src/base/rules/reference/leaf-only-lifecycle.md +1 -1
- package/plugins/src/base/rules/reference/operational-hazards.md +115 -0
- package/plugins/src/base/rules/reference/work-item-trailer-definition.md +129 -0
- package/plugins/src/base/scripts/intake-blocker-reprobe.mjs +407 -26
- package/plugins/src/base/scripts/qa-signal-lifecycle.mjs +507 -0
- package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +130 -19
- package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +27 -4
- package/plugins/src/base/skills/lisa-github-prd-intake/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-github-validate-issue/SKILL.md +22 -0
- package/plugins/src/base/skills/lisa-github-verify/SKILL.md +14 -0
- package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +51 -0
- package/plugins/src/base/skills/lisa-intake/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +27 -4
- package/plugins/src/base/skills/lisa-jira-validate-ticket/SKILL.md +22 -0
- package/plugins/src/base/skills/lisa-jira-verify/SKILL.md +14 -0
- package/plugins/src/base/skills/lisa-jira-write-ticket/SKILL.md +51 -0
- package/plugins/src/base/skills/lisa-linear-access/SKILL.md +55 -2
- package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +27 -4
- package/plugins/src/base/skills/lisa-linear-prd-intake/SKILL.md +48 -31
- package/plugins/src/base/skills/lisa-linear-to-tracker/SKILL.md +3 -3
- package/plugins/src/base/skills/lisa-linear-validate-issue/SKILL.md +22 -0
- package/plugins/src/base/skills/lisa-linear-verify/SKILL.md +14 -0
- package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +54 -3
- package/plugins/src/base/skills/lisa-prd-ticket-coverage/SKILL.md +2 -2
- package/plugins/src/base/skills/lisa-qa-clear/SKILL.md +19 -7
- package/plugins/src/base/skills/lisa-qa-fail/SKILL.md +28 -3
- package/plugins/src/base/skills/lisa-qa-queue/SKILL.md +28 -3
- package/plugins/src/base/skills/lisa-repair-intake/SKILL.md +94 -24
- package/plugins/src/base/skills/lisa-rework-triage/SKILL.md +32 -2
- package/plugins/src/base/skills/lisa-setup-linear/SKILL.md +5 -5
- package/plugins/src/base/skills/lisa-track/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-tracker-build-intake/SKILL.md +9 -0
- package/plugins/src/harper-fabric/hooks/inject-rules.sh +14 -3
- package/plugins/src/harper-fabric/rules/eager/harper-fabric.md +31 -0
- package/plugins/src/phaser/hooks/inject-rules.sh +14 -3
- package/plugins/src/phaser/rules/eager/phaser.md +44 -0
- package/plugins/src/rails/hooks/inject-rules.sh +14 -4
- package/plugins/src/rails/rules/eager/rails-conventions.md +23 -0
- package/rails/copy-overwrite/scripts/check-threshold-ratchet.mjs +63 -13
- package/rails/copy-overwrite/scripts/threshold-ratchet-compare.mjs +102 -21
- package/rails/copy-overwrite/scripts/threshold-ratchet-families.mjs +130 -2
- package/rails/create-only/.github/workflows/ci.yml +8 -0
- package/rails/create-only/.github/workflows/deploy.yml +22 -0
- package/scripts/build-plugins.sh +2 -1
- package/scripts/check-engine-floor.mjs +361 -0
- package/scripts/check-guard-parity-notes.mjs +709 -0
- package/scripts/check-template-workflow-refs.mjs +9 -0
- package/scripts/check-third-party-action-pins.mjs +17 -1
- package/scripts/check-workflow-contract-assertions.mjs +480 -0
- package/scripts/copy-opencode-plugin-templates.mjs +1 -0
- package/scripts/deployed-guard-advice.mjs +636 -0
- package/scripts/generate-agy-plugin-artifacts.mjs +35 -10
- package/scripts/generate-export-surface.mjs +105 -19
- package/scripts/generate-two-channel-couplings.ts +143 -212
- package/scripts/lisa-enforcement-fallback.sh +31 -0
- package/scripts/measure-scripts-profile-gap.mts +361 -0
- package/scripts/mutation-performance-measure.mjs +21 -5
- package/scripts/reconcile-release-tags.mjs +65 -84
- package/scripts/two-channel-couplings.json +302 -70
- package/scripts/workflow-contract-assertion.sh +47 -0
- package/typescript/copy-overwrite/.lintstagedrc.json +1 -0
- package/typescript/copy-overwrite/eslint.ignore.config.json +1 -0
- package/typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs +527 -53
- package/typescript/copy-overwrite/scripts/check-skipped-required-checks.mjs +301 -13
- package/typescript/copy-overwrite/scripts/check-threshold-ratchet.mjs +63 -13
- package/typescript/copy-overwrite/scripts/threshold-ratchet-compare.mjs +102 -21
- package/typescript/copy-overwrite/scripts/threshold-ratchet-families.mjs +130 -2
- package/typescript/create-only/.github/workflows/ci.yml +7 -0
- /package/plugins/lisa-harper-fabric/rules/{harper-fabric.md → reference/harper-fabric.md} +0 -0
- /package/plugins/lisa-harper-fabric-copilot/rules/{harper-fabric.md → reference/harper-fabric.md} +0 -0
- /package/plugins/lisa-phaser/rules/{phaser.md → reference/phaser.md} +0 -0
- /package/plugins/lisa-phaser-copilot/rules/{phaser.md → reference/phaser.md} +0 -0
- /package/plugins/lisa-rails/rules/{rails-conventions.md → reference/rails-conventions.md} +0 -0
- /package/plugins/lisa-rails-copilot/rules/{rails-conventions.md → reference/rails-conventions.md} +0 -0
- /package/plugins/src/harper-fabric/rules/{harper-fabric.md → reference/harper-fabric.md} +0 -0
- /package/plugins/src/phaser/rules/{phaser.md → reference/phaser.md} +0 -0
- /package/plugins/src/rails/rules/{rails-conventions.md → reference/rails-conventions.md} +0 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
# shellcheck shell=bash
|
|
2
|
+
# Evaluate a dual-channel guard once per tool call, without de-registering it.
|
|
3
|
+
#
|
|
4
|
+
# Sourced — never executed — by every guard that Lisa registers on BOTH of its
|
|
5
|
+
# enforcement channels: the repository dispatcher
|
|
6
|
+
# (`scripts/lisa-enforcement-fallback.sh`, which sweeps the guard roster in one
|
|
7
|
+
# process) and the plugin manifest, which registers the same guards
|
|
8
|
+
# individually. On a machine where both are live the harness runs each guard
|
|
9
|
+
# twice for one tool call. The verdicts agree — the guards are idempotent — so
|
|
10
|
+
# the defect is cost, not correctness (CodySwannGT/lisa#3814).
|
|
11
|
+
#
|
|
12
|
+
# WHY THIS IS NOT "DROP ONE REGISTRATION".
|
|
13
|
+
#
|
|
14
|
+
# The obvious fix is to de-register the fallback where the plugin covers the
|
|
15
|
+
# same ground. That fix cannot be made safely from here, and the reason is
|
|
16
|
+
# written into the dispatcher itself: plugin-hook LIVENESS is not observable
|
|
17
|
+
# from disk. `installed_plugins.json` answers "was this plugin ever installed",
|
|
18
|
+
# which is project-blind, enablement-blind and session-blind — hooks load at
|
|
19
|
+
# session start, the record is rewritten on any install. A stand-down keyed on
|
|
20
|
+
# that record switched enforcement off in sessions where the plugin hooks were
|
|
21
|
+
# not loaded, and did it silently. So the dispatcher runs unconditionally and
|
|
22
|
+
# always will.
|
|
23
|
+
#
|
|
24
|
+
# What IS observable is EXECUTION. A guard that has already run in this session
|
|
25
|
+
# from a different directory is proof — not inference — that a second channel is
|
|
26
|
+
# live right now. This file turns that observation into a per-call memo, so the
|
|
27
|
+
# second copy of an identical guard replays a verdict the first one produced
|
|
28
|
+
# instead of computing it again. Nothing is de-registered, no matcher narrows,
|
|
29
|
+
# and a host with the plugin absent takes the single-channel path where the memo
|
|
30
|
+
# can never hit.
|
|
31
|
+
#
|
|
32
|
+
# WHAT THE MEMO IS ALLOWED TO SHORT-CIRCUIT, and the three conditions that make
|
|
33
|
+
# it sound. Every one of them is a REFUSAL to dedupe when it cannot be proven:
|
|
34
|
+
#
|
|
35
|
+
# 1. BYTE-IDENTICAL CODE. The digest covers the guard script and this library
|
|
36
|
+
# verbatim. Two channels at different vintages therefore compute different
|
|
37
|
+
# keys and both run — which is required, because the agent is meant to see
|
|
38
|
+
# the UNION of two vintages' verdicts, and a tightening on either channel
|
|
39
|
+
# must take effect at once. Deduplicating across vintages would let the
|
|
40
|
+
# older, weaker copy answer for the newer one.
|
|
41
|
+
# 2. IDENTICAL PAYLOAD, SAME TOOL CALL. The digest covers the payload and a
|
|
42
|
+
# per-call discriminator — the transcript's size, which grows with every
|
|
43
|
+
# turn. Without the discriminator a command repeated later in the session
|
|
44
|
+
# would hit a memo written before the repository changed underneath it, and
|
|
45
|
+
# a guard that classifies against the working tree would be answering with
|
|
46
|
+
# a stale verdict. No discriminator available means no memo.
|
|
47
|
+
# 3. ALLOW VERDICTS ONLY. A refusal is never memoised and never replayed. That
|
|
48
|
+
# is deliberate: refusals are the rare path, so deduplicating them saves
|
|
49
|
+
# nothing measurable, and it removes the whole class of hazard the ticket
|
|
50
|
+
# names — a replayed refusal whose producing channel died mid-run, or a
|
|
51
|
+
# refusal reaching the agent without the message that explains it. On a
|
|
52
|
+
# refusal every channel evaluates and speaks exactly as it does today.
|
|
53
|
+
#
|
|
54
|
+
# COST ON THE PATH THAT GETS NO BENEFIT. A host with one channel must not pay
|
|
55
|
+
# for a mechanism it cannot use. The channel check is builtins only — one small
|
|
56
|
+
# file read, no subshell, no fork — and returns before the digest is computed
|
|
57
|
+
# unless a second channel has actually been seen. The digest, and the one `stat`
|
|
58
|
+
# that feeds it the per-call discriminator, are reached only where a second
|
|
59
|
+
# channel is live, which is exactly where they are repaid.
|
|
60
|
+
|
|
61
|
+
# Key this guard would memoise under, once computed. Empty means "record
|
|
62
|
+
# nothing on exit".
|
|
63
|
+
lisa_guard_memo_key=""
|
|
64
|
+
|
|
65
|
+
# File that memo is written to.
|
|
66
|
+
lisa_guard_memo_file=""
|
|
67
|
+
|
|
68
|
+
# Base directory for memo state, resolved at most once per process.
|
|
69
|
+
lisa_guard_memo_base=""
|
|
70
|
+
|
|
71
|
+
# Whether a key was computed and a memo may be recorded on exit.
|
|
72
|
+
lisa_guard_memo_ready=0
|
|
73
|
+
|
|
74
|
+
# Digest tool for the memo key, resolved once. Empty disables the memo.
|
|
75
|
+
lisa_guard_memo_digest_tool=""
|
|
76
|
+
|
|
77
|
+
# Whether a directory is a real directory this user owns, and not a symlink —
|
|
78
|
+
# builtins only, so this costs no process.
|
|
79
|
+
#
|
|
80
|
+
# `-O` is the load-bearing test: a memo planted by another user would suppress a
|
|
81
|
+
# refusal, so a directory this user does not own is never used. The dispatcher
|
|
82
|
+
# validates the whole parent chain before exporting `LISA_GUARD_MEMO_DIR`; this
|
|
83
|
+
# re-checks the leaf rather than trusting the environment variable, because an
|
|
84
|
+
# exported path is an input like any other.
|
|
85
|
+
#
|
|
86
|
+
# $1 - candidate directory
|
|
87
|
+
lisa_guard_memo_dir_usable() {
|
|
88
|
+
[ -n "${1:-}" ] || return 1
|
|
89
|
+
[ -d "$1" ] || return 1
|
|
90
|
+
[ ! -L "$1" ] || return 1
|
|
91
|
+
[ -O "$1" ] || return 1
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
# Establish the memo base directory.
|
|
95
|
+
#
|
|
96
|
+
# Preferred source is `LISA_GUARD_MEMO_DIR`, exported by the dispatcher, which
|
|
97
|
+
# has already resolved `TMPDIR` physically and walked every parent for ownership
|
|
98
|
+
# and mode. Guards it spawns therefore pay nothing for that walk. A guard
|
|
99
|
+
# reached by the plugin channel has no such parent, so it creates the directory
|
|
100
|
+
# itself under `TMPDIR` — private by umask, and used only when this user owns
|
|
101
|
+
# it. If neither works the memo is unavailable and every guard evaluates, which
|
|
102
|
+
# is today's behaviour.
|
|
103
|
+
lisa_guard_memo_resolve_base() {
|
|
104
|
+
[ -z "$lisa_guard_memo_base" ] || return 0
|
|
105
|
+
|
|
106
|
+
local candidate="${LISA_GUARD_MEMO_DIR:-}"
|
|
107
|
+
if lisa_guard_memo_dir_usable "$candidate"; then
|
|
108
|
+
lisa_guard_memo_base="$candidate"
|
|
109
|
+
return 0
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
local uid="${LISA_GUARD_MEMO_UID:-}"
|
|
113
|
+
if [ -z "$uid" ]; then
|
|
114
|
+
uid="$(id -u 2>/dev/null || printf 'unknown')"
|
|
115
|
+
fi
|
|
116
|
+
candidate="${TMPDIR:-/tmp}"
|
|
117
|
+
candidate="${candidate%/}/lisa-guard-memo-$uid"
|
|
118
|
+
if [ ! -e "$candidate" ] && [ ! -L "$candidate" ]; then
|
|
119
|
+
(umask 077 && mkdir -p "$candidate") 2>/dev/null || true
|
|
120
|
+
fi
|
|
121
|
+
if lisa_guard_memo_dir_usable "$candidate"; then
|
|
122
|
+
lisa_guard_memo_base="$candidate"
|
|
123
|
+
return 0
|
|
124
|
+
fi
|
|
125
|
+
return 1
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
# Resolve a SHA-256 tool, or report that there is none.
|
|
129
|
+
#
|
|
130
|
+
# Two spellings because the guards run on macOS, on Linux CI images, and in
|
|
131
|
+
# containers that carry neither. A missing digest tool disables dedupe rather
|
|
132
|
+
# than degrading it to something weaker: a cheap checksum could collide, and a
|
|
133
|
+
# collision here means a DIFFERENT payload reads as already-allowed, which is
|
|
134
|
+
# lost enforcement rather than a slow guard.
|
|
135
|
+
lisa_guard_memo_resolve_digest() {
|
|
136
|
+
[ -z "$lisa_guard_memo_digest_tool" ] || return 0
|
|
137
|
+
if command -v shasum >/dev/null 2>&1; then
|
|
138
|
+
lisa_guard_memo_digest_tool="shasum"
|
|
139
|
+
elif command -v sha256sum >/dev/null 2>&1; then
|
|
140
|
+
lisa_guard_memo_digest_tool="sha256sum"
|
|
141
|
+
else
|
|
142
|
+
return 1
|
|
143
|
+
fi
|
|
144
|
+
return 0
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
# Remove memo state older than a day.
|
|
148
|
+
#
|
|
149
|
+
# Files first, then the emptied session directories, both with `find -delete`.
|
|
150
|
+
# Never a recursive forced delete: this runs unattended inside every guard, and
|
|
151
|
+
# the blast radius of a mis-resolved base directory has to stay bounded to
|
|
152
|
+
# entries this scheme itself created.
|
|
153
|
+
lisa_guard_memo_sweep() {
|
|
154
|
+
find "$lisa_guard_memo_base" -mindepth 2 -maxdepth 2 -type f -mmin +1440 \
|
|
155
|
+
-delete 2>/dev/null || true
|
|
156
|
+
find "$lisa_guard_memo_base" -mindepth 1 -maxdepth 1 -type d -empty \
|
|
157
|
+
-mmin +1440 -delete 2>/dev/null || true
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
# Decide whether this guard has already been evaluated for this tool call, and
|
|
161
|
+
# exit 0 in place of re-evaluating it when it has.
|
|
162
|
+
#
|
|
163
|
+
# Returns 0 for "carry on and evaluate". Never returns non-zero, so a caller
|
|
164
|
+
# running under `set -e` is unaffected by it.
|
|
165
|
+
#
|
|
166
|
+
# $1 - guard name, used only to name the memo file
|
|
167
|
+
# $2 - the raw tool payload this guard was handed on stdin
|
|
168
|
+
lisa_guard_dedupe() {
|
|
169
|
+
local guard_name="${1:-}"
|
|
170
|
+
local payload="${2:-}"
|
|
171
|
+
[ -n "$guard_name" ] || return 0
|
|
172
|
+
[ -n "$payload" ] || return 0
|
|
173
|
+
[ -z "${LISA_GUARD_DEDUPE_DISABLE:-}" ] || return 0
|
|
174
|
+
|
|
175
|
+
# The session scopes every piece of state below. No session id means the
|
|
176
|
+
# payload came from a surface this cannot reason about — an adapter's
|
|
177
|
+
# synthesised envelope, a test harness — and the answer there is to evaluate.
|
|
178
|
+
local session_id=""
|
|
179
|
+
local session_pattern="\"session_id\"[[:space:]]*:[[:space:]]*\"([^\"]+)\""
|
|
180
|
+
if [[ "$payload" =~ $session_pattern ]]; then
|
|
181
|
+
session_id="${BASH_REMATCH[1]}"
|
|
182
|
+
fi
|
|
183
|
+
[ -n "$session_id" ] || return 0
|
|
184
|
+
# It is used as a path component, so anything that could escape the state
|
|
185
|
+
# directory disqualifies it outright.
|
|
186
|
+
case "$session_id" in *[!A-Za-z0-9._-]* | .*) return 0 ;; esac
|
|
187
|
+
|
|
188
|
+
lisa_guard_memo_resolve_base || return 0
|
|
189
|
+
|
|
190
|
+
local session_dir="$lisa_guard_memo_base/$session_id"
|
|
191
|
+
local fresh_session=0
|
|
192
|
+
if [ ! -d "$session_dir" ]; then
|
|
193
|
+
if (umask 077 && mkdir "$session_dir") 2>/dev/null; then
|
|
194
|
+
fresh_session=1
|
|
195
|
+
fi
|
|
196
|
+
fi
|
|
197
|
+
[ -d "$session_dir" ] || return 0
|
|
198
|
+
[ ! -L "$session_dir" ] || return 0
|
|
199
|
+
|
|
200
|
+
# Swept once, by the process that created the session directory, so a
|
|
201
|
+
# long-lived machine does not accumulate memo state. Off the hot path by
|
|
202
|
+
# construction: every later call in the session finds the directory present.
|
|
203
|
+
if [ "$fresh_session" -eq 1 ]; then
|
|
204
|
+
lisa_guard_memo_sweep
|
|
205
|
+
fi
|
|
206
|
+
|
|
207
|
+
# The directory this copy of the guard was served from. Two registrations of
|
|
208
|
+
# one guard are always two different directories — a repository tree or an
|
|
209
|
+
# applied `scripts/lisa-hooks/` on one side, a plugin cache on the other — so
|
|
210
|
+
# the set of directories seen this session IS the set of live channels.
|
|
211
|
+
local self_script="${BASH_SOURCE[1]:-$0}"
|
|
212
|
+
local self_dir="."
|
|
213
|
+
case "$self_script" in */*) self_dir="${self_script%/*}" ;; esac
|
|
214
|
+
|
|
215
|
+
local channels_file="$session_dir/channels"
|
|
216
|
+
local seen_self=0
|
|
217
|
+
local other_channel=0
|
|
218
|
+
local line=""
|
|
219
|
+
if [ -f "$channels_file" ]; then
|
|
220
|
+
while IFS= read -r line || [ -n "$line" ]; do
|
|
221
|
+
[ -n "$line" ] || continue
|
|
222
|
+
if [ "$line" = "$self_dir" ]; then
|
|
223
|
+
seen_self=1
|
|
224
|
+
else
|
|
225
|
+
other_channel=1
|
|
226
|
+
fi
|
|
227
|
+
done <"$channels_file"
|
|
228
|
+
fi
|
|
229
|
+
if [ "$seen_self" -eq 0 ]; then
|
|
230
|
+
printf '%s\n' "$self_dir" >>"$channels_file" 2>/dev/null || true
|
|
231
|
+
fi
|
|
232
|
+
|
|
233
|
+
# Single channel: the memo can never hit, so nothing below is worth its cost.
|
|
234
|
+
# This is the branch a host with no plugin takes on every call, and it is the
|
|
235
|
+
# reason the fork lives below this line rather than above it.
|
|
236
|
+
[ "$other_channel" -eq 1 ] || return 0
|
|
237
|
+
|
|
238
|
+
# The per-call discriminator. The transcript grows with every turn, so its
|
|
239
|
+
# size separates two identical commands issued at different points in one
|
|
240
|
+
# session — which matters because a guard classifies against a working tree
|
|
241
|
+
# that may have changed between them. Both channels read the same transcript
|
|
242
|
+
# within one tool call, and anything appended between them costs a memo miss,
|
|
243
|
+
# never a stale hit.
|
|
244
|
+
local transcript=""
|
|
245
|
+
local transcript_pattern="\"transcript_path\"[[:space:]]*:[[:space:]]*\"([^\"]+)\""
|
|
246
|
+
if [[ "$payload" =~ $transcript_pattern ]]; then
|
|
247
|
+
transcript="${BASH_REMATCH[1]}"
|
|
248
|
+
fi
|
|
249
|
+
[ -n "$transcript" ] || return 0
|
|
250
|
+
[ -f "$transcript" ] || return 0
|
|
251
|
+
|
|
252
|
+
lisa_guard_memo_resolve_digest || return 0
|
|
253
|
+
|
|
254
|
+
# The transcript's size, captured and VALIDATED before it can reach the
|
|
255
|
+
# digest, because a `stat` that rejects the other platform's spelling can
|
|
256
|
+
# still write to stdout on its way out. GNU `stat -f '%z' FILE` reads `-f` as
|
|
257
|
+
# `--file-system` and the format string as a FILE that does not exist: it
|
|
258
|
+
# exits non-zero AND prints a filesystem status block for the real operand,
|
|
259
|
+
# whose `Free` and `Available` counts move under any disk activity. Appended
|
|
260
|
+
# straight into the digest, that made the two channels of ONE tool call
|
|
261
|
+
# compute different keys, so the memo could only ever miss — the whole
|
|
262
|
+
# mechanism switched off on every Linux host, while the three "must not
|
|
263
|
+
# dedupe" controls stayed green because they assert a miss.
|
|
264
|
+
#
|
|
265
|
+
# Only an all-digits answer is accepted, and no size means NO MEMO rather
|
|
266
|
+
# than a memo with nothing separating one call from the next: that is
|
|
267
|
+
# condition 2 above, which the `A || B` spelling had left unenforced on a
|
|
268
|
+
# host carrying neither `stat`.
|
|
269
|
+
local transcript_size=""
|
|
270
|
+
transcript_size="$(stat -c '%s' "$transcript" 2>/dev/null)" ||
|
|
271
|
+
transcript_size=""
|
|
272
|
+
case "$transcript_size" in
|
|
273
|
+
"" | *[!0-9]*)
|
|
274
|
+
transcript_size="$(stat -f '%z' "$transcript" 2>/dev/null)" ||
|
|
275
|
+
transcript_size=""
|
|
276
|
+
;;
|
|
277
|
+
esac
|
|
278
|
+
case "$transcript_size" in "" | *[!0-9]*) return 0 ;; esac
|
|
279
|
+
|
|
280
|
+
# One command substitution, covering everything the verdict depends on: the
|
|
281
|
+
# guard's own bytes, this library's bytes, the payload, and which call it is.
|
|
282
|
+
local key=""
|
|
283
|
+
key="$(
|
|
284
|
+
{
|
|
285
|
+
cat "$self_script" "${BASH_SOURCE[0]}" 2>/dev/null
|
|
286
|
+
printf '\n%s\n' "$payload"
|
|
287
|
+
printf '%s\n' "$transcript_size"
|
|
288
|
+
} | if [ "$lisa_guard_memo_digest_tool" = "shasum" ]; then
|
|
289
|
+
shasum -a 256 2>/dev/null
|
|
290
|
+
else
|
|
291
|
+
sha256sum 2>/dev/null
|
|
292
|
+
fi
|
|
293
|
+
)" || key=""
|
|
294
|
+
key="${key%% *}"
|
|
295
|
+
case "$key" in "" | *[!0-9a-f]*) return 0 ;; esac
|
|
296
|
+
|
|
297
|
+
# One memo file per guard per session, rewritten as the call moves on, so the
|
|
298
|
+
# state directory stays a fixed size however long a session runs. A saturated
|
|
299
|
+
# temp directory is its own outage on this fleet, and a memo scheme that grew
|
|
300
|
+
# a file per tool call would be one.
|
|
301
|
+
local memo_file="$session_dir/$guard_name.allow"
|
|
302
|
+
local recorded=""
|
|
303
|
+
if [ -f "$memo_file" ] && [ ! -L "$memo_file" ]; then
|
|
304
|
+
IFS= read -r recorded <"$memo_file" 2>/dev/null || recorded=""
|
|
305
|
+
if [ "$recorded" = "$key" ]; then
|
|
306
|
+
# A byte-identical copy of this guard already allowed this exact payload
|
|
307
|
+
# on this exact tool call. The evaluation being skipped could only have
|
|
308
|
+
# produced the verdict that was already delivered.
|
|
309
|
+
exit 0
|
|
310
|
+
fi
|
|
311
|
+
fi
|
|
312
|
+
|
|
313
|
+
lisa_guard_memo_key="$key"
|
|
314
|
+
lisa_guard_memo_file="$memo_file"
|
|
315
|
+
lisa_guard_memo_ready=1
|
|
316
|
+
return 0
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
# Record an ALLOW verdict for the other channel to replay. Installed as the
|
|
320
|
+
# guard's EXIT trap, so it covers every path the guard can leave by.
|
|
321
|
+
#
|
|
322
|
+
# Any status other than 0 writes nothing and, when a memo from an earlier call
|
|
323
|
+
# is still sitting there, removes it: a guard that refused must never leave
|
|
324
|
+
# behind something that reads as permission.
|
|
325
|
+
#
|
|
326
|
+
# $1 - the exiting status
|
|
327
|
+
lisa_guard_dedupe_record() {
|
|
328
|
+
[ "${lisa_guard_memo_ready:-0}" -eq 1 ] || return 0
|
|
329
|
+
[ -n "$lisa_guard_memo_file" ] || return 0
|
|
330
|
+
if [ "${1:-1}" -eq 0 ]; then
|
|
331
|
+
printf '%s\n' "$lisa_guard_memo_key" >"$lisa_guard_memo_file" 2>/dev/null ||
|
|
332
|
+
true
|
|
333
|
+
else
|
|
334
|
+
rm -f "$lisa_guard_memo_file" 2>/dev/null || true
|
|
335
|
+
fi
|
|
336
|
+
return 0
|
|
337
|
+
}
|
|
@@ -118,6 +118,27 @@ trap 'printf "%s\n" "Blocked by safety-net: hook failed while parsing its input;
|
|
|
118
118
|
|
|
119
119
|
input="$(cat)"
|
|
120
120
|
|
|
121
|
+
# Evaluate once per tool call when this guard is registered on both channels.
|
|
122
|
+
#
|
|
123
|
+
# Lisa reaches an agent through the repository dispatcher AND the plugin
|
|
124
|
+
# manifest, and where both are live the harness runs this guard twice for one
|
|
125
|
+
# tool call. `guard-dedupe.bash` short-circuits the second run ONLY when a
|
|
126
|
+
# byte-identical copy already ALLOWED this exact payload on this exact tool
|
|
127
|
+
# call; a differing vintage, a refusal, and a host with one channel all
|
|
128
|
+
# evaluate exactly as before. Nothing is de-registered by it
|
|
129
|
+
# (CodySwannGT/lisa#3814).
|
|
130
|
+
#
|
|
131
|
+
# Absent library means no dedupe, which is the pre-existing behaviour, so an
|
|
132
|
+
# older channel copy that predates it is unaffected.
|
|
133
|
+
lisa_guard_hook_dir="${BASH_SOURCE[0]%/*}"
|
|
134
|
+
lisa_guard_dedupe_lib="$lisa_guard_hook_dir/guard-dedupe.bash"
|
|
135
|
+
if [ -r "$lisa_guard_dedupe_lib" ]; then
|
|
136
|
+
# shellcheck source=guard-dedupe.bash
|
|
137
|
+
. "$lisa_guard_dedupe_lib"
|
|
138
|
+
trap 'lisa_guard_dedupe_record $?' EXIT
|
|
139
|
+
lisa_guard_dedupe parity-safety-net "$input"
|
|
140
|
+
fi
|
|
141
|
+
|
|
121
142
|
tool_name="$(printf '%s' "$input" | jq -r '.tool_name // empty')"
|
|
122
143
|
if [ "$tool_name" != "Bash" ]; then
|
|
123
144
|
exit 0
|
|
@@ -244,12 +265,19 @@ later with `git apply "$patch"`.
|
|
|
244
265
|
|
|
245
266
|
If the work is NOT yours -- a concurrent agent dirtied this worktree and your
|
|
246
267
|
judgement is "none of this is mine" -- that same capture is how you return the
|
|
247
|
-
tree to HEAD:
|
|
268
|
+
tree to HEAD. This block is self-contained; paste it as it stands:
|
|
248
269
|
|
|
270
|
+
patch="$(mktemp "${TMPDIR:-/tmp}/lisa-preserve-XXXXXX")"
|
|
249
271
|
git reset
|
|
250
272
|
git diff --binary HEAD > "$patch"
|
|
251
273
|
git apply -R "$patch"
|
|
252
274
|
|
|
275
|
+
It names the file itself rather than inheriting one from the block above,
|
|
276
|
+
because the two blocks are alternatives and only one of them gets run. A remedy
|
|
277
|
+
printed at the moment an agent is blocked is followed literally; one that
|
|
278
|
+
depends on a variable the reader never set fails on its first line, and the
|
|
279
|
+
guard that printed it stops being believed.
|
|
280
|
+
|
|
253
281
|
`git reset` clears staged and unmerged entries first, so the capture sees the
|
|
254
282
|
whole tree as one diff; reversing it leaves the tree at HEAD with "$patch" as
|
|
255
283
|
the record of what you discarded. Untracked files survive, exactly as they
|