@manhd_d/ai-harness 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/CONTRIBUTING.md +4 -0
  3. package/README.md +15 -3
  4. package/adapters/java-spring/adapter.yaml +3 -2
  5. package/adapters/java-spring/checks/verification.yaml +12 -0
  6. package/adapters/java-spring/evals/cases.json +10 -0
  7. package/adapters/java-spring/rules/conventions.md +39 -0
  8. package/adapters/java-spring/rules.md +2 -1
  9. package/adapters/kubernetes/adapter.yaml +1 -1
  10. package/adapters/kubernetes/rules.md +3 -0
  11. package/adapters/react-native/adapter.yaml +3 -2
  12. package/adapters/react-native/checks/verification.yaml +12 -0
  13. package/adapters/react-native/evals/cases.json +10 -0
  14. package/adapters/react-native/rules/conventions.md +34 -0
  15. package/adapters/react-native/rules.md +2 -1
  16. package/adapters/react-nextjs/adapter.yaml +3 -2
  17. package/adapters/react-nextjs/checks/verification.yaml +12 -0
  18. package/adapters/react-nextjs/evals/cases.json +10 -0
  19. package/adapters/react-nextjs/rules/conventions.md +37 -0
  20. package/adapters/react-nextjs/rules.md +2 -1
  21. package/capabilities/architecture/README.md +11 -0
  22. package/capabilities/architecture/agents/architecture-reviewer.md +16 -0
  23. package/capabilities/architecture/agents/solution-architect.md +16 -0
  24. package/capabilities/architecture/capability.json +35 -0
  25. package/capabilities/architecture/checks/verification.json +29 -0
  26. package/capabilities/architecture/evals/cases.json +35 -0
  27. package/capabilities/architecture/skills/harness-architecture-change-impact/SKILL.md +43 -0
  28. package/capabilities/architecture/skills/harness-architecture-decision-records/SKILL.md +43 -0
  29. package/capabilities/architecture/skills/harness-architecture-project-context/SKILL.md +43 -0
  30. package/capabilities/architecture/skills/harness-architecture-quality-attributes/SKILL.md +43 -0
  31. package/capabilities/architecture/skills/harness-architecture-review/SKILL.md +43 -0
  32. package/capabilities/architecture/skills/harness-architecture-solution-design/SKILL.md +44 -0
  33. package/capabilities/architecture/templates/adr.md +29 -0
  34. package/capabilities/architecture/templates/nfr.md +22 -0
  35. package/capabilities/architecture/templates/overview.md +24 -0
  36. package/capabilities/architecture/templates/project-map.md +26 -0
  37. package/capabilities/architecture/templates/review.md +23 -0
  38. package/capabilities/architecture/templates/solution-design.md +29 -0
  39. package/capabilities/architecture/workflows/change-review.md +12 -0
  40. package/capabilities/architecture/workflows/discovery-to-design.md +16 -0
  41. package/capabilities/delivery/README.md +11 -0
  42. package/capabilities/delivery/agents/project-manager.md +16 -0
  43. package/capabilities/delivery/capability.json +29 -0
  44. package/capabilities/delivery/checks/verification.json +29 -0
  45. package/capabilities/delivery/evals/cases.json +25 -0
  46. package/capabilities/delivery/skills/harness-delivery-planning/SKILL.md +43 -0
  47. package/capabilities/delivery/skills/harness-delivery-risk-management/SKILL.md +42 -0
  48. package/capabilities/delivery/skills/harness-delivery-scope-change/SKILL.md +43 -0
  49. package/capabilities/delivery/templates/change-assessment.md +23 -0
  50. package/capabilities/delivery/templates/delivery-plan.md +25 -0
  51. package/capabilities/delivery/templates/risk-register.md +19 -0
  52. package/capabilities/delivery/workflows/execution-change.md +9 -0
  53. package/capabilities/delivery/workflows/planning.md +12 -0
  54. package/capabilities/product/README.md +7 -0
  55. package/capabilities/product/agents/business-analyst.md +3 -0
  56. package/capabilities/product/agents/product-owner.md +5 -1
  57. package/capabilities/product/agents/project-manager.md +5 -0
  58. package/capabilities/product/capability.json +9 -4
  59. package/capabilities/product/checks/verification.json +12 -0
  60. package/capabilities/product/evals/cases.json +10 -0
  61. package/capabilities/product/skills/harness-product-acceptance-criteria/SKILL.md +17 -0
  62. package/capabilities/product/skills/harness-product-backlog-prioritization/SKILL.md +17 -0
  63. package/capabilities/product/skills/harness-product-brd-generation/SKILL.md +17 -0
  64. package/capabilities/product/skills/harness-product-business-analysis/SKILL.md +17 -0
  65. package/capabilities/product/skills/harness-product-document-review/SKILL.md +17 -0
  66. package/capabilities/product/skills/harness-product-idea-discovery/SKILL.md +17 -0
  67. package/capabilities/product/skills/harness-product-knowledge-analysis/SKILL.md +17 -0
  68. package/capabilities/product/skills/harness-product-mvp-definition/SKILL.md +43 -0
  69. package/capabilities/product/skills/harness-product-prd-generation/SKILL.md +17 -0
  70. package/capabilities/product/skills/harness-product-product-outcomes/SKILL.md +42 -0
  71. package/capabilities/product/skills/harness-product-product-research/SKILL.md +17 -0
  72. package/capabilities/product/skills/harness-product-srs-generation/SKILL.md +17 -0
  73. package/capabilities/product/skills/harness-product-traceability/SKILL.md +17 -0
  74. package/capabilities/product/skills/harness-product-use-case-generation/SKILL.md +17 -0
  75. package/capabilities/product/skills/harness-product-user-stories/SKILL.md +17 -0
  76. package/capabilities/product/templates/mvp.md +25 -0
  77. package/capabilities/product/templates/outcomes.md +23 -0
  78. package/capabilities/product/workflows/document-driven.md +4 -0
  79. package/capabilities/product/workflows/idea-driven.md +4 -0
  80. package/capabilities/product/workflows/product-to-solution.md +15 -0
  81. package/cli/agents.js +165 -0
  82. package/cli/environment.js +14 -1
  83. package/cli/harness.js +24 -9
  84. package/cli/main.js +19 -6
  85. package/config/agents.default.json +80 -0
  86. package/core/agents/documentation.md +13 -0
  87. package/core/agents/implementer.md +7 -0
  88. package/core/agents/orchestrator.md +13 -0
  89. package/core/agents/planner.md +4 -0
  90. package/core/agents/reviewer.md +8 -0
  91. package/core/checks/verification.json +37 -0
  92. package/core/evals/cases.json +70 -0
  93. package/core/evals/composition.json +15 -0
  94. package/core/rules/foundations.md +1 -0
  95. package/core/rules/project-conventions.md +61 -0
  96. package/core/workflows/agent-routing.md +28 -0
  97. package/core/workflows/bugfix.md +2 -0
  98. package/core/workflows/project-setup.md +9 -1
  99. package/core/workflows/solution-framing.md +33 -0
  100. package/core/workflows/spec-to-code.md +11 -3
  101. package/docs/adapters.md +6 -0
  102. package/docs/agent-configuration.md +99 -0
  103. package/docs/agent-handoffs.md +19 -0
  104. package/docs/architecture.md +22 -1
  105. package/docs/cli.md +23 -1
  106. package/docs/documentation-workflows.md +7 -0
  107. package/docs/end-to-end-workflow.md +10 -1
  108. package/docs/getting-started.md +17 -0
  109. package/docs/harness-maintenance.md +80 -0
  110. package/docs/monetization.md +1 -1
  111. package/docs/project-configuration.md +4 -0
  112. package/docs/project-conventions.md +67 -0
  113. package/docs/research/solution-workflow-sources.md +30 -0
  114. package/docs/skill-matrix.md +28 -4
  115. package/docs/solution-workflow.md +67 -0
  116. package/docs/templates/harness-change-impact.md +30 -0
  117. package/docs/tool-setup/README.md +70 -0
  118. package/docs/tool-setup/claude-code.md +57 -0
  119. package/docs/tool-setup/codex.md +44 -0
  120. package/docs/tool-setup/copilot.md +42 -0
  121. package/docs/tool-setup/cursor.md +44 -0
  122. package/docs/tool-setup/gemini-cli.md +41 -0
  123. package/docs/versioning.md +29 -0
  124. package/evals/README.md +13 -0
  125. package/harness.yaml +4 -2
  126. package/package.json +2 -1
  127. package/templates/AGENTS.md +7 -0
  128. package/templates/openspec/design.md +6 -0
  129. package/templates/openspec/tasks.md +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased — Agent preferences and release regression
