@codyswann/lisa 4.37.2 → 4.37.3

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 (101) hide show
  1. package/all/copy-contents/gitignore +6 -0
  2. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  3. package/dist/core/lisa-owned-hash-ledger.js +4 -0
  4. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  5. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  6. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  7. package/dist/core/upstream-evidence-manifest.js +36 -9
  8. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  9. package/package.json +5 -4
  10. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  11. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  12. package/plugins/lisa/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +11 -0
  13. package/plugins/lisa/.codex-plugin/skills/lisa-jira-write-ticket/SKILL.md +11 -0
  14. package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +11 -0
  15. package/plugins/lisa/.codex-plugin/skills/lisa-repair-intake/SKILL.md +30 -2
  16. package/plugins/lisa/hooks/inject-resolved-config.mjs +26 -7
  17. package/plugins/lisa/rules/eager/config-resolution.md +3 -1
  18. package/plugins/lisa/rules/reference/config-resolution.md +1 -1
  19. package/plugins/lisa/scripts/intake-blocker-reprobe.mjs +120 -3
  20. package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +11 -0
  21. package/plugins/lisa/skills/lisa-jira-write-ticket/SKILL.md +11 -0
  22. package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +11 -0
  23. package/plugins/lisa/skills/lisa-repair-intake/SKILL.md +30 -2
  24. package/plugins/lisa-agy/plugin.json +1 -1
  25. package/plugins/lisa-agy/scripts/intake-blocker-reprobe.mjs +120 -3
  26. package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +11 -0
  27. package/plugins/lisa-agy/skills/lisa-jira-write-ticket/SKILL.md +11 -0
  28. package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +11 -0
  29. package/plugins/lisa-agy/skills/lisa-repair-intake/SKILL.md +30 -2
  30. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  32. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  33. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-copilot/hooks/inject-resolved-config.mjs +26 -7
  37. package/plugins/lisa-copilot/rules/eager/config-resolution.md +3 -1
  38. package/plugins/lisa-copilot/rules/reference/config-resolution.md +1 -1
  39. package/plugins/lisa-copilot/scripts/intake-blocker-reprobe.mjs +120 -3
  40. package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +11 -0
  41. package/plugins/lisa-copilot/skills/lisa-jira-write-ticket/SKILL.md +11 -0
  42. package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +11 -0
  43. package/plugins/lisa-copilot/skills/lisa-repair-intake/SKILL.md +30 -2
  44. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-cursor/hooks/inject-resolved-config.mjs +26 -7
  46. package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +1 -1
  47. package/plugins/lisa-cursor/rules/config-resolution.mdc +3 -1
  48. package/plugins/lisa-cursor/scripts/intake-blocker-reprobe.mjs +120 -3
  49. package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +11 -0
  50. package/plugins/lisa-cursor/skills/lisa-jira-write-ticket/SKILL.md +11 -0
  51. package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +11 -0
  52. package/plugins/lisa-cursor/skills/lisa-repair-intake/SKILL.md +30 -2
  53. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  55. package/plugins/lisa-expo-agy/plugin.json +1 -1
  56. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  60. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  61. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  65. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  66. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  70. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  71. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  75. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  76. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  80. package/plugins/lisa-rails-agy/plugin.json +1 -1
  81. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  85. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  86. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  87. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  88. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  89. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  90. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  91. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  92. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  93. package/plugins/src/base/hooks/inject-resolved-config.mjs +26 -7
  94. package/plugins/src/base/rules/eager/config-resolution.md +3 -1
  95. package/plugins/src/base/rules/reference/config-resolution.md +1 -1
  96. package/plugins/src/base/scripts/intake-blocker-reprobe.mjs +120 -3
  97. package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +11 -0
  98. package/plugins/src/base/skills/lisa-jira-write-ticket/SKILL.md +11 -0
  99. package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +11 -0
  100. package/plugins/src/base/skills/lisa-repair-intake/SKILL.md +30 -2
  101. package/scripts/measure-tmpdir-growth.mjs +925 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.37.2",
