avorelo 0.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 (258) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +56 -0
  3. package/bin/avorelo +9 -0
  4. package/package.json +135 -0
  5. package/scripts/README.md +40 -0
  6. package/scripts/cco-dashboard.js +252 -0
  7. package/scripts/cco-status.js +430 -0
  8. package/scripts/lib/activation/account-state.js +37 -0
  9. package/scripts/lib/activation/activation-runner.js +546 -0
  10. package/scripts/lib/activation/activation-self-healing.js +480 -0
  11. package/scripts/lib/activation/activation-state.js +83 -0
  12. package/scripts/lib/activation/activation-summary.js +191 -0
  13. package/scripts/lib/activation/adapters/claude-code.js +77 -0
  14. package/scripts/lib/activation/adapters/codex-cli.js +52 -0
  15. package/scripts/lib/activation/adapters/cursor.js +37 -0
  16. package/scripts/lib/activation/adapters/github-agent.js +39 -0
  17. package/scripts/lib/activation/adapters/terminal.js +42 -0
  18. package/scripts/lib/activation/adapters/vscode.js +39 -0
  19. package/scripts/lib/activation/adapters/windsurf.js +37 -0
  20. package/scripts/lib/activation/ai-surface-detector.js +151 -0
  21. package/scripts/lib/activation/connect-account.js +145 -0
  22. package/scripts/lib/activation/detect-environment.js +75 -0
  23. package/scripts/lib/activation/detect-hosts.js +62 -0
  24. package/scripts/lib/activation/format-activation-output.js +109 -0
  25. package/scripts/lib/activation/next-action.js +43 -0
  26. package/scripts/lib/activation/repair-engine.js +219 -0
  27. package/scripts/lib/activation-distribution-readiness.js +507 -0
  28. package/scripts/lib/adapter-conformance.js +176 -0
  29. package/scripts/lib/adapter-readiness.js +417 -0
  30. package/scripts/lib/adapter-safety-boundaries.js +335 -0
  31. package/scripts/lib/adapter-technical-readiness-gate.js +205 -0
  32. package/scripts/lib/agent-access-governance.js +455 -0
  33. package/scripts/lib/agent-enforcement.js +765 -0
  34. package/scripts/lib/agent-policy-profile.js +210 -0
  35. package/scripts/lib/agent-security/action-evaluator.js +507 -0
  36. package/scripts/lib/agent-security/adapter-registry.js +98 -0
  37. package/scripts/lib/agent-security/auto-policy.js +139 -0
  38. package/scripts/lib/agent-security/bounded-scan.js +93 -0
  39. package/scripts/lib/agent-security/enforcement-adapter.js +174 -0
  40. package/scripts/lib/agent-security/enforcement-engine.js +1129 -0
  41. package/scripts/lib/agent-security/file-write-adapter.js +183 -0
  42. package/scripts/lib/agent-security/file-write-rules.js +178 -0
  43. package/scripts/lib/agent-security/index.js +3342 -0
  44. package/scripts/lib/agent-security/instruction-risk.js +181 -0
  45. package/scripts/lib/agent-security/mcp-action-adapter.js +185 -0
  46. package/scripts/lib/agent-security/mcp-action-rules.js +184 -0
  47. package/scripts/lib/agent-security/package-action-adapter.js +175 -0
  48. package/scripts/lib/agent-security/package-action-rules.js +233 -0
  49. package/scripts/lib/agent-security/performance.js +148 -0
  50. package/scripts/lib/agent-security/permission-minimizer.js +403 -0
  51. package/scripts/lib/agent-security/scan-cache.js +74 -0
  52. package/scripts/lib/agent-security/source-trust.js +146 -0
  53. package/scripts/lib/ai-install-prompt.js +288 -0
  54. package/scripts/lib/ai-workspace-hygiene.js +1499 -0
  55. package/scripts/lib/alpha-activation.js +520 -0
  56. package/scripts/lib/alpha-feedback.js +263 -0
  57. package/scripts/lib/alpha-readiness-gate.js +332 -0
  58. package/scripts/lib/anti-gaming.js +169 -0
  59. package/scripts/lib/artifact-health.js +431 -0
  60. package/scripts/lib/attribution.js +180 -0
  61. package/scripts/lib/audit.js +289 -0
  62. package/scripts/lib/avorelo-skill-registry.js +810 -0
  63. package/scripts/lib/batch-jobs.js +71 -0
  64. package/scripts/lib/brain-pack.js +578 -0
  65. package/scripts/lib/brand-boundary.js +424 -0
  66. package/scripts/lib/brand.js +74 -0
  67. package/scripts/lib/browser-capability.js +1048 -0
  68. package/scripts/lib/browser-proof-preflight.js +321 -0
  69. package/scripts/lib/cache-readiness.js +187 -0
  70. package/scripts/lib/canonical-reentry.js +162 -0
  71. package/scripts/lib/capability-packs.js +314 -0
  72. package/scripts/lib/capability-recommender.js +512 -0
  73. package/scripts/lib/capability-registry.js +1059 -0
  74. package/scripts/lib/carry-forward-surfacing.js +194 -0
  75. package/scripts/lib/ccusage-adapter.js +188 -0
  76. package/scripts/lib/company-loop.js +1149 -0
  77. package/scripts/lib/config.js +637 -0
  78. package/scripts/lib/context-acquisition-plan.js +287 -0
  79. package/scripts/lib/context-budget-guard.js +170 -0
  80. package/scripts/lib/context-budget-scanner.js +257 -0
  81. package/scripts/lib/context-optimizer.js +715 -0
  82. package/scripts/lib/context-reduction-plan.js +178 -0
  83. package/scripts/lib/context-safety.js +88 -0
  84. package/scripts/lib/context-savings-engine.js +158 -0
  85. package/scripts/lib/cost-evidence.js +254 -0
  86. package/scripts/lib/cross-host-install-plan.js +308 -0
  87. package/scripts/lib/cross-host-install-readiness.js +237 -0
  88. package/scripts/lib/cross-host-value-flow.js +268 -0
  89. package/scripts/lib/dashboard.js +900 -0
  90. package/scripts/lib/design-partner-feedback.js +346 -0
  91. package/scripts/lib/entitlements.js +100 -0
  92. package/scripts/lib/execution-packet.js +559 -0
  93. package/scripts/lib/experimentation-events.js +547 -0
  94. package/scripts/lib/external-capability-compliance.js +107 -0
  95. package/scripts/lib/external-user-simulation.js +166 -0
  96. package/scripts/lib/failure-recovery-readiness.js +81 -0
  97. package/scripts/lib/failure-recovery.js +419 -0
  98. package/scripts/lib/feedback-intelligence.js +537 -0
  99. package/scripts/lib/feedback-signals.js +205 -0
  100. package/scripts/lib/file-integrity.js +68 -0
  101. package/scripts/lib/fsx.js +127 -0
  102. package/scripts/lib/full-readiness-gate.js +451 -0
  103. package/scripts/lib/guidance-builder.js +174 -0
  104. package/scripts/lib/hook-apply.js +1019 -0
  105. package/scripts/lib/hook-baseline.js +310 -0
  106. package/scripts/lib/hook-config-preview.js +275 -0
  107. package/scripts/lib/hook-contracts.js +290 -0
  108. package/scripts/lib/hook-safety-boundary-readiness.js +80 -0
  109. package/scripts/lib/host-capability-matrix.js +351 -0
  110. package/scripts/lib/host-support-context.js +254 -0
  111. package/scripts/lib/http-hook-action.js +538 -0
  112. package/scripts/lib/install-ai-readiness.js +84 -0
  113. package/scripts/lib/install-intake-risk.js +1037 -0
  114. package/scripts/lib/install-journey-intelligence.js +329 -0
  115. package/scripts/lib/intervention-guidance.js +57 -0
  116. package/scripts/lib/known-limitations.js +115 -0
  117. package/scripts/lib/l8-path-truth.js +146 -0
  118. package/scripts/lib/launch-hardening-gate.js +436 -0
  119. package/scripts/lib/launch-readiness.js +628 -0
  120. package/scripts/lib/learning-memory.js +686 -0
  121. package/scripts/lib/lifecycle-hooks.js +802 -0
  122. package/scripts/lib/local-package-smoke.js +423 -0
  123. package/scripts/lib/local-pricing.js +299 -0
  124. package/scripts/lib/mcp-enforcement.js +311 -0
  125. package/scripts/lib/mcp-least-privilege-policy.js +303 -0
  126. package/scripts/lib/mcp-tool-inventory.js +388 -0
  127. package/scripts/lib/mcp-tool-risk.js +0 -0
  128. package/scripts/lib/memory.js +335 -0
  129. package/scripts/lib/metrics.js +699 -0
  130. package/scripts/lib/micro-proof.js +133 -0
  131. package/scripts/lib/next-run-context.js +436 -0
  132. package/scripts/lib/operating-value.js +1648 -0
  133. package/scripts/lib/optimization-v3.js +122 -0
  134. package/scripts/lib/orchestration/adapters/_shared.js +49 -0
  135. package/scripts/lib/orchestration/adapters/aider.js +18 -0
  136. package/scripts/lib/orchestration/adapters/claude-code.js +35 -0
  137. package/scripts/lib/orchestration/adapters/codex.js +35 -0
  138. package/scripts/lib/orchestration/adapters/gemini-cli.js +18 -0
  139. package/scripts/lib/orchestration/adapters/git.js +25 -0
  140. package/scripts/lib/orchestration/adapters/index.js +31 -0
  141. package/scripts/lib/orchestration/adapters/lm-studio.js +18 -0
  142. package/scripts/lib/orchestration/adapters/ollama.js +18 -0
  143. package/scripts/lib/orchestration/adapters/opencode.js +18 -0
  144. package/scripts/lib/orchestration/adapters/openrouter.js +18 -0
  145. package/scripts/lib/orchestration/adapters/test-runner.js +25 -0
  146. package/scripts/lib/orchestration/cli.js +438 -0
  147. package/scripts/lib/orchestration/execution-manager.js +279 -0
  148. package/scripts/lib/orchestration/handoff.js +314 -0
  149. package/scripts/lib/orchestration/index.js +456 -0
  150. package/scripts/lib/orchestration/inventory.js +47 -0
  151. package/scripts/lib/orchestration/model-discovery.js +498 -0
  152. package/scripts/lib/orchestration/model-profiler.js +170 -0
  153. package/scripts/lib/orchestration/model-profiles.js +252 -0
  154. package/scripts/lib/orchestration/model-refresh-policy.js +72 -0
  155. package/scripts/lib/orchestration/proof-writer.js +349 -0
  156. package/scripts/lib/orchestration/provider-discovery/aider.js +49 -0
  157. package/scripts/lib/orchestration/provider-discovery/claude-code.js +56 -0
  158. package/scripts/lib/orchestration/provider-discovery/codex.js +49 -0
  159. package/scripts/lib/orchestration/provider-discovery/common.js +186 -0
  160. package/scripts/lib/orchestration/provider-discovery/gemini.js +106 -0
  161. package/scripts/lib/orchestration/provider-discovery/lm-studio.js +118 -0
  162. package/scripts/lib/orchestration/provider-discovery/models-dev.js +12 -0
  163. package/scripts/lib/orchestration/provider-discovery/ollama.js +100 -0
  164. package/scripts/lib/orchestration/provider-discovery/opencode.js +47 -0
  165. package/scripts/lib/orchestration/provider-discovery/openrouter.js +44 -0
  166. package/scripts/lib/orchestration/risk-classifier.js +130 -0
  167. package/scripts/lib/orchestration/routing-policy.js +486 -0
  168. package/scripts/lib/orchestration/settings.js +112 -0
  169. package/scripts/lib/orchestration/state.js +165 -0
  170. package/scripts/lib/orchestration/verification-manager.js +138 -0
  171. package/scripts/lib/output-profiles.js +146 -0
  172. package/scripts/lib/package-content-audit.js +368 -0
  173. package/scripts/lib/package-runtime.js +278 -0
  174. package/scripts/lib/plan-surface.js +53 -0
  175. package/scripts/lib/plans.js +2318 -0
  176. package/scripts/lib/policy-provider.js +27 -0
  177. package/scripts/lib/prelaunch-activation-readiness.js +409 -0
  178. package/scripts/lib/prelaunch-evidence-store.js +816 -0
  179. package/scripts/lib/prelaunch-intelligence.js +869 -0
  180. package/scripts/lib/pricing-experiment.js +118 -0
  181. package/scripts/lib/pro-moment-events.js +77 -0
  182. package/scripts/lib/pro-moment-state.js +227 -0
  183. package/scripts/lib/pro-moments.js +1216 -0
  184. package/scripts/lib/product-learning-events.js +629 -0
  185. package/scripts/lib/project-profile.js +555 -0
  186. package/scripts/lib/prompt-compiler.js +280 -0
  187. package/scripts/lib/prompt-lint.js +32 -0
  188. package/scripts/lib/prompt-suggestions.js +52 -0
  189. package/scripts/lib/proof-canonical.js +398 -0
  190. package/scripts/lib/proof-drilldown.js +383 -0
  191. package/scripts/lib/proof-events.js +342 -0
  192. package/scripts/lib/proof-history.js +243 -0
  193. package/scripts/lib/proof-metrics.js +296 -0
  194. package/scripts/lib/proof-outcome-evidence.js +134 -0
  195. package/scripts/lib/proof-receipt.js +335 -0
  196. package/scripts/lib/proof-record.js +461 -0
  197. package/scripts/lib/public-activation-distribution-gate.js +258 -0
  198. package/scripts/lib/public-cli.js +3891 -0
  199. package/scripts/lib/public-distribution-truth.js +211 -0
  200. package/scripts/lib/public-install-claim-checker.js +294 -0
  201. package/scripts/lib/publish-provenance-readiness.js +283 -0
  202. package/scripts/lib/readiness-delta.js +218 -0
  203. package/scripts/lib/readiness-evidence-closure.js +196 -0
  204. package/scripts/lib/reentry-memory-capture.js +241 -0
  205. package/scripts/lib/reentry-memory-retrieval.js +302 -0
  206. package/scripts/lib/reentry-memory-status.js +146 -0
  207. package/scripts/lib/reentry-memory-store.js +178 -0
  208. package/scripts/lib/reentry-state.js +66 -0
  209. package/scripts/lib/release-candidate-bundle.js +166 -0
  210. package/scripts/lib/remediation.js +81 -0
  211. package/scripts/lib/repo-map.js +391 -0
  212. package/scripts/lib/run-improvements-lifecycle.js +330 -0
  213. package/scripts/lib/run-improvements.js +789 -0
  214. package/scripts/lib/runtime-decision-policy.js +387 -0
  215. package/scripts/lib/safe-path-engine.js +705 -0
  216. package/scripts/lib/safe-run-controller.js +887 -0
  217. package/scripts/lib/score.js +262 -0
  218. package/scripts/lib/seamless-enforcement.js +329 -0
  219. package/scripts/lib/seamless-outcome.js +689 -0
  220. package/scripts/lib/seamless-reality-gate.js +5043 -0
  221. package/scripts/lib/security-risk-classifier.js +511 -0
  222. package/scripts/lib/security-scan.js +384 -0
  223. package/scripts/lib/session-context-optimizer.js +1211 -0
  224. package/scripts/lib/session-timing.js +315 -0
  225. package/scripts/lib/skill-hygiene.js +805 -0
  226. package/scripts/lib/skill-packs.js +161 -0
  227. package/scripts/lib/skills-operating-layer.js +580 -0
  228. package/scripts/lib/smart-work-routing.js +768 -0
  229. package/scripts/lib/source-catalog.js +700 -0
  230. package/scripts/lib/status-value-summary.js +32 -0
  231. package/scripts/lib/support-bundle.js +578 -0
  232. package/scripts/lib/task-continuation.js +440 -0
  233. package/scripts/lib/test-helpers.js +15 -0
  234. package/scripts/lib/tier.js +38 -0
  235. package/scripts/lib/token-context-quality-gate.js +370 -0
  236. package/scripts/lib/token-cost-capture.js +187 -0
  237. package/scripts/lib/token-cost-intelligence.js +358 -0
  238. package/scripts/lib/token-efficiency-evidence.js +213 -0
  239. package/scripts/lib/token-evidence.js +699 -0
  240. package/scripts/lib/tokenish.js +17 -0
  241. package/scripts/lib/tool-output-sandbox.js +304 -0
  242. package/scripts/lib/trust-audit.js +136 -0
  243. package/scripts/lib/unified-events.js +396 -0
  244. package/scripts/lib/upgrade-interruption-recovery.js +407 -0
  245. package/scripts/lib/usage-ledger.js +201 -0
  246. package/scripts/lib/value-ledger.js +130 -0
  247. package/scripts/lib/value-proof-calibration.js +531 -0
  248. package/scripts/lib/visual-qa.js +231 -0
  249. package/scripts/lib/voice-alpha.js +29 -0
  250. package/scripts/lib/work-aware-orchestration.js +976 -0
  251. package/scripts/lib/work-control-receipts.js +577 -0
  252. package/scripts/lib/work-ledger.js +1123 -0
  253. package/scripts/lib/work-panel-preview.js +352 -0
  254. package/scripts/lib/workflow-discipline.js +280 -0
  255. package/scripts/lib/workflow-signals.js +419 -0
  256. package/scripts/lib/workspace-map.js +281 -0
  257. package/scripts/lib/workspace-registry.js +1367 -0
  258. package/scripts/lib/workspace-resolver.js +480 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ClaudeCode Optimizer contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # Avorelo