4
+ - Add provider-agnostic project-owned agents.json with canonical Sol/Luna tier defaults, namespaced roles, validation/alias resolution and explicit premium opt-in.
5
+ - Add non-interactive init presets and read-only setup host plans; preserve custom config and legacy snapshots. No native config writes, agent runtime or usage claims.
6
+ - Add orchestrator/documentation contracts, proportional routing/token guidance and official-source host recipes.
7
+ - Repair release update tests to use source-relative versions rather than hardcoded 0.7.0; retain downgrade protection.
8
+
9
+ ## Unreleased — Product and solution delivery
10
+ - Complete Product BA/PO with usable MVP/outcomes, synthetic examples, quality checklists and handoff contracts; module 1.2.0.
11
+ - Add optional Architecture and Delivery 1.0.0 modules: source-linked context, NFR, architecture/pattern trade-offs, ADR, living map/review, value slices, risks and scope changes.
12
+ - Connect proportional Core framing and OpenSpec design/tasks; add checks and unscored behavioral scenarios.
13
+ - Add new-doc --capability while retaining Product default paths and enforcing locked declared templates.
14
+ - Add official-source setup recipes for Codex, Claude Code, Cursor, Copilot and Gemini CLI, plus provenance/research and migration guidance. No native host or live-model compliance result is claimed.
15
+
16
+ ## Unreleased — Harness maintenance contract
17
+ - Add one maintainer guide linking component ownership, impact matrix, change checklist and existing architecture/release contracts.
18
+ - Add a maintainer-only impact template and GitHub PR checklist; require per-area done/pending/not-applicable evidence through repository AGENTS and contributing guidance.
19
+ - Add CI tests for maintainer entry points, impact-area consistency and installed Core/adapter rule discovery.
20
+ - Fix Kubernetes rule discovery exposed by the new test; module contract 1.0.1 adds index references to its existing architecture/security/reliability rules. No schema or executable runtime changes.
21
+
22
+ ## Unreleased — Project coding conventions
23
+ - Add Core new/maintain/mixed scope, convention precedence, search-before-create and architecture-fit review.
24
+ - Add Java/Spring, React/Next.js and React Native convention defaults, reuse checklists and manual verification; adapter module contracts advance to 1.1.0.
25
+ - Connect generated AGENTS, setup, implementation/bugfix/review roles and design templates; preserve existing project-owned context.
26
+ - Add eight behavioral scenarios and regression coverage for installed assets and update ownership. No live-model effectiveness result or automatic architecture enforcement is claimed.
27
+
3
28
  ## Unreleased — Project setup, clarification and readiness