3
+ "version": "4.37.3",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -51,7 +51,7 @@
51
51
  * @module inject-resolved-config
52
52
  */
53
53
  import { existsSync, readFileSync, realpathSync } from "node:fs";
54
- import { join } from "node:path";
54
+ import { basename, join } from "node:path";
55
55
  import { fileURLToPath } from "node:url";
56
56
 
57
57
  /** Committed, project-wide configuration. */
@@ -799,13 +799,32 @@ export function buildContext(projectDir) {
799
799
  ? `${MAIN_CONFIG} + ${LOCAL_CONFIG} (local wins where they overlap)`
800
800
  : `${MAIN_CONFIG} (no local override file)`;
801
801
 
802
+ // The block used to say "this project's" — a possessive with no referent
803
+ // anywhere in its text, so two repositories emitted blocks that were
804
+ // character-identical except for the values. An agent standing in one
805
+ // directory while doing work governed by another read something perfectly
806
+ // true about the directory and wrong about the work, and the next sentence
807
+ // told it not to open the files that would have shown the difference. Six
808
+ // independent agent cycles reached the same false conclusion from one such
809
+ // block (CodySwannGT/lisa#3765).
810
+ //
811
+ // `basename` rather than the git remote: naming the subject must not cost a
812
+ // subprocess on a hook that runs at every session and subagent start, and it
813
+ // must not fail in a directory that is not a git checkout. The absolute path
814
+ // beside it is the unambiguous identifier; the basename is the short name a
815
+ // reader actually compares against the work in front of them.
816
+ const subject = basename(projectDir) || projectDir;
817
+
802
818
  return block(
803
- `These are this project's EFFECTIVE Lisa configuration values, already resolved from ${sources}.\n` +
804
- `Act on them directly. Do not re-read the config files to learn them, and do not act ` +
805
- `against them. A line marked [Lisa built-in default] is NOT something this project ` +
806
- `declared. A key whose NAME is identity- or credential-shaped is withheld and counted, ` +
807
- `and a VALUE matching a known credential shape is replaced with ${REDACTED}: a ` +
808
- `best-effort filter, not proof that anything it left alone is safe to repeat.\n\n` +
819
+ `These are the EFFECTIVE Lisa configuration values for ${subject}, resolved from ${sources} ` +
820
+ `at ${projectDir}.\n` +
821
+ `Act on them directly and do not act against them. They describe THAT directory: if your ` +
822
+ `work targets a different repository, read that repository's config rather than these. For ` +
823
+ `work in ${subject}, do not re-read the config files to learn these values. A line marked ` +
824
+ `[Lisa built-in default] is NOT something ${subject} declared. A key whose NAME is identity- ` +
825
+ `or credential-shaped is withheld and counted, and a VALUE matching a known credential shape ` +
826
+ `is replaced with ${REDACTED}: a best-effort filter, not proof that anything it left alone ` +
827
+ `is safe to repeat.\n\n` +
809
828
  renderBody(resolved)
810
829
  );
811
830
  }
@@ -1,6 +1,8 @@
1
1
  # Config Resolution (load-bearing)
2
2
 
3
- **The resolved configuration is already in your context.** `inject-resolved-config.sh` runs at every session and subagent start and injects the EFFECTIVE values — `.lisa.config.local.json` already merged over `.lisa.config.json` — inside a `<lisa-resolved-config>` block, marking anything that is a Lisa built-in rather than something this project declared. Read the values there and act on them; do not re-derive them from the files, and do not act against them.
3
+ **The resolved configuration is already in your context.** `inject-resolved-config.sh` runs at every session and subagent start and injects the EFFECTIVE values — `.lisa.config.local.json` already merged over `.lisa.config.json` — inside a `<lisa-resolved-config>` block, which **names the directory it resolved for** and marks anything that is a Lisa built-in rather than something that directory declared. Read the values there and act on them, and do not act against them.
4
+
5
+ They are resolved for **that working directory only**. For work in it, do not re-derive them from the files — that is the saving this block exists for. If your work targets a **different** repository, the block does not describe it: read that repository's config instead. A block with no name on it is how six agent cycles acted on one repository's settings while doing another's work.
4
6
 
