@manhd_d/ai-harness 0.6.2 → 0.8.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.
Files changed (138) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/CONTRIBUTING.md +4 -0
  3. package/README.md +20 -3
  4. package/adapters/java-spring/adapter.yaml +3 -2
  5. package/adapters/java-spring/checks/verification.yaml +12 -0
  6. package/adapters/java-spring/evals/cases.json +10 -0
  7. package/adapters/java-spring/rules/conventions.md +39 -0
  8. package/adapters/java-spring/rules.md +2 -1
  9. package/adapters/kubernetes/adapter.yaml +1 -1
  10. package/adapters/kubernetes/rules.md +3 -0
  11. package/adapters/react-native/adapter.yaml +3 -2
  12. package/adapters/react-native/checks/verification.yaml +12 -0
  13. package/adapters/react-native/evals/cases.json +10 -0
  14. package/adapters/react-native/rules/conventions.md +34 -0
  15. package/adapters/react-native/rules.md +2 -1
  16. package/adapters/react-nextjs/adapter.yaml +3 -2
  17. package/adapters/react-nextjs/checks/verification.yaml +12 -0
  18. package/adapters/react-nextjs/evals/cases.json +10 -0
  19. package/adapters/react-nextjs/rules/conventions.md +37 -0
  20. package/adapters/react-nextjs/rules.md +2 -1
  21. package/capabilities/architecture/README.md +11 -0
  22. package/capabilities/architecture/agents/architecture-reviewer.md +16 -0
  23. package/capabilities/architecture/agents/solution-architect.md +16 -0
  24. package/capabilities/architecture/capability.json +35 -0
  25. package/capabilities/architecture/checks/verification.json +29 -0
  26. package/capabilities/architecture/evals/cases.json +35 -0
  27. package/capabilities/architecture/skills/harness-architecture-change-impact/SKILL.md +43 -0
  28. package/capabilities/architecture/skills/harness-architecture-decision-records/SKILL.md +43 -0
  29. package/capabilities/architecture/skills/harness-architecture-project-context/SKILL.md +43 -0
  30. package/capabilities/architecture/skills/harness-architecture-quality-attributes/SKILL.md +43 -0
  31. package/capabilities/architecture/skills/harness-architecture-review/SKILL.md +43 -0
  32. package/capabilities/architecture/skills/harness-architecture-solution-design/SKILL.md +44 -0
  33. package/capabilities/architecture/templates/adr.md +29 -0
  34. package/capabilities/architecture/templates/nfr.md +22 -0
  35. package/capabilities/architecture/templates/overview.md +24 -0
  36. package/capabilities/architecture/templates/project-map.md +26 -0
  37. package/capabilities/architecture/templates/review.md +23 -0
  38. package/capabilities/architecture/templates/solution-design.md +29 -0
  39. package/capabilities/architecture/workflows/change-review.md +12 -0
  40. package/capabilities/architecture/workflows/discovery-to-design.md +16 -0
  41. package/capabilities/delivery/README.md +11 -0
  42. package/capabilities/delivery/agents/project-manager.md +16 -0
  43. package/capabilities/delivery/capability.json +29 -0
  44. package/capabilities/delivery/checks/verification.json +29 -0
  45. package/capabilities/delivery/evals/cases.json +25 -0
  46. package/capabilities/delivery/skills/harness-delivery-planning/SKILL.md +43 -0
  47. package/capabilities/delivery/skills/harness-delivery-risk-management/SKILL.md +42 -0
  48. package/capabilities/delivery/skills/harness-delivery-scope-change/SKILL.md +43 -0
  49. package/capabilities/delivery/templates/change-assessment.md +23 -0
  50. package/capabilities/delivery/templates/delivery-plan.md +25 -0
  51. package/capabilities/delivery/templates/risk-register.md +19 -0
  52. package/capabilities/delivery/workflows/execution-change.md +9 -0
  53. package/capabilities/delivery/workflows/planning.md +12 -0
  54. package/capabilities/product/README.md +7 -0
  55. package/capabilities/product/agents/business-analyst.md +3 -0
  56. package/capabilities/product/agents/product-owner.md +5 -1
  57. package/capabilities/product/agents/project-manager.md +5 -0
  58. package/capabilities/product/capability.json +9 -4
  59. package/capabilities/product/checks/verification.json +12 -0
  60. package/capabilities/product/evals/cases.json +10 -0
  61. package/capabilities/product/skills/harness-product-acceptance-criteria/SKILL.md +17 -0
  62. package/capabilities/product/skills/harness-product-backlog-prioritization/SKILL.md +17 -0
  63. package/capabilities/product/skills/harness-product-brd-generation/SKILL.md +17 -0
  64. package/capabilities/product/skills/harness-product-business-analysis/SKILL.md +17 -0
  65. package/capabilities/product/skills/harness-product-document-review/SKILL.md +17 -0
  66. package/capabilities/product/skills/harness-product-idea-discovery/SKILL.md +17 -0
  67. package/capabilities/product/skills/harness-product-knowledge-analysis/SKILL.md +17 -0
  68. package/capabilities/product/skills/harness-product-mvp-definition/SKILL.md +43 -0
  69. package/capabilities/product/skills/harness-product-prd-generation/SKILL.md +17 -0
  70. package/capabilities/product/skills/harness-product-product-outcomes/SKILL.md +42 -0
  71. package/capabilities/product/skills/harness-product-product-research/SKILL.md +17 -0
  72. package/capabilities/product/skills/harness-product-srs-generation/SKILL.md +17 -0
  73. package/capabilities/product/skills/harness-product-traceability/SKILL.md +17 -0
  74. package/capabilities/product/skills/harness-product-use-case-generation/SKILL.md +17 -0
  75. package/capabilities/product/skills/harness-product-user-stories/SKILL.md +17 -0
  76. package/capabilities/product/templates/mvp.md +25 -0
  77. package/capabilities/product/templates/outcomes.md +23 -0
  78. package/capabilities/product/workflows/document-driven.md +4 -0
  79. package/capabilities/product/workflows/idea-driven.md +4 -0
  80. package/capabilities/product/workflows/product-to-solution.md +15 -0
  81. package/cli/agents.js +165 -0
  82. package/cli/environment.js +170 -0
  83. package/cli/harness.js +40 -10
  84. package/cli/main.js +47 -11
  85. package/cli/readiness.js +117 -0
  86. package/config/agents.default.json +80 -0
  87. package/core/agents/documentation.md +13 -0
  88. package/core/agents/implementer.md +7 -0
  89. package/core/agents/orchestrator.md +13 -0
  90. package/core/agents/planner.md +7 -0
  91. package/core/agents/reviewer.md +8 -0
  92. package/core/checks/verification.json +37 -0
  93. package/core/evals/cases.json +101 -0
  94. package/core/evals/composition.json +15 -0
  95. package/core/rules/foundations.md +1 -0
  96. package/core/rules/project-conventions.md +61 -0
  97. package/core/skills/harness-review/SKILL.md +2 -0
  98. package/core/skills/harness-spec/SKILL.md +6 -2
  99. package/core/workflows/agent-routing.md +28 -0
  100. package/core/workflows/bugfix.md +2 -0
  101. package/core/workflows/clarification.md +28 -0
  102. package/core/workflows/project-setup.md +37 -0
  103. package/core/workflows/solution-framing.md +33 -0
  104. package/core/workflows/spec-to-code.md +18 -3
  105. package/docs/adapters.md +6 -0
  106. package/docs/agent-configuration.md +99 -0
  107. package/docs/agent-handoffs.md +19 -0
  108. package/docs/architecture.md +33 -1
  109. package/docs/change-readiness.md +67 -0
  110. package/docs/cli.md +41 -3
  111. package/docs/documentation-workflows.md +7 -0
  112. package/docs/end-to-end-workflow.md +10 -1
  113. package/docs/getting-started.md +29 -2
  114. package/docs/harness-maintenance.md +80 -0
  115. package/docs/monetization.md +1 -1
  116. package/docs/project-configuration.md +86 -0
  117. package/docs/project-conventions.md +67 -0
  118. package/docs/research/solution-workflow-sources.md +30 -0
  119. package/docs/skill-matrix.md +28 -4
  120. package/docs/solution-workflow.md +67 -0
  121. package/docs/templates/harness-change-impact.md +30 -0
  122. package/docs/tool-setup/README.md +70 -0
  123. package/docs/tool-setup/claude-code.md +57 -0
  124. package/docs/tool-setup/codex.md +44 -0
  125. package/docs/tool-setup/copilot.md +42 -0
  126. package/docs/tool-setup/cursor.md +44 -0
  127. package/docs/tool-setup/gemini-cli.md +41 -0
  128. package/docs/versioning.md +37 -0
  129. package/evals/README.md +16 -0
  130. package/evals/real-task-comparison.md +49 -0
  131. package/harness.yaml +4 -2
  132. package/package.json +2 -1
  133. package/templates/AGENTS.md +13 -1
  134. package/templates/environment.json +6 -0
  135. package/templates/openspec/decisions.json +5 -0
  136. package/templates/openspec/design.md +6 -0
  137. package/templates/openspec/tasks.md +1 -0
  138. package/templates/openspec/verification.json +4 -0
