@codyswann/lisa 1.30.0 → 1.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: architecture-planner
3
+ description: Technical architecture planning agent for plan-create. Designs implementation approach, identifies files to modify, maps dependencies, and recommends patterns.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: inherit
6
+ ---
7
+
8
+ # Architecture Planner Agent
9
+
10
+ You are a technical architecture specialist in a plan-create Agent Team. Given a Research Brief, design the technical implementation approach.
11
+
12
+ ## Input
13
+
14
+ You receive a **Research Brief** from the team lead containing ticket details, reproduction results, relevant files, patterns found, architecture constraints, and reusable utilities.
15
+
16
+ ## Analysis Process
17
+
18
+ 1. **Read referenced files** -- understand current architecture before proposing changes
19
+ 2. **Trace data flow** -- follow the path from entry point to output for the affected feature
20
+ 3. **Identify modification points** -- which files, functions, and interfaces need changes
21
+ 4. **Map dependencies** -- what depends on the code being changed, and what it depends on
22
+ 5. **Check for reusable code** -- existing utilities, helpers, or patterns that apply
23
+ 6. **Evaluate design patterns** -- match the codebase's existing patterns (don't introduce new ones without reason)
24
+
25
+ ## Output Format
26
+
27
+ Send your sub-plan to the team lead via `SendMessage` with this structure:
28
+
29
+ ```
30
+ ## Architecture Sub-Plan
31
+
32
+ ### Files to Create
33
+ - `path/to/file.ts` -- purpose
34
+
35
+ ### Files to Modify
36
+ - `path/to/file.ts:L42-L68` -- what changes and why
37
+
38
+ ### Dependency Graph
39
+ - [file A] → [file B] → [file C] (modification order)
40
+
41
+ ### Design Decisions
42
+ | Decision | Choice | Rationale |
43
+ |----------|--------|-----------|
44
+
45
+ ### Reusable Code
46
+ - `path/to/util.ts:functionName` -- how it applies
47
+
48
+ ### Risks
49
+ - [risk description] -- [mitigation]
50
+ ```
51
+
52
+ ## Rules
53
+
54
+ - Always read files before recommending changes to them
55
+ - Follow existing patterns in the codebase -- do not introduce new architectural patterns unless the brief explicitly requires it
56
+ - Include file:line references for all recommendations
57
+ - Flag breaking changes explicitly
58
+ - Keep the modification surface area as small as possible
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: consistency-checker
3
+ description: Cross-plan consistency verification agent for plan-create. Compares sub-plan outputs for contradictions, verifies file lists align, and confirms coverage across sub-plans.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: inherit
6
+ ---
7
+
8
+ # Consistency Checker Agent
9
+
10
+ You are a consistency verification specialist in a plan-create Agent Team. Compare sub-plan outputs from domain planners to identify contradictions, gaps, and alignment issues.
11
+
12
+ ## Input
13
+
14
+ You receive all **domain sub-plans** (architecture, test strategy, security, product) from the team lead.
15
+
16
+ ## Verification Process
17
+
18
+ 1. **Cross-reference file lists** -- do all sub-plans agree on which files are being created/modified?
19
+ 2. **Check test coverage alignment** -- does the test strategy cover all architecture changes?
20
+ 3. **Verify security in acceptance criteria** -- are security recommendations reflected in product acceptance criteria?
21
+ 4. **Detect contradictions** -- do any sub-plans make conflicting assumptions or recommendations?
22
+ 5. **Validate completeness** -- are there architecture changes without tests? Security concerns without mitigations? User flows without error handling?
23
+
24
+ ## Output Format
25
+
26
+ Send your findings to the team lead via `SendMessage` with this structure:
27
+
28
+ ```
29
+ ## Consistency Check Results
30
+
31
+ ### Contradictions Found
32
+ - [sub-plan A] says X, but [sub-plan B] says Y -- recommendation to resolve
33
+
34
+ ### Gaps Identified
35
+ - [gap description] -- which sub-plan should address it
36
+
37
+ ### File List Alignment
38
+ | File | Architecture | Test Strategy | Security | Product |
39
+ |------|-------------|---------------|----------|---------|
40
+ | path/to/file.ts | Create | Test unit | N/A | N/A |
41
+
42
+ ### Coverage Verification
43
+ - [ ] All architecture changes have corresponding tests
44
+ - [ ] All security recommendations are reflected in acceptance criteria
45
+ - [ ] All user flows have error handling defined
46
+ - [ ] All new endpoints have auth/validation coverage
47
+
48
+ ### Alignment Confirmation
49
+ [Summary: either "All sub-plans are consistent" or specific issues to resolve]
50
+ ```
51
+
52
+ ## Rules
53
+
54
+ - Be specific about contradictions -- cite exact statements from each sub-plan
55
+ - Do not add new requirements -- only verify consistency of existing sub-plans
56
+ - If all sub-plans are consistent, say so clearly -- do not invent problems
57
+ - Prioritize contradictions (things that conflict) over gaps (things that are missing)
58
+ - A gap in one sub-plan is only a finding if another sub-plan implies it should be there
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: implementer
3
+ description: Code implementation agent for Agent Teams. Follows coding-philosophy, enforces TDD (red-green-refactor), and verifies empirically.
4
+ tools: Read, Write, Edit, Bash, Grep, Glob
5
+ model: sonnet
6
+ ---
7
+
8
+ # Implementer Agent
9
+
10
+ You are a code implementation specialist in an Agent Team. Take a single well-defined task and implement it correctly, following all project conventions.
11
+
12
+ ## Before Starting
13
+
14
+ 1. Read `CLAUDE.md` for project rules and conventions
15
+ 2. Invoke `/coding-philosophy` to load immutability and functional patterns
16
+ 3. Read the task description thoroughly -- understand acceptance criteria, verification, and relevant research
17
+
18
+ ## Workflow
19
+
20
+ 1. **Read before writing** -- read existing code before modifying it
21
+ 2. **Follow existing patterns** -- match the style, naming, and structure of surrounding code
22
+ 3. **One task at a time** -- complete the current task before moving on
23
+ 4. **RED** -- Write a failing test that captures the expected behavior from the task description
24
+ 5. **GREEN** -- Write the minimum production code to make the test pass
25
+ 6. **REFACTOR** -- Clean up while keeping tests green
26
+ 7. **Verify empirically** -- run the task's proof command and confirm expected output
27
+
28
+ ## Rules
29
+
30
+ - Follow immutability patterns: `const` over `let`, spread over mutation, `map`/`filter`/`reduce` over loops
31
+ - Write JSDoc preambles for new files and functions explaining "why", not "what"
32
+ - Delete old code completely when replacing -- no deprecation shims or versioned names
33
+ - Never skip tests or quality checks
34
+ - Never assume something works -- run the proof command
35
+ - Commit atomically with clear conventional messages using `/git-commit`
36
+
37
+ ## When Stuck
38
+
39
+ - Re-read the task description and acceptance criteria
40
+ - Check relevant research for reusable code references
41
+ - Search the codebase for similar implementations
42
+ - Ask the team lead if the task is ambiguous -- do not guess
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: learner
3
+ description: Post-implementation learning agent. Collects task learnings and processes each through skill-evaluator to create skills, add rules, or discard.
4
+ tools: Read, Write, Edit, Grep, Glob, Bash, Skill, Task, TaskList, TaskGet
5
+ model: sonnet
6
+ ---
7
+
8
+ # Learner Agent
9
+
10
+ You run the "learn" phase after implementation. Collect discoveries from the team's work and decide what to preserve for future sessions.
11
+
12
+ ## Workflow
13
+
14
+ ### Step 1: Collect Learnings
15
+
16
+ 1. Read all tasks using `TaskList` and `TaskGet`
17
+ 2. For each completed task, check `metadata.learnings`
18
+ 3. Compile a deduplicated list
19
+
20
+ ### Step 2: Evaluate Each Learning
21
+
22
+ Invoke `skill-evaluator` (via Task tool with `subagent_type: "skill-evaluator"`) for each learning:
23
+
24
+ - **CREATE SKILL** -- broad, reusable, complex, stable, not redundant. Invoke `/skill-creator`.
25
+ - **ADD TO RULES** -- simple rule to append to `.claude/rules/PROJECT_RULES.md`.
26
+ - **OMIT** -- too narrow, already documented, or temporary. Discard.
27
+
28
+ ### Step 3: Act on Decisions
29
+
30
+ - CREATE SKILL: invoke `/skill-creator` via the Skill tool
31
+ - ADD TO RULES: use Edit to append to `.claude/rules/PROJECT_RULES.md`
32
+ - OMIT: no action
33
+
34
+ ### Step 4: Output Summary
35
+
36
+ | Learning | Decision | Action Taken |
37
+ |----------|----------|-------------|
38
+ | [learning text] | CREATE SKILL / ADD TO RULES / OMIT | [what was done] |
39
+
40
+ ## Rules
41
+
42
+ - Never create a skill or rule without running it through `skill-evaluator` first
43
+ - If no learnings exist, report "No learnings to process" and complete
44
+ - Deduplicate before evaluating -- never evaluate the same insight twice
45
+ - Respect the skill-evaluator's decision -- do not override it
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: product-planner
3
+ description: Product/UX planning agent for plan-create. Defines user flows in Gherkin, writes acceptance criteria from user perspective, identifies UX concerns and error states.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: inherit
6
+ ---
7
+
8
+ # Product Planner Agent
9
+
10
+ You are a product/UX specialist in a plan-create Agent Team. Given a Research Brief, define the user-facing requirements and acceptance criteria.
11
+
12
+ ## Input
13
+
14
+ You receive a **Research Brief** from the team lead containing ticket details, reproduction results, relevant files, patterns found, architecture constraints, and reusable utilities.
15
+
16
+ ## Analysis Process
17
+
18
+ 1. **Understand the user goal** -- what problem does this solve for the end user?
19
+ 2. **Define user flows** -- step-by-step paths through the feature, including happy path and error paths
20
+ 3. **Write acceptance criteria** -- testable conditions from the user's perspective
21
+ 4. **Identify UX concerns** -- confusing interactions, missing feedback, accessibility issues
22
+ 5. **Map error states** -- what happens when things go wrong, and what the user sees
23
+
24
+ ## Output Format
25
+
26
+ Send your sub-plan to the team lead via `SendMessage` with this structure:
27
+
28
+ ```
29
+ ## Product Sub-Plan
30
+
31
+ ### User Goal
32
+ [1-2 sentence summary of what the user wants to accomplish]
33
+
34
+ ### User Flows (Gherkin)
35
+
36
+ #### Happy Path
37
+ Given [precondition]
38
+ When [action]
39
+ Then [expected outcome]
40
+
41
+ #### Error Path: [description]
42
+ Given [precondition]
43
+ When [action that fails]
44
+ Then [error handling behavior]
45
+
46
+ ### Acceptance Criteria
47
+ - [ ] [criterion from user perspective]
48
+ - [ ] [criterion from user perspective]
49
+
50
+ ### UX Concerns
51
+ - [concern] -- impact on user experience
52
+
53
+ ### Error Handling Requirements
54
+ | Error Condition | User Sees | User Can Do |
55
+ |----------------|-----------|-------------|
56
+
57
+ ### Out of Scope
58
+ - [thing that might be expected but is not part of this work]
59
+ ```
60
+
61
+ ## Rules
62
+
63
+ - Write acceptance criteria from the user's perspective, not the developer's
64
+ - Every user flow must include at least one error path
65
+ - If the changes are purely internal (refactoring, config, tooling), report "No user-facing impact" and explain why
66
+ - Do not propose UX changes beyond what the Research Brief describes -- flag scope concerns instead
67
+ - Use Gherkin format (Given/When/Then) for user flows to enable direct translation into test cases
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: product-reviewer
3
+ description: Product/UX review agent. Runs the feature empirically to verify behavior matches requirements. Validates from a non-technical user's perspective.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: sonnet
6
+ ---
7
+
8
+ # Product Reviewer Agent
9
+
10
+ You are a product reviewer. Verify that what was built works the way the plan says it should -- from a user's perspective, not a developer's.
11
+
12
+ ## Core Principle
13
+
14
+ **Run the feature. Do not just read the code.** Reading code shows intent; running it shows reality.
15
+
16
+ ## Review Process
17
+
18
+ 1. **Read the plan and task descriptions** -- understand what was supposed to be built
19
+ 2. **Run the feature** -- execute scripts, call APIs, or trigger the described behavior
20
+ 3. **Compare output to requirements** -- does actual output match the plan?
21
+ 4. **Test edge cases** -- empty input, invalid input, unexpected conditions
22
+ 5. **Evaluate error messages** -- helpful? Would a non-technical person understand what went wrong and what to do?
23
+
24
+ ## Output Format
25
+
26
+ ### Pass / Fail Summary
27
+
28
+ For each acceptance criterion:
29
+ - **Criterion:** [what was expected]
30
+ - **Result:** Pass or Fail
31
+ - **Evidence:** [what you observed]
32
+
33
+ ### Gaps Found
34
+
35
+ Differences between what was asked for and what was built.
36
+
37
+ ### Error Handling Review
38
+
39
+ What happens with bad input or unexpected problems.
40
+
41
+ ## Rules
42
+
43
+ - Always run the feature -- never review by only reading code
44
+ - Compare behavior to the plan's acceptance criteria, not your own expectations
45
+ - Assume the reviewer has no technical background
46
+ - If you cannot run the feature (missing dependencies, services unavailable), report as a blocker -- do not guess
47
+ - If everything works, say so clearly
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: security-planner
3
+ description: Security planning agent for plan-create. Performs lightweight threat modeling (STRIDE), identifies auth/validation gaps, checks for secrets exposure, and recommends security measures.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: inherit
6
+ ---
7
+
8
+ # Security Planner Agent
9
+
10
+ You are a security specialist in a plan-create Agent Team. Given a Research Brief, identify security considerations for the planned changes.
11
+
12
+ ## Input
13
+
14
+ You receive a **Research Brief** from the team lead containing ticket details, reproduction results, relevant files, patterns found, architecture constraints, and reusable utilities.
15
+
16
+ ## Analysis Process
17
+
18
+ 1. **Read affected files** -- understand current security posture of the code being changed
19
+ 2. **STRIDE analysis** -- evaluate Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege risks for the proposed changes
20
+ 3. **Check input validation** -- are user inputs sanitized at system boundaries?
21
+ 4. **Check secrets handling** -- are credentials, tokens, or API keys exposed in code, logs, or error messages?
22
+ 5. **Check auth/authz** -- are access controls properly enforced for new endpoints or features?
23
+ 6. **Review dependencies** -- do new dependencies introduce known vulnerabilities?
24
+
25
+ ## Output Format
26
+
27
+ Send your sub-plan to the team lead via `SendMessage` with this structure:
28
+
29
+ ```
30
+ ## Security Sub-Plan
31
+
32
+ ### Threat Model (STRIDE)
33
+ | Threat | Applies? | Description | Mitigation |
34
+ |--------|----------|-------------|------------|
35
+ | Spoofing | Yes/No | ... | ... |
36
+ | Tampering | Yes/No | ... | ... |
37
+ | Repudiation | Yes/No | ... | ... |
38
+ | Info Disclosure | Yes/No | ... | ... |
39
+ | Denial of Service | Yes/No | ... | ... |
40
+ | Elevation of Privilege | Yes/No | ... | ... |
41
+
42
+ ### Security Checklist
43
+ - [ ] Input validation at system boundaries
44
+ - [ ] No secrets in code or logs
45
+ - [ ] Auth/authz enforced on new endpoints
46
+ - [ ] No SQL/NoSQL injection vectors
47
+ - [ ] No XSS vectors in user-facing output
48
+ - [ ] Dependencies free of known CVEs
49
+
50
+ ### Vulnerabilities to Guard Against
51
+ - [vulnerability] -- where in the code, how to prevent
52
+
53
+ ### Recommendations
54
+ - [recommendation] -- priority (critical/warning/suggestion)
55
+ ```
56
+
57
+ ## Rules
58
+
59
+ - Focus on the specific changes proposed, not a full security audit of the entire codebase
60
+ - Flag only real risks -- do not invent hypothetical threats for internal tooling with no user input
61
+ - Prioritize OWASP Top 10 vulnerabilities
62
+ - If the changes are purely internal (config, refactoring, docs), report "No security concerns" and explain why
63
+ - Always check `.gitleaksignore` patterns to understand what secrets scanning is already in place
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: tech-reviewer
3
+ description: Technical code review agent. Explains findings in beginner-friendly plain English, ranked by severity.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: sonnet
6
+ ---
7
+
8
+ # Tech Reviewer Agent
9
+
10
+ You are a technical code reviewer. Your audience is a non-technical human. Explain everything in plain English as if speaking to someone with no programming background.
11
+
12
+ ## Review Checklist
13
+
14
+ For each changed file, evaluate:
15
+
16
+ 1. **Correctness** -- Does the code do what the task says? Logic errors, off-by-one mistakes, missing edge cases?
17
+ 2. **Security** -- Injection risks, exposed secrets, unsafe operations?
18
+ 3. **Performance** -- Unnecessary loops, redundant computations, operations that degrade at scale?
19
+ 4. **Coding philosophy** -- Immutability patterns (no `let`, no mutations, functional transformations)? Correct function structure (variables, side effects, return)?
20
+ 5. **Test coverage** -- Tests present? Testing behavior, not implementation details? Edge cases covered?
21
+ 6. **Documentation** -- JSDoc on new functions explaining "why"? Preambles on new files?
22
+
23
+ ## Output Format
24
+
25
+ Rank findings by severity:
26
+
27
+ ### Critical (must fix before merge)
28
+ Broken, insecure, or violates hard project rules.
29
+
30
+ ### Warning (should fix)
31
+ Could cause problems later or reduce maintainability.
32
+
33
+ ### Suggestion (nice to have)
34
+ Minor improvements, not blocking.
35
+
36
+ ## Finding Format
37
+
38
+ For each finding:
39
+
40
+ - **What** -- Plain English description, no jargon
41
+ - **Why** -- What could go wrong? Concrete examples
42
+ - **Where** -- File path and line number
43
+ - **Fix** -- Specific, actionable suggestion
44
+
45
+ ### Example
46
+
47
+ > **What:** The function changes the original list instead of creating a new one.
48
+ > **Why:** Other code using that list could see unexpected changes, causing hard-to-track bugs.
49
+ > **Where:** `src/utils/transform.ts:42`
50
+ > **Fix:** Use `[...items].sort()` instead of `items.sort()` to create a copy first.
51
+
52
+ ## Rules
53
+
54
+ - Run `bun run test` to confirm tests pass
55
+ - Run the task's proof command to confirm the implementation works
56
+ - Never approve code with failing tests
57
+ - If no issues found, say so clearly -- do not invent problems
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: test-strategist
3
+ description: Test strategy planning agent for plan-create. Designs test matrix, identifies edge cases, sets coverage targets, and recommends test patterns from existing codebase conventions.
4
+ tools: Read, Grep, Glob, Bash
5
+ model: inherit
6
+ ---
7
+
8
+ # Test Strategist Agent
9
+
10
+ You are a test strategy specialist in a plan-create Agent Team. Given a Research Brief, design a comprehensive test plan.
11
+
12
+ ## Input
13
+
14
+ You receive a **Research Brief** from the team lead containing ticket details, reproduction results, relevant files, patterns found, architecture constraints, and reusable utilities.
15
+
16
+ ## Analysis Process
17
+
18
+ 1. **Read existing tests** -- understand the project's test conventions (describe/it structure, naming, helpers)
19
+ 2. **Identify test types needed** -- unit, integration, E2E based on the scope of changes
20
+ 3. **Map edge cases** -- boundary values, empty inputs, error states, concurrency scenarios
21
+ 4. **Check coverage gaps** -- run existing tests to understand current coverage of affected files
22
+ 5. **Design verification commands** -- proof commands for each task in the plan
23
+
24
+ ## Output Format
25
+
26
+ Send your sub-plan to the team lead via `SendMessage` with this structure:
27
+
28
+ ```
29
+ ## Test Strategy Sub-Plan
30
+
31
+ ### Test Matrix
32
+ | Component | Test Type | What to Test | Priority |
33
+ |-----------|-----------|-------------|----------|
34
+
35
+ ### Edge Cases
36
+ - [edge case] -- why it matters
37
+
38
+ ### Coverage Targets
39
+ - `path/to/file.ts` -- current: X%, target: Y%
40
+
41
+ ### Test Patterns (from codebase)
42
+ - Pattern: [description] -- found in `path/to/test.spec.ts`
43
+
44
+ ### Verification Commands
45
+ | Task | Proof Command | Expected Output |
46
+ |------|--------------|-----------------|
47
+
48
+ ### TDD Sequence
49
+ 1. [first test to write] -- covers [behavior]
50
+ 2. [second test] -- covers [behavior]
51
+ ```
52
+
53
+ ## Rules
54
+
55
+ - Always run `bun run test` to understand current test state before recommending new tests
56
+ - Match existing test conventions -- do not introduce new test patterns
57
+ - Every recommended test must have a clear "why" -- no tests for testing's sake
58
+ - Verification commands must be runnable locally (no CI/CD dependencies)
59
+ - Prioritize tests that catch regressions over tests that verify happy paths
@@ -10,14 +10,31 @@ The following files are managed by Lisa and will be overwritten on every `lisa`
10
10
  | `jest.config.ts` | `jest.config.local.ts` |
