macca-method 2.0.0 → 2.1.2
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/.agents/macca-lock.json +1 -1
- package/.agents/skills/_shared/references/brainstorm-session.md +5 -5
- package/.agents/skills/_shared/references/fix-mode.md +18 -3
- package/.agents/skills/_shared/references/human-loop.md +1 -1
- package/.agents/skills/_shared/references/invocation-policy.md +20 -20
- package/.agents/skills/_shared/references/language-config.md +7 -5
- package/.agents/skills/_shared/references/output-ownership.md +11 -11
- package/.agents/skills/_shared/references/scope-rules.md +1 -1
- package/.agents/skills/_shared/references/skill-catalog.md +20 -20
- package/.agents/skills/_shared/scripts/validate-skills.py +37 -15
- package/.agents/skills/add-feature/SKILL.md +11 -3
- package/.agents/skills/antislop-copywriting/SKILL.md +372 -0
- package/.agents/skills/brainstorm-api/SKILL.md +33 -19
- package/.agents/skills/brainstorm-api/assets/api.template.md +35 -15
- package/.agents/skills/brainstorm-architecture/SKILL.md +40 -18
- package/.agents/skills/brainstorm-architecture/assets/architecture.template.md +44 -25
- package/.agents/skills/brainstorm-prd/SKILL.md +52 -20
- package/.agents/skills/brainstorm-prd/assets/PRD.template.md +47 -23
- package/.agents/skills/brainstorm-rules/SKILL.md +39 -22
- package/.agents/skills/brainstorm-rules/assets/rules.template.md +32 -18
- package/.agents/skills/brainstorm-schema/SKILL.md +23 -11
- package/.agents/skills/brainstorm-schema/assets/schema.template.md +25 -10
- package/.agents/skills/brainstorm-styleguide/SKILL.md +40 -22
- package/.agents/skills/brainstorm-styleguide/assets/StyleGuide.template.md +78 -60
- package/.agents/skills/brainstorm-task/SKILL.md +29 -14
- package/.agents/skills/brainstorm-task/assets/Task.template.md +29 -18
- package/.agents/skills/bug-fix/SKILL.md +39 -8
- package/.agents/skills/code-review/SKILL.md +9 -7
- package/.agents/skills/code-review/references/review-checklist.md +21 -10
- package/.agents/skills/developer/SKILL.md +10 -0
- package/.agents/skills/developer/references/execute-task.md +13 -7
- package/.agents/skills/developer/references/onboarding.md +1 -1
- package/.agents/skills/help/SKILL.md +39 -23
- package/.agents/skills/meet/SKILL.md +11 -4
- package/.agents/skills/quick-dev/SKILL.md +29 -22
- package/.agents/skills/release-readiness/SKILL.md +19 -13
- package/.agents/skills/skill-creator/LICENSE.txt +202 -0
- package/.agents/skills/skill-creator/SKILL.md +485 -0
- package/.agents/skills/skill-creator/agents/analyzer.md +274 -0
- package/.agents/skills/skill-creator/agents/comparator.md +202 -0
- package/.agents/skills/skill-creator/agents/grader.md +223 -0
- package/.agents/skills/skill-creator/assets/eval_review.html +146 -0
- package/.agents/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.agents/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.agents/skills/skill-creator/references/schemas.md +441 -0
- package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
- package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.agents/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.agents/skills/skill-creator/scripts/improve_description.py +247 -0
- package/.agents/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.agents/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.agents/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.agents/skills/skill-creator/scripts/run_loop.py +328 -0
- package/.agents/skills/skill-creator/scripts/utils.py +47 -0
- package/.agents/skills/spec-audit/SKILL.md +33 -4
- package/.agents/skills/spec-compliance/SKILL.md +36 -21
- package/.agents/skills/spec-init/SKILL.md +31 -17
- package/README.md +165 -129
- package/bin/macca-method.js +1378 -1077
- package/package.json +40 -40
- package/scripts/run-skill-validator.js +27 -9
- package/scripts/test-install.js +611 -337
- package/scripts/test-upgrade-legacy.js +131 -76
- package/scripts/validate-skill-behavior.js +175 -64
|
@@ -1,27 +1,32 @@
|
|
|
1
1
|
# API Documentation
|
|
2
2
|
|
|
3
3
|
## Document Role
|
|
4
|
+
|
|
4
5
|
- **Source of Truth:** External API or integration contract for this project
|
|
5
6
|
- **Primary Owner:** `brainstorm-api`
|
|
6
7
|
- **Out of Scope:** Internal service architecture, DB migration details, and UI copy
|
|
7
8
|
|
|
8
9
|
## Scope Summary
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
| Area | Status | Notes |
|
|
12
|
+
| ------------------- | ---------------------------- | ------------ |
|
|
11
13
|
| [resource / module] | Covered / Planned / Deferred | [short note] |
|
|
12
14
|
|
|
13
15
|
## Canonical Terminology
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
|
|
17
|
+
| Term | Meaning |
|
|
18
|
+
| ------ | ----------------------------------------- |
|
|
16
19
|
| [term] | [exact meaning used in this API contract] |
|
|
17
20
|
|
|
18
21
|
## Protocol Profile
|
|
22
|
+
|
|
19
23
|
- **Style:** REST / GraphQL / RPC-tRPC / Event-driven / Mixed
|
|
20
24
|
- **Entry Point:** [base URL / endpoint / router / broker/topic namespace]
|
|
21
25
|
- **Versioning:** [strategy and current version]
|
|
22
26
|
- **Deprecation:** [notice channel, support window, replacement, sunset criteria]
|
|
23
27
|
|
|
24
28
|
## Authentication and Security Controls
|
|
29
|
+
|
|
25
30
|
- **Authentication:** [method and transport]
|
|
26
31
|
- **Authorization:** [role/ownership summary]
|
|
27
32
|
- **Sensitive Operations:** [login / password reset / upload / webhook / payment / admin actions]
|
|
@@ -29,11 +34,13 @@
|
|
|
29
34
|
- **Rate / Concurrency Limits:** [limit and client-visible signals]
|
|
30
35
|
|
|
31
36
|
## Error Catalog
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
37
|
+
|
|
38
|
+
| Protocol Code | Internal Code | Meaning | Retryable | Client Action |
|
|
39
|
+
| -------------------------------------------- | ------------- | --------- | --------- | ------------- |
|
|
40
|
+
| [400 / UNAUTHENTICATED / EVENT_RETRY / etc.] | `[CODE]` | [meaning] | Yes / No | [action] |
|
|
35
41
|
|
|
36
42
|
## Reliability and SLO
|
|
43
|
+
|
|
37
44
|
- **Latency Target:** [p95/p99 or N/A]
|
|
38
45
|
- **Availability/Error Target:** [target or inherited NFR]
|
|
39
46
|
- **Timeout Ownership:** [client/server/gateway/consumer]
|
|
@@ -41,22 +48,25 @@
|
|
|
41
48
|
- **Contract Test Invariants:** [critical examples/compatibility rules]
|
|
42
49
|
|
|
43
50
|
## Operation Inventory
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
|
51
|
+
|
|
52
|
+
| ID | Operation Type | Name / Path / Topic | Auth | Trace to |
|
|
53
|
+
| ------ | ---------------------------------------------------------- | ------------------- | ----------------- | --------- |
|
|
54
|
+
| API-01 | [REST GET / GraphQL query / RPC procedure / Event publish] | [identifier] | Required / Public | `FEAT-01` |
|
|
47
55
|
|
|
48
56
|
---
|
|
49
57
|
|
|
50
58
|
## REST Section (include only for REST or Mixed)
|
|
51
59
|
|
|
52
60
|
### Environments
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
61
|
+
|
|
62
|
+
| Environment | Base URL |
|
|
63
|
+
| ----------- | ----------------------------------- |
|
|
64
|
+
| Development | `http://localhost:3000/api/v1` |
|
|
65
|
+
| Staging | `https://staging-api.domain.com/v1` |
|
|
66
|
+
| Production | `https://api.domain.com/v1` |
|
|
58
67
|
|
|
59
68
|
### Standard Response Format
|
|
69
|
+
|
|
60
70
|
```json
|
|
61
71
|
{
|
|
62
72
|
"success": true,
|
|
@@ -72,14 +82,17 @@
|
|
|
72
82
|
```
|
|
73
83
|
|
|
74
84
|
### Pagination and Filtering
|
|
85
|
+
|
|
75
86
|
- **Type:** Offset-based / Cursor-based
|
|
76
87
|
- **Defaults:** [limit/page or cursor rules]
|
|
77
88
|
- **Sorting/Filtering:** [query parameters]
|
|
78
89
|
|
|
79
90
|
### Resource: [Resource Name]
|
|
91
|
+
|
|
80
92
|
**Trace to:** [FEAT-01 / AC-01]
|
|
81
93
|
|
|
82
94
|
#### API-01 — [METHOD] /[path]
|
|
95
|
+
|
|
83
96
|
- **Description:** [what it does]
|
|
84
97
|
- **Auth:** [Required / Public]
|
|
85
98
|
- **Authorization:** [rule]
|
|
@@ -93,10 +106,12 @@
|
|
|
93
106
|
## GraphQL Section (include only for GraphQL or Mixed)
|
|
94
107
|
|
|
95
108
|
### Endpoint and Transport
|
|
109
|
+
|
|
96
110
|
- **Endpoint:** `/graphql`
|
|
97
111
|
- **Realtime:** Subscriptions / polling / none
|
|
98
112
|
|
|
99
113
|
### Operation: [Query / Mutation / Subscription Name]
|
|
114
|
+
|
|
100
115
|
**Trace to:** [FEAT-01 / AC-01]
|
|
101
116
|
|
|
102
117
|
- **Type:** Query / Mutation / Subscription
|
|
@@ -111,9 +126,11 @@
|
|
|
111
126
|
## RPC / tRPC Section (include only for RPC or Mixed)
|
|
112
127
|
|
|
113
128
|
### Router / Namespace
|
|
129
|
+
|
|
114
130
|
- **Entry Point:** [router/namespace]
|
|
115
131
|
|
|
116
132
|
### Procedure: [Name]
|
|
133
|
+
|
|
117
134
|
**Trace to:** [FEAT-01 / AC-01]
|
|
118
135
|
|
|
119
136
|
- **Type:** Query / Mutation / Subscription / Procedure
|
|
@@ -128,10 +145,12 @@
|
|
|
128
145
|
## Event-Driven Section (include only for Event-driven or Mixed)
|
|
129
146
|
|
|
130
147
|
### Channel Topology
|
|
148
|
+
|
|
131
149
|
- **Broker / Bus:** [service]
|
|
132
150
|
- **Topics / Streams / Queues:** [list]
|
|
133
151
|
|
|
134
152
|
### Event Contract: [Topic / Event Name]
|
|
153
|
+
|
|
135
154
|
**Trace to:** [FEAT-01 / AC-01]
|
|
136
155
|
|
|
137
156
|
- **Producer:** [service/component]
|
|
@@ -143,5 +162,6 @@
|
|
|
143
162
|
- **Security / Signature / Replay:** [controls]
|
|
144
163
|
|
|
145
164
|
## Assumptions & Open Questions
|
|
165
|
+
|
|
146
166
|
- [Unresolved API assumption or question]
|
|
147
167
|
- [Decision still pending confirmation]
|
|
@@ -20,6 +20,7 @@ Run as `@Fachri` (Tech Lead). Use the shared persona profile in `../_shared/refe
|
|
|
20
20
|
You are **@Fachri — Tech Lead**, a **Senior Software Architect** who designs scalable, maintainable, secure systems.
|
|
21
21
|
|
|
22
22
|
**Expertise:**
|
|
23
|
+
|
|
23
24
|
- System design and tech stack selection for the project
|
|
24
25
|
- Design patterns (MVC, Clean Architecture, Feature-based, Hexagonal)
|
|
25
26
|
- Architecture-level scalability, reliability, and security
|
|
@@ -34,15 +35,17 @@ You are **@Fachri — Tech Lead**, a **Senior Software Architect** who designs s
|
|
|
34
35
|
|
|
35
36
|
## Shared Runtime Setup
|
|
36
37
|
|
|
38
|
+
Paths written as `../...` below are relative to this SKILL.md's own folder, not the project's working directory - resolve them as a sibling of the folder that contains this file.
|
|
39
|
+
|
|
37
40
|
Before any interview:
|
|
38
41
|
|
|
39
42
|
1. Read `../_shared/references/language-config.md`.
|
|
40
43
|
2. Read `../_shared/references/config-mutation.md`.
|
|
41
44
|
3. Read `../_shared/references/brainstorm-session.md`.
|
|
42
45
|
4. Read `../_shared/references/scope-rules.md`.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
5. Use `languagePreferences.communication.normalized` for chat.
|
|
47
|
+
6. Use `languagePreferences.documents.normalized` for the final `project-context/architecture.md`.
|
|
48
|
+
7. Apply `brainstormPreferences.discussionMode`, `recommendations`, and `discoveryDepth` using the shared session policy.
|
|
46
49
|
|
|
47
50
|
---
|
|
48
51
|
|
|
@@ -51,12 +54,12 @@ Before any interview:
|
|
|
51
54
|
1. Load after `PRD.md` is complete.
|
|
52
55
|
|
|
53
56
|
2. **Read existing project-context**:
|
|
54
|
-
|
|
57
|
+
- `project-context/PRD.md` — features, users, constraints
|
|
55
58
|
|
|
56
59
|
3. If `.agents/developer-config.json` exists, read `developerPreferences.scope`.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
- `frontend` → architecture.md MUST focus on frontend architecture and backend/API dependencies only
|
|
61
|
+
- `backend` → architecture.md MUST focus on backend architecture, service/data/auth, and consumer dependencies only
|
|
62
|
+
- `fullstack` → full architecture.md
|
|
60
63
|
|
|
61
64
|
4. Run the shared runtime setup above and apply all three pacing modes from the shared session policy. If preferences are saved, announce and proceed without another confirmation.
|
|
62
65
|
|
|
@@ -73,18 +76,22 @@ Before any interview:
|
|
|
73
76
|
Ask the topics in order and wait after each selected batch, not after every topic when batching is enabled.
|
|
74
77
|
|
|
75
78
|
### 1. System Context
|
|
76
|
-
|
|
79
|
+
|
|
80
|
+
_"What systems and external services interact with this project?"_
|
|
77
81
|
|
|
78
82
|
Collect:
|
|
83
|
+
|
|
79
84
|
- System users (end users, admins, etc.)
|
|
80
85
|
- External services (payments, email, SMS, maps, OAuth)
|
|
81
86
|
- Internal system connections
|
|
82
87
|
- Incoming/outgoing data flows
|
|
83
88
|
|
|
84
89
|
### 2. Tech Stack
|
|
85
|
-
|
|
90
|
+
|
|
91
|
+
_"What is the tech stack: frontend, backend, database, hosting, CI/CD?"_
|
|
86
92
|
|
|
87
93
|
Collect:
|
|
94
|
+
|
|
88
95
|
- Frontend: framework & version
|
|
89
96
|
- Backend: language, framework & version
|
|
90
97
|
- Database: type & version
|
|
@@ -94,51 +101,63 @@ Collect:
|
|
|
94
101
|
- For each strategic dependency/vendor: existing/native alternative, runtime compatibility, maintenance health, license, security advisories, operational cost, lock-in, migration path, and removal/exit path
|
|
95
102
|
|
|
96
103
|
### 3. State Management
|
|
97
|
-
|
|
104
|
+
|
|
105
|
+
_"If there is a frontend, how is state managed?"_
|
|
98
106
|
|
|
99
107
|
Collect:
|
|
108
|
+
|
|
100
109
|
- Client state: Redux, Zustand, Jotai, Recoil, Context API
|
|
101
110
|
- Server state: React Query, SWR, or built-in
|
|
102
111
|
- Form state: React Hook Form, Formik, or native
|
|
103
112
|
- State persistence (localStorage, sessionStorage)?
|
|
104
113
|
|
|
105
114
|
### 4. API Design
|
|
106
|
-
|
|
115
|
+
|
|
116
|
+
_"How does frontend-backend communication work: REST, GraphQL, tRPC, or something else?"_
|
|
107
117
|
|
|
108
118
|
Collect:
|
|
119
|
+
|
|
109
120
|
- API pattern (REST, GraphQL, tRPC, or a combination)
|
|
110
121
|
- Real-time needs? (WebSocket, SSE, long polling)
|
|
111
122
|
- Microservice communication?
|
|
112
123
|
|
|
113
124
|
### 5. Folder Structure
|
|
114
|
-
|
|
125
|
+
|
|
126
|
+
_"What folder structure do you want: framework default or custom?"_
|
|
115
127
|
|
|
116
128
|
Collect:
|
|
129
|
+
|
|
117
130
|
- Framework default or custom approach
|
|
118
131
|
- Feature-based (by feature) or layer-based (controller/service/model)
|
|
119
132
|
- Any reference structure
|
|
120
133
|
|
|
121
134
|
### 6. Design Pattern
|
|
122
|
-
|
|
135
|
+
|
|
136
|
+
_"What architecture pattern do you want: MVC, Clean Architecture, modular, or something else?"_
|
|
123
137
|
|
|
124
138
|
Collect:
|
|
139
|
+
|
|
125
140
|
- Main pattern (MVC, Feature-based, Clean Architecture, Hexagonal)
|
|
126
141
|
- Separation of concerns (routes → controller → service → repository)
|
|
127
142
|
- Dependency injection approach
|
|
128
143
|
|
|
129
144
|
### 7. Authentication & Authorization
|
|
130
|
-
|
|
145
|
+
|
|
146
|
+
_"What auth method is used: JWT, session, OAuth? How are roles and permissions enforced?"_
|
|
131
147
|
|
|
132
148
|
Collect:
|
|
149
|
+
|
|
133
150
|
- Authentication (JWT, Session cookies, OAuth2)
|
|
134
151
|
- Provider (Google, GitHub, custom)
|
|
135
152
|
- RBAC (Role-Based Access Control)?
|
|
136
153
|
- Token storage (recommended httpOnly cookie vs localStorage)
|
|
137
154
|
|
|
138
155
|
### 8. Security & Abuse Cases
|
|
139
|
-
|
|
156
|
+
|
|
157
|
+
_"What data is sensitive, and what attacks must the architecture prevent?"_
|
|
140
158
|
|
|
141
159
|
Collect:
|
|
160
|
+
|
|
142
161
|
- Sensitive data types (PII, tokens, payment data, documents)
|
|
143
162
|
- Critical actions (login, password reset, payment, file upload, admin actions)
|
|
144
163
|
- Abuse scenarios: brute force, spam, IDOR, privilege escalation, CSRF, replay, webhook forgery, file abuse
|
|
@@ -146,9 +165,11 @@ Collect:
|
|
|
146
165
|
- Audit log requirements
|
|
147
166
|
|
|
148
167
|
### 9. Deployment & Infrastructure
|
|
149
|
-
|
|
168
|
+
|
|
169
|
+
_"Where will this run? Are staging and production separate?"_
|
|
150
170
|
|
|
151
171
|
Collect:
|
|
172
|
+
|
|
152
173
|
- Hosting platform (Vercel, Railway, Fly.io, Docker+VPS, AWS, GCP)
|
|
153
174
|
- Environment separation (dev, staging, prod)?
|
|
154
175
|
- CI/CD strategy
|
|
@@ -160,9 +181,11 @@ Collect:
|
|
|
160
181
|
- For critical depth: backup/restore ownership, tested restore process, RPO, RTO, and regional/dependency failure behavior
|
|
161
182
|
|
|
162
183
|
### 10. Architecture Decision Records (ADR)
|
|
163
|
-
|
|
184
|
+
|
|
185
|
+
_"Are there key architecture decisions whose rationale should be documented?"_
|
|
164
186
|
|
|
165
187
|
Collect:
|
|
188
|
+
|
|
166
189
|
- Non-obvious decisions (why PostgreSQL vs MongoDB)
|
|
167
190
|
- Structural decisions with hidden rationale
|
|
168
191
|
- Trade-offs considered
|
|
@@ -193,5 +216,4 @@ Adapt only sections that are applicable and preserve every required contract fro
|
|
|
193
216
|
- Use the strategic dependency checklist only for architecture-level choices; local packages remain a `developer` decision.
|
|
194
217
|
- Render the final document in the configured document language
|
|
195
218
|
|
|
196
|
-
|
|
197
219
|
---
|
|
@@ -3,19 +3,21 @@
|
|
|
3
3
|
> **Version:** 1.0 | **Date:** [date]
|
|
4
4
|
|
|
5
5
|
## Document Role
|
|
6
|
+
|
|
6
7
|
- **Source of Truth:** System design, technical constraints, and architecture decisions
|
|
7
8
|
- **Primary Owner:** `brainstorm-architecture`
|
|
8
9
|
- **Out of Scope:** Detailed API payload schemas, per-table database columns, UI design tokens, and task sequencing
|
|
9
10
|
|
|
10
11
|
## System Boundaries
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
12
|
+
|
|
13
|
+
| Topic | Canonical Document |
|
|
14
|
+
| --------------------------------------- | ------------------------------- |
|
|
15
|
+
| Product scope and business intent | `project-context/PRD.md` |
|
|
16
|
+
| Data model and field-level contracts | `project-context/schema.md` |
|
|
17
|
+
| Endpoint contracts and error payloads | `project-context/api.md` |
|
|
18
|
+
| UI language and component styling | `project-context/StyleGuide.md` |
|
|
19
|
+
| Coding standards and AI behavior | `project-context/rules.md` |
|
|
20
|
+
| Execution order and implementation plan | `project-context/Task.md` |
|
|
19
21
|
|
|
20
22
|
---
|
|
21
23
|
|
|
@@ -24,36 +26,42 @@
|
|
|
24
26
|
**Users:** [End Users, Admins, etc.]
|
|
25
27
|
|
|
26
28
|
**External Services:**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
|
|
30
|
+
| Service | Purpose | Protocol |
|
|
31
|
+
| --------- | --------- | ------------------ |
|
|
29
32
|
| [Service] | [Purpose] | REST / SDK / OAuth |
|
|
30
33
|
|
|
31
34
|
## 2. Tech Stack
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
|
|
36
|
+
| Layer | Technology | Version | Notes |
|
|
37
|
+
| -------- | ----------- | --------- | ------- |
|
|
34
38
|
| Frontend | [Framework] | [Version] | [Notes] |
|
|
35
|
-
| Backend
|
|
36
|
-
| Database | [Database]
|
|
37
|
-
| ORM
|
|
38
|
-
| Language | [Language]
|
|
39
|
+
| Backend | [Framework] | [Version] | [Notes] |
|
|
40
|
+
| Database | [Database] | [Version] | [Notes] |
|
|
41
|
+
| ORM | [ORM] | [Version] | [Notes] |
|
|
42
|
+
| Language | [Language] | [Version] | [Notes] |
|
|
39
43
|
|
|
40
44
|
### Strategic Dependency Evaluation
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
|
45
|
+
|
|
46
|
+
| Dependency/Vendor | Why Needed | Native/Existing Alternative | License & Health | Lock-in / Exit Path | Decision |
|
|
47
|
+
| ----------------- | ---------- | --------------------------- | ---------------- | ------------------- | ------------------- |
|
|
48
|
+
| [name] | [reason] | [alternative] | [evidence] | [migration/removal] | Accepted / Proposed |
|
|
44
49
|
|
|
45
50
|
## 3. State Management
|
|
51
|
+
|
|
46
52
|
- **Client State:** [Zustand / Redux / Context API]
|
|
47
53
|
- **Server State:** [TanStack Query / SWR]
|
|
48
54
|
- **Forms:** [React Hook Form / Formik]
|
|
49
55
|
- **Persistence:** [localStorage / sessionStorage / none]
|
|
50
56
|
|
|
51
57
|
## 4. API Design
|
|
58
|
+
|
|
52
59
|
- **Type:** REST / GraphQL / tRPC / Event-driven / Mixed
|
|
53
60
|
- **Primary Entry Point:** [base path / endpoint / router / broker namespace]
|
|
54
61
|
- **Realtime / Delivery:** WebSocket / SSE / queue / stream / none
|
|
55
62
|
|
|
56
63
|
## 5. Folder Structure
|
|
64
|
+
|
|
57
65
|
```
|
|
58
66
|
[Project Root]
|
|
59
67
|
├── [folder 1]/ # [description]
|
|
@@ -64,11 +72,13 @@
|
|
|
64
72
|
```
|
|
65
73
|
|
|
66
74
|
## 6. Design Pattern
|
|
75
|
+
|
|
67
76
|
- **Main Pattern:** MVC / Feature-based / Clean Architecture
|
|
68
77
|
- **Layers:** routes → controller → service → repository
|
|
69
78
|
- **Notes:** [Special rules]
|
|
70
79
|
|
|
71
80
|
## 7. Authentication & Authorization
|
|
81
|
+
|
|
72
82
|
- **Method:** JWT / Session / OAuth
|
|
73
83
|
- **Provider:** Google / GitHub / Custom
|
|
74
84
|
- **Token Storage:** httpOnly cookie
|
|
@@ -76,15 +86,17 @@
|
|
|
76
86
|
- **Roles:** [List with access levels]
|
|
77
87
|
|
|
78
88
|
## 8. Security & Abuse Cases
|
|
89
|
+
|
|
79
90
|
- **Sensitive Data:** [PII, tokens, payment data, etc.]
|
|
80
91
|
- **Critical Actions:** [Login, password reset, admin actions, upload, payment, etc.]
|
|
81
92
|
- **Abuse Cases:**
|
|
82
|
-
|
|
93
|
+
- [Brute force, spam, IDOR, CSRF, privilege escalation, replay, upload abuse, etc.]
|
|
83
94
|
- **Required Controls:**
|
|
84
|
-
|
|
95
|
+
- [Rate limiting, ownership checks, CSRF protection, audit logs, signed webhooks, secure session expiry]
|
|
85
96
|
- **Audit Logs:** [Which events must be recorded]
|
|
86
97
|
|
|
87
98
|
## 9. Deployment & Infrastructure
|
|
99
|
+
|
|
88
100
|
- **Platform:** Vercel / Railway / Docker+VPS / etc.
|
|
89
101
|
- **Environments:** development → staging → production
|
|
90
102
|
- **CI/CD:** GitHub Actions / etc.
|
|
@@ -92,6 +104,7 @@
|
|
|
92
104
|
- **Domain:** [Planned domain]
|
|
93
105
|
|
|
94
106
|
### Operations & Observability
|
|
107
|
+
|
|
95
108
|
- **Operational Owner:** [team/role]
|
|
96
109
|
- **Runbook / Support:** [location and escalation]
|
|
97
110
|
- **Logs:** [events, redaction, retention]
|
|
@@ -99,6 +112,7 @@
|
|
|
99
112
|
- **Alerts:** [threshold, owner, escalation]
|
|
100
113
|
|
|
101
114
|
### Rollback and Recovery
|
|
115
|
+
|
|
102
116
|
- **Rollback Trigger:** [condition]
|
|
103
117
|
- **Rollback Mechanism:** [deployment/data strategy]
|
|
104
118
|
- **Post-Rollback Validation:** [checks]
|
|
@@ -106,18 +120,21 @@
|
|
|
106
120
|
- **RPO / RTO:** [critical systems only]
|
|
107
121
|
|
|
108
122
|
## 10. Canonical Terminology
|
|
109
|
-
|
|
110
|
-
|
|
123
|
+
|
|
124
|
+
| Term | Definition |
|
|
125
|
+
| ------ | ----------------------------------- |
|
|
111
126
|
| [Term] | [Definition in the project context] |
|
|
112
127
|
|
|
113
128
|
## 11. Architecture Decision Records (ADR)
|
|
114
129
|
|
|
115
130
|
### ADR Index
|
|
116
|
-
|
|
117
|
-
|
|
131
|
+
|
|
132
|
+
| ADR ID | Title | Status | Summary |
|
|
133
|
+
| ------- | ------- | ------------------- | ----------------- |
|
|
118
134
|
| ADR-001 | [Title] | Accepted / Proposed | [One-line reason] |
|
|
119
135
|
|
|
120
136
|
### ADR-001: [Title]
|
|
137
|
+
|
|
121
138
|
- **Context:** [Situation that led to the decision]
|
|
122
139
|
- **Decision:** [What was decided]
|
|
123
140
|
- **Rationale:** [Why this option]
|
|
@@ -129,7 +146,9 @@
|
|
|
129
146
|
## 12. Assumptions & Open Questions
|
|
130
147
|
|
|
131
148
|
### Assumptions
|
|
149
|
+
|
|
132
150
|
- [Assumption the architecture depends on]
|
|
133
151
|
|
|
134
152
|
### Open Questions
|
|
153
|
+
|
|
135
154
|
- [Question that is still unresolved]
|