repo-harness 0.1.1 → 0.1.3

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 (165) hide show
  1. package/AGENTS.md +18 -15
  2. package/CLAUDE.md +18 -15
  3. package/README.md +183 -32
  4. package/README.zh-CN.md +314 -0
  5. package/SKILL.md +41 -19
  6. package/agents/openai.yaml +1 -1
  7. package/assets/AGENTS.md +68 -0
  8. package/assets/CLAUDE.md +68 -0
  9. package/assets/hooks/AGENTS.md +26 -0
  10. package/assets/hooks/CLAUDE.md +26 -0
  11. package/assets/hooks/codex.hooks.template.json +9 -9
  12. package/assets/hooks/hook-input.sh +62 -4
  13. package/assets/hooks/lib/session-state.sh +38 -0
  14. package/assets/hooks/lib/workflow-state.sh +526 -11
  15. package/assets/hooks/post-bash.sh +176 -6
  16. package/assets/hooks/post-edit-guard.sh +33 -45
  17. package/assets/hooks/pre-edit-guard.sh +9 -5
  18. package/assets/hooks/prompt-guard.sh +878 -145
  19. package/assets/hooks/run-hook.sh +19 -0
  20. package/assets/hooks/session-start-context.sh +209 -11
  21. package/assets/hooks/trace-event.sh +22 -2
  22. package/assets/hooks/worktree-guard.sh +1 -1
  23. package/assets/initializer-question-pack.v4.json +207 -1
  24. package/assets/initializer-question-pack.v4.schema.json +40 -3
  25. package/assets/partials/04-project-structure.partial.md +12 -2
  26. package/assets/partials/05-workflow.partial.md +1 -1
  27. package/assets/partials/07-footer.partial.md +1 -1
  28. package/assets/partials-agents/02-operating-mode.partial.md +3 -3
  29. package/assets/partials-agents/04-task-protocol.partial.md +1 -1
  30. package/assets/partials-agents/08-deep-docs.partial.md +1 -1
  31. package/assets/plan-map.json +45 -1
  32. package/assets/project-structures/ai-native-product-copilot.txt +21 -0
  33. package/assets/project-structures/ai-native-runtime-console.txt +25 -0
  34. package/assets/project-structures/ai-native-sidecar-kernel.txt +19 -0
  35. package/assets/reference-configs/agentic-development-flow.md +21 -18
  36. package/assets/reference-configs/ai-workflows.md +1 -1
  37. package/assets/reference-configs/changelog-versioning.md +1 -1
  38. package/assets/reference-configs/coding-standards.md +1 -1
  39. package/assets/reference-configs/development-protocol.md +1 -1
  40. package/assets/reference-configs/document-generation.md +4 -2
  41. package/assets/reference-configs/evaluator-rubric.md +1 -1
  42. package/assets/reference-configs/external-tooling.md +53 -18
  43. package/assets/reference-configs/git-strategy.md +1 -1
  44. package/assets/reference-configs/handoff-protocol.md +6 -4
  45. package/assets/reference-configs/harness-overview.md +22 -15
  46. package/assets/reference-configs/hook-operations.md +12 -8
  47. package/assets/reference-configs/release-deploy.md +9 -1
  48. package/assets/reference-configs/spa-day-protocol.md +1 -1
  49. package/assets/reference-configs/sprint-contracts.md +2 -2
  50. package/assets/reference-configs/workflow-orchestration.md +1 -1
  51. package/assets/skill-commands/manifest.json +15 -15
  52. package/assets/skill-commands/{agentic-dev-architecture → repo-harness-architecture}/SKILL.md +8 -7
  53. package/assets/skill-commands/{agentic-dev-autoplan → repo-harness-autoplan}/SKILL.md +6 -6
  54. package/assets/skill-commands/{agentic-dev-capability → repo-harness-capability}/SKILL.md +5 -5
  55. package/assets/skill-commands/{agentic-dev-check → repo-harness-check}/SKILL.md +4 -4
  56. package/assets/skill-commands/{agentic-dev-deploy → repo-harness-deploy}/SKILL.md +5 -5
  57. package/assets/skill-commands/{agentic-dev-handoff → repo-harness-handoff}/SKILL.md +3 -3
  58. package/assets/skill-commands/{agentic-dev-init → repo-harness-init}/SKILL.md +7 -7
  59. package/assets/skill-commands/{agentic-dev-migrate → repo-harness-migrate}/SKILL.md +3 -3
  60. package/assets/skill-commands/{agentic-dev-plan → repo-harness-plan}/SKILL.md +5 -5
  61. package/assets/skill-commands/{agentic-dev-repair → repo-harness-repair}/SKILL.md +4 -4
  62. package/assets/skill-commands/{agentic-dev-review → repo-harness-review}/SKILL.md +4 -4
  63. package/assets/skill-commands/repo-harness-scaffold/SKILL.md +33 -0
  64. package/assets/skill-commands/{agentic-dev-upgrade → repo-harness-upgrade}/SKILL.md +4 -4
  65. package/assets/skill-version.json +7 -7
  66. package/assets/skills/claude-review/SKILL.md +114 -0
  67. package/assets/skills/codex-review/SKILL.md +96 -0
  68. package/assets/templates/contract.template.md +1 -1
  69. package/assets/templates/helpers/architecture-drift.sh +12 -3
  70. package/assets/templates/helpers/architecture-event.ts +5 -2
  71. package/assets/templates/helpers/archive-workflow.sh +4 -0
  72. package/assets/templates/helpers/capture-plan.sh +29 -1
  73. package/assets/templates/helpers/check-agent-tooling.sh +81 -28
  74. package/assets/templates/helpers/check-deploy-sql-order.sh +12 -0
  75. package/assets/templates/helpers/check-skill-version.ts +2 -2
  76. package/assets/templates/helpers/check-task-sync.sh +1 -1
  77. package/assets/templates/helpers/check-task-workflow.sh +12 -3
  78. package/assets/templates/helpers/context-contract-sync.sh +10 -4
  79. package/assets/templates/helpers/contract-worktree.sh +199 -7
  80. package/assets/templates/helpers/ensure-task-workflow.sh +61 -9
  81. package/assets/templates/helpers/migrate-project-template.sh +11 -11
  82. package/assets/templates/helpers/plan-to-todo.sh +20 -1
  83. package/assets/templates/helpers/prepare-codex-handoff.sh +8 -7
  84. package/assets/templates/helpers/refresh-current-status.sh +410 -0
  85. package/assets/templates/helpers/verify-contract.sh +13 -3
  86. package/assets/templates/helpers/verify-sprint.sh +25 -0
  87. package/assets/templates/helpers/workflow-contract.ts +8 -8
  88. package/assets/templates/helpers/workstream-sync.sh +1 -1
  89. package/assets/templates/review.template.md +12 -0
  90. package/assets/templates/tech-stack.template.md +14 -0
  91. package/assets/versions.json +1 -1
  92. package/assets/workflow-contract.v1.json +8 -4
  93. package/docs/reference-configs/agentic-development-flow.md +22 -18
  94. package/docs/reference-configs/ai-workflows.md +1 -1
  95. package/docs/reference-configs/changelog-versioning.md +1 -1
  96. package/docs/reference-configs/coding-standards.md +1 -1
  97. package/docs/reference-configs/development-protocol.md +1 -1
  98. package/docs/reference-configs/document-generation.md +4 -2
  99. package/docs/reference-configs/evaluator-rubric.md +1 -1
  100. package/docs/reference-configs/external-tooling.md +53 -18
  101. package/docs/reference-configs/git-strategy.md +1 -1
  102. package/docs/reference-configs/handoff-protocol.md +6 -4
  103. package/docs/reference-configs/harness-overview.md +22 -15
  104. package/docs/reference-configs/hook-operations.md +21 -8
  105. package/docs/reference-configs/release-deploy.md +9 -1
  106. package/docs/reference-configs/spa-day-protocol.md +1 -1
  107. package/docs/reference-configs/sprint-contracts.md +2 -2
  108. package/docs/reference-configs/workflow-orchestration.md +1 -1
  109. package/package.json +4 -2
  110. package/scripts/architecture-drift.sh +12 -3
  111. package/scripts/architecture-event.ts +5 -2
  112. package/scripts/archive-workflow.sh +4 -0
  113. package/scripts/assemble-template.ts +140 -0
  114. package/scripts/canary-global-hook.sh +5 -5
  115. package/scripts/capture-plan.sh +29 -1
  116. package/scripts/check-agent-tooling.sh +81 -28
  117. package/scripts/check-brain-manifest.sh +70 -127
  118. package/scripts/check-deploy-sql-order.sh +12 -0
  119. package/scripts/check-npm-release.sh +36 -0
  120. package/scripts/check-skill-version.ts +2 -2
  121. package/scripts/check-task-sync.sh +1 -1
  122. package/scripts/check-task-workflow.sh +12 -3
  123. package/scripts/context-contract-sync.sh +10 -4
  124. package/scripts/contract-worktree.sh +199 -7
  125. package/scripts/create-project-dirs.sh +20 -5
  126. package/scripts/ensure-task-workflow.sh +61 -9
  127. package/scripts/hook-shim.sh +7 -7
  128. package/scripts/init-project.sh +21 -3
  129. package/scripts/initializer-question-pack.ts +28 -0
  130. package/scripts/lib/project-init-lib.sh +117 -23
  131. package/scripts/migrate-project-template.sh +26 -80
  132. package/scripts/plan-to-todo.sh +20 -1
  133. package/scripts/prepare-codex-handoff.sh +8 -7
  134. package/scripts/refresh-current-status.sh +410 -0
  135. package/scripts/{agentic-dev.sh → repo-harness.sh} +38 -38
  136. package/scripts/run-skill-evals.ts +5 -5
  137. package/scripts/setup-plugins.sh +13 -13
  138. package/scripts/sync-brain-docs.sh +165 -83
  139. package/scripts/sync-codex-installed-copies.sh +5 -5
  140. package/scripts/verify-contract.sh +13 -3
  141. package/scripts/verify-sprint.sh +25 -0
  142. package/scripts/workflow-contract.ts +8 -8
  143. package/scripts/workstream-sync.sh +1 -1
  144. package/src/cli/commands/brain.ts +614 -0
  145. package/src/cli/commands/capability-context.ts +613 -0
  146. package/src/cli/commands/doctor.ts +92 -17
  147. package/src/cli/commands/hook.ts +12 -104
  148. package/src/cli/commands/init.ts +117 -4
  149. package/src/cli/commands/install.ts +1 -1
  150. package/src/cli/commands/migrate.ts +4 -4
  151. package/src/cli/commands/prompt-guard-decision.ts +88 -0
  152. package/src/cli/commands/status.ts +4 -4
  153. package/src/cli/commands/tools.ts +85 -1
  154. package/src/cli/hook/prompt-guard-decision.ts +238 -0
  155. package/src/cli/hook/route-registry.ts +2 -2
  156. package/src/cli/hook/runtime.ts +132 -0
  157. package/src/cli/hook-entry.ts +43 -0
  158. package/src/cli/index.ts +36 -6
  159. package/src/cli/installer/managed-entries.ts +11 -10
  160. package/src/cli/installer/targets/claude.ts +1 -1
  161. package/src/cli/installer/targets/codex.ts +1 -1
  162. package/src/cli/installer/targets/registry.ts +1 -1
  163. package/src/cli/installer/types.ts +1 -1
  164. package/src/cli/tools/codegraph.ts +501 -9
  165. package/assets/skill-commands/agentic-dev-scaffold/SKILL.md +0 -23
