timsquad 3.5.0 → 3.7.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 (454) hide show
  1. package/README.ko.md +103 -107
  2. package/README.md +100 -104
  3. package/dist/commands/daemon.d.ts.map +1 -1
  4. package/dist/commands/daemon.js +48 -2
  5. package/dist/commands/daemon.js.map +1 -1
  6. package/dist/commands/init.js +46 -14
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/{upgrade.d.ts → update.d.ts} +3 -3
  9. package/dist/commands/update.d.ts.map +1 -0
  10. package/dist/commands/{upgrade.js → update.js} +12 -17
  11. package/dist/commands/update.js.map +1 -0
  12. package/dist/daemon/context-writer.d.ts +14 -0
  13. package/dist/daemon/context-writer.d.ts.map +1 -1
  14. package/dist/daemon/context-writer.js +29 -0
  15. package/dist/daemon/context-writer.js.map +1 -1
  16. package/dist/daemon/event-queue.d.ts +7 -11
  17. package/dist/daemon/event-queue.d.ts.map +1 -1
  18. package/dist/daemon/event-queue.js +78 -118
  19. package/dist/daemon/event-queue.js.map +1 -1
  20. package/dist/daemon/file-watcher.d.ts +14 -8
  21. package/dist/daemon/file-watcher.d.ts.map +1 -1
  22. package/dist/daemon/file-watcher.js +78 -41
  23. package/dist/daemon/file-watcher.js.map +1 -1
  24. package/dist/daemon/index.d.ts +1 -1
  25. package/dist/daemon/index.d.ts.map +1 -1
  26. package/dist/daemon/index.js +54 -47
  27. package/dist/daemon/index.js.map +1 -1
  28. package/dist/index.js +3 -41
  29. package/dist/index.js.map +1 -1
  30. package/dist/lib/agent-generator.d.ts.map +1 -1
  31. package/dist/lib/agent-generator.js +21 -10
  32. package/dist/lib/agent-generator.js.map +1 -1
  33. package/dist/lib/compile-rules.d.ts +2 -0
  34. package/dist/lib/compile-rules.d.ts.map +1 -1
  35. package/dist/lib/compile-rules.js +39 -4
  36. package/dist/lib/compile-rules.js.map +1 -1
  37. package/dist/lib/compiler.d.ts +22 -1
  38. package/dist/lib/compiler.d.ts.map +1 -1
  39. package/dist/lib/compiler.js +178 -12
  40. package/dist/lib/compiler.js.map +1 -1
  41. package/dist/lib/config.d.ts +3 -0
  42. package/dist/lib/config.d.ts.map +1 -1
  43. package/dist/lib/config.js +17 -2
  44. package/dist/lib/config.js.map +1 -1
  45. package/dist/{commands/log.d.ts → lib/log-utils.d.ts} +7 -15
  46. package/dist/lib/log-utils.d.ts.map +1 -0
  47. package/dist/lib/log-utils.js +347 -0
  48. package/dist/lib/log-utils.js.map +1 -0
  49. package/dist/lib/skill-generator.d.ts +1 -1
  50. package/dist/lib/skill-generator.d.ts.map +1 -1
  51. package/dist/lib/skill-generator.js +19 -44
  52. package/dist/lib/skill-generator.js.map +1 -1
  53. package/dist/lib/ssot-map.d.ts +31 -0
  54. package/dist/lib/ssot-map.d.ts.map +1 -0
  55. package/dist/lib/ssot-map.js +79 -0
  56. package/dist/lib/ssot-map.js.map +1 -0
  57. package/dist/lib/template.d.ts +10 -3
  58. package/dist/lib/template.d.ts.map +1 -1
  59. package/dist/lib/template.js +137 -22
  60. package/dist/lib/template.js.map +1 -1
  61. package/dist/lib/upgrade-backup.js +1 -1
  62. package/dist/lib/upgrade-backup.js.map +1 -1
  63. package/dist/lib/workflow-state.d.ts +1 -1
  64. package/dist/lib/workflow-state.d.ts.map +1 -1
  65. package/dist/lib/workflow-state.js +1 -1
  66. package/dist/lib/workflow-state.js.map +1 -1
  67. package/dist/types/config.d.ts +10 -1
  68. package/dist/types/config.d.ts.map +1 -1
  69. package/dist/types/config.js +46 -41
  70. package/dist/types/config.js.map +1 -1
  71. package/dist/types/feedback.d.ts +1 -54
  72. package/dist/types/feedback.d.ts.map +1 -1
  73. package/dist/types/feedback.js +1 -22
  74. package/dist/types/feedback.js.map +1 -1
  75. package/dist/types/index.d.ts +1 -0
  76. package/dist/types/index.d.ts.map +1 -1
  77. package/dist/types/index.js +1 -0
  78. package/dist/types/index.js.map +1 -1
  79. package/dist/types/meta-index.d.ts +8 -0
  80. package/dist/types/meta-index.d.ts.map +1 -1
  81. package/dist/types/project.d.ts +6 -1
  82. package/dist/types/project.d.ts.map +1 -1
  83. package/dist/types/project.js +15 -0
  84. package/dist/types/project.js.map +1 -1
  85. package/dist/types/ssot-map.d.ts +30 -0
  86. package/dist/types/ssot-map.d.ts.map +1 -0
  87. package/dist/types/ssot-map.js +6 -0
  88. package/dist/types/ssot-map.js.map +1 -0
  89. package/package.json +1 -1
  90. package/templates/base/agents/base/tsq-architect.md +1 -1
  91. package/templates/base/agents/base/tsq-dba.md +3 -1
  92. package/templates/base/agents/base/tsq-designer.md +3 -1
  93. package/templates/base/agents/base/tsq-developer.md +3 -1
  94. package/templates/base/agents/base/tsq-librarian.md +45 -0
  95. package/templates/base/agents/base/tsq-qa.md +3 -1
  96. package/templates/base/agents/base/tsq-security.md +3 -1
  97. package/templates/base/agents/overlays/platform/claude-code.md +2 -2
  98. package/templates/base/config.template.yaml +17 -28
  99. package/templates/base/knowledge/templates/task-result.md +5 -10
  100. package/templates/base/skills/_shared/naming-conventions.md +49 -0
  101. package/templates/base/skills/_template/SKILL.md +31 -17
  102. package/templates/base/skills/{architecture → tsq-architecture}/SKILL.md +2 -2
  103. package/templates/base/skills/tsq-audit/SKILL.md +74 -0
  104. package/templates/base/skills/{methodology/bdd → tsq-bdd}/SKILL.md +14 -9
  105. package/templates/base/skills/tsq-coding/SKILL.md +65 -0
  106. package/templates/base/skills/tsq-coding/rules/async-patterns.md +81 -0
  107. package/templates/base/skills/tsq-coding/rules/code-organization.md +80 -0
  108. package/templates/base/skills/tsq-coding/rules/error-handling.md +76 -0
  109. package/templates/base/skills/tsq-coding/rules/type-safety.md +85 -0
  110. package/templates/base/skills/tsq-controller/SKILL.md +81 -0
  111. package/templates/base/skills/tsq-controller/memory/.gitkeep +0 -0
  112. package/templates/base/skills/{mobile/dart → tsq-dart}/SKILL.md +5 -3
  113. package/templates/base/skills/{database → tsq-database}/SKILL.md +13 -27
  114. package/templates/base/skills/tsq-database/rules/query-optimization.md +32 -0
  115. package/templates/base/skills/tsq-database/rules/supabase-patterns.md +94 -0
  116. package/templates/base/skills/{methodology/ddd → tsq-ddd}/SKILL.md +15 -10
  117. package/templates/base/skills/{methodology/debugging → tsq-debugging}/SKILL.md +2 -2
  118. package/templates/base/skills/tsq-decompose/SKILL.md +117 -0
  119. package/templates/base/skills/tsq-delete/SKILL.md +72 -0
  120. package/templates/base/skills/{mobile/flutter → tsq-flutter}/SKILL.md +6 -3
  121. package/templates/base/skills/tsq-grill/SKILL.md +86 -0
  122. package/templates/base/skills/{backend/node → tsq-hono}/SKILL.md +6 -4
  123. package/templates/base/skills/tsq-librarian/SKILL.md +78 -0
  124. package/templates/base/skills/tsq-log/SKILL.md +30 -0
  125. package/templates/base/skills/{frontend/nextjs → tsq-nextjs}/SKILL.md +14 -9
  126. package/templates/base/skills/{planning → tsq-planning}/SKILL.md +2 -2
  127. package/templates/base/skills/{database/prisma → tsq-prisma}/SKILL.md +15 -9
  128. package/templates/base/skills/tsq-product-audit/SKILL.md +113 -0
  129. package/templates/base/skills/tsq-product-audit/checklists/01-security.md +86 -0
  130. package/templates/base/skills/tsq-product-audit/checklists/02-performance.md +67 -0
  131. package/templates/base/skills/tsq-product-audit/checklists/03-seo.md +46 -0
  132. package/templates/base/skills/tsq-product-audit/checklists/04-accessibility.md +66 -0
  133. package/templates/base/skills/tsq-product-audit/checklists/05-ui-ux.md +50 -0
  134. package/templates/base/skills/tsq-product-audit/checklists/06-architecture.md +53 -0
  135. package/templates/base/skills/tsq-product-audit/checklists/07-functional-requirements.md +55 -0
  136. package/templates/base/skills/tsq-product-audit/rules/audit-protocol.md +136 -0
  137. package/templates/base/skills/tsq-product-audit/rules/false-positive-guard.md +81 -0
  138. package/templates/base/skills/tsq-product-audit/rules/scoring-criteria.md +113 -0
  139. package/templates/base/skills/tsq-product-audit/templates/improvement-plan-template.md +60 -0
  140. package/templates/base/skills/tsq-product-audit/templates/report-template.md +88 -0
  141. package/templates/base/skills/tsq-prompt/SKILL.md +86 -0
  142. package/templates/base/skills/tsq-protocol/SKILL.md +101 -33
  143. package/templates/base/skills/{frontend/react → tsq-react}/SKILL.md +6 -3
  144. package/templates/base/skills/tsq-retro/SKILL.md +86 -0
  145. package/templates/base/skills/tsq-retro/references/feedback-guide.md +58 -0
  146. package/templates/base/skills/tsq-retro/references/improve-protocol.md +87 -0
  147. package/templates/base/skills/tsq-retro/references/improvement-template.md +26 -0
  148. package/templates/base/skills/tsq-security/SKILL.md +66 -0
  149. package/templates/base/skills/tsq-security/rules/auth-patterns.md +62 -0
  150. package/templates/base/skills/tsq-security/rules/dependency-security.md +69 -0
  151. package/templates/base/skills/tsq-security/rules/input-validation.md +68 -0
  152. package/templates/base/skills/tsq-security/rules/secrets-management.md +65 -0
  153. package/templates/base/skills/tsq-spec/SKILL.md +58 -0
  154. package/templates/base/skills/{stability-verification → tsq-stability}/SKILL.md +3 -3
  155. package/templates/base/skills/tsq-start/SKILL.md +90 -0
  156. package/templates/base/skills/tsq-start/references/onboarding-questions.md +177 -0
  157. package/templates/base/skills/tsq-status/SKILL.md +32 -0
  158. package/templates/base/skills/{methodology/tdd → tsq-tdd}/SKILL.md +12 -3
  159. package/templates/base/skills/tsq-testing/SKILL.md +69 -0
  160. package/templates/base/skills/tsq-testing/references/e2e-stability.md +33 -0
  161. package/templates/base/skills/{typescript → tsq-typescript}/SKILL.md +5 -11
  162. package/templates/base/skills/{ui-design → tsq-ui}/SKILL.md +2 -2
  163. package/templates/base/skills/tsq-update/SKILL.md +48 -0
  164. package/templates/base/timsquad/constraints/competency-framework.xml +2 -2
  165. package/templates/base/timsquad/constraints/ssot-schema.xml +2 -2
  166. package/templates/base/timsquad/process/phase-checklist.yaml +1 -1
  167. package/templates/base/timsquad/process/state-machine.xml +2 -2
  168. package/templates/base/timsquad/process/validation-rules.xml +8 -8
  169. package/templates/base/timsquad/process/workflow-base.xml +8 -8
  170. package/templates/base/timsquad/retrospective/cycle-report.template.md +2 -2
  171. package/templates/base/timsquad/retrospective/patterns/failure-patterns.md +1 -1
  172. package/templates/base/timsquad/retrospective/patterns/success-patterns.md +2 -2
  173. package/templates/base/timsquad/retrospective/retrospective-state.xml +2 -2
  174. package/templates/base/timsquad/ssot/audit-trail-spec.template.md +155 -0
  175. package/templates/base/timsquad/ssot/compliance-matrix.template.md +105 -0
  176. package/templates/base/timsquad/ssot/component-map.template.md +181 -0
  177. package/templates/base/timsquad/ssot/data-design.template.md +4 -4
  178. package/templates/base/timsquad/ssot/deployment-spec.template.md +29 -22
  179. package/templates/base/timsquad/ssot/env-config.template.md +4 -2
  180. package/templates/base/timsquad/ssot/error-codes.template.md +3 -3
  181. package/templates/base/timsquad/ssot/functional-spec.template.md +40 -3
  182. package/templates/base/timsquad/ssot/glossary.template.md +2 -2
  183. package/templates/base/timsquad/ssot/infra-topology.template.md +191 -0
  184. package/templates/base/timsquad/ssot/integration-spec.template.md +2 -2
  185. package/templates/base/timsquad/ssot/monitoring-spec.template.md +185 -0
  186. package/templates/base/timsquad/ssot/navigation-map.template.md +154 -0
  187. package/templates/base/timsquad/ssot/performance-budget.template.md +132 -0
  188. package/templates/base/timsquad/ssot/planning.template.md +3 -3
  189. package/templates/base/timsquad/ssot/prd/_template.md +73 -0
  190. package/templates/base/timsquad/ssot/prd.template.md +10 -21
  191. package/templates/base/timsquad/ssot/requirements.template.md +3 -3
  192. package/templates/base/timsquad/ssot/sdk-spec.template.md +223 -0
  193. package/templates/base/timsquad/ssot/service-spec.template.md +3 -3
  194. package/templates/base/timsquad/ssot/state-machine.template.md +127 -0
  195. package/templates/base/timsquad/ssot/test-spec.template.md +11 -1
  196. package/templates/base/timsquad/ssot/ui-ux-spec.template.md +43 -3
  197. package/templates/base/timsquad/ssot-map.template.yaml +69 -0
  198. package/templates/base/timsquad/state/workspace.xml +11 -11
  199. package/templates/platforms/claude-code/rules/adr-rules.md +1 -1
  200. package/templates/platforms/claude-code/rules/api-conventions.md +12 -0
  201. package/templates/platforms/claude-code/rules/build-gate.md +1 -1
  202. package/templates/platforms/claude-code/rules/completion-verification.md +0 -2
  203. package/templates/platforms/claude-code/rules/context-monitor.md +1 -1
  204. package/templates/platforms/claude-code/rules/feedback-routing.md +2 -2
  205. package/templates/platforms/claude-code/rules/librarian-constraints.md +11 -0
  206. package/templates/platforms/claude-code/rules/phase-management.md +2 -2
  207. package/templates/platforms/claude-code/rules/plan-review.md +2 -2
  208. package/templates/platforms/claude-code/rules/quality-guards.md +0 -2
  209. package/templates/platforms/claude-code/rules/sequence-management.md +15 -15
  210. package/templates/platforms/claude-code/rules/session-notes.md +1 -1
  211. package/templates/platforms/claude-code/rules/test-conventions.md +13 -0
  212. package/templates/platforms/claude-code/rules/workspace-sync.md +1 -1
  213. package/templates/platforms/claude-code/scripts/build-gate.sh +6 -1
  214. package/templates/platforms/claude-code/scripts/change-scope-guard.sh +110 -0
  215. package/templates/platforms/claude-code/scripts/check-capability.sh +68 -0
  216. package/templates/platforms/claude-code/scripts/completion-guard.sh +134 -14
  217. package/templates/platforms/claude-code/scripts/context-restore.sh +95 -0
  218. package/templates/platforms/claude-code/scripts/e2e-commit-gate.sh +70 -0
  219. package/templates/platforms/claude-code/scripts/e2e-marker.sh +51 -0
  220. package/templates/platforms/claude-code/scripts/phase-guard.sh +3 -6
  221. package/templates/platforms/claude-code/scripts/pre-compact.sh +70 -0
  222. package/templates/platforms/claude-code/scripts/safe-guard.sh +2 -5
  223. package/templates/platforms/claude-code/scripts/subagent-start.sh +11 -0
  224. package/templates/platforms/claude-code/scripts/subagent-stop.sh +11 -0
  225. package/templates/platforms/claude-code/settings.json +28 -56
  226. package/templates/project-types/api-backend/config.yaml +9 -5
  227. package/templates/project-types/api-backend/process/workflow.xml +2 -2
  228. package/templates/project-types/fintech/config.yaml +13 -19
  229. package/templates/project-types/fintech/ssot/audit-trail-spec.template.md +207 -0
  230. package/templates/project-types/fintech/ssot/compliance-matrix.template.md +187 -0
  231. package/templates/project-types/infra/config.yaml +7 -4
  232. package/templates/project-types/infra/process/workflow.xml +3 -3
  233. package/templates/project-types/mobile-app/config.yaml +8 -14
  234. package/templates/project-types/mobile-app/process/workflow.xml +4 -4
  235. package/templates/project-types/platform/config.yaml +8 -5
  236. package/templates/project-types/platform/process/workflow.xml +3 -3
  237. package/templates/project-types/web-app/config.yaml +9 -15
  238. package/templates/project-types/web-app/process/workflow.xml +6 -6
  239. package/templates/project-types/web-service/config.yaml +10 -19
  240. package/templates/project-types/web-service/process/workflow.xml +6 -6
  241. package/dist/commands/compile.d.ts +0 -3
  242. package/dist/commands/compile.d.ts.map +0 -1
  243. package/dist/commands/compile.js +0 -170
  244. package/dist/commands/compile.js.map +0 -1
  245. package/dist/commands/feedback.d.ts +0 -12
  246. package/dist/commands/feedback.d.ts.map +0 -1
  247. package/dist/commands/feedback.js +0 -382
  248. package/dist/commands/feedback.js.map +0 -1
  249. package/dist/commands/full.d.ts +0 -3
  250. package/dist/commands/full.d.ts.map +0 -1
  251. package/dist/commands/full.js +0 -88
  252. package/dist/commands/full.js.map +0 -1
  253. package/dist/commands/git/commit.d.ts +0 -3
  254. package/dist/commands/git/commit.d.ts.map +0 -1
  255. package/dist/commands/git/commit.js +0 -85
  256. package/dist/commands/git/commit.js.map +0 -1
  257. package/dist/commands/git/index.d.ts +0 -5
  258. package/dist/commands/git/index.d.ts.map +0 -1
  259. package/dist/commands/git/index.js +0 -5
  260. package/dist/commands/git/index.js.map +0 -1
  261. package/dist/commands/git/pr.d.ts +0 -3
  262. package/dist/commands/git/pr.d.ts.map +0 -1
  263. package/dist/commands/git/pr.js +0 -139
  264. package/dist/commands/git/pr.js.map +0 -1
  265. package/dist/commands/git/release.d.ts +0 -3
  266. package/dist/commands/git/release.d.ts.map +0 -1
  267. package/dist/commands/git/release.js +0 -153
  268. package/dist/commands/git/release.js.map +0 -1
  269. package/dist/commands/git/sync.d.ts +0 -3
  270. package/dist/commands/git/sync.d.ts.map +0 -1
  271. package/dist/commands/git/sync.js +0 -132
  272. package/dist/commands/git/sync.js.map +0 -1
  273. package/dist/commands/improve.d.ts +0 -3
  274. package/dist/commands/improve.d.ts.map +0 -1
  275. package/dist/commands/improve.js +0 -286
  276. package/dist/commands/improve.js.map +0 -1
  277. package/dist/commands/knowledge.d.ts +0 -3
  278. package/dist/commands/knowledge.d.ts.map +0 -1
  279. package/dist/commands/knowledge.js +0 -316
  280. package/dist/commands/knowledge.js.map +0 -1
  281. package/dist/commands/log.d.ts.map +0 -1
  282. package/dist/commands/log.js +0 -1436
  283. package/dist/commands/log.js.map +0 -1
  284. package/dist/commands/meta-index.d.ts +0 -3
  285. package/dist/commands/meta-index.d.ts.map +0 -1
  286. package/dist/commands/meta-index.js +0 -401
  287. package/dist/commands/meta-index.js.map +0 -1
  288. package/dist/commands/metrics.d.ts +0 -3
  289. package/dist/commands/metrics.d.ts.map +0 -1
  290. package/dist/commands/metrics.js +0 -843
  291. package/dist/commands/metrics.js.map +0 -1
  292. package/dist/commands/quick.d.ts +0 -3
  293. package/dist/commands/quick.d.ts.map +0 -1
  294. package/dist/commands/quick.js +0 -136
  295. package/dist/commands/quick.js.map +0 -1
  296. package/dist/commands/retro.d.ts +0 -3
  297. package/dist/commands/retro.d.ts.map +0 -1
  298. package/dist/commands/retro.js +0 -828
  299. package/dist/commands/retro.js.map +0 -1
  300. package/dist/commands/session.d.ts +0 -3
  301. package/dist/commands/session.d.ts.map +0 -1
  302. package/dist/commands/session.js +0 -346
  303. package/dist/commands/session.js.map +0 -1
  304. package/dist/commands/skills.d.ts +0 -12
  305. package/dist/commands/skills.d.ts.map +0 -1
  306. package/dist/commands/skills.js +0 -228
  307. package/dist/commands/skills.js.map +0 -1
  308. package/dist/commands/status.d.ts +0 -3
  309. package/dist/commands/status.d.ts.map +0 -1
  310. package/dist/commands/status.js +0 -127
  311. package/dist/commands/status.js.map +0 -1
  312. package/dist/commands/upgrade.d.ts.map +0 -1
  313. package/dist/commands/upgrade.js.map +0 -1
  314. package/dist/commands/watch.d.ts +0 -3
  315. package/dist/commands/watch.d.ts.map +0 -1
  316. package/dist/commands/watch.js +0 -213
  317. package/dist/commands/watch.js.map +0 -1
  318. package/dist/commands/workflow.d.ts +0 -3
  319. package/dist/commands/workflow.d.ts.map +0 -1
  320. package/dist/commands/workflow.js +0 -607
  321. package/dist/commands/workflow.js.map +0 -1
  322. package/templates/base/skills/coding/SKILL.md +0 -47
  323. package/templates/base/skills/controller/SKILL.md +0 -111
  324. package/templates/base/skills/prompt-engineering/SKILL.md +0 -103
  325. package/templates/base/skills/retrospective/SKILL.md +0 -102
  326. package/templates/base/skills/security/SKILL.md +0 -55
  327. package/templates/base/skills/testing/SKILL.md +0 -63
  328. package/templates/base/timsquad/feedback/feedback-router.sh +0 -341
  329. package/templates/base/timsquad/feedback/routing-rules.yaml +0 -352
  330. package/templates/platforms/claude-code/CLAUDE.md.template +0 -89
  331. package/templates/platforms/claude-code/rules/skill-suggest.md +0 -27
  332. package/templates/platforms/claude-code/scripts/skill-rules.json +0 -85
  333. package/templates/platforms/claude-code/scripts/skill-suggest.sh +0 -105
  334. /package/templates/base/skills/{architecture → tsq-architecture}/references/adr-template.md +0 -0
  335. /package/templates/base/skills/{architecture → tsq-architecture}/references/api-design.md +0 -0
  336. /package/templates/base/skills/{methodology/bdd → tsq-bdd}/rules/gherkin-patterns.md +0 -0
  337. /package/templates/base/skills/{coding → tsq-coding}/rules/patterns.md +0 -0
  338. /package/templates/base/skills/{controller → tsq-controller}/references/README.md +0 -0
  339. /package/templates/base/skills/{controller → tsq-controller}/rules/README.md +0 -0
  340. /package/templates/base/skills/{mobile/dart → tsq-dart}/rules/async-patterns.md +0 -0
  341. /package/templates/base/skills/{mobile/dart → tsq-dart}/rules/code-style.md +0 -0
  342. /package/templates/base/skills/{mobile/dart → tsq-dart}/rules/null-safety.md +0 -0
  343. /package/templates/base/skills/{mobile/dart → tsq-dart}/rules/type-system.md +0 -0
  344. /package/templates/base/skills/{methodology/ddd → tsq-ddd}/rules/strategic-patterns.md +0 -0
  345. /package/templates/base/skills/{methodology/debugging → tsq-debugging}/references/root-cause-tracing.md +0 -0
  346. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/ci-cd/SKILL.md +0 -0
  347. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/ci-cd/references/ci-cd-pipeline.md +0 -0
  348. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/ci-cd/rules/code-signing.md +0 -0
  349. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/ci-cd/rules/codemagic-setup.md +0 -0
  350. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/ci-cd/rules/fastlane-setup.md +0 -0
  351. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/ci-cd/rules/github-actions.md +0 -0
  352. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/ci-cd/rules/store-deployment.md +0 -0
  353. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/ci-cd/rules/versioning.md +0 -0
  354. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/i18n/SKILL.md +0 -0
  355. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/i18n/references/i18n-architecture.md +0 -0
  356. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/i18n/rules/arb-files.md +0 -0
  357. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/i18n/rules/locale-switching.md +0 -0
  358. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/i18n/rules/localization-setup.md +0 -0
  359. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/i18n/rules/plural-gender.md +0 -0
  360. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/i18n/rules/text-direction.md +0 -0
  361. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/monitoring/SKILL.md +0 -0
  362. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/monitoring/references/monitoring-architecture.md +0 -0
  363. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/monitoring/rules/analytics.md +0 -0
  364. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/monitoring/rules/crashlytics-setup.md +0 -0
  365. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/monitoring/rules/logging.md +0 -0
  366. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/monitoring/rules/performance-monitoring.md +0 -0
  367. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/monitoring/rules/sentry-integration.md +0 -0
  368. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/networking/SKILL.md +0 -0
  369. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/networking/references/api-client-architecture.md +0 -0
  370. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/networking/rules/caching.md +0 -0
  371. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/networking/rules/connectivity.md +0 -0
  372. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/networking/rules/dio-setup.md +0 -0
  373. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/networking/rules/error-handling.md +0 -0
  374. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/networking/rules/interceptors.md +0 -0
  375. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/networking/rules/retrofit-patterns.md +0 -0
  376. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/push-notifications/SKILL.md +0 -0
  377. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/push-notifications/references/notification-architecture.md +0 -0
  378. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/push-notifications/references/platform-setup.md +0 -0
  379. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/push-notifications/rules/background-processing.md +0 -0
  380. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/push-notifications/rules/deep-linking.md +0 -0
  381. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/push-notifications/rules/fcm-setup.md +0 -0
  382. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/push-notifications/rules/local-notifications.md +0 -0
  383. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/push-notifications/rules/notification-handling.md +0 -0
  384. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/push-notifications/rules/notification-permissions.md +0 -0
  385. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/push-notifications/rules/rich-notifications.md +0 -0
  386. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/references/freezed-patterns.md +0 -0
  387. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/references/project-structure.md +0 -0
  388. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/rules/animations.md +0 -0
  389. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/rules/architecture.md +0 -0
  390. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/rules/navigation-routing.md +0 -0
  391. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/rules/performance.md +0 -0
  392. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/rules/platform-adaptive.md +0 -0
  393. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/rules/state-management.md +0 -0
  394. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/rules/testing.md +0 -0
  395. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/rules/widget-conventions.md +0 -0
  396. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/security/SKILL.md +0 -0
  397. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/security/references/mobile-security-checklist.md +0 -0
  398. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/security/rules/api-key-protection.md +0 -0
  399. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/security/rules/authentication.md +0 -0
  400. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/security/rules/data-protection.md +0 -0
  401. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/security/rules/obfuscation.md +0 -0
  402. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/security/rules/secure-storage.md +0 -0
  403. /package/templates/base/skills/{mobile/flutter → tsq-flutter}/security/rules/ssl-pinning.md +0 -0
  404. /package/templates/base/skills/{backend/node → tsq-hono}/rules/async-patterns.md +0 -0
  405. /package/templates/base/skills/{backend/node → tsq-hono}/rules/deployment.md +0 -0
  406. /package/templates/base/skills/{backend/node → tsq-hono}/rules/env-config.md +0 -0
  407. /package/templates/base/skills/{backend/node → tsq-hono}/rules/error-handling.md +0 -0
  408. /package/templates/base/skills/{backend/node → tsq-hono}/rules/hono-app-setup.md +0 -0
  409. /package/templates/base/skills/{backend/node → tsq-hono}/rules/jwt-auth.md +0 -0
  410. /package/templates/base/skills/{backend/node → tsq-hono}/rules/middleware.md +0 -0
  411. /package/templates/base/skills/{backend/node → tsq-hono}/rules/testing.md +0 -0
  412. /package/templates/base/skills/{frontend/nextjs → tsq-nextjs}/rules/app-router.md +0 -0
  413. /package/templates/base/skills/{planning → tsq-planning}/references/prd-guide.md +0 -0
  414. /package/templates/base/skills/{planning → tsq-planning}/references/requirements-guide.md +0 -0
  415. /package/templates/base/skills/{database/prisma → tsq-prisma}/rules/queries.md +0 -0
  416. /package/templates/base/skills/{database/prisma → tsq-prisma}/rules/schema-design.md +0 -0
  417. /package/templates/base/skills/{frontend/react → tsq-react}/rules/_sections.md +0 -0
  418. /package/templates/base/skills/{frontend/react → tsq-react}/rules/anti-patterns.md +0 -0
  419. /package/templates/base/skills/{frontend/react → tsq-react}/rules/async-api-routes.md +0 -0
  420. /package/templates/base/skills/{frontend/react → tsq-react}/rules/async-defer-await.md +0 -0
  421. /package/templates/base/skills/{frontend/react → tsq-react}/rules/async-dependencies.md +0 -0
  422. /package/templates/base/skills/{frontend/react → tsq-react}/rules/async-parallel.md +0 -0
  423. /package/templates/base/skills/{frontend/react → tsq-react}/rules/async-suspense-boundaries.md +0 -0
  424. /package/templates/base/skills/{frontend/react → tsq-react}/rules/bundle-barrel-imports.md +0 -0
  425. /package/templates/base/skills/{frontend/react → tsq-react}/rules/bundle-defer-third-party.md +0 -0
  426. /package/templates/base/skills/{frontend/react → tsq-react}/rules/bundle-dynamic-imports.md +0 -0
  427. /package/templates/base/skills/{frontend/react → tsq-react}/rules/component-conventions.md +0 -0
  428. /package/templates/base/skills/{frontend/react → tsq-react}/rules/js-combine-iterations.md +0 -0
  429. /package/templates/base/skills/{frontend/react → tsq-react}/rules/js-early-exit.md +0 -0
  430. /package/templates/base/skills/{frontend/react → tsq-react}/rules/js-index-maps.md +0 -0
  431. /package/templates/base/skills/{frontend/react → tsq-react}/rules/js-set-map-lookups.md +0 -0
  432. /package/templates/base/skills/{frontend/react → tsq-react}/rules/rendering-conditional-render.md +0 -0
  433. /package/templates/base/skills/{frontend/react → tsq-react}/rules/rendering-content-visibility.md +0 -0
  434. /package/templates/base/skills/{frontend/react → tsq-react}/rules/rendering-hoist-jsx.md +0 -0
  435. /package/templates/base/skills/{frontend/react → tsq-react}/rules/rerender-defer-reads.md +0 -0
  436. /package/templates/base/skills/{frontend/react → tsq-react}/rules/rerender-derived-state.md +0 -0
  437. /package/templates/base/skills/{frontend/react → tsq-react}/rules/rerender-memo.md +0 -0
  438. /package/templates/base/skills/{frontend/react → tsq-react}/rules/rerender-transitions.md +0 -0
  439. /package/templates/base/skills/{frontend/react → tsq-react}/rules/server-after-nonblocking.md +0 -0
  440. /package/templates/base/skills/{frontend/react → tsq-react}/rules/server-cache-react.md +0 -0
  441. /package/templates/base/skills/{frontend/react → tsq-react}/rules/server-parallel-fetching.md +0 -0
  442. /package/templates/base/skills/{frontend/react → tsq-react}/rules/state-location.md +0 -0
  443. /package/templates/base/skills/{security → tsq-security}/rules/owasp-examples.md +0 -0
  444. /package/templates/base/skills/{security → tsq-security}/scripts/check-secrets.sh +0 -0
  445. /package/templates/base/skills/{stability-verification → tsq-stability}/references/release-checklist.md +0 -0
  446. /package/templates/base/skills/{stability-verification → tsq-stability}/references/security-fix-patterns.md +0 -0
  447. /package/templates/base/skills/{stability-verification → tsq-stability}/rules/verification-layers.md +0 -0
  448. /package/templates/base/skills/{stability-verification → tsq-stability}/rules/verification-workflow.md +0 -0
  449. /package/templates/base/skills/{stability-verification → tsq-stability}/scripts/verify.sh +0 -0
  450. /package/templates/base/skills/{methodology/tdd → tsq-tdd}/rules/real-world-example.md +0 -0
  451. /package/templates/base/skills/{methodology/tdd → tsq-tdd}/rules/techniques.md +0 -0
  452. /package/templates/base/skills/{testing → tsq-testing}/references/testing-patterns.md +0 -0
  453. /package/templates/base/skills/{typescript → tsq-typescript}/rules/type-patterns.md +0 -0
  454. /package/templates/base/skills/{typescript → tsq-typescript}/rules/utility-types.md +0 -0
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bash
2
+ # e2e-marker.sh — E2E 테스트 결과를 JSON 마커로 기록
3
+ # 용도: PostToolUse 훅에서 E2E 테스트 완료 후 호출
4
+ # 출력: .e2e-passed (JSON)
5
+
6
+ set -euo pipefail
7
+
8
+ MARKER_FILE=".e2e-passed"
9
+ EXPIRY_HOURS="${E2E_MARKER_EXPIRY_HOURS:-24}"
10
+
11
+ # 인자: exit_code passed failed flaky
12
+ EXIT_CODE="${1:-0}"
13
+ PASSED="${2:-0}"
14
+ FAILED="${3:-0}"
15
+ FLAKY="${4:-0}"
16
+
17
+ # exit_code != 0 이면 마커 미생성
18
+ if [ "$EXIT_CODE" -ne 0 ]; then
19
+ rm -f "$MARKER_FILE"
20
+ echo "E2E failed (exit_code=$EXIT_CODE) — marker removed"
21
+ exit 0
22
+ fi
23
+
24
+ # source_hash: 현재 소스의 git short hash
25
+ SOURCE_HASH=""
26
+ if command -v git >/dev/null 2>&1; then
27
+ SOURCE_HASH=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
28
+ fi
29
+
30
+ # timestamp & expiry
31
+ TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
32
+ if [[ "$OSTYPE" == "darwin"* ]]; then
33
+ EXPIRES_AT=$(date -u -v+"${EXPIRY_HOURS}"H +"%Y-%m-%dT%H:%M:%SZ")
34
+ else
35
+ EXPIRES_AT=$(date -u -d "+${EXPIRY_HOURS} hours" +"%Y-%m-%dT%H:%M:%SZ")
36
+ fi
37
+
38
+ # JSON 마커 생성
39
+ cat > "$MARKER_FILE" <<MARKER
40
+ {
41
+ "timestamp": "$TIMESTAMP",
42
+ "exit_code": $EXIT_CODE,
43
+ "passed": $PASSED,
44
+ "failed": $FAILED,
45
+ "flaky": $FLAKY,
46
+ "source_hash": "$SOURCE_HASH",
47
+ "expires_at": "$EXPIRES_AT"
48
+ }
49
+ MARKER
50
+
51
+ echo "E2E marker created: $PASSED passed, $FAILED failed, $FLAKY flaky"
@@ -9,11 +9,8 @@
9
9
 
