@damphuquy/agent-init 1.4.2 → 1.4.4

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.md CHANGED
@@ -17,17 +17,18 @@ npx @damphuquy/agent-init .
17
17
 
18
18
  ---
19
19
 
20
- ## 🚀 Documentation
20
+ ## Documentation
21
21
 
22
22
  Designed for minimal overhead, practical focus, and zero fluff:
23
23
 
24
24
  ### 1. For Daily Development (Start Here)
25
- * 📘 **[01 · Hands-on Walkthrough from A–Z](docs/en/01-getting-started.md)**: **The only guide you need to get started**. Step-by-step instructions with **a complete end-to-end example** (adding a user change-password endpoint), prompt templates, and quality gate sign-offs.
26
- * **[02 · Daily Cheat Sheet](docs/en/02-cheat-sheet.md)**: Copy-paste prompt templates for each phase, quality gates summary (Gates G0–G3), and file ownership matrix (Human vs Agent).
25
+ * **[01 · Hands-on Walkthrough from A–Z](docs/en/01-getting-started.md)**: **The core guide to get started in 10–15 minutes**. Step-by-step instructions with **2 practical examples** (Task 1 Strict Track $\rightarrow$ Handoff $\rightarrow$ Task 2 Fast-Track with knowledge inheritance), prompt templates, and quality gate sign-offs.
26
+ * **[02 · Daily Cheat Sheet](docs/en/02-cheat-sheet.md)**: Copy-paste prompt templates for each phase, quality gates summary (Gates G0–G3), and file ownership matrix (Human vs Agent).
27
+ * **[03 · Advanced Workflows & Production Edge Cases](docs/en/03-advanced-workflows.md)**: Complex real-world scenarios: Epics in `process/features/`, multi-developer concurrency, git rebase conflicts, P0 emergency hotfixes, secret scanning, model switching, complex test harnesses, and task parking (`paused.md`).
27
28
 
28
29
  ### 2. In-Depth Reference (For Tech Leads & Maintainers)
29
- * 🏛️ **[3-Layer Architecture & Context Router](docs/en/reference/architecture.md)**: Deep dive into the 3-layer decoupled architecture and Minimum Sufficient Context principles (No Full-Repo Scan).
30
- * 🚢 **[DevOps & Release Automation](docs/en/reference/devops-release.md)**: CI/CD release lifecycle, automated Semantic Versioning, and NPM package publishing.
30
+ * **[3-Layer Architecture & Context Router](docs/en/reference/architecture.md)**: Deep dive into the 3-layer decoupled architecture and Minimum Sufficient Context principles (No Full-Repo Scan).
31
+ * **[DevOps & Release Automation](docs/en/reference/devops-release.md)**: CI/CD release lifecycle, automated Semantic Versioning, and NPM package publishing.
31
32
 
32
33
  ---
33
34
 
@@ -47,7 +48,7 @@ Designed for minimal overhead, practical focus, and zero fluff:
47
48
 
48
49
  ---
49
50
 
50
- ## 📦 NPX CLI Commands
51
+ ## NPX CLI Commands
51
52
 