package/AGENTS.md CHANGED
@@ -1,12 +1,13 @@
1
- # agentic-dev AGENTS.md
1
+ # repo-harness AGENTS.md
2
2
 
3
- This repository self-hosts the `agentic-dev` contract, formerly `agentic-dev-skill` and `project-initializer`. Claude and Codex should follow the same repo-local workflow surface.
3
+ This repository self-hosts the `repo-harness` contract, formerly `repo-harness-skill` and `project-initializer`. Claude and Codex should follow the same repo-local workflow surface.
4
4
 
5
5
  ## Canonical Workflow Files
6
6
 
7
- - `tasks/todo.md` for the current execution checklist and verification notes
7
+ - `tasks/current.md` for the tracked current-status snapshot derived from workflow artifacts
8
+ - `tasks/todo.md` for deferred medium/long-term goals, not active execution checklists
8
9
  - `.ai/context/capabilities.json` for the capability registry and longest-prefix context boundaries
9
- - `tasks/workstreams/` for capability long-running workstreams that project the current slice into `tasks/todo.md`
10
+ - `tasks/workstreams/` for capability long-running workstreams that project durable progress into local contracts
10
11
  - `tasks/lessons.md` for correction-derived rules
11
12
  - `tasks/research.md` for deep repo knowledge