10
10
  set -e
11
11
 
12
- # Read hook input from stdin (non-blocking)
13
- INPUT=""
14
- if read -t 1 -r line; then
15
- INPUT="$line"
16
- fi
12
+ # Read hook input from stdin
13
+ INPUT=$(cat 2>/dev/null || echo "")
17
14
 
18
15
  # If no input, allow (fail-open for safety)
19
16
  if [ -z "$INPUT" ]; then
@@ -55,7 +52,7 @@ fi
55
52
  PHASE=$(jq -r '.current // .current_phase // .phase // "unknown"' "$PHASE_FILE" 2>/dev/null)
56
53
 
57
54
  # Normalize file path (make relative to project root)
58
- REL_PATH="${FILE_PATH#$PROJECT_ROOT/}"
55
+ REL_PATH="${FILE_PATH#"$PROJECT_ROOT"/}"
59
56
 
60
57
  # Phase enforcement rules
61
58
  case "$PHASE" in
@@ -0,0 +1,70 @@
1
+ #!/bin/bash
2
+ # Pre-Compact — PreCompact Hook
3
+ # 컴팩션 직전 현재 상태 요약을 compact-summary.md에 저장한다.
4
+ # context-restore.sh가 이 파일을 읽어 compact 후 재주입.
5
+ #
6
+ # Input: JSON via stdin (Claude Code hook protocol)
7
+ # Output: none (파일 생성만)
8
+
9
+ set -e
10
+
11
+ # Find project root
12
+ PROJECT_ROOT="$(pwd)"
13
+ while [ "$PROJECT_ROOT" != "/" ]; do
14
+ if [ -d "$PROJECT_ROOT/.timsquad" ]; then
15
+ break
16
+ fi
17
+ PROJECT_ROOT="$(dirname "$PROJECT_ROOT")"
18
+ done
19
+
20
+ if [ ! -d "$PROJECT_ROOT/.timsquad" ]; then
21
+ exit 0
22
+ fi
23
+
24
+ DAEMON_DIR="$PROJECT_ROOT/.timsquad/.daemon"
25
+ mkdir -p "$DAEMON_DIR"
26
+
27
+ SUMMARY_FILE="$DAEMON_DIR/compact-summary.md"
28
+
29
+ # Collect summary data
30
+ SUMMARY="# Compact Summary (auto-generated)"
31
+ SUMMARY="$SUMMARY
32
+ Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
33
+
34
+ # Current phase
35
+ PHASE_FILE="$PROJECT_ROOT/.timsquad/state/current-phase.json"
36
+ if [ -f "$PHASE_FILE" ]; then
37
+ PHASE=$(jq -r '.current // .current_phase // .phase // "unknown"' "$PHASE_FILE" 2>/dev/null || echo "unknown")
38
+ SUMMARY="$SUMMARY
39
+ Phase: $PHASE"
40
+ fi
41
+
42
+ # Recent changed files (top 5)
43
+ RECENT_FILES=$(git -C "$PROJECT_ROOT" diff --name-only HEAD 2>/dev/null | head -5 || echo "")
44
+ if [ -n "$RECENT_FILES" ]; then
45
+ SUMMARY="$SUMMARY
46
+ Recent changes: $RECENT_FILES"
47
+ fi
48
+
49
+ # Active tasks from session state
50
+ SESSION_STATE="$DAEMON_DIR/session-state.json"
51
+ if [ -f "$SESSION_STATE" ]; then
52
+ TASK_INFO=$(jq -r '.currentTask // "none"' "$SESSION_STATE" 2>/dev/null || echo "none")
53
+ SUMMARY="$SUMMARY
54
+ Active task: $TASK_INFO"
55
+ fi
56
+
57
+ # Session notes (last entry)
58
+ NOTES_FILE="$DAEMON_DIR/session-notes.jsonl"
59
+ if [ -f "$NOTES_FILE" ]; then
60
+ LAST_NOTE=$(tail -1 "$NOTES_FILE" 2>/dev/null | jq -r '.summary // ""' 2>/dev/null || echo "")
61
+ if [ -n "$LAST_NOTE" ] && [ "$LAST_NOTE" != "null" ]; then
62
+ SUMMARY="$SUMMARY
63
+ Last note: $LAST_NOTE"
64
+ fi
65
+ fi
66
+
67
+ # Write summary (fail-open: if write fails, don't block compact)
68
+ echo "$SUMMARY" > "$SUMMARY_FILE" 2>/dev/null || true
69
+
70
+ exit 0
@@ -7,11 +7,8 @@
7
7
 