4
29
  - Add optional shared environment configuration and ignored machine path overrides, with redacted doctor diagnostics.
5
30
  - Add read-only setup suggestions, host-led A/B/C clarification and next-step guidance.
@@ -59,6 +84,20 @@
59
84
  - Check release metadata consistency and establish single-release-PR version discipline; retain v0.6.0 until a dedicated release PR.
60
85
 
61
86
 
87
+ ## [0.8.0](https://github.com/manh0303/ai-harness/compare/v0.7.0...v0.8.0) (2026-10-12)
88
+
89
+
90
+ ### Features
91
+
92
+ * add project-aware coding conventions and reuse review ([ee1fad0](https://github.com/manh0303/ai-harness/commit/ee1fad0cc447ec6d41f07739a250b103d8df8845))
93
+ * add project-owned agent configuration and host routing plans ([8786294](https://github.com/manh0303/ai-harness/commit/8786294a0542b92998169b1cdb6199c88e8f4a20))
94
+ * add solution architecture and delivery workflows with host setup ([b75c00b](https://github.com/manh0303/ai-harness/commit/b75c00b43ab706768ad92ae2a280879eb7745489))
95
+
96
+
97
+ ### Bug Fixes
98
+
99
+ * connect Harness maintenance impact and rule discovery checks ([bc79f56](https://github.com/manh0303/ai-harness/commit/bc79f56f6052917a0e28d895597547485d6bfb83))
100
+
62
101
  ## [0.7.0](https://github.com/manh0303/ai-harness/compare/v0.6.2...v0.7.0) (2026-10-12)
63
102
 
64
103
 
package/CONTRIBUTING.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Contributing
2
2
 
3
+ Start with [Harness maintenance](docs/harness-maintenance.md): map the impact of each change and
4
+ trace affected declarations through installation, AI discovery, workflow, verification and docs.
5
+ Use its impact template and the PR checklist; explain not-applicable areas and keep pending work visible.
6
+
3
7
  Create a feature branch and an OpenSpec change for meaningful behavior or policy changes.
4
8
  Keep executable behavior tests alongside CLI changes. Document adapter expectations without pinning
5
9
  consumer application versions arbitrarily. Do not run a model evaluation with secrets or production data.
package/README.md CHANGED
@@ -27,16 +27,26 @@ Thêm `--capabilities product` khi cần tài liệu BA; `aih new-doc prd-lite`
27
27
  Cấu hình Maven/JDK riêng từng máy: [Project configuration](docs/project-configuration.md).
28
28
  Trước code/review tính năng có spec: [Change readiness](docs/change-readiness.md).
29
29
 
30
+
31
+ Coding convention cho dự án mới/maintain: [Project conventions](docs/project-conventions.md).
32
+ AI đọc cấu trúc, tìm common phù hợp trước khi tạo mới và review ranh giới module.
33
+
34
+ Agent/model preferences: [Agent configuration](docs/agent-configuration.md).
35
+ `aih init` seeds project-owned `.harness/agents.json`; `aih setup --host codex` gives a read-only plan.
36
+
30
37
  ## Thành phần
31
38
 
32
39
  | Nhóm | Hỗ trợ |
33
40
  | --- | --- |
34
41
  | **Core** | Rules, agent roles, skills, workflows, review & verification |
35
42
  | **Adapters** | Java Spring Boot, React/Next.js, React Native, Python AI/RAG, Kubernetes, Astro |
36
- | **Capabilities** | Product/BA/PO, UI/UX & Figma, DevOps, Monetization/AdSense |
43
+ | **Capabilities** | Product/BA/PO, Architecture/SA, Delivery/PM, UI/UX & Figma, DevOps |
37
44
  | **OpenSpec** | Template cho proposal, design, tasks và spec có review |
38
45
 
39
- Bạn chỉ chọn module cần dùng, ví dụ `aih init --adapters astro --capabilities monetization` cho website công cụ nhỏ có quảng cáo. Xem [Astro adapter](adapters/astro/README.md) và [Monetization capability](capabilities/monetization/README.md).
46
+ Bạn chỉ chọn module cần dùng, ví dụ `aih init --adapters astro` cho website và công cụ nhỏ, nhẹ. Xem [Astro adapter](adapters/astro/README.md).
47
+
48
+ BA → PO → SA → PM → Dev/QA: [Solution workflow](docs/solution-workflow.md).
49
+ Setup Codex, Claude Code, Cursor, Copilot, Gemini CLI: [Coding tools](docs/tool-setup/README.md).
40
50
 
41
51
  ## Hai luồng làm việc
42
52
 
@@ -47,6 +57,8 @@ Chi tiết: [Documentation workflows](docs/documentation-workflows.md) · [Confl
47
57
 
48
58
  ## Tài liệu
49
59
 
60
+ Nâng cấp chính AI Harness: [Quy trình bảo trì và ma trận ảnh hưởng](docs/harness-maintenance.md).
61
+
50
62
  | Mục đích | Hướng dẫn |
51
63
  | --- | --- |
52
64
  | Bắt đầu | [Getting started](docs/getting-started.md) |
@@ -55,7 +67,7 @@ Chi tiết: [Documentation workflows](docs/documentation-workflows.md) · [Confl
55
67
  | Tài liệu sản phẩm | [Idea-driven example](docs/examples/idea-driven-project.md) · [Document-driven example](docs/examples/document-driven-project.md) |
56
68
  | Ví dụ backend/full-stack | [Spring Boot API](docs/examples/spring-boot-api.md) · [Spring + Next.js](docs/examples/fullstack-web.md) |
57
69
  | Ví dụ mobile/AI | [React Native](docs/examples/react-native-app.md) · [Python AI/RAG](docs/examples/ai-rag-service.md) |
58
- | Micro-tools/website | [Astro micro-tools](docs/examples/astro-micro-tools.md) · [Astro + AdSense](docs/examples/astro-adsense-microtools.md) · [Monetization](docs/monetization.md) |
70
+ | Micro-tools/website | [Astro micro-tools](docs/examples/astro-micro-tools.md) |
59
71
  | Phát hành npm | [Release guide](docs/npm-release.md) · [Changelog](CHANGELOG.md) |
60
72
 
61
73
  ## Kiểm tra và cập nhật
@@ -29,7 +29,8 @@
29
29
  "rules/architecture.md",
30
30
  "rules/security.md",
31
31
  "rules/database.md",
32
- "rules/performance.md"
32
+ "rules/performance.md",
33
+ "rules/conventions.md"
33
34
  ],
34
35
  "skills": [
35
36
  "harness-java-spring-spring-api",
@@ -38,5 +39,5 @@
38
39
  ],
39
40
  "verification": "checks/verification.yaml",
40
41
  "evaluation": "evals/cases.json",
41
- "module_version": "1.0.0"
42
+ "module_version": "1.1.0"
42
43
  }
@@ -28,6 +28,18 @@
28
28
  "Database integration test status"
29
29
  ],
30
30
  "execution": "advisory"
31
+ },
32
+ {
33
+ "id": "convention-fit",
34
+ "title": "Review project convention, reuse and module boundary fit",
35
+ "command": [],
36
+ "when_file": null,
37
+ "evidence": [
38
+ "Applicable convention sources and comparable implementation paths",
39
+ "Reused public symbols and rationale for new components or dependencies",
40
+ "Configured lint/type/build/test and boundary results, or explicit manual review limits"
41
+ ],
42
+ "execution": "manual"
31
43
  }
32
44
  ]
33
45
  }
@@ -20,6 +20,16 @@
20
20
  "Does not expose sensitive fields in errors/logs"
21
21
  ],
22
22
  "critical": true
23
+ },
24
+ {
25
+ "id": "reuse-spring-common",
26
+ "prompt": "Add a customer endpoint to an existing Spring module. It already has ApiResponse, BusinessException, exception advice, a mapper, pagination and authorization helpers.",
27
+ "criteria": [
28
+ "Inspects the actual common APIs and comparable endpoint/tests, recording paths",
29
+ "Reuses compatible supported types and preserves target package/API conventions without a parallel error/response framework",
30
+ "Explains any genuinely new component and runs declared checks or reports unavailable verification"
31
+ ],
32
+ "critical": true
23
33
  }
24
34
  ]
25
35
  }
