You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: assets/skill-commands/repo-harness-architecture/SKILL.md
+53-4Lines changed: 53 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
name: repo-harness-architecture
3
-
description: Resolves repo-harness architecture drift requests and updates architecture docs or diagrams without running full init, migrate, or upgrade.
@@ -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`and pending files under `docs/architecture/requests/`.
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:
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`and do not invent one.
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.
0 commit comments