@codyswann/lisa 1.67.2 → 1.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/copy-overwrite/.claude/rules/base-rules.md +0 -50
- package/all/copy-overwrite/.claude/rules/intent-routing.md +115 -0
- package/all/copy-overwrite/.claude/rules/verification.md +27 -538
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/agents/architecture-specialist.md +4 -9
- package/plugins/lisa/agents/bug-fixer.md +40 -0
- package/plugins/lisa/agents/builder.md +41 -0
- package/plugins/lisa/agents/debug-specialist.md +4 -93
- package/plugins/lisa/agents/jira-agent.md +85 -0
- package/plugins/lisa/agents/performance-specialist.md +2 -11
- package/plugins/lisa/agents/product-specialist.md +2 -10
- package/plugins/lisa/agents/quality-specialist.md +2 -0
- package/plugins/lisa/agents/security-specialist.md +3 -9
- package/plugins/lisa/agents/test-specialist.md +2 -16
- package/plugins/lisa/agents/verification-specialist.md +38 -103
- package/plugins/lisa/commands/build.md +10 -0
- package/plugins/lisa/commands/fix.md +10 -0
- package/plugins/lisa/commands/improve.md +15 -0
- package/plugins/lisa/commands/investigate.md +10 -0
- package/plugins/lisa/commands/monitor.md +10 -0
- package/plugins/lisa/commands/plan/create.md +1 -1
- package/plugins/lisa/commands/plan/execute.md +1 -2
- package/plugins/lisa/commands/plan.md +10 -0
- package/plugins/lisa/commands/review.md +10 -0
- package/plugins/lisa/commands/ship.md +10 -0
- package/plugins/lisa/skills/acceptance-criteria/SKILL.md +71 -0
- package/plugins/lisa/skills/bug-triage/SKILL.md +23 -0
- package/plugins/lisa/skills/codebase-research/SKILL.md +87 -0
- package/plugins/lisa/skills/epic-triage/SKILL.md +28 -0
- package/plugins/lisa/skills/performance-review/SKILL.md +94 -0
- package/plugins/lisa/skills/quality-review/SKILL.md +54 -0
- package/plugins/lisa/skills/reproduce-bug/SKILL.md +96 -0
- package/plugins/lisa/skills/root-cause-analysis/SKILL.md +155 -0
- package/plugins/lisa/skills/security-review/SKILL.md +57 -0
- package/plugins/lisa/skills/task-decomposition/SKILL.md +95 -0
- package/plugins/lisa/skills/task-triage/SKILL.md +23 -0
- package/plugins/lisa/skills/tdd-implementation/SKILL.md +83 -0
- package/plugins/lisa/skills/test-strategy/SKILL.md +63 -0
- package/plugins/lisa/skills/verification-lifecycle/SKILL.md +292 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/agents/architecture-specialist.md +4 -9
- package/plugins/src/base/agents/bug-fixer.md +40 -0
- package/plugins/src/base/agents/builder.md +41 -0
- package/plugins/src/base/agents/debug-specialist.md +4 -93
- package/plugins/src/base/agents/jira-agent.md +85 -0
- package/plugins/src/base/agents/performance-specialist.md +2 -11
- package/plugins/src/base/agents/product-specialist.md +2 -10
- package/plugins/src/base/agents/quality-specialist.md +2 -0
- package/plugins/src/base/agents/security-specialist.md +3 -9
- package/plugins/src/base/agents/test-specialist.md +2 -16
- package/plugins/src/base/agents/verification-specialist.md +38 -103
- package/plugins/src/base/commands/build.md +10 -0
- package/plugins/src/base/commands/fix.md +10 -0
- package/plugins/src/base/commands/improve.md +15 -0
- package/plugins/src/base/commands/investigate.md +10 -0
- package/plugins/src/base/commands/monitor.md +10 -0
- package/plugins/src/base/commands/plan/create.md +1 -1
- package/plugins/src/base/commands/plan/execute.md +1 -2
- package/plugins/src/base/commands/plan.md +10 -0
- package/plugins/src/base/commands/review.md +10 -0
- package/plugins/src/base/commands/ship.md +10 -0
- package/plugins/src/base/skills/acceptance-criteria/SKILL.md +71 -0
- package/plugins/src/base/skills/bug-triage/SKILL.md +23 -0
- package/plugins/src/base/skills/codebase-research/SKILL.md +87 -0
- package/plugins/src/base/skills/epic-triage/SKILL.md +28 -0
- package/plugins/src/base/skills/performance-review/SKILL.md +94 -0
- package/plugins/src/base/skills/quality-review/SKILL.md +54 -0
- package/plugins/src/base/skills/reproduce-bug/SKILL.md +96 -0
- package/plugins/src/base/skills/root-cause-analysis/SKILL.md +155 -0
- package/plugins/src/base/skills/security-review/SKILL.md +57 -0
- package/plugins/src/base/skills/task-decomposition/SKILL.md +95 -0
- package/plugins/src/base/skills/task-triage/SKILL.md +23 -0
- package/plugins/src/base/skills/tdd-implementation/SKILL.md +83 -0
- package/plugins/src/base/skills/test-strategy/SKILL.md +63 -0
- package/plugins/src/base/skills/verification-lifecycle/SKILL.md +292 -0
- package/typescript/copy-overwrite/eslint.ignore.config.json +1 -0
- package/expo/copy-overwrite/.claude/rules/expo-verification.md +0 -261
- package/plugins/lisa/agents/agent-architect.md +0 -310
- package/plugins/lisa/agents/hooks-expert.md +0 -74
- package/plugins/lisa/agents/implementer.md +0 -54
- package/plugins/lisa/agents/slash-command-architect.md +0 -87
- package/plugins/lisa/agents/web-search-researcher.md +0 -112
- package/plugins/lisa/commands/git/commit-and-submit-pr.md +0 -7
- package/plugins/lisa/commands/git/commit-submit-pr-and-verify.md +0 -7
- package/plugins/lisa/commands/git/commit-submit-pr-deploy-and-verify.md +0 -7
- package/plugins/lisa/commands/jira/fix.md +0 -7
- package/plugins/lisa/commands/jira/implement.md +0 -7
- package/plugins/lisa/commands/sonarqube/check.md +0 -6
- package/plugins/lisa/commands/sonarqube/fix.md +0 -6
- package/plugins/lisa/commands/tasks/load.md +0 -7
- package/plugins/lisa/commands/tasks/sync.md +0 -7
- package/plugins/lisa/skills/git-commit-and-submit-pr/SKILL.md +0 -8
- package/plugins/lisa/skills/git-commit-submit-pr-and-verify/SKILL.md +0 -7
- package/plugins/lisa/skills/git-commit-submit-pr-deploy-and-verify/SKILL.md +0 -7
- package/plugins/lisa/skills/jira-fix/SKILL.md +0 -16
- package/plugins/lisa/skills/jira-implement/SKILL.md +0 -18
- package/plugins/lisa/skills/sonarqube-check/SKILL.md +0 -11
- package/plugins/lisa/skills/sonarqube-fix/SKILL.md +0 -8
- package/plugins/lisa/skills/tasks-load/SKILL.md +0 -88
- package/plugins/lisa/skills/tasks-sync/SKILL.md +0 -108
- package/plugins/src/base/agents/agent-architect.md +0 -310
- package/plugins/src/base/agents/hooks-expert.md +0 -74
- package/plugins/src/base/agents/implementer.md +0 -54
- package/plugins/src/base/agents/slash-command-architect.md +0 -87
- package/plugins/src/base/agents/web-search-researcher.md +0 -112
- package/plugins/src/base/commands/git/commit-and-submit-pr.md +0 -7
- package/plugins/src/base/commands/git/commit-submit-pr-and-verify.md +0 -7
- package/plugins/src/base/commands/git/commit-submit-pr-deploy-and-verify.md +0 -7
- package/plugins/src/base/commands/jira/fix.md +0 -7
- package/plugins/src/base/commands/jira/implement.md +0 -7
- package/plugins/src/base/commands/sonarqube/check.md +0 -6
- package/plugins/src/base/commands/sonarqube/fix.md +0 -6
- package/plugins/src/base/commands/tasks/load.md +0 -7
- package/plugins/src/base/commands/tasks/sync.md +0 -7
- package/plugins/src/base/skills/git-commit-and-submit-pr/SKILL.md +0 -8
- package/plugins/src/base/skills/git-commit-submit-pr-and-verify/SKILL.md +0 -7
- package/plugins/src/base/skills/git-commit-submit-pr-deploy-and-verify/SKILL.md +0 -7
- package/plugins/src/base/skills/jira-fix/SKILL.md +0 -16
- package/plugins/src/base/skills/jira-implement/SKILL.md +0 -18
- package/plugins/src/base/skills/sonarqube-check/SKILL.md +0 -11
- package/plugins/src/base/skills/sonarqube-fix/SKILL.md +0 -8
- package/plugins/src/base/skills/tasks-load/SKILL.md +0 -88
- package/plugins/src/base/skills/tasks-sync/SKILL.md +0 -108
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-review
|
|
3
|
+
description: "Security review methodology. STRIDE threat modeling, OWASP Top 10 vulnerability checks, auth/validation/secrets handling review, and mitigation recommendations."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Security Review
|
|
7
|
+
|
|
8
|
+
Identify vulnerabilities, evaluate threats, and recommend mitigations for code changes.
|
|
9
|
+
|
|
10
|
+
## Analysis Process
|
|
11
|
+
|
|
12
|
+
1. **Read affected files** -- understand current security posture of the code being changed
|
|
13
|
+
2. **STRIDE analysis** -- evaluate Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege risks
|
|
14
|
+
3. **Check input validation** -- are user inputs sanitized at system boundaries?
|
|
15
|
+
4. **Check secrets handling** -- are credentials, tokens, or API keys exposed in code, logs, or error messages?
|
|
16
|
+
5. **Check auth/authz** -- are access controls properly enforced for new endpoints or features?
|
|
17
|
+
6. **Review dependencies** -- do new dependencies introduce known vulnerabilities?
|
|
18
|
+
|
|
19
|
+
## Output Format
|
|
20
|
+
|
|
21
|
+
Structure findings as:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
## Security Analysis
|
|
25
|
+
|
|
26
|
+
### Threat Model (STRIDE)
|
|
27
|
+
| Threat | Applies? | Description | Mitigation |
|
|
28
|
+
|--------|----------|-------------|------------|
|
|
29
|
+
| Spoofing | Yes/No | ... | ... |
|
|
30
|
+
| Tampering | Yes/No | ... | ... |
|
|
31
|
+
| Repudiation | Yes/No | ... | ... |
|
|
32
|
+
| Info Disclosure | Yes/No | ... | ... |
|
|
33
|
+
| Denial of Service | Yes/No | ... | ... |
|
|
34
|
+
| Elevation of Privilege | Yes/No | ... | ... |
|
|
35
|
+
|
|
36
|
+
### Security Checklist
|
|
37
|
+
- [ ] Input validation at system boundaries
|
|
38
|
+
- [ ] No secrets in code or logs
|
|
39
|
+
- [ ] Auth/authz enforced on new endpoints
|
|
40
|
+
- [ ] No SQL/NoSQL injection vectors
|
|
41
|
+
- [ ] No XSS vectors in user-facing output
|
|
42
|
+
- [ ] Dependencies free of known CVEs
|
|
43
|
+
|
|
44
|
+
### Vulnerabilities Found
|
|
45
|
+
- [vulnerability] -- where in the code, how to prevent
|
|
46
|
+
|
|
47
|
+
### Recommendations
|
|
48
|
+
- [recommendation] -- priority (critical/warning/suggestion)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Rules
|
|
52
|
+
|
|
53
|
+
- Focus on the specific changes proposed, not a full security audit of the entire codebase
|
|
54
|
+
- Flag only real risks -- do not invent hypothetical threats for internal tooling with no user input
|
|
55
|
+
- Prioritize OWASP Top 10 vulnerabilities
|
|
56
|
+
- If the changes are purely internal (config, refactoring, docs), report "No security concerns" and explain why
|
|
57
|
+
- Always check `.gitleaksignore` patterns to understand what secrets scanning is already in place
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-decomposition
|
|
3
|
+
description: "Methodology for breaking work into ordered tasks. Each task gets acceptance criteria, verification type, dependencies, and skills required."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Task Decomposition
|
|
7
|
+
|
|
8
|
+
Break work into ordered, well-scoped tasks that can be independently implemented and verified.
|
|
9
|
+
|
|
10
|
+
## Decomposition Process
|
|
11
|
+
|
|
12
|
+
### 1. Identify Units of Work
|
|
13
|
+
|
|
14
|
+
- Break the work into the smallest units that are independently valuable
|
|
15
|
+
- Each unit should produce a verifiable outcome (a passing test, a working endpoint, observable behavior)
|
|
16
|
+
- Avoid tasks that are too large to complete in a single session
|
|
17
|
+
- Avoid tasks that are too small to be meaningful (e.g., "add an import statement")
|
|
18
|
+
|
|
19
|
+
### 2. Define Acceptance Criteria
|
|
20
|
+
|
|
21
|
+
For each task, define what "done" looks like:
|
|
22
|
+
|
|
23
|
+
- Be specific and measurable -- avoid vague criteria like "works correctly"
|
|
24
|
+
- Include both positive cases (what should work) and negative cases (what should be rejected)
|
|
25
|
+
- Reference exact behavior: error messages, status codes, output format, performance thresholds
|
|
26
|
+
- If a task modifies existing behavior, state both the before and after
|
|
27
|
+
|
|
28
|
+
### 3. Assign Verification Type
|
|
29
|
+
|
|
30
|
+
Each task must have a verification method. Choose the most appropriate:
|
|
31
|
+
|
|
32
|
+
| Verification Type | When to Use |
|
|
33
|
+
|-------------------|-------------|
|
|
34
|
+
| **Unit test** | Pure logic, data transformations, utility functions |
|
|
35
|
+
| **Integration test** | Cross-module interactions, database operations, API contracts |
|
|
36
|
+
| **E2E test** | User-facing workflows, multi-service interactions |
|
|
37
|
+
| **Manual verification** | UI/UX behavior, visual correctness, one-time infrastructure changes |
|
|
38
|
+
| **Build verification** | Compilation, type checking, linting, bundle size |
|
|
39
|
+
| **Deploy verification** | Service health checks, smoke tests, monitoring dashboards |
|
|
40
|
+
|
|
41
|
+
### 4. Map Dependencies
|
|
42
|
+
|
|
43
|
+
- Identify which tasks must complete before others can start
|
|
44
|
+
- Order tasks so that each builds on a stable foundation
|
|
45
|
+
- Prefer independent tasks that can run in parallel where possible
|
|
46
|
+
- Flag external dependencies (other teams, services, permissions, data) that may block progress
|
|
47
|
+
|
|
48
|
+
### 5. Determine Execution Order
|
|
49
|
+
|
|
50
|
+
- Place foundational tasks first (types, schemas, interfaces, shared utilities)
|
|
51
|
+
- Follow with implementation tasks (business logic, handlers, services)
|
|
52
|
+
- Then integration tasks (wiring, configuration, API routes)
|
|
53
|
+
- Finish with verification tasks (test suites, documentation, cleanup)
|
|
54
|
+
|
|
55
|
+
### 6. Assign Required Skills
|
|
56
|
+
|
|
57
|
+
Map each task to the skills needed to complete it. This enables delegation to specialized agents or helps identify what expertise is required.
|
|
58
|
+
|
|
59
|
+
## Output Format
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
## Task Breakdown
|
|
63
|
+
|
|
64
|
+
### Task 1: [imperative description]
|
|
65
|
+
- **Acceptance criteria:**
|
|
66
|
+
- [specific, measurable criterion]
|
|
67
|
+
- [specific, measurable criterion]
|
|
68
|
+
- **Verification:** [type] -- [how to verify]
|
|
69
|
+
- **Dependencies:** [none | task IDs that must complete first]
|
|
70
|
+
- **Skills:** [list of skills needed]
|
|
71
|
+
|
|
72
|
+
### Task 2: [imperative description]
|
|
73
|
+
- **Acceptance criteria:**
|
|
74
|
+
- [specific, measurable criterion]
|
|
75
|
+
- **Verification:** [type] -- [how to verify]
|
|
76
|
+
- **Dependencies:** [Task 1]
|
|
77
|
+
- **Skills:** [list of skills needed]
|
|
78
|
+
|
|
79
|
+
### Execution Order
|
|
80
|
+
1. [Task 1, Task 3] (parallel -- no dependencies)
|
|
81
|
+
2. [Task 2] (depends on Task 1)
|
|
82
|
+
3. [Task 4] (depends on Task 2, Task 3)
|
|
83
|
+
|
|
84
|
+
### External Dependencies
|
|
85
|
+
- [dependency] -- [who owns it] -- [current status]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Rules
|
|
89
|
+
|
|
90
|
+
- Every task must have at least one acceptance criterion that can be empirically verified
|
|
91
|
+
- Do not create tasks that cannot be verified -- if you cannot define how to prove it is done, the task is not well-scoped
|
|
92
|
+
- Keep tasks ordered so that no task references work that has not been completed by a prior task
|
|
93
|
+
- Flag any task that requires access, permissions, or external input not yet available
|
|
94
|
+
- Prefer more small tasks over fewer large tasks -- smaller tasks are easier to verify and less risky to fail
|
|
95
|
+
- Do not create placeholder or "TODO" tasks -- every task should describe concrete work
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-triage
|
|
3
|
+
description: "8-step task triage and implementation workflow. Ensures tasks have clear requirements, dependencies, and verification plans before implementation begins."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Task Triage
|
|
7
|
+
|
|
8
|
+
Follow this 8-step triage process before implementing any task. Do not skip triage.
|
|
9
|
+
|
|
10
|
+
## Triage Steps
|
|
11
|
+
|
|
12
|
+
1. Verify you have all information needed to implement this task (acceptance criteria, design specs, environment information, dependencies, etc.). Do not make assumptions. If anything is missing, stop and ask before proceeding.
|
|
13
|
+
2. Verify you have a clear understanding of the expected behavior or outcome when the task is complete. If not, stop and clarify before starting.
|
|
14
|
+
3. Identify all dependencies (other tasks, services, APIs, data) that must be in place before you can complete this task. If any are unresolved, stop and raise them before starting implementation.
|
|
15
|
+
4. Verify you have access to the tools, environments, and permissions needed to deploy and verify this task (e.g. CI/CD pipelines, deployment targets, logging/monitoring systems, API access, database access). If any are missing or inaccessible, stop and raise them before starting implementation.
|
|
16
|
+
5. Define the tests you will write to confirm the task is implemented correctly and prevent regressions.
|
|
17
|
+
6. Define the documentation you will create or update to explain the "how" and "what" behind this task so another developer understands it.
|
|
18
|
+
7. If you can verify your implementation before deploying to the target environment (e.g. start the app, invoke the API, open a browser, run the process, check logs), do so before deploying.
|
|
19
|
+
8. Define how you will verify the task is complete beyond a shadow of a doubt (e.g. deploy to the target environment, invoke the API, open a browser, run the process, check logs).
|
|
20
|
+
|
|
21
|
+
## Implementation
|
|
22
|
+
|
|
23
|
+
Use the output of the triage steps above as your guide. Do not skip triage.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd-implementation
|
|
3
|
+
description: "Test-Driven Development implementation workflow. RED: write failing test, GREEN: minimum code to pass, REFACTOR: clean up. Includes task metadata requirements, verification, and atomic commit practices."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TDD Implementation
|
|
7
|
+
|
|
8
|
+
Implement code changes using the Test-Driven Development (RED/GREEN/REFACTOR) cycle. This skill defines the complete workflow from task metadata validation through atomic commit.
|
|
9
|
+
|
|
10
|
+
## Task Metadata
|
|
11
|
+
|
|
12
|
+
Each task you work on must have the following in its metadata:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"plan": "<plan-name>",
|
|
17
|
+
"type": "spike|bug|task|epic|story",
|
|
18
|
+
"acceptance_criteria": ["..."],
|
|
19
|
+
"relevant_documentation": "",
|
|
20
|
+
"testing_requirements": ["..."],
|
|
21
|
+
"skills": ["..."],
|
|
22
|
+
"learnings": ["..."],
|
|
23
|
+
"verification": {
|
|
24
|
+
"type": "test|ui-recording|test-coverage|api-test|manual-check|documentation",
|
|
25
|
+
"command": "the proof command",
|
|
26
|
+
"expected": "what success looks like"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
All fields are mandatory — empty arrays are ok. If any are missing, ask the agent team to fill them in and wait to get a response.
|
|
32
|
+
|
|
33
|
+
## Workflow
|
|
34
|
+
|
|
35
|
+
1. **Verify task metadata** — All fields are mandatory. If any are missing, ask the agent team to fill them in and wait to get a response.
|
|
36
|
+
2. **Load skills** — Load the skills in the `skills` property of the task metadata.
|
|
37
|
+
3. **Read before writing** — Read existing code before modifying it. Understand acceptance criteria, verification, and relevant research.
|
|
38
|
+
4. **Follow existing patterns** — Match the style, naming, and structure of surrounding code.
|
|
39
|
+
5. **One task at a time** — Complete the current task before moving on.
|
|
40
|
+
6. **RED** — Write a failing test that captures the expected behavior from the task description. Focus on testing behavior, not implementation details.
|
|
41
|
+
7. **GREEN** — Write the minimum production code to make the test pass.
|
|
42
|
+
8. **REFACTOR** — Clean up while keeping tests green.
|
|
43
|
+
9. **Verify empirically** — Run the task's proof command and confirm expected output.
|
|
44
|
+
10. **Update documentation** — Add/Remove/Modify all relevant JSDoc preambles, explaining "why", not "what".
|
|
45
|
+
11. **Update the learnings** — Add what you learned during implementation to the `learnings` array in the task's `metadata.learnings`. These should be things that are relevant for other implementers to know.
|
|
46
|
+
12. **Commit atomically** — Once verified, run the `/git-commit` skill.
|
|
47
|
+
|
|
48
|
+
## TDD Cycle
|
|
49
|
+
|
|
50
|
+
**Always write failing tests before implementation code.** This is mandatory, not optional.
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
TDD Cycle:
|
|
54
|
+
1. RED: Write a failing test that defines expected behavior
|
|
55
|
+
2. GREEN: Write the minimum code to make the test pass
|
|
56
|
+
3. REFACTOR: Clean up while keeping tests green
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### RED Phase
|
|
60
|
+
|
|
61
|
+
- Write a test that captures the expected behavior from the task description
|
|
62
|
+
- Focus on testing behavior, not implementation details
|
|
63
|
+
- The test must fail before you write any production code
|
|
64
|
+
- If the imported module doesn't exist, Jest reports 0 tests found (not N failed) — this is expected RED behavior
|
|
65
|
+
|
|
66
|
+
### GREEN Phase
|
|
67
|
+
|
|
68
|
+
- Write the minimum production code to make the test pass
|
|
69
|
+
- Do not optimize, do not add features beyond what the test requires
|
|
70
|
+
- The goal is the simplest code that makes the test green
|
|
71
|
+
|
|
72
|
+
### REFACTOR Phase
|
|
73
|
+
|
|
74
|
+
- Clean up code while keeping all tests green
|
|
75
|
+
- Remove duplication, improve naming, simplify structure
|
|
76
|
+
- Run tests after every refactor step to confirm nothing breaks
|
|
77
|
+
|
|
78
|
+
## When Stuck
|
|
79
|
+
|
|
80
|
+
- Re-read the task description and acceptance criteria
|
|
81
|
+
- Check relevant research for reusable code references
|
|
82
|
+
- Search the codebase for similar implementations
|
|
83
|
+
- Ask the team lead if the task is ambiguous — do not guess
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-strategy
|
|
3
|
+
description: "Test strategy design. Coverage matrix, edge cases, TDD sequence planning, test quality review. Behavior-focused testing over implementation details."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test Strategy
|
|
7
|
+
|
|
8
|
+
Design test strategies, write tests, and review test quality.
|
|
9
|
+
|
|
10
|
+
## Analysis Process
|
|
11
|
+
|
|
12
|
+
1. **Read existing tests** -- understand the project's test conventions (describe/it structure, naming, helpers)
|
|
13
|
+
2. **Identify test types needed** -- unit, integration, E2E based on the scope of changes
|
|
14
|
+
3. **Map edge cases** -- boundary values, empty inputs, error states, concurrency scenarios
|
|
15
|
+
4. **Check coverage gaps** -- run existing tests to understand current coverage of affected files
|
|
16
|
+
5. **Design verification commands** -- proof commands that empirically demonstrate the code works
|
|
17
|
+
|
|
18
|
+
## Test Writing Process
|
|
19
|
+
|
|
20
|
+
1. **Analyze the source file** to understand its functionality
|
|
21
|
+
2. **Identify untested code paths**, edge cases, and error conditions
|
|
22
|
+
3. **Write comprehensive, meaningful tests** (not just coverage padding)
|
|
23
|
+
4. **Follow the project's existing test patterns** and conventions
|
|
24
|
+
5. **Ensure tests are readable and maintainable**
|
|
25
|
+
|
|
26
|
+
## Output Format
|
|
27
|
+
|
|
28
|
+
Structure findings as:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
## Test Analysis
|
|
32
|
+
|
|
33
|
+
### Test Matrix
|
|
34
|
+
| Component | Test Type | What to Test | Priority |
|
|
35
|
+
|-----------|-----------|-------------|----------|
|
|
36
|
+
|
|
37
|
+
### Edge Cases
|
|
38
|
+
- [edge case] -- why it matters
|
|
39
|
+
|
|
40
|
+
### Coverage Targets
|
|
41
|
+
- `path/to/file.ts` -- current: X%, target: Y%
|
|
42
|
+
|
|
43
|
+
### Test Patterns (from codebase)
|
|
44
|
+
- Pattern: [description] -- found in `path/to/test.spec.ts`
|
|
45
|
+
|
|
46
|
+
### Verification Commands
|
|
47
|
+
| Task | Proof Command | Expected Output |
|
|
48
|
+
|------|--------------|-----------------|
|
|
49
|
+
|
|
50
|
+
### TDD Sequence
|
|
51
|
+
1. [first test to write] -- covers [behavior]
|
|
52
|
+
2. [second test] -- covers [behavior]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Rules
|
|
56
|
+
|
|
57
|
+
- Always run `bun run test` to understand current test state before recommending or writing new tests
|
|
58
|
+
- Match existing test conventions -- do not introduce new test patterns
|
|
59
|
+
- Every test must have a clear "why" -- no tests for testing's sake
|
|
60
|
+
- Focus on testing behavior, not implementation details
|
|
61
|
+
- Verification commands must be runnable locally (no CI/CD dependencies)
|
|
62
|
+
- Prioritize tests that catch regressions over tests that verify happy paths
|
|
63
|
+
- Write comprehensive tests, not just coverage padding
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-lifecycle
|
|
3
|
+
description: "Verification lifecycle: classify types, discover tools, fail fast, plan, execute, loop. Includes verification surfaces, proof artifacts, self-correction loop, escalation protocol, and definition of done."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verification Lifecycle
|
|
7
|
+
|
|
8
|
+
This skill defines the complete verification lifecycle that agents must follow for every change: classify, check tooling, fail fast, plan, execute, and loop.
|
|
9
|
+
|
|
10
|
+
## Verification Lifecycle
|
|
11
|
+
|
|
12
|
+
Agents must follow this mandatory sequence for every change:
|
|
13
|
+
|
|
14
|
+
### 1. Classify
|
|
15
|
+
|
|
16
|
+
Determine which verification types apply based on the change. Start with the three always-required types (Test, Type Safety, Lint/Format), then check each conditional type against the change scope.
|
|
17
|
+
|
|
18
|
+
### 2. Check Tooling
|
|
19
|
+
|
|
20
|
+
For each required verification type, discover what tools are available in the project. Use the Tool Discovery Process below.
|
|
21
|
+
|
|
22
|
+
Report what is available for each required type. If a required type has no available tool, proceed to step 3.
|
|
23
|
+
|
|
24
|
+
### 3. Fail Fast
|
|
25
|
+
|
|
26
|
+
If a required verification type has no available tool and no reasonable alternative, escalate immediately using the Escalation Protocol. Do not begin implementation without a verification plan for every required type.
|
|
27
|
+
|
|
28
|
+
### 4. Plan
|
|
29
|
+
|
|
30
|
+
For each verification type, state:
|
|
31
|
+
- The specific tool or command that will be used
|
|
32
|
+
- The expected outcome that constitutes a pass
|
|
33
|
+
- Any prerequisites (running server, seeded database, auth token)
|
|
34
|
+
|
|
35
|
+
### 5. Execute
|
|
36
|
+
|
|
37
|
+
After implementation, run the verification plan. Execute each verification type in order.
|
|
38
|
+
|
|
39
|
+
### 6. Loop
|
|
40
|
+
|
|
41
|
+
If any verification fails, fix the issue and re-verify. Do not declare done until all required types pass. If a verification is stuck after 3 attempts, escalate.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Tool Discovery Process
|
|
46
|
+
|
|
47
|
+
Agents must discover available tools at runtime rather than assuming what exists. Check these locations in order:
|
|
48
|
+
|
|
49
|
+
1. **Project manifest** — Read the project manifest file for available scripts (build, test, lint, deploy, start, etc.) and their variants
|
|
50
|
+
2. **Script directories** — Search for shell scripts, automation files, and task runners in common locations (`scripts/`, `bin/`, project root)
|
|
51
|
+
3. **Configuration files** — Look for test framework configs, linter configs, formatter configs, deployment configs, and infrastructure-as-code definitions
|
|
52
|
+
4. **MCP tools** — Check available MCP server tools for browser automation, observability, issue tracking, and other capabilities
|
|
53
|
+
5. **CLI tools** — Check for available command-line tools relevant to the verification type (database clients, HTTP clients, cloud CLIs, container runtimes)
|
|
54
|
+
6. **Environment files** — Read environment configuration for service URLs, connection strings, and feature flags that indicate available services
|
|
55
|
+
7. **Documentation** — Check project README, CLAUDE.md, and rules files for documented verification procedures
|
|
56
|
+
|
|
57
|
+
If a tool is expected but not found, report the gap rather than assuming it doesn't exist — it may need to be installed or configured.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Verification Surfaces
|
|
62
|
+
|
|
63
|
+
Agents may only self-verify when the required verification surfaces are available.
|
|
64
|
+
|
|
65
|
+
Verification surfaces include:
|
|
66
|
+
|
|
67
|
+
### Action Surfaces
|
|
68
|
+
|
|
69
|
+
- Build and test execution
|
|
70
|
+
- Deployment and rollback
|
|
71
|
+
- Infrastructure apply and drift detection
|
|
72
|
+
- Feature flag toggling
|
|
73
|
+
- Data seeding and state reset
|
|
74
|
+
- Load generation and fault injection
|
|
75
|
+
|
|
76
|
+
### Observation Surfaces
|
|
77
|
+
|
|
78
|
+
- Application logs (local and remote)
|
|
79
|
+
- Metrics (latency, errors, saturation, scaling)
|
|
80
|
+
- Traces and correlation IDs
|
|
81
|
+
- Database queries and schema inspection
|
|
82
|
+
- Browser and device automation
|
|
83
|
+
- Queue depth and consumer execution visibility
|
|
84
|
+
- CDN headers and edge behavior
|
|
85
|
+
- Artifact capture (video, screenshots, traces, diffs)
|
|
86
|
+
|
|
87
|
+
If a required surface is unavailable, agents must follow the Escalation Protocol.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Tooling Surfaces
|
|
92
|
+
|
|
93
|
+
Many verification steps require tools that may not be available by default.
|
|
94
|
+
|
|
95
|
+
Tooling surfaces include:
|
|
96
|
+
|
|
97
|
+
- Required CLIs (cloud, DB, deployment, observability)
|
|
98
|
+
- Required MCP servers and their capabilities
|
|
99
|
+
- Required internal APIs (feature flags, auth, metrics, logs, CI)
|
|
100
|
+
- Required credentials and scopes for those tools
|
|
101
|
+
|
|
102
|
+
If required tooling is missing, misconfigured, blocked, undocumented, or inaccessible, agents must treat this as a verification blocker and escalate before proceeding.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Proof Artifacts Requirements
|
|
107
|
+
|
|
108
|
+
Every completed task must include proof artifacts stored in the PR description or linked output location.
|
|
109
|
+
|
|
110
|
+
Proof artifacts must be specific and re-checkable. A proof artifact should contain enough detail that another agent or human can reproduce the verification independently.
|
|
111
|
+
|
|
112
|
+
Acceptable proof includes:
|
|
113
|
+
- Automated session recordings and screenshots for UI work
|
|
114
|
+
- Request/response captures for API work
|
|
115
|
+
- Before/after query outputs for data work
|
|
116
|
+
- Metrics snapshots for performance and scaling work
|
|
117
|
+
- Log excerpts with correlation IDs for behavior validation
|
|
118
|
+
- Benchmark results with methodology for performance work
|
|
119
|
+
|
|
120
|
+
Statements like "works" or "should work" are not acceptable.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Self-Correction Loop
|
|
125
|
+
|
|
126
|
+
Verification is not a one-shot activity. Agents operate within a three-layer self-correction architecture that catches errors at increasing scope. Each layer is enforced automatically — agents do not need to invoke them manually.
|
|
127
|
+
|
|
128
|
+
### Layer 1 — Inline Correction
|
|
129
|
+
|
|
130
|
+
**Trigger:** Every file write or edit.
|
|
131
|
+
|
|
132
|
+
Hooks run formatting, structural analysis, and linting on the single file just written. Errors are reported immediately so the agent can fix them before writing more files. This prevents error accumulation across multiple files.
|
|
133
|
+
|
|
134
|
+
**Agent responsibility:** When a hook blocks, fix the reported errors in the same file before proceeding to other files. Do not accumulate errors.
|
|
135
|
+
|
|
136
|
+
### Layer 2 — Commit-Time Enforcement
|
|
137
|
+
|
|
138
|
+
**Trigger:** Every commit.
|
|
139
|
+
|
|
140
|
+
Checks run on staged files: linting, formatting, secret detection, commit message validation, and branch protection. This layer catches errors that span multiple files or involve staged-but-not-yet-checked changes.
|
|
141
|
+
|
|
142
|
+
Commit-time checks cannot be bypassed. Agents must discover what specific checks are enforced by reading the project's hook configuration.
|
|
143
|
+
|
|
144
|
+
### Layer 3 — Push-Time Enforcement
|
|
145
|
+
|
|
146
|
+
**Trigger:** Every push.
|
|
147
|
+
|
|
148
|
+
The full project quality gate runs: test suites with coverage thresholds, type checking, security audits, unused export detection, and integration tests. This is the last automated checkpoint before code reaches the remote.
|
|
149
|
+
|
|
150
|
+
**Handling failures:** When a push fails, read the error output to determine which check failed. Fix the root cause rather than working around it. Agents must discover what specific checks are enforced by reading the project's hook configuration.
|
|
151
|
+
|
|
152
|
+
### Regeneration Over Patching
|
|
153
|
+
|
|
154
|
+
When the root cause of errors is architectural (wrong abstraction, incorrect data flow, fundamentally broken approach), delete and regenerate rather than incrementally patching. Incremental patches on a broken foundation accumulate tech debt faster than the self-correction loop can catch it.
|
|
155
|
+
|
|
156
|
+
Signs that regeneration is needed:
|
|
157
|
+
- The same file has been edited 3+ times in the same loop without converging
|
|
158
|
+
- Fixing one error introduces another in the same file
|
|
159
|
+
- The fix requires disabling a lint rule or adding a type assertion
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Standard Workflow
|
|
164
|
+
|
|
165
|
+
Agents must follow this sequence unless explicitly instructed otherwise:
|
|
166
|
+
|
|
167
|
+
1. Restate goal in one sentence.
|
|
168
|
+
2. Identify the end user of the change.
|
|
169
|
+
3. Classify verification types that apply to the change.
|
|
170
|
+
4. Discover available tools for each verification type.
|
|
171
|
+
5. Confirm required surfaces are available, escalate if not.
|
|
172
|
+
6. Plan verification: state tool, command, and expected outcome for each type.
|
|
173
|
+
7. Implement the change.
|
|
174
|
+
8. Execute verification plan.
|
|
175
|
+
9. Collect proof artifacts.
|
|
176
|
+
10. Summarize what changed, what was verified, and remaining risk.
|
|
177
|
+
11. Label the result with a verification level.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Task Completion Rules
|
|
182
|
+
|
|
183
|
+
1. **Run the proof command** before marking any task complete
|
|
184
|
+
2. **Compare output** to expected result
|
|
185
|
+
3. **If verification fails**: Fix and re-run, don't mark complete
|
|
186
|
+
4. **If verification blocked** (missing tools, services, etc.): Mark as blocked, not complete
|
|
187
|
+
5. **Must not be dependent on CI/CD** if necessary, you may use local deploy methods found in the project manifest, but the verification methods must be listed in the pull request and therefore cannot be dependent on CI/CD completing
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Escalation Protocol
|
|
192
|
+
|
|
193
|
+
Agents must escalate when verification is blocked, ambiguous, or requires tools that are missing or inaccessible.
|
|
194
|
+
|
|
195
|
+
Common blockers:
|
|
196
|
+
|
|
197
|
+
- VPN required
|
|
198
|
+
- MFA, OTP, SMS codes
|
|
199
|
+
- Hardware token requirement
|
|
200
|
+
- Missing CLI, MCP server, or internal API required for verification
|
|
201
|
+
- Missing documentation on how to access required tooling
|
|
202
|
+
- Production-only access gates
|
|
203
|
+
- Compliance restrictions
|
|
204
|
+
|
|
205
|
+
When blocked, agents must do the following:
|
|
206
|
+
|
|
207
|
+
1. Identify the exact boundary preventing verification.
|
|
208
|
+
2. Identify which verification surfaces and tooling surfaces are missing.
|
|
209
|
+
3. Attempt safe fallback verification (local, staging, mocks) and label it clearly.
|
|
210
|
+
4. Declare verification level as PARTIALLY VERIFIED or UNVERIFIED.
|
|
211
|
+
5. Produce a Human Action Packet.
|
|
212
|
+
6. Pause until explicit human confirmation or tooling is provided.
|
|
213
|
+
|
|
214
|
+
Agents must never proceed past an unverified boundary without surfacing it to the human overseer.
|
|
215
|
+
|
|
216
|
+
### Human Action Packet Format
|
|
217
|
+
|
|
218
|
+
Agents must provide:
|
|
219
|
+
|
|
220
|
+
- What is blocked and why
|
|
221
|
+
- What tool or access is missing
|
|
222
|
+
- Exactly what the human must do
|
|
223
|
+
- How to confirm completion
|
|
224
|
+
- What the agent will do immediately after
|
|
225
|
+
- What artifacts the agent will produce after access is restored
|
|
226
|
+
|
|
227
|
+
Example:
|
|
228
|
+
|
|
229
|
+
- Blocked: Cannot reach DB, VPN required.
|
|
230
|
+
- Missing: Database client access to `db.host` and internal logs viewer.
|
|
231
|
+
- Human steps: Connect VPN "CorpVPN", confirm access by running connectivity check to `db.host`, provide credentials or endpoint.
|
|
232
|
+
- Confirmation: Reply "VPN ACTIVE" and "ACCESS READY".
|
|
233
|
+
- Next: Agent runs migration verification script and captures schema diff and query outputs.
|
|
234
|
+
|
|
235
|
+
Agents must pause until explicit human confirmation.
|
|
236
|
+
|
|
237
|
+
Agents must never bypass security controls to proceed.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Environments and Safety Rules
|
|
242
|
+
|
|
243
|
+
### Allowed Environments
|
|
244
|
+
|
|
245
|
+
- Local development
|
|
246
|
+
- Preview environments
|
|
247
|
+
- Staging
|
|
248
|
+
- Production read-only, only if explicitly approved and configured for safe access
|
|
249
|
+
|
|
250
|
+
### Prohibited Actions Without Human Approval
|
|
251
|
+
|
|
252
|
+
- Writing to production data stores
|
|
253
|
+
- Disabling MFA or security policies
|
|
254
|
+
- Modifying IAM roles or firewall rules beyond scoped change requests
|
|
255
|
+
- Running destructive migrations
|
|
256
|
+
- Triggering external billing or payment flows
|
|
257
|
+
|
|
258
|
+
If an operation is irreversible or risky, escalate first.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Artifact Storage and PR Requirements
|
|
263
|
+
|
|
264
|
+
Every PR must include:
|
|
265
|
+
|
|
266
|
+
- Goal summary
|
|
267
|
+
- Verification level
|
|
268
|
+
- Proof artifacts links or embedded outputs
|
|
269
|
+
- How to reproduce verification locally
|
|
270
|
+
- Known limitations and follow-up items
|
|
271
|
+
|
|
272
|
+
Preferred artifact locations:
|
|
273
|
+
|
|
274
|
+
- PR description
|
|
275
|
+
- Repo-local scripts under `scripts/verification/`
|
|
276
|
+
- CI artifacts linked from the build
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Definition of Done
|
|
281
|
+
|
|
282
|
+
A task is done only when:
|
|
283
|
+
|
|
284
|
+
- End user is identified
|
|
285
|
+
- All applicable verification types are classified and executed
|
|
286
|
+
- Verification lifecycle is completed (classify, check tooling, plan, execute, loop)
|
|
287
|
+
- Required verification surfaces and tooling surfaces are used or explicitly unavailable
|
|
288
|
+
- Proof artifacts are captured
|
|
289
|
+
- Verification level is declared
|
|
290
|
+
- Risks and gaps are documented
|
|
291
|
+
|
|
292
|
+
If any of these are missing, the work is not complete.
|