@codyswann/lisa 2.23.0 → 2.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/harper-fabric/package-lisa/package.lisa.json +24 -21
  2. package/package.json +2 -2
  3. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  4. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  5. package/plugins/lisa/agents/learnings-synthesizer.md +1 -1
  6. package/plugins/lisa/agents/pr-mining-specialist.md +1 -1
  7. package/plugins/lisa/agents/tracker-mining-specialist.md +1 -1
  8. package/plugins/lisa/hooks/enforce-team-first.sh +14 -6
  9. package/plugins/lisa/rules/base-rules.md +2 -2
  10. package/plugins/lisa/rules/intent-routing.md +4 -4
  11. package/plugins/lisa/skills/debrief/SKILL.md +4 -5
  12. package/plugins/lisa/skills/implement/SKILL.md +5 -6
  13. package/plugins/lisa/skills/intake/SKILL.md +5 -6
  14. package/plugins/lisa/skills/monitor/SKILL.md +4 -5
  15. package/plugins/lisa/skills/plan/SKILL.md +4 -5
  16. package/plugins/lisa/skills/research/SKILL.md +4 -5
  17. package/plugins/lisa/skills/verify/SKILL.md +4 -5
  18. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  19. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  20. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  22. package/plugins/lisa-expo/skills/ops-browser-uat/SKILL.md +1 -1
  23. package/plugins/lisa-expo/skills/ops-check-logs/SKILL.md +1 -1
  24. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  26. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  28. package/plugins/lisa-nestjs/skills/nestjs-graphql/references/project-patterns.md +48 -0
  29. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  31. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  33. package/plugins/src/base/agents/learnings-synthesizer.md +1 -1
  34. package/plugins/src/base/agents/pr-mining-specialist.md +1 -1
  35. package/plugins/src/base/agents/tracker-mining-specialist.md +1 -1
  36. package/plugins/src/base/hooks/enforce-team-first.sh +14 -6
  37. package/plugins/src/base/rules/base-rules.md +2 -2
  38. package/plugins/src/base/rules/intent-routing.md +4 -4
  39. package/plugins/src/base/skills/debrief/SKILL.md +4 -5
  40. package/plugins/src/base/skills/implement/SKILL.md +5 -6
  41. package/plugins/src/base/skills/intake/SKILL.md +5 -6
  42. package/plugins/src/base/skills/monitor/SKILL.md +4 -5
  43. package/plugins/src/base/skills/plan/SKILL.md +4 -5
  44. package/plugins/src/base/skills/research/SKILL.md +4 -5
  45. package/plugins/src/base/skills/verify/SKILL.md +4 -5
  46. package/plugins/src/expo/skills/ops-browser-uat/SKILL.md +1 -1
  47. package/plugins/src/expo/skills/ops-check-logs/SKILL.md +1 -1
  48. package/plugins/src/nestjs/skills/nestjs-graphql/references/project-patterns.md +48 -0
@@ -2,7 +2,6 @@
2
2
  "force": {
3
3
  "scripts": {
4
4
  "bootstrap": "bash scripts/bootstrap.sh",
5
- "build": "tsc && node dist/src/build/build.js",
6
5
  "typecheck": "tsc --noEmit",
7
6
  "test": "vitest run",
8
7
  "test:cov": "vitest run --coverage",
@@ -17,25 +16,6 @@
17
16
  "start": "harperdb start",
18
17
  "stop": "harperdb stop",
19
18
  "status": "harperdb status",
20
- "seed": "bun run build && node dist/src/scripts/seed.js",
21
- "verify": "bun run build && node dist/src/scripts/verify.js",
22
- "seed:rest": "bun run build && node dist/src/scripts/seed_via_rest.js",
23
- "verify:rest": "bun run build && node dist/src/scripts/verify_via_rest.js",
24
- "preview": "bun run build && node dist/src/scripts/preview_feed.js",
25
- "dev:server": "bun run build && node dist/src/scripts/dev_server.js",
26
- "deploy": "bun run build && node dist/src/scripts/deploy.js",
27
- "smoke": "bun run build && node dist/tests/web_smoke.js",
28
- "smoke:brokercheck": "bun run build && node dist/tests/brokercheck_web_smoke.js",
29
- "token": "bun run build && node dist/src/scripts/get_token.js",
30
- "crawl:wpjson": "bun run build && node dist/src/scripts/crawl_via_wpjson.js",
31
- "crawl:html": "bun run build && node dist/src/scripts/crawl_html.js",
32
- "crawl:playwright": "bun run build && node dist/src/scripts/crawl_playwright.js",
33
- "extract:fields": "bun run build && node dist/src/scripts/extract_fields.js",
34
- "extract:helper": "bun run build && node dist/src/scripts/extract_helper.js",
35
- "ingest": "bun run build && node dist/src/scripts/ingest.js",
36
- "load:extractions": "bun run build && node dist/src/scripts/load_extractions.js",
37
- "brokercheck": "bun run build && node dist/src/scripts/fetch_brokercheck.js",
38
- "brokercheck:crawl": "bun run build && node dist/src/scripts/brokercheck_crawl_all.js",
39
19
  "reset": "harperdb stop || true; [ -n \"$HOME\" ] && rm -rf \"$HOME/.harperdb\" && bun run bootstrap && bun run seed && bun run verify",
40
20
  "prepare": "husky install || true"
41
21
  },
@@ -45,7 +25,6 @@
45
25
  },
46
26
  "devDependencies": {
47
27
  "@ast-grep/cli": "^0.40.4",
48
- "@codyswann/lisa": "^2.19.0",
49
28
  "@commitlint/cli": "^20.3.1",
50
29
  "@commitlint/config-conventional": "^20.3.1",
51
30
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
@@ -90,5 +69,29 @@
90
69
  "@codyswann/lisa",
91
70
  "@sentry/cli"
92
71
  ]