@@ -0,0 +1,39 @@
1
+ # Java / Spring coding conventions
2
+
3
+ First apply `.harness/core/rules/project-conventions.md`. These are defaults for new code when the
4
+ project has no applicable convention, not a migration mandate.
5
+
6
+ ## New-project defaults
7
+ - Start with a single deployable application and feature-oriented packages. Keep transport DTOs,
8
+ application use cases/transactions and persistence responsibilities distinct inside each feature;
9
+ create layers only when used. Do not introduce microservices, CQRS or a generic repository framework
10
+ without a requirement. A service does not need an interface solely to have an `Impl` class.
11
+ - Use lowercase package names, PascalCase types, lowerCamelCase methods/fields and UPPER_SNAKE_CASE
12
+ constants. Name types by responsibility (`CreateCustomerRequest`, `CustomerService`), not vague helpers.
13
+ - Use constructor injection and explicit dependencies. Keep controllers focused on HTTP mapping,
14
+ boundary validation and delegation. Authorize resource access on the server; transaction boundaries
15
+ belong to the application operation, not HTTP serialization.
16
+ - Keep request/response DTOs distinct from persistence entities. Choose manual mapping for simple cases;
17
+ introduce a mapper library only for a demonstrated need and project agreement. Do not add Lombok or
18
+ another dependency merely to enforce these defaults.
19
+ - Agree one API error contract and central exception mapping. Keep domain errors meaningful, preserve
20
+ causes internally and avoid swallowed exceptions or HTTP 200 for all failures. Never expose secrets
21
+ in responses or logs. Use parameterized logging with appropriate level/context; avoid logging the
22
+ same exception at every layer and never dump request bodies by default.
23
+ - Use explicit null/absence semantics, validated inputs, bounded pagination, managed resources and
24
+ existing rules for money/time/concurrency. Avoid unbounded collections or new generic utility bags.
25
+ - Agree and configure one formatter and relevant static checks using the actual build/JDK; do not
26
+ assume a plugin exists. Keep test packages aligned with production responsibilities. Test observable
27
+ behavior with the existing JUnit stack; use integration checks for DB, authorization and transactions.
28
+
29
+ ## Maintenance reuse checklist
30
+ Find existing response/error types, exception advice, validators, mappers, pagination, security helpers,
31
+ repositories, transaction conventions, logging context and test fixtures. Use their supported APIs.
32
+ Follow the target module's package layout even if it is layer-oriented. Do not introduce a parallel
33
+ `ApiResponse`, `BusinessException`, base service or mapper system. Shared code must not depend on a
34
+ feature's internals. Record a reason when an existing abstraction is unsuitable or unsafe.
35
+
36
+ ## Verification
37
+ Use the declared Maven/Gradle commands and existing formatter, Checkstyle/Spotless or equivalent only
38
+ when configured. Run existing ArchUnit/Modulith boundary checks if present; otherwise review affected
39
+ dependencies manually and state the limit. Neither this guide nor `aih verify` executes those checks.
@@ -29,6 +29,7 @@ Tools/commands in adapter.yaml are examples for review, never automatically exec
29
29
 
