@evertonferreira96/agents 0.0.0-stage → 0.1.1

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/.claude/agents/api.md +45 -0
  2. package/.claude/agents/app.md +41 -0
  3. package/.claude/agents/architect.md +49 -0
  4. package/.claude/agents/infra.md +27 -0
  5. package/.claude/agents/product.md +58 -0
  6. package/.claude/agents/quick.md +33 -0
  7. package/.claude/agents/security.md +39 -0
  8. package/.claude/agents/ui.md +54 -0
  9. package/.claude/agents/verifier.md +56 -0
  10. package/.claude/agents/web.md +41 -0
  11. package/.claude/hooks/config-update-check.mjs +14 -0
  12. package/.claude/hooks/context-budget.mjs +51 -0
  13. package/.claude/hooks/graphify-update.sh +16 -0
  14. package/.claude/hooks/guard-bash.sh +64 -0
  15. package/.claude/hooks/orchestrator-guard.sh +49 -0
  16. package/.claude/hooks/post-compact.sh +26 -0
  17. package/.claude/hooks/readonly-guard.sh +54 -0
  18. package/.claude/hooks/stop-verify.sh +52 -0
  19. package/.claude/rules/api.md +21 -0
  20. package/.claude/rules/db.md +9 -0
  21. package/.claude/rules/delivery-diagram.md +16 -0
  22. package/.claude/rules/git-workflow.md +34 -0
  23. package/.claude/rules/graphify.md +3 -0
  24. package/.claude/rules/mobile.md +22 -0
  25. package/.claude/rules/tickets.md +9 -0
  26. package/.claude/rules/ui.md +14 -0
  27. package/.claude/rules/web.md +27 -0
  28. package/.claude/settings.json +114 -0
  29. package/.claude/skills/animate/RECIPES.md +324 -0
  30. package/.claude/skills/animate/SKILL.md +208 -0
  31. package/.claude/skills/animate/agents/openai.yaml +5 -0
  32. package/.claude/skills/animate-expo/RECIPES.md +385 -0
  33. package/.claude/skills/animate-expo/SKILL.md +264 -0
  34. package/.claude/skills/animate-expo/agents/openai.yaml +5 -0
  35. package/.claude/skills/animation-performance/SKILL.md +223 -0
  36. package/.claude/skills/animation-performance/agents/openai.yaml +5 -0
  37. package/.claude/skills/apple-design/SKILL.md +291 -0
  38. package/.claude/skills/apple-design/agents/openai.yaml +5 -0
  39. package/.claude/skills/arch-api/SKILL.md +291 -0
  40. package/.claude/skills/arch-api/agents/openai.yaml +3 -0
  41. package/.claude/skills/arch-api/references/common.md +174 -0
  42. package/.claude/skills/arch-api/references/contract.md +289 -0
  43. package/.claude/skills/arch-api/references/domain.md +301 -0
  44. package/.claude/skills/arch-api/references/endpoints.md +184 -0
  45. package/.claude/skills/arch-api/references/review.md +228 -0
  46. package/.claude/skills/arch-api/references/security.md +151 -0
  47. package/.claude/skills/arch-app/SKILL.md +278 -0
  48. package/.claude/skills/arch-app/agents/openai.yaml +3 -0
  49. package/.claude/skills/arch-app/references/navigation-session.md +257 -0
  50. package/.claude/skills/arch-app/references/review.md +155 -0
  51. package/.claude/skills/arch-app/references/screens.md +214 -0
  52. package/.claude/skills/arch-app/references/services.md +301 -0
  53. package/.claude/skills/arch-app/references/ui-mobile.md +124 -0
  54. package/.claude/skills/arch-db/SKILL.md +181 -0
  55. package/.claude/skills/arch-db/agents/openai.yaml +3 -0
  56. package/.claude/skills/arch-db/references/indexes-queries.md +251 -0
  57. package/.claude/skills/arch-db/references/migrations.md +191 -0
  58. package/.claude/skills/arch-db/references/modeling.md +214 -0
  59. package/.claude/skills/arch-db/references/mysql.md +262 -0
  60. package/.claude/skills/arch-db/references/pooling-ops.md +112 -0
  61. package/.claude/skills/arch-db/references/review.md +143 -0
  62. package/.claude/skills/arch-db/references/transactions-locks.md +141 -0
  63. package/.claude/skills/arch-web/SKILL.md +307 -0
  64. package/.claude/skills/arch-web/agents/openai.yaml +3 -0
  65. package/.claude/skills/arch-web/references/auth-session-env.md +165 -0
  66. package/.claude/skills/arch-web/references/blocks.md +198 -0
  67. package/.claude/skills/arch-web/references/cache.md +124 -0
  68. package/.claude/skills/arch-web/references/review.md +142 -0
  69. package/.claude/skills/arch-web/references/services.md +297 -0
  70. package/.claude/skills/arch-web/references/tests.md +159 -0
  71. package/.claude/skills/arch-web/references/ui-forms.md +143 -0
  72. package/.claude/skills/break-ui/CATALOG.md +135 -0
  73. package/.claude/skills/break-ui/SKILL.md +176 -0
  74. package/.claude/skills/break-ui/agents/openai.yaml +5 -0
  75. package/.claude/skills/brief/SKILL.md +91 -0
  76. package/.claude/skills/brief/agents/openai.yaml +3 -0
  77. package/.claude/skills/diagnosing-bugs/SKILL.md +138 -0
  78. package/.claude/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  79. package/.claude/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
  80. package/.claude/skills/emil-design-eng/SKILL.md +675 -0
  81. package/.claude/skills/emil-design-eng/agents/openai.yaml +5 -0
  82. package/.claude/skills/find-animation-opportunities/SKILL.md +141 -0
  83. package/.claude/skills/find-animation-opportunities/agents/openai.yaml +5 -0
  84. package/.claude/skills/graphify/.graphify_version +1 -0
  85. package/.claude/skills/graphify/SKILL.md +742 -0
  86. package/.claude/skills/graphify/agents/openai.yaml +3 -0
  87. package/.claude/skills/graphify/references/add-watch.md +56 -0
  88. package/.claude/skills/graphify/references/exports.md +91 -0
  89. package/.claude/skills/graphify/references/extraction-spec.md +70 -0
  90. package/.claude/skills/graphify/references/github-and-merge.md +46 -0
  91. package/.claude/skills/graphify/references/hooks.md +33 -0
  92. package/.claude/skills/graphify/references/query.md +317 -0
  93. package/.claude/skills/graphify/references/transcribe.md +52 -0
  94. package/.claude/skills/graphify/references/update.md +221 -0
  95. package/.claude/skills/grill-me/SKILL.md +7 -0
  96. package/.claude/skills/grill-me/agents/openai.yaml +5 -0
  97. package/.claude/skills/grill-with-docs/SKILL.md +64 -0
  98. package/.claude/skills/grill-with-docs/agents/openai.yaml +5 -0
  99. package/.claude/skills/grilling/SKILL.md +30 -0
  100. package/.claude/skills/grilling/agents/openai.yaml +3 -0
  101. package/.claude/skills/handoff/SKILL.md +28 -0
  102. package/.claude/skills/handoff/agents/openai.yaml +5 -0
  103. package/.claude/skills/impeccable/SKILL.md +89 -0
  104. package/.claude/skills/impeccable/agents/openai.yaml +5 -0
  105. package/.claude/skills/impeccable/reference/adapt.md +318 -0
  106. package/.claude/skills/impeccable/reference/adapt.native.md +58 -0
  107. package/.claude/skills/impeccable/reference/android.md +46 -0
  108. package/.claude/skills/impeccable/reference/animate.md +89 -0
  109. package/.claude/skills/impeccable/reference/audit.md +137 -0
  110. package/.claude/skills/impeccable/reference/audit.native.md +139 -0
  111. package/.claude/skills/impeccable/reference/bolder.md +33 -0
  112. package/.claude/skills/impeccable/reference/clarify.md +94 -0
  113. package/.claude/skills/impeccable/reference/colorize.md +86 -0
  114. package/.claude/skills/impeccable/reference/component-review.md +63 -0
  115. package/.claude/skills/impeccable/reference/craft-floor.md +44 -0
  116. package/.claude/skills/impeccable/reference/craft.md +5 -0
  117. package/.claude/skills/impeccable/reference/critique.md +809 -0
  118. package/.claude/skills/impeccable/reference/degraded/asset-producer.md +42 -0
  119. package/.claude/skills/impeccable/reference/degraded/documenter.md +24 -0
  120. package/.claude/skills/impeccable/reference/degraded/finish-reviewer.md +38 -0
  121. package/.claude/skills/impeccable/reference/degraded/manual-edit-applier.md +92 -0
  122. package/.claude/skills/impeccable/reference/delight.md +70 -0
  123. package/.claude/skills/impeccable/reference/distill.md +111 -0
  124. package/.claude/skills/impeccable/reference/doctor.md +54 -0
  125. package/.claude/skills/impeccable/reference/document.md +416 -0
  126. package/.claude/skills/impeccable/reference/extract.md +69 -0
  127. package/.claude/skills/impeccable/reference/generate.md +101 -0
  128. package/.claude/skills/impeccable/reference/harden.md +345 -0
  129. package/.claude/skills/impeccable/reference/hooks.md +113 -0
  130. package/.claude/skills/impeccable/reference/init.md +131 -0
  131. package/.claude/skills/impeccable/reference/ios.md +51 -0
  132. package/.claude/skills/impeccable/reference/layout.md +84 -0
  133. package/.claude/skills/impeccable/reference/live-setup.md +104 -0
  134. package/.claude/skills/impeccable/reference/live.md +325 -0
  135. package/.claude/skills/impeccable/reference/mode-operate.md +21 -0
  136. package/.claude/skills/impeccable/reference/mode-persuade.md +19 -0
  137. package/.claude/skills/impeccable/reference/mode-read.md +21 -0
  138. package/.claude/skills/impeccable/reference/new-work.md +154 -0
  139. package/.claude/skills/impeccable/reference/onboard.md +234 -0
  140. package/.claude/skills/impeccable/reference/operate.md +61 -0
  141. package/.claude/skills/impeccable/reference/optimize.md +258 -0
  142. package/.claude/skills/impeccable/reference/overdrive.md +127 -0
  143. package/.claude/skills/impeccable/reference/polish.md +105 -0
  144. package/.claude/skills/impeccable/reference/quieter.md +99 -0
  145. package/.claude/skills/impeccable/reference/region-map.md +26 -0
  146. package/.claude/skills/impeccable/reference/routing.md +24 -0
  147. package/.claude/skills/impeccable/reference/shape.md +59 -0
  148. package/.claude/skills/impeccable/reference/typeset.md +80 -0
  149. package/.claude/skills/impeccable/reference/visualize.md +47 -0
  150. package/.claude/skills/impeccable/scripts/VERSION +1 -0
  151. package/.claude/skills/impeccable/scripts/command-metadata.json +98 -0
  152. package/.claude/skills/impeccable/scripts/data/font-index-failures.json +121 -0
  153. package/.claude/skills/impeccable/scripts/data/font-index.json +1 -0
  154. package/.claude/skills/impeccable/scripts/impeccable +206 -0
  155. package/.claude/skills/impeccable/scripts/impeccable.cmd +214 -0
  156. package/.claude/skills/impeccable/scripts/live-browser-dom.js +281 -0
  157. package/.claude/skills/impeccable/scripts/live-browser-ignores.js +242 -0
  158. package/.claude/skills/impeccable/scripts/live-browser-session.js +148 -0
  159. package/.claude/skills/impeccable/scripts/live-browser.js +13532 -0
  160. package/.claude/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  161. package/.claude/skills/improve-animations/AUDIT.md +115 -0
  162. package/.claude/skills/improve-animations/PLAN-TEMPLATE.md +73 -0
  163. package/.claude/skills/improve-animations/SKILL.md +110 -0
  164. package/.claude/skills/improve-animations/agents/openai.yaml +5 -0
  165. package/.claude/skills/mobile-native/SKILL.md +311 -0
  166. package/.claude/skills/mobile-native/agents/openai.yaml +3 -0
  167. package/.claude/skills/orchestrate/SKILL.md +181 -0
  168. package/.claude/skills/orchestrate/agents/openai.yaml +3 -0
  169. package/.claude/skills/pick-ui-library/SKILL.md +85 -0
  170. package/.claude/skills/pick-ui-library/agents/openai.yaml +5 -0
  171. package/.claude/skills/ponytail/SKILL.md +52 -0
  172. package/.claude/skills/ponytail/agents/openai.yaml +3 -0
  173. package/.claude/skills/ponytail-audit/SKILL.md +103 -0
  174. package/.claude/skills/ponytail-audit/agents/openai.yaml +3 -0
  175. package/.claude/skills/ponytail-debt/SKILL.md +44 -0
  176. package/.claude/skills/ponytail-debt/agents/openai.yaml +3 -0
  177. package/.claude/skills/ponytail-review/SKILL.md +101 -0
  178. package/.claude/skills/ponytail-review/agents/openai.yaml +3 -0
  179. package/.claude/skills/postgres-best-practices/SKILL.md +42 -0
  180. package/.claude/skills/postgres-best-practices/agents/openai.yaml +3 -0
  181. package/.claude/skills/postgres-best-practices/references/backup-restore.md +372 -0
  182. package/.claude/skills/postgres-best-practices/references/bulk-loading.md +315 -0
  183. package/.claude/skills/postgres-best-practices/references/connection-pooling.md +310 -0
  184. package/.claude/skills/postgres-best-practices/references/hot-standby.md +221 -0
  185. package/.claude/skills/postgres-best-practices/references/indexing.md +318 -0
  186. package/.claude/skills/postgres-best-practices/references/logical-replication.md +610 -0
  187. package/.claude/skills/postgres-best-practices/references/major-version-upgrades.md +334 -0
  188. package/.claude/skills/postgres-best-practices/references/performance-diagnostics.md +553 -0
  189. package/.claude/skills/postgres-best-practices/references/query-optimization.md +294 -0
  190. package/.claude/skills/postgres-best-practices/references/query-patterns.md +566 -0
  191. package/.claude/skills/postgres-best-practices/references/schema-design.md +362 -0
  192. package/.claude/skills/postgres-best-practices/references/security-roles.md +489 -0
  193. package/.claude/skills/postgres-best-practices/references/transaction-isolation.md +344 -0
  194. package/.claude/skills/project-docs/SKILL.md +330 -0
  195. package/.claude/skills/project-docs/agents/openai.yaml +3 -0
  196. package/.claude/skills/prototype/PICKER.md +197 -0
  197. package/.claude/skills/prototype/SKILL.md +98 -0
  198. package/.claude/skills/prototype/agents/openai.yaml +5 -0
  199. package/.claude/skills/retro/SKILL.md +43 -0
  200. package/.claude/skills/retro/agents/openai.yaml +5 -0
  201. package/.claude/skills/review/SKILL.md +74 -0
  202. package/.claude/skills/review/agents/openai.yaml +3 -0
  203. package/.claude/skills/review/references/smells.md +23 -0
  204. package/.claude/skills/review-animations/SKILL.md +120 -0
  205. package/.claude/skills/review-animations/STANDARDS.md +187 -0
  206. package/.claude/skills/review-animations/agents/openai.yaml +5 -0
  207. package/.claude/skills/tdd/SKILL.md +38 -0
  208. package/.claude/skills/tdd/agents/openai.yaml +3 -0
  209. package/.claude/skills/tdd/mocking.md +59 -0
  210. package/.claude/skills/tdd/tests.md +77 -0
  211. package/.claude/skills/triage/SKILL.md +58 -0
  212. package/.claude/skills/triage/agents/openai.yaml +3 -0
  213. package/.claude/skills/ui-ux-pro-max/SKILL.md +378 -0
  214. package/.claude/skills/ui-ux-pro-max/agents/openai.yaml +5 -0
  215. package/.claude/skills/ui-ux-pro-max/data/charts.csv +26 -0
  216. package/.claude/skills/ui-ux-pro-max/data/colors.csv +97 -0
  217. package/.claude/skills/ui-ux-pro-max/data/icons.csv +101 -0
  218. package/.claude/skills/ui-ux-pro-max/data/landing.csv +31 -0
  219. package/.claude/skills/ui-ux-pro-max/data/products.csv +97 -0
  220. package/.claude/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  221. package/.claude/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  222. package/.claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  223. package/.claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  224. package/.claude/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  225. package/.claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  226. package/.claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  227. package/.claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  228. package/.claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  229. package/.claude/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  230. package/.claude/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  231. package/.claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  232. package/.claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  233. package/.claude/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  234. package/.claude/skills/ui-ux-pro-max/data/styles.csv +68 -0
  235. package/.claude/skills/ui-ux-pro-max/data/typography.csv +58 -0
  236. package/.claude/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  237. package/.claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  238. package/.claude/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  239. package/.claude/skills/ui-ux-pro-max/scripts/core.py +253 -0
  240. package/.claude/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  241. package/.claude/skills/ui-ux-pro-max/scripts/search.py +114 -0
  242. package/.claude/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
  243. package/.claude/skills/writing-for-agents/SKILL.md +81 -0
  244. package/.claude/skills/writing-for-agents/agents/openai.yaml +3 -0
  245. package/.worktreeinclude +3 -0
  246. package/AGENTS.md +44 -0
  247. package/README.md +14 -2
  248. package/VERSION +1 -0
  249. package/bin/agents.mjs +45 -0
  250. package/docs/adr/README.md +31 -0
  251. package/docs/brief-template.md +3 -0
  252. package/docs/plans/README.md +73 -0
  253. package/package.json +46 -4
  254. package/scripts/bootstrap.mjs +188 -0
  255. package/scripts/check-catalog.mjs +43 -0
  256. package/scripts/skills-update.mjs +51 -0
  257. package/skills-lock.json +269 -0
  258. package/templates/CLAUDE.project.md +41 -0
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env bash
2
+ # PreToolUse Edit|Write|MultiEdit|NotebookEdit: the main session (no agent_id) writes only docs/plans, docs/adr, docs/README.md, .claude/ and root *.md.
3
+ input=$(cat)
4
+
5
+ field() {
6
+ if command -v jq >/dev/null 2>&1; then
7
+ printf '%s' "$input" | jq -r "$1 // empty"
8
+ else
9
+ printf '%s' "$input" | sed -n "s/.*\"$2\"[[:space:]]*:[[:space:]]*\"\(\([^\"\\\\]\|\\\\.\)*\)\".*/\1/p" | head -n1
10
+ fi
11
+ }
12
+
13
+ deny() {
14
+ echo "Orchestrator never edits code. Dispatch /quick or an implementer. ($1)" >&2
15
+ exit 2
16
+ }
17
+
18
+ [ -n "$(field '.agent_id' agent_id)" ] && exit 0
19
+
20
+ path=$(field '.tool_input.file_path // .tool_input.notebook_path' file_path)
21
+ [ -z "$path" ] && path=$(field '.tool_input.notebook_path' notebook_path)
22
+ command -v jq >/dev/null 2>&1 || path=$(printf '%b' "$path")
23
+ [ -z "$path" ] && exit 0
24
+
25
+ case "$path" in
26
+ */../*|../*|*/..) deny "$path" ;;
27
+ esac
28
+
29
+ root=${CLAUDE_PROJECT_DIR:-$(field '.cwd' cwd)}
30
+ rel=$path
31
+ case "$rel" in
32
+ */.claude/worktrees/*/*) rel=$(printf '%s' "$rel" | sed -E 's#^.*/\.claude/worktrees/[^/]+/##') ;;
33
+ .claude/worktrees/*/*) rel=$(printf '%s' "$rel" | sed -E 's#^\.claude/worktrees/[^/]+/##') ;;
34
+ "$root"/*) rel=${rel#"$root"/} ;;
35
+ /*)
36
+ case "$rel" in
37
+ */.claude/*) exit 0 ;;
38
+ *) deny "$path" ;;
39
+ esac
40
+ ;;
41
+ esac
42
+ rel=${rel#./}
43
+
44
+ case "$rel" in
45
+ docs/plans/*|docs/adr/*|docs/README.md|.claude/*) exit 0 ;;
46
+ */*) deny "$rel" ;;
47
+ *.md) exit 0 ;;
48
+ *) deny "$rel" ;;
49
+ esac
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env bash
2
+ # PostCompact / SessionStart(compact): re-inject the newest active plan after context compaction.
3
+ input=$(cat)
4
+
5
+ if command -v jq >/dev/null 2>&1; then
6
+ cwd=$(printf '%s' "$input" | jq -r '.cwd // empty')
7
+ else
8
+ cwd=$(printf '%s' "$input" | sed -n 's/.*"cwd"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n1)
9
+ fi
10
+ cwd=${cwd:-$PWD}
11
+
12
+ dir="$cwd/docs/plans"
13
+ [ -d "$dir" ] || exit 0
14
+
15
+ plan=""
16
+ while IFS= read -r f; do
17
+ case "$f" in */README.md) continue ;; esac
18
+ grep -Eiq '^status: *done' "$f" && continue
19
+ plan=$f
20
+ break
21
+ done < <(ls -t "$dir"/*.md 2>/dev/null)
22
+ [ -n "$plan" ] || exit 0
23
+
24
+ printf 'Re-injected after compaction. Active plan: %s\n' "${plan#$cwd/}"
25
+ head -n 120 "$plan"
26
+ exit 0
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env bash
2
+ # PreToolUse for readonly agents: edits only in .claude/agent-memory/, Bash only from an allowlist.
3
+ input=$(cat)
4
+
5
+ field() {
6
+ if command -v jq >/dev/null 2>&1; then
7
+ printf '%s' "$input" | jq -r "$1 // empty"
8
+ else
9
+ printf '%s' "$input" | sed -n "s/.*\"$2\"[[:space:]]*:[[:space:]]*\"\(\([^\"\\\\]\|\\\\.\)*\)\".*/\1/p" | head -n1
10
+ fi
11
+ }
12
+
13
+ deny() {
14
+ echo "Readonly agent: $1" >&2
15
+ exit 2
16
+ }
17
+
18
+ tool=$(field '.tool_name' tool_name)
19
+
20
+ case "$tool" in
21
+ Write|Edit|MultiEdit|NotebookEdit)
22
+ path=$(field '.tool_input.file_path // .tool_input.notebook_path' file_path)
23
+ command -v jq >/dev/null 2>&1 || path=$(printf '%b' "$path")
24
+ case "$path" in
25
+ */../*|../*) deny "edits allowed only in .claude/agent-memory/" ;;
26
+ .claude/agent-memory/*|*/.claude/agent-memory/*) exit 0 ;;
27
+ *) deny "edits allowed only in .claude/agent-memory/" ;;
28
+ esac
29
+ ;;
30
+ Bash)
31
+ cmd=$(field '.tool_input.command' command)
32
+ command -v jq >/dev/null 2>&1 || cmd=$(printf '%b' "$cmd")
33
+ [ -z "$cmd" ] && exit 0
34
+ case "$cmd" in
35
+ *'$('*|*'`'*) deny "command not in allowlist" ;;
36
+ esac
37
+ stripped=$(printf '%s' "$cmd" | sed -E 's#[0-9]?>[[:space:]]*/dev/null##g; s#2>&1##g')
38
+ case "$stripped" in
39
+ *'>'*) deny "command not in allowlist" ;;
40
+ esac
41
+ allow='^(graphify |git (log|diff|show|status|blame|worktree list)|gh (issue|pr) view|(ls|cat|head|tail|wc|grep|rg|find|tree|pwd|cd)( |$)|python3? [^;&|]*search\.py)'
42
+ segments=$(printf '%s\n' "$stripped" | sed -E 's/(\&\&|\|\||;|\|)/\n/g')
43
+ while IFS= read -r seg; do
44
+ s=$(printf '%s' "$seg" | sed -E 's/^[[:space:]]+//; s/[[:space:]]+$//; s/[[:space:]]+/ /g')
45
+ [ -z "$s" ] && continue
46
+ s=$(printf '%s' "$s" | sed -E 's/^git( -C [^ ]+| -c [^ ]+)+/git/')
47
+ printf '%s' "$s" | grep -Eq "$allow" || deny "command not in allowlist"
48
+ printf '%s' " $s " | grep -Eq '^ find .* -(exec|execdir|delete|ok|fprint)' && deny "command not in allowlist"
49
+ done <<< "$segments"
50
+ exit 0
51
+ ;;
52
+ esac
53
+
54
+ exit 0
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env bash
2
+ # Stop: run lint and test before the session may finish, only when the tree has changes.
3
+ input=$(cat)
4
+
5
+ if command -v jq >/dev/null 2>&1; then
6
+ active=$(printf '%s' "$input" | jq -r '.stop_hook_active // false')
7
+ cwd=$(printf '%s' "$input" | jq -r '.cwd // empty')
8
+ else
9
+ printf '%s' "$input" | grep -Eq '"stop_hook_active"[[:space:]]*:[[:space:]]*true' && active=true || active=false
10
+ cwd=$(printf '%s' "$input" | sed -n 's/.*"cwd"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' | head -n1)
11
+ fi
12
+
13
+ [ "$active" = "true" ] && exit 0
14
+ cwd=${cwd:-$PWD}
15
+ if st=$(git -C "$cwd" status --porcelain 2>/dev/null) && [ -z "$st" ]; then
16
+ exit 0
17
+ fi
18
+ [ -f "$cwd/package.json" ] || exit 0
19
+
20
+ marker="$cwd/.claude/.stop-verify-ran"
21
+ if [ -f "$marker" ] && [ -n "$(find "$marker" -mmin -10 2>/dev/null)" ]; then
22
+ exit 0
23
+ fi
24
+
25
+ cd "$cwd" || exit 0
26
+
27
+ if [ -f pnpm-lock.yaml ]; then pm=pnpm
28
+ elif [ -f yarn.lock ]; then pm=yarn
29
+ else pm=npm
30
+ fi
31
+
32
+ log=$(mktemp)
33
+ trap 'rm -f "$log"' EXIT
34
+
35
+ for script in lint test; do
36
+ grep -q "\"$script\"[[:space:]]*:" package.json || continue
37
+ if command -v timeout >/dev/null 2>&1; then
38
+ timeout 300 "$pm" run "$script" >"$log" 2>&1
39
+ else
40
+ "$pm" run "$script" >"$log" 2>&1
41
+ fi
42
+ rc=$?
43
+ if [ $rc -ne 0 ]; then
44
+ echo "--- $pm run $script (exit $rc), last 40 lines ---" >&2
45
+ tail -n 40 "$log" >&2
46
+ echo "Stop blocked: lint/test failed, fix before finishing" >&2
47
+ exit 2
48
+ fi
49
+ done
50
+
51
+ mkdir -p "$cwd/.claude" && touch "$marker"
52
+ exit 0
@@ -0,0 +1,21 @@
1
+ ---
2
+ paths:
3
+ - "apps/*api*/**"
4
+ - "apps/*-api/**"
5
+ - "packages/*api*/**"
6
+ - "services/**"
7
+ - "**/nest-cli.json"
8
+ - "**/*.controller.ts"
9
+ - "**/*.surface.ts"
10
+ - "**/*.guard.ts"
11
+ - "**/*.dto.ts"
12
+ - "**/*.module.ts"
13
+ - "**/*.port.ts"
14
+ - "**/*.adapter.ts"
15
+ - "**/openapi.json"
16
+ ---
17
+
18
+ # API code
19
+
20
+ Load skill `arch-api` before changing code here. Server-side work is delegated to `/api`.
21
+ New boundary, table or integration: run `/architect` first.
@@ -0,0 +1,9 @@
1
+ ---
2
+ paths: ["**/migrations/**", "**/migration/**", "**/db/**", "**/database/**", "**/schema/**", "**/*.sql", "**/repositories/**", "**/*.repository.ts", "**/entities/**", "**/*.entity.ts", "**/drizzle/**", "**/drizzle.config.*", "**/prisma/**", "**/schema.prisma", "**/knexfile.*", "**/ormconfig.*", "**/typeorm/**", "**/seeds/**", "**/seeders/**", "**/sgbds/**", "**/*.repository.adapter.ts", "**/*.sql.ts"]
3
+ ---
4
+
5
+ # Database code
6
+
7
+ Load skill `arch-db` before writing SQL, schema, migrations, indexes, seeds or repository queries (Postgres or MySQL); it points to `postgres-best-practices` for Postgres depth.
8
+ New table, partitioning, replica or change of data ownership: run `/architect` first (storage trigger).
9
+ Migrations must be reversible, zero-downtime (expand/contract) and run inside the repo's existing migration tool; do not invent a new one.
@@ -0,0 +1,16 @@
1
+ ---
2
+ paths: ["apps/**", "src/**", "packages/**"]
3
+ ---
4
+
5
+ # Delivery diagram
6
+
7
+ Required only when a delivery changes the flow between modules, services or events
8
+ (new hop, new route/job/topic, new fallback, changed ordering). Not for changes inside one function.
9
+
10
+ - Put a Mermaid `flowchart` or `sequenceDiagram` in the user-facing report.
11
+ - Show the real code path (module, service, topic names). Do not invent hops.
12
+ - Mark what is new or changed vs unchanged (e.g. `:::new` class or "(new)" in the label).
13
+ - If a gate/flag exists, show both paths or a decision node.
14
+ - If the repo has a draw.io playbook for that flow, update it in the same delivery.
15
+
16
+ Skip for typo, docs, rename or internal refactor with no control-flow change, or when the user declines.
@@ -0,0 +1,34 @@
1
+ # Git workflow
2
+
3
+ ## New task
4
+
5
+ - One task worktree per task, inside the repo:
6
+ `git fetch origin && git worktree add .claude/worktrees/<slug> -b <branch> origin/<default>`.
7
+ Steps in skill `orchestrate` section 2; then move the session into it (`EnterWorktree` or `claude -w <slug>`).
8
+ Never `git checkout` a branch in the shared cwd: parallel sessions share it.
9
+ - Branch names, lowercase: `type/sc-<number>` with a ticket id (`feat/sc-133903`), else `type/<short-slug>`.
10
+ `type` is one of `feat`, `fix`, `chore`, `docs`, `refactor`, `test`, `ci`. Slug = branch with `/` -> `-`.
11
+ - If the tree is dirty with unrelated changes, stop and ask. Do not stash or discard.
12
+
13
+ ## Implementer isolation (decided per spawn by the orchestrator)
14
+
15
+ - Sequential or single-scope work (all M, dependent L steps): the implementer works in the task worktree.
16
+ Brief: `Worktree: <task-wt>`, `Commit: no`. The implementer leaves changes uncommitted; the orchestrator commits.
17
+ - Truly parallel independent scopes (L): spawn with Agent `isolation: "worktree"`. `worktree.baseRef: head`
18
+ branches it from the task worktree HEAD. Brief: `Commit: yes`. The implementer commits on its own branch
19
+ with scoped `git add <paths>` and returns branch name and worktree path.
20
+ - Integration: `git -C <task-wt> merge --no-ff <branch>`, or when the merge is noisy
21
+ `git -C <impl-wt> diff <base>...HEAD | git -C <task-wt> apply --3way`. Resolve conflicts, commit, then continue.
22
+
23
+ ## Commit
24
+
25
+ - Stage only this task's files with explicit paths. Review `git status` and `git diff` first.
26
+ - Never stage `.env*`, credentials or key files unless the user names the file.
27
+ - Conventional commits. Subject says why, 1-2 sentences. Pass the message with a HEREDOC:
28
+ `git commit -m "$(cat <<'MSG' ... MSG)"`.
29
+ - Never use `--no-verify`, `--amend` or `-i` unless the user asks. No empty commits.
30
+ - Never `git add -A`, `git add .`, `git reset --hard`, `git checkout .`, `git clean -f`, `git stash`.
31
+
32
+ ## Push and PR
33
+
34
+ Never `git push` or open/merge/edit a PR unless the user explicitly asks. The guard-bash hook enforces this.
@@ -0,0 +1,3 @@
1
+ # Graphify
2
+
3
+ If `graphify-out/graph.json` exists: run `graphify query "<question>"`, `graphify path "<A>" "<B>"` or `graphify explain "<concept>"` before grep for architecture questions, then read only the cited files; read `graphify-out/GRAPH_REPORT.md` only for broad review. The graph is refreshed by the graphify-update hook after edits. If `graphify-out/graph.json` does not exist, do nothing graphify-related.
@@ -0,0 +1,22 @@
1
+ ---
2
+ paths:
3
+ - "apps/mobile/**"
4
+ - "apps/*mobile*/**"
5
+ - "apps/*app*/**"
6
+ - "apps/*rn*/**"
7
+ - "apps/*expo*/**"
8
+ - "**/app.json"
9
+ - "**/app.config.*"
10
+ - "**/eas.json"
11
+ - "**/metro.config.*"
12
+ - "**/App.tsx"
13
+ - "**/*.screen.tsx"
14
+ - "**/*.navigator.tsx"
15
+ - "**/src/screens/**"
16
+ - "**/app/_layout.tsx"
17
+ ---
18
+
19
+ # Mobile code
20
+
21
+ Load skill `arch-app` before changing code here. Implementation is delegated to `/app`.
22
+ Visual or design-system work goes to `/ui`.
@@ -0,0 +1,9 @@
1
+ # Tickets
2
+
3
+ Read tickets (Shortcut `SC-#####`, GitHub issues, or the workspace tracker) when needed for scope.
4
+
5
+ Never create, update, assign, transition or comment on a ticket or PR (Shortcut stories, GitHub issues,
6
+ PR comments/reviews) unless the user explicitly asks for that write.
7
+
8
+ "Start the task", implement, review and commit do not count as permission. The guard-bash hook blocks
9
+ `gh issue create|comment|edit|close`, `gh pr comment|review|create` and Shortcut CLI writes.
@@ -0,0 +1,14 @@
1
+ ---
2
+ paths: ["**/components/**", "**/ui/**", "**/design-system/**", "**/*.css", "**/tokens/**"]
3
+ ---
4
+
5
+ # Design system
6
+
7
+ - If `DESIGN.md` (and `PRODUCT.md`) exist, follow them. They win over personal taste.
8
+ - Tokens first: use existing color, spacing, radius, typography and motion tokens. No literal hex/rgb,
9
+ px spacing or ad hoc durations when a token exists. Missing token: add it to the token source, not inline.
10
+ - Every change works in light and dark themes.
11
+ - A11y: semantic elements, visible focus, labels for inputs and icon buttons, contrast >= WCAG AA,
12
+ keyboard reachable, `prefers-reduced-motion` respected.
13
+ - Reuse existing components before creating one. Do not add a new UI library.
14
+ - Design-system decisions (new token, new component, DESIGN.md change) belong to `/ui`.
@@ -0,0 +1,27 @@
1
+ ---
2
+ paths:
3
+ - "apps/web/**"
4
+ - "apps/*web*/**"
5
+ - "apps/*admin*/**"
6
+ - "apps/*next*/**"
7
+ - "**/next.config.*"
8
+ - "**/app/**/page.tsx"
9
+ - "**/app/**/layout.tsx"
10
+ - "**/app/**/route.ts"
11
+ - "**/app/**/loading.tsx"
12
+ - "**/app/**/error.tsx"
13
+ - "**/*.server-action.ts"
14
+ - "**/app/**/blocks/**"
15
+ - "**/src/blueprints/**"
16
+ - "**/*.client.tsx"
17
+ - "**/*.loader.tsx"
18
+ - "**/*.revalidate.ts"
19
+ - "**/middleware.ts"
20
+ - "**/proxy.ts"
21
+ - "**/instrumentation.ts"
22
+ ---
23
+
24
+ # Web code
25
+
26
+ Load skill `arch-web` before changing code here; it owns structure and the references in `arch-web/references/` (services and Server Actions, blocks and RSC composition, cache, auth and session, UI and forms, tests). Implementation is delegated to `/web`.
27
+ For UI or visual work (tokens, components, motion, a11y), delegate to `/ui`; the design skills are preloaded there and are not reachable from here. Mobile-web fixes: `mobile-native`.
@@ -0,0 +1,114 @@
1
+ {
2
+ "subagentPromptCacheTtl": "1h",
3
+ "env": {
4
+ "CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH": "1",
5
+ "CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS": "5"
6
+ },
7
+ "worktree": {
8
+ "baseRef": "head"
9
+ },
10
+ "autoCompactWindow": 120000,
11
+ "hooks": {
12
+ "PreToolUse": [
13
+ {
14
+ "matcher": "Bash",
15
+ "hooks": [
16
+ {
17
+ "type": "command",
18
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/guard-bash.sh\""
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "matcher": "Bash|Grep",
24
+ "hooks": [
25
+ {
26
+ "type": "command",
27
+ "command": "graphify hook-guard search",
28
+ "timeout": 10
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "matcher": "Read|Glob",
34
+ "hooks": [
35
+ {
36
+ "type": "command",
37
+ "command": "graphify hook-guard read",
38
+ "timeout": 10
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "matcher": "Edit|Write|MultiEdit|NotebookEdit",
44
+ "hooks": [
45
+ {
46
+ "type": "command",
47
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/orchestrator-guard.sh\""
48
+ }
49
+ ]
50
+ }
51
+ ],
52
+ "PostToolUse": [
53
+ {
54
+ "matcher": "Edit|Write|MultiEdit",
55
+ "hooks": [
56
+ {
57
+ "type": "command",
58
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/graphify-update.sh\""
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "hooks": [
64
+ {
65
+ "type": "command",
66
+ "command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/context-budget.mjs\"",
67
+ "timeout": 10
68
+ }
69
+ ]
70
+ }
71
+ ],
72
+ "Stop": [
73
+ {
74
+ "hooks": [
75
+ {
76
+ "type": "command",
77
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/stop-verify.sh\""
78
+ }
79
+ ]
80
+ }
81
+ ],
82
+ "PostCompact": [
83
+ {
84
+ "hooks": [
85
+ {
86
+ "type": "command",
87
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/post-compact.sh\""
88
+ }
89
+ ]
90
+ }
91
+ ],
92
+ "SessionStart": [
93
+ {
94
+ "matcher": "compact",
95
+ "hooks": [
96
+ {
97
+ "type": "command",
98
+ "command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/post-compact.sh\""
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ "matcher": "startup|resume",
104
+ "hooks": [
105
+ {
106
+ "type": "command",
107
+ "command": "node \"$CLAUDE_PROJECT_DIR/.claude/hooks/config-update-check.mjs\"",
108
+ "timeout": 5
109
+ }
110
+ ]
111
+ }
112
+ ]
113
+ }
114
+ }