@openreachtech/hora-skills-ort-renchan 0.0.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 (126) hide show
  1. package/LICENSE +201 -0
  2. package/README.ja.md +135 -0
  3. package/README.md +135 -0
  4. package/dist/skills/hor-agent-loop/SKILL.md +123 -0
  5. package/dist/skills/hor-agent-loop/references/core.md +485 -0
  6. package/dist/skills/hor-agent-loop/references/graphql-integration.md +178 -0
  7. package/dist/skills/hor-agent-loop/references/renchan-job-integration.md +368 -0
  8. package/dist/skills/hor-agent-loop/references/testing.md +492 -0
  9. package/dist/skills/hor-ai-agent-structure/SKILL.md +403 -0
  10. package/dist/skills/hor-ai-agent-structure/references/loop-and-actions.md +100 -0
  11. package/dist/skills/hor-ai-prompt-document-store/SKILL.md +220 -0
  12. package/dist/skills/hor-ai-prompt-document-store/references/models-and-composition.md +156 -0
  13. package/dist/skills/hor-backend-testing/SKILL.md +118 -0
  14. package/dist/skills/hor-backend-testing/references/placement-and-ordering.md +89 -0
  15. package/dist/skills/hor-backend-testing/references/purity-and-mocks.md +82 -0
  16. package/dist/skills/hor-backend-testing/references/running-tests.md +186 -0
  17. package/dist/skills/hor-bank-id/SKILL.md +91 -0
  18. package/dist/skills/hor-build-e2e-test-environment/SKILL.md +609 -0
  19. package/dist/skills/hor-build-e2e-test-environment/references/compose-definition.md +368 -0
  20. package/dist/skills/hor-build-e2e-test-environment/references/edge-and-proxy.md +287 -0
  21. package/dist/skills/hor-build-e2e-test-environment/references/environment-and-ports.md +201 -0
  22. package/dist/skills/hor-build-e2e-test-environment/references/runner-and-lifecycle.md +330 -0
  23. package/dist/skills/hor-build-e2e-test-environment/references/seed-data.md +145 -0
  24. package/dist/skills/hor-build-e2e-test-environment/references/windows-runner.md +146 -0
  25. package/dist/skills/hor-constant-definition/SKILL.md +139 -0
  26. package/dist/skills/hor-cookie-authentication/SKILL.md +33 -0
  27. package/dist/skills/hor-cookie-authentication/references/auth-filter.md +55 -0
  28. package/dist/skills/hor-cookie-authentication/references/cookie-context.md +53 -0
  29. package/dist/skills/hor-cookie-authentication/references/dev-login-seeder.md +22 -0
  30. package/dist/skills/hor-cookie-authentication/references/environment.md +64 -0
  31. package/dist/skills/hor-cookie-authentication/references/error-codes.md +24 -0
  32. package/dist/skills/hor-cookie-authentication/references/migrations.md +18 -0
  33. package/dist/skills/hor-cookie-authentication/references/resolvers.md +97 -0
  34. package/dist/skills/hor-cookie-authentication/references/session-clerk.md +41 -0
  35. package/dist/skills/hor-cookie-authentication/references/token-models.md +125 -0
  36. package/dist/skills/hor-database-design/SKILL.md +54 -0
  37. package/dist/skills/hor-database-design/references/column-types.md +92 -0
  38. package/dist/skills/hor-database-design/references/datetimes.md +88 -0
  39. package/dist/skills/hor-database-design/references/master-tables.md +117 -0
  40. package/dist/skills/hor-database-design/references/normalization.md +40 -0
  41. package/dist/skills/hor-database-design/references/update-history.md +35 -0
  42. package/dist/skills/hor-execution-placement-pattern/SKILL.md +216 -0
  43. package/dist/skills/hor-external-api-client/SKILL.md +99 -0
  44. package/dist/skills/hor-external-api-client/references/architecture.md +127 -0
  45. package/dist/skills/hor-external-api-client/references/authorization.md +105 -0
  46. package/dist/skills/hor-external-api-client/references/capsule.md +130 -0
  47. package/dist/skills/hor-external-api-client/references/conventions.md +68 -0
  48. package/dist/skills/hor-external-api-client/references/launcher.md +138 -0
  49. package/dist/skills/hor-external-api-client/references/payload.md +176 -0
  50. package/dist/skills/hor-external-api-client/references/sdk-wrapper.md +291 -0
  51. package/dist/skills/hor-external-api-client/references/testing.md +130 -0
  52. package/dist/skills/hor-external-api-client/references/usage.md +152 -0
  53. package/dist/skills/hor-graphql-schema/SKILL.md +360 -0
  54. package/dist/skills/hor-graphql-server-engine/SKILL.md +356 -0
  55. package/dist/skills/hor-light-rag/SKILL.md +242 -0
  56. package/dist/skills/hor-light-rag/references/retrieval-internals.md +143 -0
  57. package/dist/skills/hor-multi-llm-provider/SKILL.md +288 -0
  58. package/dist/skills/hor-multi-llm-provider/references/provider-internals.md +153 -0
  59. package/dist/skills/hor-mutation-resolver/SKILL.md +360 -0
  60. package/dist/skills/hor-mutation-resolver/references/dependency-injection.md +148 -0
  61. package/dist/skills/hor-mutation-resolver/references/errors.md +120 -0
  62. package/dist/skills/hor-mutation-resolver/references/resolve-flow.md +275 -0
  63. package/dist/skills/hor-mutation-resolver/references/testing.md +125 -0
  64. package/dist/skills/hor-mutation-resolver/references/transaction.md +197 -0
  65. package/dist/skills/hor-post-worker/SKILL.md +320 -0
  66. package/dist/skills/hor-query-resolver/SKILL.md +246 -0
  67. package/dist/skills/hor-query-resolver/references/anatomy.md +384 -0
  68. package/dist/skills/hor-query-resolver/references/data-access.md +248 -0
  69. package/dist/skills/hor-query-resolver/references/errors-and-context.md +172 -0
  70. package/dist/skills/hor-query-resolver/references/testing.md +241 -0
  71. package/dist/skills/hor-renchan-job-bullmq/SKILL.md +178 -0
  72. package/dist/skills/hor-renchan-job-bullmq/references/daemon-and-scheduler.md +182 -0
  73. package/dist/skills/hor-renchan-job-bullmq/references/engine-and-infra.md +106 -0
  74. package/dist/skills/hor-renchan-job-bullmq/references/job-triple.md +189 -0
  75. package/dist/skills/hor-renchan-job-bullmq/references/queues.md +74 -0
  76. package/dist/skills/hor-renchan-job-bullmq/references/subscriptions.md +113 -0
  77. package/dist/skills/hor-resolver-share/SKILL.md +262 -0
  78. package/dist/skills/hor-resolver-validator/SKILL.md +194 -0
  79. package/dist/skills/hor-resolver-validator/references/inspector-api.md +115 -0
  80. package/dist/skills/hor-resolver-validator/references/validator-pattern.md +281 -0
  81. package/dist/skills/hor-restfulapi-architecture/SKILL.md +275 -0
  82. package/dist/skills/hor-restfulapi-architecture/references/engine-and-context.md +192 -0
  83. package/dist/skills/hor-restfulapi-architecture/references/renderers.md +204 -0
  84. package/dist/skills/hor-restfulapi-architecture/references/response-and-flusher.md +118 -0
  85. package/dist/skills/hor-restfulapi-architecture/references/validation.md +229 -0
  86. package/dist/skills/hor-security-audit/SKILL.md +110 -0
  87. package/dist/skills/hor-security-audit/references/application-surface.md +90 -0
  88. package/dist/skills/hor-security-audit/references/auth-and-transport.md +147 -0
  89. package/dist/skills/hor-security-audit/references/code-safety.md +74 -0
  90. package/dist/skills/hor-security-audit/references/dependencies.md +72 -0
  91. package/dist/skills/hor-security-audit/references/network-and-logging.md +56 -0
  92. package/dist/skills/hor-security-audit/references/secrets.md +95 -0
  93. package/dist/skills/hor-sequelize-migration/SKILL.md +336 -0
  94. package/dist/skills/hor-sequelize-migration/references/alter-table.md +147 -0
  95. package/dist/skills/hor-sequelize-migration/references/foreign-keys.md +107 -0
  96. package/dist/skills/hor-sequelize-migration/references/indexes.md +149 -0
  97. package/dist/skills/hor-sequelize-migration/references/notation.md +215 -0
  98. package/dist/skills/hor-sequelize-model/SKILL.md +69 -0
  99. package/dist/skills/hor-sequelize-model/references/associations.md +218 -0
  100. package/dist/skills/hor-sequelize-model/references/default-methods.md +244 -0
  101. package/dist/skills/hor-sequelize-model/references/mixins.md +247 -0
  102. package/dist/skills/hor-sequelize-model/references/notation.md +225 -0
  103. package/dist/skills/hor-sequelize-model/references/timestamps.md +74 -0
  104. package/dist/skills/hor-sequelize-seeder/SKILL.md +275 -0
  105. package/dist/skills/hor-sequelize-seeder/references/development-coverage.md +74 -0
  106. package/dist/skills/hor-sequelize-seeder/references/directory-structure.md +113 -0
  107. package/dist/skills/hor-sequelize-seeder/references/id-numbering.md +133 -0
  108. package/dist/skills/hor-sequelize-seeder/references/naming.md +59 -0
  109. package/dist/skills/hor-sequelize-seeder/references/notation.md +170 -0
  110. package/dist/skills/hor-sequelize-subquery/SKILL.md +369 -0
  111. package/dist/skills/hor-strategy-pattern/SKILL.md +371 -0
  112. package/dist/skills/hor-stub-api/SKILL.md +330 -0
  113. package/dist/skills/hor-subscription-resolver/SKILL.md +105 -0
  114. package/dist/skills/hor-subscription-resolver/references/authentication.md +99 -0
  115. package/dist/skills/hor-subscription-resolver/references/basic-notation.md +116 -0
  116. package/dist/skills/hor-subscription-resolver/references/design-philosophy.md +68 -0
  117. package/dist/skills/hor-type-interface/SKILL.md +200 -0
  118. package/docs/skills.ja.md +40 -0
  119. package/docs/skills.md +40 -0
  120. package/lib/equip/CommandLineArguments.js +178 -0
  121. package/lib/equip/HoraSkillsCli.js +590 -0
  122. package/lib/equip/SkillsInstaller.js +443 -0
  123. package/lib/equip/SkillsManifestFile.js +260 -0
  124. package/lib/equip/constants/CLI_COMMAND.js +8 -0
  125. package/lib/equip/hora-skills-ort-renchan.js +8 -0
  126. package/package.json +51 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Open Reach Tech Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.ja.md ADDED
