aw-ecc 1.4.32 → 1.4.48

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 (259) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.cursor/INSTALL.md +7 -5
  3. package/.cursor/hooks/adapter.js +41 -4
  4. package/.cursor/hooks/after-agent-response.js +62 -0
  5. package/.cursor/hooks/before-submit-prompt.js +7 -1
  6. package/.cursor/hooks/post-tool-use-failure.js +21 -0
  7. package/.cursor/hooks/post-tool-use.js +39 -0
  8. package/.cursor/hooks/shared/aw-phase-definitions.js +53 -0
  9. package/.cursor/hooks/shared/aw-phase-runner.js +3 -1
  10. package/.cursor/hooks/subagent-start.js +22 -4
  11. package/.cursor/hooks/subagent-stop.js +18 -1
  12. package/.cursor/hooks.json +23 -2
  13. package/.opencode/package.json +1 -1
  14. package/AGENTS.md +3 -3
  15. package/README.md +5 -5
  16. package/commands/adk.md +52 -0
  17. package/commands/build.md +22 -9
  18. package/commands/deploy.md +12 -0
  19. package/commands/execute.md +9 -0
  20. package/commands/feature.md +333 -0
  21. package/commands/investigate.md +18 -5
  22. package/commands/plan.md +23 -9
  23. package/commands/publish.md +65 -0
  24. package/commands/review.md +12 -0
  25. package/commands/ship.md +12 -0
  26. package/commands/test.md +12 -0
  27. package/commands/verify.md +9 -0
  28. package/hooks/hooks.json +36 -0
  29. package/manifests/install-components.json +8 -0
  30. package/manifests/install-modules.json +83 -0
  31. package/manifests/install-profiles.json +7 -0
  32. package/package.json +2 -2
  33. package/scripts/ci/validate-rules.js +51 -0
  34. package/scripts/cursor-aw-home/hooks.json +23 -2
  35. package/scripts/cursor-aw-hooks/adapter.js +41 -4
  36. package/scripts/cursor-aw-hooks/before-submit-prompt.js +7 -1
  37. package/scripts/hooks/aw-usage-commit-created.js +32 -0
  38. package/scripts/hooks/aw-usage-post-tool-use-failure.js +56 -0
  39. package/scripts/hooks/aw-usage-post-tool-use.js +242 -0
  40. package/scripts/hooks/aw-usage-prompt-submit.js +112 -0
  41. package/scripts/hooks/aw-usage-session-start.js +48 -0
  42. package/scripts/hooks/aw-usage-stop.js +182 -0
  43. package/scripts/hooks/aw-usage-telemetry-send.js +84 -0
  44. package/scripts/hooks/cost-tracker.js +3 -23
  45. package/scripts/hooks/shared/aw-phase-definitions.js +53 -0
  46. package/scripts/hooks/shared/aw-phase-runner.js +3 -1
  47. package/scripts/lib/aw-hook-contract.js +2 -2
  48. package/scripts/lib/aw-pricing.js +306 -0
  49. package/scripts/lib/aw-usage-telemetry.js +472 -0
  50. package/scripts/lib/codex-hook-config.js +8 -8
  51. package/scripts/lib/cursor-hook-config.js +25 -10
  52. package/scripts/lib/install-targets/cursor-project.js +3 -0
  53. package/scripts/lib/install-targets/helpers.js +20 -3
  54. package/skills/aw-adk/SKILL.md +317 -0
  55. package/skills/aw-adk/agents/analyzer.md +113 -0
  56. package/skills/aw-adk/agents/comparator.md +113 -0
  57. package/skills/aw-adk/agents/grader.md +115 -0
  58. package/skills/aw-adk/assets/eval_review.html +76 -0
  59. package/skills/aw-adk/eval-viewer/generate_review.py +164 -0
  60. package/skills/aw-adk/eval-viewer/viewer.html +181 -0
  61. package/skills/aw-adk/evals/eval-colocated-placement.md +84 -0
  62. package/skills/aw-adk/evals/eval-create-agent.md +90 -0
  63. package/skills/aw-adk/evals/eval-create-command.md +98 -0
  64. package/skills/aw-adk/evals/eval-create-eval.md +89 -0
  65. package/skills/aw-adk/evals/eval-create-rule.md +99 -0
  66. package/skills/aw-adk/evals/eval-create-skill.md +97 -0
  67. package/skills/aw-adk/evals/eval-delete-agent.md +79 -0
  68. package/skills/aw-adk/evals/eval-delete-command.md +89 -0
  69. package/skills/aw-adk/evals/eval-delete-rule.md +86 -0
  70. package/skills/aw-adk/evals/eval-delete-skill.md +90 -0
  71. package/skills/aw-adk/evals/eval-meta-eval-coverage.md +78 -0
  72. package/skills/aw-adk/evals/eval-meta-eval-determinism.md +81 -0
  73. package/skills/aw-adk/evals/eval-meta-eval-false-pass.md +81 -0
  74. package/skills/aw-adk/evals/eval-score-accuracy.md +95 -0
  75. package/skills/aw-adk/evals/eval-type-redirect.md +68 -0
  76. package/skills/aw-adk/evals/evals.json +96 -0
  77. package/skills/aw-adk/references/artifact-wiring.md +162 -0
  78. package/skills/aw-adk/references/cross-ide-mapping.md +71 -0
  79. package/skills/aw-adk/references/eval-placement-guide.md +183 -0
  80. package/skills/aw-adk/references/external-resources.md +75 -0
  81. package/skills/aw-adk/references/getting-started.md +66 -0
  82. package/skills/aw-adk/references/registry-structure.md +152 -0
  83. package/skills/aw-adk/references/rubric-agent.md +36 -0
  84. package/skills/aw-adk/references/rubric-command.md +36 -0
  85. package/skills/aw-adk/references/rubric-eval.md +36 -0
  86. package/skills/aw-adk/references/rubric-meta-eval.md +132 -0
  87. package/skills/aw-adk/references/rubric-rule.md +36 -0
  88. package/skills/aw-adk/references/rubric-skill.md +36 -0
  89. package/skills/aw-adk/references/schemas.md +222 -0
  90. package/skills/aw-adk/references/template-agent.md +251 -0
  91. package/skills/aw-adk/references/template-command.md +279 -0
  92. package/skills/aw-adk/references/template-eval.md +176 -0
  93. package/skills/aw-adk/references/template-rule.md +119 -0
  94. package/skills/aw-adk/references/template-skill.md +123 -0
  95. package/skills/aw-adk/references/type-classifier.md +98 -0
  96. package/skills/aw-adk/references/writing-good-agents.md +227 -0
  97. package/skills/aw-adk/references/writing-good-commands.md +258 -0
  98. package/skills/aw-adk/references/writing-good-evals.md +271 -0
  99. package/skills/aw-adk/references/writing-good-rules.md +214 -0
  100. package/skills/aw-adk/references/writing-good-skills.md +159 -0
  101. package/skills/aw-adk/scripts/aggregate-benchmark.py +190 -0
  102. package/skills/aw-adk/scripts/lint-artifact.sh +211 -0
  103. package/skills/aw-adk/scripts/score-artifact.sh +179 -0
  104. package/skills/aw-adk/scripts/trigger-eval.py +192 -0
  105. package/skills/aw-build/SKILL.md +19 -2
  106. package/skills/aw-deploy/SKILL.md +65 -3
  107. package/skills/aw-design/SKILL.md +156 -0
  108. package/skills/aw-design/references/highrise-tokens.md +394 -0
  109. package/skills/aw-design/references/micro-interactions.md +76 -0
  110. package/skills/aw-design/references/prompt-template.md +160 -0
  111. package/skills/aw-design/references/quality-checklist.md +70 -0
  112. package/skills/aw-design/references/self-review.md +497 -0
  113. package/skills/aw-design/references/stitch-workflow.md +127 -0
  114. package/skills/aw-feature/SKILL.md +293 -0
  115. package/skills/aw-investigate/SKILL.md +17 -0
  116. package/skills/aw-plan/SKILL.md +34 -3
  117. package/skills/aw-publish/SKILL.md +300 -0
  118. package/skills/aw-publish/evals/eval-confirmation-gate.md +60 -0
  119. package/skills/aw-publish/evals/eval-intent-detection.md +111 -0
  120. package/skills/aw-publish/evals/eval-push-modes.md +67 -0
  121. package/skills/aw-publish/evals/eval-rules-push.md +60 -0
  122. package/skills/aw-publish/evals/evals.json +29 -0
  123. package/skills/aw-publish/references/push-modes.md +38 -0
  124. package/skills/aw-review/SKILL.md +88 -9
  125. package/skills/aw-rules-review/SKILL.md +124 -0
  126. package/skills/aw-rules-review/agents/openai.yaml +3 -0
  127. package/skills/aw-rules-review/scripts/generate-review-template.mjs +323 -0
  128. package/skills/aw-ship/SKILL.md +16 -0
  129. package/skills/aw-spec/SKILL.md +15 -0
  130. package/skills/aw-tasks/SKILL.md +15 -0
  131. package/skills/aw-test/SKILL.md +16 -0
  132. package/skills/aw-yolo/SKILL.md +4 -0
  133. package/skills/diagnose/SKILL.md +121 -0
  134. package/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
  135. package/skills/finish-only-when-green/SKILL.md +265 -0
  136. package/skills/grill-me/SKILL.md +24 -0
  137. package/skills/grill-with-docs/SKILL.md +92 -0
  138. package/skills/grill-with-docs/adr-format.md +47 -0
  139. package/skills/grill-with-docs/context-format.md +67 -0
  140. package/skills/improve-codebase-architecture/SKILL.md +75 -0
  141. package/skills/improve-codebase-architecture/deepening.md +37 -0
  142. package/skills/improve-codebase-architecture/interface-design.md +44 -0
  143. package/skills/improve-codebase-architecture/language.md +53 -0
  144. package/skills/local-ghl-setup-from-screenshot/SKILL.md +538 -0
  145. package/skills/tdd/SKILL.md +115 -0
  146. package/skills/tdd/deep-modules.md +33 -0
  147. package/skills/tdd/interface-design.md +31 -0
  148. package/skills/tdd/mocking.md +59 -0
  149. package/skills/tdd/refactoring.md +10 -0
  150. package/skills/tdd/tests.md +61 -0
  151. package/skills/to-issues/SKILL.md +62 -0
  152. package/skills/to-prd/SKILL.md +75 -0
  153. package/skills/using-aw-skills/SKILL.md +170 -237
  154. package/skills/using-aw-skills/hooks/session-start.sh +11 -41
  155. package/skills/zoom-out/SKILL.md +24 -0
  156. package/.codex/hooks/aw-post-tool-use.sh +0 -6
  157. package/.codex/hooks/aw-pre-tool-use.sh +0 -6
  158. package/.codex/hooks/aw-session-start.sh +0 -25
  159. package/.codex/hooks/aw-stop.sh +0 -6
  160. package/.codex/hooks/aw-user-prompt-submit.sh +0 -10
  161. package/.codex/hooks.json +0 -62
  162. package/.cursor/rules/common-agents.md +0 -53
  163. package/.cursor/rules/common-aw-routing.md +0 -43
  164. package/.cursor/rules/common-coding-style.md +0 -52
  165. package/.cursor/rules/common-development-workflow.md +0 -33
  166. package/.cursor/rules/common-git-workflow.md +0 -28
  167. package/.cursor/rules/common-hooks.md +0 -34
  168. package/.cursor/rules/common-patterns.md +0 -35
  169. package/.cursor/rules/common-performance.md +0 -59
  170. package/.cursor/rules/common-security.md +0 -33
  171. package/.cursor/rules/common-testing.md +0 -33
  172. package/.cursor/skills/api-and-interface-design/SKILL.md +0 -75
  173. package/.cursor/skills/article-writing/SKILL.md +0 -85
  174. package/.cursor/skills/aw-brainstorm/SKILL.md +0 -115
  175. package/.cursor/skills/aw-build/SKILL.md +0 -152
  176. package/.cursor/skills/aw-build/evals/build-stage-cases.json +0 -28
  177. package/.cursor/skills/aw-debug/SKILL.md +0 -49
  178. package/.cursor/skills/aw-deploy/SKILL.md +0 -101
  179. package/.cursor/skills/aw-deploy/evals/deploy-stage-cases.json +0 -32
  180. package/.cursor/skills/aw-execute/SKILL.md +0 -47
  181. package/.cursor/skills/aw-execute/references/mode-code.md +0 -47
  182. package/.cursor/skills/aw-execute/references/mode-docs.md +0 -28
  183. package/.cursor/skills/aw-execute/references/mode-infra.md +0 -44
  184. package/.cursor/skills/aw-execute/references/mode-migration.md +0 -58
  185. package/.cursor/skills/aw-execute/references/worker-implementer.md +0 -26
  186. package/.cursor/skills/aw-execute/references/worker-parallel-worker.md +0 -23
  187. package/.cursor/skills/aw-execute/references/worker-quality-reviewer.md +0 -23
  188. package/.cursor/skills/aw-execute/references/worker-spec-reviewer.md +0 -23
  189. package/.cursor/skills/aw-execute/scripts/build-worker-bundle.js +0 -229
  190. package/.cursor/skills/aw-finish/SKILL.md +0 -111
  191. package/.cursor/skills/aw-investigate/SKILL.md +0 -109
  192. package/.cursor/skills/aw-plan/SKILL.md +0 -368
  193. package/.cursor/skills/aw-prepare/SKILL.md +0 -118
  194. package/.cursor/skills/aw-review/SKILL.md +0 -118
  195. package/.cursor/skills/aw-ship/SKILL.md +0 -115
  196. package/.cursor/skills/aw-spec/SKILL.md +0 -104
  197. package/.cursor/skills/aw-tasks/SKILL.md +0 -138
  198. package/.cursor/skills/aw-test/SKILL.md +0 -118
  199. package/.cursor/skills/aw-verify/SKILL.md +0 -51
  200. package/.cursor/skills/aw-yolo/SKILL.md +0 -111
  201. package/.cursor/skills/browser-testing-with-devtools/SKILL.md +0 -81
  202. package/.cursor/skills/bun-runtime/SKILL.md +0 -84
  203. package/.cursor/skills/ci-cd-and-automation/SKILL.md +0 -71
  204. package/.cursor/skills/code-simplification/SKILL.md +0 -74
  205. package/.cursor/skills/content-engine/SKILL.md +0 -88
  206. package/.cursor/skills/context-engineering/SKILL.md +0 -74
  207. package/.cursor/skills/deprecation-and-migration/SKILL.md +0 -75
  208. package/.cursor/skills/documentation-and-adrs/SKILL.md +0 -75
  209. package/.cursor/skills/documentation-lookup/SKILL.md +0 -90
  210. package/.cursor/skills/frontend-slides/SKILL.md +0 -184
  211. package/.cursor/skills/frontend-slides/STYLE_PRESETS.md +0 -330
  212. package/.cursor/skills/frontend-ui-engineering/SKILL.md +0 -68
  213. package/.cursor/skills/git-workflow-and-versioning/SKILL.md +0 -75
  214. package/.cursor/skills/idea-refine/SKILL.md +0 -84
  215. package/.cursor/skills/incremental-implementation/SKILL.md +0 -75
  216. package/.cursor/skills/investor-materials/SKILL.md +0 -96
  217. package/.cursor/skills/investor-outreach/SKILL.md +0 -76
  218. package/.cursor/skills/market-research/SKILL.md +0 -75
  219. package/.cursor/skills/mcp-server-patterns/SKILL.md +0 -67
  220. package/.cursor/skills/nextjs-turbopack/SKILL.md +0 -44
  221. package/.cursor/skills/performance-optimization/SKILL.md +0 -77
  222. package/.cursor/skills/security-and-hardening/SKILL.md +0 -70
  223. package/.cursor/skills/using-aw-skills/SKILL.md +0 -290
  224. package/.cursor/skills/using-aw-skills/evals/skill-trigger-cases.tsv +0 -25
  225. package/.cursor/skills/using-aw-skills/evals/test-skill-triggers.sh +0 -171
  226. package/.cursor/skills/using-aw-skills/hooks/hooks.json +0 -9
  227. package/.cursor/skills/using-aw-skills/hooks/session-start.sh +0 -67
  228. package/.cursor/skills/using-platform-skills/SKILL.md +0 -163
  229. package/.cursor/skills/using-platform-skills/evals/platform-selection-cases.json +0 -52
  230. /package/.cursor/rules/{golang-coding-style.md → golang-coding-style.mdc} +0 -0
  231. /package/.cursor/rules/{golang-hooks.md → golang-hooks.mdc} +0 -0
  232. /package/.cursor/rules/{golang-patterns.md → golang-patterns.mdc} +0 -0
  233. /package/.cursor/rules/{golang-security.md → golang-security.mdc} +0 -0
  234. /package/.cursor/rules/{golang-testing.md → golang-testing.mdc} +0 -0
  235. /package/.cursor/rules/{kotlin-coding-style.md → kotlin-coding-style.mdc} +0 -0
  236. /package/.cursor/rules/{kotlin-hooks.md → kotlin-hooks.mdc} +0 -0
  237. /package/.cursor/rules/{kotlin-patterns.md → kotlin-patterns.mdc} +0 -0
  238. /package/.cursor/rules/{kotlin-security.md → kotlin-security.mdc} +0 -0
  239. /package/.cursor/rules/{kotlin-testing.md → kotlin-testing.mdc} +0 -0
  240. /package/.cursor/rules/{php-coding-style.md → php-coding-style.mdc} +0 -0
  241. /package/.cursor/rules/{php-hooks.md → php-hooks.mdc} +0 -0
  242. /package/.cursor/rules/{php-patterns.md → php-patterns.mdc} +0 -0
  243. /package/.cursor/rules/{php-security.md → php-security.mdc} +0 -0
  244. /package/.cursor/rules/{php-testing.md → php-testing.mdc} +0 -0
  245. /package/.cursor/rules/{python-coding-style.md → python-coding-style.mdc} +0 -0
  246. /package/.cursor/rules/{python-hooks.md → python-hooks.mdc} +0 -0
  247. /package/.cursor/rules/{python-patterns.md → python-patterns.mdc} +0 -0
  248. /package/.cursor/rules/{python-security.md → python-security.mdc} +0 -0
  249. /package/.cursor/rules/{python-testing.md → python-testing.mdc} +0 -0
  250. /package/.cursor/rules/{swift-coding-style.md → swift-coding-style.mdc} +0 -0
  251. /package/.cursor/rules/{swift-hooks.md → swift-hooks.mdc} +0 -0
  252. /package/.cursor/rules/{swift-patterns.md → swift-patterns.mdc} +0 -0
  253. /package/.cursor/rules/{swift-security.md → swift-security.mdc} +0 -0
  254. /package/.cursor/rules/{swift-testing.md → swift-testing.mdc} +0 -0
  255. /package/.cursor/rules/{typescript-coding-style.md → typescript-coding-style.mdc} +0 -0
  256. /package/.cursor/rules/{typescript-hooks.md → typescript-hooks.mdc} +0 -0
  257. /package/.cursor/rules/{typescript-patterns.md → typescript-patterns.mdc} +0 -0
  258. /package/.cursor/rules/{typescript-security.md → typescript-security.mdc} +0 -0
  259. /package/.cursor/rules/{typescript-testing.md → typescript-testing.mdc} +0 -0