72
+ },
73
+ "defaults": {
74
+ "scripts": {
75
+ "build": "tsc && node dist/src/build/build.js",
76
+ "seed": "bun run build && node dist/src/scripts/seed.js",
77
+ "verify": "bun run build && node dist/src/scripts/verify.js",
78
+ "seed:rest": "bun run build && node dist/src/scripts/seed_via_rest.js",
79
+ "verify:rest": "bun run build && node dist/src/scripts/verify_via_rest.js",
80
+ "preview": "bun run build && node dist/src/scripts/preview_feed.js",
81
+ "dev:server": "bun run build && node dist/src/scripts/dev_server.js",
82
+ "deploy": "bun run build && node dist/src/scripts/deploy.js",
83
+ "smoke": "bun run build && node dist/tests/web_smoke.js",
84
+ "smoke:brokercheck": "bun run build && node dist/tests/brokercheck_web_smoke.js",
85
+ "token": "bun run build && node dist/src/scripts/get_token.js",
86
+ "crawl:wpjson": "bun run build && node dist/src/scripts/crawl_via_wpjson.js",
87
+ "crawl:html": "bun run build && node dist/src/scripts/crawl_html.js",
88
+ "crawl:playwright": "bun run build && node dist/src/scripts/crawl_playwright.js",
89
+ "extract:fields": "bun run build && node dist/src/scripts/extract_fields.js",
90
+ "extract:helper": "bun run build && node dist/src/scripts/extract_helper.js",
91
+ "ingest": "bun run build && node dist/src/scripts/ingest.js",
92
+ "load:extractions": "bun run build && node dist/src/scripts/load_extractions.js",
93
+ "brokercheck": "bun run build && node dist/src/scripts/fetch_brokercheck.js",
94
+ "brokercheck:crawl": "bun run build && node dist/src/scripts/brokercheck_crawl_all.js"
95
+ }
93
96
  }
94
97
  }
package/package.json CHANGED
@@ -82,7 +82,7 @@
82
82
  "lodash": ">=4.18.1"
83
83
  },
84
84
  "name": "@codyswann/lisa",
85
- "version": "2.23.0",
85
+ "version": "2.23.2",
86
86
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
87
87
  "main": "dist/index.js",
88
88
  "exports": {
@@ -199,7 +199,7 @@
199
199
  "vitest": "^4.1.0"
200
200
  },
