@openreachtech/hora-skills-ort-renchan 0.0.0 → 0.1.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.
- package/README.ja.md +6 -3
- package/README.md +6 -3
- package/dist/skills/hor-bank-id/SKILL.md +4 -4
- package/docs/skills.ja.md +90 -26
- package/docs/skills.md +90 -26
- package/package.json +8 -1
package/README.ja.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @openreachtech/hora-skills-ort-renchan
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
*[English](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/README.md)*
|
|
4
|
+
|
|
5
|
+
renchan バックエンドスキルを配布するパッケージです。単体でどのリポジトリにも導入でき、Hora Kit ではそのスキルライブラリの 1 つとして装備されます。
|
|
4
6
|
|
|
5
7
|
## コンセプト
|
|
6
8
|
|
|
@@ -10,9 +12,10 @@ Hora Kit で開発するための renchan バックエンドスキルを配布
|
|
|
10
12
|
|
|
11
13
|
| パッケージ | プレフィックス | ドメイン | スキル数 |
|
|
12
14
|
| :-- | :-- | :-- | --: |
|
|
13
|
-
| `@openreachtech/hora-skills-ort-core` | `hoc-` | `core` |
|
|
15
|
+
| `@openreachtech/hora-skills-ort-core` | `hoc-` | `core` | 39 |
|
|
14
16
|
| `@openreachtech/hora-skills-ort-renchan`(このパッケージ) | `hor-` | `backend` | 31 |
|
|
15
17
|
| `@openreachtech/hora-skills-ort-furo` | `hof-` | `frontend` | 46 |
|
|
18
|
+
| `@openreachtech/hora-skills-ort-support` | `hos-` | `support` | 3 |
|
|
16
19
|
|
|
17
20
|
[**スキルカタログ**](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
21
|
|
|
@@ -54,7 +57,7 @@ npx --no hora-skills-ort-renchan install
|
|
|
54
57
|
|
|
55
58
|
### 複数のドメインを入れる
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
4 つのパッケージはいずれも同じ `.claude/skills/` に配置し、それぞれが自分の配置内容を `.hora/<パッケージ名>.json` に記録します。したがって、ある実行が削除するのはそのパッケージが配置したものだけで、他には手を触れません。
|
|
58
61
|
|
|
59
62
|
```json
|
|
60
63
|
{
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @openreachtech/hora-skills-ort-renchan
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
*[日本語](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/README.ja.md)*
|
|
4
|
+
|
|
5
|
+
A distribution package of the renchan backend skills — installed into any repository on its own, and equipped by Hora Kit as one of its skill libraries.
|
|
4
6
|
|
|
5
7
|
## Concept
|
|
6
8
|
|
|
@@ -10,9 +12,10 @@ This package ships **skills only** — there is no library to `import`, and the
|
|
|
10
12
|
|
|
11
13
|
| Package | Prefix | Domain | Skills |
|
|
12
14
|
| :-- | :-- | :-- | --: |
|
|
13
|
-
| `@openreachtech/hora-skills-ort-core` | `hoc-` | `core` |
|
|
15
|
+
| `@openreachtech/hora-skills-ort-core` | `hoc-` | `core` | 39 |
|
|
14
16
|
| `@openreachtech/hora-skills-ort-renchan` (this one) | `hor-` | `backend` | 31 |
|
|
15
17
|
| `@openreachtech/hora-skills-ort-furo` | `hof-` | `frontend` | 46 |
|
|
18
|
+
| `@openreachtech/hora-skills-ort-support` | `hos-` | `support` | 3 |
|
|
16
19
|
|
|
17
20
|
[**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
21
|
|
|
@@ -54,7 +57,7 @@ The skills land in your repository's `.claude/skills/`. Claude Code discovers th
|
|
|
54
57
|
|
|
55
58
|
### Installing more than one domain
|
|
56
59
|
|
|
57
|
-
Each of the
|
|
60
|
+
Each of the four 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 others alone:
|
|
58
61
|
|
|
59
62
|
```json
|
|
60
63
|
{
|
|
@@ -9,7 +9,7 @@ Hand this skill a **requester id** and it returns an **id prefix** you may use,
|
|
|
9
9
|
|
|
10
10
|
## Why
|
|
11
11
|
|
|
12
|
-
Several writers touch the same backend repository over time:
|
|
12
|
+
Several writers touch the same backend repository over time: a human team may split work by hand, and an agent building one feature after another writes into the same tables. When two of them pick the same explicit row `id`, whichever runs its seeder last silently overwrites or collides with the other's data. `hor-bank-id` gives each requester its own slice of the id space, once.
|
|
13
13
|
|
|
14
14
|
**Being serial does not remove the need.** A seeder written for feature A is still in the tree when feature B writes its own, and both are loaded together on the next database refresh. What has to be exclusive is the id space across time, not across concurrent processes.
|
|
15
15
|
|
|
@@ -34,8 +34,8 @@ Every explicit id is an 8-digit integer, split into two parts.
|
|
|
34
34
|
|
|
35
35
|
Whatever uniquely names the caller, chosen by the caller:
|
|
36
36
|
|
|
37
|
-
- **`/hora-build`'s own main session** passes the feature's `id`, once per feature, and hands the prefix it gets back to every agent working in that repository. **The agents themselves never call this skill** — several units of one checkpoint run at once, and each asking for itself would queue them behind one another's `mkdir` for no gain
|
|
38
37
|
- a human working by hand picks their own name (`alice`), or a per-feature name for more than one slice
|
|
38
|
+
- **an orchestrator driving one feature at a time** passes the feature's `id`, once per feature, and hands the prefix it gets back to every agent working in that repository. **The agents themselves never call this skill** — several units of one feature run at once, and each asking for itself would queue them behind one another's `mkdir` for no gain. In Hora Kit that orchestrator is `/hora-build`'s own main session
|
|
39
39
|
|
|
40
40
|
The same requester id always gets back the same prefix. Asking twice, or retrying after a crash, is always safe.
|
|
41
41
|
|
|
@@ -73,7 +73,7 @@ Both live directly under the backend repository's own root — never under the o
|
|
|
73
73
|
|
|
74
74
|
Reaching the retry limit means another writer is either still working or died mid-update. From outside these look identical, so **never remove the lock yourself to force through.** Report the failure instead:
|
|
75
75
|
|
|
76
|
-
-
|
|
76
|
+
- **An orchestrator stops the whole session** and states plainly: "the lock `hor-bank-id` uses did not clear, so this session is ending. Starting it again will clear it automatically and continue" (see "Clearing a stale lock"). This should be rare — the lock is taken once per feature, by the main session, for the few seconds one allocation takes. In Hora Kit the command to start again is `/hora`
|
|
77
77
|
- **A human running this by hand** may wait and retry, or run the clearing step below themselves
|
|
78
78
|
|
|
79
79
|
## Clearing a stale lock
|
|
@@ -84,7 +84,7 @@ A lock still standing at the very start of a fresh run cannot belong to anything
|
|
|
84
84
|
rm -rf <backend-repo>/.hora/id-bank.lock
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
An orchestrator runs this, unconditionally, as its very first action against the backend row on any invocation; in Hora Kit that is `/hora-build`. A human recovering from the failure above runs the same command by hand.
|
|
88
88
|
|
|
89
89
|
## Using the prefix once you have it
|
|
90
90
|
|
package/docs/skills.ja.md
CHANGED
|
@@ -1,40 +1,104 @@
|
|
|
1
1
|
# スキル
|
|
2
2
|
|
|
3
|
+
*[English](./skills.md)*
|
|
4
|
+
|
|
3
5
|
このパッケージに収録された全 31 スキルのカタログです。各スキルに 1〜2 行の概要を添えています。
|
|
4
6
|
|
|
5
|
-
各スキルは `kit/skills/backend/<name>/` に、ドメインディレクトリの直下 1 階層で置かれます。そのフォルダ名がスキルの `name:` であり、インストール後のフォルダ名でもあります。したがって下表の **スキル** だけで足ります。`/name` として呼び出す名前、インストール後に `.claude/skills/` に現れる名前、ソースの置き場所が、すべて同じ 1 つの文字列です。先頭 3 文字はドメインを表します。配置と命名の規則は [flatten ビルド規約](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/.claude/skills/flatten/SKILL.md) を参照してください。各スキルの詳細は、それぞれの `SKILL.md` にあります。
|
|
7
|
+
各スキルは `kit/skills/backend/<name>/` に、ドメインディレクトリの直下 1 階層で置かれます。そのフォルダ名がスキルの `name:` であり、インストール後のフォルダ名でもあります。したがって下表の **スキル** だけで足ります。`/name` として呼び出す名前、インストール後に `.claude/skills/` に現れる名前、ソースの置き場所が、すべて同じ 1 つの文字列です。先頭 3 文字はドメインを表します。配置と命名の規則は [flatten ビルド規約](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/.claude/skills/flatten/SKILL.md) を参照してください。各スキルの詳細は、それぞれの `SKILL.md` にあります。 以下は領域ごとにまとめています。領域はこのカタログの見出しであり、スキル名の一部ではありません。
|
|
8
|
+
|
|
9
|
+
### データベース
|
|
6
10
|
|
|
7
|
-
| スキル
|
|
11
|
+
| スキル | 概要 |
|
|
8
12
|
| :-- | :-- |
|
|
9
|
-
| `hor-agent-loop` | `@openreachtech/mentsu-agent-loop` の 3 パッケージで LLM エージェントループを構築します。core(反復エンジン)、BullMQ ジョブ実行、GraphQL の起動 mutation と進捗 subscription。 |
|
|
10
|
-
| `hor-ai-agent-structure` | `mentsu-agent-loop-core` 上にアプリ側 AI エージェントを構成します。`app/agents/<name>/` に `ProceduralAgentLoop` サブクラスとステップごとの `BaseAgentAction` サブクラスを置きます。 |
|
|
11
|
-
| `hor-ai-prompt-document-store` | エージェントの設定・指示文・ドキュメント・ツールスキーマをコードに埋め込まず DB に保持し、リクエスト時にプロンプトへ組み立て、バックアップテーブルでバージョン管理します。 |
|
|
12
|
-
| `hor-backend-testing` | テストファイルの配置(DB 書き込みなしは `tests/__tests__`、ありは `tests/_orders`)、DB 書き込みテストの実行順の保証、実行方法、テストとダブルの純粋性ルール。 |
|
|
13
|
-
| `hor-bank-id` | 1 つのバックエンドリポジトリ内で、依頼者ごとに排他的で衝突しない行 id プレフィックスを割り当てる。シーダーやテストフィクスチャで 2 人の書き手が同じ明示 id を選ばないようにする。 |
|
|
14
|
-
| `hor-build-e2e-test-environment` | `e2e/docker/` 配下の手動操作用ローカル E2E 環境の構築・実行・デバッグ。コンテナ構成、本番にリバースプロキシがある場合はその層、専用シードセット、`up`/`start`/`seed`/`clean`/`down` スクリプト。 |
|
|
15
|
-
| `hor-constant-definition` | アプリ定数は必ず 2 ファイルで定義します。`constants/` の CommonJS マスター(単一の情報源)と、それを再 export する `app/constants/` の ESM ブリッジ。 |
|
|
16
|
-
| `hor-cookie-authentication` | renchan バックエンドのアクター別 Cookie 認証。認証情報とトークンのモデル、アクセストークンとローテーションするリフレッシュトークン(再利用検知つき)、HttpOnly のリフレッシュ Cookie、signIn / signUp / signOut / renewAccessToken の各リゾルバー。 |
|
|
17
13
|
| `hor-database-design` | マイグレーションやモデルを書く前に決めるスキーマの論理設計。正規化の判断、ステータス/カテゴリの表現、カラム型、時刻の保持、読み取りのスケール、履歴とバージョン管理。 |
|
|
18
|
-
| `hor-execution-placement-pattern` | 処理(特に書き込み)をどこに実装するかの判断。同期的な GraphQL/REST 操作か、API ハンドラ・post-worker・スケジュールから起動するバックグラウンドワーカーか。 |
|
|
19
|
-
| `hor-external-api-client` | `@openreachtech/mentsu-rocket-client` で外部 HTTP/REST API クライアントを実装します。`app/<serviceName>Client/` 配下の Launcher / Payload / Capsule の 3 クラス構成。 |
|
|
20
|
-
| `hor-graphql-schema` | renchan サーバの GraphQL SDL(`.graphql`)を書きます。オーディエンス別スキーマ、ドメイン別の番号付きファイル、カスタムスカラー、命名・null 許容・enum・ページネーションの規約。 |
|
|
21
|
-
| `hor-graphql-server-engine` | エンドポイントごとの `*GraphqlServerEngine` を実装・起動します。URL、スキーマパス、リゾルバディレクトリ、Share/Context の DI、認証フィルタ、ミドルウェア、スカラー、エラーコード。 |
|
|
22
|
-
| `hor-light-rag` | ベクタ DB なしで AI エージェント向けの軽量 RAG を追加します。ローカル埋め込みによる vector-first / LLM フォールバックのランキングと、MySQL の n-gram 全文検索インデックス。 |
|
|
23
|
-
| `hor-multi-llm-provider` | Claude / OpenAI / Gemini を 1 つの抽象の下で扱います。抽象モデルプロセッサ、ベンダーごとの基底、モデルごとの具象クラス、モデル名で選択するローダー。 |
|
|
24
|
-
| `hor-mutation-resolver` | `BaseMutationResolver` を継承した GraphQL Mutation リゾルバを実装します。状態を変更する操作と、それが動く単一トランザクション。 |
|
|
25
|
-
| `hor-post-worker` | post-worker を実装します。リゾルバが解決してレスポンス送信後に発火し、API の本処理に含めない副作用(通知メール、監査ログ、キャッシュ無効化)を実行するフックです。 |
|
|
26
|
-
| `hor-query-resolver` | `BaseQueryResolver` を継承した GraphQL Query リゾルバを書きます。ページネーション、関連の include、ドメインエラーの throw、actual と stub のペア。 |
|
|
27
|
-
| `hor-renchan-job-bullmq` | `@openreachtech/renchan-job-bullmq` でバックグラウンドジョブを実装・配線します。Manifest / Worker / Dispatcher の 3 点セット、繰り返しジョブ、enqueue、進捗配信、並列数とリトライ。 |
|
|
28
|
-
| `hor-resolver-share` | Share クラスを実装します。サーバ起動時に一度作られ `context.share` として全リゾルバに渡されるプロセス単位のシングルトン置き場で、Share と Context の使い分けも扱います。 |
|
|
29
|
-
| `hor-resolver-validator` | リゾルバの入力検証クラス(`*InputValidator`)を実装します。`BaseInputValidator` を継承し、値の検査は `mentsu-value-inspector` に委譲します。 |
|
|
30
|
-
| `hor-restfulapi-architecture` | renchan バックエンドの REST 層。`server/restfulapi/` 配下のレンダラーアーキテクチャ、ルートとバージョン、`render()`、レスポンス/エラーハッシュ、認証フィルタ、フラッシャー。 |
|
|
31
|
-
| `hor-security-audit` | Node プロジェクト全体を読み取り専用でセキュリティ監査し、所見リストを出します。インジェクション、認証漏れ、ポート/データストア露出、シークレット、依存、CORS、レート制限、PII、アップロード。 |
|
|
32
14
|
| `hor-sequelize-migration` | renchan/Sequelize のマイグレーションを書きます。`createTable`、`addColumn`/`removeColumn`、`addIndex`、インデックス命名、外部キーカラムを持たせるかの判断。 |
|
|
33
15
|
| `hor-sequelize-model` | renchan/Sequelize のモデル定義を書きます。属性、`createOptions`、アソシエーション、スコープ、フック、`MixinModel` の配線。 |
|
|
34
16
|
| `hor-sequelize-seeder` | renchan/Sequelize のシーダーを書きます。master / dev-master / development の 3 ディレクトリ分割、ファイル雛形、ファイル名の採番、ファイルごとの ID ブロック採番。 |
|
|
35
17
|
| `hor-sequelize-subquery` | `this.addSubquery` で名前付きサブクエリを定義し、`Model.subquery(name, params)` で使います。関連テーブルの条件による絞り込みは JOIN ではなくサブクエリで行います。 |
|
|
36
|
-
| `hor-
|
|
37
|
-
|
|
18
|
+
| `hor-bank-id` | 1 つのバックエンドリポジトリ内で、依頼者ごとに排他的で衝突しない行 id プレフィックスを割り当てる。シーダーやテストフィクスチャで 2 人の書き手が同じ明示 id を選ばないようにする。 |
|
|
19
|
+
|
|
20
|
+
### GraphQL
|
|
21
|
+
|
|
22
|
+
| スキル | 概要 |
|
|
23
|
+
| :-- | :-- |
|
|
24
|
+
| `hor-graphql-schema` | renchan サーバの GraphQL SDL(`.graphql`)を書きます。オーディエンス別スキーマ、ドメイン別の番号付きファイル、カスタムスカラー、命名・null 許容・enum・ページネーションの規約。 |
|
|
25
|
+
| `hor-graphql-server-engine` | エンドポイントごとの `*GraphqlServerEngine` を実装・起動します。URL、スキーマパス、リゾルバディレクトリ、Share/Context の DI、認証フィルタ、ミドルウェア、スカラー、エラーコード。 |
|
|
26
|
+
| `hor-query-resolver` | `BaseQueryResolver` を継承した GraphQL Query リゾルバを書きます。ページネーション、関連の include、ドメインエラーの throw、actual と stub のペア。 |
|
|
27
|
+
| `hor-mutation-resolver` | `BaseMutationResolver` を継承した GraphQL Mutation リゾルバを実装します。状態を変更する操作と、それが動く単一トランザクション。 |
|
|
38
28
|
| `hor-subscription-resolver` | GraphQL subscription リゾルバを実装します。操作の宣言、購読者ごとのチャンネルのスコープ、購読可否のゲート、イベントを push する publish 側の配線。 |
|
|
29
|
+
| `hor-resolver-validator` | リゾルバの入力検証クラス(`*InputValidator`)を実装します。`BaseInputValidator` を継承し、値の検査は `mentsu-value-inspector` に委譲します。 |
|
|
30
|
+
| `hor-resolver-share` | Share クラスを実装します。サーバ起動時に一度作られ `context.share` として全リゾルバに渡されるプロセス単位のシングルトン置き場で、Share と Context の使い分けも扱います。 |
|
|
31
|
+
| `hor-stub-api` | DB アクセスもビジネスロジックも持たず、スキーマどおりの固定データを返す stub リゾルバを実装します。実装前の API 契約に対してフロントエンドが開発できます。 |
|
|
32
|
+
|
|
33
|
+
### REST
|
|
34
|
+
|
|
35
|
+
| スキル | 概要 |
|
|
36
|
+
| :-- | :-- |
|
|
37
|
+
| `hor-restfulapi-architecture` | renchan バックエンドの REST 層。`server/restfulapi/` 配下のレンダラーアーキテクチャ、ルートとバージョン、`render()`、レスポンス/エラーハッシュ、認証フィルタ、フラッシャー。 |
|
|
38
|
+
|
|
39
|
+
### 認証
|
|
40
|
+
|
|
41
|
+
| スキル | 概要 |
|
|
42
|
+
| :-- | :-- |
|
|
43
|
+
| `hor-cookie-authentication` | renchan バックエンドのアクター別 Cookie 認証。認証情報とトークンのモデル、アクセストークンとローテーションするリフレッシュトークン(再利用検知つき)、HttpOnly のリフレッシュ Cookie、signIn / signUp / signOut / renewAccessToken の各リゾルバー。 |
|
|
44
|
+
|
|
45
|
+
### 実行場所
|
|
46
|
+
|
|
47
|
+
| スキル | 概要 |
|
|
48
|
+
| :-- | :-- |
|
|
49
|
+
| `hor-execution-placement-pattern` | 処理(特に書き込み)をどこに実装するかの判断。同期的な GraphQL/REST 操作か、API ハンドラ・post-worker・スケジュールから起動するバックグラウンドワーカーか。 |
|
|
50
|
+
| `hor-post-worker` | post-worker を実装します。リゾルバが解決してレスポンス送信後に発火し、API の本処理に含めない副作用(通知メール、監査ログ、キャッシュ無効化)を実行するフックです。 |
|
|
51
|
+
| `hor-renchan-job-bullmq` | `@openreachtech/renchan-job-bullmq` でバックグラウンドジョブを実装・配線します。Manifest / Worker / Dispatcher の 3 点セット、繰り返しジョブ、enqueue、進捗配信、並列数とリトライ。 |
|
|
52
|
+
|
|
53
|
+
### AI 機能
|
|
54
|
+
|
|
55
|
+
| スキル | 概要 |
|
|
56
|
+
| :-- | :-- |
|
|
57
|
+
| `hor-ai-agent-structure` | `mentsu-agent-loop-core` 上にアプリ側 AI エージェントを構成します。`app/agents/<name>/` に `ProceduralAgentLoop` サブクラスとステップごとの `BaseAgentAction` サブクラスを置きます。 |
|
|
58
|
+
| `hor-agent-loop` | `@openreachtech/mentsu-agent-loop` の 3 パッケージで LLM エージェントループを構築します。core(反復エンジン)、BullMQ ジョブ実行、GraphQL の起動 mutation と進捗 subscription。 |
|
|
59
|
+
| `hor-multi-llm-provider` | Claude / OpenAI / Gemini を 1 つの抽象の下で扱います。抽象モデルプロセッサ、ベンダーごとの基底、モデルごとの具象クラス、モデル名で選択するローダー。 |
|
|
60
|
+
| `hor-light-rag` | ベクタ DB なしで AI エージェント向けの軽量 RAG を追加します。ローカル埋め込みによる vector-first / LLM フォールバックのランキングと、MySQL の n-gram 全文検索インデックス。 |
|
|
61
|
+
| `hor-ai-prompt-document-store` | エージェントの設定・指示文・ドキュメント・ツールスキーマをコードに埋め込まず DB に保持し、リクエスト時にプロンプトへ組み立て、バックアップテーブルでバージョン管理します。 |
|
|
62
|
+
|
|
63
|
+
### 外部連携
|
|
64
|
+
|
|
65
|
+
| スキル | 概要 |
|
|
66
|
+
| :-- | :-- |
|
|
67
|
+
| `hor-external-api-client` | `@openreachtech/mentsu-rocket-client` で外部 HTTP/REST API クライアントを実装します。`app/<serviceName>Client/` 配下の Launcher / Payload / Capsule の 3 クラス構成。 |
|
|
68
|
+
|
|
69
|
+
### 型と定数
|
|
70
|
+
|
|
71
|
+
| スキル | 概要 |
|
|
72
|
+
| :-- | :-- |
|
|
39
73
|
| `hor-type-interface` | `.d.ts` で型インターフェースを定義します。`types/models/` のモデルインターフェース(global `model`)と、`types/resolvers/<category>/` のリゾルバ Input/Result 型。 |
|
|
74
|
+
| `hor-constant-definition` | アプリ定数は必ず 2 ファイルで定義します。`constants/` の CommonJS マスター(単一の情報源)と、それを再 export する `app/constants/` の ESM ブリッジ。 |
|
|
75
|
+
|
|
76
|
+
### 設計パターン
|
|
77
|
+
|
|
78
|
+
| スキル | 概要 |
|
|
79
|
+
| :-- | :-- |
|
|
80
|
+
| `hor-strategy-pattern` | 型文字列で分岐する else-if / switch を、基底プロセッサ・バリアントごとのサブクラス・ディレクトリから自動発見して選ぶ一括ローダーの 3 点構成に置き換えます。 |
|
|
81
|
+
|
|
82
|
+
### セキュリティ
|
|
83
|
+
|
|
84
|
+
| スキル | 概要 |
|
|
85
|
+
| :-- | :-- |
|
|
86
|
+
| `hor-security-audit` | Node プロジェクト全体を読み取り専用でセキュリティ監査し、所見リストを出します。インジェクション、認証漏れ、ポート/データストア露出、シークレット、依存、CORS、レート制限、PII、アップロード。 |
|
|
87
|
+
|
|
88
|
+
### テスト
|
|
89
|
+
|
|
90
|
+
| スキル | 概要 |
|
|
91
|
+
| :-- | :-- |
|
|
92
|
+
| `hor-backend-testing` | テストファイルの配置(DB 書き込みなしは `tests/__tests__`、ありは `tests/_orders`)、DB 書き込みテストの実行順の保証、実行方法、テストとダブルの純粋性ルール。 |
|
|
93
|
+
| `hor-build-e2e-test-environment` | `e2e/docker/` 配下の手動操作用ローカル E2E 環境の構築・実行・デバッグ。コンテナ構成、本番にリバースプロキシがある場合はその層、専用シードセット、`up`/`start`/`seed`/`clean`/`down` スクリプト。 |
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 導入
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
npm install -D @openreachtech/hora-skills-ort-renchan
|
|
100
|
+
npx --no hora-skills-ort-renchan install
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`postinstall` フックの宣言、複数ドメインを同じ `.claude/skills/` に入れる方法、配置を最新に保つ方法は [README](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/README.ja.md) にあります。
|
|
40
104
|
|
package/docs/skills.md
CHANGED
|
@@ -1,40 +1,104 @@
|
|
|
1
1
|
# Skills
|
|
2
2
|
|
|
3
|
+
*[日本語](./skills.ja.md)*
|
|
4
|
+
|
|
3
5
|
A catalog of every skill in this package — 31 in total — with a one- or two-line summary each.
|
|
4
6
|
|
|
5
|
-
Each skill lives at `kit/skills/backend/<name>/`, one level under the domain directory, and that folder name is both the skill's `name:` and the folder name it is installed under. **Skill** below is therefore all you need: it is what you invoke as `/name`, what appears under `.claude/skills/` once installed, and where the source sits. The three-character prefix is the domain — see [the flatten build convention](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/.claude/skills/flatten/SKILL.md) for the layout and the naming rules. Full guidance for any skill is in its own `SKILL.md`.
|
|
7
|
+
Each skill lives at `kit/skills/backend/<name>/`, one level under the domain directory, and that folder name is both the skill's `name:` and the folder name it is installed under. **Skill** below is therefore all you need: it is what you invoke as `/name`, what appears under `.claude/skills/` once installed, and where the source sits. The three-character prefix is the domain — see [the flatten build convention](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/.claude/skills/flatten/SKILL.md) for the layout and the naming rules. Full guidance for any skill is in its own `SKILL.md`. Grouped by area below; an area is a heading of this catalog, never part of a skill's name.
|
|
8
|
+
|
|
9
|
+
### Database
|
|
6
10
|
|
|
7
|
-
| Skill
|
|
11
|
+
| Skill | Summary |
|
|
8
12
|
| :-- | :-- |
|
|
9
|
-
| `hor-agent-loop` | Build an LLM agent loop with the three `@openreachtech/mentsu-agent-loop` packages — the core iteration engine, a BullMQ job runner, and a GraphQL mutation plus progress subscription. |
|
|
10
|
-
| `hor-ai-agent-structure` | Structure an app-side AI agent on `mentsu-agent-loop-core`: a `ProceduralAgentLoop` subclass plus per-step `BaseAgentAction` subclasses under `app/agents/<name>/`. |
|
|
11
|
-
| `hor-ai-prompt-document-store` | Hold agent config, instructions, documents and tool schemas in the database rather than in code, assembling the runtime prompt at request time and versioning through backup tables. |
|
|
12
|
-
| `hor-backend-testing` | Where a test file goes (`tests/__tests__` vs `tests/_orders`), how run order among DB-writing tests is guaranteed, how to run the suite, and the purity rules for tests and doubles. |
|
|
13
|
-
| `hor-bank-id` | Allocate an exclusive, collision-free row-id prefix for a requester inside one backend repository, so two writers never pick the same explicit id in seeders and test fixtures. |
|
|
14
|
-
| `hor-build-e2e-test-environment` | Build, run and debug the hand-operated local E2E stack under `e2e/docker/` — its containers, the reverse-proxy edge where production has one, its seed set, and the `up`/`start`/`seed`/`clean`/`down` scripts. |
|
|
15
|
-
| `hor-constant-definition` | Define an application constant as two files: a CommonJS master under `constants/` (the source of truth) plus an ESM bridge under `app/constants/` that re-exports it. |
|
|
16
|
-
| `hor-cookie-authentication` | Cookie-based authentication for a renchan backend, per actor — the credential and token models, access plus rotating refresh tokens with reuse detection, the HttpOnly refresh cookie, and the signIn / signUp / signOut / renewAccessToken resolvers. |
|
|
17
13
|
| `hor-database-design` | The logical schema decisions made before writing a migration or model — normalization, status/category representation, column types, time storage, read scaling, versioning, history. |
|
|
18
|
-
| `hor-execution-placement-pattern` | Decide where processing belongs: a synchronous GraphQL/REST operation, or a background worker triggered from a handler, from a post-worker, or on a schedule. |
|
|
19
|
-
| `hor-external-api-client` | Implement an external HTTP/REST API client with `@openreachtech/mentsu-rocket-client` — the Launcher / Payload / Capsule trio under `app/<serviceName>Client/`. |
|
|
20
|
-
| `hor-graphql-schema` | Author GraphQL SDL files for a renchan server — per-audience schemas, numbered per-domain files, custom scalars, and naming, nullability, enum and pagination conventions. |
|
|
21
|
-
| `hor-graphql-server-engine` | Implement a per-endpoint `*GraphqlServerEngine`: its URL, schema path, resolver directories, Share/Context DI, auth filter, middleware, scalars and error codes. |
|
|
22
|
-
| `hor-light-rag` | Add lightweight RAG for agent documents without a vector database — a vector-first / LLM-fallback ranker over stored `Document` rows, plus a MySQL n-gram fulltext keyword index. |
|
|
23
|
-
| `hor-multi-llm-provider` | Support Claude / OpenAI / Gemini behind one abstraction — an abstract model processor, a base per vendor, a concrete class per model, and a loader that picks one by model name. |
|
|
24
|
-
| `hor-mutation-resolver` | Implement GraphQL Mutation resolvers extending `BaseMutationResolver` — state-changing operations and the single transaction each runs in. |
|
|
25
|
-
| `hor-post-worker` | Implement a post-worker: a hook firing after a resolver has resolved and the response has been sent, for side effects outside the API's main processing. |
|
|
26
|
-
| `hor-query-resolver` | Write GraphQL Query resolvers extending `BaseQueryResolver` — pagination, association includes, domain-error throwing, and the actual-vs-stub pair. |
|
|
27
|
-
| `hor-renchan-job-bullmq` | Write and wire background jobs with `@openreachtech/renchan-job-bullmq` — the Manifest / Worker / Dispatcher triple, repeatable jobs, enqueuing, progress publishing, concurrency and retries. |
|
|
28
|
-
| `hor-resolver-share` | Implement the Share class — the per-process container of shared singletons handed to every resolver as `context.share` — and decide what belongs in Share versus Context. |
|
|
29
|
-
| `hor-resolver-validator` | Implement `*InputValidator` classes for resolvers, extending `BaseInputValidator` and delegating value checks to `mentsu-value-inspector`. |
|
|
30
|
-
| `hor-restfulapi-architecture` | The REST layer of a renchan backend — the renderer architecture under `server/restfulapi/`, routes and versions, `render()`, response/error hashes, the auth filter, and flushers. |
|
|
31
|
-
| `hor-security-audit` | Read-only, repo-wide security audit of a Node project, producing a findings list — injection, auth gaps, exposure, secrets, dependencies, CORS, rate limiting, PII, uploads. |
|
|
32
14
|
| `hor-sequelize-migration` | Write renchan/Sequelize migrations — `createTable`, `addColumn`/`removeColumn`, `addIndex`, index naming, and whether to add a foreign-key column. |
|
|
33
15
|
| `hor-sequelize-model` | Write renchan/Sequelize model definitions — attributes, `createOptions`, associations, scopes, hooks, and how to wire a `MixinModel`. |
|
|
34
16
|
| `hor-sequelize-seeder` | Write renchan/Sequelize seeders — the master / dev-master / development split, the file skeleton, filename numbering, and per-file seed-id blocks. |
|
|
35
17
|
| `hor-sequelize-subquery` | Define named subqueries with `this.addSubquery` and consume them via `Model.subquery(name, params)`; filtering by a related table is a subquery, not a JOIN. |
|
|
36
|
-
| `hor-
|
|
37
|
-
|
|
18
|
+
| `hor-bank-id` | Allocate an exclusive, collision-free row-id prefix for a requester inside one backend repository, so two writers never pick the same explicit id in seeders and test fixtures. |
|
|
19
|
+
|
|
20
|
+
### GraphQL
|
|
21
|
+
|
|
22
|
+
| Skill | Summary |
|
|
23
|
+
| :-- | :-- |
|
|
24
|
+
| `hor-graphql-schema` | Author GraphQL SDL files for a renchan server — per-audience schemas, numbered per-domain files, custom scalars, and naming, nullability, enum and pagination conventions. |
|
|
25
|
+
| `hor-graphql-server-engine` | Implement a per-endpoint `*GraphqlServerEngine`: its URL, schema path, resolver directories, Share/Context DI, auth filter, middleware, scalars and error codes. |
|
|
26
|
+
| `hor-query-resolver` | Write GraphQL Query resolvers extending `BaseQueryResolver` — pagination, association includes, domain-error throwing, and the actual-vs-stub pair. |
|
|
27
|
+
| `hor-mutation-resolver` | Implement GraphQL Mutation resolvers extending `BaseMutationResolver` — state-changing operations and the single transaction each runs in. |
|
|
38
28
|
| `hor-subscription-resolver` | Implement a GraphQL subscription resolver — declare the operation, scope its channel per subscriber, gate who may subscribe, and wire the publish side. |
|
|
29
|
+
| `hor-resolver-validator` | Implement `*InputValidator` classes for resolvers, extending `BaseInputValidator` and delegating value checks to `mentsu-value-inspector`. |
|
|
30
|
+
| `hor-resolver-share` | Implement the Share class — the per-process container of shared singletons handed to every resolver as `context.share` — and decide what belongs in Share versus Context. |
|
|
31
|
+
| `hor-stub-api` | Implement a stub resolver returning hardcoded, schema-accurate data with no DB access, so the frontend can develop against the API contract before the real backend exists. |
|
|
32
|
+
|
|
33
|
+
### REST
|
|
34
|
+
|
|
35
|
+
| Skill | Summary |
|
|
36
|
+
| :-- | :-- |
|
|
37
|
+
| `hor-restfulapi-architecture` | The REST layer of a renchan backend — the renderer architecture under `server/restfulapi/`, routes and versions, `render()`, response/error hashes, the auth filter, and flushers. |
|
|
38
|
+
|
|
39
|
+
### Authentication
|
|
40
|
+
|
|
41
|
+
| Skill | Summary |
|
|
42
|
+
| :-- | :-- |
|
|
43
|
+
| `hor-cookie-authentication` | Cookie-based authentication for a renchan backend, per actor — the credential and token models, access plus rotating refresh tokens with reuse detection, the HttpOnly refresh cookie, and the signIn / signUp / signOut / renewAccessToken resolvers. |
|
|
44
|
+
|
|
45
|
+
### Execution placement
|
|
46
|
+
|
|
47
|
+
| Skill | Summary |
|
|
48
|
+
| :-- | :-- |
|
|
49
|
+
| `hor-execution-placement-pattern` | Decide where processing belongs: a synchronous GraphQL/REST operation, or a background worker triggered from a handler, from a post-worker, or on a schedule. |
|
|
50
|
+
| `hor-post-worker` | Implement a post-worker: a hook firing after a resolver has resolved and the response has been sent, for side effects outside the API's main processing. |
|
|
51
|
+
| `hor-renchan-job-bullmq` | Write and wire background jobs with `@openreachtech/renchan-job-bullmq` — the Manifest / Worker / Dispatcher triple, repeatable jobs, enqueuing, progress publishing, concurrency and retries. |
|
|
52
|
+
|
|
53
|
+
### AI features
|
|
54
|
+
|
|
55
|
+
| Skill | Summary |
|
|
56
|
+
| :-- | :-- |
|
|
57
|
+
| `hor-ai-agent-structure` | Structure an app-side AI agent on `mentsu-agent-loop-core`: a `ProceduralAgentLoop` subclass plus per-step `BaseAgentAction` subclasses under `app/agents/<name>/`. |
|
|
58
|
+
| `hor-agent-loop` | Build an LLM agent loop with the three `@openreachtech/mentsu-agent-loop` packages — the core iteration engine, a BullMQ job runner, and a GraphQL mutation plus progress subscription. |
|
|
59
|
+
| `hor-multi-llm-provider` | Support Claude / OpenAI / Gemini behind one abstraction — an abstract model processor, a base per vendor, a concrete class per model, and a loader that picks one by model name. |
|
|
60
|
+
| `hor-light-rag` | Add lightweight RAG for agent documents without a vector database — a vector-first / LLM-fallback ranker over stored `Document` rows, plus a MySQL n-gram fulltext keyword index. |
|
|
61
|
+
| `hor-ai-prompt-document-store` | Hold agent config, instructions, documents and tool schemas in the database rather than in code, assembling the runtime prompt at request time and versioning through backup tables. |
|
|
62
|
+
|
|
63
|
+
### Integration
|
|
64
|
+
|
|
65
|
+
| Skill | Summary |
|
|
66
|
+
| :-- | :-- |
|
|
67
|
+
| `hor-external-api-client` | Implement an external HTTP/REST API client with `@openreachtech/mentsu-rocket-client` — the Launcher / Payload / Capsule trio under `app/<serviceName>Client/`. |
|
|
68
|
+
|
|
69
|
+
### Types and constants
|
|
70
|
+
|
|
71
|
+
| Skill | Summary |
|
|
72
|
+
| :-- | :-- |
|
|
39
73
|
| `hor-type-interface` | Define `.d.ts` type interfaces — model interfaces under `types/models/` (global `model`) and resolver Input/Result types under `types/resolvers/<category>/`. |
|
|
74
|
+
| `hor-constant-definition` | Define an application constant as two files: a CommonJS master under `constants/` (the source of truth) plus an ESM bridge under `app/constants/` that re-exports it. |
|
|
75
|
+
|
|
76
|
+
### Design patterns
|
|
77
|
+
|
|
78
|
+
| Skill | Summary |
|
|
79
|
+
| :-- | :-- |
|
|
80
|
+
| `hor-strategy-pattern` | Replace an else-if/switch dispatch chain with a base processor, one subclass per variant, and a bulk loader that auto-discovers subclasses and picks one by a dispatch getter. |
|
|
81
|
+
|
|
82
|
+
### Security
|
|
83
|
+
|
|
84
|
+
| Skill | Summary |
|
|
85
|
+
| :-- | :-- |
|
|
86
|
+
| `hor-security-audit` | Read-only, repo-wide security audit of a Node project, producing a findings list — injection, auth gaps, exposure, secrets, dependencies, CORS, rate limiting, PII, uploads. |
|
|
87
|
+
|
|
88
|
+
### Testing
|
|
89
|
+
|
|
90
|
+
| Skill | Summary |
|
|
91
|
+
| :-- | :-- |
|
|
92
|
+
| `hor-backend-testing` | Where a test file goes (`tests/__tests__` vs `tests/_orders`), how run order among DB-writing tests is guaranteed, how to run the suite, and the purity rules for tests and doubles. |
|
|
93
|
+
| `hor-build-e2e-test-environment` | Build, run and debug the hand-operated local E2E stack under `e2e/docker/` — its containers, the reverse-proxy edge where production has one, its seed set, and the `up`/`start`/`seed`/`clean`/`down` scripts. |
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Installing them
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
npm install -D @openreachtech/hora-skills-ort-renchan
|
|
100
|
+
npx --no hora-skills-ort-renchan install
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The [README](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/README.md) covers the `postinstall` hook, installing more than one domain into the same `.claude/skills/`, and keeping an installation current.
|
|
40
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openreachtech/hora-skills-ort-renchan",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Distributes the renchan backend skills used to develop with Hora Kit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
"url": "https://github.com/openreachtech/hora-skills-ort-renchan/issues"
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/openreachtech/hora-skills-ort-renchan#readme",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=20.0.0"
|
|
40
|
+
},
|
|
38
41
|
"dependencies": {
|
|
39
42
|
},
|
|
40
43
|
"devDependencies": {
|
|
@@ -47,5 +50,9 @@
|
|
|
47
50
|
"@types/jest": "^30.0.0",
|
|
48
51
|
"eslint": "^9.39.5",
|
|
49
52
|
"jest": "^30.4.2"
|
|
53
|
+
},
|
|
54
|
+
"overrides": {
|
|
55
|
+
"brace-expansion@5": "^5.0.9",
|
|
56
|
+
"flatted": "^3.4.2"
|
|
50
57
|
}
|
|
51
58
|
}
|