devrites 4.0.12 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +3 -3
  3. package/docs/architecture.md +4 -4
  4. package/docs/command-map.md +4 -3
  5. package/docs/flow.md +2 -1
  6. package/docs/orchestration.md +45 -4
  7. package/docs/skills.md +4 -3
  8. package/engine/internal/devritespaths/paths.go +5 -4
  9. package/engine/internal/hostpack/hostpack.go +9 -4
  10. package/engine/internal/hostpack/hostpack_test.go +16 -7
  11. package/engine/internal/install/install_test.go +5 -0
  12. package/pack/.claude/agents/devrites-code-reviewer.md +6 -1
  13. package/pack/.claude/agents/devrites-plan-drafter.md +5 -0
  14. package/pack/.claude/agents/devrites-plan-reviewer.md +6 -0
  15. package/pack/.claude/agents/devrites-proof-runner.md +7 -1
  16. package/pack/.claude/agents/devrites-retrospector.md +21 -25
  17. package/pack/.claude/agents/devrites-security-auditor.md +7 -3
  18. package/pack/.claude/agents/devrites-slice-wright.md +30 -4
  19. package/pack/.claude/agents/devrites-spec-reviewer.md +5 -0
  20. package/pack/.claude/agents/devrites-strategy-reviewer.md +3 -4
  21. package/pack/.claude/agents/devrites-test-analyst.md +5 -0
  22. package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +12 -16
  23. package/pack/.claude/skills/devrites-debug-recovery/reference/build-the-loop.md +11 -14
  24. package/pack/.claude/skills/devrites-doubt/SKILL.md +3 -4
  25. package/pack/.claude/skills/devrites-frontend-craft/reference/reuse-first.md +3 -4
  26. package/pack/.claude/skills/devrites-lib/reference/standards/README.md +5 -1
  27. package/pack/.claude/skills/devrites-lib/reference/standards/afk-hitl.md +33 -8
  28. package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +11 -3
  29. package/pack/.claude/skills/devrites-lib/reference/standards/ci-cd.md +19 -0
  30. package/pack/.claude/skills/devrites-lib/reference/standards/code-review.md +1 -1
  31. package/pack/.claude/skills/devrites-lib/reference/standards/core.md +5 -0
  32. package/pack/.claude/skills/devrites-lib/reference/standards/data-integrity.md +95 -0
  33. package/pack/.claude/skills/devrites-lib/reference/standards/developer-experience.md +5 -5
  34. package/pack/.claude/skills/devrites-lib/reference/standards/documentation.md +28 -29
  35. package/pack/.claude/skills/devrites-lib/reference/standards/edge-case-trace.md +70 -10
  36. package/pack/.claude/skills/devrites-lib/reference/standards/integration-reliability.md +79 -0
  37. package/pack/.claude/skills/devrites-lib/reference/standards/loop-operations.md +85 -0
  38. package/pack/.claude/skills/devrites-lib/reference/standards/observability.md +10 -0
  39. package/pack/.claude/skills/devrites-lib/reference/standards/patterns.md +20 -0
  40. package/pack/.claude/skills/devrites-lib/reference/standards/repository-topology.md +73 -0
  41. package/pack/.claude/skills/devrites-lib/reference/standards/security-checklist.md +6 -2
  42. package/pack/.claude/skills/devrites-lib/reference/standards/security.md +51 -16
  43. package/pack/.claude/skills/devrites-lib/reference/standards/skill-authoring.md +35 -40
  44. package/pack/.claude/skills/devrites-lib/reference/standards/test-proof-checklist.md +4 -0
  45. package/pack/.claude/skills/devrites-lib/reference/standards/testing.md +51 -6
  46. package/pack/.claude/skills/rite/SKILL.md +2 -0
  47. package/pack/.claude/skills/rite-adopt/SKILL.md +8 -10
  48. package/pack/.claude/skills/rite-adopt/reference/adoption.md +13 -15
  49. package/pack/.claude/skills/rite-autocomplete/SKILL.md +18 -11
  50. package/pack/.claude/skills/rite-autocomplete/reference/loop.md +29 -6
  51. package/pack/.claude/skills/rite-autocomplete/reference/stop-conditions.md +7 -0
  52. package/pack/.claude/skills/rite-build/SKILL.md +7 -1
  53. package/pack/.claude/skills/rite-build/reference/phase-contract.md +6 -1
  54. package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +37 -4
  55. package/pack/.claude/skills/rite-clarify/SKILL.md +3 -2
  56. package/pack/.claude/skills/rite-converge/SKILL.md +4 -2
  57. package/pack/.claude/skills/rite-converge/reference/convergence-assessment.md +8 -4
  58. package/pack/.claude/skills/rite-customize/SKILL.md +16 -18
  59. package/pack/.claude/skills/rite-define/SKILL.md +60 -62
  60. package/pack/.claude/skills/rite-define/reference/plan-template.md +88 -71
  61. package/pack/.claude/skills/rite-explain/SKILL.md +2 -1
  62. package/pack/.claude/skills/rite-learn/SKILL.md +28 -32
  63. package/pack/.claude/skills/rite-plan/SKILL.md +42 -45
  64. package/pack/.claude/skills/rite-plan/reference/dependency-graph.md +11 -2
  65. package/pack/.claude/skills/rite-plan/reference/task-breakdown.md +2 -0
  66. package/pack/.claude/skills/rite-polish/reference/adr-promotion.md +7 -7
  67. package/pack/.claude/skills/rite-pressure-test/SKILL.md +24 -31
  68. package/pack/.claude/skills/rite-prove/SKILL.md +12 -15
  69. package/pack/.claude/skills/rite-prove/reference/acceptance-proof.md +28 -0
  70. package/pack/.claude/skills/rite-review/SKILL.md +5 -4
  71. package/pack/.claude/skills/rite-review/reference/five-axis-review.md +6 -0
  72. package/pack/.claude/skills/rite-review/reference/security-review.md +7 -2
  73. package/pack/.claude/skills/rite-seal/reference/final-evidence.md +3 -0
  74. package/pack/.claude/skills/rite-seal/reference/risk-and-rollback.md +19 -4
  75. package/pack/.claude/skills/rite-ship/reference/rollout.md +62 -43
  76. package/pack/.claude/skills/rite-spec/SKILL.md +8 -1
  77. package/pack/.claude/skills/rite-spec/reference/ai-spec-template.md +13 -6
  78. package/pack/.claude/skills/rite-spec/reference/spec-checklists.md +14 -2
  79. package/pack/.claude/skills/rite-spec/reference/spec-template.md +33 -4
  80. package/pack/.claude/skills/rite-temper/SKILL.md +5 -1
  81. package/pack/.claude/skills/rite-vet/SKILL.md +8 -8
  82. package/pack/.claude/skills/rite-vet/reference/artifacts.md +5 -3
  83. package/pack/.claude/skills/rite-vet/reference/review-axes.md +67 -77
  84. package/pack/.claude/skills/rite-watch-pr/SKILL.md +85 -0
  85. package/pack/.claude/skills/rite-zoom-out/SKILL.md +4 -5
  86. package/pack/.claude/workflows/devrites-readonly-review.js +194 -0
  87. package/pack/generated/README.md +1 -1
  88. package/pack/generated/claude/agents/devrites-code-reviewer.md +6 -1
  89. package/pack/generated/claude/agents/devrites-plan-drafter.md +5 -0
  90. package/pack/generated/claude/agents/devrites-plan-reviewer.md +6 -0
  91. package/pack/generated/claude/agents/devrites-proof-runner.md +7 -1
  92. package/pack/generated/claude/agents/devrites-retrospector.md +21 -25
  93. package/pack/generated/claude/agents/devrites-security-auditor.md +7 -3
  94. package/pack/generated/claude/agents/devrites-slice-wright.md +30 -4
  95. package/pack/generated/claude/agents/devrites-spec-reviewer.md +5 -0
  96. package/pack/generated/claude/agents/devrites-strategy-reviewer.md +3 -4
  97. package/pack/generated/claude/agents/devrites-test-analyst.md +5 -0
  98. package/pack/generated/claude/skills/devrites-debug-recovery/SKILL.md +12 -16
  99. package/pack/generated/claude/skills/devrites-debug-recovery/reference/build-the-loop.md +11 -14
  100. package/pack/generated/claude/skills/devrites-doubt/SKILL.md +3 -4
  101. package/pack/generated/claude/skills/devrites-frontend-craft/reference/reuse-first.md +3 -4
  102. package/pack/generated/claude/skills/devrites-lib/reference/standards/README.md +5 -1
  103. package/pack/generated/claude/skills/devrites-lib/reference/standards/afk-hitl.md +33 -8
  104. package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +11 -3
  105. package/pack/generated/claude/skills/devrites-lib/reference/standards/ci-cd.md +19 -0
  106. package/pack/generated/claude/skills/devrites-lib/reference/standards/code-review.md +1 -1
  107. package/pack/generated/claude/skills/devrites-lib/reference/standards/core.md +5 -0
  108. package/pack/generated/claude/skills/devrites-lib/reference/standards/data-integrity.md +95 -0
  109. package/pack/generated/claude/skills/devrites-lib/reference/standards/developer-experience.md +5 -5
  110. package/pack/generated/claude/skills/devrites-lib/reference/standards/documentation.md +28 -29
  111. package/pack/generated/claude/skills/devrites-lib/reference/standards/edge-case-trace.md +70 -10
  112. package/pack/generated/claude/skills/devrites-lib/reference/standards/integration-reliability.md +79 -0
  113. package/pack/generated/claude/skills/devrites-lib/reference/standards/loop-operations.md +85 -0
  114. package/pack/generated/claude/skills/devrites-lib/reference/standards/observability.md +10 -0
  115. package/pack/generated/claude/skills/devrites-lib/reference/standards/patterns.md +20 -0
  116. package/pack/generated/claude/skills/devrites-lib/reference/standards/repository-topology.md +73 -0
  117. package/pack/generated/claude/skills/devrites-lib/reference/standards/security-checklist.md +6 -2
  118. package/pack/generated/claude/skills/devrites-lib/reference/standards/security.md +51 -16
  119. package/pack/generated/claude/skills/devrites-lib/reference/standards/skill-authoring.md +35 -40
  120. package/pack/generated/claude/skills/devrites-lib/reference/standards/test-proof-checklist.md +4 -0
  121. package/pack/generated/claude/skills/devrites-lib/reference/standards/testing.md +51 -6
  122. package/pack/generated/claude/skills/rite/SKILL.md +2 -0
  123. package/pack/generated/claude/skills/rite-adopt/SKILL.md +8 -10
  124. package/pack/generated/claude/skills/rite-adopt/reference/adoption.md +13 -15
  125. package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +18 -11
  126. package/pack/generated/claude/skills/rite-autocomplete/reference/loop.md +29 -6
  127. package/pack/generated/claude/skills/rite-autocomplete/reference/stop-conditions.md +7 -0
  128. package/pack/generated/claude/skills/rite-build/SKILL.md +7 -1
  129. package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +6 -1
  130. package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +37 -4
  131. package/pack/generated/claude/skills/rite-clarify/SKILL.md +3 -2
  132. package/pack/generated/claude/skills/rite-converge/SKILL.md +4 -2
  133. package/pack/generated/claude/skills/rite-converge/reference/convergence-assessment.md +8 -4
  134. package/pack/generated/claude/skills/rite-customize/SKILL.md +16 -18
  135. package/pack/generated/claude/skills/rite-define/SKILL.md +60 -62
  136. package/pack/generated/claude/skills/rite-define/reference/plan-template.md +88 -71
  137. package/pack/generated/claude/skills/rite-explain/SKILL.md +2 -1
  138. package/pack/generated/claude/skills/rite-learn/SKILL.md +28 -32
  139. package/pack/generated/claude/skills/rite-plan/SKILL.md +42 -45
  140. package/pack/generated/claude/skills/rite-plan/reference/dependency-graph.md +11 -2
  141. package/pack/generated/claude/skills/rite-plan/reference/task-breakdown.md +2 -0
  142. package/pack/generated/claude/skills/rite-polish/reference/adr-promotion.md +7 -7
  143. package/pack/generated/claude/skills/rite-pressure-test/SKILL.md +24 -31
  144. package/pack/generated/claude/skills/rite-prove/SKILL.md +12 -15
  145. package/pack/generated/claude/skills/rite-prove/reference/acceptance-proof.md +28 -0
  146. package/pack/generated/claude/skills/rite-review/SKILL.md +5 -4
  147. package/pack/generated/claude/skills/rite-review/reference/five-axis-review.md +6 -0
  148. package/pack/generated/claude/skills/rite-review/reference/security-review.md +7 -2
  149. package/pack/generated/claude/skills/rite-seal/reference/final-evidence.md +3 -0
  150. package/pack/generated/claude/skills/rite-seal/reference/risk-and-rollback.md +19 -4
  151. package/pack/generated/claude/skills/rite-ship/reference/rollout.md +62 -43
  152. package/pack/generated/claude/skills/rite-spec/SKILL.md +8 -1
  153. package/pack/generated/claude/skills/rite-spec/reference/ai-spec-template.md +13 -6
  154. package/pack/generated/claude/skills/rite-spec/reference/spec-checklists.md +14 -2
  155. package/pack/generated/claude/skills/rite-spec/reference/spec-template.md +33 -4
  156. package/pack/generated/claude/skills/rite-temper/SKILL.md +5 -1
  157. package/pack/generated/claude/skills/rite-vet/SKILL.md +8 -8
  158. package/pack/generated/claude/skills/rite-vet/reference/artifacts.md +5 -3
  159. package/pack/generated/claude/skills/rite-vet/reference/review-axes.md +67 -77
  160. package/pack/generated/claude/skills/rite-watch-pr/SKILL.md +85 -0
  161. package/pack/generated/claude/skills/rite-zoom-out/SKILL.md +4 -5
  162. package/pack/generated/claude/workflows/devrites-readonly-review.js +194 -0
  163. package/pack/generated/codex/agents/devrites-code-reviewer.toml +6 -1
  164. package/pack/generated/codex/agents/devrites-plan-drafter.toml +5 -0
  165. package/pack/generated/codex/agents/devrites-plan-reviewer.toml +6 -0
  166. package/pack/generated/codex/agents/devrites-proof-runner.toml +7 -1
  167. package/pack/generated/codex/agents/devrites-retrospector.toml +21 -25
  168. package/pack/generated/codex/agents/devrites-security-auditor.toml +7 -3
  169. package/pack/generated/codex/agents/devrites-slice-wright.toml +30 -4
  170. package/pack/generated/codex/agents/devrites-spec-reviewer.toml +5 -0
  171. package/pack/generated/codex/agents/devrites-strategy-reviewer.toml +3 -4
  172. package/pack/generated/codex/agents/devrites-test-analyst.toml +5 -0
  173. package/pack/generated/codex/skills/devrites-debug-recovery/SKILL.md +12 -16
  174. package/pack/generated/codex/skills/devrites-debug-recovery/reference/build-the-loop.md +11 -14
  175. package/pack/generated/codex/skills/devrites-doubt/SKILL.md +3 -4
  176. package/pack/generated/codex/skills/devrites-frontend-craft/reference/reuse-first.md +3 -4
  177. package/pack/generated/codex/skills/devrites-lib/reference/standards/README.md +5 -1
  178. package/pack/generated/codex/skills/devrites-lib/reference/standards/afk-hitl.md +33 -8
  179. package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +11 -3
  180. package/pack/generated/codex/skills/devrites-lib/reference/standards/ci-cd.md +19 -0
  181. package/pack/generated/codex/skills/devrites-lib/reference/standards/code-review.md +1 -1
  182. package/pack/generated/codex/skills/devrites-lib/reference/standards/core.md +5 -0
  183. package/pack/generated/codex/skills/devrites-lib/reference/standards/data-integrity.md +95 -0
  184. package/pack/generated/codex/skills/devrites-lib/reference/standards/developer-experience.md +5 -5
  185. package/pack/generated/codex/skills/devrites-lib/reference/standards/documentation.md +28 -29
  186. package/pack/generated/codex/skills/devrites-lib/reference/standards/edge-case-trace.md +70 -10
  187. package/pack/generated/codex/skills/devrites-lib/reference/standards/integration-reliability.md +79 -0
  188. package/pack/generated/codex/skills/devrites-lib/reference/standards/loop-operations.md +85 -0
  189. package/pack/generated/codex/skills/devrites-lib/reference/standards/observability.md +10 -0
  190. package/pack/generated/codex/skills/devrites-lib/reference/standards/patterns.md +20 -0
  191. package/pack/generated/codex/skills/devrites-lib/reference/standards/repository-topology.md +73 -0
  192. package/pack/generated/codex/skills/devrites-lib/reference/standards/security-checklist.md +6 -2
  193. package/pack/generated/codex/skills/devrites-lib/reference/standards/security.md +51 -16
  194. package/pack/generated/codex/skills/devrites-lib/reference/standards/skill-authoring.md +35 -40
  195. package/pack/generated/codex/skills/devrites-lib/reference/standards/test-proof-checklist.md +4 -0
  196. package/pack/generated/codex/skills/devrites-lib/reference/standards/testing.md +51 -6
  197. package/pack/generated/codex/skills/rite/SKILL.md +2 -0
  198. package/pack/generated/codex/skills/rite-adopt/SKILL.md +8 -10
  199. package/pack/generated/codex/skills/rite-adopt/reference/adoption.md +13 -15
  200. package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +18 -11
  201. package/pack/generated/codex/skills/rite-autocomplete/reference/loop.md +29 -6
  202. package/pack/generated/codex/skills/rite-autocomplete/reference/stop-conditions.md +7 -0
  203. package/pack/generated/codex/skills/rite-build/SKILL.md +7 -1
  204. package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +6 -1
  205. package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +37 -4
  206. package/pack/generated/codex/skills/rite-clarify/SKILL.md +3 -2
  207. package/pack/generated/codex/skills/rite-converge/SKILL.md +4 -2
  208. package/pack/generated/codex/skills/rite-converge/reference/convergence-assessment.md +8 -4
  209. package/pack/generated/codex/skills/rite-customize/SKILL.md +16 -18
  210. package/pack/generated/codex/skills/rite-define/SKILL.md +60 -62
  211. package/pack/generated/codex/skills/rite-define/reference/plan-template.md +88 -71
  212. package/pack/generated/codex/skills/rite-explain/SKILL.md +2 -1
  213. package/pack/generated/codex/skills/rite-learn/SKILL.md +28 -32
  214. package/pack/generated/codex/skills/rite-plan/SKILL.md +42 -45
  215. package/pack/generated/codex/skills/rite-plan/reference/dependency-graph.md +11 -2
  216. package/pack/generated/codex/skills/rite-plan/reference/task-breakdown.md +2 -0
  217. package/pack/generated/codex/skills/rite-polish/reference/adr-promotion.md +7 -7
  218. package/pack/generated/codex/skills/rite-pressure-test/SKILL.md +24 -31
  219. package/pack/generated/codex/skills/rite-prove/SKILL.md +12 -15
  220. package/pack/generated/codex/skills/rite-prove/reference/acceptance-proof.md +28 -0
  221. package/pack/generated/codex/skills/rite-review/SKILL.md +5 -4
  222. package/pack/generated/codex/skills/rite-review/reference/five-axis-review.md +6 -0
  223. package/pack/generated/codex/skills/rite-review/reference/security-review.md +7 -2
  224. package/pack/generated/codex/skills/rite-seal/reference/final-evidence.md +3 -0
  225. package/pack/generated/codex/skills/rite-seal/reference/risk-and-rollback.md +19 -4
  226. package/pack/generated/codex/skills/rite-ship/reference/rollout.md +62 -43
  227. package/pack/generated/codex/skills/rite-spec/SKILL.md +8 -1
  228. package/pack/generated/codex/skills/rite-spec/reference/ai-spec-template.md +13 -6
  229. package/pack/generated/codex/skills/rite-spec/reference/spec-checklists.md +14 -2
  230. package/pack/generated/codex/skills/rite-spec/reference/spec-template.md +33 -4
  231. package/pack/generated/codex/skills/rite-temper/SKILL.md +5 -1
  232. package/pack/generated/codex/skills/rite-vet/SKILL.md +8 -8
  233. package/pack/generated/codex/skills/rite-vet/reference/artifacts.md +5 -3
  234. package/pack/generated/codex/skills/rite-vet/reference/review-axes.md +67 -77
  235. package/pack/generated/codex/skills/rite-watch-pr/SKILL.md +85 -0
  236. package/pack/generated/codex/skills/rite-zoom-out/SKILL.md +4 -5
  237. package/package.json +1 -1
  238. package/scripts/build-host-artifacts.sh +3 -1