@@ -0,0 +1,135 @@
1
+ # @openreachtech/hora-skills-ort-renchan
2
+
3
+ Hora Kit で開発するための renchan バックエンドスキルを配布するパッケージです。
4
+
5
+ ## コンセプト
6
+
7
+ このパッケージが配布するのは **スキルのみ** です。`import` して使うライブラリはなく、同梱する唯一の実行コマンドはそのスキルを配置するためのものです。スキルとは `SKILL.md`(と任意の `references/`・`scripts/`)を収めたディレクトリで、Claude Code が読み込み `/<name>` として呼び出します。導入先のリポジトリにインストールすることで、Open Reach Tech が開発に用いている規約と手順を、そのリポジトリで作業するエージェントに届けます。
8
+
9
+ 配布されるスキルは 31 件、すべて `backend` ドメインのもので、内容は「renchan ベースの Node バックエンド」です。各名前の先頭 3 文字がドメインを表すので、フラットに並んだスキル一覧を見た人が、どれがこのパッケージ由来かを一目で判別できます。ドメインごとに別のパッケージになっており、リポジトリは自分が扱うドメインのものを入れます。
10
+
11
+ | パッケージ | プレフィックス | ドメイン | スキル数 |
12
+ | :-- | :-- | :-- | --: |
13
+ | `@openreachtech/hora-skills-ort-core` | `hoc-` | `core` | 35 |
14
+ | `@openreachtech/hora-skills-ort-renchan`(このパッケージ) | `hor-` | `backend` | 31 |
15
+ | `@openreachtech/hora-skills-ort-furo` | `hof-` | `frontend` | 46 |
16
+
17
+ [**スキルカタログ**](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/docs/skills.ja.md) ([English](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/docs/skills.md)) — このパッケージに収録された全スキルの一覧と概要(1〜2 行)を、呼び出しコマンド名で並べています。
18
+
19
+ ソースは `kit/skills/backend/<name>/` に配置され、`dist/` が公開されるビルド成果物です。同じスキルフォルダからドメインの階層だけを取り除いた形で、これが Claude Code の求めるフラットな構成です。スキルフォルダ名はそのスキルの `name:` であり、インストール後のフォルダ名でもあります。一貫して同じ 1 つの文字列なので、カタログで見た名前がそのまま入力するコマンドになります。
20
+
21
+ ## インストール
22
+
23
+ Node.js 20.0.0 以降が必要です(`package.json` の `engines` が宣言している下限)。CI は現行の LTS でビルドしています。
24
+
25
+ ```sh
26
+ npm install -D @openreachtech/hora-skills-ort-renchan
27
+ ```
28
+
29
+ このパッケージ自身はインストールスクリプトを同梱していません。したがって依存に追加しても、パッケージが入るだけで、何も配置されません。プロジェクト自身の `postinstall` としてコマンドを宣言してください。それだけで、`npm install` がリポジトリにスキルを装備します。
30
+
31
+ ```json
32
+ {
33
+ "scripts": {
34
+ "postinstall": "hora-skills-ort-renchan install"
35
+ }
36
+ }
37
+ ```
38
+
39
+ プロジェクト自身のスクリプトは、npm が v12 以降で差し止める対象の外にあります。したがって、そのプロジェクトをクローンする人に何も要求しません。ここで `npx` は不要です。ライフサイクルスクリプトは `node_modules/.bin` を PATH に入れて実行されるためです。
40
+
41
+ いま宣言したフックが効くのは、次の `npm install` からです。最初の配置は、コマンドを自分で実行してください。一度だけ配置したい場合や、フックを置けないリポジトリでも同じです。
42
+
43
+ ```sh
44
+ npx --no hora-skills-ort-renchan install
45
+ ```
46
+
47
+ **`--no` は、ダウンロードの前で npx を止めます** — 名前の解決はレジストリに問い合わせますが、取得はしないので、他人のパッケージの install スクリプトも bin も走りません。これが無いと、bin が入っていない状態は、このパッケージが持たない無スコープ名 `hora-skills-ort-renchan` で公開されたものの取得になります。
48
+
49
+ パッケージを依存に入れないまま実行する場合 — 一度だけの配置や、フックを置けないリポジトリ — は、名前を省略せずに指定してください。`npx --package=@openreachtech/hora-skills-ort-renchan hora-skills-ort-renchan install` が取得するのは、他人が公開できないスコープ付きの名前です。無スコープの bin 名には、その保証がありませんでした。
50
+
51
+ ## 使い方
52
+
53
+ スキルは自分のリポジトリの `.claude/skills/` に配置されます。Claude Code はそこからスキルを認識し、それぞれが自身の名前で呼び出せるようになります(`/hor-query-resolver`, `/hor-sequelize-model`, `/hor-post-worker` など)。インストールされたスキルは、そのリポジトリ自身のスキルと 1 つのフラットな一覧に並びます。`hor-` のプレフィックスはそのためにあります。
54
+
55
+ ### 複数のドメインを入れる
56
+
57
+ 3 つのパッケージはいずれも同じ `.claude/skills/` に配置し、それぞれが自分の配置内容を `.hora/<パッケージ名>.json` に記録します。したがって、ある実行が削除するのはそのパッケージが配置したものだけで、他の 2 つには手を触れません。
58
+
59
+ ```json
60
+ {
61
+ "scripts": {
62
+ "postinstall": "hora-skills-ort-renchan install && <別の hora-skills パッケージ> install"
63
+ }
64
+ }
65
+ ```
66
+
67
+ プレフィックスは 1 つのパッケージだけが持ち、スキルのフォルダ名はパッケージ内で一意なので、配置されたスキルの名前が衝突することはありません。
68
+
69
+ ### リンクではなくディレクトリ
70
+
71
+ `.claude/` と、その中の `skills/` は、シンボリックリンクではなくリポジトリのディレクトリである必要があります。インストールは対象へ至る各段を検査し、いずれかがリンクであれば、何も書き込まず、何も削除せずに終了します。 インストール内容の記録である `.hora/hora-skills-ort-renchan.json` も同じように検査します。ここにリンクがあると、書き込みがリンク先へ届き、その中身を上書きしてしまうためです。
72
+
73
+ 何も運ばなかったインストールは、その理由を告げ、0 以外の終了コードで終わります。プロジェクト自身の `postinstall` として実行しているなら、それは `npm install` の出力に現れます。単独で実行した場合は `npx --no hora-skills-ort-renchan install` が同じことを告げます。
74
+
75
+ リンクはコマンドを実行する人の指示ではなく、リポジトリの中身です。それを辿ると、スキルをどこへ書くか、そして前回のスキルをどこから消すかを、リポジトリ側が決められることになります。
76
+
77
+ いずれかをリポジトリ間で共有するディレクトリへ向けている場合は、そのディレクトリを直接名指ししてください。`npx --no hora-skills-ort-renchan install --dir <解決先のディレクトリ>` で同じ状態に到達し、リンクがある以上、スキルは `.claude/skills/` から見えます。`--dir` はコマンドを実行する人が名指しするものなので、そのまま受け入れます。
78
+
79
+ ### 配置を最新に保つ
80
+
81
+ 配置されたスキルは、リポジトリのソースではなくこのパッケージのビルド成果物です。git 管理からは外します。
82
+
83
+ ```gitignore
84
+ .claude/skills/hor-*/
85
+ .hora/
86
+ ```
87
+
88
+ 引数なしの `npm install` はプロジェクトの `postinstall` を再実行するので、スキルも追随します。パッケージをコマンドラインで名指しする更新(`npm install @openreachtech/hora-skills-ort-renchan@latest`)では走りません。フックを置いていないリポジトリも同じです。その場合は、同じコマンドを再実行してください。
89
+
90
+ ```sh
91
+ npx --no hora-skills-ort-renchan install
92
+ ```
93
+
94
+ `install` は何度実行しても同じ結果になります。前回インストールしたスキル(`.hora/hora-skills-ort-renchan.json` に記録されています)と、このパッケージが配布するスキルと同名のフォルダを削除してから、今回の出力をコピーします。そのため改名されたスキルや削除されたスキルが残らず、`dist/skills/` を手でコピーしていたリポジトリも初回の実行で整理されます。
95
+
96
+ リポジトリが自分で作ったスキルは、その名前がこのパッケージの配布名と一致しない限り削除されません。`hor-` のプレフィックスを持っているだけで対象になることはなく(`hor-own-skill` は残ります)、配布スキルと完全に同じ名前を付けた場合に限り、その名前はこのパッケージのものとして扱われます。
97
+
98
+ ### コマンド
99
+
100
+ | コマンド | 動作 |
101
+ | :-- | :-- |
102
+ | `hora-skills-ort-renchan install` | このパッケージが配布する全スキルを配置し、前回配置したものを置き換える |
103
+ | `hora-skills-ort-renchan list` | このパッケージが配布するスキルを表示する(配置はしない) |
104
+ | `hora-skills-ort-renchan uninstall` | このパッケージが配置したスキルと、その記録を削除する |
105
+ | `hora-skills-ort-renchan help` | 使い方を表示する |
106
+
107
+ `--dir <path>` で `.claude/skills` 以外のディレクトリに配置できます。
108
+
109
+ ## コントリビューション
110
+
111
+ バグ報告・機能要望・コード貢献を歓迎します。
112
+
113
+ GitHub Issues からお気軽にご連絡ください。
114
+
115
+ ```sh
116
+ git clone https://github.com/openreachtech/hora-skills-ort-renchan.git
117
+ cd hora-skills-ort-renchan
118
+ npm install
119
+ npm run lint
120
+ npm test
121
+ ```
122
+
123
+ ## ライセンス
124
+
125
+ 本プロジェクトは Apache License 2.0 で公開されています。
126
+
127
+ 詳細は [LICENSE ファイル](./LICENSE) を参照してください。
128
+
129
+ ## 開発者
130
+
131
+ [Open Reach Tech Inc.](https://openreach.tech)
132
+
133
+ ## 著作権
134
+
135
+ © 2026 Open Reach Tech Inc.
package/README.md ADDED
@@ -0,0 +1,135 @@
1
+ # @openreachtech/hora-skills-ort-renchan
2
+
3
+ A distribution package of the renchan backend skills for developing with Hora Kit.
4
+
5
+ ## Concept
6
+
7
+ This package ships **skills only** — there is no library to `import`, and the one executable it carries exists to install those skills. A skill is a directory holding a `SKILL.md`, plus optional `references/` and `scripts/`, that Claude Code loads and invokes as `/<name>`. Installing this package into a repository puts the conventions and procedures Open Reach Tech develops with in front of the agent working on that repository.
8
+
9
+ 31 skills are distributed, all of the `backend` domain: renchan-based Node backends. The three-character prefix on every name is the domain, so a reader looking at one flat list of skills can tell at a glance which came from this package. Each domain is a package of its own, and a repository installs the ones it works in:
10
+
11
+ | Package | Prefix | Domain | Skills |
12
+ | :-- | :-- | :-- | --: |
13
+ | `@openreachtech/hora-skills-ort-core` | `hoc-` | `core` | 35 |
14
+ | `@openreachtech/hora-skills-ort-renchan` (this one) | `hor-` | `backend` | 31 |
15
+ | `@openreachtech/hora-skills-ort-furo` | `hof-` | `frontend` | 46 |
16
+
17
+ [**Skill catalog**](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/docs/skills.md) ([日本語](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/docs/skills.ja.md)) — every skill in this package with a one- or two-line summary, listed by the command name it is invoked by.
18
+
19
+ The source is organized at `kit/skills/backend/<name>/`, and `dist/` is the published build output: the same skill folders with the domain level dropped, which is the flat shape Claude Code expects. A skill folder's name is its `name:` and the folder name it installs as — one string throughout, so the name you see in the catalog is the command you type.
20
+
21
+ ## Installation
22
+
23
+ Requires Node.js 20.0.0 or newer, the floor `engines` declares. The CI builds against the current LTS.
24
+
25
+ ```sh
26
+ npm install -D @openreachtech/hora-skills-ort-renchan
27
+ ```
28
+
29
+ This package ships no install script of its own, so adding it as a dependency installs the package and places nothing. Declare the command as your own project's `postinstall`, and `npm install` alone equips the repository:
30
+
31
+ ```json
32
+ {
33
+ "scripts": {
34
+ "postinstall": "hora-skills-ort-renchan install"
35
+ }
36
+ }
37
+ ```
38
+
39
+ A project's own scripts are outside what npm holds back from v12 on, so this asks nothing of whoever clones the repository. `npx` is not needed here either: a lifecycle script runs with `node_modules/.bin` on its PATH.
40
+
41
+ The hook you just declared takes effect from the next `npm install` on, so run the command by hand for the first placement — and for a one-off, or a repository that is not yours to add a hook to:
42
+
43
+ ```sh
44
+ npx --no hora-skills-ort-renchan install
45
+ ```
46
+
47
+ **`--no` stops npx before it downloads**: the name is still resolved against the registry, but nothing is fetched, so neither the install script nor the bin of a stranger's package ever runs. Without it, a bin that is not installed becomes a fetch of whatever has been published under `hora-skills-ort-renchan`, an unscoped name this package does not hold.
48
+
49
+ Where the package is not a dependency at all — a one-off, or a repository that is not yours to add a hook to — name it in full instead: `npx --package=@openreachtech/hora-skills-ort-renchan hora-skills-ort-renchan install`. What is fetched is then a scoped name nobody else can publish under, which is the guarantee the unscoped bin name never carried.
50
+
51
+ ## Usage
52
+
53
+ The skills land in your repository's `.claude/skills/`. Claude Code discovers them from there, and each becomes invocable by its own name — `/hor-query-resolver`, `/hor-sequelize-model`, `/hor-post-worker`. Installed skills sit side by side with your repository's own, in one flat list, which is what the `hor-` prefix is for.
54
+
55
+ ### Installing more than one domain
56
+
57
+ Each of the three packages installs into the same `.claude/skills/`, and each records its own installation in `.hora/<package name>.json`. A run therefore removes only what that package installed, and leaves the other two alone:
58
+
59
+ ```json
60
+ {
61
+ "scripts": {
62
+ "postinstall": "hora-skills-ort-renchan install && <another hora-skills package> install"
63
+ }
64
+ }
65
+ ```
66
+
67
+ Because a prefix belongs to exactly one package, and every skill's folder name is unique within its own package, no two installed skills can end up with the same name.
68
+
69
+ ### Directories, not links
70
+
71
+ `.claude/`, and the `skills/` directory inside it, have to be directories of your repository rather than symbolic links. An installation verifies every step it is reached through, and finding a link at any of them it writes nothing and removes nothing. `.hora/hora-skills-ort-renchan.json`, the record of what was installed, is verified the same way: a link there would send the write to whatever it stands for and overwrite it.
72
+
73
+ An installation that carries nothing says why and ends with a failing exit code. Where the command runs as your project's own `postinstall`, that is what `npm install` reports; run on its own, `npx --no hora-skills-ort-renchan install` tells you the same.
74
+
75
+ A link is content of the repository rather than an instruction of whoever runs the command, so following one would let the repository decide where skills are written and, worse, where the skills of the previous run are removed from.
76
+
77
+ Where either points at a directory shared between repositories, name that directory instead — `npx --no hora-skills-ort-renchan install --dir <the directory it resolves to>` reaches the same state, and the link still makes the skills visible at `.claude/skills/`. A `--dir` is named by whoever runs the command, so it is taken as given.
78
+
79
+ ### Keeping the installation current
80
+
81
+ The installed skills are this package's build output rather than source of your repository, so ignore them:
82
+
83
+ ```gitignore
84
+ .claude/skills/hor-*/
85
+ .hora/
86
+ ```
87
+
88
+ An `npm install` with no arguments re-runs your project's `postinstall`, so the skills follow along. Naming the package on the command line — `npm install @openreachtech/hora-skills-ort-renchan@latest` — does not, and neither does a repository without a hook. Run the command again yourself:
89
+
90
+ ```sh
91
+ npx --no hora-skills-ort-renchan install
92
+ ```
93
+
94
+ `install` is repeatable: it removes what the previous run installed — recorded in `.hora/hora-skills-ort-renchan.json` — along with any folder named after a skill this package distributes, before copying the current output. A renamed or dropped skill therefore leaves nothing behind, and a repository that had copied `dist/skills/` by hand is tidied up on its first run.
95
+
96
+ A skill your own repository authored is left alone, as long as its name is not one this package distributes. Carrying the `hor-` prefix is not enough to put it at risk — `hor-own-skill` is untouched — but naming it exactly after a distributed skill hands that name over to this package.
97
+
98
+ ### Commands
99
+
100
+ | Command | What it does |
101
+ | :-- | :-- |
102
+ | `hora-skills-ort-renchan install` | Install every skill this package distributes, replacing the previously installed ones |
103
+ | `hora-skills-ort-renchan list` | Print the skills this package distributes, installing nothing |
104
+ | `hora-skills-ort-renchan uninstall` | Remove every skill this package installed, along with its record |
105
+ | `hora-skills-ort-renchan help` | Print the usage text |
106
+
107
+ `--dir <path>` installs into a directory other than `.claude/skills`.
108
+
109
+ ## Contribution
110
+
111
+ Bug reports, feature requests, and code contributions are welcome.
112
+
113
+ Feel free to contact us through GitHub Issues.
114
+
115
+ ```sh
116
+ git clone https://github.com/openreachtech/hora-skills-ort-renchan.git
117
+ cd hora-skills-ort-renchan
118
+ npm install
119
+ npm run lint
120
+ npm test
121
+ ```
122
+
123
+ ## License
124
+
125
+ This project is released under the Apache License 2.0.
126
+
127
+ For more details, please see [in the LICENSE file](./LICENSE).
128
+
129
+ ## Developer
130
+
131
+ [Open Reach Tech Inc.](https://openreach.tech)
132
+
133
+ ## Copyright
134
+
135
+ © 2026 Open Reach Tech Inc.
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: hor-agent-loop
3
+ description: >
4
+ Build an LLM agent loop (iterative agent) in a backend repository with the three
5
+ @openreachtech/mentsu-agent-loop packages — core (the transport-agnostic iteration engine),
6
+ renchan-job (run a loop as a BullMQ/Redis job with progress publishing), and graphql (a mutation
7
+ that launches the loop plus a subscription that streams its progress). Use whenever the user
8
+ asks to add or edit an agent loop, an agent action, a composite agent, or to stream agent
9
+ progress.
10
+ ---
11
+
12
+ # Agent Loop (building agent loops with mentsu-agent-loop)
13
+
14
+ A skill for implementing an LLM agent's iteration ("loop") in a backend. The iteration engine,
15
+ progress delivery, composition, job execution, and GraphQL integration are all provided by the
16
+ **three `@openreachtech/mentsu-agent-loop-*` packages**. The app writes only the domain-specific
17
+ **actions and loops**; iteration, stopping, compression, parallelism, and transport ride on the
18
+ ready-made base classes.
19
+
20
+ This skill covers the libraries' specs and use cases, plus the integration patterns for renchan's
21
+ GraphQL and renchan-job-bullmq. **Always use these three packages** (never hand-roll your own
22
+ iteration engine, queue bridge, or progress channel). The details are split into the [detail
23
+ files](#detail-files) at the end.
24
+
25
+ ## Grand principle: write actions and loops without knowing about AI, DB, queues, or GraphQL (one-way dependency)
26
+
27
+ The center of this package family's design is a **one-way dependency direction (outer → core)**.
28
+ The iteration logic the app writes (actions / loops) **imports no business dependency and no
29
+ transport**; everything is reached through the **`context` (an opaque DI seam)** and through **thin
30
+ adapters**.
31
+
32
+ | Layer | Package | Responsibility | Depends on |
33
+ | --- | --- | --- | --- |
34
+ | **core** | `@openreachtech/mentsu-agent-loop-core` | Iteration engine (Action / Loop / composition / Runner / Topic). **Zero dependencies** | imports nothing |
35
+ | **job execution** | `@openreachtech/mentsu-agent-loop-renchan-job` | Run a loop as a renchan-job / BullMQ Redis job and publish progress | → core, renchan-job-bullmq |
36
+ | **GraphQL** | `@openreachtech/mentsu-agent-loop-graphql` | Launch mutation + progress-subscription | → core, renchan |
37
+ | **app** | (this repository) | Actions / loops / wiring | → all of the above |
38
+
39
+ - **Why keep the dependency one-way**: the moment core imports AI/DB/queue/transport, the iteration
40
+ logic is bound to a specific backend and can no longer be tested in-process or switched between
41
+ execution modes. Keeping core dependency-free and receiving dependencies from `context` means **the
42
+ same loop runs in-process or as a job, and tests just swap `context` for a stub**.
43
+ - **Why write only actions and loops**: the iteration body (the tail-recursive `iterate`), the
44
+ progress seam (`emitProgress`), composition (parallel / sequential), the queue bridge, and channel
45
+ naming are all **shared machinery**; writing them per app guarantees drift. Push them into the base
46
+ classes and implement only the abstract hooks.
47
+ - **Why "always these three packages"**: hand-rolling an iteration engine or progress channel
48
+ reintroduces known failures — publish/subscribe channel mismatch, no retry, untestable code. The
49
+ packages prevent these by design (e.g. `AgentTopic` structurally matches the publish and subscribe
50
+ channels).
51
+ - **Everything is an instance method, overridable via `extends`**. No pure functions or static-only
52
+ classes. Why: even if the library has a bug or a gap, the app can always work around it by extending
53
+ and overriding the relevant method (there is no true `final`). Write the app's overrides in the same
54
+ style.
55
+
56
+ ## Cross-cutting rules
57
+
58
+ - **Business dependencies and transport are always received through `context`.** Do not directly
59
+ import AI clients, DB, HTTP, or queues inside an action or loop ([core.md](./references/core.md)).
60
+ Why: a direct import breaks in-process execution and stub injection, collapsing the one-way
61
+ dependency of the grand principle.
62
+ - **Return `null` / an empty array for missing values, not `undefined`.** **One property per line in
63
+ object literals** (applies to sample code too). **Avoid single-character variables and
64
+ `for` / `forEach` / `switch` / `else if`**; write with `map` / `filter` / `reduce` and early return.
65
+ Why: match the existing codebase style so review attention goes to the logic.
66
+ - **One class per file, one `export default`.** The constructor only assigns; defaults live in the
67
+ factory (`static create`); getters just return the field.
68
+ - **Comments in produced artifacts (`.js`) are English**, and this skill is written entirely in
69
+ English (prose, tables, and example-code comments).
70
+
71
+ ## Choosing modules (what to install)
72
+
73
+ Stack adapters onto core per the requirement. **Core is always required**; add an adapter only when
74
+ that integration is needed.
75
+
76
+ | What you want | Packages needed |
77
+ | --- | --- |
78
+ | Run a loop in-process (CLI / tests / synchronous work / Lambda) | core only |
79
+ | Turn a long loop into a Redis job (horizontal scale, retry, rate limiting) | core + renchan-job |
80
+ | Launch over GraphQL and subscribe to progress in realtime | core + renchan-job + graphql |
81
+
82
+ - **Why stack incrementally**: actions and loops written with core alone can be turned into a job or a
83
+ GraphQL endpoint **without any change** (the adapter swaps only the transport step). Do not install
84
+ everything up front; layer on only what you need.
85
+
86
+ ## End-to-end progress (the backbone of the realtime log)
87
+
88
+ "Launch with a mutation → return `accepted` immediately → stream progress over a subscription" is the
89
+ typical shape for an agent on the web. Progress follows this single path. Because the publish side
90
+ (the Worker) and the subscribe side (the Subscription) use the **same `AgentTopic`**, the channel
91
+ names match structurally.
92
+
93
+ ```
94
+ [core] loop.run({ input, onProgress })
95
+ └ iterate emits emitProgress → onProgress(event) each iteration
96
+ [renchan-job] BaseAgentJobWorker: onProgress → job.updateProgress(event)
97
+ → onJobProgress → publish to the channel AgentTopic.create({ channel, scope }).value
98
+ [graphql] BaseAgentProgressSubscriptionResolver: subscribes to the same channel + scope
99
+ [frontend] receives it in realtime over a GraphQL Subscription
100
+ ```
101
+
102
+ - **Why use `AgentTopic` on both sides**: if the publish and subscribe channel names drift apart, you
103
+ get a silent "progress never arrives" failure. Concentrating the naming in one core class, with both
104
+ sides composing from the same `channel` + `scope`, makes drift impossible by design. To change the
105
+ naming rule, extend `AgentTopic` and override `get value()` in one place.
106
+
107
+ ## Detail files
108
+
109
+ - [core.md](./references/core.md) — the core (`@openreachtech/mentsu-agent-loop-core`) spec and use
110
+ cases: actions / registry, the two loop types (AI-driven / procedural), composition (parallel
111
+ Composite / sequential Pipeline / ActionStage), Runners, `AgentTopic` / `AgentProgressEvent`, the
112
+ state model (state / context / compression).
113
+ - [graphql-integration.md](./references/graphql-integration.md) — the pattern for integrating with
114
+ renchan's GraphQL: the launch mutation (`BaseRequestAgentMutationResolver`) and the progress
115
+ subscription (`BaseAgentProgressSubscriptionResolver`), channel matching via `AgentTopic`.
116
+ - [renchan-job-integration.md](./references/renchan-job-integration.md) — the pattern for integrating
117
+ with renchan-job-bullmq: the Worker (`BaseAgentJobWorker`) / Dispatcher (`BaseAgentJobDispatcher`) /
118
+ `JobAgentRunner`, Engine / Share / Context wiring, `concurrency` / `limiter`, and the full
119
+ progress-publish flow.
120
+ - [testing.md](./references/testing.md) — testing guidelines: the contract test kit
121
+ (`LoopContractAssertion` / `ActionContractAssertion`) and the unit-test approach for actions / loops
122
+ / composition / Worker / Dispatcher / Resolver (stub `context`, assert `onProgress`, assert abstract
123
+ throws).