@aria_asi/cli 0.2.26 → 0.2.30

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 (253) 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/self-update.d.ts +2 -1
  90. package/dist/aria-connector/src/self-update.d.ts.map +1 -1
  91. package/dist/aria-connector/src/self-update.js +84 -8
  92. package/dist/aria-connector/src/self-update.js.map +1 -1
  93. package/dist/aria-connector/src/setup-wizard.d.ts.map +1 -1
  94. package/dist/aria-connector/src/setup-wizard.js +34 -2
  95. package/dist/aria-connector/src/setup-wizard.js.map +1 -1
  96. package/dist/assets/hooks/aria-agent-handoff.mjs +224 -0
  97. package/dist/assets/hooks/aria-agent-ledger-merge.mjs +164 -0
  98. package/dist/assets/hooks/aria-architect-fallback.mjs +267 -0
  99. package/dist/assets/hooks/aria-cognition-substrate-binding.mjs +668 -0
  100. package/dist/assets/hooks/aria-discovery-record.mjs +101 -0
  101. package/dist/assets/hooks/aria-harness-via-sdk.mjs +412 -0
  102. package/dist/assets/hooks/aria-import-resolution-gate.mjs +330 -0
  103. package/dist/assets/hooks/aria-outcome-record.mjs +84 -0
  104. package/dist/assets/hooks/aria-pre-emit-dryrun.mjs +294 -0
  105. package/dist/assets/hooks/aria-pre-text-gate.mjs +112 -0
  106. package/dist/assets/hooks/aria-pre-tool-gate.mjs +2133 -0
  107. package/dist/assets/hooks/aria-preprompt-consult.mjs +438 -0
  108. package/dist/assets/hooks/aria-preturn-memory-gate.mjs +570 -0
  109. package/dist/assets/hooks/aria-repo-doctrine-gate.mjs +397 -0
  110. package/dist/assets/hooks/aria-stop-gate.mjs +1551 -0
  111. package/dist/assets/hooks/aria-trigger-autolearn.mjs +229 -0
  112. package/dist/assets/hooks/aria-userprompt-abandon-detect.mjs +192 -0
  113. package/dist/assets/hooks/doctrine_trigger_map.json +479 -0
  114. package/dist/assets/hooks/lib/canonical-lenses.mjs +64 -0
  115. package/dist/assets/hooks/lib/gate-audit.mjs +43 -0
  116. package/dist/assets/hooks/test-aria-preturn-memory-gate.mjs +245 -0
  117. package/dist/assets/hooks/test-tier-lens-labeling.mjs +399 -0
  118. package/dist/assets/opencode-plugins/harness-context/index.js +60 -0
  119. package/dist/assets/opencode-plugins/harness-context/inject-context.mjs +179 -0
  120. package/dist/assets/opencode-plugins/harness-context/package.json +9 -0
  121. package/dist/assets/opencode-plugins/harness-gate/index.js +248 -0
  122. package/dist/assets/opencode-plugins/harness-outcome/index.js +129 -0
  123. package/dist/assets/opencode-plugins/harness-role/index.js +77 -0
  124. package/dist/assets/opencode-plugins/harness-role/package.json +9 -0
  125. package/dist/assets/opencode-plugins/harness-stop/index.js +241 -0
  126. package/dist/runtime/discipline/CLAUDE.md +339 -0
  127. package/dist/runtime/discipline/skills/aria-cognition/aria-essence/SKILL.md +63 -0
  128. package/dist/runtime/discipline/skills/aria-cognition/aria-essence/references/domain-matrix.md +80 -0
  129. package/dist/runtime/discipline/skills/aria-cognition/aria-essence/references/evolution-loop.md +30 -0
  130. package/dist/runtime/discipline/skills/aria-cognition/aria-essence/references/readable-cognition.md +27 -0
  131. package/dist/runtime/discipline/skills/aria-cognition/aria-forge-guardrails/SKILL.md +35 -0
  132. package/dist/runtime/discipline/skills/aria-cognition/aria-forge-guardrails/references/checklist.md +31 -0
  133. package/dist/runtime/discipline/skills/aria-cognition/aria-repo-doctrine/SKILL.md +39 -0
  134. package/dist/runtime/discipline/skills/aria-cognition/forge-quality-rules/SKILL.md +43 -0
  135. package/dist/runtime/discipline/skills/aria-cognition/ghazali-8lens/SKILL.md +38 -0
  136. package/dist/runtime/discipline/skills/aria-cognition/istiqra-induction/SKILL.md +26 -0
  137. package/dist/runtime/discipline/skills/aria-cognition/ladunni-22/SKILL.md +35 -0
  138. package/dist/runtime/discipline/skills/aria-cognition/mizan/SKILL.md +72 -0
  139. package/dist/runtime/discipline/skills/aria-cognition/nadia/SKILL.md +38 -0
  140. package/dist/runtime/discipline/skills/aria-cognition/nadia-psi/SKILL.md +38 -0
  141. package/dist/runtime/discipline/skills/aria-cognition/predictor/SKILL.md +25 -0
  142. package/dist/runtime/discipline/skills/aria-cognition/qiyas-analogy/SKILL.md +26 -0
  143. package/dist/runtime/discipline/skills/aria-cognition/soul-domains/SKILL.md +25 -0
  144. package/dist/runtime/discipline/skills/aria-harness/aria-aristotle-intra-phase/SKILL.md +81 -0
  145. package/dist/runtime/discipline/skills/aria-harness/aria-aristotle-post-phase/SKILL.md +98 -0
  146. package/dist/runtime/discipline/skills/aria-harness/aria-aristotle-pre-phase/SKILL.md +99 -0
  147. package/dist/runtime/discipline/skills/aria-harness/aria-harness-deploy/SKILL.md +127 -0
  148. package/dist/runtime/discipline/skills/aria-harness/aria-harness-no-stripping/SKILL.md +117 -0
  149. package/dist/runtime/discipline/skills/aria-harness/aria-harness-onboarding/SKILL.md +112 -0
  150. package/dist/runtime/discipline/skills/aria-harness/aria-harness-output-discipline/SKILL.md +102 -0
  151. package/dist/runtime/discipline/skills/aria-harness/aria-harness-substrate-binding/SKILL.md +121 -0
  152. package/dist/runtime/doctor.mjs +23 -0
  153. package/dist/runtime/local-phase.mjs +650 -0
  154. package/dist/runtime/manifest.json +15 -0
  155. package/dist/runtime/mizan-scheduler.mjs +331 -0
  156. package/dist/runtime/package.json +6 -0
  157. package/dist/runtime/provider-proxy.mjs +594 -0
  158. package/dist/runtime/sdk/BUNDLED.json +5 -0
  159. package/dist/runtime/sdk/index.d.ts +477 -0
  160. package/dist/runtime/sdk/index.js +1469 -0
  161. package/dist/runtime/sdk/index.js.map +1 -0
  162. package/dist/runtime/sdk/package.json +8 -0
  163. package/dist/runtime/sdk/runWithCognition.d.ts +77 -0
  164. package/dist/runtime/sdk/runWithCognition.js +157 -0
  165. package/dist/runtime/sdk/runWithCognition.js.map +1 -0
  166. package/dist/runtime/service.mjs +3058 -0
  167. package/dist/runtime/vendor/aria-gate-runtime/index.d.ts +53 -0
  168. package/dist/runtime/vendor/aria-gate-runtime/index.d.ts.map +1 -0
  169. package/dist/runtime/vendor/aria-gate-runtime/index.js +292 -0
  170. package/dist/runtime/vendor/aria-gate-runtime/index.js.map +1 -0
  171. package/dist/runtime/vendor/aria-gate-runtime/package.json +6 -0
  172. package/dist/sdk/BUNDLED.json +2 -2
  173. package/dist/sdk/index.d.ts +283 -0
  174. package/dist/sdk/index.js +622 -85
  175. package/dist/sdk/index.js.map +1 -1
  176. package/dist/sdk/runWithCognition.d.ts +77 -0
  177. package/dist/sdk/runWithCognition.js +157 -0
  178. package/dist/sdk/runWithCognition.js.map +1 -0
  179. package/hooks/aria-agent-handoff.mjs +11 -1
  180. package/hooks/aria-architect-fallback.mjs +109 -40
  181. package/hooks/aria-cognition-substrate-binding.mjs +668 -0
  182. package/hooks/aria-harness-via-sdk.mjs +34 -21
  183. package/hooks/aria-import-resolution-gate.mjs +330 -0
  184. package/hooks/aria-outcome-record.mjs +5 -1
  185. package/hooks/aria-pre-emit-dryrun.mjs +294 -0
  186. package/hooks/aria-pre-tool-gate.mjs +828 -41
  187. package/hooks/aria-preprompt-consult.mjs +113 -13
  188. package/hooks/aria-preturn-memory-gate.mjs +298 -6
  189. package/hooks/aria-repo-doctrine-gate.mjs +397 -0
  190. package/hooks/aria-stop-gate.mjs +739 -76
  191. package/hooks/aria-userprompt-abandon-detect.mjs +5 -1
  192. package/hooks/doctrine_trigger_map.json +209 -15
  193. package/hooks/lib/canonical-lenses.mjs +64 -0
  194. package/hooks/lib/gate-audit.mjs +43 -0
  195. package/opencode-plugins/harness-context/index.js +1 -1
  196. package/opencode-plugins/harness-context/inject-context.mjs +82 -23
  197. package/opencode-plugins/harness-gate/index.js +248 -0
  198. package/opencode-plugins/harness-outcome/index.js +129 -0
  199. package/opencode-plugins/harness-stop/index.js +241 -0
  200. package/package.json +9 -3
  201. package/runtime-src/doctor.mjs +23 -0
  202. package/runtime-src/local-phase.mjs +650 -0
  203. package/runtime-src/mizan-scheduler.mjs +331 -0
  204. package/runtime-src/provider-proxy.mjs +594 -0
  205. package/runtime-src/service.mjs +3058 -0
  206. package/scripts/bundle-sdk.mjs +317 -0
  207. package/scripts/install-client.sh +176 -0
  208. package/scripts/publish-all.sh +344 -0
  209. package/scripts/publish-docker.sh +27 -0
  210. package/scripts/validate-hook-contracts.mjs +54 -0
  211. package/scripts/validate-skill-prompts.mjs +95 -0
  212. package/skills/aria-cognition/aria-essence/SKILL.md +63 -0
  213. package/skills/aria-cognition/aria-essence/references/domain-matrix.md +80 -0
  214. package/skills/aria-cognition/aria-essence/references/evolution-loop.md +30 -0
  215. package/skills/aria-cognition/aria-essence/references/readable-cognition.md +27 -0
  216. package/skills/aria-cognition/aria-forge-guardrails/SKILL.md +35 -0
  217. package/skills/aria-cognition/aria-forge-guardrails/references/checklist.md +31 -0
  218. package/skills/aria-cognition/aria-repo-doctrine/SKILL.md +39 -0
  219. package/skills/aria-cognition/forge-quality-rules/SKILL.md +43 -0
  220. package/skills/aria-cognition/ghazali-8lens/SKILL.md +38 -0
  221. package/skills/aria-cognition/istiqra-induction/SKILL.md +26 -0
  222. package/skills/aria-cognition/ladunni-22/SKILL.md +35 -0
  223. package/skills/aria-cognition/mizan/SKILL.md +72 -0
  224. package/skills/aria-cognition/nadia/SKILL.md +38 -0
  225. package/skills/aria-cognition/nadia-psi/SKILL.md +38 -0
  226. package/skills/aria-cognition/predictor/SKILL.md +25 -0
  227. package/skills/aria-cognition/qiyas-analogy/SKILL.md +26 -0
  228. package/skills/aria-cognition/soul-domains/SKILL.md +25 -0
  229. package/src/auth-commands.ts +111 -45
  230. package/src/chat.ts +174 -13
  231. package/src/codebase-scanner.ts +4 -0
  232. package/src/config.ts +15 -0
  233. package/src/connectors/claude-code.ts +79 -25
  234. package/src/connectors/codebase-awareness.ts +408 -0
  235. package/src/connectors/codex.ts +274 -0
  236. package/src/connectors/cognitive-skills.ts +51 -0
  237. package/src/connectors/opencode.ts +93 -4
  238. package/src/connectors/repo-git-hooks.ts +86 -0
  239. package/src/connectors/repo-guard.ts +589 -0
  240. package/src/connectors/runtime.ts +374 -0
  241. package/src/connectors/shell.ts +83 -14
  242. package/src/connectors/syncd.ts +488 -0
  243. package/src/decisions.ts +469 -0
  244. package/src/garden-control-plane.ts +101 -26
  245. package/src/github-connect.ts +143 -0
  246. package/src/harness-client.ts +128 -3
  247. package/src/hive-client.ts +165 -5
  248. package/src/index.ts +41 -2
  249. package/src/lib/aristotle-noor-wire.ts +310 -0
  250. package/src/providers/types.ts +6 -0
  251. package/src/runtime-proof.ts +392 -0
  252. package/src/self-update.ts +89 -8
  253. package/src/setup-wizard.ts +37 -2