8
8
  set -e
9
9
 
10
- # Read hook input from stdin (non-blocking)
11
- INPUT=""
12
- if read -t 1 -r line; then
13
- INPUT="$line"
14
- fi
10
+ # Read hook input from stdin
11
+ INPUT=$(cat 2>/dev/null || echo "")
15
12
 
16
13
  # Fail-open: no input → allow
17
14
  if [ -z "$INPUT" ]; then
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+ # SubagentStart Hook — Daemon에 baseline 저장 요청 (fail-open)
3
+ set -e
4
+
5
+ INPUT=$(cat 2>/dev/null || echo "{}")
6
+ AGENT=$(echo "$INPUT" | jq -r '.agent // "unknown"' 2>/dev/null || echo "unknown")
7
+
8
+ # Daemon에 통지 (실패해도 서브에이전트 실행은 차단하지 않음)
9
+ echo "$INPUT" | tsq daemon notify subagent-start --agent "$AGENT" 2>/dev/null || true
10
+
11
+ exit 0
@@ -0,0 +1,11 @@
1
+ #!/bin/bash
2
+ # SubagentStop Hook — Daemon에 task-complete 이벤트 전달 (fail-open)
3
+ set -e
4
+
5
+ INPUT=$(cat 2>/dev/null || echo "{}")
6
+ AGENT=$(echo "$INPUT" | jq -r '.agent // "unknown"' 2>/dev/null || echo "unknown")
7
+
8
+ # Daemon에 통지 → L1 태스크 로그 자동 생성
9
+ echo "$INPUT" | tsq daemon notify subagent-stop --agent "$AGENT" 2>/dev/null || true
10
+
11
+ exit 0
@@ -1,16 +1,5 @@
1
1
  {
2
2
  "hooks": {
3
- "UserPromptSubmit": [
4
- {
5
- "hooks": [
6
- {
7
- "type": "command",
8
- "command": "bash .claude/scripts/skill-suggest.sh",
9
- "timeout": 5
10
- }
11
- ]
12
- }
13
- ],
14
3
  "PreToolUse": [
15
4
  {
16
5
  "matcher": "Write|Edit",
@@ -19,112 +8,95 @@
19
8
  "type": "command",
20
9
  "command": "bash .claude/scripts/phase-guard.sh",
21
10
  "timeout": 3
22
- }
23
- ]
24
- },
25
- {
26
- "matcher": "Bash",
27
- "hooks": [
11
+ },
28
12
  {
29
13
  "type": "command",
30
- "command": "bash .claude/scripts/safe-guard.sh",
14
+ "command": "bash .claude/scripts/check-capability.sh",
31
15
  "timeout": 3
32
- }
33
- ]
34
- },
35
- {
36
- "matcher": "Task",
37
- "hooks": [
16
+ },
38
17
  {
39
18
  "type": "command",
40
- "command": "tsq daemon notify subagent-start 2>/dev/null || true",
19
+ "command": "bash .claude/scripts/change-scope-guard.sh 2>/dev/null || true",
41
20
  "timeout": 3
42
21
  }
43
22
  ]