12
13
  - `tasks/notes/` for task-local implementation decisions, deviations, tradeoffs, and open questions
@@ -21,7 +22,7 @@ This repository self-hosts the `agentic-dev` contract, formerly `agentic-dev-ski
21
22
 
22
23
  - Sync `tasks/` whenever substantive repo changes are made.
23
24
  - Use `tasks/notes/<slug>.notes.md` only for non-obvious slice decisions, deviations, tradeoffs, and open questions; do not use notes as durable memory or a task log, and archive/promote them deliberately when the slice closes.
24
- - Treat `.ai/hooks/` as the shared hook implementation, `.claude/settings.json` as the Claude adapter, and `.codex/hooks.json` as the Codex adapter.
25
+ - Treat `.ai/hooks/` as the shared repo-local hook implementation; user-level `~/.claude/settings.json` and `~/.codex/hooks.json` are the host adapters.
25
26
  - Keep the umbrella hierarchy explicit: architecture owns stable truth, capability contracts own local agent context, `tasks/workstreams/<domain>/<capability>/` owns durable progress, and `tasks/todo.md` owns only deferred medium/long-term goals with tradeoff and revisit trigger.
26
27
  - Treat `.ai/context/capabilities.json` as the source of truth for capability prefixes; `agent-context-blocks.txt` and nested agent files are compatibility inputs only.
27
28
  - Keep architecture drift handling split: `architecture-drift.sh` writes architecture requests/events, `workstream-sync.sh` maintains durable capability workstreams, and `context-contract-sync.sh` only updates controlled local `CLAUDE.md`/`AGENTS.md` architecture blocks.
@@ -32,7 +33,7 @@ This repository self-hosts the `agentic-dev` contract, formerly `agentic-dev-ski
32
33
  - Treat `deploy/` as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files under `deploy/sql/`, and env examples.
33
34
  - Treat `_ops/` as ignored local operations state for secrets, real env files, provider state, artifacts, logs, and scratch files; do not commit or agent-edit `_ops/*`.
34
35
  - Treat contract-level task execution as worktree-first: `scripts/plan-to-todo.sh --plan <approved-plan>` starts `scripts/contract-worktree.sh start --plan <approved-plan>` when policy enables it, and completed blocks finish through Waza `/check` plus `scripts/contract-worktree.sh finish`.
35
- - After Codex Plan mode, Waza `/think`, or `agentic-dev-plan` produces a decision-complete plan, capture it with `scripts/capture-plan.sh --slug <slug> --title <title>` so `plans/` becomes the file-backed source of truth; if the user has already approved implementation, capture with `--status Approved --execute` or run `scripts/plan-to-todo.sh --plan <active-plan>`.
36
+ - After Codex Plan mode, Waza `/think`, or `repo-harness-plan` produces a decision-complete plan, capture it with `scripts/capture-plan.sh --slug <slug> --title <title>` so `plans/` becomes the file-backed source of truth; if the user has already approved implementation, capture with `--status Approved --execute` or run `scripts/plan-to-todo.sh --plan <active-plan>`.
36
37
  - If current repo state conflicts with the task, open an isolated `codex/<task-slug>` worktree, finish there, run Waza `/check`-style validation, then merge back to `main` without absorbing unrelated dirty changes.
37
38
  - Route product discovery to gstack `office-hours`, complex engineering plans to gstack `plan-eng-review`, design plans to gstack `plan-design-review`, and daily small/medium planning, bug hunts, and checks to Waza `/think`, `/hunt`, and `/check`.
38
39
  - Codex automation profile is runtime-referenced, not vendored: required skills are `health`, `check`, and `diagram-design` from `~/.codex/skills`.
