@manhd_d/ai-harness 0.7.0 → 0.9.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/CONTRIBUTING.md +4 -0
- package/README.md +19 -57
- package/adapters/java-spring/adapter.yaml +3 -2
- package/adapters/java-spring/checks/verification.yaml +12 -0
- package/adapters/java-spring/evals/cases.json +10 -0
- package/adapters/java-spring/rules/conventions.md +39 -0
- package/adapters/java-spring/rules.md +2 -1
- package/adapters/kubernetes/adapter.yaml +1 -1
- package/adapters/kubernetes/rules.md +3 -0
- package/adapters/react-native/adapter.yaml +6 -3
- package/adapters/react-native/checks/verification.yaml +36 -0
- package/adapters/react-native/evals/cases.json +30 -0
- package/adapters/react-native/rules/conventions.md +34 -0
- package/adapters/react-native/rules.md +5 -1
- 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 +6 -3
- package/adapters/react-nextjs/checks/verification.yaml +36 -0
- package/adapters/react-nextjs/evals/cases.json +30 -0
- package/adapters/react-nextjs/rules/conventions.md +37 -0
- package/adapters/react-nextjs/rules.md +5 -1
- 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/architecture/README.md +11 -0
- package/capabilities/architecture/agents/architecture-reviewer.md +16 -0
- package/capabilities/architecture/agents/solution-architect.md +16 -0
- package/capabilities/architecture/capability.json +35 -0
- package/capabilities/architecture/checks/verification.json +29 -0
- package/capabilities/architecture/evals/cases.json +35 -0
- package/capabilities/architecture/skills/harness-architecture-change-impact/SKILL.md +43 -0
- package/capabilities/architecture/skills/harness-architecture-decision-records/SKILL.md +43 -0
- package/capabilities/architecture/skills/harness-architecture-project-context/SKILL.md +43 -0
- package/capabilities/architecture/skills/harness-architecture-quality-attributes/SKILL.md +43 -0
- package/capabilities/architecture/skills/harness-architecture-review/SKILL.md +43 -0
- package/capabilities/architecture/skills/harness-architecture-solution-design/SKILL.md +44 -0
- package/capabilities/architecture/templates/adr.md +29 -0
- package/capabilities/architecture/templates/nfr.md +22 -0
- package/capabilities/architecture/templates/overview.md +24 -0
- package/capabilities/architecture/templates/project-map.md +26 -0
- package/capabilities/architecture/templates/review.md +23 -0
- package/capabilities/architecture/templates/solution-design.md +29 -0
- package/capabilities/architecture/workflows/change-review.md +12 -0
- package/capabilities/architecture/workflows/discovery-to-design.md +16 -0
- package/capabilities/delivery/README.md +11 -0
- package/capabilities/delivery/agents/project-manager.md +16 -0
- package/capabilities/delivery/capability.json +29 -0
- package/capabilities/delivery/checks/verification.json +29 -0
- package/capabilities/delivery/evals/cases.json +25 -0
- package/capabilities/delivery/skills/harness-delivery-planning/SKILL.md +43 -0
- package/capabilities/delivery/skills/harness-delivery-risk-management/SKILL.md +42 -0
- package/capabilities/delivery/skills/harness-delivery-scope-change/SKILL.md +43 -0
- package/capabilities/delivery/templates/change-assessment.md +23 -0
- package/capabilities/delivery/templates/delivery-plan.md +25 -0
- package/capabilities/delivery/templates/risk-register.md +19 -0
- package/capabilities/delivery/workflows/execution-change.md +9 -0
- package/capabilities/delivery/workflows/planning.md +12 -0
- package/capabilities/product/README.md +7 -0
- package/capabilities/product/agents/business-analyst.md +3 -0
- package/capabilities/product/agents/product-owner.md +5 -1
- package/capabilities/product/agents/project-manager.md +5 -0
- package/capabilities/product/capability.json +9 -4
- package/capabilities/product/checks/verification.json +12 -0
- package/capabilities/product/evals/cases.json +10 -0
- package/capabilities/product/skills/harness-product-acceptance-criteria/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-backlog-prioritization/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-brd-generation/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-business-analysis/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-document-review/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-idea-discovery/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-knowledge-analysis/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-mvp-definition/SKILL.md +43 -0
- package/capabilities/product/skills/harness-product-prd-generation/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-product-outcomes/SKILL.md +42 -0
- package/capabilities/product/skills/harness-product-product-research/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-srs-generation/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-traceability/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-use-case-generation/SKILL.md +17 -0
- package/capabilities/product/skills/harness-product-user-stories/SKILL.md +17 -0
- package/capabilities/product/templates/mvp.md +25 -0
- package/capabilities/product/templates/outcomes.md +23 -0
- package/capabilities/product/workflows/document-driven.md +4 -0
- package/capabilities/product/workflows/idea-driven.md +4 -0
- package/capabilities/product/workflows/product-to-solution.md +15 -0
- package/cli/agents.js +165 -0
- package/cli/environment.js +14 -1
- package/cli/harness.js +24 -9
- package/cli/main.js +19 -6
- package/config/agents.default.json +80 -0
- package/core/agents/documentation.md +13 -0
- package/core/agents/implementer.md +7 -0
- package/core/agents/orchestrator.md +13 -0
- package/core/agents/planner.md +4 -0
- package/core/agents/reviewer.md +8 -0
- package/core/checks/verification.json +37 -0
- package/core/evals/cases.json +70 -0
- package/core/evals/composition.json +15 -0
- package/core/rules/foundations.md +1 -0
- package/core/rules/project-conventions.md +61 -0
- package/core/workflows/agent-routing.md +28 -0
- package/core/workflows/bugfix.md +2 -0
- package/core/workflows/project-setup.md +9 -1
- package/core/workflows/solution-framing.md +33 -0
- package/core/workflows/spec-to-code.md +11 -3
- package/docs/README.md +39 -0
- package/docs/adapters.md +10 -2
- package/docs/agent-configuration.md +99 -0
- package/docs/agent-handoffs.md +23 -0
- package/docs/architecture.md +22 -1
- package/docs/cli.md +29 -4
- package/docs/documentation-workflows.md +7 -0
- package/docs/end-to-end-workflow.md +14 -1
- 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 +46 -78
- package/docs/harness-maintenance.md +80 -0
- package/docs/monetization.md +1 -1
- package/docs/project-configuration.md +4 -0
- package/docs/project-conventions.md +67 -0
- package/docs/research/solution-workflow-sources.md +30 -0
- package/docs/skill-matrix.md +34 -6
- package/docs/solution-workflow.md +67 -0
- package/docs/templates/harness-change-impact.md +30 -0
- package/docs/tool-setup/README.md +70 -0
- package/docs/tool-setup/claude-code.md +57 -0
- package/docs/tool-setup/codex.md +44 -0
- package/docs/tool-setup/copilot.md +42 -0
- package/docs/tool-setup/cursor.md +44 -0
- package/docs/tool-setup/gemini-cli.md +41 -0
- package/docs/versioning.md +38 -0
- package/evals/README.md +13 -0
- package/harness.yaml +4 -2
- package/package.json +2 -1
- package/templates/AGENTS.md +7 -0
- package/templates/openspec/design.md +6 -0
- package/templates/openspec/tasks.md +1 -0
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
# First-run project setup
|
|
2
2
|
|
|
3
3
|
Read AGENTS.md, local.md, actual build files and existing environment configuration first.
|
|
4
|
+
For project/MVP/architecture decisions, apply `solution-framing.md` at the appropriate depth.
|
|
4
5
|
Use `aih setup` for structured suggestions; it never interviews the user or writes answers.
|
|
5
6
|
Do not ask about facts already established in the repository or current conversation.
|
|
6
7
|
|
|
7
8
|
1. Identify project scope, source documents, build/test commands and environment constraints.
|
|
9
|
+
Apply `.harness/core/rules/project-conventions.md`: classify each affected module as new, maintain
|
|
10
|
+
or mixed; inspect configured conventions, comparable code and public shared APIs. Adapter detection
|
|
11
|
+
is stack evidence, not a project-mode decision. For a new project, propose the relevant adapter's
|
|
12
|
+
minimal conventions; for maintenance, preserve the applicable project conventions.
|
|
8
13
|
2. Ask only missing consequential choices using the clarification workflow. Ask 1–3 questions
|
|
9
14
|
per turn, with A/B/C options where suitable, a grounded recommendation and a free-text option.
|
|
10
15
|
3. For Java, inspect Maven/Gradle wrappers before proposing PATH or a custom tool. A wrapper is
|
|
11
16
|
a recommendation only when present and consistent with project policy; do not switch corporate
|
|
12
17
|
tools or download a replacement without authorization.
|
|
13
|
-
4. Record shared facts and decisions in `.harness/local.md
|
|
18
|
+
4. Record shared facts and decisions in `.harness/local.md`: scope/mode, authoritative source paths,
|
|
19
|
+
layout and dependency boundaries, reusable common APIs, naming/error/test conventions, commands
|
|
20
|
+
and approved exceptions. Link existing documentation instead of duplicating it. Keep missing facts
|
|
21
|
+
explicit; do not overwrite previous answers. Define exact tool IDs, argument arrays
|
|
14
22
|
and required file paths in `.harness/environment.json`. Record evidence/source, not guessed versions.
|
|
15
23
|
5. For a machine-specific executable/file location, use `.harness/machine.json` or an environment
|
|
16
24
|
reference. The machine file can only override declared paths. It does not override permissions,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Project overview, MVP and architecture fit
|
|
2
|
+
|
|
3
|
+
Apply before new-project implementation or consequential feature/architecture changes, and during
|
|
4
|
+
impact review. Size the work to the request; an existing clear bugfix needs a short source/reuse note,
|
|
5
|
+
not a fresh BRD, architecture pack or planning interview.
|
|
6
|
+
|
|
7
|
+
1. Read the user request, local facts, authoritative docs/ADRs and affected source/tests. Establish
|
|
8
|
+
new/maintain/mixed scope, actual revision and relevant modules/integrations/trust/data boundaries.
|
|
9
|
+
Reuse approved decisions and inspect only the context needed; do not fabricate an unseen project map.
|
|
10
|
+
2. For a product/new journey, establish actor/problem, complete user outcome, in/out MVP scope, AC and
|
|
11
|
+
minimum safety/data quality. Prototype and MVP are distinct goals. Missing scope/behavior questions
|
|
12
|
+
go to the actual owner; explicit existing authorization still covers routine implementation choices.
|
|
13
|
+
3. Establish consequential quality constraints and testable NFR scenarios. Unknown traffic, latency,
|
|
14
|
+
recovery, budget or capacity stays explicit until confirmed. Avoid unsupported numeric targets.
|
|
15
|
+
4. Compare 2–3 viable architecture options only when a real decision is open; evaluate complexity,
|
|
16
|
+
operations, testability, costs and reversibility against requirements/team context. Recommend a
|
|
17
|
+
grounded minimal fit. For maintenance preserve existing boundaries unless the agreed change requires more.
|
|
18
|
+
5. Separate application/deployment architecture from feature patterns. Ports and Adapters defines
|
|
19
|
+
boundaries; Factory addresses creation. Strategy/Adapter/State require actual variation or state
|
|
20
|
+
needs. Direct code is valid; do not add interfaces, engines or layers for hypothetical future scale.
|
|
21
|
+
6. Describe affected public module/data/API/event ownership and important success/failure flows, reuse,
|
|
22
|
+
dependency direction and rollout/rollback constraints. Record significant decisions with alternatives,
|
|
23
|
+
owner/status and reconsideration trigger; compact notes suffice for reversible details.
|
|
24
|
+
7. Keep a source-linked overview/map or pointers in local.md. On a later change inspect touched entries
|
|
25
|
+
for drift, update only verified/decided context and preserve superseded decisions. Do not flood context.
|
|
26
|
+
8. Use installed Product product-to-solution, Architecture discovery-to-design/change-review and
|
|
27
|
+
Delivery planning/execution-change workflows when selected. Absent modules, apply the compact
|
|
28
|
+
equivalent in existing OpenSpec design/tasks; do not auto-install optional modules.
|
|
29
|
+
9. Handoff source revisions, requirement/AC/NFR/ADR IDs, decisions/status, code/public boundaries,
|
|
30
|
+
dependencies, verification and risks to Core/selected adapters, UIUX and DevOps where relevant.
|
|
31
|
+
Return gaps to the owning role; role documents do not launch agents or self-approve decisions.
|
|
32
|
+
10. Review implementation against accepted scope/design and actual tests. Model behavior evaluations,
|
|
33
|
+
manual review and application checks are separate evidence. Structural ready is not approval.
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
| Stage | Input | Output and gate |
|
|
4
4
|
| --- | --- | --- |
|
|
5
|
-
| Discover | Request, repository, linked sources | Scope,
|
|
5
|
+
| Discover | Request, repository, linked sources | Scope/mode, affected repos and risks, convention sources, comparable code and reuse candidates; clarify consequential unknowns |
|
|
6
6
|
| Specify | Agreed behavior | proposal, design, delta specs and vertical tasks |
|
|
7
7
|
| Review spec | Acceptance scenarios and design | Owner agreement for consequential choices; explicit task authorization may already cover routine choices |
|
|
8
|
-
| Implement | One task with a public test boundary | Failing meaningful test, minimal implementation, green test |
|
|
8
|
+
| Implement | One task with a public test boundary and reuse plan | Failing meaningful test, minimal implementation, green test; established boundaries and rationale for new components |
|
|
9
9
|
| Verify | Changed behavior | Relevant automated checks and honest skipped-check list |
|
|
10
|
-
| Review | Diff plus spec | Findings on correctness, security, compatibility and
|
|
10
|
+
| Review | Diff plus spec and convention sources | Findings on correctness, security, compatibility, reuse, placement and unnecessary abstraction |
|
|
11
11
|
| Deliver | Reviewed branch | PR with change ID, evidence, residual risks and rollback plan |
|
|
12
12
|
| Archive | All associated PRs merged | Sync accepted specs and archive via OpenSpec in a separate reviewed change if needed |
|
|
13
13
|
|
|
14
|
+
For new projects or consequential features, follow `solution-framing.md`: source-linked overview,
|
|
15
|
+
MVP/NFR, justified architecture/pattern choices and delivery dependencies feed OpenSpec design/tasks.
|
|
14
16
|
For first use, read `project-setup.md` in this workflow directory. Before implementing consequential
|
|
15
17
|
unknowns, follow `clarification.md`: inspect existing answers, ask 1–3 A/B/C questions with grounded
|
|
16
18
|
recommendations, and record answers/source in the change's decisions.json. Do not ask again once
|
|
@@ -18,6 +20,12 @@ scope and authorization are already clear. Run `aih ready <id> --stage implement
|
|
|
18
20
|
record actual checks in verification.json and use `--stage review` before handoff. These commands
|
|
19
21
|
check structure, not business approval or the truth of test evidence.
|
|
20
22
|
|
|
23
|
+
Apply `.harness/core/rules/project-conventions.md` even when a full spec is unnecessary. Before adding
|
|
24
|
+
code, record inspected paths, reused public APIs, intended placement and reasons for new components
|
|
25
|
+
in the task note or existing change. Preserve each module's conventions in mixed repositories. Review
|
|
26
|
+
the diff against those facts and run configured lint/type/build/tests and available boundary checks;
|
|
27
|
+
report manual review where automated architecture coverage is absent.
|
|
28
|
+
|
|
21
29
|
Use the harness-spec skill to draft and harness-tdd to implement. Use harness-debugging when diagnosing
|
|
22
30
|
an observed defect. Agents are roles, not automatically spawned workers; a single assistant can perform
|
|
23
31
|
them sequentially. Respect the host's delegation rules.
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Tra cứu AI Harness
|
|
2
|
+
|
|
3
|
+
Mới bắt đầu: [Cài đặt và giao task đầu tiên](getting-started.md).
|
|
4
|
+
Chỉ đọc phần phù hợp với công việc đang làm.
|
|
5
|
+
|
|
6
|
+
## Sử dụng
|
|
7
|
+
|
|
8
|
+
| Cần làm gì? | Đọc ở đâu? |
|
|
9
|
+
| --- | --- |
|
|
10
|
+
| Tra lệnh, chọn module, xử lý conflict | [CLI](cli.md) · [Adapters](adapters.md) |
|
|
11
|
+
| Kết nối công cụ AI | [Codex, Claude Code, Cursor, Copilot, Gemini CLI](tool-setup/README.md) |
|
|
12
|
+
| Chọn model và cách chạy agent | [Agent configuration](agent-configuration.md) |
|
|
13
|
+
| Khai báo build/test, Maven/JDK riêng | [Project configuration](project-configuration.md) |
|
|
14
|
+
| Áp dụng coding conventions | [Project conventions](project-conventions.md) |
|
|
15
|
+
| Từ ý tưởng / tài liệu BA đến yêu cầu | [Documentation workflows](documentation-workflows.md) · [Confluence](../integrations/confluence/README.md) |
|
|
16
|
+
| Đi từ yêu cầu đến vận hành | [Full SDLC](end-to-end-workflow.md) · [BA/PO/SA/PM](solution-workflow.md) |
|
|
17
|
+
| Spec trước code / review | [Change readiness](change-readiness.md) · [OpenSpec](openspec.md) |
|
|
18
|
+
| Tra skill và bàn giao agent | [Skill matrix](skill-matrix.md) · [Agent handoffs](agent-handoffs.md) |
|
|
19
|
+
| Kiểm tra code và đánh giá kết quả AI | [Verification](verification.md) · [Behavioral evaluations](../evals/README.md) |
|
|
20
|
+
|
|
21
|
+
[Code React/Next.js & React Native/Expo](frontend-mobile.md) · [Monetization capability](../capabilities/monetization/README.md).
|
|
22
|
+
|
|
23
|
+
## Ví dụ
|
|
24
|
+
|
|
25
|
+
| Loại project | Hướng dẫn |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| Spring Boot API | [Backend](examples/spring-boot-api.md) |
|
|
28
|
+
| Spring + Next.js | [Full-stack](examples/fullstack-web.md) |
|
|
29
|
+
| React Native | [Mobile](examples/react-native-app.md) |
|
|
30
|
+
| Python AI/RAG | [AI service](examples/ai-rag-service.md) |
|
|
31
|
+
| Astro tool nhỏ | [Micro-tools](examples/astro-micro-tools.md) · [Adapter](../adapters/astro/README.md) |
|
|
32
|
+
| Website có quảng cáo | [Astro + AdSense](examples/astro-adsense-microtools.md) · [Monetization](monetization.md) |
|
|
33
|
+
| Bắt đầu từ ý tưởng | [Idea-driven](examples/idea-driven-project.md) |
|
|
34
|
+
| Đã có tài liệu BA | [Document-driven](examples/document-driven-project.md) |
|
|
35
|
+
|
|
36
|
+
## Đóng góp và phát hành
|
|
37
|
+
|
|
38
|
+
[Contributing](../CONTRIBUTING.md) · [Bảo trì & ma trận ảnh hưởng](harness-maintenance.md) · [Kiến trúc](architecture.md) · [Thêm adapter](adapters.md).
|
|
39
|
+
[Release policy](release-policy.md) · [Phát hành npm](npm-release.md) · [Versioning & migration](versioning.md) · [Changelog](../CHANGELOG.md).
|
package/docs/adapters.md
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
# Adapter capabilities
|
|
2
2
|
|
|
3
|
+
Maintainer entry point: [Harness maintenance and impact matrix](harness-maintenance.md).
|
|
4
|
+
|
|
3
5
|
An adapter is a versioned instruction bundle, not an executable plugin. Core owns TDD, debugging,
|
|
4
6
|
review and the general workflow. Adapter skills address technology-specific decisions and reuse Core.
|
|
5
7
|
|
|
6
8
|
| Adapter | Skills |
|
|
7
9
|
| --- | --- |
|
|
8
10
|
| java-spring | Spring API, Kafka outbox, database migration |
|
|
9
|
-
| react-nextjs |
|
|
11
|
+
| react-nextjs | Feature slices, behavior testing, accessible UI, server/client authorization and caching |
|
|
10
12
|
| astro | Static-first micro-tools, islands, SEO, performance, Cloudflare and optional MFE migration |
|
|
11
|
-
| react-native |
|
|
13
|
+
| react-native | Screen/navigation slices, behavior/platform testing, offline synchronization, permissions and deep links |
|
|
12
14
|
| ai-python | RAG access filtering, model tool safety |
|
|
13
15
|
| kubernetes | Workload review, Helm release and safe rollout planning |
|
|
14
16
|
|
|
15
17
|
## Source contract
|
|
18
|
+
For setup, skill choice and examples see [Frontend/mobile coding](frontend-mobile.md).
|
|
19
|
+
|
|
16
20
|
adapter.yaml uses **JSON-compatible YAML 1.2**, parsed with JSON.parse. Arbitrary YAML syntax is not supported.
|
|
17
21
|
The CLI rejects unknown fields and unsupported schemas rather than guessing. Required fields:
|
|
18
22
|
|
|
@@ -81,3 +85,7 @@ Add rules and a concrete technology skill with testable inputs/outputs; avoid du
|
|
|
81
85
|
Declare metadata/checks/cases and register new adapter IDs. Include detection positive/negative fixtures,
|
|
82
86
|
install/removal/drift cases, and report validation tests. Run npm test, npm run validate and npm run
|
|
83
87
|
test:package. Version changes and review installed snapshots before release.
|
|
88
|
+
|
|
89
|
+
## Project coding conventions
|
|
90
|
+
|
|
91
|
+
Core owns new/maintain/mixed mode, precedence, discovery/reuse and diff-review rules for every adapter. Java/Spring, React/Next.js and React Native declare `rules/conventions.md` for stack defaults; existing project decisions take precedence. See [Project conventions](project-conventions.md). Checks remain advisory/manual and do not enforce application architecture.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Agent configuration and model routing
|
|
2
|
+
|
|
3
|
+
Harness declares preferences; the AI host performs model selection and execution. No provider calls,
|
|
4
|
+
automatic native configuration, agent creation, token enforcement or usage tracking is supplied.
|
|
5
|
+
|
|
6
|
+
## Setup
|
|
7
|
+
```bash
|
|
8
|
+
aih init --adapters java-spring --capabilities product,architecture,delivery
|
|
9
|
+
# Or, for a new consumer:
|
|
10
|
+
aih init --agent-preset economy
|
|
11
|
+
aih setup --host codex
|
|
12
|
+
aih check
|
|
13
|
+
```
|
|
14
|
+
Run only the init variant appropriate to a new consumer. Existing installs use reviewed update
|
|
15
|
+
--dry-run/update/check. Recommended is the default; custom seeds the same valid starting file for
|
|
16
|
+
editing. An explicit preset against existing agents.json refuses overwrite. setup prints A/B/C choices
|
|
17
|
+
and resolved routes; it never interviews or writes answers. No new aih config command is necessary.
|
|
18
|
+
|
|
19
|
+
## Ownership
|
|
20
|
+
Canonical recommendation: config/agents.default.json in the package/source. It is copied as locked
|
|
21
|
+
.harness/templates/agents.default.json. Project-owned .harness/agents.json is seeded on init or the
|
|
22
|
+
first reviewed update and then preserved byte-for-byte, outside the managed lock. Editing it is expected.
|
|
23
|
+
Old snapshots without agents.json remain readable. An older alternate --source without the new default
|
|
24
|
+
uses the installed CLI's canonical seed; no source files are changed. Invalid custom config blocks writes
|
|
25
|
+
with a field-level error; it is not reset automatically. Keep credentials in host-managed secrets, not here.
|
|
26
|
+
|
|
27
|
+
## Contract and precedence
|
|
28
|
+
Schema version 1 uses provider, defaultModel, defaultReasoning, models, agents and execution, with
|
|
29
|
+
optional hosts. Role IDs are namespace:role: core:planner, product:project-manager and
|
|
30
|
+
delivery:project-manager remain distinct. Defaults cover all current roles; only installed selected
|
|
31
|
+
roles are active. Unknown/custom role IDs can be declared but are not asserted to have a host contract.
|
|
32
|
+
Future unmapped installed roles inherit project defaults and are listed by setup.
|
|
33
|
+
|
|
34
|
+
Models are explicit native/opaque IDs or @alias references. models values are strings or
|
|
35
|
+
{provider, model} descriptors; alias graphs must be finite, declared and acyclic. A bare balanced is
|
|
36
|
+
an opaque model ID, while @balanced is an alias; this avoids silently accepting alias typos.
|
|
37
|
+
Resolution: role model → project default model; role provider → alias descriptor provider → project
|
|
38
|
+
provider; role reasoning → project default reasoning. Changing only defaultModel does not override
|
|
39
|
+
explicit role mappings. enabled:false disables a dedicated route, not required review/security policies.
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"schema_version": 1,
|
|
44
|
+
"provider": "openai",
|
|
45
|
+
"defaultModel": "gpt-6.1-sol",
|
|
46
|
+
"defaultReasoning": "medium",
|
|
47
|
+
"models": { "economy": "gpt-6-luna", "balanced": "gpt-6.1-sol", "premium": "gpt-6-astra" },
|
|
48
|
+
"agents": {
|
|
49
|
+
"core:orchestrator": { "model": "@balanced", "reasoning": "high" },
|
|
50
|
+
"core:implementer": { "model": "@balanced", "reasoning": "medium" },
|
|
51
|
+
"core:documentation": { "model": "@economy", "reasoning": "low" }
|
|
52
|
+
},
|
|
53
|
+
"execution": { "mode": "hybrid", "maxConcurrentAgents": 2, "maxRounds": 3, "autoEscalateToPremium": false },
|
|
54
|
+
"hosts": {}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
This is a partial example; omitted registered roles inherit defaults. The shipped default covers Core,
|
|
58
|
+
Product, Architecture and Delivery roles. Orchestrator/Planner/Architect/Reviewer/Security Reviewer
|
|
59
|
+
use Sol high; BA/PO/PM/Implementer/Test Engineer use Sol medium; Documentation uses Luna low.
|
|
60
|
+
Economy is Luna low with single-agent/one concurrent session; it is a preference, not a cost guarantee.
|
|
61
|
+
|
|
62
|
+
Reasoning levels structurally accepted: none, minimal, low, medium, high, xhigh, max, ultra. Actual
|
|
63
|
+
supported levels vary by model/client. Mode is single-agent, hybrid or multi-agent; concurrency is
|
|
64
|
+
integer 1–32, rounds 1–20, and single-agent requires concurrency 1. These are schema bounds and advisory
|
|
65
|
+
requests, not runtime capacity claims. Automatic premium escalation must be false; explicitly select
|
|
66
|
+
@premium or another native model if desired. JSON max size 1 MiB; no shell text is executed.
|
|
67
|
+
|
|
68
|
+
## Cross-provider and host mapping
|
|
69
|
+
For Claude, choose an available Anthropic model and provider explicitly; OpenAI model IDs do not
|
|
70
|
+
become Claude models. Gemini likewise needs an available Google/Vertex model. A role override may use:
|
|
71
|
+
```json
|
|
72
|
+
{ "provider": "anthropic", "model": "native-model-id-from-your-host", "reasoning": "medium" }
|
|
73
|
+
```
|
|
74
|
+
The placeholder is not an availability assertion. Alias descriptors allow the same explicit provider/model
|
|
75
|
+
choice across several roles. Supported vendor transport/authentication must be configured in the host.
|
|
76
|
+
|
|
77
|
+
Optional hosts.<host>.models maps provider/model to an explicit native replacement, and hosts.<host>.reasoning
|
|
78
|
+
maps logical effort to native values. These are user-selected substitutions, not claims of equivalent
|
|
79
|
+
models. For example, after inspecting the real Claude picker, replace this illustrative mapping target:
|
|
80
|
+
```json
|
|
81
|
+
{ "models": { "openai/gpt-6.1-sol": "native-claude-model-id" }, "reasoning": { "medium": "medium" } }
|
|
82
|
+
```
|
|
83
|
+
Put it inside hosts.claude-code. Configure every active request that needs translation, including Luna
|
|
84
|
+
for documentation if used; unmapped incompatible routes are reported. setup marks availability unverified
|
|
85
|
+
and runtime_verified:false even when a mapping is supplied. Unknown hosts also require verification.
|
|
86
|
+
|
|
87
|
+
## Actual native integration
|
|
88
|
+
[Tool setup](tool-setup/README.md) explains project-owned bridges. [Codex](tool-setup/codex.md),
|
|
89
|
+
[Claude Code](tool-setup/claude-code.md) and [Gemini CLI](tool-setup/gemini-cli.md) contain model/native
|
|
90
|
+
configuration references. Copy only a reviewed mapping into existing native config; do not overwrite it.
|
|
91
|
+
CLI/IDE single sessions may retain one model while playing many roles; per-role preferences require
|
|
92
|
+
supported native agents or deliberate separate sessions. Cursor/Copilot availability and reasoning
|
|
93
|
+
controls vary by client. No role JSON automatically creates a native subagent or changes current session.
|
|
94
|
+
|
|
95
|
+
## Lightweight execution
|
|
96
|
+
[Routing workflow](../core/workflows/agent-routing.md) sizes execution to the task. Hybrid defaults to
|
|
97
|
+
one lead plus at most one independent helper when supported. Keep inputs scoped, load skill metadata
|
|
98
|
+
before one needed body and checkpoint unresolved work. Actual usage/quotas come from the host; no fake
|
|
99
|
+
budget meter is inferred from model tiers, maxRounds or concurrency. See [Agent handoffs](agent-handoffs.md).
|
package/docs/agent-handoffs.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
AI Harness hiện có **role contracts**, không tạo các agent chạy tự động hoặc agent-to-agent queue. Một assistant có thể đảm nhiệm nhiều vai trò theo thứ tự, nhưng phải tách evidence, quyền hạn và human approval. Dùng cùng [Full SDLC](end-to-end-workflow.md) và [Skill matrix](skill-matrix.md).
|
|
4
4
|
|
|
5
5
|
## Trách nhiệm theo vai trò
|
|
6
|
+
For React/Next.js and React Native implementation/testing, use the selective skill routing in
|
|
7
|
+
[Frontend/mobile coding](frontend-mobile.md). Handoff AC → route/screen → API/state → test evidence,
|
|
8
|
+
including reused public APIs and unavailable browser/native checks; retain the same Core roles.
|
|
9
|
+
|
|
6
10
|
|
|
7
11
|
| Role contract trong source | Nhận | Bàn giao | Không được làm |
|
|
8
12
|
| --- | --- | --- | --- |
|
|
@@ -11,6 +15,11 @@ AI Harness hiện có **role contracts**, không tạo các agent chạy tự đ
|
|
|
11
15
|
| [product-owner](../capabilities/product/agents/product-owner.md) | Approved requirements | Epics/stories/AC, backlog readiness | Tự đánh dấu Ready khi còn thiếu phê duyệt |
|
|
12
16
|
| [project-manager](../capabilities/product/agents/project-manager.md) | Scope và phụ thuộc | Timeline/risks/RAID theo nguồn | Bịa estimate/commitment |
|
|
13
17
|
| [requirements-reviewer](../capabilities/product/agents/requirements-reviewer.md) | BRD/PRD, nguồn và stories | Review report, missing trace, human gate | Gọi draft là Approved |
|
|
18
|
+
| [solution-architect](../capabilities/architecture/agents/solution-architect.md) | MVP/requirements, actual source/NFR | Overview, public boundaries/contracts, options/ADRs and verification | Self-approve decisions or impose patterns |
|
|
19
|
+
| [architecture-reviewer](../capabilities/architecture/agents/architecture-reviewer.md) | Design/diff, ADRs and actual checks | Source-linked findings, drift/quality and residual risk | Claim independent approval of own work |
|
|
20
|
+
| [delivery project-manager](../capabilities/delivery/agents/project-manager.md) | Reviewed scope/solution, actual capacity | Value slices, dependencies, risks and change assessment | Invent dates/progress or message stakeholders |
|
|
21
|
+
| [orchestrator](../core/agents/orchestrator.md) | Authorized task, preferences and host capabilities | Scoped coordination and consolidated evidence | Auto-escalate premium or claim native workers exist |
|
|
22
|
+
| [documentation](../core/agents/documentation.md) | Verified sources and decisions | Source-linked document diff and quality evidence | Invent approval or unperformed verification |
|
|
14
23
|
| [planner](../core/agents/planner.md) | Scope, approved requirements, repo map | OpenSpec design/tasks/test outline | Implement ngoài scope |
|
|
15
24
|
| [implementer](../core/agents/implementer.md) | Spec, tasks, repo, adapter | Code slice và actual test evidence | Merge/deploy |
|
|
16
25
|
| [test-engineer](../core/agents/test-engineer.md) | AC, diff, contracts | Test scenarios, executed results/gaps | Tuyên bố pass khi chưa chạy |
|
|
@@ -77,3 +86,17 @@ Next gate: security-reviewer and human PR review
|
|
|
77
86
|
~~~
|
|
78
87
|
|
|
79
88
|
Đây là mẫu handoff, không phải report của một task đã chạy.
|
|
89
|
+
|
|
90
|
+
## Product and solution delivery
|
|
91
|
+
|
|
92
|
+
Product Manager owns value/outcomes; Project Manager coordinates delivery. The existing Product PM
|
|
93
|
+
role/template remains a compatibility entry; the Delivery capability supplies deeper planning.
|
|
94
|
+
Use [Solution workflow](solution-workflow.md) and [tool setup](tool-setup/README.md); carry MVP/AC/NFR/ADR
|
|
95
|
+
IDs and source revisions with each handoff. Return gaps to the appropriate owner and keep approval factual.
|
|
96
|
+
|
|
97
|
+
## Model and execution preferences
|
|
98
|
+
|
|
99
|
+
[Agent configuration](agent-configuration.md) resolves namespace:role without conflating Product PM
|
|
100
|
+
with Delivery PM. `.harness/agents.json` is project-owned; missing mappings inherit/report defaults.
|
|
101
|
+
Actual host settings/access and delegation rules control execution. Report actual model/effort if known,
|
|
102
|
+
scoped context, round checkpoint and actual checks; do not claim JSON enforced token/concurrency limits.
|
package/docs/architecture.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Architecture and scope
|
|
2
2
|
|
|
3
|
+
Maintainer entry point: [Harness maintenance and impact matrix](harness-maintenance.md).
|
|
4
|
+
|
|
3
5
|
AI Harness is a versioned instruction and workflow distribution framework. Its executable part is a
|
|
4
6
|
local installer and integrity checker. It is not an LLM gateway, an orchestration server or a sandbox.
|
|
5
7
|
|
|
@@ -54,7 +56,7 @@ own model-backed runtime; actual permissions, cost limits and network allowlists
|
|
|
54
56
|
|
|
55
57
|
## Advertising monetization capability
|
|
56
58
|
|
|
57
|
-
`capabilities/monetization/` is an optional, stack-neutral guide for legitimate publisher readiness, safe ad UX, SEO and revenue analysis. It does not install provider SDKs, access Google accounts, claim consent compliance or guarantee approval/revenue. Templates are vendored into the selected consumer under `.harness/capabilities/monetization/templates/`; `aih new-doc`
|
|
59
|
+
`capabilities/monetization/` is an optional, stack-neutral guide for legitimate publisher readiness, safe ad UX, SEO and revenue analysis. It does not install provider SDKs, access Google accounts, claim consent compliance or guarantee approval/revenue. Templates are vendored into the selected consumer under `.harness/capabilities/monetization/templates/`; `aih new-doc` defaults to Product; explicit `--capability monetization` selects a declared installed template into project-owned `docs/monetization/`. Review [Monetization guide](monetization.md).
|
|
58
60
|
|
|
59
61
|
## Astro static-first adapter
|
|
60
62
|
|
|
@@ -116,3 +118,22 @@ DevOps is an optional stack-neutral capability for release procedures and SRE; t
|
|
|
116
118
|
## Documented end-to-end usage
|
|
117
119
|
|
|
118
120
|
The cross-module route is described in [Getting started](getting-started.md), [Full SDLC](end-to-end-workflow.md), [Skill matrix](skill-matrix.md) and [Agent handoffs](agent-handoffs.md). All roles/skills remain instruction contracts. The four [stack walkthroughs](examples/spring-boot-api.md) illustrate permitted integrations, not a runnable scaffold or orchestration engine.
|
|
121
|
+
|
|
122
|
+
## Solution delivery capabilities
|
|
123
|
+
|
|
124
|
+
Product 1.2.0 adds MVP/outcomes and explicit template/example/quality/handoff sections. Optional
|
|
125
|
+
Architecture and Delivery schema-1 modules use existing roles/templates/checks/evals and locked
|
|
126
|
+
installation; soft recommendations never auto-select them. Core solution-framing provides proportional
|
|
127
|
+
overview/MVP/NFR/architecture/impact context without requiring every capability or document.
|
|
128
|
+
new-doc gains explicit --capability (default Product), validating installed metadata and declared
|
|
129
|
+
templates and preserving project-owned outputs. See [Solution workflow](solution-workflow.md).
|
|
130
|
+
Host configuration bridges are user-owned recipes in [tool setup](tool-setup/README.md); no host
|
|
131
|
+
account configuration, native-agent installation, new dependency or orchestration engine is supplied.
|
|
132
|
+
|
|
133
|
+
## Agent configuration boundary
|
|
134
|
+
|
|
135
|
+
config/agents.default.json is the canonical recommendation, locked as templates/agents.default.json in
|
|
136
|
+
the snapshot. agents.json is project-owned and preserved. agents.js validates/resolves aliases and
|
|
137
|
+
namespaced roles; setup supplies an advisory host plan with availability unverified. No provider calls,
|
|
138
|
+
native writes, orchestration, usage meter or automatic escalation. Old alternate sources use the packaged
|
|
139
|
+
default when absent; old consumers without config remain valid. See [Agent configuration](agent-configuration.md).
|
package/docs/cli.md
CHANGED
|
@@ -12,14 +12,14 @@ Exit 0 means the requested operation succeeded; 1 means validation/I/O/drift fai
|
|
|
12
12
|
| resolve | --source; --adapters a,b; --capabilities a,b | Validate module selection and compatibility; read-only |
|
|
13
13
|
| verify | --scope adapters/core/capabilities/all | Read installed advisory checks; executed false, no subprocesses |
|
|
14
14
|
| eval | --scope adapters/core/capabilities/all; --report FILE | Emit unscored template or aggregate reviewed report; no model calls |
|
|
15
|
-
| init | --detect OR --adapters a,b; --capabilities a,b; --source; --dry-run; --allow-major | Install a snapshot; exact rerun is idempotent |
|
|
15
|
+
| init | --detect OR --adapters a,b; --capabilities a,b; --agent-preset recommended/economy/custom; --source; --dry-run; --allow-major | Install a snapshot and seed project agent preferences; exact rerun without explicit preset is idempotent |
|
|
16
16
|
| update | --source; --dry-run; --allow-major | Update unedited owned files and seed missing project files |
|
|
17
17
|
| check | none | Compare installed files/block with lock and selection; no writes |
|
|
18
18
|
| doctor | none | check plus configured environment/path diagnostics and generic PATH hints; no execution |
|
|
19
|
-
| setup |
|
|
19
|
+
| setup | --host codex/claude-code/gemini-cli/cursor/copilot/custom-ID (optional) | Read-only question and agent-routing plan; skips tool-selection suggestions when tools are configured |
|
|
20
20
|
| ready ID | --stage implement/review | Structural readiness; blocked returns exit 1, ready returns exit 0; no business approval |
|
|
21
21
|
| new-change ID | none | Create an unapproved OpenSpec draft using installed templates |
|
|
22
|
-
| new-doc TYPE |
|
|
22
|
+
| new-doc TYPE | --capability ID (default product) | Copy one selected locked template into the owner's project docs without overwrite; Product idea/research use `docs/discovery/`, other Product types use `docs/product/` |
|
|
23
23
|
| skills | none | List installed skill metadata only |
|
|
24
24
|
| skill NAME | none | Read one installed, locked skill |
|
|
25
25
|
|
|
@@ -36,7 +36,7 @@ Selection changes belong in .harness/project.json; unknown or duplicate adapters
|
|
|
36
36
|
|
|
37
37
|
## Optional monetization capability
|
|
38
38
|
|
|
39
|
-
`aih init --capabilities monetization` installs five stack-independent advertising/revenue skills and 2 Markdown workflows with 4 templates. Combine with `--adapters astro` or `react-nextjs`; `product` and `uiux` are optional. `aih verify --scope capabilities` gives an unexecuted manual publisher policy/consent checklist. `aih new-doc`
|
|
39
|
+
`aih init --capabilities monetization` installs five stack-independent advertising/revenue skills and 2 Markdown workflows with 4 templates. Combine with `--adapters astro` or `react-nextjs`; `product` and `uiux` are optional. `aih verify --scope capabilities` gives an unexecuted manual publisher policy/consent checklist. `aih new-doc` defaults to Product; explicitly choose `--capability monetization` to scaffold a declared installed template into project-owned `docs/monetization/` without overwrite. No Google account access, ads publishing or metrics APIs are provided. See [Monetization guide](monetization.md).
|
|
40
40
|
|
|
41
41
|
## Project environment and clarification
|
|
42
42
|
|
|
@@ -123,3 +123,28 @@ See [Getting started](getting-started.md) for CLI boundaries, [Full SDLC](end-to
|
|
|
123
123
|
With the optional `product` capability selected, `aih new-doc idea` and `aih new-doc research` safely create `docs/discovery/<type>.md` in the consumer repository. Other names including `prd-lite`, `srs` and `use-cases` create `docs/product/<type>.md`.
|
|
124
124
|
|
|
125
125
|
All types must be declared templates in the installed, hash-locked Product manifest. Commands refuse unknown names, traversal, overwrite, collisions and installation drift. These are **blank templates only**, not AI-generated content. Read [Documentation workflows](documentation-workflows.md) for the two intake paths and approvals.
|
|
126
|
+
|
|
127
|
+
### Convention setup guidance
|
|
128
|
+
|
|
129
|
+
`aih setup` suggests a new/maintain/mixed scope question for unconfigured environments without guessing an answer. Regardless of suggested questions, the host must inspect existing conventions and reuse opportunities; a configured tool does not establish project mode. Answers stay in project-owned `.harness/local.md`. See [Project conventions](project-conventions.md). No application scanning, scaffolding or commands are executed.
|
|
130
|
+
|
|
131
|
+
## Architecture and Delivery drafts
|
|
132
|
+
|
|
133
|
+
`aih new-doc <type>` still defaults to Product (idea/research remain under docs/discovery).
|
|
134
|
+
Use `aih new-doc overview --capability architecture`, `aih new-doc adr --capability architecture` or
|
|
135
|
+
`aih new-doc delivery-plan --capability delivery` for a declared template in that installed capability.
|
|
136
|
+
Output is project-owned docs/<capability>/<type>.md; locked metadata/templates are required, drift and
|
|
137
|
+
overwrite are refused, and no draft is filled or approved. --capability is supported only by new-doc.
|
|
138
|
+
The historical Product delivery-plan path remains supported; do not duplicate an accepted plan.
|
|
139
|
+
See [Solution workflow](solution-workflow.md) and [host setup](tool-setup/README.md).
|
|
140
|
+
|
|
141
|
+
## Agent preferences
|
|
142
|
+
|
|
143
|
+
`aih init --agent-preset recommended|economy|custom` seeds project-owned agents.json non-interactively;
|
|
144
|
+
existing files are validated/preserved and explicit preset overwrite is refused. `aih setup --host codex`
|
|
145
|
+
(or claude-code/gemini-cli/cursor/copilot/custom ID) exports resolved roles and compatibility limitations
|
|
146
|
+
without probing models or editing host files. No extra config command, runtime or usage tracking.
|
|
147
|
+
See [Agent configuration](agent-configuration.md).
|
|
148
|
+
Setup exit 0 means the read-only plan was produced, not that all models are usable. Inspect the nested
|
|
149
|
+
agent_configuration.status and active route availability; host-incompatible/unverified requests require
|
|
150
|
+
actual host checks before execution.
|
|
@@ -69,3 +69,10 @@ Risks/unknowns: threshold and privacy requirements pending decision
|
|
|
69
69
|
Permissions: read/write authorized project branch only; no external publish or merge
|
|
70
70
|
Human reviewer: developer or named BA/PO
|
|
71
71
|
```
|
|
72
|
+
|
|
73
|
+
## Product → solution → delivery
|
|
74
|
+
|
|
75
|
+
For new/material journeys, reuse existing BA documents and continue with [Solution workflow](solution-workflow.md).
|
|
76
|
+
PO defines a usable MVP and evidence-backed outcomes, SA evaluates quality/architecture/contracts,
|
|
77
|
+
PM sequences dependent value slices. Accepted decisions and requirement IDs feed OpenSpec and adapters.
|
|
78
|
+
Depth scales to the task; no mandatory full document set for small fixes. Use [tool setup](tool-setup/README.md).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Full SDLC — Idea → Product → UI/UX → Spec → Code → Test → PR → Release → Operate
|
|
2
2
|
|
|
3
|
-
Tài liệu này là **bản đồ điều phối** toàn bộ Core + Product + UI/UX + technology adapters + DevOps. Mỗi module vẫn có workflow riêng; chỉ **kích hoạt module đã cài và thật sự liên quan**, không bắt buộc dùng đủ tất cả cho một change. Bắt đầu với [Getting started](getting-started.md); xem [ma trận
|
|
3
|
+
Tài liệu này là **bản đồ điều phối** toàn bộ Core + Product + Architecture + Delivery + UI/UX + technology adapters + DevOps. Mỗi module vẫn có workflow riêng; chỉ **kích hoạt module đã cài và thật sự liên quan**, không bắt buộc dùng đủ tất cả cho một change. Bắt đầu với [Getting started](getting-started.md); xem [ma trận 64 skills](skill-matrix.md) và [role handoffs](agent-handoffs.md).
|
|
4
4
|
|
|
5
5
|
> **Ranh giới thực thi:** `aih` cài/gợi ý rules, templates, skills và check/eval **advisory**. AI host/IDE và các công cụ bên ngoài thực hiện phân tích, code, test và tương tác hệ thống trong phạm vi được cấp quyền. Không có `aih run` hay `aih deploy`; các hành động ghi Figma, production hoặc merge phải có phê duyệt.
|
|
6
6
|
|
|
@@ -41,6 +41,8 @@ Lệnh trên là **ví dụ một repo chứa BE/FE/manifests**; nếu frontend/
|
|
|
41
41
|
| **1. Intake** | Ý tưởng, ticket, Confluence/PDF được phép đọc, version/source, scope | Product: `knowledge-analysis`, `business-analysis`; BA | Source register, FACT/INFERENCE/UNKNOWN, AS-IS/TO-BE, quyết định còn thiếu |
|
|
42
42
|
| **2. Business & Product** | Nguồn có traceability, mục tiêu, rules, NFR | Product: `brd-generation`, `prd-generation`, `user-stories`, `acceptance-criteria`, `backlog-prioritization`, `document-review`, `traceability`; PM/PO/requirements reviewer | PRD-lite hoặc BRD/PRD/SRS/UC khi cần, story IDs, AC, backlog; **Gate A: stakeholder duyệt**, không gắn nhãn Approved bởi AI |
|
|
43
43
|
| **3. UX/UI (nếu cần)** | Approved PRD/stories/AC; Figma file và quyền (nếu dùng) | UI/UX: `requirements-analysis` (chỉ khi cần), `user-flow`, `screen-planning`, `design-system`, `figma-design`, `design-review` | User flows, screen specs, component/tokens, Figma node IDs; **Gate B trước ghi Figma**, gate sau design review |
|
|
44
|
+
| **3a. Solution architecture (when material)** | Reviewed MVP/AC, existing decisions and constraints | Architecture skills/SA and reviewer | Source-linked context, NFR scenarios, module/data/contracts, ADRs and critical failure flows |
|
|
45
|
+
| **3b. Delivery planning (when material)** | Accepted scope/design, known estimates/dependencies | Delivery skills/Project Manager | Value slices, owners, risks, checkpoints and actual estimate authority |
|
|
44
46
|
| **4. Technical spec** | Approved requirements, API constraints, architecture, DB/event contracts | Core: `harness-spec`, planner; tech adapter phù hợp; OpenSpec | `openspec/changes/<change-id>/` (proposal, design, tasks, delta specs), measurable AC; **Gate C: duyệt thay đổi có ảnh hưởng** |
|
|
45
47
|
| **5. Implementation** | Change được duyệt, kiến trúc, repo, tests | Core: `harness-tdd`, `harness-debugging` khi sửa lỗi; Spring/React/Native/AI adapter theo stack; implementer | Minimal code diff, unit/integration/contract tests, migration plans, không thay đổi unrelated files |
|
|
46
48
|
| **6. Verify & code review** | Diff, specs, test logs thực chạy | Core: `harness-review`, `harness-ai-evaluation` nếu AI; test-engineer/security-reviewer; `aih verify/eval --scope all` (chỉ plan) | Evidence của test chạy thực tế, scope chưa test, security findings, trace requirement → test; **Gate D: human PR review** |
|
|
@@ -102,6 +104,10 @@ Project tự sở hữu các file `docs/product/` và cập nhật `traceability
|
|
|
102
104
|
- **No code yet:** Product + UI/UX có thể dừng sau design gate, không tạo PR implementation giả.
|
|
103
105
|
|
|
104
106
|
## 5. Verify, eval và hồ sơ release
|
|
107
|
+
Web/mobile implementation and testing use [Frontend/mobile coding](frontend-mobile.md): select the
|
|
108
|
+
feature/screen skill plus relevant testing/boundary skills, preserve existing common APIs and hand off
|
|
109
|
+
actual browser/server or per-platform native evidence. Load only needed skill bodies for simple tasks.
|
|
110
|
+
|
|
105
111
|
|
|
106
112
|
~~~bash
|
|
107
113
|
aih verify --scope all
|
|
@@ -114,3 +120,10 @@ aih check
|
|
|
114
120
|
**Checklist hoàn thành một change:** scope và approved AC rõ; diff có trace; tests thực chạy với kết quả chính xác; security/permissions đã review; CI xanh; PR được human quyết định; deployment (nếu có) có artifact/environment approval; OpenSpec archive/sync **chỉ sau khi các PR liên quan đã merge**, thông qua upstream CLI/human được quyền.
|
|
115
121
|
|
|
116
122
|
Xem [handoff contracts](agent-handoffs.md), [OpenSpec integration](openspec.md), [DevOps PR-to-production](../capabilities/devops/workflows/pr-to-production.md) và các [ví dụ theo stack](getting-started.md#ví-dụ-thực-hành).
|
|
123
|
+
|
|
124
|
+
For new/material journeys use [Solution workflow](solution-workflow.md); for existing clear fixes keep
|
|
125
|
+
a compact source/impact note. Set up the host with [Coding tools](tool-setup/README.md).
|
|
126
|
+
|
|
127
|
+
Before assigning roles, apply [Agent configuration](agent-configuration.md) and Core routing workflow.
|
|
128
|
+
Use one session for simple work, hybrid only for independent authorized work with host support, and
|
|
129
|
+
carry short source/evidence handoffs. User preferences do not grant runtime permissions or model access.
|
|
@@ -52,11 +52,15 @@ aih new-change add-ticket-creation
|
|
|
52
52
|
aih skill harness-spec
|
|
53
53
|
aih skill harness-tdd
|
|
54
54
|
aih skill harness-java-spring-spring-api
|
|
55
|
+
aih skill harness-react-nextjs-feature-delivery
|
|
55
56
|
aih skill harness-react-nextjs-accessible-ui
|
|
56
57
|
aih skill harness-react-nextjs-server-boundaries
|
|
58
|
+
aih skill harness-react-nextjs-behavior-testing
|
|
57
59
|
~~~
|
|
58
60
|
|
|
59
61
|
Spec phải chứa contract `POST /...` thực tế đã review, authorization, error envelope, loading/empty/errors, client/server boundaries, cache invalidation và contract tests. Implement thành vertical slice API + UI cùng acceptance IDs. Đối với giao diện frontend, kiểm tra SSR/client boundary và tránh đưa credentials ra browser.
|
|
62
|
+
Chỉ đọc skill body cần cho task; reuse client/query/FormField hiện có. Skills delivery/testing bao phủ
|
|
63
|
+
route/form/API/state và AC-linked component/browser evidence; không ép plain React dùng Next.js.
|
|
60
64
|
|
|
61
65
|
Ví dụ kiểm tra **chỉ nếu repo có tương ứng**:
|
|
62
66
|
|
|
@@ -28,14 +28,18 @@ Nếu chỉ sửa một lỗi offline đã có ticket/AC duyệt, có thể bỏ
|
|
|
28
28
|
aih new-change offline-draft-sync
|
|
29
29
|
aih skill harness-spec
|
|
30
30
|
aih skill harness-tdd
|
|
31
|
+
aih skill harness-react-native-screen-delivery
|
|
31
32
|
aih skill harness-react-native-offline-sync
|
|
32
33
|
aih skill harness-react-native-device-permissions
|
|
34
|
+
aih skill harness-react-native-behavior-testing
|
|
33
35
|
~~~
|
|
34
36
|
|
|
35
37
|
- `offline-sync`: định nghĩa local persistence encryption/retention, idempotency key, queue/retry backoff, conflict resolution và đồng bộ lại khi token hết hạn.
|
|
36
38
|
- `device-permissions`: chỉ cần nếu feature có camera/location/notification/deep link; kiểm tra iOS và Android riêng, fallback khi từ chối permission.
|
|
37
39
|
- Spec chứa test matrix: airplane mode, offline restart, duplicate request, conflict, revoke session, low storage và app update.
|
|
38
40
|
- Không log token/customer payload, không giả định AsyncStorage/SecureStore đã được chọn; dùng stack đang có.
|
|
41
|
+
- Dùng screen-delivery để reuse navigation/theme/client/form và behavior-testing cho test matrix;
|
|
42
|
+
chỉ nạp offline/permissions khi task chạm rủi ro đó. JS mocks không chứng minh native/device behavior.
|
|
39
43
|
|
|
40
44
|
**Verification** — tùy project scripts/toolchain, không được Harness thực thi:
|
|
41
45
|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Code React/Next.js và React Native
|
|
2
|
+
|
|
3
|
+
Adapter có rules/conventions và skills cho implementation, kiểm thử cùng các rủi ro chuyên biệt.
|
|
4
|
+
Không cần thêm bộ skills ngoài để bắt đầu. Chỉ cài module phù hợp; AI đọc một skill khi task cần nó.
|
|
5
|
+
|
|
6
|
+
## Init và bắt đầu
|
|
7
|
+
|
|
8
|
+
Trong repository ứng dụng đã tạo, chọn **một** lệnh theo stack:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
# React web hoặc Next.js
|
|
12
|
+
aih init --adapters react-nextjs
|
|
13
|
+
# React Native hoặc Expo
|
|
14
|
+
aih init --adapters react-native
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Sau đó chạy `aih check`, `aih setup --host codex` (đổi host theo công cụ thực tế), mở AI tool và giao:
|
|
18
|
+
|
|
19
|
+
> Đọc AGENTS.md và workflow project-setup. Khảo sát router, versions, common components, API client,
|
|
20
|
+
> form/state/navigation và test setup. Dự án này cần [tính năng]. Hỏi phần còn thiếu, đề xuất slice/MVP
|
|
21
|
+
> và kiến trúc phù hợp, sau đó implement theo conventions hiện có và báo cáo checks thực chạy.
|
|
22
|
+
|
|
23
|
+
Core đã có TDD/debug/review. Nếu cần thiết kế UX/Figma, thêm `--capabilities uiux` khi init mới.
|
|
24
|
+
Nếu cần khám phá ý tưởng/MVP/kiến trúc/kế hoạch, thêm `product,architecture,delivery`; không bắt task nhỏ
|
|
25
|
+
tạo đủ tài liệu. Dự án đã cài đổi `.harness/project.json` rồi review update, không re-init với lựa chọn khác.
|
|
26
|
+
Harness không tạo app/framework, cài libraries hoặc cấu hình Figma/native AI host.
|
|
27
|
+
|
|
28
|
+
## Chọn skill theo việc
|
|
29
|
+
|
|
30
|
+
| Việc | React/Next.js | React Native/Expo |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| Route/screen, form, CRUD/search, API và state | `harness-react-nextjs-feature-delivery` | `harness-react-native-screen-delivery` |
|
|
33
|
+
| Test hành vi và luồng | `harness-react-nextjs-behavior-testing` | `harness-react-native-behavior-testing` |
|
|
34
|
+
| Rủi ro chuyên biệt | `harness-react-nextjs-accessible-ui`, `harness-react-nextjs-server-boundaries` khi có Next server | `harness-react-native-offline-sync`, `harness-react-native-device-permissions` khi cần |
|
|
35
|
+
|
|
36
|
+
`aih skills` liệt kê metadata; `aih skill <id>` đọc một body. AI có thể chọn skill qua description và
|
|
37
|
+
đọc `.agents/skills/<id>/SKILL.md`, không cần bạn gọi từng role. Xem [Skill matrix](skill-matrix.md).
|
|
38
|
+
Skill IDs dưới namespace react-nextjs cũng dùng cho React web; plain React không bị ép chuyển Next.js.
|
|
39
|
+
|
|
40
|
+
## Dự án mới và maintain
|
|
41
|
+
|
|
42
|
+
Với maintain, đọc feature tương tự trước: reuse UI public APIs, theme, form schema, client/query keys,
|
|
43
|
+
auth/state/router và test helpers. Không tạo thêm HTTP client, store, navigation container hay wrappers
|
|
44
|
+
khi common hiện tại đáp ứng. Với dự án mới, đề xuất cấu trúc feature và state/data boundaries vừa đủ;
|
|
45
|
+
so sánh các lựa chọn quan trọng trước khi chốt. Ports/adapters, factory hay global state cần vấn đề cụ thể,
|
|
46
|
+
không áp như checklist. Xem [Project conventions](project-conventions.md) và [Solution workflow](solution-workflow.md).
|
|
47
|
+
|
|
48
|
+
Web: xác định router/version; tách state UI/form/server, xử lý stale responses và pending mutations.
|
|
49
|
+
Next server phải validate/authorize mỗi operation, giữ credentials và private caches đúng boundary.
|
|
50
|
+
Mobile: xác định Expo/bare và platforms; giữ navigation/auth/account boundaries, keyboard/safe areas,
|
|
51
|
+
lifecycle và secure storage. Offline queue/permissions chỉ thêm khi yêu cầu thực tế cần chúng.
|
|
52
|
+
|
|
53
|
+
## Ví dụ đầu ra
|
|
54
|
+
|
|
55
|
+
- Web search: route dùng client/query/FormField hiện có; loading/empty/error/latest-result; tests gắn AC,
|
|
56
|
+
keyboard/focus và build/browser evidence thực có. Không thêm Next.js vào React SPA.
|
|
57
|
+
- Mobile profile: screen dùng navigator/theme/client đã có; validation/save/expiry/back/account changes;
|
|
58
|
+
JS/native/device matrix phân biệt Android và iOS, ghi rõ checks bị chặn.
|
|
59
|
+
|
|
60
|
+
Đây là output minh họa, không phải kết quả đã chạy. [Full-stack example](examples/fullstack-web.md) và
|
|
61
|
+
[React Native example](examples/react-native-app.md) liên kết skills vào luồng spec → code → review.
|
|
62
|
+
|
|
63
|
+
## Kiểm chứng và nguồn
|
|
64
|
+
|
|
65
|
+
Chạy lint/type/test/build theo scripts thực của ứng dụng. Browser checks phải có browser/server thật;
|
|
66
|
+
mocked component test không chứng minh SSR/authorization. Với native, JS tests không xác minh iOS/Android;
|
|
67
|
+
ghi simulator/device/build result riêng. `aih verify/eval` chỉ xuất checklist/dataset và không chạy chúng.
|
|
68
|
+
Không có trial ứng dụng/browser/native hoặc live-model benchmark trong nâng cấp Harness này.
|
|
69
|
+
|
|
70
|
+
Đối chiếu official docs theo version dự án (tham khảo ngày 2026-10-12):
|
|
71
|
+
- [React state structure](https://react.dev/learn/choosing-the-state-structure): tránh duplicate/derived state lưu dư.
|
|
72
|
+
- [Next.js testing](https://nextjs.org/docs/app/guides/testing): chọn đúng unit/component/E2E boundary;
|
|
73
|
+
kiểm tra runner support cho async Server Components.
|
|
74
|
+
- [React Native testing](https://reactnative.dev/docs/testing-overview): tách JS component và native/device evidence.
|
|
75
|
+
- [React Navigation auth flow](https://reactnavigation.org/docs/auth-flow/): chỉ áp dụng khi app đang dùng
|
|
76
|
+
React Navigation; giữ version-specific auth/back behavior, không mặc định cài router đó.
|