52
53
  ```bash
53
54
  # Bootstrap in current directory (interactive prompt: choose English or Tiếng Việt)
@@ -68,6 +69,6 @@ npx @damphuquy/agent-init . --force
68
69
 
69
70
  ---
70
71
 
71
- ## 📄 License
72
+ ## License
72
73
 
73
74
  Licensed under the [MIT License](LICENSE).
package/README.vi.md CHANGED
@@ -22,8 +22,9 @@ npx @damphuquy/agent-init .
22
22
  Tài liệu được thiết kế tối giản, tập trung vào thực hành, không lý thuyết rườm rà:
23
23
 
24
24
  ### 1. Dành cho công việc hằng ngày (Bắt đầu tại đây)
25
- * 📘 **[01 · Hướng dẫn Thực chiến từ A–Z (Hands-on Walkthrough)](docs/vi/01-getting-started.md)**: **Tài liệu duy nhất bạn cần đọc để bắt đầu**. Hướng dẫn từng bước với **ví dụ cụ thể xuyên suốt** (thêm chức năng đổi mật khẩu), chi tiết ai làm gì, lệnh gì, prompt mẫu và cách duyệt qua các cổng.
25
+ * 📘 **[01 · Hướng dẫn Thực chiến từ A–Z](docs/vi/01-getting-started.md)**: **Tài liệu cốt lõi để bắt đầu trong 10–15 phút**. Hướng dẫn từng bước với **2 ví dụ thực tế liên hoàn** (Task 1 Strict Track $\rightarrow$ Bàn giao $\rightarrow$ Task 2 Fast-Track kế thừa tri thức), prompt mẫu và cách duyệt qua các cổng.
26
26
  * ⚡ **[02 · Sổ tay Tra cứu Nhanh (Cheat Sheet)](docs/vi/02-cheat-sheet.md)**: Bảng copy-paste prompt mẫu cho từng giai đoạn, bảng 4 cổng kiểm soát (Gates G0–G3), và ma trận quyền hạn file (Human vs Agent).
27
+ * 🚀 **[03 · Quy trình Nâng cao & Tình huống Thực chiến](docs/vi/03-advanced-workflows.md)**: Các kịch bản production phức tạp: Epic trong `process/features/`, đa lập trình viên đồng thời, xử lý xung đột rebase, hotfix P0 khẩn cấp, quét secret bảo mật, đổi model chat, và đóng băng task dài hạn (`paused.md`).
27
28
 
28
29
  ### 2. Tài liệu Chuyên sâu & Tham khảo (Dành cho Lead / Maintainer)
29
30
  * 🏛️ **[Kiến trúc 3 Tầng & Cơ chế Context Router](docs/vi/reference/architecture.md)**: Giải thích sâu về thiết kế tách rời 3 layer và cơ chế nạp ngữ cảnh tối thiểu (No Full-Repo Scan).
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEvE,eAAO,MAAM,cAAc,EAAE,SAAS,SAAS,EA6D9C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAAS,SAAS,EA6D9C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAAmB,CAAC;AAEhE,wBAAgB,aAAa,CAAC,IAAI,GAAE,iBAAwB,GAAG,SAAS,SAAS,EAAE,CAElF;AAGD,wBAAgB,cAAc,IAAI,MAAM,CASvC;AAED,wBAAgB,cAAc,CAAC,cAAc,GAAE,MAAyB,GAAG,WAAW,CAgBrF"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEvE,eAAO,MAAM,cAAc,EAAE,SAAS,SAAS,EA8D9C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAAS,SAAS,EA8D9C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAAmB,CAAC;AAEhE,wBAAgB,aAAa,CAAC,IAAI,GAAE,iBAAwB,GAAG,SAAS,SAAS,EAAE,CAElF;AAGD,wBAAgB,cAAc,IAAI,MAAM,CASvC;AAED,wBAAgB,cAAc,CAAC,cAAc,GAAE,MAAyB,GAAG,WAAW,CAgBrF"}
package/dist/config.js CHANGED
@@ -32,6 +32,7 @@ export const FILE_GROUPS_EN = [
32
32
  { path: 'process/_seeds/review-template.md.seed', desc: 'Review phase artifact & Gate 3' },
33
33
  { path: 'process/_seeds/handoff-template.md.seed', desc: 'Final projection (intentionally short)' },
34
34
  { path: 'process/_seeds/cancellation-template.md.seed', desc: 'Knowledge-preserving task cancellation record' },
35
+ { path: 'process/_seeds/pause-template.md.seed', desc: 'Task pause & parking record for temporary blockages' },
35
36
  { path: 'process/_seeds/results-template.tsv.seed', desc: 'Benchmark & quantitative metrics evaluation registry' },
36
37
  { path: 'process/_seeds/program-template.md.seed', desc: 'Multi-phase umbrella epic blueprint' },
37
38
  ],
@@ -94,6 +95,7 @@ export const FILE_GROUPS_VI = [
94
95
  { path: 'process/_seeds/review-template.md.seed', desc: 'Artifact giai đoạn Nghiệm thu (Review) & Gate 3' },
95
96
  { path: 'process/_seeds/handoff-template.md.seed', desc: 'Tóm tắt bàn giao cuối cùng (ngắn gọn)' },
96
97
  { path: 'process/_seeds/cancellation-template.md.seed', desc: 'Biên bản hủy task & lưu giữ tri thức' },
98
+ { path: 'process/_seeds/pause-template.md.seed', desc: 'Biên bản tạm dừng task & đóng băng an toàn' },
97
99
  { path: 'process/_seeds/results-template.tsv.seed', desc: 'Bảng theo dõi số liệu benchmark & định lượng' },
98
100
  { path: 'process/_seeds/program-template.md.seed', desc: 'Bản thiết kế chương trình lớn nhiều giai đoạn' },
99
101
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SA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E,uBAAuB,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAC7D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damphuquy/agent-init",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Scaffolding CLI to bootstrap RIPER-5 Coding Agents & Operational Workspace",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -147,4 +147,27 @@ handoff.md ← (Complete) Short final projection
147
147
  </phase>
148
148
  </operational_phases>
149
149
 
150
+ ---
151
+
152
+ ## 4. Template Architecture Philosophy: Understanding Why & How
153
+
154
+ To prevent mechanical, cargo-cult usage of the framework, the template architecture is engineered around the following core technical principles:
155
+
156
+ ### 1. The Architectural "WHY" — Core Rationale
157
+ * **Why the `.seed` extension in `_seeds/`?**
158
+ * Blueprint Immutability: The `.seed` suffix isolates master templates from standard AI discovery tools (`grep`, `find`), preventing agents from mistaking blueprints for active tasks and overwriting master templates.
159
+ * **Why separate phase-specific artifacts instead of one large Markdown file?**
160
+ * Enforces Single Responsibility. Prevents oversized context windows (Anti-Context Saturation) that trigger hallucinations or rule neglect (Lost in the Middle). Ensures every Quality Gate (G1, G2, G3) maps to an auditable, physical file on disk.
161
+ * **Why split `features/` vs `general-plans/`?**
162
+ * Blast Radius Separation: `features/` handles large, multi-phase epics (≥5 files or domain subsystems), whereas `general-plans/` houses rapid bugfixes and optimizations (<5 files). This keeps your workspace organized and prevents minor fixes from burying major architecture.
163
+ * **Why use the 3-state pipeline (`active/`, `backlog/`, `completed/`)?**
164
+ * Filesystem State Machine: `active/` contains strictly one in-flight task at any time, maintaining zero context bleeding. `completed/` serves as a permanent historical archive for future tasks to reference via `<context_references>`.
165
+ * **Why pseudo-XML tags (`<goal>`, `<allowed_files>`,...)?**
166
+ * Machine-Readable Contract: Enforces unambiguous semantic boundaries that LLMs parse reliably, strictly constraining AI write access.
167
+
168
+ ### 2. The Operational "HOW" — Execution Principles
169
+ * **Copy-On-Demand:** Never bulk-copy all seeds into a task folder upfront. Start with `task.md`, then instantiate `research.md` $\rightarrow$ `decision.md` $\rightarrow$ `plan.md` $\rightarrow$ `state.md` $\rightarrow$ `review.md` $\rightarrow$ `handoff.md` sequentially as phases advance.
170
+ * **Stateless Chat, Stateful Workspace:** Sessions can reset and chats can close. All operational progress and error memory (`<failure_memory>`) are recorded on disk (`state.md`), allowing any new session to resume with 100% fidelity.
171
+ * **Selective Knowledge Crystallization:** Upon completion, summarize the task in `handoff.md`. Only promote reusable architectural standards or schema contracts into `process/context/` and `all-context.md`.
172
+
150
173
  </process_orchestration>
@@ -8,6 +8,13 @@
8
8
  Never edit seeds in-place — always copy first.
9
9
  </scope>
10
10
 
11
+ <architectural_rationale>
12
+ ### Seeds Architectural Rationale: Understanding "Why" & "How"
13
+ * **Why the `.seed` extension? (Why):** The `.seed` suffix acts as an immutable boundary. It prevents automated AI discovery tools (`find`, `grep`) from confusing archetype templates with active `*.md` task files. This guarantees agents will never accidentally overwrite master blueprints during execution.
14
+ * **Why separate seeds per phase? (Why):** Each phase of RIPER-5 requires a distinct cognitive posture and permission boundary (Research vs Innovate vs Plan vs Execute vs Review). Splitting archetypes prevents context window bloat (Anti-Context Saturation), avoids hallucinations, and anchors each Quality Gate (G1–G3) to an auditable physical artifact.
15
+ * **Copy-On-Demand Protocol (How):** Never bulk-copy all seeds into a task directory. Start exclusively with `task.md`. Sequentially instantiate subsequent artifacts (`research.md` $\rightarrow$ `decision.md` $\rightarrow$ `plan.md` $\rightarrow$ `state.md` $\rightarrow$ `review.md` $\rightarrow$ `handoff.md`) only as the task progresses into each phase.
16
+ </architectural_rationale>
17
+
11
18
  ---
12
19
 
13
20
  ## 1. Blueprint Catalog
@@ -74,6 +81,11 @@
74
81
  reusable prototypes/tests, and rollback verification when an in-flight task is cancelled.
75
82
  </seed>
76
83
 
84
+ <seed type="pause" path="pause-template.md.seed">
85
+ Task pause and parking record. Preserves working tree state, slice snapshot,
86
+ resumption criteria, and stale-risk assessment when an in-flight task is temporarily frozen.
87
+ </seed>
88
+
77
89
  <seed type="results" path="results-template.tsv.seed">
78
90
  Benchmark and quantitative metrics evaluation registry.
79
91
  Use for tracking latency, throughput, memory, or eval scores across iterations and vertical slices.
@@ -128,6 +140,7 @@ process/features/active/CHG-017-your-feature/
128
140
  ├── review.md ← instantiated from review-template.md.seed (Gate 3 Audit)
129
141
  ├── handoff.md ← instantiated from handoff-template.md.seed (Final Projection)
130
142
  ├── results.tsv ← (Optional) instantiated from results-template.tsv.seed (Metrics/Benchmarks)
143
+ ├── paused.md ← (If paused) instantiated from pause-template.md.seed
131
144
  └── cancelled.md ← (If cancelled) instantiated from cancellation-template.md.seed
132
145
  ```