@@ -69,3 +69,10 @@ Risks/unknowns: threshold and privacy requirements pending decision
69
69
  Permissions: read/write authorized project branch only; no external publish or merge
70
70
  Human reviewer: developer or named BA/PO
71
71
  ```
72
+
73
+ ## Product → solution → delivery
74
+
75
+ For new/material journeys, reuse existing BA documents and continue with [Solution workflow](solution-workflow.md).
76
+ PO defines a usable MVP and evidence-backed outcomes, SA evaluates quality/architecture/contracts,
77
+ PM sequences dependent value slices. Accepted decisions and requirement IDs feed OpenSpec and adapters.
78
+ Depth scales to the task; no mandatory full document set for small fixes. Use [tool setup](tool-setup/README.md).
@@ -1,6 +1,6 @@
1
1
  # Full SDLC — Idea → Product → UI/UX → Spec → Code → Test → PR → Release → Operate
2
2
 
3
- Tài liệu này là **bản đồ điều phối** toàn bộ Core + Product + UI/UX + technology adapters + DevOps. Mỗi module vẫn có workflow riêng; chỉ **kích hoạt module đã cài và thật sự liên quan**, không bắt buộc dùng đủ tất cả cho một change. Bắt đầu với [Getting started](getting-started.md); xem [ma trận 53 skills](skill-matrix.md) và [role handoffs](agent-handoffs.md).
3
+ Tài liệu này là **bản đồ điều phối** toàn bộ Core + Product + Architecture + Delivery + UI/UX + technology adapters + DevOps. Mỗi module vẫn có workflow riêng; chỉ **kích hoạt module đã cài và thật sự liên quan**, không bắt buộc dùng đủ tất cả cho một change. Bắt đầu với [Getting started](getting-started.md); xem [ma trận 64 skills](skill-matrix.md) và [role handoffs](agent-handoffs.md).
4
4
 
5
5
  > **Ranh giới thực thi:** `aih` cài/gợi ý rules, templates, skills và check/eval **advisory**. AI host/IDE và các công cụ bên ngoài thực hiện phân tích, code, test và tương tác hệ thống trong phạm vi được cấp quyền. Không có `aih run` hay `aih deploy`; các hành động ghi Figma, production hoặc merge phải có phê duyệt.
6
6
 
@@ -41,6 +41,8 @@ Lệnh trên là **ví dụ một repo chứa BE/FE/manifests**; nếu frontend/
41
41
  | **1. Intake** | Ý tưởng, ticket, Confluence/PDF được phép đọc, version/source, scope | Product: `knowledge-analysis`, `business-analysis`; BA | Source register, FACT/INFERENCE/UNKNOWN, AS-IS/TO-BE, quyết định còn thiếu |
42
42
  | **2. Business & Product** | Nguồn có traceability, mục tiêu, rules, NFR | Product: `brd-generation`, `prd-generation`, `user-stories`, `acceptance-criteria`, `backlog-prioritization`, `document-review`, `traceability`; PM/PO/requirements reviewer | PRD-lite hoặc BRD/PRD/SRS/UC khi cần, story IDs, AC, backlog; **Gate A: stakeholder duyệt**, không gắn nhãn Approved bởi AI |
43
43
  | **3. UX/UI (nếu cần)** | Approved PRD/stories/AC; Figma file và quyền (nếu dùng) | UI/UX: `requirements-analysis` (chỉ khi cần), `user-flow`, `screen-planning`, `design-system`, `figma-design`, `design-review` | User flows, screen specs, component/tokens, Figma node IDs; **Gate B trước ghi Figma**, gate sau design review |
44
+ | **3a. Solution architecture (when material)** | Reviewed MVP/AC, existing decisions and constraints | Architecture skills/SA and reviewer | Source-linked context, NFR scenarios, module/data/contracts, ADRs and critical failure flows |
45
+ | **3b. Delivery planning (when material)** | Accepted scope/design, known estimates/dependencies | Delivery skills/Project Manager | Value slices, owners, risks, checkpoints and actual estimate authority |
44
46
  | **4. Technical spec** | Approved requirements, API constraints, architecture, DB/event contracts | Core: `harness-spec`, planner; tech adapter phù hợp; OpenSpec | `openspec/changes/<change-id>/` (proposal, design, tasks, delta specs), measurable AC; **Gate C: duyệt thay đổi có ảnh hưởng** |
45
47
  | **5. Implementation** | Change được duyệt, kiến trúc, repo, tests | Core: `harness-tdd`, `harness-debugging` khi sửa lỗi; Spring/React/Native/AI adapter theo stack; implementer | Minimal code diff, unit/integration/contract tests, migration plans, không thay đổi unrelated files |
46
48
  | **6. Verify & code review** | Diff, specs, test logs thực chạy | Core: `harness-review`, `harness-ai-evaluation` nếu AI; test-engineer/security-reviewer; `aih verify/eval --scope all` (chỉ plan) | Evidence của test chạy thực tế, scope chưa test, security findings, trace requirement → test; **Gate D: human PR review** |
@@ -114,3 +116,10 @@ aih check
114
116
  **Checklist hoàn thành một change:** scope và approved AC rõ; diff có trace; tests thực chạy với kết quả chính xác; security/permissions đã review; CI xanh; PR được human quyết định; deployment (nếu có) có artifact/environment approval; OpenSpec archive/sync **chỉ sau khi các PR liên quan đã merge**, thông qua upstream CLI/human được quyền.
115
117
 
116
118
  Xem [handoff contracts](agent-handoffs.md), [OpenSpec integration](openspec.md), [DevOps PR-to-production](../capabilities/devops/workflows/pr-to-production.md) và các [ví dụ theo stack](getting-started.md#ví-dụ-thực-hành).
119
+
120
+ For new/material journeys use [Solution workflow](solution-workflow.md); for existing clear fixes keep
121
+ a compact source/impact note. Set up the host with [Coding tools](tool-setup/README.md).
122
+
123
+ Before assigning roles, apply [Agent configuration](agent-configuration.md) and Core routing workflow.
124
+ Use one session for simple work, hybrid only for independent authorized work with host support, and
125
+ carry short source/evidence handoffs. User preferences do not grant runtime permissions or model access.
@@ -28,6 +28,10 @@ Chọn module theo nhu cầu, không cần cài cả bộ:
28
28
 
29
29
  ## 2. Ghi context và bắt đầu giao việc
30
30
 
31
+ Chạy `aih setup` rồi nhờ AI đọc workflow `project-setup`. Đây là gợi ý cho AI host, không phải wizard
32
+ nhập liệu của CLI. AI đọc repo trước, chỉ hỏi 1–3 câu A/B/C cho điểm còn thiếu, có đề xuất và lý do.
33
+ Không cần xác nhận lại thông tin hoặc quyền triển khai đã có.
34
+
31
35
  Điền `.harness/local.md` bằng thông tin thực của project:
32
36
 
33
37
  - Mục tiêu, phạm vi và quy tắc nghiệp vụ quan trọng.
@@ -43,6 +47,10 @@ Bạn không cần gọi từng role/skill thủ công. Nếu host không tự p
43
47
 
44
48
  Review diff và kết quả test, rồi commit `AGENTS.md`, `.harness/`, `.agents/skills/` và tài liệu thay đổi cùng project. Sửa quy tắc riêng trong `.harness/local.md`; giữ nguyên snapshot do Harness quản lý.
45
49
 
50
+ Lệnh/tool chung thuộc `.harness/environment.json`; đường dẫn máy riêng thuộc file ignored
51
+ `.harness/machine.json`. `aih doctor` kiểm tra tham chiếu biến và sự hiện diện công cụ, không chạy chúng.
52
+ Xem [cấu hình Maven nội bộ](project-configuration.md).
53
+
46
54
  ## 3. Tài liệu và spec khi cần
47
55
 
48
56
  Với capability `product`:
@@ -59,7 +67,9 @@ Khi một tính năng cần proposal/design/tasks/spec riêng:
59
67
  aih new-change add-customer-search
60
68
  ```
