timsquad 3.5.0 → 3.6.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.ko.md +4 -0
- package/README.md +4 -0
- package/dist/commands/audit.d.ts +22 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +233 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +84 -3
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +48 -2
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/init.js +42 -6
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/log.d.ts.map +1 -1
- package/dist/commands/log.js +32 -0
- package/dist/commands/log.js.map +1 -1
- package/dist/commands/meta-index.d.ts.map +1 -1
- package/dist/commands/meta-index.js +30 -0
- package/dist/commands/meta-index.js.map +1 -1
- package/dist/commands/retro.d.ts.map +1 -1
- package/dist/commands/retro.js +63 -6
- package/dist/commands/retro.js.map +1 -1
- package/dist/commands/workflow.d.ts +2 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +180 -6
- package/dist/commands/workflow.js.map +1 -1
- package/dist/daemon/context-writer.d.ts +14 -0
- package/dist/daemon/context-writer.d.ts.map +1 -1
- package/dist/daemon/context-writer.js +29 -0
- package/dist/daemon/context-writer.js.map +1 -1
- package/dist/daemon/event-queue.d.ts +4 -0
- package/dist/daemon/event-queue.d.ts.map +1 -1
- package/dist/daemon/event-queue.js +107 -6
- package/dist/daemon/event-queue.js.map +1 -1
- package/dist/daemon/file-watcher.d.ts +14 -8
- package/dist/daemon/file-watcher.d.ts.map +1 -1
- package/dist/daemon/file-watcher.js +78 -41
- package/dist/daemon/file-watcher.js.map +1 -1
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +42 -36
- package/dist/daemon/index.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-generator.d.ts.map +1 -1
- package/dist/lib/agent-generator.js +11 -0
- package/dist/lib/agent-generator.js.map +1 -1
- package/dist/lib/compile-rules.d.ts +2 -0
- package/dist/lib/compile-rules.d.ts.map +1 -1
- package/dist/lib/compile-rules.js +2 -0
- package/dist/lib/compile-rules.js.map +1 -1
- package/dist/lib/compiler.d.ts +21 -1
- package/dist/lib/compiler.d.ts.map +1 -1
- package/dist/lib/compiler.js +113 -3
- package/dist/lib/compiler.js.map +1 -1
- package/dist/lib/config.d.ts +3 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +17 -2
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/skill-generator.d.ts +1 -1
- package/dist/lib/skill-generator.d.ts.map +1 -1
- package/dist/lib/skill-generator.js +17 -2
- package/dist/lib/skill-generator.js.map +1 -1
- package/dist/lib/ssot-map.d.ts +31 -0
- package/dist/lib/ssot-map.d.ts.map +1 -0
- package/dist/lib/ssot-map.js +76 -0
- package/dist/lib/ssot-map.js.map +1 -0
- package/dist/lib/template.js +1 -0
- package/dist/lib/template.js.map +1 -1
- package/dist/lib/workflow-state.d.ts +1 -1
- package/dist/lib/workflow-state.d.ts.map +1 -1
- package/dist/lib/workflow-state.js +1 -1
- package/dist/lib/workflow-state.js.map +1 -1
- package/dist/types/config.d.ts +10 -1
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +22 -17
- package/dist/types/config.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/meta-index.d.ts +8 -0
- package/dist/types/meta-index.d.ts.map +1 -1
- package/dist/types/project.d.ts +1 -1
- package/dist/types/project.d.ts.map +1 -1
- package/dist/types/project.js.map +1 -1
- package/dist/types/ssot-map.d.ts +28 -0
- package/dist/types/ssot-map.d.ts.map +1 -0
- package/dist/types/ssot-map.js +6 -0
- package/dist/types/ssot-map.js.map +1 -0
- package/package.json +1 -1
- package/templates/base/agents/base/tsq-librarian.md +45 -0
- package/templates/base/skills/_shared/naming-conventions.md +49 -0
- package/templates/base/skills/_template/SKILL.md +33 -17
- package/templates/base/skills/audit/SKILL.md +66 -0
- package/templates/base/skills/coding/SKILL.md +49 -29
- package/templates/base/skills/coding/rules/async-patterns.md +81 -0
- package/templates/base/skills/coding/rules/code-organization.md +80 -0
- package/templates/base/skills/coding/rules/error-handling.md +76 -0
- package/templates/base/skills/coding/rules/type-safety.md +85 -0
- package/templates/base/skills/controller/SKILL.md +50 -84
- package/templates/base/skills/controller/delegation/developer.md +25 -0
- package/templates/base/skills/controller/delegation/librarian.md +33 -0
- package/templates/base/skills/controller/delegation/reviewer.md +19 -0
- package/templates/base/skills/controller/memory/.gitkeep +0 -0
- package/templates/base/skills/controller/triggers/phase-complete.md +25 -0
- package/templates/base/skills/controller/triggers/sequence-complete.md +15 -0
- package/templates/base/skills/controller/triggers/ssot-changed.md +14 -0
- package/templates/base/skills/controller/triggers/task-complete.md +14 -0
- package/templates/base/skills/database/SKILL.md +8 -25
- package/templates/base/skills/database/rules/query-optimization.md +32 -0
- package/templates/base/skills/database/rules/supabase-patterns.md +94 -0
- package/templates/base/skills/librarian/SKILL.md +53 -0
- package/templates/base/skills/main-session-constraints/SKILL.md +62 -0
- package/templates/base/skills/methodology/tdd/SKILL.md +6 -0
- package/templates/base/skills/product-audit/SKILL.md +115 -0
- package/templates/base/skills/product-audit/checklists/01-security.md +86 -0
- package/templates/base/skills/product-audit/checklists/02-performance.md +67 -0
- package/templates/base/skills/product-audit/checklists/03-seo.md +46 -0
- package/templates/base/skills/product-audit/checklists/04-accessibility.md +66 -0
- package/templates/base/skills/product-audit/checklists/05-ui-ux.md +50 -0
- package/templates/base/skills/product-audit/checklists/06-architecture.md +53 -0
- package/templates/base/skills/product-audit/checklists/07-functional-requirements.md +55 -0
- package/templates/base/skills/product-audit/rules/audit-protocol.md +136 -0
- package/templates/base/skills/product-audit/rules/false-positive-guard.md +81 -0
- package/templates/base/skills/product-audit/rules/scoring-criteria.md +113 -0
- package/templates/base/skills/product-audit/templates/improvement-plan-template.md +60 -0
- package/templates/base/skills/product-audit/templates/report-template.md +88 -0
- package/templates/base/skills/prompt-engineering/SKILL.md +54 -73
- package/templates/base/skills/retrospective/SKILL.md +70 -95
- package/templates/base/skills/retrospective/references/improvement-template.md +26 -0
- package/templates/base/skills/review/SKILL.md +72 -0
- package/templates/base/skills/security/SKILL.md +50 -37
- package/templates/base/skills/security/rules/auth-patterns.md +62 -0
- package/templates/base/skills/security/rules/dependency-security.md +69 -0
- package/templates/base/skills/security/rules/input-validation.md +68 -0
- package/templates/base/skills/security/rules/secrets-management.md +65 -0
- package/templates/base/skills/spec/SKILL.md +60 -0
- package/templates/base/skills/testing/SKILL.md +33 -25
- package/templates/base/skills/testing/references/e2e-stability.md +33 -0
- package/templates/base/skills/tsq-cli/SKILL.md +73 -0
- package/templates/base/skills/tsq-cli/references/cli-reference.md +92 -0
- package/templates/base/skills/tsq-protocol/SKILL.md +41 -25
- package/templates/base/skills/typescript/SKILL.md +3 -9
- package/templates/base/timsquad/ssot/test-spec.template.md +11 -1
- package/templates/base/timsquad/ssot-map.template.yaml +41 -0
- package/templates/platforms/claude-code/rules/api-conventions.md +12 -0
- package/templates/platforms/claude-code/rules/librarian-constraints.md +11 -0
- package/templates/platforms/claude-code/rules/test-conventions.md +13 -0
- package/templates/platforms/claude-code/scripts/change-scope-guard.sh +113 -0
- package/templates/platforms/claude-code/scripts/completion-guard.sh +75 -13
- package/templates/platforms/claude-code/scripts/context-restore.sh +68 -0
- package/templates/platforms/claude-code/scripts/e2e-commit-gate.sh +70 -0
- package/templates/platforms/claude-code/scripts/e2e-marker.sh +51 -0
- package/templates/platforms/claude-code/scripts/phase-guard.sh +1 -1
- package/templates/platforms/claude-code/scripts/pre-compact.sh +70 -0
- package/templates/platforms/claude-code/scripts/skill-inject.sh +216 -0
- package/templates/platforms/claude-code/scripts/skill-rules.json +11 -1
- package/templates/platforms/claude-code/scripts/subagent-inject.sh +53 -0
- package/templates/platforms/claude-code/settings.json +27 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Dependency Security
|
|
3
|
+
impact: HIGH
|
|
4
|
+
tags: security, dependencies, npm-audit, supply-chain, license
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Dependency Security
|
|
8
|
+
|
|
9
|
+
## npm audit
|
|
10
|
+
```bash
|
|
11
|
+
# Check for known vulnerabilities
|
|
12
|
+
npm audit
|
|
13
|
+
|
|
14
|
+
# Fix automatically where possible
|
|
15
|
+
npm audit fix
|
|
16
|
+
|
|
17
|
+
# Fail CI on critical/high vulnerabilities
|
|
18
|
+
npm audit --audit-level=high
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- Run `npm audit` in CI pipelines; block merges on high/critical findings
|
|
22
|
+
- Review advisories before applying `npm audit fix --force` (may include breaking changes)
|
|
23
|
+
- Use tools like `socket.dev` or `snyk` for deeper analysis
|
|
24
|
+
|
|
25
|
+
## Lockfile Integrity
|
|
26
|
+
- Always commit `package-lock.json` to version control
|
|
27
|
+
- Use `npm ci` in CI/CD (respects lockfile exactly, fails on mismatch)
|
|
28
|
+
- Review lockfile diffs in PRs for unexpected changes
|
|
29
|
+
```bash
|
|
30
|
+
# CI install — strict, reproducible
|
|
31
|
+
npm ci
|
|
32
|
+
|
|
33
|
+
# Never use `npm install` in CI — it can modify the lockfile
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Supply Chain Attack Prevention
|
|
37
|
+
- Pin exact versions for critical dependencies
|
|
38
|
+
- Verify package provenance when available (`npm audit signatures`)
|
|
39
|
+
- Be cautious with post-install scripts; audit new dependencies before adding
|
|
40
|
+
```bash
|
|
41
|
+
# Check what scripts a package runs
|
|
42
|
+
npm explain <package>
|
|
43
|
+
npm pack <package> --dry-run # inspect contents before install
|
|
44
|
+
|
|
45
|
+
# Disable scripts for untrusted packages
|
|
46
|
+
npm install --ignore-scripts <package>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- Prefer well-maintained packages with large user bases
|
|
50
|
+
- Monitor for typosquatting (e.g., `lodash` vs `l0dash`)
|
|
51
|
+
- Use `npm-shrinkwrap.json` for published packages requiring locked deps
|
|
52
|
+
|
|
53
|
+
## License Compliance
|
|
54
|
+
```bash
|
|
55
|
+
# Check licenses of all dependencies
|
|
56
|
+
npx license-checker --summary
|
|
57
|
+
npx license-checker --failOn 'GPL-3.0;AGPL-3.0'
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- Define an allowlist of acceptable licenses for the project
|
|
61
|
+
- Block copyleft licenses (GPL, AGPL) in proprietary codebases
|
|
62
|
+
- Document license policy and automate checks in CI
|
|
63
|
+
|
|
64
|
+
## Checklist
|
|
65
|
+
- `npm audit` runs in CI; high/critical findings block deployment
|
|
66
|
+
- `package-lock.json` committed; CI uses `npm ci`
|
|
67
|
+
- New dependencies reviewed for maintenance status, size, and scripts
|
|
68
|
+
- License compliance checked automatically; policy documented
|
|
69
|
+
- Lockfile diffs reviewed in pull requests
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Input Validation
|
|
3
|
+
impact: CRITICAL
|
|
4
|
+
tags: security, validation, sanitization, injection
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Input Validation
|
|
8
|
+
|
|
9
|
+
## Principle
|
|
10
|
+
Never trust user input. Validate, sanitize, and constrain all external data before processing.
|
|
11
|
+
|
|
12
|
+
## Allowlist Over Denylist
|
|
13
|
+
```typescript
|
|
14
|
+
// Bad: denylist — easy to bypass
|
|
15
|
+
const forbidden = ['<script>', 'onclick', 'onerror'];
|
|
16
|
+
if (forbidden.some(f => input.includes(f))) throw new Error('Invalid');
|
|
17
|
+
|
|
18
|
+
// Good: allowlist — only permit known-safe values
|
|
19
|
+
const ALLOWED_ROLES = ['admin', 'editor', 'viewer'] as const;
|
|
20
|
+
if (!ALLOWED_ROLES.includes(role)) throw new Error('Invalid role');
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Schema Validation
|
|
24
|
+
```typescript
|
|
25
|
+
import { z } from 'zod';
|
|
26
|
+
|
|
27
|
+
const UserInput = z.object({
|
|
28
|
+
name: z.string().min(1).max(100).trim(),
|
|
29
|
+
email: z.string().email().max(254),
|
|
30
|
+
age: z.number().int().min(0).max(150),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Validate at boundary (controller/handler)
|
|
34
|
+
const data = UserInput.parse(req.body);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Parameterized Queries
|
|
38
|
+
```typescript
|
|
39
|
+
// Bad: string interpolation — SQL injection risk
|
|
40
|
+
const q = `SELECT * FROM users WHERE id = '${id}'`;
|
|
41
|
+
|
|
42
|
+
// Good: parameterized query
|
|
43
|
+
const q = 'SELECT * FROM users WHERE id = $1';
|
|
44
|
+
await db.query(q, [id]);
|
|
45
|
+
|
|
46
|
+
// Good: ORM with type-safe parameters
|
|
47
|
+
await userRepo.findOneBy({ id: parseInt(id, 10) });
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Sanitize HTML Output
|
|
51
|
+
```typescript
|
|
52
|
+
// Bad
|
|
53
|
+
element.innerHTML = userInput;
|
|
54
|
+
|
|
55
|
+
// Good: escape or use textContent
|
|
56
|
+
element.textContent = userInput;
|
|
57
|
+
|
|
58
|
+
// Good: DOMPurify for rich content
|
|
59
|
+
import DOMPurify from 'dompurify';
|
|
60
|
+
element.innerHTML = DOMPurify.sanitize(userInput);
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Checklist
|
|
64
|
+
- Validate type, length, format, and range at the application boundary
|
|
65
|
+
- Use allowlists for enumerated values (roles, statuses, types)
|
|
66
|
+
- Use parameterized queries or ORM — never interpolate user input into SQL
|
|
67
|
+
- Sanitize output based on context (HTML, URL, SQL, shell)
|
|
68
|
+
- Reject unexpected fields; do not pass raw request bodies to business logic
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Secrets Management
|
|
3
|
+
impact: HIGH
|
|
4
|
+
tags: security, secrets, env, gitignore, rotation
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Secrets Management
|
|
8
|
+
|
|
9
|
+
## Never Hardcode Secrets
|
|
10
|
+
```typescript
|
|
11
|
+
// Bad: hardcoded secret
|
|
12
|
+
const API_KEY = 'sk-1234567890abcdef';
|
|
13
|
+
const DB_URL = 'postgres://admin:password@db:5432/prod';
|
|
14
|
+
|
|
15
|
+
// Good: environment variables
|
|
16
|
+
const API_KEY = process.env.API_KEY;
|
|
17
|
+
const DB_URL = process.env.DATABASE_URL;
|
|
18
|
+
|
|
19
|
+
// Better: secret manager for production
|
|
20
|
+
const API_KEY = await secretManager.getSecret('api-key');
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Environment Variables
|
|
24
|
+
- Use `.env` files for local development only
|
|
25
|
+
- Load with `dotenv` at application entry point, not in library code
|
|
26
|
+
- Validate required env vars at startup
|
|
27
|
+
```typescript
|
|
28
|
+
const required = ['DATABASE_URL', 'JWT_SECRET', 'API_KEY'];
|
|
29
|
+
for (const key of required) {
|
|
30
|
+
if (!process.env[key]) throw new Error(`Missing env var: ${key}`);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## .gitignore Rules
|
|
35
|
+
```gitignore
|
|
36
|
+
# Must be in .gitignore — never commit secrets
|
|
37
|
+
.env
|
|
38
|
+
.env.local
|
|
39
|
+
.env.*.local
|
|
40
|
+
*.pem
|
|
41
|
+
*.key
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- Use `.env.example` with placeholder values for documentation
|
|
45
|
+
- Run `git log --all -p -- .env` to verify secrets were never committed
|
|
46
|
+
- If a secret was committed, rotate it immediately — git history persists
|
|
47
|
+
|
|
48
|
+
## Secret Rotation
|
|
49
|
+
- Rotate secrets on a regular schedule (90 days recommended)
|
|
50
|
+
- Support dual-read during rotation (accept old + new key simultaneously)
|
|
51
|
+
- Automate rotation via secret manager (AWS Secrets Manager, Vault, etc.)
|
|
52
|
+
- Revoke old secrets after confirming the new ones work
|
|
53
|
+
|
|
54
|
+
## Production Practices
|
|
55
|
+
- Use a dedicated secret manager (AWS Secrets Manager, HashiCorp Vault, GCP Secret Manager)
|
|
56
|
+
- Grant least-privilege access to secrets per service
|
|
57
|
+
- Audit secret access logs regularly
|
|
58
|
+
- Never log secret values; mask them in error output
|
|
59
|
+
|
|
60
|
+
## Checklist
|
|
61
|
+
- No secrets in source code, config files, or container images
|
|
62
|
+
- `.env` and key files listed in `.gitignore`
|
|
63
|
+
- Required env vars validated at startup with clear error messages
|
|
64
|
+
- Secrets rotated on schedule; old secrets revoked
|
|
65
|
+
- Production uses a secret manager, not plain env vars
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec
|
|
3
|
+
description: |
|
|
4
|
+
SSOT(Single Source of Truth) 문서 존재 여부를 확인하고, 미존재 시 구현 전 스펙 작성을 안내한다.
|
|
5
|
+
`/spec <기능명>`으로 호출하면 해당 기능의 SSOT 문서를 찾아 상태를 보고한다.
|
|
6
|
+
스펙 없이 구현하는 것을 방지하여 문서-코드 일관성을 유지한다.
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
tags: [spec, ssot, gate, documentation]
|
|
9
|
+
depends_on: [tsq-protocol]
|
|
10
|
+
conflicts_with: []
|
|
11
|
+
user-invocable: true
|
|
12
|
+
argument-hint: "[기능명] — SSOT 문서 존재 여부 확인"
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Spec Gate
|
|
16
|
+
|
|
17
|
+
SSOT 문서 존재 여부를 확인하여 스펙 없는 구현을 방지한다.
|
|
18
|
+
|
|
19
|
+
## Contract
|
|
20
|
+
|
|
21
|
+
- **Trigger**: `/spec` 호출 또는 구현 시작 전 자동 확인
|
|
22
|
+
- **Input**: `$ARGUMENTS` (기능명) 또는 미지정 시 전체 SSOT 상태
|
|
23
|
+
- **Output**: SSOT 상태 리포트 (존재/stale/미존재) + 권장 액션
|
|
24
|
+
- **Error**: SSOT 디렉토리 자체가 없을 경우 "NOT FOUND" 안내
|
|
25
|
+
- **Dependencies**: tsq-protocol
|
|
26
|
+
|
|
27
|
+
## Protocol
|
|
28
|
+
|
|
29
|
+
1. **SSOT 검색**: `$ARGUMENTS`로 전달된 기능명으로 `.timsquad/ssot/` 디렉토리 탐색
|
|
30
|
+
2. **존재 확인**: 해당 기능의 스펙 문서(PRD, 설계문서, API 스펙) 존재 여부 판단
|
|
31
|
+
3. **상태 판정**:
|
|
32
|
+
- **존재 + 최신**: 스펙 요약 출력 + "구현 가능" 안내
|
|
33
|
+
- **존재 + stale**: "스펙 갱신 필요" + `tsq compile` 재실행 안내
|
|
34
|
+
- **미존재**: advisory 경고 + 스펙 작성 가이드 제공
|
|
35
|
+
4. **결과 리포트**: 상태 + 권장 액션을 구조화하여 출력
|
|
36
|
+
|
|
37
|
+
## Verification
|
|
38
|
+
|
|
39
|
+
| Check | Method | Pass Criteria |
|
|
40
|
+
|-------|--------|---------------|
|
|
41
|
+
| SSOT 파일 존재 | `.timsquad/ssot/` 탐색 | 관련 문서 1개 이상 |
|
|
42
|
+
| stale 여부 | compile-manifest hash 비교 | hash 일치 |
|
|
43
|
+
| 스펙 커버리지 | 기능 키워드 매칭 | 해당 기능 언급 존재 |
|
|
44
|
+
|
|
45
|
+
## Quick Rules
|
|
46
|
+
|
|
47
|
+
### Gate 동작
|
|
48
|
+
- **미존재 시**: advisory 경고 (차단 아님)
|
|
49
|
+
```
|
|
50
|
+
[SPEC GATE] 기능 "{name}"에 대한 SSOT 문서가 없습니다.
|
|
51
|
+
스펙 먼저 작성하세요: .timsquad/ssot/{name}.md
|
|
52
|
+
가이드: PRD → 설계문서 → Compiled Spec 순서
|
|
53
|
+
```
|
|
54
|
+
- **stale 시**: `tsq compile` 재실행 안내
|
|
55
|
+
```
|
|
56
|
+
[SPEC GATE] SSOT 문서가 최신이 아닙니다. `tsq compile` 재실행 필요.
|
|
57
|
+
```
|
|
58
|
+
- **Phase gate에서만 실제 차단** (일반 사용 시 advisory)
|
|
59
|
+
- `$ARGUMENTS` 미지정 시 전체 SSOT 상태 요약
|
|
60
|
+
- PRD, 설계문서, API 스펙 모두 SSOT로 인정
|
|
@@ -6,6 +6,8 @@ description: |
|
|
|
6
6
|
Use when: "테스트 작성, TDD, 단위 테스트, 통합 테스트, E2E, 커버리지"
|
|
7
7
|
version: "1.0.0"
|
|
8
8
|
tags: [testing, tdd, quality]
|
|
9
|
+
depends_on: []
|
|
10
|
+
conflicts_with: []
|
|
9
11
|
user-invocable: false
|
|
10
12
|
---
|
|
11
13
|
|
|
@@ -19,45 +21,51 @@ user-invocable: false
|
|
|
19
21
|
- 테스트 피라미드: Unit(다수) > Integration(중간) > E2E(소수)
|
|
20
22
|
- 행동(behavior) 테스트 — 구현 디테일이 아닌 결과 검증
|
|
21
23
|
|
|
24
|
+
## Contract
|
|
25
|
+
|
|
26
|
+
- **Trigger**: 테스트 작성/수정 태스크, 코드 변경 후 테스트 필요 시
|
|
27
|
+
- **Input**: 테스트 대상 코드 + 요구사항
|
|
28
|
+
- **Output**: Given-When-Then 패턴 테스트 + 커버리지 기준 충족
|
|
29
|
+
- **Error**: 커버리지 미달 시 추가 테스트 작성
|
|
30
|
+
- **Dependencies**: 없음
|
|
31
|
+
|
|
32
|
+
## Protocol
|
|
33
|
+
|
|
34
|
+
1. **Red**: 실패하는 테스트 작성
|
|
35
|
+
2. **Green**: 테스트를 통과하는 최소 코드 작성
|
|
36
|
+
3. **Refactor**: 코드 정리 (테스트는 계속 통과)
|
|
37
|
+
4. **Coverage 확인**: 기준 충족 여부 점검
|
|
38
|
+
|
|
39
|
+
## Verification
|
|
40
|
+
|
|
41
|
+
| Check | Command | Pass Criteria |
|
|
42
|
+
|-------|---------|---------------|
|
|
43
|
+
| 테스트 실행 | `npm test` | exit code 0 |
|
|
44
|
+
| 라인 커버리지 | coverage report | >= 80% |
|
|
45
|
+
| 브랜치 커버리지 | coverage report | >= 70% |
|
|
46
|
+
| 3카테고리 | 수동 검증 | Happy/Edge/Error 포함 |
|
|
47
|
+
|
|
22
48
|
## Resources
|
|
23
49
|
|
|
24
50
|
| Priority | Type | Resource | Description |
|
|
25
51
|
|----------|------|----------|-------------|
|
|
26
|
-
| HIGH | ref | [testing-patterns](references/testing-patterns.md) | Given-When-Then, Mock
|
|
52
|
+
| HIGH | ref | [testing-patterns](references/testing-patterns.md) | Given-When-Then, Mock 가이드 |
|
|
53
|
+
| HIGH | ref | [e2e-stability](references/e2e-stability.md) | E2E Viewport, Wait, Retry 가이드 |
|
|
27
54
|
|
|
28
55
|
## Quick Rules
|
|
29
56
|
|
|
30
|
-
### TDD Cycle
|
|
31
|
-
1. **Red** — 실패하는 테스트 작성
|
|
32
|
-
2. **Green** — 테스트를 통과하는 최소 코드 작성
|
|
33
|
-
3. **Refactor** — 코드 정리 (테스트는 계속 통과)
|
|
34
|
-
|
|
35
57
|
### Test Naming
|
|
36
58
|
- 형식: `should {expected behavior} when {condition}`
|
|
37
|
-
- Good: `should return null when user is not found`
|
|
38
59
|
- Bad: `test getUser`, `works correctly`
|
|
39
60
|
|
|
40
61
|
### Test Categories
|
|
41
|
-
모든 테스트는 3가지 카테고리 커버:
|
|
42
62
|
- **Happy Path** — 정상 흐름
|
|
43
63
|
- **Edge Cases** — 경계 조건 (빈 문자열, 0, null, 최대값)
|
|
44
64
|
- **Error Cases** — 오류 상황
|
|
45
65
|
|
|
46
66
|
### Coverage Standards
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
| Function Coverage | 80% | 90% |
|
|
53
|
-
|
|
54
|
-
## Checklist
|
|
55
|
-
|
|
56
|
-
| Priority | Item |
|
|
57
|
-
|----------|------|
|
|
58
|
-
| CRITICAL | Given-When-Then 패턴을 따르는가 |
|
|
59
|
-
| CRITICAL | Happy path, Edge case, Error case 커버하는가 |
|
|
60
|
-
| HIGH | 테스트 이름이 `should...when...` 형식인가 |
|
|
61
|
-
| HIGH | 커버리지 기준을 충족하는가 |
|
|
62
|
-
| MEDIUM | Mock이 적절히 사용되었는가 (외부 서비스만) |
|
|
63
|
-
| MEDIUM | 테스트가 독립적인가 (순서 무관) |
|
|
67
|
+
| Metric | Min | Recommended |
|
|
68
|
+
|--------|-----|-------------|
|
|
69
|
+
| Line | 80% | 90% |
|
|
70
|
+
| Branch | 70% | 80% |
|
|
71
|
+
| Function | 80% | 90% |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: E2E Stability Guide
|
|
3
|
+
category: reference
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# E2E Stability Guide
|
|
7
|
+
|
|
8
|
+
## Viewport & Selectors
|
|
9
|
+
- 테스트 전 `page.setViewportSize({ width: 1280, height: 720 })` 고정
|
|
10
|
+
- `data-testid` 셀렉터 사용 — CSS 클래스/태그 기반 셀렉터 금지
|
|
11
|
+
- `getByRole`, `getByText` 등 의미 기반 셀렉터 우선
|
|
12
|
+
|
|
13
|
+
## Serial Execution
|
|
14
|
+
- E2E 테스트는 `describe.serial` 또는 `--shard` 사용
|
|
15
|
+
- 상태 의존 테스트는 반드시 순서 보장 (`test.describe.configure({ mode: 'serial' })`)
|
|
16
|
+
|
|
17
|
+
## Wait Strategy
|
|
18
|
+
- `waitForSelector` 대신 `waitForLoadState('networkidle')` + assertion
|
|
19
|
+
- 하드코딩 `sleep`/`setTimeout` 절대 사용 금지
|
|
20
|
+
- 동적 콘텐츠: `expect(locator).toBeVisible({ timeout: 10000 })`
|
|
21
|
+
|
|
22
|
+
## Retry & Flakiness
|
|
23
|
+
- Playwright `retries: 2` 설정 (CI 환경)
|
|
24
|
+
- flaky 테스트 발견 시 `test.fixme()` 마킹 후 원인 분석
|
|
25
|
+
- 재시도 성공도 flaky로 기록 → `.e2e-passed` 마커에 `flaky` 카운트 포함
|
|
26
|
+
|
|
27
|
+
## Timeout Standards
|
|
28
|
+
|
|
29
|
+
| Category | Timeout | Rationale |
|
|
30
|
+
|----------|---------|-----------|
|
|
31
|
+
| Unit Test | 120s | 빠른 피드백 |
|
|
32
|
+
| E2E Test | 300s | 네트워크/렌더링 대기 |
|
|
33
|
+
| Build | 180s | 컴파일 + 번들링 |
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tsq-cli
|
|
3
|
+
description: |
|
|
4
|
+
TimSquad CLI(tsq) 사용 가이드. 모든 TSQ 커맨드의 인덱스와 사용법을 제공한다.
|
|
5
|
+
에이전트가 TSQ CLI 커맨드를 사용해야 할 때 이 스킬을 참조한다.
|
|
6
|
+
상세 커맨드 레퍼런스는 references/cli-reference.md 참조.
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
tags: [tsq, cli, commands, reference]
|
|
9
|
+
depends_on: [tsq-protocol]
|
|
10
|
+
conflicts_with: []
|
|
11
|
+
user-invocable: false
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# TSQ CLI Reference
|
|
15
|
+
|
|
16
|
+
TimSquad CLI 커맨드 인덱스. 상세 옵션은 `references/cli-reference.md` 참조.
|
|
17
|
+
|
|
18
|
+
## Core Commands
|
|
19
|
+
|
|
20
|
+
| Command | Description |
|
|
21
|
+
|---------|-------------|
|
|
22
|
+
| `tsq init` | 프로젝트 초기화 |
|
|
23
|
+
| `tsq status` | 현재 상태 확인 |
|
|
24
|
+
| `tsq q "task"` | Quick 모드 (간단한 작업) |
|
|
25
|
+
| `tsq f "task"` | Full 모드 (SSOT 기반) |
|
|
26
|
+
| `tsq retro` | 회고 실행 |
|
|
27
|
+
| `tsq metrics` | 메트릭 확인 |
|
|
28
|
+
|
|
29
|
+
## Meta Index
|
|
30
|
+
|
|
31
|
+
| Command | Description |
|
|
32
|
+
|---------|-------------|
|
|
33
|
+
| `tsq mi rebuild` | 전체 코드+UI 인덱스 재구축 |
|
|
34
|
+
| `tsq mi update` | 변경분만 반영 |
|
|
35
|
+
| `tsq mi stats` | 통계 (Health Score) |
|
|
36
|
+
| `tsq mi stage <file>` | semantic 데이터 추가 |
|
|
37
|
+
| `tsq mi query` | 인덱스 조회 |
|
|
38
|
+
| `tsq mi validate` | semantic 완성도 검증 |
|
|
39
|
+
|
|
40
|
+
## Log System
|
|
41
|
+
|
|
42
|
+
| Command | Description |
|
|
43
|
+
|---------|-------------|
|
|
44
|
+
| `tsq log add <agent> <type> "msg"` | 로그 추가 |
|
|
45
|
+
| `tsq log enrich <agent> --json` | semantic 데이터 병합 |
|
|
46
|
+
| `tsq log task list` | L1 태스크 로그 목록 |
|
|
47
|
+
| `tsq log sequence create` | L2 시퀀스 로그 생성 |
|
|
48
|
+
| `tsq log phase create` | L3 페이즈 로그 생성 |
|
|
49
|
+
| `tsq log phase gate <id>` | L3 전환 게이트 |
|
|
50
|
+
|
|
51
|
+
## Workflow
|
|
52
|
+
|
|
53
|
+
| Command | Description |
|
|
54
|
+
|---------|-------------|
|
|
55
|
+
| `tsq wf set-phase <id>` | 현재 Phase 설정 |
|
|
56
|
+
| `tsq wf add-sequence <id>` | 시퀀스 등록 |
|
|
57
|
+
| `tsq wf status` | 워크플로우 상태 |
|
|
58
|
+
| `tsq wf config <key> <on\|off>` | 자동화 토글 |
|
|
59
|
+
|
|
60
|
+
## Knowledge & Audit
|
|
61
|
+
|
|
62
|
+
| Command | Description |
|
|
63
|
+
|---------|-------------|
|
|
64
|
+
| `tsq knowledge validate` | 지식 파일 검증 |
|
|
65
|
+
| `tsq knowledge list` | 지식 파일 목록 |
|
|
66
|
+
| `tsq audit validate` | 감사 리포트 검증 |
|
|
67
|
+
| `tsq audit diff` | 감사 전후 비교 |
|
|
68
|
+
|
|
69
|
+
## Resources
|
|
70
|
+
|
|
71
|
+
| Priority | Type | Resource | Description |
|
|
72
|
+
|----------|------|----------|-------------|
|
|
73
|
+
| HIGH | ref | [cli-reference](references/cli-reference.md) | 전체 커맨드 상세 옵션 |
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TSQ CLI Full Reference
|
|
3
|
+
category: reference
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TSQ CLI Full Reference
|
|
7
|
+
|
|
8
|
+
## tsq init
|
|
9
|
+
```bash
|
|
10
|
+
tsq init --type web-service # 프로젝트 초기화
|
|
11
|
+
tsq init -n my-project -t web-app -l 2 --domain general-web
|
|
12
|
+
tsq init --stack react,node,prisma --workspaces "packages/*"
|
|
13
|
+
tsq init -y # 대화형 프롬프트 스킵
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Options:
|
|
17
|
+
- `-n, --name <name>` — 프로젝트명
|
|
18
|
+
- `-t, --type <type>` — web-service|web-app|api-backend|platform|fintech|infra|mobile-app
|
|
19
|
+
- `-l, --level <level>` — 1(MVP)|2(Standard)|3(Enterprise)
|
|
20
|
+
- `--domain <domain>` — general-web|ml-engineering|fintech|mobile|gamedev|systems
|
|
21
|
+
- `--stack <items>` — 기술 스택 (콤마 구분)
|
|
22
|
+
- `--workspaces <pattern>` — 모노레포 워크스페이스 glob
|
|
23
|
+
- `-y, --yes` — 확인 프롬프트 스킵
|
|
24
|
+
|
|
25
|
+
## tsq status
|
|
26
|
+
```bash
|
|
27
|
+
tsq status # 프로젝트 상태 확인
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## tsq q / tsq f
|
|
31
|
+
```bash
|
|
32
|
+
tsq q "버튼 색상 변경" # Quick 모드 — 간단한 작업
|
|
33
|
+
tsq f "새 기능 추가" # Full 모드 — SSOT 기반 작업
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Meta Index (tsq mi)
|
|
37
|
+
```bash
|
|
38
|
+
tsq mi rebuild # 전체 코드+UI 인덱스 재구축
|
|
39
|
+
tsq mi update # 변경분만 반영
|
|
40
|
+
tsq mi stats # 통계 (Health Score, UI Health)
|
|
41
|
+
tsq mi stage <file> [options] # semantic 데이터 추가
|
|
42
|
+
tsq mi query [options] # 인덱스 조회
|
|
43
|
+
tsq mi validate # semantic 완성도 검증
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Log (L1/L2/L3)
|
|
47
|
+
```bash
|
|
48
|
+
tsq log add <agent> work "msg" # 작업 로그 추가
|
|
49
|
+
tsq log add <agent> decision "msg" # 결정 로그 추가
|
|
50
|
+
tsq log enrich <agent> --json '{...}' # semantic 데이터 병합
|
|
51
|
+
tsq log task list [--agent <name>] # L1 태스크 로그 목록
|
|
52
|
+
tsq log task view <file> # L1 태스크 로그 상세
|
|
53
|
+
tsq log task stats # L1 통계
|
|
54
|
+
tsq log sequence create <seq-id> --phase <id> --report <path> # L2 생성
|
|
55
|
+
tsq log sequence list # L2 목록
|
|
56
|
+
tsq log sequence check <seq-id> # L1 완성도 확인
|
|
57
|
+
tsq log phase create <phase-id> --sequences "..." # L3 생성
|
|
58
|
+
tsq log phase gate <phase-id> # L3 전환 게이트
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Knowledge
|
|
62
|
+
```bash
|
|
63
|
+
tsq knowledge create <category> <name> # 지식 파일 생성
|
|
64
|
+
tsq knowledge validate # 지식 파일 검증
|
|
65
|
+
tsq knowledge list # 지식 파일 목록
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Workflow (tsq wf)
|
|
69
|
+
```bash
|
|
70
|
+
tsq wf set-phase <phase-id> # Phase 설정
|
|
71
|
+
tsq wf add-sequence <seq-id> --agents "developer,dba" # 시퀀스 등록
|
|
72
|
+
tsq wf remove-sequence <seq-id> # 시퀀스 제거
|
|
73
|
+
tsq wf status # 상태 확인
|
|
74
|
+
tsq wf config <key> <on|off> # 자동화 토글
|
|
75
|
+
# keys: sequence_log, phase_log, phase_gate, metrics, retro
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Audit
|
|
79
|
+
```bash
|
|
80
|
+
tsq audit validate <report> # 감사 리포트 검증
|
|
81
|
+
tsq audit diff <before> <after> # 감사 전후 비교
|
|
82
|
+
tsq audit fp list # FP Registry 목록
|
|
83
|
+
tsq audit fp add <item> --reason "msg" # FP 등록
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Other
|
|
87
|
+
```bash
|
|
88
|
+
tsq feedback "이슈 설명" # 피드백 제출
|
|
89
|
+
tsq commit -m "메시지" # 커밋 (developer/dba만)
|
|
90
|
+
tsq retro # 회고 실행
|
|
91
|
+
tsq metrics # 메트릭 확인
|
|
92
|
+
```
|
|
@@ -6,46 +6,62 @@ description: |
|
|
|
6
6
|
자동 주입 스킬 — 직접 호출하지 마세요.
|
|
7
7
|
version: "1.0.0"
|
|
8
8
|
tags: [tsq, protocol, agent]
|
|
9
|
+
depends_on: []
|
|
10
|
+
conflicts_with: []
|
|
9
11
|
user-invocable: false
|
|
10
12
|
---
|
|
11
13
|
|
|
12
14
|
# TSQ Agent Protocol
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
코드 탐색 시 `.timsquad/.daemon/task-context.json`을 **먼저** 확인하세요.
|
|
16
|
-
이 파일에 작업 범위의 파일/메서드/클래스 위치가 정리되어 있습니다.
|
|
17
|
-
context 파일이 없거나 범위 밖 파일이 필요할 때만 Grep/Glob을 사용하세요.
|
|
16
|
+
에이전트가 TimSquad 시스템 내에서 따라야 하는 공통 프로토콜.
|
|
18
17
|
|
|
19
|
-
##
|
|
18
|
+
## Philosophy
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
- TSQ CLI를 통해서만 로그/피드백/커밋 수행
|
|
21
|
+
- task-context.json을 우선 탐색하여 불필요한 탐색 최소화
|
|
22
|
+
- 피드백은 반드시 Level 분류를 명시
|
|
22
23
|
|
|
24
|
+
## Contract
|
|
25
|
+
|
|
26
|
+
- **Trigger**: 모든 에이전트 세션 (자동 활성)
|
|
27
|
+
- **Input**: 태스크 지시 + task-context.json
|
|
28
|
+
- **Output**: TSQ 프로세스 준수 작업 결과
|
|
29
|
+
- **Error**: 프로토콜 위반 시 경고 + 수정 안내
|
|
30
|
+
- **Dependencies**: 없음
|
|
31
|
+
|
|
32
|
+
## Protocol
|
|
33
|
+
|
|
34
|
+
1. **task-context 확인**: `.timsquad/.daemon/task-context.json` 우선 읽기
|
|
35
|
+
2. **TSQ CLI 사용**: 로그/피드백/커밋 모두 CLI 경유
|
|
36
|
+
3. **피드백 라우팅**: Level 분류 후 적절한 대상에 전달
|
|
37
|
+
|
|
38
|
+
## Verification
|
|
39
|
+
|
|
40
|
+
| Check | Command | Pass Criteria |
|
|
41
|
+
|-------|---------|---------------|
|
|
42
|
+
| TSQ CLI 사용 | `tsq log` 사용 여부 | 직접 파일 조작 0건 |
|
|
43
|
+
| 피드백 Level | 피드백 내용 확인 | L1/L2/L3 분류 존재 |
|
|
44
|
+
| task-context | 탐색 순서 확인 | context 우선 사용 |
|
|
45
|
+
|
|
46
|
+
## Quick Rules
|
|
47
|
+
|
|
48
|
+
### CLI Commands
|
|
23
49
|
| 이벤트 | 커맨드 |
|
|
24
50
|
|--------|--------|
|
|
25
51
|
| 작업 시작 | `tsq log add {agent} work "TASK-XXX 시작: {설명}"` |
|
|
26
52
|
| 결정 기록 | `tsq log add {agent} decision "{결정 근거}"` |
|
|
27
53
|
| 이슈 발견 | `tsq feedback "{이슈 설명}"` |
|
|
28
54
|
| 작업 완료 | `tsq log add {agent} work "TASK-XXX 완료: {결과}"` |
|
|
29
|
-
| semantic 보강 | `tsq log enrich {agent} --json '{...}'` |
|
|
30
55
|
| 커밋 | `tsq commit -m "{메시지}"` (developer/dba만) |
|
|
31
56
|
|
|
32
57
|
### Forbidden
|
|
33
|
-
- 직접 `.timsquad/logs/` 파일
|
|
34
|
-
- 직접 `.timsquad/feedback/` 파일
|
|
35
|
-
- 직접 `git commit`
|
|
36
|
-
|
|
37
|
-
## Output Format
|
|
38
|
-
작업 결과는 `knowledge/templates/task-result.md` 형식으로 리턴하세요.
|
|
39
|
-
|
|
40
|
-
## Feedback Routing
|
|
41
|
-
|
|
42
|
-
| Level | 심각도 | 기준 | 라우팅 |
|
|
43
|
-
|-------|--------|------|--------|
|
|
44
|
-
| L1 | Minor | 즉시 수정 가능 (린트, 타입, 스타일) | 자체 수정 또는 @tsq-developer |
|
|
45
|
-
| L2 | Major | 설계 변경 필요 (API 불일치, 성능 구조) | 메인세션(PM) 보고 |
|
|
46
|
-
| L3 | Critical | 요구사항 오류, 스코프 변경, 데이터 손실 위험 | 메인세션(PM) → 사용자 승인 |
|
|
47
|
-
|
|
48
|
-
모든 피드백에 Level 분류와 심각도를 반드시 명시하세요.
|
|
58
|
+
- 직접 `.timsquad/logs/` 파일 조작 → `tsq log` 사용
|
|
59
|
+
- 직접 `.timsquad/feedback/` 파일 조작 → `tsq feedback` 사용
|
|
60
|
+
- 직접 `git commit` → `tsq commit` 사용
|
|
49
61
|
|
|
50
|
-
|
|
51
|
-
|
|
62
|
+
### Feedback Routing
|
|
63
|
+
| Level | 기준 | 라우팅 |
|
|
64
|
+
|-------|------|--------|
|
|
65
|
+
| L1 | 즉시 수정 가능 (린트, 타입) | 자체 수정 |
|
|
66
|
+
| L2 | 설계 변경 필요 | 메인세션(PM) 보고 |
|
|
67
|
+
| L3 | 요구사항 오류, 스코프 변경 | 메인세션 → 사용자 승인 |
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: typescript
|
|
3
|
-
description:
|
|
3
|
+
description: |
|
|
4
|
+
TypeScript 개발 가이드라인. strict 모드, 타입 패턴, Zod 검증, Branded Types.
|
|
5
|
+
Use when: .ts/.tsx 파일 작성·수정, tsconfig 설정, 타입 안전성 이슈, any 제거, 외부 입력 검증 시.
|
|
4
6
|
version: "1.0.0"
|
|
5
7
|
tags: [typescript, types, strict]
|
|
6
8
|
user-invocable: false
|
|
@@ -54,14 +56,6 @@ user-invocable: false
|
|
|
54
56
|
- `@ts-ignore`, `@ts-expect-error` 남용
|
|
55
57
|
- `!` non-null assertion 남용
|
|
56
58
|
|
|
57
|
-
## Checklist
|
|
58
|
-
- [ ] strict 모드 활성화
|
|
59
|
-
- [ ] any 타입 없음
|
|
60
|
-
- [ ] 함수 반환 타입 명시
|
|
61
|
-
- [ ] 외부 입력 Zod 검증
|
|
62
|
-
- [ ] Discriminated Union으로 상태 표현
|
|
63
|
-
- [ ] Branded Types로 ID 구분
|
|
64
|
-
|
|
65
59
|
## 참조
|
|
66
60
|
- `rules/type-patterns.md` — 각 패턴의 코드 예시
|
|
67
61
|
- `rules/utility-types.md` — DTO 조합, DeepPartial, 타입 안전 API 클라이언트
|
|
@@ -178,7 +178,17 @@ describe('UserService', () => {
|
|
|
178
178
|
|
|
179
179
|
---
|
|
180
180
|
|
|
181
|
-
## 5. 테스트
|
|
181
|
+
## 5. 테스트 게이트
|
|
182
|
+
|
|
183
|
+
TimSquad 워크플로우에서 자동 실행되는 테스트 게이트 설정.
|
|
184
|
+
|
|
185
|
+
### 5.0 게이트별 실행 명령
|
|
186
|
+
|
|
187
|
+
| 게이트 | 실행 시점 | 명령 | 타임아웃 |
|
|
188
|
+
|--------|----------|------|---------|
|
|
189
|
+
| Task (Unit) | Task 완료 시 | `npm run test:unit` | 120s |
|
|
190
|
+
| Sequence (Integration + Build) | Sequence 완료 시 | `npm run test:integration` + `tsc --noEmit` | 300s |
|
|
191
|
+
| Phase (E2E) | Phase 완료 시 | `npm run test:e2e` | 300s |
|
|
182
192
|
|
|
183
193
|
### 5.1 CI 파이프라인
|
|
184
194
|
|