@manhd_d/ai-harness 0.14.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +21 -9
  3. package/adapters/react-native/adapter.yaml +1 -1
  4. package/adapters/react-native/skills/harness-react-native-behavior-testing/SKILL.md +9 -0
  5. package/adapters/react-nextjs/adapter.yaml +1 -1
  6. package/adapters/react-nextjs/skills/harness-react-nextjs-behavior-testing/SKILL.md +9 -0
  7. package/capabilities/product/capability.json +1 -1
  8. package/capabilities/product/workflows/idea-to-prd.md +15 -0
  9. package/capabilities/product/workflows/idea-to-prd.workflow.json +82 -0
  10. package/cli/adapters.js +1 -1
  11. package/cli/agents.js +14 -5
  12. package/cli/capabilities.js +2 -1
  13. package/cli/end-user.js +30 -0
  14. package/cli/environment.js +2 -0
  15. package/cli/evaluation-contract.js +11 -1
  16. package/cli/files.js +7 -2
  17. package/cli/harness.js +53 -11
  18. package/cli/journey-evidence.js +34 -0
  19. package/cli/kiro.js +15 -0
  20. package/cli/knowledge.js +104 -0
  21. package/cli/main.js +60 -22
  22. package/cli/portable-config.js +6 -3
  23. package/cli/project-decisions.js +47 -0
  24. package/cli/readiness.js +82 -41
  25. package/cli/setup.js +66 -0
  26. package/cli/skill-requirements.js +47 -0
  27. package/cli/start.js +15 -2
  28. package/cli/structured.js +65 -0
  29. package/cli/sync-integrations.js +49 -0
  30. package/cli/verification-report.js +9 -5
  31. package/cli/verification.js +7 -2
  32. package/cli/workflow.js +76 -0
  33. package/core/agents/orchestrator.md +1 -1
  34. package/core/agents/test-engineer.md +4 -2
  35. package/core/checks/verification.json +12 -0
  36. package/core/evals/cases.json +75 -1
  37. package/core/rules/context.md +9 -0
  38. package/core/skills/harness-end-user-testing/SKILL.md +55 -0
  39. package/core/skills/harness-review/SKILL.md +4 -0
  40. package/core/skills/harness-spec/SKILL.md +3 -1
  41. package/core/skills/harness-start/SKILL.md +66 -0
  42. package/core/skills/harness-verification/SKILL.md +2 -0
  43. package/core/workflows/adaptive-verification.md +5 -0
  44. package/core/workflows/agent-routing.md +6 -0
  45. package/core/workflows/approvals.schema.json +62 -0
  46. package/core/workflows/clarification.md +6 -1
  47. package/core/workflows/continuous-development.md +5 -0
  48. package/core/workflows/end-user-acceptance.md +36 -0
  49. package/core/workflows/greenfield-setup.md +27 -0
  50. package/core/workflows/project-setup.md +13 -2
  51. package/core/workflows/seed.md +25 -0
  52. package/core/workflows/spec-to-code.md +19 -8
  53. package/core/workflows/spec-to-code.workflow.json +99 -0
  54. package/core/workflows/workflow.schema.json +113 -0
  55. package/docs/README.md +8 -0
  56. package/docs/adaptive-verification.md +10 -1
  57. package/docs/agent-configuration.md +7 -0
  58. package/docs/agent-handoffs.md +6 -1
  59. package/docs/architecture.md +43 -3
  60. package/docs/cli.md +39 -4
  61. package/docs/configuration-backup.md +10 -2
  62. package/docs/conformance-runner.md +64 -0
  63. package/docs/end-to-end-workflow.md +4 -0
  64. package/docs/end-user-testing.md +128 -0
  65. package/docs/frontend-mobile.md +7 -0
  66. package/docs/getting-started.md +17 -5
  67. package/docs/harness-maintenance.md +1 -0
  68. package/docs/i18n/README.es.md +17 -7
  69. package/docs/i18n/README.vi.md +18 -8
  70. package/docs/i18n/README.zh-CN.md +17 -7
  71. package/docs/project-configuration.md +6 -0
  72. package/docs/python-installation.md +85 -0
  73. package/docs/session-onboarding.md +215 -0
  74. package/docs/skill-matrix.md +5 -3
  75. package/docs/start.md +7 -2
  76. package/docs/tool-setup/README.md +13 -14
  77. package/docs/tool-setup/claude-code.md +10 -0
  78. package/docs/tool-setup/codex.md +10 -0
  79. package/docs/tool-setup/copilot.md +10 -0
  80. package/docs/tool-setup/cursor.md +10 -0
  81. package/docs/tool-setup/gemini-cli.md +10 -0
  82. package/docs/tool-setup/kiro.md +112 -38
  83. package/docs/versioning.md +56 -0
  84. package/docs/workflow-contract.md +66 -0
  85. package/evals/README.md +7 -0
  86. package/harness.yaml +13 -1
  87. package/package.json +7 -3
  88. package/scripts/conformance-runner.js +119 -0
  89. package/scripts/score-eval.js +3 -1
  90. package/templates/AGENTS.md +6 -1
  91. package/templates/decisions.json +4 -0
  92. package/templates/local.md +21 -0
  93. package/templates/openspec/approvals.json +5 -0