61
69
 
62
- Đây là bản nháp trong `openspec/changes/add-customer-search/`, chưa phải spec được duyệt. Sửa nhỏ, ít rủi ro có thể bỏ qua full spec với lý do rõ ràng; không bắt mọi task tạo đủ BRD/PRD/SRS.
70
+ Đây là bản nháp trong `openspec/changes/add-customer-search/`, chưa phải spec được duyệt.
71
+ AI ghi câu trả lời thực tế trong `decisions.json`; kiểm tra bằng `aih ready add-customer-search --stage implement`.
72
+ Sau code, ghi bằng chứng trong `verification.json` và chạy với `--stage review`. Xem [Change readiness](change-readiness.md). Sửa nhỏ, ít rủi ro có thể bỏ qua full spec với lý do rõ ràng; không bắt mọi task tạo đủ BRD/PRD/SRS.
63
73
 
64
74
  `aih new-change` không cần OpenSpec CLI. Chỉ cài OpenSpec riêng khi cần validator/archive của công cụ đó; xem [OpenSpec](openspec.md).
65
75
 
@@ -68,7 +78,7 @@ aih new-change add-customer-search
68
78
  | Lệnh | Ý nghĩa |
69
79
  | --- | --- |
70
80
  | `aih check` | Kiểm tra integrity của file Harness; không kiểm thử ứng dụng |
71
- | `aih doctor` | Thêm kiểm tra sự hiện diện của công cụ; không xác nhận công cụ chạy được |
81
+ | `aih doctor` | Kiểm tra công cụ và environment đã cấu hình; không chạy build/test |
72
82
  | `aih verify --scope all` | Xuất checklist, `executed: false`; không chạy build/test |
73
83
  | `aih eval --scope all` | Xuất tình huống và báo cáo chưa chấm; không gọi model |
74
84
  | Lệnh test của project | Do bạn, AI host hoặc CI thực chạy để xác minh code |
