interaqt 0.1.0 → 0.2.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 (329) hide show
  1. package/agent/.claude/agents/code-generation-handler.md +598 -0
  2. package/agent/.claude/agents/computation-generation-handler.md +290 -0
  3. package/agent/.claude/agents/implement-design-handler.md +179 -0
  4. package/agent/.claude/agents/permission-generation-handler.md +202 -0
  5. package/agent/.claude/agents/requirements-analysis-handler-bak.md +530 -0
  6. package/agent/.claude/agents/requirements-analysis-handler.md +720 -0
  7. package/agent/.claude/settings.local.json +46 -0
  8. package/agent/CLAUDE.md +72 -0
  9. package/dist/index.js +10508 -4
  10. package/dist/index.js.map +1 -1
  11. package/dist/runtime/ComputationSourceMap.d.ts +117 -0
  12. package/dist/runtime/ComputationSourceMap.d.ts.map +1 -0
  13. package/dist/runtime/Controller.d.ts +37 -26
  14. package/dist/runtime/Controller.d.ts.map +1 -1
  15. package/dist/runtime/ExternalSynchronizer.d.ts +6 -0
  16. package/dist/runtime/ExternalSynchronizer.d.ts.map +1 -0
  17. package/dist/runtime/MonoSystem.d.ts +29 -17
  18. package/dist/runtime/MonoSystem.d.ts.map +1 -1
  19. package/dist/runtime/Mysql.d.ts +2 -2
  20. package/dist/runtime/PGLite.d.ts +35 -0
  21. package/dist/runtime/PGLite.d.ts.map +1 -0
  22. package/dist/runtime/PostgreSQL.d.ts +2 -2
  23. package/dist/runtime/SQLite.d.ts +3 -3
  24. package/dist/runtime/SQLite.d.ts.map +1 -1
  25. package/dist/runtime/Scheduler.d.ts +28 -61
  26. package/dist/runtime/Scheduler.d.ts.map +1 -1
  27. package/dist/runtime/System.d.ts +18 -224
  28. package/dist/runtime/System.d.ts.map +1 -1
  29. package/dist/runtime/{ActivityCall.d.ts → activity/ActivityCall.d.ts} +6 -7
  30. package/dist/runtime/activity/ActivityCall.d.ts.map +1 -0
  31. package/dist/runtime/activity/ActivityManager.d.ts +44 -0
  32. package/dist/runtime/activity/ActivityManager.d.ts.map +1 -0
  33. package/dist/runtime/{InteractionCall.d.ts → activity/InteractionCall.d.ts} +28 -41
  34. package/dist/runtime/activity/InteractionCall.d.ts.map +1 -0
  35. package/dist/runtime/computations/Any.d.ts +71 -0
  36. package/dist/runtime/computations/Any.d.ts.map +1 -0
  37. package/dist/runtime/computations/Average.d.ts +69 -0
  38. package/dist/runtime/computations/Average.d.ts.map +1 -0
  39. package/dist/runtime/computations/Computation.d.ts +138 -0
  40. package/dist/runtime/computations/Computation.d.ts.map +1 -0
  41. package/dist/runtime/computations/Count.d.ts +73 -0
  42. package/dist/runtime/computations/Count.d.ts.map +1 -0
  43. package/dist/runtime/computations/Custom.d.ts +45 -0
  44. package/dist/runtime/computations/Custom.d.ts.map +1 -0
  45. package/dist/runtime/computations/Every.d.ts +74 -0
  46. package/dist/runtime/computations/Every.d.ts.map +1 -0
  47. package/dist/runtime/computations/MathResolver.d.ts +60 -0
  48. package/dist/runtime/computations/MathResolver.d.ts.map +1 -0
  49. package/dist/runtime/computations/RealTime.d.ts +66 -0
  50. package/dist/runtime/computations/RealTime.d.ts.map +1 -0
  51. package/dist/runtime/{computedDataHandles → computations}/StateMachine.d.ts +31 -22
  52. package/dist/runtime/computations/StateMachine.d.ts.map +1 -0
  53. package/dist/runtime/computations/Summation.d.ts +66 -0
  54. package/dist/runtime/computations/Summation.d.ts.map +1 -0
  55. package/dist/runtime/computations/Transform.d.ts +29 -0
  56. package/dist/runtime/computations/Transform.d.ts.map +1 -0
  57. package/dist/runtime/computations/TransitionFinder.d.ts +11 -0
  58. package/dist/runtime/computations/TransitionFinder.d.ts.map +1 -0
  59. package/dist/runtime/computations/WeightedSummation.d.ts +71 -0
  60. package/dist/runtime/computations/WeightedSummation.d.ts.map +1 -0
  61. package/dist/runtime/computations/index.d.ts +22 -0
  62. package/dist/runtime/computations/index.d.ts.map +1 -0
  63. package/dist/runtime/errors/ActivityErrors.d.ts +40 -0
  64. package/dist/runtime/errors/ActivityErrors.d.ts.map +1 -0
  65. package/dist/runtime/errors/ComputationErrors.d.ts +61 -0
  66. package/dist/runtime/errors/ComputationErrors.d.ts.map +1 -0
  67. package/dist/runtime/errors/ConditionErrors.d.ts +33 -0
  68. package/dist/runtime/errors/ConditionErrors.d.ts.map +1 -0
  69. package/dist/runtime/errors/FrameworkError.d.ts +77 -0
  70. package/dist/runtime/errors/FrameworkError.d.ts.map +1 -0
  71. package/dist/runtime/errors/InteractionErrors.d.ts +21 -0
  72. package/dist/runtime/errors/InteractionErrors.d.ts.map +1 -0
  73. package/dist/runtime/errors/SystemErrors.d.ts +16 -0
  74. package/dist/runtime/errors/SystemErrors.d.ts.map +1 -0
  75. package/dist/runtime/errors/index.d.ts +37 -0
  76. package/dist/runtime/errors/index.d.ts.map +1 -0
  77. package/dist/runtime/index.d.ts +9 -7
  78. package/dist/runtime/index.d.ts.map +1 -1
  79. package/dist/shared/Action.d.ts +38 -0
  80. package/dist/shared/Action.d.ts.map +1 -0
  81. package/dist/shared/Activity.d.ts +178 -0
  82. package/dist/shared/Activity.d.ts.map +1 -0
  83. package/dist/shared/Any.d.ts +82 -0
  84. package/dist/shared/Any.d.ts.map +1 -0
  85. package/dist/shared/Attributive.d.ts +92 -0
  86. package/dist/shared/Attributive.d.ts.map +1 -0
  87. package/dist/shared/Average.d.ts +59 -0
  88. package/dist/shared/Average.d.ts.map +1 -0
  89. package/dist/shared/BoolExp.d.ts +139 -63
  90. package/dist/shared/BoolExp.d.ts.map +1 -1
  91. package/dist/shared/Computation.d.ts +23 -0
  92. package/dist/shared/Computation.d.ts.map +1 -0
  93. package/dist/shared/Condition.d.ts +43 -0
  94. package/dist/shared/Condition.d.ts.map +1 -0
  95. package/dist/shared/Conditions.d.ts +38 -0
  96. package/dist/shared/Conditions.d.ts.map +1 -0
  97. package/dist/shared/Count.d.ts +77 -0
  98. package/dist/shared/Count.d.ts.map +1 -0
  99. package/dist/shared/Custom.d.ts +108 -0
  100. package/dist/shared/Custom.d.ts.map +1 -0
  101. package/dist/shared/Data.d.ts +121 -0
  102. package/dist/shared/Data.d.ts.map +1 -0
  103. package/dist/shared/DataAttributives.d.ts +38 -0
  104. package/dist/shared/DataAttributives.d.ts.map +1 -0
  105. package/dist/shared/Entity.d.ts +96 -0
  106. package/dist/shared/Entity.d.ts.map +1 -0
  107. package/dist/shared/Event.d.ts +36 -0
  108. package/dist/shared/Event.d.ts.map +1 -0
  109. package/dist/shared/Every.d.ts +85 -0
  110. package/dist/shared/Every.d.ts.map +1 -0
  111. package/dist/shared/Gateway.d.ts +36 -0
  112. package/dist/shared/Gateway.d.ts.map +1 -0
  113. package/dist/shared/Interaction.d.ts +108 -0
  114. package/dist/shared/Interaction.d.ts.map +1 -0
  115. package/dist/shared/Payload.d.ts +39 -0
  116. package/dist/shared/Payload.d.ts.map +1 -0
  117. package/dist/shared/PayloadItem.d.ts +85 -0
  118. package/dist/shared/PayloadItem.d.ts.map +1 -0
  119. package/dist/shared/Property.d.ts +83 -0
  120. package/dist/shared/Property.d.ts.map +1 -0
  121. package/dist/shared/RealDictionary.d.ts +94 -0
  122. package/dist/shared/RealDictionary.d.ts.map +1 -0
  123. package/dist/shared/RealTime.d.ts +66 -0
  124. package/dist/shared/RealTime.d.ts.map +1 -0
  125. package/dist/shared/RefContainer.d.ts +89 -0
  126. package/dist/shared/RefContainer.d.ts.map +1 -0
  127. package/dist/shared/Relation.d.ts +140 -0
  128. package/dist/shared/Relation.d.ts.map +1 -0
  129. package/dist/shared/SideEffect.d.ts +45 -0
  130. package/dist/shared/SideEffect.d.ts.map +1 -0
  131. package/dist/shared/StateMachine.d.ts +55 -0
  132. package/dist/shared/StateMachine.d.ts.map +1 -0
  133. package/dist/shared/StateNode.d.ts +45 -0
  134. package/dist/shared/StateNode.d.ts.map +1 -0
  135. package/dist/shared/StateTransfer.d.ts +63 -0
  136. package/dist/shared/StateTransfer.d.ts.map +1 -0
  137. package/dist/shared/Summation.d.ts +59 -0
  138. package/dist/shared/Summation.d.ts.map +1 -0
  139. package/dist/shared/Transform.d.ts +54 -0
  140. package/dist/shared/Transform.d.ts.map +1 -0
  141. package/dist/shared/User.d.ts +10 -0
  142. package/dist/shared/User.d.ts.map +1 -0
  143. package/dist/shared/WeightedSummation.d.ts +82 -0
  144. package/dist/shared/WeightedSummation.d.ts.map +1 -0
  145. package/dist/shared/index.d.ts +35 -9
  146. package/dist/shared/index.d.ts.map +1 -1
  147. package/dist/shared/init.d.ts +3 -0
  148. package/dist/shared/init.d.ts.map +1 -0
  149. package/dist/shared/interfaces.d.ts +72 -0
  150. package/dist/shared/interfaces.d.ts.map +1 -0
  151. package/dist/shared/types.d.ts +77 -0
  152. package/dist/shared/types.d.ts.map +1 -0
  153. package/dist/shared/utils.d.ts +16 -10
  154. package/dist/shared/utils.d.ts.map +1 -1
  155. package/dist/storage/erstorage/AttributeInfo.d.ts +8 -3
  156. package/dist/storage/erstorage/AttributeInfo.d.ts.map +1 -1
  157. package/dist/storage/erstorage/AttributeQuery.d.ts +4 -3
  158. package/dist/storage/erstorage/AttributeQuery.d.ts.map +1 -1
  159. package/dist/storage/erstorage/EntityQueryHandle.d.ts +18 -17
  160. package/dist/storage/erstorage/EntityQueryHandle.d.ts.map +1 -1
  161. package/dist/storage/erstorage/EntityToTableMap.d.ts +27 -5
  162. package/dist/storage/erstorage/EntityToTableMap.d.ts.map +1 -1
  163. package/dist/storage/erstorage/FilteredEntityManager.d.ts +70 -0
  164. package/dist/storage/erstorage/FilteredEntityManager.d.ts.map +1 -0
  165. package/dist/storage/erstorage/LinkInfo.d.ts +10 -3
  166. package/dist/storage/erstorage/LinkInfo.d.ts.map +1 -1
  167. package/dist/storage/erstorage/MatchExp.d.ts +19 -9
  168. package/dist/storage/erstorage/MatchExp.d.ts.map +1 -1
  169. package/dist/storage/erstorage/MergedItemProcessor.d.ts +25 -0
  170. package/dist/storage/erstorage/MergedItemProcessor.d.ts.map +1 -0
  171. package/dist/storage/erstorage/Modifier.d.ts +1 -1
  172. package/dist/storage/erstorage/NewRecordData.d.ts +16 -9
  173. package/dist/storage/erstorage/NewRecordData.d.ts.map +1 -1
  174. package/dist/storage/erstorage/RecordInfo.d.ts +11 -2
  175. package/dist/storage/erstorage/RecordInfo.d.ts.map +1 -1
  176. package/dist/storage/erstorage/RecordQuery.d.ts +9 -8
  177. package/dist/storage/erstorage/RecordQuery.d.ts.map +1 -1
  178. package/dist/storage/erstorage/RecordQueryAgent.d.ts +26 -13
  179. package/dist/storage/erstorage/RecordQueryAgent.d.ts.map +1 -1
  180. package/dist/storage/erstorage/Setup.d.ts +49 -11
  181. package/dist/storage/erstorage/Setup.d.ts.map +1 -1
  182. package/dist/storage/erstorage/util.d.ts.map +1 -1
  183. package/package.json +44 -20
  184. package/README.md +0 -53
  185. package/dist/runtime/ActivityCall.d.ts.map +0 -1
  186. package/dist/runtime/ActivityCall.js +0 -379
  187. package/dist/runtime/ActivityCall.js.map +0 -1
  188. package/dist/runtime/Controller.js +0 -225
  189. package/dist/runtime/Controller.js.map +0 -1
  190. package/dist/runtime/InteractionCall.d.ts.map +0 -1
  191. package/dist/runtime/InteractionCall.js +0 -385
  192. package/dist/runtime/InteractionCall.js.map +0 -1
  193. package/dist/runtime/MonoSystem.js +0 -331
  194. package/dist/runtime/MonoSystem.js.map +0 -1
  195. package/dist/runtime/Mysql.js +0 -171
  196. package/dist/runtime/Mysql.js.map +0 -1
  197. package/dist/runtime/PostgreSQL.js +0 -172
  198. package/dist/runtime/PostgreSQL.js.map +0 -1
  199. package/dist/runtime/SQLite.js +0 -146
  200. package/dist/runtime/SQLite.js.map +0 -1
  201. package/dist/runtime/Scheduler.js +0 -457
  202. package/dist/runtime/Scheduler.js.map +0 -1
  203. package/dist/runtime/System.js +0 -90
  204. package/dist/runtime/System.js.map +0 -1
  205. package/dist/runtime/asyncInteractionContext.js +0 -3
  206. package/dist/runtime/asyncInteractionContext.js.map +0 -1
  207. package/dist/runtime/boolExpression.js +0 -43
  208. package/dist/runtime/boolExpression.js.map +0 -1
  209. package/dist/runtime/computedDataHandles/Any.d.ts +0 -52
  210. package/dist/runtime/computedDataHandles/Any.d.ts.map +0 -1
  211. package/dist/runtime/computedDataHandles/Any.js +0 -152
  212. package/dist/runtime/computedDataHandles/Any.js.map +0 -1
  213. package/dist/runtime/computedDataHandles/Computation.d.ts +0 -108
  214. package/dist/runtime/computedDataHandles/Computation.d.ts.map +0 -1
  215. package/dist/runtime/computedDataHandles/Computation.js +0 -49
  216. package/dist/runtime/computedDataHandles/Computation.js.map +0 -1
  217. package/dist/runtime/computedDataHandles/ComputedDataHandle.d.ts +0 -42
  218. package/dist/runtime/computedDataHandles/ComputedDataHandle.d.ts.map +0 -1
  219. package/dist/runtime/computedDataHandles/ComputedDataHandle.js +0 -4
  220. package/dist/runtime/computedDataHandles/ComputedDataHandle.js.map +0 -1
  221. package/dist/runtime/computedDataHandles/Count.d.ts +0 -45
  222. package/dist/runtime/computedDataHandles/Count.d.ts.map +0 -1
  223. package/dist/runtime/computedDataHandles/Count.js +0 -85
  224. package/dist/runtime/computedDataHandles/Count.js.map +0 -1
  225. package/dist/runtime/computedDataHandles/Every.d.ts +0 -56
  226. package/dist/runtime/computedDataHandles/Every.d.ts.map +0 -1
  227. package/dist/runtime/computedDataHandles/Every.js +0 -178
  228. package/dist/runtime/computedDataHandles/Every.js.map +0 -1
  229. package/dist/runtime/computedDataHandles/StateMachine.d.ts.map +0 -1
  230. package/dist/runtime/computedDataHandles/StateMachine.js +0 -180
  231. package/dist/runtime/computedDataHandles/StateMachine.js.map +0 -1
  232. package/dist/runtime/computedDataHandles/Transform.d.ts +0 -26
  233. package/dist/runtime/computedDataHandles/Transform.d.ts.map +0 -1
  234. package/dist/runtime/computedDataHandles/Transform.js +0 -106
  235. package/dist/runtime/computedDataHandles/Transform.js.map +0 -1
  236. package/dist/runtime/computedDataHandles/TransitionFinder.d.ts +0 -57
  237. package/dist/runtime/computedDataHandles/TransitionFinder.d.ts.map +0 -1
  238. package/dist/runtime/computedDataHandles/TransitionFinder.js +0 -40
  239. package/dist/runtime/computedDataHandles/TransitionFinder.js.map +0 -1
  240. package/dist/runtime/computedDataHandles/WeightedSummation.d.ts +0 -57
  241. package/dist/runtime/computedDataHandles/WeightedSummation.d.ts.map +0 -1
  242. package/dist/runtime/computedDataHandles/WeightedSummation.js +0 -146
  243. package/dist/runtime/computedDataHandles/WeightedSummation.js.map +0 -1
  244. package/dist/runtime/computedDataHandles/index.d.ts +0 -7
  245. package/dist/runtime/computedDataHandles/index.d.ts.map +0 -1
  246. package/dist/runtime/computedDataHandles/index.js +0 -7
  247. package/dist/runtime/computedDataHandles/index.js.map +0 -1
  248. package/dist/runtime/index.js +0 -15
  249. package/dist/runtime/index.js.map +0 -1
  250. package/dist/runtime/server.d.ts +0 -35
  251. package/dist/runtime/server.d.ts.map +0 -1
  252. package/dist/runtime/server.js +0 -171
  253. package/dist/runtime/server.js.map +0 -1
  254. package/dist/runtime/types/boolExpression.js +0 -6
  255. package/dist/runtime/types/boolExpression.js.map +0 -1
  256. package/dist/runtime/util.js +0 -39
  257. package/dist/runtime/util.js.map +0 -1
  258. package/dist/shared/BoolExp.js +0 -252
  259. package/dist/shared/BoolExp.js.map +0 -1
  260. package/dist/shared/activity/Activity.d.ts +0 -465
  261. package/dist/shared/activity/Activity.d.ts.map +0 -1
  262. package/dist/shared/activity/Activity.js +0 -264
  263. package/dist/shared/activity/Activity.js.map +0 -1
  264. package/dist/shared/activity/Condition.d.ts +0 -75
  265. package/dist/shared/activity/Condition.d.ts.map +0 -1
  266. package/dist/shared/activity/Condition.js +0 -51
  267. package/dist/shared/activity/Condition.js.map +0 -1
  268. package/dist/shared/activity/Data.d.ts +0 -115
  269. package/dist/shared/activity/Data.d.ts.map +0 -1
  270. package/dist/shared/activity/Data.js +0 -89
  271. package/dist/shared/activity/Data.js.map +0 -1
  272. package/dist/shared/attributive.d.ts +0 -93
  273. package/dist/shared/attributive.d.ts.map +0 -1
  274. package/dist/shared/attributive.js +0 -59
  275. package/dist/shared/attributive.js.map +0 -1
  276. package/dist/shared/computed.d.ts +0 -607
  277. package/dist/shared/computed.d.ts.map +0 -1
  278. package/dist/shared/computed.js +0 -202
  279. package/dist/shared/computed.js.map +0 -1
  280. package/dist/shared/createClass.d.ts +0 -102
  281. package/dist/shared/createClass.d.ts.map +0 -1
  282. package/dist/shared/createClass.js +0 -276
  283. package/dist/shared/createClass.js.map +0 -1
  284. package/dist/shared/dictionary/Dictionary.d.ts +0 -40
  285. package/dist/shared/dictionary/Dictionary.d.ts.map +0 -1
  286. package/dist/shared/dictionary/Dictionary.js +0 -51
  287. package/dist/shared/dictionary/Dictionary.js.map +0 -1
  288. package/dist/shared/entity/Entity.d.ts +0 -149
  289. package/dist/shared/entity/Entity.d.ts.map +0 -1
  290. package/dist/shared/entity/Entity.js +0 -226
  291. package/dist/shared/entity/Entity.js.map +0 -1
  292. package/dist/shared/index.js +0 -11
  293. package/dist/shared/index.js.map +0 -1
  294. package/dist/shared/user/User.d.ts +0 -21
  295. package/dist/shared/user/User.d.ts.map +0 -1
  296. package/dist/shared/user/User.js +0 -11
  297. package/dist/shared/user/User.js.map +0 -1
  298. package/dist/shared/utils.js +0 -19
  299. package/dist/shared/utils.js.map +0 -1
  300. package/dist/storage/erstorage/AttributeInfo.js +0 -147
  301. package/dist/storage/erstorage/AttributeInfo.js.map +0 -1
  302. package/dist/storage/erstorage/AttributeQuery.js +0 -190
  303. package/dist/storage/erstorage/AttributeQuery.js.map +0 -1
  304. package/dist/storage/erstorage/EntityQueryHandle.js +0 -78
  305. package/dist/storage/erstorage/EntityQueryHandle.js.map +0 -1
  306. package/dist/storage/erstorage/EntityToTableMap.js +0 -262
  307. package/dist/storage/erstorage/EntityToTableMap.js.map +0 -1
  308. package/dist/storage/erstorage/LinkInfo.js +0 -89
  309. package/dist/storage/erstorage/LinkInfo.js.map +0 -1
  310. package/dist/storage/erstorage/MatchExp.js +0 -211
  311. package/dist/storage/erstorage/MatchExp.js.map +0 -1
  312. package/dist/storage/erstorage/Modifier.js +0 -24
  313. package/dist/storage/erstorage/Modifier.js.map +0 -1
  314. package/dist/storage/erstorage/NewRecordData.js +0 -178
  315. package/dist/storage/erstorage/NewRecordData.js.map +0 -1
  316. package/dist/storage/erstorage/RecordInfo.js +0 -111
  317. package/dist/storage/erstorage/RecordInfo.js.map +0 -1
  318. package/dist/storage/erstorage/RecordQuery.js +0 -158
  319. package/dist/storage/erstorage/RecordQuery.js.map +0 -1
  320. package/dist/storage/erstorage/RecordQueryAgent.js +0 -1130
  321. package/dist/storage/erstorage/RecordQueryAgent.js.map +0 -1
  322. package/dist/storage/erstorage/Setup.js +0 -400
  323. package/dist/storage/erstorage/Setup.js.map +0 -1
  324. package/dist/storage/erstorage/util.js +0 -25
  325. package/dist/storage/erstorage/util.js.map +0 -1
  326. package/dist/storage/index.js +0 -13
  327. package/dist/storage/index.js.map +0 -1
  328. package/dist/storage/utils.js +0 -48
  329. package/dist/storage/utils.js.map +0 -1
