@codyswann/lisa 4.101.7 → 4.101.9

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.
Files changed (127) hide show
  1. package/all/copy-overwrite/scripts/lisa-work-item.mjs +27 -5
  2. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +1 -1
  3. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  4. package/dist/core/lisa-owned-hash-ledger.js +10 -0
  5. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  6. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  7. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  8. package/dist/core/upstream-evidence-manifest.js +18 -9
  9. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  10. package/package.json +4 -4
  11. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  12. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  13. package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +10 -2
  14. package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +1 -1
  15. package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +1 -1
  16. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +28 -15
  17. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-evidence/SKILL.md +1 -1
  18. package/plugins/lisa/.codex-plugin/skills/lisa-tracker-evidence/references/completion-authorization.md +2 -2
  19. package/plugins/lisa/rules/reference/tracked-work.md +1 -1
  20. package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +10 -2
  21. package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +1 -1
  22. package/plugins/lisa/skills/lisa-implement/SKILL.md +1 -1
  23. package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +28 -15
  24. package/plugins/lisa/skills/lisa-tracker-evidence/SKILL.md +1 -1
  25. package/plugins/lisa/skills/lisa-tracker-evidence/references/completion-authorization.md +2 -2
  26. package/plugins/lisa-agy/plugin.json +1 -1
  27. package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +10 -2
  28. package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +1 -1
  29. package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +1 -1
  30. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +28 -15
  31. package/plugins/lisa-agy/skills/lisa-tracker-evidence/SKILL.md +1 -1
  32. package/plugins/lisa-agy/skills/lisa-tracker-evidence/references/completion-authorization.md +2 -2
  33. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  35. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  36. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  40. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-copilot/rules/reference/tracked-work.md +1 -1
  42. package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +10 -2
  43. package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +1 -1
  44. package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +1 -1
  45. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +28 -15
  46. package/plugins/lisa-copilot/skills/lisa-tracker-evidence/SKILL.md +1 -1
  47. package/plugins/lisa-copilot/skills/lisa-tracker-evidence/references/completion-authorization.md +2 -2
  48. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-cursor/rules/tracked-work-reference.mdc +1 -1
  50. package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +10 -2
  51. package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +1 -1
  52. package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +1 -1
  53. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +28 -15
  54. package/plugins/lisa-cursor/skills/lisa-tracker-evidence/SKILL.md +1 -1
  55. package/plugins/lisa-cursor/skills/lisa-tracker-evidence/references/completion-authorization.md +2 -2
  56. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  58. package/plugins/lisa-devin/rules/reference/tracked-work.md +1 -1
  59. package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +10 -2
  60. package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +1 -1
  61. package/plugins/lisa-devin/skills/lisa-implement/SKILL.md +1 -1
  62. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +28 -15
  63. package/plugins/lisa-devin/skills/lisa-tracker-evidence/SKILL.md +1 -1
  64. package/plugins/lisa-devin/skills/lisa-tracker-evidence/references/completion-authorization.md +2 -2
  65. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  67. package/plugins/lisa-expo-agy/plugin.json +1 -1
  68. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  72. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  74. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  75. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  79. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  81. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  82. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  86. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  87. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  88. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  89. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  90. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  92. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  93. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  94. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  95. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  96. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  97. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  99. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  100. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  101. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  102. package/plugins/lisa-rails-agy/plugin.json +1 -1
  103. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  104. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  105. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  106. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  107. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  108. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  109. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  110. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  111. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  112. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  114. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  115. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  116. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  117. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  118. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  119. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  120. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  121. package/plugins/src/base/rules/reference/tracked-work.md +1 -1
  122. package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +10 -2
  123. package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +1 -1
  124. package/plugins/src/base/skills/lisa-implement/SKILL.md +1 -1
  125. package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +28 -15
  126. package/plugins/src/base/skills/lisa-tracker-evidence/SKILL.md +1 -1
  127. package/plugins/src/base/skills/lisa-tracker-evidence/references/completion-authorization.md +2 -2
package/package.json CHANGED
@@ -196,7 +196,7 @@
196
196
  "qs": "^6.16.0"
197
197
  },
198
198
  "name": "@codyswann/lisa",
199
- "version": "4.101.7",
199
+ "version": "4.101.9",
200
200
  "description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
201
201
  "main": "dist/index.js",
202
202
  "exports": {
@@ -359,7 +359,7 @@
359
359
  "test": "tests"
360
360
  },
361
361
  "types": "./dist/index.d.ts",
362
- "lisaReleaseCommit": "4fbde6150cd5e835e0646037c6c6ae9158077536",
363
- "gitHead": "4fbde6150cd5e835e0646037c6c6ae9158077536",
364
- "lisaReleaseTag": "v4.101.7"
362
+ "lisaReleaseCommit": "c3803130f7826bcf2e4694c78781a2da7b1d552e",
363
+ "gitHead": "c3803130f7826bcf2e4694c78781a2da7b1d552e",
364
+ "lisaReleaseTag": "v4.101.9"
365
365
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.101.7",
3
+ "version": "4.101.9",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.101.7",
3
+ "version": "4.101.9",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1605,10 +1605,10 @@ merge, confirming that sync ran satisfies this step.
1605
1605
  Run this once the PR reports `MERGED` and the ancestry check has passed:
1606
1606
 
1607
1607
  ```
1608
- node scripts/lisa-work-item.mjs complete --ref <work-item> --pr-url <merged-pr-url>
1608
+ node scripts/lisa-work-item.mjs finish --ref <work-item> --pr-url <merged-pr-url>
1609
1609
  ```
1610
1610
 