5
7
  That block replaces the paragraph that used to sit here saying where configuration lives and which file wins. Restating it is what nine eager rules were already doing while agents acted against a config they never opened; if the block is ever missing, the two files are the source and the local one wins where they overlap.
6
8
 
@@ -505,7 +505,7 @@ Resolution keys:
505
505
  - Linear: `linear.labels.build.human_needed` (default `human-needed`). Applied as a Linear **label**, for the same reason as JIRA — an Issue holds exactly one workflow state but any number of labels, so an additive marker cannot be a state. The `blocked` **state** still drives the lifecycle; `human_needed` is the marker on top of it. This is the only build-lane key left in `linear.labels`.
506
506
  - `spec_defect` resolves the same way on each vendor — `jira.labels.spec_defect` (default `Spec Defect`), `github.labels.build.spec_defect` and `linear.labels.build.spec_defect` (default `blocked:spec-defect`).
507
507
 
508
- **When to apply it.** Apply `human_needed` only when a human must act before the item can move — the pre-flight gate failures that bounce a ticket back to its reporter are exactly this case, but **only after** the agent has run the `pre-flight-autofill` draft-then-block procedure (drafting the authorable gaps — acceptance criteria, validation journey, repository, relationship search, etc. — into the ticket as labeled assumptions). What then remains for the human is to **confirm those assumptions** or supply a genuinely human-only input (real missing credentials, an irreducible product/scoping decision). The marker means "a human must confirm or decide," not "a human must author from scratch."
508
+ **When to apply it.** There are two application sites. The first is **at filing**: a leaf filed with a `human_gate` reason under `ready-role-filing` carries the `[lisa-human-gate]` body marker *and* this label, so the hold is legible to a path that reads bodies and to a path that reads labels alike. Such an item sits in no lifecycle role at all rather than in `blocked`, which is the one case where this marker stands beside no role — and it is deliberate: a hold recorded on only one surface is a half-armed gate, and the label-keyed sweeps promoted exactly that population into the build queue (#3805). The second site is a **block a human must clear**: apply `human_needed` only when a human must act before the item can move — the pre-flight gate failures that bounce a ticket back to its reporter are exactly this case, but **only after** the agent has run the `pre-flight-autofill` draft-then-block procedure (drafting the authorable gaps — acceptance criteria, validation journey, repository, relationship search, etc. — into the ticket as labeled assumptions). What then remains for the human is to **confirm those assumptions** or supply a genuinely human-only input (real missing credentials, an irreducible product/scoping decision). The marker means "a human must confirm or decide," not "a human must author from scratch."
509
509
 
510
510
  **Why `spec_defect` is separate from `human_needed`.** Both name a hold a person must clear, but they are different asks and the rollup must not merge them. `human_needed` waits on an input from *outside* the item — a credential, an access grant, a product decision — and the item's own text is fine. `spec_defect` waits on the item's text being *rewritten*, and no external event will ever supply that. An item carrying `spec_defect` will sit forever until somebody edits it; that is exactly the class that accumulated silently when the rollup rendered both as plain `blocked` (issue #3045: 32 identical hold comments over six weeks on one Epic). Where both markers are present, `spec_defect` wins — it is the more specific record, and the only one carrying a judgment nothing else can supply.
511
511
 
@@ -38,10 +38,20 @@ function normalizeLabels(labels) {
38
38
  }
39
39
 
40
40
  /**
41
- * @param {{ labels?: unknown, body?: unknown, humanNeededLabel?: unknown }} input
42
- * @returns {boolean}
41
+ * Whether an item is held for a person, on either surface.
42
+ *
43
+ * Exported deliberately, and it is the ONLY answer to that question anywhere in
44
+ * the intake machinery. Every selection and promotion path calls this rather
45
+ * than inspecting labels itself, because the label surface alone is a partial
46
+ * answer: the vendor writers stamp the body marker on a deliberate hold, so an
47
+ * item held exactly as the filing contract instructs carries no label at all.
48
+ * A path that read labels alone judged such an item unheld and promoted it —
49
+ * which is #3805, and is why this is a shared function rather than a shared
50
+ * convention.
51
+ * @param {{ labels?: unknown, body?: unknown, humanNeededLabel?: unknown }} input - Candidate surfaces
52
+ * @returns {boolean} True when a person is holding this item
43
53
  */
44
- function isHumanGated(input) {
54
+ export function isHumanGated(input) {
45
55
  const configured = String(
46
56
  input.humanNeededLabel ?? DEFAULT_HUMAN_NEEDED_LABEL
47
57
  )
@@ -282,6 +292,113 @@ export function planHumanGateReconciliation(input = {}) {
282
292
  };
283
293
  }
284
294
 
295
+ /**
296
+ * Marker on the note the normalization sweep leaves, so a later cycle
297
+ * recognises its own work instead of commenting again.
298
+ *
299
+ * Deliberately NOT the hold marker and deliberately not a superstring of it:
300
+ * `HUMAN_GATE_MARKER` closes with `]`, so neither this nor
301
+ * `HUMAN_GATE_NOTE_MARKER` matches it. A note that read as a hold declaration
302
+ * would make every reported item look held to the next body-reading sweep,
303
+ * including items the report merely names.
304
+ */
305
+ export const NORMALIZATION_HOLD_NOTE_MARKER =
306
+ "<!-- [lisa-human-gate-normalization-held] -->";
307
+
308
+ /**
309
+ * Decide whether an item carrying NO configured lifecycle label may be
310
+ * normalized into a ready lane.
311
+ *
312
+ * This is the promotion path, and it was keyed on labels alone. The configured
313
+ * `human_needed` label is one of the lifecycle labels whose *absence* the sweep
314
+ * enumerates on, so an item held only by the body marker was a member of the
315
+ * swept population by definition and got the build-ready label applied to it.
316
+ * The `[lisa-human-gate]` exclusion existed, in a different and read-only sweep
317
+ * further down the same contract: the one sweep that writes was the one that
318
+ * could not see the marker.
319
+ *
320
+ * Order is load-bearing for the same reason it is in `classifyPreWorkCandidate`:
321
+ * the hold is checked before lane membership and before any classification, so
322
+ * nothing downstream — however confident — can promote an item a person parked.
323
+ *
324
+ * On a match this plans NO write of its own. `planHumanGateReconciliation`
325
+ * turns a match into durable state, so a false positive there latches and every
326
+ * later cycle agrees with the first. The gate test is a plain substring match
327
+ * whose imprecision is tracked separately, so this path refuses and reports
328
+ * read-only instead — the same treatment the ungated-filing sweep already gives
329
+ * a hold it finds.
330
+ * @param {{
331
+ * labels?: unknown
332
+ * body?: unknown
333
+ * humanNeededLabel?: unknown
334
+ * lifecycleLabels?: unknown
335
+ * readyLabel?: unknown
336
+ * }} input - Candidate surfaces plus the configured lifecycle vocabulary
337
+ * @returns {{ normalize: boolean, reason: string, humanGated: boolean, actions: { addReadyLabel: string | null, reportHold: boolean } }} Normalization plan
338
+ */
339
+ export function planLabelNormalization(input = {}) {
340
+ const idle = Object.freeze({ addReadyLabel: null, reportHold: false });
341
+ if (isHumanGated(input)) {
342
+ return {
343
+ normalize: false,
344
+ reason: "human-gate",
345
+ humanGated: true,
346
+ actions: Object.freeze({ addReadyLabel: null, reportHold: true }),
347
+ };
348
+ }
349
+
350
+ const labels = normalizeLabels(input.labels);
351
+ if (normalizeLabels(input.lifecycleLabels).some(l => labels.includes(l))) {
352
+ return {
353
+ normalize: false,
354
+ reason: "already-in-lifecycle",
355
+ humanGated: false,
356
+ actions: idle,
357
+ };
358
+ }
359
+
360
+ const ready = trimmedString(input.readyLabel);
361
+ if (ready.length === 0) {
362
+ return {
363
+ normalize: false,
364
+ reason: "no-ready-label",
365
+ humanGated: false,
366
+ actions: idle,
367
+ };
368
+ }
369
+
370
+ return {
371
+ normalize: true,
372
+ reason: "normalize",
373
+ humanGated: false,
374
+ actions: Object.freeze({ addReadyLabel: ready, reportHold: false }),
375
+ };
376
+ }
377
+
378
+ /**
379
+ * Render the notice for an item the normalization sweep left alone.
380
+ *
381
+ * Distinct from `formatHumanGateNote` because the two say opposite things
382
+ * about what happened: that one reports a lane that WAS changed, this one
383
+ * reports a promotion that was declined and nothing else. Reusing it would tell
384
+ * an operator their item had been moved when it had not.
385
+ * @returns {string} Comment body, carrying the marker that keeps a re-run quiet
386
+ */
387
+ export function formatNormalizationHoldNote() {
388
+ return [
389
+ "**Left alone: a person is holding this**",
390
+ "",
391
+ "- What was found: the description says a person is holding this one, so " +
392
+ "it was not put into the queue that agents work from.",
393
+ "- What changed: nothing at all. It was left exactly as it is, and " +
394
+ "nothing will pick it up on its own.",
395
+ "- To resume it: remove the hold note from the description, then put it " +
396
+ "into the build queue.",
397
+ "",
398
+ NORMALIZATION_HOLD_NOTE_MARKER,
399
+ ].join("\n");
400
+ }
401
+
285
402
  /**
286
403
  * Render the hold notice for a reader who does not know this subsystem.
287
404
  *
@@ -276,6 +276,17 @@ Held for a human product call: <reason>.
276
276
  <!-- [lisa-human-gate] reason=<short-slug> -->
277
277
  ```
278
278
 
279
+ **Stamp both surfaces, not just the marker.** Also apply the configured `human_needed` marker
280
+ label (`github.labels.build.human_needed`, default `human-needed`) to the issue, via `gh issue edit`/`gh issue create --label`. The marker in the body and the label say the same thing,
281
+ and a filing that carries only one of them is a **half-armed gate**: sweeps that read the body
282
+ honour it, and sweeps that read labels do not. That is not hypothetical — the repair sweep that
283
+ normalizes items carrying no lifecycle label keys on the *absence* of `human_needed`, so a
284
+ marker-only hold was its population by construction and got promoted into the build queue (#3805).
285
+ The marker remains the authoritative declaration; the label is what makes the hold visible to a
286
+ person scanning a board and to any path that has not yet been routed through the shared reader.
287
+ If the label does not exist in the tracker, create it, or record that it could not be applied and
288
+ proceed — the marker still holds. Never file the label *instead of* the marker.
289
+
279
290
  If a leaf arrives with `build_ready` omitted or `false` **and** no `human_gate`, do not create it: report the incomplete handoff and name both ways to resolve it (`build_ready: true`, or a `human_gate` reason). Containers are exempt — their state rolls up from children, so they need neither.
280
291
 
281
292
  ## Phase 5.5 — Validate (Pre-write Gate)
@@ -261,6 +261,17 @@ Held for a human product call: <reason>.
261
261
  <!-- [lisa-human-gate] reason=<short-slug> -->
262
262
  ```
263
263
 
264
+ **Stamp both surfaces, not just the marker.** Also apply the configured `human_needed` marker
265
+ label (`jira.labels.human_needed`, default `Human Needed`) to the ticket, via the ticket's `labels` field. The marker in the body and the label say the same thing,
266
+ and a filing that carries only one of them is a **half-armed gate**: sweeps that read the body
267
+ honour it, and sweeps that read labels do not. That is not hypothetical — the repair sweep that
268
+ normalizes items carrying no lifecycle label keys on the *absence* of `human_needed`, so a
269
+ marker-only hold was its population by construction and got promoted into the build queue (#3805).
270
+ The marker remains the authoritative declaration; the label is what makes the hold visible to a
271
+ person scanning a board and to any path that has not yet been routed through the shared reader.
272
+ If the label does not exist in the tracker, create it, or record that it could not be applied and
273
+ proceed — the marker still holds. Never file the label *instead of* the marker.
274
+
264
275
  If a leaf arrives with `build_ready` omitted or `false` **and** no `human_gate`, do not create it: report the incomplete handoff and name both ways to resolve it (`build_ready: true`, or a `human_gate` reason). Containers are exempt — their status rolls up from children, so they need neither.
265
276
 
266
277
  ## Phase 5.5 — Validate (Pre-write Gate)
@@ -280,6 +280,17 @@ Held for a human product call: <reason>.
280
280
  <!-- [lisa-human-gate] reason=<short-slug> -->
281
281
  ```
282
282
 
283
+ **Stamp both surfaces, not just the marker.** Also apply the configured `human_needed` marker
284
+ label (`linear.labels.build.human_needed`, default `human-needed`) to the Issue, via the Issue's labels (create it via `create_issue_label` if absent). The marker in the body and the label say the same thing,
285
+ and a filing that carries only one of them is a **half-armed gate**: sweeps that read the body
286
+ honour it, and sweeps that read labels do not. That is not hypothetical — the repair sweep that
287
+ normalizes items carrying no lifecycle label keys on the *absence* of `human_needed`, so a
288
+ marker-only hold was its population by construction and got promoted into the build queue (#3805).
289
+ The marker remains the authoritative declaration; the label is what makes the hold visible to a
290
+ person scanning a board and to any path that has not yet been routed through the shared reader.
291
+ If the label does not exist in the tracker, create it, or record that it could not be applied and
292
+ proceed — the marker still holds. Never file the label *instead of* the marker.
293
+
283
294
  If a leaf arrives with `build_ready` omitted or `false` **and** no `human_gate`, do not create it: report the incomplete handoff and name both ways to resolve it (`build_ready: true`, or a `human_gate` reason). Containers are exempt — their state rolls up from children, so they need neither.
284
295
 
285
296
  ## Phase 5.5 — Validate (Pre-write Gate)
@@ -951,6 +951,23 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
951
951
  selected by `intake_mode`. If `intake_mode=prd`, only PRD-classified issues are normalized. If
952
952
  `intake_mode=build`, every non-PRD issue is normalized as a build ticket. If `intake_mode=both`,
953
953
  classify PRDs first and normalize all remaining issues as build tickets.
954
+ 2a. **Ask whether a person is holding it, before anything else.** Call
955
+ `planLabelNormalization({ labels, body, humanNeededLabel, lifecycleLabels, readyLabel })` from
956
+ `scripts/intake-blocker-reprobe.mjs` for every candidate and apply exactly the verdict it
957
+ returns. Do **not** re-implement the test here and do **not** decide held-ness from labels
958
+ alone: the vendor writers stamp the `[lisa-human-gate]` marker into the body of a deliberate
959
+ hold, and `human_needed` is one of the lifecycle labels this sweep keys on the **absence** of —
960
+ so an item held exactly as the filing contract instructs is a member of this swept population by
961
+ construction, and a label-only read promoted it into the build queue (#3805). The
962
+ `[lisa-human-gate]` exclusion already existed in the read-only "Ungated non-ready filing" sweep
963
+ below; the one sweep that writes was the one that could not see it.
964
+
965
+ On `normalize: false` with reason `human-gate`, **stop for that item**: apply no label, do not
966
+ classify it, and report it read-only per step 5. Writing a label here — even the human-needed
967
+ marker — would turn a match into durable state on a second path, and the gate test is a plain
968
+ substring match whose precision is a separate open defect (#3815). Refusing and reporting is
969
+ the safe failure direction without the latch. Count these under `held_for_person`, never under
970
+ `normalized_ready`.
954
971
  3. Classify the issue:
955
972
  - **PRD** if it has PRD labels/markers (`prd`, `type:PRD`, `kind:prd`), PRD structure
956
973
  (`## Problem`, `## Goals`, `## Validation Journey`, generated-work/backlink sections), or
@@ -964,7 +981,8 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
964
981
  - **Ambiguous PRD/build** if strong PRD and build classifications both match. In `intake_mode=prd`
965
982
  normalize as PRD; in `intake_mode=build` normalize as build; in `intake_mode=both`, prefer PRD
966
983
  only when the body has PRD structure, otherwise build.
967
- 4. Apply exactly one configured ready label for the classified lifecycle:
984
+ 4. Apply exactly one configured ready label for the classified lifecycle — and only when step
985
+ 2a returned `normalize: true`; its `actions.addReadyLabel` is the label to apply, verbatim:
968
986
  - PRD → add the configured PRD `ready` label (default `prd-ready`).
969
987
  - Build ticket → add the configured build `ready` label (default `status:ready`).
970
988
  Keep any unofficial labels for auditability unless the project has explicitly configured one as a
@@ -972,7 +990,11 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
972
990
  normalization makes the next normal `lisa-intake` run pick it up.
973
991
  5. Post one idempotent `[lisa-repair-intake]` note naming the classification and the configured label
974
992
  applied. Include the normalization result in the loop-prevention fingerprint so repeated repair
975
- cycles do not spam comments.
993
+ cycles do not spam comments. For an item step 2a held, post `formatNormalizationHoldNote()`
994
+ instead — it says that nothing was changed and how a person resumes the item, which is the
995
+ opposite of what the reconciliation note says and must not be substituted for it. A promotion
996
+ declined silently is invisible, which is the quieter version of the failure this step exists to
997
+ prevent, so name every held item in the cycle summary via `summarizeHumanGateHolds([...])`.
976
998
 
977
999
  ### Ungated non-ready filing → surface as an incomplete handoff (read-only)
978
1000
 
@@ -1223,6 +1245,8 @@ It MAY:
1223
1245
  Epic/Story container** from its hierarchy/body-parentage children — so rollup and the GitHub UI can
1224
1246
  rely on the native graph. This repairs structure only; it does not ship, transition, or verify the
1225
1247
  parent.
1248
+ - Leave a normalization candidate untouched and report it when it is held for a person — the
1249
+ human gate is consulted before classification and its refusal is absolute.
1226
1250
  - Normalize a GitHub issue with no configured lifecycle label by adding the configured PRD or build
1227
1251
  `ready` label after classifying the issue. This is a visibility repair, not a claim; the item
1228
1252
  remains open and unclaimed for normal intake.
@@ -1305,6 +1329,10 @@ Report outcomes in these buckets:
1305
1329
  from hierarchy/body-parentage) whose missing native sub-issue links were attached.
1306
1330
  - `normalized_ready` — GitHub issues missing official lifecycle labels that were classified and
1307
1331
  given the configured PRD/build `ready` label so normal intake can claim them.
1332
+ - `held_for_person` — normalization candidates left exactly as they were because a person is
1333
+ holding them, per the human gate in step 2a of that repair. Nothing was written to them. This
1334
+ bucket is never merged into `normalized_ready` or `errors`: "a person parked this and I honoured
1335
+ it" is a repair outcome, not a failure and not a promotion.
1308
1336
  - `still_blocked` — examined and intentionally left `blocked`, with the active reason.
1309
1337
  - `reversal_suppressed` — a repair this skill previously made was reversed by a human, so the
1310
1338
  classification was **not** re-applied. Name the **reversed transition** (role, direction, and