repo-harness 0.19.1 → 0.19.2
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/README.es.md +2 -2
- package/README.fr.md +2 -2
- package/README.ja.md +2 -2
- package/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/assets/reference-configs/external-tooling.md +21 -3
- package/assets/skill-commands/repo-harness-architecture/SKILL.md +53 -4
- package/assets/skill-version.json +2 -2
- package/assets/templates/helpers/architecture-event.ts +1 -3
- package/assets/templates/helpers/check-task-sync.sh +5 -0
- package/dist/hook-entry.js +12052 -11902
- package/package.json +1 -1
- package/scripts/architecture-event.ts +1 -3
- package/scripts/check-task-sync.sh +5 -0
- package/src/cli/hook/session-context-budget.ts +1 -0
- package/src/cli/hook/session-context.ts +52 -1
- package/src/effects/architecture/archctx-provider.ts +8 -20
package/README.es.md
CHANGED
|
@@ -702,8 +702,8 @@ repositorio adopte la misma política.
|
|
|
702
702
|
|
|
703
703
|
## Versión actual
|
|
704
704
|
|
|
705
|
-
- Paquete npm: `repo-harness@0.19.
|
|
706
|
-
- Sello de workflow generado: `repo-harness@0.19.
|
|
705
|
+
- Paquete npm: `repo-harness@0.19.2`
|
|
706
|
+
- Sello de workflow generado: `repo-harness@0.19.2+template@0.19.2`
|
|
707
707
|
- Repositorio de GitHub: `Ancienttwo/repo-harness`
|
|
708
708
|
- Notas de versión e historial: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
709
709
|
|
package/README.fr.md
CHANGED
|
@@ -697,8 +697,8 @@ adopte la même policy.
|
|
|
697
697
|
|
|
698
698
|
## Release actuelle
|
|
699
699
|
|
|
700
|
-
- Package npm : `repo-harness@0.19.
|
|
701
|
-
- Generated workflow stamp : `repo-harness@0.19.
|
|
700
|
+
- Package npm : `repo-harness@0.19.2`
|
|
701
|
+
- Generated workflow stamp : `repo-harness@0.19.2+template@0.19.2`
|
|
702
702
|
- Dépôt GitHub : `Ancienttwo/repo-harness`
|
|
703
703
|
- Notes et historique de release : [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
704
704
|
|
package/README.ja.md
CHANGED
|
@@ -694,8 +694,8 @@ commit script や hooks に組み込まないでください。
|
|
|
694
694
|
|
|
695
695
|
## 現在の Release
|
|
696
696
|
|
|
697
|
-
- npm package:`repo-harness@0.19.
|
|
698
|
-
- Generated workflow stamp:`repo-harness@0.19.
|
|
697
|
+
- npm package:`repo-harness@0.19.2`
|
|
698
|
+
- Generated workflow stamp:`repo-harness@0.19.2+template@0.19.2`
|
|
699
699
|
- GitHub repository:`Ancienttwo/repo-harness`
|
|
700
700
|
- Release notes and history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
701
701
|
|
package/README.md
CHANGED
|
@@ -665,8 +665,8 @@ repo-harness commit scripts or hooks unless that repo adopts the same policy.
|
|
|
665
665
|
|
|
666
666
|
## Current Release
|
|
667
667
|
|
|
668
|
-
- npm package: `repo-harness@0.19.
|
|
669
|
-
- Generated workflow stamp: `repo-harness@0.19.
|
|
668
|
+
- npm package: `repo-harness@0.19.2`
|
|
669
|
+
- Generated workflow stamp: `repo-harness@0.19.2+template@0.19.2`
|
|
670
670
|
- GitHub repository: `Ancienttwo/repo-harness`
|
|
671
671
|
- Release notes and history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
672
672
|
|
package/README.zh-CN.md
CHANGED
|
@@ -630,8 +630,8 @@ commit script 或 hook,除非目标仓库采用同样的 policy。
|
|
|
630
630
|
|
|
631
631
|
## 当前 Release
|
|
632
632
|
|
|
633
|
-
- npm package:`repo-harness@0.19.
|
|
634
|
-
- Generated workflow stamp:`repo-harness@0.19.
|
|
633
|
+
- npm package:`repo-harness@0.19.2`
|
|
634
|
+
- Generated workflow stamp:`repo-harness@0.19.2+template@0.19.2`
|
|
635
635
|
- GitHub repository:`Ancienttwo/repo-harness`
|
|
636
636
|
- Release notes 和 history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
637
637
|
|
|
@@ -951,9 +951,27 @@ global automatic mode does not authorize ownership adoption or semantic acceptan
|
|
|
951
951
|
Use `repo-harness architecture-projection policy --json` to inspect the global
|
|
952
952
|
source path, initialization state and effective execution settings without a
|
|
953
953
|
provider process. `repo-harness architecture-projection status --json` adds the
|
|
954
|
-
exact package capability handshake and project apply readiness.
|
|
955
|
-
|
|
956
|
-
|
|
954
|
+
exact package capability handshake and project apply readiness. The running
|
|
955
|
+
repo-harness package owns the `archctx` executable and exact dependency version;
|
|
956
|
+
its dependency tree is refreshed by the global update transaction. A target
|
|
957
|
+
repository's `node_modules/archctx` never overrides that runtime dependency.
|
|
958
|
+
Source-checkout execution uses that checkout's repo-harness dependencies, and
|
|
959
|
+
candidate verification may explicitly select the candidate package root.
|
|
960
|
+
Missing or mismatching runtime dependencies still fail closed with no target-repo
|
|
961
|
+
fallback. Project model, ownership and snapshot checks remain repository-local.
|
|
962
|
+
|
|
963
|
+
SessionStart also gives the Agent read-only model coverage guidance under this
|
|
964
|
+
global provider setting; no per-repo execution toggle is needed. It observes empty
|
|
965
|
+
capability models, missing declared module documents, and tracked package roots
|
|
966
|
+
with no capability match or a shared ancestor capability. These are bounded
|
|
967
|
+
inspection prompts, not inferred semantic nodes. The Agent uses the
|
|
968
|
+
`repo-harness-architecture` skill to inspect source evidence and decide boundaries
|
|
969
|
+
within the authorized task, then creates nodes through archctx ChangeSets and
|
|
970
|
+
runs the existing projection. An intentional umbrella is valid. Hooks do not
|
|
971
|
+
write model YAML, and unrelated coverage findings remain advice. The manifest
|
|
972
|
+
inventory is limited to Git-tracked `package.json` paths; this is not a complete
|
|
973
|
+
semantic coverage audit for every language or untracked source tree. Inspection
|
|
974
|
+
errors become SessionStart provider diagnostics instead of invented model facts.
|
|
957
975
|
|
|
958
976
|
When enabled, Stop observes the Git changed set and coalesces eligible paths
|
|
959
977
|
into one durable projection job, excludes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: repo-harness-architecture
|
|
3
|
-
description:
|
|
4
|
-
when_to_use: "repo-harness-architecture, architecture drift, architecture doc, architecture diagram, update architecture index, resolve architecture request"
|
|
3
|
+
description: Handles architecture coverage guidance, capability registration and drift requests through the existing model and projection authorities.
|
|
4
|
+
when_to_use: "repo-harness-architecture, architecture drift, architecture doc, architecture diagram, architecture model guidance, register capability, update architecture index, resolve architecture request"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# repo-harness-architecture
|
|
@@ -12,7 +12,7 @@ architecture documentation, drift-request, or diagram pass.
|
|
|
12
12
|
## Protocol
|
|
13
13
|
|
|
14
14
|
1. Confirm the target repo path and architecture scope.
|
|
15
|
-
2. Inspect `docs/architecture/index.md
|
|
15
|
+
2. Inspect `docs/architecture/index.md`, `.archcontext/model/nodes/`, and pending files under `docs/architecture/requests/`. For architecture model guidance or a registration scope, follow the coverage procedure below even when no drift request exists.
|
|
16
16
|
3. When the scope maps to repo code or config, resolve the capability with:
|
|
17
17
|
- `repo-harness run capability-resolver match --repo <repo> --path <path> --format json`
|
|
18
18
|
4. Update the smallest relevant architecture artifact:
|
|
@@ -28,9 +28,58 @@ architecture documentation, drift-request, or diagram pass.
|
|
|
28
28
|
- `repo-harness run capability-resolver validate --repo <repo> --format text`
|
|
29
29
|
- `repo-harness run check-task-workflow --strict` when repo workflow surfaces changed
|
|
30
30
|
|
|
31
|
+
## Coverage and Agent-owned registration
|
|
32
|
+
|
|
33
|
+
SessionStart automatically supplies read-only coverage observations when the global
|
|
34
|
+
architecture provider is enabled and the repo selects `capability_source: archcontext`.
|
|
35
|
+
An empty model, missing module docs, unmatched tracked package roots, or multiple
|
|
36
|
+
packages sharing an ancestor capability are reasons to inspect, not proof that a new
|
|
37
|
+
capability is required. Hooks do not decide responsibilities or write nodes.
|
|
38
|
+
|
|
39
|
+
1. Read the existing semantic architecture docs and trace the relevant entrypoints,
|
|
40
|
+
dependencies, ownership and verification in source. Use CodeGraph when indexed.
|
|
41
|
+
Compare `repo-harness run capability-resolver list --format json` and
|
|
42
|
+
`repo-harness run capability-resolver match --path <source-path> --format json`.
|
|
43
|
+
Package layout is inventory evidence; it does not establish semantic boundaries.
|
|
44
|
+
2. Give a concrete recommendation: retain an intentional umbrella, create a justified
|
|
45
|
+
capability, or restore a missing projection. Include source evidence, responsibility,
|
|
46
|
+
proposed prefixes, overlap with existing nodes, contract paths and verification.
|
|
47
|
+
Within already authorized architecture work, the Agent may decide and execute;
|
|
48
|
+
do not ask for the same approval again. During unrelated work, keep this as advice.
|
|
49
|
+
3. For a new capability, author a complete `archcontext.node/v2` body with an
|
|
50
|
+
`id` of `capability.<domain>.<name>`, `kind: capability`, `status: active`, `name`,
|
|
51
|
+
`summary`, `responsibilities`, `source.include`, and `extensions` containing
|
|
52
|
+
`contractFiles.agents`, `contractFiles.claude`, `lspProfile`, and `verification`.
|
|
53
|
+
Use the current model schema and source evidence; do not copy an example's semantics.
|
|
54
|
+
4. Resolve the owned archctx executable from
|
|
55
|
+
`repo-harness architecture-projection status --json` (`projectionProvider.binaryPath`).
|
|
56
|
+
Require ready status and use that binary with its supported Node runtime in the
|
|
57
|
+
target repo. Do not install a repo-local archctx or select an unrelated PATH copy.
|
|
58
|
+
The following `archctx` notation means that resolved executable:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
archctx plan --id <unique-changeset-id> --path .archcontext/model/nodes/capability.<domain>.<name>.yaml --expected-hash missing --body <complete-YAML-as-one-argument> --format json
|
|
62
|
+
archctx apply --id <same-changeset-id> --approved --expected-worktree-digest <data.draft.base.worktreeDigest-from-plan> --format json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Inspect the plan's full draft and preview before applying. Keep the same daemon
|
|
66
|
+
and ChangeSet ID; pass body via a structured process argument, not shell interpolation.
|
|
67
|
+
`--approved` records the authorized Agent decision; it does not grant extra scope.
|
|
68
|
+
If the worktree changed, re-plan and re-inspect. In archctx 0.5.10 this public `plan`
|
|
69
|
+
route creates one entity only. It is not an update route: when an existing node must
|
|
70
|
+
change, report the required update and use a supported typed ChangeSet authoring
|
|
71
|
+
surface if available; do not overwrite YAML or disguise an update as creation.
|
|
72
|
+
5. Run `archctx validate --format json`, verify source matching with capability-resolver,
|
|
73
|
+
then `repo-harness architecture-projection plan --json --changed-path <node-path>`
|
|
74
|
+
and `repo-harness architecture-projection apply --json --changed-path <node-path>`.
|
|
75
|
+
Verify the expected module document exists and run the protocol's architecture checks.
|
|
76
|
+
Missing docs for an unchanged node need projection, not a duplicate node. Generated
|
|
77
|
+
module regions belong to archctx; preserve human-owned prose. Resolve any resulting
|
|
78
|
+
drift request through the normal request protocol.
|
|
79
|
+
|
|
31
80
|
## Failure Modes
|
|
32
81
|
|
|
33
|
-
- If no pending architecture request exists, report `no-change`
|
|
82
|
+
- If no pending architecture request exists, do not invent one. Coverage and registration work can proceed independently; report `no-change` only after inspecting the requested coverage scope.
|
|
34
83
|
- If capability resolution is ambiguous, stop at the matching paths and ask for a narrower scope.
|
|
35
84
|
- If `check-architecture-sync.sh` blocks in strict mode, resolve or archive the pending request card for the touched capability before finishing the worktree.
|
|
36
85
|
- If diagram validation fails, fix the Mermaid Markdown source or report the validation failure; do not substitute HTML.
|
|
@@ -713,9 +713,7 @@ function renderRequiredFollowUp(event: ArchitectureEvent): string {
|
|
|
713
713
|
|
|
714
714
|
function renderRequestCard(event: ArchitectureEvent, events: ArchitectureEvent[], existingMetadata: Record<string, string>): string {
|
|
715
715
|
const firstDetected =
|
|
716
|
-
existingMetadata.Detected ||
|
|
717
|
-
events
|
|
718
|
-
.map((entry) => entry.ts || "")
|
|
716
|
+
[existingMetadata.Detected, ...events.map((entry) => entry.ts || "")]
|
|
719
717
|
.filter(Boolean)
|
|
720
718
|
.sort()[0] ||
|
|
721
719
|
event.ts ||
|
|
@@ -356,6 +356,11 @@ for file in "${changed_files[@]}"; do
|
|
|
356
356
|
done
|
|
357
357
|
if ! workflow_profile="$("${repo_harness_cli[@]}" state resolve --json --field workflow_profile --target-path "${profile_paths[@]}")"; then
|
|
358
358
|
echo "[task-sync] Workflow profile resolution failed; no lite exemption admitted." >&2
|
|
359
|
+
# Failed verification can itself block state resolution. Keep the failure,
|
|
360
|
+
# but expose the exact binding consumed above so recovery needs no cache reset
|
|
361
|
+
# or trust in a blocked resolver's profile field.
|
|
362
|
+
echo "[task-sync] To satisfy task-sync, record the current diff in a changed canonical workflow artifact with this exact line:" >&2
|
|
363
|
+
printf '> **Substantive Change SHA256**: `%s`\n' "$substantive_digest" >&2
|
|
359
364
|
exit 1
|
|
360
365
|
fi
|
|
361
366
|
case "$workflow_profile" in
|