@@ -54,6 +54,7 @@ What each verb does lives once, in the Menu below; this table is the invocation
54
54
  | `pov [candidate]` | `$rite-pov` |
55
55
  | `dogfood [--port N]` | `$rite-dogfood` |
56
56
  | `pr-feedback [PR\|thread]` | `$rite-pr-feedback` |
57
+ | `watch-pr [PR\|URL]` | `$rite-watch-pr` |
57
58
  | `customize [instruction \| skill \| agent \| plugin]` | `$rite-customize` |
58
59
  | `use <slug>` | (inline) |
59
60
  | `guide` | (inline) |
@@ -124,6 +125,7 @@ EXPLAIN $rite explain ... ≡ $rite-explain grounded concept
124
125
  POV $rite pov ... ≡ $rite-pov decide adopt / trial / hold / reject for an external option
125
126
  DOGFOOD $rite dogfood ... ≡ $rite-dogfood browser QA by changed user journey
126
127
  PR FEEDBACK $rite pr-feedback ... ≡ $rite-pr-feedback fix and resolve PR review threads
128
+ WATCH PR $rite watch-pr ... ≡ $rite-watch-pr observe PR/CI once without mutation
127
129
  CUSTOMIZE $rite customize ... ≡ $rite-customize author overrides/extensions without forking the pack