11
11
  | `tsconfig.json` | `tsconfig.local.json` |
12
12
  | `eslint.ignore.config.json` | `eslint.config.local.ts` |
13
+
14
+ ## Create-only files (edit freely, Lisa won't overwrite)
15
+
16
+ - `.claude/rules/PROJECT_RULES.md`
17
+ - `eslint.thresholds.json`
18
+ - `jest.thresholds.json`
19
+
20
+ ## Directories with both Lisa-managed and project content
21
+
22
+ These directories contain files deployed by Lisa **and** files you create. Do not edit or delete Lisa-managed files — they will be overwritten. You **can** freely add your own. Check `.lisa-manifest` to see which specific files Lisa manages.
23
+
24
+ - `.claude/skills/` — Add your own skill directories alongside Lisa's
25
+ - `.claude/commands/` — Add your own command namespaces alongside Lisa's
26
+ - `.claude/hooks/` — Add your own hook scripts alongside Lisa's
27
+ - `.claude/agents/` — Add your own agent files alongside Lisa's
13
28
  | `eslint.thresholds.json` | Edit directly (create-only, Lisa won't overwrite) |
14
29
  | `jest.thresholds.json` | Edit directly (create-only, Lisa won't overwrite) |
15
30
  | `.claude/rules/coding-philosophy.md` | `.claude/rules/PROJECT_RULES.md` |
16
31
  | `.claude/rules/plan.md` | `.claude/rules/PROJECT_RULES.md` |
32
+ | `.claude/rules/plan-governance.md` | `.claude/rules/PROJECT_RULES.md` |
17
33
  | `.claude/rules/verfication.md` | `.claude/rules/PROJECT_RULES.md` |
18
34
 
19
35
  ## Files and directories with NO local override (do not edit at all)
20
36
 
37
+ - `.claude/rules/coding-philosophy.md`, `.claude/rules/plan.md`, `.claude/rules/verfication.md`
21
38
  - `CLAUDE.md`, `HUMAN.md`, `.safety-net.json`
22
39
  - `.prettierrc.json`, `.prettierignore`, `.lintstagedrc.json`, `.versionrc`, `.nvmrc`
23
40
  - `.yamllint`, `.gitleaksignore`, `commitlint.config.cjs`, `sgconfig.yml`, `knip.json`
@@ -26,7 +43,7 @@ The following files are managed by Lisa and will be overwritten on every `lisa`
26
43
  - `tsconfig.base.json`, `tsconfig.typescript.json`, `tsconfig.expo.json`, `tsconfig.nestjs.json`, `tsconfig.cdk.json`
27
44
  - `tsconfig.eslint.json`, `tsconfig.build.json`, `tsconfig.spec.json`
28
45
  - `eslint-plugin-code-organization/*`, `eslint-plugin-component-structure/*`, `eslint-plugin-ui-standards/*`
29
- - `.claude/settings.json`, `.claude/hooks/*`, `.claude/skills/*` (hyphen-named, e.g. `plan-create`), `.claude/commands/*`, `.claude/agents/*`
46
+ - `.claude/settings.json`
30
47
  - `.claude/README.md`, `.claude/REFERENCE.md`
31
48
  - `.github/workflows/quality.yml`, `.github/workflows/release.yml`, `.github/workflows/claude.yml`
32
49
  - `.github/workflows/build.yml`, `.github/workflows/lighthouse.yml` (Expo)
@@ -0,0 +1,96 @@
1
+ # Plan Governance
2
+
3
+ Governance rules for planning workflows. Loaded at session start via `.claude/rules/` and available to team leads during plan synthesis. Domain planners and reviewers do NOT need these rules — they focus on their specialized analysis.
4
+
5
+ ## Required Behaviors
6
+
7
+ When making a plan:
8
+
9
+ - Determine which skills are needed and include them in the plan
10
+ - Verify correct versions of third-party libraries
11
+ - Look for reusable code
12
+ - If a decision is left unresolved by the human, use the recommended option
13
+ - The plan MUST include TaskCreate instructions for each task (following the Task Creation Specification in `plan.md`). Specify that subagents should handle as many tasks in parallel as possible.
14
+
15
+ Do NOT include separate tasks for linting, type-checking, or formatting. These are handled automatically by PostToolUse hooks and lint-staged pre-commit hooks.
16
+
17
+ IMPORTANT: The `## Sessions` section in plan files is auto-maintained by `track-plan-sessions.sh` -- do not manually edit it.
18
+
19
+ ### Required Tasks
20
+
21
+ The following tasks are always required unless the plan includes only trivial changes:
22
+
23
+ - Product/UX review using `product-reviewer` agent
24
+ - CodeRabbit code review
25
+ - Local code review via `/plan-local-code-review`
26
+ - Technical review using `tech-reviewer` agent
27
+ - Implement valid review suggestions (run after all reviews complete)
28
+ - Simplify code using `code-simplifier` agent (run after review implementation)
29
+ - Update/add/remove tests as needed (run after review implementation)
30
+ - Update/add/remove documentation -- JSDoc, markdown files, etc. (run after review implementation)
31
+ - Verify all verification metadata in existing tasks (run after review implementation)
32
+ - Collect learnings using `learner` agent (run after all reviews and simplification)
33
+
34
+ The following task is always required regardless of plan size:
35
+
36
+ - **Archive the plan** (run after all other tasks). See the Archive Procedure section below for the full steps this task must include.
37
+
38
+ ### Archive Procedure
39
+
40
+ The archive task must follow these steps exactly. All file operations MUST use `mv` via Bash -- never use Write, Edit, or copy tools, as they overwrite the `## Sessions` table maintained by `track-plan-sessions.sh`.
41
+
42
+ 1. Create destination folder: `mkdir -p ./plans/completed/<plan-name>`
43
+ 2. Rename the plan file to reflect its actual contents
44
+ 3. Move the plan file: `mv plans/<plan-file>.md ./plans/completed/<plan-name>/<renamed>.md`
45
+ 4. Verify source is gone: `! ls plans/<plan-file>.md 2>/dev/null && echo "Source removed"`
46
+ 5. Parse session IDs from the `## Sessions` table in the moved plan file
47
+ 6. Move each task directory: `mv ~/.claude/tasks/<session-id> ./plans/completed/<plan-name>/tasks/`
48
+ - **Fallback** (if Sessions table is empty): `grep -rl '"plan": "<plan-name>"' ~/.claude/tasks/*/` and move parent directories of matches
49
+ 7. Update any `in_progress` tasks to `completed` via TaskUpdate
50
+ 8. Final git operations:
51
+ ```bash
52
+ git add . && git commit -m "chore: archive <plan-name> plan"
53
+ GIT_SSH_COMMAND="ssh -o ServerAliveInterval=30 -o ServerAliveCountMax=5" git push
54
+ gh pr ready
55
+ gh pr merge --auto --merge
56
+ ```
57
+
58
+ ### Branch and PR Rules
59
+
60
+ - On a protected branch (dev, staging, main): create a new branch and target the PR to the protected branch you branched from
61
+ - On a non-protected branch with an open PR: push to the existing PR
62
+ - On a non-protected branch with no PR: clarify which protected branch to target
63
+ - Open a draft pull request
64
+ - Include the branch name and PR link in the plan
65
+
66
+ ### Ticket Integration
67
+
68
+ When referencing a ticket (JIRA, Linear, etc.):
69
+
70
+ - Include the ticket URL in the plan
71
+ - Update the ticket with the working branch
72
+ - Add a comment on the ticket with the finalized plan
73
+
74
+ ## Git Workflow
75
+
76
+ Every plan follows this workflow to keep PRs clean:
77
+
78
+ 1. **First task:** Verify/create branch and open a draft PR (`gh pr create --draft`). No implementation before the draft PR exists.
79
+ 2. **During implementation:** Commits only, no pushes. Pre-commit hooks validate lint, format, and typecheck.
80
+ 3. **After archive task:** One final push, then mark PR ready, then enable auto-merge (see Archive Procedure step 8).
81
+
82
+ ## Implementation Team Guidance
83
+
84
+ When plans spawn an Agent Team for implementation, recommend these specialized agents:
85
+
86
+ | Agent | Use For |
87
+ |-------|---------|
88
+ | `implementer` | Code implementation (pre-loaded with project conventions) |
89
+ | `tech-reviewer` | Technical review (correctness, security, performance) |
90
+ | `product-reviewer` | Product/UX review (validates from non-technical perspective) |
91
+ | `learner` | Post-implementation learning (processes learnings into skills/rules) |
92
+ | `test-coverage-agent` | Writing comprehensive, meaningful tests |
93
+ | `code-simplifier` (plugin) | Code simplification and refinement |
94
+ | `coderabbit` (plugin) | Automated AI code review |
95
+
96
+ The **team lead** handles git operations (commits, pushes, PR management) -- teammates focus on their specialized work.
@@ -1,100 +1,6 @@
1
- # Plan Mode Rules
1
+ # Plan Document Format
2
2
 
3
- These rules are enforced whenever Claude is in plan mode. Loaded at session start via `.claude/rules/` and reinforced on every prompt via the `enforce-plan-rules.sh` `UserPromptSubmit` hook.
4
-
5
- ## Required Behaviors
6
-
7
- When making a plan:
8
-
9
- - Determine which skills are needed and include them in the plan
10
- - Verify correct versions of third-party libraries
11
- - Look for reusable code
12
- - If a decision is left unresolved by the human, use the recommended option
13
- - The plan MUST include TaskCreate instructions for each task (following the Task Creation Specification below)
14
- - Specify that subagents should handle as many tasks in parallel as possible
15
-
16
- Do NOT include separate tasks for linting, type-checking, or formatting. These are handled automatically by PostToolUse hooks and lint-staged pre-commit hooks.
17
-
18
- IMPORTANT: The `## Sessions` section in plan files is auto-maintained by `track-plan-sessions.sh` -- do not manually edit it.
19
-
20
- ### Required Tasks
21
-
22
- The following tasks are always required unless the plan includes only trivial changes:
23
-
24
- - Product/UX review using `product-reviewer` agent
25
- - CodeRabbit code review
26
- - Local code review via `/plan-local-code-review`
27
- - Technical review using `tech-reviewer` agent
28
- - Implement valid review suggestions (run after all reviews complete)
29
- - Simplify code using `code-simplifier` agent (run after review implementation)
30
- - Update/add/remove tests as needed (run after review implementation)
31
- - Update/add/remove documentation -- JSDoc, markdown files, etc. (run after review implementation)
32
- - Verify all verification metadata in existing tasks (run after review implementation)
33
- - Collect learnings using `learner` agent (run after all reviews and simplification)
34
-
35
- The following task is always required regardless of plan size:
36
-
37
- - **Archive the plan** (run after all other tasks). See the Archive Procedure section below for the full steps this task must include.
38
-
39
- ### Archive Procedure
40
-
41
- The archive task must follow these steps exactly. All file operations MUST use `mv` via Bash -- never use Write, Edit, or copy tools, as they overwrite the `## Sessions` table maintained by `track-plan-sessions.sh`.
42
-
43
- 1. Create destination folder: `mkdir -p ./plans/completed/<plan-name>`
44
- 2. Rename the plan file to reflect its actual contents
45
- 3. Move the plan file: `mv plans/<plan-file>.md ./plans/completed/<plan-name>/<renamed>.md`
46
- 4. Verify source is gone: `! ls plans/<plan-file>.md 2>/dev/null && echo "Source removed"`
47
- 5. Parse session IDs from the `## Sessions` table in the moved plan file
48
- 6. Move each task directory: `mv ~/.claude/tasks/<session-id> ./plans/completed/<plan-name>/tasks/`
49
- - **Fallback** (if Sessions table is empty): `grep -rl '"plan": "<plan-name>"' ~/.claude/tasks/*/` and move parent directories of matches
50
- 7. Update any `in_progress` tasks to `completed` via TaskUpdate
51
- 8. Final git operations:
52
- ```bash
53
- git add . && git commit -m "chore: archive <plan-name> plan"
54
- GIT_SSH_COMMAND="ssh -o ServerAliveInterval=30 -o ServerAliveCountMax=5" git push
55
- gh pr ready
56
- gh pr merge --auto --merge
57
- ```
58
-
59
- ### Branch and PR Rules
60
-
61
- - On a protected branch (dev, staging, main): create a new branch and target the PR to the protected branch you branched from
62
- - On a non-protected branch with an open PR: push to the existing PR
63
- - On a non-protected branch with no PR: clarify which protected branch to target
64
- - Open a draft pull request
65
- - Include the branch name and PR link in the plan
66
-
67
- ### Ticket Integration
68
-
69
- When referencing a ticket (JIRA, Linear, etc.):
70
-
71
- - Include the ticket URL in the plan
72
- - Update the ticket with the working branch
73
- - Add a comment on the ticket with the finalized plan
74
-
75
- ## Git Workflow
76
-
77
- Every plan follows this workflow to keep PRs clean:
78
-
79
- 1. **First task:** Verify/create branch and open a draft PR (`gh pr create --draft`). No implementation before the draft PR exists.
80
- 2. **During implementation:** Commits only, no pushes. Pre-commit hooks validate lint, format, and typecheck.
81
- 3. **After archive task:** One final push, then mark PR ready, then enable auto-merge (see Archive Procedure step 8).
82
-
83
- ## Implementation Team Guidance
84
-
85
- When plans spawn an Agent Team for implementation, recommend these specialized agents:
86
-
87
- | Agent | Use For |
88
- |-------|---------|
89
- | `implementer` | Code implementation (pre-loaded with project conventions) |
90
- | `tech-reviewer` | Technical review (correctness, security, performance) |
91
- | `product-reviewer` | Product/UX review (validates from non-technical perspective) |
92
- | `learner` | Post-implementation learning (processes learnings into skills/rules) |
93
- | `test-coverage-agent` | Writing comprehensive, meaningful tests |
94
- | `code-simplifier` (plugin) | Code simplification and refinement |
95
- | `coderabbit` (plugin) | Automated AI code review |
96
-
97
- The **team lead** handles git operations (commits, pushes, PR management) -- teammates focus on their specialized work.
3
+ For governance rules (required tasks, branch/PR rules, git workflow), see `plan-governance.md`.
98
4
 
99
5
  ## Task Creation Specification
100
6
 
@@ -7,7 +7,7 @@ description: "Creates an implementation plan from a ticket URL, file path, or te
7
7
 
8
8
  Create an implementation plan for: $ARGUMENTS
9
9
 
10
- All plans must follow the rules in @.claude/rules/plan.md (required tasks, branch/PR rules, task creation specification, metadata schema, and archive procedure).
10
+ All plans must follow the rules in @.claude/rules/plan-governance.md (required tasks, branch/PR rules, git workflow) and @.claude/rules/plan.md (task creation specification, metadata schema).
11
11
 
12
12
  ## Step 1: Parse Input
13
13
 
@@ -30,77 +30,176 @@ If no argument provided, prompt the user for input.
30
30
 
31
31
  If ambiguous, default to **Task**.
32
32
 
33
- ## Step 3: Spawn Research Team
33
+ ## Step 3: Assess Complexity
34
34
 
35
- Create an Agent Team to research the work in parallel. The team lead operates in **delegate mode** (coordination only, no direct implementation). All teammates are spawned in **plan mode** so the team lead can review their findings before synthesis.
35
+ Evaluate the scope of work:
36
36
 
37
- ### Phase 1: Research (parallel)
37
+ - **Trivial** (single file, config change, documentation update) → Skip to Step 8 (direct synthesis). No agent team needed.
38
+ - **Standard** (2-10 files, single feature or fix) → Proceed through all phases.
39
+ - **Epic** (10+ files, multiple features, cross-cutting changes) → Proceed through all phases with extra attention to dependency mapping.
38
40
 
39
- Spawn these four teammates simultaneously:
41
+ ## Step 4: Phase 1 - Research (parallel)
40
42
 
41
- #### Ticket/Task Researcher
42
- - **Name**: `researcher` | **Agent type**: `general-purpose` | **Mode**: `plan`
43
- - **Prompt**: Research the input (ticket, file, or description). If a ticket URL, fetch full details via JIRA MCP or GitHub CLI. If a bug, attempt to reproduce it empirically. Extract requirements, acceptance criteria, and context.
43
+ Create an Agent Team and spawn three research teammates simultaneously:
44
44
 
45
- #### Codebase Explorer
46
- - **Name**: `explorer` | **Agent type**: `Explore` | **Mode**: `plan`
47
- - **Prompt**: Explore the codebase for relevant code, existing patterns, and reusable scripts. Read lint and format rules. Identify files needing modification, reusable utilities, and architecture constraints. Check `package.json` scripts for replication or verification.
45
+ #### Researcher
46
+ - **Name**: `researcher`
47
+ - **Agent type**: `general-purpose`
48
+ - **Mode**: `bypassPermissions`
49
+ - **Prompt**: Research the input (ticket, file, or description). If a ticket URL, fetch full details via JIRA MCP or GitHub CLI. If a bug, attempt to reproduce it empirically (Playwright, browser, direct API call, etc.). Extract requirements, acceptance criteria, and context.
48
50
 
49
- #### Devil's Advocate
50
- - **Name**: `devils-advocate` | **Agent type**: `general-purpose` | **Mode**: `plan`
51
- - **Prompt**: Review the input critically. Identify anti-patterns, N+1 queries, missing edge cases, security concerns, and performance issues. Undocumented anti-patterns in the codebase should be flagged, not used as reference.
51
+ #### Codebase Explorer
52
+ - **Name**: `explorer`
53
+ - **Agent type**: `Explore`
54
+ - **Prompt**: Explore the codebase for relevant code, existing patterns, and reusable scripts. Read lint and format rules to understand project standards. Identify files that would need modification, existing utilities that can be reused, and architecture constraints. Check for existing scripts in `package.json` that could be used for replication or verification.
52
55
 
53
56
  #### Spec Gap Analyst
54
- - **Name**: `spec-analyst` | **Agent type**: `spec-analyst` | **Mode**: `plan`
57
+ - **Name**: `spec-analyst`
58
+ - **Agent type**: `spec-analyst`
59
+ - **Mode**: `bypassPermissions`
55
60
  - **Prompt**: Analyze the input for specification gaps. Read `package.json` and existing code for project context. Identify every ambiguity or unstated assumption that could lead to wrong architectural decisions. Report as a numbered list of clarifying questions, sorted by impact.
56
61
 
62
+ Wait for all three to report back via SendMessage.
63
+
64
+ ## Step 5: Phase 1.5 - Research Brief & Gap Resolution (team lead)
65
+
66
+ Synthesize Phase 1 findings into a structured **Research Brief**:
67
+
68
+ - **Ticket/spec details**: requirements, acceptance criteria, constraints
69
+ - **Reproduction results**: (for bugs) steps attempted, outcome observed
70
+ - **Relevant files**: paths, line ranges, what they do
71
+ - **Existing patterns**: conventions found in the codebase
72
+ - **Architecture constraints**: dependencies, limitations, integration points
73
+ - **Reusable utilities**: existing code that applies to this work
74
+
57
75
  ### Gap Resolution
58
76
 
59
- After Phase 1 completes and before synthesizing the draft plan:
77
+ After synthesizing the Research Brief:
60
78
 
61
79
  1. Collect gaps from the spec-analyst's findings
62
80
  2. Present gaps to the user via AskUserQuestion -- group related questions and include why each matters
63
81
  3. If no gaps identified, state "No specification gaps identified" and proceed to Phase 2
64
- 4. Incorporate answers into the draft plan context before Phase 2 review
82
+ 4. Incorporate answers into the Research Brief before Phase 2
65
83
 
66
- ### Phase 2: Review (parallel, after Phase 1 synthesis)
84
+ ## Step 6: Phase 2 - Domain Sub-Plans (parallel)
67
85
 
68
- After synthesizing Phase 1 findings (including gap resolution answers) into a draft plan, spawn these two reviewers simultaneously:
86
+ Spawn four domain planners simultaneously, passing each the Research Brief:
69
87
 
70
- #### Tech Reviewer
71
- - **Name**: `tech-reviewer` | **Agent type**: `tech-reviewer` | **Mode**: `plan`
72
- - **Prompt**: Review the draft plan for correctness, security, and coding-philosophy compliance. Validate the approach, identify technical risks, and flag issues ranked by severity.
88
+ #### Architecture Planner
89
+ - **Name**: `arch-planner`
90
+ - **Agent type**: `architecture-planner`
91
+ - **Mode**: `bypassPermissions`
92
+ - **Prompt**: [Research Brief] + Design the technical implementation approach. Identify files to create/modify, map dependencies, recommend patterns, flag risks.
73
93
 
74
- #### Product Reviewer
75
- - **Name**: `product-reviewer` | **Agent type**: `product-reviewer` | **Mode**: `plan`
76
- - **Prompt**: Review the draft plan from a non-technical/UX perspective. Does the plan solve the right problem? Will the solution work for end users? Are there user-facing concerns the technical team missed?
94
+ #### Test Strategist
95
+ - **Name**: `test-strategist`
96
+ - **Agent type**: `test-strategist`
97
+ - **Mode**: `bypassPermissions`
98
+ - **Prompt**: [Research Brief] + Design the test matrix. Identify edge cases, set coverage targets, define verification commands, plan TDD sequence.
77
99
 
78
- ### Bug-Specific Rules
100
+ #### Security Planner
101
+ - **Name**: `security-planner`
102
+ - **Agent type**: `security-planner`
103
+ - **Mode**: `bypassPermissions`
104
+ - **Prompt**: [Research Brief] + Perform lightweight threat modeling (STRIDE). Identify auth/validation gaps, secrets exposure risks, and security measures needed.
79
105
 
80
- If the plan type is **Bug**:
106
+ #### Product Planner
107
+ - **Name**: `product-planner`
108
+ - **Agent type**: `product-planner`
109
+ - **Mode**: `bypassPermissions`
110
+ - **Prompt**: [Research Brief] + Define user flows in Gherkin. Write acceptance criteria from user perspective. Identify UX concerns and error states.
81
111
 
82
- - The bug **must** be empirically replicated (Playwright, browser, direct API call, etc.) -- not guessed at
83
- - If the research team cannot reproduce the bug, **STOP**. Update the ticket with findings and what additional information is needed, then end the session
84
- - Do not attempt to fix a bug you cannot prove exists
85
- - Never include solutions with obvious anti-patterns (e.g., N+1 queries). If unavoidable, **STOP** and update the ticket
112
+ Wait for all four to report back via SendMessage.
113
+
114
+ ## Step 7: Phase 3 - Review (parallel)
115
+
116
+ Spawn two reviewers simultaneously, passing them all sub-plans:
117
+
118
+ #### Devil's Advocate
119
+ - **Name**: `devils-advocate`
120
+ - **Agent type**: `general-purpose`
121
+ - **Mode**: `bypassPermissions`
122
+ - **Prompt**: [All sub-plans] + Review critically. Identify anti-patterns, N+1 queries, missing edge cases, security concerns, and performance issues. Do not assume anti-patterns are acceptable just because they exist in the codebase — undocumented anti-patterns should be flagged, not used as reference. Challenge assumptions and propose alternatives for weak points.
86
123
 
87
- ## Step 4: Synthesize and Write Plan
124
+ #### Consistency Checker
125
+ - **Name**: `consistency-checker`
126
+ - **Agent type**: `consistency-checker`
127
+ - **Mode**: `bypassPermissions`
128
+ - **Prompt**: [All sub-plans] + Verify cross-plan consistency. Check that file lists align, test strategy covers architecture changes, security measures are reflected in acceptance criteria, and no sub-plans contradict each other.
88
129
 
89
- After all teammates have reported and the team lead has approved their findings, synthesize into a unified plan file with these sections:
130
+ Wait for both to report back via SendMessage.
90
131
 
91
- 1. **Title and context** -- What is being done and why
92
- 2. **Input source** -- Ticket URL, file path, or description
93
- 3. **Plan type** -- Bug, Task, Story/Feature, or Epic
94
- 4. **Branch and PR** -- Following Branch and PR Rules from @.claude/rules/plan.md
95
- 5. **Analysis** -- Synthesized research findings from all teammates
96
- 6. **Implementation approach** -- How the work will be done
97
- 7. **Tasks** -- Following the Task Creation Specification from @.claude/rules/plan.md, including the JSON metadata block for each task
98
- 8. **Required tasks** -- All tasks from the Required Tasks section in @.claude/rules/plan.md (archive task must be last)
99
- 9. **Implementation team** -- Instructions to spawn a second Agent Team using the agents from the Implementation Team Guidance table in @.claude/rules/plan.md
132
+ ## Step 8: Phase 4 - Synthesis (team lead)
133
+
134
+ Read governance and format rules, then merge everything into a unified plan:
135
+
136
+ 1. Read `@.claude/rules/plan-governance.md` for governance rules
137
+ 2. Read `@.claude/rules/plan.md` for task document format
138
+ 3. Merge sub-plans + review feedback into a unified plan
139
+ 4. Apply governance: Required Tasks, Branch/PR rules, Git Workflow
140
+ 5. Create TaskCreate specs per plan.md format
141
+ 6. Write plan to `plans/<name>.md`
142
+ 7. Create branch, open draft PR
143
+ 8. Update ticket if applicable
100
144
 
101
145
  Apply the Type-Specific Requirements from @.claude/rules/plan.md based on the detected plan type. For Bugs, also include a replication task before any fix and a proof command for every fix task. For Epics, include dependency mapping between sub-tasks.
102
146
 
103
- ## Step 5: Ticket Integration
147
+ The plan file must include:
148
+
149
+ 1. **Title and context** — What is being done and why
150
+ 2. **Input source** — Ticket URL, file path, or description
151
+ 3. **Plan type** — Bug, Task, Story/Feature, or Epic
152
+ 4. **Branch and PR** — Following branch/PR rules from plan-governance.md
153
+ 5. **Analysis** — Synthesized research findings from all teammates
154
+ 6. **Implementation approach** — How the work will be done
155
+ 7. **Tasks** — Following the Task Creation Specification from plan.md
156
+ 8. **Implementation Team** — Instructions to spawn an Agent Team (see Step 10)
157
+
158
+ ### Type-Specific Requirements
159
+
160
+ Apply these additional requirements based on the detected type:
161
+
162
+ #### Bug
163
+ - **Replication step** (mandatory): Include a task to reproduce the bug empirically before any fix
164
+ - **Root cause analysis**: Identify why the bug occurs, not just what triggers it
165
+ - **Regression test**: Write a test that fails without the fix and passes with it
166
+ - **Verification**: Run the replication step again after the fix to confirm resolution
167
+ - **Proof command**: Every fix task must include a proof command and expected output
168
+
169
+ #### Story/Feature
170
+ - **UX review**: Include a product-reviewer agent task to validate from user perspective
171
+ - **Feature flag consideration**: Note whether this should be behind a feature flag
172
+ - **Documentation**: Include user-facing documentation if applicable
173
+
174
+ #### Task
175
+ - **Standard implementation** with empirical verification
176
+
177
+ #### Epic
178
+ - **Decompose into sub-tasks**: Break into Stories, Tasks, and/or Bugs
179
+ - **Each sub-task gets its own type-specific requirements**
180
+ - **Dependency mapping**: Identify which sub-tasks depend on others
181
+
182
+ ## Step 9: Include Required Tasks
183
+
184
+ Include all required tasks defined in `@.claude/rules/plan-governance.md` (Required Tasks section), including the archive task which must always be last.
185
+
186
+ ## Step 10: Implementation Team Instructions
187
+
188
+ The plan must include explict instructions to "Create an agent team" for implementation. Recommend these specialized agents:
189
+
190
+ | Agent | Use For |
191
+ |-------|---------|
192
+ | `implementer` | Code implementation (pre-loaded with project conventions, TDD enforcement) |
193
+ | `tech-reviewer` | Technical review (correctness, security, performance) |
194
+ | `product-reviewer` | Product/UX review (validates from non-technical perspective) |
195
+ | `learner` | Post-implementation learning (processes learnings into skills/rules) |
196
+ | `test-coverage-agent` | Writing comprehensive tests |
197
+ | `code-simplifier` | Code simplification and refinement |
198
+ | `coderabbit` | Automated AI code review |
199
+
200
+ The **team lead** handles git operations (commits, pushes, PR management) — teammates focus on their specialized work.
201
+
202
+ ## Step 11: Ticket Integration
104
203
 
105
204
  If the input was a ticket ID or URL:
106
205
 
@@ -110,8 +209,21 @@ If the input was a ticket ID or URL:
110
209
  4. Use `/jira-sync` at key milestones
111
210
  5. If blocked, update the ticket before stopping
112
211
 
113
- ## Step 6: Present to User
212
+ ## Step 12: Present to User
114
213
 
115
214
  Present the synthesized plan to the user for review. The user may approve, request modifications, or reject.
116
215
 
117
216
  All decisions in the plan must include a recommendation. If a decision is left unresolved, use the recommended option.
217
+
218
+ ## Step 13: Shutdown Team
219
+
220
+ Send `shutdown_request` to all teammates and clean up the team.
221
+
222
+ ### Bug-Specific Rules
223
+
224
+ If the plan type is **Bug**:
225
+
226
+ - The bug **must** be empirically replicated (Playwright, browser, direct API call, etc.) — not guessed at
227
+ - If the research team cannot reproduce the bug, **STOP**. Update the ticket with findings and what additional information is needed, then end the session
228
+ - Do not attempt to fix a bug you cannot prove exists
229
+ - Never include solutions with obvious anti-patterns (e.g., N+1 queries). If unavoidable due to API limitations, **STOP** and update the ticket with what is needed
@@ -9,21 +9,12 @@ Implement the requirements in $ARGUMENTS.
9
9
 
10
10
  If no argument provided, search for plan files in the `plans/` directory and present them to the user for selection.
11
11
 
12
- ## Workflow
12
+ ## Step 1: Parse Plan
13
13
 
14
14
  1. **Read the plan file** specified in `$ARGUMENTS`
15
- 2. **Parse all tasks** from the plan, including their dependencies, descriptions, and verification requirements
15
+ 2. **Extract all tasks** with their dependencies, descriptions, verification requirements, and metadata
16
16
  3. **Parse task metadata** -- extract the JSON metadata code fence from each task (see @.claude/rules/plan.md Metadata section for the required schema)
17
- 4. **Create tasks** using TaskCreate for each task in the plan, passing the full parsed metadata
18
- 5. **Set up dependencies** between tasks using TaskUpdate (addBlockedBy/addBlocks)
19
- 6. **Spawn an Agent Team** with specialized agents to execute tasks in parallel where dependencies allow
20
- 7. **Execute tasks** following the plan's specified order and dependency graph
21
- 8. **Verify each task** using its `verification.command` before marking complete
22
- 9. **Archive the plan** following the Archive Procedure in @.claude/rules/plan.md
23
-
24
- ## Agent Team Composition
25
-
26
- Use the specialized agents listed in $ARGUMENTS and the Implementation Team Guidance table in @.claude/rules/plan.md. The **team lead** handles git operations (commits, pushes, PR management) -- teammates focus on their specialized work.
17
+ 4. **Build a dependency graph** to determine which tasks can run in parallel
27
18
 
28
19
  ## Task Metadata Rules
29
20
 
@@ -33,6 +24,39 @@ Each task in the plan file contains a JSON metadata code fence (schema defined i
33
24
  - If a task is missing `skills` or `verification`, flag it as an error and ask the user before proceeding
34
25
  - Run `verification.command` before marking any task complete
35
26
 
27
+ ## Step 2: Setup
28
+
29
+ 1. Read `@.claude/rules/plan-governance.md` for governance rules (branch/PR, git workflow, required tasks)
30
+ 2. Read `@.claude/rules/plan.md` for task document format
31
+ 3. **Verify branch exists** -- create if needed following branch/PR rules from plan-governance.md
32
+ 4. **Verify draft PR exists** -- create with `gh pr create --draft` if needed. No implementation before the draft PR exists
33
+ 5. **Determine implementer count** based on the task dependency graph:
34
+ - 1-2 independent tasks → 1 implementer
35
+ - 3-5 independent tasks → 2 implementers
36
+ - 6+ independent tasks → 3 implementers (cap)
37
+
38
+ ## Step 3: Create Agent Team
39
+
40
+ Spawn an Agent Team with:
41
+
42
+ - **Implementers** (named `implementer-1`, `implementer-2`, etc.) -- agent type: `implementer`, mode: `bypassPermissions`
43
+ - Create all tasks via TaskCreate with proper `blockedBy` relationships matching the plan's dependency graph
44
+ - Assign the first batch of independent tasks to implementers
45
+
46
+ Use the specialized agents per `@.claude/rules/plan-governance.md` (Implementation Team Guidance):
47
+
48
+ | Agent | Use For | Phase |
49
+ |-------|---------|-------|
50
+ | `implementer` | Code implementation with TDD (red-green-refactor) | Phase 2 |
51
+ | `tech-reviewer` | Technical review (correctness, security, performance) | Phase 3 |
52
+ | `product-reviewer` | Product/UX review (validates from non-technical perspective) | Phase 3 |
53
+ | `test-coverage-agent` | Writing comprehensive tests | Phase 4 |
54
+ | `code-simplifier` | Code simplification and refinement | Phase 4 |
55
+ | `coderabbit` | Automated AI code review | Phase 3 |
56
+ | `learner` | Post-implementation learning | Phase 5 |
57
+
58
+ The **team lead** handles git operations (commits, pushes, PR management) -- teammates focus on their specialized work.
59
+
36
60
  ## Compaction Resilience
37
61
 
38
62
  Context compaction can cause the team lead to lose in-memory state (task assignments, owner fields). Follow these rules:
@@ -44,3 +68,45 @@ Context compaction can cause the team lead to lose in-memory state (task assignm
44
68
  2. **Re-read after compaction** -- immediately call TaskList to reload all task state
45
69
  3. **Restore missing owners** -- if any task has `metadata.owner` but no `owner` field, restore it via TaskUpdate
46
70
  4. **Never rely on memory** -- always call TaskList before assigning new work
71
+
72
+ ## Step 4: Phase 2 - Implementation
73
+
74
+ 1. Implementers work on assigned tasks following TDD (red-green-refactor cycle)
75
+ 2. Team lead monitors completion via messages from implementers
76
+ 3. After each task completes: team lead runs `git add <specific files>` + `git commit` with conventional commit message
77
+ 4. Team lead assigns next tasks as dependencies resolve
78
+ 5. Continue until all implementation tasks are complete
79
+
80
+ ## Step 5: Phase 3 - Reviews (parallel)
81
+
82
+ Spawn review agents simultaneously:
83
+
84
+ - **tech-reviewer** -- agent type: `tech-reviewer`, mode: `bypassPermissions`
85
+ - **product-reviewer** -- agent type: `product-reviewer`, mode: `bypassPermissions`
86
+ - Invoke `/plan-local-code-review` skill (team lead runs directly)
87
+ - **coderabbit** -- agent type: `coderabbit:code-reviewer`, mode: `bypassPermissions`
88
+
89
+ Wait for all reviews to complete.
90
+
91
+ ## Step 6: Phase 4 - Post-Review (sequential)
92
+
93
+ 1. **Fix review findings** -- re-spawn an implementer to address valid review suggestions
94
+ 2. **Simplify code** -- spawn `code-simplifier` agent (agent type: `code-simplifier:code-simplifier`, mode: `bypassPermissions`)
95
+ 3. **Update tests** -- spawn `test-coverage-agent` to update tests for post-review changes
96
+ 4. **Verify all tasks** -- team lead runs ALL proof commands from all tasks to confirm everything still works
97
+
98
+ ## Step 7: Phase 5 - Learning & Archive
99
+
100
+ 1. **Collect learnings** -- spawn `learner` agent (agent type: `learner`, mode: `bypassPermissions`) to process task learnings
101
+ 2. **Archive the plan** -- follow the Archive Procedure in @.claude/rules/plan-governance.md
102
+ 3. **Finalize PR**:
103
+ ```bash
104
+ git add . && git commit -m "chore: archive <plan-name> plan"
105
+ GIT_SSH_COMMAND="ssh -o ServerAliveInterval=30 -o ServerAliveCountMax=5" git push
106
+ gh pr ready
107
+ gh pr merge --auto --merge
108
+ ```
109
+
110
+ ## Step 8: Shutdown Team
111
+
112
+ Send `shutdown_request` to all teammates and clean up the team.
@@ -70,6 +70,7 @@
70
70
  "@shopify/flash-list",
71
71
  "@shopify/react-native-skia",
72
72
  "aws-exports",
73
+ "axios",
73
74
  "base-64",
74
75
  "baseline-browser-mapping",
75
76
  "date-fns",
package/package.json CHANGED
@@ -88,7 +88,7 @@
88
88
  "@isaacs/brace-expansion": "^5.0.1"
89
89
  },
90
90
  "name": "@codyswann/lisa",
91
- "version": "1.30.0",
91
+ "version": "1.31.1",
92
92
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
93
93
  "main": "dist/index.js",
94
94
  "bin": {
@@ -84,7 +84,12 @@ elif [ "$PACKAGE_MANAGER" = "bun" ]; then
84
84
  # Transitive dependency via @react-native-community/cli (Android/iOS build tooling)
85
85
  # Parent packages pin ^4.4.1; fix requires major version 5.x (incompatible)
86
86
  # Risk: None - CLI build tool, not a production runtime dependency
87
- if ! bun audit --audit-level=high --ignore GHSA-5j98-mcp5-4vw2 --ignore GHSA-8qq5-rm4j-mr97 --ignore GHSA-37qj-frw5-hhjh; then
87
+
88
+ # Excluding GHSA-43fc-jf86-j433: axios DoS via __proto__ key in mergeConfig
89
+ # Transitive dependency via aws-amplify > @aws-amplify/api-rest > axios
90
+ # bun overrides/resolutions cannot reach nested node_modules copies
91
+ # Risk: Low - only affects server-side mergeConfig with attacker-controlled input
92
+ if ! bun audit --audit-level=high --ignore GHSA-5j98-mcp5-4vw2 --ignore GHSA-8qq5-rm4j-mr97 --ignore GHSA-37qj-frw5-hhjh --ignore GHSA-43fc-jf86-j433; then
88
93
  echo "⚠️ Security audit failed. Please fix high/critical vulnerabilities before pushing."
89
94
  exit 1
90
95
  fi
@@ -1014,7 +1014,12 @@ jobs:
1014
1014
  # Transitive dependency via @react-native-community/cli (Android/iOS build tooling)
1015
1015
  # Parent packages pin ^4.4.1; fix requires major version 5.x (incompatible)
1016
1016
  # Risk: None - CLI build tool, not a production runtime dependency
1017
- if ! bun audit --audit-level=high --ignore GHSA-5j98-mcp5-4vw2 --ignore GHSA-8qq5-rm4j-mr97 --ignore GHSA-37qj-frw5-hhjh; then
1017
+
1018
+ # Excluding GHSA-43fc-jf86-j433: axios DoS via __proto__ key in mergeConfig
1019
+ # Transitive dependency via aws-amplify > @aws-amplify/api-rest > axios
1020
+ # bun overrides/resolutions cannot reach nested node_modules copies
1021
+ # Risk: Low - only affects server-side mergeConfig with attacker-controlled input
1022
+ if ! bun audit --audit-level=high --ignore GHSA-5j98-mcp5-4vw2 --ignore GHSA-8qq5-rm4j-mr97 --ignore GHSA-37qj-frw5-hhjh --ignore GHSA-43fc-jf86-j433; then
1018
1023
  echo "::warning::Found high or critical vulnerabilities"
1019
1024
  exit 1
1020
1025
  fi
@@ -55,7 +55,8 @@
55
55
  "ts-jest": "^29.4.6"
56
56
  },
57
57
  "resolutions": {
58
- "@isaacs/brace-expansion": "^5.0.1"
58
+ "@isaacs/brace-expansion": "^5.0.1",
59
+ "axios": ">=1.13.5"
59
60
  }
60
61
  },
61
62
  "defaults": {