@@ -32,6 +32,14 @@ This entrypoint inherits the same rule that the selected test or review scope sh
32
32
 
33
33
  - `.aw_docs/features/<feature_slug>/verification.md`
34
34
  - updated `.aw_docs/features/<feature_slug>/state.json`
35
+ - `.aw_docs/features/<feature_slug>/verification.html` and/or `.aw_docs/features/<feature_slug>/verification.html` when the routed stage writes an HTML companion
36
+
37
+ ## Human HTML Companion
38
+
39
+ `/aw:verify` inherits the `/aw:test` and `/aw:review` HTML companion contracts.
40
+ Markdown remains canonical for agents, and the `aw:echo` subagent produces the human review companion when output mode is `dual` or `html`.
41
+ Subagent authorization: invoking `/aw:verify` in `dual` or `html` output mode is an explicit user request to delegate the human-facing HTML companion to exactly one background `aw:echo` subagent. This authorization is scoped only to HTML companion generation; do not spawn unrelated subagents.
42
+ HTML sidecars are required before the final handoff. Spawn exactly one `aw:echo` subagent and wait for the colocated `.html` sidecar unless the user explicitly asks not to wait. If the harness still cannot spawn `aw:echo`, create a conservative self-contained fallback HTML sidecar in the same turn, record `generated_fallback` with the blocker, and keep Markdown canonical.
35
43
 