30
30
  ## Capability index
31
31
 
32
- Read rules/architecture.md, rules/security.md, rules/database.md and rules/performance.md.
32
+ Read rules/conventions.md before coding, then relevant rules/architecture.md, rules/security.md,
33
+ rules/database.md and rules/performance.md. Project conventions take precedence over adapter defaults.
33
34
  Use only relevant adapter skills listed in adapter.yaml; core TDD, debugging and review remain shared.
34
35
  Review checks/verification.yaml before choosing commands. No check executes automatically.
@@ -54,5 +54,5 @@
54
54
  ],
55
55
  "verification": "checks/verification.yaml",
56
56
  "evaluation": "evals/cases.json",
57
- "module_version": "1.0.0"
57
+ "module_version": "1.0.1"
58
58
  }
@@ -2,6 +2,9 @@
2
2
 
3
3
  Use this adapter for manifest, Helm and rollout decisions. Combine with the `devops` capability for broader release/incident workflows. It never grants cluster permissions.
4
4
 
5
+ Read `rules/architecture.md`, `rules/security.md` and `rules/reliability.md` before applying the
6
+ relevant skills declared in `adapter.yaml`. Review `checks/verification.yaml` for advisory checks.
7
+
5
8
  - Respect existing namespaces, GitOps ownership, supported API versions, CRDs and overlays.
6
9
  - Use immutable image provenance, explicit requests/limits, verified probes, safe termination and controlled rollout.
7
10
  - Protect secrets and tenant boundaries; do not commit plaintext credentials or assume cluster-admin access.
@@ -16,7 +16,8 @@
16
16
  "rules/architecture.md",
17
17
  "rules/security.md",
18
18
  "rules/database.md",
19
- "rules/performance.md"
19
+ "rules/performance.md",
20
+ "rules/conventions.md"
20
21
  ],
21
22
  "skills": [
22
23
  "harness-react-native-offline-sync",
@@ -24,5 +25,5 @@
24
25
  ],
25
26
  "verification": "checks/verification.yaml",
26
27
  "evaluation": "evals/cases.json",
27
- "module_version": "1.0.0"
28
+ "module_version": "1.1.0"
28
29
  }
@@ -25,6 +25,18 @@
25
25
  "Deep-link and permission checks on affected platform"
26
26
  ],
27
27
  "execution": "manual"
28
+ },
29
+ {
30
+ "id": "convention-fit",
31
+ "title": "Review project convention, reuse and module boundary fit",
32
+ "command": [],
33
+ "when_file": null,
34
+ "evidence": [
35
+ "Applicable convention sources and comparable implementation paths",
36
+ "Reused public symbols and rationale for new components or dependencies",
37
+ "Configured lint/type/build/test and boundary results, or explicit manual review limits"
38
+ ],
39
+ "execution": "manual"
28
40
  }
29
41
  ]
30
42
  }
@@ -20,6 +20,16 @@
20
20
  "Identifies the required affected-platform follow-up"
21
21
  ],
22
22
  "critical": true
23
+ },
24
+ {
25
+ "id": "reuse-mobile-conventions",
26
+ "prompt": "Add profile editing to an existing bare React Native app with navigation, theme, secure storage and permission services. The host cannot run the iOS build.",
27
+ "criteria": [
28
+ "Inspects and reuses the actual navigation/theme/storage APIs without adding parallel wrappers",
29
+ "Preserves native architecture and safe credential/permission boundaries",
30
+ "Reports Android or JS results actually obtained and explicitly marks unavailable iOS verification"
31
+ ],
32
+ "critical": true
23
33
  }
24
34
  ]
25
35
  }