44
- }
45
- ],
46
- "SubagentStart": [
23
+ },
47
24
  {
25
+ "matcher": "Bash",
48
26
  "hooks": [
49
27
  {
50
28
  "type": "command",
51
- "command": "tsq daemon notify subagent-start 2>/dev/null || true",
29
+ "command": "bash .claude/scripts/safe-guard.sh",
52
30
  "timeout": 3
53
31
  }
54
32
  ]
55
33
  }
56
34
  ],
57
- "SubagentStop": [
35
+ "SessionStart": [
58
36
  {
59
37
  "hooks": [
60
38
  {
61
39
  "type": "command",
62
- "command": "tsq daemon notify subagent-stop 2>/dev/null || true",
63
- "timeout": 3
40
+ "command": "tsq daemon start 2>/dev/null || true",
41
+ "timeout": 5
64
42
  }
65
43
  ]
66
- }
67
- ],
68
- "SessionStart": [
44
+ },
69
45
  {
46
+ "matcher": "compact",
70
47
  "hooks": [
71
48
  {
72
49
  "type": "command",
73
- "command": "tsq daemon start 2>/dev/null || true",
50
+ "command": "bash .claude/scripts/context-restore.sh",
74
51
  "timeout": 5
75
52
  }
76
53
  ]
77
54
  }
78
55
  ],