201
201
  "devDependencies": {
202
- "@codyswann/lisa": "^2.19.0",
202
+ "@codyswann/lisa": "^2.23.1",
203
203
  "@types/js-yaml": "^4.0.9",
204
204
  "eslint-plugin-oxlint": "^1.62.0",
205
205
  "js-yaml": "^4.1.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -131,5 +131,5 @@ The `Disposition` column is the contract with `debrief-apply`. Keep it exactly a
131
131
  - **Exhaustive, not selective.** Every distinct (post-dedupe) finding becomes a row. If the doc is large, that reflects the size of the initiative — do not trim.
132
132
  - **Group by category, not by source.** The human is triaging by what to do, not by where the signal came from.
133
133
  - **Preserve evidence links.** Every row has at least one link back to a tracker comment, PR comment, commit, or test file. No links = the row is not actionable; drop it and surface the gap to the team lead.
134
- - **Run within the team.** Do not call `TeamCreate`.
134
+ - **Run within the team.** Do not create a second team.
135
135
  - **Block on missing input.** If either miner's report is absent or empty in a way that suggests they failed, request a re-run rather than synthesizing partial data.
@@ -80,6 +80,6 @@ If there are no findings under a checklist row, write `(none)`.
80
80
  - **Never judge.** Surface every match. The synthesizer reconciles signal vs. noise.
81
81
  - **Quote verbatim.** Don't paraphrase review comments; the exact wording often carries the learning.
82
82
  - **Link, don't summarize.** Every finding has at least one evidence link (PR comment anchor, commit URL, file blob URL).
83
- - **Run within the team.** Do not call `TeamCreate`. The Debrief skill created the team; you are a teammate.
83
+ - **Run within the team.** Do not create a second team. The Debrief skill created the team; you are a teammate.
84
84
  - **Read-only.** No `gh pr merge`, no `gh pr review`, no commits. You observe; you do not mutate.
85
85
  - **Parallel-safe.** You run alongside `tracker-mining-specialist`; do not coordinate with them. The synthesizer reconciles.
@@ -80,6 +80,6 @@ If there are no findings under a checklist row, write `(none)` — silence is it
80
80
  - **Never judge.** "Probably not interesting" is not a category. Every signal that matches a checklist row goes in.
81
81
  - **Quote verbatim.** Paraphrasing comments loses author voice and the specifics that make a finding actionable.
82
82
  - **Link, don't summarize.** Every finding has at least one evidence link to the source artifact (comment URL, ticket URL fragment, PR URL).
83
- - **Run within the team.** Do not call `TeamCreate`. The Debrief skill created the team; you are a teammate.
83
+ - **Run within the team.** Do not create a second team. The Debrief skill created the team; you are a teammate.
84
84
  - **Read-only.** Never call write MCP tools. You report; you do not mutate.
85
85
  - **Parallel-safe.** You run alongside `pr-mining-specialist`; do not coordinate with them. The synthesizer reconciles.
@@ -1,18 +1,22 @@
1
1
  #!/usr/bin/env bash
2
- # Enforces team-first orchestration for lifecycle skills.
2
+ # Enforces Claude's TeamCreate-first orchestration for lifecycle skills.
3
+ #
4
+ # This hook is intentionally Claude-specific. Other harnesses may use different
5
+ # team tooling or an explicit no-team fallback; those paths are described in the
6
+ # shared rules/skills but are not enforced by this Claude hook.
3
7
  #
4
8
  # Triggered on four hook events:
5
9
  # - UserPromptSubmit : detects /lisa:research|plan|implement|intake|debrief in the
6
10
  # raw prompt and arms enforcement for the session
7
11
  # - PreToolUse : detects the same skills via a `Skill` tool call,
8
12
  # arms enforcement, and blocks bypass tool calls
9
- # until ToolSearch+TeamCreate have fired
10
- # - PostToolUse : on a successful TeamCreate, marks the session as
13
+ # until ToolSearch+TeamCreate have fired in Claude
14
+ # - PostToolUse : on a successful Claude TeamCreate, marks the session as
11
15
  # team-created (lifts enforcement)
12
16
  # - SubagentStart : marks the new subagent session as a teammate so
13
17
  # it is exempt — teammates inherit the lead's team
14
- # and must never call TeamCreate (double-create
15
- # is rejected by the harness)
18
+ # and must never create a second team (double-create
19
+ # is rejected by the Claude harness)
16
20
  #
17
21
  # Per-session state lives under "$STATE_DIR" as flag files keyed by
18
22
  # session_id. Stale state (>24h) is cleaned on each invocation.
@@ -159,7 +163,7 @@ fi
159
163
  ACTIVE_SKILL=$(cat "$SKILL_FLAG" 2>/dev/null || echo "lisa:???")
160
164
  cat >&2 <<EOF
161
165
  Blocked: this session invoked /${ACTIVE_SKILL}, which is an agent-team flow.
162
- Before any other tool call, you must:
166
+ In Claude, before any other tool call, you must:
163
167
 
164
168
  1. ToolSearch with query: "select:TeamCreate" (load the deferred schema)
165
169
  2. TeamCreate (actually create the team)
@@ -169,6 +173,10 @@ the ticket, exploring the code, fetching context — those are tasks for the
169
173
  team you are about to create, not for the lead session before the team
170
174
  exists.
171
175
 
176
+ If you are running Lisa in a non-Claude harness, this Claude enforcement hook
177
+ should not be installed; follow the runtime-aware orchestration preamble in the
178
+ skill instead.
179
+
172
180
  Re-read the orchestration preamble in /${ACTIVE_SKILL} and start with
173
181
  ToolSearch.
174
182
  EOF
@@ -8,7 +8,7 @@ After echoing the chosen flow and BEFORE doing any work, state the orchestration
8
8
 
9
9
  Default to an agent team for Research, Plan, Implement (Build/Fix/Improve/Investigate-Only), and any flow that invokes the Review sub-flow. Use a single agent only for Verify (standalone) and Monitor (standalone). See the `intent-routing` rule's Orchestration section for the full decision matrix.
10
10
 
11
- When the mode is `agent team` **and you are not already operating inside an agent team**, your FIRST tool calls after the classification echo MUST be `ToolSearch` with `query: "select:TeamCreate"` (to load the deferred tool's schema), then `TeamCreate`. Do not reach for `TaskCreate`, `Agent`, `Skill`, MCP tools, `Read`, `Bash`, or any other content-gathering call before the team exists — those are bypass paths that skip durable task state and parallel review. Reading the ticket, exploring the code, querying the API are all tasks for the team, not for the lead session before the team exists.
11
+ When the mode is `agent team` **and you are not already operating inside an agent team**, your FIRST tool calls after the classification echo MUST establish team orchestration before any content-gathering work. Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally. Do not reach for `TaskCreate`, `Agent`, `Skill`, MCP tools, `Read`, `Bash`, or any other content-gathering call before the team exists or the no-team fallback has been declared — those are bypass paths that skip durable task state and parallel review. Reading the ticket, exploring the code, querying the API are all tasks for the team, not for the lead session before orchestration exists.
12
12
 
13
13
  Requirement Verification:
14
14
 
@@ -130,4 +130,4 @@ When you detect any of the above:
130
130
  1. Do NOT guess or make assumptions about what the external code does
131
131
  2. Identify which repository contains the missing code
132
132
  3. Add that repository to your current session before proceeding
133
- 4. If you cannot determine which repository contains the code, ask — do not proceed without it
133
+ 4. If you cannot determine which repository contains the code, ask — do not proceed without it
@@ -32,11 +32,11 @@ What this rule still enforces:
32
32
  > **Orchestration: agent team** (or **single agent**)
33
33
  > One-sentence justification.
34
34
 
35
- 2. **Cascade rule (load-bearing)**: Before calling `TeamCreate`, check whether you are already operating inside an agent team. Signs you are inside a team: a prior `TeamCreate` exists in this session; you were spawned via `Agent` with `team_name`; your context references a team lead. If any of these are true, **do NOT call `TeamCreate`**the harness rejects double-creates and the work stalls. Continue within the existing team. Invoke flows via the Skill tool; the team lead inherits responsibility for orchestration.
35
+ 2. **Cascade rule (load-bearing)**: Before creating a team, check whether you are already operating inside an agent team. Signs you are inside a team: a prior successful team-creation tool call exists in this session; you were spawned into a team context; your context references a team lead. If any of these are true, **do NOT create a second team** many harnesses reject double-creates and the work stalls. Continue within the existing team. Invoke flows via the Skill tool; the team lead inherits responsibility for orchestration.
36
36
 
37
37
  3. **Default mode**: `Research`, `Plan`, `Implement`, `Intake`, and `Debrief` run as agent teams. The `Implement` flow — including every work type (`Build`, `Fix`, `Improve`, `Investigate-Only`) — is **always** a team flow. Bug fixes that "look simple" are not an exception: the Reproduce sub-flow, debug-specialist, bug-fixer, parallel reviewers, and verification-specialist all need to compose. `Debrief` runs as a team because tracker-mining and pr-mining parallelize cleanly and synthesis gates on both completing. `Verify` (standalone) and `Monitor` (standalone) use the One-shot Sub-agents pattern (see `## Orchestration` below) — these flows are linear with no parallelism and the team overhead is not warranted. Single-agent mode is otherwise reserved for: `product-walkthrough` invoked standalone (not as part of Research/Plan), `debrief-apply` (deterministic routing of human-marked dispositions), and one-off diagnostic Bash/Read sessions that don't invoke any lifecycle skill. When in doubt, use a team.
38
38
 
39
- The mechanical TeamCreate bootstrap directive lives inside each lifecycle skill — see those skills' orchestration preambles for the exact wording: first `ToolSearch{select:TeamCreate}` (load deferred schema), then `TeamCreate`.
39
+ The mechanical team bootstrap directive lives inside each lifecycle skill — see those skills' orchestration preambles for the exact wording. The Claude path uses `TeamCreate`; other runtimes must use their equivalent team-discovery and team-creation tools, or explicitly declare the no-team fallback when no such tool exists.
40
40
 
41
41
  ## Readiness Gate Protocol
42
42
 
@@ -364,7 +364,7 @@ Lifecycle skills dispatch their agents according to the flow's shape. The follow
364
364
 
365
365
  ### Agent Teams (default for multi-step flows)
366
366
 
367
- Use an **agent team** (TeamCreate + TaskCreate per step) for:
367
+ Use an **agent team** (runtime team creation + durable task state per step) for:
368
368
 
369
369
  - **Implement** (Build, Fix, Improve) — long sequences with parallel review and a real risk of compaction
370
370
  - **Plan** — multiple specialists feeding a shared decomposition
@@ -390,7 +390,7 @@ Use direct `Agent` tool invocations (no team) for:
390
390
  - **Investigate Only** spikes — single investigation, findings out
391
391
  - Any flow chained as a sub-flow inside a larger team — its agents become tasks in the parent team, not a new team
392
392
 
393
- Why: TeamCreate plus per-step TaskCreate is real overhead. For a one-or-two-agent flow with no parallelism, the bookkeeping cost outweighs the recovery and orchestration benefits.
393
+ Why: team creation plus per-step task state is real overhead. For a one-or-two-agent flow with no parallelism, the bookkeeping cost outweighs the recovery and orchestration benefits.
394
394
 
395
395
  ### When in doubt
396
396
 
@@ -10,14 +10,13 @@ Walk the original Plan for `$ARGUMENTS`, mine the completed work items and their
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
13
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
14
14
 
15
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
16
- 2. `TeamCreate` — actually create the team.
15
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
17
16
 
18
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Resolving the work-item set, fetching tickets, walking PRs — all of those are tasks for the team you are about to create, not for the lead session before the team exists.
17
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Resolving the work-item set, fetching tickets, walking PRs — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
19
18
 
20
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team.
19
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team.
21
20
 
22
21
  ## Input
23
22
 
@@ -7,16 +7,15 @@ description: This skill should be used for any non-trivial request — features,
7
7
 
8
8
  ## Orchestration: agent team
9
9
 
10
- Implement is **always** a team flow. Bug, Build, Improve, and Investigate-Only all compose multiple specialists (Reproduce → debug → fix → review → verify). Single-agent mode is not an option here, regardless of how "simple" the ticket looks.
10
+ Implement is a **team-first** flow. Bug, Build, Improve, and Investigate-Only all compose multiple specialists (Reproduce → debug → fix → review → verify). Single-agent mode is not permitted based on task complexity the only exception is when no team creation tool is available in the current runtime (see no-team fallback in the paragraph below).
11
11
 
12
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
12
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
13
13
 
14
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
15
- 2. `TeamCreate` — actually create the team. Every team must include the Explore agent.
14
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally. Every team must include the Explore agent.
16
15
 
17
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill` (including `lisa:tracker-read`, `lisa:jira-read-ticket`, `lisa:github-read-issue`), MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Reading the ticket, exploring the code, fetching context — every one of those is a task for the team you are about to create, not for the lead session before the team exists. Doing them inline is the exact bypass path that produces a 1-agent ad-hoc fix instead of a real team flow.
16
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill` (including `lisa:tracker-read`, `lisa:jira-read-ticket`, `lisa:github-read-issue`), MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Reading the ticket, exploring the code, fetching context — every one of those is a task for the team you are about to create, not for the lead session before orchestration exists. Doing them inline is the exact bypass path that produces a 1-agent ad-hoc fix instead of a real team flow.
18
17
 
19
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool, or `lisa:intake` is running this skill per Ready ticket), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
18
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool, or `lisa:intake` is running this skill per Ready ticket), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
20
19
 