@@ -0,0 +1,34 @@
1
+ # React Native coding conventions
2
+
3
+ First apply `.harness/core/rules/project-conventions.md`. These defaults do not authorize an Expo/bare,
4
+ navigation, native architecture, state-library or toolchain migration.
5
+
6
+ ## New-project defaults
7
+ - Resolve Expo versus bare, supported platforms and native-module needs from requirements before
8
+ scaffolding. Propose TypeScript strict checking when compatible with the chosen setup. Organize
9
+ by feature with screens, focused state/hooks and device adapters as needed; no speculative layers.
10
+ - Use PascalCase components/screens/types, lowerCamelCase functions/variables and `useX` hooks.
11
+ Follow router-required file names and one agreed convention elsewhere. Keep navigation parameters
12
+ typed and validate external deep links at runtime.
13
+ - Keep screens focused on UI and navigation. Access network, storage and device APIs through the
14
+ agreed integration boundary; avoid direct native calls scattered across unrelated screens.
15
+ - Reuse theme tokens and platform-aware UI. Handle safe areas, keyboard, accessibility, loading,
16
+ errors, offline state and app background/foreground transitions. Bound and virtualize large lists.
17
+ - Start with local state; add shared state only for concrete cross-screen needs. Distinguish remote
18
+ state, persisted state and transient UI state. Specify retries/conflicts before adding offline queues.
19
+ - Separate secure credentials from ordinary preferences/cache. Use the platform secure store for
20
+ credentials, request minimal permissions and model denial/revocation. Never log tokens or sensitive
21
+ payloads. Translate integration errors into actionable UI without swallowing diagnostic causes.
22
+ - Agree formatter/lint/type checks and test layout. Use behavior-oriented component/navigation tests;
23
+ include platform evidence when navigation, permissions, native integration or lifecycle changes.
24
+
25
+ ## Maintenance reuse checklist
26
+ Find existing navigation routes, API client, secure storage, theme, permission services, lifecycle
27
+ hooks, offline queue, state store and test helpers. Reuse supported interfaces; preserve platform
28
+ differences. Do not add another navigation container, storage wrapper, state library or permission
29
+ manager without a real gap and rationale. Common UI must not depend on feature internals.
30
+
31
+ ## Verification
32
+ Use existing JS and native build commands for the affected platforms. Record missing simulator/device
33
+ or iOS/Android build access explicitly. A JS test pass is not evidence of native compatibility, and
34
+ these conventions do not authorize signing, OTA publishing or store deployment.
@@ -18,6 +18,7 @@ OTA compatibility, signing and store deployment need their own reviewed release
18
18
 
19
19
  ## Capability index
20
20
 
21
- Read rules/architecture.md, rules/security.md, rules/database.md and rules/performance.md.
21
+ Read rules/conventions.md before coding, then relevant rules/architecture.md, rules/security.md,
22
+ rules/database.md and rules/performance.md. Project conventions take precedence over adapter defaults.
22
23
  Use only relevant adapter skills listed in adapter.yaml; core TDD, debugging and review remain shared.
23
24
  Review checks/verification.yaml before choosing commands. No check executes automatically.
@@ -16,7 +16,8 @@
16
16
  "rules/architecture.md",
17
17
  "rules/security.md",
18
18
  "rules/database.md",
19
- "rules/performance.md"
19
+ "rules/performance.md",
20
+ "rules/conventions.md"
20
21
  ],
21
22
  "skills": [
22
23
  "harness-react-nextjs-accessible-ui",
@@ -24,5 +25,5 @@
24
25
  ],
25
26
  "verification": "checks/verification.yaml",
26
27
  "evaluation": "evals/cases.json",
27
- "module_version": "1.0.0"
28
+ "module_version": "1.1.0"
28
29
  }
@@ -44,6 +44,18 @@
44
44
  "SSR/hydration checks when applicable"
45
45
  ],
46
46
  "execution": "advisory"
47
+ },
48
+ {
49
+ "id": "convention-fit",
50
+ "title": "Review project convention, reuse and module boundary fit",
51
+ "command": [],
52
+ "when_file": null,
53
+ "evidence": [
54
+ "Applicable convention sources and comparable implementation paths",
55
+ "Reused public symbols and rationale for new components or dependencies",
56
+ "Configured lint/type/build/test and boundary results, or explicit manual review limits"
57
+ ],
58
+ "execution": "manual"
47
59
  }
48
60
  ]
49
61
  }
@@ -20,6 +20,16 @@
20
20
  "Provides keyboard access and labels"
21
21
  ],
22
22
  "critical": true
23
+ },
24
+ {
25
+ "id": "reuse-web-conventions",
26
+ "prompt": "Add a user search form to an existing React app with apiClient, query hooks, design tokens and shared FormField components. No Next.js dependency is installed.",
27
+ "criteria": [
28
+ "Inspects and reuses the existing client, query/form components and tokens through public APIs",
29
+ "Preserves state, route and folder conventions without adding another HTTP/form/state library or Next assumptions",
30
+ "Covers loading/empty/error/success behavior and reports configured checks rather than invented scripts"
31
+ ],
32
+ "critical": true
23
33
  }
24
34
  ]
25
35
  }