@@ -8,20 +8,30 @@ Entrega una idea, docs existentes o un change request a tu AI coding tool. Harne
8
8
 
9
9
  Los Core workflows sirven para cualquier proyecto. El stack support es opcional y no elige infrastructure ni architecture.
10
10
 
11
- Requiere Node.js 22+. Ejecuta en el directorio del proyecto:
11
+ Requiere **Node.js 22+**. Ejecuta en la raíz del proyecto:
12
12
 
13
13
  ```bash
14
- npx --yes @manhd_d/ai-harness init
15
- npx --yes @manhd_d/ai-harness start
14
+ npx --yes @manhd_d/ai-harness init --host codex
16
15
  ```
17
16
 
18
- Ejecuta `start` para comenzar con tus entradas y envía `host_prompt` a tu herramienta de IA. [Configuración, copia de seguridad y transferencia](../configuration-backup.md).
17
+ Host: codex, claude-code, cursor, copilot, gemini-cli o kiro.
18
+ En la primera sesión invoca harness-start; si el cliente no descubre el skill, envía:
19
19
 
20
- `npx` no instala el command global `aih`. Comprueba con `npx --yes @manhd_d/ai-harness check` y abre el mismo proyecto en tu AI tool. [Setup común](../tool-setup/README.md).
20
+ > Read .agents/skills/harness-start/SKILL.md and follow it for this project. My task: [task].
21
21
 
22
- > Read AGENTS.md. Inspect this project and its approved decisions. Implement [task], run appropriate checks and maintain affected docs.
22
+ Kiro ofrece `/harness-start`; el descubrimiento depende del cliente. [Guías](../tool-setup/README.md).
23
23
 
24
- El host ejecuta tests y controla tools, delegation y permissions. MCP/connector/API pueden aportar input con acceso autorizado. init --detect identifica stacks compatibles; check comprueba la integrity de Harness.
24
+ **pip / sin conexión** se incluye en la próxima versión revisada; requiere configurar PyPI publisher:
25
+
26
+ ```bash
27
+ python -m pip install manhd-ai-harness
28
+ aih init --host codex
29
+ ```
30
+
31
+ Necesita Python 3.9+ y Node.js 22+; incluye el mismo CLI y recursos, sin ejecutar npm/npx.
32
+ Sin conexión: `python -m pip install --no-index --no-deps /path/to/package.whl`.
33
+ [pip y actualizaciones](../python-installation.md) · [Backup](../configuration-backup.md).
34
+ `npx` no crea un comando global aih; comprueba con `npx --yes @manhd_d/ai-harness check`.
25
35
 
26
36
  | AI tool | Setup |
27
37
  | --- | --- |
@@ -6,22 +6,32 @@ Agent workflows tái sử dụng cho phát triển phần mềm: **Requirements
6
6
 
