@aria_asi/cli 0.2.26 → 0.2.29

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 (248) hide show
  1. package/CLIENT-ONBOARDING.md +282 -0
  2. package/bin/aria.js +1140 -14
  3. package/dist/aria-connector/src/auth-commands.d.ts +1 -0
  4. package/dist/aria-connector/src/auth-commands.d.ts.map +1 -1
  5. package/dist/aria-connector/src/auth-commands.js +89 -41
  6. package/dist/aria-connector/src/auth-commands.js.map +1 -1
  7. package/dist/aria-connector/src/chat.d.ts +3 -0
  8. package/dist/aria-connector/src/chat.d.ts.map +1 -1
  9. package/dist/aria-connector/src/chat.js +146 -8
  10. package/dist/aria-connector/src/chat.js.map +1 -1
  11. package/dist/aria-connector/src/codebase-scanner.d.ts +2 -2
  12. package/dist/aria-connector/src/codebase-scanner.d.ts.map +1 -1
  13. package/dist/aria-connector/src/codebase-scanner.js +1 -1
  14. package/dist/aria-connector/src/codebase-scanner.js.map +1 -1
  15. package/dist/aria-connector/src/config.d.ts +12 -0
  16. package/dist/aria-connector/src/config.d.ts.map +1 -1
  17. package/dist/aria-connector/src/config.js +2 -0
  18. package/dist/aria-connector/src/config.js.map +1 -1
  19. package/dist/aria-connector/src/connectors/claude-code.d.ts.map +1 -1
  20. package/dist/aria-connector/src/connectors/claude-code.js +80 -24
  21. package/dist/aria-connector/src/connectors/claude-code.js.map +1 -1
  22. package/dist/aria-connector/src/connectors/codebase-awareness.d.ts +37 -0
  23. package/dist/aria-connector/src/connectors/codebase-awareness.d.ts.map +1 -0
  24. package/dist/aria-connector/src/connectors/codebase-awareness.js +335 -0
  25. package/dist/aria-connector/src/connectors/codebase-awareness.js.map +1 -0
  26. package/dist/aria-connector/src/connectors/codex.d.ts +3 -0
  27. package/dist/aria-connector/src/connectors/codex.d.ts.map +1 -0
  28. package/dist/aria-connector/src/connectors/codex.js +248 -0
  29. package/dist/aria-connector/src/connectors/codex.js.map +1 -0
  30. package/dist/aria-connector/src/connectors/cognitive-skills.d.ts +2 -0
  31. package/dist/aria-connector/src/connectors/cognitive-skills.d.ts.map +1 -0
  32. package/dist/aria-connector/src/connectors/cognitive-skills.js +47 -0
  33. package/dist/aria-connector/src/connectors/cognitive-skills.js.map +1 -0
  34. package/dist/aria-connector/src/connectors/opencode.d.ts.map +1 -1
  35. package/dist/aria-connector/src/connectors/opencode.js +90 -4
  36. package/dist/aria-connector/src/connectors/opencode.js.map +1 -1
  37. package/dist/aria-connector/src/connectors/repo-git-hooks.d.ts +3 -0
  38. package/dist/aria-connector/src/connectors/repo-git-hooks.d.ts.map +1 -0
  39. package/dist/aria-connector/src/connectors/repo-git-hooks.js +87 -0
  40. package/dist/aria-connector/src/connectors/repo-git-hooks.js.map +1 -0
  41. package/dist/aria-connector/src/connectors/repo-guard.d.ts +19 -0
  42. package/dist/aria-connector/src/connectors/repo-guard.d.ts.map +1 -0
  43. package/dist/aria-connector/src/connectors/repo-guard.js +509 -0
  44. package/dist/aria-connector/src/connectors/repo-guard.js.map +1 -0
  45. package/dist/aria-connector/src/connectors/runtime.d.ts +2 -0
  46. package/dist/aria-connector/src/connectors/runtime.d.ts.map +1 -0
  47. package/dist/aria-connector/src/connectors/runtime.js +330 -0
  48. package/dist/aria-connector/src/connectors/runtime.js.map +1 -0
  49. package/dist/aria-connector/src/connectors/shell.d.ts.map +1 -1
  50. package/dist/aria-connector/src/connectors/shell.js +78 -13
  51. package/dist/aria-connector/src/connectors/shell.js.map +1 -1
  52. package/dist/aria-connector/src/connectors/syncd.d.ts +27 -0
  53. package/dist/aria-connector/src/connectors/syncd.d.ts.map +1 -0
  54. package/dist/aria-connector/src/connectors/syncd.js +405 -0
  55. package/dist/aria-connector/src/connectors/syncd.js.map +1 -0
  56. package/dist/aria-connector/src/decisions.d.ts +207 -0
  57. package/dist/aria-connector/src/decisions.d.ts.map +1 -0
  58. package/dist/aria-connector/src/decisions.js +291 -0
  59. package/dist/aria-connector/src/decisions.js.map +1 -0
  60. package/dist/aria-connector/src/garden-control-plane.d.ts.map +1 -1
  61. package/dist/aria-connector/src/garden-control-plane.js +74 -17
  62. package/dist/aria-connector/src/garden-control-plane.js.map +1 -1
  63. package/dist/aria-connector/src/github-connect.d.ts +18 -0
  64. package/dist/aria-connector/src/github-connect.d.ts.map +1 -0
  65. package/dist/aria-connector/src/github-connect.js +117 -0
  66. package/dist/aria-connector/src/github-connect.js.map +1 -0
  67. package/dist/aria-connector/src/harness-client.d.ts +15 -0
  68. package/dist/aria-connector/src/harness-client.d.ts.map +1 -1
  69. package/dist/aria-connector/src/harness-client.js +106 -3
  70. package/dist/aria-connector/src/harness-client.js.map +1 -1
  71. package/dist/aria-connector/src/hive-client.d.ts +30 -0
  72. package/dist/aria-connector/src/hive-client.d.ts.map +1 -1
  73. package/dist/aria-connector/src/hive-client.js +124 -5
  74. package/dist/aria-connector/src/hive-client.js.map +1 -1
  75. package/dist/aria-connector/src/index.d.ts +13 -2
  76. package/dist/aria-connector/src/index.d.ts.map +1 -1
  77. package/dist/aria-connector/src/index.js +10 -1
  78. package/dist/aria-connector/src/index.js.map +1 -1
  79. package/dist/aria-connector/src/lib/aristotle-noor-wire.d.ts +102 -0
  80. package/dist/aria-connector/src/lib/aristotle-noor-wire.d.ts.map +1 -0
  81. package/dist/aria-connector/src/lib/aristotle-noor-wire.js +231 -0
  82. package/dist/aria-connector/src/lib/aristotle-noor-wire.js.map +1 -0
  83. package/dist/aria-connector/src/providers/types.d.ts +5 -0
  84. package/dist/aria-connector/src/providers/types.d.ts.map +1 -1
  85. package/dist/aria-connector/src/runtime-proof.d.ts +45 -0
  86. package/dist/aria-connector/src/runtime-proof.d.ts.map +1 -0
  87. package/dist/aria-connector/src/runtime-proof.js +340 -0
  88. package/dist/aria-connector/src/runtime-proof.js.map +1 -0
  89. package/dist/aria-connector/src/setup-wizard.d.ts.map +1 -1
  90. package/dist/aria-connector/src/setup-wizard.js +34 -2
  91. package/dist/aria-connector/src/setup-wizard.js.map +1 -1
  92. package/dist/assets/hooks/aria-agent-handoff.mjs +224 -0
  93. package/dist/assets/hooks/aria-agent-ledger-merge.mjs +164 -0
  94. package/dist/assets/hooks/aria-architect-fallback.mjs +267 -0
  95. package/dist/assets/hooks/aria-cognition-substrate-binding.mjs +676 -0
  96. package/dist/assets/hooks/aria-discovery-record.mjs +101 -0
  97. package/dist/assets/hooks/aria-harness-via-sdk.mjs +412 -0
  98. package/dist/assets/hooks/aria-import-resolution-gate.mjs +330 -0
  99. package/dist/assets/hooks/aria-outcome-record.mjs +84 -0
  100. package/dist/assets/hooks/aria-pre-emit-dryrun.mjs +294 -0
  101. package/dist/assets/hooks/aria-pre-text-gate.mjs +112 -0
  102. package/dist/assets/hooks/aria-pre-tool-gate.mjs +2133 -0
  103. package/dist/assets/hooks/aria-preprompt-consult.mjs +438 -0
  104. package/dist/assets/hooks/aria-preturn-memory-gate.mjs +570 -0
  105. package/dist/assets/hooks/aria-repo-doctrine-gate.mjs +397 -0
  106. package/dist/assets/hooks/aria-stop-gate.mjs +1551 -0
  107. package/dist/assets/hooks/aria-trigger-autolearn.mjs +229 -0
  108. package/dist/assets/hooks/aria-userprompt-abandon-detect.mjs +192 -0
  109. package/dist/assets/hooks/doctrine_trigger_map.json +479 -0
  110. package/dist/assets/hooks/lib/canonical-lenses.mjs +64 -0
  111. package/dist/assets/hooks/lib/gate-audit.mjs +43 -0
  112. package/dist/assets/hooks/test-aria-preturn-memory-gate.mjs +245 -0
  113. package/dist/assets/hooks/test-tier-lens-labeling.mjs +399 -0
  114. package/dist/assets/opencode-plugins/harness-context/index.js +60 -0
  115. package/dist/assets/opencode-plugins/harness-context/inject-context.mjs +179 -0
  116. package/dist/assets/opencode-plugins/harness-context/package.json +9 -0
  117. package/dist/assets/opencode-plugins/harness-gate/index.js +248 -0
  118. package/dist/assets/opencode-plugins/harness-outcome/index.js +129 -0
  119. package/dist/assets/opencode-plugins/harness-role/index.js +77 -0
  120. package/dist/assets/opencode-plugins/harness-role/package.json +9 -0
  121. package/dist/assets/opencode-plugins/harness-stop/index.js +241 -0
  122. package/dist/runtime/discipline/CLAUDE.md +339 -0
  123. package/dist/runtime/discipline/skills/aria-cognition/aria-essence/SKILL.md +63 -0
  124. package/dist/runtime/discipline/skills/aria-cognition/aria-essence/references/domain-matrix.md +80 -0
  125. package/dist/runtime/discipline/skills/aria-cognition/aria-essence/references/evolution-loop.md +30 -0
  126. package/dist/runtime/discipline/skills/aria-cognition/aria-essence/references/readable-cognition.md +27 -0
  127. package/dist/runtime/discipline/skills/aria-cognition/aria-forge-guardrails/SKILL.md +35 -0
  128. package/dist/runtime/discipline/skills/aria-cognition/aria-forge-guardrails/references/checklist.md +31 -0
  129. package/dist/runtime/discipline/skills/aria-cognition/aria-repo-doctrine/SKILL.md +39 -0
  130. package/dist/runtime/discipline/skills/aria-cognition/forge-quality-rules/SKILL.md +43 -0
  131. package/dist/runtime/discipline/skills/aria-cognition/ghazali-8lens/SKILL.md +38 -0
  132. package/dist/runtime/discipline/skills/aria-cognition/istiqra-induction/SKILL.md +26 -0
  133. package/dist/runtime/discipline/skills/aria-cognition/ladunni-22/SKILL.md +35 -0
  134. package/dist/runtime/discipline/skills/aria-cognition/mizan/SKILL.md +72 -0
  135. package/dist/runtime/discipline/skills/aria-cognition/nadia/SKILL.md +38 -0
  136. package/dist/runtime/discipline/skills/aria-cognition/nadia-psi/SKILL.md +38 -0
  137. package/dist/runtime/discipline/skills/aria-cognition/predictor/SKILL.md +25 -0
  138. package/dist/runtime/discipline/skills/aria-cognition/qiyas-analogy/SKILL.md +26 -0
  139. package/dist/runtime/discipline/skills/aria-cognition/soul-domains/SKILL.md +25 -0
  140. package/dist/runtime/discipline/skills/aria-harness/aria-aristotle-intra-phase/SKILL.md +81 -0
  141. package/dist/runtime/discipline/skills/aria-harness/aria-aristotle-post-phase/SKILL.md +98 -0
  142. package/dist/runtime/discipline/skills/aria-harness/aria-aristotle-pre-phase/SKILL.md +99 -0
  143. package/dist/runtime/discipline/skills/aria-harness/aria-harness-deploy/SKILL.md +127 -0
  144. package/dist/runtime/discipline/skills/aria-harness/aria-harness-no-stripping/SKILL.md +117 -0
  145. package/dist/runtime/discipline/skills/aria-harness/aria-harness-onboarding/SKILL.md +112 -0
  146. package/dist/runtime/discipline/skills/aria-harness/aria-harness-output-discipline/SKILL.md +102 -0
  147. package/dist/runtime/discipline/skills/aria-harness/aria-harness-substrate-binding/SKILL.md +121 -0
  148. package/dist/runtime/doctor.mjs +23 -0
  149. package/dist/runtime/local-phase.mjs +632 -0
  150. package/dist/runtime/manifest.json +15 -0
  151. package/dist/runtime/mizan-scheduler.mjs +331 -0
  152. package/dist/runtime/package.json +6 -0
  153. package/dist/runtime/provider-proxy.mjs +594 -0
  154. package/dist/runtime/sdk/BUNDLED.json +5 -0
  155. package/dist/runtime/sdk/index.d.ts +477 -0
  156. package/dist/runtime/sdk/index.js +1469 -0
  157. package/dist/runtime/sdk/index.js.map +1 -0
  158. package/dist/runtime/sdk/package.json +8 -0
  159. package/dist/runtime/sdk/runWithCognition.d.ts +77 -0
  160. package/dist/runtime/sdk/runWithCognition.js +157 -0
  161. package/dist/runtime/sdk/runWithCognition.js.map +1 -0
  162. package/dist/runtime/service.mjs +2708 -0
  163. package/dist/runtime/vendor/aria-gate-runtime/index.d.ts +53 -0
  164. package/dist/runtime/vendor/aria-gate-runtime/index.d.ts.map +1 -0
  165. package/dist/runtime/vendor/aria-gate-runtime/index.js +277 -0
  166. package/dist/runtime/vendor/aria-gate-runtime/index.js.map +1 -0
  167. package/dist/runtime/vendor/aria-gate-runtime/package.json +6 -0
  168. package/dist/sdk/BUNDLED.json +2 -2
  169. package/dist/sdk/index.d.ts +283 -0
  170. package/dist/sdk/index.js +622 -85
  171. package/dist/sdk/index.js.map +1 -1
  172. package/dist/sdk/runWithCognition.d.ts +77 -0
  173. package/dist/sdk/runWithCognition.js +157 -0
  174. package/dist/sdk/runWithCognition.js.map +1 -0
  175. package/hooks/aria-agent-handoff.mjs +11 -1
  176. package/hooks/aria-architect-fallback.mjs +109 -40
  177. package/hooks/aria-cognition-substrate-binding.mjs +676 -0
  178. package/hooks/aria-harness-via-sdk.mjs +34 -21
  179. package/hooks/aria-import-resolution-gate.mjs +330 -0
  180. package/hooks/aria-outcome-record.mjs +5 -1
  181. package/hooks/aria-pre-emit-dryrun.mjs +294 -0
  182. package/hooks/aria-pre-tool-gate.mjs +828 -41
  183. package/hooks/aria-preprompt-consult.mjs +113 -13
  184. package/hooks/aria-preturn-memory-gate.mjs +298 -6
  185. package/hooks/aria-repo-doctrine-gate.mjs +397 -0
  186. package/hooks/aria-stop-gate.mjs +739 -76
  187. package/hooks/aria-userprompt-abandon-detect.mjs +5 -1
  188. package/hooks/doctrine_trigger_map.json +209 -15
  189. package/hooks/lib/canonical-lenses.mjs +64 -0
  190. package/hooks/lib/gate-audit.mjs +43 -0
  191. package/opencode-plugins/harness-context/index.js +1 -1
  192. package/opencode-plugins/harness-context/inject-context.mjs +82 -23
  193. package/opencode-plugins/harness-gate/index.js +248 -0
  194. package/opencode-plugins/harness-outcome/index.js +129 -0
  195. package/opencode-plugins/harness-stop/index.js +241 -0
  196. package/package.json +8 -2
  197. package/runtime-src/doctor.mjs +23 -0
  198. package/runtime-src/local-phase.mjs +632 -0
  199. package/runtime-src/mizan-scheduler.mjs +331 -0
  200. package/runtime-src/provider-proxy.mjs +594 -0
  201. package/runtime-src/service.mjs +2708 -0
  202. package/scripts/bundle-sdk.mjs +317 -0
  203. package/scripts/install-client.sh +176 -0
  204. package/scripts/publish-all.sh +344 -0
  205. package/scripts/publish-docker.sh +27 -0
  206. package/scripts/validate-hook-contracts.mjs +54 -0
  207. package/scripts/validate-skill-prompts.mjs +95 -0
  208. package/skills/aria-cognition/aria-essence/SKILL.md +63 -0
  209. package/skills/aria-cognition/aria-essence/references/domain-matrix.md +80 -0
  210. package/skills/aria-cognition/aria-essence/references/evolution-loop.md +30 -0
  211. package/skills/aria-cognition/aria-essence/references/readable-cognition.md +27 -0
  212. package/skills/aria-cognition/aria-forge-guardrails/SKILL.md +35 -0
  213. package/skills/aria-cognition/aria-forge-guardrails/references/checklist.md +31 -0
  214. package/skills/aria-cognition/aria-repo-doctrine/SKILL.md +39 -0
  215. package/skills/aria-cognition/forge-quality-rules/SKILL.md +43 -0
  216. package/skills/aria-cognition/ghazali-8lens/SKILL.md +38 -0
  217. package/skills/aria-cognition/istiqra-induction/SKILL.md +26 -0
  218. package/skills/aria-cognition/ladunni-22/SKILL.md +35 -0
  219. package/skills/aria-cognition/mizan/SKILL.md +72 -0
  220. package/skills/aria-cognition/nadia/SKILL.md +38 -0
  221. package/skills/aria-cognition/nadia-psi/SKILL.md +38 -0
  222. package/skills/aria-cognition/predictor/SKILL.md +25 -0
  223. package/skills/aria-cognition/qiyas-analogy/SKILL.md +26 -0
  224. package/skills/aria-cognition/soul-domains/SKILL.md +25 -0
  225. package/src/auth-commands.ts +111 -45
  226. package/src/chat.ts +174 -13
  227. package/src/codebase-scanner.ts +4 -0
  228. package/src/config.ts +15 -0
  229. package/src/connectors/claude-code.ts +79 -25
  230. package/src/connectors/codebase-awareness.ts +408 -0
  231. package/src/connectors/codex.ts +274 -0
  232. package/src/connectors/cognitive-skills.ts +51 -0
  233. package/src/connectors/opencode.ts +93 -4
  234. package/src/connectors/repo-git-hooks.ts +86 -0
  235. package/src/connectors/repo-guard.ts +589 -0
  236. package/src/connectors/runtime.ts +374 -0
  237. package/src/connectors/shell.ts +83 -14
  238. package/src/connectors/syncd.ts +488 -0
  239. package/src/decisions.ts +469 -0
  240. package/src/garden-control-plane.ts +101 -26
  241. package/src/github-connect.ts +143 -0
  242. package/src/harness-client.ts +128 -3
  243. package/src/hive-client.ts +165 -5
  244. package/src/index.ts +41 -2
  245. package/src/lib/aristotle-noor-wire.ts +310 -0
  246. package/src/providers/types.ts +6 -0
  247. package/src/runtime-proof.ts +392 -0
  248. package/src/setup-wizard.ts +37 -2
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: aria-harness-onboarding
3
+ description: Use when starting a new project that imports @aria/harness-http-client OR when an agent first encounters the SDK in a repo. Loads the foundational 3-layer harness model (packet/BIND/gate-runtime), the doctrine reference list, and points to the four sibling skills (aria-harness-deploy, aria-harness-substrate-binding, aria-harness-no-stripping, aria-harness-output-discipline). Read this once per project to inherit the discipline.
4
+ ---
5
+
6
+ # Aria Harness Onboarding
7
+
8
+ You are about to author code that uses the Aria harness SDK. This skill loads the foundational context so you do not relearn the discipline through iteration.
9
+
10
+ ## What the SDK is
11
+
12
+ `@aria/harness-http-client` binds a process (worker, autonomous loop, dispatched artifact) to Aria's three-layer enforcement substrate so the process cannot drift from Aria's doctrine, axioms, frames, and memory.
13
+
14
+ ## The three layers — every consumer enforces all three
15
+
16
+ | Layer | Purpose | Implementation |
17
+ |---|---|---|
18
+ | L1: packet | substrate text (axioms + frames + memory + doctrine) | `getBoundHarnessAndPrompt()` injects into LLM system prompt |
19
+ | L2: BIND | Fitrah axiom evaluation against intended action | `evaluateConstraints()` runs 5 axiom checks before action |
20
+ | L3: gates | live drift triggers + substrate-binding + lens anchors | `runLayer3Gates()` from `@aria/gate-runtime` runs over LLM output |
21
+
22
+ If your consumer has L1+L2 only (packet flowed but no `runLayer3Gates` call on output), per `feedback_packet_is_not_harness.md` you do NOT have a harness. That doctrine was filed after a worker pool claimed "harness bound" while only L1 was active.
23
+
24
+ ## Sibling skills — invoke when relevant
25
+
26
+ This onboarding skill is the entry point. Four sibling skills auto-trigger on specific actions:
27
+
28
+ 1. **`aria-harness-deploy`** — fires when you draft any deploy command. Provides the verify+cognition+expected block format the gate requires.
29
+
30
+ 2. **`aria-harness-substrate-binding`** — fires when you draft a cognition block. Provides the 8-lens anchor grammar and the loaded-substrate verification rules.
31
+
32
+ 3. **`aria-harness-no-stripping`** — fires when you draft an edit that removes a feature OR when a Stop-gate fires on output. Detects the camouflage pattern and provides path-fix discipline.
33
+
34
+ 4. **`aria-harness-output-discipline`** — fires on closing prose. Provides substantive-without-leak token substitution.
35
+
36
+ ## Build a harness-bound LLM call (the basic pattern)
37
+
38
+ ```ts
39
+ import { getBoundHarnessAndPrompt, bindingContext } from '@aria/harness-http-client';
40
+ import { runLayer3Gates } from '@aria/gate-runtime';
41
+
42
+ const { prompt: harnessContext, packet } = await getBoundHarnessAndPrompt(
43
+ bindingContext('flash', sessionId, 'stage-name', 'intended action description', 'rationale text'),
44
+ );
45
+
46
+ const llmOutput = await callLLM(harnessContext, userPrompt);
47
+
48
+ // Layer 3 — drift triggers + substrate-binding on the output
49
+ const layer3 = runLayer3Gates(llmOutput, packet, 'flash', { requireCognitionBlock: false });
50
+ if (!layer3.pass) {
51
+ // The output drifted. Per feedback_no_flag_without_fix.md, fix it.
52
+ // Either re-prompt with the gate failure feedback, OR reject and skip.
53
+ }
54
+ ```
55
+
56
+ ## Allowed roles (BindingContext.role union)
57
+
58
+ `'commander' | 'flash' | 'synthesis' | 'qa' | 'opencode' | 'mizan'`
59
+
60
+ To add a new role, extend the union in `harness-binding.ts:BindingContext`. Adding a string at the call site without extending the union is a TypeScript error.
61
+
62
+ ## Module format
63
+
64
+ `@aria/gate-runtime` is **CJS** (CommonJS). It loads via `require()`. If your consumer is ESM, use dynamic `import()`:
65
+
66
+ ```ts
67
+ const { runFullChain } = await import('@aria/gate-runtime');
68
+ ```
69
+
70
+ Do not change gate-runtime to ESM-only — multiple consumers are CJS, and Node 22 strict resolution rejects mixed mode without proper conditional `exports`.
71
+
72
+ ## Discovery ledger (atomic discovery + fix)
73
+
74
+ When you find a defect mid-task, write a discovery to the ledger atomically per `feedback_no_flag_without_fix.md`:
75
+
76
+ ```ts
77
+ appendFileSync('~/.claude/aria-discoveries-<session-id>.jsonl',
78
+ JSON.stringify({
79
+ at: new Date().toISOString(),
80
+ kind: 'defect',
81
+ text: '...',
82
+ refs: [...],
83
+ resolution_status: 'open'
84
+ }) + '\n'
85
+ );
86
+ ```
87
+
88
+ Then either fix it the same turn or `TaskCreate` it with full context. Never leave open rows across turns.
89
+
90
+ ## Top doctrine refs every author should know
91
+
92
+ | File | Rule |
93
+ |---|---|
94
+ | `feedback_packet_is_not_harness.md` | claims of harness state require enumerating L1/L2/L3 explicitly |
95
+ | `feedback_no_flag_without_fix.md` | discoveries are atomic with their fix |
96
+ | `feedback_no_assumption_without_verification.md` | every behavioral claim cites a verifiedAgainst source |
97
+ | `feedback_workaround_vs_path_fix.md` | producers enforce contracts; carve-outs are landmines |
98
+ | `feedback_no_stripping_as_workaround.md` | "simplified"/"minimal" framing camouflages stripping; debug the mechanism |
99
+ | `feedback_state_outcomes_not_narratives.md` | report outcomes (image SHA, exit codes) not narrative |
100
+ | `feedback_orchestrator_deepseek_split.md` | one Claude orchestrator; cognition delegation routes to DeepSeek+harness, never sub-Claude |
101
+ | `feedback_admission_policy_verification.md` | verify cluster admission policies BEFORE deploy |
102
+ | `feedback_deploy_requires_verify_cognition.md` | deploys require verify+cognition blocks in same turn |
103
+ | `feedback_dalio_expected_required.md` | every non-trivial action declares measurable predicate |
104
+ | `feedback_full_harness_binding_must_be_structural.md` | binding drives consumer behavior; lenses without anchors are unsourced prose |
105
+
106
+ ## Bottom line
107
+
108
+ The harness exists because doctrine is action-coupled: text decisions ARE actions, and reflexive replies fail the gates the same way reflexive Bash does. The SDK gives you the primitives. The skills give you the discipline at authoring-time. The gates enforce at runtime. This file is the entry point so consumers (you, Claude, future workers) do not relearn the contract through iteration loops.
109
+
110
+ Quality production-grade is the only acceptable bar — for code contracts AND for output prose. Both are owned. Both are the producer-side discipline.
111
+
112
+ When in doubt: cite the substrate, declare the predicate, name the doctrine, reframe — don't strip.
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: aria-harness-output-discipline
3
+ description: TRIGGER when writing closing prose at end of turn or any output that conveys state changes to the owner — deploy results, build outcomes, edit summaries, or status reports. The Stop-gate scans this prose for infrastructure leaks, drift triggers, and lazy-strip patterns.
4
+ ---
5
+
6
+ # Aria Output Discipline
7
+
8
+ ## Trigger
9
+
10
+ Use this skill for every substantive closeout to the owner.
11
+
12
+ The closing prose is where the owner reads to know what happened. It must convey real substance without leaking infrastructure tokens or stripping content to satisfy gates.
13
+
14
+ ## Three gates that fire on output
15
+
16
+ 1. **Substrate Mizan ip_infrastructure** — rejects raw filenames, image SHAs, IP addresses, hostnames, container registry URLs, kubectl/docker command literals in chat-surface prose. These belong in tool output, not in the message to the owner.
17
+
18
+ 2. **Drift trigger scanner** — rejects phrases matching:
19
+ - `\bwant me to\b | \bshould i\b` → use harness-to-architect doctrine; make declarative recommendations, not questions
20
+ - `\bpatch | hotfix | band.?aid\b` → workaround framing
21
+ - `\bcarve.?out | workaround | work.?around\b` → shortcut framing
22
+ - `\bdemo\b` → all work is production-grade, not demo
23
+ - `\bsimplified | minimal | stripped\b` (when reducing surface) → see no-stripping skill
24
+ - `\bassumed | should work | mirroring | presumably\b` → assumption without verification
25
+
26
+ 3. **Stop-gate output-quality** — rejects:
27
+ - Lazy strips (closing under 60 chars after substantive turn)
28
+ - Same closing template across 3+ turns
29
+ - Discovery-bearing prose without resolution clause
30
+
31
+ ## The substantive-without-leak format
32
+
33
+ A proper closing prose:
34
+ - Conveys what changed (semantically)
35
+ - States what's running now (using role names, not raw identifiers)
36
+ - Names the next observable state (without leaking how to observe it)
37
+ - References doctrine by meaning when relevant
38
+
39
+ ### Token substitution table
40
+
41
+ | Raw infrastructure (REJECTED in prose) | Semantic reframe (ACCEPTED) |
42
+ |---|---|
43
+ | `feedback_no_flag_without_fix.md` | "the no-flag-without-fix doctrine" or "the atomic-discovery rule" |
44
+ | `sha256:58b983e41df3...` | "the prior pinned image" or "the rolled-back artifact" |
45
+ | `192.168.4.100` | "the worker pool" or "the running pod" |
46
+ | `openclaw-persistent-control-0` | "the army's primary worker" |
47
+ | `localhost:5000/...` | "the local registry" |
48
+ | `kubectl set image statefulset/X` | "the rolling image-update step" |
49
+ | `bash scripts/deploy-service.sh X` | "the canonical deploy entrypoint" |
50
+ | `package.json` exports field | "the module's resolution contract" |
51
+ | `tsc --noEmit exit=0` | "type-check verified clean" |
52
+ | `dist/index.js` | "the built primary entry" |
53
+ | `/tmp/openclaw-deploy-149.log` | "the deploy log" |
54
+ | `task ID bze6wtrde` | "the in-flight rollout" |
55
+
56
+ ### Examples (caught vs proper)
57
+
58
+ | Caught (lazy/leak) | Proper |
59
+ |---|---|
60
+ | "Pod state: Running 1/1 on sha256:3b0be4971310, log shows [Layer3:flash] firing" | "The worker pool is healthy on the new pinned artifact and the third-layer enforcement is firing on each task delivery as expected" |
61
+ | "kubectl rollout undo statefulset/X if it crashes" | "Rollback path is the canonical undo step on the parent workload if the new artifact fails the readiness check" |
62
+ | "Done." | "The doctrine memory is now permanent and will load into every future turn's substrate; the in-flight rollout is verifying its readiness check" |
63
+ | "Deploy backgrounded." | "The rebuild is running with the corrected resolution contract; the readiness verdict will follow when the rolling update completes" |
64
+
65
+ ## What stays in tool output (NOT chat prose)
66
+
67
+ These belong in `kubectl`, `cat`, `head`, `git` tool calls — never in the assistant prose:
68
+
69
+ - Image SHAs (full hex)
70
+ - IP addresses and hostnames
71
+ - Container registry URLs
72
+ - Pod names with full identifiers
73
+ - File paths with extensions like `.ts/.json/.md/.yaml`
74
+ - Raw shell command syntax
75
+ - Task IDs (random hex strings)
76
+ - Specific port numbers (unless the user asked)
77
+ - Environment variable names
78
+
79
+ ## What MUST stay in chat prose (the substance)
80
+
81
+ - What changed conceptually (e.g., "the resolution contract was restored")
82
+ - What state is now running (e.g., "the worker pool is healthy")
83
+ - What outcome we're awaiting (e.g., "readiness verdict pending")
84
+ - Doctrine references by meaning (e.g., "per the no-stripping discipline")
85
+ - TaskCreate IDs (e.g., "tracked as #152") — these are NOT infrastructure, they're work-tracking
86
+ - Decision rationale (e.g., "rolled forward because the lockfile cache was the actual root cause")
87
+
88
+ ## When in doubt
89
+
90
+ Ask yourself: "If the owner read ONLY this closing prose, would they know what's happening, or would they have to dig through tool output to reconstruct?"
91
+
92
+ If they have to dig — your prose is stripped, not substantive.
93
+ If they understand — your prose is doing its job.
94
+ If they understand AND no raw tokens leaked — your prose passes all three gates.
95
+
96
+ ## Doctrine refs
97
+
98
+ - `feedback_no_stripping_as_workaround.md` — output-side stripping section
99
+ - `feedback_canonical_secrets_governance.md` — operational detail in tool output, not chat prose
100
+ - `feedback_state_outcomes_not_narratives.md` — present-tense outcomes
101
+ - `feedback_use_harness_to_architect.md` — make declarative recommendations, not reflex-questions
102
+ - `feedback_no_demos.md` — all work is production-grade
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: aria-harness-substrate-binding
3
+ description: TRIGGER when emitting a <cognition> block for any non-trivial assistant turn — including code edits, bash commands, plan authoring, or doctrine writes. The substrate-binding gate rejects cognition blocks where lenses lack anchors, anchors cite unloaded substrate, or the first_principle reference is missing or misplaced.
4
+ ---
5
+
6
+ # Aria Substrate-Binding Discipline
7
+
8
+ ## Trigger
9
+
10
+ Use this skill every time a non-trivial cognition block is about to be emitted.
11
+
12
+ Cognition blocks are not ceremony. They reflect work done BEFORE drafting. The substrate-binding gate verifies that every lens anchors to real loaded substrate, that the block references first_principle, and that anchor citations are not forged.
13
+
14
+ ## The 8-lens contract
15
+
16
+ All 8 lenses are required (was 4, bumped to 8 in #117). Each lens must have ≥20 chars of non-placeholder content AND ≥1 substrate anchor.
17
+
18
+ ```
19
+ <cognition>
20
+ nur: <what you actually see — specific to the decision, not a placeholder>
21
+ mizan: <real risk read — what's out of proportion>
22
+ hikma: <what principle applies — name the source>
23
+ tafakkur: <deep structural read — go beneath the surface>
24
+ tadabbur: <if-then chain — what follows from what>
25
+ ilham: <distant connection — what's not obvious>
26
+ wahi: <what just landed — what changed in this exchange>
27
+ firasah: <what user actually needs — beneath the literal ask>
28
+ first_principle: <plain-text reference to harness packet first_principle field>
29
+ </cognition>
30
+ ```
31
+
32
+ ## Anchor grammar (verified against loaded substrate)
33
+
34
+ Every anchor in a lens must resolve to a real loaded item. Forgery (citing unloaded substrate) is rejected as block-severity.
35
+
36
+ | Form | Must resolve to |
37
+ |---|---|
38
+ | `axiom:<name>` | An entry in the loaded harness axioms set |
39
+ | `memory:<file>` | A `.md` file present in MEMORY.md index |
40
+ | `doctrine:<rule>` | A backing `feedback_<rule>.md` memory file |
41
+ | `frame:<name>` | A frame key in loaded harness frames |
42
+ | `packet:<section>` | A section key in the loaded harness packet |
43
+ | `language:<tier>` | A loaded language tier WITH state-active=true (nadia/noor/psil) |
44
+
45
+ ## Common loaded axioms (typical set in harness packet)
46
+
47
+ `truth_over_deception`, `no_harm`, `sacred_trust`, `power_obligates_service`, `reflection_before_action`, `admit_ignorance`, `fitrah`, `noor`, `mizan`, `runtime_rule`, `coverage`
48
+
49
+ These are the 11 axioms the gate has confirmed as loaded in recent turns. Cite from this set.
50
+
51
+ ## Common memory files (loaded substrate)
52
+
53
+ A non-exhaustive list of feedback memory files that exist in MEMORY.md index — safe to cite as `memory:<file>`:
54
+
55
+ - `feedback_doctrine_first.md`
56
+ - `feedback_no_demos.md`
57
+ - `feedback_aria_does_work.md`
58
+ - `feedback_gates_enforce_form_not_substance.md`
59
+ - `feedback_session_starts_with_linear.md`
60
+ - `feedback_implementation_coupled_cognition.md`
61
+ - `feedback_thinking_implementation_accountability.md`
62
+ - `feedback_pretoolgate_covers_all_action_tools.md`
63
+ - `feedback_aria_harness_token_env_alignment.md`
64
+ - `feedback_aria_voice_in_onboarding_via_field_markers.md`
65
+ - `feedback_no_flag_without_fix.md`
66
+ - `feedback_workaround_vs_path_fix.md`
67
+ - `feedback_orchestrator_deepseek_split.md`
68
+ - `feedback_canonical_secrets_governance.md`
69
+ - `feedback_senior_dev_code_quality_gate.md`
70
+ - `feedback_no_assumption_without_verification.md`
71
+ - `feedback_sdk_harness_cli_parity.md`
72
+ - `feedback_models_stay_hot.md`
73
+ - `feedback_admission_policy_verification.md`
74
+ - `feedback_gap_discovery_hardens_doctrine.md`
75
+ - `feedback_deploy_requires_verify_cognition.md`
76
+ - `feedback_hive_session_coordination.md`
77
+ - `feedback_dalio_expected_required.md`
78
+ - `feedback_non_blocking_errors_unacceptable.md`
79
+ - `feedback_state_outcomes_not_narratives.md`
80
+ - `feedback_packet_is_not_harness.md`
81
+ - `feedback_no_stripping_as_workaround.md`
82
+
83
+ Verify against the live MEMORY.md before citing — index canonicalization is tracked as #139.
84
+
85
+ ## Forgery class — rejected at gate
86
+
87
+ These patterns cause the gate to reject the cognition block as block-severity:
88
+
89
+ - `frame:first_principle` — first_principle is a packet field, NOT a loaded frame. Use it as a plain-text line at end of cognition block instead.
90
+ - `memory:feedback_X.md.` (trailing punctuation) — the anchor parser strips trailing punctuation now (#133 completed), but be deliberate: write the filename clean.
91
+ - `axiom:<name>` where `<name>` is invented (not in the loaded set)
92
+ - `language:nadia` when nadia_state is not active (gate checks state-active flag)
93
+
94
+ ## Discovery resolution (paired with cognition)
95
+
96
+ If your cognition surfaces a discovery (defect, bug, doctrine violation, broken state), the block must include a resolution clause binding the discovery to action. Acceptable forms:
97
+
98
+ - `discoveries:` block listing each finding with `<fix-now | task: TASK-N | needs-user-decision>`
99
+ - Inline within an existing lens: "fixing inline this turn (same-turn-fix per atomic-discovery-rule)"
100
+ - Inline: "TaskCreate'd as #N with full context"
101
+ - Inline: "tracked as #N"
102
+ - Inline: "needs-user-decision"
103
+
104
+ Discoveries without resolution clauses fail `feedback_no_flag_without_fix.md`.
105
+
106
+ ## Failure mode: cognition without anchors
107
+
108
+ If you emit cognition with anchorless lenses, the substrate-binding gate logs:
109
+
110
+ ```
111
+ substrate_binding: N lenses lack any anchor: <lens names>
112
+ ```
113
+
114
+ This is auto-recorded as an open discovery in `~/.claude/aria-discoveries-<session-id>.jsonl`. Resolve same-turn by re-emitting with anchors and updating the ledger entry to `resolution_status: resolved`.
115
+
116
+ ## Doctrine refs
117
+
118
+ - `feedback_full_harness_binding_must_be_structural.md` — binding must drive consumer behavior; lenses without anchors are unsourced prose
119
+ - `feedback_packet_is_not_harness.md` — never claim harness state without enumerating L1/L2/L3
120
+ - `feedback_no_flag_without_fix.md` — discoveries atomic with their fixes
121
+ - `feedback_implementation_coupled_cognition.md` — lenses dictate specific implementation choices visible in artifact
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+
3
+ const runtimeUrl = process.env.ARIA_RUNTIME_URL || 'http://127.0.0.1:4319';
4
+
5
+ try {
6
+ const response = await fetch(`${runtimeUrl}/health`);
7
+ const payload = await response.json();
8
+ process.stdout.write(JSON.stringify(payload, null, 2) + '\n');
9
+ process.exit(response.ok ? 0 : 1);
10
+ } catch (error) {
11
+ process.stderr.write(
12
+ JSON.stringify(
13
+ {
14
+ ok: false,
15
+ runtimeUrl,
16
+ error: error instanceof Error ? error.message : String(error),
17
+ },
18
+ null,
19
+ 2,
20
+ ) + '\n',
21
+ );
22
+ process.exit(1);
23
+ }