supipowers 1.2.6 → 1.5.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/README.md +118 -56
- package/bin/install.ts +48 -128
- package/package.json +11 -3
- package/skills/code-review/SKILL.md +137 -40
- package/skills/context-mode/SKILL.md +67 -56
- package/skills/creating-supi-agents/SKILL.md +204 -0
- package/skills/debugging/SKILL.md +86 -40
- package/skills/fix-pr/SKILL.md +96 -65
- package/skills/planning/SKILL.md +103 -46
- package/skills/qa-strategy/SKILL.md +68 -46
- package/skills/receiving-code-review/SKILL.md +60 -53
- package/skills/release/SKILL.md +111 -39
- package/skills/tdd/SKILL.md +118 -67
- package/skills/verification/SKILL.md +71 -37
- package/src/bootstrap.ts +27 -5
- package/src/commands/agents.ts +249 -0
- package/src/commands/ai-review.ts +1113 -0
- package/src/commands/config.ts +224 -95
- package/src/commands/doctor.ts +19 -13
- package/src/commands/fix-pr.ts +8 -11
- package/src/commands/generate.ts +200 -0
- package/src/commands/model-picker.ts +5 -15
- package/src/commands/model.ts +4 -5
- package/src/commands/optimize-context.ts +202 -0
- package/src/commands/plan.ts +148 -92
- package/src/commands/qa.ts +14 -23
- package/src/commands/release.ts +504 -275
- package/src/commands/review.ts +643 -86
- package/src/commands/status.ts +44 -17
- package/src/commands/supi.ts +69 -41
- package/src/commands/update.ts +57 -2
- package/src/config/defaults.ts +6 -39
- package/src/config/loader.ts +388 -40
- package/src/config/model-resolver.ts +26 -22
- package/src/config/schema.ts +113 -48
- package/src/context/analyzer.ts +61 -2
- package/src/context/optimizer.ts +199 -0
- package/src/context-mode/compressor.ts +14 -11
- package/src/context-mode/detector.ts +16 -54
- package/src/context-mode/event-extractor.ts +45 -16
- package/src/context-mode/event-store.ts +225 -16
- package/src/context-mode/hooks.ts +195 -22
- package/src/context-mode/knowledge/chunker.ts +235 -0
- package/src/context-mode/knowledge/store.ts +187 -0
- package/src/context-mode/routing.ts +12 -23
- package/src/context-mode/sandbox/executor.ts +183 -0
- package/src/context-mode/sandbox/runners.ts +40 -0
- package/src/context-mode/snapshot-builder.ts +243 -7
- package/src/context-mode/tools.ts +440 -0
- package/src/context-mode/web/fetcher.ts +117 -0
- package/src/context-mode/web/html-to-md.ts +293 -0
- package/src/debug/logger.ts +107 -0
- package/src/deps/registry.ts +0 -20
- package/src/docs/drift.ts +454 -0
- package/src/fix-pr/fetch-comments.ts +66 -0
- package/src/git/commit-msg.ts +2 -1
- package/src/git/commit.ts +123 -141
- package/src/git/conventions.ts +2 -2
- package/src/git/status.ts +4 -1
- package/src/lsp/bridge.ts +138 -12
- package/src/planning/approval-flow.ts +125 -19
- package/src/planning/plan-writer-prompt.ts +4 -11
- package/src/planning/planning-ask-tool.ts +81 -0
- package/src/planning/prompt-builder.ts +9 -169
- package/src/planning/system-prompt.ts +290 -0
- package/src/platform/omp.ts +50 -4
- package/src/platform/progress.ts +182 -0
- package/src/platform/test-utils.ts +4 -1
- package/src/platform/tui-colors.ts +30 -0
- package/src/platform/types.ts +1 -0
- package/src/qa/detect-app-type.ts +102 -0
- package/src/qa/discover-routes.ts +353 -0
- package/src/quality/ai-session.ts +96 -0
- package/src/quality/ai-setup.ts +86 -0
- package/src/quality/gates/ai-review.ts +129 -0
- package/src/quality/gates/build.ts +8 -0
- package/src/quality/gates/command.ts +150 -0
- package/src/quality/gates/format.ts +28 -0
- package/src/quality/gates/lint.ts +22 -0
- package/src/quality/gates/lsp-diagnostics.ts +84 -0
- package/src/quality/gates/test-suite.ts +8 -0
- package/src/quality/gates/typecheck.ts +22 -0
- package/src/quality/registry.ts +25 -0
- package/src/quality/review-gates.ts +33 -0
- package/src/quality/runner.ts +268 -0
- package/src/quality/schemas.ts +48 -0
- package/src/quality/setup.ts +227 -0
- package/src/release/changelog.ts +7 -3
- package/src/release/channels/custom.ts +43 -0
- package/src/release/channels/gitea.ts +35 -0
- package/src/release/channels/github.ts +35 -0
- package/src/release/channels/gitlab.ts +35 -0
- package/src/release/channels/registry.ts +52 -0
- package/src/release/channels/types.ts +27 -0
- package/src/release/detector.ts +10 -63
- package/src/release/executor.ts +61 -51
- package/src/release/prompt.ts +38 -38
- package/src/release/version.ts +129 -10
- package/src/review/agent-loader.ts +331 -0
- package/src/review/consolidator.ts +180 -0
- package/src/review/default-agents/correctness.md +72 -0
- package/src/review/default-agents/maintainability.md +64 -0
- package/src/review/default-agents/security.md +67 -0
- package/src/review/fixer.ts +219 -0
- package/src/review/multi-agent-runner.ts +135 -0
- package/src/review/output.ts +147 -0
- package/src/review/prompts/agent-review-wrapper.md +36 -0
- package/src/review/prompts/fix-findings.md +32 -0
- package/src/review/prompts/fix-output-schema.md +18 -0
- package/src/review/prompts/invalid-output-retry.md +22 -0
- package/src/review/prompts/output-instructions.md +14 -0
- package/src/review/prompts/review-output-schema.md +38 -0
- package/src/review/prompts/single-review.md +53 -0
- package/src/review/prompts/validation-review.md +30 -0
- package/src/review/runner.ts +128 -0
- package/src/review/scope.ts +353 -0
- package/src/review/template.ts +15 -0
- package/src/review/types.ts +296 -0
- package/src/review/validator.ts +160 -0
- package/src/storage/plans.ts +5 -3
- package/src/storage/reports.ts +50 -7
- package/src/storage/review-sessions.ts +117 -0
- package/src/text.ts +19 -0
- package/src/types.ts +336 -26
- package/src/utils/paths.ts +39 -0
- package/src/visual/companion.ts +5 -3
- package/src/visual/start-server.ts +101 -0
- package/src/visual/stop-server.ts +39 -0
- package/bin/ctx-mode-wrapper.mjs +0 -66
- package/src/config/profiles.ts +0 -64
- package/src/context-mode/installer.ts +0 -38
- package/src/quality/ai-review-gate.ts +0 -43
- package/src/quality/gate-runner.ts +0 -67
- package/src/quality/lsp-gate.ts +0 -24
- package/src/quality/test-gate.ts +0 -39
- package/src/visual/scripts/start-server.sh +0 -98
- package/src/visual/scripts/stop-server.sh +0 -21
package/skills/fix-pr/SKILL.md
CHANGED
|
@@ -5,95 +5,126 @@ description: Critically assess PR review comments — verify, investigate ripple
|
|
|
5
5
|
|
|
6
6
|
# PR Review Comment Assessment
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Critically assess each PR review comment — verify the concern, investigate ripple effects, then accept with a fix or reject with evidence.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
Assess each one critically before acting. The reviewer may lack context you have.
|
|
10
|
+
## Quick Reference
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
| Aspect | Detail |
|
|
13
|
+
|-------------|--------|
|
|
14
|
+
| **Trigger** | Invoked on a PR with review comments to address |
|
|
15
|
+
| **Input** | PR number/URL, diff, review comments, full repo access |
|
|
16
|
+
| **Output** | Per-comment decision record, grouped fix plan, reply text per comment |
|
|
17
|
+
| **Scope** | Only comments on the current PR; do not refactor beyond what comments require |
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
## Assessment Framework
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
2. **Is this important?** Bug fix vs style preference vs premature optimization.
|
|
19
|
-
3. **What breaks if we change this?** Trace callers, check tests, find ripple effects.
|
|
20
|
-
4. **Does the reviewer have full context?** They often review diffs, not the full picture.
|
|
21
|
-
5. **Is this YAGNI?** "You should also handle X" — but does X actually occur?
|
|
21
|
+
For each comment, answer:
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
1. **Valid?** Read the actual code (not just the diff). Does the concern apply?
|
|
24
|
+
2. **Severity?** Bug > correctness > consistency > style. Style-only comments are low priority.
|
|
25
|
+
3. **What breaks if changed?** Trace callers, check tests, find ripple effects.
|
|
26
|
+
4. **Full context?** Reviewers see diffs, not full files. They may miss structural reasons.
|
|
27
|
+
5. **YAGNI?** "You should also handle X" — does X actually occur in this codebase?
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
- **REJECT**: Invalid, unnecessary, or would cause harm. Evidence: why this doesn't apply.
|
|
27
|
-
- **INVESTIGATE**: Need to check more before deciding. List what to check.
|
|
29
|
+
### Verdicts
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
- **ACCEPT** — Valid concern, will fix. Evidence: the code has the described problem.
|
|
32
|
+
- **REJECT** — Invalid, unnecessary, or harmful to change. Evidence: why it doesn't apply.
|
|
33
|
+
- **INVESTIGATE** — Need more information. List exactly what to check.
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
1. Read the file(s) mentioned in full (not just the diff)
|
|
33
|
-
2. Search for usages of the symbol/pattern being discussed
|
|
34
|
-
3. Check test coverage for the area
|
|
35
|
-
4. Look at git blame — why is the code written this way?
|
|
36
|
-
5. Then decide ACCEPT or REJECT with evidence
|
|
35
|
+
## Investigation & Ripple Effect
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
When a comment is non-obvious or touches shared code:
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
1. Read the full file(s) — not just the diff context
|
|
40
|
+
2. Search for usages of the symbol/pattern under discussion
|
|
41
|
+
3. Check test coverage — does a test assert the current behavior?
|
|
42
|
+
4. Follow the dependency graph: who calls this? who imports this? is it a public API?
|
|
43
|
+
5. Check git blame — why is the code written this way?
|
|
44
|
+
6. If ripple effects are significant, include them in the fix plan
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Then decide ACCEPT or REJECT with evidence. INVESTIGATE is not a final state.
|
|
47
47
|
|
|
48
48
|
## Grouping Strategy
|
|
49
49
|
|
|
50
|
-
Group
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
| Group together | Keep separate |
|
|
51
|
+
|---|---|
|
|
52
|
+
| Same file | Unrelated files/areas |
|
|
53
|
+
| Coupled files (caller/callee, type/impl) | Cosmetic vs functional changes |
|
|
54
|
+
| Same logical concern | Independent features |
|
|
55
|
+
|
|
56
|
+
Address grouped comments in a single commit with a bullet list of changes.
|
|
57
|
+
|
|
58
|
+
## Output Template
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
- Comments on unrelated files/areas
|
|
57
|
-
- Cosmetic vs functional changes
|
|
58
|
-
- Independent features or concerns
|
|
60
|
+
For each comment, produce:
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
```
|
|
63
|
+
Comment: #ID by @reviewer on file:line
|
|
64
|
+
Verdict: ACCEPT | REJECT
|
|
65
|
+
Reasoning: [1-2 sentences with evidence]
|
|
66
|
+
Ripple effects: [list or "none"]
|
|
67
|
+
Group: [group-id or "standalone"]
|
|
68
|
+
```
|
|
61
69
|
|
|
62
|
-
###
|
|
63
|
-
- "Fixed. [description of change]."
|
|
64
|
-
- "Fixed in [file]. Also updated [related file] to maintain consistency."
|
|
70
|
+
### Reply Format
|
|
65
71
|
|
|
66
|
-
|
|
67
|
-
- "Investigated — [reason this doesn't apply]. The current implementation [explanation]."
|
|
68
|
-
- "This is intentional: [reason]. Changing it would [consequence]."
|
|
72
|
+
**ACCEPT:** "Fixed. [description of change]." or "Fixed in [file]. Also updated [related file] for consistency."
|
|
69
73
|
|
|
70
|
-
|
|
71
|
-
- "Addressed these comments together in [commit]. Changes: [bullet list]."
|
|
74
|
+
**REJECT:** "Investigated — [reason this doesn't apply]. The current implementation [explanation]." or "This is intentional: [reason]. Changing it would [consequence]."
|
|
72
75
|
|
|
73
|
-
**
|
|
74
|
-
Technical acknowledgment only.
|
|
76
|
+
**Grouped:** "Addressed these comments together in [commit]. Changes: [bullet list]."
|
|
75
77
|
|
|
76
|
-
##
|
|
78
|
+
## Worked Example
|
|
77
79
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| Suggesting abstraction for code used once | YAGNI — one usage doesn't need a helper |
|
|
81
|
-
| Requesting error handling for impossible states | Trust internal code; only validate at boundaries |
|
|
82
|
-
| Style preferences disguised as correctness | If it works and is readable, style is preference |
|
|
83
|
-
| Suggesting patterns from a different language | Follow THIS codebase's patterns |
|
|
84
|
-
| Not seeing the full file (diff-only context) | They may miss why code is structured this way |
|
|
85
|
-
| "This could be a security issue" without specifics | Ask for the specific attack vector |
|
|
86
|
-
| "Add tests for X" when X is already tested | Check before accepting |
|
|
80
|
+
> **Review comment** by @alice on `src/config.ts:42`:
|
|
81
|
+
> "This should validate the input before passing it to `loadConfig`. What if `path` is undefined?"
|
|
87
82
|
|
|
88
|
-
|
|
83
|
+
**Investigation:**
|
|
84
|
+
1. Read `src/config.ts` — `loadConfig` is only called from `cli/init.ts` which already validates all args via Zod schema.
|
|
85
|
+
2. `grep` for other callers — none. Single call site.
|
|
86
|
+
3. `path` is typed `string` (non-optional) in the function signature; TypeScript enforces this at compile time.
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
**Decision:**
|
|
91
89
|
```
|
|
92
|
-
Comment #
|
|
93
|
-
Verdict:
|
|
94
|
-
Reasoning:
|
|
95
|
-
Ripple effects:
|
|
96
|
-
Group:
|
|
90
|
+
Comment: #12 by @alice on src/config.ts:42
|
|
91
|
+
Verdict: REJECT
|
|
92
|
+
Reasoning: `path` is typed as required `string` and the sole caller validates via Zod before invocation. Adding a runtime check duplicates the type system and the caller's validation.
|
|
93
|
+
Ripple effects: none
|
|
94
|
+
Group: standalone
|
|
97
95
|
```
|
|
98
96
|
|
|
99
|
-
|
|
97
|
+
**Reply:** "Investigated — `path` is a required `string` param and the only caller (`cli/init.ts:18`) validates all args through a Zod schema before this point. Adding a runtime check would duplicate both the type constraint and the caller's validation."
|
|
98
|
+
|
|
99
|
+
## Common Reviewer Mistakes
|
|
100
|
+
|
|
101
|
+
| Pattern | Response |
|
|
102
|
+
|---------|----------|
|
|
103
|
+
| Abstraction for code used once | YAGNI — one usage doesn't need a helper |
|
|
104
|
+
| Error handling for impossible states | Only validate at system boundaries |
|
|
105
|
+
| Style preference framed as correctness | If it works and is readable, style is preference |
|
|
106
|
+
| Patterns from a different language/codebase | Follow THIS codebase's conventions |
|
|
107
|
+
| "Security issue" without a specific vector | Ask for the specific attack scenario |
|
|
108
|
+
| "Add tests for X" when X is already tested | Verify coverage before accepting |
|
|
109
|
+
| Diff-only context (missing full file) | They may miss structural reasons for the code |
|
|
110
|
+
|
|
111
|
+
## MUST DO / MUST NOT DO
|
|
112
|
+
|
|
113
|
+
| MUST DO | MUST NOT DO |
|
|
114
|
+
|---------|-------------|
|
|
115
|
+
| Read full file before deciding on a comment | Accept comments without verifying the concern |
|
|
116
|
+
| Provide evidence for every ACCEPT and REJECT | Use performative agreement ("Great catch!", "You're right!") |
|
|
117
|
+
| Check ripple effects before accepting changes | Fix cosmetic comments before functional ones |
|
|
118
|
+
| Search for existing patterns before introducing new ones | Assume the reviewer has full context |
|
|
119
|
+
| Resolve every INVESTIGATE to ACCEPT or REJECT | Leave comments unaddressed |
|
|
120
|
+
|
|
121
|
+
## Final Checklist
|
|
122
|
+
|
|
123
|
+
Before submitting:
|
|
124
|
+
|
|
125
|
+
- [ ] Every comment has a verdict (ACCEPT or REJECT) with evidence
|
|
126
|
+
- [ ] No INVESTIGATE verdicts remain unresolved
|
|
127
|
+
- [ ] Ripple effects checked for every ACCEPT
|
|
128
|
+
- [ ] Related comments grouped; each group addressed in one commit
|
|
129
|
+
- [ ] Reply text is technical — no performative agreement
|
|
130
|
+
- [ ] Fix plan covers all ACCEPT verdicts, including ripple effects
|
package/skills/planning/SKILL.md
CHANGED
|
@@ -5,15 +5,24 @@ description: Guides collaborative brainstorming, design, and planning — from i
|
|
|
5
5
|
|
|
6
6
|
# Planning Skill
|
|
7
7
|
|
|
8
|
-
Guide the user through a complete planning flow: brainstorm → design → spec → review → plan.
|
|
8
|
+
Guide the user through a complete planning flow: brainstorm → design → spec → review → plan. Loaded by `/supi:plan`.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
You **MUST NOT** write code or scaffold until the user approves the design.
|
|
11
|
+
|
|
12
|
+
## Quick Reference
|
|
13
|
+
|
|
14
|
+
| Aspect | Detail |
|
|
15
|
+
|--------|--------|
|
|
16
|
+
| Scope | Single feature or decomposed sub-project |
|
|
17
|
+
| Input | User's initial request + repo state (files, docs, commits) |
|
|
18
|
+
| Output | Design doc at `.omp/supipowers/specs/YYYY-MM-DD-<topic>-design.md`, implementation plan |
|
|
19
|
+
| Phases | Explore → Clarify → Brainstorm → Design & Save → Review Loop → User Gate → Plan |
|
|
20
|
+
| Task size | 2–5 minutes each, checkbox syntax |
|
|
21
|
+
| Specs | Local only — never commit to git |
|
|
13
22
|
|
|
14
23
|
## Process
|
|
15
24
|
|
|
16
|
-
Follow
|
|
25
|
+
Follow phases in order. Do not skip or combine them.
|
|
17
26
|
|
|
18
27
|
### Phase 1: Explore Project Context
|
|
19
28
|
|
|
@@ -21,67 +30,102 @@ Before asking questions, understand the current state:
|
|
|
21
30
|
|
|
22
31
|
- Check files, docs, recent commits
|
|
23
32
|
- Understand existing architecture and patterns
|
|
24
|
-
- If the request covers multiple independent subsystems, flag it
|
|
33
|
+
- If the request covers multiple independent subsystems, flag it and help decompose into sub-projects
|
|
25
34
|
|
|
26
35
|
### Phase 2: Ask Clarifying Questions
|
|
27
36
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
37
|
+
Determine the planning mode: problem exploration, solution ideation, assumption testing, or strategy exploration.
|
|
38
|
+
|
|
39
|
+
- One question at a time — never batch multiple questions
|
|
40
|
+
- Prefer multiple choice when possible; open-ended is fine too
|
|
41
|
+
- Focus on: purpose, constraints, success criteria, non-goals
|
|
42
|
+
- If missing evidence blocks brainstorming, name the research gap explicitly
|
|
43
|
+
- Continue until purpose, constraints, success criteria, and non-goals are each addressed
|
|
44
|
+
|
|
45
|
+
**Example — good vs. bad clarifying question:**
|
|
32
46
|
|
|
33
|
-
|
|
47
|
+
```
|
|
48
|
+
BAD (open-ended, unbounded):
|
|
49
|
+
"What kind of authentication do you want?"
|
|
50
|
+
|
|
51
|
+
GOOD (multiple choice, scoped):
|
|
52
|
+
"For auth, which fits best?
|
|
53
|
+
a) Session-based (server-rendered, simple)
|
|
54
|
+
b) JWT (stateless, API-first)
|
|
55
|
+
c) OAuth provider only (GitHub/Google, no local accounts)
|
|
56
|
+
d) Something else — describe briefly"
|
|
57
|
+
```
|
|
34
58
|
|
|
35
|
-
|
|
59
|
+
### Phase 3: Brainstorm, Then Propose 2–3 Approaches
|
|
60
|
+
|
|
61
|
+
- Internally generate 5–7 directions before converging
|
|
62
|
+
- Pressure-test with: one opposite option, one simplification/removal, one cross-domain analogy
|
|
63
|
+
- Name traps when they appear: solutioning too early, one-idea brainstorm, analysis paralysis
|
|
64
|
+
- Present only the strongest 2–3 approaches with trade-offs
|
|
36
65
|
- Lead with your recommended option and explain why
|
|
66
|
+
- For the leading option, capture the biggest unknown and the cheapest validation step
|
|
37
67
|
- Wait for the user to choose before proceeding
|
|
38
68
|
|
|
39
|
-
|
|
69
|
+
**Example — brainstorm output format:**
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
### Approaches
|
|
73
|
+
|
|
74
|
+
**A) Event-sourced (recommended)**
|
|
75
|
+
- How: Append-only event log, projections for read models
|
|
76
|
+
- Pro: Full audit trail, temporal queries
|
|
77
|
+
- Con: Higher upfront complexity, eventual consistency
|
|
78
|
+
- Biggest unknown: Event schema evolution strategy
|
|
79
|
+
- Cheapest validation: Spike a single aggregate with 3 events
|
|
80
|
+
|
|
81
|
+
**B) Traditional CRUD + audit table
|
|
82
|
+
- How: Mutable rows, trigger-based audit log
|
|
83
|
+
- Pro: Familiar, immediate consistency
|
|
84
|
+
- Con: Audit coverage depends on discipline, no temporal queries
|
|
85
|
+
|
|
86
|
+
**C) Hybrid — CRUD with event log for critical paths
|
|
87
|
+
- How: Standard CRUD; event-source only billing and permissions
|
|
88
|
+
- Pro: Complexity only where value is highest
|
|
89
|
+
- Con: Two persistence patterns to maintain
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Phase 4: Present Design & Save
|
|
40
93
|
|
|
41
94
|
Once aligned on approach:
|
|
42
95
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
96
|
+
- Cover: architecture, components, data flow, error handling, testing strategy
|
|
97
|
+
- Scale sections by integration points: ≤2 integration points → 2–3 sentences; 3+ → up to 300 words
|
|
45
98
|
- Ask after each section whether it looks right so far
|
|
46
|
-
- Apply YAGNI
|
|
99
|
+
- Apply YAGNI — cut features that aren't required now
|
|
47
100
|
- Design for isolation: smaller units with clear boundaries
|
|
101
|
+
- Prefer DRY, TDD
|
|
48
102
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Once the user approves the design:
|
|
103
|
+
Once approved, save to `.omp/supipowers/specs/YYYY-MM-DD-<topic>-design.md`. Keep local — do not commit to git.
|
|
52
104
|
|
|
53
|
-
|
|
54
|
-
- Use clear, concise writing
|
|
55
|
-
- Commit the design document to git
|
|
56
|
-
|
|
57
|
-
### Phase 6: Spec Review Loop
|
|
58
|
-
|
|
59
|
-
After writing the design doc:
|
|
105
|
+
### Phase 5: Spec Review Loop
|
|
60
106
|
|
|
61
107
|
1. Dispatch a spec-document-reviewer sub-agent to verify completeness
|
|
62
108
|
2. If **Issues Found**: fix the issues, re-dispatch the reviewer
|
|
63
|
-
3. Repeat until **Approved** (max 5 iterations,
|
|
109
|
+
3. Repeat until **Approved** (max 5 iterations; after 5, present remaining issues to user and ask whether to proceed or continue fixing)
|
|
64
110
|
|
|
65
|
-
### Phase
|
|
111
|
+
### Phase 6: User Review Gate
|
|
66
112
|
|
|
67
|
-
|
|
113
|
+
> "Spec written to `<path>`. Please review it and let me know if you want changes before we write the implementation plan."
|
|
68
114
|
|
|
69
|
-
|
|
115
|
+
Wait for approval. Only proceed once approved.
|
|
70
116
|
|
|
71
|
-
|
|
117
|
+
### Phase 7: Create Implementation Plan
|
|
72
118
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
Break into bite-sized tasks (2-5 minutes each). Each task must have:
|
|
119
|
+
Break into tasks of 2–5 minutes each. Each task must have:
|
|
76
120
|
|
|
77
121
|
- Name
|
|
78
|
-
- **files**:
|
|
79
|
-
- **criteria**:
|
|
122
|
+
- **files**: exact paths the agent will touch (include test files)
|
|
123
|
+
- **criteria**: acceptance criteria (testable)
|
|
80
124
|
- **complexity**: `small` | `medium` | `large`
|
|
81
125
|
|
|
82
|
-
|
|
126
|
+
Steps use checkbox syntax (`- [ ]`). Include function signatures or pseudocode — not vague descriptions, not full implementations.
|
|
83
127
|
|
|
84
|
-
|
|
128
|
+
**Plan template:**
|
|
85
129
|
|
|
86
130
|
```
|
|
87
131
|
---
|
|
@@ -98,7 +142,7 @@ tags: [<relevant>, <tags>]
|
|
|
98
142
|
## Tasks
|
|
99
143
|
|
|
100
144
|
### 1. <Task name>
|
|
101
|
-
- **files**: src/path/to/file.ts
|
|
145
|
+
- **files**: src/path/to/file.ts, src/path/to/file.test.ts
|
|
102
146
|
- **criteria**: <what success looks like>
|
|
103
147
|
- **complexity**: small
|
|
104
148
|
|
|
@@ -106,12 +150,25 @@ tags: [<relevant>, <tags>]
|
|
|
106
150
|
- [ ] Step 2: Run test to verify it fails
|
|
107
151
|
- [ ] Step 3: Write minimal implementation
|
|
108
152
|
- [ ] Step 4: Run test to verify it passes
|
|
109
|
-
- [ ] Step 5: Commit
|
|
110
153
|
```
|
|
111
154
|
|
|
112
|
-
##
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-
|
|
155
|
+
## MUST DO / MUST NOT DO
|
|
156
|
+
|
|
157
|
+
| MUST DO | MUST NOT DO |
|
|
158
|
+
|---------|-------------|
|
|
159
|
+
| One question at a time in Phase 2 | Write code before design approval |
|
|
160
|
+
| Present 2–3 approaches with trade-offs | Skip brainstorming for "obvious" solutions |
|
|
161
|
+
| Wait for user approval at each gate | Combine or skip phases |
|
|
162
|
+
| Include test files in task file lists | Include git commit/push steps for specs |
|
|
163
|
+
| Name research gaps instead of guessing | Present every explored branch (show finalists only) |
|
|
164
|
+
|
|
165
|
+
## Final Checklist
|
|
166
|
+
|
|
167
|
+
- [ ] All phases followed in order
|
|
168
|
+
- [ ] Purpose, constraints, success criteria, and non-goals addressed in Phase 2
|
|
169
|
+
- [ ] 2–3 approaches presented with trade-offs before design
|
|
170
|
+
- [ ] Design doc saved to `.omp/supipowers/specs/` (not committed)
|
|
171
|
+
- [ ] Spec review loop completed (sub-agent approved or user overrode)
|
|
172
|
+
- [ ] User approved spec before implementation plan
|
|
173
|
+
- [ ] Every task has files, criteria, complexity, and checkbox steps
|
|
174
|
+
- [ ] Task steps reference signatures/pseudocode, not vague descriptions
|
|
@@ -5,15 +5,20 @@ description: E2E QA strategy — flow-based product testing with disciplined tri
|
|
|
5
5
|
|
|
6
6
|
# E2E QA Strategy
|
|
7
7
|
|
|
8
|
-
Test the product the way a user uses it. Every test simulates a real user flow — navigating, clicking, filling forms, waiting for responses.
|
|
8
|
+
Test the product the way a user uses it. Every test simulates a real user flow — navigating, clicking, filling forms, waiting for responses.
|
|
9
9
|
|
|
10
10
|
**This is NOT unit or integration testing.** This pipeline tests complete user journeys through the running application.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Quick Reference
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
| Aspect | Detail |
|
|
15
|
+
|--------|--------|
|
|
16
|
+
| **Scope** | End-to-end Playwright tests against a running app |
|
|
17
|
+
| **Input** | Running app URL, optional prior test results for regression comparison |
|
|
18
|
+
| **Output** | Test files (one flow per file), triage verdicts for every failure, regression report |
|
|
19
|
+
| **Core rule** | Every failure gets a verdict before the next test runs |
|
|
20
|
+
| **Priority** | Critical/High flows first; stop adding flows when context reaches ~80% capacity |
|
|
21
|
+
| **Independence** | Each test is self-contained — no shared state, no execution order dependency |
|
|
17
22
|
|
|
18
23
|
## Flow Prioritization
|
|
19
24
|
|
|
@@ -24,7 +29,7 @@ Don't accumulate failures to analyze later. Triage each failure immediately: rea
|
|
|
24
29
|
| **Medium** | Secondary features | Settings, profile, notifications |
|
|
25
30
|
| **Low** | Polish | Theme toggle, tooltips, animations |
|
|
26
31
|
|
|
27
|
-
|
|
32
|
+
A session that thoroughly tests 5 critical flows beats one that superficially touches 20.
|
|
28
33
|
|
|
29
34
|
## Flow Discovery
|
|
30
35
|
|
|
@@ -36,7 +41,7 @@ Before writing tests, understand what the product does:
|
|
|
36
41
|
4. **Find auth boundaries** — public vs protected; test both sides
|
|
37
42
|
5. **Check CRUD operations** — create, read, update, delete for core entities
|
|
38
43
|
|
|
39
|
-
|
|
44
|
+
If prior test results exist, compare to detect new, removed, and changed flows.
|
|
40
45
|
|
|
41
46
|
## Playwright Discipline
|
|
42
47
|
|
|
@@ -66,12 +71,10 @@ await expect(page.getByText('Loading...')).not.toBeVisible();
|
|
|
66
71
|
// BAD — arbitrary delay, flaky by design
|
|
67
72
|
await page.waitForTimeout(3000);
|
|
68
73
|
|
|
69
|
-
// BAD — unreliable for SPAs
|
|
74
|
+
// BAD — unreliable for SPAs (sockets stay open; resolves before dynamic content loads)
|
|
70
75
|
await page.waitForLoadState('networkidle');
|
|
71
76
|
```
|
|
72
77
|
|
|
73
|
-
`waitForTimeout` is never acceptable. `networkidle` is equally unreliable — SPAs keep sockets open, so it either hangs or resolves before dynamic content loads. Wait for the specific element or response that proves the page is ready.
|
|
74
|
-
|
|
75
78
|
### One Flow Per File
|
|
76
79
|
|
|
77
80
|
```typescript
|
|
@@ -83,55 +86,74 @@ test.describe('Checkout flow', () => {
|
|
|
83
86
|
});
|
|
84
87
|
```
|
|
85
88
|
|
|
86
|
-
Each test is independent — no shared state, no execution order dependency.
|
|
87
|
-
|
|
88
89
|
## Failure Triage
|
|
89
90
|
|
|
90
|
-
When a test fails, classify it immediately
|
|
91
|
+
When a test fails, classify it **immediately** — before running the next test.
|
|
91
92
|
|
|
92
93
|
| Verdict | Meaning | Action |
|
|
93
94
|
|---------|---------|--------|
|
|
94
|
-
| **Bug** | App behavior is wrong | Record regression. Do not
|
|
95
|
+
| **Bug** | App behavior is wrong | Record as regression. Do not change the test assertion — the test is correct, the app is broken. |
|
|
95
96
|
| **Stale assertion** | App changed intentionally | Update the test to match new behavior. |
|
|
96
|
-
| **Flaky** | Non-deterministic failure | Fix the locator or wait condition. Re-run. |
|
|
97
|
-
| **Test error** | Test code is wrong | Fix and re-run.
|
|
97
|
+
| **Flaky** | Non-deterministic failure (evidence of randomness required) | Fix the locator or wait condition. Re-run once. |
|
|
98
|
+
| **Test error** | Test code itself is wrong | Fix the test code and re-run. |
|
|
98
99
|
|
|
99
100
|
### Triage Process
|
|
100
101
|
|
|
101
102
|
1. **Read the error.** What element wasn't found? What URL didn't match? What assertion failed?
|
|
102
|
-
2. **Check if the app changed.** Did a route move? Did a button get renamed?
|
|
103
|
-
3. **Distinguish bug from change.** Intentional
|
|
104
|
-
4. **Don't retry blindly.** If you can't explain why a test failed,
|
|
103
|
+
2. **Check if the app changed.** Did a route move? Did a button get renamed? New loading state?
|
|
104
|
+
3. **Distinguish bug from change.** Intentional change → update test. Unintentional breakage → regression.
|
|
105
|
+
4. **Don't retry blindly.** If you can't explain why a test failed, investigate before retrying.
|
|
106
|
+
|
|
107
|
+
### Example: Classifying a Real Failure
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
Error: expect(getByRole('heading', { name: 'Dashboard' })).toBeVisible()
|
|
111
|
+
→ Timeout 5000ms exceeded.
|
|
112
|
+
→ Call log: waiting for getByRole('heading', { name: 'Dashboard' })
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
| Step | Finding |
|
|
116
|
+
|------|---------|
|
|
117
|
+
| Read error | Heading "Dashboard" not found after login |
|
|
118
|
+
| Check app | Route `/dashboard` now redirects to `/home`; heading changed to "Home" |
|
|
119
|
+
| Verdict | **Stale assertion** — intentional redesign |
|
|
120
|
+
| Action | Update test: navigate to `/home`, assert "Home" heading |
|
|
105
121
|
|
|
106
122
|
## Regression Analysis
|
|
107
123
|
|
|
108
124
|
A regression is a flow that **was passing** and now **fails**.
|
|
109
125
|
|
|
126
|
+
Regressions are the pipeline's highest-priority output.
|
|
127
|
+
|
|
110
128
|
For each regression, record:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
**
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
|
135
|
-
|
|
136
|
-
|
|
|
137
|
-
|
|
|
129
|
+
|
|
130
|
+
| Field | Value |
|
|
131
|
+
|-------|-------|
|
|
132
|
+
| **Flow** | Which user flow broke |
|
|
133
|
+
| **Previous status** | Last known passing state |
|
|
134
|
+
| **Current error** | Error message and failing assertion |
|
|
135
|
+
| **Classification** | Real bug or intentional change |
|
|
136
|
+
|
|
137
|
+
## Session Checklist
|
|
138
|
+
|
|
139
|
+
Before finishing, verify every item:
|
|
140
|
+
|
|
141
|
+
| Check | Pass | Fail |
|
|
142
|
+
|-------|------|------|
|
|
143
|
+
| Every failure has a verdict | ✓ | Failures left unclassified |
|
|
144
|
+
| Critical flows tested before lower-priority | ✓ | Random or low-priority-first ordering |
|
|
145
|
+
| Regressions recorded with all fields | ✓ | Vague "some tests failed" |
|
|
146
|
+
| Tests are independent and resilient | ✓ | Tests depend on execution order or shared state |
|
|
147
|
+
| Context spent on high-value flows | ✓ | Low-priority flows tested while critical flows skipped |
|
|
148
|
+
| Error states tested (API errors, bad input) | ✓ | Only happy paths covered |
|
|
149
|
+
|
|
150
|
+
## MUST / MUST NOT
|
|
151
|
+
|
|
152
|
+
| MUST | MUST NOT |
|
|
153
|
+
|------|----------|
|
|
154
|
+
| Triage every failure before proceeding | Accumulate failures to analyze later |
|
|
155
|
+
| Use resilient locators (role, label, text, testid) | Use CSS selectors or DOM position |
|
|
156
|
+
| Wait for explicit conditions (element, response) | Use `waitForTimeout` or `networkidle` |
|
|
157
|
+
| Test what the user sees | Test internal state (stores, localStorage, cookies) |
|
|
158
|
+
| Provide evidence before classifying a failure as "flaky" | Classify regressions as flaky without proof of non-determinism |
|
|
159
|
+
| Test error states and edge cases | Only test happy paths |
|