antigravity-ai-kit 2.1.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/README.md +4 -4
- package/.agent/agents/README.md +16 -12
- package/.agent/agents/architect.md +1 -0
- package/.agent/agents/backend-specialist.md +11 -0
- package/.agent/agents/code-reviewer.md +1 -0
- package/.agent/agents/database-architect.md +11 -0
- package/.agent/agents/devops-engineer.md +11 -0
- package/.agent/agents/e2e-runner.md +1 -0
- package/.agent/agents/explorer-agent.md +11 -0
- package/.agent/agents/frontend-specialist.md +11 -0
- package/.agent/agents/mobile-developer.md +11 -0
- package/.agent/agents/performance-optimizer.md +11 -0
- package/.agent/agents/planner.md +1 -0
- package/.agent/agents/refactor-cleaner.md +1 -0
- package/.agent/agents/reliability-engineer.md +11 -0
- package/.agent/agents/security-reviewer.md +1 -0
- package/.agent/agents/sprint-orchestrator.md +10 -0
- package/.agent/agents/tdd-guide.md +1 -0
- package/.agent/commands/code-review.md +1 -0
- package/.agent/commands/debug.md +1 -0
- package/.agent/commands/deploy.md +1 -0
- package/.agent/commands/help.md +252 -31
- package/.agent/commands/plan.md +1 -0
- package/.agent/commands/status.md +1 -0
- package/.agent/commands/tdd.md +1 -0
- package/.agent/contexts/brainstorm.md +26 -0
- package/.agent/contexts/debug.md +28 -0
- package/.agent/contexts/implement.md +29 -0
- package/.agent/contexts/review.md +27 -0
- package/.agent/contexts/ship.md +28 -0
- package/.agent/engine/identity.json +13 -0
- package/.agent/engine/loading-rules.json +23 -1
- package/.agent/engine/marketplace-index.json +29 -0
- package/.agent/engine/reliability-config.json +14 -0
- package/.agent/engine/sdlc-map.json +44 -0
- package/.agent/engine/workflow-state.json +28 -2
- package/.agent/hooks/hooks.json +27 -25
- package/.agent/manifest.json +12 -4
- package/.agent/rules.md +2 -1
- package/.agent/skills/README.md +10 -5
- package/.agent/skills/i18n-localization/SKILL.md +191 -0
- package/.agent/skills/mcp-integration/SKILL.md +224 -0
- package/.agent/skills/parallel-agents/SKILL.md +1 -1
- package/.agent/skills/shell-conventions/SKILL.md +92 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +557 -0
- package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.agent/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/.agent/templates/adr-template.md +32 -0
- package/.agent/templates/bug-report.md +37 -0
- package/.agent/templates/feature-request.md +32 -0
- package/.agent/workflows/README.md +92 -78
- package/.agent/workflows/brainstorm.md +154 -100
- package/.agent/workflows/create.md +142 -75
- package/.agent/workflows/debug.md +157 -98
- package/.agent/workflows/deploy.md +195 -144
- package/.agent/workflows/enhance.md +157 -65
- package/.agent/workflows/orchestrate.md +171 -114
- package/.agent/workflows/plan.md +147 -72
- package/.agent/workflows/preview.md +140 -83
- package/.agent/workflows/quality-gate.md +196 -0
- package/.agent/workflows/retrospective.md +197 -0
- package/.agent/workflows/review.md +188 -0
- package/.agent/workflows/status.md +142 -91
- package/.agent/workflows/test.md +168 -95
- package/.agent/workflows/ui-ux-pro-max.md +181 -127
- package/README.md +215 -78
- package/bin/ag-kit.js +344 -10
- package/lib/agent-registry.js +214 -0
- package/lib/agent-reputation.js +351 -0
- package/lib/cli-commands.js +235 -0
- package/lib/conflict-detector.js +245 -0
- package/lib/engineering-manager.js +354 -0
- package/lib/error-budget.js +294 -0
- package/lib/hook-system.js +252 -0
- package/lib/identity.js +245 -0
- package/lib/loading-engine.js +208 -0
- package/lib/marketplace.js +298 -0
- package/lib/plugin-system.js +604 -0
- package/lib/security-scanner.js +309 -0
- package/lib/self-healing.js +434 -0
- package/lib/session-manager.js +261 -0
- package/lib/skill-sandbox.js +244 -0
- package/lib/task-governance.js +523 -0
- package/lib/task-model.js +317 -0
- package/lib/updater.js +201 -0
- package/lib/verify.js +240 -0
- package/lib/workflow-engine.js +353 -0
- package/lib/workflow-persistence.js +160 -0
- package/package.json +7 -3
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Code review workflow. Sequential quality gate pipeline — lint, type-check, test, security scan, and build verification.
|
|
3
|
+
version: 2.1.0
|
|
4
|
+
sdlc-phase: verify
|
|
5
|
+
skills: [verification-loop]
|
|
6
|
+
commit-types: [fix, refactor]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /review — Code Review Quality Gate
|
|
10
|
+
|
|
11
|
+
> **Trigger**: `/review` (full) · `/review lint` · `/review tests` · `/review security` · `/review build`
|
|
12
|
+
> **Lifecycle**: After implementation, before `/retrospective`
|
|
13
|
+
|
|
14
|
+
> [!CAUTION]
|
|
15
|
+
> Sequential gate pipeline — each step must pass before proceeding. Failed gates block merge. No overrides.
|
|
16
|
+
|
|
17
|
+
> [!TIP]
|
|
18
|
+
> This workflow leverages the **verification-loop** skill. Read `.agent/skills/verification-loop/SKILL.md` for extended guidance.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Scope Filter
|
|
23
|
+
|
|
24
|
+
| Commit Type | Review Required? | Rationale |
|
|
25
|
+
| :---------- | :--------------- | :-------- |
|
|
26
|
+
| `feat()` | ✅ Full review | New functionality needs all gates |
|
|
27
|
+
| `fix()` | ✅ Full review | Bug fixes need regression verification |
|
|
28
|
+
| `refactor()` | ✅ Full review | Structural changes need quality validation |
|
|
29
|
+
| `test()` | ⚠️ Gate 3 only | Test-only changes need test verification |
|
|
30
|
+
| `docs()` | ❌ Skip | No testable code changes |
|
|
31
|
+
| `chore()` | ❌ Skip | Config/tooling, no code quality risk |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Critical Rules
|
|
36
|
+
|
|
37
|
+
1. **SEQUENTIAL** — each gate must pass before the next runs
|
|
38
|
+
2. **STOP ON FAILURE** — if a gate fails, stop immediately, show error + fix suggestion
|
|
39
|
+
3. **NO OVERRIDES** — failed gates block merge, no exceptions
|
|
40
|
+
4. **FULL-STACK** — all relevant stacks are scanned
|
|
41
|
+
5. **DOCUMENT** — log results for audit trail
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Argument Parsing
|
|
46
|
+
|
|
47
|
+
| Command | Gates Run |
|
|
48
|
+
| :----------------- | :------------------------ |
|
|
49
|
+
| `/review` | All gates (1-5) |
|
|
50
|
+
| `/review lint` | Gate 1 (Lint) |
|
|
51
|
+
| `/review types` | Gate 2 (Type Check) |
|
|
52
|
+
| `/review tests` | Gate 3 (Tests) |
|
|
53
|
+
| `/review security` | Gate 4 (Security Scan) |
|
|
54
|
+
| `/review build` | Gate 5 (Build) |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Pipeline Gates
|
|
59
|
+
|
|
60
|
+
Execute gates IN ORDER. Stop at first failure.
|
|
61
|
+
|
|
62
|
+
### Gate 1: Lint
|
|
63
|
+
|
|
64
|
+
// turbo
|
|
65
|
+
|
|
66
|
+
Run the project's lint tool:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Examples (adapt to your stack):
|
|
70
|
+
npm run lint # JavaScript/TypeScript
|
|
71
|
+
ruff check . # Python
|
|
72
|
+
cargo clippy # Rust
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Gate 2: Type Check
|
|
76
|
+
|
|
77
|
+
// turbo
|
|
78
|
+
|
|
79
|
+
Run the project's type checker:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Examples:
|
|
83
|
+
npx tsc --noEmit # TypeScript
|
|
84
|
+
mypy . # Python
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Gate 3: Tests
|
|
88
|
+
|
|
89
|
+
// turbo
|
|
90
|
+
|
|
91
|
+
Run the project's test suite:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Examples:
|
|
95
|
+
npm test # Node.js
|
|
96
|
+
pytest tests/ -q # Python
|
|
97
|
+
cargo test # Rust
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Gate 4: Security Scan
|
|
101
|
+
|
|
102
|
+
// turbo
|
|
103
|
+
|
|
104
|
+
Run dependency and vulnerability scanning:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Examples:
|
|
108
|
+
npm audit --audit-level=moderate # Node.js
|
|
109
|
+
pip-audit # Python
|
|
110
|
+
cargo audit # Rust
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Gate 5: Build Verification
|
|
114
|
+
|
|
115
|
+
// turbo
|
|
116
|
+
|
|
117
|
+
Verify the project builds successfully:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Examples:
|
|
121
|
+
npm run build # Node.js
|
|
122
|
+
python -m build # Python
|
|
123
|
+
cargo build --release # Rust
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Output Template
|
|
129
|
+
|
|
130
|
+
### ✅ All Gates Passed
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
## ✅ Review Complete
|
|
134
|
+
|
|
135
|
+
| Gate | Status | Duration |
|
|
136
|
+
| :------------ | :-------------------- | :------- |
|
|
137
|
+
| Lint | ✅ Pass | {time} |
|
|
138
|
+
| Type Check | ✅ Pass | {time} |
|
|
139
|
+
| Tests | ✅ Pass ({n}/{n}) | {time} |
|
|
140
|
+
| Security | ✅ No vulnerabilities | {time} |
|
|
141
|
+
| Build | ✅ Pass | {time} |
|
|
142
|
+
|
|
143
|
+
**Verdict**: Ready for commit.
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### ❌ Gate Failed
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
## ❌ Review Failed at Gate {N}
|
|
150
|
+
|
|
151
|
+
| Gate | Status |
|
|
152
|
+
| :----- | :-------- |
|
|
153
|
+
| {gate} | ❌ FAILED |
|
|
154
|
+
|
|
155
|
+
### Error Output
|
|
156
|
+
|
|
157
|
+
{error details}
|
|
158
|
+
|
|
159
|
+
### Recommended Fix
|
|
160
|
+
|
|
161
|
+
{fix steps}
|
|
162
|
+
|
|
163
|
+
Re-run: `/review` or `/review {gate}`
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Governance
|
|
169
|
+
|
|
170
|
+
**PROHIBITED:** Skipping gates · overriding failures · merging without all gates passing · ignoring security scan results
|
|
171
|
+
|
|
172
|
+
**REQUIRED:** Run all gates for merge-ready code · document results · fix failures before re-running
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Completion Criteria
|
|
177
|
+
|
|
178
|
+
- [ ] All applicable gates executed in sequence
|
|
179
|
+
- [ ] Zero failures across all gates
|
|
180
|
+
- [ ] Results documented with pass/fail + duration
|
|
181
|
+
- [ ] Verdict rendered: "Ready for commit" or "Failed at Gate N"
|
|
182
|
+
|
|
183
|
+
## Related Resources
|
|
184
|
+
|
|
185
|
+
- **Previous**: `/test` (tests must pass before review)
|
|
186
|
+
- **Next**: `/deploy` (deployment after all gates pass)
|
|
187
|
+
- **Skill**: `.agent/skills/verification-loop/SKILL.md`
|
|
188
|
+
- **Related**: `/quality-gate` (pre-task research) · `/retrospective` (sprint-level audit)
|
|
@@ -1,91 +1,142 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Display project and progress status. Current state overview.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Display project and progress status. Current state overview.
|
|
3
|
+
version: 2.1.0
|
|
4
|
+
sdlc-phase: cross-cutting
|
|
5
|
+
skills: [verification-loop]
|
|
6
|
+
commit-types: [chore]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /status — Project Status Overview
|
|
10
|
+
|
|
11
|
+
> **Trigger**: `/status [sub-command]`
|
|
12
|
+
> **Lifecycle**: Cross-cutting — any SDLC phase
|
|
13
|
+
|
|
14
|
+
> [!NOTE]
|
|
15
|
+
> This is a read-only, informational workflow. It gathers and displays data without modifying anything.
|
|
16
|
+
|
|
17
|
+
> [!TIP]
|
|
18
|
+
> Skill reference: `.agent/skills/verification-loop/SKILL.md` — health checks and continuous quality gates
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Critical Rules
|
|
23
|
+
|
|
24
|
+
1. **Accurate data** — all reported information must reflect the current state, not cached data
|
|
25
|
+
2. **No stale info** — read live data from git, filesystem, and project config
|
|
26
|
+
3. **Health checks** — always include build and test health indicators
|
|
27
|
+
4. **Non-destructive** — this workflow must never modify any files or state
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Argument Parsing
|
|
32
|
+
|
|
33
|
+
| Command | Action |
|
|
34
|
+
| :----------------- | :------------------------------------------ |
|
|
35
|
+
| `/status` | Full status report (all sections) |
|
|
36
|
+
| `/status brief` | Condensed one-line summary |
|
|
37
|
+
| `/status health` | Health checks only (build, tests, server) |
|
|
38
|
+
| `/status git` | Git status only (branch, changes, commits) |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Steps
|
|
43
|
+
|
|
44
|
+
// turbo
|
|
45
|
+
1. **Project Detection**
|
|
46
|
+
- Detect project name, path, and type from config files
|
|
47
|
+
- Identify the tech stack (framework, language, database, etc.)
|
|
48
|
+
|
|
49
|
+
// turbo
|
|
50
|
+
2. **Git Status**
|
|
51
|
+
- Current branch and last commit
|
|
52
|
+
- Uncommitted changes (staged, unstaged, untracked)
|
|
53
|
+
- Branch ahead/behind status
|
|
54
|
+
|
|
55
|
+
// turbo
|
|
56
|
+
3. **Progress Tracking**
|
|
57
|
+
- Read ROADMAP or task files for sprint/task status
|
|
58
|
+
- Count completed, in-progress, and pending items
|
|
59
|
+
- Identify blockers if any
|
|
60
|
+
|
|
61
|
+
// turbo
|
|
62
|
+
4. **Health Check**
|
|
63
|
+
- Build status (can the project compile/build?)
|
|
64
|
+
- Test status (are tests passing?)
|
|
65
|
+
- Server status (is the dev server running?)
|
|
66
|
+
|
|
67
|
+
// turbo
|
|
68
|
+
5. **File Statistics**
|
|
69
|
+
- Files created and modified (from git)
|
|
70
|
+
- Recent changes summary
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Output Template
|
|
75
|
+
|
|
76
|
+
```markdown
|
|
77
|
+
## 📊 Project Status
|
|
78
|
+
|
|
79
|
+
### Project
|
|
80
|
+
|
|
81
|
+
- **Name**: [project name]
|
|
82
|
+
- **Path**: [project path]
|
|
83
|
+
- **Stack**: [language] + [framework] + [database]
|
|
84
|
+
|
|
85
|
+
### Git
|
|
86
|
+
|
|
87
|
+
- **Branch**: [branch name]
|
|
88
|
+
- **Last Commit**: [hash] — [message]
|
|
89
|
+
- **Changes**: [N] staged · [N] unstaged · [N] untracked
|
|
90
|
+
|
|
91
|
+
### Progress
|
|
92
|
+
|
|
93
|
+
✅ Completed ([N]): [list]
|
|
94
|
+
🔄 In Progress ([N]): [list]
|
|
95
|
+
⏳ Pending ([N]): [list]
|
|
96
|
+
|
|
97
|
+
### Health
|
|
98
|
+
|
|
99
|
+
| Check | Status |
|
|
100
|
+
| :---- | :----- |
|
|
101
|
+
| Build | ✅ Passing / ❌ Failing |
|
|
102
|
+
| Tests | ✅ [N]/[N] passing / ❌ [N] failures |
|
|
103
|
+
| Server | 🟢 Running / ⚪ Stopped |
|
|
104
|
+
|
|
105
|
+
### Statistics
|
|
106
|
+
|
|
107
|
+
- Files created: [N]
|
|
108
|
+
- Files modified: [N]
|
|
109
|
+
- Test coverage: [N]%
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Governance
|
|
115
|
+
|
|
116
|
+
**PROHIBITED:**
|
|
117
|
+
- Modifying files, state, or configuration
|
|
118
|
+
- Reporting stale or cached data
|
|
119
|
+
- Skipping health checks
|
|
120
|
+
- Skipping failed steps · proceeding without resolution
|
|
121
|
+
|
|
122
|
+
**REQUIRED:**
|
|
123
|
+
- Live data from git, filesystem, and project config
|
|
124
|
+
- Health check in every full status report
|
|
125
|
+
- Accurate progress tracking from project files
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Completion Criteria
|
|
130
|
+
|
|
131
|
+
- [ ] Project info is detected and displayed
|
|
132
|
+
- [ ] Git status is current and accurate
|
|
133
|
+
- [ ] Progress tracking reflects actual state
|
|
134
|
+
- [ ] Health checks are performed and reported
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Related Resources
|
|
139
|
+
|
|
140
|
+
- **Previous**: `/deploy` (post-deployment monitoring)
|
|
141
|
+
- **Cross-cutting**: Available at any SDLC phase
|
|
142
|
+
- **Related**: `/retrospective` (sprint-level status review)
|
package/.agent/workflows/test.md
CHANGED
|
@@ -1,95 +1,168 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Write and run tests systematically
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
/
|
|
93
|
-
/
|
|
94
|
-
/test
|
|
95
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Write and run tests systematically.
|
|
3
|
+
version: 2.1.0
|
|
4
|
+
sdlc-phase: verify
|
|
5
|
+
skills: [testing-patterns, webapp-testing]
|
|
6
|
+
commit-types: [test]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /test — Systematic Test Writing & Execution
|
|
10
|
+
|
|
11
|
+
> **Trigger**: `/test [scope]`
|
|
12
|
+
> **Lifecycle**: Verify — after implementation, before `/review`
|
|
13
|
+
|
|
14
|
+
> [!IMPORTANT]
|
|
15
|
+
> Tests are the primary quality gate. All new code must have test coverage. Never skip failing tests — fix the code or fix the test.
|
|
16
|
+
|
|
17
|
+
> [!TIP]
|
|
18
|
+
> This workflow leverages the **testing-patterns** and **webapp-testing** skills. Read `.agent/skills/testing-patterns/SKILL.md` and `.agent/skills/webapp-testing/SKILL.md` for extended guidance.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Critical Rules
|
|
23
|
+
|
|
24
|
+
1. **AAA pattern** — all tests must follow Arrange-Act-Assert
|
|
25
|
+
2. **Coverage ≥80%** — target minimum 80% code coverage on new code
|
|
26
|
+
3. **No skipping** — `skip`, `xit`, `xdescribe` are prohibited in committed code
|
|
27
|
+
4. **Descriptive names** — test names must describe expected behavior: "should [behavior] when [condition]"
|
|
28
|
+
5. **Edge cases** — always test boundary conditions, null/undefined, and error paths
|
|
29
|
+
6. **Stack-agnostic** — detect the project stack and use the appropriate test framework
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Scope Filter
|
|
34
|
+
|
|
35
|
+
| Commit Type | Run Tests? | Rationale |
|
|
36
|
+
| :---------- | :--------- | :-------- |
|
|
37
|
+
| `feat()` | ✅ Yes | New functionality needs coverage |
|
|
38
|
+
| `fix()` | ✅ Yes | Bug fixes need regression tests |
|
|
39
|
+
| `refactor()` | ✅ Yes | Refactors must prove no regressions |
|
|
40
|
+
| `test()` | ✅ Yes | Test changes need validation |
|
|
41
|
+
| `docs()` | ❌ Skip | No testable code changes |
|
|
42
|
+
| `chore()` | ❌ Skip | Config/tooling, no testable code |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Steps
|
|
47
|
+
|
|
48
|
+
// turbo
|
|
49
|
+
1. **Identify Test Scope**
|
|
50
|
+
- What needs to be tested? (specific file, module, or feature)
|
|
51
|
+
- What type of tests? (unit, integration, E2E)
|
|
52
|
+
- What are the critical paths and edge cases?
|
|
53
|
+
|
|
54
|
+
// turbo
|
|
55
|
+
2. **Detect Test Framework**
|
|
56
|
+
- Scan for test config: `jest.config.*`, `vitest.config.*`, `pytest.ini`, `pyproject.toml`, `Cargo.toml`
|
|
57
|
+
- Determine the test runner and assertion library
|
|
58
|
+
- Identify coverage tool
|
|
59
|
+
|
|
60
|
+
// turbo
|
|
61
|
+
3. **Analyze Existing Coverage**
|
|
62
|
+
- Run coverage report
|
|
63
|
+
- Identify untested code paths
|
|
64
|
+
- Prioritize critical functionality and edge cases
|
|
65
|
+
|
|
66
|
+
4. **Write Tests**
|
|
67
|
+
- Follow AAA pattern (Arrange-Act-Assert)
|
|
68
|
+
- Use descriptive test names
|
|
69
|
+
- Cover happy paths, edge cases, and error scenarios
|
|
70
|
+
- Mock external dependencies appropriately
|
|
71
|
+
|
|
72
|
+
// turbo
|
|
73
|
+
5. **Run Tests**
|
|
74
|
+
- Execute the full test suite
|
|
75
|
+
- Verify all tests pass
|
|
76
|
+
- Check coverage meets ≥80% threshold
|
|
77
|
+
|
|
78
|
+
// turbo
|
|
79
|
+
6. **Review Results**
|
|
80
|
+
- All tests passing?
|
|
81
|
+
- Coverage targets met?
|
|
82
|
+
- Edge cases covered?
|
|
83
|
+
- Any flaky tests identified?
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Multi-Stack Test Commands
|
|
88
|
+
|
|
89
|
+
| Stack | Test Command | Coverage Command |
|
|
90
|
+
| :------------ | :----------------------- | :------------------------------- |
|
|
91
|
+
| Node.js/Jest | `npm test` | `npm run test:coverage` |
|
|
92
|
+
| Node.js/Vitest | `npx vitest` | `npx vitest --coverage` |
|
|
93
|
+
| Python/pytest | `pytest` | `pytest --cov` |
|
|
94
|
+
| Rust/Cargo | `cargo test` | `cargo tarpaulin` |
|
|
95
|
+
| Go | `go test ./...` | `go test -coverprofile=cover.out` |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Output Template
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
## 🧪 Test Results: [Scope]
|
|
103
|
+
|
|
104
|
+
### Framework
|
|
105
|
+
|
|
106
|
+
- **Runner**: [jest | vitest | pytest | cargo test]
|
|
107
|
+
- **Coverage Tool**: [tool]
|
|
108
|
+
|
|
109
|
+
### Results
|
|
110
|
+
|
|
111
|
+
| Metric | Value |
|
|
112
|
+
| :--------- | :--------- |
|
|
113
|
+
| Total | [N] tests |
|
|
114
|
+
| Passing | ✅ [N] |
|
|
115
|
+
| Failing | ❌ [N] |
|
|
116
|
+
| Skipped | ⚠️ [N] |
|
|
117
|
+
| Coverage | [N]% |
|
|
118
|
+
|
|
119
|
+
### Tests Written
|
|
120
|
+
|
|
121
|
+
| Test File | Tests | Status |
|
|
122
|
+
| :-------- | :---- | :----- |
|
|
123
|
+
| `path/to/test` | [N] | ✅ All passing |
|
|
124
|
+
|
|
125
|
+
### Coverage Gaps (if any)
|
|
126
|
+
|
|
127
|
+
- [ ] [Untested function/module]
|
|
128
|
+
|
|
129
|
+
After testing: proceed to `/review` for quality gates.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Governance
|
|
135
|
+
|
|
136
|
+
**PROHIBITED:**
|
|
137
|
+
- Committing code with `skip`, `xit`, or `xdescribe` annotations
|
|
138
|
+
- Submitting code below 80% coverage without explicit justification
|
|
139
|
+
- Testing only happy paths — edge cases are mandatory
|
|
140
|
+
- Skipping failed steps · proceeding without resolution
|
|
141
|
+
|
|
142
|
+
**REQUIRED:**
|
|
143
|
+
- AAA pattern for all tests
|
|
144
|
+
- Coverage report generation and review
|
|
145
|
+
- Descriptive test names following "should [behavior] when [condition]"
|
|
146
|
+
- Stack-appropriate test framework usage
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Completion Criteria
|
|
151
|
+
|
|
152
|
+
- [ ] Test scope is identified
|
|
153
|
+
- [ ] Test framework is detected for the project stack
|
|
154
|
+
- [ ] Tests are written following AAA pattern
|
|
155
|
+
- [ ] All tests are passing
|
|
156
|
+
- [ ] Coverage is ≥80% on new code
|
|
157
|
+
- [ ] Edge cases and error paths are covered
|
|
158
|
+
- [ ] No skipped tests in committed code
|
|
159
|
+
- [ ] After testing: proceed to `/review` for quality gates
|
|
160
|
+
- [ ] Note: if `/test` ran immediately before `/review` with no code changes, `/review` Gate 3 may use cached results
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Related Resources
|
|
165
|
+
|
|
166
|
+
- **Previous**: `/create` (test new code) · `/enhance` (test changes) · `/debug` (regression check after fix)
|
|
167
|
+
- **Next**: `/review` (quality gate pipeline)
|
|
168
|
+
- **Skills**: `.agent/skills/testing-patterns/SKILL.md` · `.agent/skills/webapp-testing/SKILL.md`
|