@manhd_d/ai-harness 0.6.2 → 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.
- package/CHANGELOG.md +52 -0
- package/CONTRIBUTING.md +4 -0
- package/README.md +20 -3
- 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 +3 -2
- package/adapters/react-native/checks/verification.yaml +12 -0
- package/adapters/react-native/evals/cases.json +10 -0
- package/adapters/react-native/rules/conventions.md +34 -0
- package/adapters/react-native/rules.md +2 -1
- package/adapters/react-nextjs/adapter.yaml +3 -2
- package/adapters/react-nextjs/checks/verification.yaml +12 -0
- package/adapters/react-nextjs/evals/cases.json +10 -0
- package/adapters/react-nextjs/rules/conventions.md +37 -0
- package/adapters/react-nextjs/rules.md +2 -1
- 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 +170 -0
- package/cli/harness.js +40 -10
- package/cli/main.js +47 -11
- package/cli/readiness.js +117 -0
- 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 +7 -0
- package/core/agents/reviewer.md +8 -0
- package/core/checks/verification.json +37 -0
- package/core/evals/cases.json +101 -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/skills/harness-review/SKILL.md +2 -0
- package/core/skills/harness-spec/SKILL.md +6 -2
- package/core/workflows/agent-routing.md +28 -0
- package/core/workflows/bugfix.md +2 -0
- package/core/workflows/clarification.md +28 -0
- package/core/workflows/project-setup.md +37 -0
- package/core/workflows/solution-framing.md +33 -0
- package/core/workflows/spec-to-code.md +18 -3
- package/docs/adapters.md +6 -0
- package/docs/agent-configuration.md +99 -0
- package/docs/agent-handoffs.md +19 -0
- package/docs/architecture.md +33 -1
- package/docs/change-readiness.md +67 -0
- package/docs/cli.md +41 -3
- package/docs/documentation-workflows.md +7 -0
- package/docs/end-to-end-workflow.md +10 -1
- package/docs/getting-started.md +29 -2
- package/docs/harness-maintenance.md +80 -0
- package/docs/monetization.md +1 -1
- package/docs/project-configuration.md +86 -0
- package/docs/project-conventions.md +67 -0
- package/docs/research/solution-workflow-sources.md +30 -0
- package/docs/skill-matrix.md +28 -4
- 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 +37 -0
- package/evals/README.md +16 -0
- package/evals/real-task-comparison.md +49 -0
- package/harness.yaml +4 -2
- package/package.json +2 -1
- package/templates/AGENTS.md +13 -1
- package/templates/environment.json +6 -0
- package/templates/openspec/decisions.json +5 -0
- package/templates/openspec/design.md +6 -0
- package/templates/openspec/tasks.md +1 -0
- package/templates/openspec/verification.json +4 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Project conventions and architecture fit
|
|
2
|
+
|
|
3
|
+
Apply this rule before implementation and during review, including small bugfixes. Keep discovery
|
|
4
|
+
proportional to the task; a short task note is enough for a small change. This is an instruction
|
|
5
|
+
contract for the AI host, not an automatic architecture checker.
|
|
6
|
+
|
|
7
|
+
## Choose the mode per affected module
|
|
8
|
+
- **New (greenfield):** no established implementation in scope. Propose the smallest suitable layout,
|
|
9
|
+
name/style/error/test conventions and dependency boundaries using the relevant adapter defaults.
|
|
10
|
+
Resolve consequential choices through the clarification workflow before scaffolding; use established
|
|
11
|
+
authorization for routine choices. Do not generate speculative layers, base classes or empty folders.
|
|
12
|
+
- **Maintain (brownfield):** preserve the target module's architecture, public contracts, dependency
|
|
13
|
+
direction, naming, package manager and configured tools. A new feature in an existing module is still
|
|
14
|
+
maintenance. Do not modernize or reformat unrelated code as a side effect.
|
|
15
|
+
- **Mixed:** a new module inside an existing repository adopts repository-wide contracts and shared
|
|
16
|
+
infrastructure; agree only its genuinely new internal choices. Map mode and boundaries per module.
|
|
17
|
+
|
|
18
|
+
Do not infer mode from an empty source folder, the presence of a package manifest, or adapter detection
|
|
19
|
+
alone. Inspect the requested scope, neighboring modules and established decisions first.
|
|
20
|
+
|
|
21
|
+
## Resolve the applicable standard
|
|
22
|
+
Within platform/security constraints and the user's authorized scope, use this order:
|
|
23
|
+
1. Explicit reviewed project/module decisions (AGENTS, local.md, ADRs and approved conventions).
|
|
24
|
+
2. Applicable formatter/linter/build configuration and consistent patterns in the target module.
|
|
25
|
+
3. Adapter defaults for unresolved gaps only.
|
|
26
|
+
|
|
27
|
+
Inspect configuration and representative implementation together. One legacy file is not a convention.
|
|
28
|
+
If documentation, configuration or modules disagree, identify the paths and scope of the conflict;
|
|
29
|
+
ask only when it materially affects the task. Never copy fail-open authorization, secret logging or
|
|
30
|
+
another known unsafe pattern merely for consistency. Explain a safe, bounded correction; obtain a
|
|
31
|
+
decision when the fix changes a public contract or exceeds the authorized scope.
|
|
32
|
+
|
|
33
|
+
## Find before creating
|
|
34
|
+
Before adding a file, dependency or abstraction:
|
|
35
|
+
1. Read local instructions, build/lint/format settings, relevant module boundaries and one or two
|
|
36
|
+
comparable implementations plus their tests where available.
|
|
37
|
+
2. Search the affected module and authorized shared packages for the needed behavior: common APIs,
|
|
38
|
+
errors, mapping, pagination, clients, components, hooks, state, storage and test helpers.
|
|
39
|
+
3. Record a compact task note: inspected paths, selected pattern, reusable symbol/path, intended new
|
|
40
|
+
code location and any gap. If nothing fits, record the search scope and why a new piece is needed.
|
|
41
|
+
4. Reuse only through supported public boundaries when behavior and ownership match. Do not reach
|
|
42
|
+
into another module's internals, create dependency cycles or push domain-specific logic into common.
|
|
43
|
+
5. Prefer a local implementation over an unrelated shared abstraction. A small amount of similar code
|
|
44
|
+
is acceptable when its meaning or lifecycle differs. Never invent reuse evidence.
|
|
45
|
+
|
|
46
|
+
Keep durable decisions and source paths in `.harness/local.md`, or link existing authoritative docs
|
|
47
|
+
there. Keep task-specific reuse evidence in the change/PR. Do not duplicate whole guides or create a
|
|
48
|
+
new document for every trivial edit. Update stale facts when the scope or source changes.
|
|
49
|
+
|
|
50
|
+
## Control the diff and verify
|
|
51
|
+
New dependencies, generic wrappers, base classes, global state and cross-module APIs need a concrete
|
|
52
|
+
requirement and a brief rationale. Ask before material architecture/contract changes outside agreed
|
|
53
|
+
scope; do not seek repeated approval for ordinary authorized implementation. No speculative framework,
|
|
54
|
+
unused export, dead code, commented-out implementation or unrelated cleanup in the delivered diff.
|
|
55
|
+
|
|
56
|
+
Review placement, naming, reuse, dependency direction, duplicate behavior and unnecessary abstraction.
|
|
57
|
+
Run applicable configured format/lint/type/build/tests and existing architecture checks through the
|
|
58
|
+
host; do not invent commands or install tools just to satisfy this rule. If a boundary has no automated
|
|
59
|
+
check, report the manual review and its limits; propose a focused check only when warranted.
|
|
60
|
+
Report actual results, skipped checks and new-component rationale. `aih check`, `aih verify` and
|
|
61
|
+
structural readiness cannot prove application convention compliance or model behavior.
|
|
@@ -14,6 +14,8 @@ Base/head diff, change spec, selected adapters and test evidence.
|
|
|
14
14
|
4. Classify findings: blocker (security/data loss), major (wrong behavior), minor (maintainability), suggestion.
|
|
15
15
|
5. Provide file/line, failing scenario, impact and minimal remedy for each actionable finding.
|
|
16
16
|
6. Re-run a focused check when possible. Keep unverified concerns explicitly labeled.
|
|
17
|
+
7. For full changes, inspect decisions.json and real verification.json evidence, then use
|
|
18
|
+
aih ready <id> --stage review. A ready result is not proof, approval or permission to merge.
|
|
17
19
|
## Output
|
|
18
20
|
Findings ordered by severity; requirement coverage; actual checks; residual risk; review recommendation.
|
|
19
21
|
## Constraints
|
|
@@ -8,12 +8,16 @@ description: Turn requirements into scoped OpenSpec change artifacts.
|
|
|
8
8
|
## Input
|
|
9
9
|
User request, authoritative source links, existing specs and repository boundaries.
|
|
10
10
|
## Procedure
|
|
11
|
-
1. Read source context and identify missing or conflicting business decisions.
|
|
11
|
+
1. Read source context and identify missing or conflicting business decisions. Follow the installed
|
|
12
|
+
clarification workflow: ask 1–3 consequential questions with A/B/C trade-offs, a grounded
|
|
13
|
+
recommendation and free text. Reuse established answers and authorization.
|
|
12
14
|
2. Draft proposal, design, tasks and capability delta specs in openspec/changes/<id>/.
|
|
13
15
|
3. Use ADDED/MODIFIED/REMOVED requirement sections and WHEN/THEN acceptance scenarios.
|
|
14
16
|
4. Include affected repositories, non-goals, security impact, migration and rollback.
|
|
15
17
|
5. Plan vertical tasks with public test boundaries and trace them to requirements.
|
|
16
|
-
6.
|
|
18
|
+
6. Record reviewed decisions, answers and source references in decisions.json. Resolve consequential
|
|
19
|
+
uncertainties before the affected implementation; run aih ready <id> --stage implement.
|
|
20
|
+
7. Validate with the project's pinned OpenSpec CLI; structural readiness does not replace it.
|
|
17
21
|
## Output
|
|
18
22
|
Reviewable change artifacts and an explicit list of remaining decisions.
|
|
19
23
|
## Constraints
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Agent preferences, model routing and execution
|
|
2
|
+
|
|
3
|
+
Read project-owned .harness/agents.json when present. On legacy installs, absence means no declared
|
|
4
|
+
routing preference; use actual host settings and report the gap. `aih setup --host <id>` resolves the
|
|
5
|
+
contract without probing models or writing native host config. Source defaults are a recommendation,
|
|
6
|
+
not evidence of model/account availability. Runtime permissions and the user's current model choice win.
|
|
7
|
+
|
|
8
|
+
1. Select only relevant workflow/skills/source. Resolve namespaced role IDs against installed Core and
|
|
9
|
+
selected capability contracts; inactive or disabled routing cannot remove required quality/security checks.
|
|
10
|
+
2. Model aliases use @name, provider/model/reasoning can be overridden per role. Missing role mappings
|
|
11
|
+
inherit project defaults and must be reported; never silently substitute another provider or premium.
|
|
12
|
+
3. Verify requested/native model ID, reasoning support, authentication and delegation in the actual host.
|
|
13
|
+
Host-incompatible or unverified choices need a grounded user decision/check before model-dependent
|
|
14
|
+
execution. Explicit user mappings are declarations, not proof that a native model is available.
|
|
15
|
+
4. Single-agent: one session performs sequential roles and relevant skills. Hybrid: one lead and an
|
|
16
|
+
independent helper only when useful, authorized and supported. Multi-agent: use separate contracts
|
|
17
|
+
and concise handoffs only when runtime supports it. Follow the host's actual delegation rules.
|
|
18
|
+
5. Keep simple edits/clear bugfixes in one session. For parallel work isolate responsibilities/paths,
|
|
19
|
+
share only scope, source references, decisions, AC and blockers; do not send every skill/doc to each worker.
|
|
20
|
+
6. Treat maxConcurrentAgents and maxRounds as requested caps, never counters enforced by this CLI.
|
|
21
|
+
Count the lead in concurrency planning; translate native worker/thread limits only after checking
|
|
22
|
+
their semantics. When a round limit is reached, checkpoint unresolved work instead of claiming done.
|
|
23
|
+
7. Premium/Astra is allowed only through the user's explicit model/tier selection; automatic escalation
|
|
24
|
+
must remain false. An economy preference does not waive correctness/security or mandatory review.
|
|
25
|
+
8. No real token budget or usage meter is supplied. Read real host usage when available; report unknown
|
|
26
|
+
cost/availability. Preserve existing model settings until the user agrees a native change.
|
|
27
|
+
9. Handoff task/role ID, actual model/effort if known, files/revision, decisions, performed checks, remaining
|
|
28
|
+
questions and next owner. A same-session author review is not independent review.
|
package/core/workflows/bugfix.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Bugfix workflow
|
|
2
2
|
|
|
3
3
|
1. Capture expected versus observed behavior using redacted inputs and an environment fingerprint.
|
|
4
|
+
Apply `.harness/core/rules/project-conventions.md`; inspect comparable code and reuse existing
|
|
5
|
+
helpers before adding a fix. A small bugfix needs only a compact task note, not a full survey.
|
|
4
6
|
2. Create the smallest reproducible failing test or repeatable observation. If blocked, document access
|
|
5
7
|
or data needed; label an unverified hypothesis as such.
|
|
6
8
|
3. Rank plausible causes and test one distinguishing prediction at a time.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Clarify consequential ambiguity before implementation
|
|
2
|
+
|
|
3
|
+
Apply during setup, requirement discovery and any later change that exposes a new consequential gap.
|
|
4
|
+
|
|
5
|
+
1. Read the user request, project facts, relevant code/specs and previously recorded decisions.
|
|
6
|
+
2. Separate verified facts, consequential unknowns and reversible implementation details.
|
|
7
|
+
Ask about business behavior, public API contracts, data changes, authorization or costly architecture.
|
|
8
|
+
Use project conventions for routine choices; record assumptions rather than blocking every edit.
|
|
9
|
+
3. Ask 1–3 questions per turn. For each, explain the decision in one sentence and give 2–3 distinct
|
|
10
|
+
choices labeled A/B/C, a short trade-off for each, and free text. Recommend one only when supported
|
|
11
|
+
by evidence and explain why. If evidence is insufficient, say so instead of inventing a default.
|
|
12
|
+
Use the host's question UI if available; plain text is a valid fallback.
|
|
13
|
+
4. For critical decisions, an unanswered question is not approval. Pause only the affected slice;
|
|
14
|
+
continue independent authorized work. Do not silently implement a suggested answer.
|
|
15
|
+
5. Save shared setup answers in local.md/environment.json. Save change-specific questions, selected
|
|
16
|
+
answers and source references in decisions.json. Set reviewed=true only after examining the actual
|
|
17
|
+
scope for consequential ambiguity; an empty decision list is valid when there are no such gaps.
|
|
18
|
+
Status open means unresolved; resolved needs both answer and source. Preserve superseded decisions
|
|
19
|
+
in Git/history and update affected specs when the user changes an answer.
|
|
20
|
+
6. Run `aih ready <id> --stage implement` where a full spec is appropriate. A structural result does
|
|
21
|
+
not supply authorization. User authorization already given remains valid; do not ask a second
|
|
22
|
+
generic confirmation once the material decisions are settled.
|
|
23
|
+
7. During code/review, record real verification evidence. Small low-risk changes can use the lightweight
|
|
24
|
+
workflow with an explicit rationale instead of scaffolding a full change.
|
|
25
|
+
|
|
26
|
+
Example: "On duplicate phone number: A reject creation; B update the existing customer; C return the
|
|
27
|
+
existing record unchanged. A matches the create-only API in the current PRD; confirm or correct it."
|
|
28
|
+
Do not use that recommendation unless the actual source supports it.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# First-run project setup
|
|
2
|
+
|
|
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.
|
|
5
|
+
Use `aih setup` for structured suggestions; it never interviews the user or writes answers.
|
|
6
|
+
Do not ask about facts already established in the repository or current conversation.
|
|
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.
|
|
13
|
+
2. Ask only missing consequential choices using the clarification workflow. Ask 1–3 questions
|
|
14
|
+
per turn, with A/B/C options where suitable, a grounded recommendation and a free-text option.
|
|
15
|
+
3. For Java, inspect Maven/Gradle wrappers before proposing PATH or a custom tool. A wrapper is
|
|
16
|
+
a recommendation only when present and consistent with project policy; do not switch corporate
|
|
17
|
+
tools or download a replacement without authorization.
|
|
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
|
|
22
|
+
and required file paths in `.harness/environment.json`. Record evidence/source, not guessed versions.
|
|
23
|
+
5. For a machine-specific executable/file location, use `.harness/machine.json` or an environment
|
|
24
|
+
reference. The machine file can only override declared paths. It does not override permissions,
|
|
25
|
+
arguments, requirements or business decisions. Do not store passwords/tokens in either file.
|
|
26
|
+
6. Ensure `.harness/.gitignore` excludes `/machine.json`. If the file was already tracked, explain
|
|
27
|
+
that ignore rules do not untrack it; let the owner review any index/history correction.
|
|
28
|
+
7. Run `aih doctor`. Fix missing references or clearly report the host cannot reach the user's
|
|
29
|
+
machine/VPN. The host executes only reviewed commands with its own permissions. A presence
|
|
30
|
+
check does not establish trust, version compatibility or a successful build.
|
|
31
|
+
8. Commit shared facts/configuration and the Harness snapshot after review. Preserve machine data
|
|
32
|
+
locally. Once existing answers and authorization cover the task, continue without another
|
|
33
|
+
redundant "may I start?" prompt.
|
|
34
|
+
|
|
35
|
+
Example: "Which Maven should this project use? A: existing Wrapper (recommended because mvnw is
|
|
36
|
+
present); B: Maven on PATH; C: internal Maven at a custom path. You can describe another setup."
|
|
37
|
+
If C is selected, ask for only the missing executable/settings locations. Do not request credentials.
|
|
@@ -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,30 @@
|
|
|
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.
|
|
16
|
+
For first use, read `project-setup.md` in this workflow directory. Before implementing consequential
|
|
17
|
+
unknowns, follow `clarification.md`: inspect existing answers, ask 1–3 A/B/C questions with grounded
|
|
18
|
+
recommendations, and record answers/source in the change's decisions.json. Do not ask again once
|
|
19
|
+
scope and authorization are already clear. Run `aih ready <id> --stage implement` after drafting;
|
|
20
|
+
record actual checks in verification.json and use `--stage review` before handoff. These commands
|
|
21
|
+
check structure, not business approval or the truth of test evidence.
|
|
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
|
+
|
|
14
29
|
Use the harness-spec skill to draft and harness-tdd to implement. Use harness-debugging when diagnosing
|
|
15
30
|
an observed defect. Agents are roles, not automatically spawned workers; a single assistant can perform
|
|
16
31
|
them sequentially. Respect the host's delegation rules.
|
package/docs/adapters.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
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
|
|
|
@@ -81,3 +83,7 @@ Add rules and a concrete technology skill with testable inputs/outputs; avoid du
|
|
|
81
83
|
Declare metadata/checks/cases and register new adapter IDs. Include detection positive/negative fixtures,
|
|
82
84
|
install/removal/drift cases, and report validation tests. Run npm test, npm run validate and npm run
|
|
83
85
|
test:package. Version changes and review installed snapshots before release.
|
|
86
|
+
|
|
87
|
+
## Project coding conventions
|
|
88
|
+
|
|
89
|
+
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
|
@@ -11,6 +11,11 @@ AI Harness hiện có **role contracts**, không tạo các agent chạy tự đ
|
|
|
11
11
|
| [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
12
|
| [project-manager](../capabilities/product/agents/project-manager.md) | Scope và phụ thuộc | Timeline/risks/RAID theo nguồn | Bịa estimate/commitment |
|
|
13
13
|
| [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 |
|
|
14
|
+
| [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 |
|
|
15
|
+
| [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 |
|
|
16
|
+
| [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 |
|
|
17
|
+
| [orchestrator](../core/agents/orchestrator.md) | Authorized task, preferences and host capabilities | Scoped coordination and consolidated evidence | Auto-escalate premium or claim native workers exist |
|
|
18
|
+
| [documentation](../core/agents/documentation.md) | Verified sources and decisions | Source-linked document diff and quality evidence | Invent approval or unperformed verification |
|
|
14
19
|
| [planner](../core/agents/planner.md) | Scope, approved requirements, repo map | OpenSpec design/tasks/test outline | Implement ngoài scope |
|
|
15
20
|
| [implementer](../core/agents/implementer.md) | Spec, tasks, repo, adapter | Code slice và actual test evidence | Merge/deploy |
|
|
16
21
|
| [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 +82,17 @@ Next gate: security-reviewer and human PR review
|
|
|
77
82
|
~~~
|
|
78
83
|
|
|
79
84
|
Đây là mẫu handoff, không phải report của một task đã chạy.
|
|
85
|
+
|
|
86
|
+
## Product and solution delivery
|
|
87
|
+
|
|
88
|
+
Product Manager owns value/outcomes; Project Manager coordinates delivery. The existing Product PM
|
|
89
|
+
role/template remains a compatibility entry; the Delivery capability supplies deeper planning.
|
|
90
|
+
Use [Solution workflow](solution-workflow.md) and [tool setup](tool-setup/README.md); carry MVP/AC/NFR/ADR
|
|
91
|
+
IDs and source revisions with each handoff. Return gaps to the appropriate owner and keep approval factual.
|
|
92
|
+
|
|
93
|
+
## Model and execution preferences
|
|
94
|
+
|
|
95
|
+
[Agent configuration](agent-configuration.md) resolves namespace:role without conflating Product PM
|
|
96
|
+
with Delivery PM. `.harness/agents.json` is project-owned; missing mappings inherit/report defaults.
|
|
97
|
+
Actual host settings/access and delegation rules control execution. Report actual model/effort if known,
|
|
98
|
+
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
|
|
|
@@ -36,6 +38,17 @@ Commit consumer state before updates; after interruption inspect the marker, run
|
|
|
36
38
|
Empty directories may remain after rollback/removal. Symlinked roots/paths are intentionally unsupported.
|
|
37
39
|
Concurrent hostile filesystem mutation is outside the threat model; run in a trusted local workspace.
|
|
38
40
|
|
|
41
|
+
## Project environment and structural readiness
|
|
42
|
+
|
|
43
|
+
Project-owned environment.json records tools, files and command arguments; ignored machine.json may
|
|
44
|
+
override declared paths only. No environment values are copied into the managed lock. Installer seeds
|
|
45
|
+
the shared contract and preserves existing contents; the scoped ignore rule is appended transactionally.
|
|
46
|
+
The environment reader uses metadata/path presence only, with no execution or private-value output.
|
|
47
|
+
|
|
48
|
+
Setup is a host-facing question plan. Clarification instructions live in Core workflows.
|
|
49
|
+
Readiness reads project-owned OpenSpec decision/evidence sidecars and Markdown structure, returning
|
|
50
|
+
blocked or ready. It is not a semantic validator, runtime policy engine or approval mechanism.
|
|
51
|
+
|
|
39
52
|
## Agent/runtime boundary
|
|
40
53
|
Roles are Markdown handoff contracts. The host decides tool execution and delegation. A role document
|
|
41
54
|
does not create another agent or supply an API key. Use the same framework in an IDE assistant or your
|
|
@@ -43,7 +56,7 @@ own model-backed runtime; actual permissions, cost limits and network allowlists
|
|
|
43
56
|
|
|
44
57
|
## Advertising monetization capability
|
|
45
58
|
|
|
46
|
-
`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).
|
|
47
60
|
|
|
48
61
|
## Astro static-first adapter
|
|
49
62
|
|
|
@@ -105,3 +118,22 @@ DevOps is an optional stack-neutral capability for release procedures and SRE; t
|
|
|
105
118
|
## Documented end-to-end usage
|
|
106
119
|
|
|
107
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).
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Hỏi rõ và kiểm tra change
|
|
2
|
+
|
|
3
|
+
Với tính năng cần spec:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
aih new-change add-customer-search
|
|
7
|
+
aih ready add-customer-search --stage implement
|
|
8
|
+
# Sau khi implement và ghi bằng chứng:
|
|
9
|
+
aih ready add-customer-search --stage review
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
AI đọc yêu cầu/code/tài liệu trước. Nếu còn mơ hồ về nghiệp vụ, API, dữ liệu hoặc quyền truy cập,
|
|
13
|
+
hỏi 1–3 câu mỗi lượt, có A/B/C, trade-off, đề xuất có lý do và phương án trả lời khác. Không hỏi lại
|
|
14
|
+
điều đã được xác nhận. Không coi im lặng là đồng ý; tiếp tục phần độc lập đã được cho phép.
|
|
15
|
+
|
|
16
|
+
## Hai file bổ sung cho mỗi change
|
|
17
|
+
|
|
18
|
+
`decisions.json` ghi kết quả rà soát và những quyết định ảnh hưởng triển khai:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"schema_version": 1,
|
|
23
|
+
"reviewed": true,
|
|
24
|
+
"decisions": [
|
|
25
|
+
{
|
|
26
|
+
"id": "duplicate-phone",
|
|
27
|
+
"question": "Xử lý số điện thoại đã tồn tại?",
|
|
28
|
+
"status": "resolved",
|
|
29
|
+
"answer": "Trả lỗi trùng; không cập nhật khách hàng cũ.",
|
|
30
|
+
"source": "Người dùng xác nhận trong ticket CRM-42."
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Đây chỉ là ví dụ, không phải quyết định thực cho project của bạn. `reviewed: true` nghĩa đã rà soát
|
|
37
|
+
các điểm mơ hồ, không phải quyền deploy/merge. `decisions: []` hợp lệ nếu thực sự không có điểm
|
|
38
|
+
cần hỏi; không xóa các quyết định chưa trả lời để vượt kiểm tra.
|
|
39
|
+
|
|
40
|
+
`verification.json` ghi bằng chứng thực chạy:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"schema_version": 1,
|
|
45
|
+
"checks": [
|
|
46
|
+
{ "name": "unit-tests", "status": "passed", "evidence": "CI run URL hoặc đường dẫn log có kết quả" },
|
|
47
|
+
{ "name": "integration", "status": "skipped", "reason": "Host không truy cập được VPN nội bộ" }
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Chỉ ghi passed khi có bằng chứng. Failed chặn review; skipped phải có lý do và luôn hiện riêng trong
|
|
53
|
+
kết quả. Ít nhất một check hoặc manual review đã pass phải được ghi; tất cả skipped không đủ.
|
|
54
|
+
|
|
55
|
+
## Lệnh thực sự kiểm tra gì?
|
|
56
|
+
|
|
57
|
+
- Implement: proposal/design/tasks/spec phải có, không còn marker TODO/TBD/FIXME/template ngoài
|
|
58
|
+
code block; có cấu trúc requirement/scenario WHEN/THEN; đã rà soát và giải quyết các quyết định khai báo.
|
|
59
|
+
- Review: thêm tasks trước merge đã hoàn thành và verification hợp lệ. Tasks chỉ thuộc phần
|
|
60
|
+
`## After merge` (hoặc `## 4. After merge`) được bỏ qua để không ép archive sớm.
|
|
61
|
+
- Missing/invalid/blocked trả exit 1; ready trả exit 0. Không sửa file, gọi model hoặc chạy test.
|
|
62
|
+
- Đây là kiểm tra cấu trúc, không thể phát hiện mọi mơ hồ trong ngôn ngữ tự nhiên hoặc chứng minh
|
|
63
|
+
bằng chứng là thật. Reviewer vẫn kiểm tra nguồn, diff và log; dùng OpenSpec CLI riêng để validate.
|
|
64
|
+
|
|
65
|
+
Change cũ không bị tự sửa. Nếu muốn dùng ready, copy hai template từ
|
|
66
|
+
`.harness/templates/openspec/` sau khi update, chỉ khi file đích chưa có; điền theo thực tế.
|
|
67
|
+
Sửa nhỏ, ít rủi ro không cần full change: ghi rationale và bằng chứng ngay trong PR.
|
package/docs/cli.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Invocation: `aih COMMAND [--target /existing/project]`.
|
|
4
4
|
Node.js 22+; built-in modules only; no network, subprocesses, remote provider calls or dependency installs.
|
|
5
5
|
Output is JSON on stdout on success; errors use stderr. Drift reports from check and failed evaluation reports use stdout with exit 1.
|
|
6
|
-
Exit 0 means the requested operation succeeded; 1 means validation/I/O/drift failure; 2 is a CLI usage error. Help and version are plain text; no arguments displays help.
|
|
6
|
+
Exit 0 means the requested operation succeeded; 1 means validation/I/O/drift failure or blocked readiness/setup; 2 is a CLI usage error. Help and version are plain text; no arguments displays help.
|
|
7
7
|
|
|
8
8
|
| Command | Options | Effect |
|
|
9
9
|
| --- | --- | --- |
|
|
@@ -15,7 +15,9 @@ Exit 0 means the requested operation succeeded; 1 means validation/I/O/drift fai
|
|
|
15
15
|
| init | --detect OR --adapters a,b; --capabilities a,b; --source; --dry-run; --allow-major | Install a snapshot; exact rerun 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
|
-
| doctor | none | check plus
|
|
18
|
+
| doctor | none | check plus configured environment/path diagnostics and generic PATH hints; no execution |
|
|
19
|
+
| setup | none | Read-only host-facing question plan; skips tool-selection suggestions when tools are configured |
|
|
20
|
+
| ready ID | --stage implement/review | Structural readiness; blocked returns exit 1, ready returns exit 0; no business approval |
|
|
19
21
|
| new-change ID | none | Create an unapproved OpenSpec draft using installed templates |
|
|
20
22
|
| new-doc TYPE | none | Copy a selected locked Product template to `docs/discovery/` (idea, research) or `docs/product/` (other types) without overwriting |
|
|
21
23
|
| skills | none | List installed skill metadata only |
|
|
@@ -34,7 +36,21 @@ Selection changes belong in .harness/project.json; unknown or duplicate adapters
|
|
|
34
36
|
|
|
35
37
|
## Optional monetization capability
|
|
36
38
|
|
|
37
|
-
`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
|
+
|
|
41
|
+
## Project environment and clarification
|
|
42
|
+
|
|
43
|
+
See [Project configuration](project-configuration.md) for the schema and Maven example.
|
|
44
|
+
Init/update seed a project-owned environment.json and append /machine.json to .harness/.gitignore,
|
|
45
|
+
preserving previous content. Private machine files are not created, locked or published by the CLI.
|
|
46
|
+
Doctor returns nonzero for configured required paths/variables that are missing; diagnostics omit values.
|
|
47
|
+
Setup returns questions/options/recommendations for the AI host; it does not read stdin or write answers.
|
|
48
|
+
Init/update/new-doc/new-change also return next_steps without executing them.
|
|
49
|
+
|
|
50
|
+
See [Change readiness](change-readiness.md): new changes include decisions.json and verification.json
|
|
51
|
+
when those templates are present in the installed lock. Legacy snapshots still scaffold their existing
|
|
52
|
+
files; update first to adopt sidecars. ready does not rewrite old changes, validate upstream OpenSpec,
|
|
53
|
+
run tests, infer every semantic ambiguity or verify that recorded evidence is true.
|
|
38
54
|
|
|
39
55
|
## Ownership and conflict behavior
|
|
40
56
|
AGENTS.md ownership covers only text between the unique start/end markers, inclusive. Any modification
|
|
@@ -107,3 +123,25 @@ See [Getting started](getting-started.md) for CLI boundaries, [Full SDLC](end-to
|
|
|
107
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`.
|
|
108
124
|
|
|
109
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).
|