@openreachtech/hora-skills-ort-renchan 0.1.0 → 0.2.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 CHANGED
@@ -8,18 +8,18 @@ renchan バックエンドスキルを配布するパッケージです。単体
8
8
 
9
9
  このパッケージが配布するのは **スキルのみ** です。`import` して使うライブラリはなく、同梱する唯一の実行コマンドはそのスキルを配置するためのものです。スキルとは `SKILL.md`(と任意の `references/`・`scripts/`)を収めたディレクトリで、Claude Code が読み込み `/<name>` として呼び出します。導入先のリポジトリにインストールすることで、Open Reach Tech が開発に用いている規約と手順を、そのリポジトリで作業するエージェントに届けます。
10
10
 
11
- 配布されるスキルは 31 件、すべて `backend` ドメインのもので、内容は「renchan ベースの Node バックエンド」です。各名前の先頭 3 文字がドメインを表すので、フラットに並んだスキル一覧を見た人が、どれがこのパッケージ由来かを一目で判別できます。ドメインごとに別のパッケージになっており、リポジトリは自分が扱うドメインのものを入れます。
11
+ 配布されるスキルはすべて `backend` ドメインのもので、内容は「renchan ベースの Node バックエンド」です。各名前の先頭 3 文字がドメインを表すので、フラットに並んだスキル一覧を見た人が、どれがこのパッケージ由来かを一目で判別できます。ドメインごとに別のパッケージになっており、リポジトリは自分が扱うドメインのものを入れます。
12
12
 
