@manhd_d/ai-harness 0.13.0 → 0.15.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 +57 -0
- package/README.md +22 -7
- package/adapters/react-native/adapter.yaml +1 -1
- package/adapters/react-native/skills/harness-react-native-behavior-testing/SKILL.md +9 -0
- package/adapters/react-nextjs/adapter.yaml +1 -1
- package/adapters/react-nextjs/skills/harness-react-nextjs-behavior-testing/SKILL.md +9 -0
- package/bin/aih.js +1 -1
- package/capabilities/product/capability.json +1 -1
- package/capabilities/product/workflows/idea-to-prd.md +15 -0
- package/capabilities/product/workflows/idea-to-prd.workflow.json +82 -0
- package/cli/adapters.js +1 -1
- package/cli/agents.js +14 -5
- package/cli/capabilities.js +2 -1
- package/cli/end-user.js +30 -0
- package/cli/environment.js +2 -0
- package/cli/evaluation-contract.js +11 -1
- package/cli/files.js +7 -2
- package/cli/harness.js +60 -15
- package/cli/journey-evidence.js +34 -0
- package/cli/kiro.js +15 -0
- package/cli/knowledge.js +104 -0
- package/cli/main.js +80 -19
- package/cli/portable-config.js +124 -0
- package/cli/project-decisions.js +47 -0
- package/cli/readiness.js +82 -41
- package/cli/setup.js +66 -0
- package/cli/skill-requirements.js +47 -0
- package/cli/start-config.js +15 -0
- package/cli/start.js +151 -0
- package/cli/structured.js +65 -0
- package/cli/sync-integrations.js +49 -0
- package/cli/verification-report.js +9 -5
- package/cli/verification.js +7 -2
- package/cli/workflow.js +76 -0
- package/core/agents/orchestrator.md +1 -1
- package/core/agents/test-engineer.md +4 -2
- package/core/checks/verification.json +12 -0
- package/core/evals/cases.json +97 -1
- package/core/rules/context.md +9 -0
- package/core/skills/harness-end-user-testing/SKILL.md +55 -0
- package/core/skills/harness-review/SKILL.md +4 -0
- package/core/skills/harness-spec/SKILL.md +3 -1
- package/core/skills/harness-start/SKILL.md +66 -0
- package/core/skills/harness-verification/SKILL.md +2 -0
- package/core/workflows/adaptive-verification.md +5 -0
- package/core/workflows/agent-routing.md +6 -0
- package/core/workflows/approvals.schema.json +62 -0
- package/core/workflows/clarification.md +6 -1
- package/core/workflows/continuous-development.md +5 -0
- package/core/workflows/end-user-acceptance.md +36 -0
- package/core/workflows/greenfield-setup.md +27 -0
- package/core/workflows/project-setup.md +30 -1
- package/core/workflows/seed.md +25 -0
- package/core/workflows/spec-to-code.md +19 -8
- package/core/workflows/spec-to-code.workflow.json +99 -0
- package/core/workflows/workflow.schema.json +113 -0
- package/docs/README.md +11 -0
- package/docs/adaptive-verification.md +10 -1
- package/docs/agent-configuration.md +7 -0
- package/docs/agent-handoffs.md +6 -1
- package/docs/architecture.md +53 -3
- package/docs/cli.md +55 -3
- package/docs/configuration-backup.md +130 -0
- package/docs/conformance-runner.md +64 -0
- package/docs/end-to-end-workflow.md +4 -0
- package/docs/end-user-testing.md +128 -0
- package/docs/frontend-mobile.md +7 -0
- package/docs/getting-started.md +21 -7
- package/docs/harness-maintenance.md +1 -0
- package/docs/i18n/README.es.md +18 -5
- package/docs/i18n/README.vi.md +19 -6
- package/docs/i18n/README.zh-CN.md +18 -5
- package/docs/project-configuration.md +15 -1
- package/docs/python-installation.md +85 -0
- package/docs/session-onboarding.md +215 -0
- package/docs/skill-matrix.md +5 -3
- package/docs/start.md +43 -0
- package/docs/tool-setup/README.md +13 -14
- package/docs/tool-setup/claude-code.md +10 -0
- package/docs/tool-setup/codex.md +10 -0
- package/docs/tool-setup/copilot.md +10 -0
- package/docs/tool-setup/cursor.md +10 -0
- package/docs/tool-setup/gemini-cli.md +10 -0
- package/docs/tool-setup/kiro.md +112 -38
- package/docs/versioning.md +67 -0
- package/docs/workflow-contract.md +66 -0
- package/evals/README.md +7 -0
- package/harness.yaml +13 -1
- package/package.json +7 -3
- package/scripts/conformance-runner.js +119 -0
- package/scripts/score-eval.js +3 -1
- package/templates/AGENTS.md +6 -0
- package/templates/decisions.json +4 -0
- package/templates/local.md +21 -0
- package/templates/openspec/approvals.json +5 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# npm, pip và cài offline
|
|
2
|
+
|
|
3
|
+
Hai kênh dùng cùng Core, Agents, Skills, Workflows, Adapters và CLI JavaScript. npm cần Node.js 22+;
|
|
4
|
+
pip cần Python 3.9+ **và Node.js 22+**. Wheel không tải Node, không phụ thuộc package Python khác,
|
|
5
|
+
không chạy npm/npx và không kết nối mạng khi chạy `aih`. Host AI có yêu cầu mạng riêng.
|
|
6
|
+
|
|
7
|
+
PyPI name: `manhd-ai-harness`. Đây là kênh bổ sung của bản phát hành tiếp theo; không coi feature
|
|
8
|
+
PR là package đã xuất bản. Maintainer phải đăng ký tên/Trusted Publisher trước lần publish đầu.
|
|
9
|
+
|
|
10
|
+
## Cài và dùng
|
|
11
|
+
|
|
12
|
+
Trong virtualenv đã kích hoạt (khuyến nghị `.venv` hoặc virtualenv ngoài project):
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
python -m pip install manhd-ai-harness
|
|
16
|
+
aih init --host codex
|
|
17
|
+
aih check
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Chọn host `codex`, `claude-code`, `cursor`, `copilot`, `gemini-cli` hoặc `kiro`. Mở session AI,
|
|
21
|
+
gọi skill harness-start nếu host nhận diện; nếu không, gửi prompt đọc
|
|
22
|
+
`.agents/skills/harness-start/SKILL.md`. Xem [setup đa IDE](tool-setup/README.md).
|
|
23
|
+
|
|
24
|
+
Không cần npm. Nếu `aih` chưa nằm trong PATH, kích hoạt virtualenv hoặc dùng
|
|
25
|
+
`python -m ai_harness.launcher`. Đặt `AIH_NODE` tới file `node`/`node.exe` khi Node không có trong PATH.
|
|
26
|
+
Ví dụ PowerShell: `$env:AIH_NODE = 'D:\tools\node\node.exe'`.
|
|
27
|
+
Không cài cả npm global và pip vào cùng PATH nếu không muốn lựa chọn executable mơ hồ;
|
|
28
|
+
`Get-Command aih` (PowerShell) hoặc `command -v aih` xác định launcher đang dùng.
|
|
29
|
+
|
|
30
|
+
## Công ty chặn npm và PyPI
|
|
31
|
+
|
|
32
|
+
Trên máy có Internet, tải wheel của phiên bản đã phát hành:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
python -m pip download --only-binary=:all: --no-deps manhd-ai-harness -d wheelhouse
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Chuyển wheel, Python và Node portable/installer phù hợp OS/CPU vào máy công ty qua kênh được phép.
|
|
39
|
+
Wheel là pure Python, dùng chung các OS; Node portable phải đúng nền tảng.
|
|
40
|
+
Tại máy offline, kích hoạt virtualenv và chỉ định **đúng tên wheel đã tải**:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
python -m pip install --no-index --no-deps wheelhouse/manhd_ai_harness-X.Y.Z-py3-none-any.whl
|
|
44
|
+
aih init --host kiro --adapters java-spring
|
|
45
|
+
aih check
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
X.Y.Z là placeholder cho release thực tế. `pip --no-index` không hỏi registry; `.whl` đã chứa toàn bộ
|
|
49
|
+
payload nên không cần build tool hoặc dependencies. Không cần OpenSpec CLI để tạo draft.
|
|
50
|
+
Package không thay cấu hình proxy/TLS của công ty. Nếu PyPI được phép và chỉ npm bị chặn, dùng pip
|
|
51
|
+
trực tiếp. Có thể dùng mirror PyPI nội bộ đã được tổ chức phê duyệt.
|
|
52
|
+
|
|
53
|
+
## Cập nhật
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
python -m pip install --upgrade manhd-ai-harness
|
|
57
|
+
aih --version
|
|
58
|
+
aih backup
|
|
59
|
+
aih update --dry-run
|
|
60
|
+
aih update
|
|
61
|
+
aih check
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Offline: thay lệnh đầu bằng `python -m pip install --no-index --no-deps --upgrade /path/to/new.whl`.
|
|
65
|
+
pip cập nhật CLI; `aih update` cập nhật snapshot của **từng project**, không tải gì. Hai bước khác nhau.
|
|
66
|
+
User config được giữ nguyên; managed drift vẫn chặn update. Backup + Git giữ khả năng rollback.
|
|
67
|
+
Trong cùng release npm/pip dùng version từ package.json; không có version Python độc lập.
|
|
68
|
+
|
|
69
|
+
## Build và phát hành
|
|
70
|
+
|
|
71
|
+
`python scripts/build-python.py` tạo wheel/sdist bằng thư viện chuẩn. Backend PEP 517 trong
|
|
72
|
+
pyproject.toml có `requires = []`; `python -m pip wheel --no-index --no-deps .` cũng build được offline.
|
|
73
|
+
Không nhân bản source: payload lấy từ files allowlist của package.json, gồm cả hidden OpenSpec template.
|
|
74
|
+
`python scripts/smoke-python.py` kiểm từng byte, cài wheel trong .venv, CLI, update/reinstall,
|
|
75
|
+
Node thiếu, và rebuild sdist offline. Không gọi npm để build/install wheel.
|
|
76
|
+
|
|
77
|
+
Workflow [npm-publish.yml](../.github/workflows/npm-publish.yml) build/test cả hai kênh từ cùng tag
|
|
78
|
+
Release Please, publish npm rồi publish PyPI bằng wheel đã kiểm. Maintainer cấu hình PyPI Trusted
|
|
79
|
+
Publisher: owner `manh0303`, repository `ai-harness`, workflow `npm-publish.yml`, environment `pypi`.
|
|
80
|
+
Đặt environment review theo chính sách repo. Theo [PyPA guide](https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/).
|
|
81
|
+
|
|
82
|
+
Hai registry không có transaction chung: npm có thể thành công còn PyPI lỗi. Rerun **job publish-pypi**
|
|
83
|
+
của release đó khi đã sửa cấu hình, dùng cùng artifact; không đổi version để chữa lỗi xác thực.
|
|
84
|
+
Artifact có thời hạn lưu của Actions; nếu hết hạn, rebuild từ đúng tag và kiểm payload/version trước
|
|
85
|
+
khi publish phần thiếu. Feature PR không tự tag, merge hoặc publish.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Session onboarding và context đã lưu
|
|
2
|
+
|
|
3
|
+
[Kiro quick start](tool-setup/kiro.md): `init --host kiro` → session đầu tiên → `/harness-start`.
|
|
4
|
+
Core harness-start cũng dùng được khi host khác đọc canonical skill. Host hiểu dự án/hỏi/điền
|
|
5
|
+
cấu hình; CLI không gọi model. `start --host kiro` luôn trả plan, không interview cả khi có TTY.
|
|
6
|
+
Terminal intake cho các host khác tiếp tục được giữ.
|
|
7
|
+
|
|
8
|
+
## Structured local.md
|
|
9
|
+
|
|
10
|
+
YAML frontmatter subset hoặc JSON-compatible YAML schema 1; prose giữ bên dưới:
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
---
|
|
14
|
+
schema_version: 1
|
|
15
|
+
stack:
|
|
16
|
+
language: java
|
|
17
|
+
version: "21"
|
|
18
|
+
framework: spring-boot
|
|
19
|
+
framework_version: "3.5.11"
|
|
20
|
+
build:
|
|
21
|
+
tool: maven
|
|
22
|
+
approved_deviations:
|
|
23
|
+
- id: approved-error-contract
|
|
24
|
+
rule: "Preserve the approved error contract"
|
|
25
|
+
reason: "Existing approved convention"
|
|
26
|
+
source: docs/backend-conventions.md
|
|
27
|
+
sources:
|
|
28
|
+
- pom.xml
|
|
29
|
+
- docs/backend-conventions.md
|
|
30
|
+
---
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Phiên bản chỉ là ví dụ; host đọc dependency thực tế. stack/build là map string; quote versions.
|
|
34
|
+
Mỗi deviation có id/rule/reason, source tùy chọn. sources là file local tương đối đã đọc, không
|
|
35
|
+
`.env`, machine.json, Git nội bộ hoặc credentials. Không tự coi inferred deviation là approved.
|
|
36
|
+
Parser hỗ trợ mapping, sequence, scalar, inline JSON; không anchors/aliases/tags, block scalar
|
|
37
|
+
(`|`, `>`), implicit dates hay YAML phức tạp. Duplicate/unsupported/schema errors bị từ chối.
|
|
38
|
+
Legacy prose vẫn hợp lệ, init/update giữ nguyên; host thêm frontmatter khi seed và bảo toàn prose.
|
|
39
|
+
Cấu trúc này không bảo đảm hai model suy luận giống nhau.
|
|
40
|
+
|
|
41
|
+
Đường dẫn máy ở ignored machine.json. Dùng `tools.maven.executable`, `files.maven-settings.path`
|
|
42
|
+
và command ID như `commands.get-token`; không thêm `tools.maven.settings` hay underscore ID vào
|
|
43
|
+
schema hiện có. [Maven example](project-configuration.md).
|
|
44
|
+
|
|
45
|
+
## Seed và freshness
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
aih seed
|
|
49
|
+
aih seed --record
|
|
50
|
+
aih seed --check
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
seed read-only liệt kê nguồn cho host inspect. record yêu cầu structured local.md có ít nhất một
|
|
54
|
+
nguồn đã đọc và tồn tại; ghi hash sau reconciliation. check không ghi, exit 1 khi missing/stale,
|
|
55
|
+
exit 0 khi current. CLI không tự tạo tri thức hoặc xác nhận summary đúng.
|
|
56
|
+
|
|
57
|
+
Theo dõi build manifests, AGENTS/README/OVERVIEW/conventions/testing/workflow files tối đa 4 tầng,
|
|
58
|
+
cộng local.md.sources cho nguồn sâu hơn/tên riêng. Bỏ Git/vendor/build/cache và thư mục Harness/host.
|
|
59
|
+
Giới hạn: 10000 entries, 256 auto sources, 128 explicit sources, 1 MiB/file; symlink không làm nguồn.
|
|
60
|
+
Hash bao gồm source/context digests và bundle digest. Thêm/xóa/sửa nguồn báo stale; code thông thường
|
|
61
|
+
không ép re-seed, trừ khi được khai báo làm nguồn. Refresh đúng assumptions bị ảnh hưởng rồi record lại.
|
|
62
|
+
Remote revisions cần host kiểm tra; scoped AGENTS vẫn phải đọc dù hash current.
|
|
63
|
+
|
|
64
|
+
knowledge.json project-owned, nằm ngoài managed lock, không có source text hoặc hash machine.json.
|
|
65
|
+
Setup gián đoạn giữ partial facts; chỉ record cache sau khi đã đối chiếu. Hash phát hiện drift,
|
|
66
|
+
không chứng minh factual correctness hay độ tin cậy của nguồn.
|
|
67
|
+
|
|
68
|
+
## Skill prerequisites
|
|
69
|
+
|
|
70
|
+
Skill frontmatter có requires tùy chọn:
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
requires:
|
|
74
|
+
machine:
|
|
75
|
+
- tools.maven.executable
|
|
76
|
+
environment:
|
|
77
|
+
- files.maven-settings.path
|
|
78
|
+
- commands.get-token
|
|
79
|
+
mcp:
|
|
80
|
+
- project-db
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`aih skills` xuất metadata này. `aih doctor --skill <name>` kiểm tra local references/presence,
|
|
84
|
+
báo missing không in giá trị. Tìm explicit custom skill ở `.agents/skills/<name>/SKILL.md`,
|
|
85
|
+
`.kiro/skills/<name>/SKILL.md` hoặc `plugins/<name>/SKILL.md`.
|
|
86
|
+
Machine requirement cần override đã khai báo; dùng environment requirement nếu PATH/wrapper được
|
|
87
|
+
chấp nhận. Không ép Maven cho skill không cần nó. MCP declaration vẫn unverified, host kiểm tra
|
|
88
|
+
actual tools/quyền. Passing doctor không chứng minh build thành công.
|
|
89
|
+
|
|
90
|
+
## Role extensions
|
|
91
|
+
|
|
92
|
+
Trong map agents của agents.json:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
"core:security-reviewer": {
|
|
96
|
+
"model": "@balanced",
|
|
97
|
+
"reasoning": "high",
|
|
98
|
+
"extensions": ["plugins/project/agents/security-reviewer.md"]
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
aih agents trả contract_load_order: canonical contract trước, extensions theo thứ tự. Host đọc
|
|
103
|
+
và áp dụng chúng; CLI không ghép prose hay tạo agent. Extension bổ sung domain/conventions,
|
|
104
|
+
không cấp quyền hoặc làm yếu core security. Missing file chặn role; contradictory facts cần đối chiếu
|
|
105
|
+
nguồn/owner. Tối đa 16 project-owned Markdown, 64 KiB/file, không traversal/symlink.
|
|
106
|
+
Transfer bỏ extension paths gắn repo cũ. Field delegate không thuộc schema; nếu đã dùng workaround
|
|
107
|
+
đó, chuyển đường dẫn Markdown sang extensions và bỏ delegate trước update. CLI không tự đoán migration.
|
|
108
|
+
|
|
109
|
+
## MCP alias discovery
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
aih sync-integrations --host kiro --dry-run
|
|
113
|
+
aih sync-integrations --host kiro
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Đọc user `~/.kiro/settings/mcp.json` rồi project `.kiro/settings/mcp.json`; project disabled override
|
|
117
|
+
loại server khỏi discoveries. `--from <file>` đọc một config riêng, hỗ trợ absolute path.
|
|
118
|
+
Chỉ thêm enabled server names vào integrations.json, read-only declaration. Không credentials,
|
|
119
|
+
endpoint, command/env, autoApprove; không xóa/ghi đè declarations cũ. Alias collisions thêm suffix.
|
|
120
|
+
Config không có actual tool inventory: host phải discovery tools/quyền và lưu evidence riêng.
|
|
121
|
+
Read-only declaration không cưỡng chế permission; CLI không kết nối hoặc chạy server.
|
|
122
|
+
|
|
123
|
+
## Propose sidecars
|
|
124
|
+
|
|
125
|
+
aih new-change đã tạo sidecars từ locked templates. Với Kiro/upstream propose bên ngoài,
|
|
126
|
+
`aih change-sidecars <id>` thêm `.openspec.yaml`, decisions.json, verification.json và
|
|
127
|
+
artifact-impact.json còn thiếu, giữ file cũ. Workflow Harness dùng helper; không patch upstream CLI.
|
|
128
|
+
|
|
129
|
+
## Backup / migration
|
|
130
|
+
|
|
131
|
+
Shared context/config tiếp tục vào config backup. knowledge.json là cache tái tạo, không ở archive
|
|
132
|
+
allowlist; full repo backup giữ nó. Machine/credentials không export. Extensions và custom host
|
|
133
|
+
files backup cùng repo. Transfer giữ module/model preferences, bỏ repo autonomy và extensions.
|
|
134
|
+
Update giữ configs/prose/cache; edited locked wrappers/hook chặn update. Rollback snapshot qua Git,
|
|
135
|
+
rồi reconcile cache. Các lệnh này cần reviewed source/release; feature PR không tự bump/publish npm.
|
|
136
|
+
Live Kiro/model loading và token savings chưa đo; local tests không thay phiên thực tế.
|
|
137
|
+
|
|
138
|
+
## Clone repo và setup còn thiếu
|
|
139
|
+
|
|
140
|
+
Giữ luồng chính `init --host kiro` → chat → `/harness-start`. Thành viên mới reuse tri thức dùng
|
|
141
|
+
chung trong repo, chỉ bổ sung machine.json và thông tin còn thiếu. `aih setup` vẫn read-only:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
aih setup --apply --dry-run
|
|
145
|
+
aih setup --apply
|
|
146
|
+
aih setup --greenfield
|
|
147
|
+
aih start --compact --host kiro
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
`--apply` chỉ tạo shared config thiếu từ snapshot/templates đã cài, giữ bundle/lock/config cũ.
|
|
151
|
+
Không điền đường dẫn máy, task hay knowledge cache. Nếu project.json thiếu, dựng lại selection từ
|
|
152
|
+
lock; selection hiện có khác lock thì phải update. Schema/path/drift errors chặn trước ghi;
|
|
153
|
+
ordinary write errors rollback. --dry-run cần --apply và không ghi target. Không recovery được
|
|
154
|
+
câu trả lời tùy chỉnh đã mất: dùng Git/backup. `--greenfield` chọn guidance, không chốt kiến trúc.
|
|
155
|
+
Không có CLI trong host: đọc templates để tạo file thiếu, báo CLI checks NOT_RUN. “Không cần tự
|
|
156
|
+
gõ terminal” phụ thuộc host có quyền file/shell; clone không tự cài CLI hoặc đăng nhập host.
|
|
157
|
+
Compact trả JSON task/stack/module để định hướng, bỏ source scan/interview; freshness là unchecked.
|
|
158
|
+
|
|
159
|
+
## Quyết định dùng chung và phạm vi
|
|
160
|
+
|
|
161
|
+
`.harness/decisions.json` dùng schema 1; không thay decisions.json của từng OpenSpec change:
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"schema_version": 1,
|
|
166
|
+
"decisions": [{
|
|
167
|
+
"id": "D-001",
|
|
168
|
+
"scope": "module:billing",
|
|
169
|
+
"status": "confirmed",
|
|
170
|
+
"question": "Which error contract applies?",
|
|
171
|
+
"answer": "Preserve the accepted module contract",
|
|
172
|
+
"reason": "Compatibility with existing consumers",
|
|
173
|
+
"source": "docs/billing-contract.md"
|
|
174
|
+
}]
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Scope là `project` hoặc `module:<slug>` (cho phép phân cấp như module:services/billing).
|
|
179
|
+
Status proposed chỉ là đề xuất; confirmed cần answer/reason/source; superseded giữ các trường đó
|
|
180
|
+
và superseded_by trỏ tới quyết định cùng scope đã confirmed hoặc superseded. Không duplicate ID,
|
|
181
|
+
self-reference, cycle, missing/cross-scope/proposed replacement. Tối đa 256 quyết định; ID 64 ký tự,
|
|
182
|
+
text 4096 ký tự, single-line. File không có trên snapshot cũ vẫn hợp lệ. CLI kiểm tra cấu trúc,
|
|
183
|
+
không tự xác nhận nguồn có thực sự được phê duyệt; host/owner chịu trách nhiệm đối chiếu.
|
|
184
|
+
|
|
185
|
+
`aih decisions --scope module:billing` trả project choices cộng đúng scope được chọn; không tự
|
|
186
|
+
inherit các module cha/con. Host chọn thêm scope liên quan khi cần và xử lý mâu thuẫn, không tự
|
|
187
|
+
cho module override project/security. Trước khi hỏi đọc các quyết định applicable rồi change-local
|
|
188
|
+
decisions. Reuse confirmed khi nguồn/phạm vi còn hiệu lực; đổi nguồn/phạm vi có thể cần hỏi lại.
|
|
189
|
+
do_not_ask_again boolean tùy chọn không khóa quyết định vĩnh viễn và không cấp quyền merge/deploy.
|
|
190
|
+
Save từng câu trả lời/quan sát để resume; chỉ seed --record sau đối chiếu. Hash đổi khi decisions
|
|
191
|
+
đổi; hash không chứng minh facts đúng. Legacy choices trong prose vẫn đọc được, không tự chuyển
|
|
192
|
+
inference thành confirmed. Backup cùng dự án giữ file này; transfer sang dự án khác loại bỏ nó.
|
|
193
|
+
|
|
194
|
+
## Kiểm chứng bằng host thật
|
|
195
|
+
|
|
196
|
+
Local tests/package smoke kiểm tra CLI và file; chưa chứng minh model tuân thủ hoặc skill menu/hook
|
|
197
|
+
đã hoạt động trên Kiro. Chạy trên workspace thử, ghi source commit, CLI/snapshot/host version, OS,
|
|
198
|
+
model và invocation. Không dùng dữ liệu khách hàng hay credentials trong evidence.
|
|
199
|
+
|
|
200
|
+
| Scenario | Quan sát bắt buộc |
|
|
201
|
+
| --- | --- |
|
|
202
|
+
| Dự án mới | /harness-start đọc idea/docs, chỉ hỏi thiếu; không ép stack/CI khi chưa cần |
|
|
203
|
+
| Existing repo | Đọc scoped instructions và code mẫu; source-linked facts, machine paths riêng |
|
|
204
|
+
| Clone thành viên mới | Reuse facts/quyết định chung, tạo file thiếu không đổi bundle/lock |
|
|
205
|
+
| Đổi convention | seed báo stale, AI đọc nguồn đổi và cập nhật assumptions bị ảnh hưởng |
|
|
206
|
+
| Ngắt giữa interview | Session sau reuse answers đã lưu; chưa ghi cache hoàn thành giả |
|
|
207
|
+
| Quyết định được thay thế | Không áp dụng đáp án superseded/proposed; hỏi lại chỉ phần material |
|
|
208
|
+
| Thiếu CLI/MCP/VPN | Nêu đúng blocker; không khẳng định access hoặc test đã pass |
|
|
209
|
+
| Update/restore | Custom config giữ nguyên; backup/restore giữ history, transfer bỏ domain choices |
|
|
210
|
+
|
|
211
|
+
Lưu raw transcript/command output và diff trước/sau (redacted), outcome PASS/FAIL/BLOCKED/NOT_RUN.
|
|
212
|
+
Đo riêng số câu hỏi lặp, files/tool calls đã đọc, thời gian setup và token do host báo. Trường hợp
|
|
213
|
+
host không cung cấp usage ghi unknown; không ước lượng thành số đo. So sánh cold start và session
|
|
214
|
+
sau trên cùng fixture/model/host, ghi số lần chạy và biến động; chưa có baseline thì không công bố
|
|
215
|
+
“18K → 2K” hoặc “45 phút → 5 phút”. Core eval scenarios tiếp tục unscored cho tới khi chạy thật.
|
package/docs/skill-matrix.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Skill matrix —
|
|
1
|
+
# Skill matrix — 68 skills, 15 nhóm module
|
|
2
2
|
|
|
3
|
-
Đây là bảng tra cứu **ID thật** theo `SKILL.md` trong source trên `main` (
|
|
3
|
+
Đây là bảng tra cứu **ID thật** theo `SKILL.md` trong source trên `main` (8 Core, 42 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ộ 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
|
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
| Release → Operate | `devops`, `kubernetes` khi phù hợp | CI, container, manifests, rollout và SLO plan |
|
|
15
15
|
| Traffic → Publisher Revenue | `monetization` (optional) | SEO growth, AdSense readiness, UX/consent checks, Page RPM review |
|
|
16
16
|
|
|
17
|
-
## Core (
|
|
17
|
+
## Core (8)
|
|
18
18
|
|
|
19
19
|
| Skill ID (nguồn) | Khi nào dùng | Mục đích | Output mong đợi |
|
|
20
20
|
| --- | --- | --- | --- |
|
|
21
|
+
| [`harness-start`](../core/skills/harness-start/SKILL.md) | First session / setup / resume | Inspect before asking, save context/task | local/environment/start and knowledge freshness |
|
|
22
|
+
| [`harness-end-user-testing`](../core/skills/harness-end-user-testing/SKILL.md) | End-user QA | Thao tác giao diện thật và kiểm tra luồng nghiệp vụ | AC → outcome/evidence, real/mocked scope, blockers |
|
|
21
23
|
| [`harness-ai-evaluation`](../core/skills/harness-ai-evaluation/SKILL.md) | QA, AI eval | Đánh giá kết quả AI với dataset và ngưỡng đã review | Report chất lượng AI, regressions, release decision |
|
|
22
24
|
| [`harness-debugging`](../core/skills/harness-debugging/SKILL.md) | Bugfix | Tái hiện và phân tích lỗi trước khi sửa | Reproduction, root-cause evidence, regression |
|
|
23
25
|
| [`harness-review`](../core/skills/harness-review/SKILL.md) | Review | Đối chiếu diff với spec và rủi ro bảo mật | Severity findings, test coverage, recommendation |
|
package/docs/start.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Bắt đầu một nhiệm vụ
|
|
2
|
+
|
|
3
|
+
**Kiro: init --host kiro → session đầu tiên → /harness-start.**
|
|
4
|
+
Kiro tự khảo sát và hỏi trong chat; [cài/upgrade/offline](tool-setup/kiro.md).
|
|
5
|
+
`start --host kiro` trả plan, không phỏng vấn trong terminal. Session sau kiểm tra freshness
|
|
6
|
+
và chỉ bổ sung context bị ảnh hưởng. [Seed và contracts](session-onboarding.md).
|
|
7
|
+
|
|
8
|
+
**Host khác: init → start → làm việc trong AI tool.** Sau cài đặt, chạy trong project root:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx --yes @manhd_d/ai-harness start
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Terminal tương tác hỏi mục tiêu và task, input còn thiếu, nơi lưu draft docs khi cần.
|
|
15
|
+
Có cấu hình input/output thì không hỏi lại. Có task đã lưu thì chọn tiếp tục hoặc nhiệm vụ mới;
|
|
16
|
+
model/agent giữ mặc định của host trừ khi bạn muốn cấu hình khác. Lựa chọn được lưu trong
|
|
17
|
+
`.harness/start.json` và `.harness/artifacts.json`; thay cấu hình hiện có tạo backup trước.
|
|
18
|
+
|
|
19
|
+
Không có TTY (CI/pipe), `start` chỉ xuất JSON plan và không chờ stdin hoặc tự ghi lựa chọn.
|
|
20
|
+
Có thể lưu lựa chọn bằng flags:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
aih start --goal docs --task "Implement approved requirements" --input docs/requirements --output docs/specs
|
|
24
|
+
aih start --goal change --task "Fix pagination"
|
|
25
|
+
aih start --goal resume --task "Continue the reviewed task" --change add-order
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Goal: `idea`, `docs`, `change`, `resume`. Resume cần checkpoint/evidence đã có, kiểm tra freshness và
|
|
29
|
+
side effects trước tiếp tục. --input nhận đường dẫn tương đối hoặc HTTPS URL không chứa credentials;
|
|
30
|
+
--output chỉ nhận folder docs tương đối. Flags input/output chỉ seed khi chưa có khai báo; muốn sửa
|
|
31
|
+
nguồn cũ, review artifacts.json trực tiếp. Start không tự đọc tài liệu ngoài repo, không phê duyệt
|
|
32
|
+
nghiệp vụ hay thực thi command/model. Metadata discovery không chứng minh nội dung nguồn đúng.
|
|
33
|
+
|
|
34
|
+
Copy `host_prompt` từ kết quả vào AI tool đang mở cùng project. Host đọc task, cấu hình, nguồn và code;
|
|
35
|
+
hỏi tối đa 1–3 quyết định còn thiếu mỗi lượt với phương án và đề xuất có lý do. Dùng workflow/agent/skill
|
|
36
|
+
phù hợp đã cài; module thiếu phải được đề xuất rõ trước thay selection. Tiếp tục thực hiện khi scope và
|
|
37
|
+
quyền đã đủ. Root-file probes không thay thế khảo sát monorepo hoặc đọc tài liệu trong host.
|
|
38
|
+
|
|
39
|
+
Nếu bạn có nguồn/link/mô tả tự do hoặc cần output bên ngoài, đưa cho AI trong cuộc thảo luận và lưu
|
|
40
|
+
quyết định vào artifacts.json/integrations.json/local.md. Terminal hỏi đáp ngắn; phần BA/thiết kế nằm
|
|
41
|
+
trong AI tool. Core skill harness-start là điểm vào onboarding; menu slash native phụ thuộc host.
|
|
42
|
+
|
|
43
|
+
[File cấu hình, backup, cài lại và chuyển dự án](configuration-backup.md) · [AI tool setup](tool-setup/README.md).
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Set up AI Harness in your AI tool
|
|
2
2
|
|
|
3
3
|
Harness installs project instructions; it does not install an IDE, start an AI model or connect accounts.
|
|
4
|
-
You need Node.js 22+, your chosen AI tool and a project folder.
|
|
4
|
+
You need Node.js 22+, your chosen AI tool and a project folder. pip additionally needs Python 3.9+;
|
|
5
|
+
see [pip/offline setup](../python-installation.md). npm and pip use the same onboarding.
|
|
5
6
|
|
|
6
7
|
## 1. Install Harness in your project
|
|
7
8
|
|
|
@@ -30,27 +31,25 @@ Install/sign in through its official guide, open this same project and follow th
|
|
|
30
31
|
| **Cursor** | [Install](https://cursor.com/docs) | `AGENTS.md`; native `.agents/skills` | [Setup](cursor.md) |
|
|
31
32
|
| **GitHub Copilot** | [Install](https://docs.github.com/en/copilot) | Client-specific instructions; CLI native `.agents/skills` | [Setup](copilot.md) |
|
|
32
33
|
| **Gemini CLI** | [Install](https://geminicli.com/docs/) | `GEMINI.md` import; native `.agents/skills` alias | [Setup](gemini-cli.md) |
|
|
33
|
-
| **Kiro** | [IDE / CLI](https://kiro.dev/docs/getting-started/installation/) | `
|
|
34
|
+
| **Kiro** | [IDE / CLI](https://kiro.dev/docs/getting-started/installation/) | `init --host kiro`; first session `/harness-start`, managed wrappers + SessionStart | [Setup](kiro.md) |
|
|
34
35
|
|
|
35
36
|
Existing instructions/settings remain yours. Do not replace host configs or copy the whole Harness into
|
|
36
37
|
them. Host/version/account capabilities vary; these guides are not live-client compatibility results.
|
|
37
38
|
|
|
38
|
-
## 3.
|
|
39
|
+
## 3. Start the first session
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
Invoke **harness-start** if your client discovers the installed skill, or send this same prompt:
|
|
41
42
|
|
|
42
|
-
> Read
|
|
43
|
-
> State the selected adapters/capabilities from .harness/project.json, the project's known decisions,
|
|
44
|
-
> and one relevant installed skill with its exact path. Report anything you cannot read.
|
|
43
|
+
> Read .agents/skills/harness-start/SKILL.md and follow it for this project. My task: [task].
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
Kiro exposes `/harness-start`. Other clients have native discovery/import differences in the guides;
|
|
46
|
+
reading the canonical skill is the common fallback. It asks only missing consequential questions and
|
|
47
|
+
saves answers incrementally. `aih start --compact --host <host>` returns read-only orientation; use
|
|
48
|
+
`start`/host_prompt if terminal intake is preferred. Reuse the existing npm, pip or offline CLI.
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
> project tests and maintain affected specs/docs. Report actual results and anything blocked.
|
|
50
|
+
For a loading-only check, ask the host to report selected adapters/capabilities and one exact relevant
|
|
51
|
+
installed skill path without executing anything; compare with project.json and actual files. Client
|
|
52
|
+
claims are not live compatibility evidence. `check` verifies the snapshot, not model behavior.
|
|
54
53
|
|
|
55
54
|
You do not need to configure models, native subagents or MCP to begin. Harness role files are contracts,
|
|
56
55
|
not automatically created native agents. See [Agent configuration](../agent-configuration.md) when needed.
|
|
@@ -47,3 +47,13 @@ Checked 2026-10-13; no logged-in Claude client or live-agent smoke was run.
|
|
|
47
47
|
- [Memory, AGENTS conditions and imports](https://code.claude.com/docs/en/memory)
|
|
48
48
|
- [Native skills](https://code.claude.com/docs/en/skills)
|
|
49
49
|
- [Models](https://code.claude.com/docs/en/model-config)
|
|
50
|
+
|
|
51
|
+
## Common first-session onboarding
|
|
52
|
+
|
|
53
|
+
npm and pip/offline use the same `aih init --host claude-code` bundle and canonical harness-start.
|
|
54
|
+
Invoke the native skill when available (Kiro: `/harness-start`), or send:
|
|
55
|
+
|
|
56
|
+
> Read .agents/skills/harness-start/SKILL.md and follow it for this project. My task: [task].
|
|
57
|
+
|
|
58
|
+
Reuse saved answers; do not start a second terminal interview. Client-specific imports/discovery above
|
|
59
|
+
still apply. [pip/offline prerequisites and updates](../python-installation.md).
|
package/docs/tool-setup/codex.md
CHANGED
|
@@ -30,3 +30,13 @@ Checked 2026-10-13; no logged-in Codex client or live-agent smoke was run.
|
|
|
30
30
|
|
|
31
31
|
- [AGENTS discovery and verification](https://learn.chatgpt.com/docs/agent-configuration/agents-md)
|
|
32
32
|
- [Skill discovery](https://learn.chatgpt.com/docs/build-skills)
|
|
33
|
+
|
|
34
|
+
## Common first-session onboarding
|
|
35
|
+
|
|
36
|
+
npm and pip/offline use the same `aih init --host codex` bundle and canonical harness-start.
|
|
37
|
+
Invoke the native skill when available (Kiro: `/harness-start`), or send:
|
|
38
|
+
|
|
39
|
+
> Read .agents/skills/harness-start/SKILL.md and follow it for this project. My task: [task].
|
|
40
|
+
|
|
41
|
+
Reuse saved answers; do not start a second terminal interview. Client-specific imports/discovery above
|
|
42
|
+
still apply. [pip/offline prerequisites and updates](../python-installation.md).
|
|
@@ -37,3 +37,13 @@ Checked 2026-10-13; no logged-in Copilot client or live-agent smoke was run.
|
|
|
37
37
|
|
|
38
38
|
- [Instructions by IDE](https://docs.github.com/en/copilot/how-tos/copilot-in-your-ide/customize-copilot/configure-custom-instructions/add-repository-instructions-in-your-ide)
|
|
39
39
|
- [CLI skill paths and loading checks](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-skills)
|
|
40
|
+
|
|
41
|
+
## Common first-session onboarding
|
|
42
|
+
|
|
43
|
+
npm and pip/offline use the same `aih init --host copilot` bundle and canonical harness-start.
|
|
44
|
+
Invoke the native skill when available (Kiro: `/harness-start`), or send:
|
|
45
|
+
|
|
46
|
+
> Read .agents/skills/harness-start/SKILL.md and follow it for this project. My task: [task].
|
|
47
|
+
|
|
48
|
+
Reuse saved answers; do not start a second terminal interview. Client-specific imports/discovery above
|
|
49
|
+
still apply. [pip/offline prerequisites and updates](../python-installation.md).
|
|
@@ -27,3 +27,13 @@ Checked 2026-10-13; no logged-in Cursor client or live-agent smoke was run.
|
|
|
27
27
|
|
|
28
28
|
- [Rules and AGENTS](https://cursor.com/docs/rules)
|
|
29
29
|
- [Skills, discovery and cloud scope](https://cursor.com/docs/skills)
|
|
30
|
+
|
|
31
|
+
## Common first-session onboarding
|
|
32
|
+
|
|
33
|
+
npm and pip/offline use the same `aih init --host cursor` bundle and canonical harness-start.
|
|
34
|
+
Invoke the native skill when available (Kiro: `/harness-start`), or send:
|
|
35
|
+
|
|
36
|
+
> Read .agents/skills/harness-start/SKILL.md and follow it for this project. My task: [task].
|
|
37
|
+
|
|
38
|
+
Reuse saved answers; do not start a second terminal interview. Client-specific imports/discovery above
|
|
39
|
+
still apply. [pip/offline prerequisites and updates](../python-installation.md).
|
|
@@ -35,3 +35,13 @@ Checked 2026-10-13; no logged-in Gemini client or live-agent smoke was run.
|
|
|
35
35
|
|
|
36
36
|
- [Context files, imports and memory checks](https://geminicli.com/docs/cli/gemini-md/)
|
|
37
37
|
- [Skill aliases and loading checks](https://geminicli.com/docs/cli/skills/)
|
|
38
|
+
|
|
39
|
+
## Common first-session onboarding
|
|
40
|
+
|
|
41
|
+
npm and pip/offline use the same `aih init --host gemini-cli` bundle and canonical harness-start.
|
|
42
|
+
Invoke the native skill when available (Kiro: `/harness-start`), or send:
|
|
43
|
+
|
|
44
|
+
> Read .agents/skills/harness-start/SKILL.md and follow it for this project. My task: [task].
|
|
45
|
+
|
|
46
|
+
Reuse saved answers; do not start a second terminal interview. Client-specific imports/discovery above
|
|
47
|
+
still apply. [pip/offline prerequisites and updates](../python-installation.md).
|