36
44
  ## Must Not Do
37
45
 
@@ -52,4 +60,5 @@ Always end with:
52
60
  - `Canonical Flow`
53
61
  - `Evidence`
54
62
  - `Outcome`
63
+ - `HTML Companion`
55
64
  - `Next`
package/hooks/hooks.json CHANGED
@@ -240,6 +240,18 @@
240
240
  }
241
241
  ],
242
242
  "description": "Capture tool use results for continuous learning"
243
+ },
244
+ {
245
+ "matcher": "*",
246
+ "hooks": [
247
+ {
248
+ "type": "command",
249
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/aw-usage-post-tool-use.js\"",
250
+ "async": true,
251
+ "timeout": 10
252
+ }
253
+ ],
254
+ "description": "Usage telemetry: skill_invoked, agent_spawned, tool_error events"
243
255
  }
244
256
  ],
245
257
  "PostToolUseFailure": [
@@ -252,6 +264,18 @@
252
264
  }
253
265
  ],
254
266
  "description": "Track failed MCP tool calls, mark unhealthy servers, and attempt reconnect"
267
+ },
268
+ {
269
+ "matcher": "*",
270
+ "hooks": [
271
+ {
272
+ "type": "command",
273
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/aw-usage-post-tool-use-failure.js\"",
274
+ "async": true,
275
+ "timeout": 10
276
+ }
277
+ ],
278
+ "description": "Usage telemetry: tool_error event on tool failure"
255
279
  }