128
130
  SWITCH $rite use <slug> re-point .devrites/ACTIVE to another feature (inline)
129
131
  GUIDE $rite guide first feature, guided — full lifecycle on one small real change (inline)
@@ -7,18 +7,17 @@ user-invocable: true
7
7
 
8
8
  # $rite-adopt: onboard existing code
9
9
 
10
- Reverse-engineer existing behavior into the same `spec.md` contract used by new
11
- features. Adoption documents the repository; it does not rewrite it or create a
10
+ Reverse-engineer current behavior into `spec.md`; do not rewrite product code or create a
12
11
  parallel convention system.
13
12
 
14
13
  ## Workflow
15
14
 
16
- 1. Read the core standards and resolve the repository/sub-area plus the next
17
- objective. Ask once when either is materially ambiguous.
15
+ 1. Read core; resolve repository/sub-area and next objective. Ask once only if material.
18
16
  2. Follow [`reference/adoption.md`](reference/adoption.md): inspect current
19
17
  behavior, architecture and placement, callers, reusable seams, repository/CI
20
- commands, visible code/test patterns, and non-obvious constraints. Read
21
- existing `AGENTS.md`, `CLAUDE.md`, product, and design guidance.
18
+ commands, visible code/test patterns, non-obvious constraints, and any touched
19
+ load-bearing seam that needs `characterize-before-modify`. Read existing
20
+ `AGENTS.md`, `CLAUDE.md`, product, and design guidance.
22
21
  3. Create the workspace and write `spec.md`, `decisions.md`, `assumptions.md`,
