@manhd_d/ai-harness 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/CONTRIBUTING.md +9 -0
- package/README.md +35 -70
- package/adapters/react-native/adapter.yaml +4 -2
- package/adapters/react-native/checks/verification.yaml +24 -0
- package/adapters/react-native/evals/cases.json +20 -0
- package/adapters/react-native/rules.md +3 -0
- package/adapters/react-native/skills/harness-react-native-behavior-testing/SKILL.md +48 -0
- package/adapters/react-native/skills/harness-react-native-screen-delivery/SKILL.md +53 -0
- package/adapters/react-nextjs/adapter.yaml +4 -2
- package/adapters/react-nextjs/checks/verification.yaml +24 -0
- package/adapters/react-nextjs/evals/cases.json +20 -0
- package/adapters/react-nextjs/rules.md +3 -0
- package/adapters/react-nextjs/skills/harness-react-nextjs-behavior-testing/SKILL.md +48 -0
- package/adapters/react-nextjs/skills/harness-react-nextjs-feature-delivery/SKILL.md +55 -0
- package/capabilities/product/capability.json +1 -1
- package/capabilities/product/workflows/change-impact-analysis.md +4 -0
- package/capabilities/product/workflows/document-driven.md +6 -1
- package/capabilities/product/workflows/idea-driven.md +6 -1
- package/capabilities/uiux/capability.json +1 -1
- package/capabilities/uiux/workflows/docs-to-figma.md +7 -0
- package/capabilities/uiux/workflows/idea-to-figma.md +7 -0
- package/cli/artifacts.js +168 -0
- package/cli/environment.js +9 -10
- package/cli/harness.js +13 -3
- package/cli/main.js +9 -2
- package/cli/project-config.js +11 -0
- package/cli/readiness.js +3 -1
- package/core/checks/verification.json +12 -0
- package/core/evals/cases.json +30 -0
- package/core/workflows/artifact-contract.md +53 -0
- package/core/workflows/project-setup.md +2 -0
- package/core/workflows/spec-to-code.md +5 -0
- package/docs/README.md +41 -0
- package/docs/adapters.md +4 -2
- package/docs/agent-handoffs.md +4 -0
- package/docs/architecture.md +9 -0
- package/docs/artifact-contract.md +197 -0
- package/docs/change-readiness.md +6 -0
- package/docs/cli.md +15 -3
- package/docs/documentation-workflows.md +7 -0
- package/docs/end-to-end-workflow.md +4 -0
- package/docs/examples/fullstack-web.md +4 -0
- package/docs/examples/react-native-app.md +4 -0
- package/docs/frontend-mobile.md +76 -0
- package/docs/getting-started.md +50 -94
- package/docs/harness-maintenance.md +1 -0
- package/docs/i18n/README.vi.md +53 -0
- package/docs/project-configuration.md +7 -0
- package/docs/skill-matrix.md +8 -4
- package/docs/tool-setup/README.md +5 -0
- package/docs/versioning.md +18 -0
- package/harness.yaml +1 -1
- package/integrations/mcp/README.md +5 -0
- package/package.json +1 -1
- package/templates/AGENTS.md +2 -0
- package/templates/artifacts.json +6 -0
- package/templates/integrations.json +4 -0
- package/templates/openspec/artifact-impact.json +5 -0
- package/templates/openspec/design.md +3 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# AI Harness
|
|
2
|
+
|
|
3
|
+
[English](../../README.md) · **Tiếng Việt**
|
|
4
|
+
|
|
5
|
+
**Bộ hướng dẫn cho AI phát triển project theo workflow: Requirements → Code → Test → Review.**
|
|
6
|
+
|
|
7
|
+
Cài bộ hướng dẫn vào project, rồi giao việc cho công cụ AI bạn đang dùng.
|
|
8
|
+
|
|
9
|
+
## Hỗ trợ workflow nào?
|
|
10
|
+
|
|
11
|
+
| Workflow | Outputs |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| **BA / PO — Business analysis & product** | Từ ý tưởng hoặc docs có sẵn đến BRD, PRD, SRS, user stories và acceptance criteria. |
|
|
14
|
+
| **SA — Solution architecture** | Architecture, non-functional requirements, technical decisions và change-impact analysis. |
|
|
15
|
+
| **PM — Delivery planning** | Delivery phases, dependencies, risks và scope changes. |
|
|
16
|
+
| **Dev / QA — Implementation & testing** | Feature implementation, debugging, tests và code review theo project conventions. |
|
|
17
|
+
| **UI/UX & DevOps** | UI design, CI/CD, deployment và operations guidance khi cần. |
|
|
18
|
+
|
|
19
|
+
Hỗ trợ Spring Boot, React/Next.js, React Native/Expo, Python AI/RAG, Astro và Kubernetes.
|
|
20
|
+
Chỉ chọn phần cần dùng; task nhỏ không cần đủ bộ docs hay spec. [Chọn stack & module](../../docs/getting-started.md).
|
|
21
|
+
|
|
22
|
+
## Chạy ở đâu?
|
|
23
|
+
|
|
24
|
+
| Công cụ AI | Cách sử dụng | Hướng dẫn |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| **Codex** | CLI hoặc extension trong IDE | [Cài đặt & thiết lập](../../docs/tool-setup/codex.md) |
|
|
27
|
+
| **Claude Code** | Chạy `claude` trong terminal của project | [Cài đặt & thiết lập](../../docs/tool-setup/claude-code.md) |
|
|
28
|
+
| **Cursor** | Mở project, giao việc trong Agent | [Cài đặt & thiết lập](../../docs/tool-setup/cursor.md) |
|
|
29
|
+
| **GitHub Copilot** | Agent trong IDE hoặc Copilot CLI | [Cài đặt & thiết lập](../../docs/tool-setup/copilot.md) |
|
|
30
|
+
| **Gemini CLI** | Chạy `gemini` trong terminal của project | [Cài đặt & thiết lập](../../docs/tool-setup/gemini-cli.md) |
|
|
31
|
+
|
|
32
|
+
Harness cài hướng dẫn; công cụ AI thực hiện công việc. Cách nạp hướng dẫn tùy công cụ, theo link trên.
|
|
33
|
+
|
|
34
|
+
## Quick start
|
|
35
|
+
|
|
36
|
+
Cần **Node.js 22+** và một công cụ AI ở bảng trên. Chạy trong thư mục project:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx --yes @manhd_d/ai-harness init --detect
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Mở công cụ AI tại cùng project, rồi gửi:
|
|
43
|
+
|
|
44
|
+
> Đọc AGENTS.md, khảo sát project và ghi context cần thiết vào .harness/local.md.
|
|
45
|
+
> Thực hiện yêu cầu: [mô tả công việc]. Chạy test phù hợp và báo cáo kết quả.
|
|
46
|
+
|
|
47
|
+
Bạn giao việc bình thường, không cần gọi từng agent, skill hay mở chat riêng cho từng vai.
|
|
48
|
+
Nếu `--detect` chưa nhận diện được stack, [chọn module thủ công](../../docs/getting-started.md).
|
|
49
|
+
`aih check` chỉ kiểm tra file Harness; tính năng đúng hay chưa cần test của project và review.
|
|
50
|
+
|
|
51
|
+
[Getting started](../../docs/getting-started.md) · [Docs & examples](../../docs/README.md) · [Input/output & integrations](../../docs/artifact-contract.md) · [Model/agent configuration](../../docs/agent-configuration.md)
|
|
52
|
+
|
|
53
|
+
Đóng góp: [Contributing](../../CONTRIBUTING.md) · [Bảo trì Harness](../../docs/harness-maintenance.md) · [MIT](../../LICENSE).
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
| --- | --- | --- |
|
|
5
5
|
| `.harness/project.json` | Adapter/capability | Commit |
|
|
6
6
|
| `.harness/agents.json` | Provider/model/reasoning theo role, execution preferences và host mappings | Commit |
|
|
7
|
+
| `.harness/artifacts.json` | Input/output/storage, canonical ownership và source-write policy | Commit |
|
|
8
|
+
| `.harness/integrations.json` | Dynamic host connection aliases và scope; không chứa credentials | Commit |
|
|
7
9
|
| `.harness/local.md` | Nghiệp vụ, kiến trúc, nguồn và quyết định chung | Commit |
|
|
8
10
|
| `.harness/environment.json` | Công cụ, lệnh, file cần có | Commit |
|
|
9
11
|
| `.harness/machine.json` | Đường dẫn riêng của máy, tùy chọn | Ignore |
|
|
@@ -84,3 +86,8 @@ tự chạy lệnh, đổi JAVA_HOME, sửa settings.xml hay tải dependency.
|
|
|
84
86
|
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
87
|
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
88
|
local.md đã trả lời. Setup không phải wizard nhập liệu và không tự ghi lựa chọn.
|
|
89
|
+
|
|
90
|
+
## Input/output và integrations
|
|
91
|
+
Xem [Artifact contract](artifact-contract.md). `aih artifacts` báo khai báo; `aih setup` gợi ý hỏi
|
|
92
|
+
nơi lưu docs/UI nếu chưa biết. Các file này project-owned và được bảo toàn khi update; chúng không
|
|
93
|
+
kết nối MCP, cấp quyền hay chạy tool. Credentials và native host config nằm ngoài Git.
|
package/docs/skill-matrix.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Skill matrix —
|
|
1
|
+
# Skill matrix — 68 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, 41 capability,
|
|
3
|
+
Đây là bảng tra cứu **ID thật** theo `SKILL.md` trong source trên `main` (5 Core, 41 capability, 22 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ộ 68 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
|
|
|
@@ -84,17 +84,21 @@
|
|
|
84
84
|
| [`harness-java-spring-kafka-outbox`](../adapters/java-spring/skills/harness-java-spring-kafka-outbox/SKILL.md) | Async events | Outbox transaction và consumer dedupe | Event implementation + failure tests |
|
|
85
85
|
| [`harness-java-spring-spring-api`](../adapters/java-spring/skills/harness-java-spring-spring-api/SKILL.md) | Backend API | Authorization resource scoped, API contract | Endpoint + auth/contract tests |
|
|
86
86
|
|
|
87
|
-
## React / Next.js adapter (
|
|
87
|
+
## React / Next.js adapter (4)
|
|
88
88
|
|
|
89
89
|
| Skill ID (nguồn) | Khi nào dùng | Mục đích | Output mong đợi |
|
|
90
90
|
| --- | --- | --- | --- |
|
|
91
|
+
| [`harness-react-nextjs-feature-delivery`](../adapters/react-nextjs/skills/harness-react-nextjs-feature-delivery/SKILL.md) | Feature implementation | Reuse route/screen, UI/form and API/state boundaries | AC-linked diff/checks, actual results and explicit limits |
|
|
92
|
+
| [`harness-react-nextjs-behavior-testing`](../adapters/react-nextjs/skills/harness-react-nextjs-behavior-testing/SKILL.md) | Behavior testing | Component/integration and actual browser/server evidence | AC-linked tests, actual results and explicit limits |
|
|
91
93
|
| [`harness-react-nextjs-accessible-ui`](../adapters/react-nextjs/skills/harness-react-nextjs-accessible-ui/SKILL.md) | Frontend | UI states và semantic accessibility | UI + accessibility/browser evidence |
|
|
92
94
|
| [`harness-react-nextjs-server-boundaries`](../adapters/react-nextjs/skills/harness-react-nextjs-server-boundaries/SKILL.md) | Frontend security | Server actions, auth/caching boundaries | Server/client diff + auth/cache tests |
|
|
93
95
|
|
|
94
|
-
## React Native adapter (
|
|
96
|
+
## React Native adapter (4)
|
|
95
97
|
|
|
96
98
|
| Skill ID (nguồn) | Khi nào dùng | Mục đích | Output mong đợi |
|
|
97
99
|
| --- | --- | --- | --- |
|
|
100
|
+
| [`harness-react-native-screen-delivery`](../adapters/react-native/skills/harness-react-native-screen-delivery/SKILL.md) | Screen implementation | Reuse route/screen, UI/form and API/state boundaries | AC-linked diff/checks, actual results and explicit limits |
|
|
101
|
+
| [`harness-react-native-behavior-testing`](../adapters/react-native/skills/harness-react-native-behavior-testing/SKILL.md) | Behavior testing | JS/navigation and separate platform/device evidence | AC-linked tests, actual results and blocked native checks |
|
|
98
102
|
| [`harness-react-native-device-permissions`](../adapters/react-native/skills/harness-react-native-device-permissions/SKILL.md) | Mobile | Permissions + deep links theo OS | Permission/nav changes + platform tests |
|
|
99
103
|
| [`harness-react-native-offline-sync`](../adapters/react-native/skills/harness-react-native-offline-sync/SKILL.md) | Mobile | Offline queue, retries, conflict resolution | Persistence/sync + edge-case tests |
|
|
100
104
|
|
|
@@ -68,3 +68,8 @@ No logged-in host/MCP or live-agent smoke was run for these docs; follow each li
|
|
|
68
68
|
Review [Agent configuration](../agent-configuration.md) and run `aih setup --host <id>` for a declared
|
|
69
69
|
routing plan. Validate native model/effort in the actual picker/client; no account availability is
|
|
70
70
|
probed or host config overwritten. Incompatible defaults need your explicit provider/model mapping.
|
|
71
|
+
|
|
72
|
+
## Artifact destinations and connections
|
|
73
|
+
After project setup, inspect artifacts.json/integrations.json and [Artifact contract](../artifact-contract.md).
|
|
74
|
+
Resolve declared bindings against actual host tools; missing accounts/MCP/access remain unavailable.
|
|
75
|
+
Reuse recorded storage and source-write scope, verify revisions and maintain docs/spec/UI with each change.
|
package/docs/versioning.md
CHANGED
|
@@ -131,3 +131,21 @@ bundles use the CLI canonical seed if necessary. Existing configs are validated
|
|
|
131
131
|
role gaps inherit/report project defaults. Inspect new payload/update diff; re-export eval reports after
|
|
132
132
|
bundle changes. Revert consumer installation commit for rollback. Release update tests use relative
|
|
133
133
|
versions instead of hardcoded 0.7.0, preserving downgrade refusal on future release branches.
|
|
134
|
+
|
|
135
|
+
## Frontend/mobile coding and onboarding (unreleased)
|
|
136
|
+
|
|
137
|
+
React/Next.js and React Native module contracts advance from 1.1.0 to 1.2.0 additively: existing skill
|
|
138
|
+
IDs remain, feature/screen and behavior-testing skills plus manual checks/unscored cases are added.
|
|
139
|
+
Project/lock/agent schemas and the distribution version stay unchanged. Existing consumers run the
|
|
140
|
+
usual reviewed update dry-run/update/check; local.md, agents.json, native host config and app files are
|
|
141
|
+
project-owned and preserved. Re-export eval reports after bundle changes; revert the consumer install
|
|
142
|
+
commit for rollback. See [Frontend/mobile coding](frontend-mobile.md).
|
|
143
|
+
|
|
144
|
+
## Artifact contract and integrations (unreleased)
|
|
145
|
+
New project-owned schema-1 artifacts.json/integrations.json are optional on legacy installs and
|
|
146
|
+
seeded when absent; custom bytes, source docs and native host configs are preserved. Project/lock
|
|
147
|
+
schemas remain 1. Product 1.3.0 and UIUX 1.0.1 connect routing/maintenance guidance. Configured docs
|
|
148
|
+
outputs override new-doc routes; external destinations return a handoff without local/remote writes.
|
|
149
|
+
Configured output contracts require artifact-impact.json in existing changes when using ready; copy
|
|
150
|
+
the installed template and record reviewed impact. No automatic migration of source documents or
|
|
151
|
+
external publication. Review update --dry-run/update/check; rollback through Git. See [Artifact contract](artifact-contract.md).
|
package/harness.yaml
CHANGED
|
@@ -14,3 +14,8 @@ If a server is unavailable, report the missing capability rather than inventing
|
|
|
14
14
|
|
|
15
15
|
The example inventory is deliberately not a host-specific runnable configuration. Translate it to the
|
|
16
16
|
chosen client's supported schema and test permission denials before enabling write tools.
|
|
17
|
+
|
|
18
|
+
Project-owned .harness/integrations.json declares dynamic connection aliases, access and scope;
|
|
19
|
+
.harness/artifacts.json maps their input/output locations. See [Artifact contract](../../docs/artifact-contract.md).
|
|
20
|
+
`aih artifacts` does not discover/start MCP servers or authorize tool calls. Resolve aliases against
|
|
21
|
+
the actual host tools and keep native configs/credentials outside Git.
|
package/package.json
CHANGED
package/templates/AGENTS.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
For new projects or consequential changes, apply `.harness/core/workflows/solution-framing.md`;
|
|
7
7
|
preserve approved MVP/architecture and use compact notes for small clear fixes.
|
|
8
8
|
3. Read `.harness/local.md` and `.harness/environment.json` (if present) for project facts and commands.
|
|
9
|
+
Read project-owned `.harness/artifacts.json` and `.harness/integrations.json` when present;
|
|
10
|
+
apply `.harness/core/workflows/artifact-contract.md` before creating docs/UI or changing sources.
|
|
9
11
|
Read project-owned `.harness/agents.json` when present and `.harness/core/workflows/agent-routing.md`.
|
|
10
12
|
Model/execution settings are preferences: verify actual host support, keep simple work sequential,
|
|
11
13
|
and never switch to premium automatically. Host/runtime permissions still apply.
|
|
@@ -10,6 +10,9 @@ reusable public APIs, intended code placement and rationale for new components/d
|
|
|
10
10
|
## Solution Fit
|
|
11
11
|
TODO: Link MVP/AC/NFR, affected modules/data/contracts, important failure flows, accepted ADRs or
|
|
12
12
|
proportional decision notes, dependencies and rollout/rollback constraints.
|
|
13
|
+
## Artifact Impact
|
|
14
|
+
TODO: Input IDs and observed source revisions; affected output docs/spec/UI/code; canonical owners,
|
|
15
|
+
destinations and permitted write scope. Link artifact-impact.json when configured; justify unchanged outputs.
|
|
13
16
|
## Decisions
|
|
14
17
|
TODO: Chosen approach, alternatives and trade-offs.
|
|
15
18
|
## Risks / Trade-offs
|