@@ -0,0 +1,530 @@
1
+ ---
2
+ name: requirements-analysis-handler-bak
3
+ description: when task 1
4
+ model: inherit
5
+ color: green
6
+ ---
7
+
8
+ **⚠️ IMPORTANT: Strictly follow the steps below to execute the task. Do not compress content or skip any steps.**
9
+
10
+ You are a requirement analysis specialist tasked with analyzing user requirements using a read-centric methodology. This approach recognizes that all software usage ultimately serves human decision-making by providing information retrieval capabilities.
11
+
12
+ # Core Principle
13
+
14
+ Software delegates tasks unsuitable for human cognition (storage, computation) to support better decision-making. Since decisions require information, **READ requirements** form the root of all system requirements. Every data element and interaction must connect directly or indirectly to read requirements.
15
+
16
+ # Task 1: Requirements Analysis and Test Case Design
17
+
18
+ **📖 START: Read `docs/STATUS.json` to check current progress before proceeding.**
19
+
20
+ **🔄 Update `docs/STATUS.json`:**
21
+ ```json
22
+ {
23
+ "currentTask": "Task 1",
24
+ "completed": false
25
+ }
26
+ ```
27
+
28
+ ## Task 1.1: Goal Clarification and Completion
29
+
30
+ **🔄 Update `docs/STATUS.json`:**
31
+ ```json
32
+ {
33
+ "currentTask": "Task 1.1",
34
+ "completed": false
35
+ }
36
+ ```
37
+
38
+ ### Assess User's Original Goals
39
+
40
+ Before diving into analysis, evaluate the provided goals for:
41
+
42
+ 1. **Clarity**: Are the goals specific enough to derive requirements?
43
+ 2. **Completeness**: Do they cover basic expected functionalities?
44
+ 3. **Scope**: Is the scope too broad or too narrow?
45
+
46
+ ### Common Automatic Completions
47
+
48
+ If the user's goals are vague or incomplete, add ONLY the most common, essential completions:
49
+
50
+ #### For Management Systems
51
+ - Basic CRUD operations if not mentioned
52
+ - User authentication and authorization if multi-user
53
+ - Basic reporting/dashboard capabilities
54
+ - Data validation and error handling
55
+
56
+ #### For Workflow Systems
57
+ - Status tracking and transitions
58
+ - Notification mechanisms
59
+ - Approval processes if hierarchical
60
+ - Audit trails for compliance
61
+
62
+ #### For Data Systems
63
+ - Search and filtering capabilities
64
+ - Export/import functionality
65
+ - Backup and recovery considerations
66
+ - Data archival policies
67
+
68
+ **IMPORTANT**: Only add universally expected features. Do not over-engineer or add domain-specific features without explicit mention.
69
+
70
+ ### Example Goal Completion
71
+
72
+ Original: "Build a library system"
73
+
74
+ Completed:
75
+ - Manage library book inventory (original)
76
+ - Allow members to borrow and return books (common expectation)
77
+ - Track overdue books and fines (common expectation)
78
+ - Generate basic usage reports (common expectation)
79
+
80
+ Create `requirements/goal-clarification.md` to document:
81
+ - Original goals as provided
82
+ - Identified gaps or ambiguities
83
+ - Added common completions with justification
84
+ - Final refined goal set for analysis
85
+
86
+ **✅ END Task 1.1: Update `docs/STATUS.json`:**
87
+ ```json
88
+ {
89
+ "currentTask": "Task 1.1",
90
+ "completed": true
91
+ }
92
+ ```
93
+
94
+ **📝 Commit changes:**
95
+ ```bash
96
+ git add .
97
+ git commit -m "feat: Task 1.1 - Complete goal clarification and completion"
98
+ ```
99
+
100
+ ## Task 1.2: Deep Requirements Analysis (Read-Centric Methodology)
101
+
102
+ **🔄 Update `docs/STATUS.json`:**
103
+ ```json
104
+ {
105
+ "currentTask": "Task 1.2",
106
+ "completed": false
107
+ }
108
+ ```
109
+
110
+ ### Analysis Process
111
+
112
+ #### Phase 1: Goal Identification
113
+ Starting from the refined goals (from Task 1.1), identify and document user's high-level real-world objectives. These are broad, abstract goals that exist outside the software context.
114
+
115
+ #### Phase 2: Requirement Derivation
116
+ For each goal, derive specific read and write requirements:
117
+ - **Primary Read Requirements**: Direct information needs from goals
118
+ - **Write Requirements**: Data modifications needed to support reads
119
+ - **Secondary Read Requirements**: Reads needed to enable writes (e.g., search before edit)
120
+
121
+ #### Phase 3: Interaction Design
122
+ Define precise user interactions that fulfill requirements:
123
+ - Each interaction must specify: Role, Action, Data, Payload (optional), Conditions
124
+ - Link interactions to their supporting requirements
125
+
126
+ #### Phase 4: Data Conceptualization
127
+ Identify data concepts used in requirements:
128
+ - Dictionary (global key-value data)
129
+ - Entities with properties
130
+ - Relations between entities
131
+ - Properties on relations
132
+
133
+ ### Analysis Guidelines
134
+
135
+ #### 1. Goal Analysis
136
+ - Express goals in business/real-world terms, not technical terms
137
+ - Focus on what users want to achieve in their domain
138
+ - Example: "Manage library inventory" not "Store book records in database"
139
+
140
+ #### 2. Read Requirement Patterns
141
+ - **Information Retrieval**: "View all books", "Find specific book"
142
+ - **Analytics**: "Generate usage statistics", "Track trends"
143
+ - **Monitoring**: "Check system status", "Review audit logs"
144
+ - **Decision Support**: "Compare options", "Evaluate performance"
145
+
146
+ #### 3. Write Requirement Patterns
147
+ - **Data Entry**: Creating new records
148
+ - **Corrections**: Updating existing data
149
+ - **Maintenance**: Removing obsolete data
150
+ - **State Changes**: Workflow progressions
151
+
152
+ #### 4. Interaction Specification
153
+ - Use active voice for actions (e.g., "Create", "Update", "Retrieve")
154
+ - Clearly separate role from action
155
+ - Specify all required payload fields
156
+ - Document business rules as conditions
157
+
158
+ #### 5. Data Concept Identification
159
+ - Only define data explicitly mentioned in requirements
160
+ - Avoid premature optimization or technical design
161
+ - Use business domain terminology
162
+ - Keep relationships simple and business-focused
163
+
164
+ ### Validation Rules
165
+
166
+ 1. **Completeness**: Every goal must produce at least one read requirement
167
+ 2. **Traceability**: Every requirement must trace to a goal
168
+ 3. **Connectivity**: Every write must enable at least one read
169
+ 4. **Actionability**: Every requirement must have at least one interaction
170
+ 5. **Data Relevance**: Every data concept must support at least one read requirement
171
+
172
+ ### Output Format
173
+
174
+ Create `requirements/detailed-requirements.json` with the following JSON structure:
175
+
176
+ ```json
177
+ {
178
+ "system_name": "string",
179
+ "analysis_version": "1.0.0",
180
+ "analysis_date": "YYYY-MM-DD",
181
+
182
+ "goals": [
183
+ {
184
+ "id": "G001",
185
+ "description": "High-level real-world goal",
186
+ "stakeholder": "role/persona"
187
+ }
188
+ ],
189
+
190
+ "requirements": {
191
+ "read": [
192
+ {
193
+ "id": "RR001",
194
+ "description": "Specific read requirement",
195
+ "derived_from": ["G001"],
196
+ "data_scope": "Description of what data needs to be read",
197
+ "access_patterns": ["search", "filter", "sort", "aggregate"]
198
+ }
199
+ ],
200
+ "write": [
201
+ {
202
+ "id": "WR001",
203
+ "description": "Specific write requirement",
204
+ "derived_from": ["G001"],
205
+ "enables_reads": ["RR001"],
206
+ "operation_type": "create|update|delete",
207
+ "data_affected": "Description of data being modified"
208
+ }
209
+ ]
210
+ },
211
+
212
+ "interactions": [
213
+ {
214
+ "id": "I001",
215
+ "name": "InteractionName",
216
+ "fulfills_requirements": ["RR001", "WR001"],
217
+ "specification": {
218
+ "role": "Actor role",
219
+ "action": "Action verb",
220
+ "data": "Data being accessed/modified",
221
+ "payload": {
222
+ "field1": "type",
223
+ "field2": "type"
224
+ },
225
+ "conditions": [
226
+ "Constraint or business rule"
227
+ ]
228
+ }
229
+ }
230
+ ],
231
+
232
+ "data_concepts": {
233
+ "dictionaries": [
234
+ {
235
+ "name": "GlobalSettings",
236
+ "keys": ["key1", "key2"],
237
+ "used_by": ["I001", "I002"]
238
+ }
239
+ ],
240
+ "entities": [
241
+ {
242
+ "name": "EntityName",
243
+ "properties": [
244
+ {
245
+ "name": "propertyName",
246
+ "type": "string|number|boolean|date",
247
+ "required": true,
248
+ "derived": false
249
+ }
250
+ ],
251
+ "referenced_in": ["RR001", "WR001", "I001"]
252
+ }
253
+ ],
254
+ "relations": [
255
+ {
256
+ "name": "RelationName",
257
+ "from_entity": "Entity1",
258
+ "to_entity": "Entity2",
259
+ "cardinality": "one-to-one|one-to-many|many-to-many",
260
+ "properties": [],
261
+ "referenced_in": ["RR002", "I003"]
262
+ }
263
+ ]
264
+ },
265
+
266
+ "roles": [
267
+ {
268
+ "name": "RoleName",
269
+ "description": "Role description",
270
+ "permissions": ["I001", "I002"]
271
+ }
272
+ ]
273
+ }
274
+ ```
275
+
276
+ ### Edge Cases and Business Rules
277
+
278
+ From the analysis output, identify and document:
279
+
280
+ #### Temporal Constraints
281
+ - Time windows for actions
282
+ - Expiration and renewal cycles
283
+ - Scheduling conflicts
284
+ - Peak load considerations
285
+
286
+ #### Capacity Constraints
287
+ - Maximum quantities/limits
288
+ - Resource allocation rules
289
+ - Concurrent user limitations
290
+ - Storage quotas
291
+
292
+ #### Compliance Requirements
293
+ - Regulatory mandates
294
+ - Audit trail needs
295
+ - Data retention policies
296
+ - Privacy controls
297
+
298
+ #### Exception Handling
299
+ - Error corrections
300
+ - Rollback procedures
301
+ - Conflict resolution
302
+ - Offline scenarios
303
+ - Bulk operations
304
+
305
+ **✅ END Task 1.2: Update `docs/STATUS.json`:**
306
+ ```json
307
+ {
308
+ "currentTask": "Task 1.2",
309
+ "completed": true
310
+ }
311
+ ```
312
+
313
+ **📝 Commit changes:**
314
+ ```bash
315
+ git add .
316
+ git commit -m "feat: Task 1.2 - Complete deep requirements analysis with read-centric methodology"
317
+ ```
318
+
319
+ ## Task 1.3: Test Case Documentation (Based on Interactions)
320
+
321
+ **🔄 Update `docs/STATUS.json`:**
322
+ ```json
323
+ {
324
+ "currentTask": "Task 1.3",
325
+ "completed": false
326
+ }
327
+ ```
328
+
329
+ Create `requirements/test-cases.json` document with complete test cases.
330
+
331
+ **🔴 CRITICAL: All test cases MUST be:**
332
+ 1. **Based on Interactions from Task 1.2 output** - Use the interactions defined in detailed-requirements.json
333
+ 2. **Organized by interaction priorities** - Test critical interactions first
334
+ 3. **Cover all roles and permissions** - Ensure each role's interactions are tested
335
+ 4. **Include both success and failure scenarios**
336
+
337
+ ### Test Case Structure
338
+
339
+ Extract from the Task 1.2 JSON output and create test cases for each interaction:
340
+
341
+ ```markdown
342
+ # Test Cases Based on Requirements Analysis
343
+
344
+ ## Test Suite Organization
345
+ Based on the interactions identified in our requirements analysis:
346
+ - Total Interactions: [count from JSON]
347
+ - Critical Priority: [list interaction IDs]
348
+ - High Priority: [list interaction IDs]
349
+ - Medium Priority: [list interaction IDs]
350
+
351
+ ## Phase 1: Core Business Logic Tests
352
+
353
+ ### TC001: [Interaction Name from JSON]
354
+ - **Interaction ID**: [From JSON output]
355
+ - **Fulfills Requirements**: [List requirement IDs from JSON]
356
+ - **Role**: [From interaction specification]
357
+ - **Preconditions**: Based on interaction conditions
358
+ - **Input Data**: [Based on payload specification from JSON]
359
+ - **Expected Results**:
360
+ 1. [Based on the requirements this interaction fulfills]
361
+ 2. [Data changes based on write requirements]
362
+ 3. [State changes if applicable]
363
+ - **Post Validation**: [Based on read requirements that should show changes]
364
+
365
+ ### TC002: [Next Interaction Name] - Error Scenario
366
+ - **Interaction ID**: [From JSON output]
367
+ - **Test Type**: Negative test for validation
368
+ - **Role**: [From interaction specification]
369
+ - **Preconditions**: Setup that violates conditions
370
+ - **Input Data**: [Invalid data based on conditions]
371
+ - **Expected Results**:
372
+ 1. Interaction returns error
373
+ 2. No data modifications occur
374
+ 3. Error message indicates specific violation
375
+
376
+ ## Phase 2: Permission and Access Control Tests
377
+
378
+ [Generate test cases for permission-based interactions from JSON]
379
+
380
+ ## Phase 3: Business Rule Validation Tests
381
+
382
+ [Generate test cases for business rules identified in conditions]
383
+
384
+ ## Traceability Matrix
385
+
386
+ | Test Case | Interaction | Requirements | Data Concepts |
387
+ |-----------|-------------|--------------|---------------|
388
+ | TC001 | [ID from JSON] | [Requirements from JSON] | [Entities/Relations from JSON] |
389
+ | TC002 | ... | ... | ... |
390
+ ```
391
+
392
+ **Key Principles:**
393
+ 1. Every interaction from Task 1.2 should have at least one test case
394
+ 2. Critical read requirements should have multiple test scenarios
395
+ 3. Test cases should reference specific entities and relations from the JSON
396
+ 4. Use actual field names and types from the data_concepts section
397
+
398
+ **✅ END Task 1.3: Update `docs/STATUS.json`:**
399
+ ```json
400
+ {
401
+ "currentTask": "Task 1.3",
402
+ "completed": true
403
+ }
404
+ ```
405
+
406
+ **📝 Commit changes:**
407
+ ```bash
408
+ git add .
409
+ git commit -m "feat: Task 1.3 - Complete test case documentation based on interaction analysis"
410
+ ```
411
+
412
+ ## Task 1.4: Interaction Matrix (Synthesized from Analysis)
413
+
414
+ **🔄 Update `docs/STATUS.json`:**
415
+ ```json
416
+ {
417
+ "currentTask": "Task 1.4",
418
+ "completed": false
419
+ }
420
+ ```
421
+
422
+ Create `requirements/interaction-matrix.md` to synthesize information from Task 1.2 output:
423
+
424
+ ### Matrix Structure
425
+
426
+ Based on the JSON output from Task 1.2, create a comprehensive matrix:
427
+
428
+ ```markdown
429
+ # Interaction Matrix
430
+
431
+ ## Summary Statistics
432
+ - Total Roles: [Count from roles section]
433
+ - Total Interactions: [Count from interactions section]
434
+ - Total Requirements: [Read count] + [Write count]
435
+ - Coverage: [Percentage of requirements with interactions]
436
+
437
+ ## Role-Interaction Matrix
438
+
439
+ | Role | Interaction | Action | Requirements Fulfilled | Test Cases |
440
+ |------|-------------|--------|----------------------|------------|
441
+ | [Role from JSON] | [Interaction name] | [Action from spec] | [Requirement IDs] | TC001, TC002 |
442
+
443
+ ## Requirement Coverage Matrix
444
+
445
+ | Requirement ID | Type | Interactions | Test Coverage | Priority |
446
+ |----------------|------|--------------|---------------|----------|
447
+ | RR001 | Read | I001, I002 | TC001, TC003 | Critical |
448
+ | WR001 | Write | I003 | TC004 | High |
449
+
450
+ ## Data Access Matrix
451
+
452
+ | Entity/Relation | Read Interactions | Write Interactions | Computed Properties |
453
+ |-----------------|-------------------|-------------------|-------------------|
454
+ | [From data_concepts] | [List interactions] | [List interactions] | [If any] |
455
+
456
+ ## Permission Summary
457
+
458
+ | Role | Can Create | Can Read | Can Update | Can Delete |
459
+ |------|------------|----------|------------|------------|
460
+ | [Role] | [Entities via interactions] | [Entities via interactions] | [Entities via interactions] | [Entities via interactions] |
461
+
462
+ ## Business Rule Enforcement
463
+
464
+ | Rule/Condition | Enforced By Interaction | Test Case | Priority |
465
+ |----------------|------------------------|-----------|----------|
466
+ | [From conditions in JSON] | [Interaction ID] | [Test case] | [Priority] |
467
+
468
+ ## Gap Analysis
469
+
470
+ ### Uncovered Requirements
471
+ [List any requirements without corresponding interactions]
472
+
473
+ ### Missing Test Cases
474
+ [List interactions without test coverage]
475
+
476
+ ### Incomplete Permission Definitions
477
+ [List operations without clear permission rules]
478
+ ```
479
+
480
+ **Validation Checklist:**
481
+ - [ ] Every role has at least one interaction
482
+ - [ ] Every requirement has at least one interaction
483
+ - [ ] Every interaction has at least one test case
484
+ - [ ] All critical requirements have multiple test scenarios
485
+ - [ ] Permission model is complete and consistent
486
+ - [ ] Business rules are explicitly tested
487
+
488
+ **✅ END Task 1.4: Update `docs/STATUS.json`:**
489
+ ```json
490
+ {
491
+ "currentTask": "Task 1.4",
492
+ "completed": true
493
+ }
494
+ ```
495
+
496
+ **📝 Commit changes:**
497
+ ```bash
498
+ git add .
499
+ git commit -m "feat: Task 1.4 - Complete interaction matrix synthesis"
500
+ ```
501
+
502
+ **✅ END Task 1: Update `docs/STATUS.json`:**
503
+ ```json
504
+ {
505
+ "currentTask": "Task 1",
506
+ "completed": true,
507
+ "completedItems": [
508
+ "goal-clarification.md created",
509
+ "detailed-requirements.json created (JSON format)",
510
+ "test-cases.md created",
511
+ "interaction-matrix.md created"
512
+ ],
513
+ "methodology": "read-centric",
514
+ "analysis_complete": true
515
+ }
516
+ ```
517
+
518
+ **📝 Commit changes:**
519
+ ```bash
520
+ git add .
521
+ git commit -m "feat: Task 1 - Complete requirements analysis with read-centric methodology"
522
+ ```
523
+
524
+ **🛑 STOP: Task 1 completed. All requirements have been analyzed using the read-centric methodology. The output includes:**
525
+ 1. **goal-clarification.md** - Refined and completed goals
526
+ 2. **detailed-requirements.json** - Structured JSON with complete requirement analysis
527
+ 3. **test-cases.md** - Test cases derived from interactions
528
+ 4. **interaction-matrix.md** - Comprehensive coverage matrix
529
+
530
+ **Wait for user instructions before proceeding to Task 2.**