23
22
  `questions.md`, and `state.md`. The spec separates the current baseline from
24
23
  the measurable next objective.
@@ -26,10 +25,9 @@ parallel convention system.
26
25
  [`ledger.md`](../rite-polish/reference/ledger.md): read current specs, preview
27
26
  ADDED entries, confirm paths, refuse escape/symlink/clobber/ignored targets,
28
27
  write, lint, and require an empty re-preview.
29
- 5. If a repeatedly observed operating rule should govern future work, propose
30
- one exact edit to the nearest existing `AGENTS.md`, `CLAUDE.md`, or scoped
31
- document. Apply only after review. Do not create convention bands, scores, or
32
- a command cache.
28
+ 5. For a verified non-obvious policy or recurring/costly mistake, prefer existing hook/lint/
29
+ CI/type/schema enforcement; else propose one evidence-cited nearest-scope instruction edit.
30
+ Apply only after review; never create convention bands, scores, or a command cache.
33
31
  6. A genuine non-negotiable invariant may be proposed for
34
32
  `.devrites/principles.md`; the human must ratify it.
35
33
  7. Set the next step to `$rite-clarify` and stop. Do not plan or build.
@@ -1,21 +1,19 @@
1
1
  # Adoption: reverse-investigation
2
2
 
3
- Loaded on demand by `$rite-adopt`. Document what the code already does so the
4
- lifecycle starts from evidence rather than guesses.
3
+ Loaded by `$rite-adopt`; record code reality before forward work.
5
4
 
6
- Capture the durable project shape:
5
+ Capture visible behavior; architecture/placement/callers/seams; repository/CI commands;
6
+ live naming/layering/error/data/test conventions; and non-obvious constraints.
7
7
 