13
- | パッケージ | プレフィックス | ドメイン | スキル数 |
14
- | :-- | :-- | :-- | --: |
15
- | `@openreachtech/hora-skills-ort-core` | `hoc-` | `core` | 39 |
16
- | `@openreachtech/hora-skills-ort-renchan`(このパッケージ) | `hor-` | `backend` | 31 |
17
- | `@openreachtech/hora-skills-ort-furo` | `hof-` | `frontend` | 46 |
18
- | `@openreachtech/hora-skills-ort-support` | `hos-` | `support` | 3 |
13
+ | パッケージ | プレフィックス | ドメイン |
14
+ | :-- | :-- | :-- |
15
+ | [`@openreachtech/hora-skills-ort-core`](https://github.com/openreachtech/hora-skills-ort-core) | `hoc-` | `core` |
16
+ | [`@openreachtech/hora-skills-ort-renchan`](https://github.com/openreachtech/hora-skills-ort-renchan)(このパッケージ) | `hor-` | `backend` |
17
+ | [`@openreachtech/hora-skills-ort-furo`](https://github.com/openreachtech/hora-skills-ort-furo) | `hof-` | `frontend` |
18
+ | [`@openreachtech/hora-skills-ort-support`](https://github.com/openreachtech/hora-skills-ort-support) | `hos-` | `support` |
19
19
 
20
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 行)を、呼び出しコマンド名で並べています。
21
21
 
22
- ソースは `kit/skills/backend/<name>/` に配置され、`dist/` が公開されるビルド成果物です。同じスキルフォルダからドメインの階層だけを取り除いた形で、これが Claude Code の求めるフラットな構成です。スキルフォルダ名はそのスキルの `name:` であり、インストール後のフォルダ名でもあります。一貫して同じ 1 つの文字列なので、カタログで見た名前がそのまま入力するコマンドになります。
22
+ ソースは `kit/skills/<name>/` に配置され、`dist/` が公開されるビルド成果物です。同じスキルフォルダをそのまま写した形で、これが Claude Code の求めるフラットな構成です。スキルフォルダ名はそのスキルの `name:` であり、インストール後のフォルダ名でもあります。一貫して同じ 1 つの文字列なので、カタログで見た名前がそのまま入力するコマンドになります。
23
23
 
24
24
  ## インストール
25
25
 
@@ -57,7 +57,7 @@ npx --no hora-skills-ort-renchan install
57
57
 
58
58
  ### 複数のドメインを入れる
59
59
 
60
- 4 つのパッケージはいずれも同じ `.claude/skills/` に配置し、それぞれが自分の配置内容を `.hora/<パッケージ名>.json` に記録します。したがって、ある実行が削除するのはそのパッケージが配置したものだけで、他には手を触れません。
60
+ `hora-skills` のパッケージはいずれも同じ `.claude/skills/` に配置し、それぞれが自分の配置内容を `.hora/<パッケージ名>.json` に記録します。したがって、ある実行が削除するのはそのパッケージが配置したものだけで、他には手を触れません。
61
61
 
62
62
  ```json
63
63
  {
package/README.md CHANGED
@@ -8,18 +8,18 @@ A distribution package of the renchan backend skills — installed into any repo
8
8
 
9
9
  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.
10
10
 
11
- 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:
11
+ The skills distributed are 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:
12
12
 
13
- | Package | Prefix | Domain | Skills |
14
- | :-- | :-- | :-- | --: |
15
- | `@openreachtech/hora-skills-ort-core` | `hoc-` | `core` | 39 |
16
- | `@openreachtech/hora-skills-ort-renchan` (this one) | `hor-` | `backend` | 31 |
17
- | `@openreachtech/hora-skills-ort-furo` | `hof-` | `frontend` | 46 |
18
- | `@openreachtech/hora-skills-ort-support` | `hos-` | `support` | 3 |
13
+ | Package | Prefix | Domain |
14
+ | :-- | :-- | :-- |
15
+ | [`@openreachtech/hora-skills-ort-core`](https://github.com/openreachtech/hora-skills-ort-core) | `hoc-` | `core` |
16
+ | [`@openreachtech/hora-skills-ort-renchan`](https://github.com/openreachtech/hora-skills-ort-renchan) (this one) | `hor-` | `backend` |
17
+ | [`@openreachtech/hora-skills-ort-furo`](https://github.com/openreachtech/hora-skills-ort-furo) | `hof-` | `frontend` |
18
+ | [`@openreachtech/hora-skills-ort-support`](https://github.com/openreachtech/hora-skills-ort-support) | `hos-` | `support` |
19
19
 
20
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.
21
21
 
22
- 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.
22
+ The source is organized at `kit/skills/<name>/`, and `dist/` is the published build output: the same skill folders copied through unchanged, 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.
23
23
 
24
24
  ## Installation
25
25
 
@@ -57,7 +57,7 @@ The skills land in your repository's `.claude/skills/`. Claude Code discovers th
57
57
 
58
58
  ### Installing more than one domain
59
59
 
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:
60
+ Each `hora-skills` package 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:
61
61
 
62
62
  ```json
63
63
  {
@@ -4,6 +4,7 @@ One create-table migration per credential / token table, written with the standa
4
4
 
5
5
  Tables, per actor (`<Actor>` shown):
6
6
 
7
+ - `<actor>_secrets` (+ `<actor>_secrets_bk` backup) — `<actor>_id`, `email`, `saved_at`.
7
8
  - `<actor>_password_hashes` (+ `<actor>_password_hashes_bk` backup) — `<actor>_id`, `password_hash`, `saved_at`.
8
9
  - `<actor>_access_tokens` — `<actor>_id`, `access_token`, `session_key`, `generated_at`, `expired_at`.
9
10
  - `<actor>_refresh_tokens` — `<actor>_id`, `token_hash`, `session_key`, `used_at`, `revoked_at`, `generated_at`, `expired_at`.
@@ -13,6 +14,6 @@ Auth-specific points:
13
14
  - **Unique index on the token digest** (`token_hash`) and on `access_token` — each is the lookup key, and the unique index makes a duplicate impossible.
14
15
  - **Index `session_key`** on both token tables — rotation and revocation query by series.
15
16
  - Foreign keys (`<actor>_id`) are plain `BIGINT` columns with an index and **no** DB-level `references` constraint — the renchan convention.
16
- - The `_bk` backup table mirrors the source columns; it pairs with the password-hash model's backup mixin ([token-models](./token-models.md)).
17
+ - The `_bk` backup table mirrors the source columns; it pairs with the backup mixin on the model it shadows ([token-models](./token-models.md)). **Both credential tables take one** — a secret and a digest are each replaced rather than edited, and the history is what a reset or an address change leaves behind. The token tables take none: a token is deleted or revoked, never rewritten.
17
18
 
18
19
  The columns map one-to-one to the model attributes ([token-models](./token-models.md)) — camelCase attribute ↔ snake_case column via `underscored: true`. Add or change a column in the migration and the model together.
@@ -3,7 +3,7 @@
3
3
  An authenticated actor's credential and session live in a small cluster of tables, kept apart from the actor's profile. For an actor `<Actor>`:
4
4
 
5
5
  - `<Actor>` — the entity (its profile fields are the app's own design; see [[hor-database-design]]).
6
- - `<Actor>Secret` — the sign-in identifier (`email`), kept apart from the profile.
6
+ - `<Actor>Secret` — the sign-in identifier (`email`), kept apart from the profile. Takes the backup mixin.
7
7
  - `<Actor>PasswordHash` — the password digest; verifies a candidate password.
8
8
  - `<Actor>AccessToken` — the short-lived token (15 min), sent on the `x-renchan-access-token` header.
9
9
  - `<Actor>RefreshToken` — the long-lived token; stored only as a digest, delivered as an `HttpOnly` cookie.
@@ -99,6 +99,22 @@ extractUserId () {
99
99
  }
100
100
  ```
101
101
 
102
+ ## Secret
103
+
104
+ `<Actor>Secret` stores `email` and uses the backup mixin, so an address change leaves the
105
+ previous one behind rather than overwriting it. It is the only thing `signIn` looks an actor up
106
+ by:
107
+
108
+ ```js
109
+ static get Mixins () {
110
+ return [BackupMixinModel]
111
+ }
112
+
113
+ static get BackupModel () {
114
+ return this._.<Actor>SecretsBk
115
+ }
116
+ ```
117
+
102
118
  ## Password hash
103
119
 
104
120
  `<Actor>PasswordHash` stores `passwordHash`, uses the backup mixin (history), and verifies a candidate through the enciphered compare — never a plain equality:
package/docs/skills.ja.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  *[English](./skills.md)*
4
4
 
5
- このパッケージに収録された全 31 スキルのカタログです。各スキルに 1〜2 行の概要を添えています。
5
+ このパッケージに収録された全スキルのカタログです。各スキルに 1〜2 行の概要を添えています。
6
6
 
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` にあります。 以下は領域ごとにまとめています。領域はこのカタログの見出しであり、スキル名の一部ではありません。
7
+ 各スキルは `kit/skills/<name>/` に、スキルディレクトリの直下 1 階層で置かれます。そのフォルダ名がスキルの `name:` であり、インストール後のフォルダ名でもあります。したがって下表の **スキル** だけで足ります。`/name` として呼び出す名前、インストール後に `.claude/skills/` に現れる名前、ソースの置き場所が、すべて同じ 1 つの文字列です。先頭 3 文字はドメインを表します。配置と命名の規則は [ビルド規約](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/.claude/skills/build/SKILL.md) を参照してください。各スキルの詳細は、それぞれの `SKILL.md` と、必要なものだけがその隣に持つ `references/` にあります。1 枚で足りるスキルは `references/` を持ちません。参照を持つスキルでは、どの参照が何を定めるかを `SKILL.md` が示します。 以下は領域ごとにまとめています。領域はこのカタログの見出しであり、スキル名の一部ではありません。
8
8
 
9
9
  ### データベース
10
10
 
package/docs/skills.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  *[日本語](./skills.ja.md)*
4
4
 
5
- A catalog of every skill in this package — 31 in total — with a one- or two-line summary each.
5
+ A catalog of every skill in this package, with a one- or two-line summary each.
6
6
 
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.
7
+ Each skill lives at `kit/skills/<name>/`, directly under the skills 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 build convention](https://github.com/openreachtech/hora-skills-ort-renchan/blob/main/.claude/skills/build/SKILL.md) for the layout and the naming rules. Full guidance for a skill is in its own `SKILL.md`, and in the `references/` beside it where a skill needs one — a skill that fits in one file carries no `references/`, and each `SKILL.md` that has references says which of them settles what. Grouped by area below; an area is a heading of this catalog, never part of a skill's name.
8
8
 
9
9
  ### Database
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openreachtech/hora-skills-ort-renchan",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Distributes the renchan backend skills used to develop with Hora Kit.",
5
5
  "type": "module",
6
6
  "files": [
@@ -18,7 +18,7 @@
18
18
  "renchan"
19
19
  ],
20
20
  "scripts": {
21
- "build": "node .claude/skills/flatten/scripts/build.js",
21
+ "build": "node .claude/skills/build/scripts/build.js",
22
22
  "l": "npm run lint",
23
23
  "lint": "eslint .",
24
24
  "prepack": "npm run build",
@@ -45,14 +45,19 @@
45
45
  "@openreachtech/jest-constructor-spy": "^1.1.2",
46
46
  "@openreachtech/jest-deep-containing": "^1.0.2",
47
47
  "@openreachtech/jest-expect-each": "^1.0.3",
48
- "@openreachtech/mentsu-rootpath": "^1.1.1",
49
- "@openreachtech/renchan-env": "^1.0.4",
48
+ "@openreachtech/mentsu-rootpath": "^1.1.3",
49
+ "@openreachtech/renchan-env": "^1.0.6",
50
50
  "@types/jest": "^30.0.0",
51
51
  "eslint": "^9.39.5",
52
52
  "jest": "^30.4.2"
53
53
  },
54
54
  "overrides": {
55
+ "@humanfs/node": "^0.16.8",
55
56
  "brace-expansion@5": "^5.0.9",
56
57
  "flatted": "^3.4.2"
58
+ },
59
+ "allowScripts": {
60
+ "fsevents": false,
61
+ "unrs-resolver": false
57
62
  }
58
63
  }