21
20
  ## Resolve the input (first task assigned to the team)
22
21
 
@@ -27,16 +27,15 @@ The only legitimate reasons to stop early:
27
27
 
28
28
  ## Orchestration: agent team
29
29
 
30
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
30
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
31
31
 
32
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
33
- 2. `TeamCreate` — actually create the team.
32
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
34
33
 
35
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Scanning the queue, claiming items, dispatching per-item flows — all of those are tasks for the team you are about to create, not for the lead session before the team exists.
34
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Scanning the queue, claiming items, dispatching per-item flows — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
36
35
 
37
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
36
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
38
37
 
39
- The cycle's outer team is created by Intake. Each item it processes (a PRD via `lisa:plan`, a ticket via `lisa:implement`) executes within the same team — those skills' orchestration preambles detect the existing team and skip TeamCreate. One team per cron cycle, processes everything currently Ready.
38
+ The cycle's outer team is created by Intake. Each item it processes (a PRD via `lisa:plan`, a ticket via `lisa:implement`) executes within the same team — those skills' orchestration preambles detect the existing team and skip creating a second team. One team per cron cycle, processes everything currently Ready.
40
39
 
41
40
  ## Source dispatch
42
41
 
@@ -10,14 +10,13 @@ Spot-check application health in the named environment (`dev` / `staging` / `pro
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
13
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
14
14
 
15
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
16
- 2. `TeamCreate` — actually create the team.
15
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
17
16
 
18
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion / Sentry), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Hitting health endpoints, pulling logs, querying Sentry — all of those are tasks for the team you are about to create, not for the lead session before the team exists.
17
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion / Sentry), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Hitting health endpoints, pulling logs, querying Sentry — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
19
18
 
20
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
19
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
21
20
 
22
21
  ## Flow
23
22
 
@@ -10,14 +10,13 @@ Decompose the PRD/spec at `$ARGUMENTS` into ordered work items with acceptance c
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
13
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
14
14
 
15
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
16
- 2. `TeamCreate` — actually create the team.
15
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
17
16
 
18
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Reading the PRD, exploring the code, fetching context — all of those are tasks for the team you are about to create, not for the lead session before the team exists.
17
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Reading the PRD, exploring the code, fetching context — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
19
18
 
20
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
19
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
21
20
 
22
21
  ## Source dispatch
23
22
 
@@ -10,14 +10,13 @@ Produce a PRD for the problem in `$ARGUMENTS`.
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
13
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
14
14
 
15
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
16
- 2. `TeamCreate` — actually create the team.
15
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
17
16
 
18
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Gathering context inline as the lead is the exact bypass path that produces ad-hoc work instead of a real team flow.
17
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Gathering context inline as the lead is the exact bypass path that produces ad-hoc work instead of a real team flow.
19
18
 
20
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
19
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
21
20
 
22
21
  ## Flow
23
22
 
@@ -10,14 +10,13 @@ Ship the current branch and prove it works in the target environment.
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
13
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
14
14
 
15
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
16
- 2. `TeamCreate` — actually create the team.
15
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
17
16
 
18
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Inspecting the branch, running quality gates, opening the PR — all of those are tasks for the team you are about to create, not for the lead session before the team exists.
17
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Inspecting the branch, running quality gates, opening the PR — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
19
18
 
20
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
19
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
21
20
 
22
21
  ## Flow
23
22
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -14,7 +14,7 @@ Perform browser-based user acceptance testing using Playwright MCP tools.
14
14
 
15
15
  ## Prerequisites
16
16
 
17
- 1. **Load Playwright MCP tools** — use `ToolSearch` to search for `playwright browser` and load all browser tools.
17
+ 1. **Load Playwright MCP tools** — use the current runtime's tool-discovery mechanism to search for `playwright browser` and load all browser tools.
18
18
  2. **Verify target environment is up** — curl check the frontend URL before launching the browser.
19
19
  3. **For localhost** — ensure the frontend is running on port 8081.
20
20
 
@@ -40,7 +40,7 @@ For inspecting JavaScript errors, warnings, and `console.log` output in the brow
40
40
 
41
41
  Use when you need to capture browser logs programmatically during UAT or debugging.
42
42
 
43
- 1. **Load Playwright tools** — use `ToolSearch` to search for `playwright browser`.
43
+ 1. **Load Playwright tools** — use the current runtime's tool-discovery mechanism to search for `playwright browser`.
44
44
 
45
45
  2. **Navigate to the app**:
46
46
  - `browser_navigate` to the target URL (discover from `e2e/constants.ts` or `.env.*` files)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "NestJS-specific skills and migration write-protection hooks.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -443,6 +443,54 @@ export class UsersModule {}
443
443
  export class AppModule {}
444
444
  ```
445
445
 
446
+ ## Resolver Boundary Patterns
447
+
448
+ Resolvers translate GraphQL requests into service calls. Keep business rules in
449
+ services so the same behavior is available to jobs, REST handlers, and future
450
+ GraphQL fields without copying resolver logic.
451
+
452
+ ### Thin Resolver
453
+
454
+ ```typescript
455
+ @Resolver(() => User)
456
+ export class UsersResolver {
457
+ constructor(private readonly usersService: UsersService) {}
458
+
459
+ @Query(() => User)
460
+ async user(@Args("id", { type: () => ID }) id: string): Promise<User> {
461
+ return this.usersService.findById(id);
462
+ }
463
+ }
464
+ ```
465
+
466
+ ### Field Resolver
467
+
468
+ Use field resolvers for data that depends on the parent object or benefits from
469
+ DataLoader batching. Do not fetch relation-heavy data inside the parent query
470
+ when only some clients ask for it.
471
+
472
+ ```typescript
473
+ @ResolveField(() => [Post])
474
+ async posts(@Parent() user: User): Promise<readonly Post[]> {
475
+ return this.postsByUserLoader.load(user.id);
476
+ }
477
+ ```
478
+
479
+ ### Mutation Resolver
480
+
481
+ Validate transport-level shape in DTOs and leave state transitions to the
482
+ service. This keeps GraphQL decorators from becoming the source of business
483
+ truth.
484
+
485
+ ```typescript
486
+ @Mutation(() => User)
487
+ async updateUser(
488
+ @Args("input") input: UpdateUserInput
489
+ ): Promise<User> {
490
+ return this.usersService.update(input);
491
+ }
492
+ ```
493
+
446
494
  ## Error Handling Patterns
447
495
 
448
496
  ### Standard Error Response
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.23.0",
3
+ "version": "2.23.2",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -131,5 +131,5 @@ The `Disposition` column is the contract with `debrief-apply`. Keep it exactly a
131
131
  - **Exhaustive, not selective.** Every distinct (post-dedupe) finding becomes a row. If the doc is large, that reflects the size of the initiative — do not trim.
132
132
  - **Group by category, not by source.** The human is triaging by what to do, not by where the signal came from.
133
133
  - **Preserve evidence links.** Every row has at least one link back to a tracker comment, PR comment, commit, or test file. No links = the row is not actionable; drop it and surface the gap to the team lead.
134
- - **Run within the team.** Do not call `TeamCreate`.
134
+ - **Run within the team.** Do not create a second team.
135
135
  - **Block on missing input.** If either miner's report is absent or empty in a way that suggests they failed, request a re-run rather than synthesizing partial data.
@@ -80,6 +80,6 @@ If there are no findings under a checklist row, write `(none)`.
80
80
  - **Never judge.** Surface every match. The synthesizer reconciles signal vs. noise.
81
81
  - **Quote verbatim.** Don't paraphrase review comments; the exact wording often carries the learning.
82
82
  - **Link, don't summarize.** Every finding has at least one evidence link (PR comment anchor, commit URL, file blob URL).
83
- - **Run within the team.** Do not call `TeamCreate`. The Debrief skill created the team; you are a teammate.
83
+ - **Run within the team.** Do not create a second team. The Debrief skill created the team; you are a teammate.
84
84
  - **Read-only.** No `gh pr merge`, no `gh pr review`, no commits. You observe; you do not mutate.
85
85
  - **Parallel-safe.** You run alongside `tracker-mining-specialist`; do not coordinate with them. The synthesizer reconciles.
@@ -80,6 +80,6 @@ If there are no findings under a checklist row, write `(none)` — silence is it
80
80
  - **Never judge.** "Probably not interesting" is not a category. Every signal that matches a checklist row goes in.
81
81
  - **Quote verbatim.** Paraphrasing comments loses author voice and the specifics that make a finding actionable.
82
82
  - **Link, don't summarize.** Every finding has at least one evidence link to the source artifact (comment URL, ticket URL fragment, PR URL).
83
- - **Run within the team.** Do not call `TeamCreate`. The Debrief skill created the team; you are a teammate.
83
+ - **Run within the team.** Do not create a second team. The Debrief skill created the team; you are a teammate.
84
84
  - **Read-only.** Never call write MCP tools. You report; you do not mutate.
85
85
  - **Parallel-safe.** You run alongside `pr-mining-specialist`; do not coordinate with them. The synthesizer reconciles.
@@ -1,18 +1,22 @@
1
1
  #!/usr/bin/env bash
2
- # Enforces team-first orchestration for lifecycle skills.
2
+ # Enforces Claude's TeamCreate-first orchestration for lifecycle skills.
3
+ #
4
+ # This hook is intentionally Claude-specific. Other harnesses may use different
5
+ # team tooling or an explicit no-team fallback; those paths are described in the
6
+ # shared rules/skills but are not enforced by this Claude hook.
3
7
  #
4
8
  # Triggered on four hook events:
5
9
  # - UserPromptSubmit : detects /lisa:research|plan|implement|intake|debrief in the
6
10
  # raw prompt and arms enforcement for the session
7
11
  # - PreToolUse : detects the same skills via a `Skill` tool call,
8
12
  # arms enforcement, and blocks bypass tool calls
9
- # until ToolSearch+TeamCreate have fired
10
- # - PostToolUse : on a successful TeamCreate, marks the session as
13
+ # until ToolSearch+TeamCreate have fired in Claude
14
+ # - PostToolUse : on a successful Claude TeamCreate, marks the session as
11
15
  # team-created (lifts enforcement)
12
16
  # - SubagentStart : marks the new subagent session as a teammate so
13
17
  # it is exempt — teammates inherit the lead's team
14
- # and must never call TeamCreate (double-create
15
- # is rejected by the harness)
18
+ # and must never create a second team (double-create
19
+ # is rejected by the Claude harness)
16
20
  #
17
21
  # Per-session state lives under "$STATE_DIR" as flag files keyed by
18
22
  # session_id. Stale state (>24h) is cleaned on each invocation.
@@ -159,7 +163,7 @@ fi
159
163
  ACTIVE_SKILL=$(cat "$SKILL_FLAG" 2>/dev/null || echo "lisa:???")
160
164
  cat >&2 <<EOF
161
165
  Blocked: this session invoked /${ACTIVE_SKILL}, which is an agent-team flow.
162
- Before any other tool call, you must:
166
+ In Claude, before any other tool call, you must:
163
167
 
164
168
  1. ToolSearch with query: "select:TeamCreate" (load the deferred schema)
165
169
  2. TeamCreate (actually create the team)
@@ -169,6 +173,10 @@ the ticket, exploring the code, fetching context — those are tasks for the
169
173
  team you are about to create, not for the lead session before the team
170
174
  exists.
171
175
 
176
+ If you are running Lisa in a non-Claude harness, this Claude enforcement hook
177
+ should not be installed; follow the runtime-aware orchestration preamble in the
178
+ skill instead.
179
+
172
180
  Re-read the orchestration preamble in /${ACTIVE_SKILL} and start with
173
181
  ToolSearch.
174
182
  EOF
@@ -8,7 +8,7 @@ After echoing the chosen flow and BEFORE doing any work, state the orchestration
8
8
 
9
9
  Default to an agent team for Research, Plan, Implement (Build/Fix/Improve/Investigate-Only), and any flow that invokes the Review sub-flow. Use a single agent only for Verify (standalone) and Monitor (standalone). See the `intent-routing` rule's Orchestration section for the full decision matrix.
10
10
 
11
- When the mode is `agent team` **and you are not already operating inside an agent team**, your FIRST tool calls after the classification echo MUST be `ToolSearch` with `query: "select:TeamCreate"` (to load the deferred tool's schema), then `TeamCreate`. Do not reach for `TaskCreate`, `Agent`, `Skill`, MCP tools, `Read`, `Bash`, or any other content-gathering call before the team exists — those are bypass paths that skip durable task state and parallel review. Reading the ticket, exploring the code, querying the API are all tasks for the team, not for the lead session before the team exists.
11
+ When the mode is `agent team` **and you are not already operating inside an agent team**, your FIRST tool calls after the classification echo MUST establish team orchestration before any content-gathering work. Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally. Do not reach for `TaskCreate`, `Agent`, `Skill`, MCP tools, `Read`, `Bash`, or any other content-gathering call before the team exists or the no-team fallback has been declared — those are bypass paths that skip durable task state and parallel review. Reading the ticket, exploring the code, querying the API are all tasks for the team, not for the lead session before orchestration exists.
12
12
 
13
13
  Requirement Verification:
14
14
 
@@ -130,4 +130,4 @@ When you detect any of the above:
130
130
  1. Do NOT guess or make assumptions about what the external code does
131
131
  2. Identify which repository contains the missing code
132
132
  3. Add that repository to your current session before proceeding
133
- 4. If you cannot determine which repository contains the code, ask — do not proceed without it
133
+ 4. If you cannot determine which repository contains the code, ask — do not proceed without it
@@ -32,11 +32,11 @@ What this rule still enforces:
32
32
  > **Orchestration: agent team** (or **single agent**)
33
33
  > One-sentence justification.
34
34
 
35
- 2. **Cascade rule (load-bearing)**: Before calling `TeamCreate`, check whether you are already operating inside an agent team. Signs you are inside a team: a prior `TeamCreate` exists in this session; you were spawned via `Agent` with `team_name`; your context references a team lead. If any of these are true, **do NOT call `TeamCreate`**the harness rejects double-creates and the work stalls. Continue within the existing team. Invoke flows via the Skill tool; the team lead inherits responsibility for orchestration.
35
+ 2. **Cascade rule (load-bearing)**: Before creating a team, check whether you are already operating inside an agent team. Signs you are inside a team: a prior successful team-creation tool call exists in this session; you were spawned into a team context; your context references a team lead. If any of these are true, **do NOT create a second team** many harnesses reject double-creates and the work stalls. Continue within the existing team. Invoke flows via the Skill tool; the team lead inherits responsibility for orchestration.
36
36
 
37
37
  3. **Default mode**: `Research`, `Plan`, `Implement`, `Intake`, and `Debrief` run as agent teams. The `Implement` flow — including every work type (`Build`, `Fix`, `Improve`, `Investigate-Only`) — is **always** a team flow. Bug fixes that "look simple" are not an exception: the Reproduce sub-flow, debug-specialist, bug-fixer, parallel reviewers, and verification-specialist all need to compose. `Debrief` runs as a team because tracker-mining and pr-mining parallelize cleanly and synthesis gates on both completing. `Verify` (standalone) and `Monitor` (standalone) use the One-shot Sub-agents pattern (see `## Orchestration` below) — these flows are linear with no parallelism and the team overhead is not warranted. Single-agent mode is otherwise reserved for: `product-walkthrough` invoked standalone (not as part of Research/Plan), `debrief-apply` (deterministic routing of human-marked dispositions), and one-off diagnostic Bash/Read sessions that don't invoke any lifecycle skill. When in doubt, use a team.
38
38
 
39
- The mechanical TeamCreate bootstrap directive lives inside each lifecycle skill — see those skills' orchestration preambles for the exact wording: first `ToolSearch{select:TeamCreate}` (load deferred schema), then `TeamCreate`.
39
+ The mechanical team bootstrap directive lives inside each lifecycle skill — see those skills' orchestration preambles for the exact wording. The Claude path uses `TeamCreate`; other runtimes must use their equivalent team-discovery and team-creation tools, or explicitly declare the no-team fallback when no such tool exists.
40
40
 
41
41
  ## Readiness Gate Protocol
42
42
 
@@ -364,7 +364,7 @@ Lifecycle skills dispatch their agents according to the flow's shape. The follow
364
364
 
365
365
  ### Agent Teams (default for multi-step flows)
366
366
 
367
- Use an **agent team** (TeamCreate + TaskCreate per step) for:
367
+ Use an **agent team** (runtime team creation + durable task state per step) for:
368
368
 
369
369
  - **Implement** (Build, Fix, Improve) — long sequences with parallel review and a real risk of compaction
370
370
  - **Plan** — multiple specialists feeding a shared decomposition
@@ -390,7 +390,7 @@ Use direct `Agent` tool invocations (no team) for:
390
390
  - **Investigate Only** spikes — single investigation, findings out
391
391
  - Any flow chained as a sub-flow inside a larger team — its agents become tasks in the parent team, not a new team
392
392
 
393
- Why: TeamCreate plus per-step TaskCreate is real overhead. For a one-or-two-agent flow with no parallelism, the bookkeeping cost outweighs the recovery and orchestration benefits.
393
+ Why: team creation plus per-step task state is real overhead. For a one-or-two-agent flow with no parallelism, the bookkeeping cost outweighs the recovery and orchestration benefits.
394
394
 
395
395
  ### When in doubt
396
396
 
@@ -10,14 +10,13 @@ Walk the original Plan for `$ARGUMENTS`, mine the completed work items and their
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
13
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
14
14
 
15
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
16
- 2. `TeamCreate` — actually create the team.
15
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
17
16
 
18
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Resolving the work-item set, fetching tickets, walking PRs — all of those are tasks for the team you are about to create, not for the lead session before the team exists.
17
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Resolving the work-item set, fetching tickets, walking PRs — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
19
18
 
20
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team.
19
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team.
21
20
 
22
21
  ## Input
23
22
 
@@ -7,16 +7,15 @@ description: This skill should be used for any non-trivial request — features,
7
7
 
8
8
  ## Orchestration: agent team
9
9
 
10
- Implement is **always** a team flow. Bug, Build, Improve, and Investigate-Only all compose multiple specialists (Reproduce → debug → fix → review → verify). Single-agent mode is not an option here, regardless of how "simple" the ticket looks.
10
+ Implement is a **team-first** flow. Bug, Build, Improve, and Investigate-Only all compose multiple specialists (Reproduce → debug → fix → review → verify). Single-agent mode is not permitted based on task complexity the only exception is when no team creation tool is available in the current runtime (see no-team fallback in the paragraph below).
11
11
 
12
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
12
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
13
13
 
14
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
15
- 2. `TeamCreate` — actually create the team. Every team must include the Explore agent.
14
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally. Every team must include the Explore agent.
16
15
 
17
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill` (including `lisa:tracker-read`, `lisa:jira-read-ticket`, `lisa:github-read-issue`), MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Reading the ticket, exploring the code, fetching context — every one of those is a task for the team you are about to create, not for the lead session before the team exists. Doing them inline is the exact bypass path that produces a 1-agent ad-hoc fix instead of a real team flow.
16
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill` (including `lisa:tracker-read`, `lisa:jira-read-ticket`, `lisa:github-read-issue`), MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Reading the ticket, exploring the code, fetching context — every one of those is a task for the team you are about to create, not for the lead session before orchestration exists. Doing them inline is the exact bypass path that produces a 1-agent ad-hoc fix instead of a real team flow.
18
17
 
19
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool, or `lisa:intake` is running this skill per Ready ticket), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
18
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool, or `lisa:intake` is running this skill per Ready ticket), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
20
19
 