7
7
  Đưa ý tưởng, docs có sẵn hoặc change request cho AI coding tool. Harness giúp AI đọc project, làm rõ quyết định, triển khai scope đã chấp nhận và maintain spec/docs liên quan. Chỉ dùng roles và skills cần cho task.
8
8
 
9
- Core workflows dùng được với mọi project. Stack support là tùy chọn; không tự chọn infrastructure hay architecture.
9
+ Core dùng được với mọi project; stack adapter là tùy chọn.
10
10
 
11
- Cần Node.js 22+. Chạy trong project:
11
+ Cần **Node.js 22+**. Chạy trong project root:
12
12
 
13
13
  ```bash
14
- npx --yes @manhd_d/ai-harness init
15
- npx --yes @manhd_d/ai-harness start
14
+ npx --yes @manhd_d/ai-harness init --host codex
16
15
  ```
17
16
 
18
- Chạy `start` để được hướng dẫn theo input hiện có, rồi gửi `host_prompt` cho AI. [Cấu hình, backup và chuyển dự án](../configuration-backup.md).
17
+ Chọn host: codex, claude-code, cursor, copilot, gemini-cli hoặc kiro.
18
+ Session AI đầu tiên: gọi **harness-start** nếu host nhận diện; hoặc gửi:
19
19
 
20
- `npx` không cài global command `aih`. Kiểm tra bằng `npx --yes @manhd_d/ai-harness check`, rồi mở cùng project trong AI tool. [Setup chung](../tool-setup/README.md).
20
+ > Đọc .agents/skills/harness-start/SKILL.md và thực hiện cho project này. Task: [yêu cầu].
21
21
 
22
- > Read AGENTS.md. Inspect this project and its approved decisions. Implement [task], run appropriate checks and maintain affected docs.
22
+ Kiro có `/harness-start`; discovery tùy client. [Setup đa IDE](../tool-setup/README.md).
23
23
 
24
- Host chạy tests và quản lý tools, delegation, permissions. MCP/connector/API có thể cung cấp input khi host có quyền truy cập. init --detect nhận diện stack hỗ trợ; check kiểm tra integrity của Harness.
24
+ **pip/offline** được bổ sung trong release tiếp theo, cần cấu hình PyPI publisher:
25
+
26
+ ```bash
27
+ python -m pip install manhd-ai-harness
28
+ aih init --host codex
29
+ ```
30
+
31
+ Cần thêm Python 3.9+, vẫn cần Node 22+; cùng CLI/assets, không gọi npm/npx.
32
+ Offline: `python -m pip install --no-index --no-deps /path/to/package.whl`.
33
+ [pip và cập nhật](../python-installation.md) · [Backup và chuyển dự án](../configuration-backup.md).
34
+ `npx` không tạo global aih; dùng `npx --yes @manhd_d/ai-harness check` kiểm integrity.
25
35
 
26
36
  | AI tool | Setup |
27
37
  | --- | --- |
@@ -8,20 +8,30 @@
8
8
 
9
9
  Core workflows 可用于任何项目。Stack support 是可选的,不会自动选择 infrastructure 或 architecture。
10
10
 
11
- 需要 Node.js 22+。在项目目录运行:
11
+ 需要 **Node.js 22+**。在项目根目录运行:
12
12
 
13
13
  ```bash
14
- npx --yes @manhd_d/ai-harness init
15
- npx --yes @manhd_d/ai-harness start
14
+ npx --yes @manhd_d/ai-harness init --host codex
16
15
  ```
17
16
 
18
- 运行 `start` 获取引导,然后将 `host_prompt` 发送给 AI 工具。[配置备份与项目迁移](../configuration-backup.md)。
17
+ host 可选 codex、claude-code、cursor、copilot、gemini-cli 或 kiro。
18
+ 首次 AI 会话调用 harness-start;如果客户端未发现技能,请发送:
19
19
 
20
- `npx` 不会安装全局 `aih` command。使用 `npx --yes @manhd_d/ai-harness check` 检查,然后在 AI tool 中打开同一项目。[通用 Setup](../tool-setup/README.md)。
20
+ > Read .agents/skills/harness-start/SKILL.md and follow it for this project. My task: [task].
21
21
 