133
146
 
@@ -163,6 +176,9 @@ cp process/_seeds/handoff-template.md.seed process/features/active/CHG-XXX-your-
163
176
  # (Optional) Tracking performance or evaluation metrics:
164
177
  cp process/_seeds/results-template.tsv.seed process/features/active/CHG-XXX-your-feature/results.tsv
165
178
 
179
+ # (When pausing or parking an in-flight task):
180
+ cp process/_seeds/pause-template.md.seed process/features/active/CHG-XXX-your-feature/paused.md
181
+
166
182
  # (When cancelling an in-flight task):
167
183
  cp process/_seeds/cancellation-template.md.seed process/features/active/CHG-XXX-your-feature/cancelled.md
168
184
  ```
@@ -0,0 +1,106 @@
1
+ # Pause Record: [TASK-ID] [Task Title]
2
+
3
+ <pause_record task_id="[TASK-ID]" version="1.0" framework="RIPER-5">
4
+
5
+ <!--
6
+ TASK PAUSE & PARKING GUIDELINES:
7
+ - Purpose: Freeze in-flight tasks cleanly when blocked by external dependencies, shifting priorities, or waiting on human feedback.
8
+ - Never abandon an active task without recording the exact working tree state and resumption conditions.
9
+ - Instantiate this file as `paused.md` inside the task workspace.
10
+ - If the pause is long-term (> 2 weeks), move the task directory from `active/` to `backlog/` (or `paused/`) to keep `active/` clean.
11
+ -->
12
+
13
+ <status>
14
+ <phase_at_pause>[RESEARCH | INNOVATE | PLAN | EXECUTE | REVIEW]</phase_at_pause>
15
+ <paused_date>[YYYY-MM-DD or DD-MM-YY]</paused_date>
16
+ <paused_by>[@engineer_or_tech_lead]</paused_by>
17
+ <git_branch>[feature/CHG-XXX-description]</git_branch>
18
+ <git_state>[COMMITTED_WIP | STASHED | CLEAN]</git_state>
19
+ <git_commit_or_stash_ref>[e.g. git commit hash: a1b2c3d or stash@{0}]</git_commit_or_stash_ref>
20
+ </status>
21
+
22
+ ---
23
+
24
+ ## 1. Reason for Pause & Blockers
25
+
26
+ <pause_context>
27
+ <primary_reason>
28
+ <!-- [e.g. Blocked on upstream API Task CHG-042 / Awaiting security review / Priority preemption by P0 hotfix / Waiting on customer feedback] -->
29
+ [Concise description of why this task was paused.]
30
+ </primary_reason>
31
+
32
+ <blocker_details>
33
+ [Detailed context on blocking conditions, external tickets, or dependencies.]
34
+ </blocker_details>
35
+ </pause_context>
36
+
37
+ ---
38
+
39
+ ## 2. In-Flight Progress & Slice Snapshot
40
+
41
+ <progress_snapshot>
42
+ <completed_slices>
43
+ <!-- Which slices from plan.md have already passed their verifiers? -->
44
+ - [Slice 1: Objective — VERIFIED & COMMITTED]
45
+ </completed_slices>
46
+
47
+ <active_slice_at_pause>
48
+ <!-- What was being worked on when paused? -->
49
+ <slice_id>[e.g. Slice 2]</slice_id>
50
+ <state_summary>[e.g. Service logic implemented, 2 unit tests written but failing due to mock issue]</state_summary>
51
+ </active_slice_at_pause>
52
+
53
+ <touched_files>
54
+ <!-- List of files modified or created during active work -->
55
+ - `src/...`
56
+ - `tests/...`
57
+ </touched_files>
58
+ </progress_snapshot>
59
+
60
+ ---
61
+
62
+ ## 3. Resumption Criteria
63
+
64
+ <resumption_criteria>
65
+ <!-- What explicit event, ticket resolution, or condition unlocks this task? -->
66
+ <trigger_condition>
67
+ [e.g. CHG-042 merged to main and published to staging environment]
68
+ </trigger_condition>
69
+
70
+ <responsible_owner>[@engineer_to_notify]</responsible_owner>
71
+ </resumption_criteria>
72
+
73
+ ---
74
+
75
+ ## 4. Stale-Risk Assessment (Bit-Rot Warnings)
76
+
77
+ <stale_risk_assessment>
78
+ <!-- What might decay or drift if this task remains parked for weeks/months? -->
79
+ <schema_drift_risk level="[LOW|MEDIUM|HIGH]">
80
+ [Potential DB migration or API contract changes occurring in parallel.]
81
+ </schema_drift_risk>
82
+
83
+ <dependency_drift_risk level="[LOW|MEDIUM|HIGH]">
84
+ [Libraries or internal shared modules that may be upgraded in the interim.]
85
+ </dependency_drift_risk>
86
+
87
+ <architecture_drift_risk level="[LOW|MEDIUM|HIGH]">
88
+ [Refactorings or new conventions that might invalidate assumptions in research.md.]
89
+ </architecture_drift_risk>
90
+ </stale_risk_assessment>
91
+
92
+ ---
93
+
94
+ ## 5. Resumption Pre-Flight Checklist
95
+
96
+ <resumption_checklist>
97
+ <!-- MUST execute in order before restarting EXECUTE loop -->
98
+ - [ ] 1. Move task folder back to `active/` (if it was parked in `backlog/`).
99
+ - [ ] 2. Checkout feature branch and rebase/merge latest `main` (`git checkout <branch> && git pull --rebase origin main`).
100
+ - [ ] 3. Run validation commands on baseline (`npm run test && npm run lint`) to ensure codebase is green.
101
+ - [ ] 4. Perform Context Freshness Check: Re-read `task.md`, `state.md`, and verify if assumptions in `research.md` still hold.
102
+ - [ ] 5. If `<allowed_files>` were altered on `main`, update `plan.md` scope contract before executing code.
103
+ - [ ] 6. Delete or archive `paused.md` and resume the current slice in `state.md`.
104
+ </resumption_checklist>
105
+
106
+ </pause_record>
@@ -147,4 +147,27 @@ handoff.md ← (Complete) Tóm tắt bàn giao ngắn gọn
147
147
  </phase>
148
148
  </operational_phases>
149
149
 
150
+ ---
151
+
152
+ ## 4. Triết Lý Kiến Trúc Templates: Vì Sao Tổ Chức Như Vậy? (Why & How)
153
+
154
+ Để tránh tình trạng chỉ sử dụng máy móc mà không hiểu nguyên lý, kiến trúc của hệ thống templates được xây dựng dựa trên các trụ cột kỹ thuật sau:
155
+
156
+ ### 1. Bản chất "WHY" — Lý Do Thiết Kế
157
+ * **Tại sao có hậu tố `.seed` trong `_seeds/`?**
158
+ * Hậu tố `.seed` phân định ranh giới bất biến (Blueprint Immutability). Ngăn chặn các công cụ tìm kiếm của AI (như `grep`, `find`) nhận diện nhầm file mẫu thành file task đang chạy, bảo vệ phôi mẫu không bị AI vô tình ghi đè.
159
+ * **Tại sao chia nhỏ theo từng Phase thay vì 1 file Markdown lớn?**
160
+ * Áp dụng nguyên lý Single Responsibility. Tránh hiện tượng phình to context window (Anti-Context Saturation) khiến AI bị ảo giác hoặc "quên" quy tắc (Lost in the middle). Đảm bảo mỗi Quality Gate (G1, G2, G3) được gắn với một bằng chứng vật lý độc lập.
161
+ * **Tại sao phân chia `features/` vs `general-plans/`?**
162
+ * Phân tách theo bán kính ảnh hưởng (Blast Radius). `features/` dành cho task lớn (≥5 files hoặc theo domain), `general-plans/` dành cho tác vụ nhanh, sửa bug (<5 files). Ngăn chặn tình trạng hàng chục task vụn vặt làm loãng cấu trúc hệ thống.
163
+ * **Tại sao có 3 trạng thái `active/`, `backlog/`, `completed/`?**
164
+ * Mô hình State Machine trên filesystem: `active/` tại một thời điểm chỉ chứa DUY NHẤT một task đang làm, giữ không gian làm việc của AI sạch sẽ tuyệt đối. `completed/` lưu trữ tri thức lịch sử để các task sau kế thừa qua `<context_references>`.
165
+ * **Tại sao dùng thẻ XML (`<goal>`, `<allowed_files>`,...)?**
166
+ * Ranh giới cú pháp máy đọc được (Machine-Readable Contract), khóa chặt phạm vi sửa đổi của AI.
167
+
168
+ ### 2. Bản chất "HOW" — Nguyên Tắc Vận Hành
169
+ * **Copy-On-Demand:** Tuyệt đối không copy hàng loạt tất cả seed vào task cùng lúc. Bắt đầu với `task.md`, sau đó sinh ra `research.md` $\rightarrow$ `decision.md` $\rightarrow$ `plan.md` $\rightarrow$ `state.md` $\rightarrow$ `review.md` $\rightarrow$ `handoff.md` theo tiến độ phase.
170
+ * **Stateless Chat, Stateful Workspace:** Cửa sổ chat có thể tắt hoặc reset session. Toàn bộ tiến độ và bộ nhớ lỗi (`<failure_memory>`) được lưu bền vững trên ổ đĩa (`state.md`), session mới chỉ cần nạp lại file là tiếp tục công việc chính xác 100%.
171
+ * **Selective Knowledge Crystallization:** Sau khi task hoàn thành và tạo `handoff.md`, chỉ những thay đổi kiến trúc/contract dùng chung mới được cập nhật vào `process/context/` và đăng ký trong `all-context.md`.
172
+
150
173
  </process_orchestration>
@@ -8,6 +8,13 @@
8
8
  Không bao giờ chỉnh sửa trực tiếp bên trong `_seeds/` — luôn luôn sao chép trước khi dùng.
9
9
  </scope>
10
10
 
11
+ <architectural_rationale>
12
+ ### Triết Lý Thiết Kế Seeds: Bản Chất "Why" & "How"
13
+ * **Tại sao là đuôi `.seed`? (Why):** Đuôi `.seed` đóng vai trò ranh giới bất biến (Blueprint Immutability). Nó giúp phân biệt rõ ràng giữa "khuôn mẫu phôi" và "tài liệu markdown đang làm việc" (`*.md`). Khi AI quét repo bằng các công cụ tìm kiếm, hậu tố `.seed` bảo vệ các file này không bao giờ bị AI sửa đè vào làm hỏng template gốc của cả dự án.
14
+ * **Tại sao tách riêng từng seed theo phase? (Why):** Mỗi giai đoạn trong chu trình RIPER-5 đòi hỏi một kiểu tư duy và ranh giới quyền hạn khác biệt (Khảo sát vs Đề xuất vs Lập kế hoạch vs Thực thi vs Nghiệm thu). Việc tách rời giúp AI chỉ nạp đúng artifact cần thiết, chống phình to context window (Anti-Context Saturation) và gắn chặt với từng Cổng kiểm soát (Gates G1–G3).
15
+ * **Quy tắc Copy-On-Demand (How):** Tuyệt đối không copy hàng loạt tất cả seed vào thư mục task. Bắt đầu duy nhất với `task.md`. Khi task tiến vào phase nào, mới lần lượt khởi tạo artifact của phase đó (`research.md` $\rightarrow$ `decision.md` $\rightarrow$ `plan.md` $\rightarrow$ `state.md` $\rightarrow$ `review.md` $\rightarrow$ `handoff.md`).
16
+ </architectural_rationale>
17
+
11
18
  ---
12
19
 
13
20
  ## 1. Danh Mục Blueprints Mẫu
@@ -74,6 +81,11 @@
74
81
  các prototype/test có thể tái sử dụng, và kiểm tra hoàn nguyên khi một task đang làm bị dừng giữa chừng.
75
82
  </seed>
76
83
 
84
+ <seed type="pause" path="pause-template.md.seed">
85
+ Biên bản tạm dừng task. Bảo toàn trạng thái cây làm việc git, ảnh chụp các slice đã xong,
86
+ điều kiện kích hoạt lại và đánh giá nguy cơ lỗi thời khi task bị đóng băng tạm thời.
87
+ </seed>
88
+
77
89
  <seed type="results" path="results-template.tsv.seed">
78
90
  Bảng đăng ký đánh giá số liệu benchmark và định lượng.
79
91
  Dùng để theo dõi latency, throughput, bộ nhớ hoặc điểm đánh giá qua các vòng lặp và lát cắt dọc.
@@ -128,6 +140,7 @@ process/features/active/CHG-017-your-feature/
128
140
  ├── review.md ← khởi tạo từ review-template.md.seed (Biên bản kiểm toán Gate 3)
129
141
  ├── handoff.md ← khởi tạo từ handoff-template.md.seed (Tóm tắt bàn giao)
130
142
  ├── results.tsv ← (Tùy chọn) khởi tạo từ results-template.tsv.seed (Metrics/Benchmarks)
143
+ ├── paused.md ← (Nếu tạm dừng) khởi tạo từ pause-template.md.seed
131
144
  └── cancelled.md ← (Nếu hủy task) khởi tạo từ cancellation-template.md.seed
132
145
  ```
