@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
|
@@ -279,6 +279,7 @@ fi
|
|
|
279
279
|
| `learnings.file` | no | `.lisa/PROJECT_LEARNINGS.md` | Safe repo-relative Markdown path for the machine-managed learnings ledger, overriding the `.lisa/` default. Rejected if it resolves inside any auto-loaded rules tree (`.claude/rules`, `.cursor/rules`, `.github/instructions`, `.agents/rules`) — the ledger must stay out of eager context. |
|
|
280
280
|
| `health.schedule` | no | `off` | Health cadence contract: `off`, `daily`, or `weekly`. `lisa sync` populates the default with `_lisaSync.populated` provenance and rejects values outside this closed vocabulary. Runtime results live only at the gitignored `.lisa/health/latest.json`, never in either config file. |
|
|
281
281
|
| `usage` | no | — | Optional token/cost pricing metadata consumed by the `usage-accounting` rule. Missing pricing never blocks a lifecycle flow; Lisa records token counts with `estimated_cost: null` when no trustworthy price source is configured. |
|
|
282
|
+
| `humanGate.humanOnly` | no | `[]` | Decision classes this project reserves for a person, such as `["pricing"]`. A `human_gate` reason naming one (as a whole word) is accepted by the writers and never lifted by the sweeps. Absent, only acts an agent cannot perform qualify as a human gate. `.lisa.config.local.json` replaces the list when it sets one. Read by `scripts/human-gate-act.mjs`; see `ready-role-filing`, "What a human gate is". |
|
|
282
283
|
| `wiki` | no | — | Wiki location for the `wiki-knowledge-source` rule. Omit for a local in-repo wiki (`wiki/`). See **Wiki source** below. |
|
|
283
284
|
| `sessionManager` | no | — (opt-in) | Local session manager: polls the Ready queue, runs each item in a fresh background Claude Code session, and relays questions over a per-project Telegram bot when one is configured (optional). Absent means the manager is not used; `lisa sync` never populates it. Written by `/lisa:setup:session-manager`. See **Session manager (`sessionManager`)** below. |
|
|
284
285
|
|
|
@@ -587,12 +588,13 @@ Exit `0` with a value → configured. Exit `0` with **empty** output → an opti
|
|
|
587
588
|
|
|
588
589
|
#### Build markers (additive labels, not lifecycle roles)
|
|
589
590
|
|
|
590
|
-
A **marker** is an additive label applied *alongside* a lifecycle role, not a state the item transitions *to*. Markers carry no rollup or transition semantics — they annotate an item that is already in some role, and the rollup reads them to say *which kind* of hold a `blocked` item is (`rollup-blocker-classification`). The build lifecycle defines
|
|
591
|
+
A **marker** is an additive label applied *alongside* a lifecycle role, not a state the item transitions *to*. Markers carry no rollup or transition semantics — they annotate an item that is already in some role, and the rollup reads them to say *which kind* of hold a `blocked` item is (`rollup-blocker-classification`). The build lifecycle defines three markers:
|
|
591
592
|
|
|
592
593
|
| Marker | What it means | JIRA default | GitHub/Linear default |
|
|
593
594
|
|---|---|---|---|
|
|
594
595
|
| `human_needed` | Applied with `blocked` when — **after the agent has drafted every authorable missing section via the `pre-flight-autofill` procedure** — the block still requires a human to confirm the drafted assumptions or supply something no agent can invent: real missing credentials, access/permissions, or an irreducible product/scoping decision. | `Human Needed` (label) | `human-needed` (label) |
|
|
595
596
|
| `spec_defect` | Applied with `blocked` when the thing holding the item is the item's **own specification** — an acceptance criterion that cannot be satisfied as written, a field naming an environment or surface the project does not have, a validation journey demanding something the project cannot produce. **Human-applied only.** No agent sets it, because judging a criterion unbuildable is a product call, and the agent that wrote a bad criterion is the least likely to know it did. | `Spec Defect` (label) | `blocked:spec-defect` (label) |
|
|
597
|
+
| `wrongly_escalated` | A **ruling** that an earlier escalation to a human was wrong: the hold asked a person for a decision an agent could have made. Applied by a human, or by an agent at an operator's direction — who applied it does not matter. It is a classification, not a release: it moves no lane and needs no release authorization. The session manager's overruled-escalation sweep captures each labeled item once as a `wrongly-escalated` learning candidate (CodySwannGT/lisa#4657). Resolved from `jira.labels.wrongly_escalated`, `github.labels.build.wrongly_escalated` or `linear.labels.build.wrongly_escalated`. | `wrongly-escalated-to-human` (label) | `wrongly-escalated-to-human` (label) |
|
|
596
598
|
|
|
597
599
|
Markers are labels on **every** vendor, Linear included — that is the one place the Linear build lane still touches `linear.labels`.
|
|
598
600
|
|
|
@@ -19,9 +19,11 @@ Apply `do-it-now`'s **Worth doing** guidance before deciding to file. A declined
|
|
|
19
19
|
## Every filing declares one of three things
|
|
20
20
|
|
|
21
21
|
- **`build_ready: true`** — complete enough to build; enters the ready lane for auto-pickup. Required for an accepted worthwhile defect found during other work, so it is claimable next cycle with no human flipping status.
|
|
22
|
-
- **`human_gate: "<
|
|
22
|
+
- **`human_gate: "<the act a person must perform>"`** — deliberately held outside the queue because the item needs an **act an agent cannot perform** (see "What a human gate is" below). The writer checks the reason first, refuses one that names only a topic, then stamps a visible line naming the act plus `<!-- [lisa-human-gate] reason=<short-slug> -->` so the hold is auditable.
|
|
23
23
|
- **The container declaration** — `None — container: state rolls up from children`, the canonical line `derived-branch-plan` defines and every writer stamps in place of a Target Backend Environment. A container is never build-ready (`leaf-only-lifecycle`) and needs no gate, so it declares the third thing instead. Deliberately **not** keyed on `--label type:Epic`: a declared type is a claim that costs a leaf nothing and leaves it looking buildable, where the container line costs the item the environment and Branch Plan a leaf needs to be built. It is refused alongside a by-design leaf type (`type:Bug` / `type:Task` / `type:Sub-task` / `type:Improvement`) — an item cannot be a container and a leaf at once.
|
|
24
24
|
|
|
25
|
+
**A decision is not a gate.** A choice between options with a reasonable default — what to name a role, how to classify existing state, when to dispatch a follow-up, which policy to adopt — is the agent's to make. **Decide and record:** pick the default, write the decision on the item, and file it `build_ready: true`.
|
|
26
|
+
|
|
25
27
|
Filed, not ready, and no `human_gate` is the **incomplete handoff** case — writers reject it and name both ways to resolve it. `build_ready: false` with no reason is the same omission with a value attached. `build_ready` stays subordinate to `leaf-only-lifecycle`: a container is never build-ready and needs no gate.
|
|
26
28
|
|
|
27
29
|
## The named exception
|
|
@@ -65,10 +67,10 @@ The safe direction is the implicit one. A ticket that reaches a build queue by a
|
|
|
65
67
|
A writer accepts a filing only when it carries **one** of:
|
|
66
68
|
|
|
67
69
|
- **`build_ready: true`** — the item is complete enough to build and enters the ready lane for auto-pickup. This is the correct answer for an accepted worthwhile defect found during other work.
|
|
68
|
-
- **`human_gate: "<
|
|
70
|
+
- **`human_gate: "<the act a person must perform>"`** — the item is deliberately held outside the queue because it needs an act an agent cannot perform. The writer validates the reason (see "What a human gate is" below), then stamps a visible marker naming that act so the hold is auditable rather than indistinguishable from an accident:
|
|
69
71
|
|
|
70
72
|
```text
|
|
71
|
-
Held for a
|
|
73
|
+
Held for a person to <act>: <reason>.
|
|
72
74
|
<!-- [lisa-human-gate] reason=<short-slug> -->
|
|
73
75
|
```
|
|
74
76
|
|
|
@@ -94,11 +96,60 @@ The declaration is refused alongside a **by-design leaf type** declared as a fla
|
|
|
94
96
|
|
|
95
97
|
One string, defined in one rule, read by the guard and stamped by the writers — which is what keeps this exemption from drifting back into prose only.
|
|
96
98
|
|
|
99
|
+
## What a human gate is
|
|
100
|
+
|
|
101
|
+
A human gate is for an **act an agent cannot perform**. It is not for "a pending product call": almost any open choice can be read as one, and reading it that way held plain decisions for a person whose answer was nearly always "you decide" — nine in one week in one portfolio repository, every one overruled, and three more filed hours after the operator's standing direction was recorded (CodySwannGT/lisa#4658). Each false gate costs an operator interruption and stalls the work until someone notices.
|
|
102
|
+
|
|
103
|
+
The acts that qualify:
|
|
104
|
+
|
|
105
|
+
| Act | Examples |
|
|
106
|
+
|---|---|
|
|
107
|
+
| Supply a credential only a person holds | an API key, password, private key, MFA code |
|
|
108
|
+
| Spend money | a paid plan, a purchase, budget approval |
|
|
109
|
+
| Open an external account | a vendor or provider account in a person's or the company's name |
|
|
110
|
+
| Give a legal or compliance sign-off | HIPAA/GDPR/SOC 2, a contract, approval for a protected deployment |
|
|
111
|
+
| Name an accountable person | an owner or approver who answers for the result |
|
|
112
|
+
| Act in a system the agent cannot reach | physical hardware, an on-site step, granting an access the agent lacks |
|
|
113
|
+
| A call Lisa's own policy reserves for a person | exploratory-QA findings (the named exception below), learnings promotion/demotion, harness interventions, automation retirement, a hold the operator explicitly asked for |
|
|
114
|
+
| A decision class this project declared human-only | `humanGate.humanOnly` in `.lisa.config.json` |
|
|
115
|
+
|
|
116
|
+
**Everything else is a decision.** The agent decides and records: it picks the reasonable default, writes the decision on the item (a `Decision:` line saying what was chosen and why), and files it `build_ready: true`. A reviewer who disagrees changes the item; nobody had to be interrupted first.
|
|
117
|
+
|
|
118
|
+
**The reason must name the act.** `human_gate: "role-split-triage"` names a topic and is refused; `human_gate: "the production payment-provider secret key only the founder holds"` names an act and is accepted. The check is executable, and every writer runs it before stamping a hold:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
It prints a JSON verdict and exits `0` (a legitimate gate: use its `label` in the visible line), `1` (refused: its `remedy` names the decide-and-record path, so do not file the item held), or `2` (usage or config error: stop and report). The vocabulary is closed on purpose. A list of acts can be audited; a list of "topics that feel important" is the reading that produced the false gates.
|
|
125
|
+
|
|
126
|
+
### A project can widen the gate
|
|
127
|
+
|
|
128
|
+
A project that wants a decision class to stay human-only declares it, rather than every project inheriting the widest reading:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{ "humanGate": { "humanOnly": ["pricing", "hiring"] } }
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
A reason naming a declared class (as a whole word) is accepted. `.lisa.config.local.json` replaces the list when it sets one. Nothing widens the gate implicitly.
|
|
135
|
+
|
|
136
|
+
### Existing invalid holds are lifted, with no person involved
|
|
137
|
+
|
|
138
|
+
Holds filed under the old wording keep stalling items, and an operator should never have to comment to release one. The intake and repair sweeps re-evaluate every open `[lisa-human-gate]` hold against this definition with `planHumanGateLift` (`scripts/human-gate-lift.mjs`). The sweep lifts a hold only when it is sure. Its reason slug must name only a topic, no hold-related line (any marker line, any "Held for …" line, or the line beside one) may name an act, and no secret or act token (a credential, password, MFA code, API key, token, secret, signature, BAA or contract, admin rights, access, spend, budget, payment or money, legal or compliance) may appear anywhere in that text, judged as one set. Any doubt keeps the hold: a wrongly kept hold costs one interruption, while a wrongly lifted credential hold dispatches work that cannot succeed. For a hold that passes, the sweep:
|
|
139
|
+
|
|
140
|
+
- posts a visible `[lisa-human-gate-lifted] reason=<slug>` comment explaining why;
|
|
141
|
+
- removes the `human_needed` marker label;
|
|
142
|
+
- moves the item to the build-ready role (unless it has since moved to another lifecycle lane).
|
|
143
|
+
|
|
144
|
+
This is not a forged human release. A release records a person's answer, so it must come from a trusted human. A lift records that the hold was invalid under this contract, so there is nothing for a person to authorize. Its authority comes from re-classifying the hold rather than from who wrote the comment: a lift comment naming a valid hold discharges nothing. Valid holds (a credential, spend, a sign-off) are untouched and still wait for their act. A label-only hold (an access block, a blocked verdict) declares no reason to judge and is never lifted.
|
|
145
|
+
|
|
146
|
+
Every reader of the hold verdict passes the project's `humanOnly` classes (`humanGate.humanOnly`) alongside `comments` and `trustedHumanActorIds` (`classifyReadyCandidate`, `classifyPreWorkCandidate`, `planHumanGateReconciliation`, `planHumanGateRelease`, `planLabelNormalization`, `planHumanGateLift`). A reader that omits it judges a project-declared hold as invalid, so a lift comment naming that hold would discharge it there.
|
|
147
|
+
|
|
97
148
|
## Complete defects found during other work are filed build-ready
|
|
98
149
|
|
|
99
150
|
Any defect discovered while doing something else, which is complete enough to build, is filed through `lisa-track` / `lisa-tracker-write` with **explicit `build_ready: true`**. It must be claimable by build-intake on the next cycle with no human flipping status. "Complete enough to build" is the `work-item-definition-of-ready` bar — reproduction, observed-versus-expected, and Gherkin acceptance criteria — not a placeholder to be fleshed out later.
|
|
100
151
|
|
|
101
|
-
The same explicitness applies in the other direction. A filing that
|
|
152
|
+
The same explicitness applies in the other direction. A filing that genuinely needs an act an agent cannot perform declares `human_gate`; it does not simply omit the flag and hope the tracker default is the merciful one.
|
|
102
153
|
|
|
103
154
|
## Mid-build filings are a planning signal
|
|
104
155
|
|
|
@@ -139,7 +190,7 @@ Resolving it from the calling project unconditionally made the highest-value rep
|
|
|
139
190
|
| `github`, renamed lane | the caller's own label | refused; the target never carried that token |
|
|
140
191
|
| `github`, stock lane | `status:ready` | worked — because both repositories happened to pick the same string. A coincidence, not a routing decision, which is why the defect was intermittent across the fleet rather than universal |
|
|
141
192
|
|
|
142
|
-
Unsatisfiable is not the same as refused. The only escape that *did* work cross-repo was `[lisa-human-gate]`, and using it there is a lie about the item: it stamps a build-ready defect report as held for a
|
|
193
|
+
Unsatisfiable is not the same as refused. The only escape that *did* work cross-repo was `[lisa-human-gate]`, and using it there is a lie about the item: it stamps a build-ready defect report as held for a person, and the target's build queue scans the ready role and nothing else. The report is filed and never picked up — the exact incomplete handoff this guard exists to prevent, committed one repository over. (The workaround actually in use was worse still: ask a second agent, in a repo with the right label, to type the command. A control routinely satisfied by delegating around it is misrouting, not enforcing.)
|
|
143
194
|
|
|
144
195
|
So the target is extracted from the command — `--repo` / `-R` / `--repo=o/r` in any position before a bare `--`, and the `repos/<org>/<repo>/issues` endpoint on the `gh api` and `curl` paths — and the role resolved for **it**:
|
|
145
196
|
|
|
@@ -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
|
+
}
|