79
- "PostToolUse": [
56
+ "Stop": [
80
57
  {
81
58
  "hooks": [
82
59
  {
83
60
  "type": "command",
84
- "command": "tsq daemon notify tool-use --status success 2>/dev/null || true",
85
- "timeout": 3
61
+ "command": "bash .claude/scripts/completion-guard.sh",
62
+ "timeout": 5
63
+ },
64
+ {
65
+ "type": "command",
66
+ "command": "bash .claude/scripts/build-gate.sh",
67
+ "timeout": 30
86
68
  }
87
69
  ]
88
70
  }
89
71
  ],
90
- "PostToolUseFailure": [
72
+ "SubagentStart": [
91
73
  {
92
74
  "hooks": [
93
75
  {
94
76
  "type": "command",
95
- "command": "tsq daemon notify tool-use --status failure 2>/dev/null || true",
96
- "timeout": 3
77
+ "command": "bash .claude/scripts/subagent-start.sh 2>/dev/null || true",
78
+ "timeout": 2
97
79
  }
98
80
  ]
99
81
  }
100
82
  ],
101
- "Stop": [
83
+ "SubagentStop": [
102
84
  {
103
85
  "hooks": [
104
86
  {
105
87
  "type": "command",
106
- "command": "tsq daemon notify stop 2>/dev/null || true",
88
+ "command": "bash .claude/scripts/subagent-stop.sh 2>/dev/null || true",
107
89
  "timeout": 3
108
- },
109
- {
110
- "type": "command",
111
- "command": "bash .claude/scripts/completion-guard.sh",
112
- "timeout": 5
113
- },
114
- {
115
- "type": "command",
116
- "command": "bash .claude/scripts/build-gate.sh",
117
- "timeout": 30
118
90
  }
119
91
  ]
120
92
  }
121
93
  ],
122
- "SessionEnd": [
94
+ "PreCompact": [
123
95
  {
124
96
  "hooks": [
125
97
  {
126
98
  "type": "command",
127
- "command": "tsq daemon notify session-end 2>/dev/null || true",
99
+ "command": "bash .claude/scripts/pre-compact.sh",
128
100
  "timeout": 5
129
101
  }
130
102
  ]
@@ -8,8 +8,8 @@ description: "API 서버, 마이크로서비스, REST/GraphQL 백엔드"
8
8
  # 에이전트 설정
9
9
  # ============================================================
10
10
  agents:
11
- # Planner는 API 설계에 집중
12
- planner:
11
+ # Architect는 API 설계에 집중
12
+ architect:
13
13
  model: opus
14
14
  focus:
15
15
  - api_design
@@ -24,9 +24,9 @@ agents:
24
24
  developer:
25
25
  model: sonnet
26
26
  skills:
27
- - coding
28
- - testing
29
- - backend/node # 또는 적절한 백엔드 기술
27
+ - tsq-coding
28
+ - tsq-testing
29
+ - tsq-hono # 또는 적절한 백엔드 기술
30
30
  focus:
31
31
  - api_implementation
32
32
  - database_queries
@@ -78,6 +78,10 @@ ssot:
78
78
  optional:
79
79
  - ui-ux-spec.md # API만이므로 불필요
80
80
  - deployment-spec.md
81
+
82
+ # 타입×레벨 자동 배포 (SSOT_TYPE_LEVEL_MAP 기반):
83
+ # L2+: state-machine, performance-budget
84
+ # L3: monitoring-spec
81
85
  - integration-spec.md
82
86
 
83
87
  # ============================================================
@@ -21,7 +21,7 @@
21
21
  <tasks>
22
22
  <task id="api-spec" required="true">
23
23
  <name>API 명세 작성</name>
24
- <agent>tsq-planner</agent>
24
+ <agent>tsq-architect</agent>
25
25
  <output>service-spec.md</output>
26
26
  <checklist>
27
27
  <item>엔드포인트 정의</item>
@@ -45,7 +45,7 @@
45
45
 
46
46
  <task id="error-codes" required="true">
47
47
  <name>에러 코드 정의</name>
48
- <agent>tsq-planner</agent>
48
+ <agent>tsq-architect</agent>
49
49
  <output>error-codes.md</output>
50
50
  <checklist>
51
51
  <item>에러 코드 체계</item>
@@ -4,7 +4,7 @@
4
4
  template:
5
5
  name: fintech
6
6
  description: 금융/결제 시스템을 위한 보안 강화 템플릿
7
- version: 2.0.0
7
+ version: 3.7.0
8
8
 
9
9
  # ============================================================
10
10
  # 프로젝트 기본값
@@ -57,21 +57,10 @@ stack:
57
57
  # ============================================================
58
58
  # 스킬 자동 로딩 규칙
59
59
  # ============================================================
60
- skills:
61
- base:
62
- - coding
63
- - testing
64
- - security # 보안 필수
65
- - planning
66
- - architecture
67
-
68
- # fintech 타입 추가 스킬
69
- type-specific:
70
- - typescript
71
- - backend/node
72
- - database/prisma
73
- - methodology/tdd
74
- - methodology/ddd # 복잡한 도메인 필수
60
+ # 스킬은 project.type으로 자동 결정됩니다 (이 섹션은 참고용).
61
+ # skills:
62
+ # base: [tsq-coding, tsq-testing, tsq-security, tsq-planning, tsq-architecture]
63
+ # type-specific: [tsq-typescript, tsq-hono, tsq-prisma, tsq-tdd, tsq-ddd]
75
64
 
76
65
  # ============================================================
77
66
  # 추가 SSOT 문서 (필수)
@@ -79,9 +68,14 @@ skills:
79
68
  ssot:
80
69
  additional:
81
70
  - security-spec.md # 보안 명세 필수
82
- - compliance-spec.md # 컴플라이언스 명세
83
- - audit-log-spec.md # 감사 로그 명세
84
71
  - error-codes.md # 에러 코드 (상세)
72
+ # 타입×레벨 자동 배포 (SSOT_TYPE_LEVEL_MAP 기반):
73
+ # L1+: compliance-matrix, audit-trail-spec, state-machine
74
+ # L2+: performance-budget
75
+ # L3: monitoring-spec, infra-topology
76
+ # fintech 특화 오버라이드 (project-types/fintech/ssot/):
77
+ # compliance-matrix — 전자금융거래법, PCI DSS 사전 구성
78
+ # audit-trail-spec — 금융 거래 감사 로그, FDS 연동
85
79
 
86
80
  # ============================================================
87
81
  # 추가 에이전트
@@ -94,7 +88,7 @@ additional_agents:
94
88
 
95
89
  - name: tsq-auditor
96
90
  description: 감사/컴플라이언스 전문가
97
- skills: [security, compliance]
91
+ skills: [tsq-security]
98
92
 
99
93
  # ============================================================
100
94
  # Consensus 설정 (fintech 필수)
@@ -0,0 +1,207 @@
1
+ ---
2
+ title: "감사 추적 명세서 (Audit Trail Specification) — Fintech"
3
+ version: 1.0.0
4
+ last_updated: {{DATE}}
5
+ author: tsq-security
6
+ status: draft
7
+ project: {{PROJECT_NAME}}
8
+ type_override: fintech
9
+ ---
10
+
11
+ # 감사 추적 명세서 (Audit Trail Specification)
12
+
13
+ > 금융 거래 시스템의 감사 추적을 설계합니다.
14
+ > 전자금융거래법 §22 (거래기록 5년 보존), PCI DSS Req 10 (감사 로그) 요구사항이 사전 구성되어 있습니다.
15
+
16
+ ---
17
+
18
+ ## 1. 감사 대상
19
+
20
+ ### 1.1 이벤트 분류
21
+
22
+ | 분류 | 이벤트 | 보존 기간 | 법적 근거 |
23
+ |-----|--------|:--------:|----------|
24
+ | 인증 | 로그인, 로그아웃, MFA | 5년 | 전자금융감독규정 §13 |
25
+ | 인가 | 권한 변경, 역할 부여/회수 | 영구 | PCI DSS 10.2 |
26
+ | 금융 거래 | 주문, 체결, 정산, 입출금 | 5년 | 전자금융거래법 §22 |
27
+ | 결제 | 카드 결제, 환불, 취소 | 5년 | PCI DSS 10.2 |
28
+ | 자금 이동 | 입금, 출금, 이체 | 5년 | 특정금융정보법 |
29
+ | KYC | 본인인증, 서류 제출/검토 | 5년 | 특정금융정보법 §5의2 |
30
+ | FDS | 이상거래 탐지, 차단, 해제 | 5년 | 전자금융거래법 §21의3 |
31
+ | 데이터 접근 | 민감 데이터 조회 | 5년 | 개인정보보호법 §29 |
32
+ | 시스템 | 배포, 설정 변경, 장애 | 3년 | ISMS-P |
33
+ | 관리자 | 관리자 패널 모든 작업 | 영구 | PCI DSS 10.2 |
34
+
35
+ ### 1.2 감사 레벨
36
+
37
+ | 레벨 | 설명 | 적용 |
38
+ |-----|------|------|
39
+ | L1 | 이벤트 기록 (who, when, what) | 모든 이벤트 |
40
+ | L2 | 변경 전/후 데이터 (before/after) | 데이터 변경, 설정 변경 |
41
+ | L3 | 전체 요청/응답 페이로드 | 금융 거래, 결제, 자금 이동 |
42
+
43
+ ---
44
+
45
+ ## 2. 감사 로그 스키마
46
+
47
+ ### 2.1 금융 거래 로그
48
+
49
+ ```json
50
+ {
51
+ "id": "audit_abc123",
52
+ "timestamp": "2026-01-01T00:00:00.000Z",
53
+ "event_type": "TRADE_EXECUTED",
54
+ "category": "financial_transaction",
55
+ "level": "L3",
56
+ "actor": {
57
+ "user_id": "user_123",
58
+ "ip_address": "1.2.3.4",
59
+ "user_agent": "Mozilla/5.0...",
60
+ "session_id": "sess_456",
61
+ "device_fingerprint": "fp_789",
62
+ "kyc_level": "verified"
63
+ },
64
+ "target": {
65
+ "entity_type": "trade",
66
+ "entity_id": "trade_001",
67
+ "path": "/api/trades"
68
+ },
69
+ "transaction": {
70
+ "type": "buy",
71
+ "asset": "BTC/KRW",
72
+ "quantity": "0.5",
73
+ "price": "50000000",
74
+ "total_amount": "25000000",
75
+ "fee": "25000",
76
+ "currency": "KRW"
77
+ },
78
+ "changes": {
79
+ "before": { "balance": "100000000" },
80
+ "after": { "balance": "74975000" }
81
+ },
82
+ "risk": {
83
+ "fds_score": 15,
84
+ "fds_rules_triggered": [],
85
+ "risk_level": "low"
86
+ },
87
+ "metadata": {
88
+ "trace_id": "trace_xyz",
89
+ "service": "trade-service",
90
+ "version": "1.2.3",
91
+ "correlation_id": "corr_abc"
92
+ },
93
+ "result": "success"
94
+ }
95
+ ```
96
+
97
+ ### 2.2 이벤트 타입 (금융 특화)
98
+
99
+ | 카테고리 | 이벤트 타입 | 레벨 | 설명 |
100
+ |---------|-----------|:----:|------|
101
+ | auth | `LOGIN_SUCCESS` | L1 | 로그인 성공 |
102
+ | auth | `LOGIN_FAILURE` | L1 | 로그인 실패 (사유 포함) |
103
+ | auth | `MFA_VERIFIED` | L1 | MFA 인증 완료 |
104
+ | auth | `SESSION_EXPIRED` | L1 | 세션 만료 |
105
+ | kyc | `KYC_SUBMITTED` | L2 | KYC 서류 제출 |
106
+ | kyc | `KYC_APPROVED` | L2 | KYC 승인 |
107
+ | kyc | `KYC_REJECTED` | L2 | KYC 거부 (사유 포함) |
108
+ | txn | `ORDER_PLACED` | L3 | 주문 접수 |
109
+ | txn | `TRADE_EXECUTED` | L3 | 체결 완료 |
110
+ | txn | `ORDER_CANCELLED` | L3 | 주문 취소 |
111
+ | payment | `DEPOSIT_REQUESTED` | L3 | 입금 요청 |
112
+ | payment | `DEPOSIT_CONFIRMED` | L3 | 입금 확인 |
113
+ | payment | `WITHDRAWAL_REQUESTED` | L3 | 출금 요청 |
114
+ | payment | `WITHDRAWAL_APPROVED` | L3 | 출금 승인 |
115
+ | payment | `WITHDRAWAL_COMPLETED` | L3 | 출금 완료 |
116
+ | fds | `FDS_ALERT` | L2 | 이상거래 탐지 |
117
+ | fds | `FDS_BLOCKED` | L2 | 거래 차단 |
118
+ | fds | `FDS_RELEASED` | L2 | 차단 해제 (심사 후) |
119
+ | admin | `BALANCE_ADJUSTED` | L3 | 잔고 수동 조정 |
120
+ | admin | `FEE_CHANGED` | L2 | 수수료 변경 |
121
+ | admin | `LIMIT_CHANGED` | L2 | 거래 한도 변경 |
122
+
123
+ ---
124
+
125
+ ## 3. 저장 아키텍처
126
+
127
+ ### 3.1 저장소 구성 (5년 법적 보관)
128
+
129
+ | 저장소 | 용도 | 보존 | 접근 | 비고 |
130
+ |-------|------|------|------|------|
131
+ | Hot (DB) | 최근 로그 조회 | 90일 | 실시간 검색 | 인덱싱 완전 |
132
+ | Warm (Object Storage) | 중기 보관 | 2년 | 일괄 검색 | 압축 저장 |
133
+ | Cold (Archive) | 장기 보관 | 5년+ | 복원 후 검색 | 규제 준수 |
134
+
135
+ ### 3.2 무결성 보장 (PCI DSS 10.5)
136
+
137
+ | 방법 | 설명 | 구현 |
138
+ |-----|------|------|
139
+ | 쓰기 전용 | append-only, 수정/삭제 불가 | DB trigger + 정책 |
140
+ | 해시 체인 | 각 로그에 이전 블록 해시 포함 | SHA-256 체인 |
141
+ | 타임스탬프 서명 | 신뢰할 수 있는 시간 + 서명 | NTP + HSM |
142
+ | 접근 제어 | 쓰기: 시스템만 / 읽기: 감사 권한 | IAM + RBAC |
143
+ | 이중 저장 | 별도 보안 저장소에 복제 | S3 Cross-Region |
144
+ | 변조 감지 | 정기 무결성 검증 배치 | 일간 스케줄러 |
145
+
146
+ ---
147
+
148
+ ## 4. FDS 연동
149
+
150
+ ### 4.1 FDS → 감사 로그 흐름
151
+
152
+ ```
153
+ 거래 요청 → FDS 분석 → 점수 산출 → 감사 로그 기록
154
+ ├─ 정상 → 거래 실행 → L3 로그
155
+ ├─ 의심 → 보류 + 알림 → L2 로그
156
+ └─ 차단 → 거래 거부 → L2 로그 + STR 검토 큐
157
+ ```
158
+
159
+ ### 4.2 FDS 규칙 감사
160
+
161
+ | 이벤트 | 기록 항목 | 보존 |
162
+ |-------|----------|------|
163
+ | 규칙 변경 | 변경자, 이전/이후 규칙, 사유 | 영구 |
164
+ | 규칙 트리거 | 거래 ID, 트리거된 규칙, 점수 | 5년 |
165
+ | 수동 해제 | 해제자, 사유, 승인자 | 영구 |
166
+
167
+ ---
168
+
169
+ ## 5. 규제 보고용 조회
170
+
171
+ ### 5.1 조회 API
172
+
173
+ | 엔드포인트 | 용도 | 권한 |
174
+ |-----------|------|------|
175
+ | `GET /api/audit/search` | 조건부 검색 | AUDITOR+ |
176
+ | `GET /api/audit/transaction/:id` | 거래 전체 이력 | AUDITOR+ |
177
+ | `GET /api/audit/user/:id/activity` | 사용자 활동 | AUDITOR+ |
178
+ | `POST /api/audit/report/str` | STR 보고용 데이터 추출 | COMPLIANCE |
179
+ | `POST /api/audit/report/regulatory` | 규제 보고용 데이터 | COMPLIANCE |
180
+ | `POST /api/audit/export` | CSV/JSON 내보내기 | ADMIN |
181
+
182
+ ### 5.2 보고서 템플릿
183
+
184
+ | 보고서 | 대상 | 주기 | 자동화 |
185
+ |-------|------|------|:------:|
186
+ | 거래 현황 보고 | 경영진 | 일간 | ✅ |
187
+ | FDS 탐지 보고 | 보안팀 | 일간 | ✅ |
188
+ | 규제 준수 보고 | 금융감독원 | 분기 | 수동 |
189
+ | STR 보고 | FIU | 수시 | 반자동 |
190
+ | 감사 무결성 검증 | 내부 감사 | 월간 | ✅ |
191
+
192
+ ---
193
+
194
+ ## 6. 관련 문서
195
+
196
+ - [컴플라이언스 매트릭스](./compliance-matrix.md) — 규제 요구사항 매트릭스
197
+ - [보안 명세](./security-spec.md) — 접근 제어 정책
198
+ - [상태 머신](./state-machine.md) — 거래 상태 전이
199
+ - [데이터 설계](./data-design.md) — 감사 테이블 스키마
200
+
201
+ ---
202
+
203
+ ## 변경 이력
204
+
205
+ | 버전 | 날짜 | 작성자 | 변경 내용 |
206
+ |------|------|--------|----------|
207
+ | 1.0.0 | {{DATE}} | tsq-security | 초기 작성 (fintech 특화) |