22
- > Read AGENTS.md. Inspect this project and its approved decisions. Implement [task], run appropriate checks and maintain affected docs.
22
+ Kiro 提供 `/harness-start`;原生发现因客户端而异。[多 IDE 指南](../tool-setup/README.md)。
23
23
 
24
- Host 执行 tests,并控制 tools、delegation 和 permissions。MCP/connector/API 可在 host 获得访问权限后提供 input。init --detect 用于支持的 stack;check 检查 Harness integrity。
24
+ **pip / 离线安装**将在下一次审核后的版本中提供,首次发布需要配置 PyPI publisher:
25
+
26
+ ```bash
27
+ python -m pip install manhd-ai-harness
28
+ aih init --host codex
29
+ ```
30
+
31
+ 需要 Python 3.9+ 和 Node.js 22+;使用相同 CLI/资源,不调用 npm/npx。
32
+ 离线:`python -m pip install --no-index --no-deps /path/to/package.whl`。
33
+ [pip 与更新](../python-installation.md) · [备份](../configuration-backup.md)。
34
+ `npx` 不创建全局 aih;用 `npx --yes @manhd_d/ai-harness check` 检查文件完整性。
25
35
 
26
36
  | AI tool | Setup |
27
37
  | --- | --- |
@@ -99,3 +99,9 @@ Chạy `aih start` để lưu intake. File được bảo toàn khi update. Ch
99
99
  repo; `aih restore --from <file> --dry-run` xem trước phục hồi. Dùng --transfer ở repo mới để chỉ
100
100
  chuyển module/model, tránh nguồn/tiến độ cũ. [Hướng dẫn đầy đủ](configuration-backup.md) mô tả các
101
101
  file được lưu, những gì không có trong backup, conflict/backup-before-replace và cách cài lại.
102
+
103
+ ## Structured context and skill prerequisites
104
+
105
+ New local.md uses optional schema-1 YAML frontmatter; legacy prose stays valid and preserved.
106
+ See [session onboarding](session-onboarding.md) for sources, seed and doctor --skill requirements.
107
+ Maven settings remain files.maven-settings.path with a machine override, not tools.maven.settings.
@@ -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.
@@ -1,6 +1,6 @@
1
- # Skill matrix — 66 skills, 15 nhóm module
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` (6 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ộ 66 skill vào prompt.
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 (6)
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 CHANGED
@@ -1,6 +1,11 @@
1
1
  # Bắt đầu một nhiệm vụ
2
2
 
3
- **init → start → làm việc trong AI tool.** Sau cài đặt, chạy trong project root:
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:
4
9
 
5
10
  ```bash
6
11
  npx --yes @manhd_d/ai-harness start
@@ -33,6 +38,6 @@ quyền đã đủ. Root-file probes không thay thế khảo sát monorepo ho
33
38
 
34
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
35
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
36
- trong AI tool. Không có slash command `/start` chung cho mọi tool ở bản này.
41
+ trong AI tool. Core skill harness-start là điểm vào onboarding; menu slash native phụ thuộc host.
37
42
 
38
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/) | `AGENTS.md`; read canonical skills explicitly or use optional native pointers | [Setup](kiro.md) |
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. Check loading, then give a task
39
+ ## 3. Start the first session
39
40
 
40
- Send this **read-only prompt** in the AI chat:
41
+ Invoke **harness-start** if your client discovers the installed skill, or send this same prompt:
41
42
 
42
- > Read AGENTS.md and .harness/local.md. Do not change files or run commands.
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
- Compare the answer with the actual files; a model's assertion alone does not prove loading.
47
- If skills are not discovered, ask it to read the needed `.agents/skills/<installed-name>/SKILL.md`.
48
- The tool guides show additional native loading checks. `check` verifies Harness files, not AI behavior.
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
- Then give your normal task:
51
-
52
- > Read AGENTS.md. Inspect the project and approved decisions. Implement [task], run appropriate
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).
@@ -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).