@ryuenn3123/agentic-senior-core 2.0.19 → 2.0.21

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.
@@ -0,0 +1,143 @@
1
+ # API Contract: {{projectName}}
2
+
3
+ Generated by Agentic-Senior-Core CLI v{{cliVersion}}
4
+ Generated at: {{generatedAt}}
5
+ Template version: {{templateVersion}}
6
+
7
+ ---
8
+
9
+ ## API Design Principles
10
+
11
+ Per `.agent-context/rules/api-docs.md`:
12
+ - OpenAPI 3.1 specification is mandatory for all HTTP APIs.
13
+ - Every endpoint must have documented request/response schemas.
14
+ - Error responses use typed error codes, never raw strings.
15
+ - Input validation is mandatory on every endpoint.
16
+
17
+ ## Base URL
18
+
19
+ ```
20
+ {{baseUrl}}
21
+ ```
22
+
23
+ ---
24
+
25
+ ## Endpoints
26
+
27
+ ### Health Check
28
+
29
+ ```
30
+ GET /health
31
+ ```
32
+
33
+ Response `200`:
34
+ ```json
35
+ {
36
+ "status": "ok",
37
+ "version": "1.0.0",
38
+ "timestamp": "2026-01-01T00:00:00Z"
39
+ }
40
+ ```
41
+
42
+ {{#if hasAuth}}
43
+ ### Authentication
44
+
45
+ ```
46
+ POST /auth/register
47
+ ```
48
+ Request:
49
+ ```json
50
+ {
51
+ "email": "user@example.com",
52
+ "password": "secure-password",
53
+ "displayName": "User Name"
54
+ }
55
+ ```
56
+
57
+ ```
58
+ POST /auth/login
59
+ ```
60
+ Request:
61
+ ```json
62
+ {
63
+ "email": "user@example.com",
64
+ "password": "secure-password"
65
+ }
66
+ ```
67
+ Response `200`:
68
+ ```json
69
+ {
70
+ "token": "jwt-token-here",
71
+ "expiresIn": 3600
72
+ }
73
+ ```
74
+
75
+ {{/if}}
76
+ ### Feature Endpoints
77
+
78
+ Based on the defined project features, plan these endpoint groups:
79
+
80
+ {{#each features}}
81
+ #### {{this}}
82
+
83
+ ```
84
+ GET /api/[resource] — List
85
+ GET /api/[resource]/:id — Detail
86
+ POST /api/[resource] — Create
87
+ PUT /api/[resource]/:id — Update
88
+ DELETE /api/[resource]/:id — Delete
89
+ ```
90
+
91
+ {{/each}}
92
+
93
+ ---
94
+
95
+ ## Error Response Format
96
+
97
+ All error responses follow this structure:
98
+
99
+ ```json
100
+ {
101
+ "error": {
102
+ "code": "VALIDATION_ERROR",
103
+ "message": "Human-readable description",
104
+ "details": []
105
+ }
106
+ }
107
+ ```
108
+
109
+ Standard error codes:
110
+ - `VALIDATION_ERROR` (400)
111
+ - `UNAUTHORIZED` (401)
112
+ - `FORBIDDEN` (403)
113
+ - `NOT_FOUND` (404)
114
+ - `CONFLICT` (409)
115
+ - `INTERNAL_ERROR` (500)
116
+
117
+ ---
118
+
119
+ ## Pagination
120
+
121
+ List endpoints use cursor-based or offset-based pagination:
122
+
123
+ ```
124
+ GET /api/[resource]?page=1&limit=20
125
+ ```
126
+
127
+ Response includes:
128
+ ```json
129
+ {
130
+ "data": [],
131
+ "pagination": {
132
+ "page": 1,
133
+ "limit": 20,
134
+ "total": 100,
135
+ "totalPages": 5
136
+ }
137
+ }
138
+ ```
139
+
140
+ ---
141
+
142
+ This document is a living reference. Update it as API endpoints are implemented.
143
+ Maintain a corresponding OpenAPI 3.1 specification file alongside this document.
@@ -0,0 +1,106 @@
1
+ # Catatan Keputusan Arsitektur: {{projectName}}
2
+
3
+ Dibuat oleh Agentic-Senior-Core CLI v{{cliVersion}}
4
+ Dibuat pada: {{generatedAt}}
5
+ Versi template: {{templateVersion}}
6
+
7
+ ---
8
+
9
+ ## ADR-001: Pemilihan Stack Teknologi
10
+
11
+ **Status**: Disetujui
12
+ **Tanggal**: {{generatedDate}}
13
+
14
+ ### Konteks
15
+
16
+ Proyek ini membutuhkan solusi {{primaryDomain}}. Tim mengevaluasi profil stack dan blueprint dari repository governance Agentic-Senior-Core.
17
+
18
+ ### Keputusan
19
+
20
+ - **Bahasa/Runtime**: {{stackDisplayName}} (sumber: `.agent-context/stacks/{{stackFileName}}`)
21
+ - **Blueprint arsitektur**: {{blueprintDisplayName}} (sumber: `.agent-context/blueprints/{{blueprintFileName}}`)
22
+ - **Database**: {{databaseChoice}}
23
+ - **Autentikasi**: {{authStrategy}}
24
+
25
+ ### Alasan
26
+
27
+ Stack {{stackDisplayName}} dipilih karena:
28
+ - Selaras dengan domain proyek ({{primaryDomain}}).
29
+ - Repository governance menyediakan blueprint tervalidasi untuk stack ini.
30
+ - Tim memiliki skill pack yang relevan untuk teknologi ini.
31
+
32
+ ### Konsekuensi
33
+
34
+ - Semua kode harus mengikuti konvensi di `.agent-context/stacks/{{stackFileName}}`.
35
+ - Batas modul harus mengikuti `.agent-context/blueprints/{{blueprintFileName}}`.
36
+ - Akses database harus mengikuti `.agent-context/rules/database-design.md`.
37
+ - Kontrak API harus mengikuti `.agent-context/rules/api-docs.md`.
38
+
39
+ ---
40
+
41
+ ## ADR-002: Pola Arsitektur
42
+
43
+ **Status**: Disetujui
44
+ **Tanggal**: {{generatedDate}}
45
+
46
+ ### Konteks
47
+
48
+ Proyek membutuhkan pemisahan concern yang jelas agar tetap mudah dirawat saat skala bertambah.
49
+
50
+ ### Keputusan
51
+
52
+ Gunakan arsitektur berlapis **Transport - Service - Repository** seperti di `.agent-context/rules/architecture.md`.
53
+
54
+ {{#if hasDatabase}}
55
+ ### Lapisan Database
56
+
57
+ - Database utama: {{databaseChoice}}
58
+ - Strategi ORM/query: ikuti konvensi stack yang dipilih.
59
+ - Strategi migrasi: migrasi aman dan reversible sesuai `.agent-context/rules/database-design.md`.
60
+ {{/if}}
61
+
62
+ {{#if hasAuth}}
63
+ ### Lapisan Autentikasi
64
+
65
+ - Strategi: {{authStrategy}}
66
+ - Manajemen secret: tidak boleh hardcoded sesuai `.agent-context/rules/security.md`.
67
+ - Validasi input: wajib di semua endpoint auth sesuai `.agent-context/rules/security.md`.
68
+ {{/if}}
69
+
70
+ ### Konsekuensi
71
+
72
+ - Setiap modul harus menjaga pemisahan tiga lapis.
73
+ - Import lintas lapis dilarang (transport tidak boleh akses repository langsung).
74
+ - Logic bersama dipindah ke modul shared, bukan di handler transport.
75
+
76
+ ---
77
+
78
+ ## ADR-003: Struktur Proyek
79
+
80
+ **Status**: Disetujui
81
+ **Tanggal**: {{generatedDate}}
82
+
83
+ ### Keputusan
84
+
85
+ Struktur direktori proyek mengikuti blueprint terpilih (`{{blueprintDisplayName}}`). Direktori utama:
86
+
87
+ ```
88
+ {{projectName}}/
89
+ src/
90
+ modules/ - modul fitur (masing-masing berisi transport, service, repository)
91
+ shared/ - utilitas, tipe, konstanta bersama
92
+ config/ - konfigurasi environment dan aplikasi
93
+ docs/ - dokumentasi proyek (direktori ini)
94
+ tests/ - test suites
95
+ .agent-context/ - aturan dan kebijakan governance
96
+ ```
97
+
98
+ ### Konsekuensi
99
+
100
+ - Fitur baru ditambahkan sebagai modul mandiri.
101
+ - Kode shared diekstrak jika dipakai oleh dua modul atau lebih.
102
+ - Konfigurasi dipusatkan dan divalidasi saat startup.
103
+
104
+ ---
105
+
106
+ Tambahkan ADR baru di bawah ini saat ada keputusan arsitektur baru.
@@ -0,0 +1,106 @@
1
+ # Architecture Decision Record: {{projectName}}
2
+
3
+ Generated by Agentic-Senior-Core CLI v{{cliVersion}}
4
+ Generated at: {{generatedAt}}
5
+ Template version: {{templateVersion}}
6
+
7
+ ---
8
+
9
+ ## ADR-001: Technology Stack Selection
10
+
11
+ **Status**: Accepted
12
+ **Date**: {{generatedDate}}
13
+
14
+ ### Context
15
+
16
+ This project requires a {{primaryDomain}} solution. The team evaluated available stack profiles and blueprints from the Agentic-Senior-Core governance repository.
17
+
18
+ ### Decision
19
+
20
+ - **Language/Runtime**: {{stackDisplayName}} (source: `.agent-context/stacks/{{stackFileName}}`)
21
+ - **Architecture blueprint**: {{blueprintDisplayName}} (source: `.agent-context/blueprints/{{blueprintFileName}}`)
22
+ - **Database**: {{databaseChoice}}
23
+ - **Auth**: {{authStrategy}}
24
+
25
+ ### Rationale
26
+
27
+ The {{stackDisplayName}} stack was selected because:
28
+ - It matches the project domain ({{primaryDomain}}).
29
+ - The governance repository provides a verified blueprint for this stack.
30
+ - The team has access to skill packs covering this technology.
31
+
32
+ ### Consequences
33
+
34
+ - All code must follow the conventions in `.agent-context/stacks/{{stackFileName}}`.
35
+ - Module boundaries must follow `.agent-context/blueprints/{{blueprintFileName}}`.
36
+ - Database access must follow `.agent-context/rules/database-design.md`.
37
+ - API contracts must follow `.agent-context/rules/api-docs.md`.
38
+
39
+ ---
40
+
41
+ ## ADR-002: Architecture Pattern
42
+
43
+ **Status**: Accepted
44
+ **Date**: {{generatedDate}}
45
+
46
+ ### Context
47
+
48
+ The project needs a clear separation of concerns to remain maintainable as it grows.
49
+
50
+ ### Decision
51
+
52
+ Follow the **Transport - Service - Repository** layered architecture as defined in `.agent-context/rules/architecture.md`.
53
+
54
+ {{#if hasDatabase}}
55
+ ### Database Layer
56
+
57
+ - Primary database: {{databaseChoice}}
58
+ - ORM/query strategy: follow stack-specific conventions from the selected stack profile.
59
+ - Migration strategy: safe, reversible migrations per `.agent-context/rules/database-design.md`.
60
+ {{/if}}
61
+
62
+ {{#if hasAuth}}
63
+ ### Authentication Layer
64
+
65
+ - Strategy: {{authStrategy}}
66
+ - Secrets management: no hardcoded secrets per `.agent-context/rules/security.md`.
67
+ - Input validation: mandatory on all auth endpoints per `.agent-context/rules/security.md`.
68
+ {{/if}}
69
+
70
+ ### Consequences
71
+
72
+ - Every module must respect the three-layer separation.
73
+ - Cross-layer imports are forbidden (no repository calls from transport layer).
74
+ - Shared logic lives in a dedicated shared module, never in transport handlers.
75
+
76
+ ---
77
+
78
+ ## ADR-003: Project Structure
79
+
80
+ **Status**: Accepted
81
+ **Date**: {{generatedDate}}
82
+
83
+ ### Decision
84
+
85
+ The project directory structure follows the selected blueprint (`{{blueprintDisplayName}}`). Key directories:
86
+
87
+ ```
88
+ {{projectName}}/
89
+ src/
90
+ modules/ — feature modules (each with transport, service, repository)
91
+ shared/ — shared utilities, types, constants
92
+ config/ — environment and app configuration
93
+ docs/ — project documentation (this directory)
94
+ tests/ — test suites
95
+ .agent-context/ — governance rules and policies
96
+ ```
97
+
98
+ ### Consequences
99
+
100
+ - New features are added as self-contained modules.
101
+ - Shared code is extracted only when used by two or more modules.
102
+ - Configuration is centralized and validated at startup.
103
+
104
+ ---
105
+
106
+ Add new ADR entries below as architectural decisions are made during development.
@@ -0,0 +1,74 @@
1
+ # Skema Database: {{projectName}}
2
+
3
+ Dibuat oleh Agentic-Senior-Core CLI v{{cliVersion}}
4
+ Dibuat pada: {{generatedAt}}
5
+ Versi template: {{templateVersion}}
6
+
7
+ ---
8
+
9
+ ## Teknologi Database
10
+
11
+ **Tipe**: {{databaseChoice}}
12
+ **Strategi autentikasi**: {{authStrategy}}
13
+
14
+ ## Prinsip Desain Skema
15
+
16
+ Mengacu ke `.agent-context/rules/database-design.md`:
17
+ - Gunakan Third Normal Form (3NF) sebagai default kecuali ada bukti performa untuk denormalisasi.
18
+ - Gunakan migrasi aman dan reversible untuk setiap perubahan skema.
19
+ - Jangan gunakan raw SQL tanpa parameterized query.
20
+ - Tambahkan index berdasarkan pola query terukur, bukan asumsi.
21
+
22
+ ---
23
+
24
+ ## Tabel Inti
25
+
26
+ {{#if hasAuth}}
27
+ ### users
28
+
29
+ | Kolom | Tipe | Constraint | Catatan |
30
+ |------|------|------------|---------|
31
+ | id | UUID / BIGINT | PK, NOT NULL | Identifier utama |
32
+ | email | VARCHAR(255) | UNIQUE, NOT NULL | Kredensial login |
33
+ | password_hash | VARCHAR(255) | NOT NULL | Hash bcrypt/argon2 |
34
+ | display_name | VARCHAR(100) | NOT NULL | Nama tampilan |
35
+ | role | VARCHAR(50) | NOT NULL, DEFAULT 'user' | Role akses |
36
+ | created_at | TIMESTAMP | NOT NULL, DEFAULT NOW() | Waktu buat |
37
+ | updated_at | TIMESTAMP | NOT NULL, DEFAULT NOW() | Waktu ubah |
38
+
39
+ {{/if}}
40
+ ### [Definisikan tabel domain Anda di sini]
41
+
42
+ Berdasarkan fitur proyek:
43
+ {{#each features}}
44
+ - **{{this}}** - tentukan data apa yang perlu disimpan, dibaca, dan di-query.
45
+ {{/each}}
46
+
47
+ | Kolom | Tipe | Constraint | Catatan |
48
+ |------|------|------------|---------|
49
+ | id | UUID / BIGINT | PK, NOT NULL | Identifier utama |
50
+ | ... | ... | ... | Definisikan sesuai kebutuhan fitur |
51
+ | created_at | TIMESTAMP | NOT NULL, DEFAULT NOW() | Waktu buat |
52
+ | updated_at | TIMESTAMP | NOT NULL, DEFAULT NOW() | Waktu ubah |
53
+
54
+ ---
55
+
56
+ ## Strategi Migrasi
57
+
58
+ 1. **Create**: buat file migrasi baru untuk setiap perubahan skema.
59
+ 2. **Test**: uji migrasi di lokal/staging sebelum produksi.
60
+ 3. **Rollback**: setiap migrasi wajib punya script down/rollback.
61
+ 4. **Review**: perubahan skema wajib review sesuai `.agent-context/review-checklists/pr-checklist.md`.
62
+
63
+ ## Index
64
+
65
+ Tambahkan index berdasarkan pola query yang benar-benar muncul selama development:
66
+
67
+ | Tabel | Kolom | Tipe | Alasan |
68
+ |-------|-------|------|--------|
69
+ | users | email | UNIQUE | Lookup login |
70
+ | ... | ... | ... | Tambahkan saat pola query muncul |
71
+
72
+ ---
73
+
74
+ Dokumen ini adalah referensi hidup. Perbarui saat model data berkembang.
@@ -0,0 +1,74 @@
1
+ # Database Schema: {{projectName}}
2
+
3
+ Generated by Agentic-Senior-Core CLI v{{cliVersion}}
4
+ Generated at: {{generatedAt}}
5
+ Template version: {{templateVersion}}
6
+
7
+ ---
8
+
9
+ ## Database Technology
10
+
11
+ **Type**: {{databaseChoice}}
12
+ **Auth strategy**: {{authStrategy}}
13
+
14
+ ## Schema Design Principles
15
+
16
+ Per `.agent-context/rules/database-design.md`:
17
+ - Default to Third Normal Form (3NF) unless performance evidence justifies denormalization.
18
+ - Use safe, reversible migrations for every schema change.
19
+ - Never use raw SQL in application code without parameterized queries.
20
+ - Add indexes based on measured query patterns, not assumptions.
21
+
22
+ ---
23
+
24
+ ## Core Tables
25
+
26
+ {{#if hasAuth}}
27
+ ### users
28
+
29
+ | Column | Type | Constraints | Notes |
30
+ |--------|------|-------------|-------|
31
+ | id | UUID / BIGINT | PK, NOT NULL | Primary identifier |
32
+ | email | VARCHAR(255) | UNIQUE, NOT NULL | Login credential |
33
+ | password_hash | VARCHAR(255) | NOT NULL | Hashed with bcrypt/argon2 |
34
+ | display_name | VARCHAR(100) | NOT NULL | Public display name |
35
+ | role | VARCHAR(50) | NOT NULL, DEFAULT 'user' | Role-based access |
36
+ | created_at | TIMESTAMP | NOT NULL, DEFAULT NOW() | Record creation |
37
+ | updated_at | TIMESTAMP | NOT NULL, DEFAULT NOW() | Last modification |
38
+
39
+ {{/if}}
40
+ ### [Define your domain tables here]
41
+
42
+ Based on the project features:
43
+ {{#each features}}
44
+ - **{{this}}** — consider what data this feature needs to store, read, and query.
45
+ {{/each}}
46
+
47
+ | Column | Type | Constraints | Notes |
48
+ |--------|------|-------------|-------|
49
+ | id | UUID / BIGINT | PK, NOT NULL | Primary identifier |
50
+ | ... | ... | ... | Define based on feature requirements |
51
+ | created_at | TIMESTAMP | NOT NULL, DEFAULT NOW() | Record creation |
52
+ | updated_at | TIMESTAMP | NOT NULL, DEFAULT NOW() | Last modification |
53
+
54
+ ---
55
+
56
+ ## Migration Strategy
57
+
58
+ 1. **Create**: Write a new migration file for every schema change.
59
+ 2. **Test**: Run migration on a local/staging database before production.
60
+ 3. **Rollback**: Every migration must have a corresponding down/rollback script.
61
+ 4. **Review**: Schema changes require review per `.agent-context/review-checklists/pr-checklist.md`.
62
+
63
+ ## Indexes
64
+
65
+ Add indexes based on actual query patterns observed during development:
66
+
67
+ | Table | Column(s) | Type | Rationale |
68
+ |-------|-----------|------|-----------|
69
+ | users | email | UNIQUE | Login lookup |
70
+ | ... | ... | ... | Add as query patterns emerge |
71
+
72
+ ---
73
+
74
+ This document is a living reference. Update it as the data model evolves.
@@ -0,0 +1,118 @@
1
+ # Ikhtisar Flow: {{projectName}}
2
+
3
+ Dibuat oleh Agentic-Senior-Core CLI v{{cliVersion}}
4
+ Dibuat pada: {{generatedAt}}
5
+ Versi template: {{templateVersion}}
6
+
7
+ ---
8
+
9
+ ## Ikhtisar Sistem
10
+
11
+ **Proyek**: {{projectName}}
12
+ **Domain**: {{primaryDomain}}
13
+ **Stack**: {{stackDisplayName}}
14
+ **Blueprint**: {{blueprintDisplayName}}
15
+
16
+ ## Arsitektur Tingkat Tinggi
17
+
18
+ ```
19
+ +-------------+ +--------------+ +--------------+
20
+ | Client |---->| Transport |---->| Service |
21
+ | (Browser/ |<----| Layer |<----| Layer |
22
+ | Mobile/CLI) | | (Routes/ | | (Business |
23
+ | | | Handlers) | | Logic) |
24
+ +-------------+ +--------------+ +------+-------+
25
+ |
26
+ +------+-------+
27
+ | Repository |
28
+ | Layer |
29
+ | (Data Access)|
30
+ +------+-------+
31
+ |
32
+ +------+-------+
33
+ | Database |
34
+ | {{databaseChoice}} |
35
+ +--------------+
36
+ ```
37
+
38
+ ## Flow Request
39
+
40
+ ### Siklus Request Standar
41
+
42
+ 1. **Client** mengirim HTTP request (atau input CLI, atau event trigger).
43
+ 2. **Transport layer** menerima request, memvalidasi format input, lalu routing ke handler yang tepat.
44
+ 3. **Service layer** menerapkan business logic, orkestrasi operasi domain, dan enforcement aturan.
45
+ 4. **Repository layer** melakukan akses data (read/write ke database atau layanan eksternal).
46
+ 5. **Response** kembali dari Service ke Transport lalu ke Client.
47
+
48
+ ### Tanggung Jawab Layer
49
+
50
+ | Layer | Melakukan | Tidak melakukan |
51
+ |-------|-----------|-----------------|
52
+ | Transport | Parse input, validasi shape, routing, format response | Business logic, akses database |
53
+ | Service | Business rules, orkestrasi, validasi domain | Parse HTTP, format response, menjalankan SQL |
54
+ | Repository | Akses data, query, caching | Business logic, validasi input |
55
+
56
+ {{#if hasAuth}}
57
+ ## Flow Autentikasi
58
+
59
+ ```
60
+ +--------+ +-----------+ +-----------+ +-----------+
61
+ | Client |---->| Auth |---->| Token |---->| Protected |
62
+ | | | Endpoint | | Verify | | Resource |
63
+ | |<----| |<----| ({{authStrategy}}) |<----| |
64
+ +--------+ +-----------+ +-----------+ +-----------+
65
+ ```
66
+
67
+ 1. Client mengirim kredensial ke endpoint auth.
68
+ 2. Service memvalidasi kredensial terhadap data tersimpan.
69
+ 3. Jika sukses, service mengeluarkan token {{authStrategy}}.
70
+ 4. Client menyertakan token di request berikutnya.
71
+ 5. Middleware memverifikasi token sebelum request diteruskan ke handler terproteksi.
72
+
73
+ {{/if}}
74
+ ## Flow Fitur
75
+
76
+ Untuk setiap fitur kunci, definisikan flow data dan kontrol:
77
+
78
+ {{#each features}}
79
+ ### {{this}}
80
+
81
+ **Aktor**: [siapa yang memulai flow ini]
82
+ **Trigger**: [apa yang memulai flow ini]
83
+ **Langkah**:
84
+ 1. [Langkah 1]
85
+ 2. [Langkah 2]
86
+ 3. [Langkah 3]
87
+
88
+ **Hasil sukses**: [apa yang terjadi saat flow selesai]
89
+ **Penanganan error**: [apa yang terjadi jika gagal]
90
+
91
+ ---
92
+
93
+ {{/each}}
94
+
95
+ ## Diagram Aliran Data
96
+
97
+ ```
98
+ Input Data Proses Output
99
+ ---------- ----------- ----------
100
+ +--------------------+
101
+ User Input ----->| Validation |
102
+ | (Transport) |
103
+ +---------+----------+
104
+ |
105
+ +---------v----------+
106
+ | Business Logic |
107
+ | (Service) |
108
+ +---------+----------+
109
+ |
110
+ +---------v----------+
111
+ | Data Persist |-------> Stored Data
112
+ | (Repository) |
113
+ +--------------------+
114
+ ```
115
+
116
+ ---
117
+
118
+ Dokumen ini adalah referensi hidup. Perbarui flow saat fitur diimplementasikan dan disempurnakan.