@codyswann/lisa 8.8.0 → 8.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/all/copy-overwrite/scripts/lib/completion-authorization.mjs +54 -0
- package/all/copy-overwrite/scripts/lib/completion-proof-adapters.mjs +59 -0
- package/all/copy-overwrite/scripts/lib/completion-proof-markdown.mjs +1 -1
- package/all/copy-overwrite/scripts/lib/npm-update-helper-inventory.mjs +1 -0
- package/all/copy-overwrite/scripts/lib/release-switch.d.mts +91 -0
- package/all/copy-overwrite/scripts/lib/release-switch.mjs +1049 -0
- package/all/copy-overwrite/scripts/lisa-release-switch.mjs +203 -0
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +18 -5
- package/dist/cli/doctor-release-setting.d.ts +8 -0
- package/dist/cli/doctor-release-setting.d.ts.map +1 -0
- package/dist/cli/doctor-release-setting.js +71 -0
- package/dist/cli/doctor-release-setting.js.map +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +2 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.json +118 -4
- 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.json +107 -44
- 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/scripts/intake-blocker-reprobe.mjs +195 -23
- package/plugins/lisa/.codex-plugin/scripts/operator-id-kinds.mjs +41 -2
- package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +69 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +10 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +34 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +10 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +10 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-write-ticket/SKILL.md +34 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +10 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +34 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-repair-intake/SKILL.md +10 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +11 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +28 -4
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-build-intake/SKILL.md +11 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-verify/SKILL.md +4 -1
- package/plugins/lisa/hooks/inject-resolved-config.mjs +235 -3
- package/plugins/lisa/rules/eager/coding-philosophy.md +7 -6
- package/plugins/lisa/rules/reference/coding-philosophy.md +48 -0
- package/plugins/lisa/rules/reference/config-resolution.md +5 -2
- package/plugins/lisa/rules/reference/intent-routing.md +2 -2
- package/plugins/lisa/rules/reference/ready-role-filing.md +55 -5
- package/plugins/lisa/rules/reference/work-item-definition-of-ready.md +31 -0
- package/plugins/lisa/scripts/intake-blocker-reprobe.mjs +195 -23
- package/plugins/lisa/scripts/operator-id-kinds.mjs +41 -2
- package/plugins/lisa/scripts/ready-queue-order.mjs +69 -0
- package/plugins/lisa/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +10 -0
- package/plugins/lisa/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +34 -1
- package/plugins/lisa/skills/lisa-implement/SKILL.md +10 -2
- package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +10 -0
- package/plugins/lisa/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa/skills/lisa-jira-write-ticket/SKILL.md +34 -1
- package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +10 -0
- package/plugins/lisa/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +34 -1
- package/plugins/lisa/skills/lisa-repair-intake/SKILL.md +10 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +11 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
- package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +28 -4
- package/plugins/lisa/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
- package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
- package/plugins/lisa/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa/skills/lisa-tracker-build-intake/SKILL.md +11 -1
- package/plugins/lisa/skills/lisa-verify/SKILL.md +4 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/intake-blocker-reprobe.mjs +195 -23
- package/plugins/lisa-agy/scripts/operator-id-kinds.mjs +41 -2
- package/plugins/lisa-agy/scripts/ready-queue-order.mjs +69 -0
- package/plugins/lisa-agy/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa-agy/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +10 -0
- package/plugins/lisa-agy/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +34 -1
- package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +10 -2
- package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +10 -0
- package/plugins/lisa-agy/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa-agy/skills/lisa-jira-write-ticket/SKILL.md +34 -1
- package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +10 -0
- package/plugins/lisa-agy/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +34 -1
- package/plugins/lisa-agy/skills/lisa-repair-intake/SKILL.md +10 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +11 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +28 -4
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
- package/plugins/lisa-agy/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa-agy/skills/lisa-tracker-build-intake/SKILL.md +11 -1
- package/plugins/lisa-agy/skills/lisa-verify/SKILL.md +4 -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/hooks/inject-resolved-config.mjs +235 -3
- package/plugins/lisa-copilot/rules/eager/coding-philosophy.md +7 -6
- package/plugins/lisa-copilot/rules/reference/coding-philosophy.md +48 -0
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +5 -2
- package/plugins/lisa-copilot/rules/reference/intent-routing.md +2 -2
- package/plugins/lisa-copilot/rules/reference/ready-role-filing.md +55 -5
- package/plugins/lisa-copilot/rules/reference/work-item-definition-of-ready.md +31 -0
- package/plugins/lisa-copilot/scripts/intake-blocker-reprobe.mjs +195 -23
- package/plugins/lisa-copilot/scripts/operator-id-kinds.mjs +41 -2
- package/plugins/lisa-copilot/scripts/ready-queue-order.mjs +69 -0
- package/plugins/lisa-copilot/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa-copilot/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +10 -0
- package/plugins/lisa-copilot/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +34 -1
- package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +10 -2
- package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +10 -0
- package/plugins/lisa-copilot/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa-copilot/skills/lisa-jira-write-ticket/SKILL.md +34 -1
- package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +10 -0
- package/plugins/lisa-copilot/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +34 -1
- package/plugins/lisa-copilot/skills/lisa-repair-intake/SKILL.md +10 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +11 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +28 -4
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
- package/plugins/lisa-copilot/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa-copilot/skills/lisa-tracker-build-intake/SKILL.md +11 -1
- package/plugins/lisa-copilot/skills/lisa-verify/SKILL.md +4 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/inject-resolved-config.mjs +235 -3
- package/plugins/lisa-cursor/rules/coding-philosophy-reference.mdc +48 -0
- package/plugins/lisa-cursor/rules/coding-philosophy.mdc +7 -6
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +5 -2
- package/plugins/lisa-cursor/rules/intent-routing-reference.mdc +2 -2
- package/plugins/lisa-cursor/rules/ready-role-filing-reference.mdc +55 -5
- package/plugins/lisa-cursor/rules/work-item-definition-of-ready-reference.mdc +31 -0
- package/plugins/lisa-cursor/scripts/intake-blocker-reprobe.mjs +195 -23
- package/plugins/lisa-cursor/scripts/operator-id-kinds.mjs +41 -2
- package/plugins/lisa-cursor/scripts/ready-queue-order.mjs +69 -0
- package/plugins/lisa-cursor/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa-cursor/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +10 -0
- package/plugins/lisa-cursor/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +34 -1
- package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +10 -2
- package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +10 -0
- package/plugins/lisa-cursor/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa-cursor/skills/lisa-jira-write-ticket/SKILL.md +34 -1
- package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +10 -0
- package/plugins/lisa-cursor/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +34 -1
- package/plugins/lisa-cursor/skills/lisa-repair-intake/SKILL.md +10 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +11 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +28 -4
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
- package/plugins/lisa-cursor/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa-cursor/skills/lisa-tracker-build-intake/SKILL.md +11 -1
- package/plugins/lisa-cursor/skills/lisa-verify/SKILL.md +4 -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/hooks/inject-resolved-config.mjs +235 -3
- package/plugins/lisa-devin/rules/eager/coding-philosophy.md +7 -6
- package/plugins/lisa-devin/rules/reference/coding-philosophy.md +48 -0
- package/plugins/lisa-devin/rules/reference/config-resolution.md +5 -2
- package/plugins/lisa-devin/rules/reference/intent-routing.md +2 -2
- package/plugins/lisa-devin/rules/reference/ready-role-filing.md +55 -5
- package/plugins/lisa-devin/rules/reference/work-item-definition-of-ready.md +31 -0
- package/plugins/lisa-devin/scripts/intake-blocker-reprobe.mjs +195 -23
- package/plugins/lisa-devin/scripts/operator-id-kinds.mjs +41 -2
- package/plugins/lisa-devin/scripts/ready-queue-order.mjs +69 -0
- package/plugins/lisa-devin/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa-devin/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +10 -0
- package/plugins/lisa-devin/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa-devin/skills/lisa-github-write-issue/SKILL.md +34 -1
- package/plugins/lisa-devin/skills/lisa-implement/SKILL.md +10 -2
- package/plugins/lisa-devin/skills/lisa-jira-build-intake/SKILL.md +10 -0
- package/plugins/lisa-devin/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa-devin/skills/lisa-jira-write-ticket/SKILL.md +34 -1
- package/plugins/lisa-devin/skills/lisa-linear-build-intake/SKILL.md +10 -0
- package/plugins/lisa-devin/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa-devin/skills/lisa-linear-write-issue/SKILL.md +34 -1
- package/plugins/lisa-devin/skills/lisa-repair-intake/SKILL.md +10 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +11 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +28 -4
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
- package/plugins/lisa-devin/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa-devin/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa-devin/skills/lisa-tracker-build-intake/SKILL.md +11 -1
- package/plugins/lisa-devin/skills/lisa-verify/SKILL.md +4 -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-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/hooks/inject-resolved-config.mjs +235 -3
- package/plugins/src/base/rules/eager/coding-philosophy.md +7 -6
- package/plugins/src/base/rules/reference/coding-philosophy.md +48 -0
- package/plugins/src/base/rules/reference/config-resolution.md +5 -2
- package/plugins/src/base/rules/reference/intent-routing.md +2 -2
- package/plugins/src/base/rules/reference/ready-role-filing.md +55 -5
- package/plugins/src/base/rules/reference/work-item-definition-of-ready.md +31 -0
- package/plugins/src/base/scripts/intake-blocker-reprobe.mjs +195 -23
- package/plugins/src/base/scripts/operator-id-kinds.mjs +41 -2
- package/plugins/src/base/scripts/ready-queue-order.mjs +69 -0
- package/plugins/src/base/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/src/base/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +10 -0
- package/plugins/src/base/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +34 -1
- package/plugins/src/base/skills/lisa-implement/SKILL.md +10 -2
- package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +10 -0
- package/plugins/src/base/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/src/base/skills/lisa-jira-write-ticket/SKILL.md +34 -1
- package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +10 -0
- package/plugins/src/base/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +34 -1
- package/plugins/src/base/skills/lisa-repair-intake/SKILL.md +10 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +94 -4
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +11 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +3 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +3 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-orphans.mjs +4 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +8 -5
- package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +28 -4
- package/plugins/src/base/skills/lisa-session-manager/scripts/orphan-sweep.mjs +2 -1
- package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +4 -1
- package/plugins/src/base/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-track/SKILL.md +13 -1
- package/plugins/src/base/skills/lisa-tracker-build-intake/SKILL.md +11 -1
- package/plugins/src/base/skills/lisa-verify/SKILL.md +4 -1
- package/scripts/lisa-release-switch.mjs +9 -0
- package/scripts/two-channel-couplings.json +1 -1
- package/typescript/copy-overwrite/.prettierignore +2 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# Coding Philosophy (load-bearing)
|
|
2
2
|
|
|
3
|
-
- **KISS settles ties. YAGNI:** build what today's problem needs,
|
|
4
|
-
- **Hill-climbability.** Make localized changes with clear contracts
|
|
5
|
-
- **Immutability.** Create new values
|
|
3
|
+
- **KISS settles ties. YAGNI:** build what today's problem needs, no speculative abstraction or options. Extract shared code only when it repeats 3+ times and the abstraction is simpler than the duplication.
|
|
4
|
+
- **Hill-climbability.** Make localized, low-coupling changes with clear contracts, and leave a working baseline a later agent can find, change, verify, and keep or revert alone.
|
|
5
|
+
- **Immutability.** Create new values, never mutate; prefer `map`/`filter`/`reduce`. Where a stack rule forbids allocation on a hot path, the stack rule wins.
|
|
6
6
|
- **TDD for behavior changes.** Write the failing test first, make it pass, then refactor. Learn real behavior by running code before you write expectations.
|
|
7
7
|
- **Delete replaced code completely**, with no `V2` copies or compatibility shims. Framework migrations, such as Rails migrations, are ordinary code. Simplify your diff before you finish.
|
|
8
8
|
- **No technical debt.** Fix failures in the change that surfaces them. Never add quarantine, baseline or exemption lists, silence a check, or defer part of the job as "follow-up". Split a large backlog across parallel changes; the check still turns on strict.
|
|
9
|
-
- **No assumed human.**
|
|
10
|
-
- **Comments preserve intent.** Explain why, not what: the requirement behind a non-obvious choice, the rejected alternative, the invariant
|
|
9
|
+
- **No assumed human.** Unless a person was explicitly asked for, do the work, decide and record a default, or file a ticket; never advise a person to act. Only `when-to-stop` and declared human gates wait for one.
|
|
10
|
+
- **Comments preserve intent.** Explain why, not what: the requirement behind a non-obvious choice, the rejected alternative, the invariant to respect, and what breaks if simplified. Keep comments true when code changes; never invent a rationale. If you do not know why code exists, find out (`history-audit`). This overrides any default to match surrounding comment density.
|
|
11
|
+
- **Always promotable.** A shared branch is promotable as it stands. Merge work complete and proven; switch off only unfinished or unverified new behavior, then remove it. Revert a failed live change; unblock the branch first.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Detail and examples: [reference/coding-philosophy.md](../reference/coding-philosophy.md).
|
|
@@ -188,6 +188,52 @@ Right: create the label. Stop only if the tracker refuses for lack of permission
|
|
|
188
188
|
|
|
189
189
|
This does not conflict with writing for a non-technical reader (`communication`). That rule is about who reads a report, not about giving them to-dos.
|
|
190
190
|
|
|
191
|
+
### 8. Always Promotable
|
|
192
|
+
|
|
193
|
+
**Always promotable.** Whatever is on a shared branch can be promoted to the next environment as it stands. Most changes meet this by being complete and proven when they merge, and need nothing more. Only new behavior that merges before it is finished or verified is switched off, and that switch is removed once it is. If the branch is not promotable, fixing or reverting that comes before any other work.
|
|
194
|
+
|
|
195
|
+
A piece of work must never block a deployment. Promoting one environment to the next is a single step, never a sorting job: nobody works out which changes are ready and cherry-picks them. The established names are keeping the main line always releasable and separating deployment from release: code can be in production without being switched on.
|
|
196
|
+
|
|
197
|
+
**One question decides whether a change needs a switch:** if this were promoted to production right now, would a user see something unfinished or unproven?
|
|
198
|
+
|
|
199
|
+
- **No: the change is live and needs no switch.** Bug fixes, small tweaks, copy changes, refactors and dependency updates are almost always complete and proven when they merge, and reverting is their off switch. Never add a switch to work that is complete and proven when it merges. A switch on every change is machinery nobody needs (YAGNI).
|
|
200
|
+
- **Yes: the change is switched off.** The question decides, not the kind of work: a feature or a fix that lands across several merges, or new behavior that merges before its verification has passed, merges behind a switch that is off in production.
|
|
201
|
+
|
|
202
|
+
Live work is proven **before** it merges, not after. That is what lets it skip the switch. Proven means its local verification passed before the merge. The check in the target environment after the deploy confirms that proof, and a change is not "unverified" merely because that later check has not run yet. Work is unverified when it cannot be proven before it merges: it needs a piece that has not landed, an environment it cannot reach locally, or a decision that has not been made.
|
|
203
|
+
|
|
204
|
+
**Changes that cannot be switched off must be safe on their own**, because they are live the moment they ship:
|
|
205
|
+
|
|
206
|
+
- Database changes add before they remove. Old and new code both work against the same data.
|
|
207
|
+
- API changes are additive. A caller that has not been updated keeps working.
|
|
208
|
+
|
|
209
|
+
**A switch is temporary.** The work is not done while its switch exists: removing it is part of finishing the feature, not a follow-up, so this rule does not conflict with Clean Deletion or with No Technical Debt. A switch and an add-before-remove change that this rule requires are not the compatibility shims Clean Deletion forbids.
|
|
210
|
+
|
|
211
|
+
**Name the switch so it can be found and removed.** Give it a name that appears nowhere else in the repository and is not the start of another switch's name; `node scripts/lisa-release-switch.mjs references --switch <name>` must report none before the first use. Use one spelling of the name everywhere it is read: the done gate searches every tracked file for the name as a whole token, in any letter case, and cannot find a different spelling such as `NEW_CHECKOUT` for `new-checkout`. A second switch called `<name>-v2` counts as a reference and keeps the removing item open. Records do not count: committed evidence (`evidence/<ticket>/…` at the repository root), a changelog file (`CHANGELOG`, `CHANGELOG.md`), and Lisa's machine state under `.lisa/`. Recording that a switch is off, or saying in the changelog that it was removed, holds nothing open. Everything in those two folders is treated as a record, code included, so keep nothing that reads a switch there. Every other file counts, documentation and other release notes included: update documentation with the removal, and describe the removal elsewhere without the switch's name.
|
|
212
|
+
|
|
213
|
+
**The mechanism is the project's choice.** Lisa wraps no flag tool. A project names what it uses in `release.switch.mechanism` (a hosted flag service, a cloud configuration service, a product-analytics flag, a plain configuration value) and may point `release.switch.guide` at its own convention. With nothing named, use a plain configuration value that defaults to off. Whatever the mechanism, a switch must be settable per environment, on outside production while off in production, so the work can be verified. A project with one environment verifies switched-off work locally or for a test account only. An agent must be able to do three things with it:
|
|
214
|
+
|
|
215
|
+
1. add a switch;
|
|
216
|
+
2. confirm it is off in production;
|
|
217
|
+
3. remove it.
|
|
218
|
+
|
|
219
|
+
If you cannot confirm the production value, you cannot claim the work is dark.
|
|
220
|
+
|
|
221
|
+
**Turning a finished feature on.** A feature is turned on once, by the work item that removes its switch, after the whole feature is verified. An earlier item of the same feature verifies its own part with the switch on outside production and leaves it off in production. Then, having confirmed that production is running the verified version, the agent turns the switch on in production. The switch is removed only after that, never while the turn-on is still waiting. No person is needed, unless the project lists the decision class `feature-release` in `humanGate.humanOnly`; then that one step is a declared human gate.
|
|
222
|
+
|
|
223
|
+
**When the branch is not promotable.** A change whose failure is live on a shared branch is reverted at once: one that shipped without a switch and fails at verification, one that is switched off but breaks something with the switch off, and any change that breaks the build or the deployment, which no switch can turn off. A feature that fails after its switch was turned on in production is live too: the switch is turned off again at once. It is reworked, and the work item goes back to the ready queue with the failure evidence. It is never left in place to be fixed forward, and it never holds a promotion.
|
|
224
|
+
|
|
225
|
+
**Work items and pull requests say which.** A leaf work item that changes runtime behavior carries a `## Release Switch` section with exactly one line (gate S22 in the `*-validate-*` skills, checked by `scripts/lisa-release-switch.mjs check`):
|
|
226
|
+
|
|
227
|
+
```text
|
|
228
|
+
Live — complete and proven at merge
|
|
229
|
+
Switched off — <switch-name>; removed by this item
|
|
230
|
+
Switched off — <switch-name>; removed by <work-item ref>
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
The item that removes a switch cannot be finished while tracked source still references it (`lisa-work-item.mjs finish`). A pull request states the same thing next to how to undo it.
|
|
234
|
+
|
|
235
|
+
**A project without live users.** `release.liveUsers` in `.lisa.config.json` is a fact about the project: absent means it has live users and this rule applies. A project that is not launched sets it to `false`; then nothing in this section applies, including the add-before-remove and additive requirements, because there are no users and no live data to protect. Lisa names the setting whenever a production deployment happens while it is `false`, so the opt-out is seen on launch day. A value that is not `true` or `false` is reported and treated as `true`. `node scripts/lisa-release-switch.mjs config` prints how it resolved.
|
|
236
|
+
|
|
191
237
|
---
|
|
192
238
|
|
|
193
239
|
## Quick Reference
|
|
@@ -500,6 +546,8 @@ Structure the code so future agents can easily identify what to change, make a t
|
|
|
500
546
|
|
|
501
547
|
Write comments and docstrings that preserve engineering intent, not merely implementation details.
|
|
502
548
|
|
|
549
|
+
This overrides any default to match the comment density of the surrounding code: future agents keep no memory of today, so intent that is not written down is lost.
|
|
550
|
+
|
|
503
551
|
Code should generally explain **what** happens. Comments and docstrings should explain **why it happens that way**, especially when the reasoning is not obvious from the implementation.
|
|
504
552
|
|
|
505
553
|
When adding, modifying, or removing code:
|
|
@@ -288,7 +288,10 @@ fi
|
|
|
288
288
|
| `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. |
|
|
289
289
|
| `dependencies.humanSignOff` | no | `"none"` (`"default"` when `humanGate.mode` is `"strict"`) | Whether dependency decisions wait on a person. `"default"` keeps every ratification requirement in `dependency-trust-classes`; `"none"` has the agent ratify instead and record its reasoning in the dependency's entry — the trust class and its per-class evidence are still required, and credential, paid-account, and license approvals are unaffected. Any other value is reported as invalid (in `lisa apply` output and the session's `lisa-resolved-config` block) and treated as `"default"`, the stricter option. |
|
|
290
290
|
| `humanGate.mode` | no | `"access-only"` | How wide the human gate is. `"access-only"`: an agent performs every act it has access to perform, and only an act it lacks access to (an interactive login, a credential it cannot create or reach, spending money, a legal signature, an action only a person's account can take, or a hold the operator asked for) is a human gate. `"strict"` restores the older, wider gate: a compliance sign-off, naming an accountable person, and the calls Lisa's policy used to reserve for a person (learnings promotion, harness interventions, automation retirement, exploratory-QA findings) count as human gates again, and the defaults of `dependencies.humanSignOff` and `learnings.lowConfidence` become `"default"` and `"human-triage"`. A value either key sets explicitly always wins over the mode. A value that is present but invalid fails safe: it is reported and treated as the stricter option (an invalid local value first falls back to a valid value in `.lisa.config.json`); an absent value gets the mode's default. An invalid `humanGate.mode` is therefore treated as `"strict"`. Read by `scripts/human-gate-act.mjs`; see `ready-role-filing`, "What a human gate is". |
|
|
291
|
-
| `humanGate.humanOnly` | no | `[]` | Decision classes this project reserves for a person, such as `["pricing"]`, in either mode. A `human_gate` reason naming one (as a whole word) is accepted by the writers and never lifted by the sweeps. Absent, only the acts `humanGate.mode` names 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". |
|
|
291
|
+
| `humanGate.humanOnly` | no | `[]` | Decision classes this project reserves for a person, such as `["pricing"]`, in either mode. A `human_gate` reason naming one (as a whole word) is accepted by the writers and never lifted by the sweeps. Listing `feature-release` reserves turning a finished, switched-off feature on in production for a person (`coding-philosophy`, "Always Promotable"); otherwise the agent does it once verification passes. Absent, only the acts `humanGate.mode` names 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". |
|
|
292
|
+
| `release.liveUsers` | no | `true` | Whether this project has live users, which decides whether the always-promotable rule applies (`coding-philosophy`, "Always Promotable"). A fact about the project, not a switch for a rule: a project that is not launched sets `false`, and then no `## Release Switch` declaration, release switch, or backward-compatible database or API change is required. Absent means `true`. A value that is not `true` or `false` is reported and treated as `true`. `lisa sync` does not write this key, so an absent value stays visible as a default. While it is `false`, the merge flow names the setting whenever a production deployment is confirmed (`lisa-release-switch.mjs notice`). Read by `scripts/lib/release-switch.mjs`; `node scripts/lisa-release-switch.mjs config` prints how it resolved. |
|
|
293
|
+
| `release.switch.mechanism` | no | `config-value` | What this project uses to switch unfinished work off: free text such as a hosted flag service, a cloud configuration service, a product-analytics flag, or a config file. Lisa wraps none of them and only carries the name to the agent. Absent means a plain configuration value that defaults to off. |
|
|
294
|
+
| `release.switch.guide` | no | — | Path or URL of the project's own convention for adding, reading and removing a switch. |
|
|
292
295
|
| `knowledge` | **yes** | `llm-wiki` | Knowledge backend. Closed vocabulary; `llm-wiki` (the git-native wiki each repo owns at `wiki/`) is the only value today. `lisa sync` writes the default with `_lisaSync.populated` provenance and rejects any other value. Selects the plugin that provides the backend (`llm-wiki` → `lisa-wiki`). See **Knowledge role** below. |
|
|
293
296
|
| ~~`wiki`~~ | — | — | **Retired.** Pointed at a local path or a remote wiki repo to mirror. Every repo now owns its own wiki at `wiki/`, so the key has nothing left to say; the `ensure-knowledge-role` migration removes it and nothing reads it. |
|
|
294
297
|
| `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. |
|
|
@@ -753,7 +756,7 @@ operator chooses Telegram (`init-config --notify telegram`).
|
|
|
753
756
|
| `sessionManager.notify.level` | no | `all` | `all` sends both action requests and routine notices with Telegram. `asks-only` sends human-needed questions, requests for operator action, duplicate-manager warnings and the hold digest. Routine notices go to the transcript. `status` reports `notifyLevel`, and the session-start config shows the resolved level. |
|
|
754
757
|
| `sessionManager.notify.stateDir` | **yes** with `telegram`; must be absent otherwise | — | This project's own Telegram state dir. A `stateDir` without the `telegram` provider fails validation, because no bot would use it. Never the shared default `~/.claude/channels/telegram`, because one bot per state dir is how projects stay isolated. Setup writes `~/.claude/channels/telegram-<project>`. |
|
|
755
758
|
| `sessionManager.trustedAuthorIds` | no | — | Optional list of **stable tracker user ids**, as strings: the GitHub numeric user id (`gh api users/<login> --jq .id`), the Jira `accountId`, or the Linear user id. Not logins or display names: matching compares ids, so a plain login silently matches no one and excludes every item. An entry may name its kind: `id:<v>` is an id, `login:<v>` a GitHub login (matched by the queue and on-item answers; the GitHub Ready queue resolves it to an account ID before checking hold releases). A login GitHub frees (after a rename or a deleted account) can be re-registered by someone else, so prefer `id:` for trust. `integration:<service>` trusts items an integration files with no person behind them (Linear's `botActor`, by `subType` such as `sentry`, else its bot `id`, never its self-chosen display name; never an item a person or an outside user filed; it trusts who filed the item, not text an outsider can get into it, such as a quoted error message); GitHub Apps and Jira automation file as an account, so trust them by `id:`. An unknown prefix or an empty value fails validation. When set, the manager takes only items authored by these people or integrations. It is also who may release a human hold, unless `trustedReleaseIds` is set — so removing it removes every hold releaser too. |
|
|
756
|
-
| `sessionManager.trustedReleaseIds` | no | `trustedAuthorIds` | Optional, non-empty list of the **people** who may release a human hold (`queue`, `blocked-plan`, the orphan sweep) and answer a question on the item. Use `id:` for hold releases across all three paths. Same entry grammar as `trustedAuthorIds` minus `integration:`, which is refused: an integration is not a person. Unset, it falls back to `trustedAuthorIds`, so existing projects are unaffected; with neither set, no hold is released. |
|
|
759
|
+
| `sessionManager.trustedReleaseIds` | no | `trustedAuthorIds` | Optional, non-empty list of the **people** who may release a human hold (`queue`, `blocked-plan`, the orphan sweep) and answer a question on the item. Use `id:` for hold releases across all three paths. Same entry grammar as `trustedAuthorIds` minus `integration:`, which is refused: an integration is not a person. One more entry kind is accepted here and in no other `sessionManager` list (a tracker's own `<tracker>.trustedHumanActorIds` list reads it the same way, and is not checked by validation): `relay:<stable account id>` names an automation account that may **relay** a hold release a listed person asked for (`ready-role-filing`, "Relayed releases"). A relay is not a person: it cannot answer a question, and its release counts only on a line that names a person from this list by account id (`[lisa-human-gate-release] relayed-for=<id> reason=<slug>`). A list with a relay and no person by account id is refused, because nobody could be relayed for; so is an account listed both as a person and as a relay, and a relay written any other way (`id:relay:<id>`, or with a space in front). A relay is never taken from the `trustedAuthorIds` fallback, and counts only when the committed `.lisa.config.json` lists it: one named only in `.lisa.config.local.json` is ignored. Unset, it falls back to `trustedAuthorIds`, so existing projects are unaffected; with neither set, no hold is released. |
|
|
757
760
|
| `sessionManager.operatorIds` | no | — | Optional, non-empty list of the people the manager works for, as tracker user ids matched against the **assignee** the same way "me" is: the GitHub **login**, the Jira `accountId`, or the Linear user id, spelled exactly as the tracker API returns it (matching is case-sensitive, so look the OPERATOR up rather than typing from memory: `gh api users/<operator-login> --jq .login` returns the canonical GitHub spelling. Do not use `gh api user`, which returns whoever the credential belongs to — the agent account, when that is the case this key exists for). Dispatch order is assigned to an operator, then to "me" (the tracker credential's identity), then unassigned; items assigned to anyone else are skipped. Set it whenever the tracker credential is not the operator's own (an agent account), or the operator's Ready items are never dispatched. Prefer the kind-keyed form, which the queue, the claim and on-item answers all match the same way: `login:<GitHub login>` matches only a GitHub login, `id:<v>` only an account id (GitHub numeric id, Jira `accountId`, Linear user id). A plain entry keeps its meaning, but a plain all-digit entry is a login to the queue and the claim and a numeric id to on-item answers, so validation warns about it (without failing) and names both forms. An unknown prefix or an empty value fails validation. A Jira accountId holding a colon (`557058:…`, `qm:…`) is still plain. |
|
|
758
761
|
| `sessionManager.backlogPickup` | no | `false` | Opt-in lowest dispatch tier. When the Ready queue is exhausted and capacity remains, the manager considers backlog items (open leaves in no lifecycle role) with the Ready exclusions plus any unfinished blocker; each one that passes the tracker validator (all gates, including the stateless-pickup dry-run) is moved to Ready in one write that keeps any assignee it already has and assigns an unassigned one to the manager ("me"), then read back and dispatched. A failed validation is cached against the item's `updatedAt`, so it is re-judged only after the item changes. Requires `operatorIds`. |
|
|
759
762
|
|
|
@@ -162,11 +162,11 @@ Sequence:
|
|
|
162
162
|
3. PR Watch Loop -- drive the PR to MERGED via the `drive-pr-to-merge` skill. That skill is the single source of truth for clearing every blocker (auto-merge with direct-merge fallback, `BEHIND` re-sync, conflict resolution, failing-check fixes, human + bot review-comment handling with thread resolution via `pull-request-review`, stale `CHANGES_REQUESTED` dismissal, and post-merge ancestry verification). Do NOT re-implement the loop or its terminal conditions here or in any calling skill.
|
|
163
163
|
4. Merge the PR (owned by `drive-pr-to-merge`, including the auto-merge race and zero-deploy-run checks)
|
|
164
164
|
5. Monitor deploy (watch the deployment action triggered by merge):
|
|
165
|
-
- If deploy fails -- fix, open new PR, return to step 3
|
|
165
|
+
- If deploy fails -- when a merged change broke it, revert that change at once, whatever its release switch says, and return the work item to the ready queue (`coding-philosophy`, "Always Promotable"); when the change did not cause it, or the project sets `release.liveUsers: false`, fix, open new PR, return to step 3
|
|
166
166
|
6. Remote verification:
|
|
167
167
|
- `verification-specialist` -- verify in target environment (same checks as local verification, but on remote). Resolve credentials through the `verification-lifecycle` lookup order before declaring any missing. If they remain genuinely unavailable, do not complete on artifact-only evidence: post a tracker comment naming every credential source checked and what could not be verified as a result, transition the work item to the configured blocked state, and apply the configured `needs-human` / `human-review` label (creating it when the tracker supports label creation and it is missing). The comment is what makes the escalation auditable -- a label alone records that something stopped, not what was tried or why. Evidence must explicitly distinguish `verified empirically` from `artifact-only / verification deferred`
|
|
168
168
|
- `ops-specialist` -- post-deploy health check via `lisa-monitor <env> --report-only`, smoke test, monitor for errors in first minutes. `--report-only` is REQUIRED: it keeps the post-deploy check a pure health/audit report so monitor's standalone ticket-filing never fires inside a Verify run
|
|
169
|
-
- If remote verification fails -- fix, open new PR, return to step 3
|
|
169
|
+
- If remote verification fails -- when the failure is live, revert the change at once and return the work item to the ready queue with the failure evidence; it is never fixed forward in place and never holds a promotion (`coding-philosophy`, "Always Promotable"). A failure is live when the work item's `## Release Switch` says `Live` or it has none, when the work is switched off but the failure shows with the switch off, or when the switch is already on in production (turn it off again first). A failure that shows only with the switch on while it is still off in production, and any failure in a project that sets `release.liveUsers: false`: fix, open new PR, return to step 3
|
|
170
170
|
7. **Record Verify usage on the evidence artifact** -- invoke `lisa-usage-accounting` against the generated evidence artifact (comment body, PR evidence section, or markdown proof) so it gains a direct `verify` usage entry in the canonical `## Lisa Usage` section. If the originating work item or PRD parentage is known, prefer `record_and_rollup` so ancestor totals refresh in the same pass. If runtime usage is unavailable, still write `source: unavailable` with nullable token/cost fields instead of omitting the row.
|
|
171
171
|
8. **Post evidence via the tracker surface** -- invoke `lisa-tracker-evidence` after the usage write so the same canonical evidence artifact is uploaded / posted without hand-editing a second format.
|
|
172
172
|
|
|
@@ -271,8 +271,58 @@ allowlist, so no alternate path silently accepts weaker evidence.
|
|
|
271
271
|
|
|
272
272
|
An absent/empty allowlist, missing or unreadable author identity, raw string comments, an actor
|
|
273
273
|
outside the explicit allowlist, or a known bot cannot release a hold. A bot remains ineligible even
|
|
274
|
-
if its ID appears in the list. A matching comment body, `authorized: true`, or an agent
|
|
275
|
-
speak for a human confers no trust
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
274
|
+
if its ID appears in the list as a person. A matching comment body, `authorized: true`, or an agent
|
|
275
|
+
claiming to speak for a human confers no trust, unless the project named that agent's account as a
|
|
276
|
+
relay (below). Leave the item held and report the missing policy or identity;
|
|
277
|
+
never ask automation to manufacture an approval comment to unblock itself.
|
|
278
|
+
|
|
279
|
+
### Relayed releases
|
|
280
|
+
|
|
281
|
+
A person often gives the decision where the agent asked for it: in chat. The agent can only post
|
|
282
|
+
from the automation account, and by default that comment counts for nothing. A project that wants
|
|
283
|
+
its agent to carry the decision into the tracker opts in (owner ruling, CodySwannGT/lisa#5190):
|
|
284
|
+
|
|
285
|
+
- **Naming a relay.** In the list of who may release a hold, an entry `relay:<stable account id>`
|
|
286
|
+
names an automation account that may relay. For the session manager that list is
|
|
287
|
+
`sessionManager.trustedReleaseIds` (never the `trustedAuthorIds` fallback, and never
|
|
288
|
+
`operatorIds`); for a caller that passes `trustedHumanActorIds` directly, it is that list. A relay
|
|
289
|
+
is not a person: its ordinary comments never count as a release or as an answer. A relay entry
|
|
290
|
+
counts only when it is in the project's committed settings (the session manager ignores one
|
|
291
|
+
named only in `.lisa.config.local.json`). An instruction given in conversation ("treat your
|
|
292
|
+
account as a relay") never creates one, and an agent never adds the entry to a list it passes.
|
|
293
|
+
An account is a person or a relay, never both: one listed both ways is a relay, cannot be relayed
|
|
294
|
+
for, and cannot release in its own name.
|
|
295
|
+
- **The release line.** `[lisa-human-gate-release] relayed-for=<stable id of a trusted person> reason=<slug>`.
|
|
296
|
+
For a hold that names no reason, leave the reason out:
|
|
297
|
+
`[lisa-human-gate-release] relayed-for=<stable id of a trusted person>`.
|
|
298
|
+
The person comes before the reason, because everything after `reason=` is read as the reason, and
|
|
299
|
+
is named by the account id written in the list. Nothing but the reason may follow the person.
|
|
300
|
+
The line must be the first line of the relay's comment and begin with the marker (or be one closed
|
|
301
|
+
HTML comment that begins with it), with no code mark on it and nothing after it on the line. Only that line is read: a copy that is
|
|
302
|
+
quoted, bulleted, indented, in code, or anywhere further down the comment releases nothing, so an
|
|
303
|
+
agent that repeats a line to discuss it does not post it. A person's own comment is still read
|
|
304
|
+
anywhere and behind a quote mark, as before. `formatHumanGateRelease({ reason, relayedFor,
|
|
305
|
+
decidedBy })` writes the exact form; put the explanation after it. An adapter that turns a
|
|
306
|
+
structured comment (Jira's document format) into text must keep a quoted or code block from
|
|
307
|
+
becoming a plain first line: the session manager's queue does (`adfCommentText`), and an agent
|
|
308
|
+
that assembles comment text by hand writes such a block behind `> `.
|
|
309
|
+
- **When it counts.** The comment's author is a configured relay (bot metadata does not
|
|
310
|
+
disqualify it); `relayed-for` names a person who is a trusted releaser in the same list; and the
|
|
311
|
+
reason matches the hold, as for any release. A relayed line that names nobody, names someone who
|
|
312
|
+
is not a trusted person, or names the relay itself releases nothing. An account the project did
|
|
313
|
+
not name is never a relay, whatever its comment says.
|
|
314
|
+
- **What the project accepts.** In a project that names a relay, whatever makes that account post
|
|
315
|
+
the line can lift a hold, including a mistake by the agent. That is why it is opt-in, and why a
|
|
316
|
+
project that names none behaves exactly as described above.
|
|
317
|
+
|
|
318
|
+
What an agent does when a trusted person tells it, in any channel, to release a hold:
|
|
319
|
+
|
|
320
|
+
1. Check whether the project named the account it posts from as a relay.
|
|
321
|
+
2. **If it did:** post the relayed release, and say in the same comment, in plain English, who gave
|
|
322
|
+
the instruction, where and when. Read the item back and confirm the hold reads as released.
|
|
323
|
+
3. **If it did not:** do not post a release. Tell the person at once that the release has to come
|
|
324
|
+
from their own tracker login, give them the exact line to paste and a link to the item, and say
|
|
325
|
+
that the project can name a relay to avoid this next time. Never report the item as released.
|
|
326
|
+
|
|
327
|
+
Unheld items remain unheld, and an authorized matching release still permits the existing recovery
|
|
328
|
+
path. Keep historical hold and release comments; do not rewrite the description to erase a hold.
|
|
@@ -201,6 +201,37 @@ and the section shows that ledger's actual tokens and cost beside the estimate
|
|
|
201
201
|
(`lisa-estimate.mjs tally`). It is `N/A` when the project turns the
|
|
202
202
|
requirement off. Nobody is ever asked for an estimate.
|
|
203
203
|
|
|
204
|
+
## Release switch (gate S22)
|
|
205
|
+
|
|
206
|
+
Whatever is on a shared branch can be promoted to the next environment as it
|
|
207
|
+
stands (`coding-philosophy`, "Always Promotable"). So every leaf that changes
|
|
208
|
+
runtime behavior, in a project with live users, carries one `## Release Switch`
|
|
209
|
+
section with exactly one line:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
Live — complete and proven at merge
|
|
213
|
+
Switched off — <switch-name>; removed by this item
|
|
214
|
+
Switched off — <switch-name>; removed by <work-item ref>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
One question decides the form: if this were promoted to production right now,
|
|
218
|
+
would a user see something unfinished or unproven? If no, the work is live and
|
|
219
|
+
gets no switch: bug fixes, small tweaks, copy changes, refactors and dependency
|
|
220
|
+
updates almost always are. The question decides, not the kind of work. If yes,
|
|
221
|
+
it is switched off, and the declaration names the
|
|
222
|
+
switch and the work item that removes it. The shipped
|
|
223
|
+
`scripts/lisa-release-switch.mjs` renders and checks the section for every
|
|
224
|
+
agent.
|
|
225
|
+
|
|
226
|
+
At write and ready time a proposed leaf with no declaration fails, because the
|
|
227
|
+
writer renders it. A leaf already in the tracker with none is `N/A` with a
|
|
228
|
+
repair note, and the claiming agent writes the declaration before any work
|
|
229
|
+
(`lisa-track`). A declaration that is present and malformed always fails. At
|
|
230
|
+
done time `lisa-work-item finish` refuses the item that removes a switch while
|
|
231
|
+
tracked source still references that switch. The gate is `N/A` for work that
|
|
232
|
+
changes no runtime behavior, for containers, and whenever the project sets
|
|
233
|
+
`release.liveUsers: false`. Nobody is ever asked which form applies.
|
|
234
|
+
|
|
204
235
|
## Relationship to the lifecycle
|
|
205
236
|
|
|
206
237
|
- **Write time** — `*-write-*` runs the applicable pre-write gates; a spec
|
|
@@ -259,6 +259,94 @@ function reasonOnLine(line, marker) {
|
|
|
259
259
|
return normalizeReason(tail.slice(key + REASON_KEY.length));
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
/** Key a relayed release uses to name the person it relays for. */
|
|
263
|
+
const RELAYED_FOR_KEY = "relayed-for=";
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The person a declaring line says it relays for, or "" when it names nobody.
|
|
267
|
+
*
|
|
268
|
+
* It is read only from the part of the line BEFORE `reason=`. Everything after
|
|
269
|
+
* `reason=` is the reason (that is how every reader, old and new, parses it),
|
|
270
|
+
* so a `relayed-for=` written after the reason is part of a reason nobody
|
|
271
|
+
* declared and releases nothing. Writing the person first keeps one grammar:
|
|
272
|
+
* an older reader still finds the right reason, and then refuses the comment
|
|
273
|
+
* for its author, which is the safe answer.
|
|
274
|
+
* @param {string} line - A line already known to declare
|
|
275
|
+
* @param {string} marker - The declaration marker it carries
|
|
276
|
+
* @returns {string} The stable id named, or the empty string
|
|
277
|
+
*/
|
|
278
|
+
function relayedForOnLine(line, marker) {
|
|
279
|
+
const at = line.indexOf(marker);
|
|
280
|
+
if (at === -1) return "";
|
|
281
|
+
const tail = line.slice(at + marker.length).split("-->")[0];
|
|
282
|
+
// Exact grammar: the person is the word right after the marker, and the
|
|
283
|
+
// only thing that may follow it is the reason. `not-relayed-for=1`, a
|
|
284
|
+
// `relayed-for=` later in the line, and a sentence after the person
|
|
285
|
+
// ("relayed-for=1 is the form a release takes") all name nobody.
|
|
286
|
+
const [first = "", second] = tail.trim().split(/\s+/u);
|
|
287
|
+
if (!first.startsWith(RELAYED_FOR_KEY)) return "";
|
|
288
|
+
if (second !== undefined && !second.startsWith(REASON_KEY)) return "";
|
|
289
|
+
return first.slice(RELAYED_FOR_KEY.length);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** Longest indent a line may have before Markdown reads it as code. */
|
|
293
|
+
const MAX_PROSE_INDENT = 3;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* The one line of a relay's comment that can be a release: its first.
|
|
297
|
+
*
|
|
298
|
+
* A person's comment is read generously: a marker behind a quote mark or a
|
|
299
|
+
* list bullet, anywhere in the comment, still declares, because the person is
|
|
300
|
+
* the authority and nothing in their own comment can be someone else's words.
|
|
301
|
+
* A relay is an agent, and an agent quotes: it answers "should I post this
|
|
302
|
+
* line?" by repeating the line. Telling a quotation from a statement in
|
|
303
|
+
* Markdown is a long list (nested fences, code spans across lines, lazy
|
|
304
|
+
* blockquote lines, list continuations, raw HTML), and any list has a next
|
|
305
|
+
* entry. So there is no list. A relayed release counts only in the exact
|
|
306
|
+
* place and shape {@link formatHumanGateRelease} writes it: the first line of
|
|
307
|
+
* the comment, beginning with the marker (or with an HTML comment that begins
|
|
308
|
+
* with it), at most three spaces in, with no code mark on the line. A copy
|
|
309
|
+
* anywhere else, or dressed any other way, releases nothing.
|
|
310
|
+
* @param {unknown} body - The comment body
|
|
311
|
+
* @returns {string[]} That line when it is a release line, else nothing
|
|
312
|
+
*/
|
|
313
|
+
function relayReleaseLines(body) {
|
|
314
|
+
const first =
|
|
315
|
+
String(body ?? "")
|
|
316
|
+
.split("\n")
|
|
317
|
+
.find(line => line.trim() !== "") ?? "";
|
|
318
|
+
if (first.includes("`")) return [];
|
|
319
|
+
const line = normalizeProviderMarkdown(first);
|
|
320
|
+
const text = line.trimStart();
|
|
321
|
+
const indent = line.slice(0, line.length - text.length);
|
|
322
|
+
if (indent.length > MAX_PROSE_INDENT || indent.includes("\t")) return [];
|
|
323
|
+
return relayStatement(text).startsWith(HUMAN_GATE_RELEASE_MARKER)
|
|
324
|
+
? [line]
|
|
325
|
+
: [];
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* The release a relay's first line states, or "" when the line is not one.
|
|
330
|
+
*
|
|
331
|
+
* Two shapes, and nothing may come after either: the plain line, which must
|
|
332
|
+
* not contain an HTML comment mark at all (every reader cuts a line at the
|
|
333
|
+
* first `-->`, so `… reason=x --> is this right?` would otherwise count with
|
|
334
|
+
* a question after it), or the whole line as one closed HTML comment.
|
|
335
|
+
* @param {string} text - The first line, indent removed
|
|
336
|
+
* @returns {string} The statement inside, or the empty string
|
|
337
|
+
*/
|
|
338
|
+
function relayStatement(text) {
|
|
339
|
+
const plain = !text.includes("<!--") && !text.includes("-->");
|
|
340
|
+
if (plain) return text;
|
|
341
|
+
if (!text.startsWith("<!--")) return "";
|
|
342
|
+
const inner = text.slice("<!--".length);
|
|
343
|
+
const close = inner.indexOf("-->");
|
|
344
|
+
if (close === -1) return "";
|
|
345
|
+
if (inner.slice(close + "-->".length).trim() !== "") return "";
|
|
346
|
+
const statement = inner.slice(0, close);
|
|
347
|
+
return statement.includes("<!--") ? "" : statement.trim();
|
|
348
|
+
}
|
|
349
|
+
|
|
262
350
|
/**
|
|
263
351
|
* The reason keys of every hold a body DECLARES, deduplicated.
|
|
264
352
|
*
|
|
@@ -841,32 +929,98 @@ function isTrustedHumanComment(comment, trustedIds) {
|
|
|
841
929
|
return id.length > 0 && trustedIds.has(id);
|
|
842
930
|
}
|
|
843
931
|
|
|
932
|
+
/** Prefix of a list entry that names a relay account instead of a person. */
|
|
933
|
+
const RELAY_ENTRY = "relay:";
|
|
934
|
+
|
|
844
935
|
/**
|
|
845
|
-
*
|
|
936
|
+
* Whether a comment was written by an account the project named as a relay.
|
|
937
|
+
*
|
|
938
|
+
* Bot metadata does not disqualify it: a relay is named BECAUSE it is the
|
|
939
|
+
* automation account, and the project chose to let it carry a person's
|
|
940
|
+
* decision. What it may carry is decided per line, by {@link relayedForOnLine}.
|
|
941
|
+
* @param {unknown} comment - Structured provider comment
|
|
942
|
+
* @param {ReadonlySet<string>} relayIds - Account ids the project named as relays
|
|
943
|
+
* @returns {boolean} Whether a configured relay wrote the comment
|
|
944
|
+
*/
|
|
945
|
+
function isRelayComment(comment, relayIds) {
|
|
946
|
+
if (!comment || typeof comment !== "object" || Array.isArray(comment))
|
|
947
|
+
return false;
|
|
948
|
+
const id = stableActorId(
|
|
949
|
+
comment.authorId ??
|
|
950
|
+
comment.user?.id ??
|
|
951
|
+
comment.author?.id ??
|
|
952
|
+
comment.author?.accountId
|
|
953
|
+
);
|
|
954
|
+
return id.length > 0 && relayIds.has(id);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* The reason keys released for this item, deduplicated.
|
|
959
|
+
*
|
|
960
|
+
* Two kinds of comment can release a hold:
|
|
961
|
+
*
|
|
962
|
+
* 1. One written by an explicitly trusted PERSON, from their own tracker
|
|
963
|
+
* login. Known bots never qualify here, listed or not.
|
|
964
|
+
* 2. One written by an account the project named as a RELAY (a list entry of
|
|
965
|
+
* the form `relay:<stable account id>`, CodySwannGT/lisa#5190), on a line
|
|
966
|
+
* that names, before the reason, a person who is themselves on the list:
|
|
967
|
+
* `[lisa-human-gate-release] relayed-for=<person id> reason=<slug>`.
|
|
968
|
+
*
|
|
969
|
+
* The second exists because the person often gives the decision where the
|
|
970
|
+
* agent asked for it, in chat, and the agent can only post from the automation
|
|
971
|
+
* account. It is opt-in by design: with no `relay:` entry, behavior is exactly
|
|
972
|
+
* the first rule. A project that names a relay accepts that whatever makes
|
|
973
|
+
* that account post the line can lift a hold. Nothing else relaxes: a relay
|
|
974
|
+
* that names nobody, names someone who is not a trusted person, or names
|
|
975
|
+
* itself or another relay (even one also listed as a person), releases
|
|
976
|
+
* nothing; only the first line of the relay's comment is read
|
|
977
|
+
* ({@link relayReleaseLines}); and an account the project did not name is
|
|
978
|
+
* never a relay whatever its comment says.
|
|
846
979
|
*
|
|
847
980
|
* Comments must retain authenticated provider authorship: normalized authorId,
|
|
848
|
-
* user.id, author.id or author.accountId. The caller supplies
|
|
849
|
-
* independently of comment content. Raw strings, missing IDs
|
|
850
|
-
*
|
|
981
|
+
* user.id, author.id or author.accountId. The caller supplies the list
|
|
982
|
+
* independently of comment content. Raw strings, missing IDs and an absent or
|
|
983
|
+
* empty list fail closed and cannot discharge a hold.
|
|
851
984
|
* @param {unknown} comments - Structured comments, any order
|
|
852
|
-
* @param {unknown} trustedHumanActorIds - Explicit trusted
|
|
985
|
+
* @param {unknown} trustedHumanActorIds - Explicit trusted person ids, and `relay:<id>` entries
|
|
853
986
|
* @returns {string[]} One key per authorized recorded release
|
|
854
987
|
*/
|
|
855
988
|
export function humanGateReleases(comments, trustedHumanActorIds = []) {
|
|
989
|
+
const entries = (
|
|
990
|
+
Array.isArray(trustedHumanActorIds) ? trustedHumanActorIds : []
|
|
991
|
+
)
|
|
992
|
+
.map(stableActorId)
|
|
993
|
+
.filter(Boolean);
|
|
856
994
|
const trustedIds = new Set(
|
|
857
|
-
|
|
858
|
-
|
|
995
|
+
entries.filter(entry => !entry.startsWith(RELAY_ENTRY))
|
|
996
|
+
);
|
|
997
|
+
const relayIds = new Set(
|
|
998
|
+
entries
|
|
999
|
+
.filter(entry => entry.startsWith(RELAY_ENTRY))
|
|
1000
|
+
.map(entry => entry.slice(RELAY_ENTRY.length).trim())
|
|
859
1001
|
.filter(Boolean)
|
|
860
1002
|
);
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
const
|
|
865
|
-
|
|
1003
|
+
// An account is a person or a relay, never both. Listing one both ways
|
|
1004
|
+
// (directly, or through a login a tracker resolves to the relay's id) makes
|
|
1005
|
+
// it a relay: it cannot release in its own name and cannot be relayed for.
|
|
1006
|
+
const people = new Set([...trustedIds].filter(id => !relayIds.has(id)));
|
|
1007
|
+
const declaring = entry =>
|
|
1008
|
+
declarativeText(entry.body ?? "")
|
|
866
1009
|
.split("\n")
|
|
867
|
-
.filter(line => declaresOnLine(line, HUMAN_GATE_RELEASE_MARKER))
|
|
868
|
-
|
|
869
|
-
|
|
1010
|
+
.filter(line => declaresOnLine(line, HUMAN_GATE_RELEASE_MARKER));
|
|
1011
|
+
const keys = (Array.isArray(comments) ? comments : []).flatMap(entry => {
|
|
1012
|
+
if (isTrustedHumanComment(entry, people))
|
|
1013
|
+
return declaring(entry).map(line =>
|
|
1014
|
+
reasonOnLine(line, HUMAN_GATE_RELEASE_MARKER)
|
|
1015
|
+
);
|
|
1016
|
+
if (isRelayComment(entry, relayIds))
|
|
1017
|
+
return relayReleaseLines(entry.body ?? "")
|
|
1018
|
+
.filter(line =>
|
|
1019
|
+
people.has(relayedForOnLine(line, HUMAN_GATE_RELEASE_MARKER))
|
|
1020
|
+
)
|
|
1021
|
+
.map(line => reasonOnLine(line, HUMAN_GATE_RELEASE_MARKER));
|
|
1022
|
+
return [];
|
|
1023
|
+
});
|
|
870
1024
|
return [...new Set(keys)];
|
|
871
1025
|
}
|
|
872
1026
|
|
|
@@ -1362,22 +1516,40 @@ export function planHumanGateRelease(input = {}) {
|
|
|
1362
1516
|
* its reason and a mistyped reason discharges nothing while looking like it
|
|
1363
1517
|
* did. The reason is echoed verbatim from the hold, so the pairing is visible
|
|
1364
1518
|
* to a reader as well as to the matcher.
|
|
1365
|
-
*
|
|
1519
|
+
*
|
|
1520
|
+
* `relayedFor` is for a release an automation account posts on a person's
|
|
1521
|
+
* instruction: the stable tracker id of that person, written before the reason
|
|
1522
|
+
* (see {@link humanGateReleases}). It counts only in a project that named the
|
|
1523
|
+
* posting account as a relay. A numeric id is accepted (GitHub's are
|
|
1524
|
+
* numbers); an id with a space in it is left out, so the line stays a direct
|
|
1525
|
+
* release that a relay's account cannot use.
|
|
1526
|
+
*
|
|
1527
|
+
* Every field is written on one line. A line break inside "what was decided"
|
|
1528
|
+
* would otherwise let text copied from a conversation start a second line with
|
|
1529
|
+
* its own release marker, for a different hold.
|
|
1530
|
+
* @param {{ reason?: unknown, decidedBy?: unknown, decision?: unknown, relayedFor?: unknown }} discharge - What was decided, and by whom
|
|
1366
1531
|
* @returns {string} Comment body carrying the release marker
|
|
1367
1532
|
*/
|
|
1368
1533
|
export function formatHumanGateRelease(discharge = {}) {
|
|
1369
|
-
const
|
|
1370
|
-
const
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1534
|
+
const oneLine = value => trimmedString(value).replace(/\s*[\r\n]+\s*/gu, " ");
|
|
1535
|
+
const reason = oneLine(discharge.reason);
|
|
1536
|
+
// `id:4242` is how the list writes an account id, not how a release names
|
|
1537
|
+
// one: every reader compares the bare id, so the prefix is dropped here.
|
|
1538
|
+
const listed = stableActorId(discharge.relayedFor);
|
|
1539
|
+
const named = listed.startsWith("id:") ? listed.slice("id:".length) : listed;
|
|
1540
|
+
const relayedFor = /\s/u.test(named) ? "" : named;
|
|
1541
|
+
const declaration = [
|
|
1542
|
+
HUMAN_GATE_RELEASE_MARKER,
|
|
1543
|
+
...(relayedFor.length > 0 ? [`${RELAYED_FOR_KEY}${relayedFor}`] : []),
|
|
1544
|
+
...(reason.length > 0 ? [`${REASON_KEY}${reason}`] : []),
|
|
1545
|
+
].join(" ");
|
|
1374
1546
|
const lines = [declaration, "", "**The hold on this item is lifted.**", ""];
|
|
1375
1547
|
lines.push(
|
|
1376
1548
|
`- What was being asked: ${reason.length > 0 ? reason : "(the hold named no reason)"}`
|
|
1377
1549
|
);
|
|
1378
|
-
const decision =
|
|
1550
|
+
const decision = oneLine(discharge.decision);
|
|
1379
1551
|
if (decision.length > 0) lines.push(`- What was decided: ${decision}`);
|
|
1380
|
-
const decidedBy =
|
|
1552
|
+
const decidedBy = oneLine(discharge.decidedBy);
|
|
1381
1553
|
if (decidedBy.length > 0) lines.push(`- Decided by: ${decidedBy}`);
|
|
1382
1554
|
lines.push(
|
|
1383
1555
|
"- What happens next: this item goes back into the queue that agents build from."
|
|
@@ -27,6 +27,13 @@
|
|
|
27
27
|
* person, so it cannot answer a question or release a human hold: those
|
|
28
28
|
* readers drop it (`idComparableValues`, the answer matcher), and the
|
|
29
29
|
* validator refuses it in `operatorIds` and `trustedReleaseIds`.
|
|
30
|
+
* - `relay:<account id>` names an automation account that may RELAY a trusted
|
|
31
|
+
* person's hold release (CodySwannGT/lisa#5190), and is meaningful only in
|
|
32
|
+
* `trustedReleaseIds`. It is not a person. It matches nobody in any
|
|
33
|
+
* people-matching reader (there is no `relay` field to match), so it can
|
|
34
|
+
* never be an operator, author dispatched work, or answer a question. Only
|
|
35
|
+
* the hold-release check reads it, through {@link releaseComparableValues},
|
|
36
|
+
* and there it counts only for a release line that names a trusted person.
|
|
30
37
|
* - A plain entry (no prefix) keeps exactly the meaning each reader gave it
|
|
31
38
|
* before kind-keyed entries existed. Changing that is a later, breaking
|
|
32
39
|
* change.
|
|
@@ -49,7 +56,12 @@
|
|
|
49
56
|
*/
|
|
50
57
|
|
|
51
58
|
/** The kinds a prefixed entry may name. */
|
|
52
|
-
export const ID_ENTRY_KINDS = Object.freeze([
|
|
59
|
+
export const ID_ENTRY_KINDS = Object.freeze([
|
|
60
|
+
"login",
|
|
61
|
+
"id",
|
|
62
|
+
"integration",
|
|
63
|
+
"relay",
|
|
64
|
+
]);
|
|
53
65
|
|
|
54
66
|
/** A letters-only prefix at the start of an entry. */
|
|
55
67
|
const PREFIX = /^([A-Za-z]+):/;
|
|
@@ -61,7 +73,7 @@ const PREFIX = /^([A-Za-z]+):/;
|
|
|
61
73
|
const PLAIN_ID_STARTS = new Set(["qm"]);
|
|
62
74
|
|
|
63
75
|
/**
|
|
64
|
-
* @typedef {{ kind: "login" | "id" | "integration" | "plain", value: string }
|
|
76
|
+
* @typedef {{ kind: "login" | "id" | "integration" | "relay" | "plain", value: string }
|
|
65
77
|
* | { kind: "invalid", problem: "unknown-prefix" | "empty-value", prefix: string }} IdEntry
|
|
66
78
|
*/
|
|
67
79
|
|
|
@@ -131,3 +143,30 @@ export function idComparableValues(entries) {
|
|
|
131
143
|
.filter(entry => entry.kind === "plain" || entry.kind === "id")
|
|
132
144
|
.map(entry => entry.value);
|
|
133
145
|
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* What the hold-release check compares: the people an id-only comparator may
|
|
149
|
+
* hold ({@link idComparableValues}), then each relay account written back as
|
|
150
|
+
* `relay:<id>`. The release check in `intake-blocker-reprobe.mjs` reads a
|
|
151
|
+
* `relay:` entry as an account that may post a release for one of the people
|
|
152
|
+
* in the same list, and never as a person. Only release readers call this:
|
|
153
|
+
* passing its output to a reader that matches people would be harmless (no
|
|
154
|
+
* account id starts with `relay:`), and passing {@link idComparableValues} to
|
|
155
|
+
* a release reader silently drops every configured relay.
|
|
156
|
+
* @param {unknown} entries - The configured release list
|
|
157
|
+
* @returns {string[]} Person ids, then `relay:<id>` entries
|
|
158
|
+
*/
|
|
159
|
+
export function releaseComparableValues(entries) {
|
|
160
|
+
return [
|
|
161
|
+
// The release check reads any value that starts `relay:` as a relay. Only
|
|
162
|
+
// an entry WRITTEN as `relay:<id>` may be one, so a person value that
|
|
163
|
+
// would read that way (`id:relay:9`, or ` relay:9` with a space in front)
|
|
164
|
+
// is dropped: it names nobody, and validation refuses it.
|
|
165
|
+
...idComparableValues(entries).filter(
|
|
166
|
+
value => !value.trim().toLowerCase().startsWith("relay:")
|
|
167
|
+
),
|
|
168
|
+
...parseIdEntries(entries)
|
|
169
|
+
.filter(entry => entry.kind === "relay")
|
|
170
|
+
.map(entry => `relay:${entry.value}`),
|
|
171
|
+
];
|
|
172
|
+
}
|