@@ -98,3 +108,20 @@ Nếu cài local trong project, dùng `npm install --save-dev @manhd_d/ai-harnes
98
108
  - [Spring Boot API](examples/spring-boot-api.md) · [Full-stack](examples/fullstack-web.md) · [React Native](examples/react-native-app.md) · [Python AI/RAG](examples/ai-rag-service.md).
99
109
  - [Astro micro-tools](examples/astro-micro-tools.md) · [Astro + AdSense](examples/astro-adsense-microtools.md).
100
110
  - [Release guide](npm-release.md): dành cho maintainer; merge source không đồng nghĩa npm đã có bản mới.
111
+
112
+ ## Coding conventions
113
+
114
+ Trước code, áp dụng [Project conventions](project-conventions.md): xác định new/maintain/mixed theo module, đọc chuẩn hiện có, tìm common và ghi lý do tạo mới. AI lưu nguồn và quyết định trong `.harness/local.md`; không hỏi lại thông tin đã rõ.
115
+
116
+ ## BA/PO/SA/PM and coding tools
117
+
118
+ For a material new project choose `--capabilities product,architecture,delivery` with the actual adapter.
119
+ Read [Solution workflow](solution-workflow.md) and the [setup guide for your coding tool](tool-setup/README.md).
120
+ Skills/templates are selective context; use existing approved documents and compact notes when sufficient.
121
+
122
+ ## Agent model and execution preferences
123
+
124
+ New installs seed `.harness/agents.json`: Sol recommended, hybrid/two concurrent agents only when
125
+ supported; Luna low documentation, no automatic Astra escalation. Edit provider/model/reasoning and
126
+ execution for your actual host. Use `aih setup --host codex` and [Agent configuration](agent-configuration.md).
127
+ For a new economy consumer use `aih init --agent-preset economy`; never overwrite an existing config.
@@ -0,0 +1,80 @@
1
+ # Nâng cấp AI Harness không bỏ sót thành phần
2
+
3
+ Đây là đầu mối dành cho người và AI sửa **repository AI Harness**, không phải quy trình phát triển
4
+ ứng dụng của consumer. Đọc tài liệu này trước khi sửa Harness. Giữ thông tin chuyên biệt ở tài liệu
5
+ gốc được liên kết bên dưới; không sao chép quy tắc thành nhiều bản có thể mâu thuẫn.
6
+
7
+ ## Bản đồ trách nhiệm và liên kết
8
+
9
+ | Thành phần | Nguồn chính | Nơi được sử dụng / kiểm chứng |
10
+ | --- | --- | --- |
11
+ | Core | [Rules](../core/rules/), [policies](../core/policies/) | [AGENTS template](../templates/AGENTS.md) → [workflows](../core/workflows/) → [roles](../core/agents/), [skills](../core/skills/) → [checks](../core/checks/verification.json), [evals](../core/evals/cases.json) |
12
+ | Adapter | [Registry](../harness.yaml), [adapter contract](adapters.md), [adapter assets](../adapters/) | Manifest `rules/skills/verification/evaluation` → [bundle/install](../cli/harness.js) → [installed verify/eval](../cli/adapters.js) |
13
+ | Capability / skill | [Capability assets](../capabilities/), [schema/loader](../cli/capabilities.js) | Workflow/role bàn giao → exposed skill → [skill matrix](skill-matrix.md), [handoffs](agent-handoffs.md), [composition evals](../core/evals/composition.json) |
14
+ | CLI / config | [CLI reference](cli.md), [implementation](../cli/), [templates](../templates/) | [Architecture/ownership](architecture.md), [project configuration](project-configuration.md), [tests](../tests/), [package smoke](../scripts/smoke-package.js) |
15
+ | Agent preferences | [Canonical default](../config/agents.default.json), [configuration contract](agent-configuration.md) | Project-owned `agents.json` → read-only setup plan → [routing workflow](../core/workflows/agent-routing.md) → [host setup](tool-setup/README.md); tests verify preservation, not live model availability |
16
+ | Quy trình sử dụng | [Getting started](getting-started.md), [full SDLC](end-to-end-workflow.md) | [Examples](examples/), [README](../README.md), [documentation workflows](documentation-workflows.md) |
17
+ | Release / migration | [Versioning](versioning.md), [release policy](release-policy.md) | [Changelog](../CHANGELOG.md), [npm release](npm-release.md), [release workflow](../.github/workflows/npm-publish.yml) |
18
+
19
+ Một quy tắc chỉ hoàn chỉnh khi xác định được: **nơi khai báo → nơi đóng gói → điểm AI đọc → bước áp dụng
20
+ → cách review/kiểm chứng → hướng dẫn sử dụng**. Thành phần không áp dụng bước nào phải ghi rõ lý do;
21
+ không tạo thêm file chỉ để đủ hình thức.
22
+
23
+ ## Quy trình cho mỗi lần nâng cấp
24
+
25
+ 1. Xác nhận Git root, base commit và đọc [AGENTS](../AGENTS.md), kiến trúc, quy định versioning cùng
26
+ thay đổi liên quan. Khảo sát implementation và test tương tự trước khi thiết kế mới.
27
+ 2. Với thay đổi có ý nghĩa về hành vi/chính sách, tạo OpenSpec proposal/design/tasks/specs theo
28
+ [quy trình hiện có](../core/workflows/spec-to-code.md). Ghi phân tích ảnh hưởng vào `design.md`
29
+ hoặc sao chép [mẫu impact](templates/harness-change-impact.md) vào change. Sửa typo/đường dẫn nhỏ
30
+ có thể ghi ngay trong PR; không bắt một bộ OpenSpec đầy đủ.
31
+ 3. Duyệt từng hàng của ma trận bên dưới. Ban đầu dùng `pending` cho mục cần sửa; khi hoàn tất chuyển
32
+ `done` kèm đường dẫn/bằng chứng. `not-applicable` cần lý do cụ thể. Không bỏ trống hàng và không coi
33
+ “đã nghĩ đến” là “đã cập nhật”. Hỏi lại chỉ khi có lựa chọn quan trọng chưa được quyết định.
34
+ 4. Triển khai theo phạm vi; đồng bộ nơi khai báo, đường dẫn consumer sau cài đặt, nơi gọi và tài liệu.
35
+ Khi đổi tên/xóa, tìm mọi tham chiếu cũ và xem xét snapshot cũ, không chỉ source mới.
36
+ 5. Chạy các kiểm tra bắt buộc, kiểm tra diff cài mới/update khi payload hoặc ownership thay đổi,
37
+ và ghi kết quả thực tế. Báo riêng kiểm tra bị chặn, kết quả manual và live-agent eval chưa chạy.
38
+ 6. Điền [PR template](../.github/pull_request_template.md), liên kết impact/OpenSpec và evidence.
39
+ Còn `pending` thì nêu rõ và dùng draft nếu phần triển khai chưa xong; không báo hoàn tất.
40
+ 7. Human review/merge; [Release Please](release-policy.md) quản lý version phân phối và PR phát hành
41
+ riêng. Không auto-merge, tự tag hoặc publish từ feature PR. Archive chỉ sau khi PR liên quan đã merge.
42
+
43
+ ## Ma trận ảnh hưởng bắt buộc rà soát
44
+
45
+ Mỗi lần nâng cấp rà soát **tất cả hàng**, nhưng chỉ sửa phần bị ảnh hưởng. Một thay đổi có thể chạm
46
+ nhiều nhóm. Liên kết evidence vào impact record thay vì chép lại cùng nội dung trong PR.
47
+
48
+ | ID | Khi có thay đổi | Những nơi phải đối chiếu |
49
+ | --- | --- | --- |
50
+ | core | Rule/policy dùng chung | Điểm đọc trong AGENTS template, workflow/role/skill liên quan, precedence, checks và behavioral evals |
51
+ | adapter | Adapter / convention | Registry, adapter manifest và schema; rules index; skills; checks/evals; detection nếu liên quan; module_version khi contract đổi |
52
+ | capability-skill | Capability hoặc skill | Manifest, input/output/constraints, workflow kích hoạt, bàn giao, đường dẫn installed/exposed, skill matrix và composition |
53
+ | cli-config | CLI, config, template | Validation, help/reference, project-owned vs managed files, install/update/dry-run/conflict, tương thích snapshot cũ, migration và package allowlist |
54
+ | workflow | Quy trình / bàn giao | Điều kiện vào, output, owner/bước nhận tiếp, role/skill, acceptance/readiness, SDLC/examples liên quan |
55
+ | documentation | Hướng dẫn sử dụng | README/getting-started, tài liệu chuyên biệt và đường dẫn; không quảng cáo khả năng chưa có hoặc kết quả chưa đo |
56
+ | verification | Kiểm chứng | Tests đúng rủi ro, validate, package smoke, CI matrix; eval scenarios khi hướng dẫn hành vi đổi; actual logs/manual limitations |
57
+ | release-migration | Phát hành / tương thích | Changelog Unreleased, migration/rollback khi cần, module contract version; version phân phối chỉ do release PR quản lý |
58
+
59
+ Ví dụ thêm convention Java: manifest khai báo `rules/conventions.md` → bundle cài file vào
60
+ `.harness/adapters/java-spring/` → rules index dẫn AI đọc → Core code/review áp dụng → checklist/eval
61
+ kiểm tra → guide hướng dẫn. Nếu chỉ có file convention mà thiếu đường đọc, thay đổi chưa đầy đủ.
62
+
63
+ ## Điều kiện hoàn thành và giới hạn tự động hóa
64
+
65
+ - Chạy `npm test`, `npm run validate`, `npm run test:package`. CI chạy các gate theo
66
+ [Harness CI](../.github/workflows/harness.yml); khi liên quan release chạy cả `npm run check:release`.
67
+ - Tests về [maintenance links](../tests/maintenance.test.js) kiểm tra các điểm vào tài liệu, đường đọc
68
+ Core và rule index của mọi adapter được đăng ký. Các [documentation tests](../tests/documentation.test.js)
69
+ kiểm tra skill matrix/handoffs; validate kiểm tra đường dẫn Markdown; package smoke dùng tarball thật.
70
+ - Khi đổi payload: xác minh asset được chọn/không được chọn, lock và conflict, project-owned content
71
+ không bị ghi đè, đường dẫn exposed skill hợp lệ. Dùng test hiện có và chỉ thêm test cho rủi ro mới.
72
+ - Khi đổi instructions: cập nhật kịch bản [behavioral evaluation](../evals/README.md) nếu hành vi kỳ vọng
73
+ thay đổi; giữ unscored nếu chưa chạy host thật. Passing CLI tests không chứng minh AI tuân thủ.
74
+ - CI kiểm tra cấu trúc và liên kết đã khai báo, **không tự kết luận impact analysis đầy đủ hoặc các tài
75
+ liệu nhất quán về nghĩa**. PR checklist là hợp đồng review, không phải parser cưỡng chế PR body.
76
+ Người/AI review đối chiếu diff với ma trận, lý do not-applicable và bằng chứng thực tế.
77
+
78
+ Thêm nhóm thành phần mới thì cập nhật bản đồ và ma trận tại đây, mẫu impact và PR template nếu cần;
79
+ chỉ mở rộng kiểm tra tự động cho các liên kết có thể xác minh đáng tin cậy. Không tạo registry thứ hai
80
+ cho adapter/skill: `harness.yaml` và module manifests vẫn là nguồn đăng ký chính.
@@ -28,7 +28,7 @@ For React/Next.js, substitute `--adapters react-nextjs`. Add `product,uiux` only
28
28
  6. If approved to publish, use the actual Google-provided ad integration and owner-authorized publisher details. `ads.txt` at the root domain is **highly recommended, not universally mandatory**; never invent an account/seller ID.
29
29
  7. Human reviews actual changed pages, ad/no-fill/adblocked/consent UX and production release scope before deploy. `aih` cannot publish ads or deploy.
30
30
 
31
- Project-owned artifacts: `docs/monetization/site-monetization-plan.md`, `ad-placement-review.md`, `privacy-consent-checklist.md`. The templates are installed at `.harness/capabilities/monetization/templates/` and must be copied into consumer docs by your authorized editor **without overwrite**; `aih new-doc` creates **Product-only** templates.
31
+ Project-owned artifacts: `docs/monetization/site-monetization-plan.md`, `ad-placement-review.md`, `privacy-consent-checklist.md`. The templates are installed at `.harness/capabilities/monetization/templates/` and can be scaffolded with `aih new-doc <type> --capability monetization` **without overwrite**; the default new-doc owner remains Product.
32
32
 
33
33
  ## Workflow B — traffic → financial learning
34
34
 
@@ -0,0 +1,86 @@
1
+ # Cấu hình từng project và từng máy
2
+
3
+ | File | Nội dung | Git |
4
+ | --- | --- | --- |
5
+ | `.harness/project.json` | Adapter/capability | Commit |
6
+ | `.harness/agents.json` | Provider/model/reasoning theo role, execution preferences và host mappings | Commit |
7
+ | `.harness/local.md` | Nghiệp vụ, kiến trúc, nguồn và quyết định chung | Commit |
8
+ | `.harness/environment.json` | Công cụ, lệnh, file cần có | Commit |
9
+ | `.harness/machine.json` | Đường dẫn riêng của máy, tùy chọn | Ignore |
10
+
11
+ Init/update tạo environment rỗng nếu chưa có và thêm `/machine.json` vào cuối
12
+ `.harness/.gitignore`. File đã được Git track vẫn được track: ignore không xóa khỏi index/history.
13
+ CLI không tạo file machine và không đọc nội dung Maven settings. Không ghi mật khẩu/token vào các
14
+ file Harness; credentials thuộc cơ chế quản lý riêng của công cụ.
15
+
16
+ [Agent configuration](agent-configuration.md) mô tả preset và cấu hình model. `aih setup --host codex`
17
+ chỉ đưa ra kế hoạch khai báo; update bảo toàn `agents.json` và không ghi config native của AI host.
18
+
19
+ ## Ví dụ Maven nội bộ
20
+
21
+ Cấu hình chung:
22
+
23
+ ```json
24
+ {
25
+ "schema_version": 1,
26
+ "tools": {
27
+ "maven": { "executable": "mvn", "required": true }
28
+ },
29
+ "files": {
30
+ "maven-settings": { "path": "${PROJECT_MAVEN_SETTINGS}", "required": true }
31
+ },
32
+ "commands": {
33
+ "test": { "tool": "maven", "args": ["-s", "${PROJECT_MAVEN_SETTINGS}", "verify"] }
34
+ }
35
+ }
36
+ ```
37
+
38
+ Máy Windows của bạn có thể đặt `.harness/machine.json`:
39
+
40
+ ```json
41
+ {
42
+ "schema_version": 1,
43
+ "tools": {
44
+ "maven": { "executable": "D:\\tools\\apache-maven\\bin\\mvn.cmd" }
45
+ }
46
+ }
47
+ ```
48
+
49
+ Đặt biến môi trường trong terminal của AI host, ví dụ PowerShell:
50
+
51
+ ```powershell
52
+ $env:PROJECT_MAVEN_SETTINGS = "C:\Users\YourName\.m2\settings-company.xml"
53
+ aih doctor
54
+ ```
55
+
56
+ `doctor` báo trạng thái như `present`, `missing-env`, `missing` hoặc `platform-mismatch`; không in
57
+ đường dẫn/giá trị biến/arguments. Với công cụ bắt buộc bị thiếu, exit code là 1. PATH hints chung
58
+ không thay thế executable đã cấu hình. Thiếu công cụ `required: false` chỉ là chẩn đoán.
59
+
60
+ AI host đọc command và sử dụng cách quoting đúng terminal; ví dụ PowerShell dùng toán tử `&` cho
61
+ executable có khoảng trắng. Không nối arguments thành shell text một cách mù quáng. Harness không
62
+ tự chạy lệnh, đổi JAVA_HOME, sửa settings.xml hay tải dependency.
63
+
64
+ ## Quy tắc cấu hình
65
+
66
+ - Schema 1 yêu cầu các map `tools`, `files`, `commands` (có thể rỗng); ID dùng lowercase-hyphen.
67
+ - Tool: `executable` và `required` tùy chọn, mặc định true. File: `path` và `required` tương tự.
68
+ - Command: `tool` phải trỏ tới tool đã khai báo, `args` là mảng string.
69
+ - Machine chỉ có `schema_version`, `tools`/`files` tùy chọn; chỉ override `executable`/`path` của
70
+ ID đã có. Không đổi commands, required flags hay policy.
71
+ - Đường dẫn machine ưu tiên đường dẫn project; project ưu tiên gợi ý adapter. Không fallback khi
72
+ đường dẫn được chọn không dùng được. Paths tương đối tính từ project root; executable không
73
+ chứa separator được tìm trên PATH. Paths tuyệt đối phải phù hợp OS của host.
74
+ - Chỉ cú pháp ${ENV_NAME} tham chiếu biến môi trường hiện tại. Không tự đọc .env, không mở rộng
75
+ `~` hay shell substitution. Command arguments chỉ được kiểm tra tham chiếu biến; giá trị trong
76
+ files không tự thay thế arguments. Nếu settings dùng trong args, dùng cùng biến môi trường như ví dụ.
77
+ - `files` dành cho file (settings, config), không phải thư mục JDK. Dùng biến JAVA_HOME của host
78
+ hoặc khai báo executable Java trực tiếp. Doctor không xác nhận Java/Maven version.
79
+ - `aih check` kiểm tra snapshot; `aih doctor` kiểm tra thêm environment. Dự án cũ chưa có
80
+ environment vẫn dùng được; không bắt buộc migrate chỉ để chạy check.
81
+
82
+ ## Hỏi trước, lưu lại
83
+
84
+ Chạy `aih setup` rồi nhờ AI đọc workflow `project-setup`. Host đọc repo và câu trả lời cũ trước khi
85
+ hỏi 1–3 câu A/B/C có đề xuất dựa trên bằng chứng. Các gợi ý JSON của CLI có thể được bỏ qua nếu
86
+ local.md đã trả lời. Setup không phải wizard nhập liệu và không tự ghi lựa chọn.
@@ -0,0 +1,67 @@
1
+ # Coding conventions: dự án mới và maintain
2
+
3
+ Harness yêu cầu AI đọc cấu trúc và tìm phần tái sử dụng trước khi code. Core áp dụng cho mọi stack;
4
+ Java/Spring, React/Next.js và React Native có thêm bộ convention mặc định. Đây là hướng dẫn cho AI
5
+ host, không phải công cụ tự phân tích hoặc cưỡng chế kiến trúc ứng dụng.
6
+
7
+ | Phạm vi | Cách làm |
8
+ | --- | --- |
9
+ | New | Đề xuất cấu trúc tối thiểu và convention theo adapter; chốt lựa chọn có ảnh hưởng trước khi dựng |
10
+ | Maintain | Theo quy định và pattern nhất quán của module đang sửa; giữ public contract và dùng common phù hợp |
11
+ | Mixed | Module mới kế thừa quy định chung của repo; chỉ quyết định mới cho phần nội bộ chưa có chuẩn |
12
+
13
+ Một tính năng mới trong module cũ vẫn là maintain. Có `pom.xml` hay `package.json` chưa đủ để kết luận
14
+ mode; `aih detect` chỉ đưa gợi ý stack. AI kiểm tra scope và quyết định đã có, không hỏi lại toàn bộ.
15
+
16
+ ## Quy trình sử dụng
17
+
18
+ 1. Chạy `aih setup`; AI đọc `AGENTS.md`, `.harness/local.md`, build/lint/format và code tương tự.
19
+ 2. Nếu thiếu lựa chọn quan trọng, AI hỏi A/B/C có trade-off và gợi ý dựa trên bằng chứng. Quyết định
20
+ thông thường đã được scope/convention bao phủ không cần hỏi lại.
21
+ 3. Lưu các nguồn và quyết định bền vững vào `.harness/local.md`, hoặc liên kết tới tài liệu đang có.
22
+ 4. Trước mỗi task, AI ghi ngắn: đã đọc đâu, tái sử dụng symbol nào, code mới đặt đâu, vì sao cần tạo mới.
23
+ Đặt ghi chú trong change/PR hiện tại; sửa nhỏ không bắt tạo thêm một bộ tài liệu.
24
+ 5. Review diff và chạy các kiểm tra của dự án. `aih verify --scope all` xuất checklist gồm Core,
25
+ còn `aih eval --scope all` xuất các tình huống để đánh giá AI thực tế; không lệnh nào tự chạy model.
26
+
27
+ ## Thứ tự ưu tiên
28
+
29
+ Trong phạm vi quyền và an toàn hiện có: quy định riêng đã thống nhất → cấu hình và pattern nhất quán
30
+ trong module → mặc định adapter cho chỗ còn thiếu. Nếu tài liệu và code mâu thuẫn, AI nêu nguồn và
31
+ hỏi khi ảnh hưởng đáng kể. Không lấy một file legacy làm chuẩn, không sao chép lỗi bảo mật để đồng bộ.
32
+
33
+ Ví dụ nội dung ngắn trong `.harness/local.md` (thay bằng đường dẫn thật đã kiểm tra):
34
+
35
+ ```markdown
36
+ ## Development conventions
37
+ - Scope: maintain module customer; new feature follows that module's layout.
38
+ - Sources: link the actual team guide, formatter config and comparable endpoint/tests.
39
+ - Boundaries: describe the allowed dependency direction and supported shared APIs.
40
+ - Reuse: link the actual error contract, pagination, mapper/client/components that apply.
41
+ - Checks: link declared project commands and existing architecture tests.
42
+ - Exceptions: record reason, scope and decision source; leave unknowns explicit.
43
+ ```
44
+
45
+ ## Nội dung theo stack
46
+
47
+ | Adapter | Chuẩn và điểm tái sử dụng |
48
+ | --- | --- |
49
+ | [Java/Spring](../adapters/java-spring/rules/conventions.md) | Package/naming, injection, DTO, transaction, error/logging, mapper, pagination, test |
50
+ | [React/Next.js](../adapters/react-nextjs/rules/conventions.md) | Feature/routes, naming, typed contracts, client/hooks/state, forms, design tokens, UI states |
51
+ | [React Native](../adapters/react-native/rules/conventions.md) | Screen/navigation, state, API/device boundaries, theme, secure storage, permission, platform checks |
52
+
53
+ Không tự tạo thêm `ApiResponse`, HTTP client, theme hoặc permission manager nếu dự án đã có bản phù hợp.
54
+ Không ép tái sử dụng bằng cách gọi nội bộ module khác, tạo vòng dependency hoặc đưa nghiệp vụ riêng vào
55
+ common. Dependency, base class hoặc abstraction mới cần nhu cầu thật và lý do; thay đổi kiến trúc ngoài
56
+ scope cần quyết định của người dùng. Không cài lint/framework mới chỉ vì adapter đề cập tên công cụ.
57
+
58
+ ## Update và giới hạn kiểm chứng
59
+
60
+ Sau khi phiên bản chứa thay đổi được phát hành, nâng CLI rồi chạy `aih update --dry-run`, `aih update`,
61
+ `aih check` trên nhánh consumer. Có thể kiểm thử trước bằng `--source /path/to/reviewed/ai-harness`.
62
+ Update giữ nguyên `.harness/local.md`, environment và các tài liệu dự án; host bổ sung thông tin còn
63
+ thiếu vào file cũ thay vì ghi đè. Không có schema mới, auto-scaffold ứng dụng hay migration kiến trúc.
64
+
65
+ `aih check` xác minh snapshot Harness; `aih verify` chỉ lập kế hoạch. Lint, test, build và kiểm tra ranh
66
+ giới thực tế do AI host/CI chạy. Khi chưa có kiểm tra kiến trúc tự động, báo kết quả review thủ công
67
+ và giới hạn. Các bài test CLI không chứng minh AI luôn tuân thủ convention; xem [đánh giá](../evals/README.md).
@@ -0,0 +1,30 @@
1
+ # Source review: product and solution delivery
2
+
3
+ Reviewed 2026-10-12. These are method references, not installed engines or vendored upstream assets.
4
+ Harness skills/templates were independently authored. Existing MIT distribution and no-runtime-dependency
5
+ contract continue; upstream trademarks/endorsement are not implied.
6
+
7
+ | Primary source / reviewed revision | Verified license | Method considered | Harness decision |
8
+ | --- | --- | --- | --- |
9
+ | [BMAD stable v6.12.2 README](https://github.com/bmad-code-org/BMAD-METHOD/blob/v6.12.2/README.md), [release](https://github.com/bmad-code-org/BMAD-METHOD/releases/tag/v6.12.2) | [MIT](https://github.com/bmad-code-org/BMAD-METHOD/blob/v6.12.2/LICENSE) | Proportional planning, durable context and explicit decisions/handoffs | Core solution-framing and optional Product/Architecture/Delivery workflows; no installer/runtime adoption |
10
+ | [PM-Skills README](https://github.com/phuryn/pm-skills/blob/c68487d721e419ec87af1ae6412a842978eab785/README.md), [create-prd skill](https://github.com/phuryn/pm-skills/blob/c68487d721e419ec87af1ae6412a842978eab785/pm-execution/skills/create-prd/SKILL.md) | [MIT](https://github.com/phuryn/pm-skills/blob/c68487d721e419ec87af1ae6412a842978eab785/LICENSE) | Task-oriented skills, lean decision-ready output and source-grounded questions | Add independent templates/examples/quality/handoff sections; retain Harness authorization and ambiguity rules |
11
+ | [arc42 overview](https://arc42.org/overview/), [license](https://arc42.org/license/) | CC BY-SA 4.0 for template structure/text; own project content remains owned by its author | Communicate context, boundaries, quality and operating reality at the necessary depth | Original compact overview/NFR/project-map/solution templates; no copied 12-section template or explanatory text |
12
+ | [MADR 4.0.0](https://github.com/adr/madr/tree/4.0.0), [docs](https://adr.github.io/madr/), [license](https://github.com/adr/madr/blob/4.0.0/LICENSE) | MIT OR CC0-1.0 | Trace decisions, alternatives and consequences near code | Original ADR draft with authority/status, revision, rollback and reconsideration triggers |
13
+
14
+ arc42 creators: Gernot Starke and Peter Hruschka. This reference acknowledges their documentation
15
+ method; it does not claim endorsement or import their licensed template into MIT assets.
16
+
17
+ BMAD main described v7 as preview alpha at review time. The stable v6.12.2 tag was the research baseline;
18
+ no alpha workflow or future release promise is a dependency. PM-Skills refers specifically to phuryn's
19
+ repo and the pinned revision above, not every similarly named marketplace.
20
+
21
+ ## Fit and limits
22
+ Harness keeps OpenSpec as the change record and a single manifest-driven instruction distribution.
23
+ Core applies a compact overview/impact check; capabilities add depth when selected. Product Manager
24
+ owns product value; Project Manager owns delivery coordination; role names do not make approvals.
25
+ No workflow engine, upstream prompt bundle, provider credentials or public account data was copied.
26
+
27
+ Research proves source/format availability, not Harness model effectiveness. Behavioral cases remain
28
+ unscored until real host runs and reviewed traces exist. Native host configuration references below
29
+ were checked against official docs; installed-client behavior still requires the smoke procedure in
30
+ [tool setup](../tool-setup/README.md). Recheck sources before changing host discovery recommendations.
@@ -1,12 +1,14 @@
1
- # Skill matrix — 53 skills, 11 nhóm module
1
+ # Skill matrix — 64 skills, 13 nhóm module
2
2
 
3
- Đây là bảng tra cứu **ID thật** theo `SKILL.md` trong source trên `main` (5 Core, 30 capability, 18 adapter). Dùng khi cần chuyển từ [Full SDLC](end-to-end-workflow.md) tới một skill cụ thể, không nạp toàn bộ 53 skill vào prompt.
3
+ Đây là bảng tra cứu **ID thật** theo `SKILL.md` trong source trên `main` (5 Core, 41 capability, 18 adapter). Dùng khi cần chuyển từ [Full SDLC](end-to-end-workflow.md) tới một skill cụ thể, không nạp toàn bộ 64 skill vào prompt.
4
4
 
5
5
  **Cách dùng:** `aih skills` xem skills đã cài, sau đó `aih skill harness-...` lấy nội dung. Danh mục này mô tả chức năng; **không** có nghĩa `aih` thực thi skills hoặc agent. Tech adapters và capabilities chỉ xuất hiện trong consumer khi được chọn; Core dùng chung.
6
6
 
7
7
  | Stage | Chọn module | Vai trò/output mong đợi |
8
8
  | --- | --- | --- |
9
9
  | Discovery → Product | `product` | Source register, BRD/PRD, AC, backlog, traceability |
10
+ | Product → Solution | `architecture` | Context, NFR, module/data/contracts, ADR, architecture review |
11
+ | Solution → Delivery | `delivery` | Value slices, dependencies, owned risks and scope-change assessment |
10
12
  | UX → Figma | `uiux` | Flows, screen specs, tokens, design review |
11
13
  | Spec → Code → Review | Core + adapter theo stack | OpenSpec, tests, changes, review evidence |
12
14
  | Release → Operate | `devops`, `kubernetes` khi phù hợp | CI, container, manifests, rollout và SLO plan |
@@ -22,7 +24,7 @@
22
24
  | [`harness-spec`](../core/skills/harness-spec/SKILL.md) | Technical design | Soạn OpenSpec proposal/design/tasks/delta specs | OpenSpec change và các quyết định còn thiếu |
23
25
  | [`harness-tdd`](../core/skills/harness-tdd/SKILL.md) | Implementation | Red → green → refactor trên slice nhỏ | Code + test evidence |
24
26
 
25
- ## Product capability (13)
27
+ ## Product capability (15)
26
28
 
27
29
  | Skill ID (nguồn) | Khi nào dùng | Mục đích | Output mong đợi |
28
30
  | --- | --- | --- | --- |
@@ -35,11 +37,12 @@
35
37
  | [`harness-product-prd-generation`](../capabilities/product/skills/harness-product-prd-generation/SKILL.md) | Product | Soạn PRD với scope, outcome và metrics | `docs/product/prd.md` |
36
38
  | [`harness-product-traceability`](../capabilities/product/skills/harness-product-traceability/SKILL.md) | Change impact | Liên kết nguồn → stories → UI → spec | `docs/product/traceability.md` |
37
39
  | [`harness-product-user-stories`](../capabilities/product/skills/harness-product-user-stories/SKILL.md) | Backlog | Phân rã epics/stories theo yêu cầu duyệt | `docs/product/backlog.md` |
38
-
39
40
  | [`harness-product-idea-discovery`](../capabilities/product/skills/harness-product-idea-discovery/SKILL.md) | Idea-driven | Cùng developer làm rõ ý tưởng, phương án, MVP và quyết định | `docs/discovery/idea.md` |
40
41
  | [`harness-product-product-research`](../capabilities/product/skills/harness-product-product-research/SKILL.md) | Research | Tìm và phân loại bằng chứng đáng tin cậy, trade-offs | `docs/discovery/research.md` |
41
42
  | [`harness-product-srs-generation`](../capabilities/product/skills/harness-product-srs-generation/SKILL.md) | Software requirements | Đặc tả FR/NFR, giao diện, luồng lỗi có trace ID | `docs/product/srs.md` |
42
43
  | [`harness-product-use-case-generation`](../capabilities/product/skills/harness-product-use-case-generation/SKILL.md) | Detailed flows | Viết UC chính/phụ/lỗi liên kết FR/US/AC | `docs/product/use-cases.md` |
44
+ | [`harness-product-mvp-definition`](../capabilities/product/skills/harness-product-mvp-definition/SKILL.md) | MVP scope | Explicit product decisions and traceability | Usable journey, in/out scope and minimum quality |
45
+ | [`harness-product-product-outcomes`](../capabilities/product/skills/harness-product-product-outcomes/SKILL.md) | Success measures | Explicit product decisions and traceability | Evidence-backed metrics and experiments |
43
46
 
44
47
  ## Monetization capability (5)
45
48
 
@@ -132,3 +135,24 @@
132
135
  - `harness-ai-evaluation` đánh giá **hành vi AI thực tế**; `aih eval` chỉ xuất và tổng hợp report do reviewer điền.
133
136
 
134
137
  Đối chiếu [Agent handoffs](agent-handoffs.md), [adapters](adapters.md) và [full workflow](end-to-end-workflow.md). Khi thêm skill mới, hãy cập nhật một hàng trong bảng; test tài liệu sẽ báo thiếu/trùng.
138
+
139
+ ## Architecture capability (6)
140
+
141
+ | Skill ID (nguồn) | Khi nào dùng | Mục đích | Output mong đợi |
142
+ | --- | --- | --- | --- |
143
+ | [`harness-architecture-project-context`](../capabilities/architecture/skills/harness-architecture-project-context/SKILL.md) | project-context | Map verified system context, module ownership and source-linked architecture for new or existing projects. | Project-owned docs/architecture or compact task note |
144
+ | [`harness-architecture-quality-attributes`](../capabilities/architecture/skills/harness-architecture-quality-attributes/SKILL.md) | quality-attributes | Translate NFRs into measurable quality scenarios and verification plans with evidence-backed targets. | Project-owned docs/architecture or compact task note |
145
+ | [`harness-architecture-solution-design`](../capabilities/architecture/skills/harness-architecture-solution-design/SKILL.md) | solution-design | Compare architectures and local design patterns against MVP, NFRs and existing project boundaries. | Project-owned docs/architecture or compact task note |
146
+ | [`harness-architecture-decision-records`](../capabilities/architecture/skills/harness-architecture-decision-records/SKILL.md) | decision-records | Record traceable architecture decisions with alternatives, consequences and reconsideration triggers. | Project-owned docs/architecture or compact task note |
147
+ | [`harness-architecture-change-impact`](../capabilities/architecture/skills/harness-architecture-change-impact/SKILL.md) | change-impact | Assess change impact and architecture drift using a source-linked living project map. | Project-owned docs/architecture or compact task note |
148
+ | [`harness-architecture-review`](../capabilities/architecture/skills/harness-architecture-review/SKILL.md) | review | Review solution and implemented boundaries against MVP, NFRs, ADRs and actual verification evidence. | Project-owned docs/architecture or compact task note |
149
+
150
+ ## Delivery capability (3)
151
+
152
+ | Skill ID (nguồn) | Khi nào dùng | Mục đích | Output mong đợi |
153
+ | --- | --- | --- | --- |
154
+ | [`harness-delivery-planning`](../capabilities/delivery/skills/harness-delivery-planning/SKILL.md) | planning | Plan value-bearing delivery slices and dependencies from reviewed scope and team-supplied estimates. | Project-owned docs/delivery or compact task note |
155
+ | [`harness-delivery-risk-management`](../capabilities/delivery/skills/harness-delivery-risk-management/SKILL.md) | risk-management | Maintain owned delivery risks, assumptions, blockers and dependencies with response triggers. | Project-owned docs/delivery or compact task note |
156
+ | [`harness-delivery-scope-change`](../capabilities/delivery/skills/harness-delivery-scope-change/SKILL.md) | scope-change | Evaluate scope changes across product value, architecture, dependencies and delivery before re-planning. | Project-owned docs/delivery or compact task note |
157
+
158
+ Product → Architecture → Delivery → Core/adapter uses [Solution workflow](solution-workflow.md); source revisions, requirement/AC/NFR/ADR IDs and actual decisions travel together. See [host setup](tool-setup/README.md).
@@ -0,0 +1,67 @@
1
+ # BA → PO → SA → PM → Dev/QA
2
+
3
+ Product contains BA/PO analysis and documents; optional Architecture adds Solution Architect context,
4
+ NFRs/ADRs/design/review; optional Delivery adds Project Manager planning/risks/scope changes.
5
+ Roles are instructions for a host and can be performed sequentially. User/stakeholder decisions keep
6
+ actual authority. No new workflow engine is installed; OpenSpec owns change proposal/design/tasks/specs.
7
+
8
+ ## Choose proportional depth
9
+ | Work | Minimum sufficient context | Optional deeper outputs |
10
+ | --- | --- | --- |
11
+ | Small clear fix | Existing source/decisions, affected boundary/reuse and regression note | Only new consequential decisions |
12
+ | New small product | Actor/problem, usable MVP journey/AC, minimum NFR, minimal solution and slices | Short overview and a significant ADR |
13
+ | Material/enterprise change | Source versions, MVP/requirements, module/data/contracts, NFR/failure impact | Project map, ADRs, risk register, rollout plan |
14
+
15
+ ```bash
16
+ aih init --adapters java-spring --capabilities product,architecture,delivery
17
+ aih setup
18
+ aih skills
19
+ aih new-doc mvp
20
+ aih new-doc overview --capability architecture
21
+ aih new-doc nfr --capability architecture
22
+ aih new-doc delivery-plan --capability delivery
23
+ aih new-change customer-search
24
+ aih verify --scope all
25
+ aih eval --scope all
26
+ ```
27
+
28
+ Blank templates only. Use existing approved BA/Confluence documents instead of re-creating them.
29
+ For an existing Harness install, edit selected capabilities in project.json and use reviewed update
30
+ --dry-run/update/check. `resolve` validates and warns; it does not install soft recommendations.
31
+
32
+ ## Responsibilities and handoff
33
+ | Role / module | Owns | Receives / passes |
34
+ | --- | --- | --- |
35
+ | BA / Product | Problem, business rules, source authority and requirement gaps | Idea/docs → versioned FR/US/AC/NFR and contradictions |
36
+ | PO / Product | MVP value, in/out scope, acceptance and priorities | BA → reviewed journey, outcomes and actual scope decisions |
37
+ | SA / Architecture | Context, quality scenarios, solution trade-offs, public boundaries | Scope → NFR/ADR/contracts/failure flows and verification |
38
+ | PM / Delivery | Sequencing, dependencies, estimates/risks and status | Accepted scope/design → value slices, owners, blockers and checkpoints |
39
+ | Dev/QA / Core + adapters | Implementation and actual tests | OpenSpec/decisions → minimal code, test evidence and findings |
40
+ | DevOps / optional capability | Operational release/recovery detail | Agreed constraints → reviewed rollout/rollback/telemetry |
41
+
42
+ Carry source revision, requirement/AC/NFR/ADR IDs, output paths, decisions/status, unresolved questions,
43
+ actual verification and next owner. Scope changes return to PO; technical conflicts to SA; delivery
44
+ risks to PM. UX and implementation feedback can revise the plan; this is not a one-way document conveyor.
45
+
46
+ ## MVP and architecture judgment
47
+ MVP must let a target actor complete a useful journey. A customer-search MVP can defer bulk import
48
+ but must include resource authorization, data integrity and agreed duplicate behavior.
49
+ Compare architectures on actual constraints; styles may combine. Ports and Adapters concerns boundaries;
50
+ Factory concerns object construction. Add Strategy/Adapter/State only for concrete variation or state
51
+ requirements. Direct code is a valid minimal choice. Do not promise enterprise scale from a diagram.
52
+
53
+ Record important decisions with evidence and owner status, not inferred approval. NFR targets/load,
54
+ cost and delivery estimates remain unknown when evidence is absent. Keep the living project-map
55
+ linked to actual source; refresh touched entries when code/requirements change instead of loading all docs.
56
+
57
+ ## Templates and reading paths
58
+ - [Product handoff](../capabilities/product/workflows/product-to-solution.md): MVP/outcomes, existing BA skills.
59
+ - [Architecture entry](../capabilities/architecture/workflows/discovery-to-design.md), [change review](../capabilities/architecture/workflows/change-review.md).
60
+ - [Delivery planning](../capabilities/delivery/workflows/planning.md), [execution/change](../capabilities/delivery/workflows/execution-change.md).
61
+ - [Core framing](../core/workflows/solution-framing.md), [skill matrix](skill-matrix.md), [agent handoffs](agent-handoffs.md).
62
+ - [Research/provenance](research/solution-workflow-sources.md), [coding tool setup](tool-setup/README.md).
63
+
64
+ `aih new-doc adr --capability architecture` produces one draft; move the populated file to a stable
65
+ project-owned `docs/architecture/decisions/adr-NNN.md` path and link it before making the next ADR.
66
+ `aih new-doc delivery-plan` keeps its historical Product path; explicitly select Delivery for the richer
67
+ plan. Do not duplicate/migrate an accepted plan automatically.
@@ -0,0 +1,30 @@
1
+ # Harness change impact
2
+
3
+ Maintainer-only template. Copy into the active OpenSpec design/change or use the table in a small PR.
4
+ Do not install this as a mandatory consumer application template.
5
+
6
+ - Change / objective: record the actual request and scope.
7
+ - Base commit / affected modules: record verified values.
8
+ - Decision sources: link existing decisions; list consequential unresolved questions.
9
+
10
+ Use `pending`, `done`, or `not-applicable`. Every row needs paths/evidence or a specific reason.
11
+ Keep pending work visible; no blanket not-applicable statement for the whole change.
12
+
13
+ | Area | Status | Affected paths and evidence / reason not applicable |
14
+ | --- | --- | --- |
15
+ | core | pending | Assess rule, entry point, policy and related behavior |
16
+ | adapter | pending | Assess registry, manifest, index, assets and module version |
17
+ | capability-skill | pending | Assess declaration, exposure, workflow and handoff |
18
+ | cli-config | pending | Assess schema, ownership, install/update and package contents |
19
+ | workflow | pending | Assess inputs, outputs, gates and receiving stage |
20
+ | documentation | pending | Assess usage guides, examples and links |
21
+ | verification | pending | Record actual commands/results; separate manual/live-agent evidence |
22
+ | release-migration | pending | Assess Unreleased notes, compatibility, rollback and version ownership |
23
+
24
+ ## Link chain
25
+ Record declaration → distribution → discovery → use → review/check → documentation for affected
26
+ behavior. Explain any stage that does not apply. For a removal/rename, list old references reconciled.
27
+
28
+ ## Validation and remaining work
29
+ Record commands actually run, outcomes, skipped checks with reasons, pending items and next owner.
30
+ Do not claim model compliance from file/link tests. Keep shared instructions in their canonical docs.