21
20
  ## Resolve the input (first task assigned to the team)
22
21
 
@@ -27,16 +27,15 @@ The only legitimate reasons to stop early:
27
27
 
28
28
  ## Orchestration: agent team
29
29
 
30
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
30
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
31
31
 
32
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
33
- 2. `TeamCreate` — actually create the team.
32
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
34
33
 
35
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Scanning the queue, claiming items, dispatching per-item flows — all of those are tasks for the team you are about to create, not for the lead session before the team exists.
34
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Scanning the queue, claiming items, dispatching per-item flows — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
36
35
 
37
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
36
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
38
37
 
39
- The cycle's outer team is created by Intake. Each item it processes (a PRD via `lisa:plan`, a ticket via `lisa:implement`) executes within the same team — those skills' orchestration preambles detect the existing team and skip TeamCreate. One team per cron cycle, processes everything currently Ready.
38
+ The cycle's outer team is created by Intake. Each item it processes (a PRD via `lisa:plan`, a ticket via `lisa:implement`) executes within the same team — those skills' orchestration preambles detect the existing team and skip creating a second team. One team per cron cycle, processes everything currently Ready.
40
39
 
41
40
  ## Source dispatch
42
41
 
@@ -10,14 +10,13 @@ Spot-check application health in the named environment (`dev` / `staging` / `pro
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
13
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
14
14
 
15
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
16
- 2. `TeamCreate` — actually create the team.
15
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
17
16
 
18
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion / Sentry), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Hitting health endpoints, pulling logs, querying Sentry — all of those are tasks for the team you are about to create, not for the lead session before the team exists.
17
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion / Sentry), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Hitting health endpoints, pulling logs, querying Sentry — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
19
18
 
20
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
19
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
21
20
 
22
21
  ## Flow
23
22
 
@@ -10,14 +10,13 @@ Decompose the PRD/spec at `$ARGUMENTS` into ordered work items with acceptance c
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
13
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
14
14
 
15
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
16
- 2. `TeamCreate` — actually create the team.
15
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
17
16
 
18
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Reading the PRD, exploring the code, fetching context — all of those are tasks for the team you are about to create, not for the lead session before the team exists.
17
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Reading the PRD, exploring the code, fetching context — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
19
18
 
20
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
19
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
21
20
 
22
21
  ## Source dispatch
23
22
 
@@ -10,14 +10,13 @@ Produce a PRD for the problem in `$ARGUMENTS`.
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
13
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
14
14
 
15
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
16
- 2. `TeamCreate` — actually create the team.
15
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
17
16
 
18
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Gathering context inline as the lead is the exact bypass path that produces ad-hoc work instead of a real team flow.
17
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Gathering context inline as the lead is the exact bypass path that produces ad-hoc work instead of a real team flow.
19
18
 
20
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
19
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
21
20
 
22
21
  ## Flow
23
22
 
@@ -10,14 +10,13 @@ Ship the current branch and prove it works in the target environment.
10
10
 
11
11
  ## Orchestration: agent team
12
12
 
13
- If you are NOT already operating inside an agent team (no prior `TeamCreate` in this session, not spawned via `Agent` with `team_name`), the very first thing you do is create the team. Two tool calls only, in this exact order:
13
+ If you are NOT already operating inside an agent team (no prior successful team-creation tool call in this session, not spawned into a team context), the very first thing you do is establish team orchestration.
14
14
 
15
- 1. `ToolSearch` with `query: "select:TeamCreate"` `TeamCreate` is a deferred tool whose schema must be loaded before it can be invoked. A cold call returns `InputValidationError` and tempts a fallback to direct `Agent` calls, which bypasses the team.
16
- 2. `TeamCreate` — actually create the team.
15
+ Use `TeamCreate` if available. In Claude, if `TeamCreate` has not been loaded yet, first use `ToolSearch` with `query: "select:TeamCreate"` to load its schema. If `TeamCreate` is not available, use the current runtime's tool-discovery mechanism (for Codex, `tool_search`) to discover available multi-agent/team tools, then call the appropriate team creation tool. If no team creation tool is available, explicitly state that team orchestration is unavailable in this runtime, continue as the lead agent, and preserve the workflow's review, verification, and task-tracking obligations locally.
17
16
 
18
- Until `TeamCreate` returns successfully, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Inspecting the branch, running quality gates, opening the PR — all of those are tasks for the team you are about to create, not for the lead session before the team exists.
17
+ Until the team is established or the no-team fallback has been declared, do NOT call any of: `Agent`, `TaskCreate`, `Skill`, MCP tools (Atlassian / Linear / GitHub / Notion), `Read`, `Write`, `Edit`, `Bash`, `Grep`, `Glob`. Inspecting the branch, running quality gates, opening the PR — all of those are tasks for the team you are about to create, not for the lead session before orchestration exists.
19
18
 
20
- If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT call `TeamCreate`the harness rejects double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
19
+ If you ARE already inside an agent team (e.g., a teammate invoked this skill via the Skill tool), do NOT create a second team many harnesses reject double-creates. Continue within the existing team. The team lead created the team; teammates inherit it.
21
20
 
22
21
  ## Flow
23
22
 
@@ -14,7 +14,7 @@ Perform browser-based user acceptance testing using Playwright MCP tools.
14
14
 
15
15
  ## Prerequisites
16
16
 
17
- 1. **Load Playwright MCP tools** — use `ToolSearch` to search for `playwright browser` and load all browser tools.
17
+ 1. **Load Playwright MCP tools** — use the current runtime's tool-discovery mechanism to search for `playwright browser` and load all browser tools.
18
18
  2. **Verify target environment is up** — curl check the frontend URL before launching the browser.
19
19
  3. **For localhost** — ensure the frontend is running on port 8081.
20
20
 
@@ -40,7 +40,7 @@ For inspecting JavaScript errors, warnings, and `console.log` output in the brow
40
40
 
41
41
  Use when you need to capture browser logs programmatically during UAT or debugging.
42
42
 
43
- 1. **Load Playwright tools** — use `ToolSearch` to search for `playwright browser`.
43
+ 1. **Load Playwright tools** — use the current runtime's tool-discovery mechanism to search for `playwright browser`.
44
44
 
45
45
  2. **Navigate to the app**:
46
46
  - `browser_navigate` to the target URL (discover from `e2e/constants.ts` or `.env.*` files)
@@ -443,6 +443,54 @@ export class UsersModule {}
443
443
  export class AppModule {}
444
444
  ```
445
445
 
446
+ ## Resolver Boundary Patterns
447
+
448
+ Resolvers translate GraphQL requests into service calls. Keep business rules in
449
+ services so the same behavior is available to jobs, REST handlers, and future
450
+ GraphQL fields without copying resolver logic.
451
+
452
+ ### Thin Resolver
453
+
454
+ ```typescript
455
+ @Resolver(() => User)
456
+ export class UsersResolver {
457
+ constructor(private readonly usersService: UsersService) {}
458
+
459
+ @Query(() => User)
460
+ async user(@Args("id", { type: () => ID }) id: string): Promise<User> {
461
+ return this.usersService.findById(id);
462
+ }
463
+ }
464
+ ```
465
+
466
+ ### Field Resolver
467
+
468
+ Use field resolvers for data that depends on the parent object or benefits from
469
+ DataLoader batching. Do not fetch relation-heavy data inside the parent query
470
+ when only some clients ask for it.
471
+
472
+ ```typescript
473
+ @ResolveField(() => [Post])
474
+ async posts(@Parent() user: User): Promise<readonly Post[]> {
475
+ return this.postsByUserLoader.load(user.id);
476
+ }
477
+ ```
478
+
479
+ ### Mutation Resolver
480
+
481
+ Validate transport-level shape in DTOs and leave state transitions to the
482
+ service. This keeps GraphQL decorators from becoming the source of business
483
+ truth.
484
+
485
+ ```typescript
486
+ @Mutation(() => User)
487
+ async updateUser(
488
+ @Args("input") input: UpdateUserInput
489
+ ): Promise<User> {
490
+ return this.usersService.update(input);
491
+ }
492
+ ```
493
+
446
494
  ## Error Handling Patterns
447
495
 
448
496
  ### Standard Error Response