1611
- resolving the script the usual three ways (installed package, host `scripts/`,
1611
+ Resolve the script the usual three ways (installed package, host `scripts/`,
1612
1612
  this repo's own tree). Always pass the canonical GitHub pull-request URL shown
1613
1613
  by the merge read. The Linear writer requires that exact evidence, verifies the
1614
1614
  pull request is merged in the current repository, confirms the managed tracker
@@ -1616,6 +1616,14 @@ backlink, writes the team's resolved completed-type state, and immediately
1616
1616
  rereads the issue before reporting success. The GitHub writer accepts the same
1617
1617
  invocation, so this command does not need a tracker-specific branch.
1618
1618
 
1619
+ `finish` is the spelling to use. `complete` is accepted as a permanent alias
1620
+ for the identical operation, but some agent harnesses — Claude Code's worktree
1621
+ isolation among them — refuse any command line containing the bare token
1622
+ `complete`, because it names a shell builtin that can run a string as a command.
1623
+ A `Usage:` refusal that does not list `finish` means the host's copied script
1624
+ predates it: run `lisa apply` to refresh it, or use `complete` where the
1625
+ harness allows that token. Neither is a reason to close by hand.
1626
+
1619
1627
  **This step exists because the previous arrangement did not work, measured.**
1620
1628
  The instruction to move a work item to its terminal role lived in
1621
1629
  `lisa-git-submit-pr`, in a section reached *after* that skill delegates the
@@ -667,7 +667,7 @@ gh issue comment <number> --repo <org>/<repo> --body "[claude-build-intake] Buil
667
667
 
668
668
  The ordering is the point. Announcing before verifying leaves a public "Build complete" on an item whose lifecycle state was never confirmed, and a reader has no way to tell that claim apart from a verified one — the same indistinguishability the readback exists to prevent. On a failed readback, comment the Error instead.
669
669
 
670
- `node scripts/lisa-work-item.mjs complete --ref <org>/<repo>#<number>` performs this whole terminal sequence — merged-PR evidence check, full role reconciliation, close, independent readback — in one step, and is the preferred path whenever `$DONE` is the terminal value. It also decides for itself whether `$DONE` is terminal here: it resolves each merged PR's base branch through `.lisa.config.json` `deploy.branches`, so a merge into an intermediate env branch records that env's role WITHOUT closing the issue, and a merge into a branch the project does not deploy records nothing and says which base it saw. The manual commands above remain available for an intermediate env transition performed without merge evidence.
670
+ `node scripts/lisa-work-item.mjs finish --ref <org>/<repo>#<number>` (`complete` is a permanent alias some harnesses refuse) performs this whole terminal sequence — merged-PR evidence check, full role reconciliation, close, independent readback — in one step, and is the preferred path whenever `$DONE` is the terminal value. It also decides for itself whether `$DONE` is terminal here: it resolves each merged PR's base branch through `.lisa.config.json` `deploy.branches`, so a merge into an intermediate env branch records that env's role WITHOUT closing the issue, and a merge into a branch the project does not deploy records nothing and says which base it saw. The manual commands above remain available for an intermediate env transition performed without merge evidence.
671
671
 
672
672
  For any non-Success outcome, do NOT transition. The issue sits in `$CLAIMED` (or wherever the lifecycle left it) — humans take it from there.
673
673
 
@@ -397,6 +397,6 @@ Before shutting down the team, execute the Verify flow:
397
397
  13. `ops-specialist`: post-deploy health check via `lisa-monitor <env> --report-only`, 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 this flow.
398
398
  14. If remote verification fails, create a task for the agent team to find out why it failed, fix it and return to step 5. **Bound this loop**: after a small number of full fix→deploy→reverify cycles without reaching a passing remote verdict (treat ~3 as the ceiling unless the work item states otherwise), stop retrying — file a build-ready fix ticket, write the verdict with `status: "blocked"` and the diagnosis, and move the work item to blocked rather than looping indefinitely. The completion gate releases on a `blocked` verdict, so the flow ends with a recorded outcome instead of a silent spin or a self-declared success.
399
399
  15. **Post evidence to the originating work item** via `lisa-tracker-evidence` (vendor-neutral; dispatches to `lisa-jira-evidence`, `lisa-github-evidence`, or `lisa-linear-evidence` per `.lisa.config.json` `tracker`), including the list of codified tests added on this branch. **If the work is UI-visible** (any verification step ran in a browser, or the change touches a user-facing surface), author `evidence/comment.md` per the **UI Evidence Checklist** in `lisa-tracker-evidence` — numbered live-session steps, one screenshot per step captured through the interactive browser controller and uploaded to the configured GitHub evidence release (default `pr-assets`) as plain URLs, and an explicit invitation to be corrected. This step is what makes the proof visible to a non-technical operator standing at the gate; a terminal work item with no posted evidence is an incomplete flow, not a finished one.
400
- 16. After true terminal completion — required merge/deploy/verification passed, usage/evidence and two-way PR linkage are recorded, and the work item is terminal — run `node scripts/lisa-work-item.mjs clear`, delete the work-item context file (`rm -f .lisa/work-item-context.md` from the worktree root) so comment-borne secrets do not outlive the work, and verify the worktree has no current binding and no context file. Do not clear on an interruption or blocked outcome; preserving the binding is what keeps resumed work attributable.
400
+ 16. After true terminal completion — required merge/deploy/verification passed, usage/evidence and two-way PR linkage are recorded, and the work item is terminal (terminal completion is `lisa-work-item.mjs finish`, run by `lisa-drive-pr-to-merge` §3d) — run `node scripts/lisa-work-item.mjs clear`, delete the work-item context file (`rm -f .lisa/work-item-context.md` from the worktree root) so comment-borne secrets do not outlive the work, and verify the worktree has no current binding and no context file. Do not clear on an interruption or blocked outcome; preserving the binding is what keeps resumed work attributable.
401
401
 
402
402
  **Ticket status transitions throughout this flow are config-bound** per the **Tracker status vocabulary** section of the `config-resolution` rule: whoever performs the tracker write — the lead included, in runtimes where the tracker MCP is lead-only — may only target statuses named in the configured workflow map (`claimed`, `blocked`, env-keyed `done`, and `review`/`qa` when configured). Never adopt a status discovered from the tracker's live workflow; a lifecycle stage with no configured status gets a comment, not a transition.
@@ -843,44 +843,58 @@ function botTokenProblem(path) {
843
843
  ];
844
844
  }
845
845
 
846
+ /**
847
+ * Strip every leading `login:` / `id:` prefix from an entry, so a value
848
+ * stacked behind several (`login:id:<v>`) is reached (CodySwannGT/lisa#4754).
849
+ * @param {string} entry One entry, already trimmed.
850
+ * @returns {string} The value after the last known prefix, trimmed.
851
+ */
852
+ function stripIdEntryPrefixes(entry) {
853
+ const prefix = ID_ENTRY_PREFIX.exec(entry)?.[1];
854
+ return prefix !== undefined && ID_ENTRY_KINDS.has(prefix)
855
+ ? stripIdEntryPrefixes(entry.slice(prefix.length + 1).trim())
856
+ : entry;
857
+ }
858
+
846
859
  /**
847
860
  * Scan one `operatorIds` / `trustedAuthorIds` entry for a bot token
848
861
  * (CodySwannGT/lisa#4719).
849
862
  *
850
- * The value after a `login:` / `id:` prefix is what gets tested, since a
851
- * token pasted behind a prefix is as leaked as a bare one. A legacy Jira
852
- * accountId (`557058:<uuid>`) is token-shaped but is a real id, so it passes.
863
+ * The value after one or more `login:` / `id:` prefixes is what gets tested,
864
+ * since a token pasted behind a prefix (or a stack of them, such as
865
+ * `login:id:<token>`; CodySwannGT/lisa#4754) is as leaked as a bare one. A
866
+ * legacy Jira accountId (`557058:<uuid>`) is token-shaped but is a real id,
867
+ * so it passes.
853
868
  * @param {string} entry One entry.
854
869
  * @param {string} path Where the entry sits.
855
870
  * @returns {string[]} Problems found.
856
871
  */
857
872
  function idEntryCredentials(entry, path) {
858
- const trimmed = entry.trim();
859
- const prefix = ID_ENTRY_PREFIX.exec(trimmed)?.[1];
860
- const value =
861
- prefix !== undefined && ID_ENTRY_KINDS.has(prefix)
862
- ? trimmed.slice(prefix.length + 1).trim()
863
- : trimmed;
873
+ const value = stripIdEntryPrefixes(entry.trim());
864
874
  return TOKEN_VALUE.test(value) && !JIRA_LEGACY_ACCOUNT_ID.test(value)
865
875
  ? botTokenProblem(path)
866
876
  : [];
867
877
  }
868
878
 
869
879
  /**
870
- * Refuse each malformed kind-keyed entry, naming it. A reader matches such an
871
- * entry against nobody, so accepting it would silently drop a person.
880
+ * Refuse each malformed kind-keyed entry, naming its location and prefix. A
881
+ * reader matches such an entry against nobody, so accepting it would silently
882
+ * drop a person. The refusal never repeats the entry's value: a token pasted
883
+ * behind an unknown prefix (`ID:<token>`) would otherwise land in terminals,
884
+ * CI logs and transcripts (CodySwannGT/lisa#4754).
872
885
  * @param {string} key `operatorIds` or `trustedAuthorIds`.
873
886
  * @param {readonly string[]} ids Entries, already known to be strings.
874
887
  * @returns {string[]} Problems found.
875
888
  */
876
889
  function idEntryProblems(key, ids) {
877
890
  const prefixOf = entry => `${ID_ENTRY_PREFIX.exec(entry)[1]}:`;
878
- return ids.flatMap(entry => {
891
+ return ids.flatMap((entry, i) => {
879
892
  const kind = classifyIdEntry(entry);
893
+ const path = `sessionManager.${key}[${i}]`;
880
894
  if (kind === "unknown-prefix") {
881
895
  const prefix = prefixOf(entry);
882
896
  return [
883
- `sessionManager.${key} entry ${JSON.stringify(entry)} has an ` +
897
+ `${path} has an ` +
884
898
  `unknown prefix ${JSON.stringify(prefix)}. Use login:<GitHub ` +
885
899
  `login>, id:<numeric or tracker account id>, or a plain id; write ` +
886
900
  `a tracker id that itself starts with letters and a colon as ` +
@@ -889,8 +903,7 @@ function idEntryProblems(key, ids) {
889
903
  }
890
904
  return kind === "empty-value"
891
905
  ? [
892
- `sessionManager.${key} entry ${JSON.stringify(entry)} has an ` +
893
- `empty value after ${JSON.stringify(prefixOf(entry))}: name the ` +
906
+ `${path} has an empty value after ${JSON.stringify(prefixOf(entry))}: name the ` +
894
907
  `login or id after the prefix.`,
895
908
  ]
896
909
  : [];
@@ -30,7 +30,7 @@ omit the plugin rules tree; do not assume a runtime-specific rules directory.
30
30
  - `linear` → invoke `lisa-linear-evidence` with `$ARGUMENTS` verbatim. Arg shape: `<IDENTIFIER> <EVIDENCE_DIR>` where `IDENTIFIER` is a Linear Issue identifier (e.g., `ENG-123`).
31
31
  - Anything else → stop and report `"Unknown tracker '<value>' in .lisa.config.json. Expected 'jira', 'github', or 'linear'."`
32
32
  5. For supported GitHub/Linear production completion, after actual uploads and exact native readbacks, prepare the accepted-for-completion input from the observed source/delivery, schema2 verdicts, actual typed attachment pointers, complete requirement conjunction map, structured CONFORMS report, canonical Verify usage, linkage and explicit acceptance. Apply the shipped `completion-authorization` reference; the executable validates the contract in every installed host. Run `node scripts/lisa-work-item.mjs publish-completion-proof --ref <exact-work-item> --record <evidence-dir>/completion-record.json`. It uploads immutable hash-named acceptance bytes to the implementation repository's configured evidence release, reads them back and publishes the exact-item native locator. Never construct a locator manually or treat a narrative evidence comment as acceptance. Jira completion remains unsupported.
33
- 6. Pass through both the vendor output and actual producer category. `published/pending-producer` means the pinned configured automation attempt must finish successfully before completion; do not rewrite the asset after the job or invent a successful future outcome. A User publisher does not require a producer workflow run. Only after accepted publication may the canonical lifecycle owner retry `complete`; pending proof preserves ownership and state and names the Verify/evidence action. Capture actual terminal readback/usage acceptedAt afterward, not as a circular publication prerequisite. A required pending-state journey artifact is immutable Phase-A proof captured before completion; the later actual terminal readback is a separate Phase-B supplement.
33
+ 6. Pass through both the vendor output and actual producer category. `published/pending-producer` means the pinned configured automation attempt must finish successfully before completion; do not rewrite the asset after the job or invent a successful future outcome. A User publisher does not require a producer workflow run. Only after accepted publication may the canonical lifecycle owner retry `finish`; pending proof preserves ownership and state and names the Verify/evidence action. Capture actual terminal readback/usage acceptedAt afterward, not as a circular publication prerequisite. A required pending-state journey artifact is immutable Phase-A proof captured before completion; the later actual terminal readback is a separate Phase-B supplement.
34
34
 
35
35
  ## Rules
36
36
 
@@ -1,7 +1,7 @@
1
1
  # Accepted completion proof
2
2
 
3
3
  Merging a pull request makes work available for delivery. It does not authorize
4
- closing the work item. The canonical `scripts/lisa-work-item.mjs complete` and
4
+ closing the work item. The canonical `scripts/lisa-work-item.mjs finish` (alias `complete`) and
5
5
  GitHub applying sweep require the same accepted-for-completion record before
6
6
  adding a terminal label, removing competing lifecycle labels, closing an issue,
7
7
  or changing a Linear item to its terminal state. Jira completion remains
@@ -125,7 +125,7 @@ with at most 100 pages or 10,000 comments can still exceed its byte ceiling and
125
125
  must fail closed without a lifecycle write. Visible local evidence markers
126
126
  claim attachments; fenced or indented examples and HTML comments do not.
127
127
 
128
- An ordinary pending result from `complete` or the applying sweep exits zero
128
+ An ordinary pending result from `finish` or the applying sweep exits zero
129
129
  because it preserves the nonterminal state. A refused `publish-completion-proof`
130
130
  exits nonzero when no locator was published. A successful bot publication with
131
131
  category `published/pending-producer` remains a successful publication; only
@@ -13,7 +13,7 @@ Use `lisa-track` as the single entry point:
13
13
  3. Idempotently claim the resolved leaf through `lisa-tracker-claim`, which reuses the vendor build-intake claim semantics and post-read verifies the claimed-or-later state.
14
14
  4. Before any durable repository work, persist the canonical reference with `node scripts/lisa-work-item.mjs link <ref>` and verify the worktree-local binding.
15
15
 
16
- `link` is the spelling to use. `bind` is accepted as a permanent alias for the identical operation, but some agent harnesses — Claude Code's worktree isolation among them — refuse any command line containing the bare token `bind`, because it names a shell builtin that evaluates a string. Inside an isolated worktree that refusal makes the `bind` spelling unrunnable, so reach for `link` and never work around a blocked binding by hand-writing `Work-Item:` trailers.
16
+ `link` is the spelling to use. `bind` is accepted as a permanent alias for the identical operation, but some agent harnesses — Claude Code's worktree isolation among them — refuse any command line containing the bare token `bind`, because it names a shell builtin that evaluates a string. Inside an isolated worktree that refusal makes the `bind` spelling unrunnable, so reach for `link` and never work around a blocked binding by hand-writing `Work-Item:` trailers. The same holds for terminal completion: `finish` is the spelling to use, and `complete` is its permanent alias that those harnesses refuse for the same reason.
17
17
 
18
18
  The sequence is strict: **live validate/create -> claim -> link -> durable work**. A tracker answer of no, and any claim or binding failure, blocks the work. A tracker that cannot be reached — `gh` absent, or its credential refused — does not block a commit: the offline checks still run, the skip is loud on stderr, and the required `Work-Item Traceability` check re-runs the live checks with credentials before anything merges. Any other tracker failure still blocks. Tool presence or stale session text is not access.
19
19
 
@@ -1603,10 +1603,10 @@ merge, confirming that sync ran satisfies this step.
1603
1603
  Run this once the PR reports `MERGED` and the ancestry check has passed:
1604
1604
 
1605
1605
  ```
1606
- node scripts/lisa-work-item.mjs complete --ref <work-item> --pr-url <merged-pr-url>
1606
+ node scripts/lisa-work-item.mjs finish --ref <work-item> --pr-url <merged-pr-url>
1607
1607
  ```
1608
1608
 
1609
- resolving the script the usual three ways (installed package, host `scripts/`,
1609
+ Resolve the script the usual three ways (installed package, host `scripts/`,
1610
1610
  this repo's own tree). Always pass the canonical GitHub pull-request URL shown
1611
1611
  by the merge read. The Linear writer requires that exact evidence, verifies the
1612
1612
  pull request is merged in the current repository, confirms the managed tracker
@@ -1614,6 +1614,14 @@ backlink, writes the team's resolved completed-type state, and immediately
1614
1614
  rereads the issue before reporting success. The GitHub writer accepts the same
1615
1615
  invocation, so this command does not need a tracker-specific branch.
1616
1616
 
1617
+ `finish` is the spelling to use. `complete` is accepted as a permanent alias
1618
+ for the identical operation, but some agent harnesses — Claude Code's worktree
1619
+ isolation among them — refuse any command line containing the bare token
1620
+ `complete`, because it names a shell builtin that can run a string as a command.
1621
+ A `Usage:` refusal that does not list `finish` means the host's copied script
1622
+ predates it: run `lisa apply` to refresh it, or use `complete` where the
1623
+ harness allows that token. Neither is a reason to close by hand.
1624
+
1617
1625
  **This step exists because the previous arrangement did not work, measured.**
1618
1626
  The instruction to move a work item to its terminal role lived in
1619
1627
  `lisa-git-submit-pr`, in a section reached *after* that skill delegates the
@@ -665,7 +665,7 @@ gh issue comment <number> --repo <org>/<repo> --body "[claude-build-intake] Buil
665
665
 
666
666
  The ordering is the point. Announcing before verifying leaves a public "Build complete" on an item whose lifecycle state was never confirmed, and a reader has no way to tell that claim apart from a verified one — the same indistinguishability the readback exists to prevent. On a failed readback, comment the Error instead.
667
667
 
668
- `node scripts/lisa-work-item.mjs complete --ref <org>/<repo>#<number>` performs this whole terminal sequence — merged-PR evidence check, full role reconciliation, close, independent readback — in one step, and is the preferred path whenever `$DONE` is the terminal value. It also decides for itself whether `$DONE` is terminal here: it resolves each merged PR's base branch through `.lisa.config.json` `deploy.branches`, so a merge into an intermediate env branch records that env's role WITHOUT closing the issue, and a merge into a branch the project does not deploy records nothing and says which base it saw. The manual commands above remain available for an intermediate env transition performed without merge evidence.
668
+ `node scripts/lisa-work-item.mjs finish --ref <org>/<repo>#<number>` (`complete` is a permanent alias some harnesses refuse) performs this whole terminal sequence — merged-PR evidence check, full role reconciliation, close, independent readback — in one step, and is the preferred path whenever `$DONE` is the terminal value. It also decides for itself whether `$DONE` is terminal here: it resolves each merged PR's base branch through `.lisa.config.json` `deploy.branches`, so a merge into an intermediate env branch records that env's role WITHOUT closing the issue, and a merge into a branch the project does not deploy records nothing and says which base it saw. The manual commands above remain available for an intermediate env transition performed without merge evidence.
669
669
 
670
670
  For any non-Success outcome, do NOT transition. The issue sits in `$CLAIMED` (or wherever the lifecycle left it) — humans take it from there.
671
671
 
@@ -395,6 +395,6 @@ Before shutting down the team, execute the Verify flow:
395
395
  13. `ops-specialist`: post-deploy health check via `lisa-monitor <env> --report-only`, 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 this flow.
396
396
  14. If remote verification fails, create a task for the agent team to find out why it failed, fix it and return to step 5. **Bound this loop**: after a small number of full fix→deploy→reverify cycles without reaching a passing remote verdict (treat ~3 as the ceiling unless the work item states otherwise), stop retrying — file a build-ready fix ticket, write the verdict with `status: "blocked"` and the diagnosis, and move the work item to blocked rather than looping indefinitely. The completion gate releases on a `blocked` verdict, so the flow ends with a recorded outcome instead of a silent spin or a self-declared success.
397
397
  15. **Post evidence to the originating work item** via `lisa-tracker-evidence` (vendor-neutral; dispatches to `lisa-jira-evidence`, `lisa-github-evidence`, or `lisa-linear-evidence` per `.lisa.config.json` `tracker`), including the list of codified tests added on this branch. **If the work is UI-visible** (any verification step ran in a browser, or the change touches a user-facing surface), author `evidence/comment.md` per the **UI Evidence Checklist** in `lisa-tracker-evidence` — numbered live-session steps, one screenshot per step captured through the interactive browser controller and uploaded to the configured GitHub evidence release (default `pr-assets`) as plain URLs, and an explicit invitation to be corrected. This step is what makes the proof visible to a non-technical operator standing at the gate; a terminal work item with no posted evidence is an incomplete flow, not a finished one.
398
- 16. After true terminal completion — required merge/deploy/verification passed, usage/evidence and two-way PR linkage are recorded, and the work item is terminal — run `node scripts/lisa-work-item.mjs clear`, delete the work-item context file (`rm -f .lisa/work-item-context.md` from the worktree root) so comment-borne secrets do not outlive the work, and verify the worktree has no current binding and no context file. Do not clear on an interruption or blocked outcome; preserving the binding is what keeps resumed work attributable.
398
+ 16. After true terminal completion — required merge/deploy/verification passed, usage/evidence and two-way PR linkage are recorded, and the work item is terminal (terminal completion is `lisa-work-item.mjs finish`, run by `lisa-drive-pr-to-merge` §3d) — run `node scripts/lisa-work-item.mjs clear`, delete the work-item context file (`rm -f .lisa/work-item-context.md` from the worktree root) so comment-borne secrets do not outlive the work, and verify the worktree has no current binding and no context file. Do not clear on an interruption or blocked outcome; preserving the binding is what keeps resumed work attributable.
399
399
 
400
400
  **Ticket status transitions throughout this flow are config-bound** per the **Tracker status vocabulary** section of the `config-resolution` rule: whoever performs the tracker write — the lead included, in runtimes where the tracker MCP is lead-only — may only target statuses named in the configured workflow map (`claimed`, `blocked`, env-keyed `done`, and `review`/`qa` when configured). Never adopt a status discovered from the tracker's live workflow; a lifecycle stage with no configured status gets a comment, not a transition.
@@ -843,44 +843,58 @@ function botTokenProblem(path) {
843
843
  ];
844
844
  }
845
845
 
846
+ /**
847
+ * Strip every leading `login:` / `id:` prefix from an entry, so a value
848
+ * stacked behind several (`login:id:<v>`) is reached (CodySwannGT/lisa#4754).
849
+ * @param {string} entry One entry, already trimmed.
850
+ * @returns {string} The value after the last known prefix, trimmed.
851
+ */
852
+ function stripIdEntryPrefixes(entry) {
853
+ const prefix = ID_ENTRY_PREFIX.exec(entry)?.[1];
854
+ return prefix !== undefined && ID_ENTRY_KINDS.has(prefix)
855
+ ? stripIdEntryPrefixes(entry.slice(prefix.length + 1).trim())
856
+ : entry;
857
+ }
858
+
846
859
  /**
847
860
  * Scan one `operatorIds` / `trustedAuthorIds` entry for a bot token
848
861
  * (CodySwannGT/lisa#4719).
849
862
  *
850
- * The value after a `login:` / `id:` prefix is what gets tested, since a
851
- * token pasted behind a prefix is as leaked as a bare one. A legacy Jira
852
- * accountId (`557058:<uuid>`) is token-shaped but is a real id, so it passes.
863
+ * The value after one or more `login:` / `id:` prefixes is what gets tested,
864
+ * since a token pasted behind a prefix (or a stack of them, such as
865
+ * `login:id:<token>`; CodySwannGT/lisa#4754) is as leaked as a bare one. A
866
+ * legacy Jira accountId (`557058:<uuid>`) is token-shaped but is a real id,
867
+ * so it passes.
853
868
  * @param {string} entry One entry.
854
869
  * @param {string} path Where the entry sits.
855
870
  * @returns {string[]} Problems found.
856
871
  */
857
872
  function idEntryCredentials(entry, path) {
858
- const trimmed = entry.trim();
859
- const prefix = ID_ENTRY_PREFIX.exec(trimmed)?.[1];
860
- const value =
861
- prefix !== undefined && ID_ENTRY_KINDS.has(prefix)
862
- ? trimmed.slice(prefix.length + 1).trim()
863
- : trimmed;
873
+ const value = stripIdEntryPrefixes(entry.trim());
864
874
  return TOKEN_VALUE.test(value) && !JIRA_LEGACY_ACCOUNT_ID.test(value)
865
875
  ? botTokenProblem(path)
866
876
  : [];
867
877
  }
868
878
 
869
879
  /**
870
- * Refuse each malformed kind-keyed entry, naming it. A reader matches such an
871
- * entry against nobody, so accepting it would silently drop a person.
880
+ * Refuse each malformed kind-keyed entry, naming its location and prefix. A
881
+ * reader matches such an entry against nobody, so accepting it would silently
882
+ * drop a person. The refusal never repeats the entry's value: a token pasted
883
+ * behind an unknown prefix (`ID:<token>`) would otherwise land in terminals,
884
+ * CI logs and transcripts (CodySwannGT/lisa#4754).
872
885
  * @param {string} key `operatorIds` or `trustedAuthorIds`.
873
886
  * @param {readonly string[]} ids Entries, already known to be strings.
874
887
  * @returns {string[]} Problems found.
875
888
  */
876
889
  function idEntryProblems(key, ids) {
877
890
  const prefixOf = entry => `${ID_ENTRY_PREFIX.exec(entry)[1]}:`;
878
- return ids.flatMap(entry => {
891
+ return ids.flatMap((entry, i) => {
879
892
  const kind = classifyIdEntry(entry);
893
+ const path = `sessionManager.${key}[${i}]`;
880
894
  if (kind === "unknown-prefix") {
881
895
  const prefix = prefixOf(entry);
882
896
  return [
883
- `sessionManager.${key} entry ${JSON.stringify(entry)} has an ` +
897
+ `${path} has an ` +
884
898
  `unknown prefix ${JSON.stringify(prefix)}. Use login:<GitHub ` +
885
899
  `login>, id:<numeric or tracker account id>, or a plain id; write ` +
886
900
  `a tracker id that itself starts with letters and a colon as ` +
@@ -889,8 +903,7 @@ function idEntryProblems(key, ids) {
889
903
  }
890
904
  return kind === "empty-value"
891
905
  ? [
892
- `sessionManager.${key} entry ${JSON.stringify(entry)} has an ` +
893
- `empty value after ${JSON.stringify(prefixOf(entry))}: name the ` +
906
+ `${path} has an empty value after ${JSON.stringify(prefixOf(entry))}: name the ` +
894
907
  `login or id after the prefix.`,
895
908
  ]
896
909
  : [];
@@ -28,7 +28,7 @@ omit the plugin rules tree; do not assume a runtime-specific rules directory.
28
28
  - `linear` → invoke `lisa-linear-evidence` with `$ARGUMENTS` verbatim. Arg shape: `<IDENTIFIER> <EVIDENCE_DIR>` where `IDENTIFIER` is a Linear Issue identifier (e.g., `ENG-123`).
29
29
  - Anything else → stop and report `"Unknown tracker '<value>' in .lisa.config.json. Expected 'jira', 'github', or 'linear'."`
30
30
  5. For supported GitHub/Linear production completion, after actual uploads and exact native readbacks, prepare the accepted-for-completion input from the observed source/delivery, schema2 verdicts, actual typed attachment pointers, complete requirement conjunction map, structured CONFORMS report, canonical Verify usage, linkage and explicit acceptance. Apply the shipped `completion-authorization` reference; the executable validates the contract in every installed host. Run `node scripts/lisa-work-item.mjs publish-completion-proof --ref <exact-work-item> --record <evidence-dir>/completion-record.json`. It uploads immutable hash-named acceptance bytes to the implementation repository's configured evidence release, reads them back and publishes the exact-item native locator. Never construct a locator manually or treat a narrative evidence comment as acceptance. Jira completion remains unsupported.
31
- 6. Pass through both the vendor output and actual producer category. `published/pending-producer` means the pinned configured automation attempt must finish successfully before completion; do not rewrite the asset after the job or invent a successful future outcome. A User publisher does not require a producer workflow run. Only after accepted publication may the canonical lifecycle owner retry `complete`; pending proof preserves ownership and state and names the Verify/evidence action. Capture actual terminal readback/usage acceptedAt afterward, not as a circular publication prerequisite. A required pending-state journey artifact is immutable Phase-A proof captured before completion; the later actual terminal readback is a separate Phase-B supplement.
31
+ 6. Pass through both the vendor output and actual producer category. `published/pending-producer` means the pinned configured automation attempt must finish successfully before completion; do not rewrite the asset after the job or invent a successful future outcome. A User publisher does not require a producer workflow run. Only after accepted publication may the canonical lifecycle owner retry `finish`; pending proof preserves ownership and state and names the Verify/evidence action. Capture actual terminal readback/usage acceptedAt afterward, not as a circular publication prerequisite. A required pending-state journey artifact is immutable Phase-A proof captured before completion; the later actual terminal readback is a separate Phase-B supplement.
32
32
 
33
33
  ## Rules
34
34
 
@@ -1,7 +1,7 @@
1
1
  # Accepted completion proof
2
2
 
3
3
  Merging a pull request makes work available for delivery. It does not authorize
4
- closing the work item. The canonical `scripts/lisa-work-item.mjs complete` and
4
+ closing the work item. The canonical `scripts/lisa-work-item.mjs finish` (alias `complete`) and
5
5
  GitHub applying sweep require the same accepted-for-completion record before
6
6
  adding a terminal label, removing competing lifecycle labels, closing an issue,
7
7
  or changing a Linear item to its terminal state. Jira completion remains
@@ -125,7 +125,7 @@ with at most 100 pages or 10,000 comments can still exceed its byte ceiling and
125
125
  must fail closed without a lifecycle write. Visible local evidence markers
126
126
  claim attachments; fenced or indented examples and HTML comments do not.
127
127
 
128
- An ordinary pending result from `complete` or the applying sweep exits zero
128
+ An ordinary pending result from `finish` or the applying sweep exits zero
129
129
  because it preserves the nonterminal state. A refused `publish-completion-proof`
130
130
  exits nonzero when no locator was published. A successful bot publication with
131
131
  category `published/pending-producer` remains a successful publication; only
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "4.101.7",
3
+ "version": "4.101.9",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1603,10 +1603,10 @@ merge, confirming that sync ran satisfies this step.
1603
1603
  Run this once the PR reports `MERGED` and the ancestry check has passed:
1604
1604
 
1605
1605
  ```
1606
- node scripts/lisa-work-item.mjs complete --ref <work-item> --pr-url <merged-pr-url>
1606
+ node scripts/lisa-work-item.mjs finish --ref <work-item> --pr-url <merged-pr-url>
1607
1607
  ```
1608
1608
 
1609
- resolving the script the usual three ways (installed package, host `scripts/`,
1609
+ Resolve the script the usual three ways (installed package, host `scripts/`,
1610
1610
  this repo's own tree). Always pass the canonical GitHub pull-request URL shown
1611
1611
  by the merge read. The Linear writer requires that exact evidence, verifies the
1612
1612
  pull request is merged in the current repository, confirms the managed tracker
@@ -1614,6 +1614,14 @@ backlink, writes the team's resolved completed-type state, and immediately
1614
1614
  rereads the issue before reporting success. The GitHub writer accepts the same
1615
1615
  invocation, so this command does not need a tracker-specific branch.
1616
1616
 
1617
+ `finish` is the spelling to use. `complete` is accepted as a permanent alias
1618
+ for the identical operation, but some agent harnesses — Claude Code's worktree
1619
+ isolation among them — refuse any command line containing the bare token
1620
+ `complete`, because it names a shell builtin that can run a string as a command.
1621
+ A `Usage:` refusal that does not list `finish` means the host's copied script
1622
+ predates it: run `lisa apply` to refresh it, or use `complete` where the
1623
+ harness allows that token. Neither is a reason to close by hand.
1624
+
1617
1625
  **This step exists because the previous arrangement did not work, measured.**
1618
1626
  The instruction to move a work item to its terminal role lived in
1619
1627
  `lisa-git-submit-pr`, in a section reached *after* that skill delegates the
@@ -665,7 +665,7 @@ gh issue comment <number> --repo <org>/<repo> --body "[claude-build-intake] Buil
665
665
 
666
666
  The ordering is the point. Announcing before verifying leaves a public "Build complete" on an item whose lifecycle state was never confirmed, and a reader has no way to tell that claim apart from a verified one — the same indistinguishability the readback exists to prevent. On a failed readback, comment the Error instead.
667
667
 
668
- `node scripts/lisa-work-item.mjs complete --ref <org>/<repo>#<number>` performs this whole terminal sequence — merged-PR evidence check, full role reconciliation, close, independent readback — in one step, and is the preferred path whenever `$DONE` is the terminal value. It also decides for itself whether `$DONE` is terminal here: it resolves each merged PR's base branch through `.lisa.config.json` `deploy.branches`, so a merge into an intermediate env branch records that env's role WITHOUT closing the issue, and a merge into a branch the project does not deploy records nothing and says which base it saw. The manual commands above remain available for an intermediate env transition performed without merge evidence.
668
+ `node scripts/lisa-work-item.mjs finish --ref <org>/<repo>#<number>` (`complete` is a permanent alias some harnesses refuse) performs this whole terminal sequence — merged-PR evidence check, full role reconciliation, close, independent readback — in one step, and is the preferred path whenever `$DONE` is the terminal value. It also decides for itself whether `$DONE` is terminal here: it resolves each merged PR's base branch through `.lisa.config.json` `deploy.branches`, so a merge into an intermediate env branch records that env's role WITHOUT closing the issue, and a merge into a branch the project does not deploy records nothing and says which base it saw. The manual commands above remain available for an intermediate env transition performed without merge evidence.
669
669
 
670
670
  For any non-Success outcome, do NOT transition. The issue sits in `$CLAIMED` (or wherever the lifecycle left it) — humans take it from there.
671
671
 
@@ -395,6 +395,6 @@ Before shutting down the team, execute the Verify flow:
395
395
  13. `ops-specialist`: post-deploy health check via `lisa-monitor <env> --report-only`, 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 this flow.
396
396
  14. If remote verification fails, create a task for the agent team to find out why it failed, fix it and return to step 5. **Bound this loop**: after a small number of full fix→deploy→reverify cycles without reaching a passing remote verdict (treat ~3 as the ceiling unless the work item states otherwise), stop retrying — file a build-ready fix ticket, write the verdict with `status: "blocked"` and the diagnosis, and move the work item to blocked rather than looping indefinitely. The completion gate releases on a `blocked` verdict, so the flow ends with a recorded outcome instead of a silent spin or a self-declared success.
397
397
  15. **Post evidence to the originating work item** via `lisa-tracker-evidence` (vendor-neutral; dispatches to `lisa-jira-evidence`, `lisa-github-evidence`, or `lisa-linear-evidence` per `.lisa.config.json` `tracker`), including the list of codified tests added on this branch. **If the work is UI-visible** (any verification step ran in a browser, or the change touches a user-facing surface), author `evidence/comment.md` per the **UI Evidence Checklist** in `lisa-tracker-evidence` — numbered live-session steps, one screenshot per step captured through the interactive browser controller and uploaded to the configured GitHub evidence release (default `pr-assets`) as plain URLs, and an explicit invitation to be corrected. This step is what makes the proof visible to a non-technical operator standing at the gate; a terminal work item with no posted evidence is an incomplete flow, not a finished one.
398
- 16. After true terminal completion — required merge/deploy/verification passed, usage/evidence and two-way PR linkage are recorded, and the work item is terminal — run `node scripts/lisa-work-item.mjs clear`, delete the work-item context file (`rm -f .lisa/work-item-context.md` from the worktree root) so comment-borne secrets do not outlive the work, and verify the worktree has no current binding and no context file. Do not clear on an interruption or blocked outcome; preserving the binding is what keeps resumed work attributable.
398
+ 16. After true terminal completion — required merge/deploy/verification passed, usage/evidence and two-way PR linkage are recorded, and the work item is terminal (terminal completion is `lisa-work-item.mjs finish`, run by `lisa-drive-pr-to-merge` §3d) — run `node scripts/lisa-work-item.mjs clear`, delete the work-item context file (`rm -f .lisa/work-item-context.md` from the worktree root) so comment-borne secrets do not outlive the work, and verify the worktree has no current binding and no context file. Do not clear on an interruption or blocked outcome; preserving the binding is what keeps resumed work attributable.
399
399
 
400
400
  **Ticket status transitions throughout this flow are config-bound** per the **Tracker status vocabulary** section of the `config-resolution` rule: whoever performs the tracker write — the lead included, in runtimes where the tracker MCP is lead-only — may only target statuses named in the configured workflow map (`claimed`, `blocked`, env-keyed `done`, and `review`/`qa` when configured). Never adopt a status discovered from the tracker's live workflow; a lifecycle stage with no configured status gets a comment, not a transition.
@@ -843,44 +843,58 @@ function botTokenProblem(path) {
843
843
  ];
844
844
  }
845
845
 
846
+ /**
847
+ * Strip every leading `login:` / `id:` prefix from an entry, so a value
848
+ * stacked behind several (`login:id:<v>`) is reached (CodySwannGT/lisa#4754).
849
+ * @param {string} entry One entry, already trimmed.
850
+ * @returns {string} The value after the last known prefix, trimmed.
851
+ */
852
+ function stripIdEntryPrefixes(entry) {
853
+ const prefix = ID_ENTRY_PREFIX.exec(entry)?.[1];
854
+ return prefix !== undefined && ID_ENTRY_KINDS.has(prefix)
855
+ ? stripIdEntryPrefixes(entry.slice(prefix.length + 1).trim())
856
+ : entry;
857
+ }
858
+
846
859
  /**
847
860
  * Scan one `operatorIds` / `trustedAuthorIds` entry for a bot token
848
861
  * (CodySwannGT/lisa#4719).
849
862
  *
850
- * The value after a `login:` / `id:` prefix is what gets tested, since a
851
- * token pasted behind a prefix is as leaked as a bare one. A legacy Jira
852
- * accountId (`557058:<uuid>`) is token-shaped but is a real id, so it passes.
863
+ * The value after one or more `login:` / `id:` prefixes is what gets tested,
864
+ * since a token pasted behind a prefix (or a stack of them, such as
865
+ * `login:id:<token>`; CodySwannGT/lisa#4754) is as leaked as a bare one. A
866
+ * legacy Jira accountId (`557058:<uuid>`) is token-shaped but is a real id,
867
+ * so it passes.
853
868
  * @param {string} entry One entry.
854
869
  * @param {string} path Where the entry sits.
855
870
  * @returns {string[]} Problems found.
856
871
  */
857
872
  function idEntryCredentials(entry, path) {
858
- const trimmed = entry.trim();
859
- const prefix = ID_ENTRY_PREFIX.exec(trimmed)?.[1];
860
- const value =
861
- prefix !== undefined && ID_ENTRY_KINDS.has(prefix)
862
- ? trimmed.slice(prefix.length + 1).trim()
863
- : trimmed;
873
+ const value = stripIdEntryPrefixes(entry.trim());
864
874
  return TOKEN_VALUE.test(value) && !JIRA_LEGACY_ACCOUNT_ID.test(value)
865
875
  ? botTokenProblem(path)
866
876
  : [];
867
877
  }
868
878
 
869
879
  /**
870
- * Refuse each malformed kind-keyed entry, naming it. A reader matches such an
871
- * entry against nobody, so accepting it would silently drop a person.
880
+ * Refuse each malformed kind-keyed entry, naming its location and prefix. A
881
+ * reader matches such an entry against nobody, so accepting it would silently
882
+ * drop a person. The refusal never repeats the entry's value: a token pasted
883
+ * behind an unknown prefix (`ID:<token>`) would otherwise land in terminals,
884
+ * CI logs and transcripts (CodySwannGT/lisa#4754).
872
885
  * @param {string} key `operatorIds` or `trustedAuthorIds`.
873
886
  * @param {readonly string[]} ids Entries, already known to be strings.
874
887
  * @returns {string[]} Problems found.
875
888
  */
876
889
  function idEntryProblems(key, ids) {
877
890
  const prefixOf = entry => `${ID_ENTRY_PREFIX.exec(entry)[1]}:`;
878
- return ids.flatMap(entry => {
891
+ return ids.flatMap((entry, i) => {
879
892
  const kind = classifyIdEntry(entry);
893
+ const path = `sessionManager.${key}[${i}]`;
880
894
  if (kind === "unknown-prefix") {
881
895
  const prefix = prefixOf(entry);
882
896
  return [
883
- `sessionManager.${key} entry ${JSON.stringify(entry)} has an ` +
897
+ `${path} has an ` +
884
898
  `unknown prefix ${JSON.stringify(prefix)}. Use login:<GitHub ` +
885
899
  `login>, id:<numeric or tracker account id>, or a plain id; write ` +
886
900
  `a tracker id that itself starts with letters and a colon as ` +
@@ -889,8 +903,7 @@ function idEntryProblems(key, ids) {
889
903
  }
890
904
  return kind === "empty-value"
891
905
  ? [
892
- `sessionManager.${key} entry ${JSON.stringify(entry)} has an ` +
893
- `empty value after ${JSON.stringify(prefixOf(entry))}: name the ` +
906
+ `${path} has an empty value after ${JSON.stringify(prefixOf(entry))}: name the ` +
894
907
  `login or id after the prefix.`,
895
908
  ]
896
909
  : [];
@@ -28,7 +28,7 @@ omit the plugin rules tree; do not assume a runtime-specific rules directory.
28
28
  - `linear` → invoke `lisa-linear-evidence` with `$ARGUMENTS` verbatim. Arg shape: `<IDENTIFIER> <EVIDENCE_DIR>` where `IDENTIFIER` is a Linear Issue identifier (e.g., `ENG-123`).
29
29
  - Anything else → stop and report `"Unknown tracker '<value>' in .lisa.config.json. Expected 'jira', 'github', or 'linear'."`
30
30
  5. For supported GitHub/Linear production completion, after actual uploads and exact native readbacks, prepare the accepted-for-completion input from the observed source/delivery, schema2 verdicts, actual typed attachment pointers, complete requirement conjunction map, structured CONFORMS report, canonical Verify usage, linkage and explicit acceptance. Apply the shipped `completion-authorization` reference; the executable validates the contract in every installed host. Run `node scripts/lisa-work-item.mjs publish-completion-proof --ref <exact-work-item> --record <evidence-dir>/completion-record.json`. It uploads immutable hash-named acceptance bytes to the implementation repository's configured evidence release, reads them back and publishes the exact-item native locator. Never construct a locator manually or treat a narrative evidence comment as acceptance. Jira completion remains unsupported.
31
- 6. Pass through both the vendor output and actual producer category. `published/pending-producer` means the pinned configured automation attempt must finish successfully before completion; do not rewrite the asset after the job or invent a successful future outcome. A User publisher does not require a producer workflow run. Only after accepted publication may the canonical lifecycle owner retry `complete`; pending proof preserves ownership and state and names the Verify/evidence action. Capture actual terminal readback/usage acceptedAt afterward, not as a circular publication prerequisite. A required pending-state journey artifact is immutable Phase-A proof captured before completion; the later actual terminal readback is a separate Phase-B supplement.
31
+ 6. Pass through both the vendor output and actual producer category. `published/pending-producer` means the pinned configured automation attempt must finish successfully before completion; do not rewrite the asset after the job or invent a successful future outcome. A User publisher does not require a producer workflow run. Only after accepted publication may the canonical lifecycle owner retry `finish`; pending proof preserves ownership and state and names the Verify/evidence action. Capture actual terminal readback/usage acceptedAt afterward, not as a circular publication prerequisite. A required pending-state journey artifact is immutable Phase-A proof captured before completion; the later actual terminal readback is a separate Phase-B supplement.
32
32
 
33
33
  ## Rules
34
34
 
@@ -1,7 +1,7 @@
1
1
  # Accepted completion proof
2
2
 
3
3
  Merging a pull request makes work available for delivery. It does not authorize
4
- closing the work item. The canonical `scripts/lisa-work-item.mjs complete` and
4
+ closing the work item. The canonical `scripts/lisa-work-item.mjs finish` (alias `complete`) and
5
5
  GitHub applying sweep require the same accepted-for-completion record before
6
6
  adding a terminal label, removing competing lifecycle labels, closing an issue,
7
7
  or changing a Linear item to its terminal state. Jira completion remains
@@ -125,7 +125,7 @@ with at most 100 pages or 10,000 comments can still exceed its byte ceiling and
125
125
  must fail closed without a lifecycle write. Visible local evidence markers
126
126
  claim attachments; fenced or indented examples and HTML comments do not.
127
127
 
128
- An ordinary pending result from `complete` or the applying sweep exits zero
128
+ An ordinary pending result from `finish` or the applying sweep exits zero
129
129
  because it preserves the nonterminal state. A refused `publish-completion-proof`
130
130
  exits nonzero when no locator was published. A successful bot publication with
131
131
  category `published/pending-producer` remains a successful publication; only
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.101.7",
3
+ "version": "4.101.9",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.101.7",
3
+ "version": "4.101.9",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.101.7",
3
+ "version": "4.101.9",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "4.101.7",
3
+ "version": "4.101.9",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"