256
280
  ],
257
281
  "Stop": [
@@ -300,6 +324,18 @@
300
324
  }
301
325
  ],
302
326
  "description": "Track token and cost metrics per session"
327
+ },
328
+ {
329
+ "matcher": "*",
330
+ "hooks": [
331
+ {
332
+ "type": "command",
333
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/hooks/aw-usage-stop.js\"",
334
+ "async": true,
335
+ "timeout": 10
336
+ }
337
+ ],
338
+ "description": "Usage telemetry: response_completed and session_ended events"
303
339
  }
304
340
  ],
305
341
  "SessionEnd": [
@@ -17,6 +17,14 @@
17
17
  "agents-core"
18
18
  ]
19
19
  },
20
+ {
21
+ "id": "baseline:aw-stages",
22
+ "family": "baseline",
23
+ "description": "Canonical AW SDLC stage skills and the using-aw-skills router. Ships single source of truth to all harnesses.",
24
+ "modules": [
25
+ "aw-stages"
26
+ ]
27
+ },
20
28
  {
21
29
  "id": "baseline:commands",
22
30
  "family": "baseline",
@@ -39,6 +39,88 @@
39
39
  "cost": "light",
40
40
  "stability": "stable"
41
41
  },
42
+ {
43
+ "id": "aw-stages",
44
+ "kind": "skills",
45
+ "description": "Canonical AW SDLC stage skills (aw-plan, aw-build, aw-investigate, aw-test, aw-review, aw-deploy, aw-ship, aw-feature) and supporting internal helpers. Shipped from the single canonical skills/ source; install pipeline transforms /aw: \u2192 /aw- for Cursor targets.",
46
+ "paths": [
47
+ "skills/aw-brainstorm",
48
+ "skills/aw-build",
49
+ "skills/aw-debug",
50
+ "skills/aw-deploy",
51
+ "skills/aw-design",
52
+ "skills/aw-execute",
53
+ "skills/aw-feature",
54
+ "skills/aw-finish",
55
+ "skills/aw-investigate",
56
+ "skills/aw-plan",
57
+ "skills/aw-prepare",
58
+ "skills/aw-review",
59
+ "skills/aw-rules",
60
+ "skills/aw-ship",
61
+ "skills/aw-spec",
62
+ "skills/aw-tasks",
63
+ "skills/aw-test",
64
+ "skills/aw-verify",
65
+ "skills/aw-yolo",
66
+ "skills/using-aw-skills"
67
+ ],
68
+ "targets": [
69
+ "claude",
70
+ "cursor",
71
+ "antigravity",
72
+ "codex",
73
+ "opencode"
74
+ ],
75
+ "dependencies": [],
76
+ "defaultInstall": true,
77
+ "cost": "light",
78
+ "stability": "stable"
79
+ },
80
+ {
81
+ "id": "aw-adk",
82
+ "kind": "skills",
83
+ "description": "Agent Development Kit \u2014 centralized CASRE (Command, Agent, Skill, Rule, Eval) authoring with lint, scoring, eval creation, and cross-IDE sync.",
84
+ "paths": [
85
+ "skills/aw-adk",
86
+ "commands/adk.md"
87
+ ],
88
+ "targets": [
89
+ "claude",
90
+ "cursor",
91
+ "antigravity",
92
+ "codex",
93
+ "opencode"
94
+ ],
95
+ "dependencies": [
96
+ "aw-stages"
97
+ ],
98
+ "defaultInstall": true,
99
+ "cost": "light",
100
+ "stability": "stable"
101
+ },
102
+ {
103
+ "id": "aw-publish",
104
+ "kind": "skills",
105
+ "description": "Registry publish skill \u2014 guides pushing locally created/modified CASRE artifacts to the remote platform-docs registry via PR. Intent-based with mandatory confirmation gate.",
106
+ "paths": [
107
+ "skills/aw-publish",
108
+ "commands/publish.md"
109
+ ],
110
+ "targets": [
111
+ "claude",
112
+ "cursor",
113
+ "antigravity",
114
+ "codex",
115
+ "opencode"
116
+ ],
117
+ "dependencies": [
118
+ "aw-stages"
119
+ ],
120
+ "defaultInstall": true,
121
+ "cost": "light",
122
+ "stability": "stable"
123
+ },
42
124
  {
43
125
  "id": "commands-core",
44
126
  "kind": "commands",
@@ -191,6 +273,7 @@
191
273
  "skills/continuous-learning-v2",
192
274
  "skills/e2e-testing",
193
275
  "skills/eval-harness",
276
+ "skills/finish-only-when-green",
194
277
  "skills/iterative-retrieval",
195
278
  "skills/plankton-code-quality",
196
279
  "skills/project-guidelines-example",
@@ -6,6 +6,7 @@
6
6
  "modules": [
7
7
  "rules-core",
8
8
  "agents-core",
9
+ "aw-stages",
9
10
  "commands-core",
10
11
  "hooks-runtime",
11
12
  "platform-configs",
@@ -17,6 +18,7 @@
17
18
  "modules": [
18
19
  "rules-core",
19
20
  "agents-core",
21
+ "aw-stages",
20
22
  "commands-core",
21
23
  "hooks-runtime",
22
24
  "platform-configs",
@@ -31,6 +33,7 @@
31
33
  "modules": [
32
34
  "rules-core",
33
35
  "agents-core",
36
+ "aw-stages",
34
37
  "commands-core",
35
38
  "hooks-runtime",
36
39
  "platform-configs",
@@ -43,6 +46,7 @@
43
46
  "modules": [
44
47
  "rules-core",
45
48
  "agents-core",
49
+ "aw-stages",
46
50
  "commands-core",
47
51
  "hooks-runtime",
48
52
  "platform-configs",
@@ -57,6 +61,9 @@
57
61
  "modules": [
58
62
  "rules-core",
59
63
  "agents-core",
64
+ "aw-stages",
65
+ "aw-adk",
66
+ "aw-publish",
60
67
  "commands-core",
61
68
  "hooks-runtime",
62
69
  "platform-configs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aw-ecc",
3
- "version": "1.4.32",
3
+ "version": "1.4.48",
4
4
  "description": "GoHighLevel Agentic Workspace Engine — forked from Everything Claude Code (ecc-universal)",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -119,11 +119,11 @@
119
119
  },
120
120
  "dependencies": {
121
121
  "@iarna/toml": "^2.2.5",
122
+ "ajv": "^8.18.0",
122
123
  "sql.js": "^1.14.1"
123
124
  },
124
125
  "devDependencies": {
125
126
  "@eslint/js": "^9.39.2",
126
- "ajv": "^8.18.0",
127
127
  "c8": "^10.1.2",
128
128
  "eslint": "^9.39.2",
129
129
  "globals": "^17.1.0",
@@ -42,6 +42,53 @@ function collectRuleFiles(dir) {
42
42
  return files;
43
43
  }
44
44
 
45
+ /**
46
+ * Validate that .mdc files (Cursor rule format) have frontmatter at byte 0.
47
+ * Anything before the opening `---` — including HTML comments — makes Cursor
48
+ * treat the file as having no frontmatter, silently breaking alwaysApply/globs.
49
+ */
50
+ function validateCursorMdcFrontmatter() {
51
+ const repoRoot = path.join(__dirname, '../..');
52
+ const errors = [];
53
+
54
+ function scan(dir) {
55
+ let entries;
56
+ try {
57
+ entries = fs.readdirSync(dir, { withFileTypes: true });
58
+ } catch {
59
+ return;
60
+ }
61
+ for (const entry of entries) {
62
+ if (entry.name === 'node_modules' || entry.name.startsWith('.git')) continue;
63
+ const abs = path.join(dir, entry.name);
64
+ if (entry.isDirectory()) {
65
+ scan(abs);
66
+ continue;
67
+ }
68
+ if (!entry.name.endsWith('.mdc')) continue;
69
+ const content = fs.readFileSync(abs, 'utf-8');
70
+ // Only flag files that HAVE frontmatter but in the wrong position.
71
+ // Files with no frontmatter at all are valid "plain content" Cursor rules.
72
+ const hasFrontmatter = /^---\s*$/m.test(content);
73
+ if (hasFrontmatter && !content.startsWith('---')) {
74
+ const firstLine = content.split('\n', 1)[0].slice(0, 80);
75
+ errors.push(`${path.relative(repoRoot, abs)}: frontmatter exists but is not at byte 0 (first line: ${firstLine})`);
76
+ }
77
+ }
78
+ }
79
+
80
+ scan(repoRoot);
81
+
82
+ if (errors.length > 0) {
83
+ console.error('ERROR: .mdc files with content before frontmatter (breaks Cursor alwaysApply/globs):');
84
+ for (const err of errors) {
85
+ console.error(` - ${err}`);
86
+ }
87
+ return false;
88
+ }
89
+ return true;
90
+ }
91
+
45
92
  function validateRules() {
46
93
  if (!fs.existsSync(RULES_DIR)) {
47
94
  console.log('No rules directory found, skipping validation');
@@ -71,6 +118,10 @@ function validateRules() {
71
118
  }
72
119
  }
73
120
 
121
+ if (!validateCursorMdcFrontmatter()) {
122
+ hasErrors = true;
123
+ }
124
+
74
125
  if (hasErrors) {
75
126
  process.exit(1);
76
127
  }
@@ -3,7 +3,7 @@
3
3
  "hooks": {
4
4
  "sessionStart": [
5
5
  {
6
- "command": "bash -lc \"for candidate in \\\"$PWD/.cursor/hooks/session-start.sh\\\" \\\"$HOME/.cursor/hooks/session-start.sh\\\"; do if [ -f \\\"$candidate\\\" ]; then exec bash \\\"$candidate\\\"; fi; done; exit 0\"",
6
+ "command": "bash -c 'f=\"$PWD/.cursor/hooks/session-start.sh\"; [ -f \"$f\" ] || f=\"$HOME/.cursor/hooks/session-start.sh\"; exec bash \"$f\"'",
7
7
  "event": "sessionStart",
8
8
  "description": "Load previous context and detect environment"
9
9
  }
@@ -64,7 +64,7 @@
64
64
  ],
65
65
  "beforeSubmitPrompt": [
66
66
  {
67
- "command": "bash -lc \"for candidate in \\\"$PWD/.cursor/hooks/before-submit-prompt.sh\\\" \\\"$HOME/.cursor/hooks/before-submit-prompt.sh\\\"; do if [ -f \\\"$candidate\\\" ]; then exec bash \\\"$candidate\\\"; fi; done; exit 0\"",
67
+ "command": "bash -c 'f=\"$PWD/.cursor/hooks/before-submit-prompt.sh\"; [ -f \"$f\" ] || f=\"$HOME/.cursor/hooks/before-submit-prompt.sh\"; exec bash \"$f\"'",
68
68
  "event": "beforeSubmitPrompt",
69
69
  "description": "Detect secrets in prompts (sk-, ghp_, AKIA patterns)"
70
70
  }
@@ -83,6 +83,20 @@
83
83
  "description": "Log agent completion"
84
84
  }
85
85
  ],
86
+ "postToolUse": [
87
+ {
88
+ "command": "node -e \"const fs=require('fs');const path=require('path');const os=require('os');const scriptName=\\\"post-tool-use.js\\\";const candidates=[path.join(process.cwd(), '.cursor', 'hooks', scriptName),path.join(os.homedir(), '.cursor', 'hooks', scriptName)];const target=candidates.find(candidate => fs.existsSync(candidate));if(!target) process.exit(0);require(target)\"",
89
+ "event": "postToolUse",
90
+ "description": "Telemetry: skill_invoked detection for Read tool and other non-shell/edit/MCP tools"
91
+ }
92
+ ],
93
+ "postToolUseFailure": [
94
+ {
95
+ "command": "node -e \"const fs=require('fs');const path=require('path');const os=require('os');const scriptName=\\\"post-tool-use-failure.js\\\";const candidates=[path.join(process.cwd(), '.cursor', 'hooks', scriptName),path.join(os.homedir(), '.cursor', 'hooks', scriptName)];const target=candidates.find(candidate => fs.existsSync(candidate));if(!target) process.exit(0);require(target)\"",
96
+ "event": "postToolUseFailure",
97
+ "description": "Telemetry: tool_error detection on tool failure/timeout/denial"
98
+ }
99
+ ],
86
100
  "beforeTabFileRead": [
87
101
  {
88
102
  "command": "node -e \"const fs=require('fs');const path=require('path');const os=require('os');const scriptName=\\\"before-tab-file-read.js\\\";const candidates=[path.join(process.cwd(), '.cursor', 'hooks', scriptName),path.join(os.homedir(), '.cursor', 'hooks', scriptName)];const target=candidates.find(candidate => fs.existsSync(candidate));if(!target) process.exit(0);require(target)\"",
@@ -104,6 +118,13 @@
104
118
  "description": "Save state before context compaction"
105
119
  }
106
120
  ],
121
+ "afterAgentResponse": [
122
+ {
123
+ "command": "node -e \"const fs=require('fs');const path=require('path');const os=require('os');const scriptName=\\\"after-agent-response.js\\\";const candidates=[path.join(process.cwd(), '.cursor', 'hooks', scriptName),path.join(os.homedir(), '.cursor', 'hooks', scriptName)];const target=candidates.find(candidate => fs.existsSync(candidate));if(!target) process.exit(0);require(target)\"",
124
+ "event": "afterAgentResponse",
125
+ "description": "Telemetry: response_completed with tokens and cost per turn"
126
+ }
127
+ ],
107
128
  "stop": [
108
129
  {
109
130
  "command": "node -e \"const fs=require('fs');const path=require('path');const os=require('os');const scriptName=\\\"stop.js\\\";const candidates=[path.join(process.cwd(), '.cursor', 'hooks', scriptName),path.join(os.homedir(), '.cursor', 'hooks', scriptName)];const target=candidates.find(candidate => fs.existsSync(candidate));if(!target) process.exit(0);require(target)\"",
@@ -23,8 +23,9 @@ function readStdin() {
23
23
  }
24
24
 
25
25
  function getPluginRoot() {
26
- const homeStyleRoot = path.resolve(__dirname, '..');
26
+ const os = require('os');
27
27
  const repoStyleRoot = path.resolve(__dirname, '..', '..');
28
+ const awEccHome = path.join(os.homedir(), '.aw-ecc');
28
29
 
29
30
  if (
30
31
  fs.existsSync(path.join(repoStyleRoot, 'package.json'))
@@ -34,7 +35,11 @@ function getPluginRoot() {
34
35
  return repoStyleRoot;
35
36
  }
36
37
 
37
- return homeStyleRoot;
38
+ if (fs.existsSync(path.join(awEccHome, 'scripts', 'lib', 'aw-usage-telemetry.js'))) {
39
+ return awEccHome;
40
+ }
41
+
42
+ return path.resolve(__dirname, '..');
38
43
  }
39
44
 
40
45
  function transformToClaude(cursorInput, overrides = {}) {
@@ -43,12 +48,17 @@ function transformToClaude(cursorInput, overrides = {}) {
43
48
  const inferredToolName = cursorInput.tool_name
44
49
  || (server && tool ? `mcp__${server}__${tool}` : '');
45
50
 
51
+ // Preserve original tool_input fields (skill, subagent_type, description, etc.)
52
+ const originalToolInput = cursorInput.tool_input || {};
53
+
46
54
  return {
47
55
  tool_name: inferredToolName,
48
56
  server,
49
57
  tool,
58
+ exit_code: cursorInput.exit_code,
50
59
  tool_input: {
51
- command: cursorInput.command || cursorInput.args?.command || '',
60
+ ...originalToolInput,
61
+ command: cursorInput.command || cursorInput.args?.command || originalToolInput.command || '',
52
62
  file_path: cursorInput.path || cursorInput.file || cursorInput.args?.filePath || '',
53
63
  server,
54
64
  mcp_server: server,
@@ -60,7 +70,28 @@ function transformToClaude(cursorInput, overrides = {}) {
60
70
  output: cursorInput.output || cursorInput.result || '',
61
71
  ...overrides.tool_output,
62
72
  },
73
+ tool_response: {
74
+ exit_code: cursorInput.exit_code,
75
+ output: cursorInput.output || cursorInput.result || '',
76
+ },
63
77
  transcript_path: cursorInput.transcript_path || cursorInput.transcriptPath || cursorInput.session?.transcript_path || '',
78
+ // Cursor common schema fields surfaced at top level for buildEvent()
79
+ generation_id: cursorInput.generation_id,
80
+ conversation_id: cursorInput.conversation_id,
81
+ workspace_roots: cursorInput.workspace_roots,
82
+ model: cursorInput.model,
83
+ user_email: cursorInput.user_email,
84
+ cursor_version: cursorInput.cursor_version,
85
+ status: cursorInput.status,
86
+ reason: cursorInput.reason,
87
+ // Token fields — Cursor sends these on afterAgentResponse and stop hooks
88
+ input_tokens: cursorInput.input_tokens,
89
+ output_tokens: cursorInput.output_tokens,
90
+ cache_read_tokens: cursorInput.cache_read_tokens,
91
+ cache_write_tokens: cursorInput.cache_write_tokens,
92
+ // Subagent fields
93
+ task: cursorInput.task,
94
+ description: cursorInput.description,
64
95
  _cursor: {
65
96
  conversation_id: cursorInput.conversation_id,
66
97
  hook_event_name: cursorInput.hook_event_name,
@@ -100,7 +131,13 @@ function runExistingHook(scriptName, stdinData) {
100
131
  path.join(root, 'scripts', 'hooks', scriptName),
101
132
  path.join(root, 'hooks', scriptName),
102
133
  ];
103
- const scriptPath = candidates.find(candidate => fs.existsSync(candidate)) || candidates[0];
134
+ const scriptPath = candidates.find(candidate => fs.existsSync(candidate));
135
+ if (!scriptPath) {
136
+ if (process.env.AW_HOOK_DEBUG === '1') {
137
+ process.stderr.write(`[aw] Cannot find hook script: ${scriptName}\n`);
138
+ }
139
+ return undefined;
140
+ }
104
141
  return runManagedCommand('node', [scriptPath], stdinData);
105
142
  }
106
143
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const { readStdin, runManagedShellHook } = require('./adapter');
2
+ const { readStdin, runManagedShellHook, runExistingHook, transformToClaude } = require('./adapter');
3
3
 
4
4
  function emitAwPromptReminder(raw) {
5
5
  const result = runManagedShellHook('scripts/hooks/shared/user-prompt-submit.sh', raw);
@@ -37,5 +37,11 @@ readStdin().then(raw => {
37
37
  } catch (_error) {
38
38
  // Reminder emission is advisory and should not break the prompt flow.
39
39
  }
40
+ try {
41
+ const claudePayload = transformToClaude(JSON.parse(raw));
42
+ runExistingHook('aw-usage-prompt-submit.js', JSON.stringify(claudePayload));
43
+ } catch (_error) {
44
+ // Telemetry is best-effort and should not block prompt submission.
45
+ }
40
46
  process.stdout.write(raw);
41
47
  }).catch(() => process.exit(0));
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Usage telemetry — commit_created event.
4
+ *
5
+ * Called from the post-commit git hook when the commit has an AW
6
+ * Co-Authored-By trailer. Works for all harnesses (Claude, Cursor, Codex)
7
+ * since it fires from a git-level hook, not a harness-specific one.
8
+ *
9
+ * Usage: node aw-usage-commit-created.js <commit_hash> <branch>
10
+ */
11
+
12
+ 'use strict';
13
+
14
+ const { buildEvent, sendAsync, isDisabled } = require('../lib/aw-usage-telemetry');
15
+
16
+ if (isDisabled()) process.exit(0);
17
+
18
+ const commitHash = process.argv[2] || 'unknown';
19
+ const branch = process.argv[3] || 'unknown';
20
+
21
+ // Minimal input — no harness session context in a git hook.
22
+ // detectHarness() will return 'claude' (default) but the event
23
+ // payload makes it clear this is harness-agnostic.
24
+ const event = buildEvent({}, 'commit_created', {
25
+ commit_hash: commitHash,
26
+ branch,
27
+ });
28
+
29
+ // Override harness to 'git' since this fires from a git hook, not a harness
30
+ event.harness = 'git';
31
+
32
+ sendAsync(event);
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Usage telemetry — PostToolUseFailure hook.
4
+ *
5
+ * Claude: error (string/object) + is_interrupt (boolean).
6
+ * Cursor: error_message (string) + failure_type ("timeout"/"error"/"permission_denied").
7
+ * Codex: does NOT support PostToolUseFailure — this hook won't fire.
8
+ *
9
+ * Outputs {} on stdout.
10
+ */
11
+
12
+ 'use strict';
13
+
14
+ const { buildEvent, sendAsync } = require('../lib/aw-usage-telemetry');
15
+
16
+ const MAX_STDIN = 1024 * 1024;
17
+ let raw = '';
18
+
19
+ process.stdin.setEncoding('utf8');
20
+ process.stdin.on('data', chunk => {
21
+ if (raw.length < MAX_STDIN) {
22
+ raw += chunk.substring(0, MAX_STDIN - raw.length);
23
+ }
24
+ });
25
+
26
+ process.stdin.on('end', () => {
27
+ try {
28
+ const input = JSON.parse(raw);
29
+ const toolName = input.tool_name || 'unknown';
30
+
31
+ // Normalize error fields across Claude and Cursor
32
+ let errorMessage;
33
+ let failureType;
34
+
35
+ if (input.error_message !== undefined) {
36
+ // Cursor format
37
+ errorMessage = String(input.error_message || '');
38
+ failureType = input.failure_type || 'error';
39
+ } else {
40
+ // Claude format
41
+ const err = input.error;
42
+ errorMessage = typeof err === 'string' ? err : (err?.message || JSON.stringify(err) || 'unknown');
43
+ failureType = input.is_interrupt ? 'interrupt' : 'error';
44
+ }
45
+
46
+ sendAsync(buildEvent(input, 'tool_error', {
47
+ tool_name: toolName,
48
+ error_message: errorMessage.slice(0, 500),
49
+ failure_type: failureType,
50
+ }));
51
+ } catch {
52
+ // Non-blocking.
53
+ }
54
+
55
+ process.stdout.write('{}');
56
+ });