2
+
3
+ Avorelo is a local-first trust-and-reduction layer for AI coding work, centered on runtime intervention and guided recovery.
4
+ It reduces waste, setup burden, and trust failures at the moment of work, then helps the user continue cleanly and wrap up with confidence.
5
+
6
+ ## Positioning
7
+ - Works locally first. Team integrations can come later.
8
+ - Get value in workflow before you connect anything.
9
+ - Free for individual developers. Valuable from the first session.
10
+ - Avorelo is not a dashboard-first product, governance suite, agent platform, or generic analytics layer.
11
+ - The product center is runtime intervention plus guided recovery.
12
+ - Evidence, reports, usage visibility, and commands matter because they support trust, proof of value, and re-entry.
13
+
14
+ ## Primary Docs
15
+ - Install and activation: `docs/INSTALL.md`
16
+ - Activation flow details: `docs/ACTIVATION.md`
17
+ - Public website activation copy: `docs/WEBSITE-ACTIVATION-COPY.md`
18
+ - Distribution truth: `node bin/avorelo public-distribution --json`
19
+ - Production web source-of-record decision: `docs/AVORELO-PRODUCTION-WEB-DECISION.md`
20
+ - Public website source-of-record and deploy contract: `docs/AVORELO-PUBLIC-WEBSITE.md`
21
+ - Live rollout status: see `docs/AVORELO-DOMAIN-DEPLOYMENT.md`
22
+ - Wasp hosting recommendation: `docs/AVORELO-WASP-HOSTING.md`
23
+
24
+ ## Distribution Status
25
+
26
+ > **Distribution status: ready to publish, verification pending.** `npx avorelo@latest activate` is the public install command we are preparing for npm. Do not treat it as a verified live install path until npm publication and public smoke verification pass.
27
+ >
28
+ > Current verified path: `npm run avorelo:activate` (from this repository) or `node bin/avorelo activate`.
29
+ >
30
+ > Run `node bin/avorelo public-distribution --json` to see current distribution truth status.
31
+
32
+ ## Public Brand
33
+ - Product name: `Avorelo`
34
+ - CLI name: `avorelo`
35
+ - Target public activation command: `npx avorelo@latest activate`
36
+ - Repo-local activation command: `npm run avorelo:activate`
37
+ - Public site target: `https://avorelo.com`
38
+ - Public website source-of-record: `apps/public-web/`
39
+ - Support: `support@avorelo.com`
40
+
41
+ ## First-Use Path
42
+
43
+ > Use the public `npx` commands only after npm publication is verified. Until then, use `npm run avorelo:activate` from this repository.
44
+
45
+ 1. Open a terminal inside the project where you use Claude Code, Codex, VS Code, Cursor, or Windsurf.
46
+ 2. Run `npx avorelo@latest activate` after npm publication is verified.
47
+ 3. If you already have an account token, optionally run `npx avorelo@latest activate --connect <token>` after npm publication is verified.
48
+ 4. Continue in local/free mode even if account connection is skipped or fails.
49
+ 5. Let Avorelo stay quiet unless it needs to intervene, guide recovery, or support wrap-up and re-entry.
50
+
51
+ ## License
52
+ - MIT
53
+
54
+ ## Support
55
+
56
+ For customer support and activation help, contact `support@avorelo.com`.
package/bin/avorelo ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { main } = require("../scripts/lib/public-cli");
5
+
6
+ main().catch((error) => {
7
+ console.error("[avorelo] Error:", error.message);
8
+ process.exit(1);
9
+ });
package/package.json ADDED
@@ -0,0 +1,135 @@
1
+ {
2
+ "name": "avorelo",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "avoreloDistributionState": "ready_to_publish",
6
+ "description": "Avorelo local-first activation, safety, and optimization runtime.",
7
+ "homepage": "https://avorelo.com",
8
+ "bugs": {
9
+ "url": "https://avorelo.com",
10
+ "email": "support@avorelo.com"
11
+ },
12
+ "bin": {
13
+ "avorelo": "bin/avorelo"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "files": [
19
+ "bin/avorelo",
20
+ "scripts/cco-status.js",
21
+ "scripts/cco-dashboard.js",
22
+ "scripts/lib/**/*.js",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
26
+ "scripts": {
27
+ "test": "node --test tests/*.test.js",
28
+ "brand:check": "node scripts/check-brand-leaks.js",
29
+ "test:brand": "node scripts/check-brand-leaks.js",
30
+ "brand:fix": "node scripts/fix-brand-leaks.js --write",
31
+ "brand:fix:dry-run": "node scripts/fix-brand-leaks.js",
32
+ "test:task-compiler": "vitest run src/core-flow/task-compiler/task-compiler.test.ts",
33
+ "test:output-profiles": "vitest run src/output_profiles/output-profiles.test.ts",
34
+ "build": "npm run public-web:build",
35
+ "public-web:dev": "npm --prefix apps/public-web run dev",
36
+ "public-web:build": "npm --prefix apps/public-web run build",
37
+ "public-web:preview": "npm --prefix apps/public-web run preview",
38
+ "public-web:check": "npm --prefix apps/public-web run check",
39
+ "avorelo:activate": "node bin/avorelo activate",
40
+ "avorelo:doctor": "node bin/avorelo doctor",
41
+ "avorelo:summary": "node bin/avorelo summary",
42
+ "wuz:score": "node scripts/cco-score.js",
43
+ "cco:init": "node scripts/cco-init.js",
44
+ "cco:install-helper": "node scripts/cco-install-helper.js",
45
+ "cco:reuse-cues": "node scripts/cco-reuse-cues.js",
46
+ "verify:tree": "node scripts/verify-repo-tree.js",
47
+ "verify:contracts": "node scripts/verify-contracts.js",
48
+ "verify:tier-matrix": "node scripts/verify-tier-matrix.js",
49
+ "verify:tier-runtime": "node scripts/verify-tier-runtime.js",
50
+ "validate:e2e-local": "node scripts/validate-e2e-local.js",
51
+ "validate:panel-local": "node scripts/validate-panel-local.js",
52
+ "validate:release-checklist": "node scripts/validate-release-checklist.js",
53
+ "validate:persona-pack": "node scripts/validate-persona-pack.js",
54
+ "validate:adapter-conformance": "node scripts/validate-adapter-conformance.js",
55
+ "validate:cursor-conformance": "node scripts/validate-cursor-conformance.js",
56
+ "validate:memory-efficiency": "node scripts/validate-memory-efficiency.js",
57
+ "validate:batch-compact": "node scripts/validate-batch-compact.js",
58
+ "validate:cloud-unified": "node scripts/validate-cloud-unified.js",
59
+ "validate:cloud-dashboard-local": "node scripts/validate-cloud-dashboard-local.js",
60
+ "validate:http-hook": "node scripts/validate-http-hook.js",
61
+ "validate:voice-alpha": "node scripts/validate-voice-alpha.js",
62
+ "validate:intel-agent": "node scripts/validate-intel-agent.js",
63
+ "validate:gh-cli": "node scripts/validate-gh-cli.js",
64
+ "validate:ccusage-bridge": "node scripts/validate-ccusage-bridge.js",
65
+ "validate:skill-intake-security": "node scripts/validate-skill-intake-security.js",
66
+ "validate:outcome-events": "node scripts/validate-outcome-events.js",
67
+ "validate:proof-system": "node scripts/validate-proof-system.js",
68
+ "validate:operating-layer": "node scripts/validate-operating-layer.js",
69
+ "cco:value": "node scripts/cco-value.js",
70
+ "wuz:agent-security-check": "node scripts/cco-agent-security-check.js",
71
+ "wuz:activate": "node scripts/wuz-activate.js",
72
+ "wuz:doctor": "node scripts/wuz-doctor.js",
73
+ "wuz:summary": "node scripts/wuz-post-run.js",
74
+ "dev": "wasp start",
75
+ "start:founder-local": "powershell -ExecutionPolicy Bypass -File app-scripts/start-wuz-local.ps1",
76
+ "db:start": "wasp start db",
77
+ "db:migrate": "wasp db migrate-dev",
78
+ "db:seed": "wasp db seed",
79
+ "bootstrap:branding": "node app-scripts/bootstrap-branding.mjs",
80
+ "build:install-artifacts": "node app-scripts/build-install-artifacts.mjs",
81
+ "verify:install-delivery": "node app-scripts/validate-install-delivery.mjs",
82
+ "verify:env": "node app-scripts/verify-env.mjs host",
83
+ "verify:env:wasp": "node app-scripts/verify-env.mjs wasp",
84
+ "verify:env:prod": "node app-scripts/verify-env.mjs prod",
85
+ "verify:env:all": "node app-scripts/verify-env.mjs all",
86
+ "health:repo": "node app-scripts/repo-health-check.mjs",
87
+ "test:critical-path": "npm --prefix e2e-tests test",
88
+ "test:e2e": "npm --prefix e2e-tests test",
89
+ "deploy:railway:setup": "wasp deploy railway setup wuz-beta",
90
+ "deploy:railway": "wasp deploy railway deploy wuz-beta"
91
+ },
92
+ "dependencies": {},
93
+ "devDependencies": {
94
+ "@growthbook/growthbook": "^1.6.5",
95
+ "@growthbook/growthbook-react": "^1.6.5",
96
+ "@faker-js/faker": "8.3.1",
97
+ "@hookform/resolvers": "^5.1.1",
98
+ "@radix-ui/react-accordion": "^1.2.11",
99
+ "@radix-ui/react-avatar": "^1.1.10",
100
+ "@radix-ui/react-checkbox": "^1.3.2",
101
+ "@radix-ui/react-dialog": "^1.1.14",
102
+ "@radix-ui/react-dropdown-menu": "^2.1.15",
103
+ "@radix-ui/react-label": "^2.1.7",
104
+ "@radix-ui/react-progress": "^1.1.7",
105
+ "@radix-ui/react-select": "^2.2.5",
106
+ "@radix-ui/react-separator": "^1.1.7",
107
+ "@radix-ui/react-slot": "^1.2.3",
108
+ "@radix-ui/react-switch": "^1.2.5",
109
+ "@radix-ui/react-toast": "^1.2.14",
110
+ "@tailwindcss/forms": "^0.5.11",
111
+ "@tailwindcss/typography": "^0.5.19",
112
+ "@tailwindcss/vite": "^4.1.18",
113
+ "@types/express": "^5.0.0",
114
+ "@types/node": "^24.5.2",
115
+ "@types/react": "^19.2.7",
116
+ "class-variance-authority": "^0.7.1",
117
+ "clsx": "^2.1.1",
118
+ "gpt-tokenizer": "^2.8.1",
119
+ "lucide-react": "^0.525.0",
120
+ "prettier": "3.1.1",
121
+ "prettier-plugin-tailwindcss": "^0.7.2",
122
+ "prisma": "5.19.1",
123
+ "react": "^19.2.1",
124
+ "react-dom": "^19.2.1",
125
+ "react-hook-form": "^7.60.0",
126
+ "react-router": "^7.12.0",
127
+ "tailwind-merge": "^2.2.1",
128
+ "tailwindcss": "^4.1.18",
129
+ "tailwindcss-animate": "^1.0.7",
130
+ "typescript": "^5.8.2",
131
+ "vite": "^7.0.6",
132
+ "vitest": "^4.1.2",
133
+ "zod": "^4.3.6"
134
+ }
135
+ }
@@ -0,0 +1,40 @@
1
+ # Scripts Surface Status
2
+
3
+ `scripts/` contains multiple classes of surfaces. They are not all equally central.
4
+
5
+ ## Core runtime entrypoints
6
+ - `cco-session-start.js`
7
+ - `cco-pretooluse.js`
8
+ - `cco-posttooluse.js`
9
+ - `cco-sessionend.js`
10
+
11
+ These define the central Wuz runtime intervention and guided recovery loop.
12
+
13
+ ## Supporting operator surfaces
14
+ - `cco-status.js`
15
+ - `cco-audit.js`
16
+ - `cco-optimize` equivalent command surfaces
17
+ - `cco-settings.js`
18
+ - `cco-init.js`
19
+
20
+ These support the product, but they do not replace the runtime center.
21
+
22
+ ## Optional overlays or experiments
23
+ - panel
24
+ - cloud sync
25
+ - batch
26
+ - voice
27
+ - broader validation or experiment scripts
28
+
29
+ These may remain useful, but they must not redefine the product identity.
30
+
31
+ ## Internal or breadth surfaces
32
+ - intel-related scripts
33
+ - broad validation scaffolding
34
+ - experimental workflow scripts
35
+
36
+ These should be treated as supporting infrastructure, not as product center.
37
+
38
+ Canonical references:
39
+ - `../docs/Wuz-Canonical-Runtime-Model.md`
40
+ - `../docs/Wuz-Surface-Taxonomy.md`
@@ -0,0 +1,252 @@
1
+ "use strict";
2
+
3
+ const { buildStatusDashboard, buildEffectivenessScorecard } = require("./lib/dashboard");
4
+ const { buildPlanSurface } = require("./lib/plan-surface");
5
+ const { normalizeDashboardForPlatform, normalizePlatform } = require("./lib/adapter-conformance");
6
+ const {
7
+ buildCompactProMomentLines,
8
+ buildProMomentSurface,
9
+ recordProMomentEvaluation,
10
+ } = require("./lib/pro-moments");
11
+
12
+ function optionalRequire(modulePath, fallback) {
13
+ try {
14
+ return require(modulePath);
15
+ } catch {
16
+ return fallback;
17
+ }
18
+ }
19
+
20
+ const { ValueLedger, buildValueLedgerSummary } = optionalRequire("./lib/value-ledger", {
21
+ ValueLedger: class {
22
+ loadAll() {
23
+ return [];
24
+ }
25
+ },
26
+ buildValueLedgerSummary: () => null,
27
+ });
28
+ const { buildActivationSummary, formatActivationStatusLine } = optionalRequire("./lib/activation/activation-summary", {
29
+ buildActivationSummary: () => null,
30
+ formatActivationStatusLine: () => "Activation: local status surface unavailable",
31
+ });
32
+ const { readWorkspaceMap } = optionalRequire("./lib/workspace-map", {
33
+ readWorkspaceMap: () => null,
34
+ });
35
+ const { summarizeLatestLearningSignals } = optionalRequire("./lib/product-learning-events", {
36
+ summarizeLatestLearningSignals: () => null,
37
+ });
38
+
39
+ const args = process.argv.slice(2);
40
+ const JSON_MODE = args.includes("--json");
41
+ const TEXT_MODE = !JSON_MODE;
42
+
43
+ function readPlatformArg(argv) {
44
+ const arg = argv.find((a) => a.startsWith("--platform="));
45
+ if (!arg) return "claude";
46
+ return normalizePlatform(arg.split("=")[1]);
47
+ }
48
+
49
+ function formatBoundedDashboard(dash) {
50
+ const planSurface = buildPlanSurface(dash.cwd || process.cwd());
51
+ const proMoment = dash?.proMoment || buildProMomentSurface(dash.cwd || process.cwd(), {
52
+ surface: "dashboard",
53
+ status: dash,
54
+ });
55
+ const workspaceMap = readWorkspaceMap(dash.cwd || process.cwd());
56
+ const productLearning = summarizeLatestLearningSignals(dash.cwd || process.cwd());
57
+ const planSecurityLine = planSurface.security
58
+ ? [`Plan security: ${planSurface.security.postureLine.replace(/^Security posture:\s*/i, "")}`]
59
+ : [];
60
+ const browserCapabilityLine = dash.browserCapability?.showInDashboard
61
+ ? [`Browser capability: ${dash.browserCapability.overallTier} — ${dash.browserCapability.summary}`]
62
+ : [];
63
+ const governanceLine = dash.agentAccessGovernance?.showInDashboard
64
+ ? [`Agent Access Governance: ${String(dash.agentAccessGovernance.status || "partial").toUpperCase()} - reviewed=${dash.agentAccessGovernance.subjectsReviewed} - unknown=${dash.agentAccessGovernance.unknownSubjects} - latest receipt ${dash.agentAccessGovernance.latestReceiptPath ? "available" : "missing"}`]
65
+ : [];
66
+ const safePathLine = dash.safePath?.showInDashboard
67
+ ? [`Safe Path: ${String(dash.safePath.status || "foundation").toUpperCase()} - last=${dash.safePath.lastDecision || "none"} - reductions=${dash.safePath.reductionsRecommended} - approvals=${dash.safePath.approvalsRequired} - blocks-preserved=${dash.safePath.blocksPreserved}`]
68
+ : [];
69
+ const intakeLine = dash.installIntakeRisk?.showInDashboard
70
+ ? [`Install Intake: ${String(dash.installIntakeRisk.status || "foundation").toUpperCase()} - items=${dash.installIntakeRisk.totalItems} - unknown=${dash.installIntakeRisk.unknownItems} - high=${dash.installIntakeRisk.highRiskItems} - latest receipt ${dash.installIntakeRisk.latestReceiptPath ? "available" : "missing"}`]
71
+ : [];
72
+ const skillsLine = dash.skillsOperatingLayer?.showInDashboard
73
+ ? [`Skills Operating Layer: ${String(dash.skillsOperatingLayer.status || "foundation").toUpperCase()} - reviewed=${dash.skillsOperatingLayer.reviewedSources} - deferred=${dash.skillsOperatingLayer.deferredSources} - parsed=${dash.skillsOperatingLayer.parsedSkills} - latest receipt ${dash.skillsOperatingLayer.latestSourceAdoptionReceiptPath ? "available" : "missing"}`]
74
+ : [];
75
+ const orchestrationLine = dash.orchestration?.showInStatus
76
+ ? [dash.orchestration.statusLine]
77
+ : [];
78
+ const workspaceMapLine = workspaceMap
79
+ ? [`Workspace Map: ${workspaceMap.status} - ${workspaceMap.topGaps[0] || "ready for compact navigation"}`]
80
+ : [];
81
+ const productLearningLine = productLearning?.totalEvents
82
+ ? [`Product learning: ${productLearning.totalEvents} local event(s) recorded.`]
83
+ : [];
84
+ const proMomentLines = buildCompactProMomentLines(proMoment);
85
+ const runImprovementsLine = (() => {
86
+ try {
87
+ const { formatRunImprovementsStatusLine } = require("./lib/run-improvements");
88
+ const line = formatRunImprovementsStatusLine(dash.cwd || process.cwd());
89
+ return line ? [line] : [];
90
+ } catch { return []; }
91
+ })();
92
+ let agentSecurityLine = [];
93
+ if (dash.agentSecurity?.showInDashboard && dash.agentSecurity?.productSummary) {
94
+ const summary = dash.agentSecurity.productSummary;
95
+ agentSecurityLine = [
96
+ `Agent security: ${summary.headline}${summary.summary ? ` - ${summary.summary}` : ""}`,
97
+ ];
98
+ } else if (dash.agentSecurity?.showInDashboard && dash.agentSecurity?.dashboardCard) {
99
+ const card = dash.agentSecurity.dashboardCard;
100
+ if (dash.agentSecurity.mode === "warn") {
101
+ agentSecurityLine = [
102
+ `Agent security: ${card.subtitle} - ${card.surfaceLabel} - ${card.changeLabel}${card.enforcementLabel ? ` - ${card.enforcementLabel}` : ""}`,
103
+ ];
104
+ } else if (dash.agentSecurity.mode === "auto") {
105
+ agentSecurityLine = [
106
+ `Agent security: ${card.subtitle}${card.enforcementLabel ? ` - ${card.enforcementLabel}` : ""}`,
107
+ ];
108
+ } else if (dash.agentSecurity.mode === "visibility") {
109
+ agentSecurityLine = [
110
+ `Agent security: ${card.subtitle} - ${card.surfaceLabel} - ${card.changeLabel}`,
111
+ ];
112
+ } else {
113
+ agentSecurityLine = [
114
+ `Agent security: ${card.checkedLabel} - ${card.newLabel} - ${card.riskLabel}`,
115
+ ];
116
+ }
117
+ }
118
+ return [
119
+ "Avorelo Dashboard",
120
+ `Plan: ${planSurface.planLabel}`,
121
+ ...(planSurface.overrideNote ? [planSurface.overrideNote] : []),
122
+ planSurface.includedLine,
123
+ `Platform: ${dash.platform} Profile: ${dash.tier}`,
124
+ `Focus: ${dash.what} ${dash.why}`,
125
+ formatActivationStatusLine(dash.activation || buildActivationSummary(dash.cwd || process.cwd())),
126
+ ...planSecurityLine,
127
+ ...agentSecurityLine,
128
+ ...governanceLine,
129
+ ...safePathLine,
130
+ ...intakeLine,
131
+ ...skillsLine,
132
+ ...browserCapabilityLine,
133
+ ...orchestrationLine,
134
+ ...proMomentLines,
135
+ ...workspaceMapLine,
136
+ ...productLearningLine,
137
+ ...runImprovementsLine,
138
+ "Top fixes:",
139
+ ...(dash.topFixesNow || []).map((f, i) => `${i + 1}. ${f.text || f}`),
140
+ `Next: ${dash.nextBestAction} Savings: ~${dash.benefitSummary?.minutesSavedEstimate || 0}min`,
141
+ ].join("\n").trim();
142
+ }
143
+
144
+ function buildDashboardJson(dashboard, platform, cwd) {
145
+ const resolvedCwd = dashboard?.cwd || cwd;
146
+ const planSurface = buildPlanSurface(resolvedCwd);
147
+ const proMoment = dashboard?.proMoment || buildProMomentSurface(resolvedCwd, {
148
+ surface: "dashboard",
149
+ status: dashboard,
150
+ });
151
+ let valueLedger = null;
152
+ try {
153
+ const ledger = new ValueLedger(resolvedCwd);
154
+ const events = ledger.loadAll();
155
+ valueLedger = buildValueLedgerSummary(events);
156
+ } catch {}
157
+ const out = {
158
+ title: "Avorelo Dashboard",
159
+ cwd: resolvedCwd,
160
+ platform,
161
+ what: "Quick view of optimization opportunities.",
162
+ why: "See Time, Risk, Cost impact and clear next steps.",
163
+ planSummary: planSurface,
164
+ securitySummary: planSurface.security || null,
165
+ proMoment,
166
+ summaryFraming: dashboard.teamRollup?.summaryFraming || "Time + Risk + Cost dashboard.",
167
+ tier: dashboard.tier,
168
+ benefitSummary: dashboard.benefitSummary || null,
169
+ memorySummary: dashboard.memorySummary || null,
170
+ contextBudgetPlan: dashboard.contextBudgetPlan || null,
171
+ weeklySummary: dashboard.weeklySummary || null,
172
+ nextBestAction: dashboard.nextBestAction || "",
173
+ topRecommendedFixes: dashboard.topRecommendedFixes || [],
174
+ topFixesNow: (dashboard.topRecommendedFixes || []).slice(0, 3),
175
+ teamDefaultsApplied: dashboard.teamDefaultsApplied || null,
176
+ teamRollup: dashboard.teamRollup || null,
177
+ settingsControls: dashboard.settingsControls || null,
178
+ activation: dashboard.activation || buildActivationSummary(resolvedCwd),
179
+ workspaceMap: readWorkspaceMap(resolvedCwd),
180
+ productLearning: summarizeLatestLearningSignals(resolvedCwd),
181
+ valueLedger,
182
+ ...(dashboard.agentSecurity ? { agentSecurity: dashboard.agentSecurity } : {}),
183
+ ...(dashboard.agentAccessGovernance ? { agentAccessGovernance: dashboard.agentAccessGovernance } : {}),
184
+ ...(dashboard.safePath ? { safePath: dashboard.safePath } : {}),
185
+ ...(dashboard.installIntakeRisk ? { installIntakeRisk: dashboard.installIntakeRisk } : {}),
186
+ ...(dashboard.skillsOperatingLayer ? { skillsOperatingLayer: dashboard.skillsOperatingLayer } : {}),
187
+ ...(dashboard.browserCapability ? { browserCapability: dashboard.browserCapability } : {}),
188
+ ...(dashboard.orchestration ? { orchestration: dashboard.orchestration } : {}),
189
+ operatingValue: dashboard.operatingValue || null,
190
+ effectivenessScorecard: null,
191
+ runImprovements: (() => {
192
+ try {
193
+ const { loadRunImprovements } = require("./lib/run-improvements");
194
+ return loadRunImprovements(resolvedCwd);
195
+ } catch { return null; }
196
+ })(),
197
+ };
198
+ try {
199
+ out.effectivenessScorecard = buildEffectivenessScorecard(resolvedCwd, { days: 7 });
200
+ } catch {
201
+ out.effectivenessScorecard = { error: "Could not compute scorecard." };
202
+ }
203
+ return out;
204
+ }
205
+
206
+ function main() {
207
+ const cwd = process.cwd();
208
+ const platform = readPlatformArg(process.argv.slice(2));
209
+ const dashboard = buildStatusDashboard(cwd, { limit: 7 });
210
+ normalizeDashboardForPlatform(platform, dashboard);
211
+ dashboard.proMoment = buildProMomentSurface(cwd, {
212
+ surface: "dashboard",
213
+ status: dashboard,
214
+ });
215
+
216
+ if (TEXT_MODE) {
217
+ const out = {
218
+ cwd,
219
+ platform,
220
+ tier: dashboard.tier,
221
+ what: "Quick view of optimization opportunities.",
222
+ why: "See Time, Risk, Cost impact and clear next steps.",
223
+ nextBestAction: dashboard.nextBestAction,
224
+ topFixesNow: (dashboard.topRecommendedFixes || []).slice(0, 3),
225
+ benefitSummary: dashboard.benefitSummary,
226
+ activation: dashboard.activation || buildActivationSummary(cwd),
227
+ agentSecurity: dashboard.agentSecurity || null,
228
+ agentAccessGovernance: dashboard.agentAccessGovernance || null,
229
+ safePath: dashboard.safePath || null,
230
+ installIntakeRisk: dashboard.installIntakeRisk || null,
231
+ skillsOperatingLayer: dashboard.skillsOperatingLayer || null,
232
+ browserCapability: dashboard.browserCapability || null,
233
+ orchestration: dashboard.orchestration || null,
234
+ settingsControls: dashboard.settingsControls || null,
235
+ proMoment: dashboard.proMoment,
236
+ };
237
+ process.stdout.write(formatBoundedDashboard(out));
238
+ recordProMomentEvaluation(cwd, dashboard.proMoment, { humanVisible: true });
239
+ } else {
240
+ process.stdout.write(JSON.stringify(buildDashboardJson(dashboard, platform, cwd)));
241
+ recordProMomentEvaluation(cwd, dashboard.proMoment, { humanVisible: false });
242
+ }
243
+ }
244
+
245
+ if (require.main === module) {
246
+ main();
247
+ }
248
+
249
+ module.exports = {
250
+ buildDashboardJson,
251
+ formatBoundedDashboard,
252
+ };