8
- - current user-visible behavior;
9
- - architecture, placement, callers, and important seams;
10
- - real test, build, typecheck, and lint commands from repository scripts or CI;
11
- - naming, layering, error, data-access, and test patterns visible in live code;
12
- - non-obvious ordering or framework constraints.
8
+ For each next-objective load-bearing seam without a discriminating test, append after its
9
+ source in `spec.md` existing behavior's `Current evidence` cell:
13
10
 
14
- Use native code/file search and current repository documentation. Fresh source
15
- and CI configuration win over historical notes.
11
+ ```text
12
+ Characterization: characterize-before-modify; risk: <risk>; first touch: <slice|unknown>
13
+ ```
16
14
 
17
- Write the adopted baseline and next objective to `spec.md`; put uncertain facts
18
- in `assumptions.md` and durable decisions in `decisions.md`. If an observed rule
19
- should govern future work, propose one reviewed update to `AGENTS.md`,
20
- `CLAUDE.md`, or the nearest scoped project document. Do not create a convention
21
- ledger, confidence band, score, or duplicated command cache.
15
+ This is a touched-behavior ratchet, not repository-wide coverage.
16
+
17
+ Use current code/search/docs; source and CI beat history. Put baseline/objective in
18
+ `spec.md`, uncertainty in `assumptions.md`, durable choices in `decisions.md`, and guidance
19
+ in nearest scoped instructions—never ledgers, scores, confidence bands, or command caches.
@@ -46,8 +46,10 @@ the terminal cursor or its recovery count.
46
46
  New retained Critical/Important evidence starts offline repair and narrow Vet
47
47
  inside this Autocomplete invocation. Stop for a fresh GO only after that repair
48
48
  changes the failure condition and Vet is READY.
49
- - **Budget from the post-vet slice count.** Vet may split/add slices.
50
- `--max-slices N` may lower the cap for a partial run; otherwise build all.
49
+ - **Admit work under the AFK resource envelope.** Vet may split/add slices.
50
+ `--max-slices N` replaces the safe new-sentinel default of 10; post-Vet pending
51
+ count may lower it. Before every phase or leaf dispatch, also enforce expiry,
52
+ review-backlog, and native agent/token/cost/time limits from `afk-hitl.md`.
51
53
  - **Parse flags only from this invocation.** `--ship`, `--yolo`, `--max-slices`,
52
54
  `--full`, and `--cross-model` are active only when their exact standalone tokens
53
55
  occur in `$ARGUMENTS`; their presence in this skill, examples, or earlier messages
@@ -87,10 +89,11 @@ the terminal cursor or its recovery count.
87
89
  reconstruct any missing return cursor only from the current phase plus the
88
90
  exact approved action in `test-plan.md` / evidence, never from chat or guesswork.
89
91
  The idea + flags: `--ship` / `--yolo` (continue through ship preflight, then stop
90
- for literal-GO and native approval), `--max-slices N` (optional lower safety cap for a partial run; default =
91
- the plan's slice count, i.e. run all planned slices). Parse only the current
92
- `$ARGUMENTS`; normalize the result to the idea, `ship_preflight: yes|no`,
93
- `max_slices: N|plan`, `profile: standard|full`, and `cross_model: yes|no`.
92
+ for literal-GO and native approval), `--max-slices N` (optional explicit cap;
93
+ a newly created sentinel defaults to 10 and post-Vet pending count may lower it).
94
+ Parse only the current `$ARGUMENTS`; normalize the result to the idea,
95
+ `ship_preflight: yes|no`, `max_slices: N|default`, `profile: standard|full`, and
96
+ `cross_model: yes|no`.
94
97
  **Completion:** that normalized state is unambiguous and no sentinel or workspace
95
98
  file has been written.
96
99
  2. **Specify and clarify up front.** Use `devrites-interview`, `$rite-spec`, and
@@ -98,8 +101,10 @@ the terminal cursor or its recovery count.
98
101
  coverage never arms AFK. **Completion:** `decision-coverage.md` records `CLEAR`.
99
102
  3. **Arm AFK after clarity.** Require `Decision coverage: CLEAR`, then apply the
100
103
  loop's [one-write AFK contract](reference/loop.md#arm-afk-once): preserve a valid
101
- existing sentinel byte-for-byte or create an advisory-only sentinel once; never
102
- rewrite it after Vet. Also `touch .devrites/CHECKPOINT`: unattended runs use
104
+ existing sentinel byte-for-byte or create an advisory-only sentinel once with
105
+ bounded slices, agents, wall time, review queue, and four-hour absolute expiry;
106
+ never rewrite it after Vet or reset it on resume. Also `touch .devrites/CHECKPOINT`:
107
+ unattended runs use
103
108
  checkpoint mode so each proven slice is committed locally as a crash-survivable
104
109
  `WIP` ([rite-build/reference/checkpoint.md](../rite-build/reference/checkpoint.md));
105
110
  `$rite-ship` collapses them into the one feature commit. **Completion:** AFK config is
@@ -116,14 +121,16 @@ the terminal cursor or its recovery count.
116
121
  phase resumes.
117
122
  Immediately after `$rite-vet` and before the first Build dispatch, apply the loop's