@@ -41,7 +42,7 @@ This repository self-hosts the `agentic-dev` contract, formerly `agentic-dev-ski
41
42
  - Treat Waza as Codex-first: `~/.codex/skills` is the Codex runtime source; `~/.agents/skills` is skills CLI staging/cache only. Update by staging upstream Waza, copying the eight managed `SKILL.md` files into Codex, and verifying with `cmp`.
42
43
  - Use `docs/reference-configs/external-tooling.md` and `bash scripts/check-agent-tooling.sh --host both --check-updates` for environment checks; this self-host repo vendors CodeGraph as a dev dependency while generated downstream repos keep the global MCP default unless local policy opts in.
43
44
  - When changing `scripts/migrate-project-template.sh` or `scripts/lib/project-init-lib.sh`, verify self-migration of this repo still works.
44
- - Treat `.codex/hooks.json` as a product hook adapter; do not treat generated backup files or other `.codex/*` runtime residue as product deliverables.
45
+ - Treat repo-local `.claude/settings.json` and `.codex/hooks.json` hook adapters as retired legacy config; migration may back them up locally, but they are not product deliverables.
45
46
 
46
47
  ## Required Checks
47
48
 
@@ -57,26 +58,27 @@ bash scripts/migrate-project-template.sh --repo . --dry-run
57
58
  <!-- BEGIN ARCHITECTURE CONTRACT -->
58
59
  ## Architecture Contract
59
60
 
60
- - Functional block: `assets/hooks`
61
+ - Functional block: `.ai/hooks`
61
62
  - Capability ID: `runtime-harness-hook-adapters`
62
- - Matched prefix: `assets/hooks`
63
+ - Matched prefix: `.ai/hooks`
63
64
  - Architecture domain: `runtime-harness`
64
65
  - Architecture capability: `hook-adapters`
65
66
  - Architecture module: `docs/architecture/modules/runtime-harness/hook-adapters.md`
66
- - Last architecture event: 2026-05-28T15:48:16+0800
67
- - Last changed path: `assets/hooks/hook-input.sh`
67
+ - Last architecture event: 2026-05-29T09:44:46+0800
68
+ - Last changed path: `.ai/hooks/session-start-context.sh`
68
69
  - Severity: high
69
70
  - Change type: workflow-surface
70
71
  - Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
71
- - Entrypoints: `assets/hooks`
72
+ - Entrypoints: `.ai/hooks`
72
73
  - Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
73
74
  - Forbidden dependencies: Do not cross sibling app/service/package boundaries without an architecture snapshot or explicit plan.
74
- - Runtime path: `assets/hooks`
75
+ - Runtime path: `.ai/hooks`
75
76
  - LSP/tooling profile: `typescript-lsp`
76
77
  - Verification: Use root required checks plus local commands recorded in this capability contract.
77
78
  - Latest snapshot: `(none yet)`
78
- - Latest diagram: `(none yet)`
79
- - Pending architecture request: `docs/architecture/requests/20260528-154816-assets-hooks-assets-hooks-hook-input-sh.md`
79
+ - Semantic diagram source: `docs/architecture/modules/runtime-harness/hook-adapters.md`
80
+ - Latest human diagram: `(none yet)`
81
+ - Pending architecture request: `docs/architecture/requests/20260529-094446-ai-hooks-ai-hooks-session-start-context-sh.md`
80
82
 
81
83
  ## Active Workstreams
82
84
 
@@ -85,5 +87,6 @@ bash scripts/migrate-project-template.sh --repo . --dry-run
85
87
  ## Current Session Projection
86
88
 
87
89
  - Durable progress lives under `tasks/workstreams/runtime-harness/hook-adapters`.
90
+ - `tasks/current.md` is the tracked derived status snapshot; it is not a live lock or task source.
88
91
  - `tasks/todo.md` is the deferred-goal ledger; current execution slices stay in the active plan's `## Task Breakdown`.
89
92
  <!-- END ARCHITECTURE CONTRACT -->
package/CLAUDE.md CHANGED
@@ -1,12 +1,13 @@
1
- # agentic-dev AGENTS.md
1
+ # repo-harness AGENTS.md
2
2
 
3
- This repository self-hosts the `agentic-dev` contract, formerly `agentic-dev-skill` and `project-initializer`. Claude and Codex should follow the same repo-local workflow surface.
3
+ This repository self-hosts the `repo-harness` contract, formerly `repo-harness-skill` and `project-initializer`. Claude and Codex should follow the same repo-local workflow surface.
4
4
 
5
5
  ## Canonical Workflow Files
6
6
 
7
- - `tasks/todo.md` for the current execution checklist and verification notes
7
+ - `tasks/current.md` for the tracked current-status snapshot derived from workflow artifacts
8
+ - `tasks/todo.md` for deferred medium/long-term goals, not active execution checklists
8
9
  - `.ai/context/capabilities.json` for the capability registry and longest-prefix context boundaries
9
- - `tasks/workstreams/` for capability long-running workstreams that project the current slice into `tasks/todo.md`
10
+ - `tasks/workstreams/` for capability long-running workstreams that project durable progress into local contracts
10
11
  - `tasks/lessons.md` for correction-derived rules
11
12
  - `tasks/research.md` for deep repo knowledge
12
13
  - `tasks/notes/` for task-local implementation decisions, deviations, tradeoffs, and open questions
@@ -21,7 +22,7 @@ This repository self-hosts the `agentic-dev` contract, formerly `agentic-dev-ski
21
22
 
22
23
  - Sync `tasks/` whenever substantive repo changes are made.
23
24
  - Use `tasks/notes/<slug>.notes.md` only for non-obvious slice decisions, deviations, tradeoffs, and open questions; do not use notes as durable memory or a task log, and archive/promote them deliberately when the slice closes.
24
- - Treat `.ai/hooks/` as the shared hook implementation, `.claude/settings.json` as the Claude adapter, and `.codex/hooks.json` as the Codex adapter.
25
+ - Treat `.ai/hooks/` as the shared repo-local hook implementation; user-level `~/.claude/settings.json` and `~/.codex/hooks.json` are the host adapters.
25
26
  - Keep the umbrella hierarchy explicit: architecture owns stable truth, capability contracts own local agent context, `tasks/workstreams/<domain>/<capability>/` owns durable progress, and `tasks/todo.md` owns only deferred medium/long-term goals with tradeoff and revisit trigger.
26
27
  - Treat `.ai/context/capabilities.json` as the source of truth for capability prefixes; `agent-context-blocks.txt` and nested agent files are compatibility inputs only.
27
28
  - Keep architecture drift handling split: `architecture-drift.sh` writes architecture requests/events, `workstream-sync.sh` maintains durable capability workstreams, and `context-contract-sync.sh` only updates controlled local `CLAUDE.md`/`AGENTS.md` architecture blocks.
@@ -32,7 +33,7 @@ This repository self-hosts the `agentic-dev` contract, formerly `agentic-dev-ski
32
33
  - Treat `deploy/` as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files under `deploy/sql/`, and env examples.
33
34
  - Treat `_ops/` as ignored local operations state for secrets, real env files, provider state, artifacts, logs, and scratch files; do not commit or agent-edit `_ops/*`.
34
35
  - Treat contract-level task execution as worktree-first: `scripts/plan-to-todo.sh --plan <approved-plan>` starts `scripts/contract-worktree.sh start --plan <approved-plan>` when policy enables it, and completed blocks finish through Waza `/check` plus `scripts/contract-worktree.sh finish`.
35
- - After Codex Plan mode, Waza `/think`, or `agentic-dev-plan` produces a decision-complete plan, capture it with `scripts/capture-plan.sh --slug <slug> --title <title>` so `plans/` becomes the file-backed source of truth; if the user has already approved implementation, capture with `--status Approved --execute` or run `scripts/plan-to-todo.sh --plan <active-plan>`.
36
+ - After Codex Plan mode, Waza `/think`, or `repo-harness-plan` produces a decision-complete plan, capture it with `scripts/capture-plan.sh --slug <slug> --title <title>` so `plans/` becomes the file-backed source of truth; if the user has already approved implementation, capture with `--status Approved --execute` or run `scripts/plan-to-todo.sh --plan <active-plan>`.
36
37
  - If current repo state conflicts with the task, open an isolated `codex/<task-slug>` worktree, finish there, run Waza `/check`-style validation, then merge back to `main` without absorbing unrelated dirty changes.
37
38
  - Route product discovery to gstack `office-hours`, complex engineering plans to gstack `plan-eng-review`, design plans to gstack `plan-design-review`, and daily small/medium planning, bug hunts, and checks to Waza `/think`, `/hunt`, and `/check`.
38
39
  - Codex automation profile is runtime-referenced, not vendored: required skills are `health`, `check`, and `diagram-design` from `~/.codex/skills`.
@@ -41,7 +42,7 @@ This repository self-hosts the `agentic-dev` contract, formerly `agentic-dev-ski
41
42
  - Treat Waza as Codex-first: `~/.codex/skills` is the Codex runtime source; `~/.agents/skills` is skills CLI staging/cache only. Update by staging upstream Waza, copying the eight managed `SKILL.md` files into Codex, and verifying with `cmp`.
42
43
  - Use `docs/reference-configs/external-tooling.md` and `bash scripts/check-agent-tooling.sh --host both --check-updates` for environment checks; this self-host repo vendors CodeGraph as a dev dependency while generated downstream repos keep the global MCP default unless local policy opts in.
43
44
  - When changing `scripts/migrate-project-template.sh` or `scripts/lib/project-init-lib.sh`, verify self-migration of this repo still works.
44
- - Treat `.codex/hooks.json` as a product hook adapter; do not treat generated backup files or other `.codex/*` runtime residue as product deliverables.
45
+ - Treat repo-local `.claude/settings.json` and `.codex/hooks.json` hook adapters as retired legacy config; migration may back them up locally, but they are not product deliverables.
45
46
 
46
47
  ## Required Checks
47
48
 
@@ -57,26 +58,27 @@ bash scripts/migrate-project-template.sh --repo . --dry-run
57
58
  <!-- BEGIN ARCHITECTURE CONTRACT -->
58
59
  ## Architecture Contract
59
60
 
60
- - Functional block: `assets/hooks`
61
+ - Functional block: `.ai/hooks`
61
62
  - Capability ID: `runtime-harness-hook-adapters`
62
- - Matched prefix: `assets/hooks`
63
+ - Matched prefix: `.ai/hooks`
63
64
  - Architecture domain: `runtime-harness`
64
65
  - Architecture capability: `hook-adapters`
65
66
  - Architecture module: `docs/architecture/modules/runtime-harness/hook-adapters.md`
66
- - Last architecture event: 2026-05-28T15:48:16+0800
67
- - Last changed path: `assets/hooks/hook-input.sh`
67
+ - Last architecture event: 2026-05-29T09:44:46+0800
68
+ - Last changed path: `.ai/hooks/session-start-context.sh`
68
69
  - Severity: high
69
70
  - Change type: workflow-surface
70
71
  - Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
71
- - Entrypoints: `assets/hooks`
72
+ - Entrypoints: `.ai/hooks`
72
73
  - Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
73
74
  - Forbidden dependencies: Do not cross sibling app/service/package boundaries without an architecture snapshot or explicit plan.
74
- - Runtime path: `assets/hooks`
75
+ - Runtime path: `.ai/hooks`
75
76
  - LSP/tooling profile: `typescript-lsp`
76
77
  - Verification: Use root required checks plus local commands recorded in this capability contract.
77
78
  - Latest snapshot: `(none yet)`
78
- - Latest diagram: `(none yet)`
79
- - Pending architecture request: `docs/architecture/requests/20260528-154816-assets-hooks-assets-hooks-hook-input-sh.md`
79
+ - Semantic diagram source: `docs/architecture/modules/runtime-harness/hook-adapters.md`
80
+ - Latest human diagram: `(none yet)`
81
+ - Pending architecture request: `docs/architecture/requests/20260529-094446-ai-hooks-ai-hooks-session-start-context-sh.md`
80
82
 
81
83
  ## Active Workstreams
82
84
 
@@ -85,5 +87,6 @@ bash scripts/migrate-project-template.sh --repo . --dry-run
85
87
  ## Current Session Projection
86
88
 
87
89
  - Durable progress lives under `tasks/workstreams/runtime-harness/hook-adapters`.
90
+ - `tasks/current.md` is the tracked derived status snapshot; it is not a live lock or task source.
88
91
  - `tasks/todo.md` is the deferred-goal ledger; current execution slices stay in the active plan's `## Task Breakdown`.
89
92
  <!-- END ARCHITECTURE CONTRACT -->
package/README.md CHANGED
@@ -1,16 +1,114 @@
1
1
  # repo-harness
2
2
 
3
3
  Repo-local agentic development harness CLI and skill runtime for Claude/Codex
4
- workflows. Formerly `agentic-dev-skill` and `project-initializer`;
5
- `agentic-dev-skill` remains a compatibility alias, while `project-initializer`
4
+ workflows. The npm package and primary command are now `repo-harness`.
5
+ `repo-harness-skill` remains a compatibility alias, while `project-initializer`
6
6
  install paths are retired and removed by installed-copy sync.
7
7
  Repository: `https://github.com/Ancienttwo/repo-harness`
8
8
 
9
+ [English](README.md) | [简体中文](README.zh-CN.md)
10
+
9
11
  This repository now dogfoods its own tasks-first contract. It is both:
10
12
 
11
- - the source repo for the `repo-harness` CLI and `agentic-dev` skill runtime
13
+ - the source repo for the `repo-harness` CLI and `repo-harness` skill runtime
12
14
  - a self-hosted example of the repo-local workflow it generates for other projects
13
15
 
16
+ ## What repo-harness Does
17
+
18
+ `repo-harness` turns AI-assisted development from chat-memory coordination into
19
+ repo-local workflow state. It installs a small, file-backed contract into a
20
+ target repository so Claude, Codex, and humans can agree on:
21
+
22
+ - what product intent is stable
23
+ - which plan is approved for execution
24
+ - what the current sprint contract allows
25
+ - which checks and review evidence prove the work is done
26
+ - how hooks should warn, block, trace, and hand off work across sessions
27
+
28
+ It is not an agent gateway, product runtime, database service, or MCP server.
29
+ The product boundary is deliberately boring: inspect a repo, install or refresh
30
+ workflow files, route host events through repo-local hooks, and verify that the
31
+ workflow surfaces stay consistent.
32
+
33
+ ## How It Works
34
+
35
+ The design has three layers:
36
+
37
+ 1. **Source package**: this repository owns the CLI, command skill facades,
38
+ templates, hook assets, workflow contract, tests, and release gate.
39
+ 2. **Target repo contract**: `repo-harness init` or migration writes repo-local
40
+ files such as `docs/spec.md`, `plans/`, `tasks/`, `.ai/context/`,
41
+ `.ai/harness/`, helper scripts, and `.ai/hooks/`.
42
+ 3. **Host adapters**: user-level `~/.claude/settings.json` and
43
+ `~/.codex/hooks.json` route Claude/Codex events into `repo-harness-hook`.
44
+ The hook entrypoint exits silently for non-opt-in repos and dispatches into
45
+ the current repo's `.ai/hooks/*` scripts only when
46
+ `.ai/harness/workflow-contract.json` exists.
47
+
48
+ For `UserPromptSubmit`, the public adapter contract stays
49
+ `repo-harness-hook UserPromptSubmit --route default`. The CLI route registry
50
+ dispatches that route to `.ai/hooks/prompt-guard.sh`. The shell hook remains the
51
+ repo-local adapter for host JSON parsing, workflow file reads, capture side
52
+ effects, quality gate rendering, and host-safe stdout/stderr. The prompt intent
53
+ and workflow-state decision is handled by the TypeScript decision engine behind
54
+ `repo-harness-hook prompt-guard-decide`, which returns one action enum from an
55
+ explicit decision table. That split keeps host configuration stable while moving
56
+ the brittle classifier/state-machine layer out of shell conditionals.
57
+
58
+ The core invariant is that durable truth lives in the repo, not in a chat
59
+ thread. Hooks are accelerators and guardrails; the authority remains the
60
+ file-backed plan, contract, review, checks, and handoff artifacts.
61
+
62
+ ## Task Workflow: Plan to Closeout
63
+
64
+ The diagram below assumes the harness is already installed in the repo. It shows
65
+ the normal task lifecycle: plan, project into a sprint contract, check out the
66
+ contract worktree when policy requires it, implement under hooks, verify, review,
67
+ and close out.
68
+
69
+ ```mermaid
70
+ flowchart TD
71
+ UserTask["User task or planning prompt"] --> Discovery["Due diligence<br/>P1 map, P2 trace, P3 decision"]
72
+ Discovery --> PlanDraft["Draft plan<br/>plans/plan-*.md"]
73
+ PlanDraft --> PlanReview{"Plan ready for execution?"}
74
+ PlanReview -->|no| Refine["Refine plan, scope, evidence contract"]
75
+ Refine --> PlanDraft
76
+ PlanReview -->|yes| Approve["Approved plan<br/>Status: Approved"]
77
+
78
+ Approve --> Project["Project plan into execution<br/>capture-plan.sh --execute<br/>or plan-to-todo.sh --plan"]
79
+ Project --> Active["Active markers<br/>.ai/harness/active-plan<br/>.ai/harness/active-worktree"]
80
+ Project --> Contract["Sprint contract<br/>tasks/contracts/task-slug.contract.md"]
81
+ Project --> ReviewFile["Review file<br/>tasks/reviews/task-slug.review.md"]
82
+ Project --> Notes["Task notes<br/>tasks/notes/task-slug.notes.md"]
83
+
84
+ Contract --> WorktreePolicy{"Contract worktree required?"}
85
+ WorktreePolicy -->|yes| Checkout["Checkout isolated worktree<br/>contract-worktree.sh start --plan<br/>branch codex/task-slug"]
86
+ WorktreePolicy -->|no| CurrentTree["Use current worktree<br/>small or explicitly allowed slice"]
87
+ Checkout --> Implement
88
+ CurrentTree --> Implement
89
+
90
+ Implement["Edit and run commands"] --> PreHooks["Pre-edit guards<br/>PlanStatusGuard, ContractScopeGuard, WorktreeGuard"]
91
+ PreHooks -->|blocked| ScopeFix["Fix plan, contract, worktree, or scope"]
92
+ ScopeFix --> Implement
93
+ PreHooks -->|allowed| Changes["Code, docs, tests, or config changes"]
94
+ Changes --> PostHooks["Post-edit and post-bash hooks<br/>trace, drift request, handoff, check evidence"]
95
+ PostHooks --> Verify["Run verification<br/>tests plus repo workflow checks"]
96
+
97
+ Verify --> Checks["Structured evidence<br/>.ai/harness/checks/latest.json<br/>.ai/harness/runs/*.json"]
98
+ Checks --> CheckReview["Evaluator review<br/>Waza /check -> review file"]
99
+ CheckReview --> External["External acceptance advice<br/>or explicit manual override"]
100
+ External --> DoneGate{"Contract, checks, review, and acceptance pass?"}
101
+ DoneGate -->|no| Repair["Repair failing evidence or implementation"]
102
+ Repair --> Implement
103
+ DoneGate -->|yes| Closeout["Closeout<br/>scripts/contract-worktree.sh finish"]
104
+
105
+ Closeout --> Commit["Commit contract branch"]
106
+ Commit --> Merge["Fast-forward target branch"]
107
+ Merge --> Archive["Archive plan/todo and refresh handoff"]
108
+ Archive --> Cleanup["Cleanup merged worktree<br/>contract-worktree.sh cleanup"]
109
+ Cleanup --> Done["Reviewable completed task"]
110
+ ```
111
+
14
112
  ## First 5 Minutes
15
113
 
16
114
  This is the fastest path for an AI tooling owner evaluating whether the workflow is
@@ -22,9 +120,13 @@ safe to adopt in a real repo.
22
120
  npx -y repo-harness init
23
121
  ```
24
122
 
25
- The npm package name and primary installed command are `repo-harness`.
26
- `agentic-dev` remains a compatibility command alias. When working from a source
27
- checkout instead of npm, run:
123
+ The npm package release line is `0.1.x`; generated workflow compatibility is
124
+ tracked separately as the `5.x` model line. The `0.1.3` package publishes the
125
+ renamed `repo-harness` CLI, user-level Claude/Codex hook adapter bootstrap,
126
+ AI-native scaffold overlays, the typed prompt-guard decision engine, Waza
127
+ runtime skill sync, `diagram-design` sync, and the release gate used by
128
+ maintainers before npm publish. When working from a source checkout instead of
129
+ npm, run:
28
130
 
29
131
  ```bash
30
132
  git clone https://github.com/Ancienttwo/repo-harness.git ~/Projects/repo-harness
@@ -35,13 +137,13 @@ bun src/cli/index.ts init
35
137
  Local path model:
36
138
 
37
139
  - Source repo: `~/Projects/repo-harness`
38
- - Claude skill aliases: `~/.claude/skills/agentic-dev`, `~/.claude/skills/agentic-dev-skill`
39
- - Codex discoverable skill alias: `~/.codex/skills/agentic-dev`
40
- - Codex compatibility fallback alias: `~/.codex/skills/agentic-dev-skill`
140
+ - Claude skill aliases: `~/.claude/skills/repo-harness`, `~/.claude/skills/repo-harness-skill`
141
+ - Codex discoverable skill alias: `~/.codex/skills/repo-harness`
142
+ - Codex compatibility fallback alias: `~/.codex/skills/repo-harness-skill`
41
143
 
42
144
  The `~/Projects/repo-harness` repo is the only editable source of truth. Local
43
145
  Claude/Codex paths are symlink-backed runtime entrypoints. Only
44
- `~/.codex/skills/agentic-dev` should expose `SKILL.md` and
146
+ `~/.codex/skills/repo-harness` should expose `SKILL.md` and
45
147
  `assets/skill-commands/`; compatibility directories exist only so renamed
46
148
  repos can still resolve upstream assets without duplicate command discovery.
47
149
  The retired `project-initializer` directories under `~/.codex/skills` and
@@ -68,8 +170,8 @@ Apply only after the dry-run report looks correct:
68
170
  npx -y repo-harness init
69
171
  ```
70
172
 
71
- For a new project or module, use the `agentic-dev-scaffold` command skill. For
72
- an existing repo, use `agentic-dev-init`; it installs or refreshes the harness
173
+ For a new project or module, use the `repo-harness-scaffold` command skill. For
174
+ an existing repo, use `repo-harness-init`; it installs or refreshes the harness
73
175
  without creating an application stack.
74
176
 
75
177
  ### Success looks like this
@@ -77,9 +179,8 @@ without creating an application stack.
77
179
  The command should end with `=== Migration Report ===` and summarize:
78
180
 
79
181
  - `Project hooks synced from:` to show where generated hook behavior comes from
80
- - `Claude hook config target: .claude/settings.json` to show the Claude adapter entry
81
- - `Codex hook config target: .codex/hooks.json` to show the Codex adapter entry
82
- - `Codex hook trust required:` to remind the user to trust the repo hook in Codex Settings
182
+ - `Host hook config target: user-level ~/.claude/settings.json and ~/.codex/hooks.json` to show the adapter layer
183
+ - `Host hook adapters are user-level:` to remind the user to install global adapters and trust `~/.codex/hooks.json`
83
184
  - `Workflow migration:` to show the repo-local harness surfaces it will create or refresh
84
185
  - `Helper scripts:` to show the operational toolchain you get after apply
85
186
  - `--- External Tooling ---` to show default gstack/Waza/gbrain routing plus advisory install/update hints
@@ -98,10 +199,28 @@ before applying anything.
98
199
  ## Hook Authority Map
99
200
 
100
201
  - `.ai/hooks/` is the only shared hook implementation you should edit first.
101
- - `.claude/settings.json` is the Claude adapter that dispatches into `.ai/hooks/run-hook.sh`.
102
- - `.codex/hooks.json` is the Codex adapter that dispatches into the same runner.
103
- - Codex must mark this repo hook as trusted in Codex Settings before those hooks run.
104
- - Debug in this order: adapter config -> `run-hook.sh` -> `.ai/hooks/*`.
202
+ - `~/.claude/settings.json` is the user-level Claude adapter that dispatches into opted-in repos.
203
+ - `~/.codex/hooks.json` is the user-level Codex adapter that dispatches into the same runner.
204
+ - Repo-local `.claude/settings.json` and `.codex/hooks.json` hook adapters are legacy project-level config and should be retired during migration.
205
+ - Codex must mark `~/.codex/hooks.json` as trusted in Codex Settings before those hooks run.
206
+ - Debug in this order: user-level adapter config -> `repo-harness-hook` (or fallback `repo-harness hook`) -> route registry -> `.ai/hooks/*`.
207
+
208
+ Prompt guard has one extra internal step:
209
+
210
+ ```mermaid
211
+ flowchart LR
212
+ Host["Claude/Codex UserPromptSubmit"] --> Adapter["user-level adapter"]
213
+ Adapter --> CLI["repo-harness-hook UserPromptSubmit --route default"]
214
+ CLI --> Route["route registry"]
215
+ Route --> Shell[".ai/hooks/prompt-guard.sh"]
216
+ Shell --> Decision["repo-harness-hook prompt-guard-decide<br/>TypeScript decision table"]
217
+ Decision --> Action["single action enum"]
218
+ Action --> Shell
219
+ Shell --> HostOutput["host-safe allow, advice, block, or done gate output"]
220
+ ```
221
+
222
+ The shell layer still owns filesystem authority and side effects. TypeScript owns
223
+ only the classifier plus `intent x plan state` decision table.
105
224
 
106
225
  ## Hook Failure Playbook
107
226
 
@@ -123,13 +242,19 @@ Most common guards:
123
242
 
124
243
  - Root routing docs: `CLAUDE.md`, `AGENTS.md`
125
244
  - Shared hook layer: `.ai/hooks/`
126
- - Claude adapter layer: `.claude/settings.json`
127
- - Codex adapter layer: `.codex/hooks.json`
245
+ - User-level adapter layer: `~/.claude/settings.json`, `~/.codex/hooks.json`
128
246
  - Active execution surface: `tasks/`
129
247
  - Plan source of truth: `plans/`
130
248
  - Durable progress: `tasks/workstreams/`
131
249
  - Release history: `docs/CHANGELOG.md`
132
250
 
251
+ ## Current Release
252
+
253
+ - npm package: `repo-harness@0.1.3`
254
+ - Generated workflow compatibility: `5.2.3`
255
+ - GitHub repository: `Ancienttwo/repo-harness`
256
+ - Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
257
+
133
258
  ## Current Model (5.2.3)
134
259
 
135
260
  - Question flow uses **12 grouped decision points** with harness defaults inferred first.
@@ -156,9 +281,9 @@ Most common guards:
156
281
  - `complex -> gstack`
157
282
  - `simple -> Waza` with Codex-first runtime copies in `~/.codex/skills`
158
283
  - `knowledge -> gbrain`
159
- - `agentic-dev init` bootstraps the Codex/Claude runtime pieces needed for the
284
+ - `repo-harness init` bootstraps the Codex/Claude runtime pieces needed for the
160
285
  default workflow:
161
- - refreshes `agentic-dev` skill aliases
286
+ - refreshes `repo-harness` skill aliases
162
287
  - installs global Codex/Claude hook adapters
163
288
  - installs Waza skills (`check`, `design`, `health`, `hunt`, `learn`, `read`, `think`, `write`) through the skills CLI
164
289
  - syncs `diagram-design` into Codex/Claude skill roots when a source copy exists
@@ -173,33 +298,59 @@ Most common guards:
173
298
  - durable capability progress -> `tasks/workstreams/`
174
299
  - release history -> `docs/CHANGELOG.md`
175
300
 
301
+ ## Acknowledgements and Tooling Dependencies
302
+
303
+ `repo-harness` is built around a small set of external skills and repos that
304
+ proved useful while this project was being designed, debugged, and released.
305
+ They are acknowledged here because they shaped the workflow contract, but they
306
+ are not all bundled product dependencies.
307
+
308
+ | Tool or repo | Used for | Dependency shape |
309
+ | --- | --- | --- |
310
+ | gstack skills, including `document-release`, `office-hours`, `plan-eng-review`, and `plan-design-review` | Product discovery, plan review, design review, and post-ship documentation hygiene | External operator workflow; advisory by default |
311
+ | Waza skills, including `think`, `hunt`, `check`, `health`, `design`, `learn`, `read`, and `write` | Daily planning, bug hunts, verification, health checks, and Codex-first skill sync | Installed through the skills CLI into host skill roots |
312
+ | `diagram-design` | Human-readable architecture and system-flow diagrams when Mermaid is not enough | Runtime-referenced skill, not vendored into generated repos |
313
+ | `gbrain` | Knowledge sync, handoff retrieval, and long-form repo memory | Optional external CLI and index |
314
+ | CodeGraph (`@colbymchenry/codegraph`) | Symbol-aware navigation, impact tracing, and readiness checks for this self-host repo | Dev dependency in this repo; generated repos stay global-MCP-first unless policy opts in |
315
+ | Bun | Source checkout execution, tests, template assembly, and release checks | Required local runtime for maintainers |
316
+ | `commander` | `repo-harness` CLI command parsing | Runtime npm dependency |
317
+
176
318
  ## Action Command Skills
177
319
 
178
320
  Source-owned command skill facades live in `assets/skill-commands/`. They keep
179
321
  the public surface action-style while sharing the same router, contract, scripts,
180
322
  and tests:
181
323
 
182
- - Planning and review: `agentic-dev-plan`, `agentic-dev-review`, `agentic-dev-autoplan`
183
- - Repo workflow actions: `agentic-dev-init`, `agentic-dev-migrate`, `agentic-dev-upgrade`, `agentic-dev-capability`, `agentic-dev-architecture`, `agentic-dev-handoff`, `agentic-dev-deploy`, `agentic-dev-repair`, `agentic-dev-check`
184
- - Project creation: `agentic-dev-scaffold`
324
+ - Planning and review: `repo-harness-plan`, `repo-harness-review`, `repo-harness-autoplan`
325
+ - Repo workflow actions: `repo-harness-init`, `repo-harness-migrate`, `repo-harness-upgrade`, `repo-harness-capability`, `repo-harness-architecture`, `repo-harness-handoff`, `repo-harness-deploy`, `repo-harness-repair`, `repo-harness-check`
326
+ - Project creation: `repo-harness-scaffold`
185
327
 
186
- `agentic-dev-init` is for an existing repo; `agentic-dev-scaffold` creates a new
328
+ `repo-harness-init` is for an existing repo; `repo-harness-scaffold` creates a new
187
329
  project or module scaffold. `hooks-init`, `docs-init`, and `create-project-dirs`
188
330
  are internal steps, not public commands.
189
331
 
190
- Use `agentic-dev-capability` when the harness already exists and only selected
332
+ `repo-harness-scaffold` keeps the A-K plan catalog as the project-type authority
333
+ and adds AI-native app structure through an optional `ai_native_profile` overlay.
334
+ The default profile is `none`, so existing scaffold output remains unchanged.
335
+ When selected, profiles such as `runtime-console`, `product-copilot`, and
336
+ `sidecar-kernel` document the AG-UI event boundary, assistant-ui or CopilotKit
337
+ UI runtime, Bun/Hono gateway, shared contracts, observability, and MCP/HTTP
338
+ sidecar rules without installing model providers or making Python, Go, Rust, or
339
+ A2UI mandatory defaults.
340
+
341
+ Use `repo-harness-capability` when the harness already exists and only selected
191
342
  capability boundaries should be added. It updates `.ai/context/capabilities.json`,
192
343
  syncs the requested local `AGENTS.md` / `CLAUDE.md` contract files, and validates
193
344
  the registry without running a full init, migrate, or upgrade pass.
194
345
 
195
- Use `agentic-dev-architecture`, `agentic-dev-handoff`, and `agentic-dev-deploy`
346
+ Use `repo-harness-architecture`, `repo-harness-handoff`, and `repo-harness-deploy`
196
347
  for focused architecture documentation, rollover, and deploy/ops readiness
197
348
  passes. These commands call existing repo-local helpers and keep their scope
198
349
  narrow instead of refreshing the full harness.
199
350
 
200
- Codex installed-copy rule: only `~/.codex/skills/agentic-dev` exposes the root
201
- skill and `agentic-dev-*` command facades. The compatibility directory
202
- `~/.codex/skills/agentic-dev-skill` is a runtime fallback bundle only; it must
351
+ Codex installed-copy rule: only `~/.codex/skills/repo-harness` exposes the root
352
+ skill and `repo-harness-*` command facades. The compatibility directory
353
+ `~/.codex/skills/repo-harness-skill` is a runtime fallback bundle only; it must
203
354
  not contain `SKILL.md` files or `assets/skill-commands/`. The retired
204
355
  `~/.codex/skills/project-initializer` and `~/.claude/skills/project-initializer`
205
356
  directories are removed during sync.