@@ -0,0 +1,37 @@
1
+ # React / Next.js coding conventions
2
+
3
+ First apply `.harness/core/rules/project-conventions.md`. Defaults fill gaps; retain the target module's
4
+ router, language, layout, state management, styling and package manager in maintenance work.
5
+
6
+ ## New-project defaults
7
+ - Propose TypeScript with strict checking for a new typed app, after checking stack requirements.
8
+ Keep framework-required route files in their required locations; organize feature code beside its
9
+ use or under feature folders. Put only genuinely shared UI in shared components. No empty layers.
10
+ - Use PascalCase component/type names, lowerCamelCase functions/variables and `useX` for hooks.
11
+ Keep file naming consistent with the chosen project style; framework route naming takes precedence.
12
+ - Keep components focused on rendering and interaction. Put reusable behavior in focused hooks or
13
+ functions only when needed; do not wrap every operation. Prefer local state and derived values;
14
+ introduce global state only for actual cross-feature needs. Do not duplicate server state in a
15
+ second store without a consistency strategy.
16
+ - Use one agreed API client/data-access path, typed boundary contracts and runtime validation at
17
+ untrusted boundaries. Type assertions do not validate external input. Reuse the selected data-fetching,
18
+ form and validation approach rather than adding competing libraries.
19
+ - Reuse design tokens and semantic components. Handle loading, empty, error, success and disabled
20
+ states; support keyboard/focus and labels. Avoid arbitrary inline styles when a token/component fits.
21
+ - Keep secrets and privileged operations server-side. For Next.js inspect the actual router/version
22
+ before server/client decisions. Keep client boundaries narrow and preserve cache/user isolation.
23
+ - Centralize appropriate error translation; show useful recoverable feedback and redact sensitive
24
+ logging. Test behavior and critical flows; keep tests next to features or in the agreed test layout.
25
+ - Agree formatter, lint and type-check commands from the actual setup. Do not invent script names,
26
+ blanket-disable rules, or introduce `any`/suppression comments without a narrow documented reason.
27
+
28
+ ## Maintenance reuse checklist
29
+ Find the design system, API client, auth flow, form fields, validation schemas, hooks, query keys,
30
+ state stores, error UI and test utilities before creating new ones. Keep feature-specific components
31
+ local until shared ownership is justified. Do not create a second HTTP client, theme, modal system,
32
+ state library or folder convention. Shared UI must not import feature internals.
33
+
34
+ ## Verification
35
+ Run configured format/lint/type checks, relevant component/browser tests and production build. Check
36
+ SSR/hydration when affected. Respect existing import-boundary rules; report manual boundary review
37
+ where no check exists. Plain React must not inherit Next-specific commands or architectural assumptions.
@@ -22,6 +22,7 @@ For plain React skip server-component/Next-specific checks and document its actu
22
22
 
23
23
  ## Capability index
24
24
 
25
- Read rules/architecture.md, rules/security.md, rules/database.md and rules/performance.md.
25
+ Read rules/conventions.md before coding, then relevant rules/architecture.md, rules/security.md,
26
+ rules/database.md and rules/performance.md. Project conventions take precedence over adapter defaults.
26
27
  Use only relevant adapter skills listed in adapter.yaml; core TDD, debugging and review remain shared.
27
28
  Review checks/verification.yaml before choosing commands. No check executes automatically.
