triples-agentic 2.4.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/LICENSE +21 -0
- package/README.md +326 -0
- package/docs/workflow.md +163 -0
- package/install.sh +98 -0
- package/package.json +54 -0
- package/src/agents/README.md +85 -0
- package/src/agents/jiwoo-prd.md +84 -0
- package/src/agents/kaede-backend.md +95 -0
- package/src/agents/kotone-flutter.md +100 -0
- package/src/agents/lynn-testcase.md +92 -0
- package/src/agents/nakyoung-tasks.md +89 -0
- package/src/agents/seoyeon.md +76 -0
- package/src/agents/shion-qa.md +89 -0
- package/src/agents/sohyun-ios.md +97 -0
- package/src/agents/yeonji-android.md +98 -0
- package/src/agents/yooyeon-rfc.md +82 -0
- package/src/agents/yubin-frontend.md +88 -0
- package/src/bin/setup.js +640 -0
- package/src/hooks/README.md +102 -0
- package/src/hooks/dangerous-commands.json +33 -0
- package/src/hooks/dangerous-commands.md +18 -0
- package/src/knowledge/README.md +129 -0
- package/src/knowledge/general/boy-scout-rule.md +13 -0
- package/src/knowledge/general/composition-over-inheritance.md +14 -0
- package/src/knowledge/general/dry.md +14 -0
- package/src/knowledge/general/fail-fast.md +13 -0
- package/src/knowledge/general/kiss.md +15 -0
- package/src/knowledge/general/least-surprise.md +13 -0
- package/src/knowledge/general/slap.md +29 -0
- package/src/knowledge/general/solid.md +44 -0
- package/src/knowledge/general/tdd.md +76 -0
- package/src/knowledge/general/yagni.md +12 -0
- package/src/knowledge/mobile/android/android-architecture.md +83 -0
- package/src/knowledge/mobile/android/android-platform.md +60 -0
- package/src/knowledge/mobile/android/kotlin-concurrency.md +75 -0
- package/src/knowledge/mobile/android/kotlin-core.md +88 -0
- package/src/knowledge/mobile/flutter/dart-async.md +93 -0
- package/src/knowledge/mobile/flutter/dart-core.md +97 -0
- package/src/knowledge/mobile/flutter/flutter-architecture.md +88 -0
- package/src/knowledge/mobile/flutter/flutter-platform.md +79 -0
- package/src/knowledge/mobile/ios/ios-architecture.md +88 -0
- package/src/knowledge/mobile/ios/ios-platform.md +66 -0
- package/src/knowledge/mobile/ios/swift-concurrency.md +99 -0
- package/src/knowledge/mobile/ios/swift-core.md +79 -0
- package/src/knowledge/planning/architecture-database.md +47 -0
- package/src/knowledge/planning/architecture-patterns.md +64 -0
- package/src/knowledge/planning/architecture-security.md +61 -0
- package/src/knowledge/planning/estimation.md +82 -0
- package/src/knowledge/planning/orchestration.md +70 -0
- package/src/knowledge/planning/prd-quality-gates.md +38 -0
- package/src/knowledge/planning/prd-writing.md +59 -0
- package/src/knowledge/planning/product-principles.md +48 -0
- package/src/knowledge/planning/product-prioritization.md +45 -0
- package/src/knowledge/planning/rfc-quality-gates.md +38 -0
- package/src/knowledge/planning/rfc-writing.md +81 -0
- package/src/knowledge/planning/task-decomposition.md +61 -0
- package/src/knowledge/planning/task-readiness.md +64 -0
- package/src/knowledge/quality/qa-execution.md +55 -0
- package/src/knowledge/quality/qa-reporting.md +71 -0
- package/src/knowledge/quality/test-case-quality.md +61 -0
- package/src/knowledge/quality/test-case-writing.md +76 -0
- package/src/knowledge/quality/testing-strategy.md +70 -0
- package/src/knowledge/quality/testing-types.md +84 -0
- package/src/knowledge/web/backend/api-design.md +74 -0
- package/src/knowledge/web/backend/api-security.md +54 -0
- package/src/knowledge/web/backend/backend-security.md +84 -0
- package/src/knowledge/web/backend/backend-structure.md +78 -0
- package/src/knowledge/web/frontend/frontend-components.md +49 -0
- package/src/knowledge/web/frontend/frontend-performance.md +41 -0
- package/src/knowledge/web/frontend/frontend-state.md +59 -0
- package/src/knowledge/web/frontend/web-accessibility.md +51 -0
- package/src/knowledge/web/frontend/web-performance.md +51 -0
- package/src/knowledge/web/frontend/web-security.md +59 -0
- package/src/templates/prd.md +109 -0
- package/src/templates/rfc.md +156 -0
- package/src/templates/task-breakdown.md +172 -0
- package/src/templates/test-case.md +157 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ios-platform
|
|
3
|
+
description: Apple Human Interface Guidelines compliance, local storage patterns, iOS testing, and App Store requirements
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# iOS — Platform & Distribution
|
|
7
|
+
|
|
8
|
+
## Apple Human Interface Guidelines (HIG) Compliance
|
|
9
|
+
|
|
10
|
+
- **Navigation**: use `NavigationStack` (iOS 16+); respect back button behavior
|
|
11
|
+
- **Tab bars**: 3–5 tabs maximum; icons must have text labels
|
|
12
|
+
- **Modals**: use for tasks that interrupt workflow; always provide a dismiss mechanism
|
|
13
|
+
- **Typography**: use Dynamic Type — never hardcode font sizes
|
|
14
|
+
- **Color**: use semantic colors (`Color(.systemBackground)`, `.label`) for automatic dark mode
|
|
15
|
+
- **Safe areas**: always respect safe area insets; never overlap system chrome
|
|
16
|
+
- **Touch targets**: minimum 44×44pt for all interactive elements
|
|
17
|
+
|
|
18
|
+
## Modifier Order Convention
|
|
19
|
+
|
|
20
|
+
```swift
|
|
21
|
+
Text("Hello")
|
|
22
|
+
.font(.headline) // 1. Typography
|
|
23
|
+
.foregroundColor(.blue) // 2. Color
|
|
24
|
+
.padding() // 3. Internal spacing
|
|
25
|
+
.background(.gray) // 4. Background
|
|
26
|
+
.cornerRadius(8) // 5. Shape
|
|
27
|
+
.padding(.horizontal) // 6. External spacing
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Local Storage
|
|
31
|
+
|
|
32
|
+
| Use case | Solution |
|
|
33
|
+
|---|---|
|
|
34
|
+
| Complex relational data | Core Data or SwiftData (iOS 17+) |
|
|
35
|
+
| Simple settings | UserDefaults |
|
|
36
|
+
| Sensitive data (tokens, passwords) | Keychain |
|
|
37
|
+
| Files, documents | FileManager |
|
|
38
|
+
|
|
39
|
+
Never store credentials in UserDefaults.
|
|
40
|
+
|
|
41
|
+
## Testing
|
|
42
|
+
|
|
43
|
+
- **XCTest / Swift Testing** (Xcode 16+): unit tests for ViewModels, use cases, utilities
|
|
44
|
+
- **XCUITest**: E2E UI testing for critical user flows
|
|
45
|
+
- Mock with protocols — inject dependencies via initializer, not global singletons
|
|
46
|
+
|
|
47
|
+
```swift
|
|
48
|
+
// Protocol-based mocking
|
|
49
|
+
protocol UserRepository {
|
|
50
|
+
func fetchUser(id: String) async throws -> User
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
class MockUserRepository: UserRepository {
|
|
54
|
+
var mockUser: User = .mock
|
|
55
|
+
func fetchUser(id: String) async throws -> User { mockUser }
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## App Store Requirements
|
|
60
|
+
|
|
61
|
+
- **Privacy manifest** (`PrivacyInfo.xcprivacy`) required for all new apps
|
|
62
|
+
- **Privacy nutrition labels** must accurately reflect data collection
|
|
63
|
+
- **In-app purchases** must use StoreKit (no external payment links for digital goods)
|
|
64
|
+
- **Age-appropriate design** requirements for apps targeting children
|
|
65
|
+
- **Screenshots** required for every supported device size
|
|
66
|
+
- **App Review Guidelines section 4.0**: apps must follow iOS design patterns
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: swift-concurrency
|
|
3
|
+
description: Swift async/await, structured concurrency, actors, protocols, generics, and memory management (ARC)
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Swift — Concurrency & Advanced Patterns
|
|
7
|
+
|
|
8
|
+
## async/await
|
|
9
|
+
|
|
10
|
+
```swift
|
|
11
|
+
// Async function
|
|
12
|
+
func fetchUser(id: String) async throws -> User {
|
|
13
|
+
let (data, _) = try await URLSession.shared.data(from: url)
|
|
14
|
+
return try JSONDecoder().decode(User.self, from: data)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Calling async code
|
|
18
|
+
Task {
|
|
19
|
+
do {
|
|
20
|
+
let user = try await fetchUser(id: "123")
|
|
21
|
+
await MainActor.run { self.user = user }
|
|
22
|
+
} catch { print("Error: \(error)") }
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Parallel execution
|
|
26
|
+
async let userFetch = fetchUser(id: userId)
|
|
27
|
+
async let ordersFetch = fetchOrders(userId: userId)
|
|
28
|
+
let (user, orders) = try await (userFetch, ordersFetch)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## @MainActor
|
|
32
|
+
|
|
33
|
+
UI updates must happen on the main actor:
|
|
34
|
+
|
|
35
|
+
```swift
|
|
36
|
+
@MainActor
|
|
37
|
+
func updateUI(with user: User) {
|
|
38
|
+
self.nameLabel.text = user.name // safe on main thread
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ViewModel marked as @MainActor
|
|
42
|
+
@MainActor
|
|
43
|
+
class ProfileViewModel: ObservableObject {
|
|
44
|
+
@Published var user: User?
|
|
45
|
+
func load() async { user = try? await userRepo.fetch() }
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Protocols & Generics
|
|
50
|
+
|
|
51
|
+
```swift
|
|
52
|
+
// Protocol with associated type
|
|
53
|
+
protocol Repository {
|
|
54
|
+
associatedtype Model
|
|
55
|
+
func fetch(id: String) async throws -> Model
|
|
56
|
+
func save(_ model: Model) async throws
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Generic function
|
|
60
|
+
func first<T>(in array: [T], where condition: (T) -> Bool) -> T? {
|
|
61
|
+
array.first(where: condition)
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Memory Management (ARC)
|
|
66
|
+
|
|
67
|
+
- ARC manages memory automatically — no manual `malloc`/`free`
|
|
68
|
+
- **Retain cycles**: break with `weak` or `unowned` in closures
|
|
69
|
+
|
|
70
|
+
```swift
|
|
71
|
+
class MyClass {
|
|
72
|
+
var closure: (() -> Void)?
|
|
73
|
+
|
|
74
|
+
func setup() {
|
|
75
|
+
closure = { [weak self] in // prevents retain cycle
|
|
76
|
+
self?.doSomething()
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
- `weak`: nullable, use when referenced object may be deallocated
|
|
83
|
+
- `unowned`: non-nullable, use only when certain the object outlives the reference
|
|
84
|
+
|
|
85
|
+
## Mixins (Protocol Extensions)
|
|
86
|
+
|
|
87
|
+
```swift
|
|
88
|
+
protocol Serializable {
|
|
89
|
+
func toJson() -> [String: Any]
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
extension Serializable {
|
|
93
|
+
func toJsonString() -> String {
|
|
94
|
+
(try? JSONSerialization.data(withJSONObject: toJson())).flatMap {
|
|
95
|
+
String(data: $0, encoding: .utf8)
|
|
96
|
+
} ?? "{}"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: swift-core
|
|
3
|
+
description: Swift optionals, value vs reference types, error handling, and the Swift API Design Guidelines
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Swift — Core Language
|
|
7
|
+
|
|
8
|
+
## Optionals
|
|
9
|
+
|
|
10
|
+
```swift
|
|
11
|
+
var name: String? = nil
|
|
12
|
+
|
|
13
|
+
// Optional binding (preferred)
|
|
14
|
+
if let name = name { print("Name: \(name)") }
|
|
15
|
+
|
|
16
|
+
// Guard (preferred for early exits)
|
|
17
|
+
guard let name = name else { return }
|
|
18
|
+
|
|
19
|
+
// Nil coalescing
|
|
20
|
+
let displayName = name ?? "Anonymous"
|
|
21
|
+
|
|
22
|
+
// Optional chaining
|
|
23
|
+
let count = name?.count
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Value Types vs Reference Types
|
|
27
|
+
|
|
28
|
+
```swift
|
|
29
|
+
// Struct (value type) — prefer for data models
|
|
30
|
+
struct User {
|
|
31
|
+
var id: String
|
|
32
|
+
var name: String
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Class (reference type) — use for shared mutable state, ViewModels
|
|
36
|
+
class UserViewModel: ObservableObject {
|
|
37
|
+
@Published var user: User?
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Enum with associated values
|
|
41
|
+
enum PaymentMethod {
|
|
42
|
+
case creditCard(last4: String)
|
|
43
|
+
case paypal(email: String)
|
|
44
|
+
case applePay
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Error Handling
|
|
49
|
+
|
|
50
|
+
```swift
|
|
51
|
+
enum AuthError: Error, LocalizedError {
|
|
52
|
+
case invalidCredentials
|
|
53
|
+
case networkUnavailable
|
|
54
|
+
|
|
55
|
+
var errorDescription: String? {
|
|
56
|
+
switch self {
|
|
57
|
+
case .invalidCredentials: return "Invalid email or password"
|
|
58
|
+
case .networkUnavailable: return "No internet connection"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Throw and catch
|
|
64
|
+
do {
|
|
65
|
+
let token = try await login(email: email, password: password)
|
|
66
|
+
} catch AuthError.invalidCredentials {
|
|
67
|
+
showError("Check your email and password")
|
|
68
|
+
} catch {
|
|
69
|
+
showError(error.localizedDescription)
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Swift API Design Guidelines
|
|
74
|
+
|
|
75
|
+
- **Clarity at the call site**: `x.insert(y, at: z)` reads better than `x.insert(y, z)`
|
|
76
|
+
- **Name methods for their side effects**: mutating → verb (`append`); non-mutating → noun (`sorted`)
|
|
77
|
+
- **Boolean names read as assertions**: `isEmpty`, `isValid`, `canSubmit`
|
|
78
|
+
- **Parameter labels clarify arguments**: `move(from: a, to: b)` not `move(a, b)`
|
|
79
|
+
- **Avoid abbreviations**: `numberOfLines` not `numLines`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture-database
|
|
3
|
+
description: Database selection guide, scalability checklist, and observability stack for production systems
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Architecture — Database & Scalability
|
|
7
|
+
|
|
8
|
+
## Database Selection Guide
|
|
9
|
+
|
|
10
|
+
| Need | Recommended | Why |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| Relational data, ACID transactions | PostgreSQL | Industry standard, excellent tooling |
|
|
13
|
+
| Simple key-value cache | Redis | Fast, well-supported |
|
|
14
|
+
| Document storage, flexible schema | MongoDB | Schema flexibility, good horizontal scaling |
|
|
15
|
+
| Full-text search | Elasticsearch / Meilisearch | Built for search |
|
|
16
|
+
| Time-series data | TimescaleDB / InfluxDB | Efficient for append-heavy, time-indexed data |
|
|
17
|
+
| Graph relationships | Neo4j | Native graph traversal |
|
|
18
|
+
|
|
19
|
+
**Default to PostgreSQL** unless there is a specific, documented reason not to.
|
|
20
|
+
|
|
21
|
+
## Scalability Checklist
|
|
22
|
+
|
|
23
|
+
Before designing for scale, verify you actually need it. Then:
|
|
24
|
+
- [ ] Stateless application servers (scale horizontally, not vertically)
|
|
25
|
+
- [ ] Database read replicas for read-heavy workloads
|
|
26
|
+
- [ ] CDN for static assets
|
|
27
|
+
- [ ] Caching layer (Redis) for expensive computed results
|
|
28
|
+
- [ ] Async queues for long-running tasks
|
|
29
|
+
- [ ] Rate limiting at API gateway
|
|
30
|
+
|
|
31
|
+
## Observability Stack
|
|
32
|
+
|
|
33
|
+
Every production system needs:
|
|
34
|
+
- **Logging**: structured JSON logs, correlation IDs across service calls
|
|
35
|
+
- **Metrics**: request rate, error rate, latency (p50/p95/p99)
|
|
36
|
+
- **Tracing**: distributed trace IDs through all service hops
|
|
37
|
+
- **Alerting**: page on error rate spikes and latency degradation — not on CPU%
|
|
38
|
+
|
|
39
|
+
## Background Jobs
|
|
40
|
+
|
|
41
|
+
Use queues (BullMQ, Sidekiq, Celery) for:
|
|
42
|
+
- Email/notification sending
|
|
43
|
+
- File processing
|
|
44
|
+
- External API calls with retries
|
|
45
|
+
- Report generation
|
|
46
|
+
|
|
47
|
+
Every job must: log start/end, handle errors gracefully, be idempotent (safe to retry).
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture-patterns
|
|
3
|
+
description: Software architecture patterns (layered, event-driven, microservices, CQRS) with trade-off analysis
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Architecture Patterns
|
|
7
|
+
|
|
8
|
+
## Foundational Principles
|
|
9
|
+
|
|
10
|
+
1. **Simple before clever.** A boring, well-understood pattern that works beats an elegant abstraction that surprises the team.
|
|
11
|
+
2. **Design for failure.** Every external call can fail. Every database can go down. Design the happy path last.
|
|
12
|
+
3. **Defer decisions.** Don't choose a message queue before you know you need one. Premature architecture is technical debt with extra steps.
|
|
13
|
+
4. **Observability first.** If you can't measure it, you can't debug it in production.
|
|
14
|
+
|
|
15
|
+
## Common Architectural Patterns
|
|
16
|
+
|
|
17
|
+
### Layered (N-Tier)
|
|
18
|
+
```
|
|
19
|
+
Presentation → Application / Business Logic → Data Access → Storage
|
|
20
|
+
```
|
|
21
|
+
- Best for: CRUD-heavy applications, well-understood domains
|
|
22
|
+
- Trade-off: Layer coupling, hard to scale individual layers
|
|
23
|
+
|
|
24
|
+
### Event-Driven
|
|
25
|
+
```
|
|
26
|
+
Producer → Event Bus → Consumer(s)
|
|
27
|
+
```
|
|
28
|
+
- Best for: Decoupled services, audit trails, async workflows
|
|
29
|
+
- Trade-off: Eventual consistency, harder to debug
|
|
30
|
+
|
|
31
|
+
### Microservices
|
|
32
|
+
```
|
|
33
|
+
API Gateway → Service A, Service B, Service C (each with own DB)
|
|
34
|
+
```
|
|
35
|
+
- Best for: Teams that need to deploy independently, mixed tech stacks
|
|
36
|
+
- Trade-off: Network overhead, distributed tracing complexity, operational burden
|
|
37
|
+
|
|
38
|
+
### Monolith (Recommended for v1)
|
|
39
|
+
```
|
|
40
|
+
Single deployable unit: routes + business logic + DB access
|
|
41
|
+
```
|
|
42
|
+
- Best for: Early-stage products, small teams, fast iteration
|
|
43
|
+
- Trade-off: Harder to scale specific hotspots as traffic grows
|
|
44
|
+
|
|
45
|
+
### CQRS (Command Query Responsibility Segregation)
|
|
46
|
+
```
|
|
47
|
+
Write path: Command → Aggregate → Event → Write Store
|
|
48
|
+
Read path: Read Store (denormalized views)
|
|
49
|
+
```
|
|
50
|
+
- Best for: High-read systems with complex reporting needs
|
|
51
|
+
- Trade-off: Two models to maintain, eventual consistency
|
|
52
|
+
|
|
53
|
+
## API Design Patterns
|
|
54
|
+
|
|
55
|
+
### REST
|
|
56
|
+
- Resources are nouns, HTTP verbs define actions
|
|
57
|
+
- `GET /users/123` — read; `POST /users` — create; `PATCH /users/123` — update
|
|
58
|
+
- Status codes: 200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, 404 Not Found, 500 Internal Server Error
|
|
59
|
+
- Pagination: cursor-based preferred over offset for large datasets
|
|
60
|
+
|
|
61
|
+
### GraphQL
|
|
62
|
+
- Single endpoint, client specifies exact data shape
|
|
63
|
+
- Use when: multiple clients (web, mobile) with different data needs
|
|
64
|
+
- Avoid when: simple CRUD, team unfamiliar with the overhead
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture-security
|
|
3
|
+
description: Security fundamentals for system design — authentication, authorization, secrets management, and input validation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Architecture — Security Fundamentals
|
|
7
|
+
|
|
8
|
+
## Authentication
|
|
9
|
+
|
|
10
|
+
- **JWT**: stateless APIs; access token (15–60 min) + refresh token (7–30 days, httpOnly cookie)
|
|
11
|
+
- **Session cookies**: server-rendered apps with stateful sessions
|
|
12
|
+
- Never store JWTs in localStorage (XSS risk)
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
1. Client sends credentials → POST /auth/login
|
|
16
|
+
2. Server validates → returns { access_token, refresh_token }
|
|
17
|
+
3. Client sends: Authorization: Bearer <access_token>
|
|
18
|
+
4. Server validates JWT signature + expiry on every request
|
|
19
|
+
5. Refresh via POST /auth/refresh with refresh_token
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Authorization
|
|
23
|
+
|
|
24
|
+
### RBAC (Role-Based Access Control)
|
|
25
|
+
```
|
|
26
|
+
User → has Role(s) → Role has Permissions → Permission gates resources/actions
|
|
27
|
+
```
|
|
28
|
+
Check authorization in the service layer, not the route handler.
|
|
29
|
+
|
|
30
|
+
### ABAC (Attribute-Based Access Control)
|
|
31
|
+
Use only for complex policy requirements where RBAC becomes unmanageable.
|
|
32
|
+
|
|
33
|
+
## Secrets Management
|
|
34
|
+
|
|
35
|
+
- **Never** commit secrets to version control
|
|
36
|
+
- Use environment variables + secrets manager (HashiCorp Vault, AWS SSM, GCP Secret Manager)
|
|
37
|
+
- Rotate secrets on a schedule; immediately on suspected leak
|
|
38
|
+
- Different secrets per environment (dev/staging/prod)
|
|
39
|
+
|
|
40
|
+
## Input Validation
|
|
41
|
+
|
|
42
|
+
- Validate and sanitize **at the API boundary** — never trust client input
|
|
43
|
+
- Use parameterized queries or ORMs — never string concatenation in SQL
|
|
44
|
+
- Validate content type, size, and shape before processing files/uploads
|
|
45
|
+
- Sanitize HTML output; never use `innerHTML` with user content
|
|
46
|
+
|
|
47
|
+
## Transport Security
|
|
48
|
+
|
|
49
|
+
- **HTTPS everywhere**: TLS 1.2 minimum; TLS 1.3 preferred
|
|
50
|
+
- Redirect all HTTP to HTTPS; enforce with HSTS header
|
|
51
|
+
- `Strict-Transport-Security: max-age=31536000; includeSubDomains`
|
|
52
|
+
|
|
53
|
+
## Common Vulnerabilities to Prevent
|
|
54
|
+
|
|
55
|
+
| Vulnerability | Prevention |
|
|
56
|
+
|---|---|
|
|
57
|
+
| SQL Injection | Parameterized queries / ORM |
|
|
58
|
+
| XSS | Escape output; CSP headers; never innerHTML with user data |
|
|
59
|
+
| CSRF | SameSite cookies + CSRF tokens for state-changing operations |
|
|
60
|
+
| Sensitive data exposure | Encrypt at rest and in transit; never log PII or tokens |
|
|
61
|
+
| Broken access control | Enforce authorization server-side on every request |
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: estimation
|
|
3
|
+
description: Fibonacci story points, time estimates, planning poker, velocity tracking, and release planning
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Estimation Knowledge — Story Points & Time Estimates
|
|
7
|
+
|
|
8
|
+
## Story Points (Fibonacci Scale)
|
|
9
|
+
|
|
10
|
+
Story points measure **relative complexity**, not hours. The Fibonacci sequence forces meaningful gaps between sizes.
|
|
11
|
+
|
|
12
|
+
| Points | Complexity | Typical scope |
|
|
13
|
+
|--------|-----------|---------------|
|
|
14
|
+
| 1 | Trivial | Rename a field, fix a typo, update a config value |
|
|
15
|
+
| 2 | Simple | Add a new field to an existing form, write a simple API endpoint |
|
|
16
|
+
| 3 | Moderate | New CRUD feature with basic validation, simple mobile screen |
|
|
17
|
+
| 5 | Complex | Feature with multiple states, external API integration, new DB table + API |
|
|
18
|
+
| 8 | Large | New user-facing flow across multiple screens, complex business logic |
|
|
19
|
+
| 13 | Very large | Epic-level scope — should be decomposed further before sprint |
|
|
20
|
+
| 21+ | Too big | Always decompose. This is a placeholder, not an estimate. |
|
|
21
|
+
|
|
22
|
+
## Time Estimates
|
|
23
|
+
|
|
24
|
+
Pair story points with time estimates for project planning:
|
|
25
|
+
|
|
26
|
+
| Story Points | Time Estimate | Notes |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| 1 | 1–2 hours | Single developer, minimal review needed |
|
|
29
|
+
| 2 | 2–4 hours | Half-day work |
|
|
30
|
+
| 3 | 4–8 hours | Full day |
|
|
31
|
+
| 5 | 1–2 days | May span sprint boundaries |
|
|
32
|
+
| 8 | 2–4 days | Needs careful scoping before start |
|
|
33
|
+
| 13 | 1–2 weeks | Decompose before committing |
|
|
34
|
+
|
|
35
|
+
These are medians. Adjust for:
|
|
36
|
+
- **Unfamiliar technology**: +50–100%
|
|
37
|
+
- **Cross-team dependencies**: +20%
|
|
38
|
+
- **Legacy codebase**: +30–50%
|
|
39
|
+
- **Clear requirements + prior art**: -20%
|
|
40
|
+
|
|
41
|
+
## Estimation Anti-Patterns
|
|
42
|
+
|
|
43
|
+
| Anti-Pattern | Problem |
|
|
44
|
+
|---|---|
|
|
45
|
+
| Estimating in ideal hours | Ignores interruptions, meetings, reviews. Use calendar time. |
|
|
46
|
+
| PM estimating for engineers | The person doing the work estimates. Always. |
|
|
47
|
+
| Anchoring ("I think it's 3, right?") | Biases the group. Use blind voting (planning poker). |
|
|
48
|
+
| Skipping estimation for "quick tasks" | Quick tasks are where scope surprises come from. |
|
|
49
|
+
| Re-estimating mid-sprint when it's harder | Estimate once; capture actuals for calibration. |
|
|
50
|
+
|
|
51
|
+
## Planning Poker Protocol
|
|
52
|
+
|
|
53
|
+
1. Facilitator reads the story and acceptance criteria aloud
|
|
54
|
+
2. Each estimator privately selects a card (1, 2, 3, 5, 8, 13)
|
|
55
|
+
3. All cards revealed simultaneously
|
|
56
|
+
4. Outliers (highest and lowest) explain their reasoning
|
|
57
|
+
5. Re-vote until consensus or facilitator decides
|
|
58
|
+
|
|
59
|
+
## Velocity Tracking
|
|
60
|
+
|
|
61
|
+
Track actuals vs. estimates every sprint:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Sprint N: Committed 32 pts → Completed 28 pts → Velocity: 28
|
|
65
|
+
Sprint N+1: Committed 28 pts → Completed 30 pts → Velocity: 29
|
|
66
|
+
Sprint N+2: Use rolling 3-sprint average for planning capacity
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Never punish teams for lower velocity — punishment creates inflated estimates.
|
|
70
|
+
|
|
71
|
+
## Release Planning with Estimates
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Remaining story points: 150
|
|
75
|
+
Team velocity (3-sprint avg): 30 pts/sprint
|
|
76
|
+
Sprints remaining: 150 / 30 = 5 sprints
|
|
77
|
+
Sprint length: 2 weeks
|
|
78
|
+
Estimated completion: 10 weeks from today
|
|
79
|
+
Confidence: Medium (add 20% buffer = 12 weeks for a commitment)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Always present estimates as ranges, not point estimates. "8–12 weeks" is more honest than "10 weeks."
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestration
|
|
3
|
+
description: Agent workflow sequencing, delegation protocol, escalation rules, and artifact tracking
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Orchestration Knowledge — Workflow Coordination
|
|
7
|
+
|
|
8
|
+
## Role of the Engineering Manager in Agent Orchestration
|
|
9
|
+
|
|
10
|
+
The orchestrator's job is to route work, not do it. Delegate early, track progress, escalate blockers.
|
|
11
|
+
|
|
12
|
+
## Standard Workflow Sequence
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
User Input → PRD → RFC → Task Breakdown → (Dev ∥ Test Cases) → QA → Delivery
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Human review gates are mandatory at: PRD, RFC, Task Breakdown, Test Cases.
|
|
19
|
+
Development and Test Case creation run in parallel once Task Breakdown is approved.
|
|
20
|
+
|
|
21
|
+
## Delegation Protocol
|
|
22
|
+
|
|
23
|
+
When handing off to another agent, include:
|
|
24
|
+
- The artifact generated so far (path to file)
|
|
25
|
+
- The user's original intent (verbatim if possible)
|
|
26
|
+
- Any decisions already locked in
|
|
27
|
+
- Open questions the next agent should address
|
|
28
|
+
|
|
29
|
+
## Escalation Rules
|
|
30
|
+
|
|
31
|
+
Escalate to the user (not another agent) when:
|
|
32
|
+
- Two agents disagree on a foundational decision (scope, tech choice, timeline)
|
|
33
|
+
- A quality gate has been blocked for more than 2 review iterations
|
|
34
|
+
- A requirement contradicts a previously approved decision
|
|
35
|
+
|
|
36
|
+
Never silently skip a gate or merge conflicting requirements without human sign-off.
|
|
37
|
+
|
|
38
|
+
## Artifact Tracking
|
|
39
|
+
|
|
40
|
+
All artifacts land in `workspace/` at the project root:
|
|
41
|
+
```
|
|
42
|
+
workspace/
|
|
43
|
+
├── PRD.md
|
|
44
|
+
├── RFC.md
|
|
45
|
+
├── TASK_BREAKDOWN.md
|
|
46
|
+
├── TEST_CASES.md
|
|
47
|
+
└── DELIVERY_SUMMARY.md
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Reference artifacts by path, not by memory, to avoid drift between agent contexts.
|
|
51
|
+
|
|
52
|
+
## Run State
|
|
53
|
+
|
|
54
|
+
Maintain a mental model of which stage the current run is in:
|
|
55
|
+
|
|
56
|
+
| Stage | Agent | Status |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| PRD | JiWoo | pending / in-progress / review / approved |
|
|
59
|
+
| RFC | YooYeon | pending / in-progress / review / approved |
|
|
60
|
+
| Task Breakdown | NaKyoung | pending / in-progress / review / approved |
|
|
61
|
+
| Development | YuBin, Kaede, YeonJi, SoHyun, Kotone | pending / in-progress / done |
|
|
62
|
+
| Test Cases | Lynn | pending / in-progress / review / approved |
|
|
63
|
+
| QA | ShiOn | pending / in-progress / done |
|
|
64
|
+
|
|
65
|
+
## Communication Style for Engineering Managers
|
|
66
|
+
|
|
67
|
+
- Be direct. State what's happening, what's blocked, and what you need.
|
|
68
|
+
- Do not hedge. If a gate fails, say it fails. If a decision is needed, say who decides.
|
|
69
|
+
- Summarize status in terms of delivery risk, not internal process steps.
|
|
70
|
+
- Keep handoff messages short — the receiving agent reads the artifact, not your narration.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prd-quality-gates
|
|
3
|
+
description: PRD quality gate checklist, anti-patterns to avoid, and pass/fail evaluation criteria
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PRD Quality Gates & Anti-Patterns
|
|
7
|
+
|
|
8
|
+
## Quality Gates
|
|
9
|
+
|
|
10
|
+
ALL of the following must pass before a PRD is marked implementation-ready:
|
|
11
|
+
|
|
12
|
+
- [ ] **Problem statement** — clear, specific, one paragraph, explains user pain
|
|
13
|
+
- [ ] **Primary persona** — at least one user persona defined with goals and context
|
|
14
|
+
- [ ] **Feature scope** — both in-scope AND out-of-scope explicitly stated
|
|
15
|
+
- [ ] **User stories** — at least 3 stories covering core journeys
|
|
16
|
+
- [ ] **Acceptance criteria** — every major feature has measurable pass/fail criteria (no vague "works well")
|
|
17
|
+
- [ ] **Success metrics** — at least one quantitative metric defined
|
|
18
|
+
- [ ] **No implementation leak** — PRD does not prescribe tech stack, architecture, or database choices
|
|
19
|
+
- [ ] **Open questions addressed** — no blockers left unanswered before handoff
|
|
20
|
+
|
|
21
|
+
## Evaluation Output
|
|
22
|
+
|
|
23
|
+
Run all gates and output exactly one of:
|
|
24
|
+
|
|
25
|
+
- `✅ READY — PRD meets all quality gates.`
|
|
26
|
+
- `❌ GAPS FOUND: [numbered list of failing gates with specific questions to resolve]`
|
|
27
|
+
|
|
28
|
+
## Anti-Patterns to Avoid
|
|
29
|
+
|
|
30
|
+
| Anti-Pattern | Why It's Wrong | Fix |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| "The system should be fast" | Not measurable | "Page load under 2s on 3G" |
|
|
33
|
+
| "Use React for the frontend" | PRD prescribes implementation | Move to RFC |
|
|
34
|
+
| "TBD" on acceptance criteria | Engineers can't test against TBD | Resolve before handoff |
|
|
35
|
+
| Features listed without personas | No context for priority decisions | Add who benefits and why |
|
|
36
|
+
| 40-page PRD for an MVP | Overspecification kills agility | Cut to what's needed for v1 |
|
|
37
|
+
| "And" in a user story | Too many concerns in one story | Split into separate stories |
|
|
38
|
+
| Acceptance criteria with "should" | "Should" is not binary | Use "must" or rewrite as Given/When/Then |
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prd-writing
|
|
3
|
+
description: How to write a Product Requirements Document — structure, user stories, acceptance criteria, and writing principles
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PRD Writing — Structure & Standards
|
|
7
|
+
|
|
8
|
+
## What a PRD Is
|
|
9
|
+
|
|
10
|
+
A Product Requirements Document defines WHAT to build and WHY — never HOW. It is the contract between product and engineering. Engineers should be able to implement from it without asking the PM for clarification.
|
|
11
|
+
|
|
12
|
+
## PRD Structure
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
# Product Requirements Document: [Feature Name]
|
|
16
|
+
|
|
17
|
+
## Problem Statement
|
|
18
|
+
One paragraph. What user problem are we solving? Why does it matter?
|
|
19
|
+
|
|
20
|
+
## User Personas
|
|
21
|
+
Who are the primary users? What are their goals, frustrations, and context?
|
|
22
|
+
|
|
23
|
+
## Feature Scope
|
|
24
|
+
### In Scope
|
|
25
|
+
Bulleted list of what this product/feature includes.
|
|
26
|
+
|
|
27
|
+
### Out of Scope
|
|
28
|
+
Explicit list of what is NOT included in this release. This is as important as in-scope.
|
|
29
|
+
|
|
30
|
+
## User Stories
|
|
31
|
+
As a [persona], I want [goal] so that [benefit].
|
|
32
|
+
Include 3–10 stories that cover the core user journeys.
|
|
33
|
+
|
|
34
|
+
## Acceptance Criteria
|
|
35
|
+
For each major feature, list measurable pass/fail criteria.
|
|
36
|
+
Use: "Given [context], when [action], then [outcome]."
|
|
37
|
+
|
|
38
|
+
## Success Metrics
|
|
39
|
+
How will we know this feature succeeded? Include quantitative targets.
|
|
40
|
+
|
|
41
|
+
## Non-Functional Requirements
|
|
42
|
+
Performance, security, accessibility, internationalization constraints.
|
|
43
|
+
|
|
44
|
+
## Dependencies & Risks
|
|
45
|
+
What other teams, systems, or data sources does this depend on?
|
|
46
|
+
What could go wrong?
|
|
47
|
+
|
|
48
|
+
## Open Questions
|
|
49
|
+
Questions that need resolution before or during development.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Writing Principles
|
|
53
|
+
|
|
54
|
+
1. **One truth per sentence.** Each bullet should be independently testable.
|
|
55
|
+
2. **Persona-first.** Always trace a requirement back to a user need.
|
|
56
|
+
3. **Explicit scope.** If you don't say it's out of scope, engineers will assume it's in scope.
|
|
57
|
+
4. **No ambiguity in criteria.** "User can log in" is not a criterion. "User can log in with email+password within 3 seconds" is.
|
|
58
|
+
5. **Short is better.** A lean, clear PRD ships faster than a complete one that nobody reads.
|
|
59
|
+
6. **No implementation leak.** The PRD must not prescribe tech stack, architecture, or database choices — those belong in the RFC.
|