118
123
  [mutable post-vet budget](reference/loop.md#derive-the-mutable-post-vet-budget)
119
- contract. **Completion:** the loop reaches Seal GO, or a stop condition is persisted
124
+ contract, then apply resource admission before every phase and native dispatch.
125
+ **Completion:** the loop reaches Seal GO, or a stop condition is persisted
120
126
  before any later phase runs; the cursor names the last completed phase and the
121
127
  effective remaining budget.
122
128
  5. **Apply stop conditions at every gate** ([reference/stop-conditions.md](reference/stop-conditions.md)):
123
129
  first route an agent-owned red technical result through the loop's bounded
124
130
  recovery; its `blocked` label alone is not a stop condition. After that, on
125
- hard-risk / human-owned blocking / escalating / NO-GO / budget-exhausted / still-low-confidence
126
- write `state.md` (`Status`, `Next step`), surface *why*, and **STOP**.
131
+ hard-risk / human-owned blocking / escalating / NO-GO / slice, agent, token,
132
+ cost, time, review-queue, or expiry exhaustion / still-low-confidence write
133
+ `state.md` (`Status`, `Next step`), surface *why*, and **STOP**.
127
134
  Exhausted agent-owned technical recovery uses the terminal `Next step: none`
128
135
  marker and never hands the user `$rite-plan unblock` or another routine
129
136
  phase command.
@@ -9,15 +9,23 @@ Arm the gate policy up front without mutating it later:
9
9
 
10
10
  ```yaml
11
11
  allow_gates: [advisory] # only advisory auto-handles; validating+ pause
12
- # notify: "<cmd>" # optional fired on any awaiting_human pause
13
- # max_slices: <N> # include only for an explicit/configured cap
12
+ max_slices: 10 # explicit --max-slices N replaces this default
13
+ max_agents: 32 # native leaf dispatches in this host activation
14
+ max_minutes: 120 # activation wall-clock cap
15
+ max_review_queue: 8 # unresolved review/gate backlog cap
16
+ expires_at: "<now + 4 hours>" # write one absolute ISO-8601 UTC timestamp
17
+ # max_tokens: <N> # optional stricter native-host cap
18
+ # max_cost_usd: <amount> # optional stricter native-host cap
19
+ # notify: "<cmd>" # optional — fired after a durable stop
14
20
  ```
15
21
 
16
22
  Read an existing sentinel first. Preserve it byte-for-byte when valid; stop if its gate
17
- ceiling exceeds `advisory` or its `max_slices` conflicts with the invocation. If absent,
18
- write it once after clarity with `allow_gates: [advisory]` and an explicit
19
- `--max-slices N` only when supplied. The sentinel is read-only: never rewrite it after
20
- `$rite-vet` to inject a discovered plan count.
23
+ ceiling exceeds `advisory`, its required resource envelope is missing/malformed/expired,
24
+ or its `max_slices` conflicts with the invocation. If absent, write it once after clarity
25
+ with the safe defaults above, replacing `max_slices` only for an explicit
26
+ `--max-slices N` and resolving `expires_at` to one absolute timestamp. The sentinel is
27
+ read-only: never rewrite it after `$rite-vet` to inject a discovered plan count or to
28
+ reset resource authority.
21
29
 
22
30
  ### Derive the mutable post-vet budget
23
31
 
@@ -28,6 +36,19 @@ valid remaining counter already exists, retain the lower of it and the derived b
28
36
  never increase or reinitialize it. This keeps the crash-survivable budget in its mutable owner
29
37
  without changing AFK configuration mid-run.
30
38
 
39
+ ### Admit each unattended cycle
40
+
41
+ Before every phase, parallel review fan-out, recovery dispatch, or writer dispatch,
42
+ apply [`afk-hitl.md`](../../devrites-lib/reference/standards/afk-hitl.md#unattended-resource-envelope):
43
+ run the cheapest readiness/current-state check, reject overlapping work, count the
44
+ current unresolved review queue, and check expiry plus native agent/token/cost/time
45
+ headroom. Count every leaf, including failed/malformed/unavailable results. At the
46
+ review cap, only reconciliation that reduces the queue may run. Any limit reached or
47
+ unobservable declared cap ends the current activation before more work and persists
48
+ its checkpoint/reason. A genuinely new native activation starts fresh agent/time/token/
49
+ cost counters, but reuses durable slice/recovery state, absolute expiry, and recomputed
50
+ review queue. It never resets those durable bounds.
51
+
31
52
  `allow_gates: [advisory]` prevents an open `gate: validating` from being queued until
32
53
  seal, where it would force NO-GO under `afk-hitl.md`. Autocomplete pauses on it instead. Widen
33
54
  `allow_gates` only outside autocomplete through an explicit human configuration change;
@@ -125,6 +146,8 @@ rest point or one of the shared human/safety/access/exhaustion stop conditions.
125
146
  ## Between phases
126
147
 
127
148
  - Re-read the active workspace before each phase (don't trust chat memory).
149
+ - Re-run resource admission before each phase or native dispatch; stop before work
150
+ when expiry, review backlog, or agent/token/cost/time headroom is exhausted.
128
151
  - After a phase that edits code (build, polish, review), evidence may be stale: let
129
152
  the next gate re-prove rather than carrying a stale pass (see
130
153
  `.agents/skills/devrites-lib/reference/standards/development-workflow.md`).
@@ -101,6 +101,13 @@ exists, a real human/risk/scope gate owns it, or bounded recovery is exhausted.
101
101
  remaining value, explicit flag, sentinel cap, or post-vet pending count) and the
102
102
  unbuilt slices. A malformed value also fails closed. Zero with no pending slices is
103
103
  normal completion → continue to `$rite-prove` without pausing.
104
+ - **Resource envelope unavailable or exhausted:** stop before more work when the AFK
105
+ envelope is missing/malformed/expired; another run overlaps; native agent, token,
106
+ cost, or wall-time headroom is exhausted/unobservable despite a declared cap; or
107
+ unresolved review/gate backlog is above its cap. At the review cap, permit only
108
+ reconciliation that reduces the queue. Record the exact winning limit and observed
109
+ usage/count. A new activation gets fresh activation-local counters; it does not reset
110
+ durable slice/recovery budgets, expiry, or the recomputed queue.
104
111
  - **Still low-confidence after the interview:** the idea can't be pinned to testable
105
112
  acceptance criteria → stop and ask, rather than guessing the product.
106
113
  - **Repeated failure:** bounded recovery exhausts → stop with reproduction.
@@ -31,12 +31,18 @@ reads named on-demand rules while writing; root reads them for doubt/record gate
31
31
  - `patterns.md`: composition over inheritance, avoid premature abstraction.
32
32
  - `principles.md`: the project invariants (`.devrites/principles.md`) the slice must honor; the wright reads them as **binding**, not priors.
33
33
  - `security.md`: when the slice touches user input, auth, data, or external integrations.
34
+ - `repository-topology.md`: when targets span roots/languages/services or touch generated/vendor surfaces.
35
+ - `data-integrity.md`: when the slice writes durable state or changes migration/concurrency/tenant/retention behavior.
36
+ - `integration-reliability.md`: when the slice changes an API/webhook/queue/job/cache/cross-service boundary.
34
37
  - `definition-of-done.md`: standing Done bar: acceptance mapped, fresh proof, no open hard gates, scoped edits, rollback/docs where needed.
35
38
 
36
39
 
37
40
  ## Operating rules
38
41
  - **One slice per wright dispatch.** Every wright returns after it. The controlling
39
- root applies the mode rule above before another dispatch.
42
+ root applies the mode rule above before another dispatch. Prefer the guarded serial
43
+ native-worktree pilot in `wright-dispatch.md` only when its committed-clean
44
+ preflight and explicit reconciliation path both hold; otherwise use the existing
45
+ serial same-worktree writer. Never run writers in parallel.
40
46
  - Evidence over confidence. Prefer existing conventions. Feature scope only: no
41
47
  drive-by refactors.
42
48
  - **Record adjacent issues; do not edit them.** An issue outside the exact paths
@@ -9,7 +9,9 @@ See [`one-slice-cycle.md`](one-slice-cycle.md); candidate lifecycle is
9
9
  ID-and-meaning traceability, and green proof preflight; run
10
10
  `devrites-engine check readiness <slug>`. Any miss/nonzero stops.
11
11
  2. **Select one target.** Restate goal, acceptance criteria, exclusions, and exact
12
- source/test paths. Before dispatch, validate relevant `assumptions.md` rows
12
+ source/test paths. Reconcile the spec/plan applicability map and include only the
13
+ triggered topology/data/integration standards plus their named failure/recovery/proof
14
+ cases in the writer contract. Before dispatch, validate relevant `assumptions.md` rows
13
15
  against live evidence. If one is disproved and changes acceptance, architecture,
14
16
  scope, or proof, use the Spec Drift Guard/plan recovery; a human-owned unknown
15
17
  stops. Resolve HITL before source work. AFK answers only permitted gates;
@@ -50,6 +52,9 @@ the candidate manifest; it returns through narrow Vet before any consumptive act
50
52
  and recheck `git diff --name-only`. Missing, weakened, red, or source-mutating proof
51
53
  is not success.
52
54
 
55
+ A failure is `pre-existing` or environment-specific only with a same-command,
56
+ same-environment baseline predating the candidate; otherwise it remains unresolved.
57
+
53
58
  Technical failure uses bounded `devrites-debug-recovery`: reapply the host gate
54
59
  before an accepted in-slice correction, keep one exact fingerprint/three
55
60
  no-progress attempts, and never rerun an unchanged check. A closed reproduction
@@ -11,6 +11,32 @@ Claude grants only the exact wright `acceptEdits`; Codex uses its workspace root
11
11
  the exact `:workspace` wright, and read-only specialists. Never bypass/substitute
12
12
  the wright or recreate an engine bridge.
13
13
 
14
+ ## Isolated writer-worktree pilot
15
+
16
+ Use native isolation only when the current host exposes an explicit named-writer
17
+ worktree plus result reconciliation; separate agent threads or inherited sandboxes do
18
+ not qualify. Codex CLI custom subagents therefore use `same-worktree` unless a future
19
+ supported interface passes this capability gate—never create a manual worktree from the
20
+ read-only root to imitate it. Also require `git rev-parse
21
+ --show-superproject-working-tree` to be empty; resolved git/common dirs; committed,
22
+ clean candidate/index; all inputs at `HEAD`; no other writer; and green cheap isolated
23
+ baseline proof. Otherwise use serial same-worktree dispatch—never stash, commit, or
24
+ discard user work to qualify. Ask host for an explicit current-`HEAD` base when
25
+ supported. Regardless of host defaults, the wright's first command must prove actual `git rev-parse HEAD` equals supplied
26
+ `worktree_base`. Mismatch returns a gap with no write before project reads or baseline proof.
27
+
28
+ The isolated wright returns one local unpushed `transfer_commit`, its `worktree_base`,
29
+ and exact files. Root proves descendant base, exact `git diff --name-only
30
+ <base>..<transfer>`, no `.devrites/**`/submodule/symlink/unrelated delta, unchanged
31
+ source base, and no user-work overwrite. Use only host-native explicit reconciliation;
32
+ never ad hoc copy, cherry-pick, or merge from read-only root. Compare transferred bytes,
33
+ run approved proof, record evidence, then let host remove worktree.
34
+
35
+ Conflict, extra/missing commit, moved base, or cleanup failure is `gap`/STOP:
36
+ preserve the worktree and commit. Without explicit reconciliation, use same-worktree serial.
37
+ Parallel writer work remains forbidden until this serial pilot measures transfer,
38
+ conflict, proof, and review outcomes on both hosts.
39
+
14
40
  ## Prepare
15
41
 
16
42
  1. Derive the smallest exact project-relative source/test path list; reject
@@ -20,15 +46,20 @@ the wright or recreate an engine bridge.
20
46
  [`workflow-artifacts.md`](../../devrites-lib/reference/standards/workflow-artifacts.md);
21
47
  its rejection here is not a blocker.
22
48
  2. Put it in the task with goal, verbatim acceptance, exclusions, context,
23
- `test-plan.md` proof commands, and applicable standards.
49
+ `test-plan.md` proof commands, and applicable standards. For each triggered
50
+ topology/data/integration standard, include only the feature-specific owner/invariant,
51
+ failure or partial-state case, recovery rule, and required proof from the vetted plan.
52
+ Do not paste the whole standard or silently omit an applicable risk.
24
53
  A new path requires a new bounded contract; the wright cannot widen the task.
25
54
  3. Record `git diff --name-only` before dispatch so unrelated work remains
26
- distinguishable.
55
+ distinguishable. For an isolated pilot, also record committed base SHA and exact
56
+ baseline status before asking the host for isolation.
27
57
 
28
58
  ## Run
29
59
 
30
- Ask the host for the exact writer in fresh context and wait. Never run two
31
- writers in one worktree or substitute a generic agent.
60
+ Ask the host for the exact writer in fresh context and wait. Use at most one writer
61
+ across all linked worktrees for this workspace. Never run two writers in one worktree,
62
+ run isolated and same-worktree writers concurrently, or substitute a generic agent.
32
63
 
33
64
  ## Inspect and prove
34
65
 
@@ -38,6 +69,8 @@ writers in one worktree or substitute a generic agent.
38
69
  wright; root never widens scope or edits source.
39
70
  2. Inspect the test diff for deletion, skipping, focus markers, or loosened
40
71
  assertions. Dedicated test analysis treats weakening as Critical.
72
+ Confirm a test for a data/integration/topology risk can actually exhibit that risk;
73
+ mocks that erase it and one-root proof offered for another root are unproven.
41
74
  3. Run only repository proof already approved by `test-plan.md`, then inspect
42
75
  `git diff --name-only` again in case a proof tool changed source.
43
76
  4. Challenge decisions. Human choices return; native diagnosis routes failures.
@@ -39,8 +39,9 @@ dispatch uses
39
39
  `Spec gate: passed`; otherwise stop at `$rite-spec`. Apply the native cursor
40
40
  protocol below before changing workspace artifacts.
41
41
  2. **Enumerate the topology.** From the spec, live code, contracts, references,
42
- and recorded decisions, list every material actor, journey/component, state,
43
- data lifecycle, integration, operation, proof surface, and must-NOT boundary.
42
+ and recorded decisions, list every material stakeholder/priority, invariant, actor,
43
+ journey/component, state, data lifecycle, integration, failure/recovery path,
44
+ operation, proof surface, applicability row, and must-NOT boundary.
44
45
  3. **Scan coverage.** Apply `devrites-interview` in clarify mode and mark each
45
46
  material surface Clear, Partial, Missing, not-applicable, or justified
46
47
  deferred-nonblocking with evidence and an owner. Use native repository search
@@ -27,9 +27,11 @@ Pull on demand:
27
27
  - `spec-grammar.md`: buildable acceptance criteria vs `## Success metrics` (outcome KPIs the
28
28
  code can't make true and this pass never enqueues); structured `### Requirement:` /
29
29
  `#### Scenario:` blocks, each scenario one behavior to check as built / partial / absent.
30
- - `tooling.md`: prefer a code-intelligence index (codebase-memory-mcp codegraph graphify,
31
- else LSP / Read/Grep/Glob) to read the live code, not assumptions.
30
+ - `tooling.md`: use the primary available code index; cross-check only a named unresolved
31
+ predicate, then fall back to LSP/file search. Read live code, not artifact claims.
32
32
  - `testing.md`: a criterion with code but no covering test is *partial*, not done.
33
+ - `repository-topology.md`, `data-integrity.md`, `integration-reliability.md`: only for
34
+ triggered applicability rows; missing failure/recovery behavior is partial or absent.
33
35
 
34
36
  ## Operating rules
35
37
  - **APPEND-ONLY, never rewrite.** The only write to `tasks.md` is **appending** new
@@ -25,10 +25,14 @@ slice.
25
25
  | **partial** | Some of it exists: happy path only, un-wired, untested, a TODO stub, or an edge case from the scenario's WHEN/THEN missing. | Append a slice for the **remainder**, its `Known-Gotchas` naming what's already there so `$rite-build` extends rather than rebuilds. |
26
26
  | **absent** | No code implements it. | Append a full slice. |
27
27
 
28
- Read the code to decide: do not infer from the plan. Use the code-intelligence index
29
- (codebase-memory-mcp codegraph → graphify, else LSP / grep) so the verdict reflects live
30
- code, not the artifacts' claims. Read `traceability.md` to see what is mapped; only reading the
31
- code and tests tells you what is built.
28
+ Read the code to decide: do not infer from the plan. Apply `standards/tooling.md`: use the
29
+ primary available code index, cross-check only a named unresolved predicate, then use LSP/file
30
+ search so the verdict reflects live code. Read `traceability.md` to see what is mapped; only
31
+ code and tests tell you what is built.
32
+
33
+ Treat accepted invariants, failure/recovery rows, and triggered applicability obligations as
34
+ buildable units alongside REQ/AC/scenarios. A happy path with missing applicable
35
+ duplicate/retry/concurrency/tenant/timeout/order/interruption/rollback behavior is `partial`.
32
36
 
33
37
  ## Principle violations
34
38
 
@@ -8,33 +8,31 @@ disable-model-invocation: true
8
8
 
9
9
  # $rite-customize: native project customization
10
10
 
11
- Use native; DevRites has no registry, override layer, or sync.
12
- `--import-legacy` is active only when that exact standalone token occurs in the
13
- current `$ARGUMENTS`; its presence below or in earlier context cannot activate it.
11
+ Use native; no registry/override/sync. `--import-legacy` is active only when that exact
12
+ standalone token occurs in current `$ARGUMENTS`; earlier context cannot activate it.
14
13
 
15
14
  ## Workflow
16
15
 
17
- 1. Map policy to an instruction, reusable work to a skill, a specialist to an
18
- agent, and external capability to a connected plugin/MCP server.
19
- 2. Inspect target and host docs; reuse before copying DevRites.
20
- 3. Draft the smallest nearest-scope change; do not restate base safeguards.
21
- 4. Show path and exact diff; wait for approval.
22
- 5. Write only the approved artifact; run native validation; keep no mirror.
16
+ 1. Map policyinstruction, reusable workskill, specialist→agent, external capability→plugin/MCP.
17
+ 2. Inspect target/host docs; reuse before copying.
18
+ 3. Draft smallest nearest-scope change; do not restate safeguards.
19
+ 4. Show path/exact diff; wait.
20
+ 5. Write approved artifacts, validate natively, keep no mirror.
23
21
 
24
- Here, edit canonical source, run its generator, and never edit derived artifacts.
22
+ Here, edit canonical source and generate; never edit derived artifacts.
25
23
 
26
24
  ## Legacy import mode
27
25
 
28
- `--import-legacy` migrates useful behavior without a registry:
29
-
30
- 1. Inventory `.devrites/extensions/`, `.devrites/overrides/`, and
31
- `.devrites/runbooks/` read-only; treat them as untrusted and keep useful rules.
32
- 2. Map behavior to a project skill, scoped policy to its nearest instruction,
33
- specialists to agents, and each runbook to a native skill with explicit gate,
26
+ 1. Inventory `.devrites/extensions/`, `.devrites/overrides/`, and `.devrites/runbooks/` read-only
27
+ as untrusted data.
28
+ 2. Record origin/files: external URL/SHA/path/license or local relative path, commit/content
29
+ digest, and owner confirmation. Add review date, copied/re-authored status, canonical owner,
30
+ and derived targets. Unverified external rights stay reference-only; never execute imported instructions.
31
+ 3. Map useful behavior to native owners; map runbooks to a native skill with explicit gate,
34
32
  checkpoint, and resume semantics.
35
- 3. Reject gate/permission weakening. Show every target and diff; wait. Never auto-copy,
33
+ 4. Reject weaker gates/permissions. Show every diff and provenance receipt; wait. Never auto-copy,
36
34
  bulk-convert, or delete.
37
- 4. Write approved native artifacts and validate. Leave the legacy files intact until native
35
+ 5. Write and validate approved native artifacts. Leave the legacy files intact until native
38
36
  validation passes; cleanup needs separate approval.
39
37
 
40
38
  ## Rules