一键导入
corgispec-qa-backend
Backend logic walkthrough — traces call chain from real entry points, verifies data integrity across layers
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Backend logic walkthrough — traces call chain from real entry points, verifies data integrity across layers
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create or complete a CorgiSpec planning package and synchronize one GitHub parent issue plus Task Group child issues. Use when proposing a change whose normalized tracking provider is GitHub.
Create or complete a CorgiSpec planning package and optionally synchronize GitLab issues. Use when proposing a new change or finishing an existing change whose normalized tracking provider is GitLab or none.
Execute or resume a CorgiSpec Run Contract v2 one Task Group at a time through the canonical corgispec loop CLI. Use when starting, continuing, fixing, committing, recovering, or finalizing an implementation run; never write loop state or evidence artifacts directly.
Implement exactly one pending Task Group from a CorgiSpec change and optionally synchronize GitLab progress. Use when applying a change whose normalized tracking provider is GitLab or none.
Validate and archive a completed CorgiSpec change, extract durable knowledge, and optionally close GitLab tracking. Use when archiving a change whose normalized tracking provider is GitLab or none.
Compare fresh CorgiSpec planning, implementation, Git, and run evidence and close only implementation gaps through the canonical converge CLI. Use after implementation or review when deciding whether a change is converged, planning needs update, or a new append-only Task Group is required.
| name | corgispec-qa-backend |
| description | Backend logic walkthrough — traces call chain from real entry points, verifies data integrity across layers |
| license | MIT |
| compatibility | Requires a backend codebase with identifiable entry points (routes, handlers, commands). |
| metadata | {"author":"corgispec","version":"1.0.0","generatedBy":"1.0.0"} |
Backend logic walkthrough for QA verification.
This skill guides a structured walkthrough of backend logic by tracing the call chain from a real entry point (route handler, CLI command, event listener) down through service, repository, and data layers. It verifies data integrity, auth enforcement, and error handling at each layer.
Do not use this skill for frontend-only changes, infrastructure/CI changes, or pure refactors with no behavioral change.
qa-testcases.md exists in the change directory (if reporting results)Find the root function for the feature under test:
POST /api/users)onOrderCreated)Record: file path, function name, HTTP method + path (if applicable).
Walk through exactly 3 layers from the entry point:
| Layer | Typical Role | What to Record |
|---|---|---|
| L1 — Controller/Handler | Request parsing, input validation, auth check | Input shape, auth requirement, early returns |
| L2 — Service/Use-case | Business logic, orchestration | Transformations, conditional branches, side effects |
| L3 — Repository/Data | DB queries, external API calls | Query shape, write operations, return shape |
At each layer record:
Trace one successful request end-to-end:
Record: input → each layer's transformation → final output.
Choose the most critical error scenario:
Trace the error from point of detection back to the response:
Check auth enforcement at each level of the pyramid:
| Level | Check | Pass Criteria |
|---|---|---|
| Unauthenticated | No token/session | Returns 401 |
| Authenticated | Valid token, wrong role | Returns 403 (if role-gated) |
| Authorized | Valid token, correct role, wrong resource | Returns 403 or 404 |
| Admin | Admin token | Full access confirmed |
For each level, confirm the check happens BEFORE any business logic or DB access.
For every DB operation found in L3:
If qa-testcases.md exists in the change directory, read it before starting the walkthrough. It contains pre-defined test scenarios that MUST be covered:
## Format of qa-testcases.md
### <Feature Name>
| ID | Scenario | Input | Expected | Priority |
|----|----------|-------|----------|----------|
| TC-001 | ... | ... | ... | P0 |
Map each test case to a walkthrough path. After completing the walkthrough, report coverage:
After completing the walkthrough, produce a summary in this structure:
## QA Backend Walkthrough: <Feature Name>
### Entry Point
- **Path**: `<file>:<line>`
- **Function**: `<name>`
- **Route**: `<METHOD /path>` (if applicable)
### Call Chain
| Layer | File | Function | Input | Output | Side Effects |
|-------|------|----------|-------|--------|--------------|
| L1 | ... | ... | ... | ... | ... |
| L2 | ... | ... | ... | ... | ... |
| L3 | ... | ... | ... | ... | ... |
### Happy Path
- Input: ...
- Flow: L1 → L2 → L3
- DB Operation: ...
- Response: ...
- **Status: PASS / FAIL**
### Error Path (<which error>)
- Trigger: ...
- Detection point: L<n>, condition: ...
- Propagation: ...
- Response: status=<code>, body=...
- **Status: PASS / FAIL**
### Auth Pyramid
| Level | Tested | Result |
|-------|--------|--------|
| Unauthenticated | Yes/No | PASS/FAIL |
| Authenticated | Yes/No | PASS/FAIL |
| Authorized | Yes/No | PASS/FAIL |
| Admin | Yes/No | PASS/FAIL |
### DB Integrity
| Operation | Table | Verified | Notes |
|-----------|-------|----------|-------|
| INSERT | ... | Yes/No | ... |
| SELECT | ... | Yes/No | ... |
### Test Case Coverage (from qa-testcases.md)
| ID | Covered | Method | Notes |
|----|---------|--------|-------|
| TC-001 | Yes/No | Trace/Manual | ... |
### Verdict
- [ ] Happy path verified
- [ ] Error path verified
- [ ] Auth pyramid complete
- [ ] DB integrity confirmed
- **Overall: PASS / FAIL / PARTIAL**