@@ -0,0 +1,11 @@
1
+ # Solution architecture
2
+
3
+ Optional instruction capability. Select with `aih init --capabilities architecture` or combine Product,
4
+ Architecture and Delivery; soft recommendations never auto-install other modules.
5
+ Read `workflows/discovery-to-design.md` and only relevant skills. Project-owned outputs live in `docs/architecture/`;
6
+ `aih new-doc <type> --capability architecture` scaffolds a locked draft, does not fill or approve it.
7
+ Templates and roles are in this snapshot; host roles can run sequentially. Core owns clarification,
8
+ permissions and code workflow; adapters own technology rules; DevOps owns release/operations detail.
9
+ Use compact notes for a small fix and existing authoritative docs for maintenance. No task runner,
10
+ model provider or automatic native host-agent installation is supplied. `aih verify/eval --scope all`
11
+ exports checks/unscored cases only; review actual host traces before claiming quality.
@@ -0,0 +1,16 @@
1
+ # Architecture Reviewer
2
+
3
+ Tool-neutral role contract; one host can perform roles sequentially.
4
+
5
+ ## Inputs
6
+ Current design/diff, reviewed requirements/ADRs, project map and actual check evidence.
7
+
8
+ ## Outputs
9
+ Prioritized findings, drift/reuse/boundary assessment and residual risks with evidence.
10
+
11
+ ## Permissions and limits
12
+ Review-only unless asked to fix; author self-review is not independent review. A diagram or ready result is not approval or proof.
13
+
14
+ ## Handoff
15
+ Return requirements gaps to BA/PO, design gaps to SA, sequencing risks to PM and defects to Dev/QA; include actual source and uncertainty.
16
+ Load relevant skills by description; do not assume another agent is running.
@@ -0,0 +1,16 @@
1
+ # Solution Architect
2
+
3
+ Tool-neutral role contract; one host can perform roles sequentially.
4
+
5
+ ## Inputs
6
+ Reviewed product/MVP or existing BA scope, verified project context, NFRs, ADRs and environment constraints.
7
+
8
+ ## Outputs
9
+ Source-linked overview/project map, measurable quality scenarios, architecture alternatives, accepted decision records, contracts, failure flows and implementation boundaries.
10
+
11
+ ## Permissions and limits
12
+ May inspect and propose within authorized scope. Cannot self-approve stakeholder decisions, invent capacity/SLA/budget, impose patterns or migrate existing architecture without a requirement.
13
+
14
+ ## Handoff
15
+ Pass requirement/NFR/ADR IDs, public boundaries, source revisions, acceptance/verification and risks to Delivery/Core/adapters. Return scope questions to BA/PO and operational gaps to DevOps.
16
+ Load relevant skills by description; do not assume another agent is running.
@@ -0,0 +1,35 @@
1
+ {
2
+ "schema_version": 1,
3
+ "id": "architecture",
4
+ "description": "Source-linked solution architecture, NFRs, decisions, patterns and architecture review.",
5
+ "skills": [
6
+ "harness-architecture-project-context",
7
+ "harness-architecture-quality-attributes",
8
+ "harness-architecture-solution-design",
9
+ "harness-architecture-decision-records",
10
+ "harness-architecture-change-impact",
11
+ "harness-architecture-review"
12
+ ],
13
+ "templates": [
14
+ "templates/overview.md",
15
+ "templates/nfr.md",
16
+ "templates/solution-design.md",
17
+ "templates/adr.md",
18
+ "templates/project-map.md",
19
+ "templates/review.md"
20
+ ],
21
+ "agents": [
22
+ "agents/solution-architect.md",
23
+ "agents/architecture-reviewer.md"
24
+ ],
25
+ "workflows": [
26
+ "workflows/discovery-to-design.md",
27
+ "workflows/change-review.md"
28
+ ],
29
+ "module_version": "1.0.0",
30
+ "recommends": [
31
+ "capability:product"
32
+ ],
33
+ "verification": "checks/verification.json",
34
+ "evaluation": "evals/cases.json"
35
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "schema_version": 1,
3
+ "checks": [
4
+ {
5
+ "id": "solution-fit",
6
+ "title": "Review architecture fit and evidence",
7
+ "command": [],
8
+ "when_file": null,
9
+ "evidence": [
10
+ "Verified context/source revisions and public module/data ownership",
11
+ "Alternatives/accepted ADRs and justified feature patterns",
12
+ "Testable NFR targets with owner authority and important failure flows"
13
+ ],
14
+ "execution": "manual"
15
+ },
16
+ {
17
+ "id": "living-map",
18
+ "title": "Review affected project-map freshness",
19
+ "command": [],
20
+ "when_file": null,
21
+ "evidence": [
22
+ "Touched source revision and actual dependency paths",
23
+ "Drift resolution and superseded decisions",
24
+ "Configured checks vs manual/unavailable verification"
25
+ ],
26
+ "execution": "manual"
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "schema_version": 1,
3
+ "cases": [
4
+ {
5
+ "id": "pattern-levels",
6
+ "prompt": "A small CRUD app has no integration requirement. The user asks whether to choose Ports and Adapters or Factory and expects architecture recommendations.",
7
+ "criteria": [
8
+ "Distinguishes application boundary style from object-creation pattern",
9
+ "Compares viable minimal options using actual constraints and avoids speculative layers",
10
+ "Asks only material unresolved choices and records rationale/decision status"
11
+ ],
12
+ "critical": true
13
+ },
14
+ {
15
+ "id": "unknown-nfr",
16
+ "prompt": "Design a service with no verified load, budget, recovery target or SLA. The developer wants a final scaling plan.",
17
+ "criteria": [
18
+ "Marks missing evidence and target authority without fabricating numbers",
19
+ "Proposes testable scenarios and grounded trade-offs with owner questions",
20
+ "Connects decisions to verification/deployment constraints, not automatic microservices"
21
+ ],
22
+ "critical": true
23
+ },
24
+ {
25
+ "id": "stale-map",
26
+ "prompt": "The map says customer calls billing synchronously, but touched source now emits an event. No ADR explains the change. Fix a related retry bug.",
27
+ "criteria": [
28
+ "Inspects actual code and reports specific revision/path drift",
29
+ "Keeps the fix bounded and identifies event ownership/idempotency/failure impact",
30
+ "Updates affected context only on verified facts or reviewed decisions and preserves history"
31
+ ],
32
+ "critical": true
33
+ }
34
+ ]
35
+ }
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: harness-architecture-change-impact
3
+ description: Assess change impact and architecture drift using a source-linked living project map.
4
+ ---
5
+
6
+ # harness-architecture-change-impact
7
+
8
+ ## Input
9
+ Requested change, current project-map/ADRs, affected source revisions, API/event/schema consumers and existing tests.
10
+
11
+ ## Procedure
12
+ 1. Check map freshness for touched components and compare actual source to approved docs; record concrete drift.
13
+ 2. Trace requirements → modules/data owners → public contracts/dependents → deployment/operational concerns.
14
+ 3. Identify compatibility, migrations, security/concurrency, failure propagation and cross-repository sequencing risks.
15
+ 4. Compare minimal implementation and alternatives; flag boundary changes for owner decision rather than widening scope silently.
16
+ 5. Update affected project-map/ADR/contract pointers and OpenSpec tasks after the actual decision; retain unrelated docs.
17
+ 6. Pass scope/value changes to PO, dependency/schedule risks to Delivery and release evidence to DevOps.
18
+
19
+ ## Output
20
+ Updated docs/architecture/project-map.md and change-specific impact notes linked to affected IDs/paths.
21
+
22
+ ## Template
23
+ Read `.harness/capabilities/architecture/templates/project-map.md` from the installed snapshot.
24
+ Use `aih new-doc project-map --capability architecture` only for a missing draft;
25
+ reuse existing authoritative docs or a compact task note when appropriate. Never overwrite approved content.
26
+
27
+ ## Example
28
+ A phone-normalization change affects the unique index, API duplicate policy and imports. Locate all three consumers and plan compatible migration rather than editing only a controller.
29
+
30
+ ## Quality checklist
31
+ - Dependent public contracts and data ownership were considered
32
+ - Drift has concrete paths/revisions and a reviewed resolution
33
+ - No speculative impact or unrelated broad refactor
34
+
35
+ ## Handoff
36
+ State source revisions, requirement/decision IDs, approval status, unresolved questions, output paths,
37
+ actual checks and next role. Use the module workflow; role names are not human authorization.
38
+
39
+ ## Constraints
40
+ Follow Core permissions, clarification and project-conventions. Ask only consequential unknowns with
41
+ 2–3 distinct options, evidence-based recommendation and free text; reuse established answers.
42
+ No invented source, measured result, target, estimate or approval. No external messaging/publishing,
43
+ paid tool use or production changes beyond the user's explicit authorization.