133
146
 
@@ -163,6 +176,9 @@ cp process/_seeds/handoff-template.md.seed process/features/active/CHG-XXX-your-
163
176
  # (Tùy chọn) Khi cần theo dõi hiệu năng hoặc số liệu benchmark:
164
177
  cp process/_seeds/results-template.tsv.seed process/features/active/CHG-XXX-your-feature/results.tsv
165
178
 
179
+ # (Khi cần tạm dừng hoặc đóng băng task đang làm):
180
+ cp process/_seeds/pause-template.md.seed process/features/active/CHG-XXX-your-feature/paused.md
181
+
166
182
  # (Khi cần hủy bỏ một task đang dang dở):
167
183
  cp process/_seeds/cancellation-template.md.seed process/features/active/CHG-XXX-your-feature/cancelled.md
168
184
  ```
@@ -0,0 +1,106 @@
1
+ # Biên Bản Tạm Dừng Task: [TASK-ID] [Tiêu Đề Task]
2
+
3
+ <pause_record task_id="[TASK-ID]" version="1.0" framework="RIPER-5">
4
+
5
+ <!--
6
+ HƯỚNG DẪN TẠM DỪNG & ĐÓNG BĂNG TASK (TASK PAUSE):
7
+ - Mục đích: Đóng băng sạch sẽ task đang thực thi khi gặp blocker bên ngoài, thay đổi độ ưu tiên, hoặc chờ phản hồi từ con người.
8
+ - Tuyệt đối không bỏ dở task mà không lưu vết chính xác trạng thái git và điều kiện kích hoạt lại.
9
+ - Khởi tạo file này thành `paused.md` bên trong thư mục task đang làm.
10
+ - Nếu tạm dừng dài hạn (> 2 tuần), chuyển thư mục task từ `active/` sang `backlog/` (hoặc `paused/`) để giữ `active/` luôn sạch.
11
+ -->
12
+
13
+ <status>
14
+ <phase_at_pause>[RESEARCH | INNOVATE | PLAN | EXECUTE | REVIEW]</phase_at_pause>
15
+ <paused_date>[YYYY-MM-DD hoặc DD-MM-YY]</paused_date>
16
+ <paused_by>[@engineer_hoac_tech_lead]</paused_by>
17
+ <git_branch>[feature/CHG-XXX-mo-ta]</git_branch>
18
+ <git_state>[COMMITTED_WIP | STASHED | CLEAN]</git_state>
19
+ <git_commit_or_stash_ref>[ví dụ: commit hash a1b2c3d hoặc stash@{0}]</git_commit_or_stash_ref>
20
+ </status>
21
+
22
+ ---
23
+
24
+ ## 1. Lý Do Tạm Dừng & Yếu Tố Chặn (Blockers)
25
+
26
+ <pause_context>
27
+ <primary_reason>
28
+ <!-- [ví dụ: Bị chặn bởi API Task CHG-042 / Chờ review bảo mật / Ưu tiên khẩn cấp cho hotfix P0 / Chờ feedback sản phẩm] -->
29
+ [Tóm tắt ngắn gọn lý do tại sao task này phải tạm dừng.]
30
+ </primary_reason>
31
+
32
+ <blocker_details>
33
+ [Ngữ cảnh chi tiết về điều kiện chặn, ticket bên ngoài hoặc sự phụ thuộc kiến trúc.]
34
+ </blocker_details>
35
+ </pause_context>
36
+
37
+ ---
38
+
39
+ ## 2. Tiến Độ Đang Làm & Snapshot Lát Cắt (Slice)
40
+
41
+ <progress_snapshot>
42
+ <completed_slices>
43
+ <!-- Những slice nào trong plan.md đã vượt qua verifier thành công? -->
44
+ - [Slice 1: Mục tiêu — ĐÃ KIỂM THỬ XANH & COMMIT]
45
+ </completed_slices>
46
+
47
+ <active_slice_at_pause>
48
+ <!-- Slice nào đang dang dở khi dừng? -->
49
+ <slice_id>[ví dụ: Slice 2]</slice_id>
50
+ <state_summary>[ví dụ: Đã viết xong logic service, đang viết 2 unit test nhưng còn lỗi mock]</state_summary>
51
+ </active_slice_at_pause>
52
+
53
+ <touched_files>
54
+ <!-- Danh sách file đã sửa hoặc tạo mới trong quá trình thực thi -->
55
+ - `src/...`
56
+ - `tests/...`
57
+ </touched_files>
58
+ </progress_snapshot>
59
+
60
+ ---
61
+
62
+ ## 3. Điều Kiện Kích Hoạt Lại (Resumption Criteria)
63
+
64
+ <resumption_criteria>
65
+ <!-- Sự kiện, ticket hay điều kiện cụ thể nào sẽ mở khóa để tiếp tục task này? -->
66
+ <trigger_condition>
67
+ [ví dụ: CHG-042 được merge vào main và deploy lên môi trường staging]
68
+ </trigger_condition>
69
+
70
+ <responsible_owner>[@ky_su_phu_trach]</responsible_owner>
71
+ </resumption_criteria>
72
+
73
+ ---
74
+
75
+ ## 4. Đánh Giá Nguy Cơ Lỗi Thời (Stale-Risk & Bit-Rot)
76
+
77
+ <stale_risk_assessment>
78
+ <!-- Những gì có nguy cơ biến đổi hoặc xung đột nếu task bị đóng băng nhiều tuần/tháng? -->
79
+ <schema_drift_risk level="[LOW|MEDIUM|HIGH]">
80
+ [Nguy cơ database migration hoặc schema API thay đổi song song trên main.]
81
+ </schema_drift_risk>
82
+
83
+ <dependency_drift_risk level="[LOW|MEDIUM|HIGH]">
84
+ [Nguy cơ thư viện phụ thuộc hoặc module dùng chung được nâng cấp phiên bản.]
85
+ </dependency_drift_risk>
86
+
87
+ <architecture_drift_risk level="[LOW|MEDIUM|HIGH]">
88
+ [Nguy cơ quy chuẩn hoặc tái cấu trúc làm vô hiệu các giả thuyết trong research.md.]
89
+ </architecture_drift_risk>
90
+ </stale_risk_assessment>
91
+
92
+ ---
93
+
94
+ ## 5. Checklist Kiểm Tra Trước Khi Khởi Động Lại (Pre-Flight Resumption)
95
+
96
+ <resumption_checklist>
97
+ <!-- BẮT BUỘC thực hiện tuần tự trước khi mở lại vòng lặp EXECUTE -->
98
+ - [ ] 1. Chuyển thư mục task trở lại `active/` (nếu trước đó đã cất vào `backlog/`).
99
+ - [ ] 2. Checkout đúng branch và rebase/merge code mới nhất từ `main` (`git checkout <branch> && git pull --rebase origin main`).
100
+ - [ ] 3. Chạy lệnh kiểm thử gốc (`npm run test && npm run lint`) để đảm bảo codebase đang hoàn toàn xanh.
101
+ - [ ] 4. Kiểm tra độ tươi ngữ cảnh (Context Freshness): Đọc lại `task.md`, `state.md`, và xác nhận các giả thuyết trong `research.md` còn đúng không.
102
+ - [ ] 5. Nếu `<allowed_files>` bị thay đổi trên `main`, cập nhật lại phạm vi trong `plan.md`.
103
+ - [ ] 6. Xóa hoặc lưu trữ `paused.md`, cập nhật lại `state.md` và tiếp tục thực hiện slice đang dở.
104
+ </resumption_checklist>
105
+
106
+ </pause_record>