@codyswann/lisa 4.87.14 → 4.88.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +13 -9
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +18 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/nightly-e2e-guard-behavior-certificate.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +66 -31
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/opencode/plugin-templates/lisa-block-direct-issue-create.ts +5 -2
- package/dist/sync/lifecycle-defaults.d.ts +1 -0
- package/dist/sync/lifecycle-defaults.d.ts.map +1 -1
- package/dist/sync/lifecycle-defaults.js +3 -0
- package/dist/sync/lifecycle-defaults.js.map +1 -1
- package/dist/sync/registry.d.ts.map +1 -1
- package/dist/sync/registry.js +6 -1
- package/dist/sync/registry.js.map +1 -1
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-agent-ready/SKILL.md +2 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +21 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-github-create/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +10 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +21 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-create/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-write-ticket/SKILL.md +10 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +22 -4
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-create/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +10 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +3 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-repair-intake/SKILL.md +29 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +50 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +51 -14
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-overruled.mjs +70 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +23 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/escalation-overruled.mjs +327 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-needed.mjs +39 -11
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +14 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/session-manager.mjs +11 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-task-decomposition/SKILL.md +2 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +5 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-build-intake/SKILL.md +6 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-create/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-write/SKILL.md +1 -1
- package/plugins/lisa/agents/learning-judge.md +20 -5
- package/plugins/lisa/hooks/block-direct-issue-create.sh +13 -9
- package/plugins/lisa/rules/reference/automation-runbook-contract.md +3 -2
- package/plugins/lisa/rules/reference/config-resolution.md +3 -1
- package/plugins/lisa/rules/reference/ready-role-filing.md +56 -5
- package/plugins/lisa/scripts/human-gate-act.mjs +182 -0
- package/plugins/lisa/scripts/human-gate-lift.mjs +141 -0
- package/plugins/lisa/scripts/intake-blocker-reprobe.mjs +319 -5
- package/plugins/lisa/skills/lisa-agent-ready/SKILL.md +2 -2
- package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +21 -3
- package/plugins/lisa/skills/lisa-github-create/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +10 -2
- package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +21 -3
- package/plugins/lisa/skills/lisa-jira-create/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-jira-write-ticket/SKILL.md +10 -2
- package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +22 -4
- package/plugins/lisa/skills/lisa-linear-create/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +10 -2
- package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +3 -2
- package/plugins/lisa/skills/lisa-repair-intake/SKILL.md +29 -2
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +50 -5
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +51 -14
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-overruled.mjs +70 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +23 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/escalation-overruled.mjs +327 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/human-needed.mjs +39 -11
- package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +14 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/session-manager.mjs +11 -1
- package/plugins/lisa/skills/lisa-task-decomposition/SKILL.md +2 -1
- package/plugins/lisa/skills/lisa-track/SKILL.md +5 -5
- package/plugins/lisa/skills/lisa-tracker-build-intake/SKILL.md +6 -0
- package/plugins/lisa/skills/lisa-tracker-create/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-tracker-write/SKILL.md +1 -1
- package/plugins/lisa-agy/agents/learning-judge.md +20 -5
- package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +13 -9
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/human-gate-act.mjs +182 -0
- package/plugins/lisa-agy/scripts/human-gate-lift.mjs +141 -0
- package/plugins/lisa-agy/scripts/intake-blocker-reprobe.mjs +319 -5
- package/plugins/lisa-agy/skills/lisa-agent-ready/SKILL.md +2 -2
- package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +21 -3
- package/plugins/lisa-agy/skills/lisa-github-create/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +10 -2
- package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +21 -3
- package/plugins/lisa-agy/skills/lisa-jira-create/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-jira-write-ticket/SKILL.md +10 -2
- package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +22 -4
- package/plugins/lisa-agy/skills/lisa-linear-create/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +10 -2
- package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +3 -2
- package/plugins/lisa-agy/skills/lisa-repair-intake/SKILL.md +29 -2
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +50 -5
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +51 -14
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-overruled.mjs +70 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +23 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/escalation-overruled.mjs +327 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-needed.mjs +39 -11
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +14 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/session-manager.mjs +11 -1
- package/plugins/lisa-agy/skills/lisa-task-decomposition/SKILL.md +2 -1
- package/plugins/lisa-agy/skills/lisa-track/SKILL.md +5 -5
- package/plugins/lisa-agy/skills/lisa-tracker-build-intake/SKILL.md +6 -0
- package/plugins/lisa-agy/skills/lisa-tracker-create/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-tracker-write/SKILL.md +1 -1
- 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-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/agents/learning-judge.agent.md +20 -5
- package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +13 -9
- package/plugins/lisa-copilot/rules/reference/automation-runbook-contract.md +3 -2
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +3 -1
- package/plugins/lisa-copilot/rules/reference/ready-role-filing.md +56 -5
- package/plugins/lisa-copilot/scripts/human-gate-act.mjs +182 -0
- package/plugins/lisa-copilot/scripts/human-gate-lift.mjs +141 -0
- package/plugins/lisa-copilot/scripts/intake-blocker-reprobe.mjs +319 -5
- package/plugins/lisa-copilot/skills/lisa-agent-ready/SKILL.md +2 -2
- package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +21 -3
- package/plugins/lisa-copilot/skills/lisa-github-create/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +10 -2
- package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +21 -3
- package/plugins/lisa-copilot/skills/lisa-jira-create/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-jira-write-ticket/SKILL.md +10 -2
- package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +22 -4
- package/plugins/lisa-copilot/skills/lisa-linear-create/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +10 -2
- package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +3 -2
- package/plugins/lisa-copilot/skills/lisa-repair-intake/SKILL.md +29 -2
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +50 -5
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +51 -14
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-overruled.mjs +70 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +23 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/escalation-overruled.mjs +327 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-needed.mjs +39 -11
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +14 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/session-manager.mjs +11 -1
- package/plugins/lisa-copilot/skills/lisa-task-decomposition/SKILL.md +2 -1
- package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +5 -5
- package/plugins/lisa-copilot/skills/lisa-tracker-build-intake/SKILL.md +6 -0
- package/plugins/lisa-copilot/skills/lisa-tracker-create/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-tracker-write/SKILL.md +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/agents/learning-judge.md +20 -5
- package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +13 -9
- package/plugins/lisa-cursor/rules/automation-runbook-contract-reference.mdc +3 -2
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +3 -1
- package/plugins/lisa-cursor/rules/ready-role-filing-reference.mdc +56 -5
- package/plugins/lisa-cursor/scripts/human-gate-act.mjs +182 -0
- package/plugins/lisa-cursor/scripts/human-gate-lift.mjs +141 -0
- package/plugins/lisa-cursor/scripts/intake-blocker-reprobe.mjs +319 -5
- package/plugins/lisa-cursor/skills/lisa-agent-ready/SKILL.md +2 -2
- package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +21 -3
- package/plugins/lisa-cursor/skills/lisa-github-create/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +10 -2
- package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +21 -3
- package/plugins/lisa-cursor/skills/lisa-jira-create/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-jira-write-ticket/SKILL.md +10 -2
- package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +22 -4
- package/plugins/lisa-cursor/skills/lisa-linear-create/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +10 -2
- package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +3 -2
- package/plugins/lisa-cursor/skills/lisa-repair-intake/SKILL.md +29 -2
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +50 -5
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +51 -14
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-overruled.mjs +70 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +23 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/escalation-overruled.mjs +327 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-needed.mjs +39 -11
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +14 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/session-manager.mjs +11 -1
- package/plugins/lisa-cursor/skills/lisa-task-decomposition/SKILL.md +2 -1
- package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +5 -5
- package/plugins/lisa-cursor/skills/lisa-tracker-build-intake/SKILL.md +6 -0
- package/plugins/lisa-cursor/skills/lisa-tracker-create/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-tracker-write/SKILL.md +1 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/agents/learning-judge.md +20 -5
- package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +13 -9
- package/plugins/lisa-devin/rules/reference/automation-runbook-contract.md +3 -2
- package/plugins/lisa-devin/rules/reference/config-resolution.md +3 -1
- package/plugins/lisa-devin/rules/reference/ready-role-filing.md +56 -5
- package/plugins/lisa-devin/scripts/human-gate-act.mjs +182 -0
- package/plugins/lisa-devin/scripts/human-gate-lift.mjs +141 -0
- package/plugins/lisa-devin/scripts/intake-blocker-reprobe.mjs +319 -5
- package/plugins/lisa-devin/skills/lisa-agent-ready/SKILL.md +2 -2
- package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +21 -3
- package/plugins/lisa-devin/skills/lisa-github-create/SKILL.md +1 -1
- package/plugins/lisa-devin/skills/lisa-github-write-issue/SKILL.md +10 -2
- package/plugins/lisa-devin/skills/lisa-jira-build-intake/SKILL.md +21 -3
- package/plugins/lisa-devin/skills/lisa-jira-create/SKILL.md +1 -1
- package/plugins/lisa-devin/skills/lisa-jira-write-ticket/SKILL.md +10 -2
- package/plugins/lisa-devin/skills/lisa-linear-build-intake/SKILL.md +22 -4
- package/plugins/lisa-devin/skills/lisa-linear-create/SKILL.md +1 -1
- package/plugins/lisa-devin/skills/lisa-linear-write-issue/SKILL.md +10 -2
- package/plugins/lisa-devin/skills/lisa-persist-learning/SKILL.md +3 -2
- package/plugins/lisa-devin/skills/lisa-repair-intake/SKILL.md +29 -2
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +50 -5
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +51 -14
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-overruled.mjs +70 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +23 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/escalation-overruled.mjs +327 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-needed.mjs +39 -11
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +14 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/session-manager.mjs +11 -1
- package/plugins/lisa-devin/skills/lisa-task-decomposition/SKILL.md +2 -1
- package/plugins/lisa-devin/skills/lisa-track/SKILL.md +5 -5
- package/plugins/lisa-devin/skills/lisa-tracker-build-intake/SKILL.md +6 -0
- package/plugins/lisa-devin/skills/lisa-tracker-create/SKILL.md +1 -1
- package/plugins/lisa-devin/skills/lisa-tracker-write/SKILL.md +1 -1
- 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-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-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-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- 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-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-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-openclaw-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.devin-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-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- 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-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-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/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/agents/learning-judge.md +20 -5
- package/plugins/src/base/hooks/block-direct-issue-create.sh +13 -9
- package/plugins/src/base/rules/reference/automation-runbook-contract.md +3 -2
- package/plugins/src/base/rules/reference/config-resolution.md +3 -1
- package/plugins/src/base/rules/reference/ready-role-filing.md +56 -5
- package/plugins/src/base/scripts/human-gate-act.mjs +182 -0
- package/plugins/src/base/scripts/human-gate-lift.mjs +141 -0
- package/plugins/src/base/scripts/intake-blocker-reprobe.mjs +319 -5
- package/plugins/src/base/skills/lisa-agent-ready/SKILL.md +2 -2
- package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +21 -3
- package/plugins/src/base/skills/lisa-github-create/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +10 -2
- package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +21 -3
- package/plugins/src/base/skills/lisa-jira-create/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-jira-write-ticket/SKILL.md +10 -2
- package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +22 -4
- package/plugins/src/base/skills/lisa-linear-create/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +10 -2
- package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +3 -2
- package/plugins/src/base/skills/lisa-repair-intake/SKILL.md +29 -2
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +50 -5
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +51 -14
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-overruled.mjs +70 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +23 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/escalation-overruled.mjs +327 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/human-needed.mjs +39 -11
- package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +14 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/session-manager.mjs +11 -1
- package/plugins/src/base/skills/lisa-task-decomposition/SKILL.md +2 -1
- package/plugins/src/base/skills/lisa-track/SKILL.md +5 -5
- package/plugins/src/base/skills/lisa-tracker-build-intake/SKILL.md +6 -0
- package/plugins/src/base/skills/lisa-tracker-create/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-tracker-write/SKILL.md +1 -1
|
@@ -30,7 +30,7 @@ Each candidate you evaluate is a single object:
|
|
|
30
30
|
| `evidence_links[]` | string[] | Concrete evidence URLs/refs available for citation (failure logs, rejection comments, prior incidents). |
|
|
31
31
|
| `scope_hint` | `project` \| `upstream` | The submitter's guess at where the learning belongs. A hint only — attribution below decides. |
|
|
32
32
|
| `triggering_issue` | string | The issue/work item whose failure produced this candidate. |
|
|
33
|
-
| `signal` | `planning-miss` \| absent |
|
|
33
|
+
| `signal` | `planning-miss` \| `wrongly-escalated` \| absent | `planning-miss`: set by a caller that saw a dispatched item stop for a human or file a new ticket mid-build (`lisa-session-manager`, `lisa-implement`); Step 2.5 decides. `wrongly-escalated`: set by `lisa-session-manager` when a human labeled an item's escalation wrong (the configured wrongly-escalated label); Step 2.6 decides. A hint only. |
|
|
34
34
|
| `fingerprint` | string | Stable dedupe key for this candidate (computed by the caller, e.g. `lisa-persist-learning`). Echo it back unchanged. |
|
|
35
35
|
|
|
36
36
|
A candidate missing `triggering_issue` or with an empty evidence set can still be evaluated — but it can never reach `durable-learning`, because the mandatory citations below would be impossible.
|
|
@@ -62,19 +62,33 @@ A missing, ambiguous, contradictory or undecided requirement is not always a one
|
|
|
62
62
|
|
|
63
63
|
1. **It was dispatched.** The item had passed the ready gate — it was in the ready role and was picked up for dispatch — claimed by a worker, or held by the dispatcher while routing it to a repository (a `repo-route` hold: the item is past the ready gate and mid-dispatch, and `repo-scope-split` at decomposition should have made the route unambiguous) — before the gap surfaced. Cite the claim, the dispatch, or the ready-role history. A gap found at PRD intake, during validation, or before the ready flip is the gate **working**: that is `misunderstanding/spec-gap`.
|
|
64
64
|
2. **The information really was missing.** Quote what the worker could not find, and confirm it is absent from the item and the links it resolves. If the answer was on the item and the worker misread it, it is `misunderstanding/spec-gap` (the worker's defect, not planning's).
|
|
65
|
-
3. **It is not environmental or planned.** An outage, an expired credential, a flaky tool, missing tool access (`tool-access-gate`), or a decision planning **flagged as a human gate** on the item (`human_gate`, `[lisa-human-gate]`) is not a planning miss: asking there was the plan working. Neither is an item that exhausted its attempts.
|
|
65
|
+
3. **It is not environmental or planned.** An outage, an expired credential, a flaky tool, missing tool access (`tool-access-gate`), or a decision planning **flagged as a human gate** on the item (`human_gate`, `[lisa-human-gate]`) is not a planning miss: asking there was the plan working. Neither is an item that exhausted its attempts. The one exception is a flagged gate a human has since **labeled wrongly escalated**: that is Step 2.6, and this exclusion does not apply to it.
|
|
66
66
|
4. **A planning check would have caught it.** This is Step 2's prevention question, asked of planning instead of the build. Name the stage that should have caught it — `prd` (the requirement was never decided), `decomposition` (the work was mis-scoped, mis-split, or depended on something nobody filed, including a leaf the router could not place in one repo per `repo-scope-split`), or `ready-gate` (the item looked ready but S18 should have asked the question) — and re-walk it: with the check in force, the item would not have reached Ready with this gap.
|
|
67
67
|
|
|
68
68
|
**The rule is the check planning should have run, never the answer.** Rewrite the candidate's `rule` as `Planning (<stage>): <check>` — e.g. `Planning (decomposition): an export ticket must name its report format before it is Ready.` — never `Exports use CSV.`, which only answers the one ticket and belongs on the item. A rule that only makes sense for this one item is not a check: drop it as `misunderstanding/spec-gap`. The `why` names the stage that let it through and quotes what the worker could not find. The prefix is load-bearing: planning skills select these entries from the bounded projection by it (`lisa-task-decomposition` step 0).
|
|
69
69
|
|
|
70
70
|
**Recurrence never blocks a first occurrence.** A first-occurrence planning miss persists at `low` confidence, so its persistence PR waits for a human to merge it. That is a deliberate, bounded exception to Step 2's recurrence requirement. The hostile default exists because a plausible-but-wrong rule would reach every future session unattended; a `low` rule never does, because a human reads it at the gate first. Meanwhile the signal is unusually strong and unusually rare: each occurrence already cost the human interruption the gate exists to prevent, so waiting for a second occurrence costs a second interruption and teaches nothing new. And the rule only adds a check to planning — a wrong one costs a planning question, not changed build behaviour. With recurrence evidence (another dispatched item that stopped on the same class of gap), Step 4 may grant `high`.
|
|
71
71
|
|
|
72
|
+
### Step 2.6: Overruled escalation (`signal: wrongly-escalated`)
|
|
73
|
+
|
|
74
|
+
A self-flagged human gate is the agent's own claim that a human is needed. When a human disagrees — releases the hold and applies the project's configured wrongly-escalated label (`*.labels.build.wrongly_escalated` / `jira.labels.wrongly_escalated`, default `wrongly-escalated-to-human`) — the claim has been ruled on, and the ruling is the evidence. Trusting the claim over the ruling is exactly how agents keep escalating the same way. So a candidate is a `planning-miss` at stage `filing` when **all** of these hold:
|
|
75
|
+
|
|
76
|
+
1. **The ruling is on the item.** Cite the label on the item (the candidate's `triggering_issue`, or the `[lisa-escalation-overruled]` capture comment). Who applied it does not matter: the label is a classification, not a release, so it needs no release authorization, and an automation identity applying it at an operator's direction counts the same as a person.
|
|
77
|
+
2. **The item was held for a human.** Cite the hold: the `[lisa-human-gate]` marker, a hold comment, or the session manager's question comment. A label on an item that was never held is not an overruled escalation: drop it as `one-off`.
|
|
78
|
+
3. **A filing check would have kept the gate off.** Name the class of hold the human overruled (the hold reason, or what the hold asked for) and re-walk the filing with the check in force: the item would have been filed build-ready and decided by an agent. The release comment, when present, usually says this outright ("this was just a decision, make it").
|
|
79
|
+
|
|
80
|
+
Step 2.5's dispatch condition does not apply (the item was held at filing, never dispatched), and neither does its flagged-human-gate exclusion. Step 1 does not short-circuit to `lisa-upstream` merely because the `human_gate` contract is Lisa-shipped: the ruling is about this project's escalations, and the rule is this project's filing check. Hand off upstream only when the evidence shows a shipped Lisa skill **instructed** the gate for this case.
|
|
81
|
+
|
|
82
|
+
**The rule is the filing check, never the answer.** Rewrite it as `Planning (filing): <check>` — e.g. `Planning (filing): file human_gate only for an act no agent can perform (credential, spend, external account, legal sign-off); decide dispatch-order questions yourself.` — never the decision the human then made.
|
|
83
|
+
|
|
84
|
+
**Confidence.** Several labeled items whose holds share the same gap pattern are recurrence: grant `high`. A single labeled item is `low`. Either way, the persistence PR never waits for a human: the human has already ruled, at the label, and the operator's position is that humans are involved only when an agent is actually stuck. `lisa-persist-learning` merges a `wrongly-escalated` learning through the project's normal gates at either confidence; if the call was wrong, the gardener retires the rule later.
|
|
85
|
+
|
|
72
86
|
### Step 3: Classify (5-way taxonomy)
|
|
73
87
|
|
|
74
88
|
Exactly one of:
|
|
75
89
|
|
|
76
90
|
- **`durable-learning`** — both falsification questions pass with cited evidence. Disposition `persist`.
|
|
77
|
-
- **`planning-miss`** — every Step 2.5 condition holds: the item was dispatched past the ready gate, the information really was missing, the cause is not an outage, an expired credential, a flaky tool or a decision flagged as a human gate, and a named planning check would have caught it. Disposition `persist`, with `planning_stage` set and `rule` rewritten as the check.
|
|
91
|
+
- **`planning-miss`** — every Step 2.5 condition holds: the item was dispatched past the ready gate, the information really was missing, the cause is not an outage, an expired credential, a flaky tool or a decision flagged as a human gate, and a named planning check would have caught it. Or every Step 2.6 condition holds: a human labeled a held item's escalation wrong and a named filing check would have kept the gate off (`planning_stage: filing`). Disposition `persist`, with `planning_stage` set and `rule` rewritten as the check.
|
|
78
92
|
- **`one-off`** — a genuine typo, transient fluke, or single-occurrence mistake with no recurrence evidence. Disposition `drop`.
|
|
79
93
|
- **`misunderstanding/spec-gap`** — the failure traces to an ambiguous or missing requirement caught **before** the item was dispatched (the gate worked), or to information the item did hold that was misread. The fix is a better spec (raise it on the work item), not a rule. Disposition `drop`.
|
|
80
94
|
- **`lisa-upstream`** — set in Step 1. Disposition `handoff-upstream`; never persisted locally.
|
|
@@ -98,7 +112,7 @@ Return exactly one verdict object per candidate:
|
|
|
98
112
|
| `cited_evidence[]` | string[] | The concrete refs you actually relied on for this call — prevention and recurrence citations for durable; attribution citations for upstream; the decisive absence/counter-evidence for drops. Never empty. This is what makes a wrong call auditable. |
|
|
99
113
|
| `rationale` | string | 1–3 sentences readable by product, engineering, and QA alike (a non-technical operator stands at the gate). |
|
|
100
114
|
| `confidence` | `high` \| `low` | Present **only** when `classification` is `durable-learning` or `planning-miss`. |
|
|
101
|
-
| `planning_stage` | `prd` \| `decomposition` \| `ready-gate` | Present **only** when `classification` is `planning-miss`: the stage that let the gap through. |
|
|
115
|
+
| `planning_stage` | `prd` \| `decomposition` \| `ready-gate` \| `filing` | Present **only** when `classification` is `planning-miss`: the stage that let the gap through. `filing` only under Step 2.6. |
|
|
102
116
|
| `rule` | string | Present **only** when `classification` is `planning-miss`: the candidate's rule rewritten as the `Planning (<stage>): <check>` check, within the contract's caps. The caller persists this text, not the submitted one. |
|
|
103
117
|
| `disposition` | `persist` \| `drop` \| `handoff-upstream` | `persist` iff durable-learning or planning-miss; `handoff-upstream` iff lisa-upstream; otherwise `drop`. |
|
|
104
118
|
|
|
@@ -120,9 +134,10 @@ Also echo back the candidate's `fingerprint` and `triggering_issue` so the calle
|
|
|
120
134
|
| Prevention (would the rule have prevented it?) | yes/no | [refs] |
|
|
121
135
|
| Recurrence (does the class recur?) | yes/no | [refs] |
|
|
122
136
|
| Planning miss (dispatched, really missing, not environmental or a flagged gate, planning check named) | yes/no/n-a | [refs] |
|
|
137
|
+
| Overruled escalation (wrongly-escalated label on a held item, filing check named) | yes/no/n-a | [refs] |
|
|
123
138
|
|
|
124
139
|
**Classification**: durable-learning | planning-miss | one-off | misunderstanding/spec-gap | lisa-upstream
|
|
125
|
-
**Planning stage**: prd | decomposition | ready-gate (planning-miss only)
|
|
140
|
+
**Planning stage**: prd | decomposition | ready-gate | filing (planning-miss only)
|
|
126
141
|
**Rule**: Planning (<stage>): <check> (planning-miss only — the rewritten rule the caller persists)
|
|
127
142
|
**Confidence**: high | low (durable-learning and planning-miss only)
|
|
128
143
|
**Disposition**: persist | drop | handoff-upstream
|
|
@@ -464,15 +464,19 @@ FILE IT THE SANCTIONED WAY — one of these three, always explicit:
|
|
|
464
464
|
write, and claims it. Complete means the \`work-item-definition-of-ready\`
|
|
465
465
|
bar — reproduction, observed-versus-expected, Gherkin acceptance criteria.
|
|
466
466
|
|
|
467
|
-
2. A
|
|
468
|
-
|
|
467
|
+
2. A person must perform an act an agent cannot: supply a credential only
|
|
468
|
+
they hold, approve spend, open an external account, give a legal or
|
|
469
|
+
compliance sign-off, or act in a system the agent cannot reach. A choice
|
|
470
|
+
with a reasonable default is NOT that: decide it, record the decision on
|
|
471
|
+
the item, and use 1. Otherwise route the same way but pass
|
|
472
|
+
\`human_gate: "<the act a person must perform>"\` in place of
|
|
469
473
|
\`build_ready: true\` — the two are mutually exclusive. The leaf is filed
|
|
470
474
|
into the default backlog role, outside the lane build-intake claims from,
|
|
471
475
|
and is deliberately NOT claimed, so it keeps attracting the human attention
|
|
472
476
|
it was filed for. The hold is stamped so it is auditable rather than
|
|
473
477
|
indistinguishable from an accident:
|
|
474
478
|
|
|
475
|
-
Held for a
|
|
479
|
+
Held for a person to <act>: <reason>.
|
|
476
480
|
<!-- [lisa-human-gate] reason=<short-slug> -->
|
|
477
481
|
|
|
478
482
|
3. The item is a CONTAINER — an Epic, or any item whose state rolls up from
|
|
@@ -499,8 +503,8 @@ declarations itself:
|
|
|
499
503
|
|
|
500
504
|
$(declaration_hint)
|
|
501
505
|
|
|
502
|
-
Or a \`[lisa-human-gate]\` marker in the body it submits, when a
|
|
503
|
-
|
|
506
|
+
Or a \`[lisa-human-gate]\` marker in the body it submits, when a person
|
|
507
|
+
really must perform an act an agent cannot.
|
|
504
508
|
|
|
505
509
|
Or, for a container, \`None — container: state rolls up from children\` in
|
|
506
510
|
that body, and no by-design leaf type on the command.
|
|
@@ -561,11 +565,11 @@ FILE IT THE SANCTIONED WAY:
|
|
|
561
565
|
|
|
562
566
|
DO NOT reach for \`[lisa-human-gate]\` to get past this one. It still satisfies
|
|
563
567
|
the guard — it is a real declaration — but on an upstream defect report it is a
|
|
564
|
-
false one: it stamps the item as held for a
|
|
568
|
+
false one: it stamps the item as held for a person, and the
|
|
565
569
|
target's build queue scans the ready role and nothing else. The report is filed
|
|
566
570
|
and never picked up, which is the incomplete handoff this guard exists to
|
|
567
|
-
prevent, committed one repository over. Use it only when a
|
|
568
|
-
|
|
571
|
+
prevent, committed one repository over. Use it only when a person must genuinely
|
|
572
|
+
perform an act an agent cannot on the target.
|
|
569
573
|
|
|
570
574
|
OPERATOR ESCAPE: a human can export \`LISA_ALLOW_DIRECT_ISSUE_CREATE=1\` in the
|
|
571
575
|
environment before starting the session. It is deliberately not reachable by
|
|
@@ -985,7 +989,7 @@ def payload_is_inert(text):
|
|
|
985
989
|
#
|
|
986
990
|
# So on a Linear-tracked project the only declaration left that passed was
|
|
987
991
|
# `[lisa-human-gate]`, which this file's own comments correctly forbid for a
|
|
988
|
-
# build-ready item: it stamps the item as held for a
|
|
992
|
+
# build-ready item: it stamps the item as held for a person, and
|
|
989
993
|
# build-intake scans the ready role and nothing else. An honest operator had NO
|
|
990
994
|
# compliant command and exactly one dishonest one — a guard failing in the
|
|
991
995
|
# harmful direction, where complying is worse than not.
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* What a `human_gate` must name: an ACT an agent cannot perform.
|
|
4
|
+
*
|
|
5
|
+
* The filing contract used to define a human gate as "a human product call is
|
|
6
|
+
* pending". Almost any open choice reads as a product call, so agents followed
|
|
7
|
+
* the contract to the letter and held plain decisions for a person — which name
|
|
8
|
+
* to use, how to classify existing state, when to dispatch a follow-up — and
|
|
9
|
+
* the person's answer was nearly always "you decide" (CodySwannGT/lisa#4658).
|
|
10
|
+
* A hold costs an operator interruption and stalls the work until someone
|
|
11
|
+
* notices, so a hold that only names a topic is worse than no hold at all.
|
|
12
|
+
*
|
|
13
|
+
* This module is the one answer to "is this a legitimate gate?". A reason is
|
|
14
|
+
* legitimate only when it names one of the acts below, or a decision class the
|
|
15
|
+
* project has explicitly declared human-only in `.lisa.config.json`
|
|
16
|
+
* (`humanGate.humanOnly`). Anything else is a decision: the agent picks the
|
|
17
|
+
* reasonable default, records it on the item, and files it build-ready.
|
|
18
|
+
*
|
|
19
|
+
* Refusal is the default, deliberately. A closed vocabulary of acts can be
|
|
20
|
+
* audited; an open vocabulary of "topics that feel important" is exactly the
|
|
21
|
+
* reading that produced the false gates.
|
|
22
|
+
*
|
|
23
|
+
* The same classifier runs on both ends:
|
|
24
|
+
* - the writers call the CLI below before stamping a hold, and refuse a
|
|
25
|
+
* topic-only reason with {@link DECIDE_AND_RECORD};
|
|
26
|
+
* - the intake sweeps call `planHumanGateLift` in `human-gate-lift.mjs`,
|
|
27
|
+
* which uses it to lift holds filed under the old wording.
|
|
28
|
+
*
|
|
29
|
+
* Usage:
|
|
30
|
+
* node human-gate-act.mjs check --reason "<human_gate reason>" \
|
|
31
|
+
* [--config .lisa.config.json] [--local .lisa.config.local.json]
|
|
32
|
+
* Prints a JSON verdict. Exit 0 when the gate is legitimate, 1 when refused,
|
|
33
|
+
* 2 on a usage or config error.
|
|
34
|
+
* @module human-gate-act
|
|
35
|
+
*/
|
|
36
|
+
import { readFileSync, realpathSync } from "node:fs";
|
|
37
|
+
import { fileURLToPath } from "node:url";
|
|
38
|
+
|
|
39
|
+
import {
|
|
40
|
+
DECIDE_AND_RECORD,
|
|
41
|
+
HUMAN_GATE_ACTS,
|
|
42
|
+
classifyHumanGateReason,
|
|
43
|
+
normalizeGateText,
|
|
44
|
+
} from "./intake-blocker-reprobe.mjs";
|
|
45
|
+
|
|
46
|
+
// The classifier lives in `intake-blocker-reprobe.mjs` so the hold verdict
|
|
47
|
+
// can use it without a new import edge there: the npm updater authenticates
|
|
48
|
+
// that file's import graph as a fixed inventory. This module re-exports it
|
|
49
|
+
// and adds the writer-side CLI and config resolution.
|
|
50
|
+
export {
|
|
51
|
+
DECIDE_AND_RECORD,
|
|
52
|
+
HUMAN_GATE_ACTS,
|
|
53
|
+
classifyHumanGateReason,
|
|
54
|
+
normalizeGateText,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Render the visible hold line plus marker a writer stamps for a valid gate.
|
|
59
|
+
* @param {{ reason?: unknown, slug?: unknown, label?: unknown }} hold - The
|
|
60
|
+
* reason, its short slug, and the act label from the verdict
|
|
61
|
+
* @returns {string} Two lines: the visible statement and the marker
|
|
62
|
+
*/
|
|
63
|
+
export function formatHumanGateHold(hold = {}) {
|
|
64
|
+
const reason = String(hold.reason ?? "").trim();
|
|
65
|
+
const slug = String(hold.slug ?? "").trim();
|
|
66
|
+
const label = String(hold.label ?? "").trim() || "act on this";
|
|
67
|
+
const marker =
|
|
68
|
+
slug.length > 0
|
|
69
|
+
? `<!-- [lisa-human-gate] reason=${slug} -->`
|
|
70
|
+
: "<!-- [lisa-human-gate] -->";
|
|
71
|
+
return [`Held for a person to ${label}: ${reason}.`, marker].join("\n");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Read `humanGate.humanOnly` from local then global config.
|
|
76
|
+
* @param {string} file - Config path
|
|
77
|
+
* @returns {{ value: unknown, error: string | undefined }} Parse result
|
|
78
|
+
*/
|
|
79
|
+
function readConfig(file) {
|
|
80
|
+
let raw;
|
|
81
|
+
try {
|
|
82
|
+
raw = readFileSync(file, "utf8");
|
|
83
|
+
} catch {
|
|
84
|
+
return { value: undefined, error: undefined };
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
return { value: JSON.parse(raw), error: undefined };
|
|
88
|
+
} catch (cause) {
|
|
89
|
+
return { value: undefined, error: `${file} is not valid JSON: ${cause}` };
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The effective human-only classes: local override replaces global when set.
|
|
95
|
+
* @param {unknown} local - Parsed local config
|
|
96
|
+
* @param {unknown} global - Parsed global config
|
|
97
|
+
* @returns {unknown[]} Declared classes
|
|
98
|
+
*/
|
|
99
|
+
export function resolveHumanOnly(local, global) {
|
|
100
|
+
const pick = config =>
|
|
101
|
+
config && typeof config === "object"
|
|
102
|
+
? config.humanGate?.humanOnly
|
|
103
|
+
: undefined;
|
|
104
|
+
const value = pick(local) ?? pick(global);
|
|
105
|
+
return Array.isArray(value) ? value : [];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Parse `--key value` / `--key=value` flags.
|
|
110
|
+
* @param {string[]} argv - Raw arguments
|
|
111
|
+
* @returns {Record<string, string | null>} Flags; null marks a missing operand
|
|
112
|
+
*/
|
|
113
|
+
function parseFlags(argv) {
|
|
114
|
+
const out = {};
|
|
115
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
116
|
+
const token = argv[index];
|
|
117
|
+
if (!token.startsWith("--")) continue;
|
|
118
|
+
const eq = token.indexOf("=");
|
|
119
|
+
if (eq !== -1) {
|
|
120
|
+
out[token.slice(2, eq)] = token.slice(eq + 1);
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const next = argv[index + 1];
|
|
124
|
+
if (next !== undefined && !next.startsWith("--")) {
|
|
125
|
+
out[token.slice(2)] = next;
|
|
126
|
+
index += 1;
|
|
127
|
+
} else {
|
|
128
|
+
// A flag with no operand is recorded as missing, never as the string
|
|
129
|
+
// "true": a reason of "true" would read as a refused gate, and a config
|
|
130
|
+
// path of "true" would silently drop the project's humanOnly classes.
|
|
131
|
+
out[token.slice(2)] = null;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return out;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* CLI entry point.
|
|
139
|
+
* @param {string[]} argv - Arguments after the script name
|
|
140
|
+
* @param {{ write?: (text: string) => void, error?: (text: string) => void }} [io] - Output sinks
|
|
141
|
+
* @returns {number} Exit code: 0 legitimate, 1 refused, 2 usage/config error
|
|
142
|
+
*/
|
|
143
|
+
export function main(argv, io = {}) {
|
|
144
|
+
const write = io.write ?? (text => process.stdout.write(text));
|
|
145
|
+
const error = io.error ?? (text => process.stderr.write(text));
|
|
146
|
+
const [command, ...rest] = argv;
|
|
147
|
+
const flags = parseFlags(rest);
|
|
148
|
+
const missing = ["reason", "config", "local"].filter(
|
|
149
|
+
key => key in flags && (flags[key] === null || flags[key].trim() === "")
|
|
150
|
+
);
|
|
151
|
+
if (command !== "check" || !flags.reason || missing.length > 0) {
|
|
152
|
+
error(
|
|
153
|
+
"usage: human-gate-act.mjs check --reason <text> [--config <path>] [--local <path>]\n"
|
|
154
|
+
);
|
|
155
|
+
return 2;
|
|
156
|
+
}
|
|
157
|
+
const local = readConfig(flags.local ?? ".lisa.config.local.json");
|
|
158
|
+
const global = readConfig(flags.config ?? ".lisa.config.json");
|
|
159
|
+
const failed = [local, global].find(parsed => parsed.error);
|
|
160
|
+
if (failed) {
|
|
161
|
+
error(`${failed.error}\n`);
|
|
162
|
+
return 2;
|
|
163
|
+
}
|
|
164
|
+
const verdict = classifyHumanGateReason(flags.reason, {
|
|
165
|
+
humanOnly: resolveHumanOnly(local.value, global.value),
|
|
166
|
+
});
|
|
167
|
+
write(`${JSON.stringify(verdict)}\n`);
|
|
168
|
+
return verdict.valid ? 0 : 1;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const invokedDirectly = (() => {
|
|
172
|
+
try {
|
|
173
|
+
return (
|
|
174
|
+
realpathSync(process.argv[1] ?? "") ===
|
|
175
|
+
realpathSync(fileURLToPath(import.meta.url))
|
|
176
|
+
);
|
|
177
|
+
} catch {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
})();
|
|
181
|
+
|
|
182
|
+
if (invokedDirectly) process.exit(main(process.argv.slice(2)));
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lift holds that were never valid, with no person involved.
|
|
3
|
+
*
|
|
4
|
+
* Holds filed under the old "a human product call is pending" wording keep
|
|
5
|
+
* stalling items, and the operator should never have to comment to release
|
|
6
|
+
* one (CodySwannGT/lisa#4658, item 5). The intake and repair sweeps call
|
|
7
|
+
* {@link planHumanGateLift} on every open item carrying a `[lisa-human-gate]`
|
|
8
|
+
* hold. A hold whose reason names no act an agent cannot perform (see
|
|
9
|
+
* `human-gate-act.mjs`) is lifted: the sweep posts a visible
|
|
10
|
+
* `[lisa-human-gate-lifted] reason=<slug>` comment saying why, removes the
|
|
11
|
+
* human-needed marker, and moves the item to the build-ready role.
|
|
12
|
+
*
|
|
13
|
+
* This is not a forged human release. A release records a person's answer; a
|
|
14
|
+
* lift records that there was no question a person had to answer. A valid
|
|
15
|
+
* hold — a credential, spend, a sign-off — is never lifted and still waits for
|
|
16
|
+
* its act. A label-only hold (access blocked, a blocked verdict) has no
|
|
17
|
+
* declared reason to judge and is never lifted either.
|
|
18
|
+
* @module human-gate-lift
|
|
19
|
+
*/
|
|
20
|
+
import {
|
|
21
|
+
HUMAN_GATE_LIFTED_MARKER,
|
|
22
|
+
humanGateVerdict,
|
|
23
|
+
invalidHumanGateHolds,
|
|
24
|
+
planHumanGateRelease,
|
|
25
|
+
} from "./intake-blocker-reprobe.mjs";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Render the lift comment for one invalid hold.
|
|
29
|
+
*
|
|
30
|
+
* The first line is the declaration the verdict reads; the rest is for a
|
|
31
|
+
* non-technical operator, who is who reads this.
|
|
32
|
+
* @param {{ reason?: unknown }} lift - The hold's reason key
|
|
33
|
+
* @returns {string} Comment body
|
|
34
|
+
*/
|
|
35
|
+
export function formatHumanGateLift(lift = {}) {
|
|
36
|
+
const reason = String(lift.reason ?? "").trim();
|
|
37
|
+
const declaration =
|
|
38
|
+
reason.length > 0
|
|
39
|
+
? `${HUMAN_GATE_LIFTED_MARKER} reason=${reason}`
|
|
40
|
+
: HUMAN_GATE_LIFTED_MARKER;
|
|
41
|
+
const named = reason.length > 0 ? `"${reason}"` : "this hold";
|
|
42
|
+
return [
|
|
43
|
+
declaration,
|
|
44
|
+
`Hold lifted: ${named} is a decision an agent can make, not an act only a ` +
|
|
45
|
+
"person can perform (a credential, spend, an external account, a legal " +
|
|
46
|
+
"sign-off, or a system the agent cannot reach), so this item is back in " +
|
|
47
|
+
"the build queue and whoever builds it decides and records the call; " +
|
|
48
|
+
"the description is unchanged.",
|
|
49
|
+
].join("\n");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Plan the lift for one item.
|
|
54
|
+
*
|
|
55
|
+
* Idempotent by state: a reason already lifted gets no second comment, and an
|
|
56
|
+
* item already moved needs no label writes. Label actions are computed as if
|
|
57
|
+
* the planned comments were already posted, by the same release planner the
|
|
58
|
+
* human-release path uses, so the lane rules (never drag an item that has moved
|
|
59
|
+
* on back to the queue) are shared rather than restated.
|
|
60
|
+
* @param {{
|
|
61
|
+
* labels?: unknown
|
|
62
|
+
* body?: unknown
|
|
63
|
+
* comments?: unknown
|
|
64
|
+
* trustedHumanActorIds?: unknown
|
|
65
|
+
* humanNeededLabel?: unknown
|
|
66
|
+
* humanOnly?: unknown
|
|
67
|
+
* readyLabel?: unknown
|
|
68
|
+
* lifecycleLabels?: unknown
|
|
69
|
+
* }} input - Candidate surfaces plus lane vocabulary and project policy
|
|
70
|
+
* @returns {{ lift: boolean, reason: string, lifted: string[], kept: string[], comments: string[], actions: { removeHumanNeededLabel: boolean, addReadyLabel: string | null } }} Lift plan
|
|
71
|
+
*/
|
|
72
|
+
export function planHumanGateLift(input = {}) {
|
|
73
|
+
const idle = Object.freeze({
|
|
74
|
+
removeHumanNeededLabel: false,
|
|
75
|
+
addReadyLabel: null,
|
|
76
|
+
});
|
|
77
|
+
const verdict = humanGateVerdict(input);
|
|
78
|
+
const liftable = new Set(invalidHumanGateHolds(input.body, input.humanOnly));
|
|
79
|
+
const toLift = verdict.outstanding.filter(reason => liftable.has(reason));
|
|
80
|
+
const kept = verdict.outstanding.filter(reason => !toLift.includes(reason));
|
|
81
|
+
const comments = toLift.map(reason => formatHumanGateLift({ reason }));
|
|
82
|
+
|
|
83
|
+
// Nothing new to lift and something still held: an earlier partial lift is
|
|
84
|
+
// history, not news, so a later cycle must not report the item again.
|
|
85
|
+
if (toLift.length === 0 && (verdict.lifted.length === 0 || kept.length > 0)) {
|
|
86
|
+
return {
|
|
87
|
+
lift: false,
|
|
88
|
+
reason: kept.length > 0 ? "hold-valid" : "nothing-to-lift",
|
|
89
|
+
lifted: [],
|
|
90
|
+
kept,
|
|
91
|
+
comments: [],
|
|
92
|
+
actions: idle,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
if (kept.length > 0) {
|
|
96
|
+
return {
|
|
97
|
+
lift: true,
|
|
98
|
+
reason: "partial-lift",
|
|
99
|
+
lifted: toLift,
|
|
100
|
+
kept,
|
|
101
|
+
comments,
|
|
102
|
+
actions: idle,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const prior = Array.isArray(input.comments) ? input.comments : [];
|
|
107
|
+
const release = planHumanGateRelease({
|
|
108
|
+
...input,
|
|
109
|
+
comments: [...prior, ...comments.map(body => ({ body }))],
|
|
110
|
+
alreadyNotified: true,
|
|
111
|
+
});
|
|
112
|
+
const actions = {
|
|
113
|
+
removeHumanNeededLabel: release.actions.removeHumanNeededLabel,
|
|
114
|
+
addReadyLabel: release.actions.addReadyLabel,
|
|
115
|
+
};
|
|
116
|
+
const changed =
|
|
117
|
+
comments.length > 0 ||
|
|
118
|
+
actions.removeHumanNeededLabel ||
|
|
119
|
+
actions.addReadyLabel !== null;
|
|
120
|
+
return {
|
|
121
|
+
lift: true,
|
|
122
|
+
reason: changed ? "lift" : "already-lifted",
|
|
123
|
+
lifted: toLift,
|
|
124
|
+
kept: [],
|
|
125
|
+
comments,
|
|
126
|
+
actions,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Render the cycle-summary line naming what was lifted, printed even at zero.
|
|
132
|
+
* @param {readonly unknown[]} lifted - Item references lifted this cycle
|
|
133
|
+
* @returns {string} One summary line
|
|
134
|
+
*/
|
|
135
|
+
export function summarizeHumanGateLifts(lifted = []) {
|
|
136
|
+
const names = (Array.isArray(lifted) ? lifted : [])
|
|
137
|
+
.map(item => (typeof item === "string" ? item.trim() : ""))
|
|
138
|
+
.filter(name => name.length > 0);
|
|
139
|
+
if (names.length === 0) return "Invalid holds lifted: none.";
|
|
140
|
+
return `Invalid holds lifted (${String(names.length)}): ${names.join(", ")}.`;
|
|
141
|
+
}
|