@@ -0,0 +1,344 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # ── @aria_asi/cli — Multi-Registry Publisher ──
5
+ # Canonical package: @aria_asi/cli
6
+ # Canonical registry: https://npm.pkg.github.com (publishConfig.registry)
7
+ # Legacy deprecated wrappers: aria-cli, aria-sdk, aria-full, aria-tui,
8
+ # aria-vscode-extension, aria-anthropic-gate — kept as DEPRECATED stubs only.
9
+ # Set tokens as env vars: NPM_TOKEN, GITHUB_TOKEN
10
+ # Usage: bash publish-all.sh [--dry-run]
11
+
12
+ # ── Dirty-tree refusal (structural — no exceptions) ──
13
+ if [[ -n "$(git status --porcelain)" ]]; then
14
+ count="$(git status --porcelain | wc -l | tr -d ' ')"
15
+ echo "I can't publish from a dirty tree — commit or stash your changes first. (uncommitted: ${count} files)" >&2
16
+ exit 1
17
+ fi
18
+
19
+ # ── Dry-run flag ──
20
+ DRY_RUN=false
21
+ for arg in "$@"; do
22
+ if [[ "$arg" == "--dry-run" ]]; then
23
+ DRY_RUN=true
24
+ fi
25
+ done
26
+
27
+ # ── Paths ──
28
+ DIR="$(cd "$(dirname "$0")/.." && pwd)"
29
+ SUMMARY_FILE="$(pwd)/publish-summary.json"
30
+
31
+ # ── Read canonical metadata ──
32
+ CANONICAL_NAME="@aria_asi/cli"
33
+ VERSION="$(node -e "console.log(require('${DIR}/package.json').version)")"
34
+ CANONICAL_REGISTRY="$(node -e "console.log(require('${DIR}/package.json').publishConfig.registry)")"
35
+
36
+ PUBLISHED=()
37
+
38
+ if [[ "$DRY_RUN" == "true" ]]; then
39
+ echo ""
40
+ echo " ═══ I'm running in --dry-run mode — no packages will actually ship ═══"
41
+ echo ""
42
+ fi
43
+
44
+ echo ""
45
+ echo " ═══ I'm publishing ${CANONICAL_NAME} v${VERSION} ═══"
46
+ echo ""
47
+
48
+ # ── Pre-publish package.json shape validation ──
49
+ validate_package_json() {
50
+ local pkg_dir="$1"
51
+ local expected_name="$2"
52
+ local pkg="$pkg_dir/package.json"
53
+
54
+ echo " I'm validating package.json shape at ${pkg}..."
55
+
56
+ node - "$pkg" "$expected_name" <<'VALIDATE_EOF'
57
+ const fs = require('fs');
58
+ const path = require('path');
59
+ // When invoked via `node - arg1 arg2 < script.js`, process.argv[1] is the
60
+ // literal '-' and real args start at argv[2]. Fix from the W5 sub-agent's
61
+ // off-by-one (was using argv[1]/argv[2] which read '-' as the path).
62
+ const pkgPath = process.argv[2];
63
+ const expectedName = process.argv[3];
64
+
65
+ let pkg;
66
+ try {
67
+ pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
68
+ } catch (e) {
69
+ console.error('package.json is not valid JSON: ' + e.message);
70
+ process.exit(1);
71
+ }
72
+
73
+ const errors = [];
74
+
75
+ // name check
76
+ if (!pkg.name) {
77
+ errors.push('missing "name" field');
78
+ } else if (pkg.name !== expectedName) {
79
+ errors.push(`"name" is "${pkg.name}" but expected "${expectedName}"`);
80
+ }
81
+
82
+ // version semver shape (basic regex: digits.digits.digits with optional pre-release)
83
+ if (!pkg.version) {
84
+ errors.push('missing "version" field');
85
+ } else if (!/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/.test(pkg.version)) {
86
+ errors.push(`"version" "${pkg.version}" is not semver-shaped`);
87
+ }
88
+
89
+ // main — field must exist and file must exist on disk
90
+ if (!pkg.main) {
91
+ errors.push('missing "main" field');
92
+ } else {
93
+ const mainPath = path.resolve(path.dirname(pkgPath), pkg.main);
94
+ if (!fs.existsSync(mainPath)) {
95
+ errors.push(`"main" points to "${pkg.main}" which does not exist on disk`);
96
+ }
97
+ }
98
+
99
+ // bin — if present, each file must exist and be executable
100
+ if (pkg.bin) {
101
+ const bins = typeof pkg.bin === 'string'
102
+ ? { [pkg.name]: pkg.bin }
103
+ : pkg.bin;
104
+ for (const [binName, binFile] of Object.entries(bins)) {
105
+ const binPath = path.resolve(path.dirname(pkgPath), binFile);
106
+ if (!fs.existsSync(binPath)) {
107
+ errors.push(`bin["${binName}"] points to "${binFile}" which does not exist`);
108
+ } else {
109
+ const stat = fs.statSync(binPath);
110
+ // Check executable bit (owner execute)
111
+ if (!(stat.mode & 0o100)) {
112
+ errors.push(`bin["${binName}"] at "${binFile}" is not executable (chmod +x it)`);
113
+ }
114
+ }
115
+ }
116
+ }
117
+
118
+ // publishConfig.registry
119
+ if (!pkg.publishConfig || !pkg.publishConfig.registry) {
120
+ errors.push('missing publishConfig.registry');
121
+ }
122
+
123
+ if (errors.length > 0) {
124
+ console.error('package.json shape validation failed:');
125
+ for (const e of errors) {
126
+ console.error(' - ' + e);
127
+ }
128
+ process.exit(1);
129
+ }
130
+
131
+ console.log(' package.json shape: OK');
132
+ VALIDATE_EOF
133
+ }
134
+
135
+ # ── publish-summary.json append helper ──
136
+ append_summary() {
137
+ local pkg_name="$1"
138
+ local pkg_version="$2"
139
+ local registry="$3"
140
+ local digest="$4"
141
+ local published_at
142
+ published_at="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
143
+
144
+ echo " I'll log this to publish-summary.json..."
145
+
146
+ local new_record
147
+ if command -v jq &>/dev/null; then
148
+ new_record="$(jq -n \
149
+ --arg package "$pkg_name" \
150
+ --arg version "$pkg_version" \
151
+ --arg registry "$registry" \
152
+ --arg digest "$digest" \
153
+ --arg publishedAt "$published_at" \
154
+ '{package: $package, version: $version, registry: $registry, digest: $digest, publishedAt: $publishedAt}')"
155
+
156
+ if [[ -f "$SUMMARY_FILE" ]]; then
157
+ local tmp
158
+ tmp="$(mktemp)"
159
+ jq --argjson rec "$new_record" '. + [$rec]' "$SUMMARY_FILE" > "$tmp"
160
+ mv "$tmp" "$SUMMARY_FILE"
161
+ else
162
+ jq -n --argjson rec "$new_record" '[$rec]' > "$SUMMARY_FILE"
163
+ fi
164
+ else
165
+ # jq not available — build JSON via printf
166
+ local record
167
+ printf -v record \
168
+ '{"package":"%s","version":"%s","registry":"%s","digest":"%s","publishedAt":"%s"}' \
169
+ "$pkg_name" "$pkg_version" "$registry" "$digest" "$published_at"
170
+
171
+ if [[ -f "$SUMMARY_FILE" ]]; then
172
+ # Strip trailing ] and append
173
+ local tmp
174
+ tmp="$(mktemp)"
175
+ python3 -c "
176
+ import json, sys
177
+ data = json.load(open('$SUMMARY_FILE'))
178
+ data.append(json.loads(sys.argv[1]))
179
+ print(json.dumps(data, indent=2))
180
+ " "$record" > "$tmp"
181
+ mv "$tmp" "$SUMMARY_FILE"
182
+ else
183
+ printf '[%s]\n' "$record" > "$SUMMARY_FILE"
184
+ fi
185
+ fi
186
+ }
187
+
188
+ # ── Validate canonical package ──
189
+ validate_package_json "$DIR" "$CANONICAL_NAME"
190
+
191
+ # ── GitHub Packages (canonical registry — restricted) ──
192
+ if [[ -n "${GITHUB_TOKEN:-}" ]]; then
193
+ echo " I'm publishing ${CANONICAL_NAME} to GitHub Packages (canonical)..."
194
+
195
+ cat > ~/.npmrc <<NPMRC_EOF
196
+ @aria_asi:registry=https://npm.pkg.github.com
197
+ //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
198
+ NPMRC_EOF
199
+
200
+ if [[ "$DRY_RUN" == "true" ]]; then
201
+ echo " [dry-run] would run: npm publish --registry https://npm.pkg.github.com"
202
+ append_summary "$CANONICAL_NAME" "$VERSION" "https://npm.pkg.github.com" "dry-run-no-digest"
203
+ else
204
+ PUBLISH_OUT="$(cd "$DIR" && npm publish --registry https://npm.pkg.github.com 2>&1)" || {
205
+ echo " I couldn't publish to GitHub Packages — it may already exist at this version." >&2
206
+ echo "$PUBLISH_OUT" >&2
207
+ }
208
+ DIGEST="$(echo "$PUBLISH_OUT" | grep -oE 'sha512-[A-Za-z0-9+/=]+' | head -1 || echo "unknown")"
209
+ append_summary "$CANONICAL_NAME" "$VERSION" "https://npm.pkg.github.com" "$DIGEST"
210
+ PUBLISHED+=("github-packages: npm install -g ${CANONICAL_NAME} --registry https://npm.pkg.github.com")
211
+ fi
212
+ else
213
+ echo " I'll skip GitHub Packages — set GITHUB_TOKEN to publish."
214
+ fi
215
+
216
+ # ── npmjs.org (public mirror) ──
217
+ if [[ -n "${NPM_TOKEN:-}" ]]; then
218
+ echo " I'm publishing ${CANONICAL_NAME} to npmjs.org (public)..."
219
+ printf '//registry.npmjs.org/:_authToken=%s\n' "${NPM_TOKEN}" > ~/.npmrc
220
+
221
+ if [[ "$DRY_RUN" == "true" ]]; then
222
+ echo " [dry-run] would run: npm publish --registry https://registry.npmjs.org --access public"
223
+ append_summary "$CANONICAL_NAME" "$VERSION" "https://registry.npmjs.org" "dry-run-no-digest"
224
+ else
225
+ PUBLISH_OUT="$(cd "$DIR" && npm publish --registry https://registry.npmjs.org --access public 2>&1)" || {
226
+ echo " I couldn't publish to npmjs.org — it may already exist at this version." >&2
227
+ echo "$PUBLISH_OUT" >&2
228
+ }
229
+ DIGEST="$(echo "$PUBLISH_OUT" | grep -oE 'sha512-[A-Za-z0-9+/=]+' | head -1 || echo "unknown")"
230
+ append_summary "$CANONICAL_NAME" "$VERSION" "https://registry.npmjs.org" "$DIGEST"
231
+ PUBLISHED+=("npmjs: npm install -g ${CANONICAL_NAME}")
232
+ fi
233
+ else
234
+ echo " I'll skip npmjs.org — set NPM_TOKEN to publish."
235
+ fi
236
+
237
+ # ── DEPRECATED legacy wrapper stubs ──
238
+ # These packages are published as hollow stubs that peerDepend on @aria_asi/cli.
239
+ # They exist only to redirect users who have old install commands bookmarked.
240
+ DEPRECATED_NAMES=(
241
+ "aria-cli"
242
+ "aria-sdk"
243
+ "aria-full"
244
+ "aria-tui"
245
+ "aria-vscode-extension"
246
+ "aria-anthropic-gate"
247
+ )
248
+
249
+ for dep_name in "${DEPRECATED_NAMES[@]}"; do
250
+ DEP_STUB_DIR="$(mktemp -d)"
251
+ trap 'rm -rf "$DEP_STUB_DIR"' EXIT
252
+
253
+ cat > "$DEP_STUB_DIR/package.json" <<STUB_EOF
254
+ {
255
+ "name": "${dep_name}",
256
+ "version": "${VERSION}",
257
+ "description": "DEPRECATED — this package is a redirect stub. Install @aria_asi/cli instead.",
258
+ "main": "index.js",
259
+ "peerDependencies": {
260
+ "@aria_asi/cli": "*"
261
+ },
262
+ "publishConfig": {
263
+ "registry": "https://registry.npmjs.org",
264
+ "access": "public"
265
+ }
266
+ }
267
+ STUB_EOF
268
+
269
+ printf 'console.warn("DEPRECATED: install @aria_asi/cli instead of %s");\n' "$dep_name" \
270
+ > "$DEP_STUB_DIR/index.js"
271
+
272
+ echo " I'm publishing DEPRECATED wrapper: ${dep_name}..."
273
+
274
+ if [[ "$DRY_RUN" == "true" ]]; then
275
+ echo " [dry-run] would publish deprecated stub ${dep_name} to npmjs.org"
276
+ append_summary "$dep_name" "$VERSION" "https://registry.npmjs.org" "dry-run-no-digest"
277
+ else
278
+ if [[ -n "${NPM_TOKEN:-}" ]]; then
279
+ printf '//registry.npmjs.org/:_authToken=%s\n' "${NPM_TOKEN}" > ~/.npmrc
280
+ STUB_OUT="$(cd "$DEP_STUB_DIR" && npm publish --registry https://registry.npmjs.org --access public 2>&1)" || {
281
+ echo " DEPRECATED stub ${dep_name} publish failed (may already exist)." >&2
282
+ echo "$STUB_OUT" >&2
283
+ }
284
+ STUB_DIGEST="$(echo "$STUB_OUT" | grep -oE 'sha512-[A-Za-z0-9+/=]+' | head -1 || echo "unknown")"
285
+ append_summary "$dep_name" "$VERSION" "https://registry.npmjs.org" "$STUB_DIGEST"
286
+ PUBLISHED+=("deprecated-stub: npm install ${dep_name} # redirects to @aria_asi/cli")
287
+ else
288
+ echo " I'll skip deprecated stub ${dep_name} — set NPM_TOKEN."
289
+ fi
290
+ fi
291
+
292
+ rm -rf "$DEP_STUB_DIR"
293
+ trap - EXIT
294
+ done
295
+
296
+ # ── Direct-download tarball ──
297
+ echo " I'm building a tarball for direct download..."
298
+ cd "$DIR" && npm pack 2>&1 > /dev/null
299
+ TARBALL="${CANONICAL_NAME##*/}-${VERSION}.tgz"
300
+ # npm pack names the file using the unscoped portion
301
+ NPM_TARBALL="$(ls "${DIR}"/*.tgz 2>/dev/null | head -1 || true)"
302
+ if [[ -n "$NPM_TARBALL" ]]; then
303
+ mkdir -p "$DIR/dist"
304
+ mv "$NPM_TARBALL" "$DIR/dist/${TARBALL}"
305
+ echo " I've placed the tarball at dist/${TARBALL}"
306
+ fi
307
+
308
+ # ── curl | bash installer stub ──
309
+ echo " I'm generating the installer script..."
310
+ cat > "$DIR/dist/install.sh" <<'INSTALLER'
311
+ #!/usr/bin/env bash
312
+ set -e
313
+ echo " ═══ @aria_asi/cli — Installer ═══"
314
+ VERSION="${1:-latest}"
315
+ if [ "$VERSION" = "latest" ]; then
316
+ VERSION=$(curl -s https://api.ariasos.com/connector/version 2>/dev/null || echo "0.1.0")
317
+ fi
318
+ echo " Installing v${VERSION}..."
319
+ TARBALL="cli-${VERSION}.tgz"
320
+ curl -sL "https://get.ariasos.com/${TARBALL}" -o "/tmp/${TARBALL}"
321
+ npm install -g "/tmp/${TARBALL}"
322
+ rm "/tmp/${TARBALL}"
323
+ echo " Done! Run: aria setup"
324
+ INSTALLER
325
+ chmod +x "$DIR/dist/install.sh"
326
+
327
+ # ── Final summary ──
328
+ echo ""
329
+ echo " ═══ I've finished publishing @aria_asi/cli v${VERSION} ═══"
330
+ echo ""
331
+ for p in "${PUBLISHED[@]}"; do
332
+ echo " + $p"
333
+ done
334
+ echo " + direct: curl -sL https://get.ariasos.com/install.sh | bash"
335
+ if [[ -n "${NPM_TARBALL:-}" ]]; then
336
+ echo " + tarball: dist/${TARBALL}"
337
+ fi
338
+ echo ""
339
+ echo " I've written the full publish record to: ${SUMMARY_FILE}"
340
+ if [[ "$DRY_RUN" == "true" ]]; then
341
+ echo " (This was a --dry-run — no packages actually shipped.)"
342
+ fi
343
+ echo ""
344
+ echo " Upload dist/ to get.ariasos.com for direct installs."
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ DIR="$(cd "$(dirname "$0")/.." && pwd)"
5
+ VERSION=$(node -e "console.log(require('${DIR}/package.json').version)")
6
+
7
+ echo " [docker] building..."
8
+ cd "$DIR"
9
+
10
+ # Create minimal Dockerfile for the connector
11
+ cat > Dockerfile.connector << 'DOCKERFILE'
12
+ FROM node:20-alpine
13
+ RUN npm install -g @REI-Nationwide/aria-connector
14
+ ENTRYPOINT ["aria"]
15
+ DOCKERFILE
16
+
17
+ docker build -f Dockerfile.connector -t "ariasos/connector:${VERSION}" .
18
+ docker tag "ariasos/connector:${VERSION}" "ariasos/connector:latest"
19
+
20
+ if [ -n "${DOCKER_USER:-}" ] && [ -n "${DOCKER_TOKEN:-}" ]; then
21
+ echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USER" --password-stdin
22
+ docker push "ariasos/connector:${VERSION}"
23
+ docker push "ariasos/connector:latest"
24
+ echo " ✅ docker: docker run -it ariasos/connector:latest aria setup"
25
+ else
26
+ echo " [docker] built locally — set DOCKER_USER + DOCKER_TOKEN to push"
27
+ fi
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { readdirSync, readFileSync, statSync } from 'node:fs';
4
+ import path from 'node:path';
5
+ import { spawnSync } from 'node:child_process';
6
+ import { fileURLToPath } from 'node:url';
7
+
8
+ const here = path.dirname(fileURLToPath(import.meta.url));
9
+ const repoRoot = path.resolve(here, '..', '..', '..');
10
+ const hookRoots = [
11
+ path.join(repoRoot, 'packages/aria-connector/hooks'),
12
+ path.join(repoRoot, 'packages/aria-asi-harness/hooks'),
13
+ path.join(repoRoot, 'ops/claude-hooks'),
14
+ ];
15
+
16
+ function walkMjsFiles(dir, acc = []) {
17
+ for (const name of readdirSync(dir)) {
18
+ const full = path.join(dir, name);
19
+ const stat = statSync(full);
20
+ if (stat.isDirectory()) {
21
+ walkMjsFiles(full, acc);
22
+ continue;
23
+ }
24
+ if (full.endsWith('.mjs')) acc.push(full);
25
+ }
26
+ return acc;
27
+ }
28
+
29
+ const errors = [];
30
+ const files = hookRoots.flatMap((dir) => walkMjsFiles(dir));
31
+
32
+ for (const file of files) {
33
+ const syntax = spawnSync(process.execPath, ['--check', file], { encoding: 'utf8' });
34
+ if (syntax.status !== 0) {
35
+ errors.push(`[syntax] ${file}\n${(syntax.stderr || syntax.stdout || '').trim()}`);
36
+ continue;
37
+ }
38
+
39
+ const lines = readFileSync(file, 'utf8').split('\n');
40
+ for (let i = 0; i < lines.length; i++) {
41
+ if (!lines[i].includes('hookSpecificOutput: {')) continue;
42
+ const window = lines.slice(i, Math.min(lines.length, i + 8)).join('\n');
43
+ if (!window.includes('hookEventName')) {
44
+ errors.push(`[schema] ${file}:${i + 1} hookSpecificOutput is missing hookEventName`);
45
+ }
46
+ }
47
+ }
48
+
49
+ if (errors.length > 0) {
50
+ process.stderr.write(`${errors.join('\n\n')}\n`);
51
+ process.exit(1);
52
+ }
53
+
54
+ process.stdout.write(`validated ${files.length} hook files across canonical Aria hook roots\n`);
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { readdirSync, readFileSync, statSync } from 'node:fs';
4
+ import path from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const here = path.dirname(fileURLToPath(import.meta.url));
8
+ const repoRoot = path.resolve(here, '..', '..', '..');
9
+ const skillRoots = [
10
+ path.join(repoRoot, 'packages/aria-connector/skills'),
11
+ path.join(repoRoot, 'harness/packages/harness-http-client/skills'),
12
+ ];
13
+
14
+ function walkSkills(dir, acc = []) {
15
+ for (const name of readdirSync(dir)) {
16
+ const full = path.join(dir, name);
17
+ const stat = statSync(full);
18
+ if (stat.isDirectory()) {
19
+ walkSkills(full, acc);
20
+ continue;
21
+ }
22
+ if (name === 'SKILL.md') acc.push(full);
23
+ }
24
+ return acc;
25
+ }
26
+
27
+ function hasSection(text, labels) {
28
+ return labels.some((label) => new RegExp(`^##\\s+${label}\\b`, 'mi').test(text));
29
+ }
30
+
31
+ const errors = [];
32
+ const warnings = [];
33
+
34
+ for (const root of skillRoots) {
35
+ for (const file of walkSkills(root)) {
36
+ const text = readFileSync(file, 'utf8');
37
+ const rel = path.relative(repoRoot, file);
38
+
39
+ if (!text.startsWith('---\n')) {
40
+ errors.push(`${rel}: missing YAML frontmatter`);
41
+ continue;
42
+ }
43
+ const end = text.indexOf('\n---\n', 4);
44
+ if (end === -1) {
45
+ errors.push(`${rel}: unterminated YAML frontmatter`);
46
+ continue;
47
+ }
48
+ const frontmatter = text.slice(4, end);
49
+ if (!/^name:\s*.+$/m.test(frontmatter)) {
50
+ errors.push(`${rel}: frontmatter missing name`);
51
+ }
52
+ if (!/^description:\s*.+$/m.test(frontmatter)) {
53
+ errors.push(`${rel}: frontmatter missing description`);
54
+ }
55
+
56
+ const hasTrigger = /\b(TRIGGER when|Use when)\b/i.test(text) || hasSection(text, ['Trigger', 'When this skill loads', 'When to Use Me']);
57
+ if (!hasTrigger) {
58
+ errors.push(`${rel}: missing trigger language`);
59
+ }
60
+
61
+ const hasWorkflow = hasSection(text, [
62
+ 'Workflow',
63
+ 'Required Workflow',
64
+ 'Multi-Step Workflow',
65
+ 'Required Multi-Step Workflow',
66
+ 'What To Enforce',
67
+ 'What you do at the pre-phase',
68
+ 'What you do at the intra-phase',
69
+ 'What you do at the post-phase',
70
+ 'The three layers',
71
+ 'Before any deploy command',
72
+ 'Code layer',
73
+ 'The substantive-without-leak format',
74
+ 'The 8-lens contract',
75
+ ]);
76
+ if (!hasWorkflow) {
77
+ warnings.push(`${rel}: no explicit workflow section`);
78
+ }
79
+
80
+ if (/\bcoming soon\b/i.test(text)) {
81
+ warnings.push(`${rel}: contains deferred-language phrase`);
82
+ }
83
+ }
84
+ }
85
+
86
+ if (warnings.length > 0) {
87
+ process.stderr.write(`${warnings.map((w) => `[warn] ${w}`).join('\n')}\n`);
88
+ }
89
+
90
+ if (errors.length > 0) {
91
+ process.stderr.write(`${errors.map((e) => `[error] ${e}`).join('\n')}\n`);
92
+ process.exit(1);
93
+ }
94
+
95
+ process.stdout.write(`validated skill prompts under ${skillRoots.length} roots\n`);
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: aria-essence
3
+ description: Use when the task depends on Aria's broader cognitive architecture, cross-domain uplift, evolution learning, or a stronger multi-step operating loop than a single narrow skill can provide.
4
+ ---
5
+
6
+ # Aria Essence
7
+
8
+ Use this as the umbrella execution skill when the task should be improved by Aria's combined cognition, not just answered quickly.
9
+
10
+ ## What I Do
11
+
12
+ - turn a request into a readable cognition-driven workflow
13
+ - force cross-domain uplift across engineering, design, product, business, marketing, sales, operations, and trust
14
+ - extract learning, principles, and telemetry-worthy takeaways instead of stopping at the immediate answer
15
+
16
+ ## When to Use Me
17
+
18
+ - architecture or implementation decisions with downstream impact
19
+ - product, UX, or business decisions that should not be optimized from only one angle
20
+ - tasks where code quality, narrative quality, and commercial quality all matter
21
+ - review or repair work where Aria should act like the control plane, not just a coding assistant
22
+
23
+ ## When NOT to Use Me
24
+
25
+ - trivial factual lookups
26
+ - tiny one-step edits where deeper domain review would not materially change the outcome
27
+
28
+ ## Workflow
29
+
30
+ 1. Classify the artifact.
31
+ Decide whether the task is implementation, review, design, architecture, launch, incident repair, or strategy.
32
+ 2. Bind to the runtime scheduler first.
33
+ Treat Mizan pre/mid/post as the control plane for the turn. Keep all canonical lenses represented and let the runtime receipts carry the enforcement burden.
34
+ 3. Choose the minimum cognition stack that changes the outcome.
35
+ Use plain-language equivalents of:
36
+ - analogy transfer
37
+ - pattern induction
38
+ - self-review
39
+ - consequence prediction
40
+ - axiomatic trust and harm checks
41
+ 4. Run the domain matrix.
42
+ Read [references/domain-matrix.md](references/domain-matrix.md) and assess the domains that materially matter.
43
+ 5. Improve the artifact before speaking.
44
+ Do not dump cognition mechanically. Let the domain pass change the code, design, plan, or recommendation.
45
+ 6. Capture learning.
46
+ Read [references/evolution-loop.md](references/evolution-loop.md) and distill the principle, evidence, and telemetry follow-up.
47
+ 7. Make the output readable.
48
+ Read [references/readable-cognition.md](references/readable-cognition.md). Summarize decisions plainly and avoid giant cognition blocks or internal service names unless the user asks.
49
+
50
+ ## Required Output Shape
51
+
52
+ For non-trivial work, make sure your internal workflow yields at least:
53
+
54
+ - the main decision
55
+ - the top risks or tradeoffs
56
+ - the dominant domains that changed the decision
57
+ - one reusable learning or principle
58
+
59
+ ## References
60
+
61
+ - [references/domain-matrix.md](references/domain-matrix.md)
62
+ - [references/evolution-loop.md](references/evolution-loop.md)
63
+ - [references/readable-cognition.md](references/readable-cognition.md)
@@ -0,0 +1,80 @@
1
+ # Domain Matrix
2
+
3
+ Use this matrix when a task affects product quality, delivery, or user trust across more than one discipline.
4
+
5
+ ## Mandatory Domains
6
+
7
+ Assess these domains unless you can name a concrete reason to skip one:
8
+
9
+ 1. Engineering
10
+ - correctness
11
+ - maintainability
12
+ - performance
13
+ - testability
14
+
15
+ 2. Architecture
16
+ - coupling
17
+ - boundaries
18
+ - extensibility
19
+ - failure modes
20
+
21
+ 3. Product
22
+ - user outcome
23
+ - workflow fit
24
+ - feature clarity
25
+ - adoption friction
26
+
27
+ 4. Design
28
+ - readability
29
+ - interaction quality
30
+ - visual coherence
31
+ - accessibility
32
+
33
+ 5. Business
34
+ - revenue or cost impact
35
+ - operational leverage
36
+ - strategic fit
37
+ - rollout risk
38
+
39
+ 6. Marketing
40
+ - positioning clarity
41
+ - narrative strength
42
+ - discoverability
43
+ - message consistency
44
+
45
+ 7. Sales
46
+ - buyer trust
47
+ - objection handling
48
+ - proof value
49
+ - demo friendliness
50
+
51
+ 8. Operations
52
+ - deployability
53
+ - observability
54
+ - support burden
55
+ - incident recovery
56
+
57
+ 9. Trust and Security
58
+ - permission boundaries
59
+ - misuse risk
60
+ - data exposure
61
+ - policy or reputation damage
62
+
63
+ 10. Data and Learning
64
+ - what should be measured
65
+ - what should be logged
66
+ - what principle was learned
67
+ - what should compound into evolution or hive state
68
+
69
+ ## Working Rule
70
+
71
+ Do not dump every domain into the final answer. Use the matrix to improve the artifact, then surface only the domains that materially changed the decision.
72
+
73
+ ## Compact Output Shape
74
+
75
+ When you need to expose the domain pass, keep it readable:
76
+
77
+ - dominant domains
78
+ - domain conflicts
79
+ - chosen tradeoff
80
+ - metrics or signals to watch
@@ -0,0 +1,30 @@
1
+ # Evolution Loop
2
+
3
+ Use this after any non-trivial implementation, review, or design decision.
4
+
5
+ ## Capture Five Things
6
+
7
+ 1. Change
8
+ - what was changed or recommended
9
+
10
+ 2. Evidence
11
+ - what observation, diff, log, test, or runtime check justified it
12
+
13
+ 3. Learning
14
+ - what reusable lesson was discovered
15
+
16
+ 4. Principle
17
+ - what principle should guide the next similar task
18
+
19
+ 5. Telemetry
20
+ - what should be logged, counted, or written to garden, hive, or telemetry state if the runtime surface is available
21
+
22
+ ## Good Principle Examples
23
+
24
+ - prefer runtime truth over simulated proof
25
+ - bind domain review before implementation, not after regressions
26
+ - translate cognition into short readable decisions, not internal jargon blocks
27
+
28
+ ## Output Rule
29
+
30
+ Keep learning output compact. One or two strong principles beats a noisy paragraph.