@codyswann/lisa 6.2.0 → 6.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/copy-overwrite/scripts/lisa-audit.mjs +1 -1
- package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +3 -2
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +24 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +37 -17
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/opencode/plugin-templates/lisa-block-direct-issue-create.ts +3 -2
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/scripts/human-gate-act.mjs +4 -1
- package/plugins/lisa/.codex-plugin/scripts/intake-blocker-reprobe.mjs +46 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-write-ticket/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-repair-intake/SKILL.md +2 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-security-audit-handling/SKILL.md +13 -6
- package/plugins/lisa/.codex-plugin/skills/lisa-security-audit-handling/agents/openai.yaml +2 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa/hooks/block-direct-issue-create.sh +3 -2
- package/plugins/lisa/rules/reference/coding-philosophy.md +1 -0
- package/plugins/lisa/rules/reference/dependency-internalization-kit.md +13 -0
- package/plugins/lisa/rules/reference/ready-role-filing.md +2 -1
- package/plugins/lisa/rules/reference/security-audit-handling.md +3 -1
- package/plugins/lisa/scripts/human-gate-act.mjs +4 -1
- package/plugins/lisa/scripts/intake-blocker-reprobe.mjs +46 -2
- package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-jira-write-ticket/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-repair-intake/SKILL.md +2 -2
- package/plugins/lisa/skills/lisa-security-audit-handling/SKILL.md +12 -5
- package/plugins/lisa/skills/lisa-security-audit-handling/agents/openai.yaml +2 -2
- package/plugins/lisa/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +3 -2
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/human-gate-act.mjs +4 -1
- package/plugins/lisa-agy/scripts/intake-blocker-reprobe.mjs +46 -2
- package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-jira-write-ticket/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-repair-intake/SKILL.md +2 -2
- package/plugins/lisa-agy/skills/lisa-security-audit-handling/SKILL.md +12 -5
- package/plugins/lisa-agy/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +3 -2
- package/plugins/lisa-copilot/rules/reference/coding-philosophy.md +1 -0
- package/plugins/lisa-copilot/rules/reference/dependency-internalization-kit.md +13 -0
- package/plugins/lisa-copilot/rules/reference/ready-role-filing.md +2 -1
- package/plugins/lisa-copilot/rules/reference/security-audit-handling.md +3 -1
- package/plugins/lisa-copilot/scripts/human-gate-act.mjs +4 -1
- package/plugins/lisa-copilot/scripts/intake-blocker-reprobe.mjs +46 -2
- package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-jira-write-ticket/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-repair-intake/SKILL.md +2 -2
- package/plugins/lisa-copilot/skills/lisa-security-audit-handling/SKILL.md +12 -5
- package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +3 -2
- package/plugins/lisa-cursor/rules/coding-philosophy-reference.mdc +1 -0
- package/plugins/lisa-cursor/rules/dependency-internalization-kit-reference.mdc +13 -0
- package/plugins/lisa-cursor/rules/ready-role-filing-reference.mdc +2 -1
- package/plugins/lisa-cursor/rules/security-audit-handling-reference.mdc +3 -1
- package/plugins/lisa-cursor/scripts/human-gate-act.mjs +4 -1
- package/plugins/lisa-cursor/scripts/intake-blocker-reprobe.mjs +46 -2
- package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-jira-write-ticket/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-repair-intake/SKILL.md +2 -2
- package/plugins/lisa-cursor/skills/lisa-security-audit-handling/SKILL.md +12 -5
- package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +3 -2
- package/plugins/lisa-devin/rules/reference/coding-philosophy.md +1 -0
- package/plugins/lisa-devin/rules/reference/dependency-internalization-kit.md +13 -0
- package/plugins/lisa-devin/rules/reference/ready-role-filing.md +2 -1
- package/plugins/lisa-devin/rules/reference/security-audit-handling.md +3 -1
- package/plugins/lisa-devin/scripts/human-gate-act.mjs +4 -1
- package/plugins/lisa-devin/scripts/intake-blocker-reprobe.mjs +46 -2
- package/plugins/lisa-devin/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/lisa-devin/skills/lisa-jira-write-ticket/SKILL.md +1 -1
- package/plugins/lisa-devin/skills/lisa-linear-write-issue/SKILL.md +1 -1
- package/plugins/lisa-devin/skills/lisa-repair-intake/SKILL.md +2 -2
- package/plugins/lisa-devin/skills/lisa-security-audit-handling/SKILL.md +12 -5
- package/plugins/lisa-devin/skills/lisa-track/SKILL.md +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/block-direct-issue-create.sh +3 -2
- package/plugins/src/base/rules/reference/coding-philosophy.md +1 -0
- package/plugins/src/base/rules/reference/dependency-internalization-kit.md +13 -0
- package/plugins/src/base/rules/reference/ready-role-filing.md +2 -1
- package/plugins/src/base/rules/reference/security-audit-handling.md +3 -1
- package/plugins/src/base/scripts/human-gate-act.mjs +4 -1
- package/plugins/src/base/scripts/intake-blocker-reprobe.mjs +46 -2
- package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-jira-write-ticket/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-repair-intake/SKILL.md +2 -2
- package/plugins/src/base/skills/lisa-security-audit-handling/SKILL.md +12 -5
- package/plugins/src/base/skills/lisa-track/SKILL.md +1 -1
- package/scripts/lisa-audit.mjs +1 -1
|
@@ -47,7 +47,7 @@ For an existing incidental item, read its discussion, linked PRs and dependencie
|
|
|
47
47
|
- an explicit reference matching the configured tracker (`KEY-123`, `org/repo#123` or issue URL, Linear team identifier);
|
|
48
48
|
- an existing file path containing a specification (read the entire file, without offset/limit);
|
|
49
49
|
- plain-text work description.
|
|
50
|
-
3. Detect the caller's readiness declaration, which is orthogonal to the classification above. Absent any declaration this is the default build-ready path. A caller deliberately holding the work because it needs an act an agent cannot perform (an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count) passes `human_gate: "<the act a person must perform>"`. A choice with a reasonable default is not a gate: decide it, record the decision on the item, and take the build-ready path (`ready-role-filing`, "What a human gate is"). The writer refuses a topic-only reason with exit 1 from `scripts/human-gate-act.mjs check`; the two declarations are mutually exclusive and a `human_gate` present but empty is a blocking error, because an unexplained hold is indistinguishable from an accident.
|
|
50
|
+
3. Detect the caller's readiness declaration, which is orthogonal to the classification above. Absent any declaration this is the default build-ready path. A caller deliberately holding the work because it needs an act an agent cannot perform (an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); `own-dependency-copy` (approve maintaining our own fork, patch or vendored copy of an open-source library, the last rung of the `lisa-security-audit-handling` ladder, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count) passes `human_gate: "<the act a person must perform>"`. A choice with a reasonable default is not a gate: decide it, record the decision on the item, and take the build-ready path (`ready-role-filing`, "What a human gate is"). The writer refuses a topic-only reason with exit 1 from `scripts/human-gate-act.mjs check`; the two declarations are mutually exclusive and a `human_gate` present but empty is a blocking error, because an unexplained hold is indistinguishable from an accident.
|
|
51
51
|
4. Preserve the full resolved specification for the caller. Do not treat a ticket-like token for a different provider/project as plain text; report the mismatch.
|
|
52
52
|
|
|
53
53
|
## Phase 2 — Resolve one live work item
|
|
@@ -468,8 +468,9 @@ FILE IT THE SANCTIONED WAY — one of these three, always explicit:
|
|
|
468
468
|
open an external account, sign a legal agreement (contract, BAA, DPA,
|
|
469
469
|
license), act from an account only a person holds (such as a protected
|
|
470
470
|
deployment approval), act in a system the agent cannot reach, release a
|
|
471
|
-
hold the operator explicitly asked for,
|
|
472
|
-
only people write
|
|
471
|
+
hold the operator explicitly asked for, edit a file the project says
|
|
472
|
+
only people write, or approve maintaining our own copy of an open-source
|
|
473
|
+
library (a fork, patch or vendored copy). A choice with a reasonable default is NOT that, and
|
|
473
474
|
neither is a compliance judgement or naming an owner (unless
|
|
474
475
|
humanGate.mode is "strict"): decide it, record the decision on the item,
|
|
475
476
|
and use 1. Otherwise route the same way but pass
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
* so only an act it genuinely lacks access to is a gate: an interactive login
|
|
22
22
|
* or a credential only a person holds, spending money, opening an external
|
|
23
23
|
* account, a legal signature, an account only a person holds, a system the
|
|
24
|
-
* agent cannot reach, or a hold the operator explicitly asked for.
|
|
24
|
+
* agent cannot reach, or a hold the operator explicitly asked for. Two more
|
|
25
|
+
* hold in both modes without being access gates: an edit to a human-authored
|
|
26
|
+
* surface, and approving our own fork, patch or vendored copy of an
|
|
27
|
+
* open-source library (CodySwannGT/lisa#5024). `strict`
|
|
25
28
|
* also holds a compliance judgement, naming an accountable person, and Lisa's
|
|
26
29
|
* own policy calls. `humanGate.humanOnly` widens the gate in either mode.
|
|
27
30
|
*
|
|
@@ -344,7 +344,9 @@ export function isStrictHumanGateMode(mode) {
|
|
|
344
344
|
* reach, and a hold the operator explicitly asked for. One more entry is valid
|
|
345
345
|
* in both modes without being an access gate: a change to a surface the
|
|
346
346
|
* project declared human-authored, which the authorship rule keeps free of
|
|
347
|
-
* automated writes.
|
|
347
|
+
* automated writes. Another is valid in both modes for the same reason: our
|
|
348
|
+
* own fork, patch or vendored copy of an open-source library, the last rung of
|
|
349
|
+
* the security-audit ladder, which a person approves.
|
|
348
350
|
*
|
|
349
351
|
* The patterns run over a normalized reason (lower case, hyphens and
|
|
350
352
|
* underscores read as spaces) so a slug and its prose spelling match alike.
|
|
@@ -448,6 +450,28 @@ export const HUMAN_GATE_ACTS = Object.freeze([
|
|
|
448
450
|
pattern:
|
|
449
451
|
/\b(declared human authored|human authored (surfaces?|files?|rules?)|project rules( md)?|agents md|agents rules|claude rules)\b/u,
|
|
450
452
|
}),
|
|
453
|
+
Object.freeze({
|
|
454
|
+
act: "own-dependency-copy",
|
|
455
|
+
// Not missing access: the last rung of the security-audit ladder
|
|
456
|
+
// (CodySwannGT/lisa#5024). Our own fork, patch (patch-package, Bun or pnpm
|
|
457
|
+
// `patchedDependencies`, yarn patch) or vendored copy of an open-source
|
|
458
|
+
// library is maintenance taken on indefinitely, and copy-overwrite ships
|
|
459
|
+
// it to every host, so a person approves it in both modes. The pattern
|
|
460
|
+
// names the act of maintaining our OWN copy; depending on someone else's
|
|
461
|
+
// fork is a decision, and so is every earlier rung of the ladder. A patch
|
|
462
|
+
// must name a dependency target. After "to" or "for" that target is a
|
|
463
|
+
// library, dependency or package noun, because a bare word there is as
|
|
464
|
+
// often a verb ("a patch to fix the crash"). A bare package name counts
|
|
465
|
+
// only after "against", "on" or "of", and never a repository word, so
|
|
466
|
+
// "add a patch to the README" stays a decision. A package name is one
|
|
467
|
+
// word here: a prose reason is matched with scoped and hyphenated names
|
|
468
|
+
// (`@scope/name`, `eslint-plugin-react`) collapsed to a single token, so
|
|
469
|
+
// the target window stays one word wide.
|
|
470
|
+
label: "approve maintaining our own copy of an open-source library",
|
|
471
|
+
packageNames: true,
|
|
472
|
+
pattern:
|
|
473
|
+
/\b((maintain\w*|keep\w*|carry\w*|own\w*) (our|its) own (patched |vendored |forked )?(copy|copies|fork|forks|patch|patches) of|(apply\w*|carry\w*|maintain\w*|keep\w*|add\w*) (a |an |our |the )?(local )?(patch|patches) ((to|for|of|against|on) (the |a |an |our |this )?(open source |upstream |third party )?([a-z0-9]+ )?(library|libraries|dependency|dependencies|package|packages)|(against|on|of) (the |our )?(?!(readme|docs?|documentation|files?|changelog|code|config|scripts?|tests?|branch|workflow|the|our|a|an|this|it)\b)[a-z0-9]+)|(fork|forking|vendor|vendoring) (?!of\b)(a |an |our |the )?([a-z0-9]+ ){0,2}(library|libraries|dependency|dependencies|package|packages))\b/u,
|
|
474
|
+
}),
|
|
451
475
|
Object.freeze({
|
|
452
476
|
act: "compliance-signoff",
|
|
453
477
|
label: "give a compliance sign-off",
|
|
@@ -490,6 +514,8 @@ const KEYWORD_ACTS = new Set([
|
|
|
490
514
|
"legal-signoff",
|
|
491
515
|
"person-only-account",
|
|
492
516
|
"human-authored-surface",
|
|
517
|
+
// "fork-library-selection" names a topic, not the approval (#5024).
|
|
518
|
+
"own-dependency-copy",
|
|
493
519
|
"compliance-signoff",
|
|
494
520
|
"accountable-person",
|
|
495
521
|
"unreachable-system",
|
|
@@ -524,6 +550,23 @@ export function normalizeGateText(value) {
|
|
|
524
550
|
.trim();
|
|
525
551
|
}
|
|
526
552
|
|
|
553
|
+
/**
|
|
554
|
+
* A prose reason normalized with each package name kept as one token, so a
|
|
555
|
+
* scoped or hyphenated name (`@scope/name`, `eslint-plugin-react`) reads as
|
|
556
|
+
* the single target it is rather than as several words.
|
|
557
|
+
* @param {unknown} value - A raw prose reason
|
|
558
|
+
* @returns {string} Normalized text with package names joined
|
|
559
|
+
*/
|
|
560
|
+
function collapsePackageNames(value) {
|
|
561
|
+
return normalizeGateText(
|
|
562
|
+
String(value ?? "")
|
|
563
|
+
.toLowerCase()
|
|
564
|
+
.replace(/@?[a-z0-9][a-z0-9._-]*(?:\/[a-z0-9][a-z0-9._-]*)?/gu, name =>
|
|
565
|
+
/[@/._-]/u.test(name) ? name.replace(/[^a-z0-9]/gu, "") : name
|
|
566
|
+
)
|
|
567
|
+
);
|
|
568
|
+
}
|
|
569
|
+
|
|
527
570
|
/**
|
|
528
571
|
* The project's declared human-only decision classes, normalized.
|
|
529
572
|
* @param {unknown} classes - `humanGate.humanOnly` from config
|
|
@@ -555,10 +598,11 @@ export function classifyHumanGateReason(reason, options = {}) {
|
|
|
555
598
|
const slug = !/\s/u.test(String(reason ?? "").trim());
|
|
556
599
|
const topicOnly = slug && TOPIC_WORDS.test(text) && !ACT_VERBS.test(text);
|
|
557
600
|
const strict = isStrictHumanGateMode(options.mode);
|
|
601
|
+
const packageText = slug ? text : collapsePackageNames(reason);
|
|
558
602
|
for (const entry of HUMAN_GATE_ACTS) {
|
|
559
603
|
if (entry.strictOnly && !strict) continue;
|
|
560
604
|
if (entry.slugOnly && !slug) continue;
|
|
561
|
-
const match = entry.pattern.exec(text);
|
|
605
|
+
const match = entry.pattern.exec(entry.packageNames ? packageText : text);
|
|
562
606
|
// A secret is never a topic: the secret entry always wins. A login
|
|
563
607
|
// word is a topic unless an act verb says otherwise, in prose too.
|
|
564
608
|
const vetoed = entry.secret
|
|
@@ -330,7 +330,7 @@ For non-build-ready issues created fresh (Epics, Stories, and other containers),
|
|
|
330
330
|
|
|
331
331
|
**A filing with neither is an incomplete handoff.** A leaf that is not build-ready must carry an explicit `human_gate: "<the act a person must perform>"`; nothing in the ready lane means nothing ever claims it. When `human_gate` is supplied, stamp the hold on the issue so it is auditable — after the check below.
|
|
332
332
|
|
|
333
|
-
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
333
|
+
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); `own-dependency-copy` (approve maintaining our own fork, patch or vendored copy of an open-source library, the last rung of the `lisa-security-audit-handling` ladder, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
334
334
|
|
|
335
335
|
```bash
|
|
336
336
|
node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
|
|
@@ -315,7 +315,7 @@ Before create/update, verify each field is populated where applicable:
|
|
|
315
315
|
|
|
316
316
|
**A filing with neither is an incomplete handoff.** A leaf that is not build-ready must carry an explicit `human_gate: "<the act a person must perform>"`; nothing in the ready status means nothing ever claims it. When `human_gate` is supplied, stamp the hold on the ticket so it is auditable — after the check below.
|
|
317
317
|
|
|
318
|
-
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
318
|
+
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); `own-dependency-copy` (approve maintaining our own fork, patch or vendored copy of an open-source library, the last rung of the `lisa-security-audit-handling` ladder, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
319
319
|
|
|
320
320
|
```bash
|
|
321
321
|
node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
|
|
@@ -309,7 +309,7 @@ For Bug / Task / Sub-task, ensure the summary is prefixed with `[<repo-name>]`.
|
|
|
309
309
|
|
|
310
310
|
**A filing with neither is an incomplete handoff.** A leaf that is not build-ready must carry an explicit `human_gate: "<the act a person must perform>"`; nothing in the ready lane means nothing ever claims it. When `human_gate` is supplied, stamp the hold on the Issue so it is auditable — after the check below.
|
|
311
311
|
|
|
312
|
-
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
312
|
+
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); `own-dependency-copy` (approve maintaining our own fork, patch or vendored copy of an open-source library, the last rung of the `lisa-security-audit-handling` ladder, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
313
313
|
|
|
314
314
|
```bash
|
|
315
315
|
node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
|
|
@@ -1125,8 +1125,8 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
|
|
|
1125
1125
|
re-classifying the hold, not from who wrote the comment, so a lift naming a valid hold discharges
|
|
1126
1126
|
nothing. **Valid holds plan nothing.** In both modes those are the access acts (`credential`,
|
|
1127
1127
|
`spend`, `external-account`, `legal-signoff`, `person-only-account`, `unreachable-system`,
|
|
1128
|
-
`operator-hold`), `human-authored-surface`, and any project-declared
|
|
1129
|
-
class. Under `humanGate.mode: "strict"` the strict-only acts (`compliance-signoff`,
|
|
1128
|
+
`operator-hold`), `human-authored-surface`, `own-dependency-copy`, and any project-declared
|
|
1129
|
+
`humanGate.humanOnly` class. Under `humanGate.mode: "strict"` the strict-only acts (`compliance-signoff`,
|
|
1130
1130
|
`accountable-person`, `lisa-policy`) are valid too; under the default access-only mode a hold
|
|
1131
1131
|
that names only one of them is invalid and is lifted. **Label-only holds plan nothing** — an access block or blocked verdict
|
|
1132
1132
|
declares no reason to judge. A mixed item lifts its invalid reasons and stays held for the valid
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lisa-security-audit-handling
|
|
3
|
-
description: "
|
|
3
|
+
description: "When the dependency security audit blocks a push or CI, in order: refresh, upgrade, override, exclude an unreachable advisory with a reason, replace or remove, fix upstream, and only last, behind a human gate, fork, patch or vendor the library. Never bypasses the hook."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Security Audit Handling
|
|
@@ -16,8 +16,12 @@ The remedy for a high/critical advisory is an ordered decision, not a question t
|
|
|
16
16
|
3. **Add a targeted override** that pins the vulnerable **leaf** package to the fixed version.
|
|
17
17
|
4. **Evaluate reachability, and exclude with a stated reason if unaffected** — before considering any code change. If the advisory cannot affect this project, add a scoped exclusion with a concrete reason to `audit.ignore.local.json`. No human is needed. Typical unreachable cases: the package is used only by dev or build tooling, or the vulnerable input is never untrusted (for example, globs or patterns written in the repository itself). The evaluation is this project's own: Lisa's template exclusions cannot vouch for a host's reachability, so a host the audit flags records its own entry in `audit.ignore.local.json`. **If reachability cannot be proven, treat the advisory as affecting the project** and continue at step 5.
|
|
18
18
|
5. **Replace or remove the dependency** when it affects the project and no fixed version exists: a maintained alternative, a newer major of the parent that no longer pulls the package, or dropping it.
|
|
19
|
+
6. **Contribute the fix upstream** — an issue or pull request on the library. This is fine to do in parallel with step 5.
|
|
20
|
+
7. **Fork, patch or vendor the library — last, and only through a human gate.** Our own copy of an open-source library (a fork, a patch through patch-package, Bun or pnpm `patchedDependencies` or `yarn patch`, a `patches/` directory, or a vendored copy) is reached only when steps 1–6 cannot resolve the advisory. File the work held through `lisa-track` with `human_gate: "approve maintaining our own copy of <pkg>"` (the `own-dependency-copy` act in `ready-role-filing`), and write none of that code until a person releases the gate.
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
**Why step 7 is a gate.** The no-assumed-human rule still holds: every other step is a decision you make and record yourself. A fork, patch or vendored copy is different. It is maintenance we take on indefinitely, and it travels with whatever the project distributes: in Lisa itself, copy-overwrite ships it to every host. So it is one of the explicitly declared human gates, not a decision.
|
|
23
|
+
|
|
24
|
+
If steps 1–6 do not resolve it in this change, **file a build-ready ticket** in the configured tracker (through `lisa-tracker-write` with `build_ready: true`) carrying the evidence: the advisory, the dependency path that reaches the vulnerable copy, and what was tried at each step and why it failed. The factory then carries the replacement or removal as work. Stop only when the next act needs access you do not have, and then say exactly what is missing.
|
|
21
25
|
|
|
22
26
|
## Node.js Projects (GHSA advisories)
|
|
23
27
|
|
|
@@ -37,7 +41,9 @@ If none of these works in this change, **file a build-ready ticket** in the conf
|
|
|
37
41
|
```
|
|
38
42
|
Then any other vulnerable copy — on an unlisted path or through an npm alias — still fails the audit and is named by its lockfile path. An empty `paths` array, an invalid range, or an unreadable lockfile fails the audit with a diagnostic; it never widens into an ID-wide exclusion. The pre-push hook, the gate registry, and CI use the same matcher. `lisa doctor` checks the scope fields and that the lockfile is readable, and reports any remaining exclusion without `versions` or `paths`, but it does not match advisories against lockfile copies — a valid-looking path that names the wrong copy can pass doctor and still be rejected by the audit. Doctor also does not reject an entry with no `id` or an exclusion file that does not parse; the audit does. Only the audit proves the exclusion files are accepted. In CI, the reusable workflow audits the manager its `package_manager` input names (default `npm`), so set that input to the project's manager. A scoped entry always wins over a wider entry for the same advisory and package. Full contract: https://github.com/CodySwannGT/lisa/blob/main/docs/dependency-audit-exclusions.md
|
|
39
43
|
7. **Step 5 — replace or remove:** if the advisory affects the project, replace the dependency with a maintained alternative or remove it, prove behavior with the tests, commit, and retry.
|
|
40
|
-
8.
|
|
44
|
+
8. **Step 6 — upstream:** open the upstream fix (an issue or pull request on the library), in parallel with step 5 if useful.
|
|
45
|
+
9. If steps 1–6 do not resolve it in this change, file the build-ready ticket described above.
|
|
46
|
+
10. **Step 7 — our own copy:** only when steps 1–6 cannot resolve it, file the held `human_gate` work item described above. Do not add `patchedDependencies`, patch-package, `yarn patch`, a `patches/` directory, a git fork in `package.json`, or a vendored copy before a person releases that gate. A fork or vendored copy also inherits the `dependency-internalization-kit` rule's evidence bar once the gate is released.
|
|
41
47
|
|
|
42
48
|
|
|
43
49
|
### Critical: Override the vulnerable package, not its parent
|
|
@@ -57,7 +63,8 @@ If any of these checks fail, the override is "not possible" for the purposes of
|
|
|
57
63
|
|
|
58
64
|
- Never add a blanket audit bypass or lower the configured audit level.
|
|
59
65
|
- Never add an exclusion without an impact evaluation recorded in its `reason`, and never for an advisory you cannot show is unreachable.
|
|
60
|
-
- Never file the ticket before genuinely attempting
|
|
66
|
+
- Never file the ticket before genuinely attempting steps 1–6.
|
|
67
|
+
- Never patch, fork or vendor a library (step 7) before evaluating reachability (step 4), and never without a released human gate.
|
|
61
68
|
- Never wait on a human the work does not need; stop only for missing access, and name it.
|
|
62
69
|
|
|
63
70
|
## Rails Projects (bundler-audit)
|
|
@@ -69,4 +76,4 @@ Same ladder, bundler mechanics:
|
|
|
69
76
|
3. **Step 1 — update:** If a patched version exists:
|
|
70
77
|
- **Direct dependency** (in Gemfile): update its version constraint, run `bundle update <gem>`, commit, retry.
|
|
71
78
|
- **Transitive dependency** (only in Gemfile.lock): run `bundle update <gem>` to pull the patched version without changing the Gemfile, commit the lockfile change, retry.
|
|
72
|
-
4. **No patch:** If no patched version exists, evaluate whether the advisory can affect the project. If it **cannot**, document the exception with the reason and retry. If it **does**, or you cannot show it does not, upgrade or replace the gem that pulls it, or remove it. If none of that works, file a build-ready ticket with the evidence, as above.
|
|
79
|
+
4. **No patch:** If no patched version exists, evaluate whether the advisory can affect the project. If it **cannot**, document the exception with the reason and retry. If it **does**, or you cannot show it does not, upgrade or replace the gem that pulls it, or remove it, and contribute the fix upstream. If none of that works, file a build-ready ticket with the evidence, as above. Pointing the Gemfile at a git fork or vendoring the gem is step 7: file the human gate first.
|
|
@@ -47,7 +47,7 @@ For an existing incidental item, read its discussion, linked PRs and dependencie
|
|
|
47
47
|
- an explicit reference matching the configured tracker (`KEY-123`, `org/repo#123` or issue URL, Linear team identifier);
|
|
48
48
|
- an existing file path containing a specification (read the entire file, without offset/limit);
|
|
49
49
|
- plain-text work description.
|
|
50
|
-
3. Detect the caller's readiness declaration, which is orthogonal to the classification above. Absent any declaration this is the default build-ready path. A caller deliberately holding the work because it needs an act an agent cannot perform (an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count) passes `human_gate: "<the act a person must perform>"`. A choice with a reasonable default is not a gate: decide it, record the decision on the item, and take the build-ready path (`ready-role-filing`, "What a human gate is"). The writer refuses a topic-only reason with exit 1 from `scripts/human-gate-act.mjs check`; the two declarations are mutually exclusive and a `human_gate` present but empty is a blocking error, because an unexplained hold is indistinguishable from an accident.
|
|
50
|
+
3. Detect the caller's readiness declaration, which is orthogonal to the classification above. Absent any declaration this is the default build-ready path. A caller deliberately holding the work because it needs an act an agent cannot perform (an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); `own-dependency-copy` (approve maintaining our own fork, patch or vendored copy of an open-source library, the last rung of the `lisa-security-audit-handling` ladder, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count) passes `human_gate: "<the act a person must perform>"`. A choice with a reasonable default is not a gate: decide it, record the decision on the item, and take the build-ready path (`ready-role-filing`, "What a human gate is"). The writer refuses a topic-only reason with exit 1 from `scripts/human-gate-act.mjs check`; the two declarations are mutually exclusive and a `human_gate` present but empty is a blocking error, because an unexplained hold is indistinguishable from an accident.
|
|
51
51
|
4. Preserve the full resolved specification for the caller. Do not treat a ticket-like token for a different provider/project as plain text; report the mismatch.
|
|
52
52
|
|
|
53
53
|
## Phase 2 — Resolve one live work item
|
|
@@ -468,8 +468,9 @@ FILE IT THE SANCTIONED WAY — one of these three, always explicit:
|
|
|
468
468
|
open an external account, sign a legal agreement (contract, BAA, DPA,
|
|
469
469
|
license), act from an account only a person holds (such as a protected
|
|
470
470
|
deployment approval), act in a system the agent cannot reach, release a
|
|
471
|
-
hold the operator explicitly asked for,
|
|
472
|
-
only people write
|
|
471
|
+
hold the operator explicitly asked for, edit a file the project says
|
|
472
|
+
only people write, or approve maintaining our own copy of an open-source
|
|
473
|
+
library (a fork, patch or vendored copy). A choice with a reasonable default is NOT that, and
|
|
473
474
|
neither is a compliance judgement or naming an owner (unless
|
|
474
475
|
humanGate.mode is "strict"): decide it, record the decision on the item,
|
|
475
476
|
and use 1. Otherwise route the same way but pass
|
|
@@ -181,6 +181,7 @@ Right: create the label. Stop only if the tracker refuses for lack of permission
|
|
|
181
181
|
- **Signing a legal agreement** — a contract, BAA, DPA or license acceptance. A compliance *judgement* is not this gate: it is the agent's decision unless the project declares it human-only
|
|
182
182
|
- **Declared human gates and operator holds** — a leaf filed with `human_gate`, a decision class in `humanGate.humanOnly`, a stricter `humanGate.mode`, an operator's hold label, or an option a project turned on such as `dependencies.humanSignOff`
|
|
183
183
|
- **Human-authored-only surfaces** — `PROJECT_RULES.md`, and the human-gated tickets the learnings gardener files for promotions
|
|
184
|
+
- **Approve maintaining our own copy of an open-source library** — a fork, patch or vendored copy: the last step of the `lisa-security-audit-handling` ladder, filed held as `own-dependency-copy` (`ready-role-filing`). It is maintenance taken on indefinitely, and copy-overwrite ships it to every host
|
|
184
185
|
- **A product question with no reasonable default** that nothing in the item, wiki, code or standing decisions settles (`when-to-stop`), raised through the gate rather than mid-session
|
|
185
186
|
- **`/lisa:agent-ready` gap questions** in `wiki/gaps.md`, which exist to collect what only a person knows
|
|
186
187
|
- **An explicit request** — the operator asked for a person, or invoked an interactive setup skill (`/lisa:setup:*`) and is answering its prompts
|
|
@@ -47,6 +47,15 @@ inherits all seven criteria unless it explicitly justifies why the dependency is
|
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
50
|
+
**Forking, patching or vendoring is never the first move.** Taking our own
|
|
51
|
+
copy of an open-source library (a fork, a patch through patch-package, Bun or
|
|
52
|
+
pnpm `patchedDependencies` or `yarn patch`, or a vendored copy) is the last
|
|
53
|
+
step, step 7, of the one remediation ladder in the
|
|
54
|
+
`lisa-security-audit-handling` skill, and it is a declared human gate
|
|
55
|
+
(`own-dependency-copy` in `ready-role-filing`). This kit does not restate or
|
|
56
|
+
reorder that ladder. It sets the evidence bar a fork or vendored copy owes
|
|
57
|
+
**after** a person releases the gate.
|
|
58
|
+
|
|
50
59
|
Taking a dependency is a decision about trust: we believe someone else's code
|
|
51
60
|
works. Dropping one reverses that decision without reversing the obligation —
|
|
52
61
|
the capability still has to work, and now it is ours. The risk does not
|
|
@@ -180,6 +189,10 @@ Each of those lands the capability in the
|
|
|
180
189
|
`thin wrapper suitable for in-house ownership` trust class or removes it from
|
|
181
190
|
the dependency set entirely, and either way we now own the behavior.
|
|
182
191
|
|
|
192
|
+
Vendoring and forking, and any patch we carry against the library, are step 7
|
|
193
|
+
of the `lisa-security-audit-handling` ladder: they wait for a released
|
|
194
|
+
human gate before any code is written, and inherit this kit once it is.
|
|
195
|
+
|
|
183
196
|
**Does not inherit the kit** — ownership does not move:
|
|
184
197
|
|
|
185
198
|
- a routine version bump of a trusted dependency **within its existing trust
|
|
@@ -112,9 +112,10 @@ The acts that qualify are the ones an agent **lacks access to** perform. Each ga
|
|
|
112
112
|
| `unreachable-system` | Act in a system the agent cannot reach | granting the agent an access it lacks, admin rights, an on-site or hardware step |
|
|
113
113
|
| `operator-hold` | Honour a hold the operator explicitly asked for | the operator said to hold this item, or passed `ready=false` to a filing skill |
|
|
114
114
|
| `human-authored-surface` | Edit a file the project says only people write (the authorship rule, not missing access; held in both modes) | a promotion, demotion or retirement that lands in a host's `.agents/rules/`, `PROJECT_RULES.md` or `AGENTS.md` |
|
|
115
|
+
| `own-dependency-copy` | Approve maintaining our own copy of an open-source library (not missing access; held in both modes) | a fork, a patch carried through patch-package, Bun or pnpm `patchedDependencies` or `yarn patch`, or a vendored copy: step 7, the last, of the `lisa-security-audit-handling` ladder, reached only when refreshing, upgrading, overriding, excluding an unreachable advisory, replacing the dependency and fixing upstream cannot resolve it. A copy is maintenance taken on indefinitely, and copy-overwrite ships it to every host |
|
|
115
116
|
| `project-policy` | A decision class this project declared human-only | `humanGate.humanOnly` in `.lisa.config.json` |
|
|
116
117
|
|
|
117
|
-
**Everything else is a decision.** That includes acts older wording reserved for a person: a product, scoping or design call; accepting a risk; a compliance judgement; naming an accountable owner from the evidence available; promoting or demoting a learning; a harness intervention; retiring an automation; judging an exploratory-QA finding's significance; picking an epic or parent; ratifying a dependency; and a threshold-ratchet exception. The agent decides and records: it picks the reasonable default, writes the decision on the item (a `Decision:` line saying what was chosen and why), and files it `build_ready: true`. A person who disagrees reverses it on the item; nobody had to be interrupted first.
|
|
118
|
+
**Everything else is a decision.** That includes acts older wording reserved for a person: a product, scoping or design call; accepting a risk; a compliance judgement; naming an accountable owner from the evidence available; promoting or demoting a learning; a harness intervention; retiring an automation; judging an exploratory-QA finding's significance; picking an epic or parent; ratifying a dependency; and a threshold-ratchet exception. (Ratifying a dependency is a decision; maintaining our own fork, patch or vendored copy of one is the `own-dependency-copy` gate above.) The agent decides and records: it picks the reasonable default, writes the decision on the item (a `Decision:` line saying what was chosen and why), and files it `build_ready: true`. A person who disagrees reverses it on the item; nobody had to be interrupted first.
|
|
118
119
|
|
|
119
120
|
**The reason must name the act.** `human_gate: "role-split-triage"` names a topic and is refused; `human_gate: "the production payment-provider secret key only the founder holds"` names an act and is accepted. The check is executable, and every writer runs it before stamping a hold:
|
|
120
121
|
|
|
@@ -7,5 +7,7 @@ The procedure for a push or CI run blocked by the dependency security audit live
|
|
|
7
7
|
3. Add a targeted override to the fixed version.
|
|
8
8
|
4. Evaluate reachability before any code change. An advisory that cannot affect the project gets a scoped exclusion with a concrete reason in the project's own `audit.ignore.local.json`, with no human needed; Lisa's template cannot vouch for a host's reachability. If reachability cannot be proven, the advisory affects the project.
|
|
9
9
|
5. Replace or remove the dependency.
|
|
10
|
+
6. Contribute the fix upstream, in parallel if useful.
|
|
11
|
+
7. Last: fork, patch or vendor the library, only through a declared human gate (`own-dependency-copy` in `ready-role-filing`), with no code before a person releases it. It is a gate, not a decision, because our own copy is maintenance we take on indefinitely, and copy-overwrite ships it to every host.
|
|
10
12
|
|
|
11
|
-
When
|
|
13
|
+
When steps 1–6 do not resolve it, file a build-ready ticket with the evidence (advisory, dependency path, what each step tried) so the factory carries the replacement or removal; stop only when the next act needs access you lack, and say exactly what is missing. The audit's failure message prints the same order and names the skill, so it loads when it is needed instead of in every session. Never bypass the hook.
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
* so only an act it genuinely lacks access to is a gate: an interactive login
|
|
22
22
|
* or a credential only a person holds, spending money, opening an external
|
|
23
23
|
* account, a legal signature, an account only a person holds, a system the
|
|
24
|
-
* agent cannot reach, or a hold the operator explicitly asked for.
|
|
24
|
+
* agent cannot reach, or a hold the operator explicitly asked for. Two more
|
|
25
|
+
* hold in both modes without being access gates: an edit to a human-authored
|
|
26
|
+
* surface, and approving our own fork, patch or vendored copy of an
|
|
27
|
+
* open-source library (CodySwannGT/lisa#5024). `strict`
|
|
25
28
|
* also holds a compliance judgement, naming an accountable person, and Lisa's
|
|
26
29
|
* own policy calls. `humanGate.humanOnly` widens the gate in either mode.
|
|
27
30
|
*
|
|
@@ -344,7 +344,9 @@ export function isStrictHumanGateMode(mode) {
|
|
|
344
344
|
* reach, and a hold the operator explicitly asked for. One more entry is valid
|
|
345
345
|
* in both modes without being an access gate: a change to a surface the
|
|
346
346
|
* project declared human-authored, which the authorship rule keeps free of
|
|
347
|
-
* automated writes.
|
|
347
|
+
* automated writes. Another is valid in both modes for the same reason: our
|
|
348
|
+
* own fork, patch or vendored copy of an open-source library, the last rung of
|
|
349
|
+
* the security-audit ladder, which a person approves.
|
|
348
350
|
*
|
|
349
351
|
* The patterns run over a normalized reason (lower case, hyphens and
|
|
350
352
|
* underscores read as spaces) so a slug and its prose spelling match alike.
|
|
@@ -448,6 +450,28 @@ export const HUMAN_GATE_ACTS = Object.freeze([
|
|
|
448
450
|
pattern:
|
|
449
451
|
/\b(declared human authored|human authored (surfaces?|files?|rules?)|project rules( md)?|agents md|agents rules|claude rules)\b/u,
|
|
450
452
|
}),
|
|
453
|
+
Object.freeze({
|
|
454
|
+
act: "own-dependency-copy",
|
|
455
|
+
// Not missing access: the last rung of the security-audit ladder
|
|
456
|
+
// (CodySwannGT/lisa#5024). Our own fork, patch (patch-package, Bun or pnpm
|
|
457
|
+
// `patchedDependencies`, yarn patch) or vendored copy of an open-source
|
|
458
|
+
// library is maintenance taken on indefinitely, and copy-overwrite ships
|
|
459
|
+
// it to every host, so a person approves it in both modes. The pattern
|
|
460
|
+
// names the act of maintaining our OWN copy; depending on someone else's
|
|
461
|
+
// fork is a decision, and so is every earlier rung of the ladder. A patch
|
|
462
|
+
// must name a dependency target. After "to" or "for" that target is a
|
|
463
|
+
// library, dependency or package noun, because a bare word there is as
|
|
464
|
+
// often a verb ("a patch to fix the crash"). A bare package name counts
|
|
465
|
+
// only after "against", "on" or "of", and never a repository word, so
|
|
466
|
+
// "add a patch to the README" stays a decision. A package name is one
|
|
467
|
+
// word here: a prose reason is matched with scoped and hyphenated names
|
|
468
|
+
// (`@scope/name`, `eslint-plugin-react`) collapsed to a single token, so
|
|
469
|
+
// the target window stays one word wide.
|
|
470
|
+
label: "approve maintaining our own copy of an open-source library",
|
|
471
|
+
packageNames: true,
|
|
472
|
+
pattern:
|
|
473
|
+
/\b((maintain\w*|keep\w*|carry\w*|own\w*) (our|its) own (patched |vendored |forked )?(copy|copies|fork|forks|patch|patches) of|(apply\w*|carry\w*|maintain\w*|keep\w*|add\w*) (a |an |our |the )?(local )?(patch|patches) ((to|for|of|against|on) (the |a |an |our |this )?(open source |upstream |third party )?([a-z0-9]+ )?(library|libraries|dependency|dependencies|package|packages)|(against|on|of) (the |our )?(?!(readme|docs?|documentation|files?|changelog|code|config|scripts?|tests?|branch|workflow|the|our|a|an|this|it)\b)[a-z0-9]+)|(fork|forking|vendor|vendoring) (?!of\b)(a |an |our |the )?([a-z0-9]+ ){0,2}(library|libraries|dependency|dependencies|package|packages))\b/u,
|
|
474
|
+
}),
|
|
451
475
|
Object.freeze({
|
|
452
476
|
act: "compliance-signoff",
|
|
453
477
|
label: "give a compliance sign-off",
|
|
@@ -490,6 +514,8 @@ const KEYWORD_ACTS = new Set([
|
|
|
490
514
|
"legal-signoff",
|
|
491
515
|
"person-only-account",
|
|
492
516
|
"human-authored-surface",
|
|
517
|
+
// "fork-library-selection" names a topic, not the approval (#5024).
|
|
518
|
+
"own-dependency-copy",
|
|
493
519
|
"compliance-signoff",
|
|
494
520
|
"accountable-person",
|
|
495
521
|
"unreachable-system",
|
|
@@ -524,6 +550,23 @@ export function normalizeGateText(value) {
|
|
|
524
550
|
.trim();
|
|
525
551
|
}
|
|
526
552
|
|
|
553
|
+
/**
|
|
554
|
+
* A prose reason normalized with each package name kept as one token, so a
|
|
555
|
+
* scoped or hyphenated name (`@scope/name`, `eslint-plugin-react`) reads as
|
|
556
|
+
* the single target it is rather than as several words.
|
|
557
|
+
* @param {unknown} value - A raw prose reason
|
|
558
|
+
* @returns {string} Normalized text with package names joined
|
|
559
|
+
*/
|
|
560
|
+
function collapsePackageNames(value) {
|
|
561
|
+
return normalizeGateText(
|
|
562
|
+
String(value ?? "")
|
|
563
|
+
.toLowerCase()
|
|
564
|
+
.replace(/@?[a-z0-9][a-z0-9._-]*(?:\/[a-z0-9][a-z0-9._-]*)?/gu, name =>
|
|
565
|
+
/[@/._-]/u.test(name) ? name.replace(/[^a-z0-9]/gu, "") : name
|
|
566
|
+
)
|
|
567
|
+
);
|
|
568
|
+
}
|
|
569
|
+
|
|
527
570
|
/**
|
|
528
571
|
* The project's declared human-only decision classes, normalized.
|
|
529
572
|
* @param {unknown} classes - `humanGate.humanOnly` from config
|
|
@@ -555,10 +598,11 @@ export function classifyHumanGateReason(reason, options = {}) {
|
|
|
555
598
|
const slug = !/\s/u.test(String(reason ?? "").trim());
|
|
556
599
|
const topicOnly = slug && TOPIC_WORDS.test(text) && !ACT_VERBS.test(text);
|
|
557
600
|
const strict = isStrictHumanGateMode(options.mode);
|
|
601
|
+
const packageText = slug ? text : collapsePackageNames(reason);
|
|
558
602
|
for (const entry of HUMAN_GATE_ACTS) {
|
|
559
603
|
if (entry.strictOnly && !strict) continue;
|
|
560
604
|
if (entry.slugOnly && !slug) continue;
|
|
561
|
-
const match = entry.pattern.exec(text);
|
|
605
|
+
const match = entry.pattern.exec(entry.packageNames ? packageText : text);
|
|
562
606
|
// A secret is never a topic: the secret entry always wins. A login
|
|
563
607
|
// word is a topic unless an act verb says otherwise, in prose too.
|
|
564
608
|
const vetoed = entry.secret
|
|
@@ -330,7 +330,7 @@ For non-build-ready issues created fresh (Epics, Stories, and other containers),
|
|
|
330
330
|
|
|
331
331
|
**A filing with neither is an incomplete handoff.** A leaf that is not build-ready must carry an explicit `human_gate: "<the act a person must perform>"`; nothing in the ready lane means nothing ever claims it. When `human_gate` is supplied, stamp the hold on the issue so it is auditable — after the check below.
|
|
332
332
|
|
|
333
|
-
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
333
|
+
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); `own-dependency-copy` (approve maintaining our own fork, patch or vendored copy of an open-source library, the last rung of the `lisa-security-audit-handling` ladder, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
334
334
|
|
|
335
335
|
```bash
|
|
336
336
|
node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
|
|
@@ -315,7 +315,7 @@ Before create/update, verify each field is populated where applicable:
|
|
|
315
315
|
|
|
316
316
|
**A filing with neither is an incomplete handoff.** A leaf that is not build-ready must carry an explicit `human_gate: "<the act a person must perform>"`; nothing in the ready status means nothing ever claims it. When `human_gate` is supplied, stamp the hold on the ticket so it is auditable — after the check below.
|
|
317
317
|
|
|
318
|
-
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
318
|
+
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); `own-dependency-copy` (approve maintaining our own fork, patch or vendored copy of an open-source library, the last rung of the `lisa-security-audit-handling` ladder, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
319
319
|
|
|
320
320
|
```bash
|
|
321
321
|
node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
|
|
@@ -309,7 +309,7 @@ For Bug / Task / Sub-task, ensure the summary is prefixed with `[<repo-name>]`.
|
|
|
309
309
|
|
|
310
310
|
**A filing with neither is an incomplete handoff.** A leaf that is not build-ready must carry an explicit `human_gate: "<the act a person must perform>"`; nothing in the ready lane means nothing ever claims it. When `human_gate` is supplied, stamp the hold on the Issue so it is auditable — after the check below.
|
|
311
311
|
|
|
312
|
-
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
312
|
+
**Validate the gate before stamping it.** A `human_gate` is for an act an agent cannot perform — an access act: `credential` (complete a login or supply a credential only a person holds), `spend`, `external-account`, `legal-signoff` (sign a legal agreement on the company's behalf), `person-only-account` (a protected deployment, a required reviewer, an account only a person holds), `unreachable-system`, or `operator-hold` (a hold the operator explicitly asked for); `human-authored-surface` (an edit to a surface declared human-authored, which no agent writes: an authorship rule, valid in both modes); `own-dependency-copy` (approve maintaining our own fork, patch or vendored copy of an open-source library, the last rung of the `lisa-security-audit-handling` ladder, valid in both modes); or a decision class the project declared human-only (`humanGate.humanOnly`). Under `humanGate.mode: "strict"` the strict-only acts `compliance-signoff`, `accountable-person` and `lisa-policy` also count. A choice with a reasonable default is a decision, not a gate (`ready-role-filing`, "What a human gate is"). Run the check on the reason:
|
|
313
313
|
|
|
314
314
|
```bash
|
|
315
315
|
node "${CLAUDE_PLUGIN_ROOT:-node_modules/@codyswann/lisa/plugins/lisa}/scripts/human-gate-act.mjs" check --reason "<the human_gate reason>"
|
|
@@ -1125,8 +1125,8 @@ with labels like `build-ready`, or with no Lisa status label at all, that are in
|
|
|
1125
1125
|
re-classifying the hold, not from who wrote the comment, so a lift naming a valid hold discharges
|
|
1126
1126
|
nothing. **Valid holds plan nothing.** In both modes those are the access acts (`credential`,
|
|
1127
1127
|
`spend`, `external-account`, `legal-signoff`, `person-only-account`, `unreachable-system`,
|
|
1128
|
-
`operator-hold`), `human-authored-surface`, and any project-declared
|
|
1129
|
-
class. Under `humanGate.mode: "strict"` the strict-only acts (`compliance-signoff`,
|
|
1128
|
+
`operator-hold`), `human-authored-surface`, `own-dependency-copy`, and any project-declared
|
|
1129
|
+
`humanGate.humanOnly` class. Under `humanGate.mode: "strict"` the strict-only acts (`compliance-signoff`,
|
|
1130
1130
|
`accountable-person`, `lisa-policy`) are valid too; under the default access-only mode a hold
|
|
1131
1131
|
that names only one of them is invalid and is lifted. **Label-only holds plan nothing** — an access block or blocked verdict
|
|
1132
1132
|
declares no reason to judge. A mixed item lifts its invalid reasons and stays held for the valid
|