@codyswann/lisa 2.187.1 → 2.187.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.
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/agents/github-agent.md +2 -1
- package/plugins/lisa/agents/jira-agent.md +2 -1
- package/plugins/lisa/agents/linear-agent.md +2 -1
- package/plugins/lisa/rules/eager/config-resolution.md +11 -0
- package/plugins/lisa/rules/eager/pre-flight-autofill.md +7 -2
- package/plugins/lisa/rules/reference/config-resolution.md +28 -1
- package/plugins/lisa/rules/reference/pre-flight-autofill.md +8 -3
- package/plugins/lisa/scripts/automation-status-expected-fleet.mjs +4 -3
- package/plugins/lisa/skills/implement/SKILL.md +3 -3
- package/plugins/lisa/skills/repair-intake/SKILL.md +28 -11
- package/plugins/lisa-agy/agents/github-agent.md +2 -1
- package/plugins/lisa-agy/agents/jira-agent.md +2 -1
- package/plugins/lisa-agy/agents/linear-agent.md +2 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/automation-status-expected-fleet.mjs +4 -3
- package/plugins/lisa-agy/skills/implement/SKILL.md +3 -3
- package/plugins/lisa-agy/skills/repair-intake/SKILL.md +28 -11
- 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-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/agents/github-agent.agent.md +2 -1
- package/plugins/lisa-copilot/agents/jira-agent.agent.md +2 -1
- package/plugins/lisa-copilot/agents/linear-agent.agent.md +2 -1
- package/plugins/lisa-copilot/rules/eager/config-resolution.md +11 -0
- package/plugins/lisa-copilot/rules/eager/pre-flight-autofill.md +7 -2
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +28 -1
- package/plugins/lisa-copilot/rules/reference/pre-flight-autofill.md +8 -3
- package/plugins/lisa-copilot/scripts/automation-status-expected-fleet.mjs +4 -3
- package/plugins/lisa-copilot/skills/implement/SKILL.md +3 -3
- package/plugins/lisa-copilot/skills/repair-intake/SKILL.md +28 -11
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/agents/github-agent.md +2 -1
- package/plugins/lisa-cursor/agents/jira-agent.md +2 -1
- package/plugins/lisa-cursor/agents/linear-agent.md +2 -1
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +28 -1
- package/plugins/lisa-cursor/rules/config-resolution.mdc +11 -0
- package/plugins/lisa-cursor/rules/pre-flight-autofill-reference.mdc +8 -3
- package/plugins/lisa-cursor/rules/pre-flight-autofill.mdc +7 -2
- package/plugins/lisa-cursor/scripts/automation-status-expected-fleet.mjs +4 -3
- package/plugins/lisa-cursor/skills/implement/SKILL.md +3 -3
- package/plugins/lisa-cursor/skills/repair-intake/SKILL.md +28 -11
- 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-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-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-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-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-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-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-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/src/base/agents/github-agent.md +2 -1
- package/plugins/src/base/agents/jira-agent.md +2 -1
- package/plugins/src/base/agents/linear-agent.md +2 -1
- package/plugins/src/base/rules/eager/config-resolution.md +11 -0
- package/plugins/src/base/rules/eager/pre-flight-autofill.md +7 -2
- package/plugins/src/base/rules/reference/config-resolution.md +28 -1
- package/plugins/src/base/rules/reference/pre-flight-autofill.md +8 -3
- package/plugins/src/base/scripts/automation-status-expected-fleet.mjs +4 -3
- package/plugins/src/base/skills/implement/SKILL.md +3 -3
- package/plugins/src/base/skills/repair-intake/SKILL.md +28 -11
package/package.json
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"ws": ">=8.20.1"
|
|
94
94
|
},
|
|
95
95
|
"name": "@codyswann/lisa",
|
|
96
|
-
"version": "2.187.
|
|
96
|
+
"version": "2.187.3",
|
|
97
97
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
98
98
|
"main": "dist/index.js",
|
|
99
99
|
"exports": {
|
|
@@ -53,7 +53,7 @@ Resolve build labels from `.lisa.config.json` `github.labels.build.*` (defaults:
|
|
|
53
53
|
|
|
54
54
|
If `github-verify` returns `FAIL` on any of the above, do NOT continue to build. **Draft the missing spec content first, then block for confirmation** — never bounce a raw "go write all this" checklist back to the author:
|
|
55
55
|
|
|
56
|
-
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + `gh`/tracker search, don't fabricate it), a Validation Journey **draft** via `github-add-journey`, and
|
|
56
|
+
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + `gh`/tracker search, don't fabricate it), a Validation Journey **draft** via `github-add-journey`, and Target Backend Environment — from the issue's own content (title, body, screenshots, design links, repro steps) plus the codebase. For bugs, parse the reported environment from bare env names and env-bearing URLs before recommending any default; the reported environment wins. Write it into the body via `github-write-issue` as clearly-labeled assumptions/recommendations (never overwrite the author's prose), then re-run `github-verify`. Whatever the agent could author is now structured spec; only genuinely human-only inputs remain.
|
|
57
57
|
2. Relabel: remove the `claimed` label, add the `blocked` label **and** the `human_needed` marker label. Even after the agent drafted what it could, a pre-flight gate failure bounces the issue back to its author because it still needs a human to **confirm the drafted assumptions** or supply something no agent can invent — real missing credentials, access, or an irreducible product/scoping decision — so the marker tells a human scanning the board which blocked issues are waiting on them. The marker is additive to `blocked`, not a replacement. (See the `config-resolution` rule's "Build markers" for when the marker applies and when it must NOT.)
|
|
58
58
|
```bash
|
|
59
59
|
_read_cfg() { local lv gv; lv=$(jq -r "$1 // empty" .lisa.config.local.json 2>/dev/null); gv=$(jq -r "$1 // empty" .lisa.config.json 2>/dev/null); echo "${lv:-${gv}}"; }
|
|
@@ -150,3 +150,4 @@ Note: `done` may be a string or an env-keyed map (`{ dev, staging, production }`
|
|
|
150
150
|
- Never create or materially edit an issue by calling `gh issue create` / `gh issue edit` directly — always delegate to `github-write-issue` (or, from a vendor-neutral caller, `tracker-write`) so relationships, Gherkin criteria, and metadata gates are enforced.
|
|
151
151
|
- If sign-in credentials are in the issue body, extract and pass them to the flow. If the issue touches an authenticated surface and credentials are missing, that is a Step 2 failure — block and reassign rather than guessing.
|
|
152
152
|
- If the issue has a `## Validation Journey` section, pass it to the verifier agent. The Validation Journey's local-verification step must point at the target backend environment named in the body.
|
|
153
|
+
- For bug issues, the reported environment named in the issue body or reproduction steps drives the implementation base branch via `deploy.branches`; if the mapping is missing, stop instead of defaulting. A non-integration environment fix must be merged and verified on that environment branch, then forward cherry-picked down to the integration branch through a linked follow-up.
|
|
@@ -48,7 +48,7 @@ Use the `jira-verify` skill to check the ticket against organizational standards
|
|
|
48
48
|
**Gating behavior — this is the one place auto-transitioning is allowed:**
|
|
49
49
|
|
|
50
50
|
If `jira-verify` returns `FAIL` on any of the above, do NOT continue to build. **Draft the missing spec content first, then block for confirmation** — never bounce a raw "go write all this" checklist back to the reporter:
|
|
51
|
-
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + JQL search, don't fabricate it), a Validation Journey **draft** via `jira-add-journey`, and
|
|
51
|
+
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + JQL search, don't fabricate it), a Validation Journey **draft** via `jira-add-journey`, and Target Backend Environment — from the ticket's own content (title, description, screenshots, design links, repro steps) plus the codebase. For bugs, parse the reported environment from bare env names and env-bearing URLs before recommending any default; the reported environment wins. Write it into the description via `jira-write-ticket` as clearly-labeled assumptions/recommendations (never overwrite the reporter's prose), then re-run `jira-verify`. Whatever the agent could author is now structured spec; only genuinely human-only inputs remain.
|
|
52
52
|
2. Transition the ticket status to the configured `blocked` status (typically `Blocked` — read from `.lisa.config.json` `jira.workflow.blocked` if present, otherwise the project's standard blocked status). Use `mcp__atlassian__transitionJiraIssue` or equivalent.
|
|
53
53
|
3. **Add the `human_needed` marker label.** Even after the agent drafted what it could, a pre-flight gate failure bounces the ticket back to its reporter because the ticket still needs a human to **confirm the drafted assumptions** or supply something no agent can invent — real missing credentials, access, or an irreducible product/scoping decision. Add the configured label (`jira.labels.human_needed`, default `Human Needed`) to the ticket's `labels` field via `mcp__atlassian__editJiraIssue` — a lightweight metadata update permitted under this same gate exception. This is additive to (not a replacement for) the `blocked` status, so a human scanning the board sees at a glance which blocked tickets are waiting on them. If the label does not exist in the project, record that and proceed — the marker is best-effort. (See the `config-resolution` rule's "Build markers" for when the marker applies and when it must NOT.)
|
|
54
54
|
4. Reassign the ticket to the **Reporter** (the human who filed it — not the Creator field, which may be a bot/integration).
|
|
@@ -130,3 +130,4 @@ Note: `done` may be a string or an env-keyed map (`{ dev, staging, production }`
|
|
|
130
130
|
- Never create or materially edit a ticket by calling MCP write tools directly — always delegate to `jira-write-ticket` so relationships, Gherkin criteria, and metadata gates are enforced
|
|
131
131
|
- If sign-in credentials are in the ticket, extract and pass them to the flow. If the ticket touches an authenticated surface and credentials are missing, that is a Step 2 failure — block and reassign rather than guessing.
|
|
132
132
|
- If the ticket has a Validation Journey section, pass it to the verifier agent. The Validation Journey's local-verification step must point at the target backend environment named in the description (for FE work, that's the deployed backend QA reported against).
|
|
133
|
+
- For bug tickets, the reported environment named in the description or reproduction steps drives the implementation base branch via `deploy.branches`; if the mapping is missing, stop instead of defaulting. A non-integration environment fix must be merged and verified on that environment branch, then forward cherry-picked down to the integration branch through a linked follow-up.
|
|
@@ -50,7 +50,7 @@ Use the `linear-verify` skill to check the item against organizational standards
|
|
|
50
50
|
Resolve build labels from `.lisa.config.json` `linear.labels.build.*` (defaults: `status:ready` / `status:in-progress` / `status:code-review`); resolve the `blocked` label from the same section (`linear.labels.build.blocked`, default `status:blocked`) and the `human_needed` marker label from the same section (`linear.labels.build.human_needed`, default `human-needed`).
|
|
51
51
|
|
|
52
52
|
If `linear-verify` returns `FAIL` on any of the above, do NOT continue to build. **Draft the missing spec content first, then block for confirmation** — never bounce a raw "go write all this" checklist back to the creator:
|
|
53
|
-
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + Linear search, don't fabricate it), a Validation Journey **draft** via `linear-add-journey`, and
|
|
53
|
+
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + Linear search, don't fabricate it), a Validation Journey **draft** via `linear-add-journey`, and Target Backend Environment — from the item's own content (title, description, screenshots, design links, repro steps) plus the codebase. For bugs, parse the reported environment from bare env names and env-bearing URLs before recommending any default; the reported environment wins. Write it into the description via `linear-write-issue` as clearly-labeled assumptions/recommendations (never overwrite the creator's prose), then re-run `linear-verify`. Whatever the agent could author is now structured spec; only genuinely human-only inputs remain.
|
|
54
54
|
2. Update labels via `lisa:linear-access operation: save-issue`: remove the current build label, add the configured `blocked` label **and** the configured `human_needed` marker label. (Create either label via `create_issue_label` if needed.) Even after the agent drafted what it could, a pre-flight gate failure bounces the item back to its creator because it still needs a human to **confirm the drafted assumptions** or supply something no agent can invent — real missing credentials, access, or an irreducible product/scoping decision — so the marker tells a human scanning the board which blocked items are waiting on them. The marker is additive to `blocked`, not a replacement. (See the `config-resolution` rule's "Build markers" for when the marker applies and when it must NOT.)
|
|
55
55
|
3. Reassign the item to the **Issue creator** (the human who filed it — Linear's `creator` field).
|
|
56
56
|
4. Post the **confirmation comment** from the `pre-flight-autofill` rule via `lisa:linear-access operation: save-comment`, **not** a bare remediation checklist: disclose it is a Claude draft, give one line per drafted section naming the key assumption made, list any remaining human-only item as a specific question with a recommended default, and close with *"review the drafted sections, correct anything wrong, then flip back to Ready and it builds — or reply with corrections."* Prefix with `[{repo}]`.
|
|
@@ -133,3 +133,4 @@ The label transitions ARE the canonical signal. The native `state` field stays a
|
|
|
133
133
|
- Never create or materially edit an item by calling MCP write tools directly — always delegate to `linear-write-issue` so relationships, Gherkin criteria, and metadata gates are enforced. Two explicit exceptions are permitted: (1) the Step 2 pre-flight failure path (when `linear-verify` returns `FAIL`) may call `lisa:linear-access operation: save-issue` and `lisa:linear-access operation: save-comment` directly to set `status:blocked`, add the configured `human_needed` marker label, and reassign to the creator — this narrow exception is already granted by the rule above; (2) the Step 3 triage path may call `lisa:linear-access operation: save-comment` to post triage findings and `lisa:linear-access operation: save-issue` to add the `claude-triaged-{repo}` label — these are lightweight metadata updates that do not create or materially edit ticket content and therefore do not need to route through `linear-write-issue`.
|
|
134
134
|
- If sign-in credentials are in the item, extract and pass them to the flow. If the item touches an authenticated surface and credentials are missing, that is a Step 2 failure — block and reassign rather than guessing.
|
|
135
135
|
- If the item has a Validation Journey section, pass it to the verifier agent. The Validation Journey's local-verification step must point at the target backend environment named in the description.
|
|
136
|
+
- For bug items, the reported environment named in the description or reproduction steps drives the implementation base branch via `deploy.branches`; if the mapping is missing, stop instead of defaulting. A non-integration environment fix must be merged and verified on that environment branch, then forward cherry-picked down to the integration branch through a linked follow-up.
|
|
@@ -25,4 +25,15 @@ Project tracker (`jira` / `github` / `linear`) is read from `.lisa.config.json`
|
|
|
25
25
|
|
|
26
26
|
`repo:<name>` is the canonical label for which repo a work item belongs to. Resolve current-repo identity in this priority order: `.lisa.config.local.json` `repo` → `.lisa.config.json` `repo` → `.lisa.config.json` `github.repo` → `basename -s .git "$(git remote get-url origin)"`. If none resolve, stop with a clear error.
|
|
27
27
|
|
|
28
|
+
## Env → base branch
|
|
29
|
+
|
|
30
|
+
For implementation work, map the work item's `## Target Backend Environment` to
|
|
31
|
+
the PR base branch through `.lisa.config.json` `deploy.branches`. For bugs, a
|
|
32
|
+
reported environment extracted from the description/reproduction steps wins over
|
|
33
|
+
an autofill default. If a reported environment is absent from `deploy.branches`,
|
|
34
|
+
stop and report the missing mapping instead of silently falling back to the
|
|
35
|
+
default or integration branch. A non-integration environment bug is fixed,
|
|
36
|
+
merged, and verified on that environment branch first, then forward
|
|
37
|
+
cherry-picked down to the integration branch via a linked follow-up.
|
|
38
|
+
|
|
28
39
|
Full reference: [reference/config-resolution.md](../reference/config-resolution.md).
|
|
@@ -21,8 +21,13 @@ information was already on the ticket; only the structure was missing).
|
|
|
21
21
|
Gherkin Acceptance Criteria (one scenario per fix), expected-vs-actual +
|
|
22
22
|
environment, Repository, Relationship Search (actually run the git+tracker
|
|
23
23
|
search — don't fabricate "none found"), Validation Journey **draft** (via the
|
|
24
|
-
vendor `*-add-journey` skill), Target Backend Environment
|
|
25
|
-
from
|
|
24
|
+
vendor `*-add-journey` skill), Target Backend Environment. For bugs, parse the
|
|
25
|
+
reported environment from the item body/reproduction steps before recommending
|
|
26
|
+
any default: bare environment names (`dev`, `staging`, `prod`, `production`)
|
|
27
|
+
and environment-bearing URLs (for example `staging.<domain>`, `gql.staging.*`,
|
|
28
|
+
`dev.<domain>`) are authoritative. Only recommend the configured default when
|
|
29
|
+
no environment is discoverable anywhere in the work item, and record that as
|
|
30
|
+
an assumption.
|
|
26
31
|
- **Tier B — irreducibly human:** real credentials/access that exist nowhere on
|
|
27
32
|
the item or in repo test-user docs; a genuine product/scoping decision with no
|
|
28
33
|
defensible default. Still propose a recommended default where one exists; ask
|
|
@@ -212,6 +212,33 @@ Declares **where this repo's LLM Wiki lives** so the query/ingest skills can res
|
|
|
212
212
|
|
|
213
213
|
`scripts/ensure-wiki.mjs` is the single resolver (`node scripts/ensure-wiki.mjs --json` → `{mode, wikiRoot, …}`). **LOCAL** mode (no `url`) is a no-op that resolves the wiki root in precedence order `wiki.source.path` → `wikiRoot` in `wiki/lisa-wiki.config.json` → `wiki`; **REMOTE** mode (`url` set) clones-if-missing, fast-forwards when stale, and is offline-tolerant (proceeds with the existing mirror and warns rather than blocking). Callers (`lisa-wiki-query`, `lisa-wiki-ingest`) invoke it as step 0 and never hardcode `wiki/`; the freshness guarantee is the tool's, not the caller's.
|
|
214
214
|
|
|
215
|
+
### Env → base branch
|
|
216
|
+
|
|
217
|
+
Implementation flows resolve their PR base from the work item's
|
|
218
|
+
`## Target Backend Environment` in the forward direction of `deploy.branches`.
|
|
219
|
+
For example, `{ "staging": "staging", "production": "main" }` means a staging
|
|
220
|
+
work item starts from `origin/staging` and opens its PR against `staging`. This
|
|
221
|
+
is the reverse/inverse of the env-keyed `done` inference that derives an
|
|
222
|
+
environment from a merged PR's base branch.
|
|
223
|
+
|
|
224
|
+
For bug work, the reported environment is authoritative. `pre-flight-autofill`
|
|
225
|
+
must parse environment mentions from the description/body and reproduction
|
|
226
|
+
steps, including bare names (`dev`, `staging`, `prod`, `production`) and
|
|
227
|
+
environment-bearing URLs (`staging.<domain>`, `gql.staging.*`,
|
|
228
|
+
`dev.<domain>`). A parsed reported environment wins over any generic autofill
|
|
229
|
+
default. If no environment is named anywhere, the flow may fall back to the
|
|
230
|
+
remote default branch and record that assumption on the work item.
|
|
231
|
+
|
|
232
|
+
If the reported environment is not present in `deploy.branches`, stop and report
|
|
233
|
+
the missing mapping. Do not silently default to the integration branch.
|
|
234
|
+
|
|
235
|
+
For non-integration environment bugs, definition of done is two-step:
|
|
236
|
+
|
|
237
|
+
1. Fix, merge, deploy, and verify on the reported environment branch first.
|
|
238
|
+
2. Forward cherry-pick the verified fix down to the integration branch, usually
|
|
239
|
+
via a linked follow-up PR or work item, so the next promotion does not
|
|
240
|
+
regress the fix.
|
|
241
|
+
|
|
215
242
|
### Vendor sections
|
|
216
243
|
|
|
217
244
|
Each vendor section is **conditionally required**: required only when that vendor is referenced as `tracker`, as `source`, or by an explicit invocation. Skills validate their own required keys at entry and stop with a clear error if missing — never invent values.
|
|
@@ -369,7 +396,7 @@ documented defaults, so existing projects need no config change.
|
|
|
369
396
|
|
|
370
397
|
| Key | Required | Default | Notes |
|
|
371
398
|
|-----|----------|---------|-------|
|
|
372
|
-
| `intake.repair.staleAfterHours` | no | `2` | How long an in-progress item (build `claimed`, PRD `in_review`) may
|
|
399
|
+
| `intake.repair.staleAfterHours` | no | `2` | How long an in-progress item (build `claimed`, PRD `in_review`) may sit after its last state-changing transition into the in-progress role, or after the last human / PR-side forward-progress activity, before repair-intake treats it as stalled and resumes it. Automation self-comments and Lisa audit notes do not reset this clock. `blocked` items are judged on blocker/answer state, not this threshold. Overridable per-run via `stale_after=<dur>` in `$ARGUMENTS` (which always wins). The same value is the default backoff window for loop-prevention notes. |
|
|
373
400
|
| `intake.repair.maxCandidates` | no | `100` | Upper bound on how many stuck items repair-intake enumerates while searching for the first actionable one. Bounds scan cost. Overridable per-run via `max_candidates=<n>`. |
|
|
374
401
|
|
|
375
402
|
### Monitor audit config (`monitor`)
|
|
@@ -49,9 +49,14 @@ spec.
|
|
|
49
49
|
- **Validation Journey (draft)** — run the vendor `*-add-journey` skill to draft
|
|
50
50
|
the click-path, markers, and viewports from the reproduction steps. This is a
|
|
51
51
|
draft for human approval, not the final ratified contract.
|
|
52
|
-
- **Target Backend Environment** —
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
- **Target Backend Environment** — for bugs, first parse the reported
|
|
53
|
+
environment from the title, description/body, screenshots captions, links, and
|
|
54
|
+
reproduction steps. Bare words such as `dev`, `staging`, `prod`, and
|
|
55
|
+
`production` count, as do environment-bearing URLs such as
|
|
56
|
+
`staging.<domain>`, `gql.staging.*`, and `dev.<domain>`. That reported
|
|
57
|
+
environment is authoritative for the draft. Only recommend a configured
|
|
58
|
+
default from `deploy.branches` / config when no environment is discoverable
|
|
59
|
+
anywhere in the work item, and record the default as an explicit assumption.
|
|
55
60
|
|
|
56
61
|
**Tier B — irreducibly human (cannot invent — but still propose a default):**
|
|
57
62
|
|
|
@@ -263,9 +263,10 @@ function resolveRepairQueueArgument(config, source, tracker) {
|
|
|
263
263
|
return "github intake_mode=both";
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
const buildQueue = resolveBuildQueueArgument(config, tracker);
|
|
267
|
+
return buildQueue.includes("intake_mode=")
|
|
268
|
+
? buildQueue
|
|
269
|
+
: `${buildQueue} intake_mode=build`;
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
/**
|
|
@@ -70,15 +70,15 @@ Using the general-purpose agent in Team Lead session, Determine the name of this
|
|
|
70
70
|
|
|
71
71
|
Using the general-purpose agent in Team Lead session, **determine the base branch from the ticket's target environment, then sync the working branch onto the latest of it before any work** — so implementation always builds on current target-environment code:
|
|
72
72
|
|
|
73
|
-
1. **Resolve the target environment** from the resolved work item — its `## Target Backend Environment` section (the field the `*-write-*` / `*-add-journey` skills record).
|
|
74
|
-
2. **Map the environment to a base branch** via `.lisa.config.json` `deploy.branches` (e.g. `staging → staging`, `production → main`) — the forward direction of the same map the env-keyed `done` resolution uses in reverse (see the `config-resolution` rule). If the work item names **no** environment, the base branch is the **remote default branch** (`gh repo view --json defaultBranchRef -q .defaultBranchRef.name`, or `git remote set-head origin -a` then read `origin/HEAD`). If the
|
|
73
|
+
1. **Resolve the target environment** from the resolved work item — its `## Target Backend Environment` section (the field the `*-write-*` / `*-add-journey` skills record). For bug work, the environment named in the report is authoritative: if the title/body/reproduction steps mention bare env names (`dev`, `staging`, `prod`, `production`) or env-bearing URLs (`staging.<domain>`, `gql.staging.*`, `dev.<domain>`), that reported environment wins over a generic autofill default.
|
|
74
|
+
2. **Map the environment to a base branch** via `.lisa.config.json` `deploy.branches` (e.g. `staging → staging`, `production → main`) — the forward direction of the same map the env-keyed `done` resolution uses in reverse (see the `config-resolution` rule). If the work item names **no** environment, the base branch is the **remote default branch** (`gh repo view --json defaultBranchRef -q .defaultBranchRef.name`, or `git remote set-head origin -a` then read `origin/HEAD`). If the reported environment is absent from `deploy.branches`, or its branch does not exist on the remote, **stop and report** — never guess a base and never silently fall back to the default/integration branch.
|
|
75
75
|
3. **Establish the feature branch off the latest base, conflict-free:**
|
|
76
76
|
- `git fetch origin`.
|
|
77
77
|
- Already on a feature branch with an **open PR** → reuse it. If the PR's base ≠ the resolved base branch, surface the mismatch and re-target only with confirmation — the ticket's environment is the source of truth.
|
|
78
78
|
- Already on a feature branch with **no open PR** → reuse it; its PR base will be the resolved base branch (do not ask the human — the environment determines it).
|
|
79
79
|
- On an **environment / default branch** → check out a feature branch named for this plan (with the work-item ref prefix, per the linkage rules below) **from `origin/<base>`**.
|
|
80
80
|
- **Rebase the feature branch onto `origin/<base>` and resolve any merge conflicts BEFORE starting work.** If the conflicts cannot be resolved cleanly and safely, create a fix task for the agent team (with the conflicting file list and current merge state) and resolve it before implementation begins — never start work on stale or conflicted code.
|
|
81
|
-
4. **The PR targets the resolved base branch** — carry it as `target_branch=<base>` into `lisa:git-submit-pr` (Verify flow). `git-submit-pr` already chooses a closing keyword when the base is the production/default branch and a non-closing reference for a non-terminal environment branch.
|
|
81
|
+
4. **The PR targets the resolved base branch** — carry it as `target_branch=<base>` into `lisa:git-submit-pr` (Verify flow). `git-submit-pr` already chooses a closing keyword when the base is the production/default branch and a non-closing reference for a non-terminal environment branch. For a bug fixed on a non-integration environment branch, the current flow is not done until the fix is merged and verified there, then forward cherry-picked down to the integration branch via a linked follow-up.
|
|
82
82
|
|
|
83
83
|
When the request came from a tracker work item, preserve its native identifier for development linkage:
|
|
84
84
|
|
|
@@ -80,7 +80,7 @@ lifecycle state with provider-native closure and rollup state.
|
|
|
80
80
|
|-------|---------|---------|
|
|
81
81
|
| `<queue>` | Same queue identifier `lisa:intake` accepts (see Source dispatch). Required. | — |
|
|
82
82
|
| `intake_mode` | `prd` \| `build` \| `both`. Only meaningful for a GitHub `org/repo` (or bare `github`) that hosts both PRD and build label namespaces. `both` is unique to repair — a repair sweep usefully covers both lifecycles in one schedule. Absent → `both` when both namespaces exist, else whichever lifecycle exists. | `both` for dual GitHub queues; otherwise infer |
|
|
83
|
-
| `stale_after` | How long
|
|
83
|
+
| `stale_after` | How long since the last state-changing transition into the in-progress role, or since the last human / PR-side forward-progress activity, before an in-progress item counts as stalled. Automation self-comments do not reset this clock. Accepts `24h`, `90m`, `2d`, or `0` (treat any in-progress item as stalled — manual recovery, also the only way to resume work on a provider that exposes no reliable timestamp). Overrides config. | `2h` |
|
|
84
84
|
| `max_candidates` | Cap on how many stuck/close-out candidates to enumerate and evaluate. Repair every materially actionable candidate within this bounded set, then stop. Overrides config. | `100` |
|
|
85
85
|
| `force` | `true` bypasses the loop-prevention backoff window (so a manual re-run re-attempts items even if their fingerprint is unchanged). It does **not** change the staleness rule — use `stale_after=0` for that. | `false` |
|
|
86
86
|
|
|
@@ -228,9 +228,19 @@ intakes use. Never call Atlassian MCP or `acli` directly — go through `lisa:at
|
|
|
228
228
|
|
|
229
229
|
## Staleness model
|
|
230
230
|
|
|
231
|
-
An in-progress item (build `claimed`, PRD `in_review`) is **stalled**
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
An in-progress item (build `claimed`, PRD `in_review`) is **stalled** when the last
|
|
232
|
+
state-changing transition into the in-progress role, or the last human / PR-side forward-progress
|
|
233
|
+
activity after that transition, is older than the `stale_after` threshold. `blocked` items are NOT
|
|
234
|
+
gated on staleness — their repairability is judged on current blocker/answer state, not elapsed
|
|
235
|
+
time.
|
|
236
|
+
|
|
237
|
+
Automation self-comments are not forward progress and must not reset the staleness clock. Status
|
|
238
|
+
comments like `[claude-build-intake] PR remains open...`, `[codex-build-intake] Follow-up pushed...`,
|
|
239
|
+
or `[lisa-repair-intake] ...` may be useful audit notes, but they cannot make a claimed item fresh
|
|
240
|
+
forever. If a provider exposes a changelog/history surface, prefer the timestamp of the last
|
|
241
|
+
transition into the claimed/In-Progress role over the item's generic `updated` timestamp. When the
|
|
242
|
+
history surface is unavailable, ignore comments whose author/marker clearly belongs to Lisa or its
|
|
243
|
+
automation agents, and use the newest human comment/edit or PR-side progress event instead.
|
|
234
244
|
|
|
235
245
|
A build `claimed` leaf whose linked PR has **already merged** (`state == MERGED`) is likewise NOT
|
|
236
246
|
gated on staleness. A merged PR is a settled terminal state, not in-flight work: the only thing
|
|
@@ -254,17 +264,24 @@ decision tree step 0, and the dedicated high-confidence ordering bucket).
|
|
|
254
264
|
`stale_after=0` means "treat any in-progress item as stalled" — a manual full-recovery lever,
|
|
255
265
|
and the only way to resume work on a provider that exposes no reliable activity timestamp.
|
|
256
266
|
|
|
257
|
-
### Activity signal (
|
|
267
|
+
### Activity signal (state-change first, portable across vendors)
|
|
258
268
|
|
|
259
|
-
Compute the item's newest activity timestamp from the highest-priority signal the vendor
|
|
269
|
+
Compute the item's newest eligible activity timestamp from the highest-priority signal the vendor
|
|
260
270
|
exposes, and compare it to `now - stale_after`:
|
|
261
271
|
|
|
262
|
-
1. Provider-native
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
272
|
+
1. Provider-native status/label **transition** time into the in-progress role, when the provider
|
|
273
|
+
exposes it cleanly (JIRA changelog transition to `claimed` / In Progress, GitHub label event,
|
|
274
|
+
Linear state/label history, Notion/Confluence page move/status history).
|
|
275
|
+
2. Latest human lifecycle/progress **comment** or edit on the item (and, for Linear PRDs, the
|
|
276
|
+
sentinel feedback issue). Exclude automation self-comments and Lisa audit markers such as
|
|
277
|
+
`[claude-build-intake]`, `[codex-build-intake]`, `[lisa-build-intake]`, and
|
|
278
|
+
`[lisa-repair-intake]`.
|
|
279
|
+
3. For build items, latest **PR-side forward-progress activity** on the linked PR: newest commit,
|
|
280
|
+
review, check-run,
|
|
266
281
|
or PR comment.
|
|
267
|
-
4.
|
|
282
|
+
4. Provider-native item `updatedAt` / `last_edited_time` / `updated` only when the provider cannot
|
|
283
|
+
expose transition/comment authorship and the timestamp is not known to be driven by automation
|
|
284
|
+
self-comments.
|
|
268
285
|
|
|
269
286
|
If ANY of these is newer than the threshold, the item is **active** → record it as `active` and
|
|
270
287
|
skip it (read-only). For build `claimed`, an open PR with recent commits/checks is active. For
|
|
@@ -53,7 +53,7 @@ Resolve build labels from `.lisa.config.json` `github.labels.build.*` (defaults:
|
|
|
53
53
|
|
|
54
54
|
If `github-verify` returns `FAIL` on any of the above, do NOT continue to build. **Draft the missing spec content first, then block for confirmation** — never bounce a raw "go write all this" checklist back to the author:
|
|
55
55
|
|
|
56
|
-
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + `gh`/tracker search, don't fabricate it), a Validation Journey **draft** via `github-add-journey`, and
|
|
56
|
+
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + `gh`/tracker search, don't fabricate it), a Validation Journey **draft** via `github-add-journey`, and Target Backend Environment — from the issue's own content (title, body, screenshots, design links, repro steps) plus the codebase. For bugs, parse the reported environment from bare env names and env-bearing URLs before recommending any default; the reported environment wins. Write it into the body via `github-write-issue` as clearly-labeled assumptions/recommendations (never overwrite the author's prose), then re-run `github-verify`. Whatever the agent could author is now structured spec; only genuinely human-only inputs remain.
|
|
57
57
|
2. Relabel: remove the `claimed` label, add the `blocked` label **and** the `human_needed` marker label. Even after the agent drafted what it could, a pre-flight gate failure bounces the issue back to its author because it still needs a human to **confirm the drafted assumptions** or supply something no agent can invent — real missing credentials, access, or an irreducible product/scoping decision — so the marker tells a human scanning the board which blocked issues are waiting on them. The marker is additive to `blocked`, not a replacement. (See the `config-resolution` rule's "Build markers" for when the marker applies and when it must NOT.)
|
|
58
58
|
```bash
|
|
59
59
|
_read_cfg() { local lv gv; lv=$(jq -r "$1 // empty" .lisa.config.local.json 2>/dev/null); gv=$(jq -r "$1 // empty" .lisa.config.json 2>/dev/null); echo "${lv:-${gv}}"; }
|
|
@@ -150,3 +150,4 @@ Note: `done` may be a string or an env-keyed map (`{ dev, staging, production }`
|
|
|
150
150
|
- Never create or materially edit an issue by calling `gh issue create` / `gh issue edit` directly — always delegate to `github-write-issue` (or, from a vendor-neutral caller, `tracker-write`) so relationships, Gherkin criteria, and metadata gates are enforced.
|
|
151
151
|
- If sign-in credentials are in the issue body, extract and pass them to the flow. If the issue touches an authenticated surface and credentials are missing, that is a Step 2 failure — block and reassign rather than guessing.
|
|
152
152
|
- If the issue has a `## Validation Journey` section, pass it to the verifier agent. The Validation Journey's local-verification step must point at the target backend environment named in the body.
|
|
153
|
+
- For bug issues, the reported environment named in the issue body or reproduction steps drives the implementation base branch via `deploy.branches`; if the mapping is missing, stop instead of defaulting. A non-integration environment fix must be merged and verified on that environment branch, then forward cherry-picked down to the integration branch through a linked follow-up.
|
|
@@ -48,7 +48,7 @@ Use the `jira-verify` skill to check the ticket against organizational standards
|
|
|
48
48
|
**Gating behavior — this is the one place auto-transitioning is allowed:**
|
|
49
49
|
|
|
50
50
|
If `jira-verify` returns `FAIL` on any of the above, do NOT continue to build. **Draft the missing spec content first, then block for confirmation** — never bounce a raw "go write all this" checklist back to the reporter:
|
|
51
|
-
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + JQL search, don't fabricate it), a Validation Journey **draft** via `jira-add-journey`, and
|
|
51
|
+
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + JQL search, don't fabricate it), a Validation Journey **draft** via `jira-add-journey`, and Target Backend Environment — from the ticket's own content (title, description, screenshots, design links, repro steps) plus the codebase. For bugs, parse the reported environment from bare env names and env-bearing URLs before recommending any default; the reported environment wins. Write it into the description via `jira-write-ticket` as clearly-labeled assumptions/recommendations (never overwrite the reporter's prose), then re-run `jira-verify`. Whatever the agent could author is now structured spec; only genuinely human-only inputs remain.
|
|
52
52
|
2. Transition the ticket status to the configured `blocked` status (typically `Blocked` — read from `.lisa.config.json` `jira.workflow.blocked` if present, otherwise the project's standard blocked status). Use `mcp__atlassian__transitionJiraIssue` or equivalent.
|
|
53
53
|
3. **Add the `human_needed` marker label.** Even after the agent drafted what it could, a pre-flight gate failure bounces the ticket back to its reporter because the ticket still needs a human to **confirm the drafted assumptions** or supply something no agent can invent — real missing credentials, access, or an irreducible product/scoping decision. Add the configured label (`jira.labels.human_needed`, default `Human Needed`) to the ticket's `labels` field via `mcp__atlassian__editJiraIssue` — a lightweight metadata update permitted under this same gate exception. This is additive to (not a replacement for) the `blocked` status, so a human scanning the board sees at a glance which blocked tickets are waiting on them. If the label does not exist in the project, record that and proceed — the marker is best-effort. (See the `config-resolution` rule's "Build markers" for when the marker applies and when it must NOT.)
|
|
54
54
|
4. Reassign the ticket to the **Reporter** (the human who filed it — not the Creator field, which may be a bot/integration).
|
|
@@ -130,3 +130,4 @@ Note: `done` may be a string or an env-keyed map (`{ dev, staging, production }`
|
|
|
130
130
|
- Never create or materially edit a ticket by calling MCP write tools directly — always delegate to `jira-write-ticket` so relationships, Gherkin criteria, and metadata gates are enforced
|
|
131
131
|
- If sign-in credentials are in the ticket, extract and pass them to the flow. If the ticket touches an authenticated surface and credentials are missing, that is a Step 2 failure — block and reassign rather than guessing.
|
|
132
132
|
- If the ticket has a Validation Journey section, pass it to the verifier agent. The Validation Journey's local-verification step must point at the target backend environment named in the description (for FE work, that's the deployed backend QA reported against).
|
|
133
|
+
- For bug tickets, the reported environment named in the description or reproduction steps drives the implementation base branch via `deploy.branches`; if the mapping is missing, stop instead of defaulting. A non-integration environment fix must be merged and verified on that environment branch, then forward cherry-picked down to the integration branch through a linked follow-up.
|
|
@@ -50,7 +50,7 @@ Use the `linear-verify` skill to check the item against organizational standards
|
|
|
50
50
|
Resolve build labels from `.lisa.config.json` `linear.labels.build.*` (defaults: `status:ready` / `status:in-progress` / `status:code-review`); resolve the `blocked` label from the same section (`linear.labels.build.blocked`, default `status:blocked`) and the `human_needed` marker label from the same section (`linear.labels.build.human_needed`, default `human-needed`).
|
|
51
51
|
|
|
52
52
|
If `linear-verify` returns `FAIL` on any of the above, do NOT continue to build. **Draft the missing spec content first, then block for confirmation** — never bounce a raw "go write all this" checklist back to the creator:
|
|
53
|
-
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + Linear search, don't fabricate it), a Validation Journey **draft** via `linear-add-journey`, and
|
|
53
|
+
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + Linear search, don't fabricate it), a Validation Journey **draft** via `linear-add-journey`, and Target Backend Environment — from the item's own content (title, description, screenshots, design links, repro steps) plus the codebase. For bugs, parse the reported environment from bare env names and env-bearing URLs before recommending any default; the reported environment wins. Write it into the description via `linear-write-issue` as clearly-labeled assumptions/recommendations (never overwrite the creator's prose), then re-run `linear-verify`. Whatever the agent could author is now structured spec; only genuinely human-only inputs remain.
|
|
54
54
|
2. Update labels via `lisa:linear-access operation: save-issue`: remove the current build label, add the configured `blocked` label **and** the configured `human_needed` marker label. (Create either label via `create_issue_label` if needed.) Even after the agent drafted what it could, a pre-flight gate failure bounces the item back to its creator because it still needs a human to **confirm the drafted assumptions** or supply something no agent can invent — real missing credentials, access, or an irreducible product/scoping decision — so the marker tells a human scanning the board which blocked items are waiting on them. The marker is additive to `blocked`, not a replacement. (See the `config-resolution` rule's "Build markers" for when the marker applies and when it must NOT.)
|
|
55
55
|
3. Reassign the item to the **Issue creator** (the human who filed it — Linear's `creator` field).
|
|
56
56
|
4. Post the **confirmation comment** from the `pre-flight-autofill` rule via `lisa:linear-access operation: save-comment`, **not** a bare remediation checklist: disclose it is a Claude draft, give one line per drafted section naming the key assumption made, list any remaining human-only item as a specific question with a recommended default, and close with *"review the drafted sections, correct anything wrong, then flip back to Ready and it builds — or reply with corrections."* Prefix with `[{repo}]`.
|
|
@@ -133,3 +133,4 @@ The label transitions ARE the canonical signal. The native `state` field stays a
|
|
|
133
133
|
- Never create or materially edit an item by calling MCP write tools directly — always delegate to `linear-write-issue` so relationships, Gherkin criteria, and metadata gates are enforced. Two explicit exceptions are permitted: (1) the Step 2 pre-flight failure path (when `linear-verify` returns `FAIL`) may call `lisa:linear-access operation: save-issue` and `lisa:linear-access operation: save-comment` directly to set `status:blocked`, add the configured `human_needed` marker label, and reassign to the creator — this narrow exception is already granted by the rule above; (2) the Step 3 triage path may call `lisa:linear-access operation: save-comment` to post triage findings and `lisa:linear-access operation: save-issue` to add the `claude-triaged-{repo}` label — these are lightweight metadata updates that do not create or materially edit ticket content and therefore do not need to route through `linear-write-issue`.
|
|
134
134
|
- If sign-in credentials are in the item, extract and pass them to the flow. If the item touches an authenticated surface and credentials are missing, that is a Step 2 failure — block and reassign rather than guessing.
|
|
135
135
|
- If the item has a Validation Journey section, pass it to the verifier agent. The Validation Journey's local-verification step must point at the target backend environment named in the description.
|
|
136
|
+
- For bug items, the reported environment named in the description or reproduction steps drives the implementation base branch via `deploy.branches`; if the mapping is missing, stop instead of defaulting. A non-integration environment fix must be merged and verified on that environment branch, then forward cherry-picked down to the integration branch through a linked follow-up.
|
|
@@ -263,9 +263,10 @@ function resolveRepairQueueArgument(config, source, tracker) {
|
|
|
263
263
|
return "github intake_mode=both";
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
const buildQueue = resolveBuildQueueArgument(config, tracker);
|
|
267
|
+
return buildQueue.includes("intake_mode=")
|
|
268
|
+
? buildQueue
|
|
269
|
+
: `${buildQueue} intake_mode=build`;
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
/**
|
|
@@ -70,15 +70,15 @@ Using the general-purpose agent in Team Lead session, Determine the name of this
|
|
|
70
70
|
|
|
71
71
|
Using the general-purpose agent in Team Lead session, **determine the base branch from the ticket's target environment, then sync the working branch onto the latest of it before any work** — so implementation always builds on current target-environment code:
|
|
72
72
|
|
|
73
|
-
1. **Resolve the target environment** from the resolved work item — its `## Target Backend Environment` section (the field the `*-write-*` / `*-add-journey` skills record).
|
|
74
|
-
2. **Map the environment to a base branch** via `.lisa.config.json` `deploy.branches` (e.g. `staging → staging`, `production → main`) — the forward direction of the same map the env-keyed `done` resolution uses in reverse (see the `config-resolution` rule). If the work item names **no** environment, the base branch is the **remote default branch** (`gh repo view --json defaultBranchRef -q .defaultBranchRef.name`, or `git remote set-head origin -a` then read `origin/HEAD`). If the
|
|
73
|
+
1. **Resolve the target environment** from the resolved work item — its `## Target Backend Environment` section (the field the `*-write-*` / `*-add-journey` skills record). For bug work, the environment named in the report is authoritative: if the title/body/reproduction steps mention bare env names (`dev`, `staging`, `prod`, `production`) or env-bearing URLs (`staging.<domain>`, `gql.staging.*`, `dev.<domain>`), that reported environment wins over a generic autofill default.
|
|
74
|
+
2. **Map the environment to a base branch** via `.lisa.config.json` `deploy.branches` (e.g. `staging → staging`, `production → main`) — the forward direction of the same map the env-keyed `done` resolution uses in reverse (see the `config-resolution` rule). If the work item names **no** environment, the base branch is the **remote default branch** (`gh repo view --json defaultBranchRef -q .defaultBranchRef.name`, or `git remote set-head origin -a` then read `origin/HEAD`). If the reported environment is absent from `deploy.branches`, or its branch does not exist on the remote, **stop and report** — never guess a base and never silently fall back to the default/integration branch.
|
|
75
75
|
3. **Establish the feature branch off the latest base, conflict-free:**
|
|
76
76
|
- `git fetch origin`.
|
|
77
77
|
- Already on a feature branch with an **open PR** → reuse it. If the PR's base ≠ the resolved base branch, surface the mismatch and re-target only with confirmation — the ticket's environment is the source of truth.
|
|
78
78
|
- Already on a feature branch with **no open PR** → reuse it; its PR base will be the resolved base branch (do not ask the human — the environment determines it).
|
|
79
79
|
- On an **environment / default branch** → check out a feature branch named for this plan (with the work-item ref prefix, per the linkage rules below) **from `origin/<base>`**.
|
|
80
80
|
- **Rebase the feature branch onto `origin/<base>` and resolve any merge conflicts BEFORE starting work.** If the conflicts cannot be resolved cleanly and safely, create a fix task for the agent team (with the conflicting file list and current merge state) and resolve it before implementation begins — never start work on stale or conflicted code.
|
|
81
|
-
4. **The PR targets the resolved base branch** — carry it as `target_branch=<base>` into `lisa:git-submit-pr` (Verify flow). `git-submit-pr` already chooses a closing keyword when the base is the production/default branch and a non-closing reference for a non-terminal environment branch.
|
|
81
|
+
4. **The PR targets the resolved base branch** — carry it as `target_branch=<base>` into `lisa:git-submit-pr` (Verify flow). `git-submit-pr` already chooses a closing keyword when the base is the production/default branch and a non-closing reference for a non-terminal environment branch. For a bug fixed on a non-integration environment branch, the current flow is not done until the fix is merged and verified there, then forward cherry-picked down to the integration branch via a linked follow-up.
|
|
82
82
|
|
|
83
83
|
When the request came from a tracker work item, preserve its native identifier for development linkage:
|
|
84
84
|
|
|
@@ -80,7 +80,7 @@ lifecycle state with provider-native closure and rollup state.
|
|
|
80
80
|
|-------|---------|---------|
|
|
81
81
|
| `<queue>` | Same queue identifier `lisa:intake` accepts (see Source dispatch). Required. | — |
|
|
82
82
|
| `intake_mode` | `prd` \| `build` \| `both`. Only meaningful for a GitHub `org/repo` (or bare `github`) that hosts both PRD and build label namespaces. `both` is unique to repair — a repair sweep usefully covers both lifecycles in one schedule. Absent → `both` when both namespaces exist, else whichever lifecycle exists. | `both` for dual GitHub queues; otherwise infer |
|
|
83
|
-
| `stale_after` | How long
|
|
83
|
+
| `stale_after` | How long since the last state-changing transition into the in-progress role, or since the last human / PR-side forward-progress activity, before an in-progress item counts as stalled. Automation self-comments do not reset this clock. Accepts `24h`, `90m`, `2d`, or `0` (treat any in-progress item as stalled — manual recovery, also the only way to resume work on a provider that exposes no reliable timestamp). Overrides config. | `2h` |
|
|
84
84
|
| `max_candidates` | Cap on how many stuck/close-out candidates to enumerate and evaluate. Repair every materially actionable candidate within this bounded set, then stop. Overrides config. | `100` |
|
|
85
85
|
| `force` | `true` bypasses the loop-prevention backoff window (so a manual re-run re-attempts items even if their fingerprint is unchanged). It does **not** change the staleness rule — use `stale_after=0` for that. | `false` |
|
|
86
86
|
|
|
@@ -228,9 +228,19 @@ intakes use. Never call Atlassian MCP or `acli` directly — go through `lisa:at
|
|
|
228
228
|
|
|
229
229
|
## Staleness model
|
|
230
230
|
|
|
231
|
-
An in-progress item (build `claimed`, PRD `in_review`) is **stalled**
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
An in-progress item (build `claimed`, PRD `in_review`) is **stalled** when the last
|
|
232
|
+
state-changing transition into the in-progress role, or the last human / PR-side forward-progress
|
|
233
|
+
activity after that transition, is older than the `stale_after` threshold. `blocked` items are NOT
|
|
234
|
+
gated on staleness — their repairability is judged on current blocker/answer state, not elapsed
|
|
235
|
+
time.
|
|
236
|
+
|
|
237
|
+
Automation self-comments are not forward progress and must not reset the staleness clock. Status
|
|
238
|
+
comments like `[claude-build-intake] PR remains open...`, `[codex-build-intake] Follow-up pushed...`,
|
|
239
|
+
or `[lisa-repair-intake] ...` may be useful audit notes, but they cannot make a claimed item fresh
|
|
240
|
+
forever. If a provider exposes a changelog/history surface, prefer the timestamp of the last
|
|
241
|
+
transition into the claimed/In-Progress role over the item's generic `updated` timestamp. When the
|
|
242
|
+
history surface is unavailable, ignore comments whose author/marker clearly belongs to Lisa or its
|
|
243
|
+
automation agents, and use the newest human comment/edit or PR-side progress event instead.
|
|
234
244
|
|
|
235
245
|
A build `claimed` leaf whose linked PR has **already merged** (`state == MERGED`) is likewise NOT
|
|
236
246
|
gated on staleness. A merged PR is a settled terminal state, not in-flight work: the only thing
|
|
@@ -254,17 +264,24 @@ decision tree step 0, and the dedicated high-confidence ordering bucket).
|
|
|
254
264
|
`stale_after=0` means "treat any in-progress item as stalled" — a manual full-recovery lever,
|
|
255
265
|
and the only way to resume work on a provider that exposes no reliable activity timestamp.
|
|
256
266
|
|
|
257
|
-
### Activity signal (
|
|
267
|
+
### Activity signal (state-change first, portable across vendors)
|
|
258
268
|
|
|
259
|
-
Compute the item's newest activity timestamp from the highest-priority signal the vendor
|
|
269
|
+
Compute the item's newest eligible activity timestamp from the highest-priority signal the vendor
|
|
260
270
|
exposes, and compare it to `now - stale_after`:
|
|
261
271
|
|
|
262
|
-
1. Provider-native
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
272
|
+
1. Provider-native status/label **transition** time into the in-progress role, when the provider
|
|
273
|
+
exposes it cleanly (JIRA changelog transition to `claimed` / In Progress, GitHub label event,
|
|
274
|
+
Linear state/label history, Notion/Confluence page move/status history).
|
|
275
|
+
2. Latest human lifecycle/progress **comment** or edit on the item (and, for Linear PRDs, the
|
|
276
|
+
sentinel feedback issue). Exclude automation self-comments and Lisa audit markers such as
|
|
277
|
+
`[claude-build-intake]`, `[codex-build-intake]`, `[lisa-build-intake]`, and
|
|
278
|
+
`[lisa-repair-intake]`.
|
|
279
|
+
3. For build items, latest **PR-side forward-progress activity** on the linked PR: newest commit,
|
|
280
|
+
review, check-run,
|
|
266
281
|
or PR comment.
|
|
267
|
-
4.
|
|
282
|
+
4. Provider-native item `updatedAt` / `last_edited_time` / `updated` only when the provider cannot
|
|
283
|
+
expose transition/comment authorship and the timestamp is not known to be driven by automation
|
|
284
|
+
self-comments.
|
|
268
285
|
|
|
269
286
|
If ANY of these is newer than the threshold, the item is **active** → record it as `active` and
|
|
270
287
|
skip it (read-only). For build `claimed`, an open PR with recent commits/checks is active. For
|
|
@@ -53,7 +53,7 @@ Resolve build labels from `.lisa.config.json` `github.labels.build.*` (defaults:
|
|
|
53
53
|
|
|
54
54
|
If `github-verify` returns `FAIL` on any of the above, do NOT continue to build. **Draft the missing spec content first, then block for confirmation** — never bounce a raw "go write all this" checklist back to the author:
|
|
55
55
|
|
|
56
|
-
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + `gh`/tracker search, don't fabricate it), a Validation Journey **draft** via `github-add-journey`, and
|
|
56
|
+
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + `gh`/tracker search, don't fabricate it), a Validation Journey **draft** via `github-add-journey`, and Target Backend Environment — from the issue's own content (title, body, screenshots, design links, repro steps) plus the codebase. For bugs, parse the reported environment from bare env names and env-bearing URLs before recommending any default; the reported environment wins. Write it into the body via `github-write-issue` as clearly-labeled assumptions/recommendations (never overwrite the author's prose), then re-run `github-verify`. Whatever the agent could author is now structured spec; only genuinely human-only inputs remain.
|
|
57
57
|
2. Relabel: remove the `claimed` label, add the `blocked` label **and** the `human_needed` marker label. Even after the agent drafted what it could, a pre-flight gate failure bounces the issue back to its author because it still needs a human to **confirm the drafted assumptions** or supply something no agent can invent — real missing credentials, access, or an irreducible product/scoping decision — so the marker tells a human scanning the board which blocked issues are waiting on them. The marker is additive to `blocked`, not a replacement. (See the `config-resolution` rule's "Build markers" for when the marker applies and when it must NOT.)
|
|
58
58
|
```bash
|
|
59
59
|
_read_cfg() { local lv gv; lv=$(jq -r "$1 // empty" .lisa.config.local.json 2>/dev/null); gv=$(jq -r "$1 // empty" .lisa.config.json 2>/dev/null); echo "${lv:-${gv}}"; }
|
|
@@ -150,3 +150,4 @@ Note: `done` may be a string or an env-keyed map (`{ dev, staging, production }`
|
|
|
150
150
|
- Never create or materially edit an issue by calling `gh issue create` / `gh issue edit` directly — always delegate to `github-write-issue` (or, from a vendor-neutral caller, `tracker-write`) so relationships, Gherkin criteria, and metadata gates are enforced.
|
|
151
151
|
- If sign-in credentials are in the issue body, extract and pass them to the flow. If the issue touches an authenticated surface and credentials are missing, that is a Step 2 failure — block and reassign rather than guessing.
|
|
152
152
|
- If the issue has a `## Validation Journey` section, pass it to the verifier agent. The Validation Journey's local-verification step must point at the target backend environment named in the body.
|
|
153
|
+
- For bug issues, the reported environment named in the issue body or reproduction steps drives the implementation base branch via `deploy.branches`; if the mapping is missing, stop instead of defaulting. A non-integration environment fix must be merged and verified on that environment branch, then forward cherry-picked down to the integration branch through a linked follow-up.
|
|
@@ -48,7 +48,7 @@ Use the `jira-verify` skill to check the ticket against organizational standards
|
|
|
48
48
|
**Gating behavior — this is the one place auto-transitioning is allowed:**
|
|
49
49
|
|
|
50
50
|
If `jira-verify` returns `FAIL` on any of the above, do NOT continue to build. **Draft the missing spec content first, then block for confirmation** — never bounce a raw "go write all this" checklist back to the reporter:
|
|
51
|
-
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + JQL search, don't fabricate it), a Validation Journey **draft** via `jira-add-journey`, and
|
|
51
|
+
1. **Best-effort autofill (before blocking).** Run the **draft-then-block procedure** in the `pre-flight-autofill` rule: draft every *authorable* missing section — Technical Approach, Out of Scope, Gherkin acceptance criteria, expected-vs-actual, Repository, Relationship Search (run the git + JQL search, don't fabricate it), a Validation Journey **draft** via `jira-add-journey`, and Target Backend Environment — from the ticket's own content (title, description, screenshots, design links, repro steps) plus the codebase. For bugs, parse the reported environment from bare env names and env-bearing URLs before recommending any default; the reported environment wins. Write it into the description via `jira-write-ticket` as clearly-labeled assumptions/recommendations (never overwrite the reporter's prose), then re-run `jira-verify`. Whatever the agent could author is now structured spec; only genuinely human-only inputs remain.
|
|
52
52
|
2. Transition the ticket status to the configured `blocked` status (typically `Blocked` — read from `.lisa.config.json` `jira.workflow.blocked` if present, otherwise the project's standard blocked status). Use `mcp__atlassian__transitionJiraIssue` or equivalent.
|
|
53
53
|
3. **Add the `human_needed` marker label.** Even after the agent drafted what it could, a pre-flight gate failure bounces the ticket back to its reporter because the ticket still needs a human to **confirm the drafted assumptions** or supply something no agent can invent — real missing credentials, access, or an irreducible product/scoping decision. Add the configured label (`jira.labels.human_needed`, default `Human Needed`) to the ticket's `labels` field via `mcp__atlassian__editJiraIssue` — a lightweight metadata update permitted under this same gate exception. This is additive to (not a replacement for) the `blocked` status, so a human scanning the board sees at a glance which blocked tickets are waiting on them. If the label does not exist in the project, record that and proceed — the marker is best-effort. (See the `config-resolution` rule's "Build markers" for when the marker applies and when it must NOT.)
|
|
54
54
|
4. Reassign the ticket to the **Reporter** (the human who filed it — not the Creator field, which may be a bot/integration).
|
|
@@ -130,3 +130,4 @@ Note: `done` may be a string or an env-keyed map (`{ dev, staging, production }`
|
|
|
130
130
|
- Never create or materially edit a ticket by calling MCP write tools directly — always delegate to `jira-write-ticket` so relationships, Gherkin criteria, and metadata gates are enforced
|
|
131
131
|
- If sign-in credentials are in the ticket, extract and pass them to the flow. If the ticket touches an authenticated surface and credentials are missing, that is a Step 2 failure — block and reassign rather than guessing.
|
|
132
132
|
- If the ticket has a Validation Journey section, pass it to the verifier agent. The Validation Journey's local-verification step must point at the target backend environment named in the description (for FE work, that's the deployed backend QA reported against).
|
|
133
|
+
- For bug tickets, the reported environment named in the description or reproduction steps drives the implementation base branch via `deploy.branches`; if the mapping is missing, stop instead of defaulting. A non-integration environment fix must be merged and verified on that environment branch, then forward cherry-